import{$ as ql,$a as M5,$b as no,$c as os,$d as Dr,$e as al,A as lo,Aa as Lt,Ab as Xe,Ac as io,Ad as Oi,Ae as _R,Af as Ri,B as ua,Ba as Ql,Bb as Xi,Bc as B5,Bd as rR,Be as Cm,Bf as yi,C as Ma,Ca as wh,Cb as j,Cc as V5,Cd as Ah,Ce as $C,Cf as DR,D as _C,Da as vE,Db as No,Dc as $_,Dd as ol,De as vR,Df as PR,E as Dn,Ea as y5,Eb as v,Ec as z5,Ed as NC,Ee as ME,Ef as Bo,F as Pn,Fa as xd,Fb as MC,Fc as yc,Fd as rs,Fe as HC,Ff as Vo,G as vC,Ga as Zp,Gb as b,Gc as j5,Gd as Fs,Ge as bR,Gf as IR,H as hi,Ha as $a,Hb as En,Hc as Zi,Hd as cr,He as UC,Hf as AR,I as _E,Ia as yC,Ib as Yt,Ic as $5,Id as Oh,Ie as kE,If as OR,J as dm,Ja as S5,Jb as $i,Jc as H5,Jd as RC,Je as Jl,Jf as mo,K as h5,Ka as br,Kb as gn,Kc as pm,Kd as fm,Ke as GC,Kf as ea,L as wi,La as Mh,Lb as gt,Lc as H_,Ld as gm,Le as Qi,Lf as xm,M as f5,Ma as u,Mb as _t,Mc as Jr,Md as aR,Me as CR,Mf as Fi,N as g5,Na as bE,Nb as tn,Nc as U5,Nd as FC,Ne as as,Nf as ym,O as V_,Oa as ar,Ob as nn,Oc as DC,Od as _m,Oe as WC,Of as dr,P as bC,Pa as So,Pb as Re,Pc as Z,Pd as vm,Pe as yr,Pf as ci,Q as Cd,Qa as yd,Qb as yn,Qc as Rs,Qd as rl,Qe as ss,Qf as NR,R as z_,Ra as ii,Rb as je,Rc as yE,Rd as sR,Re as Kt,S as CC,Sa as st,Sb as Mo,Sc as G5,Sd as Zl,Se as Gt,T as As,Ta as SC,Tb as d,Tc as W5,Td as vt,Te as Ai,U as Kp,Ua as co,Ub as U,Uc as PC,Ud as LC,Ue as xR,V as li,Va as w5,Vb as X,Vc as Ph,Vd as be,Ve as an,W as fn,Wa as wC,Wb as Hi,Wc as q5,Wd as lR,We as Lh,X as rt,Xa as L,Xb as kC,Xc as X5,Xd as BC,Xe as ha,Y as vi,Ya as Bt,Yb as Th,Yc as SE,Yd as mt,Ye as lt,Z as vn,Za as ft,Zb as Eh,Zc as Q5,Zd as He,Ze as Ni,_ as _5,_a as Cr,_b as Dh,_c as Y5,_d as VC,_e as qC,a as H,aa as Q,ab as xn,ac as j_,ad as K5,ae as Ci,af as Fo,b as tt,ba as Ft,bb as Ae,bc as hn,bd as um,be as Nh,bf as XC,c as d5,ca as v5,cb as kh,cc as Jt,cd as Z5,ce as re,cf as Bh,d as Is,da as kt,db as k5,dc as ln,dd as lr,de as cR,df as ke,e as On,ea as ge,eb as T5,ec as il,ed as IC,ee as Ue,ef as Me,f as nl,fa as f,fb as E5,fc as TC,fd as hm,fe as xi,ff as kd,g as so,ga as b5,gb as CE,gc as EC,gd as eu,ge as bm,gf as QC,h as m5,ha as Xl,hb as D5,hc as on,hd as Go,he as dR,hf as yR,i as _r,ia as Os,ib as xE,ic as oi,id as AC,ie as mR,if as SR,j as Le,ja as D,jb as P5,jc as $r,jd as OC,je as bt,jf as wR,k as qt,ka as P,kb as It,kc as A5,kd as U_,ke as pt,kf as MR,l as bd,la as Vn,lb as A,lc as Jp,ld as J5,le as Sc,lf as St,m as p5,ma as vr,mb as I5,mc as O5,md as Yl,me as Ro,mf as kR,n as yh,na as Di,nb as O,nc as N5,nd as Ta,ne as pR,nf as TR,o as Zr,oa as Pi,ob as Ii,oc as sr,od as Hr,oe as zC,of as Jo,p as or,pa as mm,pb as Fe,pc as ri,pd as wn,pe as jt,pf as At,q as xt,qa as C5,qb as J,qc as R5,qd as Kl,qe as nt,qf as Mt,r as zi,ra as ve,rb as ee,rc as ka,rd as Ih,re as ct,rf as Lo,s as cm,sa as bi,sb as x,sc as F5,sd as eR,se as xr,sf as wc,t as u5,ta as Sh,tb as s,tc as oe,td as tR,te as jC,tf as Vh,u as yt,ua as xC,ub as l,uc as Ut,ud as nR,ue as Rh,uf as TE,v as rr,va as me,vb as F,vc as L5,vd as wE,ve as Fh,vf as ls,w as Er,wa as Ns,wb as _o,wc as ae,wd,we as uR,wf as Ea,x as L_,xa as un,xb as wo,xc as K,xd as iR,xe as hR,xf as YC,y as B_,ya as fi,yb as jr,yc as Sd,yd as Md,ye as fR,yf as Mc,z as xc,za as x5,zb as qe,zc as dt,zd as oR,ze as gR,zf as ER}from"./chunk-UKWNOQKZ.js";var BV=Is((Frt,US)=>{(function(t,i,e){if(!t)return;for(var n={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},o={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},r={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},a={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},c,m=1;m<20;++m)n[111+m]="f"+m;for(m=0;m<=9;++m)n[m+96]=m.toString();function p(T,R,W){if(T.addEventListener){T.addEventListener(R,W,!1);return}T.attachEvent("on"+R,W)}function h(T){if(T.type=="keypress"){var R=String.fromCharCode(T.which);return T.shiftKey||(R=R.toLowerCase()),R}return n[T.which]?n[T.which]:o[T.which]?o[T.which]:String.fromCharCode(T.which).toLowerCase()}function g(T,R){return T.sort().join(",")===R.sort().join(",")}function M(T){var R=[];return T.shiftKey&&R.push("shift"),T.altKey&&R.push("alt"),T.ctrlKey&&R.push("ctrl"),T.metaKey&&R.push("meta"),R}function C(T){if(T.preventDefault){T.preventDefault();return}T.returnValue=!1}function _(T){if(T.stopPropagation){T.stopPropagation();return}T.cancelBubble=!0}function w(T){return T=="shift"||T=="ctrl"||T=="alt"||T=="meta"}function S(){if(!c){c={};for(var T in n)T>95&&T<112||n.hasOwnProperty(T)&&(c[n[T]]=T)}return c}function y(T,R,W){return W||(W=S()[T]?"keydown":"keypress"),W=="keypress"&&R.length&&(W="keydown"),W}function k(T){return T==="+"?["+"]:(T=T.replace(/\+{2}/g,"+plus"),T.split("+"))}function I(T,R){var W,pe,_e,G=[];for(W=k(T),_e=0;_e1){Y(ie,Se,De,$e);return}q=I(ie,$e),R._callbacks[q.key]=R._callbacks[q.key]||[],ce(q.key,q.modifiers,{type:q.action},it,ie,et),R._callbacks[q.key][it?"unshift":"push"]({callback:De,modifiers:q.modifiers,action:q.action,seq:it,level:et,combo:ie})}R._bindMultiple=function(ie,De,$e){for(var it=0;it-1||E(R,W.target))return!1;if("composedPath"in T&&typeof T.composedPath=="function"){var pe=T.composedPath()[0];pe!==T.target&&(R=pe)}return R.tagName=="INPUT"||R.tagName=="SELECT"||R.tagName=="TEXTAREA"||R.isContentEditable},N.prototype.handleKey=function(){var T=this;return T._handleKey.apply(T,arguments)},N.addKeycodes=function(T){for(var R in T)T.hasOwnProperty(R)&&(n[R]=T[R]);c=null},N.init=function(){var T=N(i);for(var R in T)R.charAt(0)!=="_"&&(N[R]=(function(W){return function(){return T[W].apply(T,arguments)}})(R))},N.init(),t.Mousetrap=N,typeof US<"u"&&US.exports&&(US.exports=N),typeof define=="function"&&define.amd&&define(function(){return N})})(typeof window<"u"?window:null,typeof window<"u"?document:null)});var zz=Is(SA=>{var Vz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");SA.encode=function(t){if(0<=t&&t{var jz=zz(),wA=5,$z=1<>1;return i?-e:e}MA.encode=function(i){var e="",n,o=Lfe(i);do n=o&Hz,o>>>=wA,o>0&&(n|=Uz),e+=jz.encode(n);while(o>0);return e};MA.decode=function(i,e,n){var o=i.length,r=0,a=0,c,m;do{if(e>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(m=jz.decode(i.charCodeAt(e++)),m===-1)throw new Error("Invalid base64 digit: "+i.charAt(e-1));c=!!(m&Uz),m&=Hz,r=r+(m<{function Vfe(t,i,e){if(i in t)return t[i];if(arguments.length===3)return e;throw new Error('"'+i+'" is a required argument.')}la.getArg=Vfe;var Wz=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,zfe=/^data:.+\,.+$/;function _b(t){var i=t.match(Wz);return i?{scheme:i[1],auth:i[2],host:i[3],port:i[4],path:i[5]}:null}la.urlParse=_b;function fg(t){var i="";return t.scheme&&(i+=t.scheme+":"),i+="//",t.auth&&(i+=t.auth+"@"),t.host&&(i+=t.host),t.port&&(i+=":"+t.port),t.path&&(i+=t.path),i}la.urlGenerate=fg;var jfe=32;function $fe(t){var i=[];return function(e){for(var n=0;njfe&&i.pop(),r}}var kA=$fe(function(i){var e=i,n=_b(i);if(n){if(!n.path)return i;e=n.path}for(var o=la.isAbsolute(e),r=[],a=0,c=0;;)if(a=c,c=e.indexOf("/",a),c===-1){r.push(e.slice(a));break}else for(r.push(e.slice(a,c));c=0;c--)m=r[c],m==="."?r.splice(c,1):m===".."?p++:p>0&&(m===""?(r.splice(c+1,p),p=0):(r.splice(c,2),p--));return e=r.join("/"),e===""&&(e=o?"/":"."),n?(n.path=e,fg(n)):e});la.normalize=kA;function qz(t,i){t===""&&(t="."),i===""&&(i=".");var e=_b(i),n=_b(t);if(n&&(t=n.path||"/"),e&&!e.scheme)return n&&(e.scheme=n.scheme),fg(e);if(e||i.match(zfe))return i;if(n&&!n.host&&!n.path)return n.host=i,fg(n);var o=i.charAt(0)==="/"?i:kA(t.replace(/\/+$/,"")+"/"+i);return n?(n.path=o,fg(n)):o}la.join=qz;la.isAbsolute=function(t){return t.charAt(0)==="/"||Wz.test(t)};function Hfe(t,i){t===""&&(t="."),t=t.replace(/\/$/,"");for(var e=0;i.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return i;++e}return Array(e+1).join("../")+i.substr(t.length+1)}la.relative=Hfe;var Xz=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Qz(t){return t}function Ufe(t){return Yz(t)?"$"+t:t}la.toSetString=Xz?Qz:Ufe;function Gfe(t){return Yz(t)?t.slice(1):t}la.fromSetString=Xz?Qz:Gfe;function Yz(t){if(!t)return!1;var i=t.length;if(i<9||t.charCodeAt(i-1)!==95||t.charCodeAt(i-2)!==95||t.charCodeAt(i-3)!==111||t.charCodeAt(i-4)!==116||t.charCodeAt(i-5)!==111||t.charCodeAt(i-6)!==114||t.charCodeAt(i-7)!==112||t.charCodeAt(i-8)!==95||t.charCodeAt(i-9)!==95)return!1;for(var e=i-10;e>=0;e--)if(t.charCodeAt(e)!==36)return!1;return!0}function Wfe(t,i,e){var n=Kd(t.source,i.source);return n!==0||(n=t.originalLine-i.originalLine,n!==0)||(n=t.originalColumn-i.originalColumn,n!==0||e)||(n=t.generatedColumn-i.generatedColumn,n!==0)||(n=t.generatedLine-i.generatedLine,n!==0)?n:Kd(t.name,i.name)}la.compareByOriginalPositions=Wfe;function qfe(t,i,e){var n;return n=t.originalLine-i.originalLine,n!==0||(n=t.originalColumn-i.originalColumn,n!==0||e)||(n=t.generatedColumn-i.generatedColumn,n!==0)||(n=t.generatedLine-i.generatedLine,n!==0)?n:Kd(t.name,i.name)}la.compareByOriginalPositionsNoSource=qfe;function Xfe(t,i,e){var n=t.generatedLine-i.generatedLine;return n!==0||(n=t.generatedColumn-i.generatedColumn,n!==0||e)||(n=Kd(t.source,i.source),n!==0)||(n=t.originalLine-i.originalLine,n!==0)||(n=t.originalColumn-i.originalColumn,n!==0)?n:Kd(t.name,i.name)}la.compareByGeneratedPositionsDeflated=Xfe;function Qfe(t,i,e){var n=t.generatedColumn-i.generatedColumn;return n!==0||e||(n=Kd(t.source,i.source),n!==0)||(n=t.originalLine-i.originalLine,n!==0)||(n=t.originalColumn-i.originalColumn,n!==0)?n:Kd(t.name,i.name)}la.compareByGeneratedPositionsDeflatedNoLine=Qfe;function Kd(t,i){return t===i?0:t===null?1:i===null?-1:t>i?1:-1}function Yfe(t,i){var e=t.generatedLine-i.generatedLine;return e!==0||(e=t.generatedColumn-i.generatedColumn,e!==0)||(e=Kd(t.source,i.source),e!==0)||(e=t.originalLine-i.originalLine,e!==0)||(e=t.originalColumn-i.originalColumn,e!==0)?e:Kd(t.name,i.name)}la.compareByGeneratedPositionsInflated=Yfe;function Kfe(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}la.parseSourceMapInput=Kfe;function Zfe(t,i,e){if(i=i||"",t&&(t[t.length-1]!=="/"&&i[0]!=="/"&&(t+="/"),i=t+i),e){var n=_b(e);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}i=qz(fg(n),i)}return kA(i)}la.computeSourceURL=Zfe});var Zz=Is(Kz=>{var TA=cw(),EA=Object.prototype.hasOwnProperty,th=typeof Map<"u";function Zd(){this._array=[],this._set=th?new Map:Object.create(null)}Zd.fromArray=function(i,e){for(var n=new Zd,o=0,r=i.length;o=0)return e}else{var n=TA.toSetString(i);if(EA.call(this._set,n))return this._set[n]}throw new Error('"'+i+'" is not in the set.')};Zd.prototype.at=function(i){if(i>=0&&i{var Jz=cw();function Jfe(t,i){var e=t.generatedLine,n=i.generatedLine,o=t.generatedColumn,r=i.generatedColumn;return n>e||n==e&&r>=o||Jz.compareByGeneratedPositionsInflated(t,i)<=0}function dw(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}dw.prototype.unsortedForEach=function(i,e){this._array.forEach(i,e)};dw.prototype.add=function(i){Jfe(this._last,i)?(this._last=i,this._array.push(i)):(this._sorted=!1,this._array.push(i))};dw.prototype.toArray=function(){return this._sorted||(this._array.sort(Jz.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ej.MappingList=dw});var ij=Is(nj=>{var vb=Gz(),kr=cw(),mw=Zz().ArraySet,ege=tj().MappingList;function Rl(t){t||(t={}),this._file=kr.getArg(t,"file",null),this._sourceRoot=kr.getArg(t,"sourceRoot",null),this._skipValidation=kr.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=kr.getArg(t,"ignoreInvalidMapping",!1),this._sources=new mw,this._names=new mw,this._mappings=new ege,this._sourcesContents=null}Rl.prototype._version=3;Rl.fromSourceMap=function(i,e){var n=i.sourceRoot,o=new Rl(Object.assign(e||{},{file:i.file,sourceRoot:n}));return i.eachMapping(function(r){var a={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(a.source=r.source,n!=null&&(a.source=kr.relative(n,a.source)),a.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(a.name=r.name)),o.addMapping(a)}),i.sources.forEach(function(r){var a=r;n!==null&&(a=kr.relative(n,r)),o._sources.has(a)||o._sources.add(a);var c=i.sourceContentFor(r);c!=null&&o.setSourceContent(r,c)}),o};Rl.prototype.addMapping=function(i){var e=kr.getArg(i,"generated"),n=kr.getArg(i,"original",null),o=kr.getArg(i,"source",null),r=kr.getArg(i,"name",null);!this._skipValidation&&this._validateMapping(e,n,o,r)===!1||(o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),r!=null&&(r=String(r),this._names.has(r)||this._names.add(r)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:r}))};Rl.prototype.setSourceContent=function(i,e){var n=i;this._sourceRoot!=null&&(n=kr.relative(this._sourceRoot,n)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[kr.toSetString(n)]=e):this._sourcesContents&&(delete this._sourcesContents[kr.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Rl.prototype.applySourceMap=function(i,e,n){var o=e;if(e==null){if(i.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=i.file}var r=this._sourceRoot;r!=null&&(o=kr.relative(r,o));var a=new mw,c=new mw;this._mappings.unsortedForEach(function(m){if(m.source===o&&m.originalLine!=null){var p=i.originalPositionFor({line:m.originalLine,column:m.originalColumn});p.source!=null&&(m.source=p.source,n!=null&&(m.source=kr.join(n,m.source)),r!=null&&(m.source=kr.relative(r,m.source)),m.originalLine=p.line,m.originalColumn=p.column,p.name!=null&&(m.name=p.name))}var h=m.source;h!=null&&!a.has(h)&&a.add(h);var g=m.name;g!=null&&!c.has(g)&&c.add(g)},this),this._sources=a,this._names=c,i.sources.forEach(function(m){var p=i.sourceContentFor(m);p!=null&&(n!=null&&(m=kr.join(n,m)),r!=null&&(m=kr.relative(r,m)),this.setSourceContent(m,p))},this)};Rl.prototype._validateMapping=function(i,e,n,o){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var r="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}if(!(i&&"line"in i&&"column"in i&&i.line>0&&i.column>=0&&!e&&!n&&!o)){if(i&&"line"in i&&"column"in i&&e&&"line"in e&&"column"in e&&i.line>0&&i.column>=0&&e.line>0&&e.column>=0&&n)return;var r="Invalid mapping: "+JSON.stringify({generated:i,source:n,original:e,name:o});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}};Rl.prototype._serializeMappings=function(){for(var i=0,e=1,n=0,o=0,r=0,a=0,c="",m,p,h,g,M=this._mappings.toArray(),C=0,_=M.length;C<_;C++){if(p=M[C],m="",p.generatedLine!==e)for(i=0;p.generatedLine!==e;)m+=";",e++;else if(C>0){if(!kr.compareByGeneratedPositionsInflated(p,M[C-1]))continue;m+=","}m+=vb.encode(p.generatedColumn-i),i=p.generatedColumn,p.source!=null&&(g=this._sources.indexOf(p.source),m+=vb.encode(g-a),a=g,m+=vb.encode(p.originalLine-1-o),o=p.originalLine-1,m+=vb.encode(p.originalColumn-n),n=p.originalColumn,p.name!=null&&(h=this._names.indexOf(p.name),m+=vb.encode(h-r),r=h)),c+=m}return c};Rl.prototype._generateSourcesContent=function(i,e){return i.map(function(n){if(!this._sourcesContents)return null;e!=null&&(n=kr.relative(e,n));var o=kr.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};Rl.prototype.toJSON=function(){var i={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(i.file=this._file),this._sourceRoot!=null&&(i.sourceRoot=this._sourceRoot),this._sourcesContents&&(i.sourcesContent=this._generateSourcesContent(i.sources,i.sourceRoot)),i};Rl.prototype.toString=function(){return JSON.stringify(this.toJSON())};nj.SourceMapGenerator=Rl});var $N=Is((ZH,RM)=>{(function(t){"use strict";let i="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp(`^${i}\\.${i}\\.${i}\\.${i}$`,"i"),threeOctet:new RegExp(`^${i}\\.${i}\\.${i}$`,"i"),twoOctet:new RegExp(`^${i}\\.${i}$`,"i"),longValue:new RegExp(`^${i}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),r="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(r,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${r})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${i}\\.${i}\\.${i}\\.${i}(${r})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${i}\\.${i}\\.${i}\\.${i}(${r})?$`,"i")};function m(C,_){if(C.indexOf("::")!==C.lastIndexOf("::"))return null;let w=0,S=-1,y=(C.match(c.zoneIndex)||[])[0],k,I;for(y&&(y=y.substring(1),C=C.replace(/%.+$/,""));(S=C.indexOf(":",S+1))>=0;)w++;if(C.substr(0,2)==="::"&&w--,C.substr(-2,2)==="::"&&w--,w>_)return null;for(I=_-w,k=":";I--;)k+="0:";return C=C.replace("::",k),C[0]===":"&&(C=C.slice(1)),C[C.length-1]===":"&&(C=C.slice(0,-1)),_=(function(){let E=C.split(":"),N=[];for(let T=0;T0;){if(k=w-S,k<0&&(k=0),C[y]>>k!==_[y]>>k)return!1;S-=w,y+=1}return!0}function h(C){if(o.test(C))return parseInt(C,16);if(C[0]==="0"&&!isNaN(parseInt(C[1],10))){if(n.test(C))return parseInt(C,8);throw new Error(`ipaddr: cannot parse ${C} as octal`)}return parseInt(C,10)}function g(C,_){for(;C.length<_;)C=`0${C}`;return C}let M={};M.IPv4=(function(){function C(_){if(_.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let w,S;for(w=0;w<_.length;w++)if(S=_[w],!(0<=S&&S<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=_}return C.prototype.SpecialRanges={unspecified:[[new C([0,0,0,0]),8]],broadcast:[[new C([255,255,255,255]),32]],multicast:[[new C([224,0,0,0]),4]],linkLocal:[[new C([169,254,0,0]),16]],loopback:[[new C([127,0,0,0]),8]],carrierGradeNat:[[new C([100,64,0,0]),10]],private:[[new C([10,0,0,0]),8],[new C([172,16,0,0]),12],[new C([192,168,0,0]),16]],reserved:[[new C([192,0,0,0]),24],[new C([192,0,2,0]),24],[new C([192,88,99,0]),24],[new C([198,18,0,0]),15],[new C([198,51,100,0]),24],[new C([203,0,113,0]),24],[new C([240,0,0,0]),4]],as112:[[new C([192,175,48,0]),24],[new C([192,31,196,0]),24]],amt:[[new C([192,52,193,0]),24]]},C.prototype.kind=function(){return"ipv4"},C.prototype.match=function(_,w){let S;if(w===void 0&&(S=_,_=S[0],w=S[1]),_.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return p(this.octets,_.octets,8,w)},C.prototype.prefixLengthFromSubnetMask=function(){let _=0,w=!1,S={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},y,k,I;for(y=3;y>=0;y-=1)if(k=this.octets[y],k in S){if(I=S[k],w&&I!==0)return null;I!==8&&(w=!0),_+=I}else return null;return 32-_},C.prototype.range=function(){return M.subnetMatch(this,this.SpecialRanges)},C.prototype.toByteArray=function(){return this.octets.slice(0)},C.prototype.toIPv4MappedAddress=function(){return M.IPv6.parse(`::ffff:${this.toString()}`)},C.prototype.toNormalizedString=function(){return this.toString()},C.prototype.toString=function(){return this.octets.join(".")},C})(),M.IPv4.broadcastAddressFromCIDR=function(C){try{let _=this.parseCIDR(C),w=_[0].toByteArray(),S=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),y=[],k=0;for(;k<4;)y.push(parseInt(w[k],10)|parseInt(S[k],10)^255),k++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},M.IPv4.isIPv4=function(C){return this.parser(C)!==null},M.IPv4.isValid=function(C){try{return new this(this.parser(C)),!0}catch{return!1}},M.IPv4.isValidCIDR=function(C){try{return this.parseCIDR(C),!0}catch{return!1}},M.IPv4.isValidFourPartDecimal=function(C){return!!(M.IPv4.isValid(C)&&C.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},M.IPv4.isValidCIDRFourPartDecimal=function(C){let _=C.match(/^(.+)\/(\d+)$/);return!M.IPv4.isValidCIDR(C)||!_?!1:M.IPv4.isValidFourPartDecimal(_[1])},M.IPv4.networkAddressFromCIDR=function(C){let _,w,S,y,k;try{for(_=this.parseCIDR(C),S=_[0].toByteArray(),k=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),y=[],w=0;w<4;)y.push(parseInt(S[w],10)&parseInt(k[w],10)),w++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},M.IPv4.parse=function(C){let _=this.parser(C);if(_===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(_)},M.IPv4.parseCIDR=function(C){let _;if(_=C.match(/^(.+)\/(\d+)$/)){let w=parseInt(_[2]);if(w>=0&&w<=32){let S=[this.parse(_[1]),w];return Object.defineProperty(S,"toString",{value:function(){return this.join("/")}}),S}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},M.IPv4.parser=function(C){let _,w,S;if(_=C.match(e.fourOctet))return(function(){let y=_.slice(1,6),k=[];for(let I=0;I4294967295||S<0)throw new Error("ipaddr: address outside defined range");return(function(){let y=[],k;for(k=0;k<=24;k+=8)y.push(S>>k&255);return y})().reverse()}else return(_=C.match(e.twoOctet))?(function(){let y=_.slice(1,4),k=[];if(S=h(y[1]),S>16777215||S<0)throw new Error("ipaddr: address outside defined range");return k.push(h(y[0])),k.push(S>>16&255),k.push(S>>8&255),k.push(S&255),k})():(_=C.match(e.threeOctet))?(function(){let y=_.slice(1,5),k=[];if(S=h(y[2]),S>65535||S<0)throw new Error("ipaddr: address outside defined range");return k.push(h(y[0])),k.push(h(y[1])),k.push(S>>8&255),k.push(S&255),k})():null},M.IPv4.subnetMaskFromPrefixLength=function(C){if(C=parseInt(C),C<0||C>32)throw new Error("ipaddr: invalid IPv4 prefix length");let _=[0,0,0,0],w=0,S=Math.floor(C/8);for(;w=0;I-=1)if(y=this.parts[I],y in S){if(k=S[y],w&&k!==0)return null;k!==16&&(w=!0),_+=k}else return null;return 128-_},C.prototype.range=function(){return M.subnetMatch(this,this.SpecialRanges)},C.prototype.toByteArray=function(){let _,w=[],S=this.parts;for(let y=0;y>8),w.push(_&255);return w},C.prototype.toFixedLengthString=function(){let _=function(){let S=[];for(let y=0;y>8,w&255,S>>8,S&255])},C.prototype.toNormalizedString=function(){let _=function(){let S=[];for(let y=0;yy&&(S=k.index,y=k[0].length);return y<0?w:`${w.substring(0,S)}::${w.substring(S+y)}`},C.prototype.toString=function(){return this.toRFC5952String()},C})(),M.IPv6.broadcastAddressFromCIDR=function(C){try{let _=this.parseCIDR(C),w=_[0].toByteArray(),S=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),y=[],k=0;for(;k<16;)y.push(parseInt(w[k],10)|parseInt(S[k],10)^255),k++;return new this(y)}catch(_){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${_})`)}},M.IPv6.isIPv6=function(C){return this.parser(C)!==null},M.IPv6.isValid=function(C){if(typeof C=="string"&&C.indexOf(":")===-1)return!1;try{let _=this.parser(C);return new this(_.parts,_.zoneId),!0}catch{return!1}},M.IPv6.isValidCIDR=function(C){if(typeof C=="string"&&C.indexOf(":")===-1)return!1;try{return this.parseCIDR(C),!0}catch{return!1}},M.IPv6.networkAddressFromCIDR=function(C){let _,w,S,y,k;try{for(_=this.parseCIDR(C),S=_[0].toByteArray(),k=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),y=[],w=0;w<16;)y.push(parseInt(S[w],10)&parseInt(k[w],10)),w++;return new this(y)}catch(I){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${I})`)}},M.IPv6.parse=function(C){let _=this.parser(C);if(_.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(_.parts,_.zoneId)},M.IPv6.parseCIDR=function(C){let _,w,S;if((w=C.match(/^(.+)\/(\d+)$/))&&(_=parseInt(w[2]),_>=0&&_<=128))return S=[this.parse(w[1]),_],Object.defineProperty(S,"toString",{value:function(){return this.join("/")}}),S;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},M.IPv6.parser=function(C){let _,w,S,y,k,I;if(S=C.match(c.deprecatedTransitional))return this.parser(`::ffff:${S[1]}`);if(c.native.test(C))return m(C,8);if((S=C.match(c.transitional))&&(I=S[6]||"",_=S[1],S[1].endsWith("::")||(_=_.slice(0,-1)),_=m(_+I,6),_.parts)){for(k=[parseInt(S[2]),parseInt(S[3]),parseInt(S[4]),parseInt(S[5])],w=0;w128)throw new Error("ipaddr: invalid IPv6 prefix length");let _=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0,S=Math.floor(C/8);for(;w{(function(t){if(typeof oU=="object")rU.exports=t();else if(typeof define=="function"&&define.amd)define(t);else{var i;try{i=window}catch{i=self}i.SparkMD5=t()}})(function(t){"use strict";var i=function(y,k){return y+k&4294967295},e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(y,k,I,E,N,T){return k=i(i(k,y),i(E,T)),i(k<>>32-N,I)}function o(y,k){var I=y[0],E=y[1],N=y[2],T=y[3];I+=(E&N|~E&T)+k[0]-680876936|0,I=(I<<7|I>>>25)+E|0,T+=(I&E|~I&N)+k[1]-389564586|0,T=(T<<12|T>>>20)+I|0,N+=(T&I|~T&E)+k[2]+606105819|0,N=(N<<17|N>>>15)+T|0,E+=(N&T|~N&I)+k[3]-1044525330|0,E=(E<<22|E>>>10)+N|0,I+=(E&N|~E&T)+k[4]-176418897|0,I=(I<<7|I>>>25)+E|0,T+=(I&E|~I&N)+k[5]+1200080426|0,T=(T<<12|T>>>20)+I|0,N+=(T&I|~T&E)+k[6]-1473231341|0,N=(N<<17|N>>>15)+T|0,E+=(N&T|~N&I)+k[7]-45705983|0,E=(E<<22|E>>>10)+N|0,I+=(E&N|~E&T)+k[8]+1770035416|0,I=(I<<7|I>>>25)+E|0,T+=(I&E|~I&N)+k[9]-1958414417|0,T=(T<<12|T>>>20)+I|0,N+=(T&I|~T&E)+k[10]-42063|0,N=(N<<17|N>>>15)+T|0,E+=(N&T|~N&I)+k[11]-1990404162|0,E=(E<<22|E>>>10)+N|0,I+=(E&N|~E&T)+k[12]+1804603682|0,I=(I<<7|I>>>25)+E|0,T+=(I&E|~I&N)+k[13]-40341101|0,T=(T<<12|T>>>20)+I|0,N+=(T&I|~T&E)+k[14]-1502002290|0,N=(N<<17|N>>>15)+T|0,E+=(N&T|~N&I)+k[15]+1236535329|0,E=(E<<22|E>>>10)+N|0,I+=(E&T|N&~T)+k[1]-165796510|0,I=(I<<5|I>>>27)+E|0,T+=(I&N|E&~N)+k[6]-1069501632|0,T=(T<<9|T>>>23)+I|0,N+=(T&E|I&~E)+k[11]+643717713|0,N=(N<<14|N>>>18)+T|0,E+=(N&I|T&~I)+k[0]-373897302|0,E=(E<<20|E>>>12)+N|0,I+=(E&T|N&~T)+k[5]-701558691|0,I=(I<<5|I>>>27)+E|0,T+=(I&N|E&~N)+k[10]+38016083|0,T=(T<<9|T>>>23)+I|0,N+=(T&E|I&~E)+k[15]-660478335|0,N=(N<<14|N>>>18)+T|0,E+=(N&I|T&~I)+k[4]-405537848|0,E=(E<<20|E>>>12)+N|0,I+=(E&T|N&~T)+k[9]+568446438|0,I=(I<<5|I>>>27)+E|0,T+=(I&N|E&~N)+k[14]-1019803690|0,T=(T<<9|T>>>23)+I|0,N+=(T&E|I&~E)+k[3]-187363961|0,N=(N<<14|N>>>18)+T|0,E+=(N&I|T&~I)+k[8]+1163531501|0,E=(E<<20|E>>>12)+N|0,I+=(E&T|N&~T)+k[13]-1444681467|0,I=(I<<5|I>>>27)+E|0,T+=(I&N|E&~N)+k[2]-51403784|0,T=(T<<9|T>>>23)+I|0,N+=(T&E|I&~E)+k[7]+1735328473|0,N=(N<<14|N>>>18)+T|0,E+=(N&I|T&~I)+k[12]-1926607734|0,E=(E<<20|E>>>12)+N|0,I+=(E^N^T)+k[5]-378558|0,I=(I<<4|I>>>28)+E|0,T+=(I^E^N)+k[8]-2022574463|0,T=(T<<11|T>>>21)+I|0,N+=(T^I^E)+k[11]+1839030562|0,N=(N<<16|N>>>16)+T|0,E+=(N^T^I)+k[14]-35309556|0,E=(E<<23|E>>>9)+N|0,I+=(E^N^T)+k[1]-1530992060|0,I=(I<<4|I>>>28)+E|0,T+=(I^E^N)+k[4]+1272893353|0,T=(T<<11|T>>>21)+I|0,N+=(T^I^E)+k[7]-155497632|0,N=(N<<16|N>>>16)+T|0,E+=(N^T^I)+k[10]-1094730640|0,E=(E<<23|E>>>9)+N|0,I+=(E^N^T)+k[13]+681279174|0,I=(I<<4|I>>>28)+E|0,T+=(I^E^N)+k[0]-358537222|0,T=(T<<11|T>>>21)+I|0,N+=(T^I^E)+k[3]-722521979|0,N=(N<<16|N>>>16)+T|0,E+=(N^T^I)+k[6]+76029189|0,E=(E<<23|E>>>9)+N|0,I+=(E^N^T)+k[9]-640364487|0,I=(I<<4|I>>>28)+E|0,T+=(I^E^N)+k[12]-421815835|0,T=(T<<11|T>>>21)+I|0,N+=(T^I^E)+k[15]+530742520|0,N=(N<<16|N>>>16)+T|0,E+=(N^T^I)+k[2]-995338651|0,E=(E<<23|E>>>9)+N|0,I+=(N^(E|~T))+k[0]-198630844|0,I=(I<<6|I>>>26)+E|0,T+=(E^(I|~N))+k[7]+1126891415|0,T=(T<<10|T>>>22)+I|0,N+=(I^(T|~E))+k[14]-1416354905|0,N=(N<<15|N>>>17)+T|0,E+=(T^(N|~I))+k[5]-57434055|0,E=(E<<21|E>>>11)+N|0,I+=(N^(E|~T))+k[12]+1700485571|0,I=(I<<6|I>>>26)+E|0,T+=(E^(I|~N))+k[3]-1894986606|0,T=(T<<10|T>>>22)+I|0,N+=(I^(T|~E))+k[10]-1051523|0,N=(N<<15|N>>>17)+T|0,E+=(T^(N|~I))+k[1]-2054922799|0,E=(E<<21|E>>>11)+N|0,I+=(N^(E|~T))+k[8]+1873313359|0,I=(I<<6|I>>>26)+E|0,T+=(E^(I|~N))+k[15]-30611744|0,T=(T<<10|T>>>22)+I|0,N+=(I^(T|~E))+k[6]-1560198380|0,N=(N<<15|N>>>17)+T|0,E+=(T^(N|~I))+k[13]+1309151649|0,E=(E<<21|E>>>11)+N|0,I+=(N^(E|~T))+k[4]-145523070|0,I=(I<<6|I>>>26)+E|0,T+=(E^(I|~N))+k[11]-1120210379|0,T=(T<<10|T>>>22)+I|0,N+=(I^(T|~E))+k[2]+718787259|0,N=(N<<15|N>>>17)+T|0,E+=(T^(N|~I))+k[9]-343485551|0,E=(E<<21|E>>>11)+N|0,y[0]=I+y[0]|0,y[1]=E+y[1]|0,y[2]=N+y[2]|0,y[3]=T+y[3]|0}function r(y){var k=[],I;for(I=0;I<64;I+=4)k[I>>2]=y.charCodeAt(I)+(y.charCodeAt(I+1)<<8)+(y.charCodeAt(I+2)<<16)+(y.charCodeAt(I+3)<<24);return k}function a(y){var k=[],I;for(I=0;I<64;I+=4)k[I>>2]=y[I]+(y[I+1]<<8)+(y[I+2]<<16)+(y[I+3]<<24);return k}function c(y){var k=y.length,I=[1732584193,-271733879,-1732584194,271733878],E,N,T,R,W,pe;for(E=64;E<=k;E+=64)o(I,r(y.substring(E-64,E)));for(y=y.substring(E-64),N=y.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E=0;E>2]|=y.charCodeAt(E)<<(E%4<<3);if(T[E>>2]|=128<<(E%4<<3),E>55)for(o(I,T),E=0;E<16;E+=1)T[E]=0;return R=k*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),W=parseInt(R[2],16),pe=parseInt(R[1],16)||0,T[14]=W,T[15]=pe,o(I,T),I}function m(y){var k=y.length,I=[1732584193,-271733879,-1732584194,271733878],E,N,T,R,W,pe;for(E=64;E<=k;E+=64)o(I,a(y.subarray(E-64,E)));for(y=E-64>2]|=y[E]<<(E%4<<3);if(T[E>>2]|=128<<(E%4<<3),E>55)for(o(I,T),E=0;E<16;E+=1)T[E]=0;return R=k*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),W=parseInt(R[2],16),pe=parseInt(R[1],16)||0,T[14]=W,T[15]=pe,o(I,T),I}function p(y){var k="",I;for(I=0;I<4;I+=1)k+=e[y>>I*8+4&15]+e[y>>I*8&15];return k}function h(y){var k;for(k=0;k>16)+(k>>16)+(I>>16);return E<<16|I&65535}),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function y(k,I){return k=k|0||0,k<0?Math.max(k+I,0):Math.min(k,I)}ArrayBuffer.prototype.slice=function(k,I){var E=this.byteLength,N=y(k,E),T=E,R,W,pe,_e;return I!==t&&(T=y(I,E)),N>T?new ArrayBuffer(0):(R=T-N,W=new ArrayBuffer(R),pe=new Uint8Array(W),_e=new Uint8Array(this,N,R),pe.set(_e),W)}})();function g(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function M(y,k){var I=y.length,E=new ArrayBuffer(I),N=new Uint8Array(E),T;for(T=0;T>2]|=k.charCodeAt(E)<<(E%4<<3);return this._finish(N,I),T=h(this._hash),y&&(T=w(T)),this.reset(),T},S.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},S.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},S.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},S.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},S.prototype._finish=function(y,k){var I=k,E,N,T;if(y[I>>2]|=128<<(I%4<<3),I>55)for(o(this._hash,y),I=0;I<16;I+=1)y[I]=0;E=this._length*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),N=parseInt(E[2],16),T=parseInt(E[1],16)||0,y[14]=N,y[15]=T,o(this._hash,y)},S.hash=function(y,k){return S.hashBinary(g(y),k)},S.hashBinary=function(y,k){var I=c(y),E=h(I);return k?w(E):E},S.ArrayBuffer=function(){this.reset()},S.ArrayBuffer.prototype.append=function(y){var k=_(this._buff.buffer,y,!0),I=k.length,E;for(this._length+=y.byteLength,E=64;E<=I;E+=64)o(this._hash,a(k.subarray(E-64,E)));return this._buff=E-64>2]|=k[N]<<(N%4<<3);return this._finish(E,I),T=h(this._hash),y&&(T=w(T)),this.reset(),T},S.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},S.ArrayBuffer.prototype.getState=function(){var y=S.prototype.getState.call(this);return y.buff=C(y.buff),y},S.ArrayBuffer.prototype.setState=function(y){return y.buff=M(y.buff,!0),S.prototype.setState.call(this,y)},S.ArrayBuffer.prototype.destroy=S.prototype.destroy,S.ArrayBuffer.prototype._finish=S.prototype._finish,S.ArrayBuffer.hash=function(y,k){var I=m(new Uint8Array(y)),E=h(I);return k?w(E):E},S})});var mU=Is(WN=>{"use strict";(function(){var t=typeof WN<"u"&&WN||typeof define<"u"&&{}||this||window;typeof define<"u"&&define("save-svg-as-png",[],function(){return t}),t.default=t;var i="http://www.w3.org/2000/xmlns/",e="http://www.w3.org/1999/xhtml",n="http://www.w3.org/2000/svg",o=']>',r=/url\(["']?(.+?)["']?\)/,a={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},c=function(G){return G instanceof HTMLElement||G instanceof SVGElement},m=function(G){if(!c(G))throw new Error("an HTMLElement or SVGElement is required; got "+G)},p=function(G){return new Promise(function(ue,ye){c(G)?ue(G):ye(new Error("an HTMLElement or SVGElement is required; got "+G))})},h=function(G){return G&&G.lastIndexOf("http",0)===0&&G.lastIndexOf(window.location.host)===-1},g=function(G){var ue=Object.keys(a).filter(function(ye){return G.indexOf("."+ye)>0}).map(function(ye){return a[ye]});return ue?ue[0]:(console.error("Unknown font format for "+G+". Fonts may not be working correctly."),"application/octet-stream")},M=function(G){for(var ue="",ye=new Uint8Array(G),ce=0;ce"u"||ce===null||isNaN(parseFloat(ce))?0:ce},_=function(G,ue,ye,ce){if(G.tagName==="svg")return{width:ye||C(G,ue,"width"),height:ce||C(G,ue,"height")};if(G.getBBox){var Ie=G.getBBox(),de=Ie.x,V=Ie.y,Y=Ie.width,ne=Ie.height;return{width:de+Y,height:V+ne}}},w=function(G){return decodeURIComponent(encodeURIComponent(G).replace(/%([0-9A-F]{2})/g,function(ue,ye){var ce=String.fromCharCode("0x"+ye);return ce==="%"?"%25":ce}))},S=function(G){for(var ue=window.atob(G.split(",")[1]),ye=G.split(",")[0].split(":")[1].split(";")[0],ce=new ArrayBuffer(ue.length),Ie=new Uint8Array(ce),de=0;de"u",$e=V||[];return R().forEach(function(it){var et=it.rules,Se=it.href;et&&Array.from(et).forEach(function(q){if(typeof q.style<"u")if(y(G,q.selectorText))ie.push(ne(q.selectorText,q.style.cssText));else if(De&&q.cssText.match(/^@font-face/)){var Oe=k(q,Se);Oe&&$e.push(Oe)}else Y||ie.push(q.cssText)})}),N($e).then(function(it){return ie.join(` `)+it})},pe=function(){if(!navigator.msSaveOrOpenBlob&&!("download"in document.createElement("a")))return{popup:window.open()}};t.prepareSvg=function(_e,G,ue){m(_e);var ye=G||{},ce=ye.left,Ie=ce===void 0?0:ce,de=ye.top,V=de===void 0?0:de,Y=ye.width,ne=ye.height,ie=ye.scale,De=ie===void 0?1:ie,$e=ye.responsive,it=$e===void 0?!1:$e,et=ye.excludeCss,Se=et===void 0?!1:et;return I(_e).then(function(){var q=_e.cloneNode(!0);q.style.backgroundColor=(G||{}).backgroundColor||_e.style.backgroundColor;var Oe=_(_e,q,Y,ne),Ke=Oe.width,Ct=Oe.height;if(_e.tagName!=="svg")if(_e.getBBox){q.getAttribute("transform")!=null&&q.setAttribute("transform",q.getAttribute("transform").replace(/translate\(.*?\)/,""));var Rt=document.createElementNS("http://www.w3.org/2000/svg","svg");Rt.appendChild(q),q=Rt}else{console.error("Attempted to render non-SVG element",_e);return}if(q.setAttribute("version","1.1"),q.setAttribute("viewBox",[Ie,V,Ke,Ct].join(" ")),q.getAttribute("xmlns")||q.setAttributeNS(i,"xmlns",n),q.getAttribute("xmlns:xlink")||q.setAttributeNS(i,"xmlns:xlink","http://www.w3.org/1999/xlink"),it?(q.removeAttribute("width"),q.removeAttribute("height"),q.setAttribute("preserveAspectRatio","xMinYMin meet")):(q.setAttribute("width",Ke*De),q.setAttribute("height",Ct*De)),Array.from(q.querySelectorAll("foreignObject > *")).forEach(function(Eo){Eo.setAttributeNS(i,"xmlns",Eo.tagName==="svg"?n:e)}),Se){var ni=document.createElement("div");ni.appendChild(q);var Uo=ni.innerHTML;if(typeof ue=="function")ue(Uo,Ke,Ct);else return{src:Uo,width:Ke,height:Ct}}else return W(_e,G).then(function(Eo){var Kr=document.createElement("style");Kr.setAttribute("type","text/css"),Kr.innerHTML=``;var An=document.createElement("defs");An.appendChild(Kr),q.insertBefore(An,q.firstChild);var am=document.createElement("div");am.appendChild(q);var xh=am.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if(typeof ue=="function")ue(xh,Ke,Ct);else return{src:xh,width:Ke,height:Ct}})})},t.svgAsDataUri=function(_e,G,ue){return m(_e),t.prepareSvg(_e,G).then(function(ye){var ce=ye.src,Ie=ye.width,de=ye.height,V="data:image/svg+xml;base64,"+window.btoa(w(o+ce));return typeof ue=="function"&&ue(V,Ie,de),V})},t.svgAsPngUri=function(_e,G,ue){m(_e);var ye=G||{},ce=ye.encoderType,Ie=ce===void 0?"image/png":ce,de=ye.encoderOptions,V=de===void 0?.8:de,Y=ye.canvg,ne=function(De){var $e=De.src,it=De.width,et=De.height,Se=document.createElement("canvas"),q=Se.getContext("2d"),Oe=window.devicePixelRatio||1;Se.width=it*Oe,Se.height=et*Oe,Se.style.width=Se.width+"px",Se.style.height=Se.height+"px",q.setTransform(Oe,0,0,Oe,0,0),Y?Y(Se,$e):q.drawImage($e,0,0);var Ke=void 0;try{Ke=Se.toDataURL(Ie,V)}catch(Ct){if(typeof SecurityError<"u"&&Ct instanceof SecurityError||Ct.name==="SecurityError"){console.error("Rendered SVG images cannot be downloaded in this browser.");return}else throw Ct}return typeof ue=="function"&&ue(Ke,Se.width,Se.height),Promise.resolve(Ke)};return Y?t.prepareSvg(_e,G).then(ne):t.svgAsDataUri(_e,G).then(function(ie){return new Promise(function(De,$e){var it=new Image;it.onload=function(){return De(ne({src:it,width:it.width,height:it.height}))},it.onerror=function(){$e(`There was an error loading the data URI as an image on the following SVG `+window.atob(ie.slice(26))+`Open the following link to see browser's diagnosis `+ie)},it.src=ie})})},t.download=function(_e,G,ue){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(S(G),_e);else{var ye=document.createElement("a");if("download"in ye){ye.download=_e,ye.style.display="none",document.body.appendChild(ye);try{var ce=S(G),Ie=URL.createObjectURL(ce);ye.href=Ie,ye.onclick=function(){return requestAnimationFrame(function(){return URL.revokeObjectURL(Ie)})}}catch(de){console.error(de),console.warn("Error while getting object URL. Falling back to string URL."),ye.href=G}ye.click(),document.body.removeChild(ye)}else ue&&ue.popup&&(ue.popup.document.title=_e,ue.popup.location.replace(G))}},t.saveSvg=function(_e,G,ue){var ye=pe();return p(_e).then(function(ce){return t.svgAsDataUri(ce,ue||{})}).then(function(ce){return t.download(G,ce,ye)})},t.saveSvgAsPng=function(_e,G,ue){var ye=pe();return p(_e).then(function(ce){return t.svgAsPngUri(ce,ue||{})}).then(function(ce){return t.download(G,ce,ye)})}})()});var YN=Is((Bk,QN)=>{(function(t,i){if(typeof Bk=="object"&&typeof QN=="object")QN.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e=i();for(var n in e)(typeof Bk=="object"?Bk:t)[n]=e[n]}})(globalThis,()=>(()=>{"use strict";var t={4567:function(o,r,a){var c=this&&this.__decorate||function(S,y,k,I){var E,N=arguments.length,T=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,k):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,y,k,I);else for(var R=S.length-1;R>=0;R--)(E=S[R])&&(T=(N<3?E(T):N>3?E(y,k,T):E(y,k))||T);return N>3&&T&&Object.defineProperty(y,k,T),T},m=this&&this.__param||function(S,y){return function(k,I){y(k,I,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let p=a(9042),h=a(9924),g=a(844),M=a(4725),C=a(2585),_=a(3656),w=r.AccessibilityManager=class extends g.Disposable{constructor(S,y,k,I){super(),this._terminal=S,this._coreBrowserService=k,this._renderService=I,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let E=0;Ethis._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new h.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(E=>this._handleResize(E.rows))),this.register(this._terminal.onRender(E=>this._refreshRows(E.start,E.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(E=>this._handleChar(E))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` `))),this.register(this._terminal.onA11yTab(E=>this._handleTab(E))),this.register(this._terminal.onKey(E=>this._handleKey(E.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,_.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(S){for(let y=0;y0?this._charsToConsume.shift()!==S&&(this._charsToAnnounce+=S):this._charsToAnnounce+=S,S===` `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=p.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(S){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(S)||this._charsToConsume.push(S)}_refreshRows(S,y){this._liveRegionDebouncer.refresh(S,y,this._terminal.rows)}_renderRows(S,y){let k=this._terminal.buffer,I=k.lines.length.toString();for(let E=S;E<=y;E++){let N=k.lines.get(k.ydisp+E),T=[],R=N?.translateToString(!0,void 0,void 0,T)||"",W=(k.ydisp+E+1).toString(),pe=this._rowElements[E];pe&&(R.length===0?(pe.innerText="\xA0",this._rowColumns.set(pe,[0,1])):(pe.textContent=R,this._rowColumns.set(pe,T)),pe.setAttribute("aria-posinset",W),pe.setAttribute("aria-setsize",I))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(S,y){let k=S.target,I=this._rowElements[y===0?1:this._rowElements.length-2];if(k.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||S.relatedTarget!==I)return;let E,N;if(y===0?(E=k,N=this._rowElements.pop(),this._rowContainer.removeChild(N)):(E=this._rowElements.shift(),N=k,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),N.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){let T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{let T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),S.preventDefault(),S.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let S=document.getSelection();if(!S)return;if(S.isCollapsed)return void(this._rowContainer.contains(S.anchorNode)&&this._terminal.clearSelection());if(!S.anchorNode||!S.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:S.anchorNode,offset:S.anchorOffset},k={node:S.focusNode,offset:S.focusOffset};if((y.node.compareDocumentPosition(k.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===k.node&&y.offset>k.offset)&&([y,k]=[k,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;let I=this._rowElements.slice(-1)[0];if(k.node.compareDocumentPosition(I)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(k={node:I,offset:I.textContent?.length??0}),!this._rowContainer.contains(k.node))return;let E=({node:R,offset:W})=>{let pe=R instanceof Text?R.parentNode:R,_e=parseInt(pe?.getAttribute("aria-posinset"),10)-1;if(isNaN(_e))return console.warn("row is invalid. Race condition?"),null;let G=this._rowColumns.get(pe);if(!G)return console.warn("columns is null. Race condition?"),null;let ue=W=this._terminal.cols&&(++_e,ue=0),{row:_e,column:ue}},N=E(y),T=E(k);if(N&&T){if(N.row>T.row||N.row===T.row&&N.column>=T.column)throw new Error("invalid range");this._terminal.select(N.column,N.row,(T.row-N.row)*this._terminal.cols-N.column+T.column)}}_handleResize(S){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yS;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let S=this._coreBrowserService.mainDocument.createElement("div");return S.setAttribute("role","listitem"),S.tabIndex=-1,this._refreshRowDimensions(S),S}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let S=0;S{function a(h){return h.replace(/\r?\n/g,"\r")}function c(h,g){return g?"\x1B[200~"+h+"\x1B[201~":h}function m(h,g,M,C){h=c(h=a(h),M.decPrivateModes.bracketedPasteMode&&C.rawOptions.ignoreBracketedPasteMode!==!0),M.triggerDataEvent(h,!0),g.value=""}function p(h,g,M){let C=M.getBoundingClientRect(),_=h.clientX-C.left-10,w=h.clientY-C.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${_}px`,g.style.top=`${w}px`,g.style.zIndex="1000",g.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=a,r.bracketTextForPaste=c,r.copyHandler=function(h,g){h.clipboardData&&h.clipboardData.setData("text/plain",g.selectionText),h.preventDefault()},r.handlePasteEvent=function(h,g,M,C){h.stopPropagation(),h.clipboardData&&m(h.clipboardData.getData("text/plain"),g,M,C)},r.paste=m,r.moveTextAreaUnderMouseCursor=p,r.rightClickHandler=function(h,g,M,C,_){p(h,g,M),_&&C.rightClickSelect(h),g.value=C.selectionText,g.select()}},7239:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;let c=a(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(m,p,h){this._css.set(m,p,h)}getCss(m,p){return this._css.get(m,p)}setColor(m,p,h){this._color.set(m,p,h)}getColor(m,p){return this._color.get(m,p)}clear(){this._color.clear(),this._css.clear()}}},3656:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(a,c,m,p){a.addEventListener(c,m,p);let h=!1;return{dispose:()=>{h||(h=!0,a.removeEventListener(c,m,p))}}}},3551:function(o,r,a){var c=this&&this.__decorate||function(w,S,y,k){var I,E=arguments.length,N=E<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,y):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,S,y,k);else for(var T=w.length-1;T>=0;T--)(I=w[T])&&(N=(E<3?I(N):E>3?I(S,y,N):I(S,y))||N);return E>3&&N&&Object.defineProperty(S,y,N),N},m=this&&this.__param||function(w,S){return function(y,k){S(y,k,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;let p=a(3656),h=a(8460),g=a(844),M=a(2585),C=a(4725),_=r.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(w,S,y,k,I){super(),this._element=w,this._mouseService=S,this._renderService=y,this._bufferService=k,this._linkProviderService=I,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new h.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new h.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)(()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,p.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,p.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,p.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,p.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(w){this._lastMouseEvent=w;let S=this._positionFromMouseEvent(w,this._element,this._mouseService);if(!S)return;this._isMouseOut=!1;let y=w.composedPath();for(let k=0;k{k?.forEach(I=>{I.link.dispose&&I.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=w.y);let y=!1;for(let[k,I]of this._linkProviderService.linkProviders.entries())S?this._activeProviderReplies?.get(k)&&(y=this._checkLinkProviderResult(k,w,y)):I.provideLinks(w.y,E=>{if(this._isMouseOut)return;let N=E?.map(T=>({link:T}));this._activeProviderReplies?.set(k,N),y=this._checkLinkProviderResult(k,w,y),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(w.y,this._activeProviderReplies)})}_removeIntersectingLinks(w,S){let y=new Set;for(let k=0;kw?this._bufferService.cols:N.link.range.end.x;for(let W=T;W<=R;W++){if(y.has(W)){I.splice(E--,1);break}y.add(W)}}}}_checkLinkProviderResult(w,S,y){if(!this._activeProviderReplies)return y;let k=this._activeProviderReplies.get(w),I=!1;for(let E=0;Ethis._linkAtPosition(N.link,S));E&&(y=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let E=0;Ethis._linkAtPosition(T.link,S));if(N){y=!0,this._handleNewLink(N);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(w){if(!this._currentLink)return;let S=this._positionFromMouseEvent(w,this._element,this._mouseService);S&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,S)&&this._currentLink.link.activate(w,this._currentLink.link.text)}_clearCurrentLink(w,S){this._currentLink&&this._lastMouseEvent&&(!w||!S||this._currentLink.link.range.start.y>=w&&this._currentLink.link.range.end.y<=S)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,g.disposeArray)(this._linkCacheDisposables))}_handleNewLink(w){if(!this._lastMouseEvent)return;let S=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);S&&this._linkAtPosition(w.link,S)&&(this._currentLink=w,this._currentLink.state={decorations:{underline:w.link.decorations===void 0||w.link.decorations.underline,pointerCursor:w.link.decorations===void 0||w.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,w.link,this._lastMouseEvent),w.link.decorations={},Object.defineProperties(w.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:y=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:y=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(w.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(y=>{if(!this._currentLink)return;let k=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,I=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=k&&this._currentLink.link.range.end.y<=I&&(this._clearCurrentLink(k,I),this._lastMouseEvent)){let E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}})))}_linkHover(w,S,y){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(S,!0),this._currentLink.state.decorations.pointerCursor&&w.classList.add("xterm-cursor-pointer")),S.hover&&S.hover(y,S.text)}_fireUnderlineEvent(w,S){let y=w.range,k=this._bufferService.buffer.ydisp,I=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-k-1,y.end.x,y.end.y-k-1,void 0);(S?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(I)}_linkLeave(w,S,y){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(S,!1),this._currentLink.state.decorations.pointerCursor&&w.classList.remove("xterm-cursor-pointer")),S.leave&&S.leave(y,S.text)}_linkAtPosition(w,S){let y=w.range.start.y*this._bufferService.cols+w.range.start.x,k=w.range.end.y*this._bufferService.cols+w.range.end.x,I=S.y*this._bufferService.cols+S.x;return y<=I&&I<=k}_positionFromMouseEvent(w,S,y){let k=y.getCoords(w,S,this._bufferService.cols,this._bufferService.rows);if(k)return{x:k[0],y:k[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(w,S,y,k,I){return{x1:w,y1:S,x2:y,y2:k,cols:this._bufferService.cols,fg:I}}};r.Linkifier=_=c([m(1,C.IMouseService),m(2,C.IRenderService),m(3,M.IBufferService),m(4,C.ILinkProviderService)],_)},9042:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(o,r,a){var c=this&&this.__decorate||function(C,_,w,S){var y,k=arguments.length,I=k<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(C,_,w,S);else for(var E=C.length-1;E>=0;E--)(y=C[E])&&(I=(k<3?y(I):k>3?y(_,w,I):y(_,w))||I);return k>3&&I&&Object.defineProperty(_,w,I),I},m=this&&this.__param||function(C,_){return function(w,S){_(w,S,C)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;let p=a(511),h=a(2585),g=r.OscLinkProvider=class{constructor(C,_,w){this._bufferService=C,this._optionsService=_,this._oscLinkService=w}provideLinks(C,_){let w=this._bufferService.buffer.lines.get(C-1);if(!w)return void _(void 0);let S=[],y=this._optionsService.rawOptions.linkHandler,k=new p.CellData,I=w.getTrimmedLength(),E=-1,N=-1,T=!1;for(let R=0;Ry?y.activate(G,ue,pe):M(0,ue),hover:(G,ue)=>y?.hover?.(G,ue,pe),leave:(G,ue)=>y?.leave?.(G,ue,pe)})}T=!1,k.hasExtendedAttrs()&&k.extended.urlId?(N=R,E=k.extended.urlId):(N=-1,E=-1)}}_(S)}};function M(C,_){if(confirm(`Do you want to navigate to ${_}? WARNING: This link could potentially be dangerous`)){let w=window.open();if(w){try{w.opener=null}catch{}w.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=g=c([m(0,h.IBufferService),m(1,h.IOptionsService),m(2,h.IOscLinkService)],g)},6193:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(a,c){this._renderCallback=a,this._coreBrowserService=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,c,m){this._rowCount=m,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();let a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},3236:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;let c=a(3614),m=a(3656),p=a(3551),h=a(9042),g=a(3730),M=a(1680),C=a(3107),_=a(5744),w=a(2950),S=a(1296),y=a(428),k=a(4269),I=a(5114),E=a(8934),N=a(3230),T=a(9312),R=a(4725),W=a(6731),pe=a(8055),_e=a(8969),G=a(8460),ue=a(844),ye=a(6114),ce=a(8437),Ie=a(2584),de=a(7399),V=a(5941),Y=a(9074),ne=a(2585),ie=a(5435),De=a(4567),$e=a(779);class it extends _e.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(Se={}){super(Se),this.browser=ye,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new ue.MutableDisposable),this._onCursorMove=this.register(new G.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new G.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new G.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new G.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new G.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new G.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new G.EventEmitter),this._onBlur=this.register(new G.EventEmitter),this._onA11yCharEmitter=this.register(new G.EventEmitter),this._onA11yTabEmitter=this.register(new G.EventEmitter),this._onWillOpen=this.register(new G.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(Y.DecorationService),this._instantiationService.setService(ne.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance($e.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((q,Oe)=>this.refresh(q,Oe))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(q=>this._reportWindowsOptions(q))),this.register(this._inputHandler.onColor(q=>this._handleColorEvent(q))),this.register((0,G.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,G.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(q=>this._afterResize(q.cols,q.rows))),this.register((0,ue.toDisposable)(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}_handleColorEvent(Se){if(this._themeService)for(let q of Se){let Oe,Ke="";switch(q.index){case 256:Oe="foreground",Ke="10";break;case 257:Oe="background",Ke="11";break;case 258:Oe="cursor",Ke="12";break;default:Oe="ansi",Ke="4;"+q.index}switch(q.type){case 0:let Ct=pe.color.toColorRGB(Oe==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[Oe]);this.coreService.triggerDataEvent(`${Ie.C0.ESC}]${Ke};${(0,V.toRgbString)(Ct)}${Ie.C1_ESCAPED.ST}`);break;case 1:if(Oe==="ansi")this._themeService.modifyColors(Rt=>Rt.ansi[q.index]=pe.channels.toColor(...q.color));else{let Rt=Oe;this._themeService.modifyColors(ni=>ni[Rt]=pe.channels.toColor(...q.color))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Se){Se?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(De.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ie.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ie.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let Se=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(Se);if(!q)return;let Oe=Math.min(this.buffer.x,this.cols-1),Ke=this._renderService.dimensions.css.cell.height,Ct=q.getWidth(Oe),Rt=this._renderService.dimensions.css.cell.width*Ct,ni=this.buffer.y*this._renderService.dimensions.css.cell.height,Uo=Oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Uo+"px",this.textarea.style.top=ni+"px",this.textarea.style.width=Rt+"px",this.textarea.style.height=Ke+"px",this.textarea.style.lineHeight=Ke+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",q=>{this.hasSelection()&&(0,c.copyHandler)(q,this._selectionService)}));let Se=q=>(0,c.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",Se)),this.register((0,m.addDisposableDomListener)(this.element,"paste",Se)),ye.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",q=>{q.button===2&&(0,c.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",q=>{(0,c.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),ye.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",q=>{q.button===1&&(0,c.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",Se=>this._keyUp(Se),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",Se=>this._keyDown(Se),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",Se=>this._keyPress(Se),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",Se=>this._compositionHelper.compositionupdate(Se))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,m.addDisposableDomListener)(this.textarea,"input",Se=>this._inputEvent(Se),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(Se){if(!Se)throw new Error("Terminal requires a parent element.");if(Se.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Se.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),Se.appendChild(this.element);let q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",Oe=>this.updateCursorStyle(Oe))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",h.promptLabel),ye.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(I.CoreBrowserService,this.textarea,Se.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",Oe=>this._handleTextAreaFocus(Oe))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(W.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(k.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(N.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(Oe=>this._onRender.fire(Oe))),this.onResize(Oe=>this._renderService.resize(Oe.cols,Oe.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(w.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(p.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(M.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(Oe=>this.scrollLines(Oe.amount,Oe.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(Oe=>this.scrollLines(Oe.amount,Oe.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(Oe=>this._renderService.handleSelectionChanged(Oe.start,Oe.end,Oe.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(Oe=>{this.textarea.value=Oe,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(Oe=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(C.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",Oe=>this._selectionService.handleMouseDown(Oe))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(De.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",Oe=>this._handleScreenReaderModeOptionChange(Oe))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(_.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",Oe=>{!this._overviewRulerRenderer&&Oe&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(_.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(S.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let Se=this,q=this.element;function Oe(Rt){let ni=Se._mouseService.getMouseReportCoords(Rt,Se.screenElement);if(!ni)return!1;let Uo,Eo;switch(Rt.overrideType||Rt.type){case"mousemove":Eo=32,Rt.buttons===void 0?(Uo=3,Rt.button!==void 0&&(Uo=Rt.button<3?Rt.button:3)):Uo=1&Rt.buttons?0:4&Rt.buttons?1:2&Rt.buttons?2:3;break;case"mouseup":Eo=0,Uo=Rt.button<3?Rt.button:3;break;case"mousedown":Eo=1,Uo=Rt.button<3?Rt.button:3;break;case"wheel":if(Se._customWheelEventHandler&&Se._customWheelEventHandler(Rt)===!1||Se.viewport.getLinesScrolled(Rt)===0)return!1;Eo=Rt.deltaY<0?0:1,Uo=4;break;default:return!1}return!(Eo===void 0||Uo===void 0||Uo>4)&&Se.coreMouseService.triggerMouseEvent({col:ni.col,row:ni.row,x:ni.x,y:ni.y,button:Uo,action:Eo,ctrl:Rt.ctrlKey,alt:Rt.altKey,shift:Rt.shiftKey})}let Ke={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Ct={mouseup:Rt=>(Oe(Rt),Rt.buttons||(this._document.removeEventListener("mouseup",Ke.mouseup),Ke.mousedrag&&this._document.removeEventListener("mousemove",Ke.mousedrag)),this.cancel(Rt)),wheel:Rt=>(Oe(Rt),this.cancel(Rt,!0)),mousedrag:Rt=>{Rt.buttons&&Oe(Rt)},mousemove:Rt=>{Rt.buttons||Oe(Rt)}};this.register(this.coreMouseService.onProtocolChange(Rt=>{Rt?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Rt)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&Rt?Ke.mousemove||(q.addEventListener("mousemove",Ct.mousemove),Ke.mousemove=Ct.mousemove):(q.removeEventListener("mousemove",Ke.mousemove),Ke.mousemove=null),16&Rt?Ke.wheel||(q.addEventListener("wheel",Ct.wheel,{passive:!1}),Ke.wheel=Ct.wheel):(q.removeEventListener("wheel",Ke.wheel),Ke.wheel=null),2&Rt?Ke.mouseup||(Ke.mouseup=Ct.mouseup):(this._document.removeEventListener("mouseup",Ke.mouseup),Ke.mouseup=null),4&Rt?Ke.mousedrag||(Ke.mousedrag=Ct.mousedrag):(this._document.removeEventListener("mousemove",Ke.mousedrag),Ke.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(q,"mousedown",Rt=>{if(Rt.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Rt))return Oe(Rt),Ke.mouseup&&this._document.addEventListener("mouseup",Ke.mouseup),Ke.mousedrag&&this._document.addEventListener("mousemove",Ke.mousedrag),this.cancel(Rt)})),this.register((0,m.addDisposableDomListener)(q,"wheel",Rt=>{if(!Ke.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Rt)===!1)return!1;if(!this.buffer.hasScrollback){let ni=this.viewport.getLinesScrolled(Rt);if(ni===0)return;let Uo=Ie.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Rt.deltaY<0?"A":"B"),Eo="";for(let Kr=0;Kr{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Rt),this.cancel(Rt)},{passive:!0})),this.register((0,m.addDisposableDomListener)(q,"touchmove",Rt=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Rt)?void 0:this.cancel(Rt)},{passive:!1}))}refresh(Se,q){this._renderService?.refreshRows(Se,q)}updateCursorStyle(Se){this._selectionService?.shouldColumnSelect(Se)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(Se,q,Oe=0){Oe===1?(super.scrollLines(Se,q,Oe),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(Se)}paste(Se){(0,c.paste)(Se,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Se){this._customKeyEventHandler=Se}attachCustomWheelEventHandler(Se){this._customWheelEventHandler=Se}registerLinkProvider(Se){return this._linkProviderService.registerLinkProvider(Se)}registerCharacterJoiner(Se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let q=this._characterJoinerService.register(Se);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(Se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Se)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Se){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Se)}registerDecoration(Se){return this._decorationService.registerDecoration(Se)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Se,q,Oe){this._selectionService.setSelection(Se,q,Oe)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(Se,q){this._selectionService?.selectLines(Se,q)}_keyDown(Se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Se)===!1)return!1;let q=this.browser.isMac&&this.options.macOptionIsMeta&&Se.altKey;if(!q&&!this._compositionHelper.keydown(Se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||Se.key!=="Dead"&&Se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);let Oe=(0,de.evaluateKeyboardEvent)(Se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Se),Oe.type===3||Oe.type===2){let Ke=this.rows-1;return this.scrollLines(Oe.type===2?-Ke:Ke),this.cancel(Se,!0)}return Oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Se)||(Oe.cancel&&this.cancel(Se,!0),!Oe.key||!!(Se.key&&!Se.ctrlKey&&!Se.altKey&&!Se.metaKey&&Se.key.length===1&&Se.key.charCodeAt(0)>=65&&Se.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(Oe.key!==Ie.C0.ETX&&Oe.key!==Ie.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Oe.key,domEvent:Se}),this._showCursor(),this.coreService.triggerDataEvent(Oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||Se.altKey||Se.ctrlKey?this.cancel(Se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Se,q){let Oe=Se.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||Se.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||Se.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?Oe:Oe&&(!q.keyCode||q.keyCode>47)}_keyUp(Se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Se)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(Se)||this.focus(),this.updateCursorStyle(Se),this._keyPressHandled=!1)}_keyPress(Se){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Se)===!1)return!1;if(this.cancel(Se),Se.charCode)q=Se.charCode;else if(Se.which===null||Se.which===void 0)q=Se.keyCode;else{if(Se.which===0||Se.charCode===0)return!1;q=Se.which}return!(!q||(Se.altKey||Se.ctrlKey||Se.metaKey)&&!this._isThirdLevelShift(this.browser,Se)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:Se}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Se){if(Se.data&&Se.inputType==="insertText"&&(!Se.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let q=Se.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(Se),!0}return!1}resize(Se,q){Se!==this.cols||q!==this.rows?super.resize(Se,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Se,q){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let Se=1;Se{Object.defineProperty(r,"__esModule",{value:!0}),r.TimeBasedDebouncer=void 0,r.TimeBasedDebouncer=class{constructor(a,c=1e3){this._renderCallback=a,this._debounceThresholdMS=c,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(a,c,m){this._rowCount=m,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c;let p=Date.now();if(p-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=p,this._innerRefresh();else if(!this._additionalRefreshRequested){let h=p-this._lastRefreshMs,g=this._debounceThresholdMS-h;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},g)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c)}}},1680:function(o,r,a){var c=this&&this.__decorate||function(w,S,y,k){var I,E=arguments.length,N=E<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,y):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,S,y,k);else for(var T=w.length-1;T>=0;T--)(I=w[T])&&(N=(E<3?I(N):E>3?I(S,y,N):I(S,y))||N);return E>3&&N&&Object.defineProperty(S,y,N),N},m=this&&this.__param||function(w,S){return function(y,k){S(y,k,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Viewport=void 0;let p=a(3656),h=a(4725),g=a(8460),M=a(844),C=a(2585),_=r.Viewport=class extends M.Disposable{constructor(w,S,y,k,I,E,N,T){super(),this._viewportElement=w,this._scrollArea=S,this._bufferService=y,this._optionsService=k,this._charSizeService=I,this._renderService=E,this._coreBrowserService=N,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(R=>this._activeBuffer=R.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(R=>this._renderDimensions=R)),this._handleThemeChange(T.colors),this.register(T.onChangeColors(R=>this._handleThemeChange(R))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(w){this._viewportElement.style.backgroundColor=w.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(w){if(w)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;let S=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==S&&(this._lastRecordedBufferHeight=S,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}let w=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==w&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=w),this._refreshAnimationFrame=null}syncScrollArea(w=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(w);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(w)}_handleScroll(w){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});let S=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:S,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;let w=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(w*(this._smoothScrollState.target-this._smoothScrollState.origin)),w<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(w,S){let y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(S<0&&this._viewportElement.scrollTop!==0||S>0&&y0&&(y=pe),k=""}}return{bufferElements:I,cursorElement:y}}getLinesScrolled(w){if(w.deltaY===0||w.shiftKey)return 0;let S=this._applyScrollModifier(w.deltaY,w);return w.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(S/=this._currentRowHeight+0,this._wheelPartialScroll+=S,S=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):w.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(S*=this._bufferService.rows),S}_applyScrollModifier(w,S){let y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&S.altKey||y==="ctrl"&&S.ctrlKey||y==="shift"&&S.shiftKey?w*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:w*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(w){this._lastTouchY=w.touches[0].pageY}handleTouchMove(w){let S=this._lastTouchY-w.touches[0].pageY;return this._lastTouchY=w.touches[0].pageY,S!==0&&(this._viewportElement.scrollTop+=S,this._bubbleScroll(w,S))}};r.Viewport=_=c([m(2,C.IBufferService),m(3,C.IOptionsService),m(4,h.ICharSizeService),m(5,h.IRenderService),m(6,h.ICoreBrowserService),m(7,h.IThemeService)],_)},3107:function(o,r,a){var c=this&&this.__decorate||function(C,_,w,S){var y,k=arguments.length,I=k<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(C,_,w,S);else for(var E=C.length-1;E>=0;E--)(y=C[E])&&(I=(k<3?y(I):k>3?y(_,w,I):y(_,w))||I);return k>3&&I&&Object.defineProperty(_,w,I),I},m=this&&this.__param||function(C,_){return function(w,S){_(w,S,C)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferDecorationRenderer=void 0;let p=a(4725),h=a(844),g=a(2585),M=r.BufferDecorationRenderer=class extends h.Disposable{constructor(C,_,w,S,y){super(),this._screenElement=C,this._bufferService=_,this._coreBrowserService=w,this._decorationService=S,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(k=>this._removeDecoration(k))),this.register((0,h.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let C of this._decorationService.decorations)this._renderDecoration(C);this._dimensionsChanged=!1}_renderDecoration(C){this._refreshStyle(C),this._dimensionsChanged&&this._refreshXPosition(C)}_createElement(C){let _=this._coreBrowserService.mainDocument.createElement("div");_.classList.add("xterm-decoration"),_.classList.toggle("xterm-decoration-top-layer",C?.options?.layer==="top"),_.style.width=`${Math.round((C.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,_.style.height=(C.options.height||1)*this._renderService.dimensions.css.cell.height+"px",_.style.top=(C.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",_.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let w=C.options.x??0;return w&&w>this._bufferService.cols&&(_.style.display="none"),this._refreshXPosition(C,_),_}_refreshStyle(C){let _=C.marker.line-this._bufferService.buffers.active.ydisp;if(_<0||_>=this._bufferService.rows)C.element&&(C.element.style.display="none",C.onRenderEmitter.fire(C.element));else{let w=this._decorationElements.get(C);w||(w=this._createElement(C),C.element=w,this._decorationElements.set(C,w),this._container.appendChild(w),C.onDispose(()=>{this._decorationElements.delete(C),w.remove()})),w.style.top=_*this._renderService.dimensions.css.cell.height+"px",w.style.display=this._altBufferIsActive?"none":"block",C.onRenderEmitter.fire(w)}}_refreshXPosition(C,_=C.element){if(!_)return;let w=C.options.x??0;(C.options.anchor||"left")==="right"?_.style.right=w?w*this._renderService.dimensions.css.cell.width+"px":"":_.style.left=w?w*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(C){this._decorationElements.get(C)?.remove(),this._decorationElements.delete(C),C.dispose()}};r.BufferDecorationRenderer=M=c([m(1,g.IBufferService),m(2,p.ICoreBrowserService),m(3,g.IDecorationService),m(4,p.IRenderService)],M)},5871:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorZoneStore=void 0,r.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(a){if(a.options.overviewRulerOptions){for(let c of this._zones)if(c.color===a.options.overviewRulerOptions.color&&c.position===a.options.overviewRulerOptions.position){if(this._lineIntersectsZone(c,a.marker.line))return;if(this._lineAdjacentToZone(c,a.marker.line,a.options.overviewRulerOptions.position))return void this._addLineToZone(c,a.marker.line)}if(this._zonePoolIndex=a.startBufferLine&&c<=a.endBufferLine}_lineAdjacentToZone(a,c,m){return c>=a.startBufferLine-this._linePadding[m||"full"]&&c<=a.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(a,c){a.startBufferLine=Math.min(a.startBufferLine,c),a.endBufferLine=Math.max(a.endBufferLine,c)}}},5744:function(o,r,a){var c=this&&this.__decorate||function(y,k,I,E){var N,T=arguments.length,R=T<3?k:E===null?E=Object.getOwnPropertyDescriptor(k,I):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,k,I,E);else for(var W=y.length-1;W>=0;W--)(N=y[W])&&(R=(T<3?N(R):T>3?N(k,I,R):N(k,I))||R);return T>3&&R&&Object.defineProperty(k,I,R),R},m=this&&this.__param||function(y,k){return function(I,E){k(I,E,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OverviewRulerRenderer=void 0;let p=a(5871),h=a(4725),g=a(844),M=a(2585),C={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0},w={full:0,left:0,center:0,right:0},S=r.OverviewRulerRenderer=class extends g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,k,I,E,N,T,R){super(),this._viewportElement=y,this._screenElement=k,this._bufferService=I,this._decorationService=E,this._renderService=N,this._optionsService=T,this._coreBrowserService=R,this._colorZoneStore=new p.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);let W=this._canvas.getContext("2d");if(!W)throw new Error("Ctx cannot be null");this._ctx=W,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.toDisposable)(()=>{this._canvas?.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){let y=Math.floor(this._canvas.width/3),k=Math.ceil(this._canvas.width/3);_.full=this._canvas.width,_.left=y,_.center=k,_.right=y,this._refreshDrawHeightConstants(),w.full=0,w.left=0,w.center=_.left,w.right=_.left+_.center}_refreshDrawHeightConstants(){C.full=Math.round(2*this._coreBrowserService.dpr);let y=this._canvas.height/this._bufferService.buffer.lines.length,k=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);C.left=k,C.center=k,C.right=k}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*C.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*C.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*C.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*C.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let k of this._decorationService.decorations)this._colorZoneStore.addDecoration(k);this._ctx.lineWidth=1;let y=this._colorZoneStore.zones;for(let k of y)k.position!=="full"&&this._renderColorZone(k);for(let k of y)k.position==="full"&&this._renderColorZone(k);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(w[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-C[y.position||"full"]/2),_[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+C[y.position||"full"]))}_queueRefresh(y,k){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=k||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};r.OverviewRulerRenderer=S=c([m(2,M.IBufferService),m(3,M.IDecorationService),m(4,h.IRenderService),m(5,M.IOptionsService),m(6,h.ICoreBrowserService)],S)},2950:function(o,r,a){var c=this&&this.__decorate||function(C,_,w,S){var y,k=arguments.length,I=k<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(C,_,w,S);else for(var E=C.length-1;E>=0;E--)(y=C[E])&&(I=(k<3?y(I):k>3?y(_,w,I):y(_,w))||I);return k>3&&I&&Object.defineProperty(_,w,I),I},m=this&&this.__param||function(C,_){return function(w,S){_(w,S,C)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CompositionHelper=void 0;let p=a(4725),h=a(2585),g=a(2584),M=r.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(C,_,w,S,y,k){this._textarea=C,this._compositionView=_,this._bufferService=w,this._optionsService=S,this._coreService=y,this._renderService=k,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(C){this._compositionView.textContent=C.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(C){if(this._isComposing||this._isSendingComposition){if(C.keyCode===229||C.keyCode===16||C.keyCode===17||C.keyCode===18)return!1;this._finalizeComposition(!1)}return C.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(C){if(this._compositionView.classList.remove("active"),this._isComposing=!1,C){let _={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let w;this._isSendingComposition=!1,_.start+=this._dataAlreadySent.length,w=this._isComposing?this._textarea.value.substring(_.start,_.end):this._textarea.value.substring(_.start),w.length>0&&this._coreService.triggerDataEvent(w,!0)}},0)}else{this._isSendingComposition=!1;let _=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(_,!0)}}_handleAnyTextareaChanges(){let C=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let _=this._textarea.value,w=_.replace(C,"");this._dataAlreadySent=w,_.length>C.length?this._coreService.triggerDataEvent(w,!0):_.lengththis.updateCompositionElements(!0),0)}}};r.CompositionHelper=M=c([m(2,h.IBufferService),m(3,h.IOptionsService),m(4,h.ICoreService),m(5,p.IRenderService)],M)},9806:(o,r)=>{function a(c,m,p){let h=p.getBoundingClientRect(),g=c.getComputedStyle(p),M=parseInt(g.getPropertyValue("padding-left")),C=parseInt(g.getPropertyValue("padding-top"));return[m.clientX-h.left-M,m.clientY-h.top-C]}Object.defineProperty(r,"__esModule",{value:!0}),r.getCoords=r.getCoordsRelativeToElement=void 0,r.getCoordsRelativeToElement=a,r.getCoords=function(c,m,p,h,g,M,C,_,w){if(!M)return;let S=a(c,m,p);return S?(S[0]=Math.ceil((S[0]+(w?C/2:0))/C),S[1]=Math.ceil(S[1]/_),S[0]=Math.min(Math.max(S[0],1),h+(w?1:0)),S[1]=Math.min(Math.max(S[1],1),g),S):void 0}},9504:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.moveToCellSequence=void 0;let c=a(2584);function m(_,w,S,y){let k=_-p(_,S),I=w-p(w,S),E=Math.abs(k-I)-(function(N,T,R){let W=0,pe=N-p(N,R),_e=T-p(T,R);for(let G=0;G=0&&_w?"A":"B"}function g(_,w,S,y,k,I){let E=_,N=w,T="";for(;E!==S||N!==y;)E+=k?1:-1,k&&E>I.cols-1?(T+=I.buffer.translateBufferLineToString(N,!1,_,E),E=0,_=0,N++):!k&&E<0&&(T+=I.buffer.translateBufferLineToString(N,!1,0,_+1),E=I.cols-1,_=E,N--);return T+I.buffer.translateBufferLineToString(N,!1,_,E)}function M(_,w){let S=w?"O":"[";return c.C0.ESC+S+_}function C(_,w){_=Math.floor(_);let S="";for(let y=0;y<_;y++)S+=w;return S}r.moveToCellSequence=function(_,w,S,y){let k=S.buffer.x,I=S.buffer.y;if(!S.buffer.hasScrollback)return(function(T,R,W,pe,_e,G){return m(R,pe,_e,G).length===0?"":C(g(T,R,T,R-p(R,_e),!1,_e).length,M("D",G))})(k,I,0,w,S,y)+m(I,w,S,y)+(function(T,R,W,pe,_e,G){let ue;ue=m(R,pe,_e,G).length>0?pe-p(pe,_e):R;let ye=pe,ce=(function(Ie,de,V,Y,ne,ie){let De;return De=m(V,Y,ne,ie).length>0?Y-p(Y,ne):de,Ie=V&&De_?"D":"C",C(Math.abs(k-_),M(E,y));E=I>w?"D":"C";let N=Math.abs(I-w);return C((function(T,R){return R.cols-T})(I>w?_:k,S)+(N-1)*S.cols+1+((I>w?k:_)-1),M(E,y))}},1296:function(o,r,a){var c=this&&this.__decorate||function(G,ue,ye,ce){var Ie,de=arguments.length,V=de<3?ue:ce===null?ce=Object.getOwnPropertyDescriptor(ue,ye):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(G,ue,ye,ce);else for(var Y=G.length-1;Y>=0;Y--)(Ie=G[Y])&&(V=(de<3?Ie(V):de>3?Ie(ue,ye,V):Ie(ue,ye))||V);return de>3&&V&&Object.defineProperty(ue,ye,V),V},m=this&&this.__param||function(G,ue){return function(ye,ce){ue(ye,ce,G)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRenderer=void 0;let p=a(3787),h=a(2550),g=a(2223),M=a(6171),C=a(6052),_=a(4725),w=a(8055),S=a(8460),y=a(844),k=a(2585),I="xterm-dom-renderer-owner-",E="xterm-rows",N="xterm-fg-",T="xterm-bg-",R="xterm-focus",W="xterm-selection",pe=1,_e=r.DomRenderer=class extends y.Disposable{constructor(G,ue,ye,ce,Ie,de,V,Y,ne,ie,De,$e,it){super(),this._terminal=G,this._document=ue,this._element=ye,this._screenElement=ce,this._viewportElement=Ie,this._helperContainer=de,this._linkifier2=V,this._charSizeService=ne,this._optionsService=ie,this._bufferService=De,this._coreBrowserService=$e,this._themeService=it,this._terminalClass=pe++,this._rowElements=[],this._selectionRenderModel=(0,C.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new S.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(W),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,M.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(et=>this._injectCss(et))),this._injectCss(this._themeService.colors),this._rowFactory=Y.createInstance(p.DomRendererRowFactory,document),this._element.classList.add(I+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(et=>this._handleLinkHover(et))),this.register(this._linkifier2.onHideLinkUnderline(et=>this._handleLinkLeave(et))),this.register((0,y.toDisposable)(()=>{this._element.classList.remove(I+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new h.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let G=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*G,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*G),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/G),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/G),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let ye of this._rowElements)ye.style.width=`${this.dimensions.css.canvas.width}px`,ye.style.height=`${this.dimensions.css.cell.height}px`,ye.style.lineHeight=`${this.dimensions.css.cell.height}px`,ye.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let ue=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=ue,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(G){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let ue=`${this._terminalSelector} .${E} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;ue+=`${this._terminalSelector} .${E} .xterm-dim { color: ${w.color.multiplyOpacity(G.foreground,.5).css};}`,ue+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let ye=`blink_underline_${this._terminalClass}`,ce=`blink_bar_${this._terminalClass}`,Ie=`blink_block_${this._terminalClass}`;ue+=`@keyframes ${ye} { 50% { border-bottom-style: hidden; }}`,ue+=`@keyframes ${ce} { 50% { box-shadow: none; }}`,ue+=`@keyframes ${Ie} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,ue+=`${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ye} 1s step-end infinite;}${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${ce} 1s step-end infinite;}${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Ie} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,ue+=`${this._terminalSelector} .${W} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${W} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${W} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(let[de,V]of G.ansi.entries())ue+=`${this._terminalSelector} .${N}${de} { color: ${V.css}; }${this._terminalSelector} .${N}${de}.xterm-dim { color: ${w.color.multiplyOpacity(V,.5).css}; }${this._terminalSelector} .${T}${de} { background-color: ${V.css}; }`;ue+=`${this._terminalSelector} .${N}${g.INVERTED_DEFAULT_COLOR} { color: ${w.color.opaque(G.background).css}; }${this._terminalSelector} .${N}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${w.color.multiplyOpacity(w.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${T}${g.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=ue}_setDefaultSpacing(){let G=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${G}px`,this._rowFactory.defaultSpacing=G}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(G,ue){for(let ye=this._rowElements.length;ye<=ue;ye++){let ce=this._document.createElement("div");this._rowContainer.appendChild(ce),this._rowElements.push(ce)}for(;this._rowElements.length>ue;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,ue){this._refreshRowElements(G,ue),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(G,ue,ye){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,ue,ye),this.renderRows(0,this._bufferService.rows-1),!G||!ue)return;this._selectionRenderModel.update(this._terminal,G,ue,ye);let ce=this._selectionRenderModel.viewportStartRow,Ie=this._selectionRenderModel.viewportEndRow,de=this._selectionRenderModel.viewportCappedStartRow,V=this._selectionRenderModel.viewportCappedEndRow;if(de>=this._bufferService.rows||V<0)return;let Y=this._document.createDocumentFragment();if(ye){let ne=G[0]>ue[0];Y.appendChild(this._createSelectionElement(de,ne?ue[0]:G[0],ne?G[0]:ue[0],V-de+1))}else{let ne=ce===de?G[0]:0,ie=de===Ie?ue[0]:this._bufferService.cols;Y.appendChild(this._createSelectionElement(de,ne,ie));let De=V-de-1;if(Y.appendChild(this._createSelectionElement(de+1,0,this._bufferService.cols,De)),de!==V){let $e=Ie===V?ue[0]:this._bufferService.cols;Y.appendChild(this._createSelectionElement(V,0,$e))}}this._selectionContainer.appendChild(Y)}_createSelectionElement(G,ue,ye,ce=1){let Ie=this._document.createElement("div"),de=ue*this.dimensions.css.cell.width,V=this.dimensions.css.cell.width*(ye-ue);return de+V>this.dimensions.css.canvas.width&&(V=this.dimensions.css.canvas.width-de),Ie.style.height=ce*this.dimensions.css.cell.height+"px",Ie.style.top=G*this.dimensions.css.cell.height+"px",Ie.style.left=`${de}px`,Ie.style.width=`${V}px`,Ie}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let G of this._rowElements)G.replaceChildren()}renderRows(G,ue){let ye=this._bufferService.buffer,ce=ye.ybase+ye.y,Ie=Math.min(ye.x,this._bufferService.cols-1),de=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,Y=this._optionsService.rawOptions.cursorInactiveStyle;for(let ne=G;ne<=ue;ne++){let ie=ne+ye.ydisp,De=this._rowElements[ne],$e=ye.lines.get(ie);if(!De||!$e)break;De.replaceChildren(...this._rowFactory.createRow($e,ie,ie===ce,V,Y,Ie,de,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${I}${this._terminalClass}`}_handleLinkHover(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!0)}_handleLinkLeave(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!1)}_setCellUnderline(G,ue,ye,ce,Ie,de){ye<0&&(G=0),ce<0&&(ue=0);let V=this._bufferService.rows-1;ye=Math.max(Math.min(ye,V),0),ce=Math.max(Math.min(ce,V),0),Ie=Math.min(Ie,this._bufferService.cols);let Y=this._bufferService.buffer,ne=Y.ybase+Y.y,ie=Math.min(Y.x,Ie-1),De=this._optionsService.rawOptions.cursorBlink,$e=this._optionsService.rawOptions.cursorStyle,it=this._optionsService.rawOptions.cursorInactiveStyle;for(let et=ye;et<=ce;++et){let Se=et+Y.ydisp,q=this._rowElements[et],Oe=Y.lines.get(Se);if(!q||!Oe)break;q.replaceChildren(...this._rowFactory.createRow(Oe,Se,Se===ne,$e,it,ie,De,this.dimensions.css.cell.width,this._widthCache,de?et===ye?G:0:-1,de?(et===ce?ue:Ie)-1:-1))}}};r.DomRenderer=_e=c([m(7,k.IInstantiationService),m(8,_.ICharSizeService),m(9,k.IOptionsService),m(10,k.IBufferService),m(11,_.ICoreBrowserService),m(12,_.IThemeService)],_e)},3787:function(o,r,a){var c=this&&this.__decorate||function(E,N,T,R){var W,pe=arguments.length,_e=pe<3?N:R===null?R=Object.getOwnPropertyDescriptor(N,T):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_e=Reflect.decorate(E,N,T,R);else for(var G=E.length-1;G>=0;G--)(W=E[G])&&(_e=(pe<3?W(_e):pe>3?W(N,T,_e):W(N,T))||_e);return pe>3&&_e&&Object.defineProperty(N,T,_e),_e},m=this&&this.__param||function(E,N){return function(T,R){N(T,R,E)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRendererRowFactory=void 0;let p=a(2223),h=a(643),g=a(511),M=a(2585),C=a(8055),_=a(4725),w=a(4269),S=a(6171),y=a(3734),k=r.DomRendererRowFactory=class{constructor(E,N,T,R,W,pe,_e){this._document=E,this._characterJoinerService=N,this._optionsService=T,this._coreBrowserService=R,this._coreService=W,this._decorationService=pe,this._themeService=_e,this._workCell=new g.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,N,T){this._selectionStart=E,this._selectionEnd=N,this._columnSelectMode=T}createRow(E,N,T,R,W,pe,_e,G,ue,ye,ce){let Ie=[],de=this._characterJoinerService.getJoinedCharacters(N),V=this._themeService.colors,Y,ne=E.getNoBgTrimmedLength();T&&ne0&&ni===de[0][0]){Eo=!0;let Zo=de.shift();An=new w.JoinedCellData(this._workCell,E.translateToString(!0,Zo[0],Zo[1]),Zo[1]-Zo[0]),Kr=Zo[1]-1,Uo=An.getWidth()}let am=this._isCellInSelection(ni,N),xh=T&&ni===pe,hE=Rt&&ni>=ye&&ni<=ce,fE=!1;this._decorationService.forEachDecorationAtCell(ni,N,void 0,Zo=>{fE=!0});let fC=An.getChars()||h.WHITESPACE_CELL_CHAR;if(fC===" "&&(An.isUnderline()||An.isOverline())&&(fC="\xA0"),Ke=Uo*G-ue.get(fC,An.isBold(),An.isItalic()),Y){if(ie&&(am&&Oe||!am&&!Oe&&An.bg===$e)&&(am&&Oe&&V.selectionForeground||An.fg===it)&&An.extended.ext===et&&hE===Se&&Ke===q&&!xh&&!Eo&&!fE){An.isInvisible()?De+=h.WHITESPACE_CELL_CHAR:De+=fC,ie++;continue}ie&&(Y.textContent=De),Y=this._document.createElement("span"),ie=0,De=""}else Y=this._document.createElement("span");if($e=An.bg,it=An.fg,et=An.extended.ext,Se=hE,q=Ke,Oe=am,Eo&&pe>=ni&&pe<=Kr&&(pe=ni),!this._coreService.isCursorHidden&&xh&&this._coreService.isCursorInitialized){if(Ct.push("xterm-cursor"),this._coreBrowserService.isFocused)_e&&Ct.push("xterm-cursor-blink"),Ct.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(W)switch(W){case"outline":Ct.push("xterm-cursor-outline");break;case"block":Ct.push("xterm-cursor-block");break;case"bar":Ct.push("xterm-cursor-bar");break;case"underline":Ct.push("xterm-cursor-underline")}}if(An.isBold()&&Ct.push("xterm-bold"),An.isItalic()&&Ct.push("xterm-italic"),An.isDim()&&Ct.push("xterm-dim"),De=An.isInvisible()?h.WHITESPACE_CELL_CHAR:An.getChars()||h.WHITESPACE_CELL_CHAR,An.isUnderline()&&(Ct.push(`xterm-underline-${An.extended.underlineStyle}`),De===" "&&(De="\xA0"),!An.isUnderlineColorDefault()))if(An.isUnderlineColorRGB())Y.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(An.getUnderlineColor()).join(",")})`;else{let Zo=An.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&An.isBold()&&Zo<8&&(Zo+=8),Y.style.textDecorationColor=V.ansi[Zo].css}An.isOverline()&&(Ct.push("xterm-overline"),De===" "&&(De="\xA0")),An.isStrikethrough()&&Ct.push("xterm-strikethrough"),hE&&(Y.style.textDecoration="underline");let tl=An.getFgColor(),N_=An.getFgColorMode(),Cc=An.getBgColor(),R_=An.getBgColorMode(),gE=!!An.isInverse();if(gE){let Zo=tl;tl=Cc,Cc=Zo;let WG=N_;N_=R_,R_=WG}let sm,gC,lm,F_=!1;switch(this._decorationService.forEachDecorationAtCell(ni,N,void 0,Zo=>{Zo.options.layer!=="top"&&F_||(Zo.backgroundColorRGB&&(R_=50331648,Cc=Zo.backgroundColorRGB.rgba>>8&16777215,sm=Zo.backgroundColorRGB),Zo.foregroundColorRGB&&(N_=50331648,tl=Zo.foregroundColorRGB.rgba>>8&16777215,gC=Zo.foregroundColorRGB),F_=Zo.options.layer==="top")}),!F_&&am&&(sm=this._coreBrowserService.isFocused?V.selectionBackgroundOpaque:V.selectionInactiveBackgroundOpaque,Cc=sm.rgba>>8&16777215,R_=50331648,F_=!0,V.selectionForeground&&(N_=50331648,tl=V.selectionForeground.rgba>>8&16777215,gC=V.selectionForeground)),F_&&Ct.push("xterm-decoration-top"),R_){case 16777216:case 33554432:lm=V.ansi[Cc],Ct.push(`xterm-bg-${Cc}`);break;case 50331648:lm=C.channels.toColor(Cc>>16,Cc>>8&255,255&Cc),this._addStyle(Y,`background-color:#${I((Cc>>>0).toString(16),"0",6)}`);break;default:gE?(lm=V.foreground,Ct.push(`xterm-bg-${p.INVERTED_DEFAULT_COLOR}`)):lm=V.background}switch(sm||An.isDim()&&(sm=C.color.multiplyOpacity(lm,.5)),N_){case 16777216:case 33554432:An.isBold()&&tl<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(tl+=8),this._applyMinimumContrast(Y,lm,V.ansi[tl],An,sm,void 0)||Ct.push(`xterm-fg-${tl}`);break;case 50331648:let Zo=C.channels.toColor(tl>>16&255,tl>>8&255,255&tl);this._applyMinimumContrast(Y,lm,Zo,An,sm,gC)||this._addStyle(Y,`color:#${I(tl.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(Y,lm,V.foreground,An,sm,gC)||gE&&Ct.push(`xterm-fg-${p.INVERTED_DEFAULT_COLOR}`)}Ct.length&&(Y.className=Ct.join(" "),Ct.length=0),xh||Eo||fE?Y.textContent=De:ie++,Ke!==this.defaultSpacing&&(Y.style.letterSpacing=`${Ke}px`),Ie.push(Y),ni=Kr}return Y&&ie&&(Y.textContent=De),Ie}_applyMinimumContrast(E,N,T,R,W,pe){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,S.treatGlyphAsBackgroundColor)(R.getCode()))return!1;let _e=this._getContrastCache(R),G;if(W||pe||(G=_e.getColor(N.rgba,T.rgba)),G===void 0){let ue=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);G=C.color.ensureContrastRatio(W||N,pe||T,ue),_e.setColor((W||N).rgba,(pe||T).rgba,G??null)}return!!G&&(this._addStyle(E,`color:${G.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,N){E.setAttribute("style",`${E.getAttribute("style")||""}${N};`)}_isCellInSelection(E,N){let T=this._selectionStart,R=this._selectionEnd;return!(!T||!R)&&(this._columnSelectMode?T[0]<=R[0]?E>=T[0]&&N>=T[1]&&E=T[1]&&E>=R[0]&&N<=R[1]:N>T[1]&&N=T[0]&&E=T[0])}};function I(E,N,T){for(;E.length{Object.defineProperty(r,"__esModule",{value:!0}),r.WidthCache=void 0,r.WidthCache=class{constructor(a,c){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=a.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let m=a.createElement("span");m.classList.add("xterm-char-measure-element");let p=a.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontWeight="bold";let h=a.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontStyle="italic";let g=a.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[m,p,h,g],this._container.appendChild(m),this._container.appendChild(p),this._container.appendChild(h),this._container.appendChild(g),c.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(a,c,m,p){a===this._font&&c===this._fontSize&&m===this._weight&&p===this._weightBold||(this._font=a,this._fontSize=c,this._weight=m,this._weightBold=p,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${p}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${p}`,this.clear())}get(a,c,m){let p=0;if(!c&&!m&&a.length===1&&(p=a.charCodeAt(0))<256){if(this._flat[p]!==-9999)return this._flat[p];let M=this._measure(a,0);return M>0&&(this._flat[p]=M),M}let h=a;c&&(h+="B"),m&&(h+="I");let g=this._holey.get(h);if(g===void 0){let M=0;c&&(M|=1),m&&(M|=2),g=this._measure(a,M),g>0&&this._holey.set(h,g)}return g}_measure(a,c){let m=this._measureElements[c];return m.textContent=a.repeat(32),m.offsetWidth/32}}},2223:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;let c=a(6114);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},6171:(o,r)=>{function a(m){return 57508<=m&&m<=57558}function c(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},r.isPowerlineGlyph=a,r.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},r.isEmoji=c,r.allowRescaling=function(m,p,h,g){return p===1&&h>Math.ceil(1.5*g)&&m!==void 0&&m>255&&!c(m)&&!a(m)&&!(function(M){return 57344<=M&&M<=63743})(m)},r.treatGlyphAsBackgroundColor=function(m){return a(m)||(function(p){return 9472<=p&&p<=9631})(m)},r.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},r.computeNextVariantOffset=function(m,p,h=0){return(m-(2*Math.round(p)-h))%(2*Math.round(p))}},6052:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,p,h,g=!1){if(this.selectionStart=p,this.selectionEnd=h,!p||!h||p[0]===h[0]&&p[1]===h[1])return void this.clear();let M=m.buffers.active.ydisp,C=p[1]-M,_=h[1]-M,w=Math.max(C,0),S=Math.min(_,m.rows-1);w>=m.rows||S<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=C,this.viewportEndRow=_,this.viewportCappedStartRow=w,this.viewportCappedEndRow=S,this.startCol=p[0],this.endCol=h[0])}isCellSelected(m,p,h){return!!this.hasSelection&&(h-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?p>=this.startCol&&h>=this.viewportCappedStartRow&&p=this.viewportCappedStartRow&&p>=this.endCol&&h<=this.viewportCappedEndRow:h>this.viewportStartRow&&h=this.startCol&&p=this.startCol)}}r.createSelectionRenderModel=function(){return new a}},456:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionModel=void 0,r.SelectionModel=class{constructor(a){this._bufferService=a,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?a%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)-1]:[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[a,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[Math.max(a,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let a=this.selectionStart,c=this.selectionEnd;return!(!a||!c)&&(a[1]>c[1]||a[1]===c[1]&&a[0]>c[0])}handleTrim(a){return this.selectionStart&&(this.selectionStart[1]-=a),this.selectionEnd&&(this.selectionEnd[1]-=a),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(o,r,a){var c=this&&this.__decorate||function(S,y,k,I){var E,N=arguments.length,T=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,k):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,y,k,I);else for(var R=S.length-1;R>=0;R--)(E=S[R])&&(T=(N<3?E(T):N>3?E(y,k,T):E(y,k))||T);return N>3&&T&&Object.defineProperty(y,k,T),T},m=this&&this.__param||function(S,y){return function(k,I){y(k,I,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharSizeService=void 0;let p=a(2585),h=a(8460),g=a(844),M=r.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(S,y,k){super(),this._optionsService=k,this.width=0,this.height=0,this._onCharSizeChange=this.register(new h.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new w(this._optionsService))}catch{this._measureStrategy=this.register(new _(S,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){let S=this._measureStrategy.measure();S.width===this.width&&S.height===this.height||(this.width=S.width,this.height=S.height,this._onCharSizeChange.fire())}};r.CharSizeService=M=c([m(2,p.IOptionsService)],M);class C extends g.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,k){y!==void 0&&y>0&&k!==void 0&&k>0&&(this._result.width=y,this._result.height=k)}}class _ extends C{constructor(y,k,I){super(),this._document=y,this._parentElement=k,this._optionsService=I,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class w extends C{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let k=this._ctx.measureText("W");if(!("width"in k&&"fontBoundingBoxAscent"in k&&"fontBoundingBoxDescent"in k))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(o,r,a){var c=this&&this.__decorate||function(w,S,y,k){var I,E=arguments.length,N=E<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,y):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,S,y,k);else for(var T=w.length-1;T>=0;T--)(I=w[T])&&(N=(E<3?I(N):E>3?I(S,y,N):I(S,y))||N);return E>3&&N&&Object.defineProperty(S,y,N),N},m=this&&this.__param||function(w,S){return function(y,k){S(y,k,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;let p=a(3734),h=a(643),g=a(511),M=a(2585);class C extends p.AttributeData{constructor(S,y,k){super(),this.content=0,this.combinedData="",this.fg=S.fg,this.bg=S.bg,this.combinedData=y,this._width=k}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(S){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.JoinedCellData=C;let _=r.CharacterJoinerService=class kU{constructor(S){this._bufferService=S,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(S){let y={id:this._nextCharacterJoinerId++,handler:S};return this._characterJoiners.push(y),y.id}deregister(S){for(let y=0;y1){let _e=this._getJoinedRanges(I,T,N,y,E);for(let G=0;G<_e.length;G++)k.push(_e[G])}E=pe,T=N,R=this._workCell.fg,W=this._workCell.bg}N+=this._workCell.getChars().length||h.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-E>1){let pe=this._getJoinedRanges(I,T,N,y,E);for(let _e=0;_e{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreBrowserService=void 0;let c=a(844),m=a(8460),p=a(3656);class h extends c.Disposable{constructor(C,_,w){super(),this._textarea=C,this._window=_,this.mainDocument=w,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new g(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(S=>this._screenDprMonitor.setWindow(S))),this.register((0,m.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(C){this._window!==C&&(this._window=C,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}r.CoreBrowserService=h;class g extends c.Disposable{constructor(C){super(),this._parentWindow=C,this._windowResizeListener=this.register(new c.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,c.toDisposable)(()=>this.clearListener()))}setWindow(C){this._parentWindow=C,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,p.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkProviderService=void 0;let c=a(844);class m extends c.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,c.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(h){return this.linkProviders.push(h),{dispose:()=>{let g=this.linkProviders.indexOf(h);g!==-1&&this.linkProviders.splice(g,1)}}}}r.LinkProviderService=m},8934:function(o,r,a){var c=this&&this.__decorate||function(M,C,_,w){var S,y=arguments.length,k=y<3?C:w===null?w=Object.getOwnPropertyDescriptor(C,_):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(M,C,_,w);else for(var I=M.length-1;I>=0;I--)(S=M[I])&&(k=(y<3?S(k):y>3?S(C,_,k):S(C,_))||k);return y>3&&k&&Object.defineProperty(C,_,k),k},m=this&&this.__param||function(M,C){return function(_,w){C(_,w,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MouseService=void 0;let p=a(4725),h=a(9806),g=r.MouseService=class{constructor(M,C){this._renderService=M,this._charSizeService=C}getCoords(M,C,_,w,S){return(0,h.getCoords)(window,M,C,_,w,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,S)}getMouseReportCoords(M,C){let _=(0,h.getCoordsRelativeToElement)(window,M,C);if(this._charSizeService.hasValidSize)return _[0]=Math.min(Math.max(_[0],0),this._renderService.dimensions.css.canvas.width-1),_[1]=Math.min(Math.max(_[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(_[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(_[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(_[0]),y:Math.floor(_[1])}}};r.MouseService=g=c([m(0,p.IRenderService),m(1,p.ICharSizeService)],g)},3230:function(o,r,a){var c=this&&this.__decorate||function(S,y,k,I){var E,N=arguments.length,T=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,k):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,y,k,I);else for(var R=S.length-1;R>=0;R--)(E=S[R])&&(T=(N<3?E(T):N>3?E(y,k,T):E(y,k))||T);return N>3&&T&&Object.defineProperty(y,k,T),T},m=this&&this.__param||function(S,y){return function(k,I){y(k,I,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RenderService=void 0;let p=a(6193),h=a(4725),g=a(8460),M=a(844),C=a(7226),_=a(2585),w=r.RenderService=class extends M.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(S,y,k,I,E,N,T,R){super(),this._rowCount=S,this._charSizeService=I,this._renderer=this.register(new M.MutableDisposable),this._pausedResizeTask=new C.DebouncedIdleTask,this._observerDisposable=this.register(new M.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new p.RenderDebouncer((W,pe)=>this._renderRows(W,pe),T),this.register(this._renderDebouncer),this.register(T.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(N.onResize(()=>this._fullRefresh())),this.register(N.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this.register(k.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(E.onDecorationRegistered(()=>this._fullRefresh())),this.register(E.onDecorationRemoved(()=>this._fullRefresh())),this.register(k.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(N.cols,N.rows),this._fullRefresh()})),this.register(k.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(N.buffer.y,N.buffer.y,!0))),this.register(R.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(T.window,y),this.register(T.onWindowChange(W=>this._registerIntersectionObserver(W,y)))}_registerIntersectionObserver(S,y){if("IntersectionObserver"in S){let k=new S.IntersectionObserver(I=>this._handleIntersectionChange(I[I.length-1]),{threshold:0});k.observe(y),this._observerDisposable.value=(0,M.toDisposable)(()=>k.disconnect())}}_handleIntersectionChange(S){this._isPaused=S.isIntersecting===void 0?S.intersectionRatio===0:!S.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(S,y,k=!1){this._isPaused?this._needsFullRefresh=!0:(k||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(S,y,this._rowCount))}_renderRows(S,y){this._renderer.value&&(S=Math.min(S,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(S,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:S,end:y}),this._onRender.fire({start:S,end:y}),this._isNextRenderRedrawOnly=!0)}resize(S,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(S){this._renderer.value=S,this._renderer.value&&(this._renderer.value.onRequestRedraw(y=>this.refreshRows(y.start,y.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(S){return this._renderDebouncer.addRefreshCallback(S)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(S,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(S,y)):this._renderer.value.handleResize(S,y),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(S,y,k){this._selectionState.start=S,this._selectionState.end=y,this._selectionState.columnSelectMode=k,this._renderer.value?.handleSelectionChanged(S,y,k)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};r.RenderService=w=c([m(2,_.IOptionsService),m(3,h.ICharSizeService),m(4,_.IDecorationService),m(5,_.IBufferService),m(6,h.ICoreBrowserService),m(7,h.IThemeService)],w)},9312:function(o,r,a){var c=this&&this.__decorate||function(T,R,W,pe){var _e,G=arguments.length,ue=G<3?R:pe===null?pe=Object.getOwnPropertyDescriptor(R,W):pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(T,R,W,pe);else for(var ye=T.length-1;ye>=0;ye--)(_e=T[ye])&&(ue=(G<3?_e(ue):G>3?_e(R,W,ue):_e(R,W))||ue);return G>3&&ue&&Object.defineProperty(R,W,ue),ue},m=this&&this.__param||function(T,R){return function(W,pe){R(W,pe,T)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionService=void 0;let p=a(9806),h=a(9504),g=a(456),M=a(4725),C=a(8460),_=a(844),w=a(6114),S=a(4841),y=a(511),k=a(2585),I="\xA0",E=new RegExp(I,"g"),N=r.SelectionService=class extends _.Disposable{constructor(T,R,W,pe,_e,G,ue,ye,ce){super(),this._element=T,this._screenElement=R,this._linkifier=W,this._bufferService=pe,this._coreService=_e,this._mouseService=G,this._optionsService=ue,this._renderService=ye,this._coreBrowserService=ce,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new C.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new C.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new C.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new C.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Ie=>this._handleMouseMove(Ie),this._mouseUpListener=Ie=>this._handleMouseUp(Ie),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(Ie=>this._handleTrim(Ie)),this.register(this._bufferService.buffers.onBufferActivate(Ie=>this._handleBufferActivate(Ie))),this.enable(),this._model=new g.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,_.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let T=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!T||!R||T[0]===R[0]&&T[1]===R[1])}get selectionText(){let T=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!T||!R)return"";let W=this._bufferService.buffer,pe=[];if(this._activeSelectionMode===3){if(T[0]===R[0])return"";let _e=T[0]_e.replace(E," ")).join(w.isWindows?`\r `:` `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),w.isLinux&&T&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(T){let R=this._getMouseBufferCoords(T),W=this._model.finalSelectionStart,pe=this._model.finalSelectionEnd;return!!(W&&pe&&R)&&this._areCoordsInSelection(R,W,pe)}isCellInSelection(T,R){let W=this._model.finalSelectionStart,pe=this._model.finalSelectionEnd;return!(!W||!pe)&&this._areCoordsInSelection([T,R],W,pe)}_areCoordsInSelection(T,R,W){return T[1]>R[1]&&T[1]=R[0]&&T[0]=R[0]}_selectWordAtCursor(T,R){let W=this._linkifier.currentLink?.link?.range;if(W)return this._model.selectionStart=[W.start.x-1,W.start.y-1],this._model.selectionStartLength=(0,S.getRangeLength)(W,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let pe=this._getMouseBufferCoords(T);return!!pe&&(this._selectWordAt(pe,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,R){this._model.clearSelection(),T=Math.max(T,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){let R=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(T){let R=(0,p.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1],W=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=W?0:(R>W&&(R-=W),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(T){return w.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){let R=this._getMouseBufferCoords(T);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(T){return T.altKey&&!(w.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;let R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let W=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){let R=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let W=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(W&&W[0]!==void 0&&W[1]!==void 0){let pe=(0,h.moveToCellSequence)(W[0]-1,W[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(pe,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let T=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,W=!(!T||!R||T[0]===R[0]&&T[1]===R[1]);W?T&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,R,W)):this._oldHasSelection&&this._fireOnSelectionChange(T,R,W)}_fireOnSelectionChange(T,R,W){this._oldSelectionStart=T,this._oldSelectionEnd=R,this._oldHasSelection=W,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim(R=>this._handleTrim(R))}_convertViewportColToCharacterIndex(T,R){let W=R;for(let pe=0;R>=pe;pe++){let _e=T.loadCell(pe,this._workCell).getChars().length;this._workCell.getWidth()===0?W--:_e>1&&R!==pe&&(W+=_e-1)}return W}setSelection(T,R,W){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,R],this._model.selectionStartLength=W,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,R,W=!0,pe=!0){if(T[0]>=this._bufferService.cols)return;let _e=this._bufferService.buffer,G=_e.lines.get(T[1]);if(!G)return;let ue=_e.translateBufferLineToString(T[1],!1),ye=this._convertViewportColToCharacterIndex(G,T[0]),ce=ye,Ie=T[0]-ye,de=0,V=0,Y=0,ne=0;if(ue.charAt(ye)===" "){for(;ye>0&&ue.charAt(ye-1)===" ";)ye--;for(;ce1&&(ne+=et-1,ce+=et-1);$e>0&&ye>0&&!this._isCharWordSeparator(G.loadCell($e-1,this._workCell));){G.loadCell($e-1,this._workCell);let Se=this._workCell.getChars().length;this._workCell.getWidth()===0?(de++,$e--):Se>1&&(Y+=Se-1,ye-=Se-1),ye--,$e--}for(;it1&&(ne+=Se-1,ce+=Se-1),ce++,it++}}ce++;let ie=ye+Ie-de+Y,De=Math.min(this._bufferService.cols,ce-ye+de+V-Y-ne);if(R||ue.slice(ye,ce).trim()!==""){if(W&&ie===0&&G.getCodePoint(0)!==32){let $e=_e.lines.get(T[1]-1);if($e&&G.isWrapped&&$e.getCodePoint(this._bufferService.cols-1)!==32){let it=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(it){let et=this._bufferService.cols-it.start;ie-=et,De+=et}}}if(pe&&ie+De===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){let $e=_e.lines.get(T[1]+1);if($e?.isWrapped&&$e.getCodePoint(0)!==32){let it=this._getWordAt([0,T[1]+1],!1,!1,!0);it&&(De+=it.length)}}return{start:ie,length:De}}}_selectWordAt(T,R){let W=this._getWordAt(T,R);if(W){for(;W.start<0;)W.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[W.start,T[1]],this._model.selectionStartLength=W.length}}_selectToWordAt(T){let R=this._getWordAt(T,!0);if(R){let W=T[1];for(;R.start<0;)R.start+=this._bufferService.cols,W--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,W++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,W]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){let R=this._bufferService.buffer.getWrappedRangeForLine(T),W={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,S.getRangeLength)(W,this._bufferService.cols)}};r.SelectionService=N=c([m(3,k.IBufferService),m(4,k.ICoreService),m(5,M.IMouseService),m(6,k.IOptionsService),m(7,M.IRenderService),m(8,M.ICoreBrowserService)],N)},4725:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ILinkProviderService=r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;let c=a(8343);r.ICharSizeService=(0,c.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),r.IMouseService=(0,c.createDecorator)("MouseService"),r.IRenderService=(0,c.createDecorator)("RenderService"),r.ISelectionService=(0,c.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,c.createDecorator)("ThemeService"),r.ILinkProviderService=(0,c.createDecorator)("LinkProviderService")},6731:function(o,r,a){var c=this&&this.__decorate||function(N,T,R,W){var pe,_e=arguments.length,G=_e<3?T:W===null?W=Object.getOwnPropertyDescriptor(T,R):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(N,T,R,W);else for(var ue=N.length-1;ue>=0;ue--)(pe=N[ue])&&(G=(_e<3?pe(G):_e>3?pe(T,R,G):pe(T,R))||G);return _e>3&&G&&Object.defineProperty(T,R,G),G},m=this&&this.__param||function(N,T){return function(R,W){T(R,W,N)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;let p=a(7239),h=a(8055),g=a(8460),M=a(844),C=a(2585),_=h.css.toColor("#ffffff"),w=h.css.toColor("#000000"),S=h.css.toColor("#ffffff"),y=h.css.toColor("#000000"),k={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{let N=[h.css.toColor("#2e3436"),h.css.toColor("#cc0000"),h.css.toColor("#4e9a06"),h.css.toColor("#c4a000"),h.css.toColor("#3465a4"),h.css.toColor("#75507b"),h.css.toColor("#06989a"),h.css.toColor("#d3d7cf"),h.css.toColor("#555753"),h.css.toColor("#ef2929"),h.css.toColor("#8ae234"),h.css.toColor("#fce94f"),h.css.toColor("#729fcf"),h.css.toColor("#ad7fa8"),h.css.toColor("#34e2e2"),h.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let R=0;R<216;R++){let W=T[R/36%6|0],pe=T[R/6%6|0],_e=T[R%6];N.push({css:h.channels.toCss(W,pe,_e),rgba:h.channels.toRgba(W,pe,_e)})}for(let R=0;R<24;R++){let W=8+10*R;N.push({css:h.channels.toCss(W,W,W),rgba:h.channels.toRgba(W,W,W)})}return N})());let I=r.ThemeService=class extends M.Disposable{get colors(){return this._colors}constructor(N){super(),this._optionsService=N,this._contrastCache=new p.ColorContrastCache,this._halfContrastCache=new p.ColorContrastCache,this._onChangeColors=this.register(new g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:_,background:w,cursor:S,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:k,selectionBackgroundOpaque:h.color.blend(w,k),selectionInactiveBackgroundTransparent:k,selectionInactiveBackgroundOpaque:h.color.blend(w,k),ansi:r.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(N={}){let T=this._colors;if(T.foreground=E(N.foreground,_),T.background=E(N.background,w),T.cursor=E(N.cursor,S),T.cursorAccent=E(N.cursorAccent,y),T.selectionBackgroundTransparent=E(N.selectionBackground,k),T.selectionBackgroundOpaque=h.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=E(N.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=h.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=N.selectionForeground?E(N.selectionForeground,h.NULL_COLOR):void 0,T.selectionForeground===h.NULL_COLOR&&(T.selectionForeground=void 0),h.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=h.color.opacity(T.selectionBackgroundTransparent,.3)),h.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=h.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=r.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=E(N.black,r.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=E(N.red,r.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=E(N.green,r.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=E(N.yellow,r.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=E(N.blue,r.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=E(N.magenta,r.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=E(N.cyan,r.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=E(N.white,r.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=E(N.brightBlack,r.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=E(N.brightRed,r.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=E(N.brightGreen,r.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=E(N.brightYellow,r.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=E(N.brightBlue,r.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=E(N.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=E(N.brightCyan,r.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=E(N.brightWhite,r.DEFAULT_ANSI_COLORS[15]),N.extendedAnsi){let R=Math.min(T.ansi.length-16,N.extendedAnsi.length);for(let W=0;W{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;let c=a(8460),m=a(844);class p extends m.Disposable{constructor(g){super(),this._maxLength=g,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(g){if(this._maxLength===g)return;let M=new Array(g);for(let C=0;Cthis._length)for(let M=this._length;M=g;_--)this._array[this._getCyclicIndex(_+C.length)]=this._array[this._getCyclicIndex(_)];for(let _=0;_this._maxLength){let _=this._length+C.length-this._maxLength;this._startIndex+=_,this._length=this._maxLength,this.onTrimEmitter.fire(_)}else this._length+=C.length}trimStart(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,M,C){if(!(M<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+C<0)throw new Error("Cannot shift elements in list beyond index 0");if(C>0){for(let w=M-1;w>=0;w--)this.set(g+w+C,this.get(g+w));let _=g+M+C-this._length;if(_>0)for(this._length+=_;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let _=0;_{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function a(c,m=5){if(typeof c!="object")return c;let p=Array.isArray(c)?[]:{};for(let h in c)p[h]=m<=1?c[h]:c[h]&&a(c[h],m-1);return p}},8055:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let a=0,c=0,m=0,p=0;var h,g,M,C,_;function w(y){let k=y.toString(16);return k.length<2?"0"+k:k}function S(y,k){return y>>0},y.toColor=function(k,I,E,N){return{css:y.toCss(k,I,E,N),rgba:y.toRgba(k,I,E,N)}}})(h||(r.channels=h={})),(function(y){function k(I,E){return p=Math.round(255*E),[a,c,m]=_.toChannels(I.rgba),{css:h.toCss(a,c,m,p),rgba:h.toRgba(a,c,m,p)}}y.blend=function(I,E){if(p=(255&E.rgba)/255,p===1)return{css:E.css,rgba:E.rgba};let N=E.rgba>>24&255,T=E.rgba>>16&255,R=E.rgba>>8&255,W=I.rgba>>24&255,pe=I.rgba>>16&255,_e=I.rgba>>8&255;return a=W+Math.round((N-W)*p),c=pe+Math.round((T-pe)*p),m=_e+Math.round((R-_e)*p),{css:h.toCss(a,c,m),rgba:h.toRgba(a,c,m)}},y.isOpaque=function(I){return(255&I.rgba)==255},y.ensureContrastRatio=function(I,E,N){let T=_.ensureContrastRatio(I.rgba,E.rgba,N);if(T)return h.toColor(T>>24&255,T>>16&255,T>>8&255)},y.opaque=function(I){let E=(255|I.rgba)>>>0;return[a,c,m]=_.toChannels(E),{css:h.toCss(a,c,m),rgba:E}},y.opacity=k,y.multiplyOpacity=function(I,E){return p=255&I.rgba,k(I,p*E/255)},y.toColorRGB=function(I){return[I.rgba>>24&255,I.rgba>>16&255,I.rgba>>8&255]}})(g||(r.color=g={})),(function(y){let k,I;try{let E=document.createElement("canvas");E.width=1,E.height=1;let N=E.getContext("2d",{willReadFrequently:!0});N&&(k=N,k.globalCompositeOperation="copy",I=k.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return a=parseInt(E.slice(1,2).repeat(2),16),c=parseInt(E.slice(2,3).repeat(2),16),m=parseInt(E.slice(3,4).repeat(2),16),h.toColor(a,c,m);case 5:return a=parseInt(E.slice(1,2).repeat(2),16),c=parseInt(E.slice(2,3).repeat(2),16),m=parseInt(E.slice(3,4).repeat(2),16),p=parseInt(E.slice(4,5).repeat(2),16),h.toColor(a,c,m,p);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}let N=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(N)return a=parseInt(N[1]),c=parseInt(N[2]),m=parseInt(N[3]),p=Math.round(255*(N[5]===void 0?1:parseFloat(N[5]))),h.toColor(a,c,m,p);if(!k||!I)throw new Error("css.toColor: Unsupported css format");if(k.fillStyle=I,k.fillStyle=E,typeof k.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(k.fillRect(0,0,1,1),[a,c,m,p]=k.getImageData(0,0,1,1).data,p!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:h.toRgba(a,c,m,p),css:E}}})(M||(r.css=M={})),(function(y){function k(I,E,N){let T=I/255,R=E/255,W=N/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(W<=.03928?W/12.92:Math.pow((W+.055)/1.055,2.4))}y.relativeLuminance=function(I){return k(I>>16&255,I>>8&255,255&I)},y.relativeLuminance2=k})(C||(r.rgb=C={})),(function(y){function k(E,N,T){let R=E>>24&255,W=E>>16&255,pe=E>>8&255,_e=N>>24&255,G=N>>16&255,ue=N>>8&255,ye=S(C.relativeLuminance2(_e,G,ue),C.relativeLuminance2(R,W,pe));for(;ye0||G>0||ue>0);)_e-=Math.max(0,Math.ceil(.1*_e)),G-=Math.max(0,Math.ceil(.1*G)),ue-=Math.max(0,Math.ceil(.1*ue)),ye=S(C.relativeLuminance2(_e,G,ue),C.relativeLuminance2(R,W,pe));return(_e<<24|G<<16|ue<<8|255)>>>0}function I(E,N,T){let R=E>>24&255,W=E>>16&255,pe=E>>8&255,_e=N>>24&255,G=N>>16&255,ue=N>>8&255,ye=S(C.relativeLuminance2(_e,G,ue),C.relativeLuminance2(R,W,pe));for(;ye>>0}y.blend=function(E,N){if(p=(255&N)/255,p===1)return N;let T=N>>24&255,R=N>>16&255,W=N>>8&255,pe=E>>24&255,_e=E>>16&255,G=E>>8&255;return a=pe+Math.round((T-pe)*p),c=_e+Math.round((R-_e)*p),m=G+Math.round((W-G)*p),h.toRgba(a,c,m)},y.ensureContrastRatio=function(E,N,T){let R=C.relativeLuminance(E>>8),W=C.relativeLuminance(N>>8);if(S(R,W)>8));if(ueS(R,C.relativeLuminance(ye>>8))?G:ye}return G}let pe=I(E,N,T),_e=S(R,C.relativeLuminance(pe>>8));if(_eS(R,C.relativeLuminance(G>>8))?pe:G}return pe}},y.reduceLuminance=k,y.increaseLuminance=I,y.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}})(_||(r.rgba=_={})),r.toPaddedHex=w,r.contrastRatio=S},8969:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;let c=a(844),m=a(2585),p=a(4348),h=a(7866),g=a(744),M=a(7302),C=a(6975),_=a(8460),w=a(1753),S=a(1480),y=a(7994),k=a(9282),I=a(5435),E=a(5981),N=a(2660),T=!1;class R extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new _.EventEmitter),this._onScroll.event(pe=>{this._onScrollApi?.fire(pe.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(pe){for(let _e in pe)this.optionsService.options[_e]=pe[_e]}constructor(pe){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new _.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new _.EventEmitter),this._instantiationService=new p.InstantiationService,this.optionsService=this.register(new M.OptionsService(pe)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(h.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(C.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(w.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(S.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(N.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new I.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,_.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,_.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,_.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,_.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(_e=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(_e=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new E.WriteBuffer((_e,G)=>this._inputHandler.parse(_e,G))),this.register((0,_.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(pe,_e){this._writeBuffer.write(pe,_e)}writeSync(pe,_e){this._logService.logLevel<=m.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(pe,_e)}input(pe,_e=!0){this.coreService.triggerDataEvent(pe,_e)}resize(pe,_e){isNaN(pe)||isNaN(_e)||(pe=Math.max(pe,g.MINIMUM_COLS),_e=Math.max(_e,g.MINIMUM_ROWS),this._bufferService.resize(pe,_e))}scroll(pe,_e=!1){this._bufferService.scroll(pe,_e)}scrollLines(pe,_e,G){this._bufferService.scrollLines(pe,_e,G)}scrollPages(pe){this.scrollLines(pe*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(pe){let _e=pe-this._bufferService.buffer.ydisp;_e!==0&&this.scrollLines(_e)}registerEscHandler(pe,_e){return this._inputHandler.registerEscHandler(pe,_e)}registerDcsHandler(pe,_e){return this._inputHandler.registerDcsHandler(pe,_e)}registerCsiHandler(pe,_e){return this._inputHandler.registerCsiHandler(pe,_e)}registerOscHandler(pe,_e){return this._inputHandler.registerOscHandler(pe,_e)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let pe=!1,_e=this.optionsService.rawOptions.windowsPty;_e&&_e.buildNumber!==void 0&&_e.buildNumber!==void 0?pe=_e.backend==="conpty"&&_e.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(pe=!0),pe?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let pe=[];pe.push(this.onLineFeed(k.updateWindowsModeWrappedState.bind(null,this._bufferService))),pe.push(this.registerCsiHandler({final:"H"},()=>((0,k.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(let _e of pe)_e.dispose()})}}}r.CoreTerminal=R},8460:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let c=0;cc.fire(m))},r.runAndSubscribe=function(a,c){return c(void 0),a(m=>c(m))}},5435:function(o,r,a){var c=this&&this.__decorate||function(de,V,Y,ne){var ie,De=arguments.length,$e=De<3?V:ne===null?ne=Object.getOwnPropertyDescriptor(V,Y):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$e=Reflect.decorate(de,V,Y,ne);else for(var it=de.length-1;it>=0;it--)(ie=de[it])&&($e=(De<3?ie($e):De>3?ie(V,Y,$e):ie(V,Y))||$e);return De>3&&$e&&Object.defineProperty(V,Y,$e),$e},m=this&&this.__param||function(de,V){return function(Y,ne){V(Y,ne,de)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;let p=a(2584),h=a(7116),g=a(2015),M=a(844),C=a(482),_=a(8437),w=a(8460),S=a(643),y=a(511),k=a(3734),I=a(2585),E=a(1480),N=a(6242),T=a(6351),R=a(5941),W={"(":0,")":1,"*":2,"+":3,"-":1,".":2},pe=131072;function _e(de,V){if(de>24)return V.setWinLines||!1;switch(de){case 1:return!!V.restoreWin;case 2:return!!V.minimizeWin;case 3:return!!V.setWinPosition;case 4:return!!V.setWinSizePixels;case 5:return!!V.raiseWin;case 6:return!!V.lowerWin;case 7:return!!V.refreshWin;case 8:return!!V.setWinSizeChars;case 9:return!!V.maximizeWin;case 10:return!!V.fullscreenWin;case 11:return!!V.getWinState;case 13:return!!V.getWinPosition;case 14:return!!V.getWinSizePixels;case 15:return!!V.getScreenSizePixels;case 16:return!!V.getCellSizePixels;case 18:return!!V.getWinSizeChars;case 19:return!!V.getScreenSizeChars;case 20:return!!V.getIconTitle;case 21:return!!V.getWinTitle;case 22:return!!V.pushTitle;case 23:return!!V.popTitle;case 24:return!!V.setWinLines}return!1}var G;(function(de){de[de.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",de[de.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(r.WindowsOptionsReportType=G={}));let ue=0;class ye extends M.Disposable{getAttrData(){return this._curAttrData}constructor(V,Y,ne,ie,De,$e,it,et,Se=new g.EscapeSequenceParser){super(),this._bufferService=V,this._charsetService=Y,this._coreService=ne,this._logService=ie,this._optionsService=De,this._oscLinkService=$e,this._coreMouseService=it,this._unicodeService=et,this._parser=Se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new C.StringToUtf32,this._utf8Decoder=new C.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=_.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=_.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new w.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new w.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new w.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new w.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new w.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new w.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new w.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new w.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new w.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new w.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new w.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new w.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new w.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new ce(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(q=>this._activeBuffer=q.activeBuffer)),this._parser.setCsiHandlerFallback((q,Oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:Oe.toArray()})}),this._parser.setEscHandlerFallback(q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})}),this._parser.setExecuteHandlerFallback(q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})}),this._parser.setOscHandlerFallback((q,Oe,Ke)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:Oe,data:Ke})}),this._parser.setDcsHandlerFallback((q,Oe,Ke)=>{Oe==="HOOK"&&(Ke=Ke.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:Oe,payload:Ke})}),this._parser.setPrintHandler((q,Oe,Ke)=>this.print(q,Oe,Ke)),this._parser.registerCsiHandler({final:"@"},q=>this.insertChars(q)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},q=>this.scrollLeft(q)),this._parser.registerCsiHandler({final:"A"},q=>this.cursorUp(q)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},q=>this.scrollRight(q)),this._parser.registerCsiHandler({final:"B"},q=>this.cursorDown(q)),this._parser.registerCsiHandler({final:"C"},q=>this.cursorForward(q)),this._parser.registerCsiHandler({final:"D"},q=>this.cursorBackward(q)),this._parser.registerCsiHandler({final:"E"},q=>this.cursorNextLine(q)),this._parser.registerCsiHandler({final:"F"},q=>this.cursorPrecedingLine(q)),this._parser.registerCsiHandler({final:"G"},q=>this.cursorCharAbsolute(q)),this._parser.registerCsiHandler({final:"H"},q=>this.cursorPosition(q)),this._parser.registerCsiHandler({final:"I"},q=>this.cursorForwardTab(q)),this._parser.registerCsiHandler({final:"J"},q=>this.eraseInDisplay(q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},q=>this.eraseInDisplay(q,!0)),this._parser.registerCsiHandler({final:"K"},q=>this.eraseInLine(q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},q=>this.eraseInLine(q,!0)),this._parser.registerCsiHandler({final:"L"},q=>this.insertLines(q)),this._parser.registerCsiHandler({final:"M"},q=>this.deleteLines(q)),this._parser.registerCsiHandler({final:"P"},q=>this.deleteChars(q)),this._parser.registerCsiHandler({final:"S"},q=>this.scrollUp(q)),this._parser.registerCsiHandler({final:"T"},q=>this.scrollDown(q)),this._parser.registerCsiHandler({final:"X"},q=>this.eraseChars(q)),this._parser.registerCsiHandler({final:"Z"},q=>this.cursorBackwardTab(q)),this._parser.registerCsiHandler({final:"`"},q=>this.charPosAbsolute(q)),this._parser.registerCsiHandler({final:"a"},q=>this.hPositionRelative(q)),this._parser.registerCsiHandler({final:"b"},q=>this.repeatPrecedingCharacter(q)),this._parser.registerCsiHandler({final:"c"},q=>this.sendDeviceAttributesPrimary(q)),this._parser.registerCsiHandler({prefix:">",final:"c"},q=>this.sendDeviceAttributesSecondary(q)),this._parser.registerCsiHandler({final:"d"},q=>this.linePosAbsolute(q)),this._parser.registerCsiHandler({final:"e"},q=>this.vPositionRelative(q)),this._parser.registerCsiHandler({final:"f"},q=>this.hVPosition(q)),this._parser.registerCsiHandler({final:"g"},q=>this.tabClear(q)),this._parser.registerCsiHandler({final:"h"},q=>this.setMode(q)),this._parser.registerCsiHandler({prefix:"?",final:"h"},q=>this.setModePrivate(q)),this._parser.registerCsiHandler({final:"l"},q=>this.resetMode(q)),this._parser.registerCsiHandler({prefix:"?",final:"l"},q=>this.resetModePrivate(q)),this._parser.registerCsiHandler({final:"m"},q=>this.charAttributes(q)),this._parser.registerCsiHandler({final:"n"},q=>this.deviceStatus(q)),this._parser.registerCsiHandler({prefix:"?",final:"n"},q=>this.deviceStatusPrivate(q)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},q=>this.softReset(q)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},q=>this.setCursorStyle(q)),this._parser.registerCsiHandler({final:"r"},q=>this.setScrollRegion(q)),this._parser.registerCsiHandler({final:"s"},q=>this.saveCursor(q)),this._parser.registerCsiHandler({final:"t"},q=>this.windowOptions(q)),this._parser.registerCsiHandler({final:"u"},q=>this.restoreCursor(q)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},q=>this.insertColumns(q)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},q=>this.deleteColumns(q)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},q=>this.selectProtected(q)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},q=>this.requestMode(q,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},q=>this.requestMode(q,!1)),this._parser.setExecuteHandler(p.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(p.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(p.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(p.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(p.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(p.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(p.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(p.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(p.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(p.C1.IND,()=>this.index()),this._parser.setExecuteHandler(p.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(p.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new N.OscHandler(q=>(this.setTitle(q),this.setIconName(q),!0))),this._parser.registerOscHandler(1,new N.OscHandler(q=>this.setIconName(q))),this._parser.registerOscHandler(2,new N.OscHandler(q=>this.setTitle(q))),this._parser.registerOscHandler(4,new N.OscHandler(q=>this.setOrReportIndexedColor(q))),this._parser.registerOscHandler(8,new N.OscHandler(q=>this.setHyperlink(q))),this._parser.registerOscHandler(10,new N.OscHandler(q=>this.setOrReportFgColor(q))),this._parser.registerOscHandler(11,new N.OscHandler(q=>this.setOrReportBgColor(q))),this._parser.registerOscHandler(12,new N.OscHandler(q=>this.setOrReportCursorColor(q))),this._parser.registerOscHandler(104,new N.OscHandler(q=>this.restoreIndexedColor(q))),this._parser.registerOscHandler(110,new N.OscHandler(q=>this.restoreFgColor(q))),this._parser.registerOscHandler(111,new N.OscHandler(q=>this.restoreBgColor(q))),this._parser.registerOscHandler(112,new N.OscHandler(q=>this.restoreCursorColor(q))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let q in h.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},()=>this.selectCharset("("+q)),this._parser.registerEscHandler({intermediates:")",final:q},()=>this.selectCharset(")"+q)),this._parser.registerEscHandler({intermediates:"*",final:q},()=>this.selectCharset("*"+q)),this._parser.registerEscHandler({intermediates:"+",final:q},()=>this.selectCharset("+"+q)),this._parser.registerEscHandler({intermediates:"-",final:q},()=>this.selectCharset("-"+q)),this._parser.registerEscHandler({intermediates:".",final:q},()=>this.selectCharset("."+q)),this._parser.registerEscHandler({intermediates:"/",final:q},()=>this.selectCharset("/"+q));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(q=>(this._logService.error("Parsing error: ",q),q)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler((q,Oe)=>this.requestStatusString(q,Oe)))}_preserveStack(V,Y,ne,ie){this._parseStack.paused=!0,this._parseStack.cursorStartX=V,this._parseStack.cursorStartY=Y,this._parseStack.decodedLength=ne,this._parseStack.position=ie}_logSlowResolvingAsync(V){this._logService.logLevel<=I.LogLevelEnum.WARN&&Promise.race([V,new Promise((Y,ne)=>setTimeout(()=>ne("#SLOW_TIMEOUT"),5e3))]).catch(Y=>{if(Y!=="#SLOW_TIMEOUT")throw Y;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(V,Y){let ne,ie=this._activeBuffer.x,De=this._activeBuffer.y,$e=0,it=this._parseStack.paused;if(it){if(ne=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,Y))return this._logSlowResolvingAsync(ne),ne;ie=this._parseStack.cursorStartX,De=this._parseStack.cursorStartY,this._parseStack.paused=!1,V.length>pe&&($e=this._parseStack.position+pe)}if(this._logService.logLevel<=I.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof V=="string"?` "${V}"`:` "${Array.prototype.map.call(V,q=>String.fromCharCode(q)).join("")}"`),typeof V=="string"?V.split("").map(q=>q.charCodeAt(0)):V),this._parseBuffer.lengthpe)for(let q=$e;q0&&Ke.getWidth(this._activeBuffer.x-1)===2&&Ke.setCellFromCodepoint(this._activeBuffer.x-1,0,1,Oe);let Ct=this._parser.precedingJoinState;for(let Rt=Y;Rtet){if(Se){let Kr=Ke,An=this._activeBuffer.x-Eo;for(this._activeBuffer.x=Eo,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),Ke=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Eo>0&&Ke instanceof _.BufferLine&&Ke.copyCellsFrom(Kr,An,0,Eo,!1);An=0;)Ke.setCellFromCodepoint(this._activeBuffer.x++,0,0,Oe)}else if(q&&(Ke.insertCells(this._activeBuffer.x,De-Eo,this._activeBuffer.getNullCell(Oe)),Ke.getWidth(et-1)===2&&Ke.setCellFromCodepoint(et-1,S.NULL_CELL_CODE,S.NULL_CELL_WIDTH,Oe)),Ke.setCellFromCodepoint(this._activeBuffer.x++,ie,De,Oe),De>0)for(;--De;)Ke.setCellFromCodepoint(this._activeBuffer.x++,0,0,Oe)}this._parser.precedingJoinState=Ct,this._activeBuffer.x0&&Ke.getWidth(this._activeBuffer.x)===0&&!Ke.hasContent(this._activeBuffer.x)&&Ke.setCellFromCodepoint(this._activeBuffer.x,0,1,Oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(V,Y){return V.final!=="t"||V.prefix||V.intermediates?this._parser.registerCsiHandler(V,Y):this._parser.registerCsiHandler(V,ne=>!_e(ne.params[0],this._optionsService.rawOptions.windowOptions)||Y(ne))}registerDcsHandler(V,Y){return this._parser.registerDcsHandler(V,new T.DcsHandler(Y))}registerEscHandler(V,Y){return this._parser.registerEscHandler(V,Y)}registerOscHandler(V,Y){return this._parser.registerOscHandler(V,new N.OscHandler(Y))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);V.hasWidth(this._activeBuffer.x)&&!V.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let V=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-V),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(V=this._bufferService.cols-1){this._activeBuffer.x=Math.min(V,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(V,Y){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=V,this._activeBuffer.y=this._activeBuffer.scrollTop+Y):(this._activeBuffer.x=V,this._activeBuffer.y=Y),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(V,Y){this._restrictCursor(),this._setCursor(this._activeBuffer.x+V,this._activeBuffer.y+Y)}cursorUp(V){let Y=this._activeBuffer.y-this._activeBuffer.scrollTop;return Y>=0?this._moveCursor(0,-Math.min(Y,V.params[0]||1)):this._moveCursor(0,-(V.params[0]||1)),!0}cursorDown(V){let Y=this._activeBuffer.scrollBottom-this._activeBuffer.y;return Y>=0?this._moveCursor(0,Math.min(Y,V.params[0]||1)):this._moveCursor(0,V.params[0]||1),!0}cursorForward(V){return this._moveCursor(V.params[0]||1,0),!0}cursorBackward(V){return this._moveCursor(-(V.params[0]||1),0),!0}cursorNextLine(V){return this.cursorDown(V),this._activeBuffer.x=0,!0}cursorPrecedingLine(V){return this.cursorUp(V),this._activeBuffer.x=0,!0}cursorCharAbsolute(V){return this._setCursor((V.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(V){return this._setCursor(V.length>=2?(V.params[1]||1)-1:0,(V.params[0]||1)-1),!0}charPosAbsolute(V){return this._setCursor((V.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(V){return this._moveCursor(V.params[0]||1,0),!0}linePosAbsolute(V){return this._setCursor(this._activeBuffer.x,(V.params[0]||1)-1),!0}vPositionRelative(V){return this._moveCursor(0,V.params[0]||1),!0}hVPosition(V){return this.cursorPosition(V),!0}tabClear(V){let Y=V.params[0];return Y===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:Y===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(V){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let Y=V.params[0]||1;for(;Y--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(V){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let Y=V.params[0]||1;for(;Y--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(V){let Y=V.params[0];return Y===1&&(this._curAttrData.bg|=536870912),Y!==2&&Y!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(V,Y,ne,ie=!1,De=!1){let $e=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);$e.replaceCells(Y,ne,this._activeBuffer.getNullCell(this._eraseAttrData()),De),ie&&($e.isWrapped=!1)}_resetBufferLine(V,Y=!1){let ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);ne&&(ne.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),Y),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+V),ne.isWrapped=!1)}eraseInDisplay(V,Y=!1){let ne;switch(this._restrictCursor(this._bufferService.cols),V.params[0]){case 0:for(ne=this._activeBuffer.y,this._dirtyRowTracker.markDirty(ne),this._eraseInBufferLine(ne++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,Y);ne=this._bufferService.cols&&(this._activeBuffer.lines.get(ne+1).isWrapped=!1);ne--;)this._resetBufferLine(ne,Y);this._dirtyRowTracker.markDirty(0);break;case 2:for(ne=this._bufferService.rows,this._dirtyRowTracker.markDirty(ne-1);ne--;)this._resetBufferLine(ne,Y);this._dirtyRowTracker.markDirty(0);break;case 3:let ie=this._activeBuffer.lines.length-this._bufferService.rows;ie>0&&(this._activeBuffer.lines.trimStart(ie),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-ie,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-ie,0),this._onScroll.fire(0))}return!0}eraseInLine(V,Y=!1){switch(this._restrictCursor(this._bufferService.cols),V.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,Y);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,Y);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,Y)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(V){this._restrictCursor();let Y=V.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let Se=et;for(let q=1;q0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(p.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(p.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(V){return V.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(p.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(p.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(V.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(p.C0.ESC+"[>83;40003;0c")),!0}_is(V){return(this._optionsService.rawOptions.termName+"").indexOf(V)===0}setMode(V){for(let Y=0;YUo?1:2,Ct=V.params[0];return Rt=Ct,ni=Y?Ct===2?4:Ct===4?Ke($e.modes.insertMode):Ct===12?3:Ct===20?Ke(Oe.convertEol):0:Ct===1?Ke(ne.applicationCursorKeys):Ct===3?Oe.windowOptions.setWinLines?et===80?2:et===132?1:0:0:Ct===6?Ke(ne.origin):Ct===7?Ke(ne.wraparound):Ct===8?3:Ct===9?Ke(ie==="X10"):Ct===12?Ke(Oe.cursorBlink):Ct===25?Ke(!$e.isCursorHidden):Ct===45?Ke(ne.reverseWraparound):Ct===66?Ke(ne.applicationKeypad):Ct===67?4:Ct===1e3?Ke(ie==="VT200"):Ct===1002?Ke(ie==="DRAG"):Ct===1003?Ke(ie==="ANY"):Ct===1004?Ke(ne.sendFocus):Ct===1005?4:Ct===1006?Ke(De==="SGR"):Ct===1015?4:Ct===1016?Ke(De==="SGR_PIXELS"):Ct===1048?1:Ct===47||Ct===1047||Ct===1049?Ke(Se===q):Ct===2004?Ke(ne.bracketedPasteMode):0,$e.triggerDataEvent(`${p.C0.ESC}[${Y?"":"?"}${Rt};${ni}$y`),!0;var Rt,ni}_updateAttrColor(V,Y,ne,ie,De){return Y===2?(V|=50331648,V&=-16777216,V|=k.AttributeData.fromColorRGB([ne,ie,De])):Y===5&&(V&=-50331904,V|=33554432|255&ne),V}_extractColor(V,Y,ne){let ie=[0,0,-1,0,0,0],De=0,$e=0;do{if(ie[$e+De]=V.params[Y+$e],V.hasSubParams(Y+$e)){let it=V.getSubParams(Y+$e),et=0;do ie[1]===5&&(De=1),ie[$e+et+1+De]=it[et];while(++et=2||ie[1]===2&&$e+De>=5)break;ie[1]&&(De=1)}while(++$e+Y5)&&(V=1),Y.extended.underlineStyle=V,Y.fg|=268435456,V===0&&(Y.fg&=-268435457),Y.updateExtended()}_processSGR0(V){V.fg=_.DEFAULT_ATTR_DATA.fg,V.bg=_.DEFAULT_ATTR_DATA.bg,V.extended=V.extended.clone(),V.extended.underlineStyle=0,V.extended.underlineColor&=-67108864,V.updateExtended()}charAttributes(V){if(V.length===1&&V.params[0]===0)return this._processSGR0(this._curAttrData),!0;let Y=V.length,ne,ie=this._curAttrData;for(let De=0;De=30&&ne<=37?(ie.fg&=-50331904,ie.fg|=16777216|ne-30):ne>=40&&ne<=47?(ie.bg&=-50331904,ie.bg|=16777216|ne-40):ne>=90&&ne<=97?(ie.fg&=-50331904,ie.fg|=16777224|ne-90):ne>=100&&ne<=107?(ie.bg&=-50331904,ie.bg|=16777224|ne-100):ne===0?this._processSGR0(ie):ne===1?ie.fg|=134217728:ne===3?ie.bg|=67108864:ne===4?(ie.fg|=268435456,this._processUnderline(V.hasSubParams(De)?V.getSubParams(De)[0]:1,ie)):ne===5?ie.fg|=536870912:ne===7?ie.fg|=67108864:ne===8?ie.fg|=1073741824:ne===9?ie.fg|=2147483648:ne===2?ie.bg|=134217728:ne===21?this._processUnderline(2,ie):ne===22?(ie.fg&=-134217729,ie.bg&=-134217729):ne===23?ie.bg&=-67108865:ne===24?(ie.fg&=-268435457,this._processUnderline(0,ie)):ne===25?ie.fg&=-536870913:ne===27?ie.fg&=-67108865:ne===28?ie.fg&=-1073741825:ne===29?ie.fg&=2147483647:ne===39?(ie.fg&=-67108864,ie.fg|=16777215&_.DEFAULT_ATTR_DATA.fg):ne===49?(ie.bg&=-67108864,ie.bg|=16777215&_.DEFAULT_ATTR_DATA.bg):ne===38||ne===48||ne===58?De+=this._extractColor(V,De,ie):ne===53?ie.bg|=1073741824:ne===55?ie.bg&=-1073741825:ne===59?(ie.extended=ie.extended.clone(),ie.extended.underlineColor=-1,ie.updateExtended()):ne===100?(ie.fg&=-67108864,ie.fg|=16777215&_.DEFAULT_ATTR_DATA.fg,ie.bg&=-67108864,ie.bg|=16777215&_.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",ne);return!0}deviceStatus(V){switch(V.params[0]){case 5:this._coreService.triggerDataEvent(`${p.C0.ESC}[0n`);break;case 6:let Y=this._activeBuffer.y+1,ne=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${p.C0.ESC}[${Y};${ne}R`)}return!0}deviceStatusPrivate(V){if(V.params[0]===6){let Y=this._activeBuffer.y+1,ne=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${p.C0.ESC}[?${Y};${ne}R`)}return!0}softReset(V){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=_.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(V){let Y=V.params[0]||1;switch(Y){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}let ne=Y%2==1;return this._optionsService.options.cursorBlink=ne,!0}setScrollRegion(V){let Y=V.params[0]||1,ne;return(V.length<2||(ne=V.params[1])>this._bufferService.rows||ne===0)&&(ne=this._bufferService.rows),ne>Y&&(this._activeBuffer.scrollTop=Y-1,this._activeBuffer.scrollBottom=ne-1,this._setCursor(0,0)),!0}windowOptions(V){if(!_e(V.params[0],this._optionsService.rawOptions.windowOptions))return!0;let Y=V.length>1?V.params[1]:0;switch(V.params[0]){case 14:Y!==2&&this._onRequestWindowsOptionsReport.fire(G.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(G.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${p.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:Y!==0&&Y!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),Y!==0&&Y!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:Y!==0&&Y!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),Y!==0&&Y!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(V){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(V){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(V){return this._windowTitle=V,this._onTitleChange.fire(V),!0}setIconName(V){return this._iconName=V,!0}setOrReportIndexedColor(V){let Y=[],ne=V.split(";");for(;ne.length>1;){let ie=ne.shift(),De=ne.shift();if(/^\d+$/.exec(ie)){let $e=parseInt(ie);if(Ie($e))if(De==="?")Y.push({type:0,index:$e});else{let it=(0,R.parseColor)(De);it&&Y.push({type:1,index:$e,color:it})}}}return Y.length&&this._onColor.fire(Y),!0}setHyperlink(V){let Y=V.split(";");return!(Y.length<2)&&(Y[1]?this._createHyperlink(Y[0],Y[1]):!Y[0]&&this._finishHyperlink())}_createHyperlink(V,Y){this._getCurrentLinkId()&&this._finishHyperlink();let ne=V.split(":"),ie,De=ne.findIndex($e=>$e.startsWith("id="));return De!==-1&&(ie=ne[De].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:ie,uri:Y}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(V,Y){let ne=V.split(";");for(let ie=0;ie=this._specialColors.length);++ie,++Y)if(ne[ie]==="?")this._onColor.fire([{type:0,index:this._specialColors[Y]}]);else{let De=(0,R.parseColor)(ne[ie]);De&&this._onColor.fire([{type:1,index:this._specialColors[Y],color:De}])}return!0}setOrReportFgColor(V){return this._setOrReportSpecialColor(V,0)}setOrReportBgColor(V){return this._setOrReportSpecialColor(V,1)}setOrReportCursorColor(V){return this._setOrReportSpecialColor(V,2)}restoreIndexedColor(V){if(!V)return this._onColor.fire([{type:2}]),!0;let Y=[],ne=V.split(";");for(let ie=0;ie=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let V=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,V,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=_.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=_.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(V){return this._charsetService.setgLevel(V),!0}screenAlignmentPattern(){let V=new y.CellData;V.content=4194373,V.fg=this._curAttrData.fg,V.bg=this._curAttrData.bg,this._setCursor(0,0);for(let Y=0;Y(this._coreService.triggerDataEvent(`${p.C0.ESC}${De}${p.C0.ESC}\\`),!0))(V==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:V==='"p'?'P1$r61;1"p':V==="r"?`P1$r${ne.scrollTop+1};${ne.scrollBottom+1}r`:V==="m"?"P1$r0m":V===" q"?`P1$r${{block:2,underline:4,bar:6}[ie.cursorStyle]-(ie.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(V,Y){this._dirtyRowTracker.markRangeDirty(V,Y)}}r.InputHandler=ye;let ce=class{constructor(de){this._bufferService=de,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(de){dethis.end&&(this.end=de)}markRangeDirty(de,V){de>V&&(ue=de,de=V,V=ue),dethis.end&&(this.end=V)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Ie(de){return 0<=de&&de<256}ce=c([m(0,I.IBufferService)],ce)},844:(o,r)=>{function a(c){for(let m of c)m.dispose();c.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(let c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){let m=this._disposables.indexOf(c);m!==-1&&this._disposables.splice(m,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){this._isDisposed||c===this._value||(this._value?.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},r.toDisposable=function(c){return{dispose:c}},r.disposeArray=a,r.getDisposeArrayDisposable=function(c){return{dispose:()=>a(c)}}},1505:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(m,p,h){this._data[m]||(this._data[m]={}),this._data[m][p]=h}get(m,p){return this._data[m]?this._data[m][p]:void 0}clear(){this._data={}}}r.TwoKeyMap=a,r.FourKeyMap=class{constructor(){this._data=new a}set(c,m,p,h,g){this._data.get(c,m)||this._data.set(c,m,new a),this._data.get(c,m).set(p,h,g)}get(c,m,p,h){return this._data.get(c,m)?.get(p,h)}clear(){this._data.clear()}}},6114:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;let a=r.isNode?"node":navigator.userAgent,c=r.isNode?"node":navigator.platform;r.isFirefox=a.includes("Firefox"),r.isLegacyEdge=a.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(a),r.getSafariVersion=function(){if(!r.isSafari)return 0;let m=a.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),r.isIpad=c==="iPad",r.isIphone=c==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),r.isLinux=c.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(a)},6106:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let a=0;r.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(a=this._search(this._getKey(c)),this._array.splice(a,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;let m=this._getKey(c);if(m===void 0||(a=this._search(m),a===-1)||this._getKey(this._array[a])!==m)return!1;do if(this._array[a]===c)return this._array.splice(a,1),!0;while(++a=this._array.length)&&this._getKey(this._array[a])===c))do yield this._array[a];while(++a=this._array.length)&&this._getKey(this._array[a])===c))do m(this._array[a]);while(++a=m;){let h=m+p>>1,g=this._getKey(this._array[h]);if(g>c)p=h-1;else{if(!(g0&&this._getKey(this._array[h-1])===c;)h--;return h}m=h+1}}return m}}},7226:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;let c=a(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),this._start()}flush(){for(;this._iw)return _-M<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(_-M))}ms`),void this._start();_=w}this.clear()}}class p extends m{_requestCallback(g){return setTimeout(()=>g(this._createDeadline(16)))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){let M=Date.now()+g;return{timeRemaining:()=>Math.max(0,M-Date.now())}}}r.PriorityTaskQueue=p,r.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(h){return requestIdleCallback(h)}_cancelCallback(h){cancelIdleCallback(h)}}:p,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(h){this._queue.clear(),this._queue.enqueue(h)}flush(){this._queue.flush()}}},9282:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;let c=a(643);r.updateWindowsModeWrappedState=function(m){let p=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),h=p?.get(m.cols-1),g=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);g&&h&&(g.isWrapped=h[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&h[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(p){return[p>>>16&255,p>>>8&255,255&p]}static fromColorRGB(p){return(255&p[0])<<16|(255&p[1])<<8|255&p[2]}clone(){let p=new a;return p.fg=this.fg,p.bg=this.bg,p.extended=this.extended.clone(),p}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}r.AttributeData=a;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(p){this._ext=p}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(p){this._ext&=-469762049,this._ext|=p<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(p){this._ext&=-67108864,this._ext|=67108863&p}get urlId(){return this._urlId}set urlId(p){this._urlId=p}get underlineVariantOffset(){let p=(3758096384&this._ext)>>29;return p<0?4294967288^p:p}set underlineVariantOffset(p){this._ext&=536870911,this._ext|=p<<29&3758096384}constructor(p=0,h=0){this._ext=0,this._urlId=0,this._ext=p,this._urlId=h}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=c},9092:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;let c=a(6349),m=a(7226),p=a(3734),h=a(8437),g=a(4634),M=a(511),C=a(643),_=a(4863),w=a(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(S,y,k){this._hasScrollback=S,this._optionsService=y,this._bufferService=k,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=h.DEFAULT_ATTR_DATA.clone(),this.savedCharset=w.DEFAULT_CHARSET,this.markers=[],this._nullCell=M.CellData.fromCharData([0,C.NULL_CELL_CHAR,C.NULL_CELL_WIDTH,C.NULL_CELL_CODE]),this._whitespaceCell=M.CellData.fromCharData([0,C.WHITESPACE_CELL_CHAR,C.WHITESPACE_CELL_WIDTH,C.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(S){return S?(this._nullCell.fg=S.fg,this._nullCell.bg=S.bg,this._nullCell.extended=S.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new p.ExtendedAttrs),this._nullCell}getWhitespaceCell(S){return S?(this._whitespaceCell.fg=S.fg,this._whitespaceCell.bg=S.bg,this._whitespaceCell.extended=S.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new p.ExtendedAttrs),this._whitespaceCell}getBlankLine(S,y){return new h.BufferLine(this._bufferService.cols,this.getNullCell(S),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let S=this.ybase+this.y-this.ydisp;return S>=0&&Sr.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:y}fillViewportRows(S){if(this.lines.length===0){S===void 0&&(S=h.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(S))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(S,y){let k=this.getNullCell(h.DEFAULT_ATTR_DATA),I=0,E=this._getCorrectBufferLength(y);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+N+1?(this.ybase--,N++,this.ydisp>0&&this.ydisp--):this.lines.push(new h.BufferLine(S,k)));else for(let T=this._rows;T>y;T--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=E}this.x=Math.min(this.x,S-1),this.y=Math.min(this.y,y-1),N&&(this.y+=N),this.savedX=Math.min(this.savedX,S-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(S,y),this._cols>S))for(let N=0;N.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let S=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,S=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return S}get _isReflowEnabled(){let S=this._optionsService.rawOptions.windowsPty;return S&&S.buildNumber?this._hasScrollback&&S.backend==="conpty"&&S.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(S,y){this._cols!==S&&(S>this._cols?this._reflowLarger(S,y):this._reflowSmaller(S,y))}_reflowLarger(S,y){let k=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,S,this.ybase+this.y,this.getNullCell(h.DEFAULT_ATTR_DATA));if(k.length>0){let I=(0,g.reflowLargerCreateNewLayout)(this.lines,k);(0,g.reflowLargerApplyNewLayout)(this.lines,I.layout),this._reflowLargerAdjustViewport(S,y,I.countRemoved)}}_reflowLargerAdjustViewport(S,y,k){let I=this.getNullCell(h.DEFAULT_ATTR_DATA),E=k;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;N--){let T=this.lines.get(N);if(!T||!T.isWrapped&&T.getTrimmedLength()<=S)continue;let R=[T];for(;T.isWrapped&&N>0;)T=this.lines.get(--N),R.unshift(T);let W=this.ybase+this.y;if(W>=N&&W0&&(I.push({start:N+R.length+E,newLines:ye}),E+=ye.length),R.push(...ye);let ce=_e.length-1,Ie=_e[ce];Ie===0&&(ce--,Ie=_e[ce]);let de=R.length-G-1,V=pe;for(;de>=0;){let ne=Math.min(V,Ie);if(R[ce]===void 0)break;if(R[ce].copyCellsFrom(R[de],V-ne,Ie-ne,ne,!0),Ie-=ne,Ie===0&&(ce--,Ie=_e[ce]),V-=ne,V===0){de--;let ie=Math.max(de,0);V=(0,g.getWrappedLineTrimmedLength)(R,ie,this._cols)}}for(let ne=0;ne0;)this.ybase===0?this.y0){let N=[],T=[];for(let ce=0;ce=0;ce--)if(_e&&_e.start>W+G){for(let Ie=_e.newLines.length-1;Ie>=0;Ie--)this.lines.set(ce--,_e.newLines[Ie]);ce++,N.push({index:W+1,amount:_e.newLines.length}),G+=_e.newLines.length,_e=I[++pe]}else this.lines.set(ce,T[W--]);let ue=0;for(let ce=N.length-1;ce>=0;ce--)N[ce].index+=ue,this.lines.onInsertEmitter.fire(N[ce]),ue+=N[ce].amount;let ye=Math.max(0,R+E-this.lines.maxLength);ye>0&&this.lines.onTrimEmitter.fire(ye)}}translateBufferLineToString(S,y,k=0,I){let E=this.lines.get(S);return E?E.translateToString(y,k,I):""}getWrappedRangeForLine(S){let y=S,k=S;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;k+10;);return S>=this._cols?this._cols-1:S<0?0:S}nextStop(S){for(S==null&&(S=this.x);!this.tabs[++S]&&S=this._cols?this._cols-1:S<0?0:S}clearMarkers(S){this._isClearing=!0;for(let y=0;y{y.line-=k,y.line<0&&y.dispose()})),y.register(this.lines.onInsert(k=>{y.line>=k.index&&(y.line+=k.amount)})),y.register(this.lines.onDelete(k=>{y.line>=k.index&&y.linek.index&&(y.line-=k.amount)})),y.register(y.onDispose(()=>this._removeMarker(y))),y}_removeMarker(S){this._isClearing||this.markers.splice(this.markers.indexOf(S),1)}}},8437:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;let c=a(3734),m=a(511),p=a(643),h=a(482);r.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let g=0;class M{constructor(_,w,S=!1){this.isWrapped=S,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*_);let y=w||m.CellData.fromCharData([0,p.NULL_CELL_CHAR,p.NULL_CELL_WIDTH,p.NULL_CELL_CODE]);for(let k=0;k<_;++k)this.setCell(k,y);this.length=_}get(_){let w=this._data[3*_+0],S=2097151&w;return[this._data[3*_+1],2097152&w?this._combined[_]:S?(0,h.stringFromCodePoint)(S):"",w>>22,2097152&w?this._combined[_].charCodeAt(this._combined[_].length-1):S]}set(_,w){this._data[3*_+1]=w[p.CHAR_DATA_ATTR_INDEX],w[p.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[_]=w[1],this._data[3*_+0]=2097152|_|w[p.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*_+0]=w[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[p.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(_){return this._data[3*_+0]>>22}hasWidth(_){return 12582912&this._data[3*_+0]}getFg(_){return this._data[3*_+1]}getBg(_){return this._data[3*_+2]}hasContent(_){return 4194303&this._data[3*_+0]}getCodePoint(_){let w=this._data[3*_+0];return 2097152&w?this._combined[_].charCodeAt(this._combined[_].length-1):2097151&w}isCombined(_){return 2097152&this._data[3*_+0]}getString(_){let w=this._data[3*_+0];return 2097152&w?this._combined[_]:2097151&w?(0,h.stringFromCodePoint)(2097151&w):""}isProtected(_){return 536870912&this._data[3*_+2]}loadCell(_,w){return g=3*_,w.content=this._data[g+0],w.fg=this._data[g+1],w.bg=this._data[g+2],2097152&w.content&&(w.combinedData=this._combined[_]),268435456&w.bg&&(w.extended=this._extendedAttrs[_]),w}setCell(_,w){2097152&w.content&&(this._combined[_]=w.combinedData),268435456&w.bg&&(this._extendedAttrs[_]=w.extended),this._data[3*_+0]=w.content,this._data[3*_+1]=w.fg,this._data[3*_+2]=w.bg}setCellFromCodepoint(_,w,S,y){268435456&y.bg&&(this._extendedAttrs[_]=y.extended),this._data[3*_+0]=w|S<<22,this._data[3*_+1]=y.fg,this._data[3*_+2]=y.bg}addCodepointToCell(_,w,S){let y=this._data[3*_+0];2097152&y?this._combined[_]+=(0,h.stringFromCodePoint)(w):2097151&y?(this._combined[_]=(0,h.stringFromCodePoint)(2097151&y)+(0,h.stringFromCodePoint)(w),y&=-2097152,y|=2097152):y=w|4194304,S&&(y&=-12582913,y|=S<<22),this._data[3*_+0]=y}insertCells(_,w,S){if((_%=this.length)&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_-1,0,1,S),w=0;--k)this.setCell(_+w+k,this.loadCell(_+k,y));for(let k=0;kthis.length){if(this._data.buffer.byteLength>=4*S)this._data=new Uint32Array(this._data.buffer,0,S);else{let y=new Uint32Array(S);y.set(this._data),this._data=y}for(let y=this.length;y<_;++y)this.setCell(y,w)}else{this._data=this._data.subarray(0,S);let y=Object.keys(this._combined);for(let I=0;I=_&&delete this._combined[E]}let k=Object.keys(this._extendedAttrs);for(let I=0;I=_&&delete this._extendedAttrs[E]}}return this.length=_,4*S*2=0;--_)if(4194303&this._data[3*_+0])return _+(this._data[3*_+0]>>22);return 0}getNoBgTrimmedLength(){for(let _=this.length-1;_>=0;--_)if(4194303&this._data[3*_+0]||50331648&this._data[3*_+2])return _+(this._data[3*_+0]>>22);return 0}copyCellsFrom(_,w,S,y,k){let I=_._data;if(k)for(let N=y-1;N>=0;N--){for(let T=0;T<3;T++)this._data[3*(S+N)+T]=I[3*(w+N)+T];268435456&I[3*(w+N)+2]&&(this._extendedAttrs[S+N]=_._extendedAttrs[w+N])}else for(let N=0;N=w&&(this._combined[T-w+S]=_._combined[T])}}translateToString(_,w,S,y){w=w??0,S=S??this.length,_&&(S=Math.min(S,this.getTrimmedLength())),y&&(y.length=0);let k="";for(;w>22||1}return y&&y.push(w),k}}r.BufferLine=M},4841:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(a,c){if(a.start.y>a.end.y)throw new Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);return c*(a.end.y-a.start.y)+(a.end.x-a.start.x+1)}},4634:(o,r)=>{function a(c,m,p){if(m===c.length-1)return c[m].getTrimmedLength();let h=!c[m].hasContent(p-1)&&c[m].getWidth(p-1)===1,g=c[m+1].getWidth(0)===2;return h&&g?p-1:p}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(c,m,p,h,g){let M=[];for(let C=0;C=C&&h<_){C+=S.length-1;continue}let y=0,k=a(S,y,m),I=1,E=0;for(;I0&&(T>y||S[T].getTrimmedLength()===0);T--)N++;N>0&&(M.push(C+S.length-N),M.push(N)),C+=S.length-1}return M},r.reflowLargerCreateNewLayout=function(c,m){let p=[],h=0,g=m[h],M=0;for(let C=0;Ca(c,S,m)).reduce((w,S)=>w+S),M=0,C=0,_=0;for(;_w&&(M-=w,C++);let S=c[C].getWidth(M-1)===2;S&&M--;let y=S?p-1:p;h.push(y),_+=y}return h},r.getWrappedLineTrimmedLength=a},5295:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;let c=a(8460),m=a(844),p=a(9092);class h extends m.Disposable{constructor(M,C){super(),this._optionsService=M,this._bufferService=C,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new p.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new p.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(M){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(M),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(M,C){this._normal.resize(M,C),this._alt.resize(M,C),this.setupTabStops(M)}setupTabStops(M){this._normal.setupTabStops(M),this._alt.setupTabStops(M)}}r.BufferSet=h},511:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;let c=a(482),m=a(643),p=a(3734);class h extends p.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new p.ExtendedAttrs,this.combinedData=""}static fromCharData(M){let C=new h;return C.setFromCharData(M),C}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(M){this.fg=M[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let C=!1;if(M[m.CHAR_DATA_CHAR_INDEX].length>2)C=!0;else if(M[m.CHAR_DATA_CHAR_INDEX].length===2){let _=M[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=_&&_<=56319){let w=M[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=w&&w<=57343?this.content=1024*(_-55296)+w-56320+65536|M[m.CHAR_DATA_WIDTH_INDEX]<<22:C=!0}else C=!0}else this.content=M[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|M[m.CHAR_DATA_WIDTH_INDEX]<<22;C&&(this.combinedData=M[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|M[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=h},643:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;let c=a(8460),m=a(844);class p{get id(){return this._id}constructor(g){this.line=g,this.isDisposed=!1,this._disposables=[],this._id=p._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(g){return this._disposables.push(g),g}}r.Marker=p,p._nextId=1},7116:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},r.CHARSETS.A={"#":"\xA3"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},r.CHARSETS.C=r.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},r.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},r.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},r.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},r.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},r.CHARSETS.E=r.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},r.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},r.CHARSETS.H=r.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},r.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(o,r)=>{var a,c,m;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,(function(p){p.NUL="\0",p.SOH="",p.STX="",p.ETX="",p.EOT="",p.ENQ="",p.ACK="",p.BEL="\x07",p.BS="\b",p.HT=" ",p.LF=` `,p.VT="\v",p.FF="\f",p.CR="\r",p.SO="",p.SI="",p.DLE="",p.DC1="",p.DC2="",p.DC3="",p.DC4="",p.NAK="",p.SYN="",p.ETB="",p.CAN="",p.EM="",p.SUB="",p.ESC="\x1B",p.FS="",p.GS="",p.RS="",p.US="",p.SP=" ",p.DEL="\x7F"})(a||(r.C0=a={})),(function(p){p.PAD="\x80",p.HOP="\x81",p.BPH="\x82",p.NBH="\x83",p.IND="\x84",p.NEL="\x85",p.SSA="\x86",p.ESA="\x87",p.HTS="\x88",p.HTJ="\x89",p.VTS="\x8A",p.PLD="\x8B",p.PLU="\x8C",p.RI="\x8D",p.SS2="\x8E",p.SS3="\x8F",p.DCS="\x90",p.PU1="\x91",p.PU2="\x92",p.STS="\x93",p.CCH="\x94",p.MW="\x95",p.SPA="\x96",p.EPA="\x97",p.SOS="\x98",p.SGCI="\x99",p.SCI="\x9A",p.CSI="\x9B",p.ST="\x9C",p.OSC="\x9D",p.PM="\x9E",p.APC="\x9F"})(c||(r.C1=c={})),(function(p){p.ST=`${a.ESC}\\`})(m||(r.C1_ESCAPED=m={}))},7399:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;let c=a(2584),m={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};r.evaluateKeyboardEvent=function(p,h,g,M){let C={type:0,cancel:!1,key:void 0},_=(p.shiftKey?1:0)|(p.altKey?2:0)|(p.ctrlKey?4:0)|(p.metaKey?8:0);switch(p.keyCode){case 0:p.key==="UIKeyInputUpArrow"?C.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A":p.key==="UIKeyInputLeftArrow"?C.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D":p.key==="UIKeyInputRightArrow"?C.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C":p.key==="UIKeyInputDownArrow"&&(C.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:C.key=p.ctrlKey?"\b":c.C0.DEL,p.altKey&&(C.key=c.C0.ESC+C.key);break;case 9:if(p.shiftKey){C.key=c.C0.ESC+"[Z";break}C.key=c.C0.HT,C.cancel=!0;break;case 13:C.key=p.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,C.cancel=!0;break;case 27:C.key=c.C0.ESC,p.altKey&&(C.key=c.C0.ESC+c.C0.ESC),C.cancel=!0;break;case 37:if(p.metaKey)break;_?(C.key=c.C0.ESC+"[1;"+(_+1)+"D",C.key===c.C0.ESC+"[1;3D"&&(C.key=c.C0.ESC+(g?"b":"[1;5D"))):C.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(p.metaKey)break;_?(C.key=c.C0.ESC+"[1;"+(_+1)+"C",C.key===c.C0.ESC+"[1;3C"&&(C.key=c.C0.ESC+(g?"f":"[1;5C"))):C.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(p.metaKey)break;_?(C.key=c.C0.ESC+"[1;"+(_+1)+"A",g||C.key!==c.C0.ESC+"[1;3A"||(C.key=c.C0.ESC+"[1;5A")):C.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(p.metaKey)break;_?(C.key=c.C0.ESC+"[1;"+(_+1)+"B",g||C.key!==c.C0.ESC+"[1;3B"||(C.key=c.C0.ESC+"[1;5B")):C.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:p.shiftKey||p.ctrlKey||(C.key=c.C0.ESC+"[2~");break;case 46:C.key=_?c.C0.ESC+"[3;"+(_+1)+"~":c.C0.ESC+"[3~";break;case 36:C.key=_?c.C0.ESC+"[1;"+(_+1)+"H":h?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:C.key=_?c.C0.ESC+"[1;"+(_+1)+"F":h?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:p.shiftKey?C.type=2:p.ctrlKey?C.key=c.C0.ESC+"[5;"+(_+1)+"~":C.key=c.C0.ESC+"[5~";break;case 34:p.shiftKey?C.type=3:p.ctrlKey?C.key=c.C0.ESC+"[6;"+(_+1)+"~":C.key=c.C0.ESC+"[6~";break;case 112:C.key=_?c.C0.ESC+"[1;"+(_+1)+"P":c.C0.ESC+"OP";break;case 113:C.key=_?c.C0.ESC+"[1;"+(_+1)+"Q":c.C0.ESC+"OQ";break;case 114:C.key=_?c.C0.ESC+"[1;"+(_+1)+"R":c.C0.ESC+"OR";break;case 115:C.key=_?c.C0.ESC+"[1;"+(_+1)+"S":c.C0.ESC+"OS";break;case 116:C.key=_?c.C0.ESC+"[15;"+(_+1)+"~":c.C0.ESC+"[15~";break;case 117:C.key=_?c.C0.ESC+"[17;"+(_+1)+"~":c.C0.ESC+"[17~";break;case 118:C.key=_?c.C0.ESC+"[18;"+(_+1)+"~":c.C0.ESC+"[18~";break;case 119:C.key=_?c.C0.ESC+"[19;"+(_+1)+"~":c.C0.ESC+"[19~";break;case 120:C.key=_?c.C0.ESC+"[20;"+(_+1)+"~":c.C0.ESC+"[20~";break;case 121:C.key=_?c.C0.ESC+"[21;"+(_+1)+"~":c.C0.ESC+"[21~";break;case 122:C.key=_?c.C0.ESC+"[23;"+(_+1)+"~":c.C0.ESC+"[23~";break;case 123:C.key=_?c.C0.ESC+"[24;"+(_+1)+"~":c.C0.ESC+"[24~";break;default:if(!p.ctrlKey||p.shiftKey||p.altKey||p.metaKey)if(g&&!M||!p.altKey||p.metaKey)!g||p.altKey||p.ctrlKey||p.shiftKey||!p.metaKey?p.key&&!p.ctrlKey&&!p.altKey&&!p.metaKey&&p.keyCode>=48&&p.key.length===1?C.key=p.key:p.key&&p.ctrlKey&&(p.key==="_"&&(C.key=c.C0.US),p.key==="@"&&(C.key=c.C0.NUL)):p.keyCode===65&&(C.type=1);else{let w=m[p.keyCode],S=w?.[p.shiftKey?1:0];if(S)C.key=c.C0.ESC+S;else if(p.keyCode>=65&&p.keyCode<=90){let y=p.ctrlKey?p.keyCode-64:p.keyCode+32,k=String.fromCharCode(y);p.shiftKey&&(k=k.toUpperCase()),C.key=c.C0.ESC+k}else if(p.keyCode===32)C.key=c.C0.ESC+(p.ctrlKey?c.C0.NUL:" ");else if(p.key==="Dead"&&p.code.startsWith("Key")){let y=p.code.slice(3,4);p.shiftKey||(y=y.toLowerCase()),C.key=c.C0.ESC+y,C.cancel=!0}}else p.keyCode>=65&&p.keyCode<=90?C.key=String.fromCharCode(p.keyCode-64):p.keyCode===32?C.key=c.C0.NUL:p.keyCode>=51&&p.keyCode<=55?C.key=String.fromCharCode(p.keyCode-51+27):p.keyCode===56?C.key=c.C0.DEL:p.keyCode===219?C.key=c.C0.ESC:p.keyCode===220?C.key=c.C0.FS:p.keyCode===221&&(C.key=c.C0.GS)}return C}},482:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},r.utf32ToString=function(a,c=0,m=a.length){let p="";for(let h=c;h65535?(g-=65536,p+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):p+=String.fromCharCode(g)}return p},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,c){let m=a.length;if(!m)return 0;let p=0,h=0;if(this._interim){let g=a.charCodeAt(h++);56320<=g&&g<=57343?c[p++]=1024*(this._interim-55296)+g-56320+65536:(c[p++]=this._interim,c[p++]=g),this._interim=0}for(let g=h;g=m)return this._interim=M,p;let C=a.charCodeAt(g);56320<=C&&C<=57343?c[p++]=1024*(M-55296)+C-56320+65536:(c[p++]=M,c[p++]=C)}else M!==65279&&(c[p++]=M)}return p}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,c){let m=a.length;if(!m)return 0;let p,h,g,M,C=0,_=0,w=0;if(this.interim[0]){let k=!1,I=this.interim[0];I&=(224&I)==192?31:(240&I)==224?15:7;let E,N=0;for(;(E=63&this.interim[++N])&&N<4;)I<<=6,I|=E;let T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=T-N;for(;w=m)return 0;if(E=a[w++],(192&E)!=128){w--,k=!0;break}this.interim[N++]=E,I<<=6,I|=63&E}k||(T===2?I<128?w--:c[C++]=I:T===3?I<2048||I>=55296&&I<=57343||I===65279||(c[C++]=I):I<65536||I>1114111||(c[C++]=I)),this.interim.fill(0)}let S=m-4,y=w;for(;y=m)return this.interim[0]=p,C;if(h=a[y++],(192&h)!=128){y--;continue}if(_=(31&p)<<6|63&h,_<128){y--;continue}c[C++]=_}else if((240&p)==224){if(y>=m)return this.interim[0]=p,C;if(h=a[y++],(192&h)!=128){y--;continue}if(y>=m)return this.interim[0]=p,this.interim[1]=h,C;if(g=a[y++],(192&g)!=128){y--;continue}if(_=(15&p)<<12|(63&h)<<6|63&g,_<2048||_>=55296&&_<=57343||_===65279)continue;c[C++]=_}else if((248&p)==240){if(y>=m)return this.interim[0]=p,C;if(h=a[y++],(192&h)!=128){y--;continue}if(y>=m)return this.interim[0]=p,this.interim[1]=h,C;if(g=a[y++],(192&g)!=128){y--;continue}if(y>=m)return this.interim[0]=p,this.interim[1]=h,this.interim[2]=g,C;if(M=a[y++],(192&M)!=128){y--;continue}if(_=(7&p)<<18|(63&h)<<12|(63&g)<<6|63&M,_<65536||_>1114111)continue;c[C++]=_}}return C}}},225:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;let c=a(1480),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],p=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],h;r.UnicodeV6=class{constructor(){if(this.version="6",!h){h=new Uint8Array(65536),h.fill(1),h[0]=0,h.fill(0,1,32),h.fill(0,127,160),h.fill(2,4352,4448),h[9001]=2,h[9002]=2,h.fill(2,11904,42192),h[12351]=1,h.fill(2,44032,55204),h.fill(2,63744,64256),h.fill(2,65040,65050),h.fill(2,65072,65136),h.fill(2,65280,65377),h.fill(2,65504,65511);for(let g=0;gC[S][1])return!1;for(;S>=w;)if(_=w+S>>1,M>C[_][1])w=_+1;else{if(!(M=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,M){let C=this.wcwidth(g),_=C===0&&M!==0;if(_){let w=c.UnicodeService.extractWidth(M);w===0?_=!1:w>C&&(C=w)}return c.UnicodeService.createPropertyValue(0,C,_)}}},5981:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;let c=a(8460),m=a(844);class p extends m.Disposable{constructor(g){super(),this._action=g,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(g,M){if(M!==void 0&&this._syncCalls>M)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let C;for(this._isSyncWriting=!0;C=this._writeBuffer.shift();){this._action(C);let _=this._callbacks.shift();_&&_()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(g,M){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(M),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(M)}_innerWrite(g=0,M=!0){let C=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){let _=this._writeBuffer[this._bufferOffset],w=this._action(_,M);if(w){let y=k=>Date.now()-C>=12?setTimeout(()=>this._innerWrite(0,k)):this._innerWrite(C,k);return void w.catch(k=>(queueMicrotask(()=>{throw k}),Promise.resolve(!1))).then(y)}let S=this._callbacks[this._bufferOffset];if(S&&S(),this._bufferOffset++,this._pendingData-=_.length,Date.now()-C>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}r.WriteBuffer=p},5941:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;let a=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function m(p,h){let g=p.toString(16),M=g.length<2?"0"+g:g;switch(h){case 4:return g[0];case 8:return M;case 12:return(M+M).slice(0,3);default:return M+M}}r.parseColor=function(p){if(!p)return;let h=p.toLowerCase();if(h.indexOf("rgb:")===0){h=h.slice(4);let g=a.exec(h);if(g){let M=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/M*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/M*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/M*255)]}}else if(h.indexOf("#")===0&&(h=h.slice(1),c.exec(h)&&[3,6,9,12].includes(h.length))){let g=h.length/3,M=[0,0,0];for(let C=0;C<3;++C){let _=parseInt(h.slice(g*C,g*C+g),16);M[C]=g===1?_<<4:g===2?_:g===3?_>>4:_>>8}return M}},r.toRgbString=function(p,h=16){let[g,M,C]=p;return`rgb:${m(g,h)}/${m(M,h)}/${m(C,h)}`}},5770:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;let c=a(482),m=a(8742),p=a(5770),h=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=h,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}registerHandler(M,C){this._handlers[M]===void 0&&(this._handlers[M]=[]);let _=this._handlers[M];return _.push(C),{dispose:()=>{let w=_.indexOf(C);w!==-1&&_.splice(w,1)}}}clearHandler(M){this._handlers[M]&&delete this._handlers[M]}setHandlerFallback(M){this._handlerFb=M}reset(){if(this._active.length)for(let M=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;M>=0;--M)this._active[M].unhook(!1);this._stack.paused=!1,this._active=h,this._ident=0}hook(M,C){if(this.reset(),this._ident=M,this._active=this._handlers[M]||h,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].hook(C);else this._handlerFb(this._ident,"HOOK",C)}put(M,C,_){if(this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].put(M,C,_);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(M,C,_))}unhook(M,C=!0){if(this._active.length){let _=!1,w=this._active.length-1,S=!1;if(this._stack.paused&&(w=this._stack.loopPosition-1,_=C,S=this._stack.fallThrough,this._stack.paused=!1),!S&&_===!1){for(;w>=0&&(_=this._active[w].unhook(M),_!==!0);w--)if(_ instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!1,_;w--}for(;w>=0;w--)if(_=this._active[w].unhook(!1),_ instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!0,_}else this._handlerFb(this._ident,"UNHOOK",M);this._active=h,this._ident=0}};let g=new m.Params;g.addParam(0),r.DcsHandler=class{constructor(M){this._handler=M,this._data="",this._params=g,this._hitLimit=!1}hook(M){this._params=M.length>1||M.params[0]?M.clone():g,this._data="",this._hitLimit=!1}put(M,C,_){this._hitLimit||(this._data+=(0,c.utf32ToString)(M,C,_),this._data.length>p.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(M){let C=!1;if(this._hitLimit)C=!1;else if(M&&(C=this._handler(this._data,this._params),C instanceof Promise))return C.then(_=>(this._params=g,this._data="",this._hitLimit=!1,_));return this._params=g,this._data="",this._hitLimit=!1,C}}},2015:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;let c=a(844),m=a(8742),p=a(6242),h=a(6351);class g{constructor(w){this.table=new Uint8Array(w)}setDefault(w,S){this.table.fill(w<<4|S)}add(w,S,y,k){this.table[S<<8|w]=y<<4|k}addMany(w,S,y,k){for(let I=0;IT),S=(N,T)=>w.slice(N,T),y=S(32,127),k=S(0,24);k.push(25),k.push.apply(k,S(28,32));let I=S(0,14),E;for(E in _.setDefault(1,0),_.addMany(y,0,2,0),I)_.addMany([24,26,153,154],E,3,0),_.addMany(S(128,144),E,3,0),_.addMany(S(144,152),E,3,0),_.add(156,E,0,0),_.add(27,E,11,1),_.add(157,E,4,8),_.addMany([152,158,159],E,0,7),_.add(155,E,11,3),_.add(144,E,11,9);return _.addMany(k,0,3,0),_.addMany(k,1,3,1),_.add(127,1,0,1),_.addMany(k,8,0,8),_.addMany(k,3,3,3),_.add(127,3,0,3),_.addMany(k,4,3,4),_.add(127,4,0,4),_.addMany(k,6,3,6),_.addMany(k,5,3,5),_.add(127,5,0,5),_.addMany(k,2,3,2),_.add(127,2,0,2),_.add(93,1,4,8),_.addMany(y,8,5,8),_.add(127,8,5,8),_.addMany([156,27,24,26,7],8,6,0),_.addMany(S(28,32),8,0,8),_.addMany([88,94,95],1,0,7),_.addMany(y,7,0,7),_.addMany(k,7,0,7),_.add(156,7,0,0),_.add(127,7,0,7),_.add(91,1,11,3),_.addMany(S(64,127),3,7,0),_.addMany(S(48,60),3,8,4),_.addMany([60,61,62,63],3,9,4),_.addMany(S(48,60),4,8,4),_.addMany(S(64,127),4,7,0),_.addMany([60,61,62,63],4,0,6),_.addMany(S(32,64),6,0,6),_.add(127,6,0,6),_.addMany(S(64,127),6,0,0),_.addMany(S(32,48),3,9,5),_.addMany(S(32,48),5,9,5),_.addMany(S(48,64),5,0,6),_.addMany(S(64,127),5,7,0),_.addMany(S(32,48),4,9,5),_.addMany(S(32,48),1,9,2),_.addMany(S(32,48),2,9,2),_.addMany(S(48,127),2,10,0),_.addMany(S(48,80),1,10,0),_.addMany(S(81,88),1,10,0),_.addMany([89,90,92],1,10,0),_.addMany(S(96,127),1,10,0),_.add(80,1,11,9),_.addMany(k,9,0,9),_.add(127,9,0,9),_.addMany(S(28,32),9,0,9),_.addMany(S(32,48),9,9,12),_.addMany(S(48,60),9,8,10),_.addMany([60,61,62,63],9,9,10),_.addMany(k,11,0,11),_.addMany(S(32,128),11,0,11),_.addMany(S(28,32),11,0,11),_.addMany(k,10,0,10),_.add(127,10,0,10),_.addMany(S(28,32),10,0,10),_.addMany(S(48,60),10,8,10),_.addMany([60,61,62,63],10,0,11),_.addMany(S(32,48),10,9,12),_.addMany(k,12,0,12),_.add(127,12,0,12),_.addMany(S(28,32),12,0,12),_.addMany(S(32,48),12,9,12),_.addMany(S(48,64),12,0,11),_.addMany(S(64,127),12,12,13),_.addMany(S(64,127),10,12,13),_.addMany(S(64,127),9,12,13),_.addMany(k,13,13,13),_.addMany(y,13,13,13),_.add(127,13,0,13),_.addMany([27,156,24,26],13,14,0),_.add(M,0,2,0),_.add(M,8,5,8),_.add(M,6,0,6),_.add(M,11,0,11),_.add(M,13,13,13),_})();class C extends c.Disposable{constructor(w=r.VT500_TRANSITION_TABLE){super(),this._transitions=w,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(S,y,k)=>{},this._executeHandlerFb=S=>{},this._csiHandlerFb=(S,y)=>{},this._escHandlerFb=S=>{},this._errorHandlerFb=S=>S,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new p.OscParser),this._dcsParser=this.register(new h.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(w,S=[64,126]){let y=0;if(w.prefix){if(w.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=w.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(w.intermediates){if(w.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let I=0;IE||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=E}}if(w.final.length!==1)throw new Error("final must be a single byte");let k=w.final.charCodeAt(0);if(S[0]>k||k>S[1])throw new Error(`final must be in range ${S[0]} .. ${S[1]}`);return y<<=8,y|=k,y}identToString(w){let S=[];for(;w;)S.push(String.fromCharCode(255&w)),w>>=8;return S.reverse().join("")}setPrintHandler(w){this._printHandler=w}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(w,S){let y=this._identifier(w,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);let k=this._escHandlers[y];return k.push(S),{dispose:()=>{let I=k.indexOf(S);I!==-1&&k.splice(I,1)}}}clearEscHandler(w){this._escHandlers[this._identifier(w,[48,126])]&&delete this._escHandlers[this._identifier(w,[48,126])]}setEscHandlerFallback(w){this._escHandlerFb=w}setExecuteHandler(w,S){this._executeHandlers[w.charCodeAt(0)]=S}clearExecuteHandler(w){this._executeHandlers[w.charCodeAt(0)]&&delete this._executeHandlers[w.charCodeAt(0)]}setExecuteHandlerFallback(w){this._executeHandlerFb=w}registerCsiHandler(w,S){let y=this._identifier(w);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);let k=this._csiHandlers[y];return k.push(S),{dispose:()=>{let I=k.indexOf(S);I!==-1&&k.splice(I,1)}}}clearCsiHandler(w){this._csiHandlers[this._identifier(w)]&&delete this._csiHandlers[this._identifier(w)]}setCsiHandlerFallback(w){this._csiHandlerFb=w}registerDcsHandler(w,S){return this._dcsParser.registerHandler(this._identifier(w),S)}clearDcsHandler(w){this._dcsParser.clearHandler(this._identifier(w))}setDcsHandlerFallback(w){this._dcsParser.setHandlerFallback(w)}registerOscHandler(w,S){return this._oscParser.registerHandler(w,S)}clearOscHandler(w){this._oscParser.clearHandler(w)}setOscHandlerFallback(w){this._oscParser.setHandlerFallback(w)}setErrorHandler(w){this._errorHandler=w}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(w,S,y,k,I){this._parseStack.state=w,this._parseStack.handlers=S,this._parseStack.handlerPos=y,this._parseStack.transition=k,this._parseStack.chunkPos=I}parse(w,S,y){let k,I=0,E=0,N=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,N=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let T=this._parseStack.handlers,R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&R>-1){for(;R>=0&&(k=T[R](this._params),k!==!0);R--)if(k instanceof Promise)return this._parseStack.handlerPos=R,k}this._parseStack.handlers=[];break;case 4:if(y===!1&&R>-1){for(;R>=0&&(k=T[R](),k!==!0);R--)if(k instanceof Promise)return this._parseStack.handlerPos=R,k}this._parseStack.handlers=[];break;case 6:if(I=w[this._parseStack.chunkPos],k=this._dcsParser.unhook(I!==24&&I!==26,y),k)return k;I===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(I=w[this._parseStack.chunkPos],k=this._oscParser.end(I!==24&&I!==26,y),k)return k;I===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,N=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=N;T>4){case 2:for(let G=T+1;;++G){if(G>=S||(I=w[G])<32||I>126&&I=S||(I=w[G])<32||I>126&&I=S||(I=w[G])<32||I>126&&I=S||(I=w[G])<32||I>126&&I=0&&(k=R[W](this._params),k!==!0);W--)if(k instanceof Promise)return this._preserveStack(3,R,W,E,T),k;W<0&&this._csiHandlerFb(this._collect<<8|I,this._params),this.precedingJoinState=0;break;case 8:do switch(I){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(I-48)}while(++T47&&I<60);T--;break;case 9:this._collect<<=8,this._collect|=I;break;case 10:let pe=this._escHandlers[this._collect<<8|I],_e=pe?pe.length-1:-1;for(;_e>=0&&(k=pe[_e](),k!==!0);_e--)if(k instanceof Promise)return this._preserveStack(4,pe,_e,E,T),k;_e<0&&this._escHandlerFb(this._collect<<8|I),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|I,this._params);break;case 13:for(let G=T+1;;++G)if(G>=S||(I=w[G])===24||I===26||I===27||I>127&&I=S||(I=w[G])<32||I>127&&I{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;let c=a(5770),m=a(482),p=[];r.OscParser=class{constructor(){this._state=0,this._active=p,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(h,g){this._handlers[h]===void 0&&(this._handlers[h]=[]);let M=this._handlers[h];return M.push(g),{dispose:()=>{let C=M.indexOf(g);C!==-1&&M.splice(C,1)}}}clearHandler(h){this._handlers[h]&&delete this._handlers[h]}setHandlerFallback(h){this._handlerFb=h}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}reset(){if(this._state===2)for(let h=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;h>=0;--h)this._active[h].end(!1);this._stack.paused=!1,this._active=p,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||p,this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].start();else this._handlerFb(this._id,"START")}_put(h,g,M){if(this._active.length)for(let C=this._active.length-1;C>=0;C--)this._active[C].put(h,g,M);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(h,g,M))}start(){this.reset(),this._state=1}put(h,g,M){if(this._state!==3){if(this._state===1)for(;g0&&this._put(h,g,M)}}end(h,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let M=!1,C=this._active.length-1,_=!1;if(this._stack.paused&&(C=this._stack.loopPosition-1,M=g,_=this._stack.fallThrough,this._stack.paused=!1),!_&&M===!1){for(;C>=0&&(M=this._active[C].end(h),M!==!0);C--)if(M instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=C,this._stack.fallThrough=!1,M;C--}for(;C>=0;C--)if(M=this._active[C].end(!1),M instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=C,this._stack.fallThrough=!0,M}else this._handlerFb(this._id,"END",h);this._active=p,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(h){this._handler=h,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(h,g,M){this._hitLimit||(this._data+=(0,m.utf32ToString)(h,g,M),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(h){let g=!1;if(this._hitLimit)g=!1;else if(h&&(g=this._handler(this._data),g instanceof Promise))return g.then(M=>(this._data="",this._hitLimit=!1,M));return this._data="",this._hitLimit=!1,g}}},8742:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;let a=2147483647;class c{static fromArray(p){let h=new c;if(!p.length)return h;for(let g=Array.isArray(p[0])?1:0;g256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(p),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(p),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){let p=new c(this.maxLength,this.maxSubParamsLength);return p.params.set(this.params),p.length=this.length,p._subParams.set(this._subParams),p._subParamsLength=this._subParamsLength,p._subParamsIdx.set(this._subParamsIdx),p._rejectDigits=this._rejectDigits,p._rejectSubDigits=this._rejectSubDigits,p._digitIsSub=this._digitIsSub,p}toArray(){let p=[];for(let h=0;h>8,M=255&this._subParamsIdx[h];M-g>0&&p.push(Array.prototype.slice.call(this._subParams,g,M))}return p}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(p){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(p<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=p>a?a:p}}addSubParam(p){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(p<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=p>a?a:p,this._subParamsIdx[this.length-1]++}}hasSubParams(p){return(255&this._subParamsIdx[p])-(this._subParamsIdx[p]>>8)>0}getSubParams(p){let h=this._subParamsIdx[p]>>8,g=255&this._subParamsIdx[p];return g-h>0?this._subParams.subarray(h,g):null}getSubParamsAll(){let p={};for(let h=0;h>8,M=255&this._subParamsIdx[h];M-g>0&&(p[h]=this._subParams.slice(g,M))}return p}addDigit(p){let h;if(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let g=this._digitIsSub?this._subParams:this.params,M=g[h-1];g[h-1]=~M?Math.min(10*M+p,a):p}}r.Params=c},5741:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let a=this._addons.length-1;a>=0;a--)this._addons[a].instance.dispose()}loadAddon(a,c){let m={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(m),c.dispose=()=>this._wrappedAddonDispose(m),c.activate(a)}_wrappedAddonDispose(a){if(a.isDisposed)return;let c=-1;for(let m=0;m{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;let c=a(3785),m=a(511);r.BufferApiView=class{constructor(p,h){this._buffer=p,this.type=h}init(p){return this._buffer=p,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(p){let h=this._buffer.lines.get(p);if(h)return new c.BufferLineApiView(h)}getNullCell(){return new m.CellData}}},3785:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;let c=a(511);r.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,p){if(!(m<0||m>=this._line.length))return p?(this._line.loadCell(m,p),p):this._line.loadCell(m,new c.CellData)}translateToString(m,p,h){return this._line.translateToString(m,p,h)}}},8285:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;let c=a(8771),m=a(8460),p=a(844);class h extends p.Disposable{constructor(M){super(),this._core=M,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}r.BufferNamespaceApi=h},7975:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(a){this._core=a}registerCsiHandler(a,c){return this._core.registerCsiHandler(a,m=>c(m.toArray()))}addCsiHandler(a,c){return this.registerCsiHandler(a,c)}registerDcsHandler(a,c){return this._core.registerDcsHandler(a,(m,p)=>c(m,p.toArray()))}addDcsHandler(a,c){return this.registerDcsHandler(a,c)}registerEscHandler(a,c){return this._core.registerEscHandler(a,c)}addEscHandler(a,c){return this.registerEscHandler(a,c)}registerOscHandler(a,c){return this._core.registerOscHandler(a,c)}addOscHandler(a,c){return this.registerOscHandler(a,c)}}},7090:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(a){this._core=a}register(a){this._core.unicodeService.register(a)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(a){this._core.unicodeService.activeVersion=a}}},744:function(o,r,a){var c=this&&this.__decorate||function(_,w,S,y){var k,I=arguments.length,E=I<3?w:y===null?y=Object.getOwnPropertyDescriptor(w,S):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(_,w,S,y);else for(var N=_.length-1;N>=0;N--)(k=_[N])&&(E=(I<3?k(E):I>3?k(w,S,E):k(w,S))||E);return I>3&&E&&Object.defineProperty(w,S,E),E},m=this&&this.__param||function(_,w){return function(S,y){w(S,y,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;let p=a(8460),h=a(844),g=a(5295),M=a(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let C=r.BufferService=class extends h.Disposable{get buffer(){return this.buffers.active}constructor(_){super(),this.isUserScrolling=!1,this._onResize=this.register(new p.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new p.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(_.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(_.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new g.BufferSet(_,this))}resize(_,w){this.cols=_,this.rows=w,this.buffers.resize(_,w),this._onResize.fire({cols:_,rows:w})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(_,w=!1){let S=this.buffer,y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===_.fg&&y.getBg(0)===_.bg||(y=S.getBlankLine(_,w),this._cachedBlankLine=y),y.isWrapped=w;let k=S.ybase+S.scrollTop,I=S.ybase+S.scrollBottom;if(S.scrollTop===0){let E=S.lines.isFull;I===S.lines.length-1?E?S.lines.recycle().copyFrom(y):S.lines.push(y.clone()):S.lines.splice(I+1,0,y.clone()),E?this.isUserScrolling&&(S.ydisp=Math.max(S.ydisp-1,0)):(S.ybase++,this.isUserScrolling||S.ydisp++)}else{let E=I-k+1;S.lines.shiftElements(k+1,E-1,-1),S.lines.set(I,y.clone())}this.isUserScrolling||(S.ydisp=S.ybase),this._onScroll.fire(S.ydisp)}scrollLines(_,w,S){let y=this.buffer;if(_<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else _+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);let k=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+_,y.ybase),0),k!==y.ydisp&&(w||this._onScroll.fire(y.ydisp))}};r.BufferService=C=c([m(0,M.IOptionsService)],C)},7994:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(a){this.glevel=a,this.charset=this._charsets[a]}setgCharset(a,c){this._charsets[a]=c,this.glevel===a&&(this.charset=c)}}},1753:function(o,r,a){var c=this&&this.__decorate||function(y,k,I,E){var N,T=arguments.length,R=T<3?k:E===null?E=Object.getOwnPropertyDescriptor(k,I):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,k,I,E);else for(var W=y.length-1;W>=0;W--)(N=y[W])&&(R=(T<3?N(R):T>3?N(k,I,R):N(k,I))||R);return T>3&&R&&Object.defineProperty(k,I,R),R},m=this&&this.__param||function(y,k){return function(I,E){k(I,E,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;let p=a(2585),h=a(8460),g=a(844),M={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function C(y,k){let I=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(I|=64,I|=y.action):(I|=3&y.button,4&y.button&&(I|=64),8&y.button&&(I|=128),y.action===32?I|=32:y.action!==0||k||(I|=3)),I}let _=String.fromCharCode,w={DEFAULT:y=>{let k=[C(y,!1)+32,y.col+32,y.row+32];return k[0]>255||k[1]>255||k[2]>255?"":`\x1B[M${_(k[0])}${_(k[1])}${_(k[2])}`},SGR:y=>{let k=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${C(y,!0)};${y.col};${y.row}${k}`},SGR_PIXELS:y=>{let k=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${C(y,!0)};${y.x};${y.y}${k}`}},S=r.CoreMouseService=class extends g.Disposable{constructor(y,k){super(),this._bufferService=y,this._coreService=k,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new h.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(let I of Object.keys(M))this.addProtocol(I,M[I]);for(let I of Object.keys(w))this.addEncoding(I,w[I]);this.reset()}addProtocol(y,k){this._protocols[y]=k}addEncoding(y,k){this._encodings[y]=k}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;let k=this._encodings[this._activeEncoding](y);return k&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(k):this._coreService.triggerDataEvent(k,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,k,I){if(I){if(y.x!==k.x||y.y!==k.y)return!1}else if(y.col!==k.col||y.row!==k.row)return!1;return y.button===k.button&&y.action===k.action&&y.ctrl===k.ctrl&&y.alt===k.alt&&y.shift===k.shift}};r.CoreMouseService=S=c([m(0,p.IBufferService),m(1,p.ICoreService)],S)},6975:function(o,r,a){var c=this&&this.__decorate||function(S,y,k,I){var E,N=arguments.length,T=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,k):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,y,k,I);else for(var R=S.length-1;R>=0;R--)(E=S[R])&&(T=(N<3?E(T):N>3?E(y,k,T):E(y,k))||T);return N>3&&T&&Object.defineProperty(y,k,T),T},m=this&&this.__param||function(S,y){return function(k,I){y(k,I,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;let p=a(1439),h=a(8460),g=a(844),M=a(2585),C=Object.freeze({insertMode:!1}),_=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),w=r.CoreService=class extends g.Disposable{constructor(S,y,k){super(),this._bufferService=S,this._logService=y,this._optionsService=k,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new h.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new h.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,p.clone)(C),this.decPrivateModes=(0,p.clone)(_)}reset(){this.modes=(0,p.clone)(C),this.decPrivateModes=(0,p.clone)(_)}triggerDataEvent(S,y=!1){if(this._optionsService.rawOptions.disableStdin)return;let k=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&k.ybase!==k.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${S}"`,()=>S.split("").map(I=>I.charCodeAt(0))),this._onData.fire(S)}triggerBinaryEvent(S){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${S}"`,()=>S.split("").map(y=>y.charCodeAt(0))),this._onBinary.fire(S))}};r.CoreService=w=c([m(0,M.IBufferService),m(1,M.ILogService),m(2,M.IOptionsService)],w)},9074:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;let c=a(8055),m=a(8460),p=a(844),h=a(6106),g=0,M=0;class C extends p.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new h.SortedList(S=>S?.marker.line),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,p.toDisposable)(()=>this.reset()))}registerDecoration(S){if(S.marker.isDisposed)return;let y=new _(S);if(y){let k=y.marker.onDispose(()=>y.dispose());y.onDispose(()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),k.dispose())}),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(let S of this._decorations.values())S.dispose();this._decorations.clear()}*getDecorationsAtCell(S,y,k){let I=0,E=0;for(let N of this._decorations.getKeyIterator(y))I=N.options.x??0,E=I+(N.options.width??1),S>=I&&S{g=E.options.x??0,M=g+(E.options.width??1),S>=g&&S{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;let c=a(2585),m=a(8343);class p{constructor(...g){this._entries=new Map;for(let[M,C]of g)this.set(M,C)}set(g,M){let C=this._entries.get(g);return this._entries.set(g,M),C}forEach(g){for(let[M,C]of this._entries.entries())g(M,C)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}r.ServiceCollection=p,r.InstantiationService=class{constructor(){this._services=new p,this._services.set(c.IInstantiationService,this)}setService(h,g){this._services.set(h,g)}getService(h){return this._services.get(h)}createInstance(h,...g){let M=(0,m.getServiceDependencies)(h).sort((w,S)=>w.index-S.index),C=[];for(let w of M){let S=this._services.get(w.id);if(!S)throw new Error(`[createInstance] ${h.name} depends on UNKNOWN service ${w.id}.`);C.push(S)}let _=M.length>0?M[0].index:g.length;if(g.length!==_)throw new Error(`[createInstance] First service dependency of ${h.name} at position ${_+1} conflicts with ${g.length} static arguments`);return new h(...g,...C)}}},7866:function(o,r,a){var c=this&&this.__decorate||function(_,w,S,y){var k,I=arguments.length,E=I<3?w:y===null?y=Object.getOwnPropertyDescriptor(w,S):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(_,w,S,y);else for(var N=_.length-1;N>=0;N--)(k=_[N])&&(E=(I<3?k(E):I>3?k(w,S,E):k(w,S))||E);return I>3&&E&&Object.defineProperty(w,S,E),E},m=this&&this.__param||function(_,w){return function(S,y){w(S,y,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;let p=a(844),h=a(2585),g={trace:h.LogLevelEnum.TRACE,debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF},M,C=r.LogService=class extends p.Disposable{get logLevel(){return this._logLevel}constructor(_){super(),this._optionsService=_,this._logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),M=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(_){for(let w=0;w<_.length;w++)typeof _[w]=="function"&&(_[w]=_[w]())}_log(_,w,S){this._evalLazyOptionalParams(S),_.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+w,...S)}trace(_,...w){this._logLevel<=h.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,_,w)}debug(_,...w){this._logLevel<=h.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,_,w)}info(_,...w){this._logLevel<=h.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,_,w)}warn(_,...w){this._logLevel<=h.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,_,w)}error(_,...w){this._logLevel<=h.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,_,w)}};r.LogService=C=c([m(0,h.IOptionsService)],C),r.setTraceLogger=function(_){M=_},r.traceCall=function(_,w,S){if(typeof S.value!="function")throw new Error("not supported");let y=S.value;S.value=function(...k){if(M.logLevel!==h.LogLevelEnum.TRACE)return y.apply(this,k);M.trace(`GlyphRenderer#${y.name}(${k.map(E=>JSON.stringify(E)).join(", ")})`);let I=y.apply(this,k);return M.trace(`GlyphRenderer#${y.name} return`,I),I}}},7302:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;let c=a(8460),m=a(844),p=a(6114);r.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:p.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};let h=["normal","bold","100","200","300","400","500","600","700","800","900"];class g extends m.Disposable{constructor(C){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;let _=H({},r.DEFAULT_OPTIONS);for(let w in C)if(w in _)try{let S=C[w];_[w]=this._sanitizeAndValidateOption(w,S)}catch(S){console.error(S)}this.rawOptions=_,this.options=H({},_),this._setupOptions(),this.register((0,m.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(C,_){return this.onOptionChange(w=>{w===C&&_(this.rawOptions[C])})}onMultipleOptionChange(C,_){return this.onOptionChange(w=>{C.indexOf(w)!==-1&&_()})}_setupOptions(){let C=w=>{if(!(w in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${w}"`);return this.rawOptions[w]},_=(w,S)=>{if(!(w in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${w}"`);S=this._sanitizeAndValidateOption(w,S),this.rawOptions[w]!==S&&(this.rawOptions[w]=S,this._onOptionChange.fire(w))};for(let w in this.rawOptions){let S={get:C.bind(this,w),set:_.bind(this,w)};Object.defineProperty(this.options,w,S)}}_sanitizeAndValidateOption(C,_){switch(C){case"cursorStyle":if(_||(_=r.DEFAULT_OPTIONS[C]),!(function(w){return w==="block"||w==="underline"||w==="bar"})(_))throw new Error(`"${_}" is not a valid value for ${C}`);break;case"wordSeparator":_||(_=r.DEFAULT_OPTIONS[C]);break;case"fontWeight":case"fontWeightBold":if(typeof _=="number"&&1<=_&&_<=1e3)break;_=h.includes(_)?_:r.DEFAULT_OPTIONS[C];break;case"cursorWidth":_=Math.floor(_);case"lineHeight":case"tabStopWidth":if(_<1)throw new Error(`${C} cannot be less than 1, value: ${_}`);break;case"minimumContrastRatio":_=Math.max(1,Math.min(21,Math.round(10*_)/10));break;case"scrollback":if((_=Math.min(_,4294967295))<0)throw new Error(`${C} cannot be less than 0, value: ${_}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(_<=0)throw new Error(`${C} cannot be less than or equal to 0, value: ${_}`);break;case"rows":case"cols":if(!_&&_!==0)throw new Error(`${C} must be numeric, value: ${_}`);break;case"windowsPty":_=_??{}}return _}}r.OptionsService=g},2660:function(o,r,a){var c=this&&this.__decorate||function(g,M,C,_){var w,S=arguments.length,y=S<3?M:_===null?_=Object.getOwnPropertyDescriptor(M,C):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(g,M,C,_);else for(var k=g.length-1;k>=0;k--)(w=g[k])&&(y=(S<3?w(y):S>3?w(M,C,y):w(M,C))||y);return S>3&&y&&Object.defineProperty(M,C,y),y},m=this&&this.__param||function(g,M){return function(C,_){M(C,_,g)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;let p=a(2585),h=r.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){let M=this._bufferService.buffer;if(g.id===void 0){let k=M.addMarker(M.ybase+M.y),I={data:g,id:this._nextId++,lines:[k]};return k.onDispose(()=>this._removeMarkerFromLink(I,k)),this._dataByLinkId.set(I.id,I),I.id}let C=g,_=this._getEntryIdKey(C),w=this._entriesWithId.get(_);if(w)return this.addLineToLink(w.id,M.ybase+M.y),w.id;let S=M.addMarker(M.ybase+M.y),y={id:this._nextId++,key:this._getEntryIdKey(C),data:C,lines:[S]};return S.onDispose(()=>this._removeMarkerFromLink(y,S)),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(g,M){let C=this._dataByLinkId.get(g);if(C&&C.lines.every(_=>_.line!==M)){let _=this._bufferService.buffer.addMarker(M);C.lines.push(_),_.onDispose(()=>this._removeMarkerFromLink(C,_))}}getLinkData(g){return this._dataByLinkId.get(g)?.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,M){let C=g.lines.indexOf(M);C!==-1&&(g.lines.splice(C,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};r.OscLinkService=h=c([m(0,p.IBufferService)],h)},8343:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;let a="di$target",c="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(m){return m[c]||[]},r.createDecorator=function(m){if(r.serviceRegistry.has(m))return r.serviceRegistry.get(m);let p=function(h,g,M){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(C,_,w){_[a]===_?_[c].push({id:C,index:w}):(_[c]=[{id:C,index:w}],_[a]=_)})(p,h,M)};return p.toString=()=>m,r.serviceRegistry.set(m,p),p}},2585:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;let c=a(8343);var m;r.IBufferService=(0,c.createDecorator)("BufferService"),r.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),r.ICoreService=(0,c.createDecorator)("CoreService"),r.ICharsetService=(0,c.createDecorator)("CharsetService"),r.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(p){p[p.TRACE=0]="TRACE",p[p.DEBUG=1]="DEBUG",p[p.INFO=2]="INFO",p[p.WARN=3]="WARN",p[p.ERROR=4]="ERROR",p[p.OFF=5]="OFF"})(m||(r.LogLevelEnum=m={})),r.ILogService=(0,c.createDecorator)("LogService"),r.IOptionsService=(0,c.createDecorator)("OptionsService"),r.IOscLinkService=(0,c.createDecorator)("OscLinkService"),r.IUnicodeService=(0,c.createDecorator)("UnicodeService"),r.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;let c=a(8460),m=a(225);class p{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,M,C=!1){return(16777215&g)<<3|(3&M)<<1|(C?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;let g=new m.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let M=0,C=0,_=g.length;for(let w=0;w<_;++w){let S=g.charCodeAt(w);if(55296<=S&&S<=56319){if(++w>=_)return M+this.wcwidth(S);let I=g.charCodeAt(w);56320<=I&&I<=57343?S=1024*(S-55296)+I-56320+65536:M+=this.wcwidth(I)}let y=this.charProperties(S,C),k=p.extractWidth(y);p.extractShouldJoin(y)&&(k-=p.extractWidth(C)),M+=k,C=y}return M}charProperties(g,M){return this._activeProvider.charProperties(g,M)}}r.UnicodeService=p}},i={};function e(o){var r=i[o];if(r!==void 0)return r.exports;var a=i[o]={exports:{}};return t[o].call(a.exports,a,a.exports,e),a.exports}var n={};return(()=>{var o=n;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;let r=e(9042),a=e(3236),c=e(844),m=e(5741),p=e(8285),h=e(7975),g=e(7090),M=["cols","rows"];class C extends c.Disposable{constructor(w){super(),this._core=this.register(new a.Terminal(w)),this._addonManager=this.register(new m.AddonManager),this._publicOptions=H({},this._core.options);let S=k=>this._core.options[k],y=(k,I)=>{this._checkReadonlyOptions(k),this._core.options[k]=I};for(let k in this._core.options){let I={get:S.bind(this,k),set:y.bind(this,k)};Object.defineProperty(this._publicOptions,k,I)}}_checkReadonlyOptions(w){if(M.includes(w))throw new Error(`Option "${w}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new h.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new g.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new p.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let w=this._core.coreService.decPrivateModes,S="none";switch(this._core.coreMouseService.activeProtocol){case"X10":S="x10";break;case"VT200":S="vt200";break;case"DRAG":S="drag";break;case"ANY":S="any"}return{applicationCursorKeysMode:w.applicationCursorKeys,applicationKeypadMode:w.applicationKeypad,bracketedPasteMode:w.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:S,originMode:w.origin,reverseWraparoundMode:w.reverseWraparound,sendFocusMode:w.sendFocus,wraparoundMode:w.wraparound}}get options(){return this._publicOptions}set options(w){for(let S in w)this._publicOptions[S]=w[S]}blur(){this._core.blur()}focus(){this._core.focus()}input(w,S=!0){this._core.input(w,S)}resize(w,S){this._verifyIntegers(w,S),this._core.resize(w,S)}open(w){this._core.open(w)}attachCustomKeyEventHandler(w){this._core.attachCustomKeyEventHandler(w)}attachCustomWheelEventHandler(w){this._core.attachCustomWheelEventHandler(w)}registerLinkProvider(w){return this._core.registerLinkProvider(w)}registerCharacterJoiner(w){return this._checkProposedApi(),this._core.registerCharacterJoiner(w)}deregisterCharacterJoiner(w){this._checkProposedApi(),this._core.deregisterCharacterJoiner(w)}registerMarker(w=0){return this._verifyIntegers(w),this._core.registerMarker(w)}registerDecoration(w){return this._checkProposedApi(),this._verifyPositiveIntegers(w.x??0,w.width??0,w.height??0),this._core.registerDecoration(w)}hasSelection(){return this._core.hasSelection()}select(w,S,y){this._verifyIntegers(w,S,y),this._core.select(w,S,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(w,S){this._verifyIntegers(w,S),this._core.selectLines(w,S)}dispose(){super.dispose()}scrollLines(w){this._verifyIntegers(w),this._core.scrollLines(w)}scrollPages(w){this._verifyIntegers(w),this._core.scrollPages(w)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(w){this._verifyIntegers(w),this._core.scrollToLine(w)}clear(){this._core.clear()}write(w,S){this._core.write(w,S)}writeln(w,S){this._core.write(w),this._core.write(`\r `,S)}paste(w){this._core.paste(w)}refresh(w,S){this._verifyIntegers(w,S),this._core.refresh(w,S)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(w){this._addonManager.loadAddon(this,w)}static get strings(){return r}_verifyIntegers(...w){for(let S of w)if(S===1/0||isNaN(S)||S%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...w){for(let S of w)if(S&&(S===1/0||isNaN(S)||S%1!=0||S<0))throw new Error("This API only accepts positive integers")}}o.Terminal=C})(),n})())});var ZN=Is((Vk,KN)=>{(function(t,i){typeof Vk=="object"&&typeof KN=="object"?KN.exports=i():typeof define=="function"&&define.amd?define([],i):typeof Vk=="object"?Vk.AttachAddon=i():t.AttachAddon=i()})(self,()=>(()=>{"use strict";var t={};return(()=>{var i=t;function e(n,o,r){return n.addEventListener(o,r),{dispose:()=>{r&&n.removeEventListener(o,r)}}}Object.defineProperty(i,"__esModule",{value:!0}),i.AttachAddon=void 0,i.AttachAddon=class{constructor(n,o){this._disposables=[],this._socket=n,this._socket.binaryType="arraybuffer",this._bidirectional=!(o&&o.bidirectional===!1)}activate(n){this._disposables.push(e(this._socket,"message",o=>{let r=o.data;n.write(typeof r=="string"?r:new Uint8Array(r))})),this._bidirectional&&(this._disposables.push(n.onData(o=>this._sendData(o))),this._disposables.push(n.onBinary(o=>this._sendBinary(o)))),this._disposables.push(e(this._socket,"close",()=>this.dispose())),this._disposables.push(e(this._socket,"error",()=>this.dispose()))}dispose(){for(let n of this._disposables)n.dispose()}_sendData(n){this._checkOpenSocket()&&this._socket.send(n)}_sendBinary(n){if(!this._checkOpenSocket())return;let o=new Uint8Array(n.length);for(let r=0;r{(function(t,i){typeof zk=="object"&&typeof JN=="object"?JN.exports=i():typeof define=="function"&&define.amd?define([],i):typeof zk=="object"?zk.FitAddon=i():t.FitAddon=i()})(self,()=>(()=>{"use strict";var t={};return(()=>{var i=t;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let n=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(n._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core,n=e._renderService.dimensions;if(n.css.cell.width===0||n.css.cell.height===0)return;let o=this._terminal.options.scrollback===0?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(r.getPropertyValue("height")),c=Math.max(0,parseInt(r.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),p=a-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),h=c-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(h/n.css.cell.width)),rows:Math.max(1,Math.floor(p/n.css.cell.height))}}}})(),t})())});var RR=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),of=class t{element=null;classNames=[];attrs=[];notSelectors=[];static parse(i){let e=[],n=(m,p)=>{p.notSelectors.length>0&&!p.element&&p.classNames.length==0&&p.attrs.length==0&&(p.element="*"),m.push(p)},o=new t,r,a=o,c=!1;for(RR.lastIndex=0;r=RR.exec(i);){if(r[1]){if(c)throw new Error("Nesting :not in a selector is not allowed");c=!0,a=new t,o.notSelectors.push(a)}let m=r[2];if(m){let h=r[3];h==="#"?a.addAttribute("id",m.slice(1)):h==="."?a.addClassName(m.slice(1)):a.setElement(m)}let p=r[4];if(p&&a.addAttribute(a.unescapeAttribute(p),r[6]),r[7]&&(c=!1,a=o),r[8]){if(c)throw new Error("Multiple selectors in :not are not supported");n(e,o),o=a=new t}}return n(e,o),e}unescapeAttribute(i){let e="",n=!1;for(let o=0;o0&&i.push("class",this.classNames.join(" ")),i.concat(this.attrs)}addAttribute(i,e=""){this.attrs.push(i,e&&e.toLowerCase()||"")}addClassName(i){this.classNames.push(i.toLowerCase())}toString(){let i=this.element||"";if(this.classNames&&this.classNames.forEach(e=>i+=`.${e}`),this.attrs)for(let e=0;ei+=`:not(${e})`),i}},hx=class t{static createNotMatcher(i){let e=new t;return e.addSelectables(i,null),e}_elementMap=new Map;_elementPartialMap=new Map;_classMap=new Map;_classPartialMap=new Map;_attrValueMap=new Map;_attrValuePartialMap=new Map;_listContexts=[];addSelectables(i,e){let n=null;i.length>1&&(n=new YE(i),this._listContexts.push(n));for(let o=0;o0&&(!this.listContext||!this.listContext.alreadyMatched)&&(n=!hx.createNotMatcher(this.notSelectors).match(i,null)),n&&e&&(!this.listContext||!this.listContext.alreadyMatched)&&(this.listContext&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),n}},fx=class{registry;constructor(i){this.registry=i}match(i){return this.registry.has(i)?this.registry.get(i):[]}};var iu=(function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",t})(iu||{}),kP=(function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t[t.Eager=1]="Eager",t})(kP||{}),t0=(function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t})(t0||{}),FR={name:"custom-elements"},LR={name:"no-errors-schema"};var uo=(function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t[t.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",t})(uo||{});function qG(t){let i=t.classNames&&t.classNames.length?[8,...t.classNames]:[];return[t.element&&t.element!=="*"?t.element:"",...t.attrs,...i]}function XG(t){let i=t.classNames&&t.classNames.length?[8,...t.classNames]:[];return t.element?[5,t.element,...t.attrs,...i]:t.attrs.length?[3,...t.attrs,...i]:t.classNames&&t.classNames.length?[9,...t.classNames]:[]}function QG(t){let i=qG(t),e=t.notSelectors&&t.notSelectors.length?t.notSelectors.map(n=>XG(n)):[];return i.concat(...e)}function TP(t){return t?of.parse(t).map(QG):[]}var Td=(function(t){return t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule",t})(Td||{});var gx;function YG(t){return eW(JG(t.nodes).join("")+`[${t.meaning}]`)}function KG(t){return t.id||P6(t)}function P6(t){let i=new ZE,e=t.nodes.map(n=>n.visit(i,null));return I6(e.join(""),t.meaning)}var _x=class{visitText(i,e){return i.value}visitContainer(i,e){return`[${i.children.map(n=>n.visit(this)).join(", ")}]`}visitIcu(i,e){let n=Object.keys(i.cases).map(o=>`${o} {${i.cases[o].visit(this)}}`);return`{${i.expression}, ${i.type}, ${n.join(", ")}}`}visitTagPlaceholder(i,e){return i.isVoid?``:`${i.children.map(n=>n.visit(this)).join(", ")}`}visitPlaceholder(i,e){return i.value?`${i.value}`:``}visitIcuPlaceholder(i,e){return`${i.value.visit(this)}`}visitBlockPlaceholder(i,e){return`${i.children.map(n=>n.visit(this)).join(", ")}`}},ZG=new _x;function JG(t){return t.map(i=>i.visit(ZG,null))}var ZE=class extends _x{visitIcu(i){let e=Object.keys(i.cases).map(n=>`${n} {${i.cases[n].visit(this)}}`);return`{${i.type}, ${e.join(", ")}}`}};function eW(t){gx??=new TextEncoder;let i=[...gx.encode(t)],e=iW(i,EP.Big),n=i.length*8,o=new Uint32Array(80),r=1732584193,a=4023233417,c=2562383102,m=271733878,p=3285377520;e[n>>5]|=128<<24-n%32,e[(n+64>>9<<4)+15]=n;for(let h=0;h>>0).toString(16).padStart(8,"0")}function tW(t,i,e,n){return t<20?[i&e|~i&n,1518500249]:t<40?[i^e^n,1859775393]:t<60?[i&e|i&n|e&n,2400959708]:[i^e^n,3395469782]}function BR(t){gx??=new TextEncoder;let i=gx.encode(t),e=new DataView(i.buffer,i.byteOffset,i.byteLength),n=VR(e,i.length,0),o=VR(e,i.length,102072);return n==0&&(o==0||o==1)&&(n=n^319790063,o=o^-1801410264),BigInt.asUintN(32,BigInt(n))<>BigInt(63)&BigInt(1),e+=BR(i)),BigInt.asUintN(63,e).toString()}function VR(t,i,e){let n=2654435769,o=2654435769,r=0,a=i-12;for(;r<=a;r+=12){n+=t.getUint32(r,!0),o+=t.getUint32(r+4,!0),e+=t.getUint32(r+8,!0);let m=zR(n,o,e);n=m[0],o=m[1],e=m[2]}let c=i-r;return e+=i,c>=4?(n+=t.getUint32(r,!0),r+=4,c>=8?(o+=t.getUint32(r,!0),r+=4,c>=9&&(e+=t.getUint8(r++)<<8),c>=10&&(e+=t.getUint8(r++)<<16),c===11&&(e+=t.getUint8(r++)<<24)):(c>=5&&(o+=t.getUint8(r++)),c>=6&&(o+=t.getUint8(r++)<<8),c===7&&(o+=t.getUint8(r++)<<16))):(c>=1&&(n+=t.getUint8(r++)),c>=2&&(n+=t.getUint8(r++)<<8),c===3&&(n+=t.getUint8(r++)<<16)),zR(n,o,e)[2]}function zR(t,i,e){return t-=i,t-=e,t^=e>>>13,i-=e,i-=t,i^=t<<8,e-=t,e-=i,e^=i>>>13,t-=i,t-=e,t^=e>>>12,i-=e,i-=t,i^=t<<16,e-=t,e-=i,e^=i>>>5,t-=i,t-=e,t^=e>>>3,i-=e,i-=t,i^=t<<10,e-=t,e-=i,e^=i>>>15,[t,i,e]}var EP=(function(t){return t[t.Little=0]="Little",t[t.Big=1]="Big",t})(EP||{});function zh(t,i){return nW(t,i)[1]}function nW(t,i){let e=(t&65535)+(i&65535),n=(t>>>16)+(i>>>16)+(e>>>16);return[n>>>16,n<<16|e&65535]}function EE(t,i){return t<>>32-i}function iW(t,i){let e=t.length+3>>>2,n=[];for(let o=0;o=t.length?0:t[i]}function oW(t,i,e){let n=0;if(e===EP.Big)for(let o=0;o<4;o++)n+=jR(t,i+o)<<24-8*o;else for(let o=0;o<4;o++)n+=jR(t,i+o)<<8*o;return n}var A6=(function(t){return t[t.None=0]="None",t[t.Const=1]="Const",t})(A6||{}),vx=class{modifiers;constructor(i=A6.None){this.modifiers=i}hasModifier(i){return(this.modifiers&i)!==0}},Rd=(function(t){return t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None",t})(Rd||{}),Nc=class extends vx{name;constructor(i,e){super(e),this.name=i}visitType(i,e){return i.visitBuiltinType(this,e)}},fl=class extends vx{value;typeParams;constructor(i,e,n=null){super(e),this.value=i,this.typeParams=n}visitType(i,e){return i.visitExpressionType(this,e)}};var hs=new Nc(Rd.Dynamic),ec=new Nc(Rd.Inferred),rW=new Nc(Rd.Bool),hFe=new Nc(Rd.Int),bu=new Nc(Rd.Number),DP=new Nc(Rd.String),fFe=new Nc(Rd.Function),Rc=new Nc(Rd.None),g0=(function(t){return t[t.Minus=0]="Minus",t[t.Plus=1]="Plus",t})(g0||{}),ht=(function(t){return t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Assign=2]="Assign",t[t.Identical=3]="Identical",t[t.NotIdentical=4]="NotIdentical",t[t.Minus=5]="Minus",t[t.Plus=6]="Plus",t[t.Divide=7]="Divide",t[t.Multiply=8]="Multiply",t[t.Modulo=9]="Modulo",t[t.And=10]="And",t[t.Or=11]="Or",t[t.BitwiseOr=12]="BitwiseOr",t[t.BitwiseAnd=13]="BitwiseAnd",t[t.Lower=14]="Lower",t[t.LowerEquals=15]="LowerEquals",t[t.Bigger=16]="Bigger",t[t.BiggerEquals=17]="BiggerEquals",t[t.NullishCoalesce=18]="NullishCoalesce",t[t.Exponentiation=19]="Exponentiation",t[t.In=20]="In",t[t.InstanceOf=21]="InstanceOf",t[t.AdditionAssignment=22]="AdditionAssignment",t[t.SubtractionAssignment=23]="SubtractionAssignment",t[t.MultiplicationAssignment=24]="MultiplicationAssignment",t[t.DivisionAssignment=25]="DivisionAssignment",t[t.RemainderAssignment=26]="RemainderAssignment",t[t.ExponentiationAssignment=27]="ExponentiationAssignment",t[t.AndAssignment=28]="AndAssignment",t[t.OrAssignment=29]="OrAssignment",t[t.NullishCoalesceAssignment=30]="NullishCoalesceAssignment",t})(ht||{});function aW(t,i){return t==null||i==null?t==i:t.isEquivalent(i)}function O6(t,i,e){let n=t.length;if(n!==i.length)return!1;for(let o=0;oe.isEquivalent(n))}var Yi=class{type;sourceSpan;constructor(i,e){this.type=i||null,this.sourceSpan=e||null}prop(i,e){return new Hs(this,i,null,e)}key(i,e,n){return new Ad(this,i,e,n)}callFn(i,e,n){return new fs(this,i,null,e,n)}instantiate(i,e,n){return new v0(this,i,e,n)}conditional(i,e=null,n){return new Fc(this,i,e,null,n)}equals(i,e){return new Mi(ht.Equals,this,i,null,e)}notEquals(i,e){return new Mi(ht.NotEquals,this,i,null,e)}identical(i,e){return new Mi(ht.Identical,this,i,null,e)}notIdentical(i,e){return new Mi(ht.NotIdentical,this,i,null,e)}minus(i,e){return new Mi(ht.Minus,this,i,null,e)}plus(i,e){return new Mi(ht.Plus,this,i,null,e)}divide(i,e){return new Mi(ht.Divide,this,i,null,e)}multiply(i,e){return new Mi(ht.Multiply,this,i,null,e)}modulo(i,e){return new Mi(ht.Modulo,this,i,null,e)}power(i,e){return new Mi(ht.Exponentiation,this,i,null,e)}and(i,e){return new Mi(ht.And,this,i,null,e)}bitwiseOr(i,e){return new Mi(ht.BitwiseOr,this,i,null,e)}bitwiseAnd(i,e){return new Mi(ht.BitwiseAnd,this,i,null,e)}or(i,e){return new Mi(ht.Or,this,i,null,e)}lower(i,e){return new Mi(ht.Lower,this,i,null,e)}lowerEquals(i,e){return new Mi(ht.LowerEquals,this,i,null,e)}bigger(i,e){return new Mi(ht.Bigger,this,i,null,e)}biggerEquals(i,e){return new Mi(ht.BiggerEquals,this,i,null,e)}isBlank(i){return this.equals(mW,i)}nullishCoalesce(i,e){return new Mi(ht.NullishCoalesce,this,i,null,e)}toStmt(){return new va(this,null)}},tc=class t extends Yi{name;constructor(i,e,n){super(e,n),this.name=i}isEquivalent(i){return i instanceof t&&this.name===i.name}isConstant(){return!1}visitExpression(i,e){return i.visitReadVarExpr(this,e)}clone(){return new t(this.name,this.type,this.sourceSpan)}set(i){return new Mi(ht.Assign,this,i,null,this.sourceSpan)}},rf=class t extends Yi{expr;constructor(i,e,n){super(e,n),this.expr=i}visitExpression(i,e){return i.visitTypeofExpr(this,e)}isEquivalent(i){return i instanceof t&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new t(this.expr.clone())}},bx=class t extends Yi{expr;constructor(i,e,n){super(e,n),this.expr=i}visitExpression(i,e){return i.visitVoidExpr(this,e)}isEquivalent(i){return i instanceof t&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new t(this.expr.clone())}},gi=class t extends Yi{node;constructor(i,e,n){super(e,n),this.node=i}isEquivalent(i){return i instanceof t&&this.node===i.node}isConstant(){return!1}visitExpression(i,e){return i.visitWrappedNodeExpr(this,e)}clone(){return new t(this.node,this.type,this.sourceSpan)}},fs=class t extends Yi{fn;args;pure;constructor(i,e,n,o,r=!1){super(n,o),this.fn=i,this.args=e,this.pure=r}get receiver(){return this.fn}isEquivalent(i){return i instanceof t&&this.fn.isEquivalent(i.fn)&&$s(this.args,i.args)&&this.pure===i.pure}isConstant(){return!1}visitExpression(i,e){return i.visitInvokeFunctionExpr(this,e)}clone(){return new t(this.fn.clone(),this.args.map(i=>i.clone()),this.type,this.sourceSpan,this.pure)}},_0=class t extends Yi{tag;template;constructor(i,e,n,o){super(n,o),this.tag=i,this.template=e}isEquivalent(i){return i instanceof t&&this.tag.isEquivalent(i.tag)&&this.template.isEquivalent(i.template)}isConstant(){return!1}visitExpression(i,e){return i.visitTaggedTemplateLiteralExpr(this,e)}clone(){return new t(this.tag.clone(),this.template.clone(),this.type,this.sourceSpan)}},v0=class t extends Yi{classExpr;args;constructor(i,e,n,o){super(n,o),this.classExpr=i,this.args=e}isEquivalent(i){return i instanceof t&&this.classExpr.isEquivalent(i.classExpr)&&$s(this.args,i.args)}isConstant(){return!1}visitExpression(i,e){return i.visitInstantiateExpr(this,e)}clone(){return new t(this.classExpr.clone(),this.args.map(i=>i.clone()),this.type,this.sourceSpan)}},af=class t extends Yi{body;flags;constructor(i,e,n){super(null,n),this.body=i,this.flags=e}isEquivalent(i){return i instanceof t&&this.body===i.body&&this.flags===i.flags}isConstant(){return!0}visitExpression(i,e){return i.visitRegularExpressionLiteral(this,e)}clone(){return new t(this.body,this.flags,this.sourceSpan)}},_a=class t extends Yi{value;constructor(i,e,n){super(e,n),this.value=i}isEquivalent(i){return i instanceof t&&this.value===i.value}isConstant(){return!0}visitExpression(i,e){return i.visitLiteralExpr(this,e)}clone(){return new t(this.value,this.type,this.sourceSpan)}},b0=class t extends Yi{elements;expressions;constructor(i,e,n){super(null,n),this.elements=i,this.expressions=e}isEquivalent(i){return i instanceof t&&O6(this.elements,i.elements,(e,n)=>e.text===n.text)&&$s(this.expressions,i.expressions)}isConstant(){return!1}visitExpression(i,e){return i.visitTemplateLiteralExpr(this,e)}clone(){return new t(this.elements.map(i=>i.clone()),this.expressions.map(i=>i.clone()))}},Cx=class t extends Yi{text;rawText;constructor(i,e,n){super(DP,e),this.text=i,this.rawText=n??JE(cx(i))}visitExpression(i,e){return i.visitTemplateLiteralElementExpr(this,e)}isEquivalent(i){return i instanceof t&&i.text===this.text&&i.rawText===this.rawText}isConstant(){return!0}clone(){return new t(this.text,this.sourceSpan,this.rawText)}},mu=class{text;sourceSpan;constructor(i,e){this.text=i,this.sourceSpan=e}},ef=class{text;sourceSpan;associatedMessage;constructor(i,e,n){this.text=i,this.sourceSpan=e,this.associatedMessage=n}},sW="|",$R="@@",lW="\u241F",xx=class t extends Yi{metaBlock;messageParts;placeHolderNames;expressions;constructor(i,e,n,o,r){super(DP,r),this.metaBlock=i,this.messageParts=e,this.placeHolderNames=n,this.expressions=o}isEquivalent(i){return!1}isConstant(){return!1}visitExpression(i,e){return i.visitLocalizedString(this,e)}clone(){return new t(this.metaBlock,this.messageParts,this.placeHolderNames,this.expressions.map(i=>i.clone()),this.sourceSpan)}serializeI18nHead(){let i=this.metaBlock.description||"";return this.metaBlock.meaning&&(i=`${this.metaBlock.meaning}${sW}${i}`),this.metaBlock.customId&&(i=`${i}${$R}${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(e=>{i=`${i}${lW}${e}`}),HR(i,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(i){return this.messageParts[i]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(i){return this.placeHolderNames[i]?.sourceSpan??this.expressions[i]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(i){let e=this.placeHolderNames[i-1],n=this.messageParts[i],o=e.text;return e.associatedMessage?.legacyIds.length===0&&(o+=`${$R}${I6(e.associatedMessage.messageString,e.associatedMessage.meaning)}`),HR(o,n.text,this.getMessagePartSourceSpan(i))}},cx=t=>t.replace(/\\/g,"\\\\"),cW=t=>t.replace(/^:/,"\\:"),dW=t=>t.replace(/:/g,"\\:"),JE=t=>t.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function HR(t,i,e){return t===""?{cooked:i,raw:JE(cW(cx(i))),range:e}:{cooked:`:${t}:${i}`,raw:JE(`:${dW(cx(t))}:${cx(i)}`),range:e}}var Cu=class t extends Yi{value;typeParams;constructor(i,e,n=null,o){super(e,o),this.value=i,this.typeParams=n}isEquivalent(i){return i instanceof t&&this.value.name===i.value.name&&this.value.moduleName===i.value.moduleName}isConstant(){return!1}visitExpression(i,e){return i.visitExternalExpr(this,e)}clone(){return new t(this.value,this.type,this.typeParams,this.sourceSpan)}};var Fc=class t extends Yi{condition;falseCase;trueCase;constructor(i,e,n=null,o,r){super(o||e.type,r),this.condition=i,this.falseCase=n,this.trueCase=e}isEquivalent(i){return i instanceof t&&this.condition.isEquivalent(i.condition)&&this.trueCase.isEquivalent(i.trueCase)&&aW(this.falseCase,i.falseCase)}isConstant(){return!1}visitExpression(i,e){return i.visitConditionalExpr(this,e)}clone(){return new t(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}};var C0=class t extends Yi{condition;constructor(i,e){super(rW,e),this.condition=i}isEquivalent(i){return i instanceof t&&this.condition.isEquivalent(i.condition)}isConstant(){return!1}visitExpression(i,e){return i.visitNotExpr(this,e)}clone(){return new t(this.condition.clone(),this.sourceSpan)}},Ir=class t{name;type;constructor(i,e=null){this.name=i,this.type=e}isEquivalent(i){return this.name===i.name}clone(){return new t(this.name,this.type)}},Am=class t extends Yi{params;statements;name;constructor(i,e,n,o,r){super(n,o),this.params=i,this.statements=e,this.name=r}isEquivalent(i){return(i instanceof t||i instanceof x0)&&$s(this.params,i.params)&&$s(this.statements,i.statements)}isConstant(){return!1}visitExpression(i,e){return i.visitFunctionExpr(this,e)}toDeclStmt(i,e){return new x0(i,this.params,this.statements,this.type,e,this.sourceSpan)}clone(){return new t(this.params.map(i=>i.clone()),this.statements,this.type,this.sourceSpan,this.name)}},Nu=class eD extends Yi{params;body;constructor(i,e,n,o){super(n,o),this.params=i,this.body=e}isEquivalent(i){return!(i instanceof eD)||!$s(this.params,i.params)?!1:this.body instanceof Yi&&i.body instanceof Yi?this.body.isEquivalent(i.body):Array.isArray(this.body)&&Array.isArray(i.body)?$s(this.body,i.body):!1}isConstant(){return!1}visitExpression(i,e){return i.visitArrowFunctionExpr(this,e)}clone(){return new eD(this.params.map(i=>i.clone()),Array.isArray(this.body)?this.body:this.body.clone(),this.type,this.sourceSpan)}toDeclStmt(i,e){return new qr(i,this,ec,e,this.sourceSpan)}},xu=class t extends Yi{operator;expr;parens;constructor(i,e,n,o,r=!0){super(n||bu,o),this.operator=i,this.expr=e,this.parens=r}isEquivalent(i){return i instanceof t&&this.operator===i.operator&&this.expr.isEquivalent(i.expr)}isConstant(){return!1}visitExpression(i,e){return i.visitUnaryOperatorExpr(this,e)}clone(){return new t(this.operator,this.expr.clone(),this.type,this.sourceSpan,this.parens)}},nc=class t extends Yi{expr;constructor(i,e,n){super(e,n),this.expr=i}visitExpression(i,e){return i.visitParenthesizedExpr(this,e)}isEquivalent(i){return i instanceof t&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new t(this.expr.clone())}},Mi=class t extends Yi{operator;rhs;lhs;constructor(i,e,n,o,r){super(o||e.type,r),this.operator=i,this.rhs=n,this.lhs=e}isEquivalent(i){return i instanceof t&&this.operator===i.operator&&this.lhs.isEquivalent(i.lhs)&&this.rhs.isEquivalent(i.rhs)}isConstant(){return!1}visitExpression(i,e){return i.visitBinaryOperatorExpr(this,e)}clone(){return new t(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let i=this.operator;return i===ht.Assign||i===ht.AdditionAssignment||i===ht.SubtractionAssignment||i===ht.MultiplicationAssignment||i===ht.DivisionAssignment||i===ht.RemainderAssignment||i===ht.ExponentiationAssignment||i===ht.AndAssignment||i===ht.OrAssignment||i===ht.NullishCoalesceAssignment}},Hs=class t extends Yi{receiver;name;constructor(i,e,n,o){super(n,o),this.receiver=i,this.name=e}get index(){return this.name}isEquivalent(i){return i instanceof t&&this.receiver.isEquivalent(i.receiver)&&this.name===i.name}isConstant(){return!1}visitExpression(i,e){return i.visitReadPropExpr(this,e)}set(i){return new Mi(ht.Assign,this.receiver.prop(this.name),i,null,this.sourceSpan)}clone(){return new t(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},Ad=class t extends Yi{receiver;index;constructor(i,e,n,o){super(n,o),this.receiver=i,this.index=e}isEquivalent(i){return i instanceof t&&this.receiver.isEquivalent(i.receiver)&&this.index.isEquivalent(i.index)}isConstant(){return!1}visitExpression(i,e){return i.visitReadKeyExpr(this,e)}set(i){return new Mi(ht.Assign,this.receiver.key(this.index),i,null,this.sourceSpan)}clone(){return new t(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},Lc=class t extends Yi{entries;constructor(i,e,n){super(e,n),this.entries=i}isConstant(){return this.entries.every(i=>i.isConstant())}isEquivalent(i){return i instanceof t&&$s(this.entries,i.entries)}visitExpression(i,e){return i.visitLiteralArrayExpr(this,e)}clone(){return new t(this.entries.map(i=>i.clone()),this.type,this.sourceSpan)}},sf=class t{key;value;quoted;constructor(i,e,n){this.key=i,this.value=e,this.quoted=n}isEquivalent(i){return this.key===i.key&&this.value.isEquivalent(i.value)}clone(){return new t(this.key,this.value.clone(),this.quoted)}isConstant(){return this.value.isConstant()}},Om=class t{expression;constructor(i){this.expression=i}isEquivalent(i){return i instanceof t&&this.expression.isEquivalent(i.expression)}clone(){return new t(this.expression.clone())}isConstant(){return this.expression.isConstant()}},ic=class t extends Yi{entries;valueType=null;constructor(i,e,n){super(e,n),this.entries=i,e&&(this.valueType=e.valueType)}isEquivalent(i){return i instanceof t&&$s(this.entries,i.entries)}isConstant(){return this.entries.every(i=>i.isConstant())}visitExpression(i,e){return i.visitLiteralMapExpr(this,e)}clone(){let i=this.entries.map(e=>e.clone());return new t(i,this.type,this.sourceSpan)}};var yu=class t extends Yi{expression;constructor(i,e){super(null,e),this.expression=i}isEquivalent(i){return i instanceof t&&this.expression.isEquivalent(i.expression)}isConstant(){return this.expression.isConstant()}visitExpression(i,e){return i.visitSpreadElementExpr(this,e)}clone(){return new t(this.expression.clone(),this.sourceSpan)}},lf=new _a(null,null,null),mW=new _a(null,ec,null),fa=(function(t){return t[t.None=0]="None",t[t.Final=1]="Final",t[t.Private=2]="Private",t[t.Exported=4]="Exported",t[t.Static=8]="Static",t})(fa||{}),tD=class{text;multiline;trailingNewline;constructor(i,e,n){this.text=i,this.multiline=e,this.trailingNewline=n}toString(){return this.multiline?` ${this.text} `:this.text}},yx=class extends tD{tags;constructor(i){super("",!0,!0),this.tags=i}toString(){return gW(this.tags)}},Su=class{modifiers;sourceSpan;leadingComments;constructor(i=fa.None,e=null,n){this.modifiers=i,this.sourceSpan=e,this.leadingComments=n}hasModifier(i){return(this.modifiers&i)!==0}addLeadingComment(i){this.leadingComments=this.leadingComments??[],this.leadingComments.push(i)}},qr=class t extends Su{name;value;type;constructor(i,e,n,o,r,a){super(o,r,a),this.name=i,this.value=e,this.type=n||e&&e.type||null}isEquivalent(i){return i instanceof t&&this.name===i.name&&(this.value?!!i.value&&this.value.isEquivalent(i.value):!i.value)}visitStatement(i,e){return i.visitDeclareVarStmt(this,e)}},x0=class t extends Su{name;params;statements;type;constructor(i,e,n,o,r,a,c){super(r,a,c),this.name=i,this.params=e,this.statements=n,this.type=o||null}isEquivalent(i){return i instanceof t&&$s(this.params,i.params)&&$s(this.statements,i.statements)}visitStatement(i,e){return i.visitDeclareFunctionStmt(this,e)}},va=class t extends Su{expr;constructor(i,e,n){super(fa.None,e,n),this.expr=i}isEquivalent(i){return i instanceof t&&this.expr.isEquivalent(i.expr)}visitStatement(i,e){return i.visitExpressionStmt(this,e)}},Ar=class t extends Su{value;constructor(i,e=null,n){super(fa.None,e,n),this.value=i}isEquivalent(i){return i instanceof t&&this.value.isEquivalent(i.value)}visitStatement(i,e){return i.visitReturnStmt(this,e)}},Sx=class t extends Su{condition;trueCase;falseCase;constructor(i,e,n=[],o,r){super(fa.None,o,r),this.condition=i,this.trueCase=e,this.falseCase=n}isEquivalent(i){return i instanceof t&&this.condition.isEquivalent(i.condition)&&$s(this.trueCase,i.trueCase)&&$s(this.falseCase,i.falseCase)}visitStatement(i,e){return i.visitIfStmt(this,e)}};function pW(t=[]){return new yx(t)}function si(t,i,e){return new tc(t,i,e)}function Zt(t,i=null,e){return new Cu(t,null,i,e)}function ga(t,i,e){return new fl(t,i,e)}function uv(t){return new rf(t)}function oo(t,i,e){return new Lc(t,i,e)}function gl(t,i=null){return new ic(t.map(e=>new sf(e.key,e.value,e.quoted)),i,null)}function uW(t,i){return new C0(t,i)}function Nm(t,i,e,n,o){return new Am(t,i,e,n,o)}function Us(t,i,e,n){return new Nu(t,i,e,n)}function y1(t,i,e,n,o){return new Sx(t,i,e,n,o)}function hW(t,i,e,n){return new _0(t,i,e,n)}function Ee(t,i,e){return new _a(t,i,e)}function fW(t,i,e,n,o){return new xx(t,i,e,n,o)}function UR(t){let i="";if(t.tagName&&(i+=` @${t.tagName}`),t.text){if(t.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');i+=" "+t.text.replace(/@/g,"\\@")}return i}function gW(t){if(t.length===0)return"";if(t.length===1&&t[0].tagName&&!t[0].text)return`*${UR(t[0])} `;let i=`* `;for(let e of t)i+=" *",i+=UR(e).replace(/\n/g,` * `),i+=` `;return i+=" ",i}var _W="_c",vW={},bW=50,wx=class t extends Yi{resolved;original;shared=!1;constructor(i){super(i.type),this.resolved=i,this.original=i}visitExpression(i,e){return e===vW?this.original.visitExpression(i,e):this.resolved.visitExpression(i,e)}isEquivalent(i){return i instanceof t&&this.resolved.isEquivalent(i.resolved)}isConstant(){return!0}clone(){throw new Error("Not supported.")}fixup(i){this.resolved=i,this.shared=!0}},Mx=class{isClosureCompilerEnabled;statements=[];literals=new Map;literalFactories=new Map;sharedConstants=new Map;_claimedNames=new Map;nextNameIndex=0;constructor(i=!1){this.isClosureCompilerEnabled=i}getConstLiteral(i,e){if(i instanceof _a&&!GR(i)||i instanceof wx)return i;let n=y0.INSTANCE.keyOf(i),o=this.literals.get(n),r=!1;if(o||(o=new wx(i),this.literals.set(n,o),r=!0),!r&&!o.shared||r&&e){let a=this.freshName(),c,m;this.isClosureCompilerEnabled&&GR(i)?(c=new Am([],[new Ar(i)]),m=si(a).callFn([])):(c=i,m=si(a)),this.statements.push(new qr(a,c,ec,fa.Final)),o.fixup(m)}return o}getSharedConstant(i,e){let n=i.keyOf(e);if(!this.sharedConstants.has(n)){let o=this.freshName();this.sharedConstants.set(n,si(o)),this.statements.push(i.toSharedConstantDeclaration(o,e))}return this.sharedConstants.get(n)}getSharedFunctionReference(i,e,n=!0){let o=i instanceof Nu;for(let a of this.statements)if(o&&a instanceof qr&&a.value?.isEquivalent(i)||!o&&a instanceof x0&&i instanceof Am&&i.isEquivalent(a))return si(a.name);let r=n?this.uniqueName(e):e;return this.statements.push(i instanceof Am?i.toDeclStmt(r,fa.Final):new qr(r,i,ec,fa.Final,i.sourceSpan)),si(r)}uniqueName(i,e=!0){let n=this._claimedNames.get(i)??0,o=n===0&&!e?`${i}`:`${i}${n}`;return this._claimedNames.set(i,n+1),o}freshName(){return this.uniqueName(_W)}},y0=class t{static INSTANCE=new t;keyOf(i){if(i instanceof _a&&typeof i.value=="string")return`"${i.value}"`;if(i instanceof _a)return String(i.value);if(i instanceof af)return`/${i.body}/${i.flags??""}`;if(i instanceof Lc){let e=[];for(let n of i.entries)e.push(this.keyOf(n));return`[${e.join(",")}]`}else if(i instanceof ic){let e=[];for(let n of i.entries)if(n instanceof Om)e.push("..."+this.keyOf(n.expression));else{let o=n.key;n.quoted&&(o=`"${o}"`),e.push(o+":"+this.keyOf(n.value))}return`{${e.join(",")}}`}else{if(i instanceof Cu)return`import("${i.value.moduleName}", ${i.value.name})`;if(i instanceof tc)return`read(${i.name})`;if(i instanceof rf)return`typeof(${this.keyOf(i.expr)})`;if(i instanceof yu)return`...${this.keyOf(i.expression)}`;throw new Error(`${this.constructor.name} does not handle expressions of type ${i.constructor.name}`)}}};function GR(t){return t instanceof _a&&typeof t.value=="string"&&t.value.length>=bW}var xe="@angular/core",he=(()=>{class t{static core={name:null,moduleName:xe};static namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:xe};static namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:xe};static namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:xe};static element={name:"\u0275\u0275element",moduleName:xe};static elementStart={name:"\u0275\u0275elementStart",moduleName:xe};static elementEnd={name:"\u0275\u0275elementEnd",moduleName:xe};static domElement={name:"\u0275\u0275domElement",moduleName:xe};static domElementStart={name:"\u0275\u0275domElementStart",moduleName:xe};static domElementEnd={name:"\u0275\u0275domElementEnd",moduleName:xe};static domElementContainer={name:"\u0275\u0275domElementContainer",moduleName:xe};static domElementContainerStart={name:"\u0275\u0275domElementContainerStart",moduleName:xe};static domElementContainerEnd={name:"\u0275\u0275domElementContainerEnd",moduleName:xe};static domTemplate={name:"\u0275\u0275domTemplate",moduleName:xe};static domListener={name:"\u0275\u0275domListener",moduleName:xe};static advance={name:"\u0275\u0275advance",moduleName:xe};static syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:xe};static syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:xe};static attribute={name:"\u0275\u0275attribute",moduleName:xe};static classProp={name:"\u0275\u0275classProp",moduleName:xe};static elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:xe};static elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:xe};static elementContainer={name:"\u0275\u0275elementContainer",moduleName:xe};static styleMap={name:"\u0275\u0275styleMap",moduleName:xe};static classMap={name:"\u0275\u0275classMap",moduleName:xe};static styleProp={name:"\u0275\u0275styleProp",moduleName:xe};static interpolate={name:"\u0275\u0275interpolate",moduleName:xe};static interpolate1={name:"\u0275\u0275interpolate1",moduleName:xe};static interpolate2={name:"\u0275\u0275interpolate2",moduleName:xe};static interpolate3={name:"\u0275\u0275interpolate3",moduleName:xe};static interpolate4={name:"\u0275\u0275interpolate4",moduleName:xe};static interpolate5={name:"\u0275\u0275interpolate5",moduleName:xe};static interpolate6={name:"\u0275\u0275interpolate6",moduleName:xe};static interpolate7={name:"\u0275\u0275interpolate7",moduleName:xe};static interpolate8={name:"\u0275\u0275interpolate8",moduleName:xe};static interpolateV={name:"\u0275\u0275interpolateV",moduleName:xe};static nextContext={name:"\u0275\u0275nextContext",moduleName:xe};static resetView={name:"\u0275\u0275resetView",moduleName:xe};static templateCreate={name:"\u0275\u0275template",moduleName:xe};static defer={name:"\u0275\u0275defer",moduleName:xe};static deferWhen={name:"\u0275\u0275deferWhen",moduleName:xe};static deferOnIdle={name:"\u0275\u0275deferOnIdle",moduleName:xe};static deferOnImmediate={name:"\u0275\u0275deferOnImmediate",moduleName:xe};static deferOnTimer={name:"\u0275\u0275deferOnTimer",moduleName:xe};static deferOnHover={name:"\u0275\u0275deferOnHover",moduleName:xe};static deferOnInteraction={name:"\u0275\u0275deferOnInteraction",moduleName:xe};static deferOnViewport={name:"\u0275\u0275deferOnViewport",moduleName:xe};static deferPrefetchWhen={name:"\u0275\u0275deferPrefetchWhen",moduleName:xe};static deferPrefetchOnIdle={name:"\u0275\u0275deferPrefetchOnIdle",moduleName:xe};static deferPrefetchOnImmediate={name:"\u0275\u0275deferPrefetchOnImmediate",moduleName:xe};static deferPrefetchOnTimer={name:"\u0275\u0275deferPrefetchOnTimer",moduleName:xe};static deferPrefetchOnHover={name:"\u0275\u0275deferPrefetchOnHover",moduleName:xe};static deferPrefetchOnInteraction={name:"\u0275\u0275deferPrefetchOnInteraction",moduleName:xe};static deferPrefetchOnViewport={name:"\u0275\u0275deferPrefetchOnViewport",moduleName:xe};static deferHydrateWhen={name:"\u0275\u0275deferHydrateWhen",moduleName:xe};static deferHydrateNever={name:"\u0275\u0275deferHydrateNever",moduleName:xe};static deferHydrateOnIdle={name:"\u0275\u0275deferHydrateOnIdle",moduleName:xe};static deferHydrateOnImmediate={name:"\u0275\u0275deferHydrateOnImmediate",moduleName:xe};static deferHydrateOnTimer={name:"\u0275\u0275deferHydrateOnTimer",moduleName:xe};static deferHydrateOnHover={name:"\u0275\u0275deferHydrateOnHover",moduleName:xe};static deferHydrateOnInteraction={name:"\u0275\u0275deferHydrateOnInteraction",moduleName:xe};static deferHydrateOnViewport={name:"\u0275\u0275deferHydrateOnViewport",moduleName:xe};static deferEnableTimerScheduling={name:"\u0275\u0275deferEnableTimerScheduling",moduleName:xe};static conditionalCreate={name:"\u0275\u0275conditionalCreate",moduleName:xe};static conditionalBranchCreate={name:"\u0275\u0275conditionalBranchCreate",moduleName:xe};static conditional={name:"\u0275\u0275conditional",moduleName:xe};static repeater={name:"\u0275\u0275repeater",moduleName:xe};static repeaterCreate={name:"\u0275\u0275repeaterCreate",moduleName:xe};static repeaterTrackByIndex={name:"\u0275\u0275repeaterTrackByIndex",moduleName:xe};static repeaterTrackByIdentity={name:"\u0275\u0275repeaterTrackByIdentity",moduleName:xe};static componentInstance={name:"\u0275\u0275componentInstance",moduleName:xe};static text={name:"\u0275\u0275text",moduleName:xe};static enableBindings={name:"\u0275\u0275enableBindings",moduleName:xe};static disableBindings={name:"\u0275\u0275disableBindings",moduleName:xe};static getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:xe};static textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:xe};static textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:xe};static textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:xe};static textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:xe};static textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:xe};static textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:xe};static textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:xe};static textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:xe};static textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:xe};static textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:xe};static restoreView={name:"\u0275\u0275restoreView",moduleName:xe};static pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:xe};static pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:xe};static pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:xe};static pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:xe};static pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:xe};static pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:xe};static pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:xe};static pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:xe};static pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:xe};static pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:xe};static pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:xe};static pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:xe};static pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:xe};static pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:xe};static pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:xe};static domProperty={name:"\u0275\u0275domProperty",moduleName:xe};static ariaProperty={name:"\u0275\u0275ariaProperty",moduleName:xe};static property={name:"\u0275\u0275property",moduleName:xe};static control={name:"\u0275\u0275control",moduleName:xe};static controlCreate={name:"\u0275\u0275controlCreate",moduleName:xe};static animationEnterListener={name:"\u0275\u0275animateEnterListener",moduleName:xe};static animationLeaveListener={name:"\u0275\u0275animateLeaveListener",moduleName:xe};static animationEnter={name:"\u0275\u0275animateEnter",moduleName:xe};static animationLeave={name:"\u0275\u0275animateLeave",moduleName:xe};static i18n={name:"\u0275\u0275i18n",moduleName:xe};static i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:xe};static i18nExp={name:"\u0275\u0275i18nExp",moduleName:xe};static i18nStart={name:"\u0275\u0275i18nStart",moduleName:xe};static i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:xe};static i18nApply={name:"\u0275\u0275i18nApply",moduleName:xe};static i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:xe};static pipe={name:"\u0275\u0275pipe",moduleName:xe};static projection={name:"\u0275\u0275projection",moduleName:xe};static projectionDef={name:"\u0275\u0275projectionDef",moduleName:xe};static reference={name:"\u0275\u0275reference",moduleName:xe};static inject={name:"\u0275\u0275inject",moduleName:xe};static injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:xe};static directiveInject={name:"\u0275\u0275directiveInject",moduleName:xe};static invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:xe};static invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:xe};static templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:xe};static forwardRef={name:"forwardRef",moduleName:xe};static resolveForwardRef={name:"resolveForwardRef",moduleName:xe};static replaceMetadata={name:"\u0275\u0275replaceMetadata",moduleName:xe};static getReplaceMetadataURL={name:"\u0275\u0275getReplaceMetadataURL",moduleName:xe};static \u0275\u0275defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:xe};static declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:xe};static InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:xe};static resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:xe};static resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:xe};static resolveBody={name:"\u0275\u0275resolveBody",moduleName:xe};static getComponentDepsFactory={name:"\u0275\u0275getComponentDepsFactory",moduleName:xe};static defineComponent={name:"\u0275\u0275defineComponent",moduleName:xe};static declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:xe};static setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:xe};static ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:xe};static ViewEncapsulation={name:"ViewEncapsulation",moduleName:xe};static ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:xe};static FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:xe};static declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:xe};static FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:xe};static defineDirective={name:"\u0275\u0275defineDirective",moduleName:xe};static declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:xe};static DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:xe};static InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:xe};static InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:xe};static defineInjector={name:"\u0275\u0275defineInjector",moduleName:xe};static declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:xe};static NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:xe};static ModuleWithProviders={name:"ModuleWithProviders",moduleName:xe};static defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:xe};static declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:xe};static setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:xe};static registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:xe};static PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:xe};static definePipe={name:"\u0275\u0275definePipe",moduleName:xe};static declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:xe};static declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:xe};static declareClassMetadataAsync={name:"\u0275\u0275ngDeclareClassMetadataAsync",moduleName:xe};static setClassMetadata={name:"\u0275setClassMetadata",moduleName:xe};static setClassMetadataAsync={name:"\u0275setClassMetadataAsync",moduleName:xe};static setClassDebugInfo={name:"\u0275setClassDebugInfo",moduleName:xe};static queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:xe};static viewQuery={name:"\u0275\u0275viewQuery",moduleName:xe};static loadQuery={name:"\u0275\u0275loadQuery",moduleName:xe};static contentQuery={name:"\u0275\u0275contentQuery",moduleName:xe};static viewQuerySignal={name:"\u0275\u0275viewQuerySignal",moduleName:xe};static contentQuerySignal={name:"\u0275\u0275contentQuerySignal",moduleName:xe};static queryAdvance={name:"\u0275\u0275queryAdvance",moduleName:xe};static twoWayProperty={name:"\u0275\u0275twoWayProperty",moduleName:xe};static twoWayBindingSet={name:"\u0275\u0275twoWayBindingSet",moduleName:xe};static twoWayListener={name:"\u0275\u0275twoWayListener",moduleName:xe};static declareLet={name:"\u0275\u0275declareLet",moduleName:xe};static storeLet={name:"\u0275\u0275storeLet",moduleName:xe};static readContextLet={name:"\u0275\u0275readContextLet",moduleName:xe};static arrowFunction={name:"\u0275\u0275arrowFunction",moduleName:xe};static attachSourceLocations={name:"\u0275\u0275attachSourceLocations",moduleName:xe};static NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:xe};static ControlFeature={name:"\u0275\u0275ControlFeature",moduleName:xe};static InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:xe};static ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:xe};static HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:xe};static ExternalStylesFeature={name:"\u0275\u0275ExternalStylesFeature",moduleName:xe};static listener={name:"\u0275\u0275listener",moduleName:xe};static getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:xe};static sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:xe};static sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:xe};static validateAttribute={name:"\u0275\u0275validateAttribute",moduleName:xe};static sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:xe};static sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:xe};static sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:xe};static sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:xe};static trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:xe};static trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:xe};static inputDecorator={name:"Input",moduleName:xe};static outputDecorator={name:"Output",moduleName:xe};static viewChildDecorator={name:"ViewChild",moduleName:xe};static viewChildrenDecorator={name:"ViewChildren",moduleName:xe};static contentChildDecorator={name:"ContentChild",moduleName:xe};static contentChildrenDecorator={name:"ContentChildren",moduleName:xe};static InputSignalBrandWriteType={name:"\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE",moduleName:xe};static UnwrapDirectiveSignalInputs={name:"\u0275UnwrapDirectiveSignalInputs",moduleName:xe};static unwrapWritableSignal={name:"\u0275unwrapWritableSignal",moduleName:xe};static assertType={name:"\u0275assertType",moduleName:xe}}return t})(),CW=/-+([a-z0-9])/g;function xW(t){return t.replace(CW,(...i)=>i[1].toUpperCase())}function yW(t,i){return N6(t,":",i)}function SW(t,i){return N6(t,".",i)}function N6(t,i,e){let n=t.indexOf(i);return n==-1?e:[t.slice(0,n).trim(),t.slice(n+1).trim()]}function wW(t){let i=[];for(let e=0;e=55296&&n<=56319&&t.length>e+1){let o=t.charCodeAt(e+1);o>=56320&&o<=57343&&(e++,n=(n-55296<<10)+o-56320+65536)}n<=127?i.push(n):n<=2047?i.push(n>>6&31|192,n&63|128):n<=65535?i.push(n>>12|224,n>>6&63|128,n&63|128):n<=2097151&&i.push(n>>18&7|240,n>>12&63|128,n>>6&63|128,n&63|128)}return i}function R6(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(R6).join(", ")}]`;if(t==null)return""+t;let i=t.overriddenName||t.name;if(i)return`${i}`;if(!t.toString)return"object";let e=t.toString();if(e==null)return""+e;let n=e.indexOf(` `);return n>=0?e.slice(0,n):e}var nD=class{full;major;minor;patch;constructor(i){this.full=i;let e=i.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}},s0=globalThis,MW=/^([1-9]|1[0-8])\./;function F6(t){return t.startsWith("0.")?!0:!MW.test(t)}var kW=3,TW="# sourceMappingURL=data:application/json;base64,",iD=class{file;sourcesContent=new Map;lines=[];lastCol0=0;hasMappings=!1;constructor(i=null){this.file=i}addSource(i,e=null){return this.sourcesContent.has(i)||this.sourcesContent.set(i,e),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(i,e,n,o){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(e!=null&&!this.sourcesContent.has(e))throw new Error(`Unknown source file "${e}"`);if(i==null)throw new Error("The column in the generated code must be provided");if(i{i.set(p,h),e.push(p),n.push(this.sourcesContent.get(p)||null)});let o="",r=0,a=0,c=0,m=0;return this.lines.forEach(p=>{r=0,o+=p.map(h=>{let g=KC(h.col0-r);return r=h.col0,h.sourceUrl!=null&&(g+=KC(i.get(h.sourceUrl)-a),a=i.get(h.sourceUrl),g+=KC(h.sourceLine0-c),c=h.sourceLine0,g+=KC(h.sourceCol0-m),m=h.sourceCol0),g}).join(","),o+=";"}),o=o.slice(0,-1),{file:this.file||"",version:kW,sourceRoot:"",sources:e,sourcesContent:n,mappings:o}}toJsComment(){return this.hasMappings?"//"+TW+EW(JSON.stringify(this,null,0)):""}};function EW(t){let i="",e=wW(t);for(let n=0;n>2),i+=n0((o&3)<<4|(r===null?0:r>>4)),i+=r===null?"=":n0((r&15)<<2|(a===null?0:a>>6)),i+=r===null||a===null?"=":n0(a&63)}return i}function KC(t){t=t<0?(-t<<1)+1:t<<1;let i="";do{let e=t&31;t=t>>5,t>0&&(e=e|32),i+=n0(e)}while(t>0);return i}var DW="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n0(t){if(t<0||t>=64)throw new Error("Can only encode value in the range [0, 63]");return DW[t]}var PW=/'|\\|\n|\r|\$/g,IW=/^[$A-Z_][0-9A-Z_$]*$/i,oD=" ",kx=class{indent;partsLength=0;parts=[];srcSpans=[];constructor(i){this.indent=i}},AW=new Map([[ht.And,"&&"],[ht.Bigger,">"],[ht.BiggerEquals,">="],[ht.BitwiseOr,"|"],[ht.BitwiseAnd,"&"],[ht.Divide,"/"],[ht.Assign,"="],[ht.Equals,"=="],[ht.Identical,"==="],[ht.Lower,"<"],[ht.LowerEquals,"<="],[ht.Minus,"-"],[ht.Modulo,"%"],[ht.Exponentiation,"**"],[ht.Multiply,"*"],[ht.NotEquals,"!="],[ht.NotIdentical,"!=="],[ht.NullishCoalesce,"??"],[ht.Or,"||"],[ht.Plus,"+"],[ht.In,"in"],[ht.InstanceOf,"instanceof"],[ht.AdditionAssignment,"+="],[ht.SubtractionAssignment,"-="],[ht.MultiplicationAssignment,"*="],[ht.DivisionAssignment,"/="],[ht.RemainderAssignment,"%="],[ht.ExponentiationAssignment,"**="],[ht.AndAssignment,"&&="],[ht.OrAssignment,"||="],[ht.NullishCoalesceAssignment,"??="]]),rD=class t{_indent;static createRoot(){return new t(0)}_lines;constructor(i){this._indent=i,this._lines=[new kx(i)]}get _currentLine(){return this._lines[this._lines.length-1]}println(i,e=""){this.print(i||null,e,!0)}lineIsEmpty(){return this._currentLine.parts.length===0}lineLength(){return this._currentLine.indent*oD.length+this._currentLine.partsLength}print(i,e,n=!1){e.length>0&&(this._currentLine.parts.push(e),this._currentLine.partsLength+=e.length,this._currentLine.srcSpans.push(i&&i.sourceSpan||null)),n&&this._lines.push(new kx(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}toSource(){return this.sourceLines.map(i=>i.parts.length>0?WR(i.indent)+i.parts.join(""):"").join(` `)}toSourceMapGenerator(i,e=0){let n=new iD(i),o=!1,r=()=>{o||(n.addSource(i," ").addMapping(0,i,0,0),o=!0)};for(let a=0;a{n.addLine();let m=a.srcSpans,p=a.parts,h=a.indent*oD.length,g=0;for(;go)return n.srcSpans[r];o-=a.length}}return null}get sourceLines(){return this._lines.length&&this._lines[this._lines.length-1].parts.length===0?this._lines.slice(0,-1):this._lines}},aD=class{_escapeDollarInStrings;lastIfCondition=null;constructor(i){this._escapeDollarInStrings=i}printLeadingComments(i,e){if(i.leadingComments!==void 0)for(let n of i.leadingComments)n instanceof yx?e.print(i,`/*${n.toString()}*/`,n.trailingNewline):n.multiline?e.print(i,`/* ${n.text} */`,n.trailingNewline):n.text.split(` `).forEach(o=>{e.println(i,`// ${o}`)})}visitExpressionStmt(i,e){return this.printLeadingComments(i,e),i.expr.visitExpression(this,e),e.println(i,";"),null}visitReturnStmt(i,e){return this.printLeadingComments(i,e),e.print(i,"return "),i.value.visitExpression(this,e),e.println(i,";"),null}visitIfStmt(i,e){this.printLeadingComments(i,e),e.print(i,"if ("),this.lastIfCondition=i.condition,i.condition.visitExpression(this,e),this.lastIfCondition=null,e.print(i,") {");let n=i.falseCase!=null&&i.falseCase.length>0;return i.trueCase.length<=1&&!n?(e.print(i," "),this.visitAllStatements(i.trueCase,e),e.removeEmptyLastLine(),e.print(i," ")):(e.println(),e.incIndent(),this.visitAllStatements(i.trueCase,e),e.decIndent(),n&&(e.println(i,"} else {"),e.incIndent(),this.visitAllStatements(i.falseCase,e),e.decIndent())),e.println(i,"}"),null}visitInvokeFunctionExpr(i,e){let n=i.fn instanceof Nu;return n&&e.print(i.fn,"("),i.fn.visitExpression(this,e),n&&e.print(i.fn,")"),e.print(i,"("),this.visitAllExpressions(i.args,e,","),e.print(i,")"),null}visitTaggedTemplateLiteralExpr(i,e){return i.tag.visitExpression(this,e),i.template.visitExpression(this,e),null}visitTemplateLiteralExpr(i,e){e.print(i,"`");for(let n=0;n{n instanceof Om?(e.print(i,"..."),n.expression.visitExpression(this,e)):(e.print(i,`${su(n.key,this._escapeDollarInStrings,n.quoted)}:`),n.value.visitExpression(this,e))},i.entries,e,","),e.print(i,"}"),null}visitCommaExpr(i,e){return e.print(i,"("),this.visitAllExpressions(i.parts,e,","),e.print(i,")"),null}visitParenthesizedExpr(i,e){i.expr.visitExpression(this,e)}visitSpreadElementExpr(i,e){e.print(i,"..."),i.expression.visitExpression(this,e)}visitAllExpressions(i,e,n){this.visitAllObjects(o=>o.visitExpression(this,e),i,e,n)}visitAllObjects(i,e,n,o){let r=!1;for(let a=0;a0&&(n.lineLength()>80?(n.print(null,o,!0),r||(n.incIndent(),n.incIndent(),r=!0)):n.print(null,o,!1)),i(e[a]);r&&(n.decIndent(),n.decIndent())}visitAllStatements(i,e){i.forEach(n=>n.visitStatement(this,e))}};function su(t,i,e=!0){if(t==null)return null;let n=t.replace(PW,(...r)=>r[0]=="$"?i?"\\$":"$":r[0]==` `?"\\n":r[0]=="\r"?"\\r":`\\${r[0]}`);return e||!IW.test(n)?`'${n}'`:n}function WR(t){let i="";for(let e=0;en.value));return i?Us([],e):e}function PP(t,i){return{expression:t,forwardRef:i}}function FW({expression:t,forwardRef:i}){switch(i){case 0:case 1:return t;case 2:return LW(t)}}function LW(t){return Zt(he.forwardRef).callFn([Us([],t)])}var Tx=(function(t){return t[t.Class=0]="Class",t[t.Function=1]="Function",t})(Tx||{});function ou(t){let i=si("__ngFactoryType__"),e=null,n=XR(t)?i:new Mi(ht.Or,i,t.type.value),o=null;t.deps!==null?t.deps!=="invalid"&&(o=new v0(n,qR(t.deps,t.target))):(e=si(`\u0275${t.name}_BaseFactory`),o=e.callFn([n]));let r=[],a=null;function c(p){let h=si("__ngConditionalFactory__");r.push(new qr(h.name,lf,ec));let g=o!==null?h.set(o).toStmt():Zt(he.invalidFactory).callFn([]).toStmt();return r.push(y1(i,[g],[h.set(p).toStmt()])),h}if(XR(t)){let p=qR(t.delegateDeps,t.target),h=new(t.delegateType===Tx.Class?v0:fs)(t.delegate,p);a=c(h)}else $W(t)?a=c(t.expression):a=o;if(a===null)r.push(Zt(he.invalidFactory).callFn([]).toStmt());else if(e!==null){let p=Zt(he.getInheritedFactory).callFn([t.type.value]),h=new Mi(ht.Or,e,e.set(p));r.push(new Ar(h.callFn([n])))}else r.push(new Ar(a));let m=Nm([new Ir(i.name,hs)],r,ec,void 0,`${t.name}_Factory`);return e!==null&&(m=Us([],[new qr(e.name),new Ar(m)]).callFn([],void 0,!0)),{expression:m,statements:[],type:BW(t)}}function BW(t){let i=t.deps!==null&&t.deps!=="invalid"?zW(t.deps):Rc;return ga(Zt(he.FactoryDeclaration,[S1(t.type.type,t.typeArgumentCount),i]))}function qR(t,i){return t.map((e,n)=>VW(e,i,n))}function VW(t,i,e){if(t.token===null)return Zt(he.invalidFactoryDep).callFn([Ee(e)]);if(t.attributeNameType===null){let n=0|(t.self?2:0)|(t.skipSelf?4:0)|(t.host?1:0)|(t.optional?8:0)|(i===Td.Pipe?16:0),o=n!==0||t.optional?Ee(n):null,r=[t.token];o&&r.push(o);let a=HW(i);return Zt(a).callFn(r)}else return Zt(he.injectAttribute).callFn([t.token])}function zW(t){let i=!1,e=t.map(n=>{let o=jW(n);return o!==null?(i=!0,o):Ee(null)});return i?ga(oo(e)):Rc}function jW(t){let i=[];return t.attributeNameType!==null&&i.push({key:"attribute",value:t.attributeNameType,quoted:!1}),t.optional&&i.push({key:"optional",value:Ee(!0),quoted:!1}),t.host&&i.push({key:"host",value:Ee(!0),quoted:!1}),t.self&&i.push({key:"self",value:Ee(!0),quoted:!1}),t.skipSelf&&i.push({key:"skipSelf",value:Ee(!0),quoted:!1}),i.length>0?gl(i):null}function XR(t){return t.delegateType!==void 0}function $W(t){return t.expression!==void 0}function HW(t){switch(t){case Td.Component:case Td.Directive:case Td.Pipe:return he.directiveInject;case Td.NgModule:case Td.Injectable:default:return he.inject}}var wu=class{start;end;constructor(i,e){this.start=i,this.end=e}toAbsolute(i){return new zs(i+this.start,i+this.end)}},ho=class{span;sourceSpan;constructor(i,e){this.span=i,this.sourceSpan=e}toString(){return"AST"}},S0=class extends ho{nameSpan;constructor(i,e,n){super(i,e),this.nameSpan=n}},Da=class extends ho{visit(i,e=null){return i.visitEmptyExpr?.(this,e)}},Bc=class extends ho{visit(i,e=null){return i.visitImplicitReceiver(this,e)}},w0=class extends ho{visit(i,e=null){return i.visitThisReceiver?.(this,e)}},cf=class extends ho{expressions;constructor(i,e,n){super(i,e),this.expressions=n}visit(i,e=null){return i.visitChain(this,e)}},Ex=class extends ho{condition;trueExp;falseExp;constructor(i,e,n,o,r){super(i,e),this.condition=n,this.trueExp=o,this.falseExp=r}visit(i,e=null){return i.visitConditional(this,e)}},Ac=class extends S0{receiver;name;constructor(i,e,n,o,r){super(i,e,n),this.receiver=o,this.name=r}visit(i,e=null){return i.visitPropertyRead(this,e)}},M0=class extends S0{receiver;name;constructor(i,e,n,o,r){super(i,e,n),this.receiver=o,this.name=r}visit(i,e=null){return i.visitSafePropertyRead(this,e)}},Mu=class extends ho{receiver;key;constructor(i,e,n,o){super(i,e),this.receiver=n,this.key=o}visit(i,e=null){return i.visitKeyedRead(this,e)}},k0=class extends ho{receiver;key;constructor(i,e,n,o){super(i,e),this.receiver=n,this.key=o}visit(i,e=null){return i.visitSafeKeyedRead(this,e)}},dx=(function(t){return t[t.ReferencedByName=0]="ReferencedByName",t[t.ReferencedDirectly=1]="ReferencedDirectly",t})(dx||{}),Dx=class extends S0{exp;name;args;type;constructor(i,e,n,o,r,a,c){super(i,e,c),this.exp=n,this.name=o,this.args=r,this.type=a}visit(i,e=null){return i.visitPipe(this,e)}},ds=class extends ho{value;constructor(i,e,n){super(i,e),this.value=n}visit(i,e=null){return i.visitLiteralPrimitive(this,e)}},T0=class extends ho{expressions;constructor(i,e,n){super(i,e),this.expressions=n}visit(i,e=null){return i.visitLiteralArray(this,e)}},Px=class extends ho{expression;constructor(i,e,n){super(i,e),this.expression=n}visit(i,e=null){return i.visitSpreadElement(this,e)}},ku=class extends ho{keys;values;constructor(i,e,n,o){super(i,e),this.keys=n,this.values=o}visit(i,e=null){return i.visitLiteralMap(this,e)}},hv=class extends ho{strings;expressions;constructor(i,e,n,o){super(i,e),this.strings=n,this.expressions=o}visit(i,e=null){return i.visitInterpolation(this,e)}},Ha=class extends ho{operation;left;right;constructor(i,e,n,o,r){super(i,e),this.operation=n,this.left=o,this.right=r}visit(i,e=null){return i.visitBinary(this,e)}static isAssignmentOperation(i){return i==="="||i==="+="||i==="-="||i==="*="||i==="/="||i==="%="||i==="**="||i==="&&="||i==="||="||i==="??="}},tf=class t extends Ha{operator;expr;left=null;right=null;operation=null;static createMinus(i,e,n){return new t(i,e,"-",n,"-",new ds(i,e,0),n)}static createPlus(i,e,n){return new t(i,e,"+",n,"-",n,new ds(i,e,0))}constructor(i,e,n,o,r,a,c){super(i,e,r,a,c),this.operator=n,this.expr=o}visit(i,e=null){return i.visitUnary!==void 0?i.visitUnary(this,e):i.visitBinary(this,e)}},E0=class extends ho{expression;constructor(i,e,n){super(i,e),this.expression=n}visit(i,e=null){return i.visitPrefixNot(this,e)}},D0=class extends ho{expression;constructor(i,e,n){super(i,e),this.expression=n}visit(i,e=null){return i.visitTypeofExpression(this,e)}},P0=class extends ho{expression;constructor(i,e,n){super(i,e),this.expression=n}visit(i,e=null){return i.visitVoidExpression(this,e)}},I0=class extends ho{expression;constructor(i,e,n){super(i,e),this.expression=n}visit(i,e=null){return i.visitNonNullAssert(this,e)}},df=class extends ho{receiver;args;argumentSpan;constructor(i,e,n,o,r){super(i,e),this.receiver=n,this.args=o,this.argumentSpan=r}visit(i,e=null){return i.visitCall(this,e)}},Ix=class extends ho{receiver;args;argumentSpan;constructor(i,e,n,o,r){super(i,e),this.receiver=n,this.args=o,this.argumentSpan=r}visit(i,e=null){return i.visitSafeCall(this,e)}},A0=class extends ho{tag;template;constructor(i,e,n,o){super(i,e),this.tag=n,this.template=o}visit(i,e){return i.visitTaggedTemplateLiteral(this,e)}},O0=class extends ho{elements;expressions;constructor(i,e,n,o){super(i,e),this.elements=n,this.expressions=o}visit(i,e){return i.visitTemplateLiteral(this,e)}},Ax=class extends ho{text;constructor(i,e,n){super(i,e),this.text=n}visit(i,e){return i.visitTemplateLiteralElement(this,e)}},N0=class extends ho{expression;constructor(i,e,n){super(i,e),this.expression=n}visit(i,e){return i.visitParenthesizedExpression(this,e)}},sD=class{name;span;sourceSpan;constructor(i,e,n){this.name=i,this.span=e,this.sourceSpan=n}},Ox=class extends ho{parameters;body;constructor(i,e,n,o){super(i,e),this.parameters=n,this.body=o}visit(i,e){return i.visitArrowFunction(this,e)}},Nx=class extends ho{body;flags;constructor(i,e,n,o){super(i,e),this.body=n,this.flags=o}visit(i,e){return i.visitRegularExpressionLiteral(this,e)}},zs=class{start;end;constructor(i,e){this.start=i,this.end=e}},ps=class extends ho{ast;source;location;errors;constructor(i,e,n,o,r){super(new wu(0,e===null?0:e.length),new zs(o,e===null?o:o+e.length)),this.ast=i,this.source=e,this.location=n,this.errors=r}visit(i,e=null){return i.visitASTWithSource?i.visitASTWithSource(this,e):this.ast.visit(i,e)}toString(){return`${this.source} in ${this.location}`}},R0=class{sourceSpan;key;value;constructor(i,e,n){this.sourceSpan=i,this.key=e,this.value=n}},lD=class{sourceSpan;key;value;constructor(i,e,n){this.sourceSpan=i,this.key=e,this.value=n}},mf=class{visit(i,e){i.visit(this,e)}visitUnary(i,e){this.visit(i.expr,e)}visitBinary(i,e){this.visit(i.left,e),this.visit(i.right,e)}visitChain(i,e){this.visitAll(i.expressions,e)}visitConditional(i,e){this.visit(i.condition,e),this.visit(i.trueExp,e),this.visit(i.falseExp,e)}visitPipe(i,e){this.visit(i.exp,e),this.visitAll(i.args,e)}visitImplicitReceiver(i,e){}visitThisReceiver(i,e){}visitInterpolation(i,e){this.visitAll(i.expressions,e)}visitKeyedRead(i,e){this.visit(i.receiver,e),this.visit(i.key,e)}visitLiteralArray(i,e){this.visitAll(i.expressions,e)}visitLiteralMap(i,e){this.visitAll(i.values,e)}visitLiteralPrimitive(i,e){}visitPrefixNot(i,e){this.visit(i.expression,e)}visitTypeofExpression(i,e){this.visit(i.expression,e)}visitVoidExpression(i,e){this.visit(i.expression,e)}visitNonNullAssert(i,e){this.visit(i.expression,e)}visitPropertyRead(i,e){this.visit(i.receiver,e)}visitSafePropertyRead(i,e){this.visit(i.receiver,e)}visitSafeKeyedRead(i,e){this.visit(i.receiver,e),this.visit(i.key,e)}visitCall(i,e){this.visit(i.receiver,e),this.visitAll(i.args,e)}visitSafeCall(i,e){this.visit(i.receiver,e),this.visitAll(i.args,e)}visitTemplateLiteral(i,e){for(let n=0;nn!==null);DE(i,e)}visitTriggers(i,e,n){DE(n,i.map(o=>e[o]))}},zx=class extends gs{expression;groups;unknownBlocks;exhaustiveCheck;constructor(i,e,n,o,r,a,c,m){super(m,r,a,c),this.expression=i,this.groups=e,this.unknownBlocks=n,this.exhaustiveCheck=o}visit(i){return i.visitSwitchBlock(this)}},vD=class extends gs{expression;constructor(i,e,n,o,r){super(r,e,n,o),this.expression=i}visit(i){return i.visitSwitchBlockCase(this)}},z0=class extends gs{cases;children;i18n;constructor(i,e,n,o,r,a,c){super(a,n,o,r),this.cases=i,this.children=e,this.i18n=c}visit(i){return i.visitSwitchBlockCaseGroup(this)}},bD=class extends gs{constructor(i,e,n,o){super(o,i,e,n)}visit(i){return i.visitSwitchExhaustiveCheck(this)}},hf=class extends gs{item;expression;trackBy;trackKeywordSpan;contextVariables;children;empty;mainBlockSpan;i18n;constructor(i,e,n,o,r,a,c,m,p,h,g,M,C){super(M,m,h,g),this.item=i,this.expression=e,this.trackBy=n,this.trackKeywordSpan=o,this.contextVariables=r,this.children=a,this.empty=c,this.mainBlockSpan=p,this.i18n=C}visit(i){return i.visitForLoopBlock(this)}},j0=class extends gs{children;i18n;constructor(i,e,n,o,r,a){super(r,e,n,o),this.children=i,this.i18n=a}visit(i){return i.visitForLoopBlockEmpty(this)}},jx=class extends gs{branches;constructor(i,e,n,o,r){super(r,e,n,o),this.branches=i}visit(i){return i.visitIfBlock(this)}},pu=class extends gs{expression;children;expressionAlias;i18n;constructor(i,e,n,o,r,a,c,m){super(c,o,r,a),this.expression=i,this.children=e,this.expressionAlias=n,this.i18n=m}visit(i){return i.visitIfBlockBranch(this)}},$x=class{name;sourceSpan;nameSpan;constructor(i,e,n){this.name=i,this.sourceSpan=e,this.nameSpan=n}visit(i){return i.visitUnknownBlock(this)}},IP=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(i,e,n,o,r){this.name=i,this.value=e,this.sourceSpan=n,this.nameSpan=o,this.valueSpan=r}visit(i){return i.visitLetDeclaration(this)}},l0=class{componentName;tagName;fullName;attributes;inputs;outputs;directives;children;references;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,n,o,r,a,c,m,p,h,g,M,C,_){this.componentName=i,this.tagName=e,this.fullName=n,this.attributes=o,this.inputs=r,this.outputs=a,this.directives=c,this.children=m,this.references=p,this.isSelfClosing=h,this.sourceSpan=g,this.startSourceSpan=M,this.endSourceSpan=C,this.i18n=_}visit(i){return i.visitComponent(this)}},L6=class{name;attributes;inputs;outputs;references;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,n,o,r,a,c,m,p){this.name=i,this.attributes=e,this.inputs=n,this.outputs=o,this.references=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=m,this.i18n=p}visit(i){return i.visitDirective(this)}},js=class{tagName;attributes;inputs;outputs;directives;templateAttrs;children;references;variables;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,n,o,r,a,c,m,p,h,g,M,C,_){this.tagName=i,this.attributes=e,this.inputs=n,this.outputs=o,this.directives=r,this.templateAttrs=a,this.children=c,this.references=m,this.variables=p,this.isSelfClosing=h,this.sourceSpan=g,this.startSourceSpan=M,this.endSourceSpan=C,this.i18n=_}visit(i){return i.visitTemplate(this)}},ff=class{selector;attributes;children;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;name="ng-content";constructor(i,e,n,o,r,a,c,m){this.selector=i,this.attributes=e,this.children=n,this.isSelfClosing=o,this.sourceSpan=r,this.startSourceSpan=a,this.endSourceSpan=c,this.i18n=m}visit(i){return i.visitContent(this)}},Rm=class{name;value;sourceSpan;keySpan;valueSpan;constructor(i,e,n,o,r){this.name=i,this.value=e,this.sourceSpan=n,this.keySpan=o,this.valueSpan=r}visit(i){return i.visitVariable(this)}},$0=class{name;value;sourceSpan;keySpan;valueSpan;constructor(i,e,n,o,r){this.name=i,this.value=e,this.sourceSpan=n,this.keySpan=o,this.valueSpan=r}visit(i){return i.visitReference(this)}},B6=class{vars;placeholders;sourceSpan;i18n;constructor(i,e,n,o){this.vars=i,this.placeholders=e,this.sourceSpan=n,this.i18n=o}visit(i){return i.visitIcu(this)}},H0=class{tagNames;bindings;listeners;sourceSpan;constructor(i,e,n,o){if(this.tagNames=i,this.bindings=e,this.listeners=n,this.sourceSpan=o,i.length===0)throw new Error("HostElement must have at least one tag name.")}visit(){throw new Error("HostElement cannot be visited")}};function DE(t,i){let e=[];if(t.visit)for(let n of i)t.visit(n);else for(let n of i){let o=n.visit(t);o&&e.push(o)}return e}var Qa=class{nodes;placeholders;placeholderToMessage;meaning;description;customId;sources;id;legacyIds=[];messageString;constructor(i,e,n,o,r,a){this.nodes=i,this.placeholders=e,this.placeholderToMessage=n,this.meaning=o,this.description=r,this.customId=a,this.id=this.customId,this.messageString=GW(this.nodes),i.length?this.sources=[{filePath:i[0].sourceSpan.start.file.url,startLine:i[0].sourceSpan.start.line+1,startCol:i[0].sourceSpan.start.col+1,endLine:i[i.length-1].sourceSpan.end.line+1,endCol:i[0].sourceSpan.start.col+1}]:this.sources=[]}},W_=class{value;sourceSpan;constructor(i,e){this.value=i,this.sourceSpan=e}visit(i,e){return i.visitText(this,e)}},Pd=class{children;sourceSpan;constructor(i,e){this.children=i,this.sourceSpan=e}visit(i,e){return i.visitContainer(this,e)}},Hx=class{expression;type;cases;sourceSpan;expressionPlaceholder;constructor(i,e,n,o,r){this.expression=i,this.type=e,this.cases=n,this.sourceSpan=o,this.expressionPlaceholder=r}visit(i,e){return i.visitIcu(this,e)}},Fm=class{tag;attrs;startName;closeName;children;isVoid;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,n,o,r,a,c,m,p){this.tag=i,this.attrs=e,this.startName=n,this.closeName=o,this.children=r,this.isVoid=a,this.sourceSpan=c,this.startSourceSpan=m,this.endSourceSpan=p}visit(i,e){return i.visitTagPlaceholder(this,e)}},U0=class{value;name;sourceSpan;constructor(i,e,n){this.value=i,this.name=e,this.sourceSpan=n}visit(i,e){return i.visitPlaceholder(this,e)}},gf=class{value;name;sourceSpan;previousMessage;constructor(i,e,n){this.value=i,this.name=e,this.sourceSpan=n}visit(i,e){return i.visitIcuPlaceholder(this,e)}},Lm=class{name;parameters;startName;closeName;children;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,n,o,r,a,c,m){this.name=i,this.parameters=e,this.startName=n,this.closeName=o,this.children=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=m}visit(i,e){return i.visitBlockPlaceholder(this,e)}};function GW(t){let i=new CD;return t.map(n=>n.visit(i)).join("")}var CD=class{visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){let e=Object.keys(i.cases).map(n=>`${n} {${i.cases[n].visit(this)}}`);return`{${i.expressionPlaceholder}, ${i.type}, ${e.join(" ")}}`}visitTagPlaceholder(i){let e=i.children.map(n=>n.visit(this)).join("");return`{$${i.startName}}${e}{$${i.closeName}}`}visitPlaceholder(i){return`{$${i.name}}`}visitIcuPlaceholder(i){return`{$${i.name}}`}visitBlockPlaceholder(i){let e=i.children.map(n=>n.visit(this)).join("");return`{$${i.startName}}${e}{$${i.closeName}}`}};var WW=class{visitTag(i){let e=this._serializeAttributes(i.attrs);if(i.children.length==0)return`<${i.name}${e}/>`;let n=i.children.map(o=>o.visit(this));return`<${i.name}${e}>${n.join("")}`}visitText(i){return i.value}visitDeclaration(i){return``}_serializeAttributes(i){let e=Object.keys(i).map(n=>`${n}="${i[n]}"`).join(" ");return e.length>0?" "+e:""}visitDoctype(i){return``}},TFe=new WW;function qW(t){return t.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}var V6="i18n",xD="i18n-",XW="VAR_";function z6(t){return t===V6||t.startsWith(xD)}function QW(t){return t.attrs.some(i=>z6(i.name))}function j6(t){return t.nodes[0]}function AP(t={},i){let e={};return t&&Object.keys(t).length&&Object.keys(t).forEach(n=>e[fv(n,i)]=t[n]),e}function fv(t,i=!0){let e=qW(t);if(!i)return e;let n=e.split("_");if(n.length===1)return t.toLowerCase();let o;/^\d+$/.test(n[n.length-1])&&(o=n.pop());let r=n.shift().toLowerCase();return n.length&&(r+=n.map(a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join("")),o?`${r}_${o}`:r}var YW=/[-.]/,OP="_t",Gs="ctx",wf="rf";function $6(t,i){let e=null;return()=>(e||(t(new qr(OP,void 0,hs)),e=si(i)),e)}function Yh(t){return Array.isArray(t)?oo(t.map(Yh)):Ee(t,ec)}function YR(t,i){let e=Object.getOwnPropertyNames(t);return e.length===0?null:gl(e.map(n=>{let o=t[n],r,a,c,m;if(typeof o=="string")r=n,c=n,a=o,m=Yh(a);else{c=n,r=o.classPropertyName,a=o.bindingPropertyName;let p=a!==r,h=o.transformFunction!==null,g=t0.None;if(o.isSignal&&(g|=t0.SignalBased),h&&(g|=t0.HasDecoratorInputTransform),i&&(p||h||g!==t0.None)){let M=[Ee(g),Yh(a)];(p||h)&&(M.push(Yh(r)),h&&M.push(o.transformFunction)),m=oo(M)}else m=Yh(a)}return{key:c,quoted:YW.test(c),value:m}}))}var Bm=class{values=[];set(i,e){if(e){let n=this.values.find(o=>o.key===i);n?n.value=e:this.values.push({key:i,value:e,quoted:!1})}}toLiteralMap(){return gl(this.values)}};function KW(t){let i=t instanceof Vc?t.name:"ng-template",e=ZW(t),n=new of,o=oc(i)[1];return n.setElement(o),Object.getOwnPropertyNames(e).forEach(r=>{let a=oc(r)[1],c=e[r];n.addAttribute(a,c),r.toLowerCase()==="class"&&c.trim().split(/\s+/).forEach(p=>n.addClassName(p))}),n}function ZW(t){let i={};return t instanceof js&&t.tagName!=="ng-template"?t.templateAttrs.forEach(e=>i[e.name]=""):(t.attributes.forEach(e=>{z6(e.name)||(i[e.name]=e.value)}),t.inputs.forEach(e=>{(e.type===Li.Property||e.type===Li.TwoWay)&&(i[e.name]="")}),t.outputs.forEach(e=>{i[e.name]=""})),i}function KR(t,i){let e=null,n={name:t.name,type:t.type,typeArgumentCount:t.typeArgumentCount,deps:[],target:Td.Injectable};if(t.useClass!==void 0){let c=t.useClass.expression.isEquivalent(t.type.value),m;t.deps!==void 0&&(m=t.deps),m!==void 0?e=ou(tt(H({},n),{delegate:t.useClass.expression,delegateDeps:m,delegateType:Tx.Class})):c?e=ou(n):e={statements:[],expression:ZR(t.type.value,t.useClass.expression,i)}}else t.useFactory!==void 0?t.deps!==void 0?e=ou(tt(H({},n),{delegate:t.useFactory,delegateDeps:t.deps||[],delegateType:Tx.Function})):e={statements:[],expression:Us([],t.useFactory.callFn([]))}:t.useValue!==void 0?e=ou(tt(H({},n),{expression:t.useValue.expression})):t.useExisting!==void 0?e=ou(tt(H({},n),{expression:Zt(he.inject).callFn([t.useExisting.expression])})):e={statements:[],expression:ZR(t.type.value,t.type.value,i)};let o=t.type.value,r=new Bm;return r.set("token",o),r.set("factory",e.expression),t.providedIn.expression.value!==null&&r.set("providedIn",FW(t.providedIn)),{expression:Zt(he.\u0275\u0275defineInjectable).callFn([r.toLiteralMap()],void 0,!0),type:JW(t),statements:e.statements}}function JW(t){return new fl(Zt(he.InjectableDeclaration,[S1(t.type.type,t.typeArgumentCount)]))}function ZR(t,i,e){if(t.node===i.node)return i.prop("\u0275fac");if(!e)return JR(i);let n=Zt(he.resolveForwardRef).callFn([i]);return JR(n)}function JR(t){let i=new Ir("__ngFactoryType__",hs);return Us([i],t.prop("\u0275fac").callFn([si(i.name)]))}var ia=0,eq=8,NP=9,uu=10,H6=11,U6=12,RP=13,G6=32,yD=33,G0=34,W6=35,M1=36,tq=37,Ux=38,W0=39,qa=40,Pr=41,eF=42,q6=43,Pa=44,Gx=45,nu=46,ll=47,Pc=58,ms=59,nf=60,ta=61,Bs=62,tF=63,FP=48,nq=55,X6=57,Um=65,iq=69,oq=70,rq=88,Mf=90,Oc=91,hu=92,Ed=93,aq=94,Gm=95,Eu=97,sq=98,lq=101,LP=102,Q6=110,Y6=114,K6=116,Z6=117,J6=118,eL=120,gv=122,ml=123,nF=124,Ga=125,tL=160,jh=64,SD=96;function q0(t){return t>=NP&&t<=G6||t==tL}function cl(t){return FP<=t&&t<=X6}function Vm(t){return t>=Eu&&t<=gv||t>=Um&&t<=Mf}function cq(t){return t>=Eu&&t<=LP||t>=Um&&t<=oq||cl(t)}function Wx(t){return t===uu||t===RP}function iF(t){return FP<=t&&t<=nq}function c0(t){return t===W0||t===G0||t===SD}var X0=class t{file;offset;line;col;constructor(i,e,n,o){this.file=i,this.offset=e,this.line=n,this.col=o}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(i){let e=this.file.content,n=e.length,o=this.offset,r=this.line,a=this.col;for(;o>0&&i<0;)if(o--,i++,e.charCodeAt(o)==uu){r--;let m=e.substring(0,o-1).lastIndexOf(String.fromCharCode(uu));a=m>0?o-m:o}else a--;for(;o0;){let c=e.charCodeAt(o);o++,i--,c==uu?(r++,a=0):a++}return new t(this.file,o,r,a)}getContext(i,e){let n=this.file.content,o=this.offset;if(o!=null){o>n.length-1&&(o=n.length-1);let r=o,a=0,c=0;for(;a0&&(o--,a++,!(n[o]==` `&&++c==e)););for(a=0,c=0;a]${i.after}")`:this.msg}toString(){let i=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${i}`}};function dq(t,i,e){let n=`in ${t} ${i} in ${e}`,o=new qx("",n);return new bn(new X0(o,-1,-1,-1),new X0(o,-1,-1,-1))}var mq=0;function pq(t){if(!t||!t.reference)return null;let i=t.reference;if(i.__anonymousType)return i.__anonymousType;if(i.__forward_ref__)return"__forward_ref__";let e=R6(i);return e.indexOf("(")>=0?(e=`anonymous_${mq++}`,i.__anonymousType=e):e=ru(e),e}function ru(t){return t.replace(/\W/g,"_")}var oF='(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})',wD=class extends aD{constructor(){super(!1)}visitWrappedNodeExpr(i,e){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitDeclareVarStmt(i,e){return e.print(i,`var ${i.name}`),i.value&&(e.print(i," = "),i.value.visitExpression(this,e)),e.println(i,";"),null}visitTaggedTemplateLiteralExpr(i,e){let n=i.template.elements;return i.tag.visitExpression(this,e),e.print(i,`(${oF}(`),e.print(i,`[${n.map(o=>su(o.text,!1)).join(", ")}], `),e.print(i,`[${n.map(o=>su(o.rawText,!1)).join(", ")}])`),i.template.expressions.forEach(o=>{e.print(i,", "),o.visitExpression(this,e)}),e.print(i,")"),null}visitTemplateLiteralExpr(i,e){e.print(i,"`");for(let n=0;n"),Array.isArray(i.body))e.println(i,"{"),e.incIndent(),this.visitAllStatements(i.body,e),e.decIndent(),e.print(i,"}");else{let n=i.body instanceof ic;n&&e.print(i,"("),i.body.visitExpression(this,e),n&&e.print(i,")")}return null}visitDeclareFunctionStmt(i,e){return e.print(i,`function ${i.name}(`),this._visitParams(i.params,e),e.println(i,") {"),e.incIndent(),this.visitAllStatements(i.statements,e),e.decIndent(),e.println(i,"}"),null}visitLocalizedString(i,e){e.print(i,`$localize(${oF}(`);let n=[i.serializeI18nHead()];for(let o=1;osu(o.cooked,!1)).join(", ")}], `),e.print(i,`[${n.map(o=>su(o.raw,!1)).join(", ")}])`),i.expressions.forEach(o=>{e.print(i,", "),o.visitExpression(this,e)}),e.print(i,")"),null}_visitParams(i,e){this.visitAllObjects(n=>e.print(null,n.name),i,e,",")}},ZC;function uq(){if(ZC===void 0){let t=s0.trustedTypes;if(ZC=null,t)try{ZC=t.createPolicy("angular#unsafe-jit",{createScript:i=>i})}catch{}}return ZC}function hq(t){return uq()?.createScript(t)||t}function rF(...t){if(!s0.trustedTypes)return new Function(...t);let i=t.slice(0,-1).join(","),e=t[t.length-1],n=`(function anonymous(${i} ) { ${e} })`,o=s0.eval(hq(n));return o.bind===void 0?new Function(...t):(o.toString=()=>n,o.bind(s0))}var MD=class{evaluateStatements(i,e,n,o){let r=new kD(n),a=rD.createRoot();return e.length>0&&!fq(e[0])&&(e=[Ee("use strict").toStmt(),...e]),r.visitAllStatements(e,a),r.createReturnStmt(a),this.evaluateCode(i,a,r.getArgs(),o)}evaluateCode(i,e,n,o){let r=`"use strict";${e.toSource()} //# sourceURL=${i}`,a=[],c=[];for(let p in n)c.push(n[p]),a.push(p);if(o){let p=rF(...a.concat("return null;")).toString(),h=p.slice(0,p.indexOf("return null;")).split(` `).length-1;r+=` ${e.toSourceMapGenerator(i,h).toJsComment()}`}let m=rF(...a.concat(r));return this.executeFunction(m,c)}executeFunction(i,e){return i(...e)}},kD=class extends wD{refResolver;_evalArgNames=[];_evalArgValues=[];_evalExportedVars=[];constructor(i){super(),this.refResolver=i}createReturnStmt(i){new Ar(new ic(this._evalExportedVars.map(n=>new sf(n,si(n),!1)))).visitStatement(this,i)}getArgs(){let i={};for(let e=0;e0&&i.set("imports",oo(t.imports));let e=Zt(he.defineInjector).callFn([i.toLiteralMap()],void 0,!0),n=gq(t);return{expression:e,type:n,statements:[]}}function gq(t){return new fl(Zt(he.InjectorDeclaration,[new fl(t.type.type)]))}var TD=class{context;constructor(i){this.context=i}resolveExternalReference(i){if(i.moduleName!=="@angular/core")throw new Error(`Cannot resolve external reference to ${i.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(i.name))throw new Error(`No value provided for @angular/core symbol '${i.name}'.`);return this.context[i.name]}},Xx=(function(t){return t[t.Inline=0]="Inline",t[t.SideEffect=1]="SideEffect",t[t.Omit=2]="Omit",t})(Xx||{}),Im=(function(t){return t[t.Global=0]="Global",t[t.Local=1]="Local",t})(Im||{});function _q(t){let i=[],e=new Bm;if(e.set("type",t.type.value),t.kind===Im.Global&&t.bootstrap.length>0&&e.set("bootstrap",lu(t.bootstrap,t.containsForwardDecls)),t.selectorScopeMode===Xx.Inline)t.declarations.length>0&&e.set("declarations",lu(t.declarations,t.containsForwardDecls)),t.imports.length>0&&e.set("imports",lu(t.imports,t.containsForwardDecls)),t.exports.length>0&&e.set("exports",lu(t.exports,t.containsForwardDecls));else if(t.selectorScopeMode===Xx.SideEffect){let r=Cq(t);r!==null&&i.push(r)}t.schemas!==null&&t.schemas.length>0&&e.set("schemas",oo(t.schemas.map(r=>r.value))),t.id!==null&&(e.set("id",t.id),i.push(Zt(he.registerNgModuleType).callFn([t.type.value,t.id]).toStmt()));let n=Zt(he.defineNgModule).callFn([e.toLiteralMap()],void 0,!0),o=bq(t);return{expression:n,type:o,statements:i}}function vq(t){let i=new Bm;return i.set("type",new gi(t.type)),t.bootstrap!==void 0&&i.set("bootstrap",new gi(t.bootstrap)),t.declarations!==void 0&&i.set("declarations",new gi(t.declarations)),t.imports!==void 0&&i.set("imports",new gi(t.imports)),t.exports!==void 0&&i.set("exports",new gi(t.exports)),t.schemas!==void 0&&i.set("schemas",new gi(t.schemas)),t.id!==void 0&&i.set("id",new gi(t.id)),Zt(he.defineNgModule).callFn([i.toLiteralMap()])}function bq(t){if(t.kind===Im.Local)return new fl(t.type.value);let{type:i,declarations:e,exports:n,imports:o,includeImportTypes:r,publicDeclarationTypes:a}=t;return new fl(Zt(he.NgModuleDeclaration,[new fl(i.type),a===null?PE(e):xq(a),r?PE(o):Rc,PE(n)]))}function Cq(t){let i=new Bm;if(t.kind===Im.Global?t.declarations.length>0&&i.set("declarations",lu(t.declarations,t.containsForwardDecls)):t.declarationsExpression&&i.set("declarations",t.declarationsExpression),t.kind===Im.Global?t.imports.length>0&&i.set("imports",lu(t.imports,t.containsForwardDecls)):t.importsExpression&&i.set("imports",t.importsExpression),t.kind===Im.Global?t.exports.length>0&&i.set("exports",lu(t.exports,t.containsForwardDecls)):t.exportsExpression&&i.set("exports",t.exportsExpression),t.kind===Im.Local&&t.bootstrapExpression&&i.set("bootstrap",t.bootstrapExpression),Object.keys(i.values).length===0)return null;let e=new fs(Zt(he.setNgModuleScope),[t.type.value,i.toLiteralMap()]),n=NW(e),o=new Am([],[n.toStmt()]);return new fs(o,[]).toStmt()}function PE(t){let i=t.map(e=>uv(e.type));return t.length>0?ga(oo(i)):Rc}function xq(t){let i=t.map(e=>uv(e));return t.length>0?ga(oo(i)):Rc}function sF(t){let i=[];i.push({key:"name",value:Ee(t.pipeName??t.name),quoted:!1}),i.push({key:"type",value:t.type.value,quoted:!1}),i.push({key:"pure",value:Ee(t.pure),quoted:!1}),t.isStandalone===!1&&i.push({key:"standalone",value:Ee(!1),quoted:!1});let e=Zt(he.definePipe).callFn([gl(i)],void 0,!0),n=yq(t);return{expression:e,type:n,statements:[]}}function yq(t){return new fl(Zt(he.PipeDeclaration,[S1(t.type.type,t.typeArgumentCount),new fl(new _a(t.pipeName)),new fl(new _a(t.isStandalone))]))}var _f=(function(t){return t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule",t})(_f||{}),Sq=new Set(["inherit","initial","revert","unset","alternate","alternate-reverse","normal","reverse","backwards","both","forwards","none","paused","running","ease","ease-in","ease-in-out","ease-out","linear","step-start","step-end","end","jump-both","jump-end","jump-none","jump-start","start"]),wq=["@media","@supports","@document","@layer","@container","@scope","@starting-style"],ED=class{shimCssText(i,e,n=""){let o=[];i=i.replace(zq,c=>{if(c.match(jq))o.push(c);else{let m=c.match(Vq);o.push(m?.join("")??"")}return VP}),i=this._insertDirectives(i);let r=this._scopeCssText(i,e,n),a=0;return r.replace($q,()=>o[a++])}_insertDirectives(i){return i=this._insertPolyfillDirectivesInCssText(i),this._insertPolyfillRulesInCssText(i)}_scopeKeyframesRelatedCss(i,e){let n=new Set,o=JC(i,r=>this._scopeLocalKeyframeDeclarations(r,e,n));return JC(o,r=>this._scopeAnimationRule(r,e,n))}_scopeLocalKeyframeDeclarations(i,e,n){return tt(H({},i),{selector:i.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/,(o,r,a,c,m)=>(n.add(dF(c,a)),`${r}${a}${e}_${c}${a}${m}`))})}_scopeAnimationKeyframe(i,e,n){return i.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/,(o,r,a,c,m)=>(c=`${n.has(dF(c,a))?e+"_":""}${c}`,`${r}${a}${c}${a}${m}`))}_animationDeclarationKeyframesRe=/(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;_scopeAnimationRule(i,e,n){let o=i.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g,(r,a,c)=>a+c.replace(this._animationDeclarationKeyframesRe,(m,p,h="",g,M)=>g?`${p}${this._scopeAnimationKeyframe(`${h}${g}${h}`,e,n)}`:Sq.has(M)?m:`${p}${this._scopeAnimationKeyframe(M,e,n)}`));return o=o.replace(/((?:^|\s+|;)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g,(r,a,c)=>`${a}${c.split(",").map(m=>this._scopeAnimationKeyframe(m,e,n)).join(",")}`),tt(H({},i),{content:o})}_insertPolyfillDirectivesInCssText(i){return i.replace(kq,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(i){return i.replace(Tq,(...e)=>{let n=e[0].replace(e[1],"").replace(e[2],"");return e[4]+n})}_scopeCssText(i,e,n){let o=this._extractUnscopedRulesFromCssText(i);return i=this._insertPolyfillHostInCssText(i),i=this._convertColonHost(i),i=this._convertColonHostContext(i),i=this._convertShadowDOMSelectors(i),e&&(i=this._scopeKeyframesRelatedCss(i,e),i=this._scopeSelectors(i,e,n)),i=i+` `+o,i.trim()}_extractUnscopedRulesFromCssText(i){let e="",n;for(lF.lastIndex=0;(n=lF.exec(i))!==null;){let o=n[0].replace(n[2],"").replace(n[1],n[4]);e+=o+` `}return e}_convertColonHost(i){return i.replace(Iq,(e,n,o)=>{if(n){let r=[];for(let a of this._splitOnTopLevelCommas(n,!0)){let c=a.trim();if(!c)break;let m=Tm+c.replace(Qx,"")+o;r.push(m)}return r.join(",")}else return Tm+o})}*_splitOnTopLevelCommas(i,e){let n=i.length,o=0,r=0;for(let a=0;a{let o=[[]],r=e.indexOf(qh);for(;r!==-1;){let a=e.substring(r+qh.length);if(!a||a[0]!=="("){e=a,r=e.indexOf(qh);continue}let c=[],m=0;for(let h of this._splitOnTopLevelCommas(a.substring(1),!0)){m=m+h.length+1;let g=h.trim();g&&c.push(g)}let p=o.length;Jq(o,c.length);for(let h=0;hZq(a,e,n)).join(", ")})}_convertShadowDOMSelectors(i){return Rq.reduce((e,n)=>e.replace(n," "),i)}_scopeSelectors(i,e,n){return JC(i,o=>{let r=o.selector,a=o.content;return o.selector[0]!=="@"?r=this._scopeSelector({selector:r,scopeSelector:e,hostSelector:n,isParentSelector:!0}):wq.some(c=>o.selector.startsWith(c))?a=this._scopeSelectors(o.content,e,n):(o.selector.startsWith("@font-face")||o.selector.startsWith("@page"))&&(a=this._stripScopingSelectors(o.content)),new Q0(r,a)})}_stripScopingSelectors(i){return JC(i,e=>{let n=e.selector.replace(cF," ").replace(IE," ");return new Q0(n,e.content)})}_safeSelector;_shouldScopeIndicator;_scopeSelector({selector:i,scopeSelector:e,hostSelector:n,isParentSelector:o=!1}){let r=/ ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;return i.split(r).map(a=>a.split(cF)).map(a=>{let[c,...m]=a;return[(h=>this._selectorNeedsScoping(h,e)?this._applySelectorScope({selector:h,scopeSelector:e,hostSelector:n,isParentSelector:o}):h)(c),...m].join(" ")}).join(", ")}_selectorNeedsScoping(i,e){return!this._makeScopeMatcher(e).test(i)}_makeScopeMatcher(i){let e=/\[/g,n=/\]/g;return i=i.replace(e,"\\[").replace(n,"\\]"),new RegExp("^("+i+")"+Fq,"m")}_applySimpleSelectorScope(i,e,n){if(Kh.lastIndex=0,Kh.test(i)){let o=`[${n}]`,r=i;for(;r.match(IE);)r=r.replace(IE,(a,c)=>c.replace(/([^:\)]*)(:*)(.*)/,(m,p,h,g)=>p+o+h+g));return r.replace(Kh,o)}return e+" "+i}_applySelectorScope({selector:i,scopeSelector:e,hostSelector:n,isParentSelector:o}){let r=/\[is=([^\]]*)\]/g;e=e.replace(r,(w,...S)=>S[0]);let a=`[${e}]`,c=w=>{let S=w.trim();if(!S)return w;if(w.includes(Tm)){if(S=this._applySimpleSelectorScope(w,e,n),!w.match(Nq)){let[y,k,I,E]=S.match(/([^:]*)(:*)([\s\S]*)/);S=k+a+I+E}}else{let y=w.replace(Kh,"");if(y.length>0){let k=y.match(/([^:]*)(:*)([\s\S]*)/);k&&(S=k[1]+a+k[2]+k[3])}}return S},m=w=>{let S="",y=[],k;for(;(k=q_.exec(w))!==null;){let I=1,E=q_.lastIndex;for(;E{let[E]=I.match(q_)??[],N=I.slice(E?.length,-1);N.includes(Tm)&&(this._shouldScopeIndicator=!0);let T=this._scopeSelector({selector:N,scopeSelector:e,hostSelector:n});return`${E}${T})`}).join(""):(this._shouldScopeIndicator=this._shouldScopeIndicator||w.includes(Tm),S=this._shouldScopeIndicator?c(w):w),S};o&&(this._safeSelector=new DD(i),i=this._safeSelector.content());let p="",h=0,g,M=/( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g,C=i.includes(Tm);for((o||this._shouldScopeIndicator)&&(this._shouldScopeIndicator=!C);(g=M.exec(i))!==null;){let w=g[1],S=i.slice(h,g.index);if(S.match(/__esc-ph-(\d+)__/)&&i[g.index+1]?.match(/[a-fA-F\d]/))continue;let y=m(S);p+=`${y} ${w} `,h=M.lastIndex}let _=i.substring(h);return p+=m(_),this._safeSelector.restore(p)}_insertPolyfillHostInCssText(i){return i.replace(Bq,qh).replace(Lq,Qx)}},DD=class{placeholders=[];index=0;_content;constructor(i){i=this._escapeRegexMatches(i,/(\[[^\]]*\])/g),i=i.replace(/(\\.)/g,(e,n)=>{let o=`__esc-ph-${this.index}__`;return this.placeholders.push(n),this.index++,o}),this._content=i.replace(Pq,(e,n,o)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(`(${o})`),this.index++,n+r})}restore(i){return i.replace(/__(?:ph|esc-ph)-(\d+)__/g,(e,n)=>this.placeholders[+n])}content(){return this._content}_escapeRegexMatches(i,e){return i.replace(e,(n,o)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(o),this.index++,r})}},Mq="(:(where|is)\\()?",q_=/:(where|is)\(/gi,kq=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,Tq=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,lF=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Qx="-shadowcsshost",qh="-shadowcsscontext",PD="[^)(]*",Eq=String.raw`(?:\(${PD}\)|${PD})+?`,Dq=String.raw`(?:\(${Eq}\)|${PD})+?`,BP=String.raw`(?:\((${Dq})\))`,Pq=new RegExp(String.raw`(:nth-[-\w]+)`+BP,"g"),Iq=new RegExp(Qx+BP+"?([^,{]*)","gim"),Aq=qh+BP+"?([^{]*)",Oq=new RegExp(`${Mq}(${Aq})`,"gim"),Tm=Qx+"-no-combinator",Nq=new RegExp(`${Tm}(?![^(]*\\))`,"g"),IE=/-shadowcsshost-no-combinator([^\s,]*)/,Rq=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],cF=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,Fq="([>\\s~+[.,{:][\\s\\S]*)?$",Kh=/-shadowcsshost/gim,Lq=/:host/gim,Bq=/:host-context/gim,Vq=/\r?\n/g,zq=/\/\*[\s\S]*?\*\//g,jq=/\/\*\s*#\s*source(Mapping)?URL=/g,VP="%COMMENT%",$q=new RegExp(VP,"g"),AE="%BLOCK%",Hq=new RegExp(`(\\s*(?:${VP}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g"),Uq=new Map([["{","}"]]),nL="%COMMA_IN_PLACEHOLDER%",iL="%SEMI_IN_PLACEHOLDER%",oL="%COLON_IN_PLACEHOLDER%",Gq=new RegExp(nL,"g"),Wq=new RegExp(iL,"g"),qq=new RegExp(oL,"g"),Q0=class{selector;content;constructor(i,e){this.selector=i,this.content=e}};function JC(t,i){let e=Yq(t),n=Xq(e,Uq,AE),o=0,r=n.escapedString.replace(Hq,(...a)=>{let c=a[2],m="",p=a[4],h="";p&&p.startsWith("{"+AE)&&(m=n.blocks[o++],p=p.substring(AE.length+1),h="{");let g=i(new Q0(c,m));return`${a[1]}${g.selector}${a[3]}${h}${g.content}${p}`});return Kq(r)}var ID=class{escapedString;blocks;constructor(i,e){this.escapedString=i,this.blocks=e}};function Xq(t,i,e){let n=[],o=[],r=0,a=0,c=-1,m,p;for(let h=0;h0;){let a=r.length,c=t.pop();for(let m=0;mo?`${e}${a}${i}`:`${e}${a}${n}${i}, ${e}${a} ${n}${i}`).join(",")}function Jq(t,i){let e=t.length;for(let n=1;n{class t{static nextListId=0;debugListId=t.nextListId++;head={kind:B.ListEnd,next:null,prev:null,debugListId:this.debugListId};tail={kind:B.ListEnd,next:null,prev:null,debugListId:this.debugListId};constructor(){this.head.next=this.tail,this.tail.prev=this.head}push(e){if(Array.isArray(e)){for(let o of e)this.push(o);return}t.assertIsNotEnd(e),t.assertIsUnowned(e),e.debugListId=this.debugListId;let n=this.tail.prev;e.prev=n,n.next=e,e.next=this.tail,this.tail.prev=e}prepend(e){if(e.length===0)return;for(let r of e)t.assertIsNotEnd(r),t.assertIsUnowned(r),r.debugListId=this.debugListId;let n=this.head.next,o=this.head;for(let r of e)o.next=r,r.prev=o,o=r;o.next=n,n.prev=o}*[Symbol.iterator](){let e=this.head.next;for(;e!==this.tail;){t.assertIsOwned(e,this.debugListId);let n=e.next;yield e,e=n}}*reversed(){let e=this.tail.prev;for(;e!==this.head;){t.assertIsOwned(e,this.debugListId);let n=e.prev;yield e,e=n}}static replace(e,n){t.assertIsNotEnd(e),t.assertIsNotEnd(n),t.assertIsOwned(e),t.assertIsUnowned(n),n.debugListId=e.debugListId,e.prev!==null&&(e.prev.next=n,n.prev=e.prev),e.next!==null&&(e.next.prev=n,n.next=e.next),e.debugListId=null,e.prev=null,e.next=null}static replaceWithMany(e,n){if(n.length===0){t.remove(e);return}t.assertIsNotEnd(e),t.assertIsOwned(e);let o=e.debugListId;e.debugListId=null;for(let h of n)t.assertIsNotEnd(h),t.assertIsUnowned(h);let{prev:r,next:a}=e;e.prev=null,e.next=null;let c=r;for(let h of n)t.assertIsUnowned(h),h.debugListId=o,c.next=h,h.prev=c,h.next=null,c=h;let m=n[0],p=c;r!==null&&(r.next=m,m.prev=r),a!==null&&(a.prev=p,p.next=a)}static remove(e){t.assertIsNotEnd(e),t.assertIsOwned(e),e.prev.next=e.next,e.next.prev=e.prev,e.debugListId=null,e.prev=null,e.next=null}static insertBefore(e,n){if(Array.isArray(e)){for(let o of e)t.insertBefore(o,n);return}if(t.assertIsOwned(n),n.prev===null)throw new Error("AssertionError: illegal operation on list start");t.assertIsNotEnd(e),t.assertIsUnowned(e),e.debugListId=n.debugListId,e.prev=null,n.prev.next=e,e.prev=n.prev,e.next=n,n.prev=e}static insertAfter(e,n){if(t.assertIsOwned(n),n.next===null)throw new Error("AssertionError: illegal operation on list end");t.assertIsNotEnd(e),t.assertIsUnowned(e),e.debugListId=n.debugListId,n.next.prev=e,e.next=n.next,e.prev=n,n.next=e}static assertIsUnowned(e){if(e.debugListId!==null)throw new Error(`AssertionError: illegal operation on owned node: ${B[e.kind]}`)}static assertIsOwned(e,n){if(e.debugListId===null)throw new Error(`AssertionError: illegal operation on unowned node: ${B[e.kind]}`);if(n!==void 0&&e.debugListId!==n)throw new Error(`AssertionError: node belongs to the wrong list (expected ${n}, actual ${e.debugListId})`)}static assertIsNotEnd(e){if(e.kind===B.ListEnd)throw new Error("AssertionError: illegal operation on list head or tail")}}return t})();function Ws(t){return H({kind:B.Statement,statement:t},Cn)}function Dm(t,i,e,n){return H({kind:B.Variable,xref:t,variable:i,initializer:e,flags:n},Cn)}var Cn={debugListId:null,prev:null,next:null},rL=Symbol("ConsumesSlot"),zP=Symbol("DependsOnSlotContext"),Ru=Symbol("ConsumesVars"),_v=Symbol("UsesVarOffset"),_l={[rL]:!0,numSlotsUsed:1},_s={[zP]:!0},vs={[Ru]:!0};function Tf(t){return t[rL]===!0}function K0(t){return t[zP]===!0}function OE(t){return t[Ru]===!0}function mF(t){return t[_v]===!0}function eX(t,i,e){return H(H(H({kind:B.InterpolateText,target:t,interpolation:i,sourceSpan:e},_s),vs),Cn)}var er=class{strings;expressions;i18nPlaceholders;constructor(i,e,n){if(this.strings=i,this.expressions=e,this.i18nPlaceholders=n,n.length!==0&&n.length!==e.length)throw new Error(`Expected ${e.length} placeholders to match interpolation expression count, but got ${n.length}`)}};function Du(t,i,e,n,o,r,a,c,m,p,h){return H({kind:B.Binding,bindingKind:i,target:t,name:e,expression:n,unit:o,securityContext:r,isTextAttribute:a,isStructuralTemplateAttribute:c,templateKind:m,i18nContext:null,i18nMessage:p,sourceSpan:h},Cn)}function tX(t,i,e,n,o,r,a,c,m,p){return H(H(H({kind:B.Property,target:t,name:i,expression:e,bindingKind:n,securityContext:o,sanitizer:null,isStructuralTemplateAttribute:r,templateKind:a,i18nContext:c,i18nMessage:m,sourceSpan:p},_s),vs),Cn)}function nX(t,i,e,n,o,r,a,c,m){return H(H(H({kind:B.TwoWayProperty,target:t,name:i,expression:e,securityContext:n,sanitizer:null,isStructuralTemplateAttribute:o,templateKind:r,i18nContext:a,i18nMessage:c,sourceSpan:m},_s),vs),Cn)}function iX(t,i,e,n,o){return H(H(H({kind:B.StyleProp,target:t,name:i,expression:e,unit:n,sourceSpan:o},_s),vs),Cn)}function oX(t,i,e,n){return H(H(H({kind:B.ClassProp,target:t,name:i,expression:e,sourceSpan:n},_s),vs),Cn)}function rX(t,i,e){return H(H(H({kind:B.StyleMap,target:t,expression:i,sourceSpan:e},_s),vs),Cn)}function aX(t,i,e){return H(H(H({kind:B.ClassMap,target:t,expression:i,sourceSpan:e},_s),vs),Cn)}function pF(t,i,e,n,o,r,a,c,m,p){return H(H(H({kind:B.Attribute,target:t,namespace:i,name:e,expression:n,securityContext:o,sanitizer:null,isTextAttribute:r,isStructuralTemplateAttribute:a,templateKind:c,i18nContext:null,i18nMessage:m,sourceSpan:p},_s),vs),Cn)}function sX(t,i){return H({kind:B.Advance,delta:t,sourceSpan:i},Cn)}function aL(t,i,e,n){return H(H(H({kind:B.Conditional,target:t,test:i,conditions:e,processed:null,sourceSpan:n,contextValue:null},Cn),_s),vs)}function lX(t,i,e,n){return H(H({kind:B.Repeater,target:t,targetSlot:i,collection:e,sourceSpan:n},Cn),_s)}function uF(t,i,e,n,o,r,a){return H({kind:B.AnimationBinding,name:t,target:i,animationKind:e,expression:n,i18nMessage:null,securityContext:o,sanitizer:null,sourceSpan:r,animationBindingKind:a},Cn)}function cX(t,i,e,n){return H(H(H({kind:B.DeferWhen,target:t,expr:i,modifier:e,sourceSpan:n},Cn),_s),vs)}function sL(t,i,e,n,o,r,a,c,m,p,h){return H(H(H({kind:B.I18nExpression,context:t,target:i,i18nOwner:e,handle:n,expression:o,icuPlaceholder:r,i18nPlaceholder:a,resolutionTime:c,usage:m,name:p,sourceSpan:h},Cn),vs),_s)}function dX(t,i,e){return H({kind:B.I18nApply,owner:t,handle:i,sourceSpan:e},Cn)}function mX(t,i,e,n){return H(H(H({kind:B.StoreLet,target:t,declaredName:i,value:e,sourceSpan:n},_s),vs),Cn)}function pX(t,i){return H(H({kind:B.Control,sourceSpan:i,target:t},_s),Cn)}function jc(t){return t instanceof ro}var ro=class extends Yi{constructor(i=null){super(null,i)}},na=class t extends ro{name;kind=en.LexicalRead;constructor(i){super(),this.name=i}visitExpression(i,e){}isEquivalent(i){return this.name===i.name}isConstant(){return!1}transformInternalExpressions(){}clone(){return new t(this.name)}},Yx=class t extends ro{target;targetSlot;offset;kind=en.Reference;constructor(i,e,n){super(),this.target=i,this.targetSlot=e,this.offset=n}visitExpression(){}isEquivalent(i){return i instanceof t&&i.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new t(this.target,this.targetSlot,this.offset)}},Z0=class t extends ro{target;value;sourceSpan;kind=en.StoreLet;[Ru]=!0;[zP]=!0;constructor(i,e,n){super(),this.target=i,this.value=e,this.sourceSpan=n}visitExpression(){}isEquivalent(i){return i instanceof t&&i.target===this.target&&i.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(i,e){this.value=$t(this.value,i,e)}clone(){return new t(this.target,this.value,this.sourceSpan)}},J0=class t extends ro{target;targetSlot;kind=en.ContextLetReference;constructor(i,e){super(),this.target=i,this.targetSlot=e}visitExpression(){}isEquivalent(i){return i instanceof t&&i.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new t(this.target,this.targetSlot)}},zm=class t extends ro{view;kind=en.Context;constructor(i){super(),this.view=i}visitExpression(){}isEquivalent(i){return i instanceof t&&i.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new t(this.view)}},AD=class t extends ro{view;kind=en.TrackContext;constructor(i){super(),this.view=i}visitExpression(){}isEquivalent(i){return i instanceof t&&i.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new t(this.view)}},Kx=class t extends ro{kind=en.NextContext;steps=1;visitExpression(){}isEquivalent(i){return i instanceof t&&i.steps===this.steps}isConstant(){return!1}transformInternalExpressions(){}clone(){let i=new t;return i.steps=this.steps,i}},OD=class t extends ro{kind=en.GetCurrentView;constructor(){super()}visitExpression(){}isEquivalent(i){return i instanceof t}isConstant(){return!1}transformInternalExpressions(){}clone(){return new t}},ev=class t extends ro{view;kind=en.RestoreView;constructor(i){super(),this.view=i}visitExpression(i,e){typeof this.view!="number"&&this.view.visitExpression(i,e)}isEquivalent(i){return!(i instanceof t)||typeof i.view!=typeof this.view?!1:typeof this.view=="number"?this.view===i.view:this.view.isEquivalent(i.view)}isConstant(){return!1}transformInternalExpressions(i,e){typeof this.view!="number"&&(this.view=$t(this.view,i,e))}clone(){return new t(this.view instanceof Yi?this.view.clone():this.view)}},Zx=class t extends ro{expr;kind=en.ResetView;constructor(i){super(),this.expr=i}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof t&&this.expr.isEquivalent(i.expr)}isConstant(){return!1}transformInternalExpressions(i,e){this.expr=$t(this.expr,i,e)}clone(){return new t(this.expr.clone())}},Jx=class t extends ro{target;value;kind=en.TwoWayBindingSet;constructor(i,e){super(),this.target=i,this.value=e}visitExpression(i,e){this.target.visitExpression(i,e),this.value.visitExpression(i,e)}isEquivalent(i){return this.target.isEquivalent(i.target)&&this.value.isEquivalent(i.value)}isConstant(){return!1}transformInternalExpressions(i,e){this.target=$t(this.target,i,e),this.value=$t(this.value,i,e)}clone(){return new t(this.target,this.value)}},Id=class t extends ro{xref;kind=en.ReadVariable;name=null;constructor(i){super(),this.xref=i}visitExpression(){}isEquivalent(i){return i instanceof t&&i.xref===this.xref}isConstant(){return!1}transformInternalExpressions(){}clone(){let i=new t(this.xref);return i.name=this.name,i}},Pu=class t extends ro{kind=en.PureFunctionExpr;[Ru]=!0;[_v]=!0;varOffset=null;body;args;fn=null;constructor(i,e){super(),this.body=i,this.args=e}visitExpression(i,e){this.body?.visitExpression(i,e);for(let n of this.args)n.visitExpression(i,e)}isEquivalent(i){return!(i instanceof t)||i.args.length!==this.args.length?!1:i.body!==null&&this.body!==null&&i.body.isEquivalent(this.body)&&i.args.every((e,n)=>e.isEquivalent(this.args[n]))}isConstant(){return!1}transformInternalExpressions(i,e){this.body!==null?this.body=$t(this.body,i,e|$n.InChildOperation):this.fn!==null&&(this.fn=$t(this.fn,i,e));for(let n=0;ne.clone()));return i.fn=this.fn?.clone()??null,i.varOffset=this.varOffset,i}},jm=class t extends ro{index;kind=en.PureFunctionParameterExpr;constructor(i){super(),this.index=i}visitExpression(){}isEquivalent(i){return i instanceof t&&i.index===this.index}isConstant(){return!0}transformInternalExpressions(){}clone(){return new t(this.index)}},Iu=class t extends ro{target;targetSlot;name;args;kind=en.PipeBinding;[Ru]=!0;[_v]=!0;varOffset=null;constructor(i,e,n,o){super(),this.target=i,this.targetSlot=e,this.name=n,this.args=o}visitExpression(i,e){for(let n of this.args)n.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){for(let n=0;ne.clone()));return i.varOffset=this.varOffset,i}},tv=class t extends ro{target;targetSlot;name;args;numArgs;kind=en.PipeBindingVariadic;[Ru]=!0;[_v]=!0;varOffset=null;constructor(i,e,n,o,r){super(),this.target=i,this.targetSlot=e,this.name=n,this.args=o,this.numArgs=r}visitExpression(i,e){this.args.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.args=$t(this.args,i,e)}clone(){let i=new t(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return i.varOffset=this.varOffset,i}},vf=class t extends ro{receiver;name;kind=en.SafePropertyRead;constructor(i,e){super(),this.receiver=i,this.name=e}get index(){return this.name}visitExpression(i,e){this.receiver.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=$t(this.receiver,i,e)}clone(){return new t(this.receiver.clone(),this.name)}},bf=class t extends ro{receiver;index;kind=en.SafeKeyedRead;constructor(i,e,n){super(n),this.receiver=i,this.index=e}visitExpression(i,e){this.receiver.visitExpression(i,e),this.index.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=$t(this.receiver,i,e),this.index=$t(this.index,i,e)}clone(){return new t(this.receiver.clone(),this.index.clone(),this.sourceSpan)}},Au=class t extends ro{receiver;args;kind=en.SafeInvokeFunction;constructor(i,e){super(),this.receiver=i,this.args=e}visitExpression(i,e){this.receiver.visitExpression(i,e);for(let n of this.args)n.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=$t(this.receiver,i,e);for(let n=0;ni.clone()))}},Cf=class t extends ro{guard;expr;kind=en.SafeTernaryExpr;constructor(i,e){super(),this.guard=i,this.expr=e}visitExpression(i,e){this.guard.visitExpression(i,e),this.expr.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.guard=$t(this.guard,i,e),this.expr=$t(this.expr,i,e)}clone(){return new t(this.guard.clone(),this.expr.clone())}},nv=class t extends ro{kind=en.EmptyExpr;visitExpression(i,e){}isEquivalent(i){return i instanceof t}isConstant(){return!0}clone(){return new t}transformInternalExpressions(){}},$c=class t extends ro{expr;xref;kind=en.AssignTemporaryExpr;name=null;constructor(i,e){super(),this.expr=i,this.xref=e}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.expr=$t(this.expr,i,e)}clone(){let i=new t(this.expr.clone(),this.xref);return i.name=this.name,i}},$m=class t extends ro{xref;kind=en.ReadTemporaryExpr;name=null;constructor(i){super(),this.xref=i}visitExpression(i,e){}isEquivalent(){return this.xref===this.xref}isConstant(){return!1}transformInternalExpressions(i,e){}clone(){let i=new t(this.xref);return i.name=this.name,i}},e1=class t extends ro{slot;kind=en.SlotLiteralExpr;constructor(i){super(),this.slot=i}visitExpression(i,e){}isEquivalent(i){return i instanceof t&&i.slot===this.slot}isConstant(){return!0}clone(){return new t(this.slot)}transformInternalExpressions(){}},t1=class t extends ro{expr;target;targetSlot;alias;kind=en.ConditionalCase;constructor(i,e,n,o=null){super(),this.expr=i,this.target=e,this.targetSlot=n,this.alias=o}visitExpression(i,e){this.expr!==null&&this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof t&&i.expr===this.expr}isConstant(){return!0}clone(){return new t(this.expr,this.target,this.targetSlot)}transformInternalExpressions(i,e){this.expr!==null&&(this.expr=$t(this.expr,i,e))}},iv=class t extends ro{expr;kind=en.ConstCollected;constructor(i){super(),this.expr=i}transformInternalExpressions(i,e){this.expr=i(this.expr,e)}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof t?this.expr.isEquivalent(i.expr):!1}isConstant(){return this.expr.isConstant()}clone(){return new t(this.expr)}},ND=class t extends ro{parameters;body;kind=en.ArrowFunction;[Ru]=!0;[_v]=!0;contextName=Gs;currentViewName="view";varOffset=null;ops;constructor(i,e){super(),this.parameters=i,this.body=e,this.ops=new Ze,this.ops.push([Ws(new Ar(e,e.sourceSpan))])}visitExpression(i,e){for(let n of this.ops)wr(n,o=>{o.visitExpression(i,e)})}isEquivalent(i){return i instanceof t&&i.parameters.length===this.parameters.length&&i.parameters.every((e,n)=>e.isEquivalent(this.parameters[n]))&&i.body.isEquivalent(this.body)}isConstant(){return!1}transformInternalExpressions(i,e){for(let n of this.ops)tr(n,i,e|($n.InChildOperation|$n.InArrowFunctionOperation))}clone(){let i=new t(this.parameters,this.body);return i.varOffset=this.varOffset,i.ops=this.ops,i}};function wr(t,i){tr(t,(e,n)=>(i(e,n),e),$n.None)}var $n=(function(t){return t[t.None=0]="None",t[t.InChildOperation=1]="InChildOperation",t[t.InArrowFunctionOperation=2]="InArrowFunctionOperation",t})($n||{});function NE(t,i,e){for(let n=0;n$t(n,i,e));else if(t instanceof Nu)if(Array.isArray(t.body))for(let n=0;n{!a&&K0(c)&&c.target!==r.xref&&(a=!0)}),a)break;e=e.next}}}}function VX(t){if(!(!t.enableDebugLocations||t.relativeTemplatePath===null))for(let i of t.units){let e=[];for(let n of i.create)if(n.kind===B.ElementStart||n.kind===B.Element){let o=n.startSourceSpan.start;e.push({targetSlot:n.handle,offset:o.offset,line:o.line,column:o.col})}e.length>0&&i.create.push(IX(t.relativeTemplatePath,e))}}function _L(t){let i=new Map;for(let e of t.create)Tf(e)&&(i.set(e.xref,e),e.kind===B.RepeaterCreate&&e.emptyView!==null&&i.set(e.emptyView,e));return i}function zX(t){for(let i of t.units){let e=_L(i);for(let n of i.ops())switch(n.kind){case B.Attribute:jX(i,n,e);break;case B.Property:if(n.bindingKind!==Qt.LegacyAnimation&&n.bindingKind!==Qt.Animation){let o;n.i18nMessage!==null&&n.templateKind===null?o=Qt.I18n:n.isStructuralTemplateAttribute?o=Qt.Template:o=Qt.Property,Ze.insertBefore(ul(n.target,o,null,n.name,null,null,null,n.securityContext),Xh(e,n.target))}break;case B.TwoWayProperty:Ze.insertBefore(ul(n.target,Qt.TwoWayProperty,null,n.name,null,null,null,n.securityContext),Xh(e,n.target));break;case B.StyleProp:case B.ClassProp:n.expression instanceof nv&&Ze.insertBefore(ul(n.target,Qt.Property,null,n.name,null,null,null,uo.STYLE),Xh(e,n.target));break;case B.Listener:if(!n.isLegacyAnimationListener){let o=ul(n.target,Qt.Property,null,n.name,null,null,null,uo.NONE);if(t.kind===Vt.Host)break;Ze.insertBefore(o,Xh(e,n.target))}break;case B.TwoWayListener:if(t.kind!==Vt.Host){let o=ul(n.target,Qt.Property,null,n.name,null,null,null,uo.NONE);Ze.insertBefore(o,Xh(e,n.target))}break}}}function Xh(t,i){let e=t.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function jX(t,i,e){if(!(i.expression instanceof er)&&i.isTextAttribute){let n=ul(i.target,i.isStructuralTemplateAttribute?Qt.Template:Qt.Attribute,i.namespace,i.name,i.expression,i.i18nContext,i.i18nMessage,i.securityContext);if(t.job.kind===Vt.Host)t.create.push(n);else{let o=Xh(e,i.target);Ze.insertBefore(n,o)}Ze.remove(i)}}var hF="aria-";function vL(t){return t.startsWith(hF)&&t.length>hF.length}function $X(t,i){let e=t.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function HX(t){let i=new Map;for(let e of t.units)for(let n of e.create)Hm(n)&&i.set(n.xref,n);for(let e of t.units)for(let n of e.ops())if(n.kind===B.Binding)switch(n.bindingKind){case Qt.Attribute:if(n.name==="ngNonBindable"){Ze.remove(n);let o=$X(i,n.target);o.nonBindable=!0}else if(n.name.startsWith("animate."))Ze.replace(n,uF(n.name,n.target,n.name==="animate.enter"?"enter":"leave",n.expression,n.securityContext,n.sourceSpan,0));else{let[o,r]=oc(n.name);Ze.replace(n,pF(n.target,o,r,n.expression,n.securityContext,n.isTextAttribute,n.isStructuralTemplateAttribute,n.templateKind,n.i18nMessage,n.sourceSpan))}break;case Qt.Animation:Ze.replace(n,uF(n.name,n.target,n.name==="animate.enter"?"enter":"leave",n.expression,n.securityContext,n.sourceSpan,1));break;case Qt.Property:case Qt.LegacyAnimation:t.mode===cs.DomOnly&&vL(n.name)?Ze.replace(n,pF(n.target,null,n.name,n.expression,n.securityContext,!1,n.isStructuralTemplateAttribute,n.templateKind,n.i18nMessage,n.sourceSpan)):t.kind===Vt.Host?Ze.replace(n,OX(n.name,n.expression,n.bindingKind,n.i18nContext,n.securityContext,n.sourceSpan)):Ze.replace(n,tX(n.target,n.name,n.expression,n.bindingKind,n.securityContext,n.isStructuralTemplateAttribute,n.templateKind,n.i18nContext,n.i18nMessage,n.sourceSpan));break;case Qt.TwoWayProperty:if(!(n.expression instanceof Yi))throw new Error(`Expected value of two-way property binding "${n.name}" to be an expression`);Ze.replace(n,nX(n.target,n.name,n.expression,n.securityContext,n.isStructuralTemplateAttribute,n.templateKind,n.i18nContext,n.i18nMessage,n.sourceSpan));break;case Qt.I18n:case Qt.ClassName:case Qt.StyleProperty:throw new Error(`Unhandled binding of kind ${Qt[n.bindingKind]}`)}}var fF=new Map([[he.ariaProperty,he.ariaProperty],[he.attribute,he.attribute],[he.classProp,he.classProp],[he.element,he.element],[he.elementContainer,he.elementContainer],[he.elementContainerEnd,he.elementContainerEnd],[he.elementContainerStart,he.elementContainerStart],[he.elementEnd,he.elementEnd],[he.elementStart,he.elementStart],[he.domProperty,he.domProperty],[he.i18nExp,he.i18nExp],[he.listener,he.listener],[he.listener,he.listener],[he.property,he.property],[he.styleProp,he.styleProp],[he.syntheticHostListener,he.syntheticHostListener],[he.syntheticHostProperty,he.syntheticHostProperty],[he.templateCreate,he.templateCreate],[he.twoWayProperty,he.twoWayProperty],[he.twoWayListener,he.twoWayListener],[he.declareLet,he.declareLet],[he.conditionalCreate,he.conditionalBranchCreate],[he.conditionalBranchCreate,he.conditionalBranchCreate],[he.domElement,he.domElement],[he.domElementStart,he.domElementStart],[he.domElementEnd,he.domElementEnd],[he.domElementContainer,he.domElementContainer],[he.domElementContainerStart,he.domElementContainerStart],[he.domElementContainerEnd,he.domElementContainerEnd],[he.domListener,he.domListener],[he.domTemplate,he.domTemplate],[he.animationEnter,he.animationEnter],[he.animationLeave,he.animationLeave],[he.animationEnterListener,he.animationEnterListener],[he.animationLeaveListener,he.animationLeaveListener]]),UX=256;function GX(t){for(let i of t.units)gF(i.create),gF(i.update)}function gF(t){let i=null;for(let e of t){if(e.kind!==B.Statement||!(e.statement instanceof va)){i=null;continue}if(!(e.statement.expr instanceof fs)||!(e.statement.expr.fn instanceof Cu)){i=null;continue}let n=e.statement.expr.fn.value;if(!fF.has(n)){i=null;continue}if(i!==null&&fF.get(i.instruction)===n&&i.lengtho==="")&&(e.expression=e.expression.expressions[0])}function qX(t){for(let i of t.units)for(let e of i.ops()){if(e.kind!==B.Conditional)continue;let n,o=e.conditions.findIndex(c=>c.expr===null);if(o>=0){let c=e.conditions.splice(o,1)[0].targetSlot;n=new e1(c)}else n=Ee(-1);let r=e.test==null?null:new $c(e.test,t.allocateXrefId()),a=null;for(let c=e.conditions.length-1;c>=0;c--){let m=e.conditions[c];if(m.expr!==null){if(r!==null){let p=c===0?r:new $m(r.xref);m.expr=new Mi(ht.Identical,p,m.expr)}else m.alias!==null&&(a??=t.allocateXrefId(),m.expr=new $c(m.expr,a),e.contextValue=new $m(a));n=new Fc(m.expr,new e1(m.targetSlot),n)}}e.processed=n,e.conditions=[]}}var XX=new Map([["&&",ht.And],[">",ht.Bigger],[">=",ht.BiggerEquals],["|",ht.BitwiseOr],["&",ht.BitwiseAnd],["/",ht.Divide],["=",ht.Assign],["==",ht.Equals],["===",ht.Identical],["<",ht.Lower],["<=",ht.LowerEquals],["-",ht.Minus],["%",ht.Modulo],["**",ht.Exponentiation],["*",ht.Multiply],["!=",ht.NotEquals],["!==",ht.NotIdentical],["??",ht.NullishCoalesce],["||",ht.Or],["+",ht.Plus],["in",ht.In],["instanceof",ht.InstanceOf],["+=",ht.AdditionAssignment],["-=",ht.SubtractionAssignment],["*=",ht.MultiplicationAssignment],["/=",ht.DivisionAssignment],["%=",ht.RemainderAssignment],["**=",ht.ExponentiationAssignment],["&&=",ht.AndAssignment],["||=",ht.OrAssignment],["??=",ht.NullishCoalesceAssignment]]);function bL(t){let i=new Map([["svg",Ia.SVG],["math",Ia.Math]]);return t===null?Ia.HTML:i.get(t)??Ia.HTML}function QX(t){let i=new Map([["svg",Ia.SVG],["math",Ia.Math]]);for(let[e,n]of i.entries())if(n===t)return e;return null}function YX(t,i){return i===Ia.HTML?t:`:${QX(i)}:${t}`}function xf(t){return Array.isArray(t)?oo(t.map(xf)):Ee(t)}function KX(t){let i=new Map;for(let e of t.units)for(let n of e.create)if(n.kind===B.ExtractedAttribute){let o=i.get(n.target)||new FD;i.set(n.target,o),o.add(n.bindingKind,n.name,n.expression,n.namespace,n.trustedValueFn),Ze.remove(n)}if(t instanceof ov)for(let e of t.units)for(let n of e.create)if(n.kind==B.Projection){let o=i.get(n.xref);if(o!==void 0){let r=LD(o);r.entries.length>0&&(n.attributes=r)}}else Hm(n)&&(n.attributes=_F(t,i,n.xref),n.kind===B.RepeaterCreate&&n.emptyView!==null&&(n.emptyAttributes=_F(t,i,n.emptyView)));else if(t instanceof r1)for(let[e,n]of i.entries()){if(e!==t.root.xref)throw new Error("An attribute would be const collected into the host binding's template function, but is not associated with the root xref.");let o=LD(n);o.entries.length>0&&(t.root.attributes=o)}}function _F(t,i,e){let n=i.get(e);if(n!==void 0){let o=LD(n);if(o.entries.length>0)return t.addConst(o)}return null}var $h=Object.freeze([]),FD=class{known=new Map;byKind=new Map;propertyBindings=null;projectAs=null;get attributes(){return this.byKind.get(Qt.Attribute)??$h}get classes(){return this.byKind.get(Qt.ClassName)??$h}get styles(){return this.byKind.get(Qt.StyleProperty)??$h}get bindings(){return this.propertyBindings??$h}get template(){return this.byKind.get(Qt.Template)??$h}get i18n(){return this.byKind.get(Qt.I18n)??$h}isKnown(i,e){let n=this.known.get(i)??new Set;return this.known.set(i,n),n.has(e)?!0:(n.add(e),!1)}add(i,e,n,o,r){if(!(i===Qt.Attribute||i===Qt.ClassName||i===Qt.StyleProperty)&&this.isKnown(i,e))return;if(e==="ngProjectAs"){if(n===null||!(n instanceof _a)||n.value==null||typeof n.value?.toString()!="string")throw Error("ngProjectAs must have a string literal value");this.projectAs=n.value.toString()}let c=this.arrayFor(i);if(c.push(...ZX(o,e)),i===Qt.Attribute||i===Qt.StyleProperty){if(n===null)throw Error("Attribute, i18n attribute, & style element attributes must have a value");if(r!==null){if(!lL(n))throw Error("AssertionError: extracted attribute value should be string literal");c.push(hW(r,new b0([new Cx(n.value)],[]),void 0,n.sourceSpan))}else c.push(n)}}arrayFor(i){return i===Qt.Property||i===Qt.TwoWayProperty?(this.propertyBindings??=[],this.propertyBindings):(this.byKind.has(i)||this.byKind.set(i,[]),this.byKind.get(i))}};function ZX(t,i){let e=Ee(i);return t?[Ee(0),Ee(t),e]:[e]}function LD({attributes:t,bindings:i,classes:e,i18n:n,projectAs:o,styles:r,template:a}){let c=[...t];if(o!==null){let m=TP(o)[0];c.push(Ee(5),xf(m))}return e.length>0&&c.push(Ee(1),...e),r.length>0&&c.push(Ee(2),...r),i.length>0&&c.push(Ee(3),...i),a.length>0&&c.push(Ee(4),...a),n.length>0&&c.push(Ee(6),...n),oo(c)}function JX(t,i){let e=t.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function eQ(t){let i=new Map;for(let e of t.units)for(let n of e.create)Hm(n)&&i.set(n.xref,n);for(let e of t.units)for(let n of e.ops())if(n.kind===B.AnimationBinding){let o=tQ(n);t.kind===Vt.Host?e.create.push(o):Ze.insertAfter(o,JX(i,n.target)),Ze.remove(n)}}function tQ(t){if(t.animationBindingKind===0)return bX(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan);{let i=t.expression;return CX(t.name,t.target,t.name==="animate.enter"?"enter":"leave",[Ws(new Ar(i,i.sourceSpan))],t.securityContext,t.sourceSpan)}}function nQ(t){let i=new Map;for(let e of t.units){for(let n of e.create)n.kind===B.I18nAttributes&&i.set(n.target,n);for(let n of e.update)switch(n.kind){case B.Property:case B.Attribute:if(n.i18nContext===null||!(n.expression instanceof er))continue;let o=i.get(n.target);if(o===void 0)throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");if(o.target!==n.target)throw new Error("AssertionError: Expected i18nAttributes target element to match binding target element");let r=[];for(let a=0;a_Q(n,{job:t}),$n.None),tr(e,vQ,$n.None)}function Ls(t){return t instanceof xu?Ls(t.expr):t instanceof Mi?Ls(t.lhs)||Ls(t.rhs):t instanceof Fc?t.falseCase&&Ls(t.falseCase)?!0:Ls(t.condition)||Ls(t.trueCase):t instanceof C0?Ls(t.condition):t instanceof $c?Ls(t.expr):t instanceof Hs?Ls(t.receiver):t instanceof Ad?Ls(t.receiver)||Ls(t.index):t instanceof nc?Ls(t.expr):t instanceof fs||t instanceof Lc||t instanceof ic||t instanceof Au||t instanceof Iu}function pQ(t){let i=new Set;return $t(t,e=>(e instanceof $c&&i.add(e.xref),e),$n.None),i}function uQ(t,i,e){return $t(t,n=>{if(n instanceof $c&&i.has(n.xref)){let o=new $m(n.xref);return new $c(o,o.xref)}return n},$n.None),t}function Hh(t,i,e){let n;if(Ls(t)){let o=e.job.allocateXrefId();n=[new $c(t,o),new $m(o)]}else n=[t,t.clone()],uQ(n[1],pQ(n[0]));return new Cf(n[0],i(n[1]))}function hQ(t){return t instanceof vf||t instanceof bf||t instanceof Au}function fQ(t){return t instanceof Hs||t instanceof Ad||t instanceof fs}function CL(t){return hQ(t)||fQ(t)}function gQ(t){if(CL(t)&&t.receiver instanceof Cf){let i=t.receiver;for(;i.expr instanceof Cf;)i=i.expr;return i}return null}function _Q(t,i){if(!CL(t))return t;let e=gQ(t);if(e){if(t instanceof fs)return e.expr=e.expr.callFn(t.args),t.receiver;if(t instanceof Hs)return e.expr=e.expr.prop(t.name),t.receiver;if(t instanceof Ad)return e.expr=e.expr.key(t.index),t.receiver;if(t instanceof Au)return e.expr=Hh(e.expr,n=>n.callFn(t.args),i),t.receiver;if(t instanceof vf)return e.expr=Hh(e.expr,n=>n.prop(t.name),i),t.receiver;if(t instanceof bf)return e.expr=Hh(e.expr,n=>n.key(t.index),i),t.receiver}else{if(t instanceof Au)return Hh(t.receiver,n=>n.callFn(t.args),i);if(t instanceof vf)return Hh(t.receiver,n=>n.prop(t.name),i);if(t instanceof bf)return Hh(t.receiver,n=>n.key(t.index),i)}return t}function vQ(t){return t instanceof Cf?new nc(new Fc(new Mi(ht.Equals,t.guard,lf),lf,t.expr)):t}var vF="\uFFFD",bQ="#",CQ="*",xQ="/",yQ=":",SQ="[",wQ="]",MQ="|";function kQ(t){let i=new Map,e=new Map,n=new Map;for(let r of t.units)for(let a of r.create)switch(a.kind){case B.I18nContext:let c=TQ(t,a);r.create.push(c),i.set(a.xref,c),n.set(a.xref,a);break;case B.I18nStart:e.set(a.xref,a);break}let o=null;for(let r of t.units)for(let a of r.create)switch(a.kind){case B.IcuStart:o=a,Ze.remove(a);let c=n.get(a.context);if(c.contextKind!==du.Icu)continue;let m=e.get(c.i18nBlock);if(m.context===c.xref)continue;let p=e.get(m.root),h=i.get(p.context);if(h===void 0)throw Error("AssertionError: ICU sub-message should belong to a root message.");let g=i.get(c.xref);g.messagePlaceholder=a.messagePlaceholder,h.subMessages.push(g.xref);break;case B.IcuEnd:o=null,Ze.remove(a);break;case B.IcuPlaceholder:if(o===null||o.context==null)throw Error("AssertionError: Unexpected ICU placeholder outside of i18n context");i.get(o.context).postprocessingParams.set(a.name,Ee(EQ(a))),Ze.remove(a);break}}function TQ(t,i,e){let n=bF(i.params),o=bF(i.postprocessingParams),r=[...i.params.values()].some(a=>a.length>1);return TX(t.allocateXrefId(),i.xref,i.i18nBlock,i.message,null,n,o,r)}function EQ(t){if(t.strings.length!==t.expressionPlaceholders.length+1)throw Error(`AssertionError: Invalid ICU placeholder with ${t.strings.length} strings and ${t.expressionPlaceholders.length} expressions`);let i=t.expressionPlaceholders.map(Zh);return t.strings.flatMap((e,n)=>[e,i[n]||""]).join("")}function bF(t){let i=new Map;for(let[e,n]of t){let o=DQ(n);o!==null&&i.set(e,Ee(o))}return i}function DQ(t){if(t.length===0)return null;let i=t.map(e=>Zh(e));return i.length===1?i[0]:`${SQ}${i.join(MQ)}${wQ}`}function Zh(t){if(t.flags&vo.ElementTag&&t.flags&vo.TemplateTag){if(typeof t.value!="object")throw Error("AssertionError: Expected i18n param value to have an element and template slot");let o=Zh(tt(H({},t),{value:t.value.element,flags:t.flags&~vo.TemplateTag})),r=Zh(tt(H({},t),{value:t.value.template,flags:t.flags&~vo.ElementTag}));return t.flags&vo.OpenTag&&t.flags&vo.CloseTag?`${r}${o}${r}`:t.flags&vo.CloseTag?`${o}${r}`:`${r}${o}`}if(t.flags&vo.OpenTag&&t.flags&vo.CloseTag)return`${Zh(tt(H({},t),{flags:t.flags&~vo.CloseTag}))}${Zh(tt(H({},t),{flags:t.flags&~vo.OpenTag}))}`;if(t.flags===vo.None)return`${t.value}`;let i="",e="";t.flags&vo.ElementTag?i=bQ:t.flags&vo.TemplateTag&&(i=CQ),i!==""&&(e=t.flags&vo.CloseTag?xQ:"");let n=t.subTemplateIndex===null?"":`${yQ}${t.subTemplateIndex}`;return`${vF}${e}${i}${t.value}${n}${vF}`}function PQ(t){for(let i of t.units){let e=new Map;for(let o of i.create){if(Tf(o)){if(o.handle.slot===null)throw new Error("AssertionError: expected slots to have been allocated before generating advance() calls")}else continue;e.set(o.xref,o.handle.slot)}let n=0;for(let o of i.update){let r=null;if(K0(o)?r=o:wr(o,c=>{r===null&&K0(c)&&(r=c)}),r===null)continue;if(!e.has(r.target))throw new Error(`AssertionError: reference to unknown slot for target ${r.target}`);let a=e.get(r.target);if(n!==a){let c=a-n;if(c<0)throw new Error("AssertionError: slot counter should never need to move backwards");Ze.insertBefore(sX(c,r.sourceSpan),o),n=a}}}}function IQ(t){for(let i of t.units)for(let e of i.update){if(e.kind!==B.StoreLet)continue;let n={kind:oa.Identifier,name:null,identifier:e.declaredName,local:!0};Ze.replace(e,Dm(t.allocateXrefId(),n,new Z0(e.target,e.value,e.sourceSpan),pl.None))}}function AQ(t){let e=[],n=0;for(let o of t.units)for(let r of o.create)r.kind===B.Projection&&(e.push(r.selector),r.projectionSlotIndex=n++);if(e.length>0){let o=null;if(e.length>1||e[0]!=="*"){let r=e.map(a=>a==="*"?a:TP(a));o=t.pool.getConstLiteral(xf(r),!0)}t.contentSelectors=t.pool.getConstLiteral(xf(e),!0),t.root.create.prepend([SX(o)])}}function OQ(t){i0(t.root,null)}function i0(t,i){let e=CF(t,i);for(let n of t.create)switch(n.kind){case B.ConditionalCreate:case B.ConditionalBranchCreate:case B.Template:i0(t.job.views.get(n.xref),e);break;case B.Projection:n.fallbackView!==null&&i0(t.job.views.get(n.fallbackView),e);break;case B.RepeaterCreate:i0(t.job.views.get(n.xref),e),n.emptyView&&i0(t.job.views.get(n.emptyView),e),n.trackByOps!==null&&n.trackByOps.prepend(o0(t,e,!1));break;case B.Animation:case B.AnimationListener:case B.Listener:case B.TwoWayListener:n.handlerOps.prepend(o0(t,e,!0));break}t.update.prepend(o0(t,e,!1));for(let n of t.functions)n.ops.prepend(o0(t,CF(t,i),!0))}function CF(t,i){let e={view:t.xref,viewContextVariable:{kind:oa.Context,name:null,view:t.xref},contextVariables:new Map,aliases:t.aliases,references:[],letDeclarations:[],parent:i};for(let n of t.contextVariables.keys())e.contextVariables.set(n,{kind:oa.Identifier,name:null,identifier:n,local:!1});for(let n of t.create)switch(n.kind){case B.ElementStart:case B.ConditionalCreate:case B.ConditionalBranchCreate:case B.Template:if(!Array.isArray(n.localRefs))throw new Error("AssertionError: expected localRefs to be an array");for(let o=0;on instanceof iv?Ee(t.addConst(n.expr)):n,$n.None)}var xF="style.",yF="class.",RQ="style!",SF="class!",wF="!important";function FQ(t){for(let i of t.root.update)if(i.kind===B.Binding&&i.bindingKind===Qt.Property)if(i.name.endsWith(wF)&&(i.name=i.name.substring(0,i.name.length-wF.length)),i.name.startsWith(xF)){i.bindingKind=Qt.StyleProperty,i.name=i.name.substring(xF.length),LQ(i.name)||(i.name=BQ(i.name));let{property:e,suffix:n}=FE(i.name);i.name=e,i.unit=n}else i.name.startsWith(RQ)?(i.bindingKind=Qt.StyleProperty,i.name="style"):i.name.startsWith(yF)?(i.bindingKind=Qt.ClassName,i.name=FE(i.name.substring(yF.length)).property):i.name.startsWith(SF)&&(i.bindingKind=Qt.ClassName,i.name=FE(i.name.substring(SF.length)).property)}function LQ(t){return t.startsWith("--")}function BQ(t){return t.replace(/[a-z][A-Z]/g,i=>i.charAt(0)+"-"+i.charAt(1)).toLowerCase()}function FE(t){let i=t.indexOf("!important");i!==-1&&(t=i>0?t.substring(0,i):"");let e=null,n=t,o=t.lastIndexOf(".");return o>0&&(e=t.slice(o+1),n=t.substring(0,o)),{property:n,suffix:e}}function BD(t,i=!1){return gl(Object.keys(t).map(e=>({key:e,quoted:i,value:t[e]})))}var VD=class{visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){let e=Object.keys(i.cases).map(o=>`${o} {${i.cases[o].visit(this)}}`);return`{${i.expressionPlaceholder}, ${i.type}, ${e.join(" ")}}`}visitTagPlaceholder(i){return i.isVoid?this.formatPh(i.startName):`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitPlaceholder(i){return this.formatPh(i.name)}visitBlockPlaceholder(i){return`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitIcuPlaceholder(i,e){return this.formatPh(i.name)}formatPh(i){return`{${fv(i,!1)}}`}},VQ=new VD;function xL(t){return t.visit(VQ)}var Od=class{sourceSpan;i18n;constructor(i,e){this.sourceSpan=i,this.i18n=e}},Ou=class extends Od{value;tokens;constructor(i,e,n,o){super(e,o),this.value=i,this.tokens=n}visit(i,e){return i.visitText(this,e)}},fu=class extends Od{switchValue;type;cases;switchValueSourceSpan;constructor(i,e,n,o,r,a){super(o,a),this.switchValue=i,this.type=e,this.cases=n,this.switchValueSourceSpan=r}visit(i,e){return i.visitExpansion(this,e)}},a1=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(i,e,n,o,r){this.value=i,this.expression=e,this.sourceSpan=n,this.valueSourceSpan=o,this.expSourceSpan=r}visit(i,e){return i.visitExpansionCase(this,e)}},zD=class extends Od{name;value;keySpan;valueSpan;valueTokens;constructor(i,e,n,o,r,a,c){super(n,c),this.name=i,this.value=e,this.keySpan=o,this.valueSpan=r,this.valueTokens=a}visit(i,e){return i.visitAttribute(this,e)}},sl=class extends Od{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;isVoid;constructor(i,e,n,o,r,a,c,m=null,p,h){super(a,h),this.name=i,this.attrs=e,this.directives=n,this.children=o,this.isSelfClosing=r,this.startSourceSpan=c,this.endSourceSpan=m,this.isVoid=p}visit(i,e){return i.visitElement(this,e)}},rv=class{value;sourceSpan;constructor(i,e){this.value=i,this.sourceSpan=e}visit(i,e){return i.visitComment(this,e)}},dl=class extends Od{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(i,e,n,o,r,a,c=null,m){super(o,m),this.name=i,this.parameters=e,this.children=n,this.nameSpan=r,this.startSourceSpan=a,this.endSourceSpan=c}visit(i,e){return i.visitBlock(this,e)}},Ua=class extends Od{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;constructor(i,e,n,o,r,a,c,m,p,h=null,g){super(m,g),this.componentName=i,this.tagName=e,this.fullName=n,this.attrs=o,this.directives=r,this.children=a,this.isSelfClosing=c,this.startSourceSpan=p,this.endSourceSpan=h}visit(i,e){return i.visitComponent(this,e)}},jD=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,n,o,r=null){this.name=i,this.attrs=e,this.sourceSpan=n,this.startSourceSpan=o,this.endSourceSpan=r}visit(i,e){return i.visitDirective(this,e)}},s1=class{expression;sourceSpan;constructor(i,e){this.expression=i,this.sourceSpan=e}visit(i,e){return i.visitBlockParameter(this,e)}},l1=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(i,e,n,o,r){this.name=i,this.value=e,this.sourceSpan=n,this.nameSpan=o,this.valueSpan=r}visit(i,e){return i.visitLetDeclaration(this,e)}};function Do(t,i,e=null){let n=[],o=t.visit?r=>t.visit(r,e)||r.visit(t,e):r=>r.visit(t,e);return i.forEach(r=>{let a=o(r);a&&n.push(a)}),n}var av={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` `,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},yL="\uE500";av.ngsp=yL;var $D=class{tokens;errors;nonNormalizedIcuExpressions;constructor(i,e,n){this.tokens=i,this.errors=e,this.nonNormalizedIcuExpressions=n}};function zQ(t,i,e,n={}){let o=new UD(new qx(t,i),e,n);return o.tokenize(),new $D(YQ(o.tokens),o.errors,o.nonNormalizedIcuExpressions)}var jQ=/\r\n?/g;function Uh(t){return`Unexpected character "${t===ia?"EOF":String.fromCharCode(t)}"`}function MF(t){return`Unknown entity "${t}" - use the "&#;" or "&#x;" syntax`}function $Q(t,i){return`Unable to parse entity "${i}" - ${t} character reference entities must end with ";"`}var HD=(function(t){return t.HEX="hexadecimal",t.DEC="decimal",t})(HD||{}),HQ=["@if","@else","@for","@switch","@case","@default","@empty","@defer","@placeholder","@loading","@error"],X_={start:"{{",end:"}}"},UD=class{_getTagDefinition;_cursor;_tokenizeIcu;_leadingTriviaCodePoints;_currentTokenStart=null;_currentTokenType=null;_expansionCaseStack=[];_openDirectiveCount=0;_inInterpolation=!1;_preserveLineEndings;_i18nNormalizeLineEndingsInICUs;_tokenizeBlocks;_tokenizeLet;_selectorlessEnabled;tokens=[];errors=[];nonNormalizedIcuExpressions=[];constructor(i,e,n){this._getTagDefinition=e,this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(r=>r.codePointAt(0)||0);let o=n.range||{endPos:i.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new GD(i,o):new c1(i,o),this._preserveLineEndings=n.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=n.tokenizeBlocks??!0,this._tokenizeLet=n.tokenizeLet??!0,this._selectorlessEnabled=n.selectorlessEnabled??!1;try{this._cursor.init()}catch(r){this.handleError(r)}}_processCarriageReturns(i){return this._preserveLineEndings?i:i.replace(jQ,` `)}tokenize(){for(;this._cursor.peek()!==ia;){let i=this._cursor.clone();try{this._attemptCharCode(nf)?this._attemptCharCode(yD)?this._attemptCharCode(Oc)?this._consumeCdata(i):this._attemptCharCode(Gx)?this._consumeComment(i):this._consumeDocType(i):this._attemptCharCode(ll)?this._consumeTagClose(i):this._consumeTagOpen(i):this._tokenizeLet&&this._cursor.peek()===jh&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(i):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(i):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(Ga)?this._consumeBlockEnd(i):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(41),this._endToken([])}_getBlockName(){let i=!1,e=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>q0(n)?!i:QQ(n)?(i=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeBlockStart(i){this._requireCharCode(jh),this._beginToken(24,i);let e=this._endToken([this._getBlockName()]);if(e.parts[0]==="default never"&&this._attemptCharCode(ms)){this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([]);return}if(this._cursor.peek()===qa)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Wo),this._attemptCharCode(Pr))this._attemptCharCodeUntilFn(Wo);else{e.type=28;return}this._attemptCharCode(ml)?(this._beginToken(25),this._endToken([])):this._isBlockStart()&&(e.parts[0]==="case"||e.parts[0]==="default")?(this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([])):e.type=28}_consumeBlockEnd(i){this._beginToken(26,i),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(TF);this._cursor.peek()!==Pr&&this._cursor.peek()!==ia;){this._beginToken(27);let i=this._cursor.clone(),e=null,n=0;for(;this._cursor.peek()!==ms&&this._cursor.peek()!==ia||e!==null;){let o=this._cursor.peek();if(o===hu)this._cursor.advance();else if(o===e)e=null;else if(e===null&&c0(o))e=o;else if(o===qa&&e===null)n++;else if(o===Pr&&e===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(i)]),this._attemptCharCodeUntilFn(TF)}}_consumeLetDeclaration(i){if(this._requireStr("@let"),this._beginToken(29,i),q0(this._cursor.peek()))this._attemptCharCodeUntilFn(Wo);else{let o=this._endToken([this._cursor.getChars(i)]);o.type=32;return}let e=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(Wo),!this._attemptCharCode(ta)){e.type=32;return}this._attemptCharCodeUntilFn(o=>Wo(o)&&!Wx(o)),this._consumeLetDeclarationValue(),this._cursor.peek()===ms?(this._beginToken(31),this._endToken([]),this._cursor.advance()):(e.type=32,e.sourceSpan=this._cursor.getSpan(i))}_getLetDeclarationName(){let i=this._cursor.clone(),e=!1;return this._attemptCharCodeUntilFn(n=>Vm(n)||n===M1||n===Gm||e&&cl(n)?(e=!0,!1):!0),this._cursor.getChars(i).trim()}_consumeLetDeclarationValue(){let i=this._cursor.clone();for(this._beginToken(30,i);this._cursor.peek()!==ia;){let e=this._cursor.peek();if(e===ms)break;c0(e)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(n=>n===hu?(this._cursor.advance(),!1):n===e)),this._cursor.advance()}this._endToken([this._cursor.getChars(i)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(qQ(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===Ga){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(i,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=i}_endToken(i,e){if(this._currentTokenStart===null)throw new mn(this._cursor.getSpan(e),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new mn(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let n={type:this._currentTokenType,parts:i,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(i,e){this._isInExpansionForm()&&(i+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new mn(e,i);return this._currentTokenStart=null,this._currentTokenType=null,n}handleError(i){if(i instanceof sv&&(i=this._createError(i.msg,this._cursor.getSpan(i.cursor))),i instanceof mn)this.errors.push(i);else throw i}_attemptCharCode(i){return this._cursor.peek()===i?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(i){return XQ(this._cursor.peek(),i)?(this._cursor.advance(),!0):!1}_requireCharCode(i){let e=this._cursor.clone();if(!this._attemptCharCode(i))throw this._createError(Uh(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(i){let e=i.length;if(this._cursor.charsLeft()this._peekStr(i))}_isLetStart(){return this._cursor.peek()===jh&&this._peekStr("@let")}_consumeEntity(i){this._beginToken(9);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(W6)){let n=this._attemptCharCode(eL)||this._attemptCharCode(rq),o=this._cursor.clone();if(this._attemptCharCodeUntilFn(GQ),this._cursor.peek()!=ms){this._cursor.advance();let a=n?HD.HEX:HD.DEC;throw this._createError($Q(a,this._cursor.getChars(e)),this._cursor.getSpan())}let r=this._cursor.getChars(o);this._cursor.advance();try{let a=parseInt(r,n?16:10);this._endToken([String.fromCodePoint(a),this._cursor.getChars(e)])}catch{throw this._createError(MF(this._cursor.getChars(e)),this._cursor.getSpan())}}else{let n=this._cursor.clone();if(this._attemptCharCodeUntilFn(WQ),this._cursor.peek()!=ms)this._beginToken(i,e),this._cursor=n,this._endToken(["&"]);else{let o=this._cursor.getChars(n);this._cursor.advance();let r=av.hasOwnProperty(o)&&av[o];if(!r)throw this._createError(MF(o),this._cursor.getSpan(e));this._endToken([r,`&${o};`])}}}_consumeRawText(i,e){this._beginToken(i?6:7);let n=[];for(;;){let o=this._cursor.clone(),r=e();if(this._cursor=o,r)break;i&&this._cursor.peek()===Ux?(this._endToken([this._processCarriageReturns(n.join(""))]),n.length=0,this._consumeEntity(6),this._beginToken(6)):n.push(this._readChar())}this._endToken([this._processCarriageReturns(n.join(""))])}_consumeComment(i){this._beginToken(10,i),this._requireCharCode(Gx),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeCdata(i){this._beginToken(12,i),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(i){this._beginToken(18,i);let e=this._cursor.clone();this._attemptUntilChar(Bs);let n=this._cursor.getChars(e);this._cursor.advance(),this._endToken([n])}_consumePrefixAndName(i){let e=this._cursor.clone(),n="";for(;this._cursor.peek()!==Pc&&!UQ(this._cursor.peek());)this._cursor.advance();let o;this._cursor.peek()===Pc?(n=this._cursor.getChars(e),this._cursor.advance(),o=this._cursor.clone()):o=e,this._requireCharCodeUntilFn(i,n===""?0:1);let r=this._cursor.getChars(o);return[n,r]}_consumeTagOpen(i){let e,n,o,r;try{if(this._selectorlessEnabled&&ex(this._cursor.peek()))r=this._consumeComponentOpenStart(i),[o,n,e]=r.parts,n&&(o+=`:${n}`),e&&(o+=`:${e}`),this._attemptCharCodeUntilFn(Wo);else{if(!Vm(this._cursor.peek()))throw this._createError(Uh(this._cursor.peek()),this._cursor.getSpan(i));r=this._consumeTagOpenStart(i),n=r.parts[0],e=o=r.parts[1],this._attemptCharCodeUntilFn(Wo)}for(;!DF(this._cursor.peek());)if(this._selectorlessEnabled&&this._cursor.peek()===jh){let c=this._cursor.clone(),m=c.clone();m.advance(),ex(m.peek())&&this._consumeDirective(c,m)}else this._consumeAttribute();r.type===33?this._consumeComponentOpenEnd():this._consumeTagOpenEnd()}catch(c){if(c instanceof mn){r?r.type=r.type===33?37:4:(this._beginToken(5,i),this._endToken(["<"]));return}throw c}let a=this._getTagDefinition(e).getContentType(n);a===Dc.RAW_TEXT?this._consumeRawTextWithTagClose(r,o,!1):a===Dc.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,o,!0)}_consumeRawTextWithTagClose(i,e,n){this._consumeRawText(n,()=>!this._attemptCharCode(nf)||!this._attemptCharCode(ll)||(this._attemptCharCodeUntilFn(Wo),!this._attemptStrCaseInsensitive(e))?!1:(this._attemptCharCodeUntilFn(Wo),this._attemptCharCode(Bs))),this._beginToken(i.type===33?36:3),this._requireCharCodeUntilFn(o=>o===Bs,3),this._cursor.advance(),this._endToken(i.parts)}_consumeTagOpenStart(i){this._beginToken(0,i);let e=this._consumePrefixAndName(tu);return this._endToken(e)}_consumeComponentOpenStart(i){this._beginToken(33,i);let e=this._consumeComponentName();return this._endToken(e)}_consumeComponentName(){let i=this._cursor.clone();for(;EF(this._cursor.peek());)this._cursor.advance();let e=this._cursor.getChars(i),n="",o="";return this._cursor.peek()===Pc&&(this._cursor.advance(),[n,o]=this._consumePrefixAndName(tu)),[e,n,o]}_consumeAttribute(){this._consumeAttributeName(),this._attemptCharCodeUntilFn(Wo),this._attemptCharCode(ta)&&(this._attemptCharCodeUntilFn(Wo),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Wo)}_consumeAttributeName(){let i=this._cursor.peek();if(i===W0||i===G0)throw this._createError(Uh(i),this._cursor.getSpan());this._beginToken(14);let e;if(this._openDirectiveCount>0){let o=0;e=r=>{if(this._openDirectiveCount>0){if(r===qa)o++;else if(r===Pr){if(o===0)return!0;o--}}return tu(r)}}else if(i===Oc){let o=0;e=r=>(r===Oc?o++:r===Ed&&o--,o<=0?tu(r):Wx(r))}else e=tu;let n=this._consumePrefixAndName(e);this._endToken(n)}_consumeAttributeValue(){if(this._cursor.peek()===W0||this._cursor.peek()===G0){let i=this._cursor.peek();this._consumeQuote(i);let e=()=>this._cursor.peek()===i;this._consumeWithInterpolation(16,17,e,e),this._consumeQuote(i)}else{let i=()=>tu(this._cursor.peek());this._consumeWithInterpolation(16,17,i,i)}}_consumeQuote(i){this._beginToken(15),this._requireCharCode(i),this._endToken([String.fromCodePoint(i)])}_consumeTagOpenEnd(){let i=this._attemptCharCode(ll)?2:1;this._beginToken(i),this._requireCharCode(Bs),this._endToken([])}_consumeComponentOpenEnd(){let i=this._attemptCharCode(ll)?35:34;this._beginToken(i),this._requireCharCode(Bs),this._endToken([])}_consumeTagClose(i){if(this._selectorlessEnabled){let n=i.clone();for(;n.peek()!==Bs&&!ex(n.peek());)n.advance();if(ex(n.peek())){this._beginToken(36,i);let o=this._consumeComponentName();this._attemptCharCodeUntilFn(Wo),this._requireCharCode(Bs),this._endToken(o);return}}this._beginToken(3,i),this._attemptCharCodeUntilFn(Wo);let e=this._consumePrefixAndName(tu);this._attemptCharCodeUntilFn(Wo),this._requireCharCode(Bs),this._endToken(e)}_consumeExpansionFormStart(){this._beginToken(19),this._requireCharCode(ml),this._endToken([]),this._expansionCaseStack.push(19),this._beginToken(7);let i=this._readUntil(Pa),e=this._processCarriageReturns(i);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([e]);else{let o=this._endToken([i]);e!==i&&this.nonNormalizedIcuExpressions.push(o)}this._requireCharCode(Pa),this._attemptCharCodeUntilFn(Wo),this._beginToken(7);let n=this._readUntil(Pa);this._endToken([n]),this._requireCharCode(Pa),this._attemptCharCodeUntilFn(Wo)}_consumeExpansionCaseStart(){this._beginToken(20);let i=this._readUntil(ml).trim();this._endToken([i]),this._attemptCharCodeUntilFn(Wo),this._beginToken(21),this._requireCharCode(ml),this._endToken([]),this._attemptCharCodeUntilFn(Wo),this._expansionCaseStack.push(21)}_consumeExpansionCaseEnd(){this._beginToken(22),this._requireCharCode(Ga),this._endToken([]),this._attemptCharCodeUntilFn(Wo),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(23),this._requireCharCode(Ga),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(i,e,n,o){this._beginToken(i);let r=[];for(;!n();){let a=this._cursor.clone();this._attemptStr(X_.start)?(this._endToken([this._processCarriageReturns(r.join(""))],a),r.length=0,this._consumeInterpolation(e,a,o),this._beginToken(i)):this._cursor.peek()===Ux?(this._endToken([this._processCarriageReturns(r.join(""))]),r.length=0,this._consumeEntity(i),this._beginToken(i)):r.push(this._readChar())}this._inInterpolation=!1,this._endToken([this._processCarriageReturns(r.join(""))])}_consumeInterpolation(i,e,n){let o=[];this._beginToken(i,e),o.push(X_.start);let r=this._cursor.clone(),a=null,c=!1;for(;this._cursor.peek()!==ia&&(n===null||!n());){let m=this._cursor.clone();if(this._isTagStart()){this._cursor=m,o.push(this._getProcessedChars(r,m)),this._endToken(o);return}if(a===null)if(this._attemptStr(X_.end)){o.push(this._getProcessedChars(r,m)),o.push(X_.end),this._endToken(o);return}else this._attemptStr("//")&&(c=!0);let p=this._cursor.peek();this._cursor.advance(),p===hu?this._cursor.advance():p===a?a=null:!c&&a===null&&c0(p)&&(a=p)}o.push(this._getProcessedChars(r,this._cursor)),this._endToken(o)}_consumeDirective(i,e){for(this._requireCharCode(jh),this._cursor.advance();EF(this._cursor.peek());)this._cursor.advance();this._beginToken(38,i);let n=this._cursor.getChars(e);if(this._endToken([n]),this._attemptCharCodeUntilFn(Wo),this._cursor.peek()===qa){for(this._openDirectiveCount++,this._beginToken(39),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Wo);!DF(this._cursor.peek())&&this._cursor.peek()!==Pr;)this._consumeAttribute();if(this._attemptCharCodeUntilFn(Wo),this._openDirectiveCount--,this._cursor.peek()!==Pr){if(this._cursor.peek()===Bs||this._cursor.peek()===ll)return;throw this._createError(Uh(this._cursor.peek()),this._cursor.getSpan(i))}this._beginToken(40),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Wo)}}_getProcessedChars(i,e){return this._processCarriageReturns(e.getChars(i))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===ia||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===Ga&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._isLetStart()||this._cursor.peek()===Ga))}_isTagStart(){if(this._cursor.peek()===nf){let i=this._cursor.clone();i.advance();let e=i.peek();if(Eu<=e&&e<=gv||Um<=e&&e<=Mf||e===ll||e===yD)return!0}return!1}_readUntil(i){let e=this._cursor.clone();return this._attemptUntilChar(i),this._cursor.getChars(e)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===21}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===19}isExpansionFormStart(){if(this._cursor.peek()!==ml)return!1;let i=this._cursor.clone(),e=this._attemptStr(X_.start);return this._cursor=i,!e}};function Wo(t){return!q0(t)||t===ia}function tu(t){return q0(t)||t===Bs||t===nf||t===ll||t===W0||t===G0||t===ta||t===ia}function UQ(t){return(tX6)}function GQ(t){return t===ms||t===ia||!cq(t)}function WQ(t){return t===ms||t===ia||!(Vm(t)||cl(t))}function qQ(t){return t!==Ga}function XQ(t,i){return kF(t)===kF(i)}function kF(t){return t>=Eu&&t<=gv?t-Eu+Um:t}function QQ(t){return Vm(t)||cl(t)||t===Gm}function TF(t){return t!==ms&&Wo(t)}function ex(t){return t===Gm||t>=Um&&t<=Mf}function EF(t){return Vm(t)||cl(t)||t===Gm}function DF(t){return t===ll||t===Bs||t===nf||t===ia}function YQ(t){let i=[],e;for(let n=0;n0&&e.indexOf(i.peek())!==-1;)n===i&&(i=i.clone()),i.advance();let o=this.locationFromCursor(i),r=this.locationFromCursor(this),a=n!==i?this.locationFromCursor(n):o;return new bn(o,r,a)}getChars(i){return this.input.substring(i.state.offset,this.state.offset)}charAt(i){return this.input.charCodeAt(i)}advanceState(i){if(i.offset>=this.end)throw this.state=i,new sv('Unexpected character "EOF"',this);let e=this.charAt(i.offset);e===uu?(i.line++,i.column=0):Wx(e)||i.column++,i.offset++,this.updatePeek(i)}updatePeek(i){i.peek=i.offset>=this.end?ia:this.charAt(i.offset)}locationFromCursor(i){return new X0(i.file,i.state.offset,i.state.line,i.state.column)}},GD=class t extends c1{internalState;constructor(i,e){i instanceof t?(super(i),this.internalState=H({},i.internalState)):(super(i,e),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new t(this)}getChars(i){let e=i.clone(),n="";for(;e.internalState.offsetthis.internalState.peek;if(i()===hu)if(this.internalState=H({},this.state),this.advanceState(this.internalState),i()===Q6)this.state.peek=uu;else if(i()===Y6)this.state.peek=RP;else if(i()===J6)this.state.peek=H6;else if(i()===K6)this.state.peek=NP;else if(i()===sq)this.state.peek=eq;else if(i()===LP)this.state.peek=U6;else if(i()===Z6)if(this.advanceState(this.internalState),i()===ml){this.advanceState(this.internalState);let e=this.clone(),n=0;for(;i()!==Ga;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(e,n)}else{let e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(i()===eL){this.advanceState(this.internalState);let e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(iF(i())){let e="",n=0,o=this.clone();for(;iF(i())&&n<3;)o=this.clone(),e+=String.fromCodePoint(i()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(e,8),this.internalState=o.internalState}else Wx(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(i,e){let n=this.input.slice(i.internalState.offset,i.internalState.offset+e),o=parseInt(n,16);if(isNaN(o))throw i.state=i.internalState,new sv("Invalid hexadecimal escape sequence",i);return o}},sv=class extends Error{msg;cursor;constructor(i,e){super(i),this.msg=i,this.cursor=e,Object.setPrototypeOf(this,new.target.prototype)}},Sr=class t extends mn{elementName;static create(i,e,n){return new t(i,e,n)}constructor(i,e,n){super(e,n),this.elementName=i}},d1=class{rootNodes;errors;constructor(i,e){this.rootNodes=i,this.errors=e}},KQ=class{getTagDefinition;constructor(i){this.getTagDefinition=i}parse(i,e,n){let o=zQ(i,e,this.getTagDefinition,n),r=new WD(o.tokens,this.getTagDefinition);return r.build(),new d1(r.rootNodes,[...o.errors,...r.errors])}},WD=class t{tokens;tagDefinitionResolver;_index=-1;_peek;_containerStack=[];rootNodes=[];errors=[];constructor(i,e){this.tokens=i,this.tagDefinitionResolver=e,this._advance()}build(){for(;this._peek.type!==41;)this._peek.type===0||this._peek.type===4?this._consumeElementStartTag(this._advance()):this._peek.type===3?this._consumeElementEndTag(this._advance()):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===19?this._consumeExpansion(this._advance()):this._peek.type===24?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===26?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===28?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===32?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._peek.type===33||this._peek.type===37?this._consumeComponentStartTag(this._advance()):this._peek.type===36?this._consumeComponentEndTag(this._advance()):this._advance();for(let i of this._containerStack)i instanceof dl&&this.errors.push(Sr.create(i.name,i.sourceSpan,`Unclosed block "${i.name}"`))}_advance(){let i=this._peek;return this._index0)return this.errors=this.errors.concat(r.errors),null;let a=new bn(i.sourceSpan.start,o.sourceSpan.end,i.sourceSpan.fullStart),c=new bn(e.sourceSpan.start,o.sourceSpan.end,e.sourceSpan.fullStart);return new a1(i.parts[0],r.rootNodes,a,i.sourceSpan,c)}_collectExpansionExpTokens(i){let e=[],n=[21];for(;;){if((this._peek.type===19||this._peek.type===21)&&n.push(this._peek.type),this._peek.type===22)if(PF(n,21)){if(n.pop(),n.length===0)return e}else return this.errors.push(Sr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===23)if(PF(n,19))n.pop();else return this.errors.push(Sr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===41)return this.errors.push(Sr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}}_consumeText(i){let e=[i],n=i.sourceSpan,o=i.parts[0];if(o.length>0&&o[0]===` `){let r=this._getContainer();r!=null&&r.children.length===0&&this._getTagDefinition(r)?.ignoreFirstLf&&(o=o.substring(1),e[0]={type:i.type,sourceSpan:i.sourceSpan,parts:[o]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)i=this._advance(),e.push(i),i.type===8?o+=i.parts.join("").replace(/&([^;]+);/g,IF):i.type===9?o+=i.parts[0]:o+=i.parts.join("");if(o.length>0){let r=i.sourceSpan;this._addToParent(new Ou(o,new bn(n.start,r.end,n.fullStart,n.details),e))}}_closeVoidElement(){let i=this._getContainer();i!==null&&this._getTagDefinition(i)?.isVoid&&this._containerStack.pop()}_consumeElementStartTag(i){let e=[],n=[];this._consumeAttributesAndDirectives(e,n);let o=this._getElementFullName(i,this._getClosestElementLikeParent()),r=this._getTagDefinition(o),a=!1;this._peek.type===2?(this._advance(),a=!0,r?.canSelfClose||mD(o)!==null||r?.isVoid||this.errors.push(Sr.create(o,i.sourceSpan,`Only void, custom and foreign elements can be self closed "${i.parts[1]}"`))):this._peek.type===1&&(this._advance(),a=!1);let c=this._peek.sourceSpan.fullStart,m=new bn(i.sourceSpan.start,c,i.sourceSpan.fullStart),p=new bn(i.sourceSpan.start,c,i.sourceSpan.fullStart),h=new sl(o,e,n,[],a,m,p,void 0,r?.isVoid??!1),g=this._getContainer(),M=g!==null&&!!this._getTagDefinition(g)?.isClosedByChild(h.name);this._pushContainer(h,M),a?this._popContainer(o,sl,m):i.type===4&&(this._popContainer(o,sl,null),this.errors.push(Sr.create(o,m,`Opening tag "${o}" not terminated.`)))}_consumeComponentStartTag(i){let e=i.parts[0],n=[],o=[];this._consumeAttributesAndDirectives(n,o);let r=this._getClosestElementLikeParent(),a=this._getComponentTagName(i,r),c=this._getComponentFullName(i,r),m=this._peek.type===35;this._advance();let p=this._peek.sourceSpan.fullStart,h=new bn(i.sourceSpan.start,p,i.sourceSpan.fullStart),g=new bn(i.sourceSpan.start,p,i.sourceSpan.fullStart),M=new Ua(e,a,c,n,o,[],m,h,g,void 0),C=this._getContainer(),_=C!==null&&M.tagName!==null&&!!this._getTagDefinition(C)?.isClosedByChild(M.tagName);this._pushContainer(M,_),m?this._popContainer(c,Ua,h):i.type===37&&(this._popContainer(c,Ua,null),this.errors.push(Sr.create(c,h,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(i,e){for(;this._peek.type===14||this._peek.type===38;)this._peek.type===38?e.push(this._consumeDirective(this._peek)):i.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(i){let e=this._getComponentFullName(i,this._getClosestElementLikeParent());if(!this._popContainer(e,Ua,i.sourceSpan)){let n=this._containerStack[this._containerStack.length-1],o;n instanceof Ua&&n.componentName===i.parts[0]?o=`, did you mean "${n.fullName}"?`:o=". It may happen when the tag has already been closed by another tag.";let r=`Unexpected closing tag "${e}"${o}`;this.errors.push(Sr.create(e,i.sourceSpan,r))}}_getTagDefinition(i){return typeof i=="string"?this.tagDefinitionResolver(i):i instanceof sl?this.tagDefinitionResolver(i.name):i instanceof Ua&&i.tagName!==null?this.tagDefinitionResolver(i.tagName):null}_pushContainer(i,e){e&&this._containerStack.pop(),this._addToParent(i),this._containerStack.push(i)}_consumeElementEndTag(i){let e=this._getElementFullName(i,this._getClosestElementLikeParent());if(this._getTagDefinition(e)?.isVoid)this.errors.push(Sr.create(e,i.sourceSpan,`Void elements do not have end tags "${i.parts[1]}"`));else if(!this._popContainer(e,sl,i.sourceSpan)){let n=`Unexpected closing tag "${e}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(Sr.create(e,i.sourceSpan,n))}}_popContainer(i,e,n){let o=!1;for(let r=this._containerStack.length-1;r>=0;r--){let a=this._containerStack[r];if(((a instanceof Ua?a.fullName:a.name)===i||i===null)&&a instanceof e)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(r,this._containerStack.length-r),!o;(a instanceof dl||!this._getTagDefinition(a)?.closedByParent)&&(o=!0)}return!1}_consumeAttr(i){let e=mx(i.parts[0],i.parts[1]),n=i.sourceSpan.end;this._peek.type===15&&this._advance();let o="",r=[],a,c;if(this._peek.type===16)for(a=this._peek.sourceSpan,c=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let h=this._advance();r.push(h),h.type===17?o+=h.parts.join("").replace(/&([^;]+);/g,IF):h.type===9?o+=h.parts[0]:o+=h.parts.join(""),c=n=h.sourceSpan.end}this._peek.type===15&&(n=this._advance().sourceSpan.end);let p=a&&c&&new bn(a.start,c,a.fullStart);return new zD(e,o,new bn(i.sourceSpan.start,n,i.sourceSpan.fullStart),i.sourceSpan,p,r.length>0?r:void 0,void 0)}_consumeDirective(i){let e=[],n=i.sourceSpan.end,o=null;if(this._advance(),this._peek.type===39){for(n=this._peek.sourceSpan.end,this._advance();this._peek.type===14;)e.push(this._consumeAttr(this._advance()));this._peek.type===40?(o=this._peek.sourceSpan,this._advance()):this.errors.push(Sr.create(null,i.sourceSpan,"Unterminated directive definition"))}let r=new bn(i.sourceSpan.start,n,i.sourceSpan.fullStart),a=new bn(r.start,o===null?i.sourceSpan.end:o.end,r.fullStart);return new jD(i.parts[0],e,a,r,o)}_consumeBlockOpen(i){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new s1(c.parts[0],c.sourceSpan))}this._peek.type===25&&this._advance();let n=this._peek.sourceSpan.fullStart,o=new bn(i.sourceSpan.start,n,i.sourceSpan.fullStart),r=new bn(i.sourceSpan.start,n,i.sourceSpan.fullStart),a=new dl(i.parts[0],e,[],o,i.sourceSpan,r);this._pushContainer(a,!1)}_consumeBlockClose(i){let e=this._containerStack.length,n=this._containerStack[e-1];if(!this._popContainer(null,dl,i.sourceSpan)){if(this._containerStack.length element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));return}this.errors.push(Sr.create(null,i.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the `}` character, you should use the "}" HTML entity instead.'))}}_consumeIncompleteBlock(i){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new s1(c.parts[0],c.sourceSpan))}let n=this._peek.sourceSpan.fullStart,o=new bn(i.sourceSpan.start,n,i.sourceSpan.fullStart),r=new bn(i.sourceSpan.start,n,i.sourceSpan.fullStart),a=new dl(i.parts[0],e,[],o,i.sourceSpan,r);this._pushContainer(a,!1),this._popContainer(null,dl,null),this.errors.push(Sr.create(i.parts[0],o,`Incomplete block "${i.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(i){let e=i.parts[0],n,o;if(this._peek.type!==30){this.errors.push(Sr.create(i.parts[0],i.sourceSpan,`Invalid @let declaration "${e}". Declaration must have a value.`));return}else n=this._advance();if(this._peek.type!==31){this.errors.push(Sr.create(i.parts[0],i.sourceSpan,`Unterminated @let declaration "${e}". Declaration must be terminated with a semicolon.`));return}else o=this._advance();let r=o.sourceSpan.fullStart,a=new bn(i.sourceSpan.start,r,i.sourceSpan.fullStart),c=i.sourceSpan.toString().lastIndexOf(e),m=i.sourceSpan.start.moveBy(c),p=new bn(m,i.sourceSpan.end),h=new l1(e,n.parts[0],a,p,n.sourceSpan);this._addToParent(h)}_consumeIncompleteLet(i){let e=i.parts[0]??"",n=e?` "${e}"`:"";if(e.length>0){let o=i.sourceSpan.toString().lastIndexOf(e),r=i.sourceSpan.start.moveBy(o),a=new bn(r,i.sourceSpan.end),c=new bn(i.sourceSpan.start,i.sourceSpan.start.moveBy(0)),m=new l1(e,"",i.sourceSpan,a,c);this._addToParent(m)}this.errors.push(Sr.create(i.parts[0],i.sourceSpan,`Incomplete @let declaration${n}. @let declarations must be written as \`@let = ;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestElementLikeParent(){for(let i=this._containerStack.length-1;i>-1;i--){let e=this._containerStack[i];if(e instanceof sl||e instanceof Ua)return e}return null}_addToParent(i){let e=this._getContainer();e===null?this.rootNodes.push(i):e.children.push(i)}_getElementFullName(i,e){let n=this._getPrefix(i,e);return mx(n,i.parts[1])}_getComponentFullName(i,e){let n=i.parts[0],o=this._getComponentTagName(i,e);return o===null?n:o.startsWith(":")?n+o:`${n}:${o}`}_getComponentTagName(i,e){let n=this._getPrefix(i,e),o=i.parts[2];return!n&&!o?null:!n&&o?o:mx(n,o||"ng-component")}_getPrefix(i,e){let n,o;if(i.type===33||i.type===37||i.type===36?(n=i.parts[1],o=i.parts[2]):(n=i.parts[0],o=i.parts[1]),n=n||this._getTagDefinition(o)?.implicitNamespacePrefix||"",!n&&e){let r=e instanceof sl?e.name:e.tagName;if(r!==null){let a=oc(r)[1],c=this._getTagDefinition(a);c!==null&&!c.preventNamespaceInheritance&&(n=mD(r))}}return n}};function PF(t,i){return t.length>0&&t[t.length-1]===i}function IF(t,i){return av[i]!==void 0?av[i]||t:/^#x[a-f0-9]+$/i.test(i)?String.fromCodePoint(parseInt(i.slice(2),16)):/^#\d+$/.test(i)?String.fromCodePoint(parseInt(i.slice(1),10)):t}var SL="ngPreserveWhitespaces",AF=new Set(["pre","template","textarea","script","style"]),wL=` \f \r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,ZQ=new RegExp(`[^${wL}]`),JQ=new RegExp(`[${wL}]{2,}`,"g");function OF(t){return t.some(i=>i.name===SL)}function ML(t){return t.replace(new RegExp(yL,"g")," ")}var m1=class{preserveSignificantWhitespace;originalNodeMap;requireContext;icuExpansionDepth=0;constructor(i,e,n=!0){this.preserveSignificantWhitespace=i,this.originalNodeMap=e,this.requireContext=n}visitElement(i,e){if(AF.has(i.name)||OF(i.attrs)){let o=new sl(i.name,kc(this,i.attrs),kc(this,i.directives),i.children,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n);return this.originalNodeMap?.set(o,i),o}let n=new sl(i.name,i.attrs,i.directives,kc(this,i.children),i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n);return this.originalNodeMap?.set(n,i),n}visitAttribute(i,e){return i.name!==SL?i:null}visitText(i,e){let n=i.value.match(ZQ),o=e&&(e.prev instanceof fu||e.next instanceof fu);if(this.icuExpansionDepth>0&&this.preserveSignificantWhitespace)return i;if(n||o){let a=i.tokens.map(h=>h.type===5?iY(h):h);if(!this.preserveSignificantWhitespace&&a.length>0){let h=a[0];a.splice(0,1,eY(h,e));let g=a[a.length-1];a.splice(a.length-1,1,tY(g,e))}let c=TL(i.value),m=this.preserveSignificantWhitespace?c:nY(c,e),p=new Ou(m,i.sourceSpan,a,i.i18n);return this.originalNodeMap?.set(p,i),p}return null}visitComment(i,e){return i}visitExpansion(i,e){this.icuExpansionDepth++;let n;try{n=new fu(i.switchValue,i.type,kc(this,i.cases),i.sourceSpan,i.switchValueSourceSpan,i.i18n)}finally{this.icuExpansionDepth--}return this.originalNodeMap?.set(n,i),n}visitExpansionCase(i,e){let n=new a1(i.value,kc(this,i.expression),i.sourceSpan,i.valueSourceSpan,i.expSourceSpan);return this.originalNodeMap?.set(n,i),n}visitBlock(i,e){let n=new dl(i.name,i.parameters,kc(this,i.children),i.sourceSpan,i.nameSpan,i.startSourceSpan,i.endSourceSpan);return this.originalNodeMap?.set(n,i),n}visitBlockParameter(i,e){return i}visitLetDeclaration(i,e){return i}visitComponent(i,e){if(i.tagName&&AF.has(i.tagName)||OF(i.attrs)){let o=new Ua(i.componentName,i.tagName,i.fullName,kc(this,i.attrs),kc(this,i.directives),i.children,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return this.originalNodeMap?.set(o,i),o}let n=new Ua(i.componentName,i.tagName,i.fullName,i.attrs,i.directives,kc(this,i.children),i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return this.originalNodeMap?.set(n,i),n}visitDirective(i,e){return i}visit(i,e){if(this.requireContext&&!e)throw new Error("WhitespaceVisitor requires context. Visit via `visitAllWithSiblings` to get this context.");return!1}};function eY(t,i){return t.type!==5||!!i?.prev?t:kL(t,n=>n.trimStart())}function tY(t,i){return t.type!==5||!!i?.next?t:kL(t,n=>n.trimEnd())}function nY(t,i){let e=!i?.prev,n=!i?.next,o=e?t.trimStart():t;return n?o.trimEnd():o}function iY({type:t,parts:i,sourceSpan:e}){return{type:t,parts:[TL(i[0])],sourceSpan:e}}function kL({type:t,parts:i,sourceSpan:e},n){return{type:t,parts:[n(i[0])],sourceSpan:e}}function TL(t){return ML(t).replace(JQ," ")}function kc(t,i){let e=[];return i.forEach((n,o)=>{let r={prev:i[o-1],next:i[o+1]},a=n.visit(t,r);a&&e.push(a)}),e}var _n=(function(t){return t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.PrivateIdentifier=2]="PrivateIdentifier",t[t.Keyword=3]="Keyword",t[t.String=4]="String",t[t.Operator=5]="Operator",t[t.Number=6]="Number",t[t.RegExpBody=7]="RegExpBody",t[t.RegExpFlags=8]="RegExpFlags",t[t.Error=9]="Error",t})(_n||{}),gu=(function(t){return t[t.Plain=0]="Plain",t[t.TemplateLiteralPart=1]="TemplateLiteralPart",t[t.TemplateLiteralEnd=2]="TemplateLiteralEnd",t})(gu||{}),oY=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],lv=class{tokenize(i){return new qD(i).scan()}},qs=class{index;end;type;numValue;strValue;constructor(i,e,n,o,r){this.index=i,this.end=e,this.type=n,this.numValue=o,this.strValue=r}isCharacter(i){return this.type===_n.Character&&this.numValue===i}isNumber(){return this.type===_n.Number}isString(){return this.type===_n.String}isOperator(i){return this.type===_n.Operator&&this.strValue===i}isIdentifier(){return this.type===_n.Identifier}isPrivateIdentifier(){return this.type===_n.PrivateIdentifier}isKeyword(){return this.type===_n.Keyword}isKeywordLet(){return this.type===_n.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===_n.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===_n.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===_n.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===_n.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===_n.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===_n.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===_n.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===_n.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===_n.Keyword&&this.strValue==="in"}isKeywordInstanceOf(){return this.type===_n.Keyword&&this.strValue==="instanceof"}isError(){return this.type===_n.Error}isRegExpBody(){return this.type===_n.RegExpBody}isRegExpFlags(){return this.type===_n.RegExpFlags}toNumber(){return this.type===_n.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===gu.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===gu.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case _n.Character:case _n.Identifier:case _n.Keyword:case _n.Operator:case _n.PrivateIdentifier:case _n.String:case _n.Error:case _n.RegExpBody:case _n.RegExpFlags:return this.strValue;case _n.Number:return this.numValue.toString();default:return null}}},d0=class extends qs{kind;constructor(i,e,n,o){super(i,e,_n.String,0,n),this.kind=o}};function Q_(t,i,e){return new qs(t,i,_n.Character,e,String.fromCharCode(e))}function rY(t,i,e){return new qs(t,i,_n.Identifier,0,e)}function aY(t,i,e){return new qs(t,i,_n.PrivateIdentifier,0,e)}function sY(t,i,e){return new qs(t,i,_n.Keyword,0,e)}function Sm(t,i,e){return new qs(t,i,_n.Operator,0,e)}function lY(t,i,e){return new qs(t,i,_n.Number,e,"")}function cY(t,i,e){return new qs(t,i,_n.Error,0,e)}function dY(t,i,e){return new qs(t,i,_n.RegExpBody,0,e)}function mY(t,i,e){return new qs(t,i,_n.RegExpFlags,0,e)}var Y_=new qs(-1,-1,_n.Character,0,""),qD=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(i){this.input=i,this.length=i.length,this.advance()}scan(){let i=this.scanToken();for(;i!==null;)this.tokens.push(i),i=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?ia:this.input.charCodeAt(this.index)}scanToken(){let i=this.input,e=this.length,n=this.peek,o=this.index;for(;n<=G6;)if(++o>=e){n=ia;break}else n=i.charCodeAt(o);if(this.peek=n,this.index=o,o>=e)return null;if(NF(n))return this.scanIdentifier();if(cl(n))return this.scanNumber(o);let r=o;switch(n){case nu:return this.advance(),cl(this.peek)?this.scanNumber(r):this.peek!==nu?Q_(r,this.index,nu):(this.advance(),this.peek===nu?(this.advance(),Sm(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(n)}]`,0));case qa:case Pr:case Oc:case Ed:case Pa:case Pc:case ms:return this.scanCharacter(r,n);case ml:return this.scanOpenBrace(r,n);case Ga:return this.scanCloseBrace(r,n);case W0:case G0:return this.scanString();case SD:return this.advance(),this.scanTemplateLiteralPart(r);case W6:return this.scanPrivateIdentifier();case q6:return this.scanComplexOperator(r,"+",ta,"=");case Gx:return this.scanComplexOperator(r,"-",ta,"=");case ll:return this.isStartOfRegex()?this.scanRegex(o):this.scanComplexOperator(r,"/",ta,"=");case tq:return this.scanComplexOperator(r,"%",ta,"=");case aq:return this.scanOperator(r,"^");case eF:return this.scanStar(r);case tF:return this.scanQuestion(r);case nf:case Bs:return this.scanComplexOperator(r,String.fromCharCode(n),ta,"=");case yD:return this.scanComplexOperator(r,"!",ta,"=",ta,"=");case ta:return this.scanEquals(r);case Ux:return this.scanComplexOperator(r,"&",Ux,"&",ta,"=");case nF:return this.scanComplexOperator(r,"|",nF,"|",ta,"=");case tL:for(;q0(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(n)}]`,0)}scanCharacter(i,e){return this.advance(),Q_(i,this.index,e)}scanOperator(i,e){return this.advance(),Sm(i,this.index,e)}scanOpenBrace(i,e){return this.braceStack.push("expression"),this.advance(),Q_(i,this.index,e)}scanCloseBrace(i,e){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(Q_(i,this.index,Ga)),this.scanTemplateLiteralPart(this.index)):Q_(i,this.index,e)}scanComplexOperator(i,e,n,o,r,a){this.advance();let c=e;return this.peek==n&&(this.advance(),c+=o),r!=null&&this.peek==r&&(this.advance(),c+=a),Sm(i,this.index,c)}scanEquals(i){this.advance();let e="=";if(this.peek===ta)this.advance(),e+="=";else if(this.peek===Bs)return this.advance(),e+=">",Sm(i,this.index,e);return this.peek===ta&&(this.advance(),e+="="),Sm(i,this.index,e)}scanIdentifier(){let i=this.index;for(this.advance();RF(this.peek);)this.advance();let e=this.input.substring(i,this.index);return oY.indexOf(e)>-1?sY(i,this.index,e):rY(i,this.index,e)}scanPrivateIdentifier(){let i=this.index;if(this.advance(),!NF(this.peek))return this.error("Invalid character [#]",-1);for(;RF(this.peek);)this.advance();let e=this.input.substring(i,this.index);return aY(i,this.index,e)}scanNumber(i){let e=this.index===i,n=!1;for(this.advance();;){if(!cl(this.peek))if(this.peek===Gm){if(!cl(this.input.charCodeAt(this.index-1))||!cl(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);n=!0}else if(this.peek===nu)e=!1;else if(pY(this.peek)){if(this.advance(),uY(this.peek)&&this.advance(),!cl(this.peek))return this.error("Invalid exponent",-1);e=!1}else break;this.advance()}let o=this.input.substring(i,this.index);n&&(o=o.replace(/_/g,""));let r=e?fY(o):parseFloat(o);return lY(i,this.index,r)}scanString(){let i=this.index,e=this.peek;this.advance();let n="",o=this.index,r=this.input;for(;this.peek!=e;)if(this.peek==hu){let c=this.scanStringBackslash(n,o);if(typeof c!="string")return c;n=c,o=this.index}else{if(this.peek==ia)return this.error("Unterminated quote",0);this.advance()}let a=r.substring(o,this.index);return this.advance(),new d0(i,this.index,n+a,gu.Plain)}scanQuestion(i){this.advance();let e="?";return this.peek===tF?(e+="?",this.advance(),this.peek===ta&&(e+="=",this.advance())):this.peek===nu&&(e+=".",this.advance()),Sm(i,this.index,e)}scanTemplateLiteralPart(i){let e="",n=this.index;for(;this.peek!==SD;)if(this.peek===hu){let r=this.scanStringBackslash(e,n);if(typeof r!="string")return r;e=r,n=this.index}else if(this.peek===M1){let r=this.index;if(this.advance(),this.peek===ml)return this.braceStack.push("interpolation"),this.tokens.push(new d0(i,r,e+this.input.substring(n,r),gu.TemplateLiteralPart)),this.advance(),Sm(r,this.index,this.input.substring(r,this.index))}else{if(this.peek===ia)return this.error("Unterminated template literal",0);this.advance()}let o=this.input.substring(n,this.index);return this.advance(),new d0(i,this.index,e+o,gu.TemplateLiteralEnd)}error(i,e){let n=this.index+e;return cY(n,this.index,`Lexer Error: ${i} at column ${n} in expression [${this.input}]`)}scanStringBackslash(i,e){i+=this.input.substring(e,this.index);let n;if(this.advance(),this.peek===Z6){let o=this.input.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(o))n=parseInt(o,16);else return this.error(`Invalid unicode escape [\\u${o}]`,0);for(let r=0;r<5;r++)this.advance()}else n=hY(this.peek),this.advance();return i+=String.fromCharCode(n),i}scanStar(i){this.advance();let e="*";return this.peek===eF?(e+="*",this.advance(),this.peek===ta&&(e+="=",this.advance())):this.peek===ta&&(e+="=",this.advance()),Sm(i,this.index,e)}isStartOfRegex(){if(this.tokens.length===0)return!0;let i=this.tokens[this.tokens.length-1];if(i.isOperator("!")){let e=this.tokens.length>1?this.tokens[this.tokens.length-2]:null;return e===null||e.type!==_n.Identifier&&!e.isCharacter(Pr)&&!e.isCharacter(Ed)}return i.type===_n.Operator||i.isCharacter(qa)||i.isCharacter(Oc)||i.isCharacter(Pa)||i.isCharacter(Pc)}scanRegex(i){this.advance();let e=this.index,n=!1,o=!1;for(;;){let m=this.peek;if(m===ia)return this.error("Unterminated regular expression",0);if(n)n=!1;else if(m===hu)n=!0;else if(m===Oc)o=!0;else if(m===Ed)o=!1;else if(m===ll&&!o)break;this.advance()}let r=this.input.substring(e,this.index);this.advance();let a=dY(i,this.index,r),c=this.scanRegexFlags(this.index);return c!==null?(this.tokens.push(a),c):a}scanRegexFlags(i){if(!Vm(this.peek))return null;for(;Vm(this.peek);)this.advance();return mY(i,this.index,this.input.substring(i,this.index))}};function NF(t){return Eu<=t&&t<=gv||Um<=t&&t<=Mf||t==Gm||t==M1}function RF(t){return Vm(t)||cl(t)||t==Gm||t==M1}function pY(t){return t==lq||t==iq}function uY(t){return t==Gx||t==q6}function hY(t){switch(t){case Q6:return uu;case LP:return U6;case Y6:return RP;case K6:return NP;case J6:return H6;default:return t}}function fY(t){let i=parseInt(t);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+t);return i}var XD=class{strings;expressions;offsets;constructor(i,e,n){this.strings=i,this.expressions=e,this.offsets=n}},QD=class{templateBindings;warnings;errors;constructor(i,e,n){this.templateBindings=i,this.warnings=e,this.errors=n}};function Em(t){return t.start.toString()||"(unknown)"}var p1=class{_lexer;_supportsDirectPipeReferences;constructor(i,e=!1){this._lexer=i,this._supportsDirectPipeReferences=e}parseAction(i,e,n){let o=[];this._checkNoInterpolation(o,i,e);let{stripped:r}=this._stripComments(i),a=this._lexer.tokenize(r),c=new au(i,e,n,a,1,o,0,this._supportsDirectPipeReferences).parseChain();return new ps(c,i,Em(e),n,o)}parseBinding(i,e,n){let o=[],r=this._parseBindingAst(i,e,n,o);return new ps(r,i,Em(e),n,o)}checkSimpleExpression(i){let e=new YD;return i.visit(e),e.errors}parseSimpleBinding(i,e,n){let o=[],r=this._parseBindingAst(i,e,n,o),a=this.checkSimpleExpression(r);return a.length>0&&o.push(Jh(`Host binding expression cannot contain ${a.join(" ")}`,i,"",e)),new ps(r,i,Em(e),n,o)}_parseBindingAst(i,e,n,o){this._checkNoInterpolation(o,i,e);let{stripped:r}=this._stripComments(i),a=this._lexer.tokenize(r);return new au(i,e,n,a,0,o,0,this._supportsDirectPipeReferences).parseChain()}parseTemplateBindings(i,e,n,o,r){let a=this._lexer.tokenize(e),c=[];return new au(e,n,r,a,0,c,0,this._supportsDirectPipeReferences).parseTemplateBindings({source:i,span:new zs(o,o+i.length)})}parseInterpolation(i,e,n,o){let r=[],{strings:a,expressions:c,offsets:m}=this.splitInterpolation(i,e,r,o);if(c.length===0)return null;let p=[];for(let h=0;hh.text),p,i,Em(e),n,r)}parseInterpolationExpression(i,e,n){let{stripped:o}=this._stripComments(i),r=this._lexer.tokenize(o),a=[],c=new au(i,e,n,r,0,a,0,this._supportsDirectPipeReferences).parseChain(),m=["",""];return this.createInterpolationAst(m,[c],i,Em(e),n,a)}createInterpolationAst(i,e,n,o,r,a){let c=new wu(0,n.length),m=new hv(c,c.toAbsolute(r),i,e);return new ps(m,n,o,r,a)}splitInterpolation(i,e,n,o){let r=[],a=[],c=[],m=o?gY(o):null,p=0,h=!1,g=!1,M="{{",C="}}";for(;p-1)break;o>-1&&r>-1&&i.push(Jh("Got interpolation ({{}}) where expression was expected",e,`at column ${o} in`,n))}_getInterpolationEndIndex(i,e,n){for(let o of this._forEachUnquotedChar(i,n)){if(i.startsWith(e,o))return o;if(i.startsWith("//",o))return i.indexOf(e,o)}return-1}*_forEachUnquotedChar(i,e){let n=null,o=0;for(let r=e;r=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(i,e){let n=this.currentEndIndex;if(e!==void 0&&e>this.currentEndIndex&&(n=e),i>n){let o=n;n=i,i=o}return new wu(i,n)}sourceSpan(i,e){let n=`${i}@${this.inputIndex}:${e}`;return this.sourceSpanCache.has(n)||this.sourceSpanCache.set(n,this.span(i,e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(n)}advance(){this.index++}withContext(i,e){this.context|=i;let n=e();return this.context^=i,n}consumeOptionalCharacter(i){return this.next.isCharacter(i)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(i){this.consumeOptionalCharacter(i)||this.error(`Missing expected ${String.fromCharCode(i)}`)}consumeOptionalOperator(i){return this.next.isOperator(i)?(this.advance(),!0):!1}isAssignmentOperator(i){return i.type===_n.Operator&&Ha.isAssignmentOperation(i.strValue)}expectOperator(i){this.consumeOptionalOperator(i)||this.error(`Missing expected operator ${i}`)}prettyPrintToken(i){return i===Y_?"end of input":`token ${i}`}expectIdentifierOrKeyword(){let i=this.next;return!i.isIdentifier()&&!i.isKeyword()?(i.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(i,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(i)}, expected identifier or keyword`),null):(this.advance(),i.toString())}expectIdentifierOrKeywordOrString(){let i=this.next;return!i.isIdentifier()&&!i.isKeyword()&&!i.isString()?(i.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(i,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(i)}, expected identifier, keyword, or string`),""):(this.advance(),i.toString())}parseChain(){let i=[],e=this.inputIndex;for(;this.index=Um&&p<=Mf?dx.ReferencedDirectly:dx.ReferencedByName}else m=dx.ReferencedByName;e=new Dx(this.span(i),this.sourceSpan(i,a),e,o,c,m,r)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){let i=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let n=this.parsePipe(),o;if(this.consumeOptionalCharacter(Pc))o=this.parsePipe();else{let r=this.inputIndex,a=this.input.substring(i,r);this.error(`Conditional expression ${a} requires all 3 expressions`),o=new Da(this.span(i),this.sourceSpan(i))}return new Ex(this.span(i),this.sourceSpan(i),e,n,o)}else return e}parseLogicalOr(){let i=this.inputIndex,e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let n=this.parseLogicalAnd();e=new Ha(this.span(i),this.sourceSpan(i),"||",e,n)}return e}parseLogicalAnd(){let i=this.inputIndex,e=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let n=this.parseNullishCoalescing();e=new Ha(this.span(i),this.sourceSpan(i),"&&",e,n)}return e}parseNullishCoalescing(){let i=this.inputIndex,e=this.parseEquality();for(;this.consumeOptionalOperator("??");){let n=this.parseEquality();e=new Ha(this.span(i),this.sourceSpan(i),"??",e,n)}return e}parseEquality(){let i=this.inputIndex,e=this.parseRelational();for(;this.next.type==_n.Operator;){let n=this.next.strValue;switch(n){case"==":case"===":case"!=":case"!==":this.advance();let o=this.parseRelational();e=new Ha(this.span(i),this.sourceSpan(i),n,e,o);continue}break}return e}parseRelational(){let i=this.inputIndex,e=this.parseAdditive();for(;this.next.type==_n.Operator||this.next.isKeywordIn()||this.next.isKeywordInstanceOf();){let n=this.next.strValue;switch(n){case"<":case">":case"<=":case">=":case"in":case"instanceof":this.advance();let o=this.parseAdditive();e=new Ha(this.span(i),this.sourceSpan(i),n,e,o);continue}break}return e}parseAdditive(){let i=this.inputIndex,e=this.parseMultiplicative();for(;this.next.type==_n.Operator;){let n=this.next.strValue;switch(n){case"+":case"-":this.advance();let o=this.parseMultiplicative();e=new Ha(this.span(i),this.sourceSpan(i),n,e,o);continue}break}return e}parseMultiplicative(){let i=this.inputIndex,e=this.parseExponentiation();for(;this.next.type==_n.Operator;){let n=this.next.strValue;switch(n){case"*":case"%":case"/":this.advance();let o=this.parseExponentiation();e=new Ha(this.span(i),this.sourceSpan(i),n,e,o);continue}break}return e}parseExponentiation(){let i=this.inputIndex,e=this.parsePrefix();for(;this.next.type==_n.Operator&&this.next.strValue==="**";){(e instanceof tf||e instanceof E0||e instanceof D0||e instanceof P0)&&this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"),this.advance();let n=this.parseExponentiation();e=new Ha(this.span(i),this.sourceSpan(i),"**",e,n)}return e}parsePrefix(){if(this.next.type==_n.Operator){let i=this.inputIndex,e=this.next.strValue,n;switch(e){case"+":return this.advance(),n=this.parsePrefix(),tf.createPlus(this.span(i),this.sourceSpan(i),n);case"-":return this.advance(),n=this.parsePrefix(),tf.createMinus(this.span(i),this.sourceSpan(i),n);case"!":return this.advance(),n=this.parsePrefix(),new E0(this.span(i),this.sourceSpan(i),n)}}else if(this.next.isKeywordTypeof()){let i=this.inputIndex;this.advance();let e=this.parsePrefix();return new D0(this.span(i),this.sourceSpan(i),e)}else if(this.next.isKeywordVoid()){let i=this.inputIndex;this.advance();let e=this.parsePrefix();return new P0(this.span(i),this.sourceSpan(i),e)}return this.parseCallChain()}parseCallChain(){let i=this.inputIndex,e=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(nu))e=this.parseAccessMember(e,i,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(qa)?e=this.parseCall(e,i,!0):e=this.consumeOptionalCharacter(Oc)?this.parseKeyedReadOrWrite(e,i,!0):this.parseAccessMember(e,i,!0);else if(this.consumeOptionalCharacter(Oc))e=this.parseKeyedReadOrWrite(e,i,!1);else if(this.consumeOptionalCharacter(qa))e=this.parseCall(e,i,!1);else if(this.consumeOptionalOperator("!"))e=new I0(this.span(i),this.sourceSpan(i),e);else if(this.next.isTemplateLiteralEnd())e=this.parseNoInterpolationTaggedTemplateLiteral(e,i);else if(this.next.isTemplateLiteralPart())e=this.parseTaggedTemplateLiteral(e,i);else return e}parsePrimary(){let i=this.inputIndex;if(this.isArrowFunction())return this.parseArrowFunction(i);if(this.consumeOptionalCharacter(qa)){this.rparensExpected++;let e=this.parsePipe();return this.consumeOptionalCharacter(Pr)||(this.error("Missing closing parentheses"),this.consumeOptionalCharacter(Pr)),this.rparensExpected--,new N0(this.span(i),this.sourceSpan(i),e)}else{if(this.next.isKeywordNull())return this.advance(),new ds(this.span(i),this.sourceSpan(i),null);if(this.next.isKeywordUndefined())return this.advance(),new ds(this.span(i),this.sourceSpan(i),void 0);if(this.next.isKeywordTrue())return this.advance(),new ds(this.span(i),this.sourceSpan(i),!0);if(this.next.isKeywordFalse())return this.advance(),new ds(this.span(i),this.sourceSpan(i),!1);if(this.next.isKeywordIn())return this.advance(),new ds(this.span(i),this.sourceSpan(i),"in");if(this.next.isKeywordThis())return this.advance(),new w0(this.span(i),this.sourceSpan(i));if(this.consumeOptionalCharacter(Oc))return this.parseLiteralArray(i);if(this.next.isCharacter(ml))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new Bc(this.span(i),this.sourceSpan(i)),i,!1);if(this.next.isNumber()){let e=this.next.toNumber();return this.advance(),new ds(this.span(i),this.sourceSpan(i),e)}else{if(this.next.isTemplateLiteralEnd())return this.parseNoInterpolationTemplateLiteral();if(this.next.isTemplateLiteralPart())return this.parseTemplateLiteral();if(this.next.isString()&&this.next.kind===gu.Plain){let e=this.next.toString();return this.advance(),new ds(this.span(i),this.sourceSpan(i),e)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new Da(this.span(i),this.sourceSpan(i))):this.next.isRegExpBody()?this.parseRegularExpressionLiteral():this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new Da(this.span(i),this.sourceSpan(i))):(this.error(`Unexpected token ${this.next}`),new Da(this.span(i),this.sourceSpan(i)))}}}parseLiteralArray(i){this.rbracketsExpected++;let e=[];do if(this.next.isOperator("..."))e.push(this.parseSpreadElement());else if(!this.next.isCharacter(Ed))e.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(Pa));return this.rbracketsExpected--,this.expectCharacter(Ed),new T0(this.span(i),this.sourceSpan(i),e)}parseLiteralMap(){let i=[],e=[],n=this.inputIndex;if(this.expectCharacter(ml),!this.consumeOptionalCharacter(Ga)){this.rbracesExpected++;do{let o=this.inputIndex;if(this.next.isOperator("...")){this.advance(),i.push({kind:"spread",span:this.span(o),sourceSpan:this.sourceSpan(o)}),e.push(this.parsePipe());continue}let r=this.next.isString(),a=this.expectIdentifierOrKeywordOrString(),c=this.span(o),m=this.sourceSpan(o),p={kind:"property",key:a,quoted:r,span:c,sourceSpan:m};i.push(p),r?(this.expectCharacter(Pc),e.push(this.parsePipe())):this.consumeOptionalCharacter(Pc)?e.push(this.parsePipe()):(p.isShorthandInitialized=!0,e.push(new Ac(c,m,m,new Bc(c,m),a)))}while(this.consumeOptionalCharacter(Pa)&&!this.next.isCharacter(Ga));this.rbracesExpected--,this.expectCharacter(Ga)}return new ku(this.span(n),this.sourceSpan(n),i,e)}parseAccessMember(i,e,n){let o=this.inputIndex,r=this.withContext(r0.Writable,()=>{let c=this.expectIdentifierOrKeyword()??"";return c.length===0&&this.error("Expected identifier for property access",i.span.end),c}),a=this.sourceSpan(o);if(n)return this.isAssignmentOperator(this.next)?(this.advance(),this.error("The '?.' operator cannot be used in the assignment"),new Da(this.span(e),this.sourceSpan(e))):new M0(this.span(e),this.sourceSpan(e),a,i,r);if(this.isAssignmentOperator(this.next)){let c=this.next.strValue;if(!(this.parseFlags&1))return this.advance(),this.error("Bindings cannot contain assignments"),new Da(this.span(e),this.sourceSpan(e));let m=new Ac(this.span(e),this.sourceSpan(e),a,i,r);this.advance();let p=this.parseConditional();return new Ha(this.span(e),this.sourceSpan(e),c,m,p)}else return new Ac(this.span(e),this.sourceSpan(e),a,i,r)}parseCall(i,e,n){let o=this.inputIndex;this.rparensExpected++;let r=this.parseCallArguments(),a=this.span(o,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(Pr),this.rparensExpected--;let c=this.span(e),m=this.sourceSpan(e);return n?new Ix(c,m,i,r,a):new df(c,m,i,r,a)}parseCallArguments(){if(this.next.isCharacter(Pr))return[];let i=[];do i.push(this.next.isOperator("...")?this.parseSpreadElement():this.parsePipe());while(this.consumeOptionalCharacter(Pa));return i}parseSpreadElement(){this.next.isOperator("...")||this.error("Spread element must start with '...' operator");let i=this.inputIndex;this.advance();let e=this.parsePipe(),n=this.span(i),o=this.sourceSpan(i);return new Px(n,o,e)}expectTemplateBindingKey(){let i="",e=!1,n=this.currentAbsoluteOffset;do i+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(i+="-");while(e);return{source:i,span:new zs(n,n+i.length)}}parseTemplateBindings(i){let e=[];for(e.push(...this.parseDirectiveKeywordBindings(i));this.index{this.rbracketsExpected++;let o=this.parsePipe();if(o instanceof Da&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(Ed),this.isAssignmentOperator(this.next)){let r=this.next.strValue;if(n)this.advance(),this.error("The '?.' operator cannot be used in the assignment");else{let a=new Mu(this.span(e),this.sourceSpan(e),i,o);this.advance();let c=this.parseConditional();return new Ha(this.span(e),this.sourceSpan(e),r,a,c)}}else return n?new k0(this.span(e),this.sourceSpan(e),i,o):new Mu(this.span(e),this.sourceSpan(e),i,o);return new Da(this.span(e),this.sourceSpan(e))})}parseDirectiveKeywordBindings(i){let e=[];this.consumeOptionalCharacter(Pc);let n=this.getDirectiveBoundTarget(),o=this.currentAbsoluteOffset,r=this.parseAsBinding(i);r||(this.consumeStatementTerminator(),o=this.currentAbsoluteOffset);let a=new zs(i.span.start,o);return e.push(new lD(a,i,n)),r&&e.push(r),e}getDirectiveBoundTarget(){if(this.next===Y_||this.peekKeywordAs()||this.peekKeywordLet())return null;let i=this.parsePipe(),{start:e,end:n}=i.span,o=this.input.substring(e,n);return new ps(i,o,Em(this.parseSourceSpan),this.absoluteOffset+e,this.errors)}parseAsBinding(i){if(!this.peekKeywordAs())return null;this.advance();let e=this.expectTemplateBindingKey();this.consumeStatementTerminator();let n=new zs(i.span.start,this.currentAbsoluteOffset);return new R0(n,e,i)}parseLetBinding(){if(!this.peekKeywordLet())return null;let i=this.currentAbsoluteOffset;this.advance();let e=this.expectTemplateBindingKey(),n=null;this.consumeOptionalOperator("=")&&(n=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let o=new zs(i,this.currentAbsoluteOffset);return new R0(o,e,n)}parseNoInterpolationTaggedTemplateLiteral(i,e){let n=this.parseNoInterpolationTemplateLiteral();return new A0(this.span(e),this.sourceSpan(e),i,n)}parseNoInterpolationTemplateLiteral(){let i=this.next.strValue,e=this.inputIndex;this.advance();let n=this.span(e),o=this.sourceSpan(e);return new O0(n,o,[new Ax(n,o,i)],[])}parseTaggedTemplateLiteral(i,e){let n=this.parseTemplateLiteral();return new A0(this.span(e),this.sourceSpan(e),i,n)}parseTemplateLiteral(){let i=[],e=[],n=this.inputIndex;for(;this.next!==Y_;){let o=this.next;if(o.isTemplateLiteralPart()||o.isTemplateLiteralEnd()){let r=this.inputIndex;if(this.advance(),i.push(new Ax(this.span(r),this.sourceSpan(r),o.strValue)),o.isTemplateLiteralEnd())break}else if(o.isTemplateLiteralInterpolationStart()){this.advance(),this.rbracesExpected++;let r=this.parsePipe();r instanceof Da?this.error("Template literal interpolation cannot be empty"):e.push(r),this.rbracesExpected--}else this.advance()}return new O0(this.span(n),this.sourceSpan(n),i,e)}parseRegularExpressionLiteral(){let i=this.next;if(this.advance(),!i.isRegExpBody())return new Da(this.span(this.inputIndex),this.sourceSpan(this.inputIndex));let e=null;if(this.next.isRegExpFlags()){e=this.next,this.advance();let r=new Set;for(let a=0;a`"${m}"`).join(", "),e.index+a)}}let n=i.index,o=e?e.end:i.end;return new Nx(this.span(n,o),this.sourceSpan(n,o),i.strValue,e?e.strValue:null)}parseArrowFunction(i){let e;if(this.next.isIdentifier()){let o=this.next;this.advance(),e=[this.getArrowFunctionIdentifierArg(o)]}else this.next.isCharacter(qa)?(this.rparensExpected++,this.advance(),e=this.parseArrowFunctionParameters(),this.rparensExpected--):(e=[],this.error(`Unexpected token ${this.next}`));this.expectOperator("=>");let n;if(this.next.isCharacter(ml))this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."),n=new Da(this.span(i),this.sourceSpan(i));else{let o=this.parseFlags;this.parseFlags=1,n=this.parseExpression(),this.parseFlags=o}return new Ox(this.span(i),this.sourceSpan(i),e,n)}parseArrowFunctionParameters(){let i=[];if(!this.consumeOptionalCharacter(Pr))for(;this.next!==Y_;)if(this.next.isIdentifier()){let e=this.next;if(this.advance(),i.push(this.getArrowFunctionIdentifierArg(e)),this.consumeOptionalCharacter(Pr))break;this.expectCharacter(Pa)}else{this.error(`Unexpected token ${this.next}`);break}return i}getArrowFunctionIdentifierArg(i){return new sD(i.strValue,this.span(i.index),this.sourceSpan(i.index))}isArrowFunction(){let i=this.index,e=this.tokens;if(i>e.length-2)return!1;if(e[i].isIdentifier()&&e[i+1].isOperator("=>"))return!0;if(e[i].isCharacter(qa)){let n=i+1;for(n;n")}return!1}consumeStatementTerminator(){this.consumeOptionalCharacter(ms)||this.consumeOptionalCharacter(Pa)}error(i,e=this.index){this.errors.push(Jh(i,this.input,this.getErrorLocationText(e),this.parseSourceSpan)),this.skip()}getErrorLocationText(i){return i0&&(e=` ${e} `);let o=Em(n),r=`Parser Error: ${t}${e}[${i}] in ${o}`;return new mn(n,r)}var YD=class extends mf{errors=[];visitPipe(){this.errors.push("pipes")}};function gY(t){let i=new Map,e=0,n=0,o=0;for(;oc+m.length,0);n+=a,e+=a}i.set(n,e),o++}return i}function _Y(t){return t.visit(new KD)}var KD=class{visitUnary(i,e){return`${i.operator}${i.expr.visit(this,e)}`}visitBinary(i,e){return`${i.left.visit(this,e)} ${i.operation} ${i.right.visit(this,e)}`}visitChain(i,e){return i.expressions.map(n=>n.visit(this,e)).join("; ")}visitConditional(i,e){return`${i.condition.visit(this,e)} ? ${i.trueExp.visit(this,e)} : ${i.falseExp.visit(this,e)}`}visitThisReceiver(){return"this"}visitImplicitReceiver(){return""}visitInterpolation(i,e){return bY(i.strings,i.expressions.map(n=>n.visit(this,e))).join("")}visitKeyedRead(i,e){return`${i.receiver.visit(this,e)}[${i.key.visit(this,e)}]`}visitLiteralArray(i,e){return`[${i.expressions.map(n=>n.visit(this,e)).join(", ")}]`}visitLiteralMap(i,e){return`{${vY(i.keys.map(n=>n.kind==="spread"?"...":n.quoted?`'${n.key}'`:n.key),i.values.map(n=>n.visit(this,e))).map(([n,o])=>`${n}: ${o}`).join(", ")}}`}visitLiteralPrimitive(i){if(i.value===null)return"null";switch(typeof i.value){case"number":case"boolean":return i.value.toString();case"undefined":return"undefined";case"string":return`'${i.value.replace(/'/g,"\\'")}'`;default:throw new Error(`Unsupported primitive type: ${i.value}`)}}visitPipe(i,e){return`${i.exp.visit(this,e)} | ${i.name}`}visitPrefixNot(i,e){return`!${i.expression.visit(this,e)}`}visitNonNullAssert(i,e){return`${i.expression.visit(this,e)}!`}visitPropertyRead(i,e){return i.receiver instanceof Bc||i.receiver instanceof w0?i.name:`${i.receiver.visit(this,e)}.${i.name}`}visitSafePropertyRead(i,e){return`${i.receiver.visit(this,e)}?.${i.name}`}visitSafeKeyedRead(i,e){return`${i.receiver.visit(this,e)}?.[${i.key.visit(this,e)}]`}visitCall(i,e){return`${i.receiver.visit(this,e)}(${i.args.map(n=>n.visit(this,e)).join(", ")})`}visitSafeCall(i,e){return`${i.receiver.visit(this,e)}?.(${i.args.map(n=>n.visit(this,e)).join(", ")})`}visitTypeofExpression(i,e){return`typeof ${i.expression.visit(this,e)}`}visitVoidExpression(i,e){return`void ${i.expression.visit(this,e)}`}visitRegularExpressionLiteral(i,e){return`/${i.body}/${i.flags||""}`}visitArrowFunction(i,e){let n;return i.parameters.length===1?n=i.parameters[0].name:n=`(${i.parameters.map(o=>o.name).join(", ")})`,`${n} => ${i.body.visit(this,e)}`}visitASTWithSource(i,e){return i.ast.visit(this,e)}visitTemplateLiteral(i,e){let n="";for(let o=0;o[e,i[n]])}function bY(t,i){let e=[];for(let n=0;n(t.set(i,e),t),new Map),yf=class extends ZD{_schema=new Map;_eventSchema=new Map;constructor(){super(),wY.forEach(i=>{let e=new Map,n=new Set,[o,r]=i.split("|"),a=r.split(","),[c,m]=o.split("^");c.split(",").forEach(h=>{this._schema.set(h.toLowerCase(),e),this._eventSchema.set(h.toLowerCase(),n)});let p=m&&this._schema.get(m.toLowerCase());if(p){for(let[h,g]of p)e.set(h,g);for(let h of this._eventSchema.get(m.toLowerCase()))n.add(h)}a.forEach(h=>{if(h.length>0)switch(h[0]){case"*":n.add(h.substring(1));break;case"!":e.set(h.substring(1),CY);break;case"#":e.set(h.substring(1),xY);break;case"%":e.set(h.substring(1),SY);break;default:e.set(h,yY)}})})}hasProperty(i,e,n){if(n.some(r=>r.name===LR.name))return!0;if(i.indexOf("-")>-1){if(QR(i)||dD(i))return!1;if(n.some(r=>r.name===FR.name))return!0}return(this._schema.get(i.toLowerCase())||this._schema.get("unknown")).has(e)}hasElement(i,e){return e.some(n=>n.name===LR.name)||i.indexOf("-")>-1&&(QR(i)||dD(i)||e.some(n=>n.name===FR.name))?!0:this._schema.has(i.toLowerCase())}securityContext(i,e,n){n&&(e=this.getMappedPropName(e)),i=i.toLowerCase(),e=e.toLowerCase();let o=LF()[i+"|"+e];return o||(o=LF()["*|"+e],o||uo.NONE)}getMappedPropName(i){return EL.get(i)??i}getDefaultComponentElementName(){return"ng-component"}validateProperty(i){return i.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${i}' is disallowed for security reasons, please use (${i.slice(2)})=... If '${i}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(i){return i.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${i}' is disallowed for security reasons, please use (${i.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(i){let e=this._schema.get(i.toLowerCase())||this._schema.get("unknown");return Array.from(e.keys()).map(n=>MY.get(n)??n)}allKnownEventsOfElement(i){return Array.from(this._eventSchema.get(i.toLowerCase())??[])}normalizeAnimationStyleProperty(i){return xW(i)}normalizeAnimationStyleValue(i,e,n){let o="",r=n.toString().trim(),a=null;if(kY(i)&&n!==0&&n!=="0")if(typeof n=="number")o="px";else{let c=n.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&c[1].length==0&&(a=`Please provide a CSS unit value for ${e}:${n}`)}return{error:a,value:r+o}}};function kY(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var ai=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:i,implicitNamespacePrefix:e,contentType:n=Dc.PARSABLE_DATA,closedByParent:o=!1,isVoid:r=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:c=!1,canSelfClose:m=!1}={}){i&&i.length>0&&i.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=r,this.closedByParent=o||r,this.implicitNamespacePrefix=e||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=c,this.canSelfClose=m??r}isClosedByChild(i){return this.isVoid||i.toLowerCase()in this.closedByChildren}getContentType(i){return typeof this.contentType=="object"?(i===void 0?void 0:this.contentType[i])??this.contentType.default:this.contentType}},BF,Gh;function JD(t){return Gh||(BF=new ai({canSelfClose:!0}),Gh=Object.assign(Object.create(null),{base:new ai({isVoid:!0}),meta:new ai({isVoid:!0}),area:new ai({isVoid:!0}),embed:new ai({isVoid:!0}),link:new ai({isVoid:!0}),img:new ai({isVoid:!0}),input:new ai({isVoid:!0}),param:new ai({isVoid:!0}),hr:new ai({isVoid:!0}),br:new ai({isVoid:!0}),source:new ai({isVoid:!0}),track:new ai({isVoid:!0}),wbr:new ai({isVoid:!0}),p:new ai({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new ai({closedByChildren:["tbody","tfoot"]}),tbody:new ai({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new ai({closedByChildren:["tbody"],closedByParent:!0}),tr:new ai({closedByChildren:["tr"],closedByParent:!0}),td:new ai({closedByChildren:["td","th"],closedByParent:!0}),th:new ai({closedByChildren:["td","th"],closedByParent:!0}),col:new ai({isVoid:!0}),svg:new ai({implicitNamespacePrefix:"svg"}),foreignObject:new ai({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new ai({implicitNamespacePrefix:"math"}),li:new ai({closedByChildren:["li"],closedByParent:!0}),dt:new ai({closedByChildren:["dt","dd"]}),dd:new ai({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new ai({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new ai({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new ai({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new ai({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new ai({closedByChildren:["optgroup"],closedByParent:!0}),option:new ai({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new ai({ignoreFirstLf:!0}),listing:new ai({ignoreFirstLf:!0}),style:new ai({contentType:Dc.RAW_TEXT}),script:new ai({contentType:Dc.RAW_TEXT}),title:new ai({contentType:{default:Dc.ESCAPABLE_RAW_TEXT,svg:Dc.PARSABLE_DATA}}),textarea:new ai({contentType:Dc.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new yf().allKnownElementNames().forEach(i=>{!Gh[i]&&mD(i)===null&&(Gh[i]=new ai({canSelfClose:!1}))})),Gh[t]??Gh[t.toLowerCase()]??BF}var VF={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"},eP=class{_placeHolderNameCounts={};_signatureToName={};getStartTagPlaceholderName(i,e,n){let o=this._hashTag(i,e,n);if(this._signatureToName[o])return this._signatureToName[o];let r=i.toUpperCase(),a=VF[r]||`TAG_${r}`,c=this._generateUniqueName(n?a:`START_${a}`);return this._signatureToName[o]=c,c}getCloseTagPlaceholderName(i){let e=this._hashClosingTag(i);if(this._signatureToName[e])return this._signatureToName[e];let n=i.toUpperCase(),o=VF[n]||`TAG_${n}`,r=this._generateUniqueName(`CLOSE_${o}`);return this._signatureToName[e]=r,r}getPlaceholderName(i,e){let n=i.toUpperCase(),o=`PH: ${n}=${e}`;if(this._signatureToName[o])return this._signatureToName[o];let r=this._generateUniqueName(n);return this._signatureToName[o]=r,r}getUniquePlaceholder(i){return this._generateUniqueName(i.toUpperCase())}getStartBlockPlaceholderName(i,e){let n=this._hashBlock(i,e);if(this._signatureToName[n])return this._signatureToName[n];let o=this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(i)}`);return this._signatureToName[n]=o,o}getCloseBlockPlaceholderName(i){let e=this._hashClosingBlock(i);if(this._signatureToName[e])return this._signatureToName[e];let n=this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(i)}`);return this._signatureToName[e]=n,n}_hashTag(i,e,n){let o=`<${i}`,r=Object.keys(e).sort().map(c=>` ${c}=${e[c]}`).join(""),a=n?"/>":`>`;return o+r+a}_hashClosingTag(i){return this._hashTag(`/${i}`,{},!1)}_hashBlock(i,e){let n=e.length===0?"":` (${e.sort().join("; ")})`;return`@${i}${n} {}`}_hashClosingBlock(i){return this._hashBlock(`close_${i}`,[])}_toSnakeCase(i){return i.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_generateUniqueName(i){if(!this._placeHolderNameCounts.hasOwnProperty(i))return this._placeHolderNameCounts[i]=1,i;let n=this._placeHolderNameCounts[i];return this._placeHolderNameCounts[i]=n+1,`${i}_${n}`}},TY=new p1(new lv);function EY(t,i){let e=new tP(TY,t,i);return(n,o,r,a,c)=>e.toI18nMessage(n,o,r,a,c)}function DY(t,i){return i}var tP=class{_expressionParser;_retainEmptyTokens;_preserveExpressionWhitespace;constructor(i,e,n){this._expressionParser=i,this._retainEmptyTokens=e,this._preserveExpressionWhitespace=n}toI18nMessage(i,e="",n="",o="",r){let a={isIcu:i.length==1&&i[0]instanceof fu,icuDepth:0,placeholderRegistry:new eP,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||DY},c=Do(this,i,a);return new Qa(c,a.placeholderToContent,a.placeholderToMessage,e,n,o)}visitElement(i,e){return this._visitElementLike(i,e)}visitComponent(i,e){return this._visitElementLike(i,e)}visitDirective(i,e){throw new Error("Unreachable code")}visitAttribute(i,e){let n=i.valueTokens===void 0||i.valueTokens.length===1?new W_(i.value,i.valueSpan||i.sourceSpan):this._visitTextWithInterpolation(i.valueTokens,i.valueSpan||i.sourceSpan,e,i.i18n);return e.visitNodeFn(i,n)}visitText(i,e){let n=i.tokens.length===1?new W_(i.value,i.sourceSpan):this._visitTextWithInterpolation(i.tokens,i.sourceSpan,e,i.i18n);return e.visitNodeFn(i,n)}visitComment(i,e){return null}visitExpansion(i,e){e.icuDepth++;let n={},o=new Hx(i.switchValue,i.type,n,i.sourceSpan);if(i.cases.forEach(c=>{n[c.value]=new Pd(c.expression.map(m=>m.visit(this,e)),c.expSourceSpan)}),e.icuDepth--,e.isIcu||e.icuDepth>0){let c=e.placeholderRegistry.getUniquePlaceholder(`VAR_${i.type}`);return o.expressionPlaceholder=c,e.placeholderToContent[c]={text:i.switchValue,sourceSpan:i.switchValueSourceSpan},e.visitNodeFn(i,o)}let r=e.placeholderRegistry.getPlaceholderName("ICU",i.sourceSpan.toString());e.placeholderToMessage[r]=this.toI18nMessage([i],"","","",void 0);let a=new gf(o,r,i.sourceSpan);return e.visitNodeFn(i,a)}visitExpansionCase(i,e){throw new Error("Unreachable code")}visitBlock(i,e){let n=Do(this,i.children,e);if(i.name==="switch")return new Pd(n,i.sourceSpan);let o=i.parameters.map(m=>m.expression),r=e.placeholderRegistry.getStartBlockPlaceholderName(i.name,o),a=e.placeholderRegistry.getCloseBlockPlaceholderName(i.name);e.placeholderToContent[r]={text:i.startSourceSpan.toString(),sourceSpan:i.startSourceSpan},e.placeholderToContent[a]={text:i.endSourceSpan?i.endSourceSpan.toString():"}",sourceSpan:i.endSourceSpan??i.sourceSpan};let c=new Lm(i.name,o,r,a,n,i.sourceSpan,i.startSourceSpan,i.endSourceSpan);return e.visitNodeFn(i,c)}visitBlockParameter(i,e){throw new Error("Unreachable code")}visitLetDeclaration(i,e){return null}_visitElementLike(i,e){let n=Do(this,i.children,e),o={},r=g=>{o[g.name]=g.value},a,c;i instanceof sl?(a=i.name,c=JD(i.name).isVoid):(a=i.fullName,c=i.tagName?JD(i.tagName).isVoid:!1),i.attrs.forEach(r),i.directives.forEach(g=>g.attrs.forEach(r));let m=e.placeholderRegistry.getStartTagPlaceholderName(a,o,c);e.placeholderToContent[m]={text:i.startSourceSpan.toString(),sourceSpan:i.startSourceSpan};let p="";c||(p=e.placeholderRegistry.getCloseTagPlaceholderName(a),e.placeholderToContent[p]={text:``,sourceSpan:i.endSourceSpan??i.sourceSpan});let h=new Fm(a,o,m,p,n,c,i.sourceSpan,i.startSourceSpan,i.endSourceSpan);return e.visitNodeFn(i,h)}_visitTextWithInterpolation(i,e,n,o){let r=[],a=!1;for(let c of i)switch(c.type){case 8:case 17:a=!0;let[m,p,h]=c.parts,g=NY(p)||"INTERPOLATION",M=n.placeholderRegistry.getPlaceholderName(g,p);if(this._preserveExpressionWhitespace)n.placeholderToContent[M]={text:c.parts.join(""),sourceSpan:c.sourceSpan},r.push(new U0(p,M,c.sourceSpan));else{let C=this.normalizeExpression(c);n.placeholderToContent[M]={text:`${m}${C}${h}`,sourceSpan:c.sourceSpan},r.push(new U0(C,M,c.sourceSpan))}break;default:if(c.parts[0].length>0||this._retainEmptyTokens){let C=r[r.length-1];C instanceof W_?(C.value+=c.parts[0],C.sourceSpan=new bn(C.sourceSpan.start,c.sourceSpan.end,C.sourceSpan.fullStart,C.sourceSpan.details)):r.push(new W_(c.parts[0],c.sourceSpan))}else this._retainEmptyTokens&&r.push(new W_(c.parts[0],c.sourceSpan));break}return a?(PY(r,o),new Pd(r,e)):r[0]}normalizeExpression(i){let e=i.parts[1],n=this._expressionParser.parseBinding(e,i.sourceSpan,i.sourceSpan.start.offset);return _Y(n)}};function PY(t,i){if(i instanceof Qa&&(IY(i),i=i.nodes[0]),i instanceof Pd){AY(i.children,t);for(let e=0;e`"${e.sourceSpan.toString()}"`).join(` `)} Second pass (${i.length} tokens): ${i.map(e=>`"${e.sourceSpan.toString()}"`).join(` `)} `.trim());if(t.some((e,n)=>i[n].constructor!==e.constructor))throw new Error("The types of the i18n message children changed between first and second pass.")}var OY=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;function NY(t){return t.split(OY)[2]}var zF=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","iframe|src","object|codebase","object|data"]);function jF(t,i){return t=t.toLowerCase(),i=i.toLowerCase(),zF.has(t+"|"+i)||zF.has("*|"+i)}var RY=t=>(i,e)=>{let n=t.get(i)??i;return n instanceof Od&&(e instanceof gf&&n.i18n instanceof Qa&&(e.previousMessage=n.i18n),n.i18n=e),e},u1=class{keepI18nAttrs;enableI18nLegacyMessageIdFormat;preserveSignificantWhitespace;retainEmptyTokens;hasI18nMeta=!1;_errors=[];constructor(i=!1,e=!1,n=!0,o=!n){this.keepI18nAttrs=i,this.enableI18nLegacyMessageIdFormat=e,this.preserveSignificantWhitespace=n,this.retainEmptyTokens=o}_generateI18nMessage(i,e="",n){let{meaning:o,description:r,customId:a}=this._parseMetadata(e),m=EY(this.retainEmptyTokens,this.preserveSignificantWhitespace)(i,o,r,a,n);return this._setMessageId(m,e),this._setLegacyIds(m,e),m}visitAllWithErrors(i){let e=i.map(n=>n.visit(this,null));return new d1(e,this._errors)}visitElement(i){return this._visitElementLike(i),i}visitComponent(i,e){return this._visitElementLike(i),i}visitExpansion(i,e){let n,o=i.i18n;if(this.hasI18nMeta=!0,o instanceof gf){let r=o.name;n=this._generateI18nMessage([i],o);let a=j6(n);a.name=r,e!==null&&(e.placeholderToMessage[r]=n)}else n=this._generateI18nMessage([i],e||o);return i.i18n=n,i}visitText(i){return i}visitAttribute(i){return i}visitComment(i){return i}visitExpansionCase(i){return i}visitBlock(i,e){return Do(this,i.children,e),i}visitBlockParameter(i,e){return i}visitLetDeclaration(i,e){return i}visitDirective(i,e){return i}_visitElementLike(i){let e;if(QW(i)){this.hasI18nMeta=!0;let n=[],o={};for(let r of i.attrs)if(r.name===V6){let a=i.i18n||r.value,c=new Map,m=this.preserveSignificantWhitespace?i.children:kc(new m1(!1,c),i.children);e=this._generateI18nMessage(m,a,RY(c)),e.nodes.length===0&&(e=void 0),i.i18n=e}else if(r.name.startsWith(xD)){let a=r.name.slice(xD.length),c;i instanceof Ua?c=i.tagName===null?!1:jF(i.tagName,a):c=jF(i.name,a),c?this._reportError(r,`Translating attribute '${a}' is disallowed for security reasons.`):o[a]=r.value}else n.push(r);if(Object.keys(o).length)for(let r of n){let a=o[r.name];a!==void 0&&r.value&&(r.i18n=this._generateI18nMessage([r],r.i18n||a))}this.keepI18nAttrs||(i.attrs=n)}Do(this,i.children,e)}_parseMetadata(i){return typeof i=="string"?BY(i):i instanceof Qa?i:{}}_setMessageId(i,e){i.id||(i.id=e instanceof Qa&&e.id||KG(i))}_setLegacyIds(i,e){if(this.enableI18nLegacyMessageIdFormat)i.legacyIds=[YG(i),P6(i)];else if(typeof e!="string"){let n=e instanceof Qa?e:e instanceof gf?e.previousMessage:void 0;i.legacyIds=n?n.legacyIds:[]}}_reportError(i,e){this._errors.push(new mn(i.sourceSpan,e))}},FY="|",LY="@@";function BY(t=""){let i,e,n;if(t=t.trim(),t){let o=t.indexOf(LY),r=t.indexOf(FY),a;[a,i]=o>-1?[t.slice(0,o),t.slice(o+2)]:[t,""],[e,n]=r>-1?[a.slice(0,r),a.slice(r+1)]:["",a]}return{customId:i,meaning:e,description:n}}function VY(t){let i=[];return t.description?i.push({tagName:"desc",text:t.description}):i.push({tagName:"suppress",text:"{msgDescriptions}"}),t.meaning&&i.push({tagName:"meaning",text:t.meaning}),pW(i)}var zY="goog.getMsg";function jY(t,i,e,n){let o=HY(i),r=[Ee(o)];Object.keys(n).length&&(r.push(BD(AP(n,!0),!0)),r.push(BD({original_code:gl(Object.keys(n).map(m=>({key:fv(m),quoted:!0,value:i.placeholders[m]?Ee(i.placeholders[m].sourceSpan.toString()):Ee(i.placeholderToMessage[m].nodes.map(p=>p.sourceSpan.toString()).join(""))})))})));let a=new qr(e.name,si(zY).callFn(r),ec,fa.Final);a.addLeadingComment(VY(i));let c=new va(t.set(e));return[a,c]}var nP=class{formatPh(i){return`{$${fv(i)}}`}visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){return xL(i)}visitTagPlaceholder(i){return i.isVoid?this.formatPh(i.startName):`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitPlaceholder(i){return this.formatPh(i.name)}visitBlockPlaceholder(i){return`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitIcuPlaceholder(i,e){return this.formatPh(i.name)}},$Y=new nP;function HY(t){return t.nodes.map(i=>i.visit($Y,null)).join("")}function UY(t,i,e){let{messageParts:n,placeHolders:o}=GY(i),r=WY(i),a=o.map(p=>e[p.text]),c=fW(i,n,o,a,r),m=t.set(c);return[new va(m)]}var iP=class{placeholderToMessage;pieces;constructor(i,e){this.placeholderToMessage=i,this.pieces=e}visitText(i){if(this.pieces[this.pieces.length-1]instanceof mu)this.pieces[this.pieces.length-1].text+=i.value;else{let e=new bn(i.sourceSpan.fullStart,i.sourceSpan.end,i.sourceSpan.fullStart,i.sourceSpan.details);this.pieces.push(new mu(i.value,e))}}visitContainer(i){i.children.forEach(e=>e.visit(this))}visitIcu(i){this.pieces.push(new mu(xL(i),i.sourceSpan))}visitTagPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.startName,i.startSourceSpan??i.sourceSpan)),i.isVoid||(i.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(i.closeName,i.endSourceSpan??i.sourceSpan)))}visitPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.name,i.sourceSpan))}visitBlockPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.startName,i.startSourceSpan??i.sourceSpan)),i.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(i.closeName,i.endSourceSpan??i.sourceSpan))}visitIcuPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.name,i.sourceSpan,this.placeholderToMessage[i.name]))}createPlaceholderPiece(i,e,n){return new ef(fv(i,!1),e,n)}};function GY(t){let i=[],e=new iP(t.placeholderToMessage,i);return t.nodes.forEach(n=>n.visit(e)),qY(i)}function WY(t){let i=t.nodes[0],e=t.nodes[t.nodes.length-1];return new bn(i.sourceSpan.fullStart,e.sourceSpan.end,i.sourceSpan.fullStart,i.sourceSpan.details)}function qY(t){let i=[],e=[];t[0]instanceof ef&&i.push(LE(t[0].sourceSpan.start));for(let n=0;n{let w=M.has(_.name);return M.add(_.name),!w});let C=g.flatMap(_=>{let w=a.get(_.context);if(w===void 0)throw new Error("AssertionError: Could not find i18n expression's value");return[Ee(_.name),w]});h.i18nAttributesConfig=t.addConst(new Lc(C))}for(let m of t.units)for(let p of m.create)if(p.kind===B.I18nStart){let h=c.get(p.root);if(h===void 0)throw new Error("AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?");p.messageIndex=h}}function DL(t,i,e,n){let o=[],r=new Map;for(let p of n.subMessages){let h=e.get(p),{mainVar:g,statements:M}=DL(t,i,e,h);o.push(...M);let C=r.get(h.messagePlaceholder)??[];C.push(g),r.set(h.messagePlaceholder,C)}JY(n,r),n.params=new Map([...n.params.entries()].sort());let a=si(t.pool.uniqueName(XY)),c=nK(t.pool,n.message.id,i,t.i18nUseExternalIds),m;if(n.needsPostprocessing||n.postprocessingParams.size>0){let p=Object.fromEntries([...n.postprocessingParams.entries()].sort()),h=AP(p,!1),g=[];n.postprocessingParams.size>0&&g.push(BD(h,!0)),m=M=>Zt(he.i18nPostprocess).callFn([M,...g])}return o.push(...eK(n.message,a,c,n.params,m)),{mainVar:a,statements:o}}function JY(t,i){for(let[e,n]of i)n.length===1?t.params.set(e,n[0]):(t.params.set(e,Ee(`${HF}${QY}${e}${HF}`)),t.postprocessingParams.set(e,oo(n)))}function eK(t,i,e,n,o){let r=Object.fromEntries(n),a=[KY(i),y1(tK(),jY(i,t,e,r),UY(i,t,AP(r,!1)))];return o&&a.push(new va(i.set(o(i)))),a}function tK(){return uv(si($F)).notIdentical(Ee("undefined",DP)).and(si($F))}function nK(t,i,e,n){let o,r=e;if(n){let a=UF("EXTERNAL_"),c=t.uniqueName(r);o=`${a}${ru(i)}$$${c}`}else{let a=UF(r);o=t.uniqueName(a)}return si(o)}function iK(t){for(let i of t.units){let e=null,n=null,o=new Map,r=new Map,a=new Map;for(let c of i.create)switch(c.kind){case B.I18nStart:if(c.context===null)throw Error("I18n op should have its context set.");e=c;break;case B.I18nEnd:e=null;break;case B.IcuStart:if(c.context===null)throw Error("Icu op should have its context set.");n=c;break;case B.IcuEnd:n=null;break;case B.Text:if(e!==null)if(o.set(c.xref,e),r.set(c.xref,n),c.icuPlaceholder!==null){let m=PX(t.allocateXrefId(),c.icuPlaceholder,[c.initialValue]);Ze.replace(c,m),a.set(c.xref,m)}else Ze.remove(c);break}for(let c of i.update)switch(c.kind){case B.InterpolateText:if(!o.has(c.target))continue;let m=o.get(c.target),p=r.get(c.target),h=a.get(c.target),g=p?p.context:m.context,M=p?Y0.Postproccessing:Y0.Creation,C=[];for(let _=0;_0){let n=rK(e.localRefs);e.localRefs=t.addConst(n)}else e.localRefs=null;break}}function rK(t){let i=[];for(let e of t)i.push(Ee(e.name),Ee(e.target));return oo(i)}function aK(t){for(let i of t.units){let e=Ia.HTML;for(let n of i.create)n.kind===B.ElementStart&&n.namespace!==e&&(Ze.insertBefore(yX(n.namespace),n),e=n.namespace)}}function sK(t){let i=[],e=0,n=0,o=0,r=0,a=0,c=null;for(;e0&&n===0&&o===0){let p=t.substring(r,e-1).trim();i.push(c,p),a=e,r=0,c=null}break}if(c&&r){let m=t.slice(r).trim();i.push(c,m)}return i}function PL(t){return t.replace(/[a-z][A-Z]/g,i=>i.charAt(0)+"-"+i.charAt(1)).toLowerCase()}function lK(t){let i=new Map;for(let e of t.units)for(let n of e.create)Hm(n)&&i.set(n.xref,n);for(let e of t.units)for(let n of e.create)if(n.kind===B.ExtractedAttribute&&n.bindingKind===Qt.Attribute&&lL(n.expression)){let o=i.get(n.target);if(o!==void 0&&(o.kind===B.Template||o.kind===B.ConditionalCreate||o.kind===B.ConditionalBranchCreate)&&o.templateKind===us.Structural)continue;if(n.name==="style"){let r=sK(n.expression.value);for(let a=0;a{if(!(!(r instanceof Id)||r.name!==null)){if(!n.has(r.xref))throw new Error(`Variable ${r.xref} not yet named`);r.name=n.get(r.xref)}})}function dK(t,i){if(t.name===null)switch(t.kind){case oa.Context:t.name=`ctx_r${i.index++}`;break;case oa.Identifier:let e=t.identifier===Gs?"i":"";t.name=`${t.identifier}_${e}r${++i.index}`;break;default:t.name=`_r${++i.index}`;break}return t.name}function mK(t){return t.startsWith("--")?t:PL(t)}function GF(t){let i=t.indexOf("!important");return i>-1?t.substring(0,i):t}function pK(t){for(let i of t.units){for(let e of i.functions)BE(e.ops);for(let e of i.create)(e.kind===B.Listener||e.kind===B.Animation||e.kind===B.AnimationListener||e.kind===B.TwoWayListener)&&BE(e.handlerOps);BE(i.update)}}function BE(t){for(let i of t){if(i.kind!==B.Statement||!(i.statement instanceof va)||!(i.statement.expr instanceof Kx))continue;let e=i.statement.expr.steps,n=!0;for(let o=i.next;o.kind!==B.ListEnd&&n;o=o.next)wr(o,(r,a)=>{if(!jc(r))return r;if(n&&!(a&$n.InChildOperation))switch(r.kind){case en.NextContext:r.steps+=e,Ze.remove(i),n=!1;break;case en.GetCurrentView:case en.Reference:case en.ContextLetReference:n=!1;break}})}}var uK="ng-container";function hK(t){for(let i of t.units){let e=new Set;for(let n of i.create)n.kind===B.ElementStart&&n.tag===uK&&(n.kind=B.ContainerStart,e.add(n.xref)),n.kind===B.ElementEnd&&e.has(n.xref)&&(n.kind=B.ContainerEnd)}}function fK(t,i){let e=t.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function gK(t){let i=new Map;for(let e of t.units)for(let n of e.create)Hm(n)&&i.set(n.xref,n);for(let e of t.units)for(let n of e.create)(n.kind===B.ElementStart||n.kind===B.ContainerStart)&&n.nonBindable&&Ze.insertAfter(_X(n.xref),n),(n.kind===B.ElementEnd||n.kind===B.ContainerEnd)&&fK(i,n.xref).nonBindable&&Ze.insertBefore(vX(n.xref),n)}function Ic(t){return i=>i.kind===t}function m0(t,i){return e=>e.kind===t&&i===e.expression instanceof er}function _K(t){return t.kind===B.Listener&&!(t.hostListener&&t.isLegacyAnimationListener)||t.kind===B.TwoWayListener||t.kind===B.Animation||t.kind===B.AnimationListener}function vK(t){return(t.kind===B.Property||t.kind===B.TwoWayProperty)&&!(t.expression instanceof er)}var bK=[{test:t=>t.kind===B.Listener&&t.hostListener&&t.isLegacyAnimationListener},{test:_K}],CK=[{test:Ic(B.StyleMap),transform:h1},{test:Ic(B.ClassMap),transform:h1},{test:Ic(B.StyleProp)},{test:Ic(B.ClassProp)},{test:m0(B.Attribute,!0)},{test:m0(B.Property,!0)},{test:vK},{test:m0(B.Attribute,!1)},{test:Ic(B.Control)}],xK=[{test:m0(B.DomProperty,!0)},{test:m0(B.DomProperty,!1)},{test:Ic(B.Attribute)},{test:Ic(B.StyleMap),transform:h1},{test:Ic(B.ClassMap),transform:h1},{test:Ic(B.StyleProp)},{test:Ic(B.ClassProp)}],WF=new Set([B.Listener,B.TwoWayListener,B.AnimationListener,B.StyleMap,B.ClassMap,B.StyleProp,B.ClassProp,B.Property,B.TwoWayProperty,B.DomProperty,B.Attribute,B.Animation,B.Control]);function yK(t){for(let i of t.units){qF(i.create,bK);let e=i.job.kind===Vt.Host?xK:CK;qF(i.update,e)}}function qF(t,i){let e=[],n=null;for(let o of t){let r=K0(o)?o.target:null;(!WF.has(o.kind)||r!==n&&n!==null&&r!==null)&&(Ze.insertBefore(XF(e,i),o),e=[],n=null),WF.has(o.kind)&&(e.push(o),Ze.remove(o),n=r??n)}t.push(XF(e,i))}function XF(t,i){let e=Array.from(i,()=>new Array);for(let n of t){let o=i.findIndex(r=>r.test(n));e[o].push(n)}return e.flatMap((n,o)=>{let r=i[o].transform;return r?r(n):n})}function h1(t){return t.slice(t.length-1)}function SK(t){for(let i of t.units){let e=_L(i);for(let n of i.ops())if(n.kind===B.Binding){let o=MK(e,n.target);wK(n.name)&&o.kind===B.Projection&&Ze.remove(n)}}}function wK(t){return t.toLowerCase()==="select"}function MK(t,i){let e=t.get(i);if(e===void 0)throw new Error("All attributes should have an slottable target.");return e}function kK(t){for(let i of t.units)TK(i)}function TK(t){for(let i of t.update)wr(i,(e,n)=>{if(!jc(e)||e.kind!==en.PipeBinding)return;if(n&$n.InChildOperation)throw new Error("AssertionError: pipe bindings should not appear in child expressions");if(i.target==null)throw new Error("AssertionError: expected slot handle to be assigned for pipe creation");EK(t,i.target,e)})}function EK(t,i,e){for(let n=t.create.head.next;n.kind!==B.ListEnd;n=n.next){if(!Tf(n)||n.xref!==i)continue;for(;n.next.kind===B.Pipe;)n=n.next;let o=xX(e.target,e.targetSlot,e.name);Ze.insertBefore(o,n.next);return}throw new Error(`AssertionError: unable to find insertion point for pipe ${e.name}`)}function DK(t){for(let i of t.units)for(let e of i.update)tr(e,n=>!(n instanceof Iu)||n.args.length<=4?n:new tv(n.target,n.targetSlot,n.name,oo(n.args),n.args.length),$n.None)}function PK(t){IL(t.root,0)}function IL(t,i){let e=null;for(let n of t.create)switch(n.kind){case B.I18nStart:n.subTemplateIndex=i===0?null:i,e=n;break;case B.I18nEnd:e.subTemplateIndex===null&&(i=0),e=null;break;case B.ConditionalCreate:case B.ConditionalBranchCreate:case B.Template:i=tx(t.job.views.get(n.xref),e,n.i18nPlaceholder,i);break;case B.RepeaterCreate:let o=t.job.views.get(n.xref);i=tx(o,e,n.i18nPlaceholder,i),n.emptyView!==null&&(i=tx(t.job.views.get(n.emptyView),e,n.emptyI18nPlaceholder,i));break;case B.Projection:n.fallbackView!==null&&(i=tx(t.job.views.get(n.fallbackView),e,n.fallbackViewI18nPlaceholder,i));break}return i}function tx(t,i,e,n){if(e!==void 0){if(i===null)throw Error("Expected template with i18n placeholder to be in an i18n block.");n++,IK(t,i)}return IL(t,n)}function IK(t,i){if(t.create.head.next?.kind!==B.I18nStart){let e=t.job.allocateXrefId();Ze.insertAfter(k1(e,i.message,i.root,null),t.create.head),Ze.insertBefore(T1(e,null),t.create.tail)}}function AK(t){for(let i of t.units)for(let e of i.ops())wr(e,n=>{if(!(n instanceof Pu)||n.body===null)return;let o=new oP(n.args.length);n.fn=t.pool.getSharedConstant(o,n.body),n.body=null})}var oP=class extends y0{numArgs;constructor(i){super(),this.numArgs=i}keyOf(i){return i instanceof jm?`param(${i.index})`:super.keyOf(i)}toSharedConstantDeclaration(i,e){let n=[];for(let r=0;rr instanceof jm?si("a"+r.index):r,$n.None);return new qr(i,new Nu(n,o),void 0,fa.Final)}};function OK(t){for(let i of t.units)for(let e of i.update)tr(e,(n,o)=>o&$n.InChildOperation?n:n instanceof Lc?NK(n):n instanceof ic?RK(n):n,$n.None)}function NK(t){let i=[],e=[];for(let n of t.entries){if(n instanceof yu){if(n.expression.isConstant())i.push(n);else{let o=e.length;e.push(n.expression),i.push(new yu(new jm(o)))}continue}if(n.isConstant())i.push(n);else{let o=e.length;e.push(n),i.push(new jm(o))}}return new Pu(oo(i),e)}function RK(t){let i=[],e=[];for(let n of t.entries){if(n instanceof Om){if(n.expression.isConstant())i.push(n);else{let o=e.length;e.push(n.expression),i.push(new Om(new jm(o)))}continue}if(n.value.isConstant())i.push(n);else{let o=e.length;e.push(n.value),i.push(new sf(n.key,new jm(o),n.quoted))}}return new Pu(new ic(i),e)}function FK(t){for(let i of t.units)for(let e of i.ops())tr(e,n=>n instanceof af&&(n.flags===null||!n.flags.includes("g"))?t.pool.getSharedConstant(new rP,n):n,$n.None)}var rP=class extends y0{toSharedConstantDeclaration(i,e){return new qr(i,e,void 0,fa.Final)}};function LK(t,i,e,n,o){return Wm(he.element,t,i,e,n,o)}function BK(t,i,e,n,o){return Wm(he.elementStart,t,i,e,n,o)}function Wm(t,i,e,n,o,r){let a=[Ee(i)];return e!==null&&a.push(Ee(e)),o!==null?a.push(Ee(n),Ee(o)):n!==null&&a.push(Ee(n)),Mn(t,a,r)}function AL(t,i,e,n,o,r,a,c,m){let p=[Ee(i),e,Ee(n),Ee(o),Ee(r),Ee(a)];for(c!==null&&(p.push(Ee(c)),p.push(Zt(he.templateRefExtractor)));p[p.length-1].isEquivalent(lf);)p.pop();return Mn(t,p,m)}function $P(t,i,e,n,o){let r=[Ee(i)];return e instanceof er?r.push(Ef(e,o)):r.push(e),n!==null&&r.push(n),Mn(t,r,o)}function VK(t){return Mn(he.elementEnd,[],t)}function zK(t,i,e,n){return Wm(he.elementContainerStart,t,null,i,e,n)}function jK(t,i,e,n){return Wm(he.elementContainer,t,null,i,e,n)}function $K(){return Mn(he.elementContainerEnd,[],null)}function HK(t,i,e,n,o,r,a,c){return AL(he.templateCreate,t,i,e,n,o,r,a,c)}function UK(){return Mn(he.disableBindings,[],null)}function GK(){return Mn(he.enableBindings,[],null)}function WK(t,i,e,n,o){let r=[Ee(t),i];return e!==null&&r.push(Zt(e)),Mn(n?he.syntheticHostListener:he.listener,r,o)}function QF(t,i){return Zt(he.twoWayBindingSet).callFn([t,i])}function qK(t,i,e){return Mn(he.twoWayListener,[Ee(t),i],e)}function XK(t,i){return Mn(he.pipe,[Ee(t),Ee(i)],null)}function QK(){return Mn(he.namespaceHTML,[],null)}function YK(){return Mn(he.namespaceSVG,[],null)}function KK(){return Mn(he.namespaceMathML,[],null)}function ZK(t,i){return Mn(he.advance,t>1?[Ee(t)]:[],i)}function JK(t){return Zt(he.reference).callFn([Ee(t)])}function eZ(t){return Zt(he.nextContext).callFn(t===1?[]:[Ee(t)])}function tZ(){return Zt(he.getCurrentView).callFn([])}function nZ(t){return Zt(he.restoreView).callFn([t])}function iZ(t){return Zt(he.resetView).callFn([t])}function oZ(t,i,e){let n=[Ee(t,null)];return i!==""&&n.push(Ee(i)),Mn(he.text,n,e)}function rZ(t,i,e,n,o,r,a,c,m,p,h){let g=[Ee(t),Ee(i),e??Ee(null),Ee(n),Ee(o),Ee(r),a??Ee(null),c??Ee(null),m?Zt(he.deferEnableTimerScheduling):Ee(null),Ee(h)],M;for(;(M=g[g.length-1])!==null&&M instanceof _a&&M.value===null;)g.pop();return Mn(he.defer,g,p)}var aZ=new Map([[po.Idle,{none:he.deferOnIdle,prefetch:he.deferPrefetchOnIdle,hydrate:he.deferHydrateOnIdle}],[po.Immediate,{none:he.deferOnImmediate,prefetch:he.deferPrefetchOnImmediate,hydrate:he.deferHydrateOnImmediate}],[po.Timer,{none:he.deferOnTimer,prefetch:he.deferPrefetchOnTimer,hydrate:he.deferHydrateOnTimer}],[po.Hover,{none:he.deferOnHover,prefetch:he.deferPrefetchOnHover,hydrate:he.deferHydrateOnHover}],[po.Interaction,{none:he.deferOnInteraction,prefetch:he.deferPrefetchOnInteraction,hydrate:he.deferHydrateOnInteraction}],[po.Viewport,{none:he.deferOnViewport,prefetch:he.deferPrefetchOnViewport,hydrate:he.deferHydrateOnViewport}],[po.Never,{none:he.deferHydrateNever,prefetch:he.deferHydrateNever,hydrate:he.deferHydrateNever}]]);function sZ(t,i,e,n){let o=aZ.get(t)?.[e];if(o===void 0)throw new Error(`Unable to determine instruction for trigger ${t}`);return Mn(o,i,n)}function lZ(t){return Mn(he.projectionDef,t?[t]:[],null)}function cZ(t,i,e,n,o,r,a){let c=[Ee(t)];return(i!==0||e!==null||n!==null)&&(c.push(Ee(i)),e!==null&&c.push(e),n!==null&&(e===null&&c.push(Ee(null)),c.push(si(n),Ee(o),Ee(r)))),Mn(he.projection,c,a)}function dZ(t,i,e,n){let o=[Ee(t),Ee(i)];return e!==null&&o.push(Ee(e)),Mn(he.i18nStart,o,n)}function mZ(t,i,e,n,o,r,a,c){let m=[Ee(t),i,Ee(e),Ee(n),Ee(o),Ee(r)];for(a!==null&&(m.push(Ee(a)),m.push(Zt(he.templateRefExtractor)));m[m.length-1].isEquivalent(lf);)m.pop();return Mn(he.conditionalCreate,m,c)}function pZ(t,i,e,n,o,r,a,c){let m=[Ee(t),i,Ee(e),Ee(n),Ee(o),Ee(r)];for(a!==null&&(m.push(Ee(a)),m.push(Zt(he.templateRefExtractor)));m[m.length-1].isEquivalent(lf);)m.pop();return Mn(he.conditionalBranchCreate,m,c)}function uZ(t,i,e,n,o,r,a,c,m,p,h,g,M,C){let _=[Ee(t),si(i),Ee(e),Ee(n),Ee(o),Ee(r),a];return(c||m!==null)&&(_.push(Ee(c)),m!==null&&(_.push(si(m),Ee(p),Ee(h)),(g!==null||M!==null)&&_.push(Ee(g)),M!==null&&_.push(Ee(M)))),Mn(he.repeaterCreate,_,C)}function hZ(t,i){return Mn(he.repeater,[t],i)}function fZ(t,i,e){return t==="prefetch"?Mn(he.deferPrefetchWhen,[i],e):t==="hydrate"?Mn(he.deferHydrateWhen,[i],e):Mn(he.deferWhen,[i],e)}function gZ(t,i){return Mn(he.declareLet,[Ee(t)],i)}function _Z(t,i){return Zt(he.storeLet).callFn([t],i)}function vZ(t){return Zt(he.readContextLet).callFn([Ee(t)])}function bZ(t,i,e,n){let o=[Ee(t),Ee(i)];return e&&o.push(Ee(e)),Mn(he.i18n,o,n)}function CZ(t){return Mn(he.i18nEnd,[],t)}function xZ(t,i){let e=[Ee(t),Ee(i)];return Mn(he.i18nAttributes,e,null)}function yZ(t,i,e){return $P(he.ariaProperty,t,i,null,e)}function SZ(t,i,e,n){return $P(he.property,t,i,e,n)}function wZ(t){return Mn(he.control,[],t)}function MZ(t){return Mn(he.controlCreate,[],t)}function kZ(t,i,e,n){let o=[Ee(t),i];return e!==null&&o.push(e),Mn(he.twoWayProperty,o,n)}function TZ(t,i,e,n,o){let r=[Ee(t)];return i instanceof er?r.push(Ef(i,o)):r.push(i),(e!==null||n!==null)&&r.push(e??Ee(null)),n!==null&&r.push(Ee(n)),Mn(he.attribute,r,null)}function EZ(t,i,e,n){let o=[Ee(t)];return i instanceof er?o.push(Ef(i,n)):o.push(i),e!==null&&o.push(Ee(e)),Mn(he.styleProp,o,n)}function DZ(t,i,e){return Mn(he.classProp,[Ee(t),i],e)}function PZ(t,i){let e=t instanceof er?Ef(t,i):t;return Mn(he.styleMap,[e],i)}function IZ(t,i){let e=t instanceof er?Ef(t,i):t;return Mn(he.classMap,[e],i)}function AZ(t,i,e,n,o){return Wm(he.domElement,t,i,e,n,o)}function OZ(t,i,e,n,o){return Wm(he.domElementStart,t,i,e,n,o)}function NZ(t){return Mn(he.domElementEnd,[],t)}function RZ(t,i,e,n){return Wm(he.domElementContainerStart,t,null,i,e,n)}function FZ(t,i,e,n){return Wm(he.domElementContainer,t,null,i,e,n)}function LZ(){return Mn(he.domElementContainerEnd,[],null)}function BZ(t,i,e,n){let o=[Ee(t),i];return e!==null&&o.push(Zt(e)),Mn(he.domListener,o,n)}function VZ(t,i,e,n,o,r,a,c){return AL(he.domTemplate,t,i,e,n,o,r,a,c)}var YF=[he.pipeBind1,he.pipeBind2,he.pipeBind3,he.pipeBind4];function zZ(t,i,e){if(e.length<1||e.length>YF.length)throw new Error("pipeBind() argument count out of bounds");let n=YF[e.length-1];return Zt(n).callFn([Ee(t),Ee(i),...e])}function jZ(t,i,e){return Zt(he.pipeBindV).callFn([Ee(t),Ee(i),e])}function $Z(t,i,e){let n=OL(t,i);return iJ(eJ,[],n,e)}function HZ(t,i){return Mn(he.i18nExp,[t],i)}function UZ(t,i){return Mn(he.i18nApply,[Ee(t)],i)}function GZ(t,i,e,n){return $P(he.domProperty,t,i,e,n)}function WZ(t,i,e,n){let o=[i];e!==null&&o.push(e);let r=t==="enter"?he.animationEnter:he.animationLeave;return Mn(r,o,n)}function qZ(t,i,e,n){let r=[i instanceof er?Ef(i,n):i];e!==null&&r.push(e);let a=t==="enter"?he.animationEnter:he.animationLeave;return Mn(a,r,n)}function XZ(t,i,e,n){let o=[i],r=t==="enter"?he.animationEnterListener:he.animationLeaveListener;return Mn(r,o,n)}function QZ(t,i,e){return Mn(he.syntheticHostProperty,[Ee(t),i],e)}function YZ(t,i,e){return HP(nJ,[Ee(t),i],e,null)}function KZ(t,i){return Mn(he.attachSourceLocations,[Ee(t),i],null)}function ZZ(t,i,e){return Zt(he.arrowFunction).callFn([Ee(t),i,e])}function OL(t,i){if(t.length<1||i.length!==t.length-1)throw new Error("AssertionError: expected specific shape of args for strings/expressions in interpolation");let e=[];if(i.length===1&&t[0]===""&&t[1]==="")e.push(i[0]);else{let n;for(n=0;n{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}},tJ={constant:[he.interpolate,he.interpolate1,he.interpolate2,he.interpolate3,he.interpolate4,he.interpolate5,he.interpolate6,he.interpolate7,he.interpolate8],variable:he.interpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}},nJ={constant:[he.pureFunction0,he.pureFunction1,he.pureFunction2,he.pureFunction3,he.pureFunction4,he.pureFunction5,he.pureFunction6,he.pureFunction7,he.pureFunction8],variable:he.pureFunctionV,mapping:t=>t};function HP(t,i,e,n){let o=t.mapping(e.length),r=e.at(-1);if(e.length>1&&r instanceof _a&&r.value===""&&e.pop(),oNL(t,n),$n.None),e.kind){case B.Text:Ze.replace(e,oZ(e.handle.slot,e.initialValue,e.sourceSpan));break;case B.ElementStart:Ze.replace(e,t.job.mode===cs.DomOnly?OZ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan):BK(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case B.Element:Ze.replace(e,t.job.mode===cs.DomOnly?AZ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan):LK(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan));break;case B.ElementEnd:Ze.replace(e,t.job.mode===cs.DomOnly?NZ(e.sourceSpan):VK(e.sourceSpan));break;case B.ContainerStart:Ze.replace(e,t.job.mode===cs.DomOnly?RZ(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan):zK(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan));break;case B.Container:Ze.replace(e,t.job.mode===cs.DomOnly?FZ(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan):jK(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan));break;case B.ContainerEnd:Ze.replace(e,t.job.mode===cs.DomOnly?LZ():$K());break;case B.I18nStart:Ze.replace(e,dZ(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case B.I18nEnd:Ze.replace(e,CZ(e.sourceSpan));break;case B.I18n:Ze.replace(e,bZ(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case B.I18nAttributes:if(e.i18nAttributesConfig===null)throw new Error("AssertionError: i18nAttributesConfig was not set");Ze.replace(e,xZ(e.handle.slot,e.i18nAttributesConfig));break;case B.Template:if(!(t instanceof hl))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let n=t.job.views.get(e.xref);Ze.replace(e,e.templateKind===us.Block||t.job.mode===cs.DomOnly?VZ(e.handle.slot,si(n.fnName),n.decls,n.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan):HK(e.handle.slot,si(n.fnName),n.decls,n.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case B.DisableBindings:Ze.replace(e,UK());break;case B.EnableBindings:Ze.replace(e,GK());break;case B.Pipe:Ze.replace(e,XK(e.handle.slot,e.name));break;case B.DeclareLet:Ze.replace(e,gZ(e.handle.slot,e.sourceSpan));break;case B.AnimationString:Ze.replace(e,qZ(e.animationKind,e.expression,e.sanitizer,e.sourceSpan));break;case B.Animation:let o=nx(t,e.handlerFnName,e.handlerOps,!1);Ze.replace(e,WZ(e.animationKind,o,e.sanitizer,e.sourceSpan));break;case B.AnimationListener:let r=nx(t,e.handlerFnName,e.handlerOps,e.consumesDollarEvent);Ze.replace(e,XZ(e.animationKind,r,null,e.sourceSpan));break;case B.Listener:let a=nx(t,e.handlerFnName,e.handlerOps,e.consumesDollarEvent),c=e.eventTarget?oJ.get(e.eventTarget):null;if(c===void 0)throw new Error(`Unexpected global target '${e.eventTarget}' defined for '${e.name}' event. Supported list of global targets: window,document,body.`);Ze.replace(e,t.job.mode===cs.DomOnly&&!e.hostListener&&!e.isLegacyAnimationListener?BZ(e.name,a,c,e.sourceSpan):WK(e.name,a,c,e.hostListener&&e.isLegacyAnimationListener,e.sourceSpan));break;case B.TwoWayListener:Ze.replace(e,qK(e.name,nx(t,e.handlerFnName,e.handlerOps,!0),e.sourceSpan));break;case B.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);Ze.replace(e,Ws(new qr(e.variable.name,e.initializer,void 0,fa.Final)));break;case B.Namespace:switch(e.active){case Ia.HTML:Ze.replace(e,QK());break;case Ia.SVG:Ze.replace(e,YK());break;case Ia.Math:Ze.replace(e,KK());break}break;case B.Defer:let m=!!e.loadingMinimumTime||!!e.loadingAfterTime||!!e.placeholderMinimumTime;Ze.replace(e,rZ(e.handle.slot,e.mainSlot.slot,e.resolverFn,e.loadingSlot?.slot??null,e.placeholderSlot?.slot??null,e.errorSlot?.slot??null,e.loadingConfig,e.placeholderConfig,m,e.sourceSpan,e.flags));break;case B.DeferOn:let p=[];switch(e.trigger.kind){case po.Never:case po.Idle:case po.Immediate:break;case po.Timer:p=[Ee(e.trigger.delay)];break;case po.Viewport:e.modifier==="hydrate"?p=e.trigger.options?[e.trigger.options]:[]:(p=[Ee(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0?p.push(Ee(e.trigger.targetSlotViewSteps)):e.trigger.options&&p.push(Ee(null)),e.trigger.options&&p.push(e.trigger.options));break;case po.Interaction:case po.Hover:e.modifier==="hydrate"?p=[]:(p=[Ee(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0&&p.push(Ee(e.trigger.targetSlotViewSteps)));break;default:throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${e.trigger.kind}`)}Ze.replace(e,sZ(e.trigger.kind,p,e.modifier,e.sourceSpan));break;case B.ProjectionDef:Ze.replace(e,lZ(e.def));break;case B.Projection:if(e.handle.slot===null)throw new Error("No slot was assigned for project instruction");let h=null,g=null,M=null;if(e.fallbackView!==null){if(!(t instanceof hl))throw new Error("AssertionError: must be compiling a component");let E=t.job.views.get(e.fallbackView);if(E===void 0)throw new Error("AssertionError: projection had fallback view xref, but fallback view was not found");if(E.fnName===null||E.decls===null||E.vars===null)throw new Error("AssertionError: expected projection fallback view to have been named and counted");h=E.fnName,g=E.decls,M=E.vars}Ze.replace(e,cZ(e.handle.slot,e.projectionSlotIndex,e.attributes,h,g,M,e.sourceSpan));break;case B.ConditionalCreate:if(!(t instanceof hl))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let C=t.job.views.get(e.xref);Ze.replace(e,mZ(e.handle.slot,si(C.fnName),C.decls,C.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case B.ConditionalBranchCreate:if(!(t instanceof hl))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let _=t.job.views.get(e.xref);Ze.replace(e,pZ(e.handle.slot,si(_.fnName),_.decls,_.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case B.RepeaterCreate:if(e.handle.slot===null)throw new Error("No slot was assigned for repeater instruction");if(!(t instanceof hl))throw new Error("AssertionError: must be compiling a component");let w=t.job.views.get(e.xref);if(w.fnName===null)throw new Error("AssertionError: expected repeater primary view to have been named");let S=null,y=null,k=null;if(e.emptyView!==null){let E=t.job.views.get(e.emptyView);if(E===void 0)throw new Error("AssertionError: repeater had empty view xref, but empty view was not found");if(E.fnName===null||E.decls===null||E.vars===null)throw new Error("AssertionError: expected repeater empty view to have been named and counted");S=E.fnName,y=E.decls,k=E.vars}Ze.replace(e,uZ(e.handle.slot,w.fnName,e.decls,e.vars,e.tag,e.attributes,dJ(t,e),e.usesComponentInstance,S,y,k,e.emptyTag,e.emptyAttributes,e.wholeSourceSpan));break;case B.SourceLocation:let I=oo(e.locations.map(({targetSlot:E,offset:N,line:T,column:R})=>{if(E.slot===null)throw new Error("No slot was assigned for source location");return oo([Ee(E.slot),Ee(N),Ee(T),Ee(R)])}));Ze.replace(e,KZ(e.templatePath,I));break;case B.ControlCreate:Ze.replace(e,MZ(e.sourceSpan));break;case B.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of create op ${B[e.kind]}`)}}function E1(t,i){for(let e of i)switch(tr(e,n=>NL(t,n),$n.None),e.kind){case B.Advance:Ze.replace(e,ZK(e.delta,e.sourceSpan));break;case B.Property:Ze.replace(e,t.job.mode===cs.DomOnly&&e.bindingKind!==Qt.LegacyAnimation&&e.bindingKind!==Qt.Animation?KF(e):lJ(e));break;case B.Control:Ze.replace(e,cJ(e));break;case B.TwoWayProperty:Ze.replace(e,kZ(e.name,e.expression,e.sanitizer,e.sourceSpan));break;case B.StyleProp:Ze.replace(e,EZ(e.name,e.expression,e.unit,e.sourceSpan));break;case B.ClassProp:Ze.replace(e,DZ(e.name,e.expression,e.sourceSpan));break;case B.StyleMap:Ze.replace(e,PZ(e.expression,e.sourceSpan));break;case B.ClassMap:Ze.replace(e,IZ(e.expression,e.sourceSpan));break;case B.I18nExpression:Ze.replace(e,HZ(e.expression,e.sourceSpan));break;case B.I18nApply:Ze.replace(e,UZ(e.handle.slot,e.sourceSpan));break;case B.InterpolateText:Ze.replace(e,$Z(e.interpolation.strings,e.interpolation.expressions,e.sourceSpan));break;case B.Attribute:Ze.replace(e,TZ(e.name,e.expression,e.sanitizer,e.namespace,e.sourceSpan));break;case B.DomProperty:if(e.expression instanceof er)throw new Error("not yet handled");e.bindingKind===Qt.LegacyAnimation||e.bindingKind===Qt.Animation?Ze.replace(e,QZ(e.name,e.expression,e.sourceSpan)):Ze.replace(e,KF(e));break;case B.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);Ze.replace(e,Ws(new qr(e.variable.name,e.initializer,void 0,fa.Final)));break;case B.Conditional:if(e.processed===null)throw new Error("Conditional test was not set.");Ze.replace(e,JZ(e.processed,e.contextValue,e.sourceSpan));break;case B.Repeater:Ze.replace(e,hZ(e.collection,e.sourceSpan));break;case B.DeferWhen:Ze.replace(e,fZ(e.modifier,e.expr,e.sourceSpan));break;case B.StoreLet:throw new Error(`AssertionError: unexpected storeLet ${e.declaredName}`);case B.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of update op ${B[e.kind]}`)}}function KF(t){return GZ(rJ.get(t.name)??t.name,t.expression,t.sanitizer,t.sourceSpan)}function lJ(t){return vL(t.name)?yZ(t.name,t.expression,t.sourceSpan):SZ(t.name,t.expression,t.sanitizer,t.sourceSpan)}function cJ(t){return wZ(t.sourceSpan)}function NL(t,i){if(!jc(i))return i;switch(i.kind){case en.NextContext:return eZ(i.steps);case en.Reference:return JK(i.targetSlot.slot+1+i.offset);case en.LexicalRead:throw new Error(`AssertionError: unresolved LexicalRead of ${i.name}`);case en.TwoWayBindingSet:throw new Error("AssertionError: unresolved TwoWayBindingSet");case en.RestoreView:if(typeof i.view=="number")throw new Error("AssertionError: unresolved RestoreView");return nZ(i.view);case en.ResetView:return iZ(i.expr);case en.GetCurrentView:return tZ();case en.ReadVariable:if(i.name===null)throw new Error(`Read of unnamed variable ${i.xref}`);return si(i.name);case en.ReadTemporaryExpr:if(i.name===null)throw new Error(`Read of unnamed temporary ${i.xref}`);return si(i.name);case en.AssignTemporaryExpr:if(i.name===null)throw new Error(`Assign of unnamed temporary ${i.xref}`);return si(i.name).set(i.expr);case en.PureFunctionExpr:if(i.fn===null)throw new Error("AssertionError: expected PureFunctions to have been extracted");return YZ(i.varOffset,i.fn,i.args);case en.PureFunctionParameterExpr:throw new Error("AssertionError: expected PureFunctionParameterExpr to have been extracted");case en.PipeBinding:return zZ(i.targetSlot.slot,i.varOffset,i.args);case en.PipeBindingVariadic:return jZ(i.targetSlot.slot,i.varOffset,i.args);case en.SlotLiteralExpr:return Ee(i.slot.slot);case en.ContextLetReference:return vZ(i.targetSlot.slot);case en.StoreLet:return _Z(i.value,i.sourceSpan);case en.TrackContext:return si("this");case en.ArrowFunction:if(i.varOffset===null)throw new Error("AssertionError: variable offset was not assigned to arrow function");return ZZ(i.varOffset,t.job.pool.getSharedFunctionReference(mJ(t,i),"arrowFn"),si(Gs));default:throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${en[i.kind]}`)}}function nx(t,i,e,n){E1(t,e);let o=[];for(let a of e){if(a.kind!==B.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${B[a.kind]}`);o.push(a.statement)}let r=[];return n&&r.push(new Ir("$event",hs)),Nm(r,o,void 0,void 0,i)}function dJ(t,i){if(i.trackByFn!==null)return i.trackByFn;let e=[new Ir("$index",bu),new Ir("$item",hs)],n;if(i.trackByOps===null)n=i.usesComponentInstance?Nm(e,[new Ar(i.track)]):Us(e,i.track);else{E1(t,i.trackByOps);let o=[];for(let r of i.trackByOps){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${B[r.kind]}`);o.push(r.statement)}n=i.usesComponentInstance||o.length!==1||!(o[0]instanceof Ar)?Nm(e,o):Us(e,o[0].value)}return i.trackByFn=t.job.pool.getSharedFunctionReference(n,"_forTrack"),i.trackByFn}function mJ(t,i){E1(t,i.ops);let e=[];for(let o of i.ops){if(o.kind!==B.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${B[o.kind]}`);e.push(o.statement)}let n=e.length===1&&e[0]instanceof Ar?e[0].value:e;return Us([new Ir(i.contextName,hs),new Ir(i.currentViewName,hs)],Us(i.parameters,n))}function pJ(t){for(let i of t.units)for(let e of i.update)switch(e.kind){case B.Attribute:case B.Binding:case B.ClassProp:case B.ClassMap:case B.Property:case B.StyleProp:case B.StyleMap:e.expression instanceof nv&&Ze.remove(e);break}}function uJ(t){for(let i of t.units)for(let e of i.create)switch(e.kind){case B.I18nContext:Ze.remove(e);break;case B.I18nStart:e.context=null;break}}function hJ(t){for(let i of t.units)for(let e of i.update){if(e.kind!==B.Variable||e.variable.kind!==oa.Identifier||!(e.initializer instanceof Z0))continue;let n=e.variable.identifier,o=e;for(;o&&o.kind!==B.ListEnd;)tr(o,r=>r instanceof na&&r.name===n?Ee(void 0):r,$n.None),o=o.prev}}function fJ(t){for(let i of t.units){let e=new Set;for(let n of i.update)n.kind===B.I18nExpression&&e.add(n.i18nOwner);for(let n of i.create)switch(n.kind){case B.I18nAttributes:if(e.has(n.xref))continue;Ze.remove(n)}}}function gJ(t){for(let i of t.units){for(let e of i.functions)p0(i,e.ops);p0(i,i.create),p0(i,i.update)}}function p0(t,i){let e=new Map;e.set(t.xref,si(Gs));for(let n of i)switch(n.kind){case B.Variable:n.variable.kind===oa.Context&&e.set(n.variable.view,new Id(n.xref));break;case B.Animation:case B.AnimationListener:case B.Listener:case B.TwoWayListener:p0(t,n.handlerOps);break;case B.RepeaterCreate:n.trackByOps!==null&&p0(t,n.trackByOps);break}t===t.job.root&&e.set(t.xref,si(Gs));for(let n of i)tr(n,o=>{if(o instanceof zm){if(!e.has(o.view))throw new Error(`No context found for reference to view ${o.view} from view ${t.xref}`);return e.get(o.view)}else return o},$n.None)}function _J(t){for(let i of t.units)for(let e of i.create)if(e.kind===B.Defer){if(e.resolverFn!==null)continue;if(e.ownResolverFn!==null){if(e.handle.slot===null)throw new Error("AssertionError: slot must be assigned before extracting defer deps functions");let n=i.fnName?.replace("_Template","");e.resolverFn=t.pool.getSharedFunctionReference(e.ownResolverFn,`${n}_Defer_${e.handle.slot}_DepsFn`,!1)}}}function vJ(t){for(let i of t.units)ZF(i.create),ZF(i.update)}function ZF(t){for(let i of t)(i.kind===B.Listener||i.kind===B.TwoWayListener||i.kind===B.AnimationListener)&&tr(i,e=>e instanceof na&&e.name==="$event"?((i.kind===B.Listener||i.kind===B.AnimationListener)&&(i.consumesDollarEvent=!0),new tc(e.name)):e,$n.InChildOperation)}function bJ(t){let i=new Map,e=new Map;for(let n of t.units)for(let o of n.create)switch(o.kind){case B.I18nContext:i.set(o.xref,o);break;case B.ElementStart:e.set(o.xref,o);break}Tc(t,t.root,i,e)}function Tc(t,i,e,n,o){let r=null,a=new Map;for(let c of i.create)switch(c.kind){case B.I18nStart:if(!c.context)throw Error("Could not find i18n context for i18n op");r={i18nBlock:c,i18nContext:e.get(c.context)};break;case B.I18nEnd:r=null;break;case B.ElementStart:if(c.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");JF(c,r.i18nContext,r.i18nBlock,o),o&&c.i18nPlaceholder.closeName&&a.set(c.xref,o),o=void 0}break;case B.ElementEnd:let m=n.get(c.xref);if(m&&m.i18nPlaceholder!==void 0){if(r===null)throw Error("AssertionError: i18n tag placeholder should only occur inside an i18n block");e6(m,r.i18nContext,r.i18nBlock,a.get(c.xref)),a.delete(c.xref)}break;case B.Projection:if(c.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");JF(c,r.i18nContext,r.i18nBlock,o),e6(c,r.i18nContext,r.i18nBlock,o),o=void 0}if(c.fallbackView!==null){let M=t.views.get(c.fallbackView);if(c.fallbackViewI18nPlaceholder===void 0)Tc(t,M,e,n);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");ix(t,M,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,o),Tc(t,M,e,n),ox(t,M,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}}break;case B.ConditionalCreate:case B.ConditionalBranchCreate:case B.Template:let p=t.views.get(c.xref);if(c.i18nPlaceholder===void 0)Tc(t,p,e,n);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");c.templateKind===us.Structural?Tc(t,p,e,n,c):(ix(t,p,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),Tc(t,p,e,n),ox(t,p,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0)}break;case B.RepeaterCreate:if(o!==void 0)throw Error("AssertionError: Unexpected structural directive associated with @for block");let h=c.handle.slot+1,g=t.views.get(c.xref);if(c.i18nPlaceholder===void 0)Tc(t,g,e,n);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");ix(t,g,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),Tc(t,g,e,n),ox(t,g,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}if(c.emptyView!==null){let M=c.handle.slot+2,C=t.views.get(c.emptyView);if(c.emptyI18nPlaceholder===void 0)Tc(t,C,e,n);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");ix(t,C,M,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,o),Tc(t,C,e,n),ox(t,C,M,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}}break}}function JF(t,i,e,n){let{startName:o,closeName:r}=t.i18nPlaceholder,a=vo.ElementTag|vo.OpenTag,c=t.handle.slot;n!==void 0&&(a|=vo.TemplateTag,c={element:c,template:n.handle.slot}),r||(a|=vo.CloseTag),Sf(i.params,o,c,e.subTemplateIndex,a)}function e6(t,i,e,n){let{closeName:o}=t.i18nPlaceholder;if(o){let r=vo.ElementTag|vo.CloseTag,a=t.handle.slot;n!==void 0&&(r|=vo.TemplateTag,a={element:a,template:n.handle.slot}),Sf(i.params,o,a,e.subTemplateIndex,r)}}function ix(t,i,e,n,o,r,a){let{startName:c,closeName:m}=n,p=vo.TemplateTag|vo.OpenTag;m||(p|=vo.CloseTag),a!==void 0&&Sf(o.params,c,a.handle.slot,r.subTemplateIndex,p),Sf(o.params,c,e,RL(t,r,i),p)}function ox(t,i,e,n,o,r,a){let{closeName:c}=n,m=vo.TemplateTag|vo.CloseTag;c&&(Sf(o.params,c,e,RL(t,r,i),m),a!==void 0&&Sf(o.params,c,a.handle.slot,r.subTemplateIndex,m))}function RL(t,i,e){for(let n of e.create)if(n.kind===B.I18nStart)return n.subTemplateIndex;return i.subTemplateIndex}function Sf(t,i,e,n,o){let r=t.get(i)??[];r.push({value:e,subTemplateIndex:n,flags:o}),t.set(i,r)}function CJ(t){let i=new Map,e=new Map,n=new Map;for(let a of t.units)for(let c of a.create)switch(c.kind){case B.I18nStart:i.set(c.xref,c.subTemplateIndex);break;case B.I18nContext:e.set(c.xref,c);break;case B.IcuPlaceholder:n.set(c.xref,c);break}let o=new Map,r=a=>a.usage===kf.I18nText?a.i18nOwner:a.context;for(let a of t.units)for(let c of a.update)if(c.kind===B.I18nExpression){let m=o.get(r(c))||0,p=i.get(c.i18nOwner)??null,h={value:m,subTemplateIndex:p,flags:vo.ExpressionIndex};xJ(c,h,e,n),o.set(r(c),m+1)}}function xJ(t,i,e,n){if(t.i18nPlaceholder!==null){let o=e.get(t.context),r=t.resolutionTime===Y0.Creation?o.params:o.postprocessingParams,a=r.get(t.i18nPlaceholder)||[];a.push(i),r.set(t.i18nPlaceholder,a)}t.icuPlaceholder!==null&&n.get(t.icuPlaceholder)?.expressionPlaceholders.push(i)}function yJ(t){for(let i of t.units){for(let e of i.functions)u0(i,e.ops,null);u0(i,i.create,null),u0(i,i.update,null)}}function u0(t,i,e){let n=new Map,o=new Map;for(let r of i)switch(r.kind){case B.Variable:switch(r.variable.kind){case oa.Identifier:if(r.variable.local){if(o.has(r.variable.identifier))continue;o.set(r.variable.identifier,r.xref)}else if(n.has(r.variable.identifier))continue;n.set(r.variable.identifier,r.xref);break;case oa.Alias:if(n.has(r.variable.identifier))continue;n.set(r.variable.identifier,r.xref);break;case oa.SavedView:e={view:r.variable.view,variable:r.xref};break}break;case B.Animation:case B.AnimationListener:case B.Listener:case B.TwoWayListener:u0(t,r.handlerOps,e);break;case B.RepeaterCreate:r.trackByOps!==null&&u0(t,r.trackByOps,e);break}for(let r of i)r.kind===B.Listener||r.kind===B.TwoWayListener||r.kind===B.Animation||r.kind===B.AnimationListener||tr(r,a=>{if(a instanceof na)return o.has(a.name)?new Id(o.get(a.name)):n.has(a.name)?new Id(n.get(a.name)):new Hs(new zm(t.job.root.xref),a.name);if(a instanceof ev&&typeof a.view=="number"){if(e===null||e.view!==a.view)throw new Error(`AssertionError: no saved view ${a.view} from view ${t.xref}`);return a.view=new Id(e.variable),a}else return a},$n.None);for(let r of i)wr(r,a=>{if(a instanceof na)throw new Error(`AssertionError: no lexical reads should remain, but found read of ${a.name}`)})}var SJ=new Map([[uo.HTML,he.sanitizeHtml],[uo.RESOURCE_URL,he.sanitizeResourceUrl],[uo.SCRIPT,he.sanitizeScript],[uo.STYLE,he.sanitizeStyle],[uo.URL,he.sanitizeUrl],[uo.ATTRIBUTE_NO_BINDING,he.validateAttribute]]),wJ=new Map([[uo.HTML,he.trustConstantHtml],[uo.RESOURCE_URL,he.trustConstantResourceUrl]]);function MJ(t){for(let i of t.units){if(t.kind!==Vt.Host){for(let e of i.create)if(e.kind===B.ExtractedAttribute){let n=wJ.get(t6(e.securityContext))??null;e.trustedValueFn=n!==null?Zt(n):null}}for(let e of i.update)switch(e.kind){case B.Property:case B.Attribute:case B.DomProperty:let n=null;Array.isArray(e.securityContext)&&e.securityContext.length===2&&e.securityContext.includes(uo.URL)&&e.securityContext.includes(uo.RESOURCE_URL)?n=he.sanitizeUrlOrResourceUrl:n=SJ.get(t6(e.securityContext))??null,e.sanitizer=n!==null?Zt(n):null;break}}}function t6(t){if(Array.isArray(t)){if(t.length>1)throw Error("AssertionError: Ambiguous security context");return t[0]||uo.NONE}return t}function kJ(t){for(let i of t.units){for(let e of i.functions)n6(t,i,e.ops)&&i6(i,e.ops,si(e.currentViewName));i.create.prepend([Dm(i.job.allocateXrefId(),{kind:oa.SavedView,name:null,view:i.xref},new OD,pl.None)]);for(let e of i.create)(e.kind===B.Listener||e.kind===B.TwoWayListener||e.kind===B.Animation||e.kind===B.AnimationListener)&&n6(t,i,e.handlerOps)&&i6(i,e.handlerOps,i.xref)}}function n6(t,i,e){let n=i!==t.root;if(!n)for(let o of e)wr(o,r=>{(r instanceof Yx||r instanceof J0)&&(n=!0)});return n}function i6(t,i,e){i.prepend([Dm(t.job.allocateXrefId(),{kind:oa.Context,name:null,view:t.xref},new ev(e),pl.None)]);for(let n of i)n.kind===B.Statement&&n.statement instanceof Ar&&(n.statement.value=new Zx(n.statement.value))}function TJ(t){let i=new Map;for(let e of t.units){let n=0;for(let o of e.create)Tf(o)&&(o.handle.slot=n,i.set(o.xref,o.handle.slot),n+=o.numSlotsUsed);e.decls=n}for(let e of t.units)for(let n of e.ops())if(n.kind===B.Template||n.kind===B.ConditionalCreate||n.kind===B.ConditionalBranchCreate||n.kind===B.RepeaterCreate){let o=t.views.get(n.xref);n.decls=o.decls}}function EJ(t){let i=new Set,e=new Map;for(let n of t.units)for(let o of n.ops())o.kind===B.DeclareLet&&e.set(o.xref,o),wr(o,r=>{r instanceof J0&&i.add(r.target)});for(let n of t.units)for(let o of n.update)tr(o,r=>r instanceof Z0&&!i.has(r.target)?(DJ(r)||Ze.remove(e.get(r.target)),r.value):r,$n.None)}function DJ(t){let i=!1;return $t(t,e=>((e instanceof Iu||e instanceof tv)&&(i=!0),e),$n.None),i}function PJ(t){let i=new Set;for(let e of t.units)for(let n of e.ops())wr(n,o=>{if(o instanceof Mi)switch(o.operator){case ht.Exponentiation:IJ(o,i);break;case ht.NullishCoalesce:AJ(o,i);break;case ht.And:case ht.Or:OJ(o,i)}});for(let e of t.units)for(let n of e.ops())tr(n,o=>o instanceof nc?i.has(o)?o:o.expr:o,$n.None)}function IJ(t,i){t.lhs instanceof nc&&t.lhs.expr instanceof xu&&i.add(t.lhs)}function AJ(t,i){t.lhs instanceof nc&&(o6(t.lhs.expr)||t.lhs.expr instanceof Fc)&&i.add(t.lhs),t.rhs instanceof nc&&(o6(t.rhs.expr)||t.rhs.expr instanceof Fc)&&i.add(t.rhs)}function OJ(t,i){t.lhs instanceof nc&&t.lhs.expr instanceof Mi&&t.lhs.expr.operator===ht.NullishCoalesce&&i.add(t.lhs)}function o6(t){return t instanceof Mi&&(t.operator===ht.And||t.operator===ht.Or)}function NJ(t){for(let i of t.units)for(let e of i.update)if(e.kind===B.Binding)switch(e.bindingKind){case Qt.ClassName:if(e.expression instanceof er)throw new Error("Unexpected interpolation in ClassName binding");Ze.replace(e,oX(e.target,e.name,e.expression,e.sourceSpan));break;case Qt.StyleProperty:Ze.replace(e,iX(e.target,e.name,e.expression,e.unit,e.sourceSpan));break;case Qt.Property:case Qt.Template:e.name==="style"?Ze.replace(e,rX(e.target,e.expression,e.sourceSpan)):e.name==="class"&&Ze.replace(e,aX(e.target,e.expression,e.sourceSpan));break}}function RJ(t){for(let i of t.units){i.create.prepend(h0(i.create)),i.update.prepend(h0(i.update));for(let e of i.functions)e.ops.prepend(h0(e.ops))}}function h0(t){let i=0,e=[];for(let n of t){let o=new Map;wr(n,(p,h)=>{h&$n.InChildOperation||p instanceof $m&&o.set(p.xref,p)});let r=0,a=new Set,c=new Set,m=new Map;wr(n,(p,h)=>{h&$n.InChildOperation||(p instanceof $c?(a.has(p.xref)||(a.add(p.xref),m.set(p.xref,`tmp_${i}_${r++}`)),r6(m,p)):p instanceof $m&&(o.get(p.xref)===p&&(c.add(p.xref),r--),r6(m,p)))}),e.push(...Array.from(new Set(m.values())).map(p=>Ws(new qr(p)))),i++,n.kind===B.Listener||n.kind===B.Animation||n.kind===B.AnimationListener||n.kind===B.TwoWayListener?n.handlerOps.prepend(h0(n.handlerOps)):n.kind===B.RepeaterCreate&&n.trackByOps!==null&&n.trackByOps.prepend(h0(n.trackByOps))}return e}function r6(t,i){let e=t.get(i.xref);if(e===void 0)throw new Error(`Found xref with unassigned name: ${i.xref}`);i.name=e}function FJ(t){for(let i of t.units)for(let e of i.create)if(e.kind===B.RepeaterCreate)if(e.track instanceof tc&&e.track.name==="$index")e.trackByFn=Zt(he.repeaterTrackByIndex);else if(e.track instanceof tc&&e.track.name==="$item")e.trackByFn=Zt(he.repeaterTrackByIdentity);else if(LJ(t.root.xref,e.track))e.usesComponentInstance=!0,e.track.receiver.receiver.view===i.xref?e.trackByFn=e.track.receiver:(e.trackByFn=Zt(he.componentInstance).callFn([]).prop(e.track.receiver.name),e.track=e.trackByFn);else{e.track=$t(e.track,o=>{if(o instanceof Iu||o instanceof tv)throw new Error("Illegal State: Pipes are not allowed in this context");return o instanceof zm?(e.usesComponentInstance=!0,new AD(o.view)):o},$n.None);let n=new Ze;n.push(Ws(new Ar(e.track,e.track.sourceSpan))),e.trackByOps=n}}function LJ(t,i){if(!(i instanceof fs)||i.args.length===0||i.args.length>2||!(i.receiver instanceof Hs&&i.receiver.receiver instanceof zm)||i.receiver.receiver.view!==t)return!1;let[e,n]=i.args;return!(e instanceof tc)||e.name!=="$index"?!1:i.args.length===1?!0:!(!(n instanceof tc)||n.name!=="$item")}function BJ(t){for(let i of t.units)for(let e of i.create)e.kind===B.RepeaterCreate&&(e.track=$t(e.track,n=>{if(n instanceof na){if(e.varNames.$index.has(n.name))return si("$index");if(n.name===e.varNames.$implicit)return si("$item")}return n},$n.None))}function VJ(t){for(let i of t.units)for(let e of i.create)e.kind===B.TwoWayListener&&tr(e,n=>{if(!(n instanceof Jx))return n;let{target:o,value:r}=n;if(o instanceof Hs||o instanceof Ad)return QF(o,r).or(o.set(r));if(o instanceof Id)return QF(o,r);throw new Error("Unsupported expression in two-way action binding.")},$n.InChildOperation)}function zJ(t){for(let i of t.units){let e=0;for(let r of i.ops())OE(r)&&(e+=jJ(r));let n=r=>{jc(r)&&(r instanceof Pu||(mF(r)&&(r.varOffset=e),OE(r)&&(e+=a6(r))))},o=r=>{!jc(r)||!(r instanceof Pu)||(mF(r)&&(r.varOffset=e),OE(r)&&(e+=a6(r)))};for(let r of i.create)wr(r,n);for(let r of i.update)wr(r,n);for(let r of i.create)wr(r,o);for(let r of i.update)wr(r,o);i.vars=e}if(t instanceof ov)for(let i of t.units)for(let e of i.create){if(e.kind!==B.Template&&e.kind!==B.RepeaterCreate&&e.kind!==B.ConditionalCreate&&e.kind!==B.ConditionalBranchCreate)continue;let n=t.views.get(e.xref);e.vars=n.vars}}function jJ(t){let i;switch(t.kind){case B.Attribute:return i=1,t.expression instanceof er&&!$J(t.expression)&&(i+=t.expression.expressions.length),i;case B.Property:case B.DomProperty:return i=1,t.expression instanceof er&&(i+=t.expression.expressions.length),i;case B.Control:return 2;case B.TwoWayProperty:return 1;case B.StyleProp:case B.ClassProp:case B.StyleMap:case B.ClassMap:return i=2,t.expression instanceof er&&(i+=t.expression.expressions.length),i;case B.InterpolateText:return t.interpolation.expressions.length;case B.I18nExpression:case B.Conditional:case B.DeferWhen:case B.StoreLet:return 1;case B.RepeaterCreate:return t.emptyView?1:0;default:throw new Error(`Unhandled op: ${B[t.kind]}`)}}function a6(t){switch(t.kind){case en.PureFunctionExpr:return 1+t.args.length;case en.PipeBinding:return 1+t.args.length;case en.PipeBindingVariadic:return 1+t.numArgs;case en.StoreLet:case en.ArrowFunction:return 1;default:throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${t.constructor.name}`)}}function $J(t){return!(t.expressions.length!==1||t.strings.length!==2||t.strings[0]!==""||t.strings[1]!=="")}function HJ(t){for(let i of t.units){for(let e of i.functions)Z_(e.ops);Z_(i.create),Z_(i.update);for(let e of i.create)e.kind===B.Listener||e.kind===B.Animation||e.kind===B.AnimationListener||e.kind===B.TwoWayListener?Z_(e.handlerOps):e.kind===B.RepeaterCreate&&e.trackByOps!==null&&Z_(e.trackByOps);for(let e of i.functions)J_(e.ops,null),s6(e.ops);for(let e of i.create)e.kind===B.Listener||e.kind===B.Animation||e.kind===B.AnimationListener||e.kind===B.TwoWayListener?(J_(e.handlerOps,rx),s6(e.handlerOps)):e.kind===B.RepeaterCreate&&e.trackByOps!==null&&J_(e.trackByOps,rx);J_(i.create,rx),J_(i.update,rx)}}var Wr=(function(t){return t[t.None=0]="None",t[t.ViewContextRead=1]="ViewContextRead",t[t.ViewContextWrite=2]="ViewContextWrite",t[t.SideEffectful=4]="SideEffectful",t})(Wr||{});function rx(t){return!(t&$n.InArrowFunctionOperation)}function Z_(t){let i=new Map;for(let e of t)e.kind===B.Variable&&e.flags&pl.AlwaysInline&&(wr(e,n=>{if(jc(n)&&UP(n)!==Wr.None)throw new Error("AssertionError: A context-sensitive variable was marked AlwaysInline")}),i.set(e.xref,e)),tr(e,n=>n instanceof Id&&i.has(n.xref)?i.get(n.xref).initializer.clone():n,$n.None);for(let e of i.values())Ze.remove(e)}function J_(t,i){let e=new Map,n=new Map,o=new Set,r=new Map;for(let p of t){if(p.kind===B.Variable){if(e.has(p.xref)||n.has(p.xref))throw new Error(`Should not see two declarations of the same variable: ${p.xref}`);e.set(p.xref,p),n.set(p.xref,0)}r.set(p,UJ(p,i)),GJ(p,n,o,i)}let a=!1;for(let p of t.reversed()){let h=r.get(p);if(p.kind===B.Variable&&n.get(p.xref)===0){if(a&&h.fences&Wr.ViewContextWrite||h.fences&Wr.SideEffectful){let g=Ws(p.initializer.toStmt());r.set(g,h),Ze.replace(p,g)}else WJ(p,n),Ze.remove(p);r.delete(p),e.delete(p.xref),n.delete(p.xref);continue}h.fences&Wr.ViewContextRead&&(a=!0)}let c=[];for(let[p,h]of n){let M=!!(e.get(p).flags&pl.AlwaysInline);h!==1||M||o.has(p)||c.push(p)}let m;for(;m=c.pop();){let p=e.get(m),h=r.get(p);if(!!(p.flags&pl.AlwaysInline))throw new Error("AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.");for(let M=p.next;M.kind!==B.ListEnd;M=M.next){let C=r.get(M);if(C.variablesUsed.has(m)){if(!XJ(p,M))break;if(qJ(m,p.initializer,M,h.fences)){C.variablesUsed.delete(m);for(let _ of h.variablesUsed)C.variablesUsed.add(_);C.fences|=h.fences,e.delete(m),n.delete(m),r.delete(p),Ze.remove(p)}break}if(!FL(C.fences,h.fences))break}}}function UP(t){switch(t.kind){case en.NextContext:return Wr.ViewContextRead|Wr.ViewContextWrite;case en.RestoreView:return Wr.ViewContextRead|Wr.ViewContextWrite|Wr.SideEffectful;case en.StoreLet:return Wr.SideEffectful;case en.Reference:case en.ContextLetReference:return Wr.ViewContextRead;default:return Wr.None}}function UJ(t,i){let e=Wr.None,n=new Set;return wr(t,(o,r)=>{!jc(o)||i!==null&&!i(r)||(o.kind===en.ReadVariable?n.add(o.xref):e|=UP(o))}),{fences:e,variablesUsed:n}}function GJ(t,i,e,n){wr(t,(o,r)=>{if(!jc(o)||n!==null&&!n(r)||o.kind!==en.ReadVariable)return;let a=i.get(o.xref);a!==void 0&&(i.set(o.xref,a+1),r&$n.InChildOperation&&e.add(o.xref))})}function WJ(t,i){wr(t,e=>{if(!jc(e)||e.kind!==en.ReadVariable)return;let n=i.get(e.xref);if(n!==void 0){if(n===0)throw new Error(`Inaccurate variable count: ${e.xref} - found another read but count is already 0`);i.set(e.xref,n-1)}})}function FL(t,i){if(t&Wr.ViewContextWrite){if(i&Wr.ViewContextRead)return!1}else if(t&Wr.ViewContextRead&&i&Wr.ViewContextWrite)return!1;return!0}function qJ(t,i,e,n){let o=!1,r=!0;return tr(e,(a,c)=>{if(!jc(a)||o||!r)return a;if(c&$n.InChildOperation&&n&Wr.ViewContextRead)return a;switch(a.kind){case en.ReadVariable:if(a.xref===t)return o=!0,i;break;default:let m=UP(a);r=r&&FL(m,n);break}return a},$n.None),o}function XJ(t,i){switch(t.variable.kind){case oa.Identifier:return t.initializer instanceof tc&&t.initializer.name===Gs;case oa.Context:return i.kind===B.Variable;default:return!0}}function s6(t){let i=t.head.next,e=t.tail.prev;i!==null&&e!==null&&i.next===e&&i.kind===B.Statement&&i.statement instanceof va&&i.statement.expr instanceof ev&&e.kind===B.Statement&&e.statement instanceof Ar&&e.statement.value instanceof Zx&&(Ze.remove(i),e.statement.value=e.statement.value.expr)}function QJ(t){for(let i of t.units){let e=null,n=null;for(let o of i.create)switch(o.kind){case B.I18nStart:e=o;break;case B.I18nEnd:e=null;break;case B.IcuStart:e===null&&(n=t.allocateXrefId(),Ze.insertBefore(k1(n,o.message,void 0,null),o));break;case B.IcuEnd:n!==null&&(Ze.insertAfter(T1(n,null),o),n=null);break}}}function YJ(t){for(let i of t.units){for(let e of i.create)e.kind!==B.Animation&&e.kind!==B.AnimationListener&&e.kind!==B.Listener&&e.kind!==B.TwoWayListener&&l6(i,e);for(let e of i.update)l6(i,e)}}function l6(t,i){tr(i,(e,n)=>{if(!(e instanceof Nu)||n&$n.InChildOperation)return e;if(Array.isArray(e.body))throw new Error("AssertionError: unexpected multi-line arrow function");let o=new ND(e.params,e.body);return t.functions.add(o),o},$n.None)}var KJ=new Set(["formField"]);function ZJ(t){for(let i of t.units)JJ(i)}function JJ(t){for(let i of t.update)i.kind===B.Property&&KJ.has(i.name)&&iee(t,i)}var eee=new Set([B.Container,B.ContainerStart,B.ContainerEnd,B.Element,B.ElementStart,B.ElementEnd,B.Template]);function tee(t){return eee.has(t.kind)}function nee(t,i){let e=null;for(let n of t.create)!tee(n)||n.xref!==i||(e=n);return e}function iee(t,i){let e=nee(t,i.target);if(e===null)throw new Error(`No create instruction found for control target ${i.target}`);let n=AX(i.sourceSpan);Ze.insertAfter(n,e),Ze.insertAfter(pX(i.target,i.sourceSpan),i)}var oee=[{kind:Vt.Tmpl,fn:SK},{kind:Vt.Both,fn:FK},{kind:Vt.Host,fn:FQ},{kind:Vt.Tmpl,fn:aK},{kind:Vt.Tmpl,fn:PK},{kind:Vt.Tmpl,fn:QJ},{kind:Vt.Both,fn:oQ},{kind:Vt.Both,fn:NJ},{kind:Vt.Both,fn:HX},{kind:Vt.Tmpl,fn:ZJ},{kind:Vt.Both,fn:eQ},{kind:Vt.Both,fn:zX},{kind:Vt.Tmpl,fn:iQ},{kind:Vt.Both,fn:lK},{kind:Vt.Tmpl,fn:pJ},{kind:Vt.Both,fn:WX},{kind:Vt.Both,fn:yK},{kind:Vt.Tmpl,fn:qX},{kind:Vt.Tmpl,fn:kK},{kind:Vt.Tmpl,fn:rQ},{kind:Vt.Tmpl,fn:DK},{kind:Vt.Both,fn:YJ},{kind:Vt.Both,fn:OK},{kind:Vt.Tmpl,fn:AQ},{kind:Vt.Tmpl,fn:IQ},{kind:Vt.Tmpl,fn:OQ},{kind:Vt.Tmpl,fn:kJ},{kind:Vt.Both,fn:NX},{kind:Vt.Both,fn:vJ},{kind:Vt.Tmpl,fn:BJ},{kind:Vt.Tmpl,fn:hJ},{kind:Vt.Both,fn:yJ},{kind:Vt.Tmpl,fn:aQ},{kind:Vt.Tmpl,fn:VJ},{kind:Vt.Tmpl,fn:FJ},{kind:Vt.Both,fn:gJ},{kind:Vt.Both,fn:MJ},{kind:Vt.Tmpl,fn:oK},{kind:Vt.Both,fn:mQ},{kind:Vt.Both,fn:PJ},{kind:Vt.Both,fn:RJ},{kind:Vt.Both,fn:HJ},{kind:Vt.Both,fn:EJ},{kind:Vt.Tmpl,fn:iK},{kind:Vt.Tmpl,fn:nQ},{kind:Vt.Tmpl,fn:fJ},{kind:Vt.Tmpl,fn:BX},{kind:Vt.Tmpl,fn:FX},{kind:Vt.Tmpl,fn:TJ},{kind:Vt.Tmpl,fn:bJ},{kind:Vt.Tmpl,fn:CJ},{kind:Vt.Tmpl,fn:kQ},{kind:Vt.Tmpl,fn:ZY},{kind:Vt.Tmpl,fn:NQ},{kind:Vt.Both,fn:KX},{kind:Vt.Tmpl,fn:uJ},{kind:Vt.Both,fn:zJ},{kind:Vt.Tmpl,fn:PQ},{kind:Vt.Both,fn:cK},{kind:Vt.Tmpl,fn:_J},{kind:Vt.Tmpl,fn:pK},{kind:Vt.Tmpl,fn:hK},{kind:Vt.Tmpl,fn:dQ},{kind:Vt.Tmpl,fn:VX},{kind:Vt.Tmpl,fn:gK},{kind:Vt.Both,fn:AK},{kind:Vt.Both,fn:aJ},{kind:Vt.Both,fn:GX}];function LL(t,i){for(let e of oee)(e.kind===i||e.kind===Vt.Both)&&e.fn(t)}function ree(t,i){let e=VL(t.root);return BL(t.root,i),e}function BL(t,i){for(let e of t.job.units){if(e.parent!==t.xref)continue;BL(e,i);let n=VL(e);i.statements.push(n.toDeclStmt(n.name))}}function VL(t){if(t.fnName===null)throw new Error(`AssertionError: view ${t.xref} is unnamed`);let i=[];for(let r of t.create){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${B[r.kind]}`);i.push(r.statement)}let e=[];for(let r of t.update){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${B[r.kind]}`);e.push(r.statement)}let n=f1(1,i),o=f1(2,e);return Nm([new Ir(wf,bu),new Ir(Gs,hs)],[...n,...o],void 0,void 0,t.fnName)}function f1(t,i){return i.length===0?[]:[y1(new Mi(ht.BitwiseAnd,si(wf),Ee(t)),i)]}function aee(t){if(t.root.fnName===null)throw new Error("AssertionError: host binding function is unnamed");let i=[];for(let r of t.root.create){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${B[r.kind]}`);i.push(r.statement)}let e=[];for(let r of t.root.update){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${B[r.kind]}`);e.push(r.statement)}if(i.length===0&&e.length===0)return null;let n=f1(1,i),o=f1(2,e);return Nm([new Ir(wf,bu),new Ir(Gs,hs)],[...n,...o],void 0,void 0,t.root.fnName)}var _u=new yf,vu="ng-template",see="animate.";function ux(t){return t instanceof Qa}function lee(t){return ux(t)&&t.nodes.length===1&&t.nodes[0]instanceof Hx}function cee(t,i,e,n,o,r,a,c,m,p){let h=new ov(t,e,n,o,r,a,c,m,p);return Nd(h.root,i),h}function dee(t,i,e){let n=new r1(t.componentName,e,cs.DomOnly);for(let o of t.properties??[]){let r=Qt.Property;o.name.startsWith("attr.")&&(o.name=o.name.substring(5),r=Qt.Attribute),o.isLegacyAnimation&&(r=Qt.LegacyAnimation),o.isAnimation&&(r=Qt.Animation);let a=i.calcPossibleSecurityContexts(t.componentSelector,o.name,r===Qt.Attribute).filter(c=>c!==uo.NONE);mee(n,o,r,a)}for(let[o,r]of Object.entries(t.attributes)??[]){let a=i.calcPossibleSecurityContexts(t.componentSelector,o,!0).filter(c=>c!==uo.NONE);pee(n,o,r,a)}for(let o of t.events??[])uee(n,o);return n}function mee(t,i,e,n){let o,r=i.expression.ast;r instanceof hv?o=new er(r.strings,r.expressions.map(a=>Rn(a,t,i.sourceSpan)),[]):o=Rn(r,t,i.sourceSpan),t.root.update.push(Du(t.root.xref,e,i.name,o,null,n,!1,!1,null,null,i.sourceSpan))}function pee(t,i,e,n){let o=Du(t.root.xref,Qt.Attribute,i,e,null,n,!0,!1,null,null,e.sourceSpan);t.root.update.push(o)}function uee(t,i){let e;if(i.type===Xa.Animation)e=uL(t.root.xref,new ba,i.name,null,cv(t.root,i.handler,i.handlerSpan),i.name.endsWith("enter")?"enter":"leave",i.targetOrPhase,!0,i.sourceSpan);else{let[n,o]=i.type!==Xa.LegacyAnimation?[null,i.targetOrPhase]:[i.targetOrPhase,null];e=jP(t.root.xref,new ba,i.name,null,cv(t.root,i.handler,i.handlerSpan),n,o,!0,i.sourceSpan)}t.root.create.push(e)}function Nd(t,i){for(let e of i)if(e instanceof Vc)hee(t,e);else if(e instanceof js)fee(t,e);else if(e instanceof ff)gee(t,e);else if(e instanceof cu)zL(t,e,null);else if(e instanceof pf)jL(t,e,null);else if(e instanceof jx)_ee(t,e);else if(e instanceof zx)vee(t,e);else if(e instanceof Tu)bee(t,e);else if(e instanceof B6)xee(t,e);else if(e instanceof hf)yee(t,e);else if(e instanceof IP)wee(t,e);else if(!(e instanceof l0))throw new Error(`Unsupported template node: ${e.constructor.name}`)}function hee(t,i){if(i.i18n!==void 0&&!(i.i18n instanceof Qa||i.i18n instanceof Fm))throw Error(`Unhandled i18n metadata type for element: ${i.i18n.constructor.name}`);let e=t.job.allocateXrefId(),[n,o]=oc(i.name),r=hX(o,e,bL(n),i.i18n instanceof Fm?i.i18n:void 0,i.startSourceSpan,i.sourceSpan);t.create.push(r),kee(t,r,i),UL(r,i);let a=null;i.i18n instanceof Qa&&(a=t.job.allocateXrefId(),t.create.push(k1(a,i.i18n,void 0,i.startSourceSpan))),Nd(t,i.children);let c=gX(e,i.endSourceSpan??i.startSourceSpan);t.create.push(c),a!==null&&Ze.insertBefore(T1(a,i.endSourceSpan??i.startSourceSpan),c)}function fee(t,i){if(i.i18n!==void 0&&!(i.i18n instanceof Qa||i.i18n instanceof Fm))throw Error(`Unhandled i18n metadata type for template: ${i.i18n.constructor.name}`);let e=t.job.allocateView(t.xref),n=i.tagName,o="";i.tagName&&([o,n]=oc(i.tagName));let r=i.i18n instanceof Fm?i.i18n:void 0,a=bL(o),c=n===null?"":YX(n,a),m=Mee(i)?us.NgTemplate:us.Structural,p=cL(e.xref,m,n,c,a,r,i.startSourceSpan,i.sourceSpan);t.create.push(p),Tee(t,p,i,m),UL(p,i),Nd(e,i.children);for(let{name:h,value:g}of i.variables)e.contextVariables.set(h,g!==""?g:"$implicit");if(m===us.NgTemplate&&i.i18n instanceof Qa){let h=t.job.allocateXrefId();Ze.insertAfter(k1(h,i.i18n,void 0,i.startSourceSpan),e.create.head),Ze.insertBefore(T1(h,i.endSourceSpan??i.startSourceSpan),e.create.tail)}}function gee(t,i){if(i.i18n!==void 0&&!(i.i18n instanceof Fm))throw Error(`Unhandled i18n metadata type for element: ${i.i18n.constructor.name}`);let e=null;i.children.some(r=>!(r instanceof w1)&&(!(r instanceof cu)||r.value.trim().length>0))&&(e=t.job.allocateView(t.xref),Nd(e,i.children));let n=t.job.allocateXrefId(),o=wX(n,i.selector,i.i18n,e?.xref??null,i.sourceSpan);for(let r of i.attributes){let a=_u.securityContext(i.name,r.name,!0);t.update.push(Du(o.xref,Qt.Attribute,r.name,Ee(r.value),null,a,!0,!1,null,Dd(r.i18n),r.sourceSpan))}t.create.push(o)}function zL(t,i,e){t.create.push(pL(t.job.allocateXrefId(),i.value,e,i.sourceSpan))}function jL(t,i,e){let n=i.value;if(n instanceof ps&&(n=n.ast),!(n instanceof hv))throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${n.constructor.name}`);if(i.i18n!==void 0&&!(i.i18n instanceof Pd))throw Error(`Unhandled i18n metadata type for text interpolation: ${i.i18n?.constructor.name}`);let o=i.i18n instanceof Pd?i.i18n.children.filter(a=>a instanceof U0).map(a=>a.name):[];if(o.length>0&&o.length!==n.expressions.length)throw Error(`Unexpected number of i18n placeholders (${n.expressions.length}) for BoundText with ${n.expressions.length} expressions`);let r=t.job.allocateXrefId();t.create.push(pL(r,"",e,i.sourceSpan)),t.update.push(eX(r,new er(n.strings,n.expressions.map(a=>Rn(a,t.job,null)),o),i.sourceSpan))}function _ee(t,i){let e=null,n=[];for(let o=0;oM.modifier==="none")||h.some(M=>M.modifier==="none")||p.push(km(c,{kind:po.Idle},"none",null)),t.create.push(p),t.update.push(h)}function Cee(t){return Object.keys(t.hydrateTriggers).length>0?1:null}function VE(t,i,e,n,o,r){if(i.idle!==void 0){let a=km(r,{kind:po.Idle},t,i.idle.sourceSpan);e.push(a)}if(i.immediate!==void 0){let a=km(r,{kind:po.Immediate},t,i.immediate.sourceSpan);e.push(a)}if(i.timer!==void 0){let a=km(r,{kind:po.Timer,delay:i.timer.delay},t,i.timer.sourceSpan);e.push(a)}if(i.hover!==void 0){let a=km(r,{kind:po.Hover,targetName:i.hover.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},t,i.hover.sourceSpan);e.push(a)}if(i.interaction!==void 0){let a=km(r,{kind:po.Interaction,targetName:i.interaction.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},t,i.interaction.sourceSpan);e.push(a)}if(i.viewport!==void 0){let a=km(r,{kind:po.Viewport,targetName:i.viewport.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null,options:i.viewport.options?Rn(i.viewport.options,o.job,i.viewport.sourceSpan):null},t,i.viewport.sourceSpan);e.push(a)}if(i.never!==void 0){let a=km(r,{kind:po.Never},t,i.never.sourceSpan);e.push(a)}if(i.when!==void 0){if(i.when.value instanceof hv)throw new Error("Unexpected interpolation in defer block when trigger");let a=cX(r,Rn(i.when.value,o.job,i.when.sourceSpan),t,i.when.sourceSpan);n.push(a)}}function xee(t,i){if(i.i18n instanceof Qa&&lee(i.i18n)){let e=t.job.allocateXrefId();t.create.push(EX(e,i.i18n,j6(i.i18n).name,null));for(let[n,o]of Object.entries(H(H({},i.vars),i.placeholders)))o instanceof pf?jL(t,o,n):zL(t,o,n);t.create.push(DX(e))}else throw Error(`Unhandled i18n metadata type for ICU: ${i.i18n?.constructor.name}`)}function yee(t,i){let e=t.job.allocateView(t.xref),n=`\u0275$index_${e.xref}`,o=`\u0275$count_${e.xref}`,r=new Set;e.contextVariables.set(i.item.name,i.item.value);for(let y of i.contextVariables)y.value==="$index"&&r.add(y.name),y.name==="$index"?e.contextVariables.set("$index",y.value).set(n,y.value):y.name==="$count"?e.contextVariables.set("$count",y.value).set(o,y.value):e.aliases.add({kind:oa.Alias,name:null,identifier:y.name,expression:See(y,n,o)});let a=Ur(i.trackBy.span,i.sourceSpan),c=Rn(i.trackBy,t.job,a);Nd(e,i.children);let m=null,p=null;i.empty!==null&&(m=t.job.allocateView(t.xref),Nd(m,i.empty.children),p=g1(t,m.xref,i.empty));let h={$index:r,$implicit:i.item.name};if(i.i18n!==void 0&&!(i.i18n instanceof Lm))throw Error("AssertionError: Unhandled i18n metadata type or @for");if(i.empty?.i18n!==void 0&&!(i.empty.i18n instanceof Lm))throw Error("AssertionError: Unhandled i18n metadata type or @empty");let g=i.i18n,M=i.empty?.i18n,C=g1(t,e.xref,i),_=fX(e.xref,m?.xref??null,C,c,h,p,g,M,i.startSourceSpan,i.sourceSpan);t.create.push(_);let w=Rn(i.expression,t.job,Ur(i.expression.span,i.sourceSpan)),S=lX(_.xref,_.handle,w,i.sourceSpan);t.update.push(S)}function See(t,i,e){switch(t.value){case"$index":return new na(i);case"$count":return new na(e);case"$first":return new na(i).identical(Ee(0));case"$last":return new na(i).identical(new na(e).minus(Ee(1)));case"$even":return new na(i).modulo(Ee(2)).identical(Ee(0));case"$odd":return new na(i).modulo(Ee(2)).notIdentical(Ee(0));default:throw new Error(`AssertionError: unknown @for loop variable ${t.value}`)}}function wee(t,i){let e=t.job.allocateXrefId();t.create.push(kX(e,i.name,i.sourceSpan)),t.update.push(mX(e,i.name,Rn(i.value,t.job,i.valueSpan),i.sourceSpan))}function Rn(t,i,e){if(t instanceof ps)return Rn(t.ast,i,e);if(t instanceof Ac)return t.receiver instanceof Bc?new na(t.name):new Hs(Rn(t.receiver,i,e),t.name,null,Ur(t.span,e));if(t instanceof df){if(t.receiver instanceof Bc)throw new Error("Unexpected ImplicitReceiver");return new fs(Rn(t.receiver,i,e),t.args.map(n=>Rn(n,i,e)),void 0,Ur(t.span,e))}else{if(t instanceof ds)return Ee(t.value,void 0,Ur(t.span,e));if(t instanceof tf)switch(t.operator){case"+":return new xu(g0.Plus,Rn(t.expr,i,e),void 0,Ur(t.span,e));case"-":return new xu(g0.Minus,Rn(t.expr,i,e),void 0,Ur(t.span,e));default:throw new Error(`AssertionError: unknown unary operator ${t.operator}`)}else if(t instanceof Ha){let n=XX.get(t.operation);if(n===void 0)throw new Error(`AssertionError: unknown binary operator ${t.operation}`);return new Mi(n,Rn(t.left,i,e),Rn(t.right,i,e),void 0,Ur(t.span,e))}else{if(t instanceof w0)return new zm(i.root.xref);if(t instanceof Mu)return new Ad(Rn(t.receiver,i,e),Rn(t.key,i,e),void 0,Ur(t.span,e));if(t instanceof cf)throw new Error("AssertionError: Chain in unknown context");if(t instanceof ku){let n=t.keys.map((o,r)=>{let a=Rn(t.values[r],i,e);return o.kind==="spread"?new Om(a):new sf(o.key,a,o.quoted)});return new ic(n,void 0,Ur(t.span,e))}else{if(t instanceof T0)return new Lc(t.expressions.map(n=>Rn(n,i,e)));if(t instanceof Ex)return new Fc(Rn(t.condition,i,e),Rn(t.trueExp,i,e),Rn(t.falseExp,i,e),void 0,Ur(t.span,e));if(t instanceof I0)return Rn(t.expression,i,e);if(t instanceof Dx)return new Iu(i.allocateXrefId(),new ba,t.name,[Rn(t.exp,i,e),...t.args.map(n=>Rn(n,i,e))]);if(t instanceof k0)return new bf(Rn(t.receiver,i,e),Rn(t.key,i,e),Ur(t.span,e));if(t instanceof M0)return new vf(Rn(t.receiver,i,e),t.name);if(t instanceof Ix)return new Au(Rn(t.receiver,i,e),t.args.map(n=>Rn(n,i,e)));if(t instanceof Da)return new nv(Ur(t.span,e));if(t instanceof E0)return uW(Rn(t.expression,i,e),Ur(t.span,e));if(t instanceof D0)return uv(Rn(t.expression,i,e));if(t instanceof P0)return new bx(Rn(t.expression,i,e),void 0,Ur(t.span,e));if(t instanceof O0)return c6(t,i,e);if(t instanceof A0)return new _0(Rn(t.tag,i,e),c6(t.template,i,e),void 0,Ur(t.span,e));if(t instanceof N0)return new nc(Rn(t.expression,i,e),void 0,Ur(t.span,e));if(t instanceof Nx)return new af(t.body,t.flags,e);if(t instanceof Px)return new yu(Rn(t.expression,i,e));if(t instanceof Ox)return Dee(Us(t.parameters.map(n=>new Ir(n.name,hs)),Rn(t.body,i,e)));throw new Error(`Unhandled expression type "${t.constructor.name}" in file "${e?.start.file.url}"`)}}}}function c6(t,i,e){return new b0(t.elements.map(n=>new Cx(n.text,Ur(n.span,e))),t.expressions.map(n=>Rn(n,i,e)),Ur(t.span,e))}function aP(t,i,e,n){let o;return i instanceof hv?o=new er(i.strings,i.expressions.map(r=>Rn(r,t,null)),Object.keys(Dd(e)?.placeholders??{})):i instanceof ho?o=Rn(i,t,null):o=Ee(i),o}var $L=new Map([[Li.Property,Qt.Property],[Li.TwoWay,Qt.TwoWayProperty],[Li.Attribute,Qt.Attribute],[Li.Class,Qt.ClassName],[Li.Style,Qt.StyleProperty],[Li.LegacyAnimation,Qt.LegacyAnimation],[Li.Animation,Qt.Animation]]);function Mee(t){return oc(t.tagName??"")[1]===vu}function Dd(t){if(t==null)return null;if(!(t instanceof Qa))throw Error(`Expected i18n meta to be a Message, but got: ${t.constructor.name}`);return t}function kee(t,i,e){let n=new Array,o=new Set;for(let r of e.attributes){let a=_u.securityContext(e.name,r.name,!0);n.push(Du(i.xref,Qt.Attribute,r.name,aP(t.job,r.value,r.i18n),null,a,!0,!1,null,Dd(r.i18n),r.sourceSpan)),r.i18n&&o.add(r.name)}for(let r of e.inputs)o.has(r.name)&&console.error(`On component ${t.job.componentName}, the binding ${r.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`),n.push(Du(i.xref,$L.get(r.type),r.name,aP(t.job,dv(r.value),r.i18n),r.unit,r.securityContext,!1,!1,null,Dd(r.i18n)??null,r.sourceSpan));t.create.push(n.filter(r=>r?.kind===B.ExtractedAttribute)),t.update.push(n.filter(r=>r?.kind===B.Binding));for(let r of e.outputs){if(r.type===Xa.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");r.type===Xa.TwoWay?t.create.push(hL(i.xref,i.handle,r.name,i.tag,HL(t,r.handler,r.handlerSpan),r.sourceSpan)):r.type===Xa.Animation?t.create.push(uL(i.xref,i.handle,r.name,i.tag,cv(t,r.handler,r.handlerSpan),r.name.endsWith("enter")?"enter":"leave",r.target,!1,r.sourceSpan)):t.create.push(jP(i.xref,i.handle,r.name,i.tag,cv(t,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))}n.some(r=>r?.i18nMessage)!==null&&t.create.push(fL(t.job.allocateXrefId(),new ba,i.xref))}function Tee(t,i,e,n){let o=new Array;for(let r of e.templateAttrs)if(r instanceof uf){let a=_u.securityContext(vu,r.name,!0);o.push(sx(t,i.xref,Li.Attribute,r.name,r.value,null,a,!0,n,Dd(r.i18n),r.sourceSpan))}else o.push(sx(t,i.xref,r.type,r.name,dv(r.value),r.unit,r.securityContext,!0,n,Dd(r.i18n),r.sourceSpan));for(let r of e.attributes){let a=_u.securityContext(vu,r.name,!0);o.push(sx(t,i.xref,Li.Attribute,r.name,r.value,null,a,!1,n,Dd(r.i18n),r.sourceSpan))}for(let r of e.inputs)o.push(sx(t,i.xref,r.type,r.name,dv(r.value),r.unit,r.securityContext,!1,n,Dd(r.i18n),r.sourceSpan));t.create.push(o.filter(r=>r?.kind===B.ExtractedAttribute)),t.update.push(o.filter(r=>r?.kind===B.Binding));for(let r of e.outputs){if(r.type===Xa.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");if(n===us.NgTemplate&&(r.type===Xa.TwoWay?t.create.push(hL(i.xref,i.handle,r.name,i.tag,HL(t,r.handler,r.handlerSpan),r.sourceSpan)):t.create.push(jP(i.xref,i.handle,r.name,i.tag,cv(t,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))),n===us.Structural&&r.type!==Xa.LegacyAnimation){let a=_u.securityContext(vu,r.name,!1);t.create.push(ul(i.xref,Qt.Property,null,r.name,null,null,null,a))}}o.some(r=>r?.i18nMessage)!==null&&t.create.push(fL(t.job.allocateXrefId(),new ba,i.xref))}function sx(t,i,e,n,o,r,a,c,m,p,h){let g=typeof o=="string";if(m===us.Structural){if(!c)switch(e){case Li.Property:case Li.Class:case Li.Style:return ul(i,Qt.Property,null,n,null,null,p,a);case Li.TwoWay:return ul(i,Qt.TwoWayProperty,null,n,null,null,p,a)}if(!g&&(e===Li.Attribute||e===Li.LegacyAnimation||e===Li.Animation))return null}let M=$L.get(e);return m===us.NgTemplate&&(e===Li.Class||e===Li.Style||e===Li.Attribute&&!g)&&(M=Qt.Property),Du(i,M,n,aP(t.job,o,p),r,a,g,c,m,p,h)}function cv(t,i,e){i=dv(i);let n=new Array,o=i instanceof cf?i.expressions:[i];if(o.length===0)throw new Error("Expected listener to have non-empty expression list.");let r=o.map(c=>Rn(c,t.job,e)),a=r.pop();return n.push(...r.map(c=>Ws(new va(c,c.sourceSpan)))),n.push(Ws(new Ar(a,a.sourceSpan))),n}function HL(t,i,e){i=dv(i);let n=new Array;if(i instanceof cf)if(i.expressions.length===1)i=i.expressions[0];else throw new Error("Expected two-way listener to have a single expression.");let o=Rn(i,t.job,e),r=new na("$event"),a=new Jx(o,r);return n.push(Ws(new va(a))),n.push(Ws(new Ar(r))),n}function dv(t){return t instanceof ps?t.ast:t}function UL(t,i){Eee(t.localRefs);for(let{name:e,value:n}of i.references)t.localRefs.push({name:e,target:n})}function Eee(t){if(!Array.isArray(t))throw new Error("AssertionError: expected an array")}function Ur(t,i){if(i===null)return null;let e=i.start.moveBy(t.start),n=i.start.moveBy(t.end),o=i.fullStart.moveBy(t.start);return new bn(e,n,o)}function g1(t,i,e){let n=null;for(let o of e.children)if(!(o instanceof w1||o instanceof IP)){if(n!==null)return null;if(o instanceof Vc||o instanceof js&&o.tagName!==null)n=o;else return null}if(n!==null){for(let r of n.attributes)if(!r.name.startsWith(see)){let a=_u.securityContext(vu,r.name,!0);t.update.push(Du(i,Qt.Attribute,r.name,Ee(r.value),null,a,!0,!1,null,Dd(r.i18n),r.sourceSpan))}for(let r of n.inputs)if(r.type!==Li.LegacyAnimation&&r.type!==Li.Animation&&r.type!==Li.Attribute){let a=_u.securityContext(vu,r.name,!0);t.create.push(ul(i,Qt.Property,null,r.name,null,null,null,a))}let o=n instanceof Vc?n.name:n.tagName;return o===vu?null:o}return null}function Dee(t){let i=new Set(t.params.map(e=>e.name));return $t(t,e=>{if(e instanceof Nu)for(let n of e.params)i.add(n.name);else if(e instanceof na&&i.has(e.name))return si(e.name);return e},$n.None)}var Pee=!1;function Iee(){return Pee}function _1(t,i){return y1(si(wf).bitwiseAnd(Ee(t),null),i)}function Aee(t){return(t.descendants?1:0)|(t.static?2:0)|(t.emitDistinctChangesOnly?4:0)}function Oee(t,i){if(Array.isArray(t.predicate)){let e=[];return t.predicate.forEach(n=>{let o=n.split(",").map(r=>Ee(r.trim()));e.push(...o)}),i.getConstLiteral(oo(e),!0)}else switch(t.predicate.forwardRef){case 0:case 2:return t.predicate.expression;case 1:return Zt(he.resolveForwardRef).callFn([t.predicate.expression])}}function GL(t,i,e){let n=[];return e!==void 0&&n.push(...e),t.isSignal&&n.push(new Hs(si(Gs),t.propertyName)),n.push(Oee(t,i),Ee(Aee(t))),t.read&&n.push(t.read),n}var GP=Symbol("queryAdvancePlaceholder");function WL(t){let i=[],e=0,n=()=>{e>0&&(i.unshift(Zt(he.queryAdvance).callFn(e===1?[]:[Ee(e)]).toStmt()),e=0)};for(let o=t.length-1;o>=0;o--){let r=t[o];r===GP?e++:(n(),i.unshift(r))}return n(),i}function Nee(t,i,e){let n=[],o=[],r=$6(p=>o.push(p),OP),a=null,c=null;t.forEach(p=>{let h=GL(p,i);if(p.isSignal?(a??=Zt(he.viewQuerySignal),a=a.callFn(h)):(c??=Zt(he.viewQuery),c=c.callFn(h)),p.isSignal){o.push(GP);return}let g=r(),M=Zt(he.loadQuery).callFn([]),C=Zt(he.queryRefresh).callFn([g.set(M)]),_=si(Gs).prop(p.propertyName).set(p.first?g.prop("first"):g);o.push(C.and(_).toStmt())}),a!==null&&n.push(new va(a)),c!==null&&n.push(new va(c));let m=e?`${e}_Query`:null;return Nm([new Ir(wf,bu),new Ir(Gs,hs)],[_1(1,n),_1(2,WL(o))],ec,null,m)}function Ree(t,i,e){let n=[],o=[],r=$6(p=>o.push(p),OP),a=null,c=null;for(let p of t){let h=GL(p,i,[si("dirIndex")]);if(p.isSignal?(a??=Zt(he.contentQuerySignal),a=a.callFn(h)):(c??=Zt(he.contentQuery),c=c.callFn(h)),p.isSignal){o.push(GP);continue}let g=r(),M=Zt(he.loadQuery).callFn([]),C=Zt(he.queryRefresh).callFn([g.set(M)]),_=si(Gs).prop(p.propertyName).set(p.first?g.prop("first"):g);o.push(C.and(_).toStmt())}a!==null&&n.push(new va(a)),c!==null&&n.push(new va(c));let m=e?`${e}_ContentQueries`:null;return Nm([new Ir(wf,bu),new Ir(Gs,hs),new Ir("dirIndex",bu)],[_1(1,n),_1(2,WL(o))],ec,null,m)}var sP=class extends KQ{constructor(){super(JD)}parse(i,e,n){return super.parse(i,e,n)}},lx=".",Fee="attr",zE="animate",Lee="class",Bee="style",Vee="*",jE="animate-",lP=class{_exprParser;_schemaRegistry;errors;constructor(i,e,n){this._exprParser=i,this._schemaRegistry=e,this.errors=n}createBoundHostProperties(i,e){let n=[];for(let o of Object.keys(i)){let r=i[o];typeof r=="string"?this.parsePropertyBinding(o,r,!0,!1,e,e.start.offset,void 0,[],n,e):this._reportError(`Value of the host property binding "${o}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return n}createDirectiveHostEventAsts(i,e){let n=[];for(let o of Object.keys(i)){let r=i[o];typeof r=="string"?this.parseEvent(o,r,!1,e,e,[],n,e):this._reportError(`Value of the host listener "${o}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return n}parseInterpolation(i,e,n){let o=e.fullStart.offset;try{let r=this._exprParser.parseInterpolation(i,e,o,n);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,o)}}parseInterpolationExpression(i,e){let n=e.start.offset;try{let o=this._exprParser.parseInterpolationExpression(i,e,n);return o&&this.errors.push(...o.errors),o}catch(o){return this._reportError(`${o}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,n)}}parseInlineTemplateBinding(i,e,n,o,r,a,c,m){let p=n.start.offset+Vee.length,h=this._parseTemplateBindings(i,e,n,p,o);for(let g of h){let M=wm(n,g.sourceSpan),C=g.key.source,_=wm(n,g.key.span);if(g instanceof R0){let w=g.value?g.value.source:"$implicit",S=g.value?wm(n,g.value.span):void 0;c.push(new cD(C,w,M,_,S))}else if(g.value){let w=m?M:n,S=wm(n,g.value.ast.sourceSpan);this._parsePropertyAst(C,g.value,!1,w,_,S,r,a)}else r.push([C,""]),this.parseLiteralAttr(C,null,_,o,void 0,r,a,_)}}_parseTemplateBindings(i,e,n,o,r){try{let a=this._exprParser.parseTemplateBindings(i,e,n,o,r);return a.errors.forEach(c=>this.errors.push(c)),a.warnings.forEach(c=>{this._reportError(c,n,Pm.WARNING)}),a.templateBindings}catch(a){return this._reportError(`${a}`,n),[]}}parseLiteralAttr(i,e,n,o,r,a,c,m){$E(i)?(i=i.substring(1),m!==void 0&&(m=wm(m,new zs(m.start.offset+1,m.end.offset))),e&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',n,Pm.ERROR),this._parseLegacyAnimation(i,e,n,o,m,r,a,c)):c.push(new Qh(i,this._exprParser.wrapLiteralPrimitive(e,"",o),Ec.LITERAL_ATTR,n,m,r))}parsePropertyBinding(i,e,n,o,r,a,c,m,p,h){i.length===0&&this._reportError("Property name is missing in binding",r);let g=!1;i.startsWith(jE)?(g=!0,i=i.substring(jE.length),h!==void 0&&(h=wm(h,new zs(h.start.offset+jE.length,h.end.offset)))):$E(i)&&(g=!0,i=i.substring(1),h!==void 0&&(h=wm(h,new zs(h.start.offset+1,h.end.offset)))),g?this._parseLegacyAnimation(i,e,r,a,h,c,m,p):i.startsWith(`${zE}${lx}`)?this._parseAnimation(i,this.parseBinding(e,n,c||r,a),r,h,c,m,p):this._parsePropertyAst(i,this.parseBinding(e,n,c||r,a),o,r,h,c,m,p)}parsePropertyInterpolation(i,e,n,o,r,a,c,m){let p=this.parseInterpolation(e,o||n,m);return p?(this._parsePropertyAst(i,p,!1,n,c,o,r,a),!0):!1}_parsePropertyAst(i,e,n,o,r,a,c,m){c.push([i,e.source]),m.push(new Qh(i,e,n?Ec.TWO_WAY:Ec.DEFAULT,o,r,a))}_parseAnimation(i,e,n,o,r,a,c){a.push([i,e.source]),c.push(new Qh(i,e,Ec.ANIMATION,n,o,r))}_parseLegacyAnimation(i,e,n,o,r,a,c,m){i.length===0&&this._reportError("Animation trigger is missing",n);let p=this.parseBinding(e||"undefined",!1,a||n,o);c.push([i,p.source]),m.push(new Qh(i,p,Ec.LEGACY_ANIMATION,n,r,a))}parseBinding(i,e,n,o){try{let r=e?this._exprParser.parseSimpleBinding(i,n,o):this._exprParser.parseBinding(i,n,o);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,n),this._exprParser.wrapLiteralPrimitive("ERROR",n,o)}}createBoundElementProperty(i,e,n=!1,o=!0){if(e.isLegacyAnimation)return new Fx(e.name,Li.LegacyAnimation,uo.NONE,e.expression,null,e.sourceSpan,e.keySpan,e.valueSpan);let r=null,a,c=null,m=e.name.split(lx),p;if(m.length>1)if(m[0]==Fee){c=m.slice(1).join(lx),n||this._validatePropertyOrAttributeName(c,e.sourceSpan,!0),p=HE(this._schemaRegistry,i,c,!0);let h=c.indexOf(":");if(h>-1){let g=c.substring(0,h),M=c.substring(h+1);c=mx(g,M)}a=Li.Attribute}else m[0]==Lee?(c=m[1],a=Li.Class,p=[uo.NONE]):m[0]==Bee?(r=m.length>2?m[2]:null,c=m[1],a=Li.Style,p=[uo.STYLE]):m[0]==zE&&(c=e.name,a=Li.Animation,p=[uo.NONE]);if(c===null){let h=this._schemaRegistry.getMappedPropName(e.name);c=o?h:e.name,p=HE(this._schemaRegistry,i,h,!1),a=e.type===Ec.TWO_WAY?Li.TwoWay:Li.Property,n||this._validatePropertyOrAttributeName(h,e.sourceSpan,!1)}return new Fx(c,a,p[0],e.expression,r,e.sourceSpan,e.keySpan,e.valueSpan)}parseEvent(i,e,n,o,r,a,c,m){i.length===0&&this._reportError("Event name is missing in binding",o),$E(i)?(i=i.slice(1),m!==void 0&&(m=wm(m,new zs(m.start.offset+1,m.end.offset))),this._parseLegacyAnimationEvent(i,e,o,r,c,m)):this._parseRegularEvent(i,e,n,o,r,a,c,m)}calcPossibleSecurityContexts(i,e,n){let o=this._schemaRegistry.getMappedPropName(e);return HE(this._schemaRegistry,i,o,n)}parseEventListenerName(i){let[e,n]=yW(i,[null,i]);return{eventName:n,target:e}}parseLegacyAnimationEventName(i){let e=SW(i,[i,null]);return{eventName:e[0],phase:e[1]===null?null:e[1].toLowerCase()}}_parseLegacyAnimationEvent(i,e,n,o,r,a){let{eventName:c,phase:m}=this.parseLegacyAnimationEventName(i),p=this._parseAction(e,o);r.push(new Rx(c,m,Xa.LegacyAnimation,p,n,o,a)),c.length===0&&this._reportError("Animation event name is missing in binding",n),m?m!=="start"&&m!=="done"&&this._reportError(`The provided animation output phase value "${m}" for "@${c}" is not supported (use start or done)`,n):this._reportError(`The animation trigger output event (@${c}) is missing its phase value name (start or done are currently supported)`,n)}_parseRegularEvent(i,e,n,o,r,a,c,m){let{eventName:p,target:h}=this.parseEventListenerName(i),g=this.errors.length,M=this._parseAction(e,r),C=this.errors.length===g;a.push([i,M.source]),n&&C&&!this._isAllowedAssignmentEvent(M)&&this._reportError("Unsupported expression in a two-way binding",o);let _=Xa.Regular;n&&(_=Xa.TwoWay),i.startsWith(`${zE}${lx}`)&&(_=Xa.Animation),c.push(new Rx(p,h,_,M,o,r,m))}_parseAction(i,e){let n=e&&e.start?e.start.offset:0;try{let o=this._exprParser.parseAction(i,e,n);return o&&this.errors.push(...o.errors),!o||o.ast instanceof Da?(this._reportError("Empty expressions are not allowed",e),this._exprParser.wrapLiteralPrimitive("ERROR",e,n)):o}catch(o){return this._reportError(`${o}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,n)}}_reportError(i,e,n=Pm.ERROR){this.errors.push(new mn(e,i,n))}_validatePropertyOrAttributeName(i,e,n){let o=n?this._schemaRegistry.validateAttribute(i):this._schemaRegistry.validateProperty(i);o.error&&this._reportError(o.msg,e,Pm.ERROR)}_isAllowedAssignmentEvent(i){return i instanceof ps?this._isAllowedAssignmentEvent(i.ast):i instanceof I0?this._isAllowedAssignmentEvent(i.expression):i instanceof df&&i.args.length===1&&i.receiver instanceof Ac&&i.receiver.name==="$any"&&i.receiver.receiver instanceof Bc?this._isAllowedAssignmentEvent(i.args[0]):(i instanceof Ac||i instanceof Mu)&&!cP(i)}};function cP(t){return t instanceof M0||t instanceof k0?!0:t instanceof N0?cP(t.expression):t instanceof Ac||t instanceof Mu||t instanceof df?cP(t.receiver):!1}function $E(t){return t[0]=="@"}function HE(t,i,e,n){let o,r=a=>t.securityContext(a,e,n);return i===null?o=t.allKnownElementNames().map(r):(o=[],of.parse(i).forEach(a=>{let c=a.element?[a.element]:t.allKnownElementNames(),m=new Set(a.notSelectors.filter(h=>h.isElementSelector()).map(h=>h.element)),p=c.filter(h=>!m.has(h));o.push(...p.map(r))})),o.length===0?[uo.NONE]:Array.from(new Set(o)).sort()}function wm(t,i){let e=i.start-t.start.offset,n=i.end-t.end.offset;return new bn(t.start.moveBy(e),t.end.moveBy(n),t.fullStart.moveBy(e),t.details)}function zee(t){if(t==null||t.length===0||t[0]=="/")return!1;let i=t.match(jee);return i===null||i[1]=="package"||i[1]=="asset"}var jee=/^([^:/?#]+):/,$ee="select",Hee="link",Uee="rel",Gee="href",Wee="stylesheet",qee="style",Xee="script",Qee="ngNonBindable",Yee="ngProjectAs";function qL(t){let i=null,e=null,n=null,o=!1,r="";t.attrs.forEach(m=>{let p=m.name.toLowerCase();p==$ee?i=m.value:p==Gee?e=m.value:p==Uee?n=m.value:m.name==Qee?o=!0:m.name==Yee&&m.value.length>0&&(r=m.value)}),i=Kee(i);let a=t.name.toLowerCase(),c=Vs.OTHER;return dD(a)?c=Vs.NG_CONTENT:a==qee?c=Vs.STYLE:a==Xee?c=Vs.SCRIPT:a==Hee&&n==Wee&&(c=Vs.STYLESHEET),new dP(c,i,e,o,r)}var Vs=(function(t){return t[t.NG_CONTENT=0]="NG_CONTENT",t[t.STYLE=1]="STYLE",t[t.STYLESHEET=2]="STYLESHEET",t[t.SCRIPT=3]="SCRIPT",t[t.OTHER=4]="OTHER",t})(Vs||{}),dP=class{type;selectAttr;hrefAttr;nonBindable;projectAs;constructor(i,e,n,o,r){this.type=i,this.selectAttr=e,this.hrefAttr=n,this.nonBindable=o,this.projectAs=r}};function Kee(t){return t===null||t.length===0?"*":t}var Zee=/^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/,Jee=/^track\s+([\S\s]*)/,ete=/^(as\s+)(.*)/,D1=/^else[^\S\r\n]+if/,tte=/^let\s+([\S\s]*)/,nte=/^[$A-Z_][0-9A-Z_$]*$/i,d6=/(\s*)(\S+)(\s*)/,f0=new Set(["$index","$first","$last","$even","$odd","$count"]);function m6(t){return t==="empty"}function p6(t){return t==="else"||D1.test(t)}function ite(t,i,e,n){let o=cte(i),r=[],a=u6(t,o,n);a!==null&&r.push(new pu(a.expression,Do(e,t.children,t.children),a.expressionAlias,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.nameSpan,t.i18n));for(let g of i)if(D1.test(g.name)){let M=u6(g,o,n);if(M!==null){let C=Do(e,g.children,g.children);r.push(new pu(M.expression,C,M.expressionAlias,g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan,g.i18n))}}else if(g.name==="else"){let M=Do(e,g.children,g.children);r.push(new pu(null,M,null,g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan,g.i18n))}let c=r.length>0?r[0].startSourceSpan:t.startSourceSpan,m=r.length>0?r[r.length-1].endSourceSpan:t.endSourceSpan,p=t.sourceSpan,h=r[r.length-1];return h!==void 0&&(p=new bn(c.start,h.sourceSpan.end)),{node:new jx(r,p,t.startSourceSpan,m,t.nameSpan),errors:o}}function ote(t,i,e,n){let o=[],r=ate(t,o,n),a=null,c=null;for(let m of i)m.name==="empty"?c!==null?o.push(new mn(m.sourceSpan,"@for loop can only have one @empty block")):m.parameters.length>0?o.push(new mn(m.sourceSpan,"@empty block cannot have parameters")):c=new j0(Do(e,m.children,m.children),m.sourceSpan,m.startSourceSpan,m.endSourceSpan,m.nameSpan,m.i18n):o.push(new mn(m.sourceSpan,`Unrecognized @for loop block "${m.name}"`));if(r!==null)if(r.trackBy===null)o.push(new mn(t.startSourceSpan,'@for loop must have a "track" expression'));else{let m=c?.endSourceSpan??t.endSourceSpan,p=new bn(t.sourceSpan.start,m?.end??t.sourceSpan.end);ste(r.trackBy.expression,r.trackBy.keywordSpan,o),a=new hf(r.itemName,r.expression,r.trackBy.expression,r.trackBy.keywordSpan,r.context,Do(e,t.children,t.children),c,p,t.sourceSpan,t.startSourceSpan,m,t.nameSpan,t.i18n)}return{node:a,errors:o}}function rte(t,i,e){let n=dte(t),o=t.parameters.length>0?mv(t.parameters[0],e):e.parseBinding("",!1,t.sourceSpan,0),r=[],a=[],c=[],m=null,p=null;for(let g of t.children){if(!(g instanceof dl))continue;if((g.name!=="case"||g.parameters.length===0)&&g.name!=="default"&&g.name!=="default never"){a.push(new $x(g.name,g.sourceSpan,g.nameSpan));continue}p!==null&&n.push(new mn(g.sourceSpan,'@default block with "never" parameter must be the last case in a switch'));let M=g.name==="case",C=null;if(M)C=mv(g.parameters[0],e);else if(g.name==="default never"){(g.children.length>0||g.endSourceSpan!==null&&g.endSourceSpan.start.offset!==g.endSourceSpan.end.offset)&&n.push(new mn(g.sourceSpan,'@default block with "never" parameter cannot have a body')),c.length>0&&n.push(new mn(g.sourceSpan,'A @case block with no body cannot be followed by a @default block with "never" parameter')),p=new bD(g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan);continue}let _=new vD(C,g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan);if(c.push(_),g.children.length===0&&g.endSourceSpan!==null&&g.endSourceSpan.start.offset===g.endSourceSpan.end.offset){m===null&&(m=g.sourceSpan);continue}let S=g.sourceSpan,y=g.startSourceSpan;m!==null&&(S=new bn(m.start,g.sourceSpan.end),y=new bn(m.start,g.startSourceSpan.end),m=null);let k=new z0(c,Do(i,g.children,g.children),S,y,g.endSourceSpan,g.nameSpan,g.i18n);r.push(k),c=[]}return{node:new zx(o,r,a,p,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.nameSpan),errors:n}}function ate(t,i,e){if(t.parameters.length===0)return i.push(new mn(t.startSourceSpan,"@for loop does not have an expression")),null;let[n,...o]=t.parameters,r=mte(n,i)?.match(Zee);if(!r||r[2].trim().length===0)return i.push(new mn(n.sourceSpan,'Cannot parse expression. @for loop expression must match the pattern " of "')),null;let[,a,c]=r;f0.has(a)&&i.push(new mn(n.sourceSpan,`@for loop item name cannot be one of ${Array.from(f0).join(", ")}.`));let m=n.expression.split(" ")[0],p=new bn(n.sourceSpan.start,n.sourceSpan.start.moveBy(m.length)),h={itemName:new Rm(a,"$implicit",p,p),trackBy:null,expression:mv(n,e,c),context:Array.from(f0,g=>{let M=new bn(t.startSourceSpan.end,t.startSourceSpan.end);return new Rm(g,g,M,M)})};for(let g of o){let M=g.expression.match(tte);if(M!==null){let _=new bn(g.sourceSpan.start.moveBy(M[0].length-M[1].length),g.sourceSpan.end);lte(g.sourceSpan,M[1],_,a,h.context,i);continue}let C=g.expression.match(Jee);if(C!==null){if(h.trackBy!==null)i.push(new mn(g.sourceSpan,'@for loop can only have one "track" expression'));else{let _=mv(g,e,C[1]);_.ast instanceof Da&&i.push(new mn(t.startSourceSpan,'@for loop must have a "track" expression'));let w=new bn(g.sourceSpan.start,g.sourceSpan.start.moveBy(5));h.trackBy={expression:_,keywordSpan:w}}continue}i.push(new mn(g.sourceSpan,`Unrecognized @for loop parameter "${g.expression}"`))}return h}function ste(t,i,e){let n=new mP;t.ast.visit(n),n.hasPipe&&e.push(new mn(i,"Cannot use pipes in track expressions"))}function lte(t,i,e,n,o,r){let a=i.split(","),c=e.start;for(let m of a){let p=m.split("="),h=p.length===2?p[0].trim():"",g=p.length===2?p[1].trim():"";if(h.length===0||g.length===0)r.push(new mn(t,'Invalid @for loop "let" parameter. Parameter should match the pattern " = "'));else if(!f0.has(g))r.push(new mn(t,`Unknown "let" parameter variable "${g}". The allowed variables are: ${Array.from(f0).join(", ")}`));else if(h===n)r.push(new mn(t,`Invalid @for loop "let" parameter. Variable cannot be called "${n}"`));else if(o.some(M=>M.name===h))r.push(new mn(t,`Duplicate "let" parameter variable "${g}"`));else{let[,M,C]=p[0].match(d6)??[],_=M!==void 0&&p.length===2?new bn(c.moveBy(M.length),c.moveBy(M.length+C.length)):e,w;if(p.length===2){let[,y,k]=p[1].match(d6)??[];w=y!==void 0?new bn(c.moveBy(p[0].length+1+y.length),c.moveBy(p[0].length+1+y.length+k.length)):void 0}let S=new bn(_.start,w?.end??_.end);o.push(new Rm(h,g,S,_,w))}c=c.moveBy(m.length+1)}}function cte(t){let i=[],e=!1;for(let n=0;n1&&n0&&i.push(new mn(o.startSourceSpan,"@else block cannot have parameters")),e=!0):D1.test(o.name)||i.push(new mn(o.startSourceSpan,`Unrecognized conditional block @${o.name}`))}return i}function dte(t){let i=[],e=!1;if(t.parameters.length!==1)return i.push(new mn(t.startSourceSpan,"@switch block must have exactly one parameter")),i;for(let n of t.children)if(!(n instanceof rv||n instanceof Ou&&n.value.trim().length===0)){if(!(n instanceof dl)||n.name!=="case"&&n.name!=="default"&&n.name!=="default never"){i.push(new mn(n.sourceSpan,"@switch block can only contain @case and @default blocks"));continue}n.name==="default never"?(e&&i.push(new mn(n.startSourceSpan,"@switch block can only have one @default block")),e=!0):n.name==="default"?(e?i.push(new mn(n.startSourceSpan,"@switch block can only have one @default block")):n.parameters.length>0&&i.push(new mn(n.startSourceSpan,"@default block cannot have parameters")),e=!0):n.name==="case"&&n.parameters.length!==1&&i.push(new mn(n.startSourceSpan,"@case block must have exactly one parameter"))}return i}function mv(t,i,e){let n,o;return typeof e=="string"?(n=Math.max(0,t.expression.lastIndexOf(e)),o=n+e.length):(n=0,o=t.expression.length),i.parseBinding(t.expression.slice(n,o),!1,t.sourceSpan,t.sourceSpan.start.offset+n)}function u6(t,i,e){if(t.parameters.length===0)return i.push(new mn(t.startSourceSpan,"Conditional block does not have an expression")),null;let n=mv(t.parameters[0],e),o=null;for(let r=1;r-1;c--){let m=e[c];if(m===")"){if(a=c,o--,o===0)break}else{if(n.test(m))continue;break}}return o!==0?(i.push(new mn(t.sourceSpan,"Unclosed parentheses in expression")),null):e.slice(r,a)}var mP=class extends mf{hasPipe=!1;visitPipe(){this.hasPipe=!0}},pte=/^\d+\.?\d*(ms|s)?$/,ute=/^\s$/,h6=new Map([[ml,Ga],[Oc,Ed],[qa,Pr]]),Wa=(function(t){return t.IDLE="idle",t.TIMER="timer",t.INTERACTION="interaction",t.IMMEDIATE="immediate",t.HOVER="hover",t.VIEWPORT="viewport",t.NEVER="never",t})(Wa||{});function hte({expression:t,sourceSpan:i},e,n){let o=t.indexOf("never"),r=new bn(i.start.moveBy(o),i.start.moveBy(o+5)),a=WP(t,i),c=qP(t,i);o===-1?n.push(new mn(i,'Could not find "never" keyword in expression')):XP("never",e,n,new hD(r,i,a,null,c))}function UE({expression:t,sourceSpan:i},e,n,o){let r=t.indexOf("when"),a=new bn(i.start.moveBy(r),i.start.moveBy(r+4)),c=WP(t,i),m=qP(t,i);if(r===-1)o.push(new mn(i,'Could not find "when" keyword in expression'));else{let p=pv(t,r+1),h=e.parseBinding(t.slice(p),!1,i,i.start.offset+p);XP("when",n,o,new Lx(h,i,c,a,m))}}function GE({expression:t,sourceSpan:i},e,n,o,r){let a=t.indexOf("on"),c=new bn(i.start.moveBy(a),i.start.moveBy(a+2)),m=WP(t,i),p=qP(t,i);if(a===-1)o.push(new mn(i,'Could not find "on" keyword in expression'));else{let h=pv(t,a+1),g=t.startsWith("hydrate");new pP(t,e,h,i,n,o,g?yte:xte,g,m,c,p).parse()}}function WP(t,i){return t.startsWith("prefetch")?new bn(i.start,i.start.moveBy(8)):null}function qP(t,i){return t.startsWith("hydrate")?new bn(i.start,i.start.moveBy(7)):null}var pP=class{expression;bindingParser;start;span;triggers;errors;validator;isHydrationTrigger;prefetchSpan;onSourceSpan;hydrateSpan;index=0;tokens;constructor(i,e,n,o,r,a,c,m,p,h,g){this.expression=i,this.bindingParser=e,this.start=n,this.span=o,this.triggers=r,this.errors=a,this.validator=c,this.isHydrationTrigger=m,this.prefetchSpan=p,this.onSourceSpan=h,this.hydrateSpan=g,this.tokens=new lv().tokenize(i.slice(n))}parse(){for(;this.tokens.length>0&&this.index0&&o.isCharacter(e[e.length-1])&&e.pop(),e.length===0&&o.isCharacter(Pa)&&n.length>0){i.push({expression:this.tokenRangeText(n),start:n[0].index}),this.advance(),n=[];continue}n.push(o),this.advance()}return(!this.token().isCharacter(Pr)||e.length>0)&&this.error(this.token(),"Unexpected end of expression"),this.index0)throw new Error(`"${Wa.IDLE}" trigger cannot have parameters`);return new fD(i,e,n,o,r)}function gte(t,i,e,n,o,r){if(t.length!==1)throw new Error(`"${Wa.TIMER}" trigger must have exactly one parameter`);let a=v1(t[0].expression);if(a===null)throw new Error(`Could not parse time value of trigger "${Wa.TIMER}"`);return new _D(a,i,e,n,o,r)}function _te(t,i,e,n,o,r){if(t.length>0)throw new Error(`"${Wa.IMMEDIATE}" trigger cannot have parameters`);return new gD(i,e,n,o,r)}function vte(t,i,e,n,o,r,a){return a(Wa.HOVER,t),new Bx(t[0]?.expression??null,i,e,n,o,r)}function bte(t,i,e,n,o,r,a){return a(Wa.INTERACTION,t),new Vx(t[0]?.expression??null,i,e,n,o,r)}function Cte(t,i,e,n,o,r,a,c,m,p){p(Wa.VIEWPORT,n);let h,g;if(n.length===0)h=g=null;else if(!n[0].expression.startsWith("{"))h=n[0].expression,g=null;else{let M=e.parseBinding(n[0].expression,!1,r,r.start.offset+t+n[0].start);if(M.ast instanceof ku){if(M.ast.keys.some(_=>_.kind==="spread"))throw new Error("Spread operator are not allowed in this context");if(M.ast.keys.some(_=>_.kind==="property"&&_.key==="root"))throw new Error('The "root" option is not supported in the options parameter of the "viewport" trigger')}else throw new Error('Options parameter of the "viewport" trigger must be an object literal');let C=M.ast.keys.findIndex(_=>_.kind==="property"&&_.key==="trigger");if(C===-1)h=null,g=M.ast;else{let _=M.ast.values[C],w=(S,y)=>y!==C;if(!(_ instanceof Ac)||!(_.receiver instanceof Bc))throw new Error('"trigger" option of the "viewport" trigger must be an identifier');h=_.name,g=new ku(M.ast.span,M.ast.sourceSpan,M.ast.keys.filter(w),M.ast.values.filter(w))}}if(i&&h!==null)throw new Error('"viewport" hydration trigger cannot have a "trigger"');if(g){let M=uP.findDynamicNode(g);if(M!==null)throw new Error(`Options of the "viewport" trigger must be an object literal containing only literal values, but "${M.constructor.name}" was found`)}return new F0(h,g,o,r,a,c,m)}function xte(t,i){if(i.length>1)throw new Error(`"${t}" trigger can only have zero or one parameters`)}function yte(t,i){if(t===Wa.VIEWPORT){if(i.length>1)throw new Error(`Hydration trigger "${t}" cannot have more than one parameter`);return}if(i.length>0)throw new Error(`Hydration trigger "${t}" cannot have parameters`)}function pv(t,i=0){let e=!1;for(let n=i;n0){let w=i[i.length-1];g=w.endSourceSpan,M=w.sourceSpan.end}let C=new bn(t.sourceSpan.start,M);return{node:new Tu(Do(e,t.children,t.children),m,p,h,r,a,c,t.nameSpan,C,t.sourceSpan,t.startSourceSpan,g,t.i18n),errors:o}}function Ate(t,i,e){let n=null,o=null,r=null;for(let a of t)try{if(!hP(a.name)){i.push(new mn(a.startSourceSpan,`Unrecognized block "@${a.name}"`));break}switch(a.name){case"placeholder":n!==null?i.push(new mn(a.startSourceSpan,"@defer block can only have one @placeholder block")):n=Ote(a,e);break;case"loading":o!==null?i.push(new mn(a.startSourceSpan,"@defer block can only have one @loading block")):o=Nte(a,e);break;case"error":r!==null?i.push(new mn(a.startSourceSpan,"@defer block can only have one @error block")):r=Rte(a,e);break}}catch(c){i.push(new mn(a.startSourceSpan,c.message))}return{placeholder:n,loading:o,error:r}}function Ote(t,i){let e=null;for(let n of t.parameters)if(XL.test(n.expression)){if(e!=null)throw new Error('@placeholder block can only have one "minimum" parameter');let o=v1(n.expression.slice(pv(n.expression)));if(o===null)throw new Error('Could not parse time value of parameter "minimum"');e=o}else throw new Error(`Unrecognized parameter in @placeholder block: "${n.expression}"`);return new L0(Do(i,t.children,t.children),e,t.nameSpan,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n)}function Nte(t,i){let e=null,n=null;for(let o of t.parameters)if(Ete.test(o.expression)){if(e!=null)throw new Error('@loading block can only have one "after" parameter');let r=v1(o.expression.slice(pv(o.expression)));if(r===null)throw new Error('Could not parse time value of parameter "after"');e=r}else if(XL.test(o.expression)){if(n!=null)throw new Error('@loading block can only have one "minimum" parameter');let r=v1(o.expression.slice(pv(o.expression)));if(r===null)throw new Error('Could not parse time value of parameter "minimum"');n=r}else throw new Error(`Unrecognized parameter in @loading block: "${o.expression}"`);return new B0(Do(i,t.children,t.children),e,n,t.nameSpan,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n)}function Rte(t,i){if(t.parameters.length>0)throw new Error("@error block cannot have parameters");return new V0(Do(i,t.children,t.children),t.nameSpan,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n)}function Fte(t,i,e,n){let o={},r={},a={};for(let c of t.parameters)Dte.test(c.expression)?UE(c,i,o,e):Pte.test(c.expression)?GE(c,i,o,e):Ste.test(c.expression)?UE(c,i,r,e):wte.test(c.expression)?GE(c,i,r,e):Mte.test(c.expression)?UE(c,i,a,e):kte.test(c.expression)?GE(c,i,a,e):Tte.test(c.expression)?hte(c,a,e):e.push(new mn(c.sourceSpan,"Unrecognized trigger"));return a.never&&Object.keys(a).length>1&&e.push(new mn(t.startSourceSpan,"Cannot specify additional `hydrate` triggers if `hydrate never` is present")),{triggers:o,prefetchTriggers:r,hydrateTriggers:a}}var Lte=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,f6=1,g6=2,_6=3,v6=4,b6=5,Bte=6,e0=7,Mm={BANANA_BOX:{start:"[(",end:")]"},PROPERTY:{start:"[",end:"]"},EVENT:{start:"(",end:")"}},WE="*",Vte=new Set(["link","style","script","ng-template","ng-container","ng-content"]),zte=new Set(["ngProjectAs","ngNonBindable"]);function jte(t,i,e){let n=new fP(i,e),o=Do(n,t,t),r=i.errors.concat(n.errors),a={nodes:o,errors:r,styleUrls:n.styleUrls,styles:n.styles,ngContentSelectors:n.ngContentSelectors};return e.collectCommentNodes&&(a.commentNodes=n.commentNodes),a}var fP=class{bindingParser;options;errors=[];styles=[];styleUrls=[];ngContentSelectors=[];commentNodes=[];inI18nBlock=!1;processedNodes=new Set;constructor(i,e){this.bindingParser=i,this.options=e}visitElement(i){let e=ux(i.i18n);e&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",i.sourceSpan),this.inI18nBlock=!0);let n=qL(i);if(n.type===Vs.SCRIPT)return null;if(n.type===Vs.STYLE){let y=$te(i);return y!==null&&this.styles.push(y),null}else if(n.type===Vs.STYLESHEET&&zee(n.hrefAttr))return this.styleUrls.push(n.hrefAttr),null;let o=UW(i.name),{attributes:r,boundEvents:a,references:c,variables:m,templateVariables:p,elementHasInlineTemplate:h,parsedProperties:g,templateParsedProperties:M,i18nAttrsMeta:C}=this.prepareAttributes(i.attrs,o),_=this.extractDirectives(i),w;n.nonBindable?w=Do(C6,i.children).flat(1/0):w=Do(this,i.children,i.children);let S;if(n.type===Vs.NG_CONTENT){let y=n.selectAttr,k=i.attrs.map(I=>this.visitAttribute(I));S=new ff(y,k,w,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n),this.ngContentSelectors.push(y)}else if(o){let y=this.categorizePropertyAttributes(i.name,g,C);S=new js(i.name,r,y.bound,a,_,[],w,c,m,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n)}else{let y=this.categorizePropertyAttributes(i.name,g,C);if(i.name==="ng-container")for(let k of y.bound)k.type===Li.Attribute&&this.reportError("Attribute bindings are not supported on ng-container. Use property bindings instead.",k.sourceSpan);S=new Vc(i.name,r,y.bound,a,_,w,c,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n)}return h&&(S=this.wrapInTemplate(S,M,p,C,o,e)),e&&(this.inI18nBlock=!1),S}visitAttribute(i){return new uf(i.name,i.value,i.sourceSpan,i.keySpan,i.valueSpan,i.i18n)}visitText(i){return this.processedNodes.has(i)?null:this._visitTextWithInterpolation(i.value,i.sourceSpan,i.tokens,i.i18n)}visitExpansion(i){if(!i.i18n)return null;if(!ux(i.i18n))throw new Error(`Invalid type "${i.i18n.constructor}" for "i18n" property of ${i.sourceSpan.toString()}. Expected a "Message"`);let e=i.i18n,n={},o={};return Object.keys(e.placeholders).forEach(r=>{let a=e.placeholders[r];if(r.startsWith(XW)){let c=r.trim(),m=this.bindingParser.parseInterpolationExpression(a.text,a.sourceSpan);n[c]=new pf(m,a.sourceSpan)}else o[r]=this._visitTextWithInterpolation(a.text,a.sourceSpan,null)}),new B6(n,o,i.sourceSpan,e)}visitExpansionCase(i){return null}visitComment(i){return this.options.collectCommentNodes&&this.commentNodes.push(new w1(i.value||"",i.sourceSpan)),null}visitLetDeclaration(i,e){let n=this.bindingParser.parseBinding(i.value,!1,i.valueSpan,i.valueSpan.start.offset);return n.errors.length===0&&n.ast instanceof Da&&this.reportError("@let declaration value cannot be empty",i.valueSpan),new IP(i.name,n,i.sourceSpan,i.nameSpan,i.valueSpan)}visitComponent(i){let e=ux(i.i18n);if(e&&(this.inI18nBlock&&this.reportError("Cannot mark a component as translatable inside of a translatable section. Please remove the nested i18n marker.",i.sourceSpan),this.inI18nBlock=!0),i.tagName!==null&&Vte.has(i.tagName))return this.reportError(`Tag name "${i.tagName}" cannot be used as a component tag`,i.startSourceSpan),null;let{attributes:n,boundEvents:o,references:r,templateVariables:a,elementHasInlineTemplate:c,parsedProperties:m,templateParsedProperties:p,i18nAttrsMeta:h}=this.prepareAttributes(i.attrs,!1);this.validateSelectorlessReferences(r);let g=this.extractDirectives(i),M;i.attrs.find(w=>w.name==="ngNonBindable")?M=Do(C6,i.children).flat(1/0):M=Do(this,i.children,i.children);let C=this.categorizePropertyAttributes(i.tagName,m,h),_=new l0(i.componentName,i.tagName,i.fullName,n,C.bound,o,g,M,r,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return c&&(_=this.wrapInTemplate(_,p,a,h,!1,e)),e&&(this.inI18nBlock=!1),_}visitDirective(){return null}visitBlockParameter(){return null}visitBlock(i,e){let n=Array.isArray(e)?e.indexOf(i):-1;if(n===-1)throw new Error("Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context");if(this.processedNodes.has(i))return null;let o=null;switch(i.name){case"defer":o=Ite(i,this.findConnectedBlocks(n,e,hP),this,this.bindingParser);break;case"switch":o=rte(i,this,this.bindingParser);break;case"for":o=ote(i,this.findConnectedBlocks(n,e,m6),this,this.bindingParser);break;case"if":o=ite(i,this.findConnectedBlocks(n,e,p6),this,this.bindingParser);break;default:let r;hP(i.name)?(r=`@${i.name} block can only be used after an @defer block.`,this.processedNodes.add(i)):m6(i.name)?(r=`@${i.name} block can only be used after an @for block.`,this.processedNodes.add(i)):p6(i.name)?(r=`@${i.name} block can only be used after an @if or @else if block.`,this.processedNodes.add(i)):r=`Unrecognized block @${i.name}.`,o={node:new $x(i.name,i.sourceSpan,i.nameSpan),errors:[new mn(i.sourceSpan,r)]};break}return this.errors.push(...o.errors),o.node}findConnectedBlocks(i,e,n){let o=[];for(let r=i+1;r{let c=n[a.name];if(a.isLiteral)r.push(new uf(a.name,a.expression.source||"",a.sourceSpan,a.keySpan,a.valueSpan,c));else{let m=this.bindingParser.createBoundElementProperty(i,a,!0,!1);o.push(pD.fromBoundElementProperty(m,c))}}),{bound:o,literal:r}}prepareAttributes(i,e){let n=[],o=[],r=[],a=[],c=[],m={},p=[],h=[],g=!1;for(let M of i){let C=!1,_=x6(M.name),w=!1;if(M.i18n&&(m[M.name]=M.i18n),_.startsWith(WE)){g&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",M.sourceSpan),w=!0,g=!0;let S=M.value,y=_.substring(WE.length),k=[],I=M.valueSpan?M.valueSpan.fullStart.offset:M.sourceSpan.fullStart.offset+M.name.length;this.bindingParser.parseInlineTemplateBinding(y,S,M.sourceSpan,I,[],p,k,!0),h.push(...k.map(E=>new Rm(E.name,E.value,E.sourceSpan,E.keySpan,E.valueSpan)))}else C=this.parseAttribute(e,M,[],n,o,r,a);!C&&!w&&c.push(this.visitAttribute(M))}return{attributes:c,boundEvents:o,references:a,variables:r,templateVariables:h,elementHasInlineTemplate:g,parsedProperties:n,templateParsedProperties:p,i18nAttrsMeta:m}}parseAttribute(i,e,n,o,r,a,c){let m=x6(e.name),p=e.value,h=e.sourceSpan,g=e.valueSpan?e.valueSpan.fullStart.offset:h.fullStart.offset;function M(y,k,I){let E=e.name.length-m.length,N=y.start.moveBy(k.length+E),T=N.moveBy(I.length);return new bn(N,T,N,I)}let C=m.match(Lte);if(C){if(C[f6]!=null){let y=C[e0],k=M(h,C[f6],y);this.bindingParser.parsePropertyBinding(y,p,!1,!1,h,g,e.valueSpan,n,o,k)}else if(C[g6])if(i){let y=C[e0],k=M(h,C[g6],y);this.parseVariable(y,p,h,k,e.valueSpan,a)}else this.reportError('"let-" is only supported on ng-template elements.',h);else if(C[_6]){let y=C[e0],k=M(h,C[_6],y);this.parseReference(y,p,h,k,e.valueSpan,c)}else if(C[v6]){let y=[],k=C[e0],I=M(h,C[v6],k);this.bindingParser.parseEvent(k,p,!1,h,e.valueSpan||h,n,y,I),qE(y,r)}else if(C[b6]){let y=C[e0],k=M(h,C[b6],y);this.bindingParser.parsePropertyBinding(y,p,!1,!0,h,g,e.valueSpan,n,o,k),this.parseAssignmentEvent(y,p,h,e.valueSpan,n,r,k,g)}else if(C[Bte]){let y=M(h,"",m);this.bindingParser.parseLiteralAttr(m,p,h,g,e.valueSpan,n,o,y)}return!0}let _=null;if(m.startsWith(Mm.BANANA_BOX.start)?_=Mm.BANANA_BOX:m.startsWith(Mm.PROPERTY.start)?_=Mm.PROPERTY:m.startsWith(Mm.EVENT.start)&&(_=Mm.EVENT),_!==null&&m.endsWith(_.end)&&m.length>_.start.length+_.end.length){let y=m.substring(_.start.length,m.length-_.end.length),k=M(h,_.start,y);if(_.start===Mm.BANANA_BOX.start)this.bindingParser.parsePropertyBinding(y,p,!1,!0,h,g,e.valueSpan,n,o,k),this.parseAssignmentEvent(y,p,h,e.valueSpan,n,r,k,g);else if(_.start===Mm.PROPERTY.start)this.bindingParser.parsePropertyBinding(y,p,!1,!1,h,g,e.valueSpan,n,o,k);else{let I=[];this.bindingParser.parseEvent(y,p,!1,h,e.valueSpan||h,n,I,k),qE(I,r)}return!0}let w=M(h,"",m);return this.bindingParser.parsePropertyInterpolation(m,p,h,e.valueSpan,n,o,w,e.valueTokens??null)}extractDirectives(i){let e=i instanceof Ua?i.tagName:i.name,n=[],o=new Set;for(let r of i.directives){let a=!1;for(let C of r.attrs)C.name.startsWith(WE)?(a=!0,this.reportError(`Shorthand template syntax "${C.name}" is not supported inside a directive context`,C.sourceSpan)):zte.has(C.name)&&(a=!0,this.reportError(`Attribute "${C.name}" is not supported in a directive context`,C.sourceSpan));if(!a&&o.has(r.name)&&(a=!0,this.reportError(`Cannot apply directive "${r.name}" multiple times on the same element`,r.sourceSpan)),a)continue;let{attributes:c,parsedProperties:m,boundEvents:p,references:h,i18nAttrsMeta:g}=this.prepareAttributes(r.attrs,!1);this.validateSelectorlessReferences(h);let{bound:M}=this.categorizePropertyAttributes(e,m,g);for(let C of M)C.type!==Li.Property&&C.type!==Li.TwoWay&&(a=!0,this.reportError("Binding is not supported in a directive context",C.sourceSpan));a||(o.add(r.name),n.push(new L6(r.name,c,M,p,h,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,void 0)))}return n}filterAnimationAttributes(i){return i.filter(e=>!e.name.startsWith("animate."))}filterAnimationInputs(i){return i.filter(e=>e.type!==Li.Animation)}wrapInTemplate(i,e,n,o,r,a){let c=this.categorizePropertyAttributes("ng-template",e,o),m=[];c.literal.forEach(M=>m.push(M)),c.bound.forEach(M=>m.push(M));let p={attributes:[],inputs:[],outputs:[]};(i instanceof Vc||i instanceof l0)&&(p.attributes.push(...this.filterAnimationAttributes(i.attributes)),p.inputs.push(...this.filterAnimationInputs(i.inputs)),p.outputs.push(...i.outputs));let h=r&&a?void 0:i.i18n,g;return i instanceof l0?g=i.tagName:i instanceof js?g=null:g=i.name,new js(g,p.attributes,p.inputs,p.outputs,[],m,[i],[],n,!1,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,h)}_visitTextWithInterpolation(i,e,n,o){let r=ML(i),a=this.bindingParser.parseInterpolation(r,e,n);return a?new pf(a,e,o):new cu(r,e)}parseVariable(i,e,n,o,r,a){i.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',n):i.length===0&&this.reportError("Variable does not have a name",n),a.push(new Rm(i,e,n,o,r))}parseReference(i,e,n,o,r,a){i.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',n):i.length===0?this.reportError("Reference does not have a name",n):a.some(c=>c.name===i)&&this.reportError(`Reference "#${i}" is defined more than once`,n),a.push(new $0(i,e,n,o,r))}parseAssignmentEvent(i,e,n,o,r,a,c,m){let p=[];this.bindingParser.parseEvent(`${i}Change`,e,!0,n,o||n,r,p,c),qE(p,a)}validateSelectorlessReferences(i){if(i.length===0)return;let e=new Set;for(let n of i)n.value.length>0?this.reportError("Cannot specify a value for a local reference in this context",n.valueSpan||n.sourceSpan):e.has(n.name)?this.reportError("Duplicate reference names are not allowed",n.sourceSpan):e.add(n.name)}reportError(i,e,n=Pm.ERROR){this.errors.push(new mn(e,i,n))}},gP=class{visitElement(i){let e=qL(i);if(e.type===Vs.SCRIPT||e.type===Vs.STYLE||e.type===Vs.STYLESHEET)return null;let n=Do(this,i.children,null);return new Vc(i.name,Do(this,i.attrs),[],[],[],n,[],i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid)}visitComment(i){return null}visitAttribute(i){return new uf(i.name,i.value,i.sourceSpan,i.keySpan,i.valueSpan,i.i18n)}visitText(i){return new cu(i.value,i.sourceSpan)}visitExpansion(i){return null}visitExpansionCase(i){return null}visitBlock(i,e){let n=[new cu(i.startSourceSpan.toString(),i.startSourceSpan),...Do(this,i.children)];return i.endSourceSpan!==null&&n.push(new cu(i.endSourceSpan.toString(),i.endSourceSpan)),n}visitBlockParameter(i,e){return null}visitLetDeclaration(i,e){return new cu(`@let ${i.name} = ${i.value};`,i.sourceSpan)}visitComponent(i,e){let n=Do(this,i.children,null);return new Vc(i.fullName,Do(this,i.attrs),[],[],[],n,[],i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,!1)}visitDirective(i,e){return null}},C6=new gP;function x6(t){return/^data-/i.test(t)?t.substring(5):t}function qE(t,i){i.push(...t.map(e=>uD.fromParsedEvent(e)))}function $te(t){return t.children.length!==1||!(t.children[0]instanceof Ou)?null:t.children[0].value}var Hte=[" ",` `,"\r"," "];function Ute(t,i,e={}){let{preserveWhitespaces:n,enableI18nLegacyMessageIdFormat:o}=e,r=e.enableSelectorless??!1,a=b1(r),m=new sP().parse(t,i,tt(H({leadingTriviaChars:Hte},e),{tokenizeExpansionForms:!0,tokenizeBlocks:e.enableBlockSyntax??!0,tokenizeLet:e.enableLetSyntax??!0,selectorlessEnabled:r}));if(!e.alwaysAttemptHtmlToR3AstConversion&&m.errors&&m.errors.length>0){let E={preserveWhitespaces:n,errors:m.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(E.commentNodes=[]),E}let p=m.rootNodes,h=!(e.preserveSignificantWhitespace??!0),g=new u1(!n,o,e.preserveSignificantWhitespace,h),M=g.visitAllWithErrors(p);if(!e.alwaysAttemptHtmlToR3AstConversion&&M.errors&&M.errors.length>0){let E={preserveWhitespaces:n,errors:M.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(E.commentNodes=[]),E}p=M.rootNodes,n||(p=Do(new m1(!0,void 0,!1),p),g.hasI18nMeta&&(p=Do(new u1(!1,void 0,!0,h),p)));let{nodes:C,errors:_,styleUrls:w,styles:S,ngContentSelectors:y,commentNodes:k}=jte(p,a,{collectCommentNodes:!!e.collectCommentNodes});_.push(...m.errors,...M.errors);let I={preserveWhitespaces:n,errors:_.length>0?_:null,nodes:C,styleUrls:w,styles:S,ngContentSelectors:y};return e.collectCommentNodes&&(I.commentNodes=k),I}var Gte=new yf;function b1(t=!1){return new lP(new p1(new lv,t),Gte,[])}var QL="%COMP%",Wte=`_nghost-${QL}`,qte=`_ngcontent-${QL}`;function YL(t,i,e){let n=new Bm,o=TP(t.selector);return n.set("type",t.type.value),o.length>0&&n.set("selectors",Yh(o)),t.queries.length>0&&n.set("contentQueries",Ree(t.queries,i,t.name)),t.viewQueries.length&&n.set("viewQuery",Nee(t.viewQueries,i,t.name)),n.set("hostBindings",tne(t.host,t.typeSourceSpan,e,i,t.selector||"",t.name,n)),n.set("inputs",YR(t.inputs,!0)),n.set("outputs",YR(t.outputs)),t.exportAs!==null&&n.set("exportAs",oo(t.exportAs.map(r=>Ee(r)))),t.isStandalone===!1&&n.set("standalone",Ee(!1)),t.isSignal&&n.set("signals",Ee(!0)),n}function KL(t,i){let e=[],n=i.providers,o=i.viewProviders;if(n||o){let r=[n||new Lc([])];o&&r.push(o),e.push(Zt(he.ProvidersFeature).callFn(r))}if(i.hostDirectives?.length&&e.push(Zt(he.HostDirectivesFeature).callFn([ane(i.hostDirectives)])),i.usesInheritance&&e.push(Zt(he.InheritDefinitionFeature)),i.lifecycle.usesOnChanges&&e.push(Zt(he.NgOnChangesFeature)),i.controlCreate!==null&&e.push(Zt(he.ControlFeature).callFn([Ee(i.controlCreate.passThroughInput)])),"externalStyles"in i&&i.externalStyles?.length){let r=i.externalStyles.map(a=>Ee(a));e.push(Zt(he.ExternalStylesFeature).callFn([oo(r)]))}e.length&&t.set("features",oo(e))}function Xte(t,i,e){let n=YL(t,i,e);KL(n,t);let o=Zt(he.defineDirective).callFn([n.toLiteralMap()],void 0,!0),r=ene(t);return{expression:o,type:r,statements:[]}}function Qte(t,i,e){let n=YL(t,i,e);KL(n,t);let o=t.selector&&of.parse(t.selector),r=o&&o[0];if(r){let _=r.getAttrs();_.length&&n.set("attrs",i.getConstLiteral(oo(_.map(w=>w!=null?Ee(w):Ee(void 0))),!0))}let a=t.name,c=null;if(t.defer.mode===1&&t.defer.dependenciesFn!==null){let _=`${a}_DeferFn`;i.statements.push(new qr(_,t.defer.dependenciesFn,void 0,fa.Final)),c=si(_)}let m=t.isStandalone&&!t.hasDirectiveDependencies?cs.DomOnly:cs.Full,p=cee(t.name,t.template.nodes,i,m,t.relativeContextFilePath,t.i18nUseExternalIds,t.defer,c,t.relativeTemplatePath,Iee());LL(p,Vt.Tmpl);let h=ree(p,i);if(p.contentSelectors!==null&&n.set("ngContentSelectors",p.contentSelectors),n.set("decls",Ee(p.root.decls)),n.set("vars",Ee(p.root.vars)),p.consts.length>0&&(p.constsInitializers.length>0?n.set("consts",Us([],[...p.constsInitializers,new Ar(oo(p.consts))])):n.set("consts",oo(p.consts))),n.set("template",h),t.declarationListEmitMode!==3&&t.declarations.length>0)n.set("dependencies",Kte(oo(t.declarations.map(_=>_.type)),t.declarationListEmitMode));else if(t.declarationListEmitMode===3){let _=[t.type.value];t.rawImports&&_.push(t.rawImports),n.set("dependencies",Zt(he.getComponentDepsFactory).callFn(_))}t.encapsulation===null&&(t.encapsulation=iu.Emulated);let g=!!t.externalStyles?.length;if(t.styles&&t.styles.length){let w=(t.encapsulation==iu.Emulated?rne(t.styles,qte,Wte):t.styles).reduce((S,y)=>(y.trim().length>0&&S.push(i.getConstLiteral(Ee(y))),S),[]);w.length>0&&(g=!0,n.set("styles",oo(w)))}!g&&t.encapsulation===iu.Emulated&&(t.encapsulation=iu.None),t.encapsulation!==iu.Emulated&&n.set("encapsulation",Ee(t.encapsulation)),t.animations!==null&&n.set("data",gl([{key:"animation",value:t.animations,quoted:!1}])),t.changeDetection!==null&&(typeof t.changeDetection=="number"&&t.changeDetection!==kP.Default?n.set("changeDetection",Ee(t.changeDetection)):typeof t.changeDetection=="object"&&n.set("changeDetection",t.changeDetection));let M=Zt(he.defineComponent).callFn([n.toLiteralMap()],void 0,!0),C=Yte(t);return{expression:M,type:C,statements:[]}}function Yte(t){let i=ZL(t);return i.push(vP(t.template.ngContentSelectors)),i.push(ga(Ee(t.isStandalone))),i.push(JL(t)),t.isSignal&&i.push(ga(Ee(t.isSignal))),ga(Zt(he.ComponentDeclaration,i))}function Kte(t,i){switch(i){case 0:return t;case 1:return Us([],t);case 2:let e=t.prop("map").callFn([Zt(he.resolveForwardRef)]);return Us([],e);case 3:throw new Error("Unsupported with an array of pre-resolved dependencies")}}function Zte(t){return ga(Ee(t))}function _P(t){let i=Object.keys(t).map(e=>{let n=Array.isArray(t[e])?t[e][0]:t[e];return{key:e,value:Ee(n),quoted:!0}});return gl(i)}function vP(t){return t.length>0?ga(oo(t.map(i=>Ee(i)))):Rc}function ZL(t){let i=t.selector!==null?t.selector.replace(/\n/g,""):null;return[S1(t.type.type,t.typeArgumentCount),i!==null?Zte(i):Rc,t.exportAs!==null?vP(t.exportAs):Rc,ga(Jte(t)),ga(_P(t.outputs)),vP(t.queries.map(e=>e.propertyName))]}function Jte(t){return gl(Object.keys(t.inputs).map(i=>{let e=t.inputs[i],n=[{key:"alias",value:Ee(e.bindingPropertyName),quoted:!0},{key:"required",value:Ee(e.required),quoted:!0}];return e.isSignal&&n.push({key:"isSignal",value:Ee(e.isSignal),quoted:!0}),{key:i,value:gl(n),quoted:!0}}))}function ene(t){let i=ZL(t);return i.push(Rc),i.push(ga(Ee(t.isStandalone))),i.push(JL(t)),t.isSignal&&i.push(ga(Ee(t.isSignal))),ga(Zt(he.DirectiveDeclaration,i))}function tne(t,i,e,n,o,r,a){let c=e.createBoundHostProperties(t.properties,i),m=e.createDirectiveHostEventAsts(t.listeners,i);t.specialAttributes.styleAttr&&(t.attributes.style=Ee(t.specialAttributes.styleAttr)),t.specialAttributes.classAttr&&(t.attributes.class=Ee(t.specialAttributes.classAttr));let p=dee({componentName:r,componentSelector:o,properties:c,events:m,attributes:t.attributes},e,n);LL(p,Vt.Host),a.set("hostAttrs",p.root.attributes);let h=p.root.vars;return h!==null&&h>0&&a.set("hostVars",Ee(h)),aee(p)}var nne=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;function ine(t){let i={},e={},n={},o={};for(let r of Object.keys(t)){let a=t[r],c=r.match(nne);if(c===null)switch(r){case"class":if(typeof a!="string")throw new Error("Class binding must be string");o.classAttr=a;break;case"style":if(typeof a!="string")throw new Error("Style binding must be string");o.styleAttr=a;break;default:typeof a=="string"?i[r]=Ee(a):i[r]=a}else if(c[1]!=null){if(typeof a!="string")throw new Error("Property binding must be string");n[c[1]]=a}else if(c[2]!=null){if(typeof a!="string")throw new Error("Event binding must be string");e[c[2]]=a}}return{attributes:i,listeners:e,properties:n,specialAttributes:o}}function one(t,i){let e=b1();return e.createDirectiveHostEventAsts(t.listeners,i),e.createBoundHostProperties(t.properties,i),e.errors}function rne(t,i,e){let n=new ED;return t.map(o=>n.shimCssText(o,i,e))}function JL(t){return t.hostDirectives?.length?ga(oo(t.hostDirectives.map(i=>gl([{key:"directive",value:uv(i.directive.type),quoted:!1},{key:"inputs",value:_P(i.inputs||{}),quoted:!1},{key:"outputs",value:_P(i.outputs||{}),quoted:!1}])))):Rc}function ane(t){let i=[],e=!1;for(let n of t){if(!n.inputs&&!n.outputs)i.push(n.directive.type);else{let o=[{key:"directive",value:n.directive.type,quoted:!1}];if(n.inputs){let r=y6(n.inputs);r&&o.push({key:"inputs",value:r,quoted:!1})}if(n.outputs){let r=y6(n.outputs);r&&o.push({key:"outputs",value:r,quoted:!1})}i.push(gl(o))}n.isForwardReference&&(e=!0)}return e?new Am([],[new Ar(oo(i))]):oo(i)}function y6(t){let i=[];for(let e in t)t.hasOwnProperty(e)&&i.push(Ee(e),Ee(t[e]));return i.length>0?oo(i):null}var bP=class extends mf{visit(i){i instanceof ps?this.visit(i.ast):i.visit(this)}visitElement(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitTemplate(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.templateAttrs),this.visitAllTemplateNodes(i.variables),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitContent(i){this.visitAllTemplateNodes(i.children)}visitBoundAttribute(i){this.visit(i.value)}visitBoundEvent(i){this.visit(i.handler)}visitBoundText(i){this.visit(i.value)}visitIcu(i){Object.keys(i.vars).forEach(e=>this.visit(i.vars[e])),Object.keys(i.placeholders).forEach(e=>this.visit(i.placeholders[e]))}visitDeferredBlock(i){i.visitAll(this)}visitDeferredTrigger(i){i instanceof Lx?this.visit(i.value):i instanceof F0&&i.options!==null&&this.visit(i.options)}visitDeferredBlockPlaceholder(i){this.visitAllTemplateNodes(i.children)}visitDeferredBlockError(i){this.visitAllTemplateNodes(i.children)}visitDeferredBlockLoading(i){this.visitAllTemplateNodes(i.children)}visitSwitchBlock(i){this.visit(i.expression),this.visitAllTemplateNodes(i.groups)}visitSwitchBlockCase(i){i.expression&&this.visit(i.expression)}visitSwitchBlockCaseGroup(i){this.visitAllTemplateNodes(i.cases),this.visitAllTemplateNodes(i.children)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.item.visit(this),this.visitAllTemplateNodes(i.contextVariables),this.visit(i.expression),this.visitAllTemplateNodes(i.children),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.visitAllTemplateNodes(i.children)}visitIfBlock(i){this.visitAllTemplateNodes(i.branches)}visitIfBlockBranch(i){i.expression&&this.visit(i.expression),i.expressionAlias?.visit(this),this.visitAllTemplateNodes(i.children)}visitLetDeclaration(i){this.visit(i.value)}visitComponent(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitDirective(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.references)}visitVariable(i){}visitReference(i){}visitTextAttribute(i){}visitText(i){}visitUnknownBlock(i){}visitAllTemplateNodes(i){for(let e of i)this.visit(e)}};var CP=class{directiveMatcher;constructor(i){this.directiveMatcher=i}bind(i){if(!i.template&&!i.host)throw new Error("Empty bound targets are not supported");let e=new Map,n=[],o=new Set,r=new Map,a=new Map,c=new Map,m=new Map,p=new Map,h=new Map,g=new Set,M=new Set,C=[];if(i.template){let _=C1.apply(i.template);sne(_,c),xP.apply(i.template,this.directiveMatcher,e,n,o,r,a),x1.applyWithScope(i.template,_,m,p,h,g,M,C)}return i.host&&(e.set(i.host.node,i.host.directives),x1.applyWithScope(i.host.node,C1.apply(i.host.node),m,p,h,g,M,C)),new yP(i,e,n,o,r,a,m,p,h,c,g,M,C)}},C1=class t{parentScope;rootNode;namedEntities=new Map;elementLikeInScope=new Set;childScopes=new Map;isDeferred;constructor(i,e){this.parentScope=i,this.rootNode=e,this.isDeferred=i!==null&&i.isDeferred?!0:e instanceof Tu}static newRootScope(){return new t(null,null)}static apply(i){let e=t.newRootScope();return e.ingest(i),e}ingest(i){i instanceof js?(i.variables.forEach(e=>this.visitVariable(e)),i.children.forEach(e=>e.visit(this))):i instanceof pu?(i.expressionAlias!==null&&this.visitVariable(i.expressionAlias),i.children.forEach(e=>e.visit(this))):i instanceof hf?(this.visitVariable(i.item),i.contextVariables.forEach(e=>this.visitVariable(e)),i.children.forEach(e=>e.visit(this))):i instanceof z0||i instanceof j0||i instanceof Tu||i instanceof V0||i instanceof L0||i instanceof B0||i instanceof ff?i.children.forEach(e=>e.visit(this)):i instanceof H0||i.forEach(e=>e.visit(this))}visitElement(i){this.visitElementLike(i)}visitTemplate(i){i.directives.forEach(e=>e.visit(this)),i.references.forEach(e=>this.visitReference(e)),this.ingestScopedNode(i)}visitVariable(i){this.maybeDeclare(i)}visitReference(i){this.maybeDeclare(i)}visitDeferredBlock(i){this.ingestScopedNode(i),i.placeholder?.visit(this),i.loading?.visit(this),i.error?.visit(this)}visitDeferredBlockPlaceholder(i){this.ingestScopedNode(i)}visitDeferredBlockError(i){this.ingestScopedNode(i)}visitDeferredBlockLoading(i){this.ingestScopedNode(i)}visitSwitchBlock(i){i.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(i){}visitSwitchBlockCaseGroup(i){this.ingestScopedNode(i)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){this.ingestScopedNode(i),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.ingestScopedNode(i)}visitIfBlock(i){i.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(i){this.ingestScopedNode(i)}visitContent(i){this.ingestScopedNode(i)}visitLetDeclaration(i){this.maybeDeclare(i)}visitComponent(i){this.visitElementLike(i)}visitDirective(i){i.references.forEach(e=>this.visitReference(e))}visitBoundAttribute(i){}visitBoundEvent(i){}visitBoundText(i){}visitText(i){}visitTextAttribute(i){}visitIcu(i){}visitDeferredTrigger(i){}visitUnknownBlock(i){}visitElementLike(i){i.directives.forEach(e=>e.visit(this)),i.references.forEach(e=>this.visitReference(e)),i.children.forEach(e=>e.visit(this)),this.elementLikeInScope.add(i)}maybeDeclare(i){this.namedEntities.has(i.name)||this.namedEntities.set(i.name,i)}lookup(i){return this.namedEntities.has(i)?this.namedEntities.get(i):this.parentScope!==null?this.parentScope.lookup(i):null}getChildScope(i){let e=this.childScopes.get(i);if(e===void 0)throw new Error(`Assertion error: child scope for ${i} not found`);return e}ingestScopedNode(i){let e=new t(this,i);e.ingest(i),this.childScopes.set(i,e)}},xP=class t{directiveMatcher;directives;eagerDirectives;missingDirectives;bindings;references;isInDeferBlock=!1;constructor(i,e,n,o,r,a){this.directiveMatcher=i,this.directives=e,this.eagerDirectives=n,this.missingDirectives=o,this.bindings=r,this.references=a}static apply(i,e,n,o,r,a,c){new t(e,n,o,r,a,c).ingest(i)}ingest(i){i.forEach(e=>e.visit(this))}visitElement(i){this.visitElementOrTemplate(i)}visitTemplate(i){this.visitElementOrTemplate(i)}visitDeferredBlock(i){let e=this.isInDeferBlock;this.isInDeferBlock=!0,i.children.forEach(n=>n.visit(this)),this.isInDeferBlock=e,i.placeholder?.visit(this),i.loading?.visit(this),i.error?.visit(this)}visitDeferredBlockPlaceholder(i){i.children.forEach(e=>e.visit(this))}visitDeferredBlockError(i){i.children.forEach(e=>e.visit(this))}visitDeferredBlockLoading(i){i.children.forEach(e=>e.visit(this))}visitSwitchBlock(i){i.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(i){}visitSwitchBlockCaseGroup(i){i.children.forEach(e=>e.visit(this))}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.item.visit(this),i.contextVariables.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this)),i.empty?.visit(this)}visitForLoopBlockEmpty(i){i.children.forEach(e=>e.visit(this))}visitIfBlock(i){i.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(i){i.expressionAlias?.visit(this),i.children.forEach(e=>e.visit(this))}visitContent(i){i.children.forEach(e=>e.visit(this))}visitComponent(i){if(this.directiveMatcher instanceof fx){let e=this.directiveMatcher.match(i.componentName);e.length>0?this.trackSelectorlessMatchesAndDirectives(i,e):this.missingDirectives.add(i.componentName)}i.directives.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this))}visitDirective(i){if(this.directiveMatcher instanceof fx){let e=this.directiveMatcher.match(i.name);e.length>0?this.trackSelectorlessMatchesAndDirectives(i,e):this.missingDirectives.add(i.name)}}visitElementOrTemplate(i){if(this.directiveMatcher instanceof hx){let e=[],n=KW(i);this.directiveMatcher.match(n,(o,r)=>e.push(...r)),this.trackSelectorBasedBindingsAndDirectives(i,e)}else i.references.forEach(e=>{e.value.trim()===""&&this.references.set(e,i)});i.directives.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this))}trackMatchedDirectives(i,e){e.length>0&&(this.directives.set(i,e),this.isInDeferBlock||this.eagerDirectives.push(...e))}trackSelectorlessMatchesAndDirectives(i,e){if(e.length===0)return;this.trackMatchedDirectives(i,e);let n=(o,r,a)=>{o[a].hasBindingPropertyName(r.name)&&this.bindings.set(r,o)};for(let o of e)i.inputs.forEach(r=>n(o,r,"inputs")),i.attributes.forEach(r=>n(o,r,"inputs")),i.outputs.forEach(r=>n(o,r,"outputs"));i.references.forEach(o=>this.references.set(o,{directive:e[0],node:i}))}trackSelectorBasedBindingsAndDirectives(i,e){this.trackMatchedDirectives(i,e),i.references.forEach(o=>{let r=null;if(o.value.trim()==="")r=e.find(a=>a.isComponent)||null;else if(r=e.find(a=>a.exportAs!==null&&a.exportAs.some(c=>c===o.value))||null,r===null)return;r!==null?this.references.set(o,{directive:r,node:i}):this.references.set(o,i)});let n=(o,r)=>{let a=e.find(m=>m[r].hasBindingPropertyName(o.name)),c=a!==void 0?a:i;this.bindings.set(o,c)};i.inputs.forEach(o=>n(o,"inputs")),i.attributes.forEach(o=>n(o,"inputs")),i instanceof js&&i.templateAttrs.forEach(o=>n(o,"inputs")),i.outputs.forEach(o=>n(o,"outputs"))}visitVariable(i){}visitReference(i){}visitTextAttribute(i){}visitBoundAttribute(i){}visitBoundEvent(i){}visitBoundAttributeOrEvent(i){}visitText(i){}visitBoundText(i){}visitIcu(i){}visitDeferredTrigger(i){}visitUnknownBlock(i){}visitLetDeclaration(i){}},x1=class t extends bP{bindings;symbols;usedPipes;eagerPipes;deferBlocks;nestingLevel;scope;rootNode;level;visitNode=i=>i.visit(this);constructor(i,e,n,o,r,a,c,m,p){super(),this.bindings=i,this.symbols=e,this.usedPipes=n,this.eagerPipes=o,this.deferBlocks=r,this.nestingLevel=a,this.scope=c,this.rootNode=m,this.level=p}static applyWithScope(i,e,n,o,r,a,c,m){let p=i instanceof js?i:null;new t(n,o,a,c,m,r,e,p,0).ingest(i)}ingest(i){if(i instanceof js)i.variables.forEach(this.visitNode),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof pu)i.expressionAlias!==null&&this.visitNode(i.expressionAlias),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof hf)this.visitNode(i.item),i.contextVariables.forEach(e=>this.visitNode(e)),i.trackBy.visit(this),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof Tu){if(this.scope.rootNode!==i)throw new Error(`Assertion error: resolved incorrect scope for deferred block ${i}`);this.deferBlocks.push([i,this.scope]),i.children.forEach(e=>e.visit(this)),this.nestingLevel.set(i,this.level)}else i instanceof z0||i instanceof j0||i instanceof V0||i instanceof L0||i instanceof B0||i instanceof ff?(i.children.forEach(e=>e.visit(this)),this.nestingLevel.set(i,this.level)):i instanceof H0?this.nestingLevel.set(i,0):i.forEach(this.visitNode)}visitTemplate(i){i.inputs.forEach(this.visitNode),i.outputs.forEach(this.visitNode),i.directives.forEach(this.visitNode),i.templateAttrs.forEach(this.visitNode),i.references.forEach(this.visitNode),this.ingestScopedNode(i)}visitVariable(i){this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitReference(i){this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitDeferredBlock(i){this.ingestScopedNode(i),i.triggers.when?.value.visit(this),i.prefetchTriggers.when?.value.visit(this),i.hydrateTriggers.when?.value.visit(this),i.hydrateTriggers.never?.visit(this),i.placeholder&&this.visitNode(i.placeholder),i.loading&&this.visitNode(i.loading),i.error&&this.visitNode(i.error)}visitDeferredBlockPlaceholder(i){this.ingestScopedNode(i)}visitDeferredBlockError(i){this.ingestScopedNode(i)}visitDeferredBlockLoading(i){this.ingestScopedNode(i)}visitSwitchBlockCase(i){i.expression?.visit(this)}visitSwitchBlockCaseGroup(i){i.cases.forEach(e=>e.visit(this)),this.ingestScopedNode(i)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.expression.visit(this),this.ingestScopedNode(i),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.ingestScopedNode(i)}visitIfBlockBranch(i){i.expression?.visit(this),this.ingestScopedNode(i)}visitContent(i){this.ingestScopedNode(i)}visitLetDeclaration(i){super.visitLetDeclaration(i),this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitPipe(i,e){return this.usedPipes.add(i.name),this.scope.isDeferred||this.eagerPipes.add(i.name),super.visitPipe(i,e)}visitPropertyRead(i,e){return this.maybeMap(i,i.name),super.visitPropertyRead(i,e)}visitSafePropertyRead(i,e){return this.maybeMap(i,i.name),super.visitSafePropertyRead(i,e)}ingestScopedNode(i){let e=this.scope.getChildScope(i);new t(this.bindings,this.symbols,this.usedPipes,this.eagerPipes,this.deferBlocks,this.nestingLevel,e,i,this.level+1).ingest(i)}maybeMap(i,e){if(!(i.receiver instanceof Bc))return;let n=this.scope.lookup(e);n!==null&&this.bindings.set(i,n)}},yP=class{target;directives;eagerDirectives;missingDirectives;bindings;references;exprTargets;symbols;nestingLevel;scopedNodeEntities;usedPipes;eagerPipes;deferredBlocks;deferredScopes;constructor(i,e,n,o,r,a,c,m,p,h,g,M,C){this.target=i,this.directives=e,this.eagerDirectives=n,this.missingDirectives=o,this.bindings=r,this.references=a,this.exprTargets=c,this.symbols=m,this.nestingLevel=p,this.scopedNodeEntities=h,this.usedPipes=g,this.eagerPipes=M,this.deferredBlocks=C.map(_=>_[0]),this.deferredScopes=new Map(C)}getEntitiesInScope(i){return this.scopedNodeEntities.get(i)??new Set}getDirectivesOfNode(i){return this.directives.get(i)||null}getReferenceTarget(i){return this.references.get(i)||null}getConsumerOfBinding(i){return this.bindings.get(i)||null}getExpressionTarget(i){return this.exprTargets.get(i)||null}getDefinitionNodeOfSymbol(i){return this.symbols.get(i)||null}getNestingLevel(i){return this.nestingLevel.get(i)||0}getUsedDirectives(){let i=new Set;return this.directives.forEach(e=>e.forEach(n=>i.add(n))),Array.from(i.values())}getEagerlyUsedDirectives(){let i=new Set(this.eagerDirectives);return Array.from(i.values())}getUsedPipes(){return Array.from(this.usedPipes)}getEagerlyUsedPipes(){return Array.from(this.eagerPipes)}getDeferBlocks(){return this.deferredBlocks}getDeferredTriggerTarget(i,e){if(!(e instanceof Vx)&&!(e instanceof F0)&&!(e instanceof Bx))return null;let n=e.reference;if(n===null){let r=null;if(i.placeholder!==null){for(let a of i.placeholder.children)if(!(a instanceof w1)){if(r!==null)return null;a instanceof Vc&&(r=a)}}return r}let o=this.findEntityInScope(i,n);if(o instanceof $0&&this.getDefinitionNodeOfSymbol(o)!==i){let r=this.getReferenceTarget(o);if(r!==null)return this.referenceTargetToElement(r)}if(i.placeholder!==null){let r=this.findEntityInScope(i.placeholder,n),a=r instanceof $0?this.getReferenceTarget(r):null;if(a!==null)return this.referenceTargetToElement(a)}return null}isDeferred(i){for(let e of this.deferredBlocks){if(!this.deferredScopes.has(e))continue;let n=[this.deferredScopes.get(e)];for(;n.length>0;){let o=n.pop();if(o.elementLikeInScope.has(i))return!0;n.push(...o.childScopes.values())}}return!1}referencedDirectiveExists(i){return!this.missingDirectives.has(i)}findEntityInScope(i,e){let n=this.getEntitiesInScope(i);for(let o of n)if(o.name===e)return o;return null}referenceTargetToElement(i){return i instanceof Vc?i:i instanceof js||i.node instanceof l0||i.node instanceof L6||i.node instanceof H0?null:this.referenceTargetToElement(i.node)}};function sne(t,i){let e=new Map;function n(r){if(e.has(r.rootNode))return e.get(r.rootNode);let a=r.namedEntities,c;return r.parentScope!==null?c=new Map([...n(r.parentScope),...a]):c=new Map(a),e.set(r.rootNode,c),c}let o=[t];for(;o.length>0;){let r=o.pop();for(let a of r.childScopes.values())o.push(a);n(r)}for(let[r,a]of e)i.set(r,new Set(a.values()))}var SP=class{},wP=class{jitEvaluator;FactoryTarget=Td;ResourceLoader=SP;elementSchemaRegistry=new yf;constructor(i=new MD){this.jitEvaluator=i}compilePipe(i,e,n){let o={name:n.name,type:Gr(n.type),typeArgumentCount:0,pipeName:n.pipeName,pure:n.pure,isStandalone:n.isStandalone},r=sF(o);return this.jitExpression(r.expression,i,e,[])}compilePipeDeclaration(i,e,n){let o=wne(n),r=sF(o);return this.jitExpression(r.expression,i,e,[])}compileInjectable(i,e,n){let{expression:o,statements:r}=KR({name:n.name,type:Gr(n.type),typeArgumentCount:n.typeArgumentCount,providedIn:E6(n.providedIn),useClass:Wh(n,"useClass"),useFactory:T6(n,"useFactory"),useValue:Wh(n,"useValue"),useExisting:Wh(n,"useExisting"),deps:n.deps?.map(i8)},!0);return this.jitExpression(o,i,e,r)}compileInjectableDeclaration(i,e,n){let{expression:o,statements:r}=KR({name:n.type.name,type:Gr(n.type),typeArgumentCount:0,providedIn:E6(n.providedIn),useClass:Wh(n,"useClass"),useFactory:T6(n,"useFactory"),useValue:Wh(n,"useValue"),useExisting:Wh(n,"useExisting"),deps:n.deps?.map(D6)},!0);return this.jitExpression(o,i,e,r)}compileInjector(i,e,n){let o={type:Gr(n.type),providers:n.providers&&n.providers.length>0?new gi(n.providers):null,imports:n.imports.map(a=>new gi(a))},r=aF(o);return this.jitExpression(r.expression,i,e,[])}compileInjectorDeclaration(i,e,n){let o=Mne(n),r=aF(o);return this.jitExpression(r.expression,i,e,[])}compileNgModule(i,e,n){let o={kind:Im.Global,type:Gr(n.type),bootstrap:n.bootstrap.map(Gr),declarations:n.declarations.map(Gr),publicDeclarationTypes:null,imports:n.imports.map(Gr),includeImportTypes:!0,exports:n.exports.map(Gr),selectorScopeMode:Xx.Inline,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(Gr):null,id:n.id?new gi(n.id):null},r=_q(o);return this.jitExpression(r.expression,i,e,[])}compileNgModuleDeclaration(i,e,n){let o=vq(n);return this.jitExpression(o,i,e,[])}compileDirective(i,e,n){let o=M6(n);return this.compileDirectiveFromMeta(i,e,o)}compileDirectiveDeclaration(i,e,n){let o=this.createParseSourceSpan("Directive",n.type.name,e),r=t8(n,o);return this.compileDirectiveFromMeta(i,e,r)}compileDirectiveFromMeta(i,e,n){let o=new Mx,r=b1(),a=Xte(n,o,r);return this.jitExpression(a.expression,i,e,o.statements)}compileComponent(i,e,n){let{template:o,defer:r}=n8(n.template,n.name,e,n.preserveWhitespaces,void 0),a=tt(H(H({},n),M6(n)),{selector:n.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:o,declarations:n.declarations.map(mne),declarationListEmitMode:0,defer:r,styles:[...n.styles,...o.styles],encapsulation:n.encapsulation,changeDetection:n.changeDetection??null,animations:n.animations!=null?new gi(n.animations):null,viewProviders:n.viewProviders!=null?new gi(n.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null}),c=`ng:///${n.name}.js`;return this.compileComponentFromMeta(i,c,a)}compileComponentDeclaration(i,e,n){let o=this.createParseSourceSpan("Component",n.type.name,e),r=dne(n,o,e);return this.compileComponentFromMeta(i,e,r)}compileComponentFromMeta(i,e,n){let o=new Mx,r=b1(),a=Qte(n,o,r);return this.jitExpression(a.expression,i,e,o.statements)}compileFactory(i,e,n){let o=ou({name:n.name,type:Gr(n.type),typeArgumentCount:n.typeArgumentCount,deps:hne(n.deps),target:n.target});return this.jitExpression(o.expression,i,e,o.statements)}compileFactoryDeclaration(i,e,n){let o=ou({name:n.type.name,type:Gr(n.type),typeArgumentCount:0,deps:Array.isArray(n.deps)?n.deps.map(D6):n.deps,target:n.target});return this.jitExpression(o.expression,i,e,o.statements)}createParseSourceSpan(i,e,n){return dq(i,e,n)}jitExpression(i,e,n,o){let r=[...o,new qr("$def",i,void 0,fa.Exported)];return this.jitEvaluator.evaluateStatements(n,r,new TD(e),!0).$def}};function S6(t){return tt(H({},t),{isSignal:t.isSignal,predicate:e8(t.predicate),read:t.read?new gi(t.read):null,static:t.static,emitDistinctChangesOnly:t.emitDistinctChangesOnly})}function w6(t){return{propertyName:t.propertyName,first:t.first??!1,predicate:e8(t.predicate),descendants:t.descendants??!1,read:t.read?new gi(t.read):null,static:t.static??!1,emitDistinctChangesOnly:t.emitDistinctChangesOnly??!0,isSignal:!!t.isSignal}}function e8(t){return Array.isArray(t)?t:PP(new gi(t),1)}function M6(t){let i=Sne(t.inputs||[]),e=QE(t.outputs||[]),n=t.propMetadata,o={},r={};for(let c in n)n.hasOwnProperty(c)&&n[c].forEach(m=>{bne(m)?o[c]={bindingPropertyName:m.alias||c,classPropertyName:c,required:m.required||!1,isSignal:!!m.isSignal,transformFunction:m.transform!=null?new gi(m.transform):null}:Cne(m)&&(r[c]=m.alias||c)});let a=t.hostDirectives?.length?t.hostDirectives.map(c=>typeof c=="function"?{directive:Gr(c),inputs:null,outputs:null,isForwardReference:!1}:{directive:Gr(c.directive),isForwardReference:!1,inputs:c.inputs?QE(c.inputs):null,outputs:c.outputs?QE(c.outputs):null}):null;return tt(H({},t),{typeArgumentCount:0,typeSourceSpan:t.typeSourceSpan,type:Gr(t.type),deps:null,host:H({},gne(t.propMetadata,t.typeSourceSpan,t.host)),inputs:H(H({},i),o),outputs:H(H({},e),r),queries:t.queries.map(S6),providers:t.providers!=null?new gi(t.providers):null,viewQueries:t.viewQueries.map(S6),hostDirectives:a})}function t8(t,i){let e=t.hostDirectives?.length?t.hostDirectives.map(n=>({directive:Gr(n.directive),isForwardReference:!1,inputs:n.inputs?k6(n.inputs):null,outputs:n.outputs?k6(n.outputs):null})):null;return{name:t.type.name,type:Gr(t.type),typeSourceSpan:i,selector:t.selector??null,inputs:t.inputs?xne(t.inputs):{},outputs:t.outputs??{},host:lne(t.host),queries:(t.queries??[]).map(w6),viewQueries:(t.viewQueries??[]).map(w6),providers:t.providers!==void 0?new gi(t.providers):null,exportAs:t.exportAs??null,usesInheritance:t.usesInheritance??!1,controlCreate:t.controlCreate??null,lifecycle:{usesOnChanges:t.usesOnChanges??!1},deps:null,typeArgumentCount:0,isStandalone:t.isStandalone??F6(t.version),isSignal:t.isSignal??!1,hostDirectives:e}}function lne(t={}){return{attributes:cne(t.attributes??{}),listeners:t.listeners??{},properties:t.properties??{},specialAttributes:{classAttr:t.classAttribute,styleAttr:t.styleAttribute}}}function k6(t){let i=null;for(let e=1;eXE(c,!0))),t.directives&&r.push(...t.directives.map(c=>XE(c))),t.pipes&&r.push(...pne(t.pipes)));let a=r.some(({kind:c})=>c===_f.Directive||c===_f.NgModule);return tt(H({},t8(t,i)),{template:n,styles:t.styles??[],declarations:r,viewProviders:t.viewProviders!==void 0?new gi(t.viewProviders):null,animations:t.animations!==void 0?new gi(t.animations):null,defer:o,changeDetection:t.changeDetection??kP.Default,encapsulation:t.encapsulation??iu.Emulated,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null,hasDirectiveDependencies:a})}function mne(t){return tt(H({},t),{type:new gi(t.type)})}function XE(t,i=null){return{kind:_f.Directive,isComponent:i||t.kind==="component",selector:t.selector,type:new gi(t.type),inputs:t.inputs??[],outputs:t.outputs??[],exportAs:t.exportAs??null}}function pne(t){return t?Object.keys(t).map(i=>({kind:_f.Pipe,name:i,type:new gi(t[i])})):[]}function une(t){return{kind:_f.Pipe,name:t.name,type:new gi(t.type)}}function n8(t,i,e,n,o){let r=Ute(t,e,{preserveWhitespaces:n});if(r.errors!==null){let m=r.errors.map(p=>p.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${i}: ${m}`)}let c=new CP(null).bind({template:r.nodes});return{template:r,defer:fne(c,o)}}function Wh(t,i){if(t.hasOwnProperty(i))return PP(new gi(t[i]),0)}function T6(t,i){if(t.hasOwnProperty(i))return new gi(t[i])}function E6(t){let i=typeof t=="function"?new gi(t):new _a(t??null);return PP(i,0)}function hne(t){return t==null?null:t.map(i8)}function i8(t){let i=t.attribute!=null,e=t.token===null?null:new gi(t.token),n=i?new gi(t.attribute):e;return o8(n,i,t.host,t.optional,t.self,t.skipSelf)}function D6(t){let i=t.attribute??!1,e=t.token===null?null:new gi(t.token);return o8(e,i,t.host??!1,t.optional??!1,t.self??!1,t.skipSelf??!1)}function o8(t,i,e,n,o,r){let a=i?Ee("unknown"):null;return{token:t,attributeNameType:a,host:e,optional:n,self:o,skipSelf:r}}function fne(t,i){let e=t.getDeferBlocks(),n=new Map;for(let o=0;or.msg).join(` `));for(let r in t)t.hasOwnProperty(r)&&t[r].forEach(a=>{_ne(a)?n.properties[a.hostPropertyName||r]=OW("this",r):vne(a)&&(n.listeners[a.eventName||r]=`${r}(${(a.args||[]).join(",")})`)});return n}function _ne(t){return t.ngMetadataName==="HostBinding"}function vne(t){return t.ngMetadataName==="HostListener"}function bne(t){return t.ngMetadataName==="Input"}function Cne(t){return t.ngMetadataName==="Output"}function xne(t){return Object.keys(t).reduce((i,e)=>{let n=t[e];return typeof n=="string"||Array.isArray(n)?i[e]=yne(n):i[e]={bindingPropertyName:n.publicName,classPropertyName:e,transformFunction:n.transformFunction!==null?new gi(n.transformFunction):null,required:n.isRequired,isSignal:n.isSignal},i},{})}function yne(t){return typeof t=="string"?{bindingPropertyName:t,classPropertyName:t,transformFunction:null,required:!1,isSignal:!1}:{bindingPropertyName:t[0],classPropertyName:t[1],transformFunction:t[2]?new gi(t[2]):null,required:!1,isSignal:!1}}function Sne(t){return t.reduce((i,e)=>{if(typeof e=="string"){let[n,o]=r8(e);i[o]={bindingPropertyName:n,classPropertyName:o,required:!1,isSignal:!1,transformFunction:null}}else i[e.name]={bindingPropertyName:e.alias||e.name,classPropertyName:e.name,required:e.required||!1,isSignal:!1,transformFunction:e.transform!=null?new gi(e.transform):null};return i},{})}function QE(t){return t.reduce((i,e)=>{let[n,o]=r8(e);return i[o]=n,i},{})}function r8(t){let[i,e]=t.split(":",2).map(n=>n.trim());return[e??i,i]}function wne(t){return{name:t.type.name,type:Gr(t.type),typeArgumentCount:0,pipeName:t.name,deps:null,pure:t.pure??!0,isStandalone:t.isStandalone??F6(t.version)}}function Mne(t){return{name:t.type.name,type:Gr(t.type),providers:t.providers!==void 0&&t.providers.length>0?new gi(t.providers):null,imports:t.imports!==void 0?t.imports.map(i=>new gi(i)):[]}}function kne(t){let i=t.ng||(t.ng={});i.\u0275compilerFacade=new wP}var MP=class{closedByParent=!1;implicitNamespacePrefix=null;isVoid=!1;ignoreFirstLf=!1;canSelfClose=!0;preventNamespaceInheritance=!1;requireExtraParent(i){return!1}isClosedByChild(i){return!1}getContentType(){return Dc.PARSABLE_DATA}},PFe=new MP;var IFe=new nD("21.2.6");kne(s0);function KP(t){let i=t.cloneNode(!0),e=i.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();i.removeAttribute("id");for(let o=0;o=n&&e<=o&&i>=r&&i<=a}function Ene(t,i){let e=i.leftt.right,o=i.topt.bottom;return e||n||o||r}function Cv(t,i,e){t.top+=i,t.bottom=t.top+t.height,t.left+=e,t.right=t.left+t.width}function c8(t,i,e,n){let{top:o,right:r,bottom:a,left:c,width:m,height:p}=t,h=m*i,g=p*i;return n>o-g&&nc-h&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:iI(e)})})}handleScroll(i){let e=eu(i),n=this.positions.get(e);if(!n)return null;let o=n.scrollPosition,r,a;if(e===this._document){let p=this.getViewportScrollPosition();r=p.top,a=p.left}else r=e.scrollTop,a=e.scrollLeft;let c=o.top-r,m=o.left-a;return this.positions.forEach((p,h)=>{p.clientRect&&e!==h&&e.contains(h)&&Cv(p.clientRect,c,m)}),o.top=r,o.left=a,{top:c,left:m}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function x8(t,i){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let n=i.createElement("div");return e.forEach(o=>n.appendChild(o)),n}function oI(t,i,e){for(let n in i)if(i.hasOwnProperty(n)){let o=i[n];o?t.setProperty(n,o,e?.has(n)?"important":""):t.removeProperty(n)}return t}function Df(t,i){let e=i?"":"none";oI(t.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function d8(t,i,e){oI(t.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},e)}function I1(t,i){return i&&i!="none"?t+" "+i:t}function m8(t,i){t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,t.style.transform=xv(i.left,i.top)}function xv(t,i){return`translate3d(${Math.round(t)}px, ${Math.round(i)}px, 0)`}var vv={capture:!0},QP={passive:!1,capture:!0},Dne=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,o){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important} `],encapsulation:2,changeDetection:0})}return t})(),y8=(()=>{class t{_ngZone=f(bi);_document=f(Pi);_styleLoader=f(Go);_renderer=f(yd).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new Le;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=me([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new Le;pointerUp=new Le;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,QP)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,n){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(Dne),this._activeDragInstances.update(o=>[...o,e]),this._activeDragInstances().length===1)){let o=n.type.startsWith("touch"),r=c=>this.pointerUp.next(c),a=[["scroll",c=>this._scroll.next(c),vv],["selectstart",this._preventDefaultWhileDragging,QP]];o?a.push(["touchend",r,vv],["touchcancel",r,vv]):a.push(["mouseup",r,vv]),o||a.push(["mousemove",c=>this.pointerMove.next(c),QP]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=a.map(([c,m,p])=>this._renderer.listen(this._document,c,m,p))})}}stopDragging(e){this._activeDragInstances.update(n=>{let o=n.indexOf(e);return o>-1?(n.splice(o,1),[...n]):n}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let n=[this._scroll];return e&&e!==this._document&&n.push(new _r(o=>this._ngZone.runOutsideAngular(()=>{let r=this._renderer.listen(e,"scroll",a=>{this._activeDragInstances().length&&o.next(a)},vv);return()=>{r()}}))),Dn(...n)}registerDirectiveNode(e,n){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,n)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function p8(t){let i=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*i}function Pne(t){let i=getComputedStyle(t),e=YP(i,"transition-property"),n=e.find(c=>c==="transform"||c==="all");if(!n)return 0;let o=e.indexOf(n),r=YP(i,"transition-duration"),a=YP(i,"transition-delay");return p8(r[o])+p8(a[o])}function YP(t,i){return t.getPropertyValue(i).split(",").map(n=>n.trim())}var Ine=new Set(["position"]),JP=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(i,e,n,o,r,a,c,m,p,h){this._document=i,this._rootElement=e,this._direction=n,this._initialDomRect=o,this._previewTemplate=r,this._previewClass=a,this._pickupPositionOnPage=c,this._initialTransform=m,this._zIndex=p,this._renderer=h}attach(i){this._preview=this._createPreview(),i.appendChild(this._preview),u8(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(i){this._preview.style.transform=i}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(i){this._preview.classList.add(i)}getTransitionDuration(){return Pne(this._preview)}addEventListener(i,e){return this._renderer.listen(this._preview,i,e)}_createPreview(){let i=this._previewTemplate,e=this._previewClass,n=i?i.template:null,o;if(n&&i){let r=i.matchSize?this._initialDomRect:null,a=i.viewContainer.createEmbeddedView(n,i.context);a.detectChanges(),o=x8(a,this._document),this._previewEmbeddedView=a,i.matchSize?m8(o,r):o.style.transform=xv(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else o=KP(this._rootElement),m8(o,this._initialDomRect),this._initialTransform&&(o.style.transform=this._initialTransform);return oI(o.style,{"pointer-events":"none",margin:u8(o)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Ine),Df(o,!1),o.classList.add("cdk-drag-preview"),o.setAttribute("popover","manual"),o.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(r=>o.classList.add(r)):o.classList.add(e)),o}};function u8(t){return"showPopover"in t}var Ane={passive:!0},h8={passive:!1},One={passive:!1,capture:!0},Nne=800,f8="cdk-drag-placeholder",g8=new Set(["position"]);function Rne(t,i,e={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let n=t.get(ii,null,{optional:!0})||t.get(yd).createRenderer(null,null);return new eI(i,e,t.get(Pi),t.get(bi),t.get(wd),t.get(y8),n)}var eI=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=me(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new Le;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=so.EMPTY;_pointerUpSubscription=so.EMPTY;_scrollSubscription=so.EMPTY;_resizeSubscription=so.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(i){i!==this._disabled&&(this._disabled=i,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Df(e,i)))}_disabled=!1;beforeStarted=new Le;started=new Le;released=new Le;ended=new Le;entered=new Le;exited=new Le;dropped=new Le;moved=this._moveEvents;data;constrainPosition;constructor(i,e,n,o,r,a,c){this._config=e,this._document=n,this._ngZone=o,this._viewportRuler=r,this._dragDropRegistry=a,this._renderer=c,this.withRootElement(i).withParent(e.parentDragRef||null),this._parentPositions=new P1(n),a.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(n=>Yl(n)),this._handles.forEach(n=>Df(n,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&e.add(n)}),this._disabledHandles=e,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){let e=Yl(i);if(e!==this._rootElement){this._removeRootElementListeners();let n=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[n.listen(e,"mousedown",this._pointerDown,h8),n.listen(e,"touchstart",this._pointerDown,Ane),n.listen(e,"dragstart",this._nativeDragStart,h8)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?Yl(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&Ene(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let i=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),n=0,o=0;e.lefti.right&&(n=i.right-e.right),e.topi.bottom&&(o=i.bottom-e.bottom);let r=this._activeTransform.x,a=this._activeTransform.y,c=r+n,m=a+o;this._rootElement.style.transform=xv(c,m),this._activeTransform={x:c,y:m},this._passiveTransform={x:c,y:m}}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),Df(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),Df(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){let i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){let i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=i=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,i)}else this.disabled||this._initializeDragSequence(this._rootElement,i)};_pointerMove=i=>{let e=this._getPointerPositionOnPage(i);if(!this._hasStartedDragging()){let o=Math.abs(e.x-this._pickupPositionOnPage.x),r=Math.abs(e.y-this._pickupPositionOnPage.y);if(o+r>=this._config.dragStartThreshold){let c=Date.now()>=this._dragStartTime+this._getDragStartDelay(i),m=this._dropContainer;if(!c){this._endDragSequence(i);return}(!m||!m.isDragging()&&!m.isReceiving())&&(i.cancelable&&i.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(i)))}return}i.cancelable&&i.preventDefault();let n=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,e);else{let o=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=n.x-o.x+this._passiveTransform.x,r.y=n.y-o.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:i,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})};_pointerUp=i=>{this._endDragSequence(i)};_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){bv(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),n=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",Fne,One)}),n){let o=this._rootElement,r=o.parentNode,a=this._placeholder=this._createPlaceholderElement(),c=this._marker=this._marker||this._document.createComment("");r.insertBefore(c,o),this._initialTransform=o.style.transform||"",this._preview=new JP(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,e)),d8(o,!1,g8),this._document.body.appendChild(r.replaceChild(a,o)),this.started.next({source:this,event:i}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(i,e){this._parentDragRef&&e.stopPropagation();let n=this.isDragging(),o=bv(e),r=!o&&e.button!==0,a=this._rootElement,c=eu(e),m=!o&&this._lastTouchEventTime&&this._lastTouchEventTime+Nne>Date.now(),p=o?OC(e):AC(e);if(c&&c.draggable&&e.type==="mousedown"&&e.preventDefault(),n||r||m||p)return;if(this._handles.length){let M=a.style;this._rootElementTapHighlight=M.webkitTapHighlightColor||"",M.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(M=>this._updateOnScroll(M)),this._boundaryElement&&(this._boundaryRect=iI(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,e);let g=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:g.x,y:g.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(i){d8(this._rootElement,!0,g8),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,n=e.getItemIndex(this),o=this._getPointerPositionOnPage(i),r=this._getDragDistance(o),a=e._isOverContainer(o.x,o.y);this.ended.next({source:this,distance:r,dropPoint:o,event:i}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:a,distance:r,dropPoint:o,event:i}),e.drop(this,n,this._initialIndex,this._initialContainer,a,r,o,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:e},{x:n,y:o}){let r=this._initialContainer._getSiblingContainerFromPosition(this,i,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,e)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let a=this._dropContainer.getItemIndex(this),c=this._dropContainer.getItemAtIndex(a+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,c),this._dropContainer=r,this._dropContainer.enter(this,i,e,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,o),this._dropContainer._sortItem(this,i,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,e):this._applyPreviewTransform(i-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let i=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let o=c=>{(!c||this._preview&&eu(c)===this._preview.element&&c.propertyName==="transform")&&(a(),n(),clearTimeout(r))},r=setTimeout(o,e*1.5),a=this._preview.addEventListener("transitionend",o)}))}_createPlaceholderElement(){let i=this._placeholderTemplate,e=i?i.template:null,n;return e?(this._placeholderRef=i.viewContainer.createEmbeddedView(e,i.context),this._placeholderRef.detectChanges(),n=x8(this._placeholderRef,this._document)):n=KP(this._rootElement),n.style.pointerEvents="none",n.classList.add(f8),n}_getPointerPositionInElement(i,e,n){let o=e===this._rootElement?null:e,r=o?o.getBoundingClientRect():i,a=bv(n)?n.targetTouches[0]:n,c=this._getViewportScrollPosition(),m=a.pageX-r.left-c.left,p=a.pageY-r.top-c.top;return{x:r.left-i.left+m,y:r.top-i.top+p}}_getPointerPositionOnPage(i){let e=this._getViewportScrollPosition(),n=bv(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,o=n.pageX-e.left,r=n.pageY-e.top;if(this._ownerSVGElement){let a=this._ownerSVGElement.getScreenCTM();if(a){let c=this._ownerSVGElement.createSVGPoint();return c.x=o,c.y=r,c.matrixTransform(a.inverse())}}return{x:o,y:r}}_getConstrainedPointerPosition(i){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:o}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if(this.lockAxis==="x"||e==="x"?o=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:a}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,c=this._boundaryRect,{width:m,height:p}=this._getPreviewRect(),h=c.top+a,g=c.bottom-(p-a),M=c.left+r,C=c.right-(m-r);n=_8(n,M,C),o=_8(o,h,g)}return{x:n,y:o}}_updatePointerDirectionDelta(i){let{x:e,y:n}=i,o=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(e-r.x),c=Math.abs(n-r.y);return a>this._config.pointerDirectionChangeThreshold&&(o.x=e>r.x?1:-1,r.x=e),c>this._config.pointerDirectionChangeThreshold&&(o.y=n>r.y?1:-1,r.y=n),o}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,Df(this._rootElement,i))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(i=>i()),this._rootElementCleanups=void 0}_applyRootElementTransform(i,e){let n=1/this.scale,o=xv(i*n,e*n),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=I1(o,this._initialTransform)}_applyPreviewTransform(i,e){let n=this._previewTemplate?.template?void 0:this._initialTransform,o=xv(i,e);this._preview.setTransform(I1(o,n))}_getDragDistance(i){let e=this._pickupPositionOnPage;return e?{x:i.x-e.x,y:i.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:e}=this._passiveTransform;if(i===0&&e===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),o=this._boundaryElement.getBoundingClientRect();if(o.width===0&&o.height===0||n.width===0&&n.height===0)return;let r=o.left-n.left,a=n.right-o.right,c=o.top-n.top,m=n.bottom-o.bottom;o.width>n.width?(r>0&&(i+=r),a>0&&(i-=a)):i=0,o.height>n.height?(c>0&&(e+=c),m>0&&(e-=m)):e=0,(i!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:i})}_getDragStartDelay(i){let e=this.dragStartDelay;return typeof e=="number"?e:bv(i)?e.touch:e?e.mouse:0}_updateOnScroll(i){let e=this._parentPositions.handleScroll(i);if(e){let n=eu(i);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&Cv(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=IC(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,e){let n=this._previewContainer||"global";if(n==="parent")return i;if(n==="global"){let o=this._document;return e||o.fullscreenElement||o.webkitFullscreenElement||o.mozFullScreenElement||o.msFullscreenElement||o.body}return Yl(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=i=>{if(this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&i.preventDefault()}else this.disabled||i.preventDefault()};_getTargetHandle(i){return this._handles.find(e=>i.target&&(i.target===e||e.contains(i.target)))}_conditionallyInsertAnchor(i,e,n){if(i===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let o=this._anchor??=KP(this._placeholder);o.classList.remove(f8),o.classList.add("cdk-drag-anchor"),o.style.transform="",n?n.before(o):Yl(e.element).appendChild(o)}}};function _8(t,i,e){return Math.max(i,Math.min(e,t))}function bv(t){return t.type[0]==="t"}function Fne(t){t.preventDefault()}function S8(t,i,e){let n=v8(i,t.length-1),o=v8(e,t.length-1);if(n===o)return;let r=t[n],a=o0)return null;let c=this.orientation==="horizontal",m=r.findIndex(S=>S.drag===i),p=r[a],h=r[m].clientRect,g=p.clientRect,M=m>a?1:-1,C=this._getItemOffsetPx(h,g,M),_=this._getSiblingOffsetPx(m,r,M),w=r.slice();return S8(r,m,a),r.forEach((S,y)=>{if(w[y]===S)return;let k=S.drag===i,I=k?C:_,E=k?i.getPlaceholderElement():S.drag.getRootElement();S.offset+=I;let N=Math.round(S.offset*(1/S.drag.scale));c?(E.style.transform=I1(`translate3d(${N}px, 0, 0)`,S.initialTransform),Cv(S.clientRect,0,I)):(E.style.transform=I1(`translate3d(0, ${N}px, 0)`,S.initialTransform),Cv(S.clientRect,I,0))}),this._previousSwap.overlaps=ZP(g,e,n),this._previousSwap.drag=p.drag,this._previousSwap.delta=c?o.x:o.y,{previousIndex:m,currentIndex:a}}enter(i,e,n,o){let r=this._activeDraggables,a=r.indexOf(i),c=i.getPlaceholderElement();a>-1&&r.splice(a,1);let m=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,n):o,p=r[m];if(p===i&&(p=r[m+1]),!p&&(m==null||m===-1||m{let e=i.getRootElement();if(e){let n=this._itemPositions.find(o=>o.drag===i)?.initialTransform;e.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return this._getVisualItemPositions().findIndex(e=>e.drag===i)}getItemAtIndex(i){return this._getVisualItemPositions()[i]?.drag||null}updateOnScroll(i,e){this._itemPositions.forEach(({clientRect:n})=>{Cv(n,i,e)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(i){this._element=i}_cacheItemPositions(){let i=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let n=e.getVisibleElement();return{drag:e,offset:0,initialTransform:n.style.transform||"",clientRect:iI(n)}}).sort((e,n)=>i?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(i,e,n){let o=this.orientation==="horizontal",r=o?e.left-i.left:e.top-i.top;return n===-1&&(r+=o?e.width-i.width:e.height-i.height),r}_getSiblingOffsetPx(i,e,n){let o=this.orientation==="horizontal",r=e[i].clientRect,a=e[i+n*-1],c=r[o?"width":"height"]*n;if(a){let m=o?"left":"top",p=o?"right":"bottom";n===-1?c-=a.clientRect[m]-r[p]:c+=r[m]-a.clientRect[p]}return c}_shouldEnterAsFirstChild(i,e){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,o=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let a=n[n.length-1].clientRect;return o?i>=a.right:e>=a.bottom}else{let a=n[0].clientRect;return o?i<=a.left:e<=a.top}}_getItemIndexFromPointerPosition(i,e,n,o){let r=this.orientation==="horizontal",a=this._itemPositions.findIndex(({drag:c,clientRect:m})=>{if(c===i)return!1;if(o){let p=r?o.x:o.y;if(c===this._previousSwap.drag&&this._previousSwap.overlaps&&p===this._previousSwap.delta)return!1}return r?e>=Math.floor(m.left)&&e=Math.floor(m.top)&&nm?h.after(p):h.before(p),S8(this._activeItems,m,r);let g=this._getRootNode().elementFromPoint(e,n);return a.deltaX=o.x,a.deltaY=o.y,a.drag=c,a.overlaps=h===g||h.contains(g),{previousIndex:m,currentIndex:r}}enter(i,e,n,o){let r=this._activeItems.indexOf(i);r>-1&&this._activeItems.splice(r,1);let a=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,n):o;a===-1&&(a=this._getClosestItemIndexToPointer(i,e,n));let c=this._activeItems[a];c&&!this._dragDropRegistry.isDragging(c)?(this._activeItems.splice(a,0,i),c.getRootElement().before(i.getPlaceholderElement())):(this._activeItems.push(i),this._element.appendChild(i.getPlaceholderElement()))}withItems(i){this._activeItems=i.slice()}withSortPredicate(i){this._sortPredicate=i}reset(){let i=this._element,e=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[o,r]=this._relatedNodes[n];o.parentNode===i&&o.nextSibling!==r&&(r===null?i.appendChild(o):r.parentNode===i&&i.insertBefore(o,r))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(i){return this._activeItems.indexOf(i)}getItemAtIndex(i){return this._activeItems[i]||null}updateOnScroll(){this._activeItems.forEach(i=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(i){i!==this._element&&(this._element=i,this._rootNode=void 0)}_getItemIndexFromPointerPosition(i,e,n){let o=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(n)),r=o?this._activeItems.findIndex(a=>{let c=a.getRootElement();return o===c||c.contains(o)}):-1;return r===-1||!this._sortPredicate(r,i)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=IC(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(i,e,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let o=1/0,r=-1;for(let a=0;a!0;sortPredicate=()=>!0;beforeStarted=new Le;entered=new Le;exited=new Le;dropped=new Le;sorted=new Le;receivingStarted=new Le;receivingStopped=new Le;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=so.EMPTY;_verticalScrollDirection=vl.NONE;_horizontalScrollDirection=Ya.NONE;_scrollNode;_stopScrollTimers=new Le;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(i,e,n,o,r){this._dragDropRegistry=e,this._ngZone=o,this._viewportRuler=r;let a=this.element=Yl(i);this._document=n,this.withOrientation("vertical").withElementContainer(a),e.registerDropContainer(this),this._parentPositions=new P1(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,e,n,o){this._draggingStarted(),o==null&&this.sortingDisabled&&(o=this._draggables.indexOf(i)),this._sortStrategy.enter(i,e,n,o),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,e,n,o,r,a,c,m={}){this._reset(),this.dropped.next({item:i,currentIndex:e,previousIndex:n,container:this,previousContainer:o,isPointerOverContainer:r,distance:a,dropPoint:c,event:m})}withItems(i){let e=this._draggables;return this._draggables=i,i.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(e.filter(o=>o.isDragging()).every(o=>i.indexOf(o)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._direction=i,this._sortStrategy instanceof A1&&(this._sortStrategy.direction=i),this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){if(i==="mixed")this._sortStrategy=new tI(this._document,this._dragDropRegistry);else{let e=new A1(this._dragDropRegistry);e.direction=this._direction,e.orientation=i,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,n)=>this.sortPredicate(e,n,this)),this}withScrollableParents(i){let e=this._container;return this._scrollableElements=i.indexOf(e)===-1?[e,...i]:i.slice(),this}withElementContainer(i){if(i===this._container)return this;let e=Yl(this.element),n=this._scrollableElements.indexOf(this._container),o=this._scrollableElements.indexOf(i);return n>-1&&this._scrollableElements.splice(n,1),o>-1&&this._scrollableElements.splice(o,1),this._sortStrategy&&this._sortStrategy.withElementContainer(i),this._cachedShadowRoot=null,this._scrollableElements.unshift(i),this._container=i,this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}getItemAtIndex(i){return this._isDragging?this._sortStrategy.getItemAtIndex(i):this._draggables[i]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,e,n,o){if(this.sortingDisabled||!this._domRect||!c8(this._domRect,b8,e,n))return;let r=this._sortStrategy.sort(i,e,n,o);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,e){if(this.autoScrollDisabled)return;let n,o=vl.NONE,r=Ya.NONE;if(this._parentPositions.positions.forEach((a,c)=>{c===this._document||!a.clientRect||n||c8(a.clientRect,b8,i,e)&&([o,r]=Bne(c,a.clientRect,this._direction,i,e),(o||r)&&(n=c))}),!o&&!r){let{width:a,height:c}=this._viewportRuler.getViewportSize(),m={width:a,height:c,top:0,right:a,bottom:c,left:0};o=M8(m,e),r=k8(m,i),n=window}n&&(o!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=o,this._horizontalScrollDirection=r,this._scrollNode=n,(o||r)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let i=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let i=this._container.style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),_C(0,yh).pipe(rt(this._stopScrollTimers)).subscribe(()=>{let i=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===vl.UP?i.scrollBy(0,-e):this._verticalScrollDirection===vl.DOWN&&i.scrollBy(0,e),this._horizontalScrollDirection===Ya.LEFT?i.scrollBy(-e,0):this._horizontalScrollDirection===Ya.RIGHT&&i.scrollBy(e,0)})};_isOverContainer(i,e){return this._domRect!=null&&ZP(this._domRect,i,e)}_getSiblingContainerFromPosition(i,e,n){return this._siblings.find(o=>o._canReceive(i,e,n))}_canReceive(i,e,n){if(!this._domRect||!ZP(this._domRect,e,n)||!this.enterPredicate(i,this))return!1;let o=this._getShadowRoot().elementFromPoint(e,n);return o?o===this._container||this._container.contains(o):!1}_startReceiving(i,e){let n=this._activeSiblings;!n.has(i)&&e.every(o=>this.enterPredicate(o,this)||this._draggables.indexOf(o)>-1)&&(n.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:e}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(i);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let i=IC(this._container);this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let i=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,i))}};function M8(t,i){let{top:e,bottom:n,height:o}=t,r=o*w8;return i>=e-r&&i<=e+r?vl.UP:i>=n-r&&i<=n+r?vl.DOWN:vl.NONE}function k8(t,i){let{left:e,right:n,width:o}=t,r=o*w8;return i>=e-r&&i<=e+r?Ya.LEFT:i>=n-r&&i<=n+r?Ya.RIGHT:Ya.NONE}function Bne(t,i,e,n,o){let r=M8(i,o),a=k8(i,n),c=vl.NONE,m=Ya.NONE;if(r){let p=t.scrollTop;r===vl.UP?p>0&&(c=vl.UP):t.scrollHeight-p>t.clientHeight&&(c=vl.DOWN)}if(a){let p=t.scrollLeft;e==="rtl"?a===Ya.RIGHT?p<0&&(m=Ya.RIGHT):t.scrollWidth+p>t.clientWidth&&(m=Ya.LEFT):a===Ya.LEFT?p>0&&(m=Ya.LEFT):t.scrollWidth-p>t.clientWidth&&(m=Ya.RIGHT)}return[c,m]}var Vne=(()=>{class t{_injector=f(Di);constructor(){}createDrag(e,n){return Rne(this._injector,e,n)}createDropList(e){return Lne(this._injector,e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var T8=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({providers:[Vne],imports:[Md]})}return t})();var zne=[[["caption"]],[["colgroup"],["col"]],"*"],jne=["caption","colgroup, col","*"];function $ne(t,i){t&1&&Yt(0,2)}function Hne(t,i){t&1&&(s(0,"thead",0),Xi(1,1),l(),s(2,"tbody",0),Xi(3,2)(4,3),l(),s(5,"tfoot",0),Xi(6,4),l())}function Une(t,i){t&1&&Xi(0,1)(1,2)(2,3)(3,4)}var rc=new kt("CDK_TABLE");var R1=(()=>{class t{template=f(So);constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","cdkCellDef",""]]})}return t})(),F1=(()=>{class t{template=f(So);constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","cdkHeaderCellDef",""]]})}return t})(),P8=(()=>{class t{template=f(So);constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","cdkFooterCellDef",""]]})}return t})(),qm=(()=>{class t{_table=f(rc,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(n,o,r){if(n&1&&$i(r,R1,5)(r,F1,5)(r,P8,5),n&2){let a;gt(a=_t())&&(o.cell=a.first),gt(a=_t())&&(o.headerCell=a.first),gt(a=_t())&&(o.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",dt],stickyEnd:[2,"stickyEnd","stickyEnd",dt]}})}return t})(),N1=class{constructor(i,e){e.nativeElement.classList.add(...i._columnCssClassName)}},I8=(()=>{class t extends N1{constructor(){super(f(qm),f(Lt))}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[xn]})}return t})();var A8=(()=>{class t extends N1{constructor(){let e=f(qm),n=f(Lt);super(e,n);let o=e._table?._getCellRole();o&&n.nativeElement.setAttribute("role",o)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[xn]})}return t})();var aI=(()=>{class t{template=f(So);_differs=f(Sd);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let n=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(n).create(),this._columnsDiffer.diff(n)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof Sv?e.headerCell.template:this instanceof sI?e.footerCell.template:e.cell.template}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,features:[un]})}return t})(),Sv=(()=>{class t extends aI{_table=f(rc,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(f(So),f(Sd))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",dt]},features:[xn,un]})}return t})(),sI=(()=>{class t extends aI{_table=f(rc,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(f(So),f(Sd))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",dt]},features:[xn,un]})}return t})(),L1=(()=>{class t extends aI{_table=f(rc,{optional:!0});when;constructor(){super(f(So),f(Sd))}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[xn]})}return t})(),Fu=(()=>{class t{_viewContainer=f(co);cells;context;static mostRecentCellOutlet=null;constructor(){t.mostRecentCellOutlet=this}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","cdkCellOutlet",""]]})}return t})(),lI=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,o){n&1&&Xi(0,0)},dependencies:[Fu],encapsulation:2})}return t})();var cI=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,o){n&1&&Xi(0,0)},dependencies:[Fu],encapsulation:2})}return t})(),O8=(()=>{class t{templateRef=f(So);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["ng-template","cdkNoDataRow",""]]})}return t})(),E8=["top","bottom","left","right"],rI=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(i=>this._updateCachedSizes(i)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(i,e,n=!0,o=!0,r,a,c){this._isNativeHtmlTable=i,this._stickCellCss=e,this._isBrowser=n,this._needsPositionStickyOnElement=o,this.direction=r,this._positionListener=a,this._tableInjector=c,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(i,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(i);let n=[];for(let o of i)o.nodeType===o.ELEMENT_NODE&&n.push(o,...Array.from(o.children));ar({write:()=>{for(let o of n)this._removeStickyStyle(o,e)}},{injector:this._tableInjector})}updateStickyColumns(i,e,n,o=!0,r=!0){if(!i.length||!this._isBrowser||!(e.some(S=>S)||n.some(S=>S))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=i[0],c=a.children.length,m=this.direction==="rtl",p=m?"right":"left",h=m?"left":"right",g=e.lastIndexOf(!0),M=n.indexOf(!0),C,_,w;r&&this._updateStickyColumnReplayQueue({rows:[...i],stickyStartStates:[...e],stickyEndStates:[...n]}),ar({earlyRead:()=>{C=this._getCellWidths(a,o),_=this._getStickyStartColumnPositions(C,e),w=this._getStickyEndColumnPositions(C,n)},write:()=>{for(let S of i)for(let y=0;y!!S)&&(this._positionListener.stickyColumnsUpdated({sizes:g===-1?[]:C.slice(0,g+1).map((S,y)=>e[y]?S:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:M===-1?[]:C.slice(M).map((S,y)=>n[y+M]?S:null).reverse()}))}},{injector:this._tableInjector})}stickRows(i,e,n){if(!this._isBrowser)return;let o=n==="bottom"?i.slice().reverse():i,r=n==="bottom"?e.slice().reverse():e,a=[],c=[],m=[];ar({earlyRead:()=>{for(let p=0,h=0;p{let p=r.lastIndexOf(!0);for(let h=0;h{let n=i.querySelector("tfoot");n&&(e.some(o=>!o)?this._removeStickyStyle(n,["bottom"]):this._addStickyStyle(n,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(i,e){if(!i.classList.contains(this._stickCellCss))return;for(let o of e)i.style[o]="",i.classList.remove(this._borderCellCss[o]);E8.some(o=>e.indexOf(o)===-1&&i.style[o])?i.style.zIndex=this._getCalculatedZIndex(i):(i.style.zIndex="",this._needsPositionStickyOnElement&&(i.style.position=""),i.classList.remove(this._stickCellCss))}_addStickyStyle(i,e,n,o){i.classList.add(this._stickCellCss),o&&i.classList.add(this._borderCellCss[e]),i.style[e]=`${n}px`,i.style.zIndex=this._getCalculatedZIndex(i),this._needsPositionStickyOnElement&&(i.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(i){let e={top:100,bottom:10,left:1,right:1},n=0;for(let o of E8)i.style[o]&&(n+=e[o]);return n?`${n}`:""}_getCellWidths(i,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let n=[],o=i.children;for(let r=0;r0;r--)e[r]&&(n[r]=o,o+=i[r]);return n}_retrieveElementSize(i){let e=this._elemSizeCache.get(i);if(e)return e;let n=i.getBoundingClientRect(),o={width:n.width,height:n.height};return this._resizeObserver&&(this._elemSizeCache.set(i,o),this._resizeObserver.observe(i,{box:"border-box"})),o}_updateStickyColumnReplayQueue(i){this._removeFromStickyColumnReplayQueue(i.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(i)}_removeFromStickyColumnReplayQueue(i){let e=new Set(i);for(let n of this._updatedStickyColumnsParamsToReplay)n.rows=n.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(n=>!!n.rows.length)}_updateCachedSizes(i){let e=!1;for(let n of i){let o=n.borderBoxSize?.length?{width:n.borderBoxSize[0].inlineSize,height:n.borderBoxSize[0].blockSize}:{width:n.contentRect.width,height:n.contentRect.height};o.width!==this._elemSizeCache.get(n.target)?.width&&Gne(n.target)&&(e=!0),this._elemSizeCache.set(n.target,o)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let n of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(n.rows,n.stickyStartStates,n.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function Gne(t){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(i=>t.classList.contains(i))}var yv=new kt("STICKY_POSITIONING_LISTENER");var dI=(()=>{class t{viewContainer=f(co);elementRef=f(Lt);constructor(){let e=f(rc);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","rowOutlet",""]]})}return t})(),mI=(()=>{class t{viewContainer=f(co);elementRef=f(Lt);constructor(){let e=f(rc);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","headerRowOutlet",""]]})}return t})(),pI=(()=>{class t{viewContainer=f(co);elementRef=f(Lt);constructor(){let e=f(rc);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","footerRowOutlet",""]]})}return t})(),uI=(()=>{class t{viewContainer=f(co);elementRef=f(Lt);constructor(){let e=f(rc);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","noDataRowOutlet",""]]})}return t})(),hI=(()=>{class t{_differs=f(Sd);_changeDetectorRef=f(K);_elementRef=f(Lt);_dir=f(Hr,{optional:!0});_platform=f(Ta);_viewRepeater;_viewportRuler=f(wd);_injector=f(Di);_virtualScrollViewport=f(iR,{optional:!0,host:!0});_positionListener=f(yv,{optional:!0})||f(yv,{optional:!0,skipSelf:!0});_document=f(Pi);_data;_renderedRange;_onDestroy=new Le;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new Le;_footerRowStickyUpdates=new Le;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new Le;_dataStream=new Le;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new ve;viewChange=new qt({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){f(new ka("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((n,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(rt(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new nR:new sR,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Ih(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let n=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,n,(o,r,a)=>this._getEmbeddedViewArgs(o.item,a),o=>o.item.data,o=>{o.operation===tR.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let r=n.get(o.currentIndex);r.context.$implicit=o.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=D8(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none")}let n=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,n,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=D8(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none")}let n=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...n,...o],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,a)=>{this._addStickyColumnStyles([r],this._headerRowDefs[a])}),this._rowDefs.forEach(r=>{let a=[];for(let c=0;c{this._addStickyColumnStyles([r],this._footerRowDefs[a])}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let n=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||n,this._forceRecalculateCellWidths=n,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],n=Math.min(this._data.length,this._renderedRange.end),o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r{let c=o&&o.has(a)?o.get(a):[];if(c.length){let m=c.shift();return m.dataIndex=n,m}else return{data:e,rowDef:a,dataIndex:n}})}_cacheColumnDefs(){this._columnDefsByName.clear(),O1(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(n=>{this._columnDefsByName.has(n.name),this._columnDefsByName.set(n.name,n)})}_cacheRowDefs(){this._headerRowDefs=O1(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=O1(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=O1(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(n=>!n.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(a,c)=>{let m=!!c.getColumnsDiff();return a||m},n=this._rowDefs.reduce(e,!1);n&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,!1);o&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),n||o||r}_switchDataSource(e){this._data=[],Ih(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;Ih(this.dataSource)?e=this.dataSource.connect(this):cm(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=xt(this.dataSource)),this._renderChangeSubscription=rr([e,this.viewChange]).pipe(rt(this._onDestroy)).subscribe(([n,o])=>{this._data=n||[],this._renderedRange=o,this._dataStream.next(n),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,n)=>this._renderRow(this._headerRowOutlet,e,n)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,n)=>this._renderRow(this._footerRowOutlet,e,n)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,n){let o=Array.from(n?.columns||[]).map(c=>{let m=this._columnDefsByName.get(c);return m}),r=o.map(c=>c.sticky),a=o.map(c=>c.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let n=[];for(let o=0;o!r.when||r.when(n,e));else{let r=this._rowDefs.find(a=>a.when&&a.when(n,e))||this._defaultRowDef;r&&o.push(r)}return o.length,o}_getEmbeddedViewArgs(e,n){let o=e.rowDef,r={$implicit:e.data};return{templateRef:o.template,context:r,index:n}}_renderRow(e,n,o,r={}){let a=e.viewContainer.createEmbeddedView(n.template,r,o);return this._renderCellTemplateForItem(n,r),a}_renderCellTemplateForItem(e,n){for(let o of this._getCellTemplates(e))Fu.mostRecentCellOutlet&&Fu.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,n);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let n=0,o=e.length;n{let o=this._columnDefsByName.get(n);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(n,o)=>n||o.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",n=this._injector;this._stickyStyler=new rI(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,n),(this._dir?this._dir.change:xt()).pipe(rt(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let n=typeof requestAnimationFrame<"u"?yh:p5;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(vC(0,n),rt(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(o,r)=>this._measureRangeSize(o,r)}),rr([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(rt(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a!n._table||n._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let n=this._rowOutlet.viewContainer.length===0;if(n===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(n){let r=o.createEmbeddedView(e.templateRef),a=r.rootNodes[0];if(r.rootNodes.length===1&&a?.nodeType===this._document.ELEMENT_NODE){a.setAttribute("role","row"),a.classList.add(...e._contentClassNames);let c=a.querySelectorAll(e._cellSelector);for(let m=0;m=e.end||n!=="vertical")return 0;let o=this.viewChange.value,r=this._rowOutlet.viewContainer;e.starto.end;let a=e.start-o.start,c=e.end-e.start,m,p;for(let M=0;M-1;M--){let C=r.get(M+a);if(C&&C.rootNodes.length){p=C.rootNodes[C.rootNodes.length-1];break}}let h=m?.getBoundingClientRect?.(),g=p?.getBoundingClientRect?.();return h&&g?g.bottom-h.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(n,o,r){if(n&1&&$i(r,O8,5)(r,qm,5)(r,L1,5)(r,Sv,5)(r,sI,5),n&2){let a;gt(a=_t())&&(o._noDataRow=a.first),gt(a=_t())&&(o._contentColumnDefs=a),gt(a=_t())&&(o._contentRowDefs=a),gt(a=_t())&&(o._contentHeaderRowDefs=a),gt(a=_t())&&(o._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(n,o){n&2&&je("cdk-table-fixed-layout",o.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",dt],fixedLayout:[2,"fixedLayout","fixedLayout",dt],recycleRows:[2,"recycleRows","recycleRows",dt]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[hn([{provide:rc,useExisting:t},{provide:yv,useValue:null}])],ngContentSelectors:jne,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,o){n&1&&(En(zne),Yt(0),Yt(1,1),A(2,$ne,1,0),A(3,Hne,7,0)(4,Une,4,0)),n&2&&(u(2),O(o._isServer?2:-1),u(),O(o._isNativeHtmlTable?3:4))},dependencies:[mI,dI,uI,pI],styles:[`.cdk-table-fixed-layout{table-layout:fixed} `],encapsulation:2})}return t})();function O1(t,i){return t.concat(Array.from(i))}function D8(t,i){let e=i.toUpperCase(),n=t.viewContainer.element.nativeElement;for(;n;){let o=n.nodeType===1?n.nodeName:null;if(o===e)return n;if(o==="TABLE")break;n=n.parentNode}return null}var B1=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[oR]})}return t})();var N8=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[Md,wn,Md]})}return t})();var Hn=(function(t){return t[t.State=0]="State",t[t.Transition=1]="Transition",t[t.Sequence=2]="Sequence",t[t.Group=3]="Group",t[t.Animate=4]="Animate",t[t.Keyframes=5]="Keyframes",t[t.Style=6]="Style",t[t.Trigger=7]="Trigger",t[t.Reference=8]="Reference",t[t.AnimateChild=9]="AnimateChild",t[t.AnimateRef=10]="AnimateRef",t[t.Query=11]="Query",t[t.Stagger=12]="Stagger",t})(Hn||{}),bl="*";function fI(t,i){return{type:Hn.Trigger,name:t,definitions:i,options:{}}}function gI(t,i=null){return{type:Hn.Animate,styles:i,timings:t}}function R8(t,i=null){return{type:Hn.Sequence,steps:t,options:i}}function Bu(t){return{type:Hn.Style,styles:t,offset:null}}function V1(t,i,e){return{type:Hn.State,name:t,styles:i,options:e}}function _I(t,i,e=null){return{type:Hn.Transition,expr:t,animation:i,options:e}}var Hc=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(i=0,e=0){this.totalTime=i+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},Lu=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(i){this.players=i;let e=0,n=0,o=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++e==r&&this._onFinish()}),a.onDestroy(()=>{++n==r&&this._onDestroy()}),a.onStart(()=>{++o==r&&this._onStart()})}),this.totalTime=this.players.reduce((a,c)=>Math.max(a,c.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){let e=i*this.totalTime;this.players.forEach(n=>{let o=n.totalTime?Math.min(1,e/n.totalTime):1;n.setPosition(o)})}getPosition(){let i=this.players.reduce((e,n)=>e===null||n.totalTime>e.totalTime?n:e,null);return i!=null?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},Pf="!";function F8(t){return new vn(3e3,!1)}function Wne(){return new vn(3100,!1)}function qne(){return new vn(3101,!1)}function Xne(t){return new vn(3001,!1)}function Qne(t){return new vn(3003,!1)}function Yne(t){return new vn(3004,!1)}function B8(t,i){return new vn(3005,!1)}function V8(){return new vn(3006,!1)}function z8(){return new vn(3007,!1)}function j8(t,i){return new vn(3008,!1)}function $8(t){return new vn(3002,!1)}function H8(t,i,e,n,o){return new vn(3010,!1)}function U8(){return new vn(3011,!1)}function G8(){return new vn(3012,!1)}function W8(){return new vn(3200,!1)}function q8(){return new vn(3202,!1)}function X8(){return new vn(3013,!1)}function Q8(t){return new vn(3014,!1)}function Y8(t){return new vn(3015,!1)}function K8(t){return new vn(3016,!1)}function Z8(t,i){return new vn(3404,!1)}function Kne(t){return new vn(3502,!1)}function J8(t){return new vn(3503,!1)}function eB(){return new vn(3300,!1)}function tB(t){return new vn(3504,!1)}function nB(t){return new vn(3301,!1)}function iB(t,i){return new vn(3302,!1)}function oB(t){return new vn(3303,!1)}function rB(t,i){return new vn(3400,!1)}function aB(t){return new vn(3401,!1)}function sB(t){return new vn(3402,!1)}function lB(t,i){return new vn(3505,!1)}function Fd(t){switch(t.length){case 0:return new Hc;case 1:return t[0];default:return new Lu(t)}}function xI(t,i,e=new Map,n=new Map){let o=[],r=[],a=-1,c=null;if(i.forEach(m=>{let p=m.get("offset"),h=p==a,g=h&&c||new Map;m.forEach((M,C)=>{let _=C,w=M;if(C!=="offset")switch(_=t.normalizePropertyName(_,o),w){case Pf:w=e.get(C);break;case bl:w=n.get(C);break;default:w=t.normalizeStyleValue(C,_,w,o);break}g.set(_,w)}),h||r.push(g),c=g,a=p}),o.length)throw Kne(o);return r}function z1(t,i,e,n){switch(i){case"start":t.onStart(()=>n(e&&vI(e,"start",t)));break;case"done":t.onDone(()=>n(e&&vI(e,"done",t)));break;case"destroy":t.onDestroy(()=>n(e&&vI(e,"destroy",t)));break}}function vI(t,i,e){let n=e.totalTime,o=!!e.disabled,r=j1(t.element,t.triggerName,t.fromState,t.toState,i||t.phaseName,n??t.totalTime,o),a=t._data;return a!=null&&(r._data=a),r}function j1(t,i,e,n,o="",r=0,a){return{element:t,triggerName:i,fromState:e,toState:n,phaseName:o,totalTime:r,disabled:!!a}}function bs(t,i,e){let n=t.get(i);return n||t.set(i,n=e),n}function yI(t){let i=t.indexOf(":"),e=t.substring(1,i),n=t.slice(i+1);return[e,n]}var Zne=typeof document>"u"?null:document.documentElement;function $1(t){let i=t.parentNode||t.host||null;return i===Zne?null:i}function Jne(t){return t.substring(1,6)=="ebkit"}var Vu=null,L8=!1;function cB(t){Vu||(Vu=eie()||{},L8=Vu.style?"WebkitAppearance"in Vu.style:!1);let i=!0;return Vu.style&&!Jne(t)&&(i=t in Vu.style,!i&&L8&&(i="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in Vu.style)),i}function eie(){return typeof document<"u"?document.body:null}function SI(t,i){for(;i;){if(i===t)return!0;i=$1(i)}return!1}function wI(t,i,e){if(e)return Array.from(t.querySelectorAll(i));let n=t.querySelector(i);return n?[n]:[]}var tie=1e3,MI="{{",nie="}}",kI="ng-enter",H1="ng-leave",wv="ng-trigger",Mv=".ng-trigger",TI="ng-animating",U1=".ng-animating";function Uc(t){if(typeof t=="number")return t;let i=t.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:bI(parseFloat(i[1]),i[2])}function bI(t,i){return i==="s"?t*tie:t}function kv(t,i,e){return t.hasOwnProperty("duration")?t:oie(t,i,e)}var iie=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function oie(t,i,e){let n,o=0,r="";if(typeof t=="string"){let a=t.match(iie);if(a===null)return i.push(F8(t)),{duration:0,delay:0,easing:""};n=bI(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(o=bI(parseFloat(c),a[4]));let m=a[5];m&&(r=m)}else n=t;if(!e){let a=!1,c=i.length;n<0&&(i.push(Wne()),a=!0),o<0&&(i.push(qne()),a=!0),a&&i.splice(c,0,F8(t))}return{duration:n,delay:o,easing:r}}function dB(t){return t.length?t[0]instanceof Map?t:t.map(i=>new Map(Object.entries(i))):[]}function ac(t,i,e){i.forEach((n,o)=>{let r=G1(o);e&&!e.has(o)&&e.set(o,t.style[r]),t.style[r]=n})}function Xm(t,i){i.forEach((e,n)=>{let o=G1(n);t.style[o]=""})}function If(t){return Array.isArray(t)?t.length==1?t[0]:R8(t):t}function mB(t,i,e){let n=i.params||{},o=EI(t);o.length&&o.forEach(r=>{n.hasOwnProperty(r)||e.push(Xne(r))})}var CI=new RegExp(`${MI}\\s*(.+?)\\s*${nie}`,"g");function EI(t){let i=[];if(typeof t=="string"){let e;for(;e=CI.exec(t);)i.push(e[1]);CI.lastIndex=0}return i}function Af(t,i,e){let n=`${t}`,o=n.replace(CI,(r,a)=>{let c=i[a];return c==null&&(e.push(Qne(a)),c=""),c.toString()});return o==n?t:o}var rie=/-+([a-z0-9])/g;function G1(t){return t.replace(rie,(...i)=>i[1].toUpperCase())}function pB(t,i){return t===0||i===0}function uB(t,i,e){if(e.size&&i.length){let n=i[0],o=[];if(e.forEach((r,a)=>{n.has(a)||o.push(a),n.set(a,r)}),o.length)for(let r=1;ra.set(c,W1(t,c)))}}return i}function Cs(t,i,e){switch(i.type){case Hn.Trigger:return t.visitTrigger(i,e);case Hn.State:return t.visitState(i,e);case Hn.Transition:return t.visitTransition(i,e);case Hn.Sequence:return t.visitSequence(i,e);case Hn.Group:return t.visitGroup(i,e);case Hn.Animate:return t.visitAnimate(i,e);case Hn.Keyframes:return t.visitKeyframes(i,e);case Hn.Style:return t.visitStyle(i,e);case Hn.Reference:return t.visitReference(i,e);case Hn.AnimateChild:return t.visitAnimateChild(i,e);case Hn.AnimateRef:return t.visitAnimateRef(i,e);case Hn.Query:return t.visitQuery(i,e);case Hn.Stagger:return t.visitStagger(i,e);default:throw Yne(i.type)}}function W1(t,i){return window.getComputedStyle(t)[i]}var GI=(()=>{class t{validateStyleProperty(e){return cB(e)}containsElement(e,n){return SI(e,n)}getParentElement(e){return $1(e)}query(e,n,o){return wI(e,n,o)}computeStyle(e,n,o){return o||""}animate(e,n,o,r,a,c=[],m){return new Hc(o,r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})(),ju=class{static NOOP=new GI},$u=class{};var aie=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),K1=class extends $u{normalizePropertyName(i,e){return G1(i)}normalizeStyleValue(i,e,n,o){let r="",a=n.toString().trim();if(aie.has(e)&&n!==0&&n!=="0")if(typeof n=="number")r="px";else{let c=n.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&c[1].length==0&&o.push(B8(i,n))}return a+r}};var Z1="*";function sie(t,i){let e=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(n=>lie(n,e,i)):e.push(t),e}function lie(t,i,e){if(t[0]==":"){let m=cie(t,e);if(typeof m=="function"){i.push(m);return}t=m}let n=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return e.push(Y8(t)),i;let o=n[1],r=n[2],a=n[3];i.push(hB(o,a));let c=o==Z1&&a==Z1;r[0]=="<"&&!c&&i.push(hB(a,o))}function cie(t,i){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,n)=>parseFloat(n)>parseFloat(e);case":decrement":return(e,n)=>parseFloat(n) *"}}var q1=new Set(["true","1"]),X1=new Set(["false","0"]);function hB(t,i){let e=q1.has(t)||X1.has(t),n=q1.has(i)||X1.has(i);return(o,r)=>{let a=t==Z1||t==o,c=i==Z1||i==r;return!a&&e&&typeof o=="boolean"&&(a=o?q1.has(t):X1.has(t)),!c&&n&&typeof r=="boolean"&&(c=r?q1.has(i):X1.has(i)),a&&c}}var wB=":self",die=new RegExp(`s*${wB}s*,?`,"g");function MB(t,i,e,n){return new NI(t).build(i,e,n)}var fB="",NI=class{_driver;constructor(i){this._driver=i}build(i,e,n){let o=new RI(e);return this._resetContextStyleTimingState(o),Cs(this,If(i),o)}_resetContextStyleTimingState(i){i.currentQuerySelector=fB,i.collectedStyles=new Map,i.collectedStyles.set(fB,new Map),i.currentTime=0}visitTrigger(i,e){let n=e.queryCount=0,o=e.depCount=0,r=[],a=[];return i.name.charAt(0)=="@"&&e.errors.push(V8()),i.definitions.forEach(c=>{if(this._resetContextStyleTimingState(e),c.type==Hn.State){let m=c,p=m.name;p.toString().split(/\s*,\s*/).forEach(h=>{m.name=h,r.push(this.visitState(m,e))}),m.name=p}else if(c.type==Hn.Transition){let m=this.visitTransition(c,e);n+=m.queryCount,o+=m.depCount,a.push(m)}else e.errors.push(z8())}),{type:Hn.Trigger,name:i.name,states:r,transitions:a,queryCount:n,depCount:o,options:null}}visitState(i,e){let n=this.visitStyle(i.styles,e),o=i.options&&i.options.params||null;if(n.containsDynamicStyles){let r=new Set,a=o||{};n.styles.forEach(c=>{c instanceof Map&&c.forEach(m=>{EI(m).forEach(p=>{a.hasOwnProperty(p)||r.add(p)})})}),r.size&&e.errors.push(j8(i.name,[...r.values()]))}return{type:Hn.State,name:i.name,style:n,options:o?{params:o}:null}}visitTransition(i,e){e.queryCount=0,e.depCount=0;let n=Cs(this,If(i.animation),e),o=sie(i.expr,e.errors);return{type:Hn.Transition,matchers:o,animation:n,queryCount:e.queryCount,depCount:e.depCount,options:zu(i.options)}}visitSequence(i,e){return{type:Hn.Sequence,steps:i.steps.map(n=>Cs(this,n,e)),options:zu(i.options)}}visitGroup(i,e){let n=e.currentTime,o=0,r=i.steps.map(a=>{e.currentTime=n;let c=Cs(this,a,e);return o=Math.max(o,e.currentTime),c});return e.currentTime=o,{type:Hn.Group,steps:r,options:zu(i.options)}}visitAnimate(i,e){let n=hie(i.timings,e.errors);e.currentAnimateTimings=n;let o,r=i.styles?i.styles:Bu({});if(r.type==Hn.Keyframes)o=this.visitKeyframes(r,e);else{let a=i.styles,c=!1;if(!a){c=!0;let p={};n.easing&&(p.easing=n.easing),a=Bu(p)}e.currentTime+=n.duration+n.delay;let m=this.visitStyle(a,e);m.isEmptyStep=c,o=m}return e.currentAnimateTimings=null,{type:Hn.Animate,timings:n,style:o,options:null}}visitStyle(i,e){let n=this._makeStyleAst(i,e);return this._validateStyleAst(n,e),n}_makeStyleAst(i,e){let n=[],o=Array.isArray(i.styles)?i.styles:[i.styles];for(let c of o)typeof c=="string"?c===bl?n.push(c):e.errors.push($8(c)):n.push(new Map(Object.entries(c)));let r=!1,a=null;return n.forEach(c=>{if(c instanceof Map&&(c.has("easing")&&(a=c.get("easing"),c.delete("easing")),!r)){for(let m of c.values())if(m.toString().indexOf(MI)>=0){r=!0;break}}}),{type:Hn.Style,styles:n,easing:a,offset:i.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(i,e){let n=e.currentAnimateTimings,o=e.currentTime,r=e.currentTime;n&&r>0&&(r-=n.duration+n.delay),i.styles.forEach(a=>{typeof a!="string"&&a.forEach((c,m)=>{let p=e.collectedStyles.get(e.currentQuerySelector),h=p.get(m),g=!0;h&&(r!=o&&r>=h.startTime&&o<=h.endTime&&(e.errors.push(H8(m,h.startTime,h.endTime,r,o)),g=!1),r=h.startTime),g&&p.set(m,{startTime:r,endTime:o}),e.options&&mB(c,e.options,e.errors)})})}visitKeyframes(i,e){let n={type:Hn.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(U8()),n;let o=1,r=0,a=[],c=!1,m=!1,p=0,h=i.steps.map(y=>{let k=this._makeStyleAst(y,e),I=k.offset!=null?k.offset:uie(k.styles),E=0;return I!=null&&(r++,E=k.offset=I),m=m||E<0||E>1,c=c||E0&&r{let I=M>0?k==C?1:M*k:a[k],E=I*S;e.currentTime=_+w.delay+E,w.duration=E,this._validateStyleAst(y,e),y.offset=I,n.styles.push(y)}),n}visitReference(i,e){return{type:Hn.Reference,animation:Cs(this,If(i.animation),e),options:zu(i.options)}}visitAnimateChild(i,e){return e.depCount++,{type:Hn.AnimateChild,options:zu(i.options)}}visitAnimateRef(i,e){return{type:Hn.AnimateRef,animation:this.visitReference(i.animation,e),options:zu(i.options)}}visitQuery(i,e){let n=e.currentQuerySelector,o=i.options||{};e.queryCount++,e.currentQuery=i;let[r,a]=mie(i.selector);e.currentQuerySelector=n.length?n+" "+r:r,bs(e.collectedStyles,e.currentQuerySelector,new Map);let c=Cs(this,If(i.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:Hn.Query,selector:r,limit:o.limit||0,optional:!!o.optional,includeSelf:a,animation:c,originalSelector:i.selector,options:zu(i.options)}}visitStagger(i,e){e.currentQuery||e.errors.push(X8());let n=i.timings==="full"?{duration:0,delay:0,easing:"full"}:kv(i.timings,e.errors,!0);return{type:Hn.Stagger,animation:Cs(this,If(i.animation),e),timings:n,options:null}}};function mie(t){let i=!!t.split(/\s*,\s*/).find(e=>e==wB);return i&&(t=t.replace(die,"")),t=t.replace(/@\*/g,Mv).replace(/@\w+/g,e=>Mv+"-"+e.slice(1)).replace(/:animating/g,U1),[t,i]}function pie(t){return t?H({},t):null}var RI=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(i){this.errors=i}};function uie(t){if(typeof t=="string")return null;let i=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){let n=e;i=parseFloat(n.get("offset")),n.delete("offset")}});else if(t instanceof Map&&t.has("offset")){let e=t;i=parseFloat(e.get("offset")),e.delete("offset")}return i}function hie(t,i){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let r=kv(t,i).duration;return DI(r,0,"")}let e=t;if(e.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=DI(0,0,"");return r.dynamic=!0,r.strValue=e,r}let o=kv(e,i);return DI(o.duration,o.delay,o.easing)}function zu(t){return t?(t=H({},t),t.params&&(t.params=pie(t.params))):t={},t}function DI(t,i,e){return{duration:t,delay:i,easing:e}}function WI(t,i,e,n,o,r,a=null,c=!1){return{type:1,element:t,keyframes:i,preStyleProps:e,postStyleProps:n,duration:o,delay:r,totalTime:o+r,easing:a,subTimeline:c}}var Ev=class{_map=new Map;get(i){return this._map.get(i)||[]}append(i,e){let n=this._map.get(i);n||this._map.set(i,n=[]),n.push(...e)}has(i){return this._map.has(i)}clear(){this._map.clear()}},fie=1,gie=":enter",_ie=new RegExp(gie,"g"),vie=":leave",bie=new RegExp(vie,"g");function kB(t,i,e,n,o,r=new Map,a=new Map,c,m,p=[]){return new FI().buildKeyframes(t,i,e,n,o,r,a,c,m,p)}var FI=class{buildKeyframes(i,e,n,o,r,a,c,m,p,h=[]){p=p||new Ev;let g=new LI(i,e,p,o,r,h,[]);g.options=m;let M=m.delay?Uc(m.delay):0;g.currentTimeline.delayNextStep(M),g.currentTimeline.setStyles([a],null,g.errors,m),Cs(this,n,g);let C=g.timelines.filter(_=>_.containsAnimation());if(C.length&&c.size){let _;for(let w=C.length-1;w>=0;w--){let S=C[w];if(S.element===e){_=S;break}}_&&!_.allowOnlyTimelineStyles()&&_.setStyles([c],null,g.errors,m)}return C.length?C.map(_=>_.buildKeyframes()):[WI(e,[],[],[],0,M,"",!1)]}visitTrigger(i,e){}visitState(i,e){}visitTransition(i,e){}visitAnimateChild(i,e){let n=e.subInstructions.get(e.element);if(n){let o=e.createSubContext(i.options),r=e.currentTimeline.currentTime,a=this._visitSubInstructions(n,o,o.options);r!=a&&e.transformIntoNewTimeline(a)}e.previousNode=i}visitAnimateRef(i,e){let n=e.createSubContext(i.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],e,n),this.visitReference(i.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=i}_applyAnimationRefDelays(i,e,n){for(let o of i){let r=o?.delay;if(r){let a=typeof r=="number"?r:Uc(Af(r,o?.params??{},e.errors));n.delayNextStep(a)}}}_visitSubInstructions(i,e,n){let r=e.currentTimeline.currentTime,a=n.duration!=null?Uc(n.duration):null,c=n.delay!=null?Uc(n.delay):null;return a!==0&&i.forEach(m=>{let p=e.appendInstructionToTimeline(m,a,c);r=Math.max(r,p.duration+p.delay)}),r}visitReference(i,e){e.updateOptions(i.options,!0),Cs(this,i.animation,e),e.previousNode=i}visitSequence(i,e){let n=e.subContextCount,o=e,r=i.options;if(r&&(r.params||r.delay)&&(o=e.createSubContext(r),o.transformIntoNewTimeline(),r.delay!=null)){o.previousNode.type==Hn.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=J1);let a=Uc(r.delay);o.delayNextStep(a)}i.steps.length&&(i.steps.forEach(a=>Cs(this,a,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>n&&o.transformIntoNewTimeline()),e.previousNode=i}visitGroup(i,e){let n=[],o=e.currentTimeline.currentTime,r=i.options&&i.options.delay?Uc(i.options.delay):0;i.steps.forEach(a=>{let c=e.createSubContext(i.options);r&&c.delayNextStep(r),Cs(this,a,c),o=Math.max(o,c.currentTimeline.currentTime),n.push(c.currentTimeline)}),n.forEach(a=>e.currentTimeline.mergeTimelineCollectedStyles(a)),e.transformIntoNewTimeline(o),e.previousNode=i}_visitTiming(i,e){if(i.dynamic){let n=i.strValue,o=e.params?Af(n,e.params,e.errors):n;return kv(o,e.errors)}else return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,e){let n=e.currentAnimateTimings=this._visitTiming(i.timings,e),o=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),o.snapshotCurrentStyles());let r=i.style;r.type==Hn.Keyframes?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),o.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=i}visitStyle(i,e){let n=e.currentTimeline,o=e.currentAnimateTimings;!o&&n.hasCurrentStyleProperties()&&n.forwardFrame();let r=o&&o.easing||i.easing;i.isEmptyStep?n.applyEmptyStep(r):n.setStyles(i.styles,r,e.errors,e.options),e.previousNode=i}visitKeyframes(i,e){let n=e.currentAnimateTimings,o=e.currentTimeline.duration,r=n.duration,c=e.createSubContext().currentTimeline;c.easing=n.easing,i.styles.forEach(m=>{let p=m.offset||0;c.forwardTime(p*r),c.setStyles(m.styles,m.easing,e.errors,e.options),c.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(c),e.transformIntoNewTimeline(o+r),e.previousNode=i}visitQuery(i,e){let n=e.currentTimeline.currentTime,o=i.options||{},r=o.delay?Uc(o.delay):0;r&&(e.previousNode.type===Hn.Style||n==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=J1);let a=n,c=e.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!o.optional,e.errors);e.currentQueryTotal=c.length;let m=null;c.forEach((p,h)=>{e.currentQueryIndex=h;let g=e.createSubContext(i.options,p);r&&g.delayNextStep(r),p===e.element&&(m=g.currentTimeline),Cs(this,i.animation,g),g.currentTimeline.applyStylesToKeyframe();let M=g.currentTimeline.currentTime;a=Math.max(a,M)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),m&&(e.currentTimeline.mergeTimelineCollectedStyles(m),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=i}visitStagger(i,e){let n=e.parentContext,o=e.currentTimeline,r=i.timings,a=Math.abs(r.duration),c=a*(e.currentQueryTotal-1),m=a*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":m=c-m;break;case"full":m=n.currentStaggerTime;break}let h=e.currentTimeline;m&&h.delayNextStep(m);let g=h.currentTime;Cs(this,i.animation,e),e.previousNode=i,n.currentStaggerTime=o.currentTime-g+(o.startTime-n.currentTimeline.startTime)}},J1={},LI=class t{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=J1;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(i,e,n,o,r,a,c,m){this._driver=i,this.element=e,this.subInstructions=n,this._enterClassName=o,this._leaveClassName=r,this.errors=a,this.timelines=c,this.currentTimeline=m||new ey(this._driver,e,0),c.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,e){if(!i)return;let n=i,o=this.options;n.duration!=null&&(o.duration=Uc(n.duration)),n.delay!=null&&(o.delay=Uc(n.delay));let r=n.params;if(r){let a=o.params;a||(a=this.options.params={}),Object.keys(r).forEach(c=>{(!e||!a.hasOwnProperty(c))&&(a[c]=Af(r[c],a,this.errors))})}}_copyOptions(){let i={};if(this.options){let e=this.options.params;if(e){let n=i.params={};Object.keys(e).forEach(o=>{n[o]=e[o]})}}return i}createSubContext(i=null,e,n){let o=e||this.element,r=new t(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(i),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(i){return this.previousNode=J1,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,e,n){let o={duration:e??i.duration,delay:this.currentTimeline.currentTime+(n??0)+i.delay,easing:""},r=new BI(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,o,i.stretchStartingKeyframe);return this.timelines.push(r),o}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,e,n,o,r,a){let c=[];if(o&&c.push(this.element),i.length>0){i=i.replace(_ie,"."+this._enterClassName),i=i.replace(bie,"."+this._leaveClassName);let m=n!=1,p=this._driver.query(this.element,i,m);n!==0&&(p=n<0?p.slice(p.length+n,p.length):p.slice(0,n)),c.push(...p)}return!r&&c.length==0&&a.push(Q8(e)),c}},ey=class t{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(i,e,n,o){this._driver=i,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(i){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+i),e&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,e){return this.applyStylesToKeyframe(),new t(this._driver,i,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=fie,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,e){this._localTimelineStyles.set(i,e),this._globalTimelineStyles.set(i,e),this._styleSummary.set(i,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[e,n]of this._globalTimelineStyles)this._backFill.set(e,n||bl),this._currentKeyframe.set(e,bl);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,e,n,o){e&&this._previousKeyframe.set("easing",e);let r=o&&o.params||{},a=Cie(i,this._globalTimelineStyles);for(let[c,m]of a){let p=Af(m,r,n);this._pendingStyles.set(c,p),this._localTimelineStyles.has(c)||this._backFill.set(c,this._globalTimelineStyles.get(c)??bl),this._updateStyle(c,p)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((i,e)=>{this._currentKeyframe.set(e,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,i)}))}snapshotCurrentStyles(){for(let[i,e]of this._localTimelineStyles)this._pendingStyles.set(i,e),this._updateStyle(i,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let i=[];for(let e in this._currentKeyframe)i.push(e);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((e,n)=>{let o=this._styleSummary.get(n);(!o||e.time>o.time)&&this._updateStyle(n,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let i=new Set,e=new Set,n=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((c,m)=>{let p=new Map([...this._backFill,...c]);p.forEach((h,g)=>{h===Pf?i.add(g):h===bl&&e.add(g)}),n||p.set("offset",m/this.duration),o.push(p)});let r=[...i.values()],a=[...e.values()];if(n){let c=o[0],m=new Map(c);c.set("offset",0),m.set("offset",1),o=[c,m]}return WI(this.element,o,r,a,this.duration,this.startTime,this.easing,!1)}},BI=class extends ey{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(i,e,n,o,r,a,c=!1){super(i,e,a.delay),this.keyframes=n,this.preStyleProps=o,this.postStyleProps=r,this._stretchStartingKeyframe=c,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:e,duration:n,easing:o}=this.timings;if(this._stretchStartingKeyframe&&e){let r=[],a=n+e,c=e/a,m=new Map(i[0]);m.set("offset",0),r.push(m);let p=new Map(i[0]);p.set("offset",gB(c)),r.push(p);let h=i.length-1;for(let g=1;g<=h;g++){let M=new Map(i[g]),C=M.get("offset"),_=e+C*n;M.set("offset",gB(_/a)),r.push(M)}n=a,e=0,o="",i=r}return WI(this.element,i,this.preStyleProps,this.postStyleProps,n,e,o,!0)}};function gB(t,i=3){let e=Math.pow(10,i-1);return Math.round(t*e)/e}function Cie(t,i){let e=new Map,n;return t.forEach(o=>{if(o==="*"){n??=i.keys();for(let r of n)e.set(r,bl)}else for(let[r,a]of o)e.set(r,a)}),e}function _B(t,i,e,n,o,r,a,c,m,p,h,g,M){return{type:0,element:t,triggerName:i,isRemovalTransition:o,fromState:e,fromStyles:r,toState:n,toStyles:a,timelines:c,queriedElements:m,preStyleProps:p,postStyleProps:h,totalTime:g,errors:M}}var PI={},ty=class{_triggerName;ast;_stateStyles;constructor(i,e,n){this._triggerName=i,this.ast=e,this._stateStyles=n}match(i,e,n,o){return xie(this.ast.matchers,i,e,n,o)}buildStyles(i,e,n){let o=this._stateStyles.get("*");return i!==void 0&&(o=this._stateStyles.get(i?.toString())||o),o?o.buildStyles(e,n):new Map}build(i,e,n,o,r,a,c,m,p,h){let g=[],M=this.ast.options&&this.ast.options.params||PI,C=c&&c.params||PI,_=this.buildStyles(n,C,g),w=m&&m.params||PI,S=this.buildStyles(o,w,g),y=new Set,k=new Map,I=new Map,E=o==="void",N={params:TB(w,M),delay:this.ast.options?.delay},T=h?[]:kB(i,e,this.ast.animation,r,a,_,S,N,p,g),R=0;return T.forEach(W=>{R=Math.max(W.duration+W.delay,R)}),g.length?_B(e,this._triggerName,n,o,E,_,S,[],[],k,I,R,g):(T.forEach(W=>{let pe=W.element,_e=bs(k,pe,new Set);W.preStyleProps.forEach(ue=>_e.add(ue));let G=bs(I,pe,new Set);W.postStyleProps.forEach(ue=>G.add(ue)),pe!==e&&y.add(pe)}),_B(e,this._triggerName,n,o,E,_,S,T,[...y.values()],k,I,R))}};function xie(t,i,e,n,o){return t.some(r=>r(i,e,n,o))}function TB(t,i){let e=H({},i);return Object.entries(t).forEach(([n,o])=>{o!=null&&(e[n]=o)}),e}var VI=class{styles;defaultParams;normalizer;constructor(i,e,n){this.styles=i,this.defaultParams=e,this.normalizer=n}buildStyles(i,e){let n=new Map,o=TB(i,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,c)=>{a&&(a=Af(a,o,e));let m=this.normalizer.normalizePropertyName(c,e);a=this.normalizer.normalizeStyleValue(c,m,a,e),n.set(c,a)})}),n}};function yie(t,i,e){return new zI(t,i,e)}var zI=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(i,e,n){this.name=i,this.ast=e,this._normalizer=n,e.states.forEach(o=>{let r=o.options&&o.options.params||{};this.states.set(o.name,new VI(o.style,r,n))}),vB(this.states,"true","1"),vB(this.states,"false","0"),e.transitions.forEach(o=>{this.transitionFactories.push(new ty(i,o,this.states))}),this.fallbackTransition=Sie(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,e,n,o){return this.transitionFactories.find(a=>a.match(i,e,n,o))||null}matchStyles(i,e,n){return this.fallbackTransition.buildStyles(i,e,n)}};function Sie(t,i,e){let n=[(a,c)=>!0],o={type:Hn.Sequence,steps:[],options:null},r={type:Hn.Transition,animation:o,matchers:n,options:null,queryCount:0,depCount:0};return new ty(t,r,i)}function vB(t,i,e){t.has(i)?t.has(e)||t.set(e,t.get(i)):t.has(e)&&t.set(i,t.get(e))}var wie=new Ev,jI=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(i,e,n){this.bodyNode=i,this._driver=e,this._normalizer=n}register(i,e){let n=[],o=[],r=MB(this._driver,e,n,o);if(n.length)throw J8(n);this._animations.set(i,r)}_buildPlayer(i,e,n){let o=i.element,r=xI(this._normalizer,i.keyframes,e,n);return this._driver.animate(o,r,i.duration,i.delay,i.easing,[],!0)}create(i,e,n={}){let o=[],r=this._animations.get(i),a,c=new Map;if(r?(a=kB(this._driver,e,r,kI,H1,new Map,new Map,n,wie,o),a.forEach(h=>{let g=bs(c,h.element,new Map);h.postStyleProps.forEach(M=>g.set(M,null))})):(o.push(eB()),a=[]),o.length)throw tB(o);c.forEach((h,g)=>{h.forEach((M,C)=>{h.set(C,this._driver.computeStyle(g,C,bl))})});let m=a.map(h=>{let g=c.get(h.element);return this._buildPlayer(h,new Map,g)}),p=Fd(m);return this._playersById.set(i,p),p.onDestroy(()=>this.destroy(i)),this.players.push(p),p}destroy(i){let e=this._getPlayer(i);e.destroy(),this._playersById.delete(i);let n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(i){let e=this._playersById.get(i);if(!e)throw nB(i);return e}listen(i,e,n,o){let r=j1(e,"","","");return z1(this._getPlayer(i),n,r,o),()=>{}}command(i,e,n,o){if(n=="register"){this.register(i,o[0]);return}if(n=="create"){let a=o[0]||{};this.create(i,e,a);return}let r=this._getPlayer(i);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(i);break}}},bB="ng-animate-queued",Mie=".ng-animate-queued",II="ng-animate-disabled",kie=".ng-animate-disabled",Tie="ng-star-inserted",Eie=".ng-star-inserted",Die=[],EB={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Pie={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},sc="__ng_removed",Dv=class{namespaceId;value;options;get params(){return this.options.params}constructor(i,e=""){this.namespaceId=e;let n=i&&i.hasOwnProperty("value"),o=n?i.value:i;if(this.value=Aie(o),n){let r=i,{value:a}=r,c=d5(r,["value"]);this.options=c}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){let e=i.params;if(e){let n=this.options.params;Object.keys(e).forEach(o=>{n[o]==null&&(n[o]=e[o])})}}},Tv="void",AI=new Dv(Tv),$I=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(i,e,n){this.id=i,this.hostElement=e,this._engine=n,this._hostClassName="ng-tns-"+i,Cl(e,this._hostClassName)}listen(i,e,n,o){if(!this._triggers.has(e))throw iB(n,e);if(n==null||n.length==0)throw oB(e);if(!Oie(n))throw rB(n,e);let r=bs(this._elementListeners,i,[]),a={name:e,phase:n,callback:o};r.push(a);let c=bs(this._engine.statesByElement,i,new Map);return c.has(e)||(Cl(i,wv),Cl(i,wv+"-"+e),c.set(e,AI)),()=>{this._engine.afterFlush(()=>{let m=r.indexOf(a);m>=0&&r.splice(m,1),this._triggers.has(e)||c.delete(e)})}}register(i,e){return this._triggers.has(i)?!1:(this._triggers.set(i,e),!0)}_getTrigger(i){let e=this._triggers.get(i);if(!e)throw aB(i);return e}trigger(i,e,n,o=!0){let r=this._getTrigger(e),a=new Pv(this.id,e,i),c=this._engine.statesByElement.get(i);c||(Cl(i,wv),Cl(i,wv+"-"+e),this._engine.statesByElement.set(i,c=new Map));let m=c.get(e),p=new Dv(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&m&&p.absorbOptions(m.options),c.set(e,p),m||(m=AI),!(p.value===Tv)&&m.value===p.value){if(!Fie(m.params,p.params)){let w=[],S=r.matchStyles(m.value,m.params,w),y=r.matchStyles(p.value,p.params,w);w.length?this._engine.reportError(w):this._engine.afterFlush(()=>{Xm(i,S),ac(i,y)})}return}let M=bs(this._engine.playersByElement,i,[]);M.forEach(w=>{w.namespaceId==this.id&&w.triggerName==e&&w.queued&&w.destroy()});let C=r.matchTransition(m.value,p.value,i,p.params),_=!1;if(!C){if(!o)return;C=r.fallbackTransition,_=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:e,transition:C,fromState:m,toState:p,player:a,isFallbackTransition:_}),_||(Cl(i,bB),a.onStart(()=>{Of(i,bB)})),a.onDone(()=>{let w=this.players.indexOf(a);w>=0&&this.players.splice(w,1);let S=this._engine.playersByElement.get(i);if(S){let y=S.indexOf(a);y>=0&&S.splice(y,1)}}),this.players.push(a),M.push(a),a}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(e=>e.delete(i)),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(o=>o.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);let e=this._engine.playersByElement.get(i);e&&(e.forEach(n=>n.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,e){let n=this._engine.driver.query(i,Mv,!0);n.forEach(o=>{if(o[sc])return;let r=this._engine.fetchNamespacesByElement(o);r.size?r.forEach(a=>a.triggerLeaveAnimation(o,e,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(i,e,n,o){let r=this._engine.statesByElement.get(i),a=new Map;if(r){let c=[];if(r.forEach((m,p)=>{if(a.set(p,m.value),this._triggers.has(p)){let h=this.trigger(i,p,Tv,o);h&&c.push(h)}}),c.length)return this._engine.markElementAsRemoved(this.id,i,!0,e,a),n&&Fd(c).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){let e=this._elementListeners.get(i),n=this._engine.statesByElement.get(i);if(e&&n){let o=new Set;e.forEach(r=>{let a=r.name;if(o.has(a))return;o.add(a);let m=this._triggers.get(a).fallbackTransition,p=n.get(a)||AI,h=new Dv(Tv),g=new Pv(this.id,a,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:a,transition:m,fromState:p,toState:h,player:g,isFallbackTransition:!0})})}}removeNode(i,e){let n=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,e),this.triggerLeaveAnimation(i,e,!0))return;let o=!1;if(n.totalAnimations){let r=n.players.length?n.playersByQueriedElement.get(i):[];if(r&&r.length)o=!0;else{let a=i;for(;a=a.parentNode;)if(n.statesByElement.get(a)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(i),o)n.markElementAsRemoved(this.id,i,!1,e);else{let r=i[sc];(!r||r===EB)&&(n.afterFlush(()=>this.clearElementCache(i)),n.destroyInnerAnimations(i),n._onRemovalComplete(i,e))}}insertNode(i,e){Cl(i,this._hostClassName)}drainQueuedTransitions(i){let e=[];return this._queue.forEach(n=>{let o=n.player;if(o.destroyed)return;let r=n.element,a=this._elementListeners.get(r);a&&a.forEach(c=>{if(c.name==n.triggerName){let m=j1(r,n.triggerName,n.fromState.value,n.toState.value);m._data=i,z1(n.player,c.phase,m,c.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):e.push(n)}),this._queue=[],e.sort((n,o)=>{let r=n.transition.ast.depCount,a=o.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(n.element,o.element)?1:-1})}destroy(i){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}},HI=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(i,e)=>{};_onRemovalComplete(i,e){this.onRemovalComplete(i,e)}constructor(i,e,n){this.bodyNode=i,this.driver=e,this._normalizer=n}get queuedPlayers(){let i=[];return this._namespaceList.forEach(e=>{e.players.forEach(n=>{n.queued&&i.push(n)})}),i}createNamespace(i,e){let n=new $I(i,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[i]=n}_balanceNamespaceList(i,e){let n=this._namespaceList,o=this.namespacesByHostElement;if(n.length-1>=0){let a=!1,c=this.driver.getParentElement(e);for(;c;){let m=o.get(c);if(m){let p=n.indexOf(m);n.splice(p+1,0,i),a=!0;break}c=this.driver.getParentElement(c)}a||n.unshift(i)}else n.push(i);return o.set(e,i),i}register(i,e){let n=this._namespaceLookup[i];return n||(n=this.createNamespace(i,e)),n}registerTrigger(i,e,n){let o=this._namespaceLookup[i];o&&o.register(e,n)&&this.totalAnimations++}destroy(i,e){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(i);this.namespacesByHostElement.delete(n.hostElement);let o=this._namespaceList.indexOf(n);o>=0&&this._namespaceList.splice(o,1),n.destroy(e),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){let e=new Set,n=this.statesByElement.get(i);if(n){for(let o of n.values())if(o.namespaceId){let r=this._fetchNamespace(o.namespaceId);r&&e.add(r)}}return e}trigger(i,e,n,o){if(Q1(e)){let r=this._fetchNamespace(i);if(r)return r.trigger(e,n,o),!0}return!1}insertNode(i,e,n,o){if(!Q1(e))return;let r=e[sc];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(e);a>=0&&this.collectedLeaveElements.splice(a,1)}if(i){let a=this._fetchNamespace(i);a&&a.insertNode(e,n)}o&&this.collectEnterElement(e)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,e){e?this.disabledNodes.has(i)||(this.disabledNodes.add(i),Cl(i,II)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),Of(i,II))}removeNode(i,e,n){if(Q1(e)){let o=i?this._fetchNamespace(i):null;o?o.removeNode(e,n):this.markElementAsRemoved(i,e,!1,n);let r=this.namespacesByHostElement.get(e);r&&r.id!==i&&r.removeNode(e,n)}else this._onRemovalComplete(e,n)}markElementAsRemoved(i,e,n,o,r){this.collectedLeaveElements.push(e),e[sc]={namespaceId:i,setForRemoval:o,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(i,e,n,o,r){return Q1(e)?this._fetchNamespace(i).listen(e,n,o,r):()=>{}}_buildInstruction(i,e,n,o,r){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,n,o,i.fromState.options,i.toState.options,e,r)}destroyInnerAnimations(i){let e=this.driver.query(i,Mv,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(i,U1,!0),e.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(i){let e=this.playersByElement.get(i);e&&e.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(i){let e=this.playersByQueriedElement.get(i);e&&e.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return Fd(this.players).onDone(()=>i());i()})}processLeaveNode(i){let e=i[sc];if(e&&e.setForRemoval){if(i[sc]=EB,e.namespaceId){this.destroyInnerAnimations(i);let n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(i)}this._onRemovalComplete(i,e.setForRemoval)}i.classList?.contains(II)&&this.markElementAsDisabled(i,!1),this.driver.query(i,kie,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(i=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,o)=>this._balanceNamespaceList(n,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],e.length?Fd(e).onDone(()=>{n.forEach(o=>o())}):n.forEach(o=>o())}}reportError(i){throw sB(i)}_flushAnimations(i,e){let n=new Ev,o=[],r=new Map,a=[],c=new Map,m=new Map,p=new Map,h=new Set;this.disabledNodes.forEach(de=>{h.add(de);let V=this.driver.query(de,Mie,!0);for(let Y=0;Y{let Y=kI+w++;_.set(V,Y),de.forEach(ne=>Cl(ne,Y))});let S=[],y=new Set,k=new Set;for(let de=0;dey.add(ne)):k.add(V))}let I=new Map,E=yB(M,Array.from(y));E.forEach((de,V)=>{let Y=H1+w++;I.set(V,Y),de.forEach(ne=>Cl(ne,Y))}),i.push(()=>{C.forEach((de,V)=>{let Y=_.get(V);de.forEach(ne=>Of(ne,Y))}),E.forEach((de,V)=>{let Y=I.get(V);de.forEach(ne=>Of(ne,Y))}),S.forEach(de=>{this.processLeaveNode(de)})});let N=[],T=[];for(let de=this._namespaceList.length-1;de>=0;de--)this._namespaceList[de].drainQueuedTransitions(e).forEach(Y=>{let ne=Y.player,ie=Y.element;if(N.push(ne),this.collectedEnterElements.length){let Oe=ie[sc];if(Oe&&Oe.setForMove){if(Oe.previousTriggersValues&&Oe.previousTriggersValues.has(Y.triggerName)){let Ke=Oe.previousTriggersValues.get(Y.triggerName),Ct=this.statesByElement.get(Y.element);if(Ct&&Ct.has(Y.triggerName)){let Rt=Ct.get(Y.triggerName);Rt.value=Ke,Ct.set(Y.triggerName,Rt)}}ne.destroy();return}}let De=!g||!this.driver.containsElement(g,ie),$e=I.get(ie),it=_.get(ie),et=this._buildInstruction(Y,n,it,$e,De);if(et.errors&&et.errors.length){T.push(et);return}if(De){ne.onStart(()=>Xm(ie,et.fromStyles)),ne.onDestroy(()=>ac(ie,et.toStyles)),o.push(ne);return}if(Y.isFallbackTransition){ne.onStart(()=>Xm(ie,et.fromStyles)),ne.onDestroy(()=>ac(ie,et.toStyles)),o.push(ne);return}let Se=[];et.timelines.forEach(Oe=>{Oe.stretchStartingKeyframe=!0,this.disabledNodes.has(Oe.element)||Se.push(Oe)}),et.timelines=Se,n.append(ie,et.timelines);let q={instruction:et,player:ne,element:ie};a.push(q),et.queriedElements.forEach(Oe=>bs(c,Oe,[]).push(ne)),et.preStyleProps.forEach((Oe,Ke)=>{if(Oe.size){let Ct=m.get(Ke);Ct||m.set(Ke,Ct=new Set),Oe.forEach((Rt,ni)=>Ct.add(ni))}}),et.postStyleProps.forEach((Oe,Ke)=>{let Ct=p.get(Ke);Ct||p.set(Ke,Ct=new Set),Oe.forEach((Rt,ni)=>Ct.add(ni))})});if(T.length){let de=[];T.forEach(V=>{de.push(lB(V.triggerName,V.errors))}),N.forEach(V=>V.destroy()),this.reportError(de)}let R=new Map,W=new Map;a.forEach(de=>{let V=de.element;n.has(V)&&(W.set(V,V),this._beforeAnimationBuild(de.player.namespaceId,de.instruction,R))}),o.forEach(de=>{let V=de.element;this._getPreviousPlayers(V,!1,de.namespaceId,de.triggerName,null).forEach(ne=>{bs(R,V,[]).push(ne),ne.destroy()})});let pe=S.filter(de=>SB(de,m,p)),_e=new Map;xB(_e,this.driver,k,p,bl).forEach(de=>{SB(de,m,p)&&pe.push(de)});let ue=new Map;C.forEach((de,V)=>{xB(ue,this.driver,new Set(de),m,Pf)}),pe.forEach(de=>{let V=_e.get(de),Y=ue.get(de);_e.set(de,new Map([...V?.entries()??[],...Y?.entries()??[]]))});let ye=[],ce=[],Ie={};a.forEach(de=>{let{element:V,player:Y,instruction:ne}=de;if(n.has(V)){if(h.has(V)){Y.onDestroy(()=>ac(V,ne.toStyles)),Y.disabled=!0,Y.overrideTotalTime(ne.totalTime),o.push(Y);return}let ie=Ie;if(W.size>1){let $e=V,it=[];for(;$e=$e.parentNode;){let et=W.get($e);if(et){ie=et;break}it.push($e)}it.forEach(et=>W.set(et,ie))}let De=this._buildAnimation(Y.namespaceId,ne,R,r,ue,_e);if(Y.setRealPlayer(De),ie===Ie)ye.push(Y);else{let $e=this.playersByElement.get(ie);$e&&$e.length&&(Y.parentPlayer=Fd($e)),o.push(Y)}}else Xm(V,ne.fromStyles),Y.onDestroy(()=>ac(V,ne.toStyles)),ce.push(Y),h.has(V)&&o.push(Y)}),ce.forEach(de=>{let V=r.get(de.element);if(V&&V.length){let Y=Fd(V);de.setRealPlayer(Y)}}),o.forEach(de=>{de.parentPlayer?de.syncPlayerEvents(de.parentPlayer):de.destroy()});for(let de=0;de!De.destroyed);ie.length?Nie(this,V,ie):this.processLeaveNode(V)}return S.length=0,ye.forEach(de=>{this.players.push(de),de.onDone(()=>{de.destroy();let V=this.players.indexOf(de);this.players.splice(V,1)}),de.play()}),ye}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,e,n,o,r){let a=[];if(e){let c=this.playersByQueriedElement.get(i);c&&(a=c)}else{let c=this.playersByElement.get(i);if(c){let m=!r||r==Tv;c.forEach(p=>{p.queued||!m&&p.triggerName!=o||a.push(p)})}}return(n||o)&&(a=a.filter(c=>!(n&&n!=c.namespaceId||o&&o!=c.triggerName))),a}_beforeAnimationBuild(i,e,n){let o=e.triggerName,r=e.element,a=e.isRemovalTransition?void 0:i,c=e.isRemovalTransition?void 0:o;for(let m of e.timelines){let p=m.element,h=p!==r,g=bs(n,p,[]);this._getPreviousPlayers(p,h,a,c,e.toState).forEach(C=>{let _=C.getRealPlayer();_.beforeDestroy&&_.beforeDestroy(),C.destroy(),g.push(C)})}Xm(r,e.fromStyles)}_buildAnimation(i,e,n,o,r,a){let c=e.triggerName,m=e.element,p=[],h=new Set,g=new Set,M=e.timelines.map(_=>{let w=_.element;h.add(w);let S=w[sc];if(S&&S.removedBeforeQueried)return new Hc(_.duration,_.delay);let y=w!==m,k=Rie((n.get(w)||Die).map(R=>R.getRealPlayer())).filter(R=>{let W=R;return W.element?W.element===w:!1}),I=r.get(w),E=a.get(w),N=xI(this._normalizer,_.keyframes,I,E),T=this._buildPlayer(_,N,k);if(_.subTimeline&&o&&g.add(w),y){let R=new Pv(i,c,w);R.setRealPlayer(T),p.push(R)}return T});p.forEach(_=>{bs(this.playersByQueriedElement,_.element,[]).push(_),_.onDone(()=>Iie(this.playersByQueriedElement,_.element,_))}),h.forEach(_=>Cl(_,TI));let C=Fd(M);return C.onDestroy(()=>{h.forEach(_=>Of(_,TI)),ac(m,e.toStyles)}),g.forEach(_=>{bs(o,_,[]).push(C)}),C}_buildPlayer(i,e,n){return e.length>0?this.driver.animate(i.element,e,i.duration,i.delay,i.easing,n):new Hc(i.duration,i.delay)}},Pv=class{namespaceId;triggerName;element;_player=new Hc;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(i,e,n){this.namespaceId=i,this.triggerName=e,this.element=n}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((e,n)=>{e.forEach(o=>z1(i,n,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){let e=this._player;e.triggerCallback&&i.onStart(()=>e.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,e){bs(this._queuedCallbacks,i,[]).push(e)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){let e=this._player;e.triggerCallback&&e.triggerCallback(i)}};function Iie(t,i,e){let n=t.get(i);if(n){if(n.length){let o=n.indexOf(e);n.splice(o,1)}n.length==0&&t.delete(i)}return n}function Aie(t){return t??null}function Q1(t){return t&&t.nodeType===1}function Oie(t){return t=="start"||t=="done"}function CB(t,i){let e=t.style.display;return t.style.display=i??"none",e}function xB(t,i,e,n,o){let r=[];e.forEach(m=>r.push(CB(m)));let a=[];n.forEach((m,p)=>{let h=new Map;m.forEach(g=>{let M=i.computeStyle(p,g,o);h.set(g,M),(!M||M.length==0)&&(p[sc]=Pie,a.push(p))}),t.set(p,h)});let c=0;return e.forEach(m=>CB(m,r[c++])),a}function yB(t,i){let e=new Map;if(t.forEach(c=>e.set(c,[])),i.length==0)return e;let n=1,o=new Set(i),r=new Map;function a(c){if(!c)return n;let m=r.get(c);if(m)return m;let p=c.parentNode;return e.has(p)?m=p:o.has(p)?m=n:m=a(p),r.set(c,m),m}return i.forEach(c=>{let m=a(c);m!==n&&e.get(m).push(c)}),e}function Cl(t,i){t.classList?.add(i)}function Of(t,i){t.classList?.remove(i)}function Nie(t,i,e){Fd(e).onDone(()=>t.processLeaveNode(i))}function Rie(t){let i=[];return DB(t,i),i}function DB(t,i){for(let e=0;eo.add(r)):i.set(t,n),e.delete(t),!0}var Nf=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(i,e)=>{};constructor(i,e,n){this._driver=e,this._normalizer=n,this._transitionEngine=new HI(i.body,e,n),this._timelineEngine=new jI(i.body,e,n),this._transitionEngine.onRemovalComplete=(o,r)=>this.onRemovalComplete(o,r)}registerTrigger(i,e,n,o,r){let a=i+"-"+o,c=this._triggerCache[a];if(!c){let m=[],p=[],h=MB(this._driver,r,m,p);if(m.length)throw Z8(o,m);c=yie(o,h,this._normalizer),this._triggerCache[a]=c}this._transitionEngine.registerTrigger(e,o,c)}register(i,e){this._transitionEngine.register(i,e)}destroy(i,e){this._transitionEngine.destroy(i,e)}onInsert(i,e,n,o){this._transitionEngine.insertNode(i,e,n,o)}onRemove(i,e,n){this._transitionEngine.removeNode(i,e,n)}disableAnimations(i,e){this._transitionEngine.markElementAsDisabled(i,e)}process(i,e,n,o){if(n.charAt(0)=="@"){let[r,a]=yI(n),c=o;this._timelineEngine.command(r,e,a,c)}else this._transitionEngine.trigger(i,e,n,o)}listen(i,e,n,o,r){if(n.charAt(0)=="@"){let[a,c]=yI(n);return this._timelineEngine.listen(a,e,c,r)}return this._transitionEngine.listen(i,e,n,o,r)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}};function Lie(t,i){let e=null,n=null;return Array.isArray(i)&&i.length?(e=OI(i[0]),i.length>1&&(n=OI(i[i.length-1]))):i instanceof Map&&(e=OI(i)),e||n?new Bie(t,e,n):null}var Bie=(()=>{class t{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,n,o){this._element=e,this._startStyles=n,this._endStyles=o;let r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&ac(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(ac(this._element,this._initialStyles),this._endStyles&&(ac(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Xm(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Xm(this._element,this._endStyles),this._endStyles=null),ac(this._element,this._initialStyles),this._state=3)}}return t})();function OI(t){let i=null;return t.forEach((e,n)=>{Vie(n)&&(i=i||new Map,i.set(n,e))}),i}function Vie(t){return t==="display"||t==="position"}var ny=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(i,e,n,o){this.element=i,this.keyframes=e,this.options=n,this._specialStyles=o,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let i=this.keyframes,e=this._triggerWebAnimation(this.element,i,this.options);if(!e)return this._onFinish(),null;this.domPlayer=e,this._finalKeyframe=i.length?i[i.length-1]:new Map;let n=()=>this._onFinish();return e.addEventListener("finish",n),this.onDestroy(()=>{e.removeEventListener("finish",n)}),e}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(i){let e=[];return i.forEach(n=>{e.push(Object.fromEntries(n))}),e}_triggerWebAnimation(i,e,n){let o=this._convertKeyframesToObject(e);try{return i.animate(o,n)}catch{return null}}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){let i=this._buildPlayer();i&&(this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),i.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}setPosition(i){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=i*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,o)=>{o!=="offset"&&i.set(o,this._finished?n:W1(this.element,o))}),this.currentSnapshot=i}triggerCallback(i){let e=i==="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},iy=class{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}containsElement(i,e){return SI(i,e)}getParentElement(i){return $1(i)}query(i,e,n){return wI(i,e,n)}computeStyle(i,e,n){return W1(i,e)}animate(i,e,n,o,r,a=[]){let c=o==0?"both":"forwards",m={duration:n,delay:o,fill:c};r&&(m.easing=r);let p=new Map,h=a.filter(C=>C instanceof ny);pB(n,o)&&h.forEach(C=>{C.currentSnapshot.forEach((_,w)=>p.set(w,_))});let g=dB(e).map(C=>new Map(C));g=uB(i,g,p);let M=Lie(i,g);return new ny(i,g,m,M)}};var Y1="@",PB="@.disabled",oy=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(i,e,n,o){this.namespaceId=i,this.delegate=e,this.engine=n,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,e){return this.delegate.createElement(i,e)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,e){this.delegate.appendChild(i,e),this.engine.onInsert(this.namespaceId,e,i,!1)}insertBefore(i,e,n,o=!0){this.delegate.insertBefore(i,e,n),this.engine.onInsert(this.namespaceId,e,i,o)}removeChild(i,e,n,o){if(o){this.delegate.removeChild(i,e,n,o);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(i,e){return this.delegate.selectRootElement(i,e)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,e,n,o){this.delegate.setAttribute(i,e,n,o)}removeAttribute(i,e,n){this.delegate.removeAttribute(i,e,n)}addClass(i,e){this.delegate.addClass(i,e)}removeClass(i,e){this.delegate.removeClass(i,e)}setStyle(i,e,n,o){this.delegate.setStyle(i,e,n,o)}removeStyle(i,e,n){this.delegate.removeStyle(i,e,n)}setProperty(i,e,n){e.charAt(0)==Y1&&e==PB?this.disableAnimations(i,!!n):this.delegate.setProperty(i,e,n)}setValue(i,e){this.delegate.setValue(i,e)}listen(i,e,n,o){return this.delegate.listen(i,e,n,o)}disableAnimations(i,e){this.engine.disableAnimations(i,e)}},UI=class extends oy{factory;constructor(i,e,n,o,r){super(e,n,o,r),this.factory=i,this.namespaceId=e}setProperty(i,e,n){e.charAt(0)==Y1?e.charAt(1)=="."&&e==PB?(n=n===void 0?!0:!!n,this.disableAnimations(i,n)):this.engine.process(this.namespaceId,i,e.slice(1),n):this.delegate.setProperty(i,e,n)}listen(i,e,n,o){if(e.charAt(0)==Y1){let r=zie(i),a=e.slice(1),c="";return a.charAt(0)!=Y1&&([a,c]=jie(a)),this.engine.listen(this.namespaceId,r,a,c,m=>{let p=m._data||-1;this.factory.scheduleListenerCallback(p,n,m)})}return this.delegate.listen(i,e,n,o)}};function zie(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function jie(t){let i=t.indexOf("."),e=t.substring(0,i),n=t.slice(i+1);return[e,n]}var ry=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(i,e,n){this.delegate=i,this.engine=e,this._zone=n,e.onRemovalComplete=(o,r)=>{r?.removeChild(null,o)}}createRenderer(i,e){let o=this.delegate.createRenderer(i,e);if(!i||!e?.data?.animation){let p=this._rendererCache,h=p.get(o);if(!h){let g=()=>p.delete(o);h=new oy("",o,this.engine,g),p.set(o,h)}return h}let r=e.id,a=e.id+"-"+this._currentId;this._currentId++,this.engine.register(a,i);let c=p=>{Array.isArray(p)?p.forEach(c):this.engine.registerTrigger(r,a,i,p.name,p)};return e.data.animation.forEach(c),new UI(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,e,n){if(i>=0&&ie(n));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(r=>{let[a,c]=r;a(c)}),this._animationCallbacksBuffer=[]})}),o.push([e,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(i){this.engine.flush(),this.delegate.componentReplaced?.(i)}};var Hie=(()=>{class t extends Nf{constructor(e,n,o){super(e,n,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(n){return new(n||t)(ge(Pi),ge(ju),ge($u))};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})();function Uie(){return new K1}function Gie(){return new ry(f(G5),f(Nf),f(bi))}var AB=[{provide:$u,useFactory:Uie},{provide:Nf,useClass:Hie},{provide:yd,useFactory:Gie}],Wie=[{provide:ju,useClass:GI},{provide:vE,useValue:"NoopAnimations"},...AB],IB=[{provide:ju,useFactory:()=>new iy},{provide:vE,useFactory:()=>"BrowserAnimations"},...AB],OB=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?Wie:IB}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({providers:IB,imports:[PC]})}return t})();function qie(t,i){return typeof t>"u"?typeof i>"u"?t:i:t}function YI(t,i){return t=qie(t,i),typeof t=="function"?function(){for(var n=arguments,o=arguments.length,r=Array(o),a=0;a"u"?"undefined":qI(t))==="object"&&t.nodeType===1&&qI(t.style)==="object"&&qI(t.ownerDocument)==="object"};function FB(t,i){if(i=JI(i,!0),!RB(i))return-1;for(var e=0;e0;)e[n]=i[n+1];return e=e.map(JI),Xie(t,e)}function Yie(t){for(var i=arguments,e=[],n=arguments.length-1;n-- >0;)e[n]=i[n+1];return e.map(JI).reduce(function(o,r){var a=FB(t,r);return a!==-1?o.concat(t.splice(a,1)):o},[])}function JI(t,i){if(typeof t=="string")try{return document.querySelector(t)}catch(e){throw e}if(!RB(t)&&!i)throw new TypeError(t+" is not a DOM element.");return t}function Kie(t,i){i=i||{};var e=YI(i.allowUpdate,!0);return function(o){if(o=o||window.event,t.target=o.target||o.srcElement||o.originalTarget,t.element=this,t.type=o.type,!!e(o)){if(o.targetTouches)t.x=o.targetTouches[0].clientX,t.y=o.targetTouches[0].clientY,t.pageX=o.targetTouches[0].pageX,t.pageY=o.targetTouches[0].pageY,t.screenX=o.targetTouches[0].screenX,t.screenY=o.targetTouches[0].screenY;else{if(o.pageX===null&&o.clientX!==null){var r=o.target&&o.target.ownerDocument||document,a=r.documentElement,c=r.body;t.pageX=o.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0),t.pageY=o.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0)}else t.pageX=o.pageX,t.pageY=o.pageY;t.x=o.clientX,t.y=o.clientY,t.screenX=o.screenX,t.screenY=o.screenY}t.clientX=t.x,t.clientY=t.y}}}function Zie(){var t={top:{value:0,enumerable:!0},left:{value:0,enumerable:!0},right:{value:window.innerWidth,enumerable:!0},bottom:{value:window.innerHeight,enumerable:!0},width:{value:window.innerWidth,enumerable:!0},height:{value:window.innerHeight,enumerable:!0},x:{value:0,enumerable:!0},y:{value:0,enumerable:!0}};if(Object.create)return Object.create({},t);var i={};return Object.defineProperties(i,t),i}function LB(t){if(t===window)return Zie();try{var i=t.getBoundingClientRect();return i.x===void 0&&(i.x=i.left,i.y=i.top),i}catch{throw new TypeError("Can't call getBoundingClientRect on "+t)}}function Jie(t,i){var e=LB(i);return t.y>e.top&&t.ye.left&&t.x"u")return function(){};for(var t=0,i=Av.length;t"u")return function(){};for(var t=0,i=Av.length;tue.right-e.margin.right?ye=Math.ceil(Math.min(1,(a.x-ue.right)/e.margin.right+1)*e.maxSpeed.right):ye=0,a.yue.bottom-e.margin.bottom?ce=Math.ceil(Math.min(1,(a.y-ue.bottom)/e.margin.bottom+1)*e.maxSpeed.bottom):ce=0,e.syncMove()&&m.dispatch(G,{pageX:a.pageX+ye,pageY:a.pageY+ce,clientX:a.x+ye,clientY:a.y+ce}),setTimeout(function(){ce&&pe(G,ce),ye&&_e(G,ye)})}function pe(G,ue){G===window?window.scrollTo(G.pageXOffset,G.pageYOffset+ue):G.scrollTop+=ue}function _e(G,ue){G===window?window.scrollTo(G.pageXOffset+ue,G.pageYOffset):G.scrollLeft+=ue}}function ioe(t,i){return new noe(t,i)}function NB(t,i,e){return e?t.y>e.top&&t.ye.left&&t.x{class t{constructor(){this.currentDrag=new Le}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),roe=(()=>{class t{constructor(){this.elementRef=f(Lt)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=ft({type:t,selectors:[["","mwlDraggableScrollContainer",""]]})}}return t})();function aoe(t,i,e){e&&e.split(" ").forEach(n=>t.addClass(i.nativeElement,n))}function soe(t,i,e){e&&e.split(" ").forEach(n=>t.removeClass(i.nativeElement,n))}var VB=(()=>{class t{constructor(){this.dragAxis={x:!0,y:!0},this.dragSnapGrid={},this.ghostDragEnabled=!0,this.showOriginalElementWhileDragging=!1,this.dragCursor="",this.autoScroll={margin:20},this.dragPointerDown=new ve,this.dragStart=new ve,this.ghostElementCreated=new ve,this.dragging=new ve,this.dragEnd=new ve,this.pointerDown$=new Le,this.pointerMove$=new Le,this.pointerUp$=new Le,this.eventListenerSubscriptions={},this.destroy$=new Le,this.timeLongPress={timerBegin:0,timerEnd:0},this.element=f(Lt),this.renderer=f(ii),this.draggableHelper=f(ooe),this.zone=f(bi),this.vcr=f(co),this.scrollContainer=f(roe,{optional:!0}),this.document=f(Pi)}ngOnInit(){this.checkEventListeners();let e=this.pointerDown$.pipe(Pn(()=>this.canDrag()),Er(n=>{n.event.stopPropagation&&!this.scrollContainer&&n.event.stopPropagation();let o=this.renderer.createElement("style");this.renderer.setAttribute(o,"type","text/css"),this.renderer.appendChild(o,this.renderer.createText(` body * { -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; user-select: none; } `)),requestAnimationFrame(()=>{this.document.head.appendChild(o)});let r=this.getScrollPosition(),a=new _r(C=>{let _=this.scrollContainer?this.scrollContainer.elementRef.nativeElement:"window";return this.renderer.listen(_,"scroll",w=>C.next(w))}).pipe(li(r),yt(()=>this.getScrollPosition())),c=new Le,m=new bd;this.dragPointerDown.observers.length>0&&this.zone.run(()=>{this.dragPointerDown.next({x:0,y:0})});let p=Dn(this.pointerUp$,this.pointerDown$,m,this.destroy$).pipe(As()),h=rr([this.pointerMove$,a]).pipe(yt(([C,_])=>({currentDrag$:c,transformX:C.clientX-n.clientX,transformY:C.clientY-n.clientY,clientX:C.clientX,clientY:C.clientY,scrollLeft:_.left,scrollTop:_.top,target:C.event.target})),yt(C=>(this.dragSnapGrid.x&&(C.transformX=Math.round(C.transformX/this.dragSnapGrid.x)*this.dragSnapGrid.x),this.dragSnapGrid.y&&(C.transformY=Math.round(C.transformY/this.dragSnapGrid.y)*this.dragSnapGrid.y),C)),yt(C=>(this.dragAxis.x||(C.transformX=0),this.dragAxis.y||(C.transformY=0),C)),yt(C=>{let _=C.scrollLeft-r.left,w=C.scrollTop-r.top;return tt(H({},C),{x:C.transformX+_,y:C.transformY+w})}),Pn(({x:C,y:_,transformX:w,transformY:S})=>!this.validateDrag||this.validateDrag({x:C,y:_,transform:{x:w,y:S}})),rt(p),As()),g=h.pipe(wi(1),As()),M=h.pipe(z_(1),As());return g.subscribe(({clientX:C,clientY:_,x:w,y:S})=>{if(this.dragStart.observers.length>0&&this.zone.run(()=>{this.dragStart.next({cancelDrag$:m})}),this.scroller=BB([this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.defaultView],tt(H({},this.autoScroll),{autoScroll(){return!0}})),aoe(this.renderer,this.element,this.dragActiveClass),this.ghostDragEnabled){let y=this.element.nativeElement.getBoundingClientRect(),k=this.element.nativeElement.cloneNode(!0);if(this.showOriginalElementWhileDragging||this.renderer.setStyle(this.element.nativeElement,"visibility","hidden"),this.ghostElementAppendTo?this.ghostElementAppendTo.appendChild(k):this.element.nativeElement.parentNode.insertBefore(k,this.element.nativeElement.nextSibling),this.ghostElement=k,this.document.body.style.cursor=this.dragCursor,this.setElementStyles(k,{position:"fixed",top:`${y.top}px`,left:`${y.left}px`,width:`${y.width}px`,height:`${y.height}px`,cursor:this.dragCursor,margin:"0",willChange:"transform",pointerEvents:"none"}),this.ghostElementTemplate){let I=this.vcr.createEmbeddedView(this.ghostElementTemplate);k.innerHTML="",I.rootNodes.filter(E=>E instanceof Node).forEach(E=>{k.appendChild(E)}),M.subscribe(()=>{this.vcr.remove(this.vcr.indexOf(I))})}this.ghostElementCreated.observers.length>0&&this.zone.run(()=>{this.ghostElementCreated.emit({clientX:C-w,clientY:_-S,element:k})}),M.subscribe(()=>{k.parentElement.removeChild(k),this.ghostElement=null,this.renderer.setStyle(this.element.nativeElement,"visibility","")})}this.draggableHelper.currentDrag.next(c)}),M.pipe(Er(C=>{let _=m.pipe(h5(),wi(1),yt(w=>tt(H({},C),{dragCancelled:w>0})));return m.complete(),_})).subscribe(({x:C,y:_,dragCancelled:w})=>{this.scroller.destroy(),this.dragEnd.observers.length>0&&this.zone.run(()=>{this.dragEnd.next({x:C,y:_,dragCancelled:w})}),soe(this.renderer,this.element,this.dragActiveClass),c.complete()}),Dn(p,M).pipe(wi(1)).subscribe(()=>{requestAnimationFrame(()=>{this.document.head.removeChild(o)})}),h}),As());Dn(e.pipe(wi(1),yt(n=>[,n])),e.pipe(CC())).pipe(Pn(([n,o])=>n?n.x!==o.x||n.y!==o.y:!0),yt(([n,o])=>o)).subscribe(({x:n,y:o,currentDrag$:r,clientX:a,clientY:c,transformX:m,transformY:p,target:h})=>{this.dragging.observers.length>0&&this.zone.run(()=>{this.dragging.next({x:n,y:o})}),requestAnimationFrame(()=>{if(this.ghostElement){let g=`translate3d(${m}px, ${p}px, 0px)`;this.setElementStyles(this.ghostElement,{transform:g,"-webkit-transform":g,"-ms-transform":g,"-moz-transform":g,"-o-transform":g})}}),r.next({clientX:a,clientY:c,dropData:this.dropData,target:h})})}ngOnChanges(e){e.dragAxis&&this.checkEventListeners()}ngOnDestroy(){this.unsubscribeEventListeners(),this.pointerDown$.complete(),this.pointerMove$.complete(),this.pointerUp$.complete(),this.destroy$.next()}checkEventListeners(){let e=this.canDrag(),n=Object.keys(this.eventListenerSubscriptions).length>0;e&&!n?this.zone.runOutsideAngular(()=>{this.eventListenerSubscriptions.mousedown=this.renderer.listen(this.element.nativeElement,"mousedown",o=>{this.onMouseDown(o)}),this.eventListenerSubscriptions.mouseup=this.renderer.listen("document","mouseup",o=>{this.onMouseUp(o)}),this.eventListenerSubscriptions.touchstart=this.renderer.listen(this.element.nativeElement,"touchstart",o=>{this.onTouchStart(o)}),this.eventListenerSubscriptions.touchend=this.renderer.listen("document","touchend",o=>{this.onTouchEnd(o)}),this.eventListenerSubscriptions.touchcancel=this.renderer.listen("document","touchcancel",o=>{this.onTouchEnd(o)}),this.eventListenerSubscriptions.mouseenter=this.renderer.listen(this.element.nativeElement,"mouseenter",()=>{this.onMouseEnter()}),this.eventListenerSubscriptions.mouseleave=this.renderer.listen(this.element.nativeElement,"mouseleave",()=>{this.onMouseLeave()})}):!e&&n&&this.unsubscribeEventListeners()}onMouseDown(e){e.button===0&&(this.eventListenerSubscriptions.mousemove||(this.eventListenerSubscriptions.mousemove=this.renderer.listen("document","mousemove",n=>{this.pointerMove$.next({event:n,clientX:n.clientX,clientY:n.clientY})})),this.pointerDown$.next({event:e,clientX:e.clientX,clientY:e.clientY}))}onMouseUp(e){e.button===0&&(this.eventListenerSubscriptions.mousemove&&(this.eventListenerSubscriptions.mousemove(),delete this.eventListenerSubscriptions.mousemove),this.pointerUp$.next({event:e,clientX:e.clientX,clientY:e.clientY}))}onTouchStart(e){let n,o,r;if(this.touchStartLongPress&&(this.timeLongPress.timerBegin=Date.now(),o=!1,r=this.hasScrollbar(),n=this.getScrollPosition()),!this.eventListenerSubscriptions.touchmove){let a=ua(this.document,"contextmenu").subscribe(m=>{m.preventDefault()}),c=ua(this.document,"touchmove",{passive:!1}).subscribe(m=>{this.touchStartLongPress&&!o&&r&&(o=this.shouldBeginDrag(e,m,n)),(!this.touchStartLongPress||!r||o)&&(m.preventDefault(),this.pointerMove$.next({event:m,clientX:m.targetTouches[0].clientX,clientY:m.targetTouches[0].clientY}))});this.eventListenerSubscriptions.touchmove=()=>{a.unsubscribe(),c.unsubscribe()}}this.pointerDown$.next({event:e,clientX:e.touches[0].clientX,clientY:e.touches[0].clientY})}onTouchEnd(e){this.eventListenerSubscriptions.touchmove&&(this.eventListenerSubscriptions.touchmove(),delete this.eventListenerSubscriptions.touchmove,this.touchStartLongPress&&this.enableScroll()),this.pointerUp$.next({event:e,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY})}onMouseEnter(){this.setCursor(this.dragCursor)}onMouseLeave(){this.setCursor("")}canDrag(){return this.dragAxis.x||this.dragAxis.y}setCursor(e){this.eventListenerSubscriptions.mousemove||this.renderer.setStyle(this.element.nativeElement,"cursor",e)}unsubscribeEventListeners(){Object.keys(this.eventListenerSubscriptions).forEach(e=>{this.eventListenerSubscriptions[e](),delete this.eventListenerSubscriptions[e]})}setElementStyles(e,n){Object.keys(n).forEach(o=>{this.renderer.setStyle(e,o,n[o])})}getScrollElement(){return this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.body}getScrollPosition(){return this.scrollContainer?{top:this.scrollContainer.elementRef.nativeElement.scrollTop,left:this.scrollContainer.elementRef.nativeElement.scrollLeft}:{top:window.pageYOffset||this.document.documentElement.scrollTop,left:window.pageXOffset||this.document.documentElement.scrollLeft}}shouldBeginDrag(e,n,o){let r=this.getScrollPosition(),a={top:Math.abs(r.top-o.top),left:Math.abs(r.left-o.left)},c=Math.abs(n.targetTouches[0].clientX-e.touches[0].clientX)-a.left,m=Math.abs(n.targetTouches[0].clientY-e.touches[0].clientY)-a.top,p=c+m,h=this.touchStartLongPress;return(p>h.delta||a.top>0||a.left>0)&&(this.timeLongPress.timerBegin=Date.now()),this.timeLongPress.timerEnd=Date.now(),this.timeLongPress.timerEnd-this.timeLongPress.timerBegin>=h.delay?(this.disableScroll(),!0):!1}enableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow",""),this.renderer.setStyle(this.document.body,"overflow","")}disableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow","hidden"),this.renderer.setStyle(this.document.body,"overflow","hidden")}hasScrollbar(){let e=this.getScrollElement(),n=e.scrollWidth>e.clientWidth,o=e.scrollHeight>e.clientHeight;return n||o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=ft({type:t,selectors:[["","mwlDraggable",""]],inputs:{dropData:"dropData",dragAxis:"dragAxis",dragSnapGrid:"dragSnapGrid",ghostDragEnabled:"ghostDragEnabled",showOriginalElementWhileDragging:"showOriginalElementWhileDragging",validateDrag:"validateDrag",dragCursor:"dragCursor",dragActiveClass:"dragActiveClass",ghostElementAppendTo:"ghostElementAppendTo",ghostElementTemplate:"ghostElementTemplate",touchStartLongPress:"touchStartLongPress",autoScroll:"autoScroll"},outputs:{dragPointerDown:"dragPointerDown",dragStart:"dragStart",ghostElementCreated:"ghostElementCreated",dragging:"dragging",dragEnd:"dragEnd"},features:[un]})}}return t})();var ay=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=Bt({type:t})}static{this.\u0275inj=Ft({})}}return t})();var Ov=class{constructor(i){this.rawFile=i;let e=i instanceof HTMLInputElement?i.value:i;this[`_createFrom${typeof e=="string"?"FakePath":"Object"}`](e)}_createFromFakePath(i){this.lastModifiedDate=void 0,this.size=void 0,this.type=`like/${i.slice(i.lastIndexOf(".")+1).toLowerCase()}`,this.name=i.slice(i.lastIndexOf("/")+i.lastIndexOf("\\")+2)}_createFromObject(i){this.size=i.size,this.type=i.type,this.name=i.name}},e3=class{constructor(i,e,n){this.url="/",this.headers=[],this.withCredentials=!0,this.formData=[],this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.uploader=i,this.some=e,this.options=n,this.file=new Ov(e),this._file=e,i.options&&(this.method=i.options.method||"POST",this.alias=i.options.itemAlias||"file"),this.url=i.options.url}upload(){try{this.uploader.uploadItem(this)}catch{this.uploader._onCompleteItem(this,"",0,{}),this.uploader._onErrorItem(this,"",0,{})}}cancel(){this.uploader.cancelItem(this)}remove(){this.uploader.removeFromQueue(this)}onBeforeUpload(){}onBuildForm(i){return{form:i}}onProgress(i){return{progress:i}}onSuccess(i,e,n){return{response:i,status:e,headers:n}}onError(i,e,n){return{response:i,status:e,headers:n}}onCancel(i,e,n){return{response:i,status:e,headers:n}}onComplete(i,e,n){return{response:i,status:e,headers:n}}_onBeforeUpload(){this.isReady=!0,this.isUploading=!0,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()}_onBuildForm(i){this.onBuildForm(i)}_onProgress(i){this.progress=i,this.onProgress(i)}_onSuccess(i,e,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=void 0,this.onSuccess(i,e,n)}_onError(i,e,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=void 0,this.onError(i,e,n)}_onCancel(i,e,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=void 0,this.onCancel(i,e,n)}_onComplete(i,e,n){this.onComplete(i,e,n),this.uploader.options.removeAfterUpload&&this.remove()}_prepareToUploading(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0}},coe=(()=>{class t{static getMimeClass(e){let n="application";return e?.type&&this.mime_psd.indexOf(e.type)!==-1||e?.type?.match("image.*")?n="image":e?.type?.match("video.*")?n="video":e?.type?.match("audio.*")?n="audio":e?.type==="application/pdf"?n="pdf":e?.type&&this.mime_compress.indexOf(e.type)!==-1?n="compress":e?.type&&this.mime_doc.indexOf(e.type)!==-1?n="doc":e?.type&&this.mime_xsl.indexOf(e.type)!==-1?n="xls":e?.type&&this.mime_ppt.indexOf(e.type)!==-1&&(n="ppt"),n==="application"&&e?.name&&(n=this.fileTypeDetection(e.name)),n}static fileTypeDetection(e){let n={jpg:"image",jpeg:"image",tif:"image",psd:"image",bmp:"image",png:"image",nef:"image",tiff:"image",cr2:"image",dwg:"image",cdr:"image",ai:"image",indd:"image",pin:"image",cdp:"image",skp:"image",stp:"image","3dm":"image",mp3:"audio",wav:"audio",wma:"audio",mod:"audio",m4a:"audio",compress:"compress",zip:"compress",rar:"compress","7z":"compress",lz:"compress",z01:"compress",bz2:"compress",gz:"compress",pdf:"pdf",xls:"xls",xlsx:"xls",ods:"xls",mp4:"video",avi:"video",wmv:"video",mpg:"video",mts:"video",flv:"video","3gp":"video",vob:"video",m4v:"video",mpeg:"video",m2ts:"video",mov:"video",doc:"doc",docx:"doc",eps:"doc",txt:"doc",odt:"doc",rtf:"doc",ppt:"ppt",pptx:"ppt",pps:"ppt",ppsx:"ppt",odp:"ppt"},o=e.split(".");if(o.length<2)return"application";let r=o[o.length-1].toLowerCase();return n[r]===void 0?"application":n[r]}}return t.mime_doc=["application/msword","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-word.document.macroEnabled.12","application/vnd.ms-word.template.macroEnabled.12"],t.mime_xsl=["application/vnd.ms-excel","application/vnd.ms-excel","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-excel.template.macroEnabled.12","application/vnd.ms-excel.addin.macroEnabled.12","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],t.mime_ppt=["application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/vnd.ms-powerpoint.addin.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],t.mime_psd=["image/photoshop","image/x-photoshop","image/psd","application/photoshop","application/psd","zz-application/zz-winassoc-psd"],t.mime_compress=["application/x-gtar","application/x-gcompress","application/compress","application/x-tar","application/x-rar-compressed","application/octet-stream","application/x-zip-compressed","application/zip-compressed","application/x-7z-compressed","application/gzip","application/x-bzip2"],t})();function doe(t){return File&&t instanceof File}var Ka=class{constructor(i){this.isUploading=!1,this.queue=[],this.progress=0,this._nextIndex=0,this.options={autoUpload:!1,isHTML5:!0,filters:[],removeAfterUpload:!1,disableMultipart:!1,formatDataFunction:e=>e._file,formatDataFunctionIsAsync:!1,url:""},this.setOptions(i),this.response=new ve}setOptions(i){this.options=Object.assign(this.options,i),this.authToken=this.options.authToken,this.authTokenHeader=this.options.authTokenHeader||"Authorization",this.autoUpload=this.options.autoUpload,this.options.filters?.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.options.maxFileSize&&this.options.filters?.unshift({name:"fileSize",fn:this._fileSizeFilter}),this.options.allowedFileType&&this.options.filters?.unshift({name:"fileType",fn:this._fileTypeFilter}),this.options.allowedMimeType&&this.options.filters?.unshift({name:"mimeType",fn:this._mimeTypeFilter});for(let e=0;e{o||(o=this.options);let h=new Ov(p);if(this._isValidFile(h,a,o)){let g=new e3(this,p,o);m.push(g),this.queue.push(g),this._onAfterAddingFile(g)}else if(this._failFilterIndex){let g=a[this._failFilterIndex];this._onWhenAddingFileFailed(h,g,o)}}),this.queue.length!==c&&(this._onAfterAddingAll(m),this.progress=this._getTotalProgress()),this._render(),this.options.autoUpload&&this.uploadAll()}removeFromQueue(i){let e=this.getIndexOfItem(i),n=this.queue[e];n.isUploading&&n.cancel(),this.queue.splice(e,1),this.progress=this._getTotalProgress()}clearQueue(){for(;this.queue.length;)this.queue[0].remove();this.progress=0}uploadItem(i){let e=this.getIndexOfItem(i),n=this.queue[e],o=this.options.isHTML5?"_xhrTransport":"_iframeTransport";n._prepareToUploading(),!this.isUploading&&(this.isUploading=!0,this[o](n))}cancelItem(i){let e=this.getIndexOfItem(i),n=this.queue[e],o=this.options.isHTML5?n._xhr:n._form;n&&n.isUploading&&o.abort()}uploadAll(){let i=this.getNotUploadedItems().filter(e=>!e.isUploading);i.length&&(i.map(e=>e._prepareToUploading()),i[0].upload())}cancelAll(){this.getNotUploadedItems().map(e=>e.cancel())}isFile(i){return doe(i)}isFileLikeObject(i){return i instanceof Ov}getIndexOfItem(i){return typeof i=="number"?i:this.queue.indexOf(i)}getNotUploadedItems(){return this.queue.filter(i=>!i.isUploaded)}getReadyItems(){return this.queue.filter(i=>i.isReady&&!i.isUploading).sort((i,e)=>i.index-e.index)}onAfterAddingAll(i){return{fileItems:i}}onBuildItemForm(i,e){return{fileItem:i,form:e}}onAfterAddingFile(i){return{fileItem:i}}onWhenAddingFileFailed(i,e,n){return{item:i,filter:e,options:n}}onBeforeUploadItem(i){return{fileItem:i}}onProgressItem(i,e){return{fileItem:i,progress:e}}onProgressAll(i){return{progress:i}}onSuccessItem(i,e,n,o){return{item:i,response:e,status:n,headers:o}}onErrorItem(i,e,n,o){return{item:i,response:e,status:n,headers:o}}onCancelItem(i,e,n,o){return{item:i,response:e,status:n,headers:o}}onCompleteItem(i,e,n,o){return{item:i,response:e,status:n,headers:o}}onCompleteAll(){}_mimeTypeFilter(i){return!(i?.type&&this.options.allowedMimeType&&this.options.allowedMimeType?.indexOf(i.type)===-1)}_fileSizeFilter(i){return!(this.options.maxFileSize&&i.size>this.options.maxFileSize)}_fileTypeFilter(i){return!(this.options.allowedFileType&&this.options.allowedFileType.indexOf(coe.getMimeClass(i))===-1)}_onErrorItem(i,e,n,o){i._onError(e,n,o),this.onErrorItem(i,e,n,o)}_onCompleteItem(i,e,n,o){i._onComplete(e,n,o),this.onCompleteItem(i,e,n,o);let r=this.getReadyItems()[0];if(this.isUploading=!1,r){r.upload();return}this.onCompleteAll(),this.progress=this._getTotalProgress(),this._render()}_headersGetter(i){return e=>e?i[e.toLowerCase()]||void 0:i}_xhrTransport(i){let e=this,n=i._xhr=new XMLHttpRequest,o;if(this._onBeforeUploadItem(i),typeof i._file.size!="number")throw new TypeError("The file specified is no longer valid");if(this.options.disableMultipart)this.options.formatDataFunction&&(o=this.options.formatDataFunction(i));else{o=new FormData,this._onBuildItemForm(i,o);let r=()=>o.append(i.alias,i._file,i.file.name);this.options.parametersBeforeFiles||r(),this.options.additionalParameter!==void 0&&Object.keys(this.options.additionalParameter).forEach(a=>{let c=this.options.additionalParameter?.[a];typeof c=="string"&&c.indexOf("{{file_name}}")>=0&&i.file?.name&&(c=c.replace("{{file_name}}",i.file.name)),o.append(a,c)}),r&&this.options.parametersBeforeFiles&&r()}if(n.upload.onprogress=r=>{let a=Math.round(r.lengthComputable?r.loaded*100/r.total:0);this._onProgressItem(i,a)},n.onload=()=>{let r=this._parseHeaders(n.getAllResponseHeaders()),a=this._transformResponse(n.response,r),m=`_on${this._isSuccessCode(n.status)?"Success":"Error"}Item`;this[m](i,a,n.status,r),this._onCompleteItem(i,a,n.status,r)},n.onerror=()=>{let r=this._parseHeaders(n.getAllResponseHeaders()),a=this._transformResponse(n.response,r);this._onErrorItem(i,a,n.status,r),this._onCompleteItem(i,a,n.status,r)},n.onabort=()=>{let r=this._parseHeaders(n.getAllResponseHeaders()),a=this._transformResponse(n.response,r);this._onCancelItem(i,a,n.status,r),this._onCompleteItem(i,a,n.status,r)},i.method&&i.url&&n.open(i.method,i.url,!0),n.withCredentials=i.withCredentials,this.options.headers)for(let r of this.options.headers)n.setRequestHeader(r.name,r.value);if(i.headers.length)for(let r of i.headers)n.setRequestHeader(r.name,r.value);this.authToken&&this.authTokenHeader&&n.setRequestHeader(this.authTokenHeader,this.authToken),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&e.response.emit(n.responseText)},this.options.formatDataFunctionIsAsync?o.then(r=>n.send(JSON.stringify(r))):n.send(o),this._render()}_getTotalProgress(i=0){if(this.options.removeAfterUpload)return i;let e=this.getNotUploadedItems().length,n=e?this.queue.length-e:this.queue.length,o=100/this.queue.length,r=i*o/100;return Math.round(n*o+r)}_getFilters(i){if(!i)return this.options?.filters||[];if(Array.isArray(i))return i;if(typeof i=="string"){let e=i.match(/[^\s,]+/g);return this.options?.filters||[].filter(n=>e?.indexOf(n.name)!==-1)}return this.options?.filters||[]}_render(){}_queueLimitFilter(){return this.options.queueLimit===void 0||this.queue.length(this._failFilterIndex&&this._failFilterIndex++,o.fn.call(this,i,n))):!0}_isSuccessCode(i){return i>=200&&i<300||i===304}_transformResponse(i,e){return i}_parseHeaders(i){let e={},n,o,r;return i&&i.split(` `).map(a=>{r=a.indexOf(":"),n=a.slice(0,r).trim().toLowerCase(),o=a.slice(r+1).trim(),n&&(e[n]=e[n]?e[n]+", "+o:o)}),e}_onWhenAddingFileFailed(i,e,n){this.onWhenAddingFileFailed(i,e,n)}_onAfterAddingFile(i){this.onAfterAddingFile(i)}_onAfterAddingAll(i){this.onAfterAddingAll(i)}_onBeforeUploadItem(i){i._onBeforeUpload(),this.onBeforeUploadItem(i)}_onBuildItemForm(i,e){i._onBuildForm(e),this.onBuildItemForm(i,e)}_onProgressItem(i,e){let n=this._getTotalProgress(e);this.progress=n,i._onProgress(e),this.onProgressItem(i,e),this.onProgressAll(n),this._render()}_onSuccessItem(i,e,n,o){i._onSuccess(e,n,o),this.onSuccessItem(i,e,n,o)}_onCancelItem(i,e,n,o){i._onCancel(e,n,o),this.onCancelItem(i,e,n,o)}};var Gc=(()=>{class t{constructor(e){this.onFileSelected=new ve,this.element=e}getOptions(){return this.uploader?.options}getFilters(){return""}isEmptyAfterSelection(){return!!this.element.nativeElement.attributes.multiple}onChange(){let e=this.element.nativeElement.files,n=this.getOptions(),o=this.getFilters();this.uploader?.addToQueue(e,n,o),this.onFileSelected.emit(e),this.isEmptyAfterSelection()&&(this.element.nativeElement.value="")}}return t.\u0275fac=function(e){return new(e||t)(st(Lt))},t.\u0275dir=ft({type:t,selectors:[["","ng2FileSelect",""]],hostBindings:function(e,n){e&1&&v("change",function(){return n.onChange()})},inputs:{uploader:"uploader"},outputs:{onFileSelected:"onFileSelected"},standalone:!1}),t})(),xl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Bt({type:t}),t.\u0275inj=Ft({imports:[Z]}),t})();var Un="primary",qv=Symbol("RouteTitle"),r3=class{params;constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e[0]:e}return null}getAll(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function Gu(t){return new r3(t)}function t3(t,i,e){for(let n=0;nt.length||e.pathMatch==="full"&&(i.hasChildren()||n.lengtht.length||e.pathMatch==="full"&&i.hasChildren()&&e.path!=="**")return null;let c={};return!t3(r,t.slice(0,r.length),c)||!t3(a,t.slice(t.length-a.length),c)?null:{consumed:t,posParams:c}}function py(t){return new Promise((i,e)=>{t.pipe(Cd()).subscribe({next:n=>i(n),error:n=>e(n)})})}function poe(t,i){if(t.length!==i.length)return!1;for(let e=0;en[r]===o)}else return t===i}function uoe(t){return t.length>0?t[t.length-1]:null}function Wu(t){return cm(t)?t:E5(t)?or(Promise.resolve(t)):xt(t)}function XB(t){return cm(t)?py(t):Promise.resolve(t)}var hoe={exact:YB,subset:KB},QB={exact:foe,subset:goe,ignored:()=>!0},C3={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Vv={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function x3(t,i,e){let n=t instanceof Za?t:i.parseUrl(t);return ri(()=>s3(i.lastSuccessfulNavigation()?.finalUrl??new Za,n,H(H({},Vv),e)))}function s3(t,i,e){return hoe[e.paths](t.root,i.root,e.matrixParams)&&QB[e.queryParams](t.queryParams,i.queryParams)&&!(e.fragment==="exact"&&t.fragment!==i.fragment)}function foe(t,i){return Wc(t,i)}function YB(t,i,e){if(!Uu(t.segments,i.segments)||!cy(t.segments,i.segments,e)||t.numberOfChildren!==i.numberOfChildren)return!1;for(let n in i.children)if(!t.children[n]||!YB(t.children[n],i.children[n],e))return!1;return!0}function goe(t,i){return Object.keys(i).length<=Object.keys(t).length&&Object.keys(i).every(e=>qB(t[e],i[e]))}function KB(t,i,e){return ZB(t,i,i.segments,e)}function ZB(t,i,e,n){if(t.segments.length>e.length){let o=t.segments.slice(0,e.length);return!(!Uu(o,e)||i.hasChildren()||!cy(o,e,n))}else if(t.segments.length===e.length){if(!Uu(t.segments,e)||!cy(t.segments,e,n))return!1;for(let o in i.children)if(!t.children[o]||!KB(t.children[o],i.children[o],n))return!1;return!0}else{let o=e.slice(0,t.segments.length),r=e.slice(t.segments.length);return!Uu(t.segments,o)||!cy(t.segments,o,n)||!t.children[Un]?!1:ZB(t.children[Un],i,r,n)}}function cy(t,i,e){return i.every((n,o)=>QB[e](t[o].parameters,n.parameters))}var Za=class{root;queryParams;fragment;_queryParamMap;constructor(i=new ao([],{}),e={},n=null){this.root=i,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Gu(this.queryParams),this._queryParamMap}toString(){return boe.serialize(this)}},ao=class{segments;children;parent=null;constructor(i,e){this.segments=i,this.children=e,Object.values(e).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return dy(this)}},Qm=class{path;parameters;_parameterMap;constructor(i,e){this.path=i,this.parameters=e}get parameterMap(){return this._parameterMap??=Gu(this.parameters),this._parameterMap}toString(){return e7(this)}};function _oe(t,i){return Uu(t,i)&&t.every((e,n)=>Wc(e.parameters,i[n].parameters))}function Uu(t,i){return t.length!==i.length?!1:t.every((e,n)=>e.path===i[n].path)}function voe(t,i){let e=[];return Object.entries(t.children).forEach(([n,o])=>{n===Un&&(e=e.concat(i(o,n)))}),Object.entries(t.children).forEach(([n,o])=>{n!==Un&&(e=e.concat(i(o,n)))}),e}var Km=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:()=>new Bd,providedIn:"root"})}return t})(),Bd=class{parse(i){let e=new c3(i);return new Za(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(i){let e=`/${Rv(i.root,!0)}`,n=yoe(i.queryParams),o=typeof i.fragment=="string"?`#${Coe(i.fragment)}`:"";return`${e}${n}${o}`}},boe=new Bd;function dy(t){return t.segments.map(i=>e7(i)).join("/")}function Rv(t,i){if(!t.hasChildren())return dy(t);if(i){let e=t.children[Un]?Rv(t.children[Un],!1):"",n=[];return Object.entries(t.children).forEach(([o,r])=>{o!==Un&&n.push(`${o}:${Rv(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}else{let e=voe(t,(n,o)=>o===Un?[Rv(t.children[Un],!1)]:[`${o}:${Rv(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[Un]!=null?`${dy(t)}/${e[0]}`:`${dy(t)}/(${e.join("//")})`}}function JB(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function sy(t){return JB(t).replace(/%3B/gi,";")}function Coe(t){return encodeURI(t)}function l3(t){return JB(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function my(t){return decodeURIComponent(t)}function zB(t){return my(t.replace(/\+/g,"%20"))}function e7(t){return`${l3(t.path)}${xoe(t.parameters)}`}function xoe(t){return Object.entries(t).map(([i,e])=>`;${l3(i)}=${l3(e)}`).join("")}function yoe(t){let i=Object.entries(t).map(([e,n])=>Array.isArray(n)?n.map(o=>`${sy(e)}=${sy(o)}`).join("&"):`${sy(e)}=${sy(n)}`).filter(e=>e);return i.length?`?${i.join("&")}`:""}var Soe=/^[^\/()?;#]+/;function n3(t){let i=t.match(Soe);return i?i[0]:""}var woe=/^[^\/()?;=#]+/;function Moe(t){let i=t.match(woe);return i?i[0]:""}var koe=/^[^=?&#]+/;function Toe(t){let i=t.match(koe);return i?i[0]:""}var Eoe=/^[^&#]+/;function Doe(t){let i=t.match(Eoe);return i?i[0]:""}var c3=class{url;remaining;constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new ao([],{}):new ao([],this.parseChildren())}parseQueryParams(){let i={};if(this.consumeOptional("?"))do this.parseQueryParam(i);while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(i=0){if(i>50)throw new vn(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0,i));let o={};return this.peekStartsWith("(")&&(o=this.parseParens(!1,i)),(e.length>0||Object.keys(n).length>0)&&(o[Un]=new ao(e,n)),o}parseSegment(){let i=n3(this.remaining);if(i===""&&this.peekStartsWith(";"))throw new vn(4009,!1);return this.capture(i),new Qm(my(i),this.parseMatrixParams())}parseMatrixParams(){let i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){let e=Moe(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let o=n3(this.remaining);o&&(n=o,this.capture(n))}i[my(e)]=my(n)}parseQueryParam(i){let e=Toe(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let a=Doe(this.remaining);a&&(n=a,this.capture(n))}let o=zB(e),r=zB(n);if(i.hasOwnProperty(o)){let a=i[o];Array.isArray(a)||(a=[a],i[o]=a),a.push(r)}else i[o]=r}parseParens(i,e){let n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let o=n3(this.remaining),r=this.remaining[o.length];if(r!=="/"&&r!==")"&&r!==";")throw new vn(4010,!1);let a;o.indexOf(":")>-1?(a=o.slice(0,o.indexOf(":")),this.capture(a),this.capture(":")):i&&(a=Un);let c=this.parseChildren(e+1);n[a??Un]=Object.keys(c).length===1&&c[Un]?c[Un]:new ao([],c),this.consumeOptional("//")}return n}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return this.peekStartsWith(i)?(this.remaining=this.remaining.substring(i.length),!0):!1}capture(i){if(!this.consumeOptional(i))throw new vn(4011,!1)}};function t7(t){return t.segments.length>0?new ao([],{[Un]:t}):t}function n7(t){let i={};for(let[n,o]of Object.entries(t.children)){let r=n7(o);if(n===Un&&r.segments.length===0&&r.hasChildren())for(let[a,c]of Object.entries(r.children))i[a]=c;else(r.segments.length>0||r.hasChildren())&&(i[n]=r)}let e=new ao(t.segments,i);return Poe(e)}function Poe(t){if(t.numberOfChildren===1&&t.children[Un]){let i=t.children[Un];return new ao(t.segments.concat(i.segments),i.children)}return t}function Ym(t){return t instanceof Za}function i7(t,i,e=null,n=null,o=new Bd){let r=o7(t);return r7(r,i,e,n,o)}function o7(t){let i;function e(r){let a={};for(let m of r.children){let p=e(m);a[m.outlet]=p}let c=new ao(r.url,a);return r===t&&(i=c),c}let n=e(t.root),o=t7(n);return i??o}function r7(t,i,e,n,o){let r=t;for(;r.parent;)r=r.parent;if(i.length===0)return i3(r,r,r,e,n,o);let a=Ioe(i);if(a.toRoot())return i3(r,r,new ao([],{}),e,n,o);let c=Aoe(a,r,t),m=c.processChildren?Lv(c.segmentGroup,c.index,a.commands):s7(c.segmentGroup,c.index,a.commands);return i3(r,c.segmentGroup,m,e,n,o)}function uy(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function zv(t){return typeof t=="object"&&t!=null&&t.outlets}function jB(t,i,e){t||="\u0275";let n=new Za;return n.queryParams={[t]:i},e.parse(e.serialize(n)).queryParams[t]}function i3(t,i,e,n,o,r){let a={};for(let[p,h]of Object.entries(n??{}))a[p]=Array.isArray(h)?h.map(g=>jB(p,g,r)):jB(p,h,r);let c;t===i?c=e:c=a7(t,i,e);let m=t7(n7(c));return new Za(m,a,o)}function a7(t,i,e){let n={};return Object.entries(t.children).forEach(([o,r])=>{r===i?n[o]=e:n[o]=a7(r,i,e)}),new ao(t.segments,n)}var hy=class{isAbsolute;numberOfDoubleDots;commands;constructor(i,e,n){if(this.isAbsolute=i,this.numberOfDoubleDots=e,this.commands=n,i&&n.length>0&&uy(n[0]))throw new vn(4003,!1);let o=n.find(zv);if(o&&o!==uoe(n))throw new vn(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Ioe(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new hy(!0,0,t);let i=0,e=!1,n=t.reduce((o,r,a)=>{if(typeof r=="object"&&r!=null){if(r.outlets){let c={};return Object.entries(r.outlets).forEach(([m,p])=>{c[m]=typeof p=="string"?p.split("/"):p}),[...o,{outlets:c}]}if(r.segmentPath)return[...o,r.segmentPath]}return typeof r!="string"?[...o,r]:a===0?(r.split("/").forEach((c,m)=>{m==0&&c==="."||(m==0&&c===""?e=!0:c===".."?i++:c!=""&&o.push(c))}),o):[...o,r]},[]);return new hy(e,i,n)}var Lf=class{segmentGroup;processChildren;index;constructor(i,e,n){this.segmentGroup=i,this.processChildren=e,this.index=n}};function Aoe(t,i,e){if(t.isAbsolute)return new Lf(i,!0,0);if(!e)return new Lf(i,!1,NaN);if(e.parent===null)return new Lf(e,!0,0);let n=uy(t.commands[0])?0:1,o=e.segments.length-1+n;return Ooe(e,o,t.numberOfDoubleDots)}function Ooe(t,i,e){let n=t,o=i,r=e;for(;r>o;){if(r-=o,n=n.parent,!n)throw new vn(4005,!1);o=n.segments.length}return new Lf(n,!1,o-r)}function Noe(t){return zv(t[0])?t[0].outlets:{[Un]:t}}function s7(t,i,e){if(t??=new ao([],{}),t.segments.length===0&&t.hasChildren())return Lv(t,i,e);let n=Roe(t,i,e),o=e.slice(n.commandIndex);if(n.match&&n.pathIndexr!==Un)&&t.children[Un]&&t.numberOfChildren===1&&t.children[Un].segments.length===0){let r=Lv(t.children[Un],i,e);return new ao(t.segments,r.children)}return Object.entries(n).forEach(([r,a])=>{typeof a=="string"&&(a=[a]),a!==null&&(o[r]=s7(t.children[r],i,a))}),Object.entries(t.children).forEach(([r,a])=>{n[r]===void 0&&(o[r]=a)}),new ao(t.segments,o)}}function Roe(t,i,e){let n=0,o=i,r={match:!1,pathIndex:0,commandIndex:0};for(;o=e.length)return r;let a=t.segments[o],c=e[n];if(zv(c))break;let m=`${c}`,p=n0&&m===void 0)break;if(m&&p&&typeof p=="object"&&p.outlets===void 0){if(!HB(m,p,a))return r;n+=2}else{if(!HB(m,{},a))return r;n++}o++}return{match:!0,pathIndex:o,commandIndex:n}}function d3(t,i,e){let n=t.segments.slice(0,i),o=0;for(;o{typeof n=="string"&&(n=[n]),n!==null&&(i[e]=d3(new ao([],{}),0,n))}),i}function $B(t){let i={};return Object.entries(t).forEach(([e,n])=>i[e]=`${n}`),i}function HB(t,i,e){return t==e.path&&Wc(i,e.parameters)}var Bf="imperative",Xr=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(Xr||{}),Qs=class{id;url;constructor(i,e){this.id=i,this.url=e}},Xc=class extends Qs{type=Xr.NavigationStart;navigationTrigger;restoredState;constructor(i,e,n="imperative",o=null){super(i,e),this.navigationTrigger=n,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Or=class extends Qs{urlAfterRedirects;type=Xr.NavigationEnd;constructor(i,e,n){super(i,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Aa=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(Aa||{}),zf=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(zf||{}),xs=class extends Qs{reason;code;type=Xr.NavigationCancel;constructor(i,e,n,o){super(i,e),this.reason=n,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function l7(t){return t instanceof xs&&(t.code===Aa.Redirect||t.code===Aa.SupersededByNewNavigation)}var Qc=class extends Qs{reason;code;type=Xr.NavigationSkipped;constructor(i,e,n,o){super(i,e),this.reason=n,this.code=o}},Vd=class extends Qs{error;target;type=Xr.NavigationError;constructor(i,e,n,o){super(i,e),this.error=n,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},jv=class extends Qs{urlAfterRedirects;state;type=Xr.RoutesRecognized;constructor(i,e,n,o){super(i,e),this.urlAfterRedirects=n,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},fy=class extends Qs{urlAfterRedirects;state;type=Xr.GuardsCheckStart;constructor(i,e,n,o){super(i,e),this.urlAfterRedirects=n,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},gy=class extends Qs{urlAfterRedirects;state;shouldActivate;type=Xr.GuardsCheckEnd;constructor(i,e,n,o,r){super(i,e),this.urlAfterRedirects=n,this.state=o,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},_y=class extends Qs{urlAfterRedirects;state;type=Xr.ResolveStart;constructor(i,e,n,o){super(i,e),this.urlAfterRedirects=n,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},vy=class extends Qs{urlAfterRedirects;state;type=Xr.ResolveEnd;constructor(i,e,n,o){super(i,e),this.urlAfterRedirects=n,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},by=class{route;type=Xr.RouteConfigLoadStart;constructor(i){this.route=i}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Cy=class{route;type=Xr.RouteConfigLoadEnd;constructor(i){this.route=i}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},xy=class{snapshot;type=Xr.ChildActivationStart;constructor(i){this.snapshot=i}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},yy=class{snapshot;type=Xr.ChildActivationEnd;constructor(i){this.snapshot=i}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Sy=class{snapshot;type=Xr.ActivationStart;constructor(i){this.snapshot=i}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},wy=class{snapshot;type=Xr.ActivationEnd;constructor(i){this.snapshot=i}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},jf=class{routerEvent;position;anchor;scrollBehavior;type=Xr.Scroll;constructor(i,e,n,o){this.routerEvent=i,this.position=e,this.anchor=n,this.scrollBehavior=o}toString(){let i=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${i}')`}},$f=class{},$v=class{},Hf=class{url;navigationBehaviorOptions;constructor(i,e){this.url=i,this.navigationBehaviorOptions=e}};function Loe(t){return!(t instanceof $f)&&!(t instanceof Hf)&&!(t instanceof $v)}var My=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(i){this.rootInjector=i,this.children=new qu(this.rootInjector)}},qu=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,n){let o=this.getOrCreateContext(e);o.outlet=n,this.contexts.set(e,o)}onChildOutletDestroyed(e){let n=this.getContext(e);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let n=this.getContext(e);return n||(n=new My(this.rootInjector),this.contexts.set(e,n)),n}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(n){return new(n||t)(ge(Xl))};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ky=class{_root;constructor(i){this._root=i}get root(){return this._root.value}parent(i){let e=this.pathFromRoot(i);return e.length>1?e[e.length-2]:null}children(i){let e=m3(i,this._root);return e?e.children.map(n=>n.value):[]}firstChild(i){let e=m3(i,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(i){let e=p3(i,this._root);return e.length<2?[]:e[e.length-2].children.map(o=>o.value).filter(o=>o!==i)}pathFromRoot(i){return p3(i,this._root).map(e=>e.value)}};function m3(t,i){if(t===i.value)return i;for(let e of i.children){let n=m3(t,e);if(n)return n}return null}function p3(t,i){if(t===i.value)return[i];for(let e of i.children){let n=p3(t,e);if(n.length)return n.unshift(i),n}return[]}var Xs=class{value;children;constructor(i,e){this.value=i,this.children=e}toString(){return`TreeNode(${this.value})`}};function Ff(t){let i={};return t&&t.children.forEach(e=>i[e.value.outlet]=e),i}var Hv=class extends ky{snapshot;constructor(i,e){super(i),this.snapshot=e,S3(this,i)}toString(){return this.snapshot.toString()}};function c7(t,i){let e=Boe(t,i),n=new qt([new Qm("",{})]),o=new qt({}),r=new qt({}),a=new qt({}),c=new qt(""),m=new Ye(n,o,a,c,r,Un,t,e.root);return m.snapshot=e.root,new Hv(new Xs(m,[]),e)}function Boe(t,i){let e={},n={},o={},a=new Uf([],e,o,"",n,Un,t,null,{},i);return new Uv("",new Xs(a,[]))}var Ye=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(i,e,n,o,r,a,c,m){this.urlSubject=i,this.paramsSubject=e,this.queryParamsSubject=n,this.fragmentSubject=o,this.dataSubject=r,this.outlet=a,this.component=c,this._futureSnapshot=m,this.title=this.dataSubject?.pipe(yt(p=>p[qv]))??xt(void 0),this.url=i,this.params=e,this.queryParams=n,this.fragment=o,this.data=r}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(yt(i=>Gu(i))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(yt(i=>Gu(i))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function y3(t,i,e="emptyOnly"){let n,{routeConfig:o}=t;return i!==null&&(e==="always"||o?.path===""||!i.component&&!i.routeConfig?.loadComponent)?n={params:H(H({},i.params),t.params),data:H(H({},i.data),t.data),resolve:H(H(H(H({},t.data),i.data),o?.data),t._resolvedData)}:n={params:H({},t.params),data:H({},t.data),resolve:H(H({},t.data),t._resolvedData??{})},o&&m7(o)&&(n.resolve[qv]=o.title),n}var Uf=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[qv]}constructor(i,e,n,o,r,a,c,m,p,h){this.url=i,this.params=e,this.queryParams=n,this.fragment=o,this.data=r,this.outlet=a,this.component=c,this.routeConfig=m,this._resolve=p,this._environmentInjector=h}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Gu(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Gu(this.queryParams),this._queryParamMap}toString(){let i=this.url.map(n=>n.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${i}', path:'${e}')`}},Uv=class extends ky{url;constructor(i,e){super(e),this.url=i,S3(this,e)}toString(){return d7(this._root)}};function S3(t,i){i.value._routerState=t,i.children.forEach(e=>S3(t,e))}function d7(t){let i=t.children.length>0?` { ${t.children.map(d7).join(", ")} } `:"";return`${t.value}${i}`}function o3(t){if(t.snapshot){let i=t.snapshot,e=t._futureSnapshot;t.snapshot=e,Wc(i.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),i.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),Wc(i.params,e.params)||t.paramsSubject.next(e.params),poe(i.url,e.url)||t.urlSubject.next(e.url),Wc(i.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function u3(t,i){let e=Wc(t.params,i.params)&&_oe(t.url,i.url),n=!t.parent!=!i.parent;return e&&!n&&(!t.parent||u3(t.parent,i.parent))}function m7(t){return typeof t.title=="string"||t.title===null}var p7=new kt(""),zd=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=Un;activateEvents=new ve;deactivateEvents=new ve;attachEvents=new ve;detachEvents=new ve;routerOutletData=oe();parentContexts=f(qu);location=f(co);changeDetector=f(K);inputBinder=f(Xv,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:n,previousValue:o}=e.name;if(n)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new vn(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new vn(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new vn(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,n){if(this.isActivated)throw new vn(4013,!1);this._activatedRoute=e;let o=this.location,a=e.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,m=new h3(e,c,o.injector,this.routerOutletData);this.activated=o.createComponent(a,{index:o.length,injector:m,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[un]})}return t})(),h3=class{route;childContexts;parent;outletData;constructor(i,e,n,o){this.route=i,this.childContexts=e,this.parent=n,this.outletData=o}get(i,e){return i===Ye?this.route:i===qu?this.childContexts:i===p7?this.outletData:this.parent.get(i,e)}},Xv=new kt(""),w3=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:n}=e,o=rr([n.queryParams,n.params,n.data]).pipe(fn(([r,a,c],m)=>(c=H(H(H({},r),a),c),m===0?xt(c):Promise.resolve(c)))).subscribe(r=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==n||n.component===null){this.unsubscribeFromRouteData(e);return}let a=B5(n.component);if(!a){this.unsubscribeFromRouteData(e);return}for(let{templateName:c}of a.inputs)e.activatedComponentRef.setInput(c,r[c])});this.outletDataSubscriptions.set(e,o)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})(),M3=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(n,o){n&1&&F(0,"router-outlet")},dependencies:[zd],encapsulation:2})}return t})();function k3(t){let i=t.children&&t.children.map(k3),e=i?tt(H({},t),{children:i}):H({},t);return!e.component&&!e.loadComponent&&(i||e.loadChildren)&&e.outlet&&e.outlet!==Un&&(e.component=M3),e}function Voe(t,i,e){let n=Gv(t,i._root,e?e._root:void 0);return new Hv(n,i)}function Gv(t,i,e){if(e&&t.shouldReuseRoute(i.value,e.value.snapshot)){let n=e.value;n._futureSnapshot=i.value;let o=zoe(t,i,e);return new Xs(n,o)}else{if(t.shouldAttach(i.value)){let r=t.retrieve(i.value);if(r!==null){let a=r.route;return a.value._futureSnapshot=i.value,a.children=i.children.map(c=>Gv(t,c)),a}}let n=joe(i.value),o=i.children.map(r=>Gv(t,r));return new Xs(n,o)}}function zoe(t,i,e){return i.children.map(n=>{for(let o of e.children)if(t.shouldReuseRoute(n.value,o.value.snapshot))return Gv(t,n,o);return Gv(t,n)})}function joe(t){return new Ye(new qt(t.url),new qt(t.params),new qt(t.queryParams),new qt(t.fragment),new qt(t.data),t.outlet,t.component,t)}var Gf=class{redirectTo;navigationBehaviorOptions;constructor(i,e){this.redirectTo=i,this.navigationBehaviorOptions=e}},u7="ngNavigationCancelingError";function Ty(t,i){let{redirectTo:e,navigationBehaviorOptions:n}=Ym(i)?{redirectTo:i,navigationBehaviorOptions:void 0}:i,o=h7(!1,Aa.Redirect);return o.url=e,o.navigationBehaviorOptions=n,o}function h7(t,i){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[u7]=!0,e.cancellationCode=i,e}function $oe(t){return f7(t)&&Ym(t.url)}function f7(t){return!!t&&t[u7]}var f3=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(i,e,n,o,r){this.routeReuseStrategy=i,this.futureState=e,this.currState=n,this.forwardEvent=o,this.inputBindingEnabled=r}activate(i){let e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,i),o3(this.futureState.root),this.activateChildRoutes(e,n,i)}deactivateChildRoutes(i,e,n){let o=Ff(e);i.children.forEach(r=>{let a=r.value.outlet;this.deactivateRoutes(r,o[a],n),delete o[a]}),Object.values(o).forEach(r=>{this.deactivateRouteAndItsChildren(r,n)})}deactivateRoutes(i,e,n){let o=i.value,r=e?e.value:null;if(o===r)if(o.component){let a=n.getContext(o.outlet);a&&this.deactivateChildRoutes(i,e,a.children)}else this.deactivateChildRoutes(i,e,n);else r&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(i,e){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,e):this.deactivateRouteAndOutlet(i,e)}detachAndStoreRouteSubtree(i,e){let n=e.getContext(i.value.outlet),o=n&&i.value.component?n.children:e,r=Ff(i);for(let a of Object.values(r))this.deactivateRouteAndItsChildren(a,o);if(n&&n.outlet){let a=n.outlet.detach(),c=n.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:a,route:i,contexts:c})}}deactivateRouteAndOutlet(i,e){let n=e.getContext(i.value.outlet),o=n&&i.value.component?n.children:e,r=Ff(i);for(let a of Object.values(r))this.deactivateRouteAndItsChildren(a,o);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(i,e,n){let o=Ff(e);i.children.forEach(r=>{this.activateRoutes(r,o[r.value.outlet],n),this.forwardEvent(new wy(r.value.snapshot))}),i.children.length&&this.forwardEvent(new yy(i.value.snapshot))}activateRoutes(i,e,n){let o=i.value,r=e?e.value:null;if(o3(o),o===r)if(o.component){let a=n.getOrCreateContext(o.outlet);this.activateChildRoutes(i,e,a.children)}else this.activateChildRoutes(i,e,n);else if(o.component){let a=n.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let c=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),a.children.onOutletReAttached(c.contexts),a.attachRef=c.componentRef,a.route=c.route.value,a.outlet&&a.outlet.attach(c.componentRef,c.route.value),o3(c.route.value),this.activateChildRoutes(i,null,a.children)}else a.attachRef=null,a.route=o,a.outlet&&a.outlet.activateWith(o,a.injector),this.activateChildRoutes(i,null,a.children)}else this.activateChildRoutes(i,null,n)}},Ey=class{path;route;constructor(i){this.path=i,this.route=this.path[this.path.length-1]}},Vf=class{component;route;constructor(i,e){this.component=i,this.route=e}};function Hoe(t,i,e){let n=t._root,o=i?i._root:null;return Fv(n,o,e,[n.value])}function Uoe(t){let i=t.routeConfig?t.routeConfig.canActivateChild:null;return!i||i.length===0?null:{node:t,guards:i}}function qf(t,i){let e=Symbol(),n=i.get(t,e);return n===e?typeof t=="function"&&!v5(t)?t:i.get(t):n}function Fv(t,i,e,n,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=Ff(i);return t.children.forEach(a=>{Goe(a,r[a.value.outlet],e,n.concat([a.value]),o),delete r[a.value.outlet]}),Object.entries(r).forEach(([a,c])=>Bv(c,e.getContext(a),o)),o}function Goe(t,i,e,n,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=t.value,a=i?i.value:null,c=e?e.getContext(t.value.outlet):null;if(a&&r.routeConfig===a.routeConfig){let m=Woe(a,r,r.routeConfig.runGuardsAndResolvers);m?o.canActivateChecks.push(new Ey(n)):(r.data=a.data,r._resolvedData=a._resolvedData),r.component?Fv(t,i,c?c.children:null,n,o):Fv(t,i,e,n,o),m&&c&&c.outlet&&c.outlet.isActivated&&o.canDeactivateChecks.push(new Vf(c.outlet.component,a))}else a&&Bv(i,c,o),o.canActivateChecks.push(new Ey(n)),r.component?Fv(t,null,c?c.children:null,n,o):Fv(t,null,e,n,o);return o}function Woe(t,i,e){if(typeof e=="function")return Os(i._environmentInjector,()=>e(t,i));switch(e){case"pathParamsChange":return!Uu(t.url,i.url);case"pathParamsOrQueryParamsChange":return!Uu(t.url,i.url)||!Wc(t.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!u3(t,i)||!Wc(t.queryParams,i.queryParams);default:return!u3(t,i)}}function Bv(t,i,e){let n=Ff(t),o=t.value;Object.entries(n).forEach(([r,a])=>{o.component?i?Bv(a,i.children.getContext(r),e):Bv(a,null,e):Bv(a,i,e)}),o.component?i&&i.outlet&&i.outlet.isActivated?e.canDeactivateChecks.push(new Vf(i.outlet.component,o)):e.canDeactivateChecks.push(new Vf(null,o)):e.canDeactivateChecks.push(new Vf(null,o))}function Qv(t){return typeof t=="function"}function qoe(t){return typeof t=="boolean"}function Xoe(t){return t&&Qv(t.canLoad)}function Qoe(t){return t&&Qv(t.canActivate)}function Yoe(t){return t&&Qv(t.canActivateChild)}function Koe(t){return t&&Qv(t.canDeactivate)}function Zoe(t){return t&&Qv(t.canMatch)}function g7(t){return t instanceof u5||t?.name==="EmptyError"}var ly=Symbol("INITIAL_VALUE");function Wf(){return fn(t=>rr(t.map(i=>i.pipe(wi(1),li(ly)))).pipe(yt(i=>{for(let e of i)if(e!==!0){if(e===ly)return ly;if(e===!1||Joe(e))return e}return!0}),Pn(i=>i!==ly),wi(1)))}function Joe(t){return Ym(t)||t instanceof Gf}function _7(t){return t.aborted?xt(void 0).pipe(wi(1)):new _r(i=>{let e=()=>{i.next(),i.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function v7(t){return rt(_7(t))}function ere(t){return Er(i=>{let{targetSnapshot:e,currentSnapshot:n,guards:{canActivateChecks:o,canDeactivateChecks:r}}=i;return r.length===0&&o.length===0?xt(tt(H({},i),{guardsResult:!0})):tre(r,e,n).pipe(Er(a=>a&&qoe(a)?nre(e,o,t):xt(a)),yt(a=>tt(H({},i),{guardsResult:a})))})}function tre(t,i,e){return or(t).pipe(Er(n=>sre(n.component,n.route,e,i)),Cd(n=>n!==!0,!0))}function nre(t,i,e){return or(i).pipe(dm(n=>B_(ore(n.route.parent,e),ire(n.route,e),are(t,n.path),rre(t,n.route))),Cd(n=>n!==!0,!0))}function ire(t,i){return t!==null&&i&&i(new Sy(t)),xt(!0)}function ore(t,i){return t!==null&&i&&i(new xy(t)),xt(!0)}function rre(t,i){let e=i.routeConfig?i.routeConfig.canActivate:null;if(!e||e.length===0)return xt(!0);let n=e.map(o=>xc(()=>{let r=i._environmentInjector,a=qf(o,r),c=Qoe(a)?a.canActivate(i,t):Os(r,()=>a(i,t));return Wu(c).pipe(Cd())}));return xt(n).pipe(Wf())}function are(t,i){let e=i[i.length-1],o=i.slice(0,i.length-1).reverse().map(r=>Uoe(r)).filter(r=>r!==null).map(r=>xc(()=>{let a=r.guards.map(c=>{let m=r.node._environmentInjector,p=qf(c,m),h=Yoe(p)?p.canActivateChild(e,t):Os(m,()=>p(e,t));return Wu(h).pipe(Cd())});return xt(a).pipe(Wf())}));return xt(o).pipe(Wf())}function sre(t,i,e,n){let o=i&&i.routeConfig?i.routeConfig.canDeactivate:null;if(!o||o.length===0)return xt(!0);let r=o.map(a=>{let c=i._environmentInjector,m=qf(a,c),p=Koe(m)?m.canDeactivate(t,i,e,n):Os(c,()=>m(t,i,e,n));return Wu(p).pipe(Cd())});return xt(r).pipe(Wf())}function lre(t,i,e,n,o){let r=i.canLoad;if(r===void 0||r.length===0)return xt(!0);let a=r.map(c=>{let m=qf(c,t),p=Xoe(m)?m.canLoad(i,e):Os(t,()=>m(i,e)),h=Wu(p);return o?h.pipe(v7(o)):h});return xt(a).pipe(Wf(),b7(n))}function b7(t){return m5(vi(i=>{if(typeof i!="boolean")throw Ty(t,i)}),yt(i=>i===!0))}function cre(t,i,e,n,o,r){let a=i.canMatch;if(!a||a.length===0)return xt(!0);let c=a.map(m=>{let p=qf(m,t),h=Zoe(p)?p.canMatch(i,e,o):Os(t,()=>p(i,e,o));return Wu(h).pipe(v7(r))});return xt(c).pipe(Wf(),b7(n))}var Ld=class t extends Error{segmentGroup;constructor(i){super(),this.segmentGroup=i||null,Object.setPrototypeOf(this,t.prototype)}},Wv=class t extends Error{urlTree;constructor(i){super(),this.urlTree=i,Object.setPrototypeOf(this,t.prototype)}};function dre(t){throw new vn(4e3,!1)}function mre(t){throw h7(!1,Aa.GuardRejected)}var g3=class{urlSerializer;urlTree;constructor(i,e){this.urlSerializer=i,this.urlTree=e}async lineralizeSegments(i,e){let n=[],o=e.root;for(;;){if(n=n.concat(o.segments),o.numberOfChildren===0)return n;if(o.numberOfChildren>1||!o.children[Un])throw dre(`${i.redirectTo}`);o=o.children[Un]}}async applyRedirectCommands(i,e,n,o,r){let a=await pre(e,o,r);if(a instanceof Za)throw new Wv(a);let c=this.applyRedirectCreateUrlTree(a,this.urlSerializer.parse(a),i,n);if(a[0]==="/")throw new Wv(c);return c}applyRedirectCreateUrlTree(i,e,n,o){let r=this.createSegmentGroup(i,e.root,n,o);return new Za(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(i,e){let n={};return Object.entries(i).forEach(([o,r])=>{if(typeof r=="string"&&r[0]===":"){let c=r.substring(1);n[o]=e[c]}else n[o]=r}),n}createSegmentGroup(i,e,n,o){let r=this.createSegments(i,e.segments,n,o),a={};return Object.entries(e.children).forEach(([c,m])=>{a[c]=this.createSegmentGroup(i,m,n,o)}),new ao(r,a)}createSegments(i,e,n,o){return e.map(r=>r.path[0]===":"?this.findPosParam(i,r,o):this.findOrReturn(r,n))}findPosParam(i,e,n){let o=n[e.path.substring(1)];if(!o)throw new vn(4001,!1);return o}findOrReturn(i,e){let n=0;for(let o of e){if(o.path===i.path)return e.splice(n),o;n++}return i}};function pre(t,i,e){if(typeof t=="string")return Promise.resolve(t);let n=t;return py(Wu(Os(e,()=>n(i))))}function ure(t,i){return t.providers&&!t._injector&&(t._injector=wC(t.providers,i,`Route: ${t.path}`)),t._injector??i}function qc(t){return t.outlet||Un}function hre(t,i){let e=t.filter(n=>qc(n)===i);return e.push(...t.filter(n=>qc(n)!==i)),e}var _3={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function C7(t){return{routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function fre(t,i,e,n,o,r,a){let c=x7(t,i,e);if(!c.matched)return xt(c);let m=C7(r(c));return n=ure(i,n),cre(n,i,e,o,m,a).pipe(yt(p=>p===!0?c:H({},_3)))}function x7(t,i,e){if(i.path==="")return i.pathMatch==="full"&&(t.hasChildren()||e.length>0)?H({},_3):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let o=(i.matcher||WB)(e,t,i);if(!o)return H({},_3);let r={};Object.entries(o.posParams??{}).forEach(([c,m])=>{r[c]=m.path});let a=o.consumed.length>0?H(H({},r),o.consumed[o.consumed.length-1].parameters):r;return{matched:!0,consumedSegments:o.consumed,remainingSegments:e.slice(o.consumed.length),parameters:a,positionalParamSegments:o.posParams??{}}}function UB(t,i,e,n){return e.length>0&&vre(t,e,n)?{segmentGroup:new ao(i,_re(n,new ao(e,t.children))),slicedSegments:[]}:e.length===0&&bre(t,e,n)?{segmentGroup:new ao(t.segments,gre(t,e,n,t.children)),slicedSegments:e}:{segmentGroup:new ao(t.segments,t.children),slicedSegments:e}}function gre(t,i,e,n){let o={};for(let r of e)if(Py(t,i,r)&&!n[qc(r)]){let a=new ao([],{});o[qc(r)]=a}return H(H({},n),o)}function _re(t,i){let e={};e[Un]=i;for(let n of t)if(n.path===""&&qc(n)!==Un){let o=new ao([],{});e[qc(n)]=o}return e}function vre(t,i,e){return e.some(n=>Py(t,i,n)&&qc(n)!==Un)}function bre(t,i,e){return e.some(n=>Py(t,i,n))}function Py(t,i,e){return(t.hasChildren()||i.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Cre(t,i,e){return i.length===0&&!t.children[e]}var v3=class{};async function xre(t,i,e,n,o,r,a="emptyOnly",c){return new b3(t,i,e,n,o,a,r,c).recognize()}var yre=31,b3=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(i,e,n,o,r,a,c,m){this.injector=i,this.configLoader=e,this.rootComponentType=n,this.config=o,this.urlTree=r,this.paramsInheritanceStrategy=a,this.urlSerializer=c,this.abortSignal=m,this.applyRedirects=new g3(this.urlSerializer,this.urlTree)}noMatchError(i){return new vn(4002,`'${i.segmentGroup}'`)}async recognize(){let i=UB(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:n}=await this.match(i),o=new Xs(n,e),r=new Uv("",o),a=i7(n,[],this.urlTree.queryParams,this.urlTree.fragment);return a.queryParams=this.urlTree.queryParams,r.url=this.urlSerializer.serialize(a),{state:r,tree:a}}async match(i){let e=new Uf([],Object.freeze({}),Object.freeze(H({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Un,this.rootComponentType,null,{},this.injector);try{return{children:await this.processSegmentGroup(this.injector,this.config,i,Un,e),rootSnapshot:e}}catch(n){if(n instanceof Wv)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Ld?this.noMatchError(n):n}}async processSegmentGroup(i,e,n,o,r){if(n.segments.length===0&&n.hasChildren())return this.processChildren(i,e,n,r);let a=await this.processSegment(i,e,n,n.segments,o,!0,r);return a instanceof Xs?[a]:[]}async processChildren(i,e,n,o){let r=[];for(let m of Object.keys(n.children))m==="primary"?r.unshift(m):r.push(m);let a=[];for(let m of r){let p=n.children[m],h=hre(e,m),g=await this.processSegmentGroup(i,h,p,m,o);a.push(...g)}let c=y7(a);return Sre(c),c}async processSegment(i,e,n,o,r,a,c){for(let m of e)try{return await this.processSegmentAgainstRoute(m._injector??i,e,m,n,o,r,a,c)}catch(p){if(p instanceof Ld||g7(p))continue;throw p}if(Cre(n,o,r))return new v3;throw new Ld(n)}async processSegmentAgainstRoute(i,e,n,o,r,a,c,m){if(qc(n)!==a&&(a===Un||!Py(o,r,n)))throw new Ld(o);if(n.redirectTo===void 0)return this.matchSegmentAgainstRoute(i,o,n,r,a,m);if(this.allowRedirects&&c)return this.expandSegmentAgainstRouteUsingRedirect(i,o,e,n,r,a,m);throw new Ld(o)}async expandSegmentAgainstRouteUsingRedirect(i,e,n,o,r,a,c){let{matched:m,parameters:p,consumedSegments:h,positionalParamSegments:g,remainingSegments:M}=x7(e,o,r);if(!m)throw new Ld(e);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>yre&&(this.allowRedirects=!1));let C=this.createSnapshot(i,o,r,p,c);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let _=await this.applyRedirects.applyRedirectCommands(h,o.redirectTo,g,C7(C),i),w=await this.applyRedirects.lineralizeSegments(o,_);return this.processSegment(i,n,e,w.concat(M),a,!1,c)}createSnapshot(i,e,n,o,r){let a=new Uf(n,o,Object.freeze(H({},this.urlTree.queryParams)),this.urlTree.fragment,Mre(e),qc(e),e.component??e._loadedComponent??null,e,kre(e),i),c=y3(a,r,this.paramsInheritanceStrategy);return a.params=Object.freeze(c.params),a.data=Object.freeze(c.data),a}async matchSegmentAgainstRoute(i,e,n,o,r,a){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let c=I=>this.createSnapshot(i,n,I.consumedSegments,I.parameters,a),m=await py(fre(e,n,o,i,this.urlSerializer,c,this.abortSignal));if(n.path==="**"&&(e.children={}),!m?.matched)throw new Ld(e);i=n._injector??i;let{routes:p}=await this.getChildConfig(i,n,o),h=n._loadedInjector??i,{parameters:g,consumedSegments:M,remainingSegments:C}=m,_=this.createSnapshot(i,n,M,g,a),{segmentGroup:w,slicedSegments:S}=UB(e,M,C,p);if(S.length===0&&w.hasChildren()){let I=await this.processChildren(h,p,w,_);return new Xs(_,I)}if(p.length===0&&S.length===0)return new Xs(_,[]);let y=qc(n)===r,k=await this.processSegment(h,p,w,S,y?Un:r,!0,_);return new Xs(_,k instanceof Xs?[k]:[])}async getChildConfig(i,e,n){if(e.children)return{routes:e.children,injector:i};if(e.loadChildren){if(e._loadedRoutes!==void 0){let r=e._loadedNgModuleFactory;return r&&!e._loadedInjector&&(e._loadedInjector=r.create(i).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await py(lre(i,e,n,this.urlSerializer,this.abortSignal))){let r=await this.configLoader.loadChildren(i,e);return e._loadedRoutes=r.routes,e._loadedInjector=r.injector,e._loadedNgModuleFactory=r.factory,r}throw mre(e)}return{routes:[],injector:i}}};function Sre(t){t.sort((i,e)=>i.value.outlet===Un?-1:e.value.outlet===Un?1:i.value.outlet.localeCompare(e.value.outlet))}function wre(t){let i=t.value.routeConfig;return i&&i.path===""}function y7(t){let i=[],e=new Set;for(let n of t){if(!wre(n)){i.push(n);continue}let o=i.find(r=>n.value.routeConfig===r.value.routeConfig);o!==void 0?(o.children.push(...n.children),e.add(o)):i.push(n)}for(let n of e){let o=y7(n.children);i.push(new Xs(n.value,o))}return i.filter(n=>!e.has(n))}function Mre(t){return t.data||{}}function kre(t){return t.resolve||{}}function Tre(t,i,e,n,o,r,a){return Er(async c=>{let{state:m,tree:p}=await xre(t,i,e,n,c.extractedUrl,o,r,a);return tt(H({},c),{targetSnapshot:m,urlAfterRedirects:p})})}function Ere(t){return Er(i=>{let{targetSnapshot:e,guards:{canActivateChecks:n}}=i;if(!n.length)return xt(i);let o=new Set(n.map(c=>c.route)),r=new Set;for(let c of o)if(!r.has(c))for(let m of S7(c))r.add(m);let a=0;return or(r).pipe(dm(c=>o.has(c)?Dre(c,e,t):(c.data=y3(c,c.parent,t).resolve,xt(void 0))),vi(()=>a++),z_(1),Er(c=>a===r.size?xt(i):Zr))})}function S7(t){let i=t.children.map(e=>S7(e)).flat();return[t,...i]}function Dre(t,i,e){let n=t.routeConfig,o=t._resolve;return n?.title!==void 0&&!m7(n)&&(o[qv]=n.title),xc(()=>(t.data=y3(t,t.parent,e).resolve,Pre(o,t,i).pipe(yt(r=>(t._resolvedData=r,t.data=H(H({},t.data),r),null)))))}function Pre(t,i,e){let n=a3(t);if(n.length===0)return xt({});let o={};return or(n).pipe(Er(r=>Ire(t[r],i,e).pipe(Cd(),vi(a=>{if(a instanceof Gf)throw Ty(new Bd,a);o[r]=a}))),z_(1),yt(()=>o),hi(r=>g7(r)?Zr:zi(r)))}function Ire(t,i,e){let n=i._environmentInjector,o=qf(t,n),r=o.resolve?o.resolve(i,e):Os(n,()=>o(i,e));return Wu(r)}function GB(t){return fn(i=>{let e=t(i);return e?or(e).pipe(yt(()=>i)):xt(i)})}var T3=(()=>{class t{buildTitle(e){let n,o=e.root;for(;o!==void 0;)n=this.getResolvedTitleForRoute(o)??n,o=o.children.find(r=>r.outlet===Un);return n}getResolvedTitleForRoute(e){return e.data[qv]}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:()=>f(w7),providedIn:"root"})}return t})(),w7=(()=>{class t extends T3{title;constructor(e){super(),this.title=e}updateTitle(e){let n=this.buildTitle(e);n!==void 0&&this.title.setTitle(n)}static \u0275fac=function(n){return new(n||t)(ge(um))};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Zm=new kt("",{factory:()=>({})}),Xf=new kt(""),Iy=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(O5);async loadComponent(e,n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Promise.resolve(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let o=(async()=>{try{let r=await XB(Os(e,()=>n.loadComponent())),a=await T7(k7(r));return this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=a,a}finally{this.componentLoaders.delete(n)}})();return this.componentLoaders.set(n,o),o}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return Promise.resolve({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let o=(async()=>{try{let r=await M7(n,this.compiler,e,this.onLoadEndListener);return n._loadedRoutes=r.routes,n._loadedInjector=r.injector,n._loadedNgModuleFactory=r.factory,r}finally{this.childrenLoaders.delete(n)}})();return this.childrenLoaders.set(n,o),o}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();async function M7(t,i,e,n){let o=await XB(Os(e,()=>t.loadChildren())),r=await T7(k7(o)),a;r instanceof w5||Array.isArray(r)?a=r:a=await i.compileModuleAsync(r),n&&n(t);let c,m,p=!1,h;return Array.isArray(a)?(m=a,p=!0):(c=a.create(e).injector,h=a,m=c.get(Xf,[],{optional:!0,self:!0}).flat()),{routes:m.map(k3),injector:c,factory:h}}function Are(t){return t&&typeof t=="object"&&"default"in t}function k7(t){return Are(t)?t.default:t}async function T7(t){return t}var Ay=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:()=>f(Ore),providedIn:"root"})}return t})(),Ore=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,n){return e}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),E3=new kt(""),D3=new kt("");function E7(t,i,e){let n=t.get(D3),o=t.get(Pi);if(!o.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,new Promise(p=>setTimeout(p));let r,a=new Promise(p=>{r=p}),c=o.startViewTransition(()=>(r(),Nre(t)));c.updateCallbackDone.catch(p=>{}),c.ready.catch(p=>{}),c.finished.catch(p=>{});let{onViewTransitionCreated:m}=n;return m&&Os(t,()=>m({transition:c,from:i,to:e})),a}function Nre(t){return new Promise(i=>{ar({read:()=>setTimeout(i)},{injector:t})})}var Rre=()=>{},P3=new kt(""),Oy=(()=>{class t{currentNavigation=me(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=me(null);events=new Le;transitionAbortWithErrorSubject=new Le;configLoader=f(Iy);environmentInjector=f(Xl);destroyRef=f(mm);urlSerializer=f(Km);rootContexts=f(qu);location=f(yc);inputBindingEnabled=f(Xv,{optional:!0})!==null;titleStrategy=f(T3);options=f(Zm,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(Ay);createViewTransition=f(E3,{optional:!0});navigationErrorHandler=f(P3,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>xt(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=o=>this.events.next(new by(o)),n=o=>this.events.next(new Cy(o));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let n=++this.navigationId;sr(()=>{this.transitions?.next(tt(H({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:n,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new qt(null),this.transitions.pipe(Pn(n=>n!==null),fn(n=>{let o=!1,r=new AbortController,a=()=>!o&&this.currentTransition?.id===n.id;return xt(n).pipe(fn(c=>{if(this.navigationId>n.id)return this.cancelNavigationTransition(n,"",Aa.SupersededByNewNavigation),Zr;this.currentTransition=n;let m=this.lastSuccessfulNavigation();this.currentNavigation.set({id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,targetBrowserUrl:typeof c.extras.browserUrl=="string"?this.urlSerializer.parse(c.extras.browserUrl):c.extras.browserUrl,trigger:c.source,extras:c.extras,previousNavigation:m?tt(H({},m),{previousNavigation:null}):null,abort:()=>r.abort(),routesRecognizeHandler:c.routesRecognizeHandler,beforeActivateHandler:c.beforeActivateHandler});let p=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),h=c.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!p&&h!=="reload")return this.events.next(new Qc(c.id,this.urlSerializer.serialize(c.rawUrl),"",zf.IgnoredSameUrlNavigation)),c.resolve(!1),Zr;if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return xt(c).pipe(fn(g=>(this.events.next(new Xc(g.id,this.urlSerializer.serialize(g.extractedUrl),g.source,g.restoredState)),g.id!==this.navigationId?Zr:Promise.resolve(g))),Tre(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,r.signal),vi(g=>{n.targetSnapshot=g.targetSnapshot,n.urlAfterRedirects=g.urlAfterRedirects,this.currentNavigation.update(M=>(M.finalUrl=g.urlAfterRedirects,M)),this.events.next(new $v)}),fn(g=>or(n.routesRecognizeHandler.deferredHandle??xt(void 0)).pipe(yt(()=>g))),vi(()=>{let g=new jv(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(g)}));if(p&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:g,extractedUrl:M,source:C,restoredState:_,extras:w}=c,S=new Xc(g,this.urlSerializer.serialize(M),C,_);this.events.next(S);let y=c7(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=n=tt(H({},c),{targetSnapshot:y,urlAfterRedirects:M,extras:tt(H({},w),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(k=>(k.finalUrl=M,k)),xt(n)}else return this.events.next(new Qc(c.id,this.urlSerializer.serialize(c.extractedUrl),"",zf.IgnoredByUrlHandlingStrategy)),c.resolve(!1),Zr}),yt(c=>{let m=new fy(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);return this.events.next(m),this.currentTransition=n=tt(H({},c),{guards:Hoe(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),n}),ere(c=>this.events.next(c)),fn(c=>{if(n.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!="boolean")throw Ty(this.urlSerializer,c.guardsResult);let m=new gy(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);if(this.events.next(m),!a())return Zr;if(!c.guardsResult)return this.cancelNavigationTransition(c,"",Aa.GuardRejected),Zr;if(c.guards.canActivateChecks.length===0)return xt(c);let p=new _y(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);if(this.events.next(p),!a())return Zr;let h=!1;return xt(c).pipe(Ere(this.paramsInheritanceStrategy),vi({next:()=>{h=!0;let g=new vy(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(g)},complete:()=>{h||this.cancelNavigationTransition(c,"",Aa.NoDataFromResolver)}}))}),GB(c=>{let m=h=>{let g=[];if(h.routeConfig?._loadedComponent)h.component=h.routeConfig?._loadedComponent;else if(h.routeConfig?.loadComponent){let M=h._environmentInjector;g.push(this.configLoader.loadComponent(M,h.routeConfig).then(C=>{h.component=C}))}for(let M of h.children)g.push(...m(M));return g},p=m(c.targetSnapshot.root);return p.length===0?xt(c):or(Promise.all(p).then(()=>c))}),GB(()=>this.afterPreactivation()),fn(()=>{let{currentSnapshot:c,targetSnapshot:m}=n,p=this.createViewTransition?.(this.environmentInjector,c.root,m.root);return p?or(p).pipe(yt(()=>n)):xt(n)}),wi(1),fn(c=>{let m=Voe(e.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);this.currentTransition=n=c=tt(H({},c),{targetRouterState:m}),this.currentNavigation.update(h=>(h.targetRouterState=m,h)),this.events.next(new $f);let p=n.beforeActivateHandler.deferredHandle;return p?or(p.then(()=>c)):xt(c)}),vi(c=>{new f3(e.routeReuseStrategy,n.targetRouterState,n.currentRouterState,m=>this.events.next(m),this.inputBindingEnabled).activate(this.rootContexts),a()&&(o=!0,this.currentNavigation.update(m=>(m.abort=Rre,m)),this.lastSuccessfulNavigation.set(sr(this.currentNavigation)),this.events.next(new Or(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0))}),rt(_7(r.signal).pipe(Pn(()=>!o&&!n.targetRouterState),vi(()=>{this.cancelNavigationTransition(n,r.signal.reason+"",Aa.Aborted)}))),vi({complete:()=>{o=!0}}),rt(this.transitionAbortWithErrorSubject.pipe(vi(c=>{throw c}))),bC(()=>{r.abort(),o||this.cancelNavigationTransition(n,"",Aa.SupersededByNewNavigation),this.currentTransition?.id===n.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),hi(c=>{if(o=!0,this.destroyed)return n.resolve(!1),Zr;if(f7(c))this.events.next(new xs(n.id,this.urlSerializer.serialize(n.extractedUrl),c.message,c.cancellationCode)),$oe(c)?this.events.next(new Hf(c.url,c.navigationBehaviorOptions)):n.resolve(!1);else{let m=new Vd(n.id,this.urlSerializer.serialize(n.extractedUrl),c,n.targetSnapshot??void 0);try{let p=Os(this.environmentInjector,()=>this.navigationErrorHandler?.(m));if(p instanceof Gf){let{message:h,cancellationCode:g}=Ty(this.urlSerializer,p);this.events.next(new xs(n.id,this.urlSerializer.serialize(n.extractedUrl),h,g)),this.events.next(new Hf(p.redirectTo,p.navigationBehaviorOptions))}else throw this.events.next(m),c}catch(p){this.options.resolveNavigationPromiseOnError?n.resolve(!1):n.reject(p)}}return Zr}))}))}cancelNavigationTransition(e,n,o){let r=new xs(e.id,this.urlSerializer.serialize(e.extractedUrl),n,o);this.events.next(r),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),n=sr(this.currentNavigation),o=n?.targetBrowserUrl??n?.extractedUrl;return e.toString()!==o?.toString()&&!n?.extras.skipLocationChange}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Fre(t){return t!==Bf}var D7=new kt("");var P7=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:()=>f(Lre),providedIn:"root"})}return t})(),Dy=class{shouldDetach(i){return!1}store(i,e){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,e){return i.routeConfig===e.routeConfig}shouldDestroyInjector(i){return!0}},Lre=(()=>{class t extends Dy{static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ny=(()=>{class t{urlSerializer=f(Km);options=f(Zm,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(yc);urlHandlingStrategy=f(Ay);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new Za;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:n,targetBrowserUrl:o}){let r=e!==void 0?this.urlHandlingStrategy.merge(e,n):n,a=o??r;return a instanceof Za?this.urlSerializer.serialize(a):a}commitTransition({targetRouterState:e,finalUrl:n,initialUrl:o}){n&&e?(this.currentUrlTree=n,this.rawUrlTree=this.urlHandlingStrategy.merge(n,o),this.routerState=e):this.rawUrlTree=o}routerState=c7(null,f(Xl));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:()=>f(Bre),providedIn:"root"})}return t})(),Bre=(()=>{class t extends Ny{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(n=>{n.type==="popstate"&&setTimeout(()=>{e(n.url,n.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(e,n){e instanceof Xc?this.updateStateMemento():e instanceof Qc?this.commitTransition(n):e instanceof jv?this.urlUpdateStrategy==="eager"&&(n.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(n),n)):e instanceof $f?(this.commitTransition(n),this.urlUpdateStrategy==="deferred"&&!n.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(n),n)):e instanceof xs&&!l7(e)?this.restoreHistory(n):e instanceof Vd?this.restoreHistory(n,!0):e instanceof Or&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:n,id:o}){let{replaceUrl:r,state:a}=n;if(this.location.isCurrentPathEqualTo(e)||r){let c=this.browserPageId,m=H(H({},a),this.generateNgRouterState(o,c));this.location.replaceState(e,"",m)}else{let c=H(H({},a),this.generateNgRouterState(o,this.browserPageId+1));this.location.go(e,"",c)}}restoreHistory(e,n=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,r=this.currentPageId-o;r!==0?this.location.historyGo(r):this.getCurrentUrlTree()===e.finalUrl&&r===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(n&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,n){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:n}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ry(t,i){t.events.pipe(Pn(e=>e instanceof Or||e instanceof xs||e instanceof Vd||e instanceof Qc),yt(e=>e instanceof Or||e instanceof Qc?0:(e instanceof xs?e.code===Aa.Redirect||e.code===Aa.SupersededByNewNavigation:!1)?2:1),Pn(e=>e!==2),wi(1)).subscribe(()=>{i()})}var ut=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(k5);stateManager=f(Ny);options=f(Zm,{optional:!0})||{};pendingTasks=f(C5);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(Oy);urlSerializer=f(Km);location=f(yc);urlHandlingStrategy=f(Ay);injector=f(Xl);_events=new Le;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(P7);injectorCleanup=f(D7,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(Xf,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Xv,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new so;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(n=>{try{let o=this.navigationTransitions.currentTransition,r=sr(this.navigationTransitions.currentNavigation);if(o!==null&&r!==null){if(this.stateManager.handleRouterEvent(n,r),n instanceof xs&&n.code!==Aa.Redirect&&n.code!==Aa.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof Or)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(n instanceof Hf){let a=n.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(n.url,o.currentRawUrl),m=H({scroll:o.extras.scroll,browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Fre(o.source)},a);this.scheduleNavigation(c,Bf,null,m,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}Loe(n)&&this._events.next(n)}catch(o){this.navigationTransitions.transitionAbortWithErrorSubject.next(o)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Bf,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,n,o,r)=>{this.navigateToSyncWithBrowser(e,o,n,r)})}navigateToSyncWithBrowser(e,n,o,r){let a=o?.navigationId?o:null;if(o){let m=H({},o);delete m.navigationId,delete m.\u0275routerPageId,Object.keys(m).length!==0&&(r.state=m)}let c=this.parseUrl(e);this.scheduleNavigation(c,n,a,r).catch(m=>{this.disposed||this.injector.get(xC)(m)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return sr(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(k3),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,n={}){let{relativeTo:o,queryParams:r,fragment:a,queryParamsHandling:c,preserveFragment:m}=n,p=m?this.currentUrlTree.fragment:a,h=null;switch(c??this.options.defaultQueryParamsHandling){case"merge":h=H(H({},this.currentUrlTree.queryParams),r);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=r||null}h!==null&&(h=this.removeEmptyProps(h));let g;try{let M=o?o.snapshot:this.routerState.snapshot.root;g=o7(M)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),g=this.currentUrlTree.root}return r7(g,e,h,p??null,this.urlSerializer)}navigateByUrl(e,n={skipLocationChange:!1}){let o=Ym(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(r,Bf,null,n)}navigate(e,n={skipLocationChange:!1}){return Vre(e),this.navigateByUrl(this.createUrlTree(e,n),n)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(_5(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,n){let o;if(n===!0?o=H({},C3):n===!1?o=H({},Vv):o=H(H({},Vv),n),Ym(e))return s3(this.currentUrlTree,e,o);let r=this.parseUrl(e);return s3(this.currentUrlTree,r,o)}removeEmptyProps(e){return Object.entries(e).reduce((n,[o,r])=>(r!=null&&(n[o]=r),n),{})}scheduleNavigation(e,n,o,r,a){if(this.disposed)return Promise.resolve(!1);let c,m,p;a?(c=a.resolve,m=a.reject,p=a.promise):p=new Promise((g,M)=>{c=g,m=M});let h=this.pendingTasks.add();return Ry(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:r,resolve:c,reject:m,promise:p,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),p.catch(Promise.reject.bind(Promise))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Vre(t){for(let i=0;i{class t{router=f(ut);stateManager=f(Ny);fragment=me("");queryParams=me({});path=me("");serializer=f(Km);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof Or&&this.updateState()})}updateState(){let{fragment:e,root:n,queryParams:o}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(o),this.path.set(this.serializer.serialize(new Za(n)))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),cn=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=f(new ka("href"),{optional:!0});reactiveHref=R5(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return sr(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}set target(e){this._target.set(e)}get target(){return sr(this._target)}_target=me(void 0);set queryParams(e){this._queryParams.set(e)}get queryParams(){return sr(this._queryParams)}_queryParams=me(void 0,{equal:()=>!1});set fragment(e){this._fragment.set(e)}get fragment(){return sr(this._fragment)}_fragment=me(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e)}get queryParamsHandling(){return sr(this._queryParamsHandling)}_queryParamsHandling=me(void 0);set state(e){this._state.set(e)}get state(){return sr(this._state)}_state=me(void 0,{equal:()=>!1});set info(e){this._info.set(e)}get info(){return sr(this._info)}_info=me(void 0,{equal:()=>!1});set relativeTo(e){this._relativeTo.set(e)}get relativeTo(){return sr(this._relativeTo)}_relativeTo=me(void 0);set preserveFragment(e){this._preserveFragment.set(e)}get preserveFragment(){return sr(this._preserveFragment)}_preserveFragment=me(!1);set skipLocationChange(e){this._skipLocationChange.set(e)}get skipLocationChange(){return sr(this._skipLocationChange)}_skipLocationChange=me(!1);set replaceUrl(e){this._replaceUrl.set(e)}get replaceUrl(){return sr(this._replaceUrl)}_replaceUrl=me(!1);isAnchorElement;onChanges=new Le;applicationErrorHandler=f(xC);options=f(Zm,{optional:!0});reactiveRouterState=f(zre);constructor(e,n,o,r,a,c){this.router=e,this.route=n,this.tabIndexAttribute=o,this.renderer=r,this.el=a,this.locationStrategy=c;let m=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=m==="a"||m==="area"||!!(typeof customElements=="object"&&customElements.get(m)?.observedAttributes?.includes?.("href"))}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.onChanges.next(this)}routerLinkInput=me(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(Ym(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,n,o,r,a){let c=this._urlTree();if(c===null||this.isAnchorElement&&(e!==0||n||o||r||a||typeof this.target=="string"&&this.target!="_self"))return!0;let m={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(c,m)?.catch(p=>{this.applicationErrorHandler(p)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,n){let o=this.renderer,r=this.el.nativeElement;n!==null?o.setAttribute(r,e,n):o.removeAttribute(r,e)}_urlTree=ri(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=o=>o==="preserve"||o==="merge";(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let n=this.routerLinkInput();return n===null||!this.router.createUrlTree?null:Ym(n)?n:this.router.createUrlTree(n,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,n)=>this.computeHref(e)===this.computeHref(n)});get urlTree(){return sr(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null}static \u0275fac=function(n){return new(n||t)(st(ut),st(Ye),x5("tabindex"),st(ii),st(Lt),st($_))};static \u0275dir=ft({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(n,o){n&1&&v("click",function(a){return o.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),n&2&&It("href",o.reactiveHref(),S5)("target",o._target())},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",dt],skipLocationChange:[2,"skipLocationChange","skipLocationChange",dt],replaceUrl:[2,"replaceUrl","replaceUrl",dt],routerLink:"routerLink"},features:[un]})}return t})(),A3=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new ve;link=f(cn,{optional:!0});constructor(e,n,o,r){this.router=e,this.element=n,this.renderer=o,this.cdr=r,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof Or&&this.update()})}ngAfterContentInit(){xt(this.links.changes,xt(null)).pipe(L_()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(n=>!!n).map(n=>n.onChanges);this.linkInputChangesSubscription=or(e).pipe(L_()).subscribe(n=>{this._isActive!==this.isLinkActive(this.router)(n)&&this.update()})}set routerLinkActive(e){let n=Array.isArray(e)?e:e.split(" ");this.classes=n.filter(o=>!!o)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(n=>{e?this.renderer.addClass(this.element.nativeElement,n):this.renderer.removeClass(this.element.nativeElement,n)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let n=jre(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact??!1?H({},C3):H({},Vv);return o=>{let r=o.urlTree;return r?sr(x3(r,e,n)):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(n){return new(n||t)(st(ut),st(Lt),st(ii),st(K))};static \u0275dir=ft({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(n,o,r){if(n&1&&$i(r,cn,5),n&2){let a;gt(a=_t())&&(o.links=a)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[un]})}return t})();function jre(t){let i=t;return!!(i.paths||i.matrixParams||i.queryParams||i.fragment)}var Yv=class{};var I7=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,n,o,r){this.router=e,this.injector=n,this.preloadingStrategy=o,this.loader=r}setUpPreloading(){this.subscription=this.router.events.pipe(Pn(e=>e instanceof Or),dm(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription?.unsubscribe()}processRoutes(e,n){let o=[];for(let r of n){r.providers&&!r._injector&&(r._injector=wC(r.providers,e,""));let a=r._injector??e;r._loadedNgModuleFactory&&!r._loadedInjector&&(r._loadedInjector=r._loadedNgModuleFactory.create(a).injector);let c=r._loadedInjector??a;(r.loadChildren&&!r._loadedRoutes&&r.canLoad===void 0||r.loadComponent&&!r._loadedComponent)&&o.push(this.preloadConfig(a,r)),(r.children||r._loadedRoutes)&&o.push(this.processRoutes(c,r.children??r._loadedRoutes))}return or(o).pipe(L_())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{if(e.destroyed)return xt(null);let o;n.loadChildren&&n.canLoad===void 0?o=or(this.loader.loadChildren(e,n)):o=xt(null);let r=o.pipe(Er(a=>a===null?xt(void 0):(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,n._loadedNgModuleFactory=a.factory,this.processRoutes(a.injector??e,a.routes))));if(n.loadComponent&&!n._loadedComponent){let a=this.loader.loadComponent(e,n);return or([r,a]).pipe(L_())}else return r})}static \u0275fac=function(n){return new(n||t)(ge(ut),ge(Xl),ge(Yv),ge(Iy))};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),A7=new kt(""),$re=(()=>{class t{options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=Bf;restoredId=0;store={};urlSerializer=f(Km);zone=f(bi);viewportScroller=f(yE);transitions=f(Oy);constructor(e){this.options=e,this.options.scrollPositionRestoration||="disabled",this.options.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Xc?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Or?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof Qc&&e.code===zf.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{if(!(e instanceof jf)||e.scrollBehavior==="manual")return;let n={behavior:"instant"};e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0],n):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position,n):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(e,n){let o=sr(this.transitions.currentNavigation)?.extras.scroll;this.zone.runOutsideAngular(async()=>{await new Promise(r=>{setTimeout(r),typeof requestAnimationFrame<"u"&&requestAnimationFrame(r)}),this.zone.run(()=>{this.transitions.events.next(new jf(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,n,o))})})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(n){SC()};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})();function Hre(){return f(ut).routerState.root}function Kv(t,i){return{\u0275kind:t,\u0275providers:i}}function Ure(){let t=f(Di);return i=>{let e=t.get(xE);if(i!==e.components[0])return;let n=t.get(ut),o=t.get(O7);t.get(O3)===1&&n.initialNavigation(),t.get(F7,null,{optional:!0})?.setUpPreloading(),t.get(A7,null,{optional:!0})?.init(),n.resetRootComponentType(e.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var O7=new kt("",{factory:()=>new Le}),O3=new kt("",{factory:()=>1});function N7(){let t=[{provide:y5,useValue:!0},{provide:O3,useValue:0},CE(()=>{let i=f(Di);return i.get(V5,Promise.resolve()).then(()=>new Promise(n=>{let o=i.get(ut),r=i.get(O7);Ry(o,()=>{n(!0)}),i.get(Oy).afterPreactivation=()=>(n(!0),r.closed?xt(void 0):r),o.initialNavigation()}))})];return Kv(2,t)}function R7(){let t=[CE(()=>{f(ut).setUpLocationChangeListener()}),{provide:O3,useValue:2}];return Kv(3,t)}var F7=new kt("");function L7(t){return Kv(0,[{provide:F7,useExisting:I7},{provide:Yv,useExisting:t}])}function B7(){return Kv(8,[w3,{provide:Xv,useExisting:w3}])}function V7(t){bE("NgRouterViewTransitions");let i=[{provide:E3,useValue:E7},{provide:D3,useValue:H({skipNextTransition:!!t?.skipInitialTransition},t)}];return Kv(9,i)}var z7=[yc,{provide:Km,useClass:Bd},ut,qu,{provide:Ye,useFactory:Hre},Iy,[]],at=(()=>{class t{constructor(){}static forRoot(e,n){return{ngModule:t,providers:[z7,[],{provide:Xf,multi:!0,useValue:e},[],n?.errorHandler?{provide:P3,useValue:n.errorHandler}:[],{provide:Zm,useValue:n||{}},n?.useHash?Wre():qre(),Gre(),n?.preloadingStrategy?L7(n.preloadingStrategy).\u0275providers:[],n?.initialNavigation?Xre(n):[],n?.bindToComponentInputs?B7().\u0275providers:[],n?.enableViewTransitions?V7().\u0275providers:[],Qre()]}}static forChild(e){return{ngModule:t,providers:[{provide:Xf,multi:!0,useValue:e}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({})}return t})();function Gre(){return{provide:A7,useFactory:()=>{let t=f(yE),i=f(Zm);return i.scrollOffset&&t.setOffset(i.scrollOffset),new $re(i)}}}function Wre(){return{provide:$_,useClass:j5}}function qre(){return{provide:$_,useClass:z5}}function Xre(t){return[t.initialNavigation==="disabled"?R7().\u0275providers:[],t.initialNavigation==="enabledBlocking"?N7().\u0275providers:[]]}var I3=new kt("");function Qre(){return[{provide:I3,useFactory:Ure},{provide:D5,multi:!0,useExisting:I3}]}var Xu=class{visible;error;clear;constructor(i,e,n=!1){this.visible=i,this.error=e,this.clear=n}},zo=(()=>{class t{state=new qt(new Xu(!1));constructor(){}setError(e){this.state.next(new Xu(!1,e.error))}clear(){this.state.next(new Xu(!1,null,!0))}activate(){this.state.next(new Xu(!0))}deactivate(){this.state.next(new Xu(!1))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})();var Yre=["determinateSpinner"];function Kre(t,i){if(t&1&&(Vn(),s(0,"svg",11),F(1,"circle",12),l()),t&2){let e=b();It("viewBox",e._viewBox()),u(),yn("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),It("r",e._circleRadius())}}var Zre=new kt("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:j7})}),j7=100,Jre=10,Xo=(()=>{class t{_elementRef=f(Lt);_noopAnimations;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";_determinateCircle;constructor(){let e=f(Zre),n=GC(),o=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!e&&!e._forceAnimations,this.mode=o.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&o.classList.add("mat-progress-spinner-reduced-motion"),e&&(e.color&&(this.color=this._defaultColor=e.color),e.diameter&&(this.diameter=e.diameter),e.strokeWidth&&(this.strokeWidth=e.strokeWidth))}mode;get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0))}_value=0;get diameter(){return this._diameter}set diameter(e){this._diameter=e||0}_diameter=j7;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0}_strokeWidth;_circleRadius(){return(this.diameter-Jre)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,o){if(n&1&&gn(Yre,5),n&2){let r;gt(r=_t())&&(o._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,o){n&2&&(It("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",o.mode==="determinate"?o.value:null)("mode",o.mode),Mo("mat-"+o.color),yn("width",o.diameter,"px")("height",o.diameter,"px")("--mat-progress-spinner-size",o.diameter+"px")("--mat-progress-spinner-active-indicator-width",o.diameter+"px"),je("_mat-animation-noopable",o._noopAnimations)("mdc-circular-progress--indeterminate",o.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",io],diameter:[2,"diameter","diameter",io],strokeWidth:[2,"strokeWidth","strokeWidth",io]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,o){if(n&1&&(Ae(0,Kre,2,8,"ng-template",null,0,Jp),s(2,"div",2,1),Vn(),s(4,"svg",3),F(5,"circle",4),l()(),vr(),s(6,"div",5)(7,"div",6)(8,"div",7),Xi(9,8),l(),s(10,"div",9),Xi(11,8),l(),s(12,"div",10),Xi(13,8),l()()()),n&2){let r=Re(1);u(4),It("viewBox",o._viewBox()),u(),yn("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeDashOffset(),"px")("stroke-width",o._circleStrokeWidth(),"%"),It("r",o._circleRadius()),u(4),x("ngTemplateOutlet",r),u(2),x("ngTemplateOutlet",r),u(2),x("ngTemplateOutlet",r)}},dependencies:[H_],styles:[`.mat-mdc-progress-spinner{--mat-progress-spinner-animation-multiplier: 1;display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mat-progress-spinner-active-indicator-width, 4px)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}}.mat-progress-spinner-reduced-motion{--mat-progress-spinner-animation-multiplier: 1.25}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate calc(1568.2352941176ms*var(--mat-progress-spinner-animation-multiplier)) linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mat-progress-spinner-active-indicator-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate calc(5332ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}} `],encapsulation:2,changeDetection:0})}return t})();var Si=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[wn]})}return t})();function $7(t){return Error(`Unable to find icon with the name "${t}"`)}function eae(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function H7(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function U7(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}var jd=class{url;svgText;options;svgElement=null;constructor(i,e,n){this.url=i,this.svgText=e,this.options=n}},Ly=(()=>{class t{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(e,n,o,r){this._httpClient=e,this._sanitizer=n,this._errorHandler=r,this._document=o}addSvgIcon(e,n,o){return this.addSvgIconInNamespace("",e,n,o)}addSvgIconLiteral(e,n,o){return this.addSvgIconLiteralInNamespace("",e,n,o)}addSvgIconInNamespace(e,n,o,r){return this._addSvgIconConfig(e,n,new jd(o,null,r))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,o,r){let a=this._sanitizer.sanitize(xd.HTML,o);if(!a)throw U7(o);let c=Rh(a);return this._addSvgIconConfig(e,n,new jd("",c,r))}addSvgIconSet(e,n){return this.addSvgIconSetInNamespace("",e,n)}addSvgIconSetLiteral(e,n){return this.addSvgIconSetLiteralInNamespace("",e,n)}addSvgIconSetInNamespace(e,n,o){return this._addSvgIconSetConfig(e,new jd(n,null,o))}addSvgIconSetLiteralInNamespace(e,n,o){let r=this._sanitizer.sanitize(xd.HTML,n);if(!r)throw U7(n);let a=Rh(r);return this._addSvgIconSetConfig(e,new jd("",a,o))}registerFontClassAlias(e,n=e){return this._fontCssClassesByAlias.set(e,n),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let n=this._sanitizer.sanitize(xd.RESOURCE_URL,e);if(!n)throw H7(e);let o=this._cachedIconsByUrl.get(n);return o?xt(Fy(o)):this._loadSvgIconFromConfig(new jd(e,null)).pipe(vi(r=>this._cachedIconsByUrl.set(n,r)),yt(r=>Fy(r)))}getNamedSvgIcon(e,n=""){let o=G7(n,e),r=this._svgIconConfigs.get(o);if(r)return this._getSvgFromConfig(r);if(r=this._getIconConfigFromResolvers(n,e),r)return this._svgIconConfigs.set(o,r),this._getSvgFromConfig(r);let a=this._iconSetConfigs.get(n);return a?this._getSvgFromIconSetConfigs(e,a):zi($7(o))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?xt(Fy(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(yt(n=>Fy(n)))}_getSvgFromIconSetConfigs(e,n){let o=this._extractIconWithNameFromAnySet(e,n);if(o)return xt(o);let r=n.filter(a=>!a.svgText).map(a=>this._loadSvgIconSetFromConfig(a).pipe(hi(c=>{let p=`Loading icon set URL: ${this._sanitizer.sanitize(xd.RESOURCE_URL,a.url)} failed: ${c.message}`;return this._errorHandler.handleError(new Error(p)),xt(null)})));return lo(r).pipe(yt(()=>{let a=this._extractIconWithNameFromAnySet(e,n);if(!a)throw $7(e);return a}))}_extractIconWithNameFromAnySet(e,n){for(let o=n.length-1;o>=0;o--){let r=n[o];if(r.svgText&&r.svgText.toString().indexOf(e)>-1){let a=this._svgElementFromConfig(r),c=this._extractSvgIconFromSet(a,e,r.options);if(c)return c}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(vi(n=>e.svgText=n),yt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?xt(null):this._fetchIcon(e).pipe(vi(n=>e.svgText=n))}_extractSvgIconFromSet(e,n,o){let r=e.querySelector(`[id="${n}"]`);if(!r)return null;let a=r.cloneNode(!0);if(a.removeAttribute("id"),a.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(a,o);if(a.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(a),o);let c=this._svgElementFromString(Rh(""));return c.appendChild(a),this._setSvgAttributes(c,o)}_svgElementFromString(e){let n=this._document.createElement("DIV");n.innerHTML=e;let o=n.querySelector("svg");if(!o)throw Error(" tag not found");return o}_toSvgElement(e){let n=this._svgElementFromString(Rh("")),o=e.attributes;for(let r=0;rRh(p)),bC(()=>this._inProgressUrlFetches.delete(a)),As());return this._inProgressUrlFetches.set(a,m),m}_addSvgIconConfig(e,n,o){return this._svgIconConfigs.set(G7(e,n),o),this}_addSvgIconSetConfig(e,n){let o=this._iconSetConfigs.get(e);return o?o.push(n):this._iconSetConfigs.set(e,[n]),this}_svgElementFromConfig(e){if(!e.svgElement){let n=this._svgElementFromString(e.svgText);this._setSvgAttributes(n,e.options),e.svgElement=n}return e.svgElement}_getIconConfigFromResolvers(e,n){for(let o=0;o{let t=f(Pi),i=t?t.location:null;return{getPathname:()=>i?i.pathname+i.search:""}}}),W7=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],rae=W7.map(t=>`[${t}]`).join(", "),aae=/^url\(['"]?#(.*?)['"]?\)$/,se=(()=>{class t{_elementRef=f(Lt);_iconRegistry=f(Ly);_location=f(oae);_errorHandler=f(Sh);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let n=this._cleanupFontValue(e);n!==this._fontSet&&(this._fontSet=n,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let n=this._cleanupFontValue(e);n!==this._fontIcon&&(this._fontIcon=n,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=so.EMPTY;constructor(){let e=f(new ka("aria-hidden"),{optional:!0}),n=f(iae,{optional:!0});n&&(n.color&&(this.color=this._defaultColor=n.color),n.fontSet&&(this.fontSet=n.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let n=e.split(":");switch(n.length){case 1:return["",n[0]];case 2:return n;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let n=this._location.getPathname();n!==this._previousPath&&(this._previousPath=n,this._prependPathToReferences(n))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let n=this._location.getPathname();this._previousPath=n,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(n),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,n=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();n--;){let o=e.childNodes[n];(o.nodeType!==1||o.nodeName.toLowerCase()==="svg")&&o.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,n=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(o=>o.length>0);this._previousFontSetClass.forEach(o=>e.classList.remove(o)),n.forEach(o=>e.classList.add(o)),this._previousFontSetClass=n,this.fontIcon!==this._previousFontIconClass&&!n.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let n=this._elementsWithExternalReferences;n&&n.forEach((o,r)=>{o.forEach(a=>{r.setAttribute(a.name,`url('${e}#${a.value}')`)})})}_cacheChildrenWithExternalReferences(e){let n=e.querySelectorAll(rae),o=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let r=0;r{let c=n[r],m=c.getAttribute(a),p=m?m.match(aae):null;if(p){let h=o.get(c);h||(h=[],o.set(c,h)),h.push({name:a,value:p[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[n,o]=this._splitIconName(e);n&&(this._svgNamespace=n),o&&(this._svgName=o),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(o,n).pipe(wi(1)).subscribe(r=>this._setSvgElement(r),r=>{let a=`Error retrieving icon ${n}:${o}! ${r.message}`;this._errorHandler.handleError(new Error(a))})}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(n,o){n&2&&(It("data-mat-icon-type",o._usingFontIcon()?"font":"svg")("data-mat-icon-name",o._svgName||o.fontIcon)("data-mat-icon-namespace",o._svgNamespace||o.fontSet)("fontIcon",o._usingFontIcon()?o.fontIcon:null),Mo(o.color?"mat-"+o.color:""),je("mat-icon-inline",o.inline)("mat-icon-no-color",o.color!=="primary"&&o.color!=="accent"&&o.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",dt],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:nae,decls:1,vars:0,template:function(n,o){n&1&&(En(),Yt(0))},styles:[`mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto} `],encapsulation:2,changeDetection:0})}return t})(),te=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[wn]})}return t})();var sae=["mat-icon-button",""],lae=["*"],cae=new kt("MAT_BUTTON_CONFIG");function q7(t){return t==null?void 0:io(t)}var R3=(()=>{class t{_elementRef=f(Lt);_ngZone=f(bi);_animationsDisabled=Qi();_config=f(cae,{optional:!0});_focusMonitor=f(xr);_cleanupClick;_renderer=f(ii);_rippleLoader=f(WC);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}constructor(){f(Go).load(yr);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",n){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,n):this._elementRef.nativeElement.focus(n)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(n,o){n&2&&(It("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled())("tabindex",o._getTabIndex()),Mo(o.color?"mat-"+o.color:""),je("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("mat-unthemed",!o.color)("_mat-animation-noopable",o._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",dt],disabled:[2,"disabled","disabled",dt],ariaDisabled:[2,"aria-disabled","ariaDisabled",dt],disabledInteractive:[2,"disabledInteractive","disabledInteractive",dt],tabIndex:[2,"tabIndex","tabIndex",q7],_tabindex:[2,"tabindex","_tabindex",q7]}})}return t})(),ze=(()=>{class t extends R3{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[xn],attrs:sae,ngContentSelectors:lae,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,o){n&1&&(En(),jr(0,"span",0),Yt(1),jr(2,"span",1)(3,"span",2))},styles:[`.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%));flex-shrink:0;text-align:center;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mat-icon-button-state-layer-size, 40px) - var(--mat-icon-button-icon-size, 24px)) / 2);font-size:var(--mat-icon-button-icon-size, 24px);color:var(--mat-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-icon-button:focus-visible>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-icon-button-touch-target-size, 48px);display:var(--mat-icon-button-touch-target-display, block);left:50%;width:var(--mat-icon-button-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%))}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1} `,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} `],encapsulation:2,changeDetection:0})}return t})();var dae=["matButton",""],mae=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],pae=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var X7=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),le=(()=>{class t extends R3{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=uae(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let n=this._elementRef.nativeElement.classList,o=this._appearance?X7.get(this._appearance):null,r=X7.get(e);o&&n.remove(...o),n.add(...r),this._appearance=e}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[xn],attrs:dae,ngContentSelectors:pae,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,o){n&1&&(En(mae),jr(0,"span",0),Yt(1),_o(2,"span",1),Yt(3,1),wo(),Yt(4,2),jr(5,"span",2)(6,"span",3)),n&2&&je("mdc-button__ripple",!o._isFab)("mdc-fab__ripple",o._isFab)},styles:[`.mat-mdc-button-base{text-decoration:none}.mat-mdc-button-base .mat-icon{min-height:fit-content;flex-shrink:0}@media(hover: none){.mat-mdc-button-base:hover>span.mat-mdc-button-persistent-ripple::before{opacity:0}}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-button-text-horizontal-padding, 12px);height:var(--mat-button-text-container-height, 40px);font-family:var(--mat-button-text-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-text-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-text-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-text-label-text-transform);font-weight:var(--mat-button-text-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mat-button-text-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mat-button-text-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-text-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-button-text-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-button-text-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-text-touch-target-size, 48px);display:var(--mat-button-text-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-filled-container-height, 40px);font-family:var(--mat-button-filled-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-filled-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-filled-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-filled-label-text-transform);font-weight:var(--mat-button-filled-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-filled-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-button-filled-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-filled-touch-target-size, 48px);display:var(--mat-button-filled-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mat-button-filled-label-text-color, var(--mat-sys-on-primary));background-color:var(--mat-button-filled-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mat-button-filled-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mat-button-protected-container-elevation-shadow, var(--mat-sys-level1));height:var(--mat-button-protected-container-height, 40px);font-family:var(--mat-button-protected-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-protected-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-protected-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-protected-label-text-transform);font-weight:var(--mat-button-protected-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-protected-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-button-protected-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-protected-touch-target-size, 48px);display:var(--mat-button-protected-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-raised-button:not(:disabled){color:var(--mat-button-protected-label-text-color, var(--mat-sys-primary));background-color:var(--mat-button-protected-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mat-button-protected-container-shape, var(--mat-sys-corner-full))}@media(hover: hover){.mat-mdc-raised-button:hover{box-shadow:var(--mat-button-protected-hover-container-elevation-shadow, var(--mat-sys-level2))}}.mat-mdc-raised-button:focus{box-shadow:var(--mat-button-protected-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mat-button-protected-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-protected-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-protected-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mat-button-protected-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-outlined-container-height, 40px);font-family:var(--mat-button-outlined-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-outlined-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-outlined-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-outlined-label-text-transform);font-weight:var(--mat-button-outlined-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mat-button-outlined-container-shape, var(--mat-sys-corner-full));border-width:var(--mat-button-outlined-outline-width, 1px);padding:0 var(--mat-button-outlined-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-button-outlined-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-outlined-touch-target-size, 48px);display:var(--mat-button-outlined-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-outlined-button:not(:disabled){color:var(--mat-button-outlined-label-text-color, var(--mat-sys-primary));border-color:var(--mat-button-outlined-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mat-button-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-tonal-container-height, 40px);font-family:var(--mat-button-tonal-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-tonal-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-tonal-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-tonal-label-text-transform);font-weight:var(--mat-button-tonal-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-tonal-horizontal-padding, 24px)}.mat-tonal-button:not(:disabled){color:var(--mat-button-tonal-label-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-tonal-container-color, var(--mat-sys-secondary-container))}.mat-tonal-button,.mat-tonal-button .mdc-button__ripple{border-radius:var(--mat-button-tonal-container-shape, var(--mat-sys-corner-full))}.mat-tonal-button[disabled],.mat-tonal-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-tonal-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-tonal-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-tonal-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}[dir=rtl] .mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}.mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}[dir=rtl] .mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}.mat-tonal-button .mat-ripple-element{background-color:var(--mat-button-tonal-ripple-color, color-mix(in srgb, var(--mat-sys-on-secondary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-tonal-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-tonal-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-tonal-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-tonal-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-tonal-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-tonal-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-tonal-touch-target-size, 48px);display:var(--mat-button-tonal-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button,.mat-tonal-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon,.mat-tonal-button .mdc-button__label,.mat-tonal-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator,.mat-tonal-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-button:focus-visible>.mat-focus-indicator::before,.mat-mdc-unelevated-button:focus-visible>.mat-focus-indicator::before,.mat-mdc-raised-button:focus-visible>.mat-focus-indicator::before,.mat-mdc-outlined-button:focus-visible>.mat-focus-indicator::before,.mat-tonal-button:focus-visible>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable,.mat-tonal-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon,.mat-tonal-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-tonal-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)} `,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} `],encapsulation:2,changeDetection:0})}return t})();function uae(t){return t.hasAttribute("mat-raised-button")?"elevated":t.hasAttribute("mat-stroked-button")?"outlined":t.hasAttribute("mat-flat-button")?"filled":t.hasAttribute("mat-button")?"text":null}var $=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[ss,wn]})}return t})();function hae(t,i){t&1&&(s(0,"div",1),F(1,"mat-spinner",3),l())}function fae(t,i){if(t&1){let e=j();s(0,"div",2)(1,"div",4)(2,"mat-icon"),d(3,"error_outline"),l()(),s(4,"div"),d(5),l(),s(6,"div")(7,"button",5),v("click",function(){D(e);let o=b(2);return P(o.refresh())}),s(8,"mat-icon"),d(9,"refresh"),l()(),s(10,"button",6)(11,"mat-icon"),d(12,"home"),l()()()()}if(t&2){let e,n=b(2);u(5),X("Error occurred: ",(e=n.error())==null?null:e.message)}}function gae(t,i){if(t&1&&(s(0,"div",0),A(1,hae,2,0,"div",1),A(2,fae,13,1,"div",2),l()),t&2){let e=b();u(),O(e.visible()&&!e.error()?1:-1),u(),O(e.error()?2:-1)}}var Jm=(()=>{class t{progressService=f(zo);router=f(ut);visible=me(!1);error=me(null);routerSubscription;ngOnInit(){this.progressService.state.subscribe(e=>{this.visible.set(e.visible),e.error&&!this.error()&&this.error.set(e.error),e.clear&&this.error.set(null)}),this.routerSubscription=this.router.events.subscribe(()=>{this.progressService.clear()})}refresh(){this.router.navigateByUrl(this.router.url)}ngOnDestroy(){this.routerSubscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["app-progress"]],decls:1,vars:1,consts:[[1,"overlay"],[1,"loading-spinner"],[1,"error-state"],["color","primary"],[1,"error-icon"],["mat-button","","matTooltip","Refresh page","matTooltipClass","custom-tooltip",3,"click"],["mat-button","","routerLink","/","matTooltip","Go to home","matTooltipClass","custom-tooltip"]],template:function(n,o){n&1&&A(0,gae,3,2,"div",0),n&2&&O(o.visible()||o.error()?0:-1)},dependencies:[Z,Si,Xo,te,se,$,le,Gt,Kt,cn],styles:[".overlay[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;inset:0;background-color:color-mix(in srgb,var(--mat-sys-shadow) 50%,transparent);z-index:2000}.loading-spinner[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.error-state[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{text-align:center}.error-icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:64px;width:64px;height:64px}"],changeDetection:0})}return t})();var Qf=class{authToken;id;name;location;host;port;path;ubridge_path;status="stopped";protocol;username;password;tokenExpired=!1};var We=(()=>{class t{httpController;controllerIds=[];serviceInitialized=new Le;isServiceInitialized;constructor(e){this.httpController=e,this.controllerIds=this.getcontrollerIds(),this.isServiceInitialized=!0,this.serviceInitialized.next(this.isServiceInitialized)}getcontrollerIds(){let e=localStorage.getItem("controllerIds");if(e?.length>0){let n=e.split(",");return[...new Set(n)].filter(o=>o&&o.trim().length>0)}return[]}updatecontrollerIds(){localStorage.removeItem("controllerIds"),localStorage.setItem("controllerIds",this.controllerIds.toString())}get(e){let n=JSON.parse(localStorage.getItem(`controller-${e}`));return new Promise(r=>{r(n)})}create(e){if(this.findAllSync().some(c=>c.name===e.name))return Promise.reject(new Error(`Controller with name "${e.name}" already exists`));let o=this.controllerIds.map(c=>parseInt(c.replace("controller-",""),10)).filter(c=>!isNaN(c)),r=o.length>0?Math.max(...o):0;return e.id=r+1,localStorage.setItem(`controller-${e.id}`,JSON.stringify(e)),this.controllerIds.push(`controller-${e.id}`),this.updatecontrollerIds(),new Promise(c=>{c(e)})}findAllSync(){let e=[];return this.controllerIds.forEach(n=>{let o=localStorage.getItem(n);o&&e.push(JSON.parse(o))}),e}isControllerNameTaken(e){return this.findAllSync().some(o=>o.name===e)}update(e){return localStorage.removeItem(`controller-${e.id}`),localStorage.setItem(`controller-${e.id}`,JSON.stringify(e)),new Promise(o=>{o(e)})}findAll(){return new Promise(n=>{let o=[];this.controllerIds.forEach(r=>{let a=localStorage.getItem(r);if(a){let c=JSON.parse(a);o.push(c)}}),n(o)})}delete(e){return localStorage.removeItem(`controller-${e.id}`),this.controllerIds=this.controllerIds.filter(o=>o!==`controller-${e.id}`),this.updatecontrollerIds(),new Promise(o=>{o(e.id)})}getControllerUrl(e){return`${e.protocol}//${e.host}:${e.port}/`}checkControllerVersion(e){return this.httpController.get(e,"/version")}getLocalController(e,n){return new Promise((r,a)=>{this.findAll().then(c=>{let m=c.find(p=>p.location==="bundled");if(m)m.host=e,m.port=n,m.protocol=location.protocol,this.update(m).then(p=>{r(p)},a);else{let p=new Qf;p.name="local",p.host=e,p.port=n,p.location="bundled",p.protocol=location.protocol,this.create(p).then(h=>{r(h)},a)}},a)})}static \u0275fac=function(n){return new(n||t)(ge(an))};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})();var By=(()=>{class t{document;router=f(ut);controllerService=f(We);progressService=f(zo);constructor(e){this.document=e}ngOnInit(){this.progressService.activate(),setTimeout(()=>{let e;parseInt(this.document.location.port,10)?e=parseInt(this.document.location.port,10):this.document.location.protocol=="https:"?e=443:e=80,this.controllerService.getLocalController(this.document.location.hostname,e).then(n=>{this.router.navigate(["/controller",n.id,"projects"]),this.progressService.deactivate()})},100)}static \u0275fac=function(n){return new(n||t)(st(Pi))};static \u0275cmp=L({type:t,selectors:[["app-bundled-controller-finder"]],decls:1,vars:0,template:function(n,o){n&1&&F(0,"app-progress")},dependencies:[Jm],encapsulation:2,changeDetection:0})}return t})();var _ae=["mat-menu-item",""],vae=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],bae=["mat-icon, [matMenuItemIcon]","*"];function Cae(t,i){t&1&&(Vn(),s(0,"svg",2),F(1,"polygon",3),l())}var xae=["*"];function yae(t,i){if(t&1){let e=j();_o(0,"div",0),MC("click",function(){D(e);let o=b();return P(o.closed.emit("click"))})("animationstart",function(o){D(e);let r=b();return P(r._onAnimationStart(o.animationName))})("animationend",function(o){D(e);let r=b();return P(r._onAnimationDone(o.animationName))})("animationcancel",function(o){D(e);let r=b();return P(r._onAnimationDone(o.animationName))}),_o(1,"div",1),Yt(2),wo()()}if(t&2){let e=b();Mo(e._classList),je("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),No("id",e.panelId),It("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var L3=new kt("MAT_MENU_PANEL"),ot=(()=>{class t{_elementRef=f(Lt);_document=f(Pi);_focusMonitor=f(xr);_parentMenu=f(L3,{optional:!0});_changeDetectorRef=f(K);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new Le;_focused=new Le;_highlighted=!1;_triggersSubmenu=!1;constructor(){f(Go).load(yr),this._parentMenu?.addItem?.(this)}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,n):this._getHostElement().focus(n),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),n=e.querySelectorAll("mat-icon, .material-icons");for(let o=0;o({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),F3="_mat-menu-enter",Vy="_mat-menu-exit",Fn=(()=>{class t{_elementRef=f(Lt);_changeDetectorRef=f(K);_injector=f(Di);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=Qi();_allItems;_directDescendantItems=new Ql;_classList={};_panelAnimationState="void";_animationDone=new Le;_isAnimating=me(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;set panelClass(e){let n=this._previousPanelClass,o=H({},this._classList);n&&n.length&&n.split(" ").forEach(r=>{o[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{o[r]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new ve;close=this.closed;panelId=f(Oi).getId("mat-menu-panel-");constructor(){let e=f(wae);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Cm(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(li(this._directDescendantItems),fn(e=>Dn(...e.map(n=>n._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let n=this._keyManager;if(this._panelAnimationState==="enter"&&n.activeItem?._hasFocus()){let o=e.toArray(),r=Math.max(0,Math.min(o.length-1,n.activeItemIndex||0));o[r]&&!o[r].disabled?n.setActiveItem(r):n.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(li(this._directDescendantItems),fn(n=>Dn(...n.map(o=>o._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let n=e.keyCode,o=this._keyManager;switch(n){case 27:cr(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(n===38||n===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=ar(()=>{let n=this._resolvePanel();if(!n||!n.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(e).setFirstItemActive(),!o.activeItem&&n&&n.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,n=this.yPosition){this._classList=tt(H({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":n==="above","mat-menu-below":n==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let n=e===Vy;(n||e===F3)&&(n&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(n?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===F3||e===Vy)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let n=this._resolvePanel();n&&(n.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(Vy),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?F3:Vy)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(li(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(n=>n._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["mat-menu"]],contentQueries:function(n,o,r){if(n&1&&$i(r,Sae,5)(r,ot,5)(r,ot,4),n&2){let a;gt(a=_t())&&(o.lazyContent=a.first),gt(a=_t())&&(o._allItems=a),gt(a=_t())&&(o.items=a)}},viewQuery:function(n,o){if(n&1&&gn(So,5),n&2){let r;gt(r=_t())&&(o.templateRef=r.first)}},hostVars:3,hostBindings:function(n,o){n&2&&It("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",dt],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:dt(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[hn([{provide:L3,useExisting:t}])],ngContentSelectors:xae,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(n,o){n&1&&(En(),kh(0,yae,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{border-top-color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none} `],encapsulation:2,changeDetection:0})}return t})(),Mae=new kt("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=f(Di);return()=>RC(t)}});var Kf=new WeakMap,kae=(()=>{class t{_canHaveBackdrop;_element=f(Lt);_viewContainerRef=f(co);_menuItemInstance=f(ot,{optional:!0,self:!0});_dir=f(Hr,{optional:!0});_focusMonitor=f(xr);_ngZone=f(bi);_injector=f(Di);_scrollStrategy=f(Mae);_changeDetectorRef=f(K);_animationsDisabled=Qi();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=so.EMPTY;_menuCloseSubscription=so.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(n=>{this._destroyMenu(n),(n==="click"||n==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(n)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let n=f(L3,{optional:!0});this._parentMaterialMenu=n instanceof Fn?n:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&Kf.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let n=this._menu;if(this._menuOpen||!n)return;this._pendingRemoval?.unsubscribe();let o=Kf.get(n);Kf.set(n,this),o&&o!==this&&o._closeMenu();let r=this._createOverlay(n),a=r.getConfig(),c=a.positionStrategy;this._setPosition(n,c),this._canHaveBackdrop?a.hasBackdrop=n.hasBackdrop==null?!this._triggersSubmenu():n.hasBackdrop:a.hasBackdrop=n.hasBackdrop??!1,r.hasAttached()||(r.attach(this._getPortal(n)),n.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),n.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,n.direction=this.dir,e&&n.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),n instanceof Fn&&(n._setIsOpen(!0),n._directDescendantItems.changes.pipe(rt(n.close)).subscribe(()=>{c.withLockedPosition(!1).reapplyLastPosition(),c.withLockedPosition(!0)}))}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,n):this._element.nativeElement.focus(n)}_destroyMenu(e){let n=this._overlayRef,o=this._menu;!n||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),o instanceof Fn&&this._ownsMenu(o)?(this._pendingRemoval=o._animationDone.pipe(wi(1)).subscribe(()=>{n.detach(),Kf.has(o)||o.lazyContent?.detach()}),o._setIsOpen(!1)):(n.detach(),o?.lazyContent?.detach()),o&&this._ownsMenu(o)&&Kf.delete(o),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let n=this._getOverlayConfig(e);this._subscribeToPositions(e,n.positionStrategy),this._overlayRef=vm(this._injector,n),this._overlayRef.keydownEvents().subscribe(o=>{this._menu instanceof Fn&&this._menu._handleKeydown(o)})}return this._overlayRef}_getOverlayConfig(e){return new fm({positionStrategy:FC(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,n){e.setPositionClasses&&n.positionChanges.subscribe(o=>{this._ngZone.run(()=>{let r=o.connectionPair.overlayX==="start"?"after":"before",a=o.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(r,a)})})}_setPosition(e,n){let[o,r]=e.xPosition==="before"?["end","start"]:["start","end"],[a,c]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[m,p]=[a,c],[h,g]=[o,r],M=0;if(this._triggersSubmenu()){if(g=o=e.xPosition==="before"?"start":"end",r=h=o==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let C=this._parentMaterialMenu.items.first;this._parentInnerPadding=C?C._getHostElement().offsetTop:0}M=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(m=a==="top"?"bottom":"top",p=c==="top"?"bottom":"top");n.withPositions([{originX:o,originY:m,overlayX:h,overlayY:a,offsetY:M},{originX:r,originY:m,overlayX:g,overlayY:a,offsetY:M},{originX:o,originY:p,overlayX:h,overlayY:c,offsetY:-M},{originX:r,originY:p,overlayX:g,overlayY:c,offsetY:-M}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),n=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:xt(),r=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Pn(a=>this._menuOpen&&a!==this._menuItemInstance)):xt();return Dn(e,o,r,n)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new ol(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return Kf.get(e)===this}_triggerIsAriaDisabled(){return dt(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(n){SC()};static \u0275dir=ft({type:t})}return t})(),kn=(()=>{class t extends kae{_cleanupTouchstart;_hoverSubscription=so.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new ve;onMenuOpen=this.menuOpened;menuClosed=new ve;onMenuClose=this.menuClosed;constructor(){super(!0);let e=f(ii);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",n=>{OC(n)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){AC(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let n=e.keyCode;(n===13||n===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(n===39&&this.dir==="ltr"||n===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(n,o){n&1&&v("click",function(a){return o._handleClick(a)})("mousedown",function(a){return o._handleMousedown(a)})("keydown",function(a){return o._handleKeydown(a)}),n&2&&It("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu==null?null:o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[xn]})}return t})();var Qe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[ss,rl,wn,Md]})}return t})();var Tae=[[["caption"]],[["colgroup"],["col"]],"*"],Eae=["caption","colgroup, col","*"];function Dae(t,i){t&1&&Yt(0,2)}function Pae(t,i){t&1&&(s(0,"thead",0),Xi(1,1),l(),s(2,"tbody",2),Xi(3,3)(4,4),l(),s(5,"tfoot",0),Xi(6,5),l())}function Iae(t,i){t&1&&Xi(0,1)(1,3)(2,4)(3,5)}var Gn=(()=>{class t extends hI{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275cmp=L({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(n,o){n&2&&je("mat-table-fixed-layout",o.fixedLayout)},exportAs:["matTable"],features:[hn([{provide:hI,useExisting:t},{provide:rc,useExisting:t},{provide:yv,useValue:null}]),xn],ngContentSelectors:Eae,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,o){n&1&&(En(Tae),Yt(0),Yt(1,1),A(2,Dae,1,0),A(3,Pae,7,0)(4,Iae,4,0)),n&2&&(u(2),O(o._isServer?2:-1),u(),O(o._isNativeHtmlTable?3:4))},dependencies:[mI,dI,uI,pI],styles:[`.mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:var(--mat-table-header-container-height, 56px)}mat-row{min-height:var(--mat-table-row-item-container-height, 52px)}mat-footer-row{min-height:var(--mat-table-footer-container-height, 52px)}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mat-table-fixed-layout{table-layout:fixed}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:start;text-overflow:ellipsis}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:start}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child>.mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch} `],encapsulation:2})}return t})(),Wn=(()=>{class t extends R1{static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["","matCellDef",""]],features:[hn([{provide:R1,useExisting:t}]),xn]})}return t})(),qn=(()=>{class t extends F1{static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["","matHeaderCellDef",""]],features:[hn([{provide:F1,useExisting:t}]),xn]})}return t})();var Xn=(()=>{class t extends qm{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[hn([{provide:qm,useExisting:t}]),xn]})}return t})(),Qn=(()=>{class t extends I8{static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[xn]})}return t})();var Yn=(()=>{class t extends A8{static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[xn]})}return t})();var Kn=(()=>{class t extends Sv{static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",dt]},features:[hn([{provide:Sv,useExisting:t}]),xn]})}return t})();var Zn=(()=>{class t extends L1{static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[hn([{provide:L1,useExisting:t}]),xn]})}return t})(),Jn=(()=>{class t extends lI{static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275cmp=L({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[hn([{provide:lI,useExisting:t}]),xn],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,o){n&1&&Xi(0,0)},dependencies:[Fu],encapsulation:2})}return t})();var ei=(()=>{class t extends cI{static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275cmp=L({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[hn([{provide:cI,useExisting:t}]),xn],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,o){n&1&&Xi(0,0)},dependencies:[Fu],encapsulation:2})}return t})();var In=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[B1,wn]})}return t})(),Aae=9007199254740991,Nr=class extends Kl{_data;_renderData=new qt([]);_filter=new qt("");_internalPageChanges=new Le;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i),this._renderChangesSubscription||this._filterData(i)}get filter(){return this._filter.value}set filter(i){this._filter.next(i),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(i){this._sort=i,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(i){this._paginator=i,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(i,e)=>{let n=i[e];if(J5(n)){let o=Number(n);return o{let n=e.active,o=e.direction;return!n||o==""?i:i.sort((r,a)=>{let c=this.sortingDataAccessor(r,n),m=this.sortingDataAccessor(a,n),p=typeof c,h=typeof m;p!==h&&(p==="number"&&(c+=""),h==="number"&&(m+=""));let g=0;return c!=null&&m!=null?c>m?g=1:c{let n=e.trim().toLowerCase();return Object.values(i).some(o=>`${o}`.toLowerCase().includes(n))};constructor(i=[]){super(),this._data=new qt(i),this._updateChangeSubscription()}_updateChangeSubscription(){let i=this._sort?Dn(this._sort.sortChange,this._sort.initialized):xt(null),e=this._paginator?Dn(this._paginator.page,this._internalPageChanges,this._paginator.initialized):xt(null),n=this._data,o=rr([n,this._filter]).pipe(yt(([c])=>this._filterData(c))),r=rr([o,i]).pipe(yt(([c])=>this._orderData(c))),a=rr([r,e]).pipe(yt(([c])=>this._pageData(c)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=a.subscribe(c=>this._renderData.next(c))}_filterData(i){return this.filteredData=this.filter==null||this.filter===""?i:i.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(i){return this.sort?this.sortData(i.slice(),this.sort):i}_pageData(i){if(!this.paginator)return i;let e=this.paginator.pageIndex*this.paginator.pageSize;return i.slice(e,e+this.paginator.pageSize)}_updatePaginator(i){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=i,e.pageIndex>0)){let n=Math.ceil(e.length/e.pageSize)-1||0,o=Math.min(e.pageIndex,n);o!==e.pageIndex&&(e.pageIndex=o,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};function Oae(t,i){}var ep=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext};var Jv=(()=>{class t extends NC{_elementRef=f(Lt);_focusTrapFactory=f(hR);_config;_interactivityChecker=f(uR);_ngZone=f(bi);_focusMonitor=f(xr);_renderer=f(ii);_changeDetectorRef=f(K);_injector=f(Di);_platform=f(Ta);_document=f(Pi);_portalOutlet;_focusTrapped=new Le;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=f(ep,{optional:!0})||new ep,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let n=this._ariaLabelledByQueue.indexOf(e);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),n}attachTemplatePortal(e){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),n}attachDomPortal=e=>{this._portalOutlet.hasAttached();let n=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),n};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,n){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{r(),a(),e.removeAttribute("tabindex")},r=this._renderer.listen(e,"blur",o),a=this._renderer.listen(e,"mousedown",o)})),e.focus(n)}_focusByCssSelector(e,n){let o=this._elementRef.nativeElement.querySelector(e);o&&this._forceFocus(o,n)}_trapFocus(e){this._isDestroyed||ar(()=>{let n=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||n.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,n=null;if(typeof e=="string"?n=this._document.querySelector(e):typeof e=="boolean"?n=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(n=e),this._config.restoreFocus&&n&&typeof n.focus=="function"){let o=hm(),r=this._elementRef.nativeElement;(!o||o===this._document.body||o===r||r.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,n=hm();return e===n||e.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=hm()))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(n,o){if(n&1&&gn(rs,7),n&2){let r;gt(r=_t())&&(o._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,o){n&2&&It("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},features:[xn],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,o){n&1&&Ae(0,Oae,0,0,"ng-template",0)},dependencies:[rs],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit} `],encapsulation:2})}return t})(),Zv=class{overlayRef;config;componentInstance=null;componentRef=null;containerInstance;disableClose;closed=new Le;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(i,e){this.overlayRef=i,this.config=e,this.disableClose=e.disableClose,this.backdropClick=i.backdropClick(),this.keydownEvents=i.keydownEvents(),this.outsidePointerEvents=i.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!cr(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=i.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(i,e){if(this._canClose(i)){let n=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(i),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(i="",e=""){return this.overlayRef.updateSize({width:i,height:e}),this}addPanelClass(i){return this.overlayRef.addPanelClass(i),this}removePanelClass(i){return this.overlayRef.removePanelClass(i),this}_canClose(i){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(i,e,this.componentInstance))}},Nae=new kt("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=f(Di);return()=>Oh(t)}}),V3=new kt("DialogData"),Rae=new kt("DefaultDialogConfig");function Fae(t){let i=me(t),e=new ve;return{valueSignal:i,get value(){return i()},change:e,ngOnDestroy(){e.complete()}}}var eb=(()=>{class t{_injector=f(Di);_defaultOptions=f(Rae,{optional:!0});_parentDialog=f(t,{optional:!0,skipSelf:!0});_overlayContainer=f(gm);_idGenerator=f(Oi);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new Le;_afterOpenedAtThisLevel=new Le;_ariaHiddenElements=new Map;_scrollStrategy=f(Nae);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=xc(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(li(void 0)));constructor(){}open(e,n){let o=this._defaultOptions||new ep;n=H(H({},o),n),n.id=n.id||this._idGenerator.getId("cdk-dialog-"),n.id&&this.getDialogById(n.id);let r=this._getOverlayConfig(n),a=vm(this._injector,r),c=new Zv(a,n),m=this._attachContainer(a,c,n);if(c.containerInstance=m,!this.openDialogs.length){let p=this._overlayContainer.getContainerElement();m._focusTrapped?m._focusTrapped.pipe(wi(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(p)}):this._hideNonDialogContentFromAssistiveTechnology(p)}return this._attachDialogContent(e,c,m,n),this.openDialogs.push(c),c.closed.subscribe(()=>this._removeOpenDialog(c,!0)),this.afterOpened.next(c),c}closeAll(){B3(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){B3(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),B3(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let n=new fm({positionStrategy:e.positionStrategy||_m().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(n.backdropClass=e.backdropClass),n}_attachContainer(e,n,o){let r=o.injector||o.viewContainerRef?.injector,a=[{provide:ep,useValue:o},{provide:Zv,useValue:n},{provide:aR,useValue:e}],c;o.container?typeof o.container=="function"?c=o.container:(c=o.container.type,a.push(...o.container.providers(o))):c=Jv;let m=new Ah(c,o.viewContainerRef,Di.create({parent:r||this._injector,providers:a}));return e.attach(m).instance}_attachDialogContent(e,n,o,r){if(e instanceof So){let a=this._createInjector(r,n,o,void 0),c={$implicit:r.data,dialogRef:n};r.templateContext&&(c=H(H({},c),typeof r.templateContext=="function"?r.templateContext():r.templateContext)),o.attachTemplatePortal(new ol(e,null,c,a))}else{let a=this._createInjector(r,n,o,this._injector),c=o.attachComponentPortal(new Ah(e,r.viewContainerRef,a));n.componentRef=c,n.componentInstance=c.instance}}_createInjector(e,n,o,r){let a=e.injector||e.viewContainerRef?.injector,c=[{provide:V3,useValue:e.data},{provide:Zv,useValue:n}];return e.providers&&(typeof e.providers=="function"?c.push(...e.providers(n,e,o)):c.push(...e.providers)),e.direction&&(!a||!a.get(Hr,null,{optional:!0}))&&c.push({provide:Hr,useValue:Fae(e.direction)}),Di.create({parent:a||r,providers:c})}_removeOpenDialog(e,n){let o=this.openDialogs.indexOf(e);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((r,a)=>{r?a.setAttribute("aria-hidden",r):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let n=e.parentElement.children;for(let o=n.length-1;o>-1;o--){let r=n[o];r!==e&&r.nodeName!=="SCRIPT"&&r.nodeName!=="STYLE"&&!r.hasAttribute("aria-live")&&!r.hasAttribute("popover")&&(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function B3(t,i){let e=t.length;for(;e--;)i(t[e])}var $y=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({providers:[eb],imports:[rl,Fs,gR,Fs]})}return t})();function Lae(t,i){}var Uy=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration},z3="mdc-dialog--open",Q7="mdc-dialog--opening",Y7="mdc-dialog--closing",Bae=150,Vae=75,zae=(()=>{class t extends Jv{_animationStateChanged=new ve;_animationsEnabled=!Qi();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?Z7(this._config.enterAnimationDuration)??Bae:0;_exitAnimationDuration=this._animationsEnabled?Z7(this._config.exitAnimationDuration)??Vae:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(K7,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Q7,z3)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(z3),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(z3),this._animationsEnabled?(this._hostElement.style.setProperty(K7,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Y7)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(Q7,Y7)}_waitForAnimationToComplete(e,n){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let n=super.attachComponentPortal(e);return n.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),n}static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275cmp=L({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(n,o){n&2&&(No("id",o._config.id),It("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),je("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},features:[xn],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(n,o){n&1&&(s(0,"div",0)(1,"div",1),Ae(2,Lae,0,0,"ng-template",2),l()())},dependencies:[rs],styles:[`.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents} `],encapsulation:2})}return t})(),K7="--mat-dialog-transition-duration";function Z7(t){return t==null?null:typeof t=="number"?t:t.endsWith("ms")?U_(t.substring(0,t.length-2)):t.endsWith("s")?U_(t.substring(0,t.length-1))*1e3:t==="0"?0:null}var Hy=(function(t){return t[t.OPEN=0]="OPEN",t[t.CLOSING=1]="CLOSING",t[t.CLOSED=2]="CLOSED",t})(Hy||{}),Pe=class{_ref;_config;_containerInstance;componentInstance;componentRef=null;disableClose;id;_afterOpened=new bd(1);_beforeClosed=new bd(1);_result;_closeFallbackTimeout;_state=Hy.OPEN;_closeInteractionType;constructor(i,e,n){this._ref=i,this._config=e,this._containerInstance=n,this.disableClose=e.disableClose,this.id=i.id,i.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(Pn(o=>o.state==="opened"),wi(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(Pn(o=>o.state==="closed"),wi(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),i.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Dn(this.backdropClick(),this.keydownEvents().pipe(Pn(o=>o.keyCode===27&&!this.disableClose&&!cr(o)))).subscribe(o=>{this.disableClose||(o.preventDefault(),J7(this,o.type==="keydown"?"keyboard":"mouse"))})}close(i){let e=this._config.closePredicate;e&&!e(i,this._config,this.componentInstance)||(this._result=i,this._containerInstance._animationStateChanged.pipe(Pn(n=>n.state==="closing"),wi(1)).subscribe(n=>{this._beforeClosed.next(i),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),n.totalTime+100)}),this._state=Hy.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(i){let e=this._ref.config.positionStrategy;return i&&(i.left||i.right)?i.left?e.left(i.left):e.right(i.right):e.centerHorizontally(),i&&(i.top||i.bottom)?i.top?e.top(i.top):e.bottom(i.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(i="",e=""){return this._ref.updateSize(i,e),this}addPanelClass(i){return this._ref.addPanelClass(i),this}removePanelClass(i){return this._ref.removePanelClass(i),this}getState(){return this._state}_finishDialogClose(){this._state=Hy.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function J7(t,i,e){return t._closeInteractionType=i,t.close(e)}var Nt=new kt("MatMdcDialogData"),jae=new kt("mat-mdc-dialog-default-options"),$ae=new kt("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let t=f(Di);return()=>Oh(t)}}),Je=(()=>{class t{_defaultOptions=f(jae,{optional:!0});_scrollStrategy=f($ae);_parentDialog=f(t,{optional:!0,skipSelf:!0});_idGenerator=f(Oi);_injector=f(Di);_dialog=f(eb);_animationsDisabled=Qi();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new Le;_afterOpenedAtThisLevel=new Le;dialogConfigClass=Uy;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=xc(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(li(void 0)));constructor(){this._dialogRefConstructor=Pe,this._dialogContainerType=zae,this._dialogDataToken=Nt}open(e,n){let o;n=H(H({},this._defaultOptions||new Uy),n),n.id=n.id||this._idGenerator.getId("mat-mdc-dialog-"),n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();let r=this._dialog.open(e,tt(H({},n),{positionStrategy:_m(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||n.enterAnimationDuration?.toLocaleString()==="0"||n.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:ep,useValue:n}]},templateContext:()=>({dialogRef:o}),providers:(a,c,m)=>(o=new this._dialogRefConstructor(a,n,m),o.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:m},{provide:this._dialogDataToken,useValue:c.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=r.componentRef,o.componentInstance=r.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(o);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let n=e.length;for(;n--;)e[n].close()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Kc=(()=>{class t{dialogRef=f(Pe,{optional:!0});_elementRef=f(Lt);_dialog=f(Je);ariaLabel;type="button";dialogResult;_matDialogClose;constructor(){}ngOnInit(){this.dialogRef||(this.dialogRef=tV(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){J7(this.dialogRef,e.screenX===0&&e.screenY===0?"keyboard":"mouse",this.dialogResult)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(n,o){n&1&&v("click",function(a){return o._onButtonClick(a)}),n&2&&It("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[un]})}return t})(),eV=(()=>{class t{_dialogRef=f(Pe,{optional:!0});_elementRef=f(Lt);_dialog=f(Je);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=tV(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t})}return t})(),Ve=(()=>{class t extends eV{id=f(Oi).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(n,o){n&2&&No("id",o.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[xn]})}return t})(),Wt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[M5([wE])]})}return t})(),Be=(()=>{class t extends eV{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(n,o){n&2&&je("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},features:[xn]})}return t})();function tV(t,i){let e=t.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?i.find(n=>n.id===e.id):null}var Ce=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({providers:[Je],imports:[$y,rl,Fs,wn]})}return t})();var Hae=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(n,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms} `],encapsulation:2,changeDetection:0})}return t})(),Uae={passive:!0},nV=(()=>{class t{_platform=f(Ta);_ngZone=f(bi);_renderer=f(yd).createRenderer(null,null);_styleLoader=f(Go);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return Zr;this._styleLoader.load(Hae);let n=Yl(e),o=this._monitoredElements.get(n);if(o)return o.subject;let r=new Le,a="cdk-text-field-autofilled",c=p=>{p.animationName==="cdk-text-field-autofill-start"&&!n.classList.contains(a)?(n.classList.add(a),this._ngZone.run(()=>r.next({target:p.target,isAutofilled:!0}))):p.animationName==="cdk-text-field-autofill-end"&&n.classList.contains(a)&&(n.classList.remove(a),this._ngZone.run(()=>r.next({target:p.target,isAutofilled:!1})))},m=this._ngZone.runOutsideAngular(()=>(n.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(n,"animationstart",c,Uae)));return this._monitoredElements.set(n,{subject:r,unlisten:m}),r}stopMonitoring(e){let n=Yl(e),o=this._monitoredElements.get(n);o&&(o.unlisten(),o.subject.complete(),n.classList.remove("cdk-text-field-autofill-monitored"),n.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(n))}ngOnDestroy(){this._monitoredElements.forEach((e,n)=>this.stopMonitoring(n))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var iV=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({})}return t})();var oV=new kt("MAT_INPUT_VALUE_ACCESSOR");var Gae=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Wae=new kt("MAT_INPUT_CONFIG"),Te=(()=>{class t{_elementRef=f(Lt);_platform=f(Ta);ngControl=f(BC,{optional:!0,self:!0});_autofillMonitor=f(nV);_ngZone=f(bi);_formField=f(Bh,{optional:!0});_renderer=f(ii);_uid=f(Oi).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=f(Wae,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new Le;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=UC(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(be.required)??!1}set required(e){this._required=UC(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&kE().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=UC(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>kE().has(e));constructor(){let e=f(Ci,{optional:!0}),n=f(pt,{optional:!0}),o=f(kd),r=f(oV,{optional:!0,self:!0}),a=this._elementRef.nativeElement,c=a.nodeName.toLowerCase();r?T5(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r:this._inputValueAccessor=a,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(a,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new QC(o,this.ngControl,n,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=c==="select",this._isTextarea=c==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=a.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Ns(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let n=this._elementRef.nativeElement;n.type==="number"?(n.type="text",n.setSelectionRange(0,0),n.type="number"):n.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let n=this._elementRef.nativeElement;this._previousPlaceholder=e,e?n.setAttribute("placeholder",e):n.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){Gae.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,n=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&n&&n.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let n=this._elementRef.nativeElement;e.length?n.setAttribute("aria-describedby",e.join(" ")):n.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let n=e.target;!n.value&&n.selectionStart===0&&n.selectionEnd===0&&(n.setSelectionRange(1,1),n.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(n,o){n&1&&v("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),n&2&&(No("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),It("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),je("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",dt]},exportAs:["matInput"],features:[hn([{provide:XC,useExisting:t}]),un]})}return t})(),we=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[Me,Me,iV,wn]})}return t})();function qae(t,i){if(t&1){let e=j();s(0,"div",1)(1,"button",2),v("click",function(){D(e);let o=b();return P(o.action())}),d(2),l()()}if(t&2){let e=b();u(2),X(" ",e.data.action," ")}}var Xae=["label"];function Qae(t,i){}var Yae=Math.pow(2,31)-1,Yu=class{_overlayRef;instance;containerInstance;_afterDismissed=new Le;_afterOpened=new Le;_onAction=new Le;_durationTimeoutId;_dismissedByAction=!1;constructor(i,e){this._overlayRef=e,this.containerInstance=i,i._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(i){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(i,Yae))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},Gy=new kt("MatSnackBarData"),Zf=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},Kae=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return t})(),Zae=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return t})(),Jae=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return t})(),rV=(()=>{class t{snackBarRef=f(Yu);data=f(Gy);constructor(){}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(n,o){n&1&&(s(0,"div",0),d(1),l(),A(2,qae,3,1,"div",1)),n&2&&(u(),X(" ",o.data.message,` `),u(),O(o.hasAction?2:-1))},dependencies:[le,Kae,Zae,Jae],styles:[`.mat-mdc-simple-snack-bar{display:flex}.mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label{max-height:50vh;overflow:auto} `],encapsulation:2,changeDetection:0})}return t})(),j3="_mat-snack-bar-enter",$3="_mat-snack-bar-exit",ese=(()=>{class t extends NC{_ngZone=f(bi);_elementRef=f(Lt);_changeDetectorRef=f(K);_platform=f(Ta);_animationsDisabled=Qi();snackBarConfig=f(Zf);_document=f(Pi);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=f(Di);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new Le;_onExit=new Le;_onEnter=new Le;_animationState="void";_live;_label;_role;_liveElementId=f(Oi).getId("mat-snack-bar-container-live-");constructor(){super();let e=this.snackBarConfig;e.politeness==="assertive"&&!e.announcementMessage?this._live="assertive":e.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let n=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),n}attachTemplatePortal(e){this._assertNotAttached();let n=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),n}attachDomPortal=e=>{this._assertNotAttached();let n=this._portalOutlet.attachDomPortal(e);return this._afterPortalAttached(),n};onAnimationEnd(e){e===$3?this._completeExit():e===j3&&(clearTimeout(this._enterFallback),this._ngZone.run(()=>{this._onEnter.next(),this._onEnter.complete()}))}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce(),this._animationsDisabled?ar(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(j3)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd(j3)},200)))}exit(){return this._destroyed?xt(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?ar(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd($3)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd($3),200))}),this._onExit)}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){clearTimeout(this._exitFallback),queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,n=this.snackBarConfig.panelClass;n&&(Array.isArray(n)?n.forEach(a=>e.classList.add(a)):e.classList.add(n)),this._exposeToModals();let o=this._label.nativeElement,r="mdc-snackbar__label";o.classList.toggle(r,!o.querySelector(`.${r}`))}_exposeToModals(){let e=this._liveElementId,n=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{let n=e.getAttribute("aria-owns");if(n){let o=n.replace(this._liveElementId,"").trim();o.length>0?e.setAttribute("aria-owns",o):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{if(this._destroyed)return;let e=this._elementRef.nativeElement,n=e.querySelector("[aria-hidden]"),o=e.querySelector("[aria-live]");if(n&&o){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&n.contains(document.activeElement)&&(r=document.activeElement),n.removeAttribute("aria-hidden"),o.appendChild(n),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["mat-snack-bar-container"]],viewQuery:function(n,o){if(n&1&&gn(rs,7)(Xae,7),n&2){let r;gt(r=_t())&&(o._portalOutlet=r.first),gt(r=_t())&&(o._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(n,o){n&1&&v("animationend",function(a){return o.onAnimationEnd(a.animationName)})("animationcancel",function(a){return o.onAnimationEnd(a.animationName)}),n&2&&je("mat-snack-bar-container-enter",o._animationState==="visible")("mat-snack-bar-container-exit",o._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!o._animationsDisabled)},features:[xn],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(n,o){n&1&&(s(0,"div",1)(1,"div",2,0)(3,"div",3),Ae(4,Qae,0,0,"ng-template",4),l(),F(5,"div"),l()()),n&2&&(u(5),It("aria-live",o._live)("role",o._role)("id",o._liveElementId))},dependencies:[rs],styles:[`@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1} `],encapsulation:2})}return t})(),tse=new kt("mat-snack-bar-default-options",{providedIn:"root",factory:()=>new Zf}),Qr=(()=>{class t{_live=f(fR);_injector=f(Di);_breakpointObserver=f(Fh);_parentSnackBar=f(t,{optional:!0,skipSelf:!0});_defaultConfig=f(tse);_animationsDisabled=Qi();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=rV;snackBarContainerComponent=ese;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(){}openFromComponent(e,n){return this._attach(e,n)}openFromTemplate(e,n){return this._attach(e,n)}open(e,n="",o){let r=H(H({},this._defaultConfig),o);return r.data={message:e,action:n},r.announcementMessage===e&&(r.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,r)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,n){let o=n&&n.viewContainerRef&&n.viewContainerRef.injector,r=Di.create({parent:o||this._injector,providers:[{provide:Zf,useValue:n}]}),a=new Ah(this.snackBarContainerComponent,n.viewContainerRef,r),c=e.attach(a);return c.instance.snackBarConfig=n,c.instance}_attach(e,n){let o=H(H(H({},new Zf),this._defaultConfig),n),r=this._createOverlay(o),a=this._attachSnackBarContainer(r,o),c=new Yu(a,r);if(e instanceof So){let m=new ol(e,null,{$implicit:o.data,snackBarRef:c});c.instance=a.attachTemplatePortal(m)}else{let m=this._createInjector(o,c),p=new Ah(e,void 0,m),h=a.attachComponentPortal(p);c.instance=h.instance}return this._breakpointObserver.observe(Jl.HandsetPortrait).pipe(rt(r.detachments())).subscribe(m=>{r.overlayElement.classList.toggle(this.handsetCssClass,m.matches)}),o.announcementMessage&&a._onAnnounce.subscribe(()=>{this._live.announce(o.announcementMessage,o.politeness)}),this._animateSnackBar(c,o),this._openedSnackBarRef=c,this._openedSnackBarRef}_animateSnackBar(e,n){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),n.announcementMessage&&this._live.clear()}),n.duration&&n.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(n.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter()}_createOverlay(e){let n=new fm;n.direction=e.direction;let o=_m(this._injector),r=e.direction==="rtl",a=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!r||e.horizontalPosition==="end"&&r,c=!a&&e.horizontalPosition!=="center";return a?o.left("0"):c?o.right("0"):o.centerHorizontally(),e.verticalPosition==="top"?o.top("0"):o.bottom("0"),n.positionStrategy=o,n.disableAnimations=this._animationsDisabled,vm(this._injector,n)}_createInjector(e,n){let o=e&&e.viewContainerRef&&e.viewContainerRef.injector;return Di.create({parent:o||this._injector,providers:[{provide:Yu,useValue:n},{provide:Gy,useValue:e.data}]})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Zc=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({providers:[Qr],imports:[rl,Fs,$,rV,wn]})}return t})();var fe=(()=>{class t{snackbar;snackBarConfigForSuccess={duration:4e3,panelClass:["snackabar-success"],MatSnackBarHorizontalPosition:"center",MatSnackBarVerticalPosition:"bottom"};snackBarConfigForWarning={duration:4e3,panelClass:["snackabar-warning"],MatSnackBarHorizontalPosition:"center",MatSnackBarVerticalPosition:"bottom"};snackBarConfigForError={duration:1e4,panelClass:["snackabar-error"],MatSnackBarHorizontalPosition:"center",MatSnackBarVerticalPosition:"bottom"};constructor(e){this.snackbar=e}error(e){console.error(e),this.snackbar.open(e,"Close",this.snackBarConfigForError)}warning(e){this.snackbar.open(e,"Close",this.snackBarConfigForWarning)}success(e){this.snackbar.open(e,"Close",this.snackBarConfigForSuccess)}static \u0275fac=function(n){return new(n||t)(ge(Qr))};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})();var tp=(()=>{class t{data;dialogRef=f(Pe);templateName=me("");constructor(e){this.data=e,this.templateName.set(e.templateName)}onNoClick(){this.dialogRef.close(!1)}onYesClick(){this.dialogRef.close(!0)}static \u0275fac=function(n){return new(n||t)(st(Nt))};static \u0275cmp=L({type:t,selectors:[["app-delete-confirmation-dialog"]],decls:9,vars:1,consts:[["mat-dialog-title",""],[1,"mat-mdc-dialog-content"],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","","tabindex","2","mat-raised-button","","color","primary",3,"click"]],template:function(n,o){n&1&&(s(0,"h2",0),d(1,"Delete template"),l(),s(2,"div",1),d(3),l(),s(4,"div",2)(5,"button",3),v("click",function(){return o.onNoClick()}),d(6,"No, cancel"),l(),s(7,"button",4),v("click",function(){return o.onYesClick()}),d(8,"Yes, delete!"),l()()),n&2&&(u(3),X("Are you sure you want to delete template ",o.templateName(),"?"))},dependencies:[Ce,Ve,Be,$,le],encapsulation:2,changeDetection:0})}return t})();var ise=(t,i)=>i.compute_id;function ose(t,i){if(t&1&&(s(0,"button",3)(1,"mat-icon"),d(2,"arrow_back"),l()()),t&2){let e=b();x("routerLink","/controller/"+e.controller.id+"/projects")}}function rse(t,i){if(t&1){let e=j();s(0,"button",13),v("click",function(){D(e);let o=b();return P(o.openAddDialog())}),s(1,"mat-icon"),d(2,"add_circle_outline"),l()()}}function ase(t,i){t&1&&(s(0,"div",10),d(1,"Loading..."),l())}function sse(t,i){t&1&&(s(0,"div",11)(1,"mat-icon",14),d(2,"cloud_off"),l(),s(3,"p"),d(4,"No computes found. Click + to add one."),l()())}function lse(t,i){if(t&1&&(s(0,"span",22)(1,"mat-icon",23),d(2,"memory"),l(),d(3),l(),s(4,"span",22)(5,"mat-icon",23),d(6,"storage"),l(),d(7),l(),s(8,"span",22)(9,"mat-icon",23),d(10,"disc_full"),l(),d(11),l()),t&2){let e=b().$implicit,n=b(2);u(3),X(" ",n.formatPercent(e.cpu_usage_percent)," "),u(4),X(" ",n.formatPercent(e.memory_usage_percent)," "),u(4),X(" ",n.formatPercent(e.disk_usage_percent)," ")}}function cse(t,i){t&1&&(s(0,"span",21),d(1,"Offline"),l())}function dse(t,i){if(t&1){let e=j();s(0,"button",24),v("click",function(o){return o.stopPropagation()}),s(1,"mat-icon"),d(2,"more_vert"),l()(),s(3,"mat-menu",25,0)(5,"button",26),v("click",function(){D(e);let o=b().$implicit,r=b(2);return P(r.openEditDialog(o))}),s(6,"mat-icon"),d(7,"edit"),l(),s(8,"span"),d(9,"Edit"),l()(),s(10,"button",26),v("click",function(){D(e);let o=b().$implicit,r=b(2);return P(r.connectCompute(o))}),s(11,"mat-icon"),d(12,"link"),l(),s(13,"span"),d(14,"Connect"),l()(),s(15,"button",26),v("click",function(){D(e);let o=b().$implicit,r=b(2);return P(r.deleteCompute(o))}),s(16,"mat-icon"),d(17,"delete"),l(),s(18,"span"),d(19,"Delete"),l()()()}if(t&2){let e=Re(4);x("matMenuTriggerFor",e)}}function mse(t,i){if(t&1&&(s(0,"div",15)(1,"mat-icon",16),d(2),l(),s(3,"div",17)(4,"span",18),d(5),l(),s(6,"span",19),d(7),l()(),s(8,"div",20),A(9,lse,12,3)(10,cse,2,0,"span",21),l(),A(11,dse,20,1),l()),t&2){let e=i.$implicit,n=b(2);u(),yn("color",n.getStatusColor(e)),x("matTooltip",e.connected?"Connected":"Disconnected"),u(),X(" ",n.getStatusIcon(e)," "),u(3),U(e.name||e.compute_id),u(2),U(n.formatHost(e)),u(2),O(e.connected?9:10),u(2),O(e.compute_id!=="local"?11:-1)}}function pse(t,i){if(t&1&&(s(0,"nav",12),J(1,mse,12,8,"div",15,ise),l()),t&2){let e=b();u(),ee(e.computes())}}var use=(t,i)=>i.key;function hse(t,i){if(t&1&&(s(0,"mat-option",6),d(1),l()),t&2){let e=i.$implicit;x("value",e.key),u(),U(e.name)}}function fse(t,i){t&1&&(s(0,"mat-error"),d(1,"You must select a protocol"),l())}function gse(t,i){t&1&&(s(0,"mat-error"),d(1,"You must enter a host"),l())}function _se(t,i){t&1&&(s(0,"mat-error"),d(1,"You must enter a port"),l())}function vse(t,i){t&1&&(s(0,"mat-error"),d(1,"Port must be between 1 and 65535"),l())}var sV=(()=>{class t{route=f(Ye);controllerService=f(We);computeService=f(Lo);notificationService=f(wc);toasterService=f(fe);dialog=f(Je);cd=f(K);controller;_computes=me([]);computes=ri(()=>[...this._computes()].sort((n,o)=>n.compute_id==="local"?-1:o.compute_id==="local"?1:(n.name||"").localeCompare(o.name||"")));displayedColumns=["status","name","host","connected","cpu","memory","disk","actions"];loading=me(!0);subscription=new so;ngOnInit(){this.loadControllerAndComputes()}ngOnDestroy(){this.subscription.unsubscribe()}loadControllerAndComputes(){let e=this.route.snapshot.paramMap.get("controller_id");this.controllerService.get(parseInt(e,10)).then(n=>{if(this.controller=n,this.cd.markForCheck(),this.notificationService.hasCachedData()){let o=this.notificationService.getCachedComputes();this._computes.set(o),this.loading.set(!1),this.cd.markForCheck()}else this.loadComputes();this.subscription.add(this.notificationService.computeNotificationEmitter.subscribe(o=>{this.handleComputeNotification(o)})),this.subscription.add(this.notificationService.computeCacheUpdated.subscribe(o=>{this._computes.set(o),this.loading.set(!1),this.cd.markForCheck()}))})}handleComputeNotification(e){switch(e.action){case"compute.created":this._computes.update(n=>[...n,e.event]),this.toasterService.success(`Compute "${e.event.name}" added`);break;case"compute.updated":this._computes.update(n=>n.map(o=>o.compute_id===e.event.compute_id?e.event:o));break;case"compute.deleted":this._computes.update(n=>n.filter(o=>o.compute_id!==e.event.compute_id)),this.toasterService.success(`Compute "${e.event.name}" deleted`);break}this.cd.markForCheck()}loadComputes(){this.loading.set(!0),this.computeService.getComputes(this.controller).subscribe({next:e=>{this.notificationService.setInitialComputes(e),this._computes.set(e),this.loading.set(!1),this.cd.markForCheck()},error:e=>{this.loading.set(!1),this.toasterService.error("Failed to load computes: "+e),this.cd.markForCheck()}})}openAddDialog(){this.dialog.open(aV,{panelClass:["base-dialog-panel","simple-dialog-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller}}).afterClosed().subscribe(n=>{n&&this.computeService.createCompute(this.controller,n).subscribe({next:()=>{this.toasterService.success("Compute added successfully"),this.loadComputes()},error:o=>{this.toasterService.error("Failed to add compute: "+o),this.cd.markForCheck()}})})}openEditDialog(e){this.computeService.getCompute(this.controller,e.compute_id).subscribe({next:n=>{this.dialog.open(aV,{panelClass:["base-dialog-panel","simple-dialog-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller,compute:n}}).afterClosed().subscribe(r=>{r&&this.computeService.updateCompute(this.controller,e.compute_id,r).subscribe({next:()=>{this.toasterService.success("Compute updated successfully"),this.loadComputes()},error:a=>{this.toasterService.error("Failed to update compute: "+a),this.cd.markForCheck()}})})},error:n=>{this.toasterService.error("Failed to load compute details: "+n),this.cd.markForCheck()}})}deleteCompute(e){this.dialog.open(tp,{panelClass:["base-confirmation-dialog-panel","confirmation-danger-panel"],autoFocus:!1,disableClose:!0,data:{templateName:e.name||e.compute_id}}).afterClosed().subscribe(o=>{o&&this.computeService.deleteCompute(this.controller,e.compute_id).subscribe({next:()=>{this.toasterService.success("Compute deleted successfully"),this.loadComputes()},error:r=>{this.toasterService.error("Failed to delete compute: "+r),this.cd.markForCheck()}})})}connectCompute(e){this.computeService.connectCompute(this.controller,e.compute_id).subscribe({next:()=>{this.toasterService.success("Connection request sent"),this.computeService.getCompute(this.controller,e.compute_id).subscribe({next:n=>{let o=this.computes().map(r=>r.compute_id===n.compute_id?n:r);this._computes.set(o),this.cd.markForCheck()},error:()=>{this.loadComputes()}})},error:n=>{this.toasterService.error("Failed to connect compute: "+n),this.cd.markForCheck()}})}getStatusIcon(e){return e.connected?"check_circle":"cancel"}getStatusColor(e){return e.connected?"var(--mat-sys-primary)":"var(--mat-sys-error)"}formatPercent(e){return e!=null?`${e.toFixed(1)}%`:"--"}formatHost(e){return`${e.host}:${e.port}`}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["app-computes"]],decls:15,vars:5,consts:[["menu","matMenu"],[1,"computes"],[1,"computes__header"],["mat-icon-button","",1,"computes__back-btn",3,"routerLink"],[1,"computes__title"],["matTooltip","Add Compute","matTooltipClass","custom-tooltip","mat-icon-button","",1,"computes__add-btn"],[1,"computes__content"],[1,"computes__info"],[1,"computes__info-icon"],[1,"computes__info-text"],[1,"computes__loading"],[1,"computes__empty"],[1,"computes__list"],["matTooltip","Add Compute","matTooltipClass","custom-tooltip","mat-icon-button","",1,"computes__add-btn",3,"click"],[1,"computes__empty-icon"],[1,"computes__list-item"],[1,"computes__list-icon",3,"matTooltip"],[1,"computes__list-info"],[1,"computes__list-name"],[1,"computes__list-host"],[1,"computes__list-stats"],[1,"computes__stat","computes__stat--offline"],[1,"computes__stat"],[1,"computes__stat-icon"],["mat-icon-button","",1,"computes__menu-btn",3,"click","matMenuTriggerFor"],["xPosition","before"],["mat-menu-item","",3,"click"]],template:function(n,o){n&1&&(s(0,"div",1)(1,"header",2),A(2,ose,3,1,"button",3),s(3,"h1",4),d(4,"Computes"),l(),A(5,rse,3,0,"button",5),l(),s(6,"main",6)(7,"div",7)(8,"mat-icon",8),d(9,"info"),l(),s(10,"p",9),d(11," Once configured and connected, the backend maintains the connection to Compute nodes automatically. This page is used to add/delete/update node configurations and view node status. "),l()(),A(12,ase,2,0,"div",10),A(13,sse,5,0,"div",11),A(14,pse,3,0,"nav",12),l()()),n&2&&(u(2),O(o.controller?2:-1),u(3),O(o.controller?5:-1),u(7),O(o.loading()?12:-1),u(),O(!o.loading()&&!o.computes().length?13:-1),u(),O(!o.loading()&&o.computes().length?14:-1))},dependencies:[Z,at,cn,$,ze,te,se,Qe,Fn,ot,kn,In,Gt,Kt,Ce,Me,we,Mt,ct],styles:["[_nghost-%COMP%]{display:block;width:100%;background:transparent}.computes__header[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:32px 20px 16px;display:flex;align-items:center;gap:16px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out}.computes__back-btn[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:12px;color:var(--mat-sys-on-surface);transition:all .2s cubic-bezier(.4,0,.2,1)}.computes__back-btn[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--mat-sys-on-surface) 8%,transparent)}.computes__title[_ngcontent-%COMP%]{font-size:32px;font-weight:500;color:var(--mat-sys-on-surface);margin:0;padding-bottom:8px}.computes__add-btn[_ngcontent-%COMP%]{margin-left:auto;color:var(--mat-sys-primary)}.computes__content[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:0 20px 20px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .1s both}.computes__info[_ngcontent-%COMP%]{display:flex;gap:12px;padding:16px;margin-bottom:20px;background:var(--mat-sys-primary-container);border-radius:12px;border-left:4px solid var(--mat-sys-primary);animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .15s both}.computes__info-icon[_ngcontent-%COMP%]{color:var(--mat-sys-on-primary-container);flex-shrink:0;font-size:20px;width:20px;height:20px}.computes__info-text[_ngcontent-%COMP%]{margin:0;font-size:14px;color:var(--mat-sys-on-primary-container);line-height:1.5}.computes__loading[_ngcontent-%COMP%], .computes__empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface);border-radius:16px;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.computes__empty-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:16px;color:var(--mat-sys-on-surface-variant)}.computes__list[_ngcontent-%COMP%]{background:var(--mat-sys-surface);border-radius:16px;overflow:hidden;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.computes__list-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:16px 24px;border-bottom:1px solid var(--mat-sys-outline-variant);transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer}.computes__list-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.computes__list-item[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--mat-sys-on-surface) 5%,transparent)}.computes__list-icon[_ngcontent-%COMP%]{flex-shrink:0}.computes__list-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-width:0}.computes__list-name[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:var(--mat-sys-on-surface);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.computes__list-host[_ngcontent-%COMP%]{font-size:13px;color:var(--mat-sys-on-surface-variant)}.computes__list-stats[_ngcontent-%COMP%]{display:flex;gap:16px;flex-shrink:0}.computes__stat[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--mat-sys-on-surface)}.computes__stat--offline[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font-style:italic}.computes__stat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--mat-sys-on-surface-variant)}.computes__menu-btn[_ngcontent-%COMP%]{flex-shrink:0}@keyframes _ngcontent-%COMP%_fadeInSlideIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.computes__header[_ngcontent-%COMP%]{padding:24px 16px 12px;gap:12px}.computes__back-btn[_ngcontent-%COMP%]{width:44px;height:44px}.computes__title[_ngcontent-%COMP%]{font-size:24px}.computes__content[_ngcontent-%COMP%]{padding:0 16px 16px}.computes__list-item[_ngcontent-%COMP%]{padding:14px 16px}.computes__list-stats[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})}return t})(),aV=(()=>{class t{dialogRef=f(Pe);data=f(Nt);protocols=[{key:"http",name:"HTTP"},{key:"https",name:"HTTPS"}];computeForm=new Dr({name:new re(""),protocol:new re("http",[be.required]),host:new re("",[be.required]),port:new re(3080,[be.required,be.min(1),be.max(65535)]),user:new re("gns3"),password:new re("gns3")});isEditMode=!1;constructor(){this.data.compute&&(this.isEditMode=!0,this.computeForm.patchValue({name:this.data.compute.name,protocol:this.data.compute.protocol,host:this.data.compute.host,port:this.data.compute.port,user:this.data.compute.user,password:""}))}onSaveClick(){if(!this.computeForm.valid)return;let e=this.computeForm.value,n={protocol:e.protocol,host:e.host,port:e.port,user:e.user||void 0,name:e.name||void 0};e.password&&e.password.trim()!==""&&(n.password=e.password),this.dialogRef.close(n)}onCancelClick(){this.dialogRef.close()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["app-add-compute-dialog"]],decls:39,vars:8,consts:[["mat-dialog-title",""],[3,"formGroup"],["mat-dialog-content",""],["appearance","fill",1,"full-width-field"],["matInput","","tabindex","1","formControlName","name","placeholder","My Compute"],["formControlName","protocol"],[3,"value"],["matInput","","tabindex","1","formControlName","host","placeholder","192.168.1.100"],["matInput","","type","number","tabindex","1","formControlName","port","placeholder","3080"],["matInput","","tabindex","1","formControlName","user","placeholder","gns3"],["matInput","","type","password","tabindex","1","formControlName","password","placeholder","gns3"],["mat-dialog-actions","","align","end"],["mat-button","","tabindex","-1","color","accent",3,"click"],["mat-button","","tabindex","2","mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,o){n&1&&(s(0,"h2",0),d(1),l(),s(2,"form",1)(3,"div",2)(4,"mat-form-field",3)(5,"mat-label"),d(6,"Name (optional)"),l(),F(7,"input",4),l(),s(8,"mat-form-field",3)(9,"mat-label"),d(10,"Protocol"),l(),s(11,"mat-select",5),J(12,hse,2,2,"mat-option",6,use),l(),A(14,fse,2,0,"mat-error"),l(),s(15,"mat-form-field",3)(16,"mat-label"),d(17,"Host"),l(),F(18,"input",7),A(19,gse,2,0,"mat-error"),l(),s(20,"mat-form-field",3)(21,"mat-label"),d(22,"Port"),l(),F(23,"input",8),A(24,_se,2,0,"mat-error"),A(25,vse,2,0,"mat-error"),l(),s(26,"mat-form-field",3)(27,"mat-label"),d(28,"User"),l(),F(29,"input",9),l(),s(30,"mat-form-field",3)(31,"mat-label"),d(32,"Password"),l(),F(33,"input",10),l()(),s(34,"div",11)(35,"button",12),v("click",function(){return o.onCancelClick()}),d(36,"Cancel"),l(),s(37,"button",13),v("click",function(){return o.onSaveClick()}),d(38),l()()()),n&2&&(u(),U(o.isEditMode?"Edit Compute":"Add Compute"),u(),x("formGroup",o.computeForm),u(10),ee(o.protocols),u(2),O(o.computeForm.get("protocol").hasError("required")?14:-1),u(5),O(o.computeForm.get("host").hasError("required")?19:-1),u(5),O(o.computeForm.get("port").hasError("required")?24:-1),u(),O(o.computeForm.get("port").hasError("min")||o.computeForm.get("port").hasError("max")?25:-1),u(12),x("disabled",o.computeForm.invalid),u(),X(" ",o.isEditMode?"Update":"Add"," "))},dependencies:[Z,ct,Ue,vt,xi,mt,He,pt,bt,Ce,Ve,Be,Wt,$,le,Me,ke,lt,Ni,we,Te,Mt,At,St],encapsulation:2,changeDetection:0})}return t})();var bse=["*"];var Cse=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],xse=["[mat-card-avatar], [matCardAvatar]",`mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], [matCardTitle], [matCardSubtitle]`,"*"],yse=new kt("MAT_CARD_CONFIG"),Tn=(()=>{class t{appearance;constructor(){let e=f(yse,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(n,o){n&2&&je("mat-mdc-card-outlined",o.appearance==="outlined")("mdc-card--outlined",o.appearance==="outlined")("mat-mdc-card-filled",o.appearance==="filled")("mdc-card--filled",o.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:bse,decls:1,vars:0,template:function(n,o){n&1&&(En(),Yt(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-elevated-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mat-card-outlined-container-color, var(--mat-sys-surface));border-radius:var(--mat-card-outlined-container-shape, var(--mat-sys-corner-medium));border-width:var(--mat-card-outlined-outline-width, 1px);border-color:var(--mat-card-outlined-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mat-card-outlined-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mat-mdc-card-filled{background-color:var(--mat-card-filled-container-color, var(--mat-sys-surface-container-highest));border-radius:var(--mat-card-filled-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-filled-container-elevation, var(--mat-sys-level0))}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end} `],encapsulation:2,changeDetection:0})}return t})(),Jc=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"]})}return t})();var Sl=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return t})();var Wy=(()=>{class t{align="start";static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(n,o){n&2&&je("mat-mdc-card-actions-align-end",o.align==="end")},inputs:{align:"align"},exportAs:["matCardActions"]})}return t})(),ed=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],ngContentSelectors:xse,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(n,o){n&1&&(En(Cse),Yt(0),_o(1,"div",0),Yt(2,1),wo(),Yt(3,2))},encapsulation:2,changeDetection:0})}return t})();var Dt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[wn]})}return t})();var np=(()=>{class t{dataChange=new qt([]);constructor(){}get data(){return this.dataChange.value}addController(e){let n=this.data.slice();n.push(e),this.dataChange.next(n)}addControllers(e){this.dataChange.next(e)}remove(e){let n=this.data.indexOf(e);n>=0&&(this.data.splice(n,1),this.dataChange.next(this.data.slice()))}find(e){return this.data.find(n=>n.name===e)}findById(e){return this.data.find(n=>n.id===e)}findIndex(e){return this.data.findIndex(n=>n.name===e)}findIndexById(e){return this.data.findIndex(n=>n.id===e)}update(e){let n=this.findIndexById(e.id);n>=0&&(this.data[n]=e,this.dataChange.next(this.data.slice()))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})();var lV=(t,i)=>i.key;function Sse(t,i){t&1&&(s(0,"mat-error"),d(1,"You must enter a value"),l())}function wse(t,i){if(t&1&&(s(0,"mat-option",9),d(1),l()),t&2){let e=i.$implicit;x("value",e.key),u(),X(" ",e.name," ")}}function Mse(t,i){if(t&1&&(s(0,"mat-option",9),d(1),l()),t&2){let e=i.$implicit;x("value",e.key),u(),X(" ",e.name," ")}}var qy=(()=>{class t{controllerService=f(We);controllerDatabase=f(np);route=f(Ye);router=f(ut);toasterService=f(fe);controllerOptionsVisibility=me(!1);controllerIp;controllerPort;projectId;protocols=[{key:"http:",name:"HTTP"},{key:"https:",name:"HTTPS"}];locations=[{key:"local",name:"Local"},{key:"remote",name:"Remote"}];controllerForm=new Dr({name:new re("",[be.required]),location:new re(""),protocol:new re("http:")});constructor(){}async ngOnInit(){this.controllerService.isServiceInitialized&&this.getControllers(),this.controllerService.serviceInitialized.subscribe(async e=>{e&&this.getControllers()})}async getControllers(){this.controllerIp=this.route.snapshot.paramMap.get("controller_ip"),this.controllerPort=+this.route.snapshot.paramMap.get("controller_port"),this.projectId=this.route.snapshot.paramMap.get("project_id");let n=(await this.controllerService.findAll()).filter(o=>o.host===this.controllerIp&&o.port===this.controllerPort)[0];n?this.router.navigate(["/controller",n.id,"project",this.projectId]):this.controllerOptionsVisibility.set(!0)}createController(){if(!this.controllerForm.get("name").hasError&&!this.controllerForm.get("location").hasError&&!this.controllerForm.get("protocol").hasError){this.toasterService.error("Please use correct values");return}let e=new Qf;e.host=this.controllerIp,e.port=this.controllerPort,e.name=this.controllerForm.get("name").value,e.location=this.controllerForm.get("location").value,e.protocol=this.controllerForm.get("protocol").value,this.controllerService.create(e).then(n=>{this.router.navigate(["/controller",n.id,"project",this.projectId])})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["app-direct-link"]],decls:22,vars:3,consts:[[1,"content",3,"hidden"],[1,"default-header"],[1,"row"],[1,"col"],[1,"default-content"],[1,"matCard"],[3,"formGroup"],["matInput","","tabindex","1","formControlName","name","placeholder","Name"],["placeholder","Location","formControlName","location"],[3,"value"],["placeholder","Protocol","formControlName","protocol"],[1,"buttons-bar"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,o){n&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),d(4,"Add new controller"),l()()(),s(5,"div",4)(6,"mat-card",5)(7,"form",6)(8,"mat-form-field"),F(9,"input",7),A(10,Sse,2,0,"mat-error"),l(),s(11,"mat-form-field")(12,"mat-select",8),J(13,wse,2,2,"mat-option",9,lV),l()(),s(15,"mat-form-field")(16,"mat-select",10),J(17,Mse,2,2,"mat-option",9,lV),l()()()(),s(19,"div",11)(20,"button",12),v("click",function(){return o.createController()}),d(21,"Add controller"),l()()()()),n&2&&(x("hidden",!o.controllerOptionsVisibility()),u(7),x("formGroup",o.controllerForm),u(3),O(o.controllerForm.get("name").hasError("required")?10:-1),u(3),ee(o.locations),u(4),ee(o.protocols))},dependencies:[Z,ct,Ue,vt,mt,He,pt,bt,at,Dt,Tn,Me,ke,Ni,we,Te,Mt,At,St,Jo,$,le],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}return t})();var H3=new kt("CdkAccordion"),cV=(()=>{class t{_stateChanges=new Le;_openCloseAllActions=new Le;id=f(Oi).getId("cdk-accordion-");multi=!1;openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",dt]},exportAs:["cdkAccordion"],features:[hn([{provide:H3,useExisting:t}]),un]})}return t})(),dV=(()=>{class t{accordion=f(H3,{optional:!0,skipSelf:!0});_changeDetectorRef=f(K);_expansionDispatcher=f(Lh);_openCloseAllSubscription=so.EMPTY;closed=new ve;opened=new ve;destroyed=new ve;expandedChange=new ve;id=f(Oi).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let n=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,n)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=me(!1);_removeUniqueSelectionListener=()=>{};constructor(){}ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,n)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===n&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",dt],disabled:[2,"disabled","disabled",dt]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[hn([{provide:H3,useValue:void 0}])]})}return t})(),Xy=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({})}return t})();var kse=["body"],Tse=["bodyWrapper"],Ese=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Dse=["mat-expansion-panel-header","*","mat-action-row"];function Pse(t,i){}var Ise=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Ase=["mat-panel-title","mat-panel-description","*"];function Ose(t,i){t&1&&(_o(0,"span",1),Vn(),_o(1,"svg",2),jr(2,"path",3),wo()())}var U3=new kt("MAT_ACCORDION"),mV=new kt("MAT_EXPANSION_PANEL"),Nse=(()=>{class t{_template=f(So);_expansionPanel=f(mV,{optional:!0});constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["ng-template","matExpansionPanelContent",""]]})}return t})(),pV=new kt("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),Ud=(()=>{class t extends dV{_viewContainerRef=f(co);_animationsDisabled=Qi();_document=f(Pi);_ngZone=f(bi);_elementRef=f(Lt);_renderer=f(ii);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new ve;afterCollapse=new ve;_inputChanges=new Le;accordion=f(U3,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=f(Oi).getId("mat-expansion-panel-header-");constructor(){super();let e=f(pV,{optional:!0});this._expansionDispatcher=f(Lh),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(li(null),Pn(()=>this.expanded&&!this._portal),wi(1)).subscribe(()=>{this._portal=new ol(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,n=this._body.nativeElement;return e===n||n.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:n})=>{e===this._bodyWrapper?.nativeElement&&n==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(n,o,r){if(n&1&&$i(r,Nse,5),n&2){let a;gt(a=_t())&&(o._lazyContent=a.first)}},viewQuery:function(n,o){if(n&1&&gn(kse,5)(Tse,5),n&2){let r;gt(r=_t())&&(o._body=r.first),gt(r=_t())&&(o._bodyWrapper=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(n,o){n&2&&je("mat-expanded",o.expanded)("mat-expansion-panel-spacing",o._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",dt],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[hn([{provide:U3,useValue:void 0},{provide:mV,useExisting:t}]),xn,un],ngContentSelectors:Dse,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(n,o){n&1&&(En(Ese),Yt(0),s(1,"div",2,0)(3,"div",3,1)(5,"div",4),Yt(6,1),Ae(7,Pse,0,0,"ng-template",5),l(),Yt(8,2),l()()),n&2&&(u(),It("inert",o.expanded?null:""),u(2),x("id",o.id),It("aria-labelledby",o._headerId),u(4),x("cdkPortalOutlet",o._portal))},dependencies:[rs],styles:[`.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel{position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:var(--mat-expansion-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}@media print{.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-content{font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px} `],encapsulation:2,changeDetection:0})}return t})();var Gd=(()=>{class t{panel=f(Ud,{host:!0});_element=f(Lt);_focusMonitor=f(xr);_changeDetectorRef=f(K);_parentChangeSubscription=so.EMPTY;constructor(){f(Go).load(yr);let e=this.panel,n=f(pV,{optional:!0}),o=f(new ka("tabindex"),{optional:!0}),r=e.accordion?e.accordion._stateChanges.pipe(Pn(a=>!!(a.hideToggle||a.togglePosition))):Zr;this.tabIndex=parseInt(o||"")||0,this._parentChangeSubscription=Dn(e.opened,e.closed,r,e._inputChanges.pipe(Pn(a=>!!(a.hideToggle||a.disabled||a.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(Pn(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),n&&(this.expandedHeight=n.expandedHeight,this.collapsedHeight=n.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:cr(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,n){e?this._focusMonitor.focusVia(this._element,e,n):this._element.nativeElement.focus(n)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(n,o){n&1&&v("click",function(){return o._toggle()})("keydown",function(a){return o._keydown(a)}),n&2&&(It("id",o.panel._headerId)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o._getPanelId())("aria-expanded",o._isExpanded())("aria-disabled",o.panel.disabled),yn("height",o._getHeaderHeight()),je("mat-expanded",o._isExpanded())("mat-expansion-toggle-indicator-after",o._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",o._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:io(e)]},ngContentSelectors:Ase,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(n,o){n&1&&(En(Ise),_o(0,"span",0),Yt(1),Yt(2,1),Yt(3,2),wo(),A(4,Ose,3,0,"span",1)),n&2&&(je("mat-content-hide-toggle",!o._showToggle()),u(4),O(o._showToggle()?4:-1))},styles:[`.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit}.mat-expansion-panel-animations-enabled .mat-expansion-panel-header{transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header::before{border-radius:inherit}.mat-expansion-panel-header{height:var(--mat-expansion-header-collapsed-state-height, 48px);font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-sys-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height, 64px)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-sys-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-sys-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-sys-on-surface-variant))}.mat-expansion-panel-animations-enabled .mat-expansion-indicator{transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded .mat-expansion-indicator{transform:rotate(180deg)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, none)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-header-indicator-display, inline-block)}@media(forced-colors: active){.mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}} `],encapsulation:2,changeDetection:0})}return t})(),Qy=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return t})(),ip=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=ft({type:t,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return t})(),op=(()=>{class t extends cV{_keyManager;_ownHeaders=new Ql;_headers;hideToggle=!1;displayMode="default";togglePosition="after";ngAfterContentInit(){this._headers.changes.pipe(li(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(n=>n.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new Cm(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(e){this._keyManager.onKeydown(e)}_handleHeaderFocus(e){this._keyManager.updateActiveItem(e)}ngOnDestroy(){super.ngOnDestroy(),this._keyManager?.destroy(),this._ownHeaders.destroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=fi(t)))(o||t)}})();static \u0275dir=ft({type:t,selectors:[["mat-accordion"]],contentQueries:function(n,o,r){if(n&1&&$i(r,Gd,5),n&2){let a;gt(a=_t())&&(o._headers=a)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(n,o){n&2&&je("mat-accordion-multi",o.multi)},inputs:{hideToggle:[2,"hideToggle","hideToggle",dt],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],features:[hn([{provide:U3,useExisting:t}]),xn]})}return t})(),wl=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Bt({type:t});static \u0275inj=Ft({imports:[Xy,Fs,wn]})}return t})();var Ky=(()=>{class t{httpClient=f(os);sanitizer=f(lr);thirdpartylicenses=me("");releasenotes=me("");ngOnInit(){this.httpClient.get(window.location.href+"/3rdpartylicenses.txt",{responseType:"text"}).subscribe(e=>{let n=e.replace(new RegExp(` `,"g"),"
");this.thirdpartylicenses.set(this.sanitizer.bypassSecurityTrustHtml(n))},e=>{e.status===404&&this.thirdpartylicenses.set("Download Solar-PuTTY")}),this.httpClient.get("ReleaseNotes.txt",{responseType:"text"}).subscribe(e=>{let n=e.replace(new RegExp(` `,"g"),"
");this.releasenotes.set(this.sanitizer.bypassSecurityTrustHtml(n))})}goToDocumentation(){window.location.href="https://docs.gns3.com/docs/"}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=L({type:t,selectors:[["app-help"]],decls:39,vars:2,consts:[[1,"help"],[1,"help__header"],[1,"help__title"],[1,"help__content"],[1,"help__card"],["href","https://downloads.solarwinds.com/solarwinds/GNS3/Solar-PuTTY/Solar-PuTTY-Optional.exe",1,"help__link"],[3,"innerHTML"],["mat-button","","color","primary",1,"help__doc-button",3,"click"]],template:function(n,o){n&1&&(s(0,"div",0)(1,"header",1)(2,"h1",2),d(3,"Help"),l()(),s(4,"main",3)(5,"section",4)(6,"mat-accordion")(7,"mat-expansion-panel")(8,"mat-expansion-panel-header")(9,"mat-panel-title"),d(10," Useful shortcuts "),l()(),s(11,"mat-list")(12,"mat-list-item"),d(13," ctrl + + to zoom in "),l(),s(14,"mat-list-item"),d(15," ctrl + - to zoom out "),l(),s(16,"mat-list-item"),d(17," ctrl + 0 to reset zoom "),l(),s(18,"mat-list-item"),d(19," ctrl + h to hide toolbar "),l(),s(20,"mat-list-item"),d(21," ctrl + a to select all items on map "),l(),s(22,"mat-list-item"),d(23," ctrl + shift + a to deselect all items on map "),l(),s(24,"mat-list-item"),d(25," ctrl + shift + s to go to preferences "),l()()(),s(26,"mat-expansion-panel")(27,"mat-expansion-panel-header")(28,"mat-panel-title"),d(29," Third party components "),l()(),s(30,"a",5),F(31,"div",6),l()(),s(32,"mat-expansion-panel")(33,"mat-expansion-panel-header")(34,"mat-panel-title"),d(35," Release notes "),l()(),F(36,"div",6),l()()(),s(37,"button",7),v("click",function(){return o.goToDocumentation()}),d(38," Go to documentation "),l()()()),n&2&&(u(31),x("innerHTML",o.thirdpartylicenses(),Zp),u(5),x("innerHTML",o.releasenotes(),Zp))},dependencies:[$,le,wl,op,Ud,Gd,ip,Ri,YC,Mc],styles:["[_nghost-%COMP%]{display:block;width:100%;background:transparent}.help__header[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:32px 20px 16px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out}.help__title[_ngcontent-%COMP%]{font-size:32px;font-weight:500;color:var(--mat-sys-on-surface);margin:0;padding-bottom:8px}.help__content[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:0 20px 20px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .1s both}.help__card[_ngcontent-%COMP%]{background:var(--mat-sys-surface);border-radius:16px;overflow:hidden;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none;border-bottom:1px solid var(--mat-sys-outline-variant)}.mat-expansion-panel[_ngcontent-%COMP%]:first-of-type{border-top:none}.mat-expansion-panel-header[_ngcontent-%COMP%]{font-weight:500;color:var(--mat-sys-on-surface)}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface)}.help__doc-button[_ngcontent-%COMP%]{display:block;width:100%;margin-top:20px;height:48px;border-radius:12px;font-size:16px;font-weight:500;text-transform:none;letter-spacing:.5px}.help__link[_ngcontent-%COMP%]{color:var(--mat-sys-primary);text-decoration:none;font-size:14px;font-weight:400}.help__link[_ngcontent-%COMP%]:hover{text-decoration:underline}@keyframes _ngcontent-%COMP%_fadeInSlideIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.help__header[_ngcontent-%COMP%]{padding:24px 16px 12px}.help__title[_ngcontent-%COMP%]{font-size:24px}.help__content[_ngcontent-%COMP%]{padding:0 16px 16px}.help__doc-button[_ngcontent-%COMP%]{height:44px;font-size:15px}}"],changeDetection:0})}return t})();var Zy=(()=>{class t{constructor(){}isWindows(){return navigator.platform.indexOf("Win")>-1}isLinux(){return navigator.platform.indexOf("Linux")>-1}isDarwin(){return navigator.platform.indexOf("Mac")>-1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})();var Jy=(()=>{class t{platformService;constructor(e){this.platformService=e}get(){return this.platformService.isWindows()?this.getForWindows():this.platformService.isDarwin()?this.getForDarwin():this.getForLinux()}getForWindows(){let e=[{name:"Wireshark",locations:["C:\\Program Files\\Wireshark\\Wireshark.exe"],type:"web",resource:"https://1.na.dl.wireshark.org/win64/all-versions/Wireshark-win64-2.6.3.exe",binary:"Wireshark.exe",sudo:!0,installation_arguments:[],installed:!1,installer:!0}],n={name:"SolarPuTTY",locations:["SolarPuTTY.exe","external\\SolarPuTTY.exe"],type:"web",resource:"",binary:"SolarPuTTY.exe",sudo:!1,installation_arguments:["--only-ask"],installed:!1,installer:!1};return Ai.solarputty_download_url&&(n.resource=Ai.solarputty_download_url,e.push(n)),e}getForLinux(){return[]}getForDarwin(){return[]}static \u0275fac=function(n){return new(n||t)(ge(Zy))};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})();var eS=(()=>{class t{externalSoftwareDefinition;constructor(e){this.externalSoftwareDefinition=e}list(){return this.externalSoftwareDefinition.get().map(n=>(n.installed=!1,n))}static \u0275fac=function(n){return new(n||t)(ge(Jy))};static \u0275prov=Q({token:t,factory:t.\u0275fac})}return t})();var Lse=(t,i)=>({hidden:t,lightTheme:i}),Bse=/(.*)<\/a>(.*)\s*