import{a as dt,b as ot,c as KA,d as _t,e as He,f as Wt,g as Xe,h as Xv,i as Ge,j as xt,k as qe,l as Se,m as u5,n as g5,o as tx,p as h5,q as hg}from"./chunk-VB5QSUFX.js";import{$ as pi,A as Vo,B as mt,C as o5,D as st,E as dl,F as us,G as r5,H as a5,I as pl,J as Jv,K as s5,L as l5,M as gg,N as re,O as Nk,P as ex,Q as Ni,R as Yt,S as zt,T as c5,U as Ta,V as qo,W as Qo,X as d5,Y as p5,Z as m5,_ as Co,a as pt,aa as lp,b as at,ba as vo,c as ut,ca as qn,d as YA,da as cp,e as dr,ea as pr,f as ro,fa as gs,g as rt,ga as Zr,h as ze,ha as Jr,i as ni,ia as ea,j as kc,k as Go,l as di,m as Yv,n as mg,o as ke,p as Me,q as Sd,r as Zv,s as ZA,t as JA,u as ug,v as e5,w as nt,x as t5,y as n5,z as i5}from"./chunk-3DUTSYEG.js";import{$ as J,$a as O,$b as eA,$c as Ua,$d as IA,$e as Sc,A as U4,Aa as Lr,Ab as Vn,Ac as aA,Ae as Ik,B as fi,Ba as Ev,Bb as Bn,Bc as fe,Bd as kA,Be as qv,C as wr,Ca as wo,Cb as Te,Cc as Jl,Ce as jA,D as pa,Da as ip,Db as Ot,Dc as sA,De as Pa,E as kv,Ea as p,Eb as se,Ec as lA,Ed as PA,Ee as Ak,F as io,Fa as Kr,Fb as Xr,Fc as Nv,Fe as lf,G as oo,Ga as lr,Gb as c,Gc as Fv,Ge as $A,H as rl,Ha as Dm,Hb as N,Hc as cA,Hd as jv,He as Br,I as Yn,Ia as Ui,Ib as Z,Ic as dA,Id as TA,Ie as HA,J as Pk,Ja as wt,Jb as Ti,Jc as ng,Jd as Md,Je as Fm,K as Tk,Kb as Y4,Kc as pA,Kd as jt,Ke as UA,L as Ju,La as $o,Lb as Z4,Lc as mA,Ld as EA,Le as WA,M as $a,Ma as B,Mb as J4,Mc as cs,Md as We,Me as Lt,N as of,Na as nn,Nb as ln,Nc as uA,Nd as OA,Ne as dg,O as W4,Oa as yt,Ob as Xt,Oc as ig,Od as $v,Oe as It,P as eg,Pa as Ha,Pb as cn,Pc as gA,Pd as $t,Pe as fo,Q as Pv,Qb as Mr,Qc as ka,Qd as Ct,Qe as Qv,Ra as li,Rb as xd,Rc as kr,Rd as Hv,Re as fn,Sa as ce,Sb as un,Sc as Rv,Sd as Uo,Se as GA,T as vd,Ta as Ov,Tb as it,Tc as sf,Td as Yi,Te as pe,Ua as K4,Ub as rn,Uc as Im,Ud as ag,Ue as ne,V as Oi,Vb as Yr,Vc as hA,Vd as Qe,Ve as qA,W as $n,Wa as js,Wb as Iv,Wc as _A,We as Kv,X as $e,Xa as Ve,Xb as Av,Xc as ap,Xd as vt,Xe as sp,Y as ei,Ya as X4,Yb as Dt,Yc as fA,Yd as Wo,Ye as QA,Z as Di,Za as E,Zb as hn,Zc as sl,Zd as ll,Ze as Wa,_ as wc,_a as Dv,_b as zo,_c as Vr,_d as DA,_e as Be,a as q,aa as tn,ab as Ii,ac as $s,ad as Am,ae as Kt,af as _e,b as Le,ba as mn,bb as Ee,bc as tA,bd as og,be as Ht,bf as X,c as Mv,ca as he,cb as Q,cc as af,cd as CA,ce as AA,cf as Li,d as Vs,da as f,db as K,dc as Fe,dd as vA,de as NA,df as XA,e as Un,ea as G4,eb as C,ec as op,ed as xA,ee as sg,ef as on,f as Bs,fa as q4,fb as a,fc as nA,fd as zi,fe as ps,ff as Ga,g as To,ga as Ek,gb as l,gc as zr,gd as Dk,ge as cl,gf as pg,h as ls,ha as w,hb as z,hc as te,hd as Lv,he as lg,i as Ye,ia as M,ib as ti,ic as an,id as wd,ie as Ai,j as sn,ja as gi,jb as wi,jc as iA,jd as yA,je as kt,k as Xu,ka as Qr,kb as Sa,kd as Nm,ke as Ft,l as j4,la as Cr,lb as Ae,lc as $,ld as bA,le as ms,m as $4,ma as Eo,mb as Ne,mc as ie,md as cr,n as ol,na as Rr,nb as Ci,nc as yd,nd as wA,ne as Uv,o as Yu,oa as ve,ob as L,oc as At,p as H4,pa as Ki,pb as ma,pc as Ho,pd as rg,pe as Wv,q as Zu,qa as Q4,qb as _,qe as FA,r as Ut,ra as R,rb as Mc,rc as Mi,re as RA,s as jo,sa as zn,sb as g,sc as Oo,se as LA,t as nf,ta as In,tb as ci,tc as oA,td as zv,te as zA,u as Sv,ua as yi,ub as Zt,uc as rA,ud as Vv,va as Qt,vb as Xi,vc as al,vd as ds,w as Pt,wa as Zl,wb as Gn,wc as bd,we as VA,x as da,xa as Tv,xb as gt,xc as Sr,xd as MA,xe as cg,y as Om,ya as Ok,yb as ht,yc as tg,yd as SA,ye as Gv,z as kk,za as rf,zc as rp,zd as Bv,ze as BA}from"./chunk-G7NALUVX.js";var PL=Vs((SL,kL)=>{(function(n){if(typeof SL=="object")kL.exports=n();else if(typeof define=="function"&&define.amd)define(n);else{var o;try{o=window}catch{o=self}o.SparkMD5=n()}})(function(n){"use strict";var o=function(S,T){return S+T&4294967295},e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(S,T,A,D,F,I){return T=o(o(T,S),o(D,I)),o(T<>>32-F,A)}function i(S,T){var A=S[0],D=S[1],F=S[2],I=S[3];A+=(D&F|~D&I)+T[0]-680876936|0,A=(A<<7|A>>>25)+D|0,I+=(A&D|~A&F)+T[1]-389564586|0,I=(I<<12|I>>>20)+A|0,F+=(I&A|~I&D)+T[2]+606105819|0,F=(F<<17|F>>>15)+I|0,D+=(F&I|~F&A)+T[3]-1044525330|0,D=(D<<22|D>>>10)+F|0,A+=(D&F|~D&I)+T[4]-176418897|0,A=(A<<7|A>>>25)+D|0,I+=(A&D|~A&F)+T[5]+1200080426|0,I=(I<<12|I>>>20)+A|0,F+=(I&A|~I&D)+T[6]-1473231341|0,F=(F<<17|F>>>15)+I|0,D+=(F&I|~F&A)+T[7]-45705983|0,D=(D<<22|D>>>10)+F|0,A+=(D&F|~D&I)+T[8]+1770035416|0,A=(A<<7|A>>>25)+D|0,I+=(A&D|~A&F)+T[9]-1958414417|0,I=(I<<12|I>>>20)+A|0,F+=(I&A|~I&D)+T[10]-42063|0,F=(F<<17|F>>>15)+I|0,D+=(F&I|~F&A)+T[11]-1990404162|0,D=(D<<22|D>>>10)+F|0,A+=(D&F|~D&I)+T[12]+1804603682|0,A=(A<<7|A>>>25)+D|0,I+=(A&D|~A&F)+T[13]-40341101|0,I=(I<<12|I>>>20)+A|0,F+=(I&A|~I&D)+T[14]-1502002290|0,F=(F<<17|F>>>15)+I|0,D+=(F&I|~F&A)+T[15]+1236535329|0,D=(D<<22|D>>>10)+F|0,A+=(D&I|F&~I)+T[1]-165796510|0,A=(A<<5|A>>>27)+D|0,I+=(A&F|D&~F)+T[6]-1069501632|0,I=(I<<9|I>>>23)+A|0,F+=(I&D|A&~D)+T[11]+643717713|0,F=(F<<14|F>>>18)+I|0,D+=(F&A|I&~A)+T[0]-373897302|0,D=(D<<20|D>>>12)+F|0,A+=(D&I|F&~I)+T[5]-701558691|0,A=(A<<5|A>>>27)+D|0,I+=(A&F|D&~F)+T[10]+38016083|0,I=(I<<9|I>>>23)+A|0,F+=(I&D|A&~D)+T[15]-660478335|0,F=(F<<14|F>>>18)+I|0,D+=(F&A|I&~A)+T[4]-405537848|0,D=(D<<20|D>>>12)+F|0,A+=(D&I|F&~I)+T[9]+568446438|0,A=(A<<5|A>>>27)+D|0,I+=(A&F|D&~F)+T[14]-1019803690|0,I=(I<<9|I>>>23)+A|0,F+=(I&D|A&~D)+T[3]-187363961|0,F=(F<<14|F>>>18)+I|0,D+=(F&A|I&~A)+T[8]+1163531501|0,D=(D<<20|D>>>12)+F|0,A+=(D&I|F&~I)+T[13]-1444681467|0,A=(A<<5|A>>>27)+D|0,I+=(A&F|D&~F)+T[2]-51403784|0,I=(I<<9|I>>>23)+A|0,F+=(I&D|A&~D)+T[7]+1735328473|0,F=(F<<14|F>>>18)+I|0,D+=(F&A|I&~A)+T[12]-1926607734|0,D=(D<<20|D>>>12)+F|0,A+=(D^F^I)+T[5]-378558|0,A=(A<<4|A>>>28)+D|0,I+=(A^D^F)+T[8]-2022574463|0,I=(I<<11|I>>>21)+A|0,F+=(I^A^D)+T[11]+1839030562|0,F=(F<<16|F>>>16)+I|0,D+=(F^I^A)+T[14]-35309556|0,D=(D<<23|D>>>9)+F|0,A+=(D^F^I)+T[1]-1530992060|0,A=(A<<4|A>>>28)+D|0,I+=(A^D^F)+T[4]+1272893353|0,I=(I<<11|I>>>21)+A|0,F+=(I^A^D)+T[7]-155497632|0,F=(F<<16|F>>>16)+I|0,D+=(F^I^A)+T[10]-1094730640|0,D=(D<<23|D>>>9)+F|0,A+=(D^F^I)+T[13]+681279174|0,A=(A<<4|A>>>28)+D|0,I+=(A^D^F)+T[0]-358537222|0,I=(I<<11|I>>>21)+A|0,F+=(I^A^D)+T[3]-722521979|0,F=(F<<16|F>>>16)+I|0,D+=(F^I^A)+T[6]+76029189|0,D=(D<<23|D>>>9)+F|0,A+=(D^F^I)+T[9]-640364487|0,A=(A<<4|A>>>28)+D|0,I+=(A^D^F)+T[12]-421815835|0,I=(I<<11|I>>>21)+A|0,F+=(I^A^D)+T[15]+530742520|0,F=(F<<16|F>>>16)+I|0,D+=(F^I^A)+T[2]-995338651|0,D=(D<<23|D>>>9)+F|0,A+=(F^(D|~I))+T[0]-198630844|0,A=(A<<6|A>>>26)+D|0,I+=(D^(A|~F))+T[7]+1126891415|0,I=(I<<10|I>>>22)+A|0,F+=(A^(I|~D))+T[14]-1416354905|0,F=(F<<15|F>>>17)+I|0,D+=(I^(F|~A))+T[5]-57434055|0,D=(D<<21|D>>>11)+F|0,A+=(F^(D|~I))+T[12]+1700485571|0,A=(A<<6|A>>>26)+D|0,I+=(D^(A|~F))+T[3]-1894986606|0,I=(I<<10|I>>>22)+A|0,F+=(A^(I|~D))+T[10]-1051523|0,F=(F<<15|F>>>17)+I|0,D+=(I^(F|~A))+T[1]-2054922799|0,D=(D<<21|D>>>11)+F|0,A+=(F^(D|~I))+T[8]+1873313359|0,A=(A<<6|A>>>26)+D|0,I+=(D^(A|~F))+T[15]-30611744|0,I=(I<<10|I>>>22)+A|0,F+=(A^(I|~D))+T[6]-1560198380|0,F=(F<<15|F>>>17)+I|0,D+=(I^(F|~A))+T[13]+1309151649|0,D=(D<<21|D>>>11)+F|0,A+=(F^(D|~I))+T[4]-145523070|0,A=(A<<6|A>>>26)+D|0,I+=(D^(A|~F))+T[11]-1120210379|0,I=(I<<10|I>>>22)+A|0,F+=(A^(I|~D))+T[2]+718787259|0,F=(F<<15|F>>>17)+I|0,D+=(I^(F|~A))+T[9]-343485551|0,D=(D<<21|D>>>11)+F|0,S[0]=A+S[0]|0,S[1]=D+S[1]|0,S[2]=F+S[2]|0,S[3]=I+S[3]|0}function r(S){var T=[],A;for(A=0;A<64;A+=4)T[A>>2]=S.charCodeAt(A)+(S.charCodeAt(A+1)<<8)+(S.charCodeAt(A+2)<<16)+(S.charCodeAt(A+3)<<24);return T}function s(S){var T=[],A;for(A=0;A<64;A+=4)T[A>>2]=S[A]+(S[A+1]<<8)+(S[A+2]<<16)+(S[A+3]<<24);return T}function d(S){var T=S.length,A=[1732584193,-271733879,-1732584194,271733878],D,F,I,V,ae,oe;for(D=64;D<=T;D+=64)i(A,r(S.substring(D-64,D)));for(S=S.substring(D-64),F=S.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],D=0;D>2]|=S.charCodeAt(D)<<(D%4<<3);if(I[D>>2]|=128<<(D%4<<3),D>55)for(i(A,I),D=0;D<16;D+=1)I[D]=0;return V=T*8,V=V.toString(16).match(/(.*?)(.{0,8})$/),ae=parseInt(V[2],16),oe=parseInt(V[1],16)||0,I[14]=ae,I[15]=oe,i(A,I),A}function m(S){var T=S.length,A=[1732584193,-271733879,-1732584194,271733878],D,F,I,V,ae,oe;for(D=64;D<=T;D+=64)i(A,s(S.subarray(D-64,D)));for(S=D-64>2]|=S[D]<<(D%4<<3);if(I[D>>2]|=128<<(D%4<<3),D>55)for(i(A,I),D=0;D<16;D+=1)I[D]=0;return V=T*8,V=V.toString(16).match(/(.*?)(.{0,8})$/),ae=parseInt(V[2],16),oe=parseInt(V[1],16)||0,I[14]=ae,I[15]=oe,i(A,I),A}function u(S){var T="",A;for(A=0;A<4;A+=1)T+=e[S>>A*8+4&15]+e[S>>A*8&15];return T}function h(S){var T;for(T=0;T>16)+(T>>16)+(A>>16);return D<<16|A&65535}),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function S(T,A){return T=T|0||0,T<0?Math.max(T+A,0):Math.min(T,A)}ArrayBuffer.prototype.slice=function(T,A){var D=this.byteLength,F=S(T,D),I=D,V,ae,oe,W;return A!==n&&(I=S(A,D)),F>I?new ArrayBuffer(0):(V=I-F,ae=new ArrayBuffer(V),oe=new Uint8Array(ae),W=new Uint8Array(this,F,V),oe.set(W),ae)}})();function v(S){return/[\u0080-\uFFFF]/.test(S)&&(S=unescape(encodeURIComponent(S))),S}function b(S,T){var A=S.length,D=new ArrayBuffer(A),F=new Uint8Array(D),I;for(I=0;I>2]|=T.charCodeAt(D)<<(D%4<<3);return this._finish(F,A),I=h(this._hash),S&&(I=P(I)),this.reset(),I},k.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},k.prototype.setState=function(S){return this._buff=S.buff,this._length=S.length,this._hash=S.hash,this},k.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},k.prototype._finish=function(S,T){var A=T,D,F,I;if(S[A>>2]|=128<<(A%4<<3),A>55)for(i(this._hash,S),A=0;A<16;A+=1)S[A]=0;D=this._length*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),F=parseInt(D[2],16),I=parseInt(D[1],16)||0,S[14]=F,S[15]=I,i(this._hash,S)},k.hash=function(S,T){return k.hashBinary(v(S),T)},k.hashBinary=function(S,T){var A=d(S),D=h(A);return T?P(D):D},k.ArrayBuffer=function(){this.reset()},k.ArrayBuffer.prototype.append=function(S){var T=x(this._buff.buffer,S,!0),A=T.length,D;for(this._length+=S.byteLength,D=64;D<=A;D+=64)i(this._hash,s(T.subarray(D-64,D)));return this._buff=D-64>2]|=T[F]<<(F%4<<3);return this._finish(D,A),I=h(this._hash),S&&(I=P(I)),this.reset(),I},k.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.ArrayBuffer.prototype.getState=function(){var S=k.prototype.getState.call(this);return S.buff=y(S.buff),S},k.ArrayBuffer.prototype.setState=function(S){return S.buff=b(S.buff,!0),k.prototype.setState.call(this,S)},k.ArrayBuffer.prototype.destroy=k.prototype.destroy,k.ArrayBuffer.prototype._finish=k.prototype._finish,k.ArrayBuffer.hash=function(S,T){var A=m(new Uint8Array(S)),D=h(A);return T?P(D):D},k})});var RL=Vs((Lpt,db)=>{(function(n,o,e){if(!n)return;for(var t={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"},i={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",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},s={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},d,m=1;m<20;++m)t[111+m]="f"+m;for(m=0;m<=9;++m)t[m+96]=m.toString();function u(I,V,ae){if(I.addEventListener){I.addEventListener(V,ae,!1);return}I.attachEvent("on"+V,ae)}function h(I){if(I.type=="keypress"){var V=String.fromCharCode(I.which);return I.shiftKey||(V=V.toLowerCase()),V}return t[I.which]?t[I.which]:i[I.which]?i[I.which]:String.fromCharCode(I.which).toLowerCase()}function v(I,V){return I.sort().join(",")===V.sort().join(",")}function b(I){var V=[];return I.shiftKey&&V.push("shift"),I.altKey&&V.push("alt"),I.ctrlKey&&V.push("ctrl"),I.metaKey&&V.push("meta"),V}function y(I){if(I.preventDefault){I.preventDefault();return}I.returnValue=!1}function x(I){if(I.stopPropagation){I.stopPropagation();return}I.cancelBubble=!0}function P(I){return I=="shift"||I=="ctrl"||I=="alt"||I=="meta"}function k(){if(!d){d={};for(var I in t)I>95&&I<112||t.hasOwnProperty(I)&&(d[t[I]]=I)}return d}function S(I,V,ae){return ae||(ae=k()[I]?"keydown":"keypress"),ae=="keypress"&&V.length&&(ae="keydown"),ae}function T(I){return I==="+"?["+"]:(I=I.replace(/\+{2}/g,"+plus"),I.split("+"))}function A(I,V){var ae,oe,W,G=[];for(ae=T(I),W=0;W1){ee(de,ye,De,je);return}Y=A(de,je),V._callbacks[Y.key]=V._callbacks[Y.key]||[],me(Y.key,Y.modifiers,{type:Y.action},tt,de,et),V._callbacks[Y.key][tt?"unshift":"push"]({callback:De,modifiers:Y.modifiers,action:Y.action,seq:tt,level:et,combo:de})}V._bindMultiple=function(de,De,je){for(var tt=0;tt-1||D(V,ae.target))return!1;if("composedPath"in I&&typeof I.composedPath=="function"){var oe=I.composedPath()[0];oe!==I.target&&(V=oe)}return V.tagName=="INPUT"||V.tagName=="SELECT"||V.tagName=="TEXTAREA"||V.isContentEditable},F.prototype.handleKey=function(){var I=this;return I._handleKey.apply(I,arguments)},F.addKeycodes=function(I){for(var V in I)I.hasOwnProperty(V)&&(t[V]=I[V]);d=null},F.init=function(){var I=F(o);for(var V in I)V.charAt(0)!=="_"&&(F[V]=(function(ae){return function(){return I[ae].apply(I,arguments)}})(V))},F.init(),n.Mousetrap=F,typeof db<"u"&&db.exports&&(db.exports=F),typeof define=="function"&&define.amd&&define(function(){return F})})(typeof window<"u"?window:null,typeof window<"u"?document:null)});var Uz=Vs(X3=>{var Hz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");X3.encode=function(n){if(0<=n&&n{var Wz=Uz(),Y3=5,Gz=1<>1;return o?-e:e}Z3.encode=function(o){var e="",t,i=the(o);do t=i&qz,i>>>=Y3,i>0&&(t|=Qz),e+=Wz.encode(t);while(i>0);return e};Z3.decode=function(o,e,t){var i=o.length,r=0,s=0,d,m;do{if(e>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(m=Wz.decode(o.charCodeAt(e++)),m===-1)throw new Error("Invalid base64 digit: "+o.charAt(e-1));d=!!(m&Qz),m&=qz,r=r+(m<{function ihe(n,o,e){if(o in n)return n[o];if(arguments.length===3)return e;throw new Error('"'+o+'" is a required argument.')}la.getArg=ihe;var Xz=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,ohe=/^data:.+\,.+$/;function MC(n){var o=n.match(Xz);return o?{scheme:o[1],auth:o[2],host:o[3],port:o[4],path:o[5]}:null}la.urlParse=MC;function Fh(n){var o="";return n.scheme&&(o+=n.scheme+":"),o+="//",n.auth&&(o+=n.auth+"@"),n.host&&(o+=n.host),n.port&&(o+=":"+n.port),n.path&&(o+=n.path),o}la.urlGenerate=Fh;var rhe=32;function ahe(n){var o=[];return function(e){for(var t=0;trhe&&o.pop(),r}}var J3=ahe(function(o){var e=o,t=MC(o);if(t){if(!t.path)return o;e=t.path}for(var i=la.isAbsolute(e),r=[],s=0,d=0;;)if(s=d,d=e.indexOf("/",s),d===-1){r.push(e.slice(s));break}else for(r.push(e.slice(s,d));d=0;d--)m=r[d],m==="."?r.splice(d,1):m===".."?u++:u>0&&(m===""?(r.splice(d+1,u),u=0):(r.splice(d,2),u--));return e=r.join("/"),e===""&&(e=i?"/":"."),t?(t.path=e,Fh(t)):e});la.normalize=J3;function Yz(n,o){n===""&&(n="."),o===""&&(o=".");var e=MC(o),t=MC(n);if(t&&(n=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),Fh(e);if(e||o.match(ohe))return o;if(t&&!t.host&&!t.path)return t.host=o,Fh(t);var i=o.charAt(0)==="/"?o:J3(n.replace(/\/+$/,"")+"/"+o);return t?(t.path=i,Fh(t)):i}la.join=Yz;la.isAbsolute=function(n){return n.charAt(0)==="/"||Xz.test(n)};function she(n,o){n===""&&(n="."),n=n.replace(/\/$/,"");for(var e=0;o.indexOf(n+"/")!==0;){var t=n.lastIndexOf("/");if(t<0||(n=n.slice(0,t),n.match(/^([^\/]+:\/)?\/*$/)))return o;++e}return Array(e+1).join("../")+o.substr(n.length+1)}la.relative=she;var Zz=(function(){var n=Object.create(null);return!("__proto__"in n)})();function Jz(n){return n}function lhe(n){return e7(n)?"$"+n:n}la.toSetString=Zz?Jz:lhe;function che(n){return e7(n)?n.slice(1):n}la.fromSetString=Zz?Jz:che;function e7(n){if(!n)return!1;var o=n.length;if(o<9||n.charCodeAt(o-1)!==95||n.charCodeAt(o-2)!==95||n.charCodeAt(o-3)!==111||n.charCodeAt(o-4)!==116||n.charCodeAt(o-5)!==111||n.charCodeAt(o-6)!==114||n.charCodeAt(o-7)!==112||n.charCodeAt(o-8)!==95||n.charCodeAt(o-9)!==95)return!1;for(var e=o-10;e>=0;e--)if(n.charCodeAt(e)!==36)return!1;return!0}function dhe(n,o,e){var t=Gd(n.source,o.source);return t!==0||(t=n.originalLine-o.originalLine,t!==0)||(t=n.originalColumn-o.originalColumn,t!==0||e)||(t=n.generatedColumn-o.generatedColumn,t!==0)||(t=n.generatedLine-o.generatedLine,t!==0)?t:Gd(n.name,o.name)}la.compareByOriginalPositions=dhe;function phe(n,o,e){var t;return t=n.originalLine-o.originalLine,t!==0||(t=n.originalColumn-o.originalColumn,t!==0||e)||(t=n.generatedColumn-o.generatedColumn,t!==0)||(t=n.generatedLine-o.generatedLine,t!==0)?t:Gd(n.name,o.name)}la.compareByOriginalPositionsNoSource=phe;function mhe(n,o,e){var t=n.generatedLine-o.generatedLine;return t!==0||(t=n.generatedColumn-o.generatedColumn,t!==0||e)||(t=Gd(n.source,o.source),t!==0)||(t=n.originalLine-o.originalLine,t!==0)||(t=n.originalColumn-o.originalColumn,t!==0)?t:Gd(n.name,o.name)}la.compareByGeneratedPositionsDeflated=mhe;function uhe(n,o,e){var t=n.generatedColumn-o.generatedColumn;return t!==0||e||(t=Gd(n.source,o.source),t!==0)||(t=n.originalLine-o.originalLine,t!==0)||(t=n.originalColumn-o.originalColumn,t!==0)?t:Gd(n.name,o.name)}la.compareByGeneratedPositionsDeflatedNoLine=uhe;function Gd(n,o){return n===o?0:n===null?1:o===null?-1:n>o?1:-1}function ghe(n,o){var e=n.generatedLine-o.generatedLine;return e!==0||(e=n.generatedColumn-o.generatedColumn,e!==0)||(e=Gd(n.source,o.source),e!==0)||(e=n.originalLine-o.originalLine,e!==0)||(e=n.originalColumn-o.originalColumn,e!==0)?e:Gd(n.name,o.name)}la.compareByGeneratedPositionsInflated=ghe;function hhe(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}la.parseSourceMapInput=hhe;function _he(n,o,e){if(o=o||"",n&&(n[n.length-1]!=="/"&&o[0]!=="/"&&(n+="/"),o=n+o),e){var t=MC(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var i=t.path.lastIndexOf("/");i>=0&&(t.path=t.path.substring(0,i+1))}o=Yz(Fh(t),o)}return J3(o)}la.computeSourceURL=_he});var n7=Vs(t7=>{var eO=Ob(),tO=Object.prototype.hasOwnProperty,Ou=typeof Map<"u";function qd(){this._array=[],this._set=Ou?new Map:Object.create(null)}qd.fromArray=function(o,e){for(var t=new qd,i=0,r=o.length;i=0)return e}else{var t=eO.toSetString(o);if(tO.call(this._set,t))return this._set[t]}throw new Error('"'+o+'" is not in the set.')};qd.prototype.at=function(o){if(o>=0&&o{var i7=Ob();function fhe(n,o){var e=n.generatedLine,t=o.generatedLine,i=n.generatedColumn,r=o.generatedColumn;return t>e||t==e&&r>=i||i7.compareByGeneratedPositionsInflated(n,o)<=0}function Db(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Db.prototype.unsortedForEach=function(o,e){this._array.forEach(o,e)};Db.prototype.add=function(o){fhe(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))};Db.prototype.toArray=function(){return this._sorted||(this._array.sort(i7.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};o7.MappingList=Db});var s7=Vs(a7=>{var SC=Kz(),br=Ob(),Ib=n7().ArraySet,Che=r7().MappingList;function Bl(n){n||(n={}),this._file=br.getArg(n,"file",null),this._sourceRoot=br.getArg(n,"sourceRoot",null),this._skipValidation=br.getArg(n,"skipValidation",!1),this._ignoreInvalidMapping=br.getArg(n,"ignoreInvalidMapping",!1),this._sources=new Ib,this._names=new Ib,this._mappings=new Che,this._sourcesContents=null}Bl.prototype._version=3;Bl.fromSourceMap=function(o,e){var t=o.sourceRoot,i=new Bl(Object.assign(e||{},{file:o.file,sourceRoot:t}));return o.eachMapping(function(r){var s={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(s.source=r.source,t!=null&&(s.source=br.relative(t,s.source)),s.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(s.name=r.name)),i.addMapping(s)}),o.sources.forEach(function(r){var s=r;t!==null&&(s=br.relative(t,r)),i._sources.has(s)||i._sources.add(s);var d=o.sourceContentFor(r);d!=null&&i.setSourceContent(r,d)}),i};Bl.prototype.addMapping=function(o){var e=br.getArg(o,"generated"),t=br.getArg(o,"original",null),i=br.getArg(o,"source",null),r=br.getArg(o,"name",null);!this._skipValidation&&this._validateMapping(e,t,i,r)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),r!=null&&(r=String(r),this._names.has(r)||this._names.add(r)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:i,name:r}))};Bl.prototype.setSourceContent=function(o,e){var t=o;this._sourceRoot!=null&&(t=br.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[br.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[br.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Bl.prototype.applySourceMap=function(o,e,t){var i=e;if(e==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=o.file}var r=this._sourceRoot;r!=null&&(i=br.relative(r,i));var s=new Ib,d=new Ib;this._mappings.unsortedForEach(function(m){if(m.source===i&&m.originalLine!=null){var u=o.originalPositionFor({line:m.originalLine,column:m.originalColumn});u.source!=null&&(m.source=u.source,t!=null&&(m.source=br.join(t,m.source)),r!=null&&(m.source=br.relative(r,m.source)),m.originalLine=u.line,m.originalColumn=u.column,u.name!=null&&(m.name=u.name))}var h=m.source;h!=null&&!s.has(h)&&s.add(h);var v=m.name;v!=null&&!d.has(v)&&d.add(v)},this),this._sources=s,this._names=d,o.sources.forEach(function(m){var u=o.sourceContentFor(m);u!=null&&(t!=null&&(m=br.join(t,m)),r!=null&&(m=br.relative(r,m)),this.setSourceContent(m,u))},this)};Bl.prototype._validateMapping=function(o,e,t,i){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(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!e&&!t&&!i)){if(o&&"line"in o&&"column"in o&&e&&"line"in e&&"column"in e&&o.line>0&&o.column>=0&&e.line>0&&e.column>=0&&t)return;var r="Invalid mapping: "+JSON.stringify({generated:o,source:t,original:e,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}};Bl.prototype._serializeMappings=function(){for(var o=0,e=1,t=0,i=0,r=0,s=0,d="",m,u,h,v,b=this._mappings.toArray(),y=0,x=b.length;y0){if(!br.compareByGeneratedPositionsInflated(u,b[y-1]))continue;m+=","}m+=SC.encode(u.generatedColumn-o),o=u.generatedColumn,u.source!=null&&(v=this._sources.indexOf(u.source),m+=SC.encode(v-s),s=v,m+=SC.encode(u.originalLine-1-i),i=u.originalLine-1,m+=SC.encode(u.originalColumn-t),t=u.originalColumn,u.name!=null&&(h=this._names.indexOf(u.name),m+=SC.encode(h-r),r=h)),d+=m}return d};Bl.prototype._generateSourcesContent=function(o,e){return o.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=br.relative(e,t));var i=br.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Bl.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o};Bl.prototype.toString=function(){return JSON.stringify(this.toJSON())};a7.SourceMapGenerator=Bl});var AM=Vs((zB,IM)=>{(function(n){"use strict";let o="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp(`^${o}\\.${o}\\.${o}\\.${o}$`,"i"),threeOctet:new RegExp(`^${o}\\.${o}\\.${o}$`,"i"),twoOctet:new RegExp(`^${o}\\.${o}$`,"i"),longValue:new RegExp(`^${o}$`,"i")},t=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),r="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(r,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${r})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${o}\\.${o}\\.${o}\\.${o}(${r})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${o}\\.${o}\\.${o}\\.${o}(${r})?$`,"i")};function m(y,x){if(y.indexOf("::")!==y.lastIndexOf("::"))return null;let P=0,k=-1,S=(y.match(d.zoneIndex)||[])[0],T,A;for(S&&(S=S.substring(1),y=y.replace(/%.+$/,""));(k=y.indexOf(":",k+1))>=0;)P++;if(y.substr(0,2)==="::"&&P--,y.substr(-2,2)==="::"&&P--,P>x)return null;for(A=x-P,T=":";A--;)T+="0:";return y=y.replace("::",T),y[0]===":"&&(y=y.slice(1)),y[y.length-1]===":"&&(y=y.slice(0,-1)),x=(function(){let D=y.split(":"),F=[];for(let I=0;I0;){if(T=P-k,T<0&&(T=0),y[S]>>T!==x[S]>>T)return!1;k-=P,S+=1}return!0}function h(y){if(i.test(y))return parseInt(y,16);if(y[0]==="0"&&!isNaN(parseInt(y[1],10))){if(t.test(y))return parseInt(y,8);throw new Error(`ipaddr: cannot parse ${y} as octal`)}return parseInt(y,10)}function v(y,x){for(;y.length=0;S-=1)if(T=this.octets[S],T in k){if(A=k[T],P&&A!==0)return null;A!==8&&(P=!0),x+=A}else return null;return 32-x},y.prototype.range=function(){return b.subnetMatch(this,this.SpecialRanges)},y.prototype.toByteArray=function(){return this.octets.slice(0)},y.prototype.toIPv4MappedAddress=function(){return b.IPv6.parse(`::ffff:${this.toString()}`)},y.prototype.toNormalizedString=function(){return this.toString()},y.prototype.toString=function(){return this.octets.join(".")},y})(),b.IPv4.broadcastAddressFromCIDR=function(y){try{let x=this.parseCIDR(y),P=x[0].toByteArray(),k=this.subnetMaskFromPrefixLength(x[1]).toByteArray(),S=[],T=0;for(;T<4;)S.push(parseInt(P[T],10)|parseInt(k[T],10)^255),T++;return new this(S)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},b.IPv4.isIPv4=function(y){return this.parser(y)!==null},b.IPv4.isValid=function(y){try{return new this(this.parser(y)),!0}catch{return!1}},b.IPv4.isValidCIDR=function(y){try{return this.parseCIDR(y),!0}catch{return!1}},b.IPv4.isValidFourPartDecimal=function(y){return!!(b.IPv4.isValid(y)&&y.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},b.IPv4.isValidCIDRFourPartDecimal=function(y){let x=y.match(/^(.+)\/(\d+)$/);return!b.IPv4.isValidCIDR(y)||!x?!1:b.IPv4.isValidFourPartDecimal(x[1])},b.IPv4.networkAddressFromCIDR=function(y){let x,P,k,S,T;try{for(x=this.parseCIDR(y),k=x[0].toByteArray(),T=this.subnetMaskFromPrefixLength(x[1]).toByteArray(),S=[],P=0;P<4;)S.push(parseInt(k[P],10)&parseInt(T[P],10)),P++;return new this(S)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},b.IPv4.parse=function(y){let x=this.parser(y);if(x===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(x)},b.IPv4.parseCIDR=function(y){let x;if(x=y.match(/^(.+)\/(\d+)$/)){let P=parseInt(x[2]);if(P>=0&&P<=32){let k=[this.parse(x[1]),P];return Object.defineProperty(k,"toString",{value:function(){return this.join("/")}}),k}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},b.IPv4.parser=function(y){let x,P,k;if(x=y.match(e.fourOctet))return(function(){let S=x.slice(1,6),T=[];for(let A=0;A4294967295||k<0)throw new Error("ipaddr: address outside defined range");return(function(){let S=[],T;for(T=0;T<=24;T+=8)S.push(k>>T&255);return S})().reverse()}else return(x=y.match(e.twoOctet))?(function(){let S=x.slice(1,4),T=[];if(k=h(S[1]),k>16777215||k<0)throw new Error("ipaddr: address outside defined range");return T.push(h(S[0])),T.push(k>>16&255),T.push(k>>8&255),T.push(k&255),T})():(x=y.match(e.threeOctet))?(function(){let S=x.slice(1,5),T=[];if(k=h(S[2]),k>65535||k<0)throw new Error("ipaddr: address outside defined range");return T.push(h(S[0])),T.push(h(S[1])),T.push(k>>8&255),T.push(k&255),T})():null},b.IPv4.subnetMaskFromPrefixLength=function(y){if(y=parseInt(y),y<0||y>32)throw new Error("ipaddr: invalid IPv4 prefix length");let x=[0,0,0,0],P=0,k=Math.floor(y/8);for(;P=0;A-=1)if(S=this.parts[A],S in k){if(T=k[S],P&&T!==0)return null;T!==16&&(P=!0),x+=T}else return null;return 128-x},y.prototype.range=function(){return b.subnetMatch(this,this.SpecialRanges)},y.prototype.toByteArray=function(){let x,P=[],k=this.parts;for(let S=0;S>8),P.push(x&255);return P},y.prototype.toFixedLengthString=function(){let x=function(){let k=[];for(let S=0;S>8,P&255,k>>8,k&255])},y.prototype.toNormalizedString=function(){let x=function(){let k=[];for(let S=0;SS&&(k=T.index,S=T[0].length);return S<0?P:`${P.substring(0,k)}::${P.substring(k+S)}`},y.prototype.toString=function(){return this.toRFC5952String()},y})(),b.IPv6.broadcastAddressFromCIDR=function(y){try{let x=this.parseCIDR(y),P=x[0].toByteArray(),k=this.subnetMaskFromPrefixLength(x[1]).toByteArray(),S=[],T=0;for(;T<16;)S.push(parseInt(P[T],10)|parseInt(k[T],10)^255),T++;return new this(S)}catch(x){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${x})`)}},b.IPv6.isIPv6=function(y){return this.parser(y)!==null},b.IPv6.isValid=function(y){if(typeof y=="string"&&y.indexOf(":")===-1)return!1;try{let x=this.parser(y);return new this(x.parts,x.zoneId),!0}catch{return!1}},b.IPv6.isValidCIDR=function(y){if(typeof y=="string"&&y.indexOf(":")===-1)return!1;try{return this.parseCIDR(y),!0}catch{return!1}},b.IPv6.networkAddressFromCIDR=function(y){let x,P,k,S,T;try{for(x=this.parseCIDR(y),k=x[0].toByteArray(),T=this.subnetMaskFromPrefixLength(x[1]).toByteArray(),S=[],P=0;P<16;)S.push(parseInt(k[P],10)&parseInt(T[P],10)),P++;return new this(S)}catch(A){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${A})`)}},b.IPv6.parse=function(y){let x=this.parser(y);if(x.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(x.parts,x.zoneId)},b.IPv6.parseCIDR=function(y){let x,P,k;if((P=y.match(/^(.+)\/(\d+)$/))&&(x=parseInt(P[2]),x>=0&&x<=128))return k=[this.parse(P[1]),x],Object.defineProperty(k,"toString",{value:function(){return this.join("/")}}),k;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},b.IPv6.parser=function(y){let x,P,k,S,T,A;if(k=y.match(d.deprecatedTransitional))return this.parser(`::ffff:${k[1]}`);if(d.native.test(y))return m(y,8);if((k=y.match(d.transitional))&&(A=k[6]||"",x=k[1],k[1].endsWith("::")||(x=x.slice(0,-1)),x=m(x+A,6),x.parts)){for(T=[parseInt(k[2]),parseInt(k[3]),parseInt(k[4]),parseInt(k[5])],P=0;P128)throw new Error("ipaddr: invalid IPv6 prefix length");let x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],P=0,k=Math.floor(y/8);for(;P{"use strict";(function(){var n=typeof p4<"u"&&p4||typeof define<"u"&&{}||this||window;typeof define<"u"&&define("save-svg-as-png",[],function(){return n}),n.default=n;var o="http://www.w3.org/2000/xmlns/",e="http://www.w3.org/1999/xhtml",t="http://www.w3.org/2000/svg",i=']>',r=/url\(["']?(.+?)["']?\)/,s={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"},d=function(G){return G instanceof HTMLElement||G instanceof SVGElement},m=function(G){if(!d(G))throw new Error("an HTMLElement or SVGElement is required; got "+G)},u=function(G){return new Promise(function(Ce,we){d(G)?Ce(G):we(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},v=function(G){var Ce=Object.keys(s).filter(function(we){return G.indexOf("."+we)>0}).map(function(we){return s[we]});return Ce?Ce[0]:(console.error("Unknown font format for "+G+". Fonts may not be working correctly."),"application/octet-stream")},b=function(G){for(var Ce="",we=new Uint8Array(G),me=0;me"u"||me===null||isNaN(parseFloat(me))?0:me},x=function(G,Ce,we,me){if(G.tagName==="svg")return{width:we||y(G,Ce,"width"),height:me||y(G,Ce,"height")};if(G.getBBox){var Ie=G.getBBox(),ue=Ie.x,H=Ie.y,ee=Ie.width,le=Ie.height;return{width:ue+ee,height:H+le}}},P=function(G){return decodeURIComponent(encodeURIComponent(G).replace(/%([0-9A-F]{2})/g,function(Ce,we){var me=String.fromCharCode("0x"+we);return me==="%"?"%25":me}))},k=function(G){for(var Ce=window.atob(G.split(",")[1]),we=G.split(",")[0].split(":")[1].split(";")[0],me=new ArrayBuffer(Ce.length),Ie=new Uint8Array(me),ue=0;ue"u",je=H||[];return V().forEach(function(tt){var et=tt.rules,ye=tt.href;et&&Array.from(et).forEach(function(Y){if(typeof Y.style<"u")if(S(G,Y.selectorText))de.push(le(Y.selectorText,Y.style.cssText));else if(De&&Y.cssText.match(/^@font-face/)){var Re=T(Y,ye);Re&&je.push(Re)}else ee||de.push(Y.cssText)})}),F(je).then(function(tt){return de.join(` `)+tt})},oe=function(){if(!navigator.msSaveOrOpenBlob&&!("download"in document.createElement("a")))return{popup:window.open()}};n.prepareSvg=function(W,G,Ce){m(W);var we=G||{},me=we.left,Ie=me===void 0?0:me,ue=we.top,H=ue===void 0?0:ue,ee=we.width,le=we.height,de=we.scale,De=de===void 0?1:de,je=we.responsive,tt=je===void 0?!1:je,et=we.excludeCss,ye=et===void 0?!1:et;return A(W).then(function(){var Y=W.cloneNode(!0);Y.style.backgroundColor=(G||{}).backgroundColor||W.style.backgroundColor;var Re=x(W,Y,ee,le),Ze=Re.width,ct=Re.height;if(W.tagName!=="svg")if(W.getBBox){Y.getAttribute("transform")!=null&&Y.setAttribute("transform",Y.getAttribute("transform").replace(/translate\(.*?\)/,""));var Tt=document.createElementNS("http://www.w3.org/2000/svg","svg");Tt.appendChild(Y),Y=Tt}else{console.error("Attempted to render non-SVG element",W);return}if(Y.setAttribute("version","1.1"),Y.setAttribute("viewBox",[Ie,H,Ze,ct].join(" ")),Y.getAttribute("xmlns")||Y.setAttributeNS(o,"xmlns",t),Y.getAttribute("xmlns:xlink")||Y.setAttributeNS(o,"xmlns:xlink","http://www.w3.org/1999/xlink"),tt?(Y.removeAttribute("width"),Y.removeAttribute("height"),Y.setAttribute("preserveAspectRatio","xMinYMin meet")):(Y.setAttribute("width",Ze*De),Y.setAttribute("height",ct*De)),Array.from(Y.querySelectorAll("foreignObject > *")).forEach(function(bo){bo.setAttributeNS(o,"xmlns",bo.tagName==="svg"?t:e)}),ye){var ri=document.createElement("div");ri.appendChild(Y);var Lo=ri.innerHTML;if(typeof Ce=="function")Ce(Lo,Ze,ct);else return{src:Lo,width:Ze,height:ct}}else return ae(W,G).then(function(bo){var qr=document.createElement("style");qr.setAttribute("type","text/css"),qr.innerHTML=``;var Hn=document.createElement("defs");Hn.appendChild(qr),Y.insertBefore(Hn,Y.firstChild);var ep=document.createElement("div");ep.appendChild(Y);var Ku=ep.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if(typeof Ce=="function")Ce(Ku,Ze,ct);else return{src:Ku,width:Ze,height:ct}})})},n.svgAsDataUri=function(W,G,Ce){return m(W),n.prepareSvg(W,G).then(function(we){var me=we.src,Ie=we.width,ue=we.height,H="data:image/svg+xml;base64,"+window.btoa(P(i+me));return typeof Ce=="function"&&Ce(H,Ie,ue),H})},n.svgAsPngUri=function(W,G,Ce){m(W);var we=G||{},me=we.encoderType,Ie=me===void 0?"image/png":me,ue=we.encoderOptions,H=ue===void 0?.8:ue,ee=we.canvg,le=function(De){var je=De.src,tt=De.width,et=De.height,ye=document.createElement("canvas"),Y=ye.getContext("2d"),Re=window.devicePixelRatio||1;ye.width=tt*Re,ye.height=et*Re,ye.style.width=ye.width+"px",ye.style.height=ye.height+"px",Y.setTransform(Re,0,0,Re,0,0),ee?ee(ye,je):Y.drawImage(je,0,0);var Ze=void 0;try{Ze=ye.toDataURL(Ie,H)}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 Ce=="function"&&Ce(Ze,ye.width,ye.height),Promise.resolve(Ze)};return ee?n.prepareSvg(W,G).then(le):n.svgAsDataUri(W,G).then(function(de){return new Promise(function(De,je){var tt=new Image;tt.onload=function(){return De(le({src:tt,width:tt.width,height:tt.height}))},tt.onerror=function(){je(`There was an error loading the data URI as an image on the following SVG `+window.atob(de.slice(26))+`Open the following link to see browser's diagnosis `+de)},tt.src=de})})},n.download=function(W,G,Ce){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(k(G),W);else{var we=document.createElement("a");if("download"in we){we.download=W,we.style.display="none",document.body.appendChild(we);try{var me=k(G),Ie=URL.createObjectURL(me);we.href=Ie,we.onclick=function(){return requestAnimationFrame(function(){return URL.revokeObjectURL(Ie)})}}catch(ue){console.error(ue),console.warn("Error while getting object URL. Falling back to string URL."),we.href=G}we.click(),document.body.removeChild(we)}else Ce&&Ce.popup&&(Ce.popup.document.title=W,Ce.popup.location.replace(G))}},n.saveSvg=function(W,G,Ce){var we=oe();return u(W).then(function(me){return n.svgAsDataUri(me,Ce||{})}).then(function(me){return n.download(G,me,we)})},n.saveSvgAsPng=function(W,G,Ce){var we=oe();return u(W).then(function(me){return n.svgAsPngUri(me,Ce||{})}).then(function(me){return n.download(G,me,we)})}})()});var _4=Vs((e2,h4)=>{(function(n,o){if(typeof e2=="object"&&typeof h4=="object")h4.exports=o();else if(typeof define=="function"&&define.amd)define([],o);else{var e=o();for(var t in e)(typeof e2=="object"?e2:n)[t]=e[t]}})(globalThis,()=>(()=>{"use strict";var n={4567:function(i,r,s){var d=this&&this.__decorate||function(k,S,T,A){var D,F=arguments.length,I=F<3?S:A===null?A=Object.getOwnPropertyDescriptor(S,T):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(k,S,T,A);else for(var V=k.length-1;V>=0;V--)(D=k[V])&&(I=(F<3?D(I):F>3?D(S,T,I):D(S,T))||I);return F>3&&I&&Object.defineProperty(S,T,I),I},m=this&&this.__param||function(k,S){return function(T,A){S(T,A,k)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let u=s(9042),h=s(9924),v=s(844),b=s(4725),y=s(2585),x=s(3656),P=r.AccessibilityManager=class extends v.Disposable{constructor(k,S,T,A){super(),this._terminal=k,this._coreBrowserService=T,this._renderService=A,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 D=0;Dthis._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,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(D=>this._handleResize(D.rows))),this.register(this._terminal.onRender(D=>this._refreshRows(D.start,D.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(D=>this._handleChar(D))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` `))),this.register(this._terminal.onA11yTab(D=>this._handleTab(D))),this.register(this._terminal.onKey(D=>this._handleKey(D.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,x.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,v.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(k){for(let S=0;S0?this._charsToConsume.shift()!==k&&(this._charsToAnnounce+=k):this._charsToAnnounce+=k,k===` `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(k){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(k)||this._charsToConsume.push(k)}_refreshRows(k,S){this._liveRegionDebouncer.refresh(k,S,this._terminal.rows)}_renderRows(k,S){let T=this._terminal.buffer,A=T.lines.length.toString();for(let D=k;D<=S;D++){let F=T.lines.get(T.ydisp+D),I=[],V=F?.translateToString(!0,void 0,void 0,I)||"",ae=(T.ydisp+D+1).toString(),oe=this._rowElements[D];oe&&(V.length===0?(oe.innerText="\xA0",this._rowColumns.set(oe,[0,1])):(oe.textContent=V,this._rowColumns.set(oe,I)),oe.setAttribute("aria-posinset",ae),oe.setAttribute("aria-setsize",A))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(k,S){let T=k.target,A=this._rowElements[S===0?1:this._rowElements.length-2];if(T.getAttribute("aria-posinset")===(S===0?"1":`${this._terminal.buffer.lines.length}`)||k.relatedTarget!==A)return;let D,F;if(S===0?(D=T,F=this._rowElements.pop(),this._rowContainer.removeChild(F)):(D=this._rowElements.shift(),F=T,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),F.removeEventListener("focus",this._bottomBoundaryFocusListener),S===0){let I=this._createAccessibilityTreeNode();this._rowElements.unshift(I),this._rowContainer.insertAdjacentElement("afterbegin",I)}else{let I=this._createAccessibilityTreeNode();this._rowElements.push(I),this._rowContainer.appendChild(I)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(S===0?-1:1),this._rowElements[S===0?1:this._rowElements.length-2].focus(),k.preventDefault(),k.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let k=document.getSelection();if(!k)return;if(k.isCollapsed)return void(this._rowContainer.contains(k.anchorNode)&&this._terminal.clearSelection());if(!k.anchorNode||!k.focusNode)return void console.error("anchorNode and/or focusNode are null");let S={node:k.anchorNode,offset:k.anchorOffset},T={node:k.focusNode,offset:k.focusOffset};if((S.node.compareDocumentPosition(T.node)&Node.DOCUMENT_POSITION_PRECEDING||S.node===T.node&&S.offset>T.offset)&&([S,T]=[T,S]),S.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(S={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(S.node))return;let A=this._rowElements.slice(-1)[0];if(T.node.compareDocumentPosition(A)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(T={node:A,offset:A.textContent?.length??0}),!this._rowContainer.contains(T.node))return;let D=({node:V,offset:ae})=>{let oe=V instanceof Text?V.parentNode:V,W=parseInt(oe?.getAttribute("aria-posinset"),10)-1;if(isNaN(W))return console.warn("row is invalid. Race condition?"),null;let G=this._rowColumns.get(oe);if(!G)return console.warn("columns is null. Race condition?"),null;let Ce=ae=this._terminal.cols&&(++W,Ce=0),{row:W,column:Ce}},F=D(S),I=D(T);if(F&&I){if(F.row>I.row||F.row===I.row&&F.column>=I.column)throw new Error("invalid range");this._terminal.select(F.column,F.row,(I.row-F.row)*this._terminal.cols-F.column+I.column)}}_handleResize(k){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let S=this._rowContainer.children.length;Sk;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let k=this._coreBrowserService.mainDocument.createElement("div");return k.setAttribute("role","listitem"),k.tabIndex=-1,this._refreshRowDimensions(k),k}_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 k=0;k{function s(h){return h.replace(/\r?\n/g,"\r")}function d(h,v){return v?"\x1B[200~"+h+"\x1B[201~":h}function m(h,v,b,y){h=d(h=s(h),b.decPrivateModes.bracketedPasteMode&&y.rawOptions.ignoreBracketedPasteMode!==!0),b.triggerDataEvent(h,!0),v.value=""}function u(h,v,b){let y=b.getBoundingClientRect(),x=h.clientX-y.left-10,P=h.clientY-y.top-10;v.style.width="20px",v.style.height="20px",v.style.left=`${x}px`,v.style.top=`${P}px`,v.style.zIndex="1000",v.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=s,r.bracketTextForPaste=d,r.copyHandler=function(h,v){h.clipboardData&&h.clipboardData.setData("text/plain",v.selectionText),h.preventDefault()},r.handlePasteEvent=function(h,v,b,y){h.stopPropagation(),h.clipboardData&&m(h.clipboardData.getData("text/plain"),v,b,y)},r.paste=m,r.moveTextAreaUnderMouseCursor=u,r.rightClickHandler=function(h,v,b,y,x){u(h,v,b),x&&y.rightClickSelect(h),v.value=y.selectionText,v.select()}},7239:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;let d=s(1505);r.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(m,u,h){this._css.set(m,u,h)}getCss(m,u){return this._css.get(m,u)}setColor(m,u,h){this._color.set(m,u,h)}getColor(m,u){return this._color.get(m,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(s,d,m,u){s.addEventListener(d,m,u);let h=!1;return{dispose:()=>{h||(h=!0,s.removeEventListener(d,m,u))}}}},3551:function(i,r,s){var d=this&&this.__decorate||function(P,k,S,T){var A,D=arguments.length,F=D<3?k:T===null?T=Object.getOwnPropertyDescriptor(k,S):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(P,k,S,T);else for(var I=P.length-1;I>=0;I--)(A=P[I])&&(F=(D<3?A(F):D>3?A(k,S,F):A(k,S))||F);return D>3&&F&&Object.defineProperty(k,S,F),F},m=this&&this.__param||function(P,k){return function(S,T){k(S,T,P)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;let u=s(3656),h=s(8460),v=s(844),b=s(2585),y=s(4725),x=r.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(P,k,S,T,A){super(),this._element=P,this._mouseService=k,this._renderService=S,this._bufferService=T,this._linkProviderService=A,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,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.toDisposable)(()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(P){this._lastMouseEvent=P;let k=this._positionFromMouseEvent(P,this._element,this._mouseService);if(!k)return;this._isMouseOut=!1;let S=P.composedPath();for(let T=0;T{T?.forEach(A=>{A.link.dispose&&A.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=P.y);let S=!1;for(let[T,A]of this._linkProviderService.linkProviders.entries())k?this._activeProviderReplies?.get(T)&&(S=this._checkLinkProviderResult(T,P,S)):A.provideLinks(P.y,D=>{if(this._isMouseOut)return;let F=D?.map(I=>({link:I}));this._activeProviderReplies?.set(T,F),S=this._checkLinkProviderResult(T,P,S),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(P.y,this._activeProviderReplies)})}_removeIntersectingLinks(P,k){let S=new Set;for(let T=0;TP?this._bufferService.cols:F.link.range.end.x;for(let ae=I;ae<=V;ae++){if(S.has(ae)){A.splice(D--,1);break}S.add(ae)}}}}_checkLinkProviderResult(P,k,S){if(!this._activeProviderReplies)return S;let T=this._activeProviderReplies.get(P),A=!1;for(let D=0;Dthis._linkAtPosition(F.link,k));D&&(S=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!S)for(let D=0;Dthis._linkAtPosition(I.link,k));if(F){S=!0,this._handleNewLink(F);break}}return S}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(P){if(!this._currentLink)return;let k=this._positionFromMouseEvent(P,this._element,this._mouseService);k&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,k)&&this._currentLink.link.activate(P,this._currentLink.link.text)}_clearCurrentLink(P,k){this._currentLink&&this._lastMouseEvent&&(!P||!k||this._currentLink.link.range.start.y>=P&&this._currentLink.link.range.end.y<=k)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,v.disposeArray)(this._linkCacheDisposables))}_handleNewLink(P){if(!this._lastMouseEvent)return;let k=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);k&&this._linkAtPosition(P.link,k)&&(this._currentLink=P,this._currentLink.state={decorations:{underline:P.link.decorations===void 0||P.link.decorations.underline,pointerCursor:P.link.decorations===void 0||P.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,P.link,this._lastMouseEvent),P.link.decorations={},Object.defineProperties(P.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:S=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==S&&(this._currentLink.state.decorations.pointerCursor=S,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",S))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:S=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==S&&(this._currentLink.state.decorations.underline=S,this._currentLink.state.isHovered&&this._fireUnderlineEvent(P.link,S))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(S=>{if(!this._currentLink)return;let T=S.start===0?0:S.start+1+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.ydisp+1+S.end;if(this._currentLink.link.range.start.y>=T&&this._currentLink.link.range.end.y<=A&&(this._clearCurrentLink(T,A),this._lastMouseEvent)){let D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}})))}_linkHover(P,k,S){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(k,!0),this._currentLink.state.decorations.pointerCursor&&P.classList.add("xterm-cursor-pointer")),k.hover&&k.hover(S,k.text)}_fireUnderlineEvent(P,k){let S=P.range,T=this._bufferService.buffer.ydisp,A=this._createLinkUnderlineEvent(S.start.x-1,S.start.y-T-1,S.end.x,S.end.y-T-1,void 0);(k?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(A)}_linkLeave(P,k,S){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(k,!1),this._currentLink.state.decorations.pointerCursor&&P.classList.remove("xterm-cursor-pointer")),k.leave&&k.leave(S,k.text)}_linkAtPosition(P,k){let S=P.range.start.y*this._bufferService.cols+P.range.start.x,T=P.range.end.y*this._bufferService.cols+P.range.end.x,A=k.y*this._bufferService.cols+k.x;return S<=A&&A<=T}_positionFromMouseEvent(P,k,S){let T=S.getCoords(P,k,this._bufferService.cols,this._bufferService.rows);if(T)return{x:T[0],y:T[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(P,k,S,T,A){return{x1:P,y1:k,x2:S,y2:T,cols:this._bufferService.cols,fg:A}}};r.Linkifier=x=d([m(1,y.IMouseService),m(2,y.IRenderService),m(3,b.IBufferService),m(4,y.ILinkProviderService)],x)},9042:(i,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(i,r,s){var d=this&&this.__decorate||function(y,x,P,k){var S,T=arguments.length,A=T<3?x:k===null?k=Object.getOwnPropertyDescriptor(x,P):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(y,x,P,k);else for(var D=y.length-1;D>=0;D--)(S=y[D])&&(A=(T<3?S(A):T>3?S(x,P,A):S(x,P))||A);return T>3&&A&&Object.defineProperty(x,P,A),A},m=this&&this.__param||function(y,x){return function(P,k){x(P,k,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;let u=s(511),h=s(2585),v=r.OscLinkProvider=class{constructor(y,x,P){this._bufferService=y,this._optionsService=x,this._oscLinkService=P}provideLinks(y,x){let P=this._bufferService.buffer.lines.get(y-1);if(!P)return void x(void 0);let k=[],S=this._optionsService.rawOptions.linkHandler,T=new u.CellData,A=P.getTrimmedLength(),D=-1,F=-1,I=!1;for(let V=0;VS?S.activate(G,Ce,oe):b(0,Ce),hover:(G,Ce)=>S?.hover?.(G,Ce,oe),leave:(G,Ce)=>S?.leave?.(G,Ce,oe)})}I=!1,T.hasExtendedAttrs()&&T.extended.urlId?(F=V,D=T.extended.urlId):(F=-1,D=-1)}}x(k)}};function b(y,x){if(confirm(`Do you want to navigate to ${x}? WARNING: This link could potentially be dangerous`)){let P=window.open();if(P){try{P.opener=null}catch{}P.location.href=x}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=v=d([m(0,h.IBufferService),m(1,h.IOptionsService),m(2,h.IOscLinkService)],v)},6193:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(s,d){this._renderCallback=s,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(s){return this._refreshCallbacks.push(s),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(s,d,m){this._rowCount=m,s=s!==void 0?s:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,s):s,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,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 s=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(s,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let s of this._refreshCallbacks)s(0);this._refreshCallbacks=[]}}},3236:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;let d=s(3614),m=s(3656),u=s(3551),h=s(9042),v=s(3730),b=s(1680),y=s(3107),x=s(5744),P=s(2950),k=s(1296),S=s(428),T=s(4269),A=s(5114),D=s(8934),F=s(3230),I=s(9312),V=s(4725),ae=s(6731),oe=s(8055),W=s(8969),G=s(8460),Ce=s(844),we=s(6114),me=s(8437),Ie=s(2584),ue=s(7399),H=s(5941),ee=s(9074),le=s(2585),de=s(5435),De=s(4567),je=s(779);class tt extends W.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(ye={}){super(ye),this.browser=we,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Ce.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(ee.DecorationService),this._instantiationService.setService(le.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(je.LinkProviderService),this._instantiationService.setService(V.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(v.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((Y,Re)=>this.refresh(Y,Re))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(Y=>this._reportWindowsOptions(Y))),this.register(this._inputHandler.onColor(Y=>this._handleColorEvent(Y))),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(Y=>this._afterResize(Y.cols,Y.rows))),this.register((0,Ce.toDisposable)(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}_handleColorEvent(ye){if(this._themeService)for(let Y of ye){let Re,Ze="";switch(Y.index){case 256:Re="foreground",Ze="10";break;case 257:Re="background",Ze="11";break;case 258:Re="cursor",Ze="12";break;default:Re="ansi",Ze="4;"+Y.index}switch(Y.type){case 0:let ct=oe.color.toColorRGB(Re==="ansi"?this._themeService.colors.ansi[Y.index]:this._themeService.colors[Re]);this.coreService.triggerDataEvent(`${Ie.C0.ESC}]${Ze};${(0,H.toRgbString)(ct)}${Ie.C1_ESCAPED.ST}`);break;case 1:if(Re==="ansi")this._themeService.modifyColors(Tt=>Tt.ansi[Y.index]=oe.channels.toColor(...Y.color));else{let Tt=Re;this._themeService.modifyColors(ri=>ri[Tt]=oe.channels.toColor(...Y.color))}break;case 2:this._themeService.restoreColor(Y.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ye){ye?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(De.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ye){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 ye=this.buffer.ybase+this.buffer.y,Y=this.buffer.lines.get(ye);if(!Y)return;let Re=Math.min(this.buffer.x,this.cols-1),Ze=this._renderService.dimensions.css.cell.height,ct=Y.getWidth(Re),Tt=this._renderService.dimensions.css.cell.width*ct,ri=this.buffer.y*this._renderService.dimensions.css.cell.height,Lo=Re*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Lo+"px",this.textarea.style.top=ri+"px",this.textarea.style.width=Tt+"px",this.textarea.style.height=Ze+"px",this.textarea.style.lineHeight=Ze+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",Y=>{this.hasSelection()&&(0,d.copyHandler)(Y,this._selectionService)}));let ye=Y=>(0,d.handlePasteEvent)(Y,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",ye)),this.register((0,m.addDisposableDomListener)(this.element,"paste",ye)),we.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",Y=>{Y.button===2&&(0,d.rightClickHandler)(Y,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",Y=>{(0,d.rightClickHandler)(Y,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),we.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",Y=>{Y.button===1&&(0,d.moveTextAreaUnderMouseCursor)(Y,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",ye=>this._keyUp(ye),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",ye=>this._keyDown(ye),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",ye=>this._keyPress(ye),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",ye=>this._compositionHelper.compositionupdate(ye))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,m.addDisposableDomListener)(this.textarea,"input",ye=>this._inputEvent(ye),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(ye){if(!ye)throw new Error("Terminal requires a parent element.");if(ye.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=ye.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"),ye.appendChild(this.element);let Y=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Y.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",Re=>this.updateCursorStyle(Re))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Y.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",h.promptLabel),we.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(A.CoreBrowserService,this.textarea,ye.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(V.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",Re=>this._handleTextAreaFocus(Re))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(S.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(V.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(ae.ThemeService),this._instantiationService.setService(V.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(T.CharacterJoinerService),this._instantiationService.setService(V.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(F.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(V.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(Re=>this._onRender.fire(Re))),this.onResize(Re=>this._renderService.resize(Re.cols,Re.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(P.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(V.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(Y);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(b.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(Re=>this.scrollLines(Re.amount,Re.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(I.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(V.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(Re=>this.scrollLines(Re.amount,Re.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(Re=>this._renderService.handleSelectionChanged(Re.start,Re.end,Re.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(Re=>{this.textarea.value=Re,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(Re=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(y.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",Re=>this._selectionService.handleMouseDown(Re))),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",Re=>this._handleScreenReaderModeOptionChange(Re))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(x.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",Re=>{!this._overviewRulerRenderer&&Re&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(x.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(k.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let ye=this,Y=this.element;function Re(Tt){let ri=ye._mouseService.getMouseReportCoords(Tt,ye.screenElement);if(!ri)return!1;let Lo,bo;switch(Tt.overrideType||Tt.type){case"mousemove":bo=32,Tt.buttons===void 0?(Lo=3,Tt.button!==void 0&&(Lo=Tt.button<3?Tt.button:3)):Lo=1&Tt.buttons?0:4&Tt.buttons?1:2&Tt.buttons?2:3;break;case"mouseup":bo=0,Lo=Tt.button<3?Tt.button:3;break;case"mousedown":bo=1,Lo=Tt.button<3?Tt.button:3;break;case"wheel":if(ye._customWheelEventHandler&&ye._customWheelEventHandler(Tt)===!1||ye.viewport.getLinesScrolled(Tt)===0)return!1;bo=Tt.deltaY<0?0:1,Lo=4;break;default:return!1}return!(bo===void 0||Lo===void 0||Lo>4)&&ye.coreMouseService.triggerMouseEvent({col:ri.col,row:ri.row,x:ri.x,y:ri.y,button:Lo,action:bo,ctrl:Tt.ctrlKey,alt:Tt.altKey,shift:Tt.shiftKey})}let Ze={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ct={mouseup:Tt=>(Re(Tt),Tt.buttons||(this._document.removeEventListener("mouseup",Ze.mouseup),Ze.mousedrag&&this._document.removeEventListener("mousemove",Ze.mousedrag)),this.cancel(Tt)),wheel:Tt=>(Re(Tt),this.cancel(Tt,!0)),mousedrag:Tt=>{Tt.buttons&&Re(Tt)},mousemove:Tt=>{Tt.buttons||Re(Tt)}};this.register(this.coreMouseService.onProtocolChange(Tt=>{Tt?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Tt)),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&Tt?Ze.mousemove||(Y.addEventListener("mousemove",ct.mousemove),Ze.mousemove=ct.mousemove):(Y.removeEventListener("mousemove",Ze.mousemove),Ze.mousemove=null),16&Tt?Ze.wheel||(Y.addEventListener("wheel",ct.wheel,{passive:!1}),Ze.wheel=ct.wheel):(Y.removeEventListener("wheel",Ze.wheel),Ze.wheel=null),2&Tt?Ze.mouseup||(Ze.mouseup=ct.mouseup):(this._document.removeEventListener("mouseup",Ze.mouseup),Ze.mouseup=null),4&Tt?Ze.mousedrag||(Ze.mousedrag=ct.mousedrag):(this._document.removeEventListener("mousemove",Ze.mousedrag),Ze.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(Y,"mousedown",Tt=>{if(Tt.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Tt))return Re(Tt),Ze.mouseup&&this._document.addEventListener("mouseup",Ze.mouseup),Ze.mousedrag&&this._document.addEventListener("mousemove",Ze.mousedrag),this.cancel(Tt)})),this.register((0,m.addDisposableDomListener)(Y,"wheel",Tt=>{if(!Ze.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Tt)===!1)return!1;if(!this.buffer.hasScrollback){let ri=this.viewport.getLinesScrolled(Tt);if(ri===0)return;let Lo=Ie.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Tt.deltaY<0?"A":"B"),bo="";for(let qr=0;qr{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Tt),this.cancel(Tt)},{passive:!0})),this.register((0,m.addDisposableDomListener)(Y,"touchmove",Tt=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Tt)?void 0:this.cancel(Tt)},{passive:!1}))}refresh(ye,Y){this._renderService?.refreshRows(ye,Y)}updateCursorStyle(ye){this._selectionService?.shouldColumnSelect(ye)?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(ye,Y,Re=0){Re===1?(super.scrollLines(ye,Y,Re),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(ye)}paste(ye){(0,d.paste)(ye,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ye){this._customKeyEventHandler=ye}attachCustomWheelEventHandler(ye){this._customWheelEventHandler=ye}registerLinkProvider(ye){return this._linkProviderService.registerLinkProvider(ye)}registerCharacterJoiner(ye){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let Y=this._characterJoinerService.register(ye);return this.refresh(0,this.rows-1),Y}deregisterCharacterJoiner(ye){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ye)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ye){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ye)}registerDecoration(ye){return this._decorationService.registerDecoration(ye)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ye,Y,Re){this._selectionService.setSelection(ye,Y,Re)}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(ye,Y){this._selectionService?.selectLines(ye,Y)}_keyDown(ye){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ye)===!1)return!1;let Y=this.browser.isMac&&this.options.macOptionIsMeta&&ye.altKey;if(!Y&&!this._compositionHelper.keydown(ye))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Y||ye.key!=="Dead"&&ye.key!=="AltGraph"||(this._unprocessedDeadKey=!0);let Re=(0,ue.evaluateKeyboardEvent)(ye,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ye),Re.type===3||Re.type===2){let Ze=this.rows-1;return this.scrollLines(Re.type===2?-Ze:Ze),this.cancel(ye,!0)}return Re.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ye)||(Re.cancel&&this.cancel(ye,!0),!Re.key||!!(ye.key&&!ye.ctrlKey&&!ye.altKey&&!ye.metaKey&&ye.key.length===1&&ye.key.charCodeAt(0)>=65&&ye.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(Re.key!==Ie.C0.ETX&&Re.key!==Ie.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Re.key,domEvent:ye}),this._showCursor(),this.coreService.triggerDataEvent(Re.key,!0),!this.optionsService.rawOptions.screenReaderMode||ye.altKey||ye.ctrlKey?this.cancel(ye,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ye,Y){let Re=ye.isMac&&!this.options.macOptionIsMeta&&Y.altKey&&!Y.ctrlKey&&!Y.metaKey||ye.isWindows&&Y.altKey&&Y.ctrlKey&&!Y.metaKey||ye.isWindows&&Y.getModifierState("AltGraph");return Y.type==="keypress"?Re:Re&&(!Y.keyCode||Y.keyCode>47)}_keyUp(ye){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ye)===!1||((function(Y){return Y.keyCode===16||Y.keyCode===17||Y.keyCode===18})(ye)||this.focus(),this.updateCursorStyle(ye),this._keyPressHandled=!1)}_keyPress(ye){let Y;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ye)===!1)return!1;if(this.cancel(ye),ye.charCode)Y=ye.charCode;else if(ye.which===null||ye.which===void 0)Y=ye.keyCode;else{if(ye.which===0||ye.charCode===0)return!1;Y=ye.which}return!(!Y||(ye.altKey||ye.ctrlKey||ye.metaKey)&&!this._isThirdLevelShift(this.browser,ye)||(Y=String.fromCharCode(Y),this._onKey.fire({key:Y,domEvent:ye}),this._showCursor(),this.coreService.triggerDataEvent(Y,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ye){if(ye.data&&ye.inputType==="insertText"&&(!ye.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let Y=ye.data;return this.coreService.triggerDataEvent(Y,!0),this.cancel(ye),!0}return!1}resize(ye,Y){ye!==this.cols||Y!==this.rows?super.resize(ye,Y):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ye,Y){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 ye=1;ye{Object.defineProperty(r,"__esModule",{value:!0}),r.TimeBasedDebouncer=void 0,r.TimeBasedDebouncer=class{constructor(s,d=1e3){this._renderCallback=s,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(s,d,m){this._rowCount=m,s=s!==void 0?s:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,s):s,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;let u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){let h=u-this._lastRefreshMs,v=this._debounceThresholdMS-h;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},v)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let s=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(s,d)}}},1680:function(i,r,s){var d=this&&this.__decorate||function(P,k,S,T){var A,D=arguments.length,F=D<3?k:T===null?T=Object.getOwnPropertyDescriptor(k,S):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(P,k,S,T);else for(var I=P.length-1;I>=0;I--)(A=P[I])&&(F=(D<3?A(F):D>3?A(k,S,F):A(k,S))||F);return D>3&&F&&Object.defineProperty(k,S,F),F},m=this&&this.__param||function(P,k){return function(S,T){k(S,T,P)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Viewport=void 0;let u=s(3656),h=s(4725),v=s(8460),b=s(844),y=s(2585),x=r.Viewport=class extends b.Disposable{constructor(P,k,S,T,A,D,F,I){super(),this._viewportElement=P,this._scrollArea=k,this._bufferService=S,this._optionsService=T,this._charSizeService=A,this._renderService=D,this._coreBrowserService=F,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 v.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(V=>this._activeBuffer=V.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(V=>this._renderDimensions=V)),this._handleThemeChange(I.colors),this.register(I.onChangeColors(V=>this._handleThemeChange(V))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(P){this._viewportElement.style.backgroundColor=P.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(P){if(P)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 k=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==k&&(this._lastRecordedBufferHeight=k,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}let P=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==P&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=P),this._refreshAnimationFrame=null}syncScrollArea(P=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(P);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(P)}_handleScroll(P){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 k=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:k,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;let P=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(P*(this._smoothScrollState.target-this._smoothScrollState.origin)),P<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(P,k){let S=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(k<0&&this._viewportElement.scrollTop!==0||k>0&&S0&&(S=oe),T=""}}return{bufferElements:A,cursorElement:S}}getLinesScrolled(P){if(P.deltaY===0||P.shiftKey)return 0;let k=this._applyScrollModifier(P.deltaY,P);return P.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(k/=this._currentRowHeight+0,this._wheelPartialScroll+=k,k=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):P.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(k*=this._bufferService.rows),k}_applyScrollModifier(P,k){let S=this._optionsService.rawOptions.fastScrollModifier;return S==="alt"&&k.altKey||S==="ctrl"&&k.ctrlKey||S==="shift"&&k.shiftKey?P*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:P*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(P){this._lastTouchY=P.touches[0].pageY}handleTouchMove(P){let k=this._lastTouchY-P.touches[0].pageY;return this._lastTouchY=P.touches[0].pageY,k!==0&&(this._viewportElement.scrollTop+=k,this._bubbleScroll(P,k))}};r.Viewport=x=d([m(2,y.IBufferService),m(3,y.IOptionsService),m(4,h.ICharSizeService),m(5,h.IRenderService),m(6,h.ICoreBrowserService),m(7,h.IThemeService)],x)},3107:function(i,r,s){var d=this&&this.__decorate||function(y,x,P,k){var S,T=arguments.length,A=T<3?x:k===null?k=Object.getOwnPropertyDescriptor(x,P):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(y,x,P,k);else for(var D=y.length-1;D>=0;D--)(S=y[D])&&(A=(T<3?S(A):T>3?S(x,P,A):S(x,P))||A);return T>3&&A&&Object.defineProperty(x,P,A),A},m=this&&this.__param||function(y,x){return function(P,k){x(P,k,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferDecorationRenderer=void 0;let u=s(4725),h=s(844),v=s(2585),b=r.BufferDecorationRenderer=class extends h.Disposable{constructor(y,x,P,k,S){super(),this._screenElement=y,this._bufferService=x,this._coreBrowserService=P,this._decorationService=k,this._renderService=S,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(T=>this._removeDecoration(T))),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 y of this._decorationService.decorations)this._renderDecoration(y);this._dimensionsChanged=!1}_renderDecoration(y){this._refreshStyle(y),this._dimensionsChanged&&this._refreshXPosition(y)}_createElement(y){let x=this._coreBrowserService.mainDocument.createElement("div");x.classList.add("xterm-decoration"),x.classList.toggle("xterm-decoration-top-layer",y?.options?.layer==="top"),x.style.width=`${Math.round((y.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,x.style.height=(y.options.height||1)*this._renderService.dimensions.css.cell.height+"px",x.style.top=(y.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",x.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let P=y.options.x??0;return P&&P>this._bufferService.cols&&(x.style.display="none"),this._refreshXPosition(y,x),x}_refreshStyle(y){let x=y.marker.line-this._bufferService.buffers.active.ydisp;if(x<0||x>=this._bufferService.rows)y.element&&(y.element.style.display="none",y.onRenderEmitter.fire(y.element));else{let P=this._decorationElements.get(y);P||(P=this._createElement(y),y.element=P,this._decorationElements.set(y,P),this._container.appendChild(P),y.onDispose(()=>{this._decorationElements.delete(y),P.remove()})),P.style.top=x*this._renderService.dimensions.css.cell.height+"px",P.style.display=this._altBufferIsActive?"none":"block",y.onRenderEmitter.fire(P)}}_refreshXPosition(y,x=y.element){if(!x)return;let P=y.options.x??0;(y.options.anchor||"left")==="right"?x.style.right=P?P*this._renderService.dimensions.css.cell.width+"px":"":x.style.left=P?P*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(y){this._decorationElements.get(y)?.remove(),this._decorationElements.delete(y),y.dispose()}};r.BufferDecorationRenderer=b=d([m(1,v.IBufferService),m(2,u.ICoreBrowserService),m(3,v.IDecorationService),m(4,u.IRenderService)],b)},5871:(i,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(s){if(s.options.overviewRulerOptions){for(let d of this._zones)if(d.color===s.options.overviewRulerOptions.color&&d.position===s.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,s.marker.line))return;if(this._lineAdjacentToZone(d,s.marker.line,s.options.overviewRulerOptions.position))return void this._addLineToZone(d,s.marker.line)}if(this._zonePoolIndex=s.startBufferLine&&d<=s.endBufferLine}_lineAdjacentToZone(s,d,m){return d>=s.startBufferLine-this._linePadding[m||"full"]&&d<=s.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(s,d){s.startBufferLine=Math.min(s.startBufferLine,d),s.endBufferLine=Math.max(s.endBufferLine,d)}}},5744:function(i,r,s){var d=this&&this.__decorate||function(S,T,A,D){var F,I=arguments.length,V=I<3?T:D===null?D=Object.getOwnPropertyDescriptor(T,A):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(S,T,A,D);else for(var ae=S.length-1;ae>=0;ae--)(F=S[ae])&&(V=(I<3?F(V):I>3?F(T,A,V):F(T,A))||V);return I>3&&V&&Object.defineProperty(T,A,V),V},m=this&&this.__param||function(S,T){return function(A,D){T(A,D,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OverviewRulerRenderer=void 0;let u=s(5871),h=s(4725),v=s(844),b=s(2585),y={full:0,left:0,center:0,right:0},x={full:0,left:0,center:0,right:0},P={full:0,left:0,center:0,right:0},k=r.OverviewRulerRenderer=class extends v.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(S,T,A,D,F,I,V){super(),this._viewportElement=S,this._screenElement=T,this._bufferService=A,this._decorationService=D,this._renderService=F,this._optionsService=I,this._coreBrowserService=V,this._colorZoneStore=new u.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 ae=this._canvas.getContext("2d");if(!ae)throw new Error("Ctx cannot be null");this._ctx=ae,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,v.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 S=Math.floor(this._canvas.width/3),T=Math.ceil(this._canvas.width/3);x.full=this._canvas.width,x.left=S,x.center=T,x.right=S,this._refreshDrawHeightConstants(),P.full=0,P.left=0,P.center=x.left,P.right=x.left+x.center}_refreshDrawHeightConstants(){y.full=Math.round(2*this._coreBrowserService.dpr);let S=this._canvas.height/this._bufferService.buffer.lines.length,T=Math.round(Math.max(Math.min(S,12),6)*this._coreBrowserService.dpr);y.left=T,y.center=T,y.right=T}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.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 T of this._decorationService.decorations)this._colorZoneStore.addDecoration(T);this._ctx.lineWidth=1;let S=this._colorZoneStore.zones;for(let T of S)T.position!=="full"&&this._renderColorZone(T);for(let T of S)T.position==="full"&&this._renderColorZone(T);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(S){this._ctx.fillStyle=S.color,this._ctx.fillRect(P[S.position||"full"],Math.round((this._canvas.height-1)*(S.startBufferLine/this._bufferService.buffers.active.lines.length)-y[S.position||"full"]/2),x[S.position||"full"],Math.round((this._canvas.height-1)*((S.endBufferLine-S.startBufferLine)/this._bufferService.buffers.active.lines.length)+y[S.position||"full"]))}_queueRefresh(S,T){this._shouldUpdateDimensions=S||this._shouldUpdateDimensions,this._shouldUpdateAnchor=T||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};r.OverviewRulerRenderer=k=d([m(2,b.IBufferService),m(3,b.IDecorationService),m(4,h.IRenderService),m(5,b.IOptionsService),m(6,h.ICoreBrowserService)],k)},2950:function(i,r,s){var d=this&&this.__decorate||function(y,x,P,k){var S,T=arguments.length,A=T<3?x:k===null?k=Object.getOwnPropertyDescriptor(x,P):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(y,x,P,k);else for(var D=y.length-1;D>=0;D--)(S=y[D])&&(A=(T<3?S(A):T>3?S(x,P,A):S(x,P))||A);return T>3&&A&&Object.defineProperty(x,P,A),A},m=this&&this.__param||function(y,x){return function(P,k){x(P,k,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CompositionHelper=void 0;let u=s(4725),h=s(2585),v=s(2584),b=r.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(y,x,P,k,S,T){this._textarea=y,this._compositionView=x,this._bufferService=P,this._optionsService=k,this._coreService=S,this._renderService=T,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(y){this._compositionView.textContent=y.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(y){if(this._isComposing||this._isSendingComposition){if(y.keyCode===229||y.keyCode===16||y.keyCode===17||y.keyCode===18)return!1;this._finalizeComposition(!1)}return y.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(y){if(this._compositionView.classList.remove("active"),this._isComposing=!1,y){let x={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let P;this._isSendingComposition=!1,x.start+=this._dataAlreadySent.length,P=this._isComposing?this._textarea.value.substring(x.start,x.end):this._textarea.value.substring(x.start),P.length>0&&this._coreService.triggerDataEvent(P,!0)}},0)}else{this._isSendingComposition=!1;let x=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(x,!0)}}_handleAnyTextareaChanges(){let y=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let x=this._textarea.value,P=x.replace(y,"");this._dataAlreadySent=P,x.length>y.length?this._coreService.triggerDataEvent(P,!0):x.lengththis.updateCompositionElements(!0),0)}}};r.CompositionHelper=b=d([m(2,h.IBufferService),m(3,h.IOptionsService),m(4,h.ICoreService),m(5,u.IRenderService)],b)},9806:(i,r)=>{function s(d,m,u){let h=u.getBoundingClientRect(),v=d.getComputedStyle(u),b=parseInt(v.getPropertyValue("padding-left")),y=parseInt(v.getPropertyValue("padding-top"));return[m.clientX-h.left-b,m.clientY-h.top-y]}Object.defineProperty(r,"__esModule",{value:!0}),r.getCoords=r.getCoordsRelativeToElement=void 0,r.getCoordsRelativeToElement=s,r.getCoords=function(d,m,u,h,v,b,y,x,P){if(!b)return;let k=s(d,m,u);return k?(k[0]=Math.ceil((k[0]+(P?y/2:0))/y),k[1]=Math.ceil(k[1]/x),k[0]=Math.min(Math.max(k[0],1),h+(P?1:0)),k[1]=Math.min(Math.max(k[1],1),v),k):void 0}},9504:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.moveToCellSequence=void 0;let d=s(2584);function m(x,P,k,S){let T=x-u(x,k),A=P-u(P,k),D=Math.abs(T-A)-(function(F,I,V){let ae=0,oe=F-u(F,V),W=I-u(I,V);for(let G=0;G=0&&xP?"A":"B"}function v(x,P,k,S,T,A){let D=x,F=P,I="";for(;D!==k||F!==S;)D+=T?1:-1,T&&D>A.cols-1?(I+=A.buffer.translateBufferLineToString(F,!1,x,D),D=0,x=0,F++):!T&&D<0&&(I+=A.buffer.translateBufferLineToString(F,!1,0,x+1),D=A.cols-1,x=D,F--);return I+A.buffer.translateBufferLineToString(F,!1,x,D)}function b(x,P){let k=P?"O":"[";return d.C0.ESC+k+x}function y(x,P){x=Math.floor(x);let k="";for(let S=0;S0?oe-u(oe,W):V;let we=oe,me=(function(Ie,ue,H,ee,le,de){let De;return De=m(H,ee,le,de).length>0?ee-u(ee,le):ue,Ie=H&&Dex?"D":"C",y(Math.abs(T-x),b(D,S));D=A>P?"D":"C";let F=Math.abs(A-P);return y((function(I,V){return V.cols-I})(A>P?x:T,k)+(F-1)*k.cols+1+((A>P?T:x)-1),b(D,S))}},1296:function(i,r,s){var d=this&&this.__decorate||function(G,Ce,we,me){var Ie,ue=arguments.length,H=ue<3?Ce:me===null?me=Object.getOwnPropertyDescriptor(Ce,we):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(G,Ce,we,me);else for(var ee=G.length-1;ee>=0;ee--)(Ie=G[ee])&&(H=(ue<3?Ie(H):ue>3?Ie(Ce,we,H):Ie(Ce,we))||H);return ue>3&&H&&Object.defineProperty(Ce,we,H),H},m=this&&this.__param||function(G,Ce){return function(we,me){Ce(we,me,G)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRenderer=void 0;let u=s(3787),h=s(2550),v=s(2223),b=s(6171),y=s(6052),x=s(4725),P=s(8055),k=s(8460),S=s(844),T=s(2585),A="xterm-dom-renderer-owner-",D="xterm-rows",F="xterm-fg-",I="xterm-bg-",V="xterm-focus",ae="xterm-selection",oe=1,W=r.DomRenderer=class extends S.Disposable{constructor(G,Ce,we,me,Ie,ue,H,ee,le,de,De,je,tt){super(),this._terminal=G,this._document=Ce,this._element=we,this._screenElement=me,this._viewportElement=Ie,this._helperContainer=ue,this._linkifier2=H,this._charSizeService=le,this._optionsService=de,this._bufferService=De,this._coreBrowserService=je,this._themeService=tt,this._terminalClass=oe++,this._rowElements=[],this._selectionRenderModel=(0,y.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new k.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),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(ae),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,b.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=ee.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(A+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,S.toDisposable)(()=>{this._element.classList.remove(A+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 we of this._rowElements)we.style.width=`${this.dimensions.css.canvas.width}px`,we.style.height=`${this.dimensions.css.cell.height}px`,we.style.lineHeight=`${this.dimensions.css.cell.height}px`,we.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let Ce=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Ce,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 Ce=`${this._terminalSelector} .${D} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Ce+=`${this._terminalSelector} .${D} .xterm-dim { color: ${P.color.multiplyOpacity(G.foreground,.5).css};}`,Ce+=`${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 we=`blink_underline_${this._terminalClass}`,me=`blink_bar_${this._terminalClass}`,Ie=`blink_block_${this._terminalClass}`;Ce+=`@keyframes ${we} { 50% { border-bottom-style: hidden; }}`,Ce+=`@keyframes ${me} { 50% { box-shadow: none; }}`,Ce+=`@keyframes ${Ie} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,Ce+=`${this._terminalSelector} .${D}.${V} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${we} 1s step-end infinite;}${this._terminalSelector} .${D}.${V} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${me} 1s step-end infinite;}${this._terminalSelector} .${D}.${V} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Ie} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Ce+=`${this._terminalSelector} .${ae} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${ae} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${ae} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(let[ue,H]of G.ansi.entries())Ce+=`${this._terminalSelector} .${F}${ue} { color: ${H.css}; }${this._terminalSelector} .${F}${ue}.xterm-dim { color: ${P.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${I}${ue} { background-color: ${H.css}; }`;Ce+=`${this._terminalSelector} .${F}${v.INVERTED_DEFAULT_COLOR} { color: ${P.color.opaque(G.background).css}; }${this._terminalSelector} .${F}${v.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${P.color.multiplyOpacity(P.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${I}${v.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=Ce}_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,Ce){for(let we=this._rowElements.length;we<=Ce;we++){let me=this._document.createElement("div");this._rowContainer.appendChild(me),this._rowElements.push(me)}for(;this._rowElements.length>Ce;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,Ce){this._refreshRowElements(G,Ce),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(V),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(V),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(G,Ce,we){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,Ce,we),this.renderRows(0,this._bufferService.rows-1),!G||!Ce)return;this._selectionRenderModel.update(this._terminal,G,Ce,we);let me=this._selectionRenderModel.viewportStartRow,Ie=this._selectionRenderModel.viewportEndRow,ue=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(ue>=this._bufferService.rows||H<0)return;let ee=this._document.createDocumentFragment();if(we){let le=G[0]>Ce[0];ee.appendChild(this._createSelectionElement(ue,le?Ce[0]:G[0],le?G[0]:Ce[0],H-ue+1))}else{let le=me===ue?G[0]:0,de=ue===Ie?Ce[0]:this._bufferService.cols;ee.appendChild(this._createSelectionElement(ue,le,de));let De=H-ue-1;if(ee.appendChild(this._createSelectionElement(ue+1,0,this._bufferService.cols,De)),ue!==H){let je=Ie===H?Ce[0]:this._bufferService.cols;ee.appendChild(this._createSelectionElement(H,0,je))}}this._selectionContainer.appendChild(ee)}_createSelectionElement(G,Ce,we,me=1){let Ie=this._document.createElement("div"),ue=Ce*this.dimensions.css.cell.width,H=this.dimensions.css.cell.width*(we-Ce);return ue+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-ue),Ie.style.height=me*this.dimensions.css.cell.height+"px",Ie.style.top=G*this.dimensions.css.cell.height+"px",Ie.style.left=`${ue}px`,Ie.style.width=`${H}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,Ce){let we=this._bufferService.buffer,me=we.ybase+we.y,Ie=Math.min(we.x,this._bufferService.cols-1),ue=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,ee=this._optionsService.rawOptions.cursorInactiveStyle;for(let le=G;le<=Ce;le++){let de=le+we.ydisp,De=this._rowElements[le],je=we.lines.get(de);if(!De||!je)break;De.replaceChildren(...this._rowFactory.createRow(je,de,de===me,H,ee,Ie,ue,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${A}${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,Ce,we,me,Ie,ue){we<0&&(G=0),me<0&&(Ce=0);let H=this._bufferService.rows-1;we=Math.max(Math.min(we,H),0),me=Math.max(Math.min(me,H),0),Ie=Math.min(Ie,this._bufferService.cols);let ee=this._bufferService.buffer,le=ee.ybase+ee.y,de=Math.min(ee.x,Ie-1),De=this._optionsService.rawOptions.cursorBlink,je=this._optionsService.rawOptions.cursorStyle,tt=this._optionsService.rawOptions.cursorInactiveStyle;for(let et=we;et<=me;++et){let ye=et+ee.ydisp,Y=this._rowElements[et],Re=ee.lines.get(ye);if(!Y||!Re)break;Y.replaceChildren(...this._rowFactory.createRow(Re,ye,ye===le,je,tt,de,De,this.dimensions.css.cell.width,this._widthCache,ue?et===we?G:0:-1,ue?(et===me?Ce:Ie)-1:-1))}}};r.DomRenderer=W=d([m(7,T.IInstantiationService),m(8,x.ICharSizeService),m(9,T.IOptionsService),m(10,T.IBufferService),m(11,x.ICoreBrowserService),m(12,x.IThemeService)],W)},3787:function(i,r,s){var d=this&&this.__decorate||function(D,F,I,V){var ae,oe=arguments.length,W=oe<3?F:V===null?V=Object.getOwnPropertyDescriptor(F,I):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(D,F,I,V);else for(var G=D.length-1;G>=0;G--)(ae=D[G])&&(W=(oe<3?ae(W):oe>3?ae(F,I,W):ae(F,I))||W);return oe>3&&W&&Object.defineProperty(F,I,W),W},m=this&&this.__param||function(D,F){return function(I,V){F(I,V,D)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRendererRowFactory=void 0;let u=s(2223),h=s(643),v=s(511),b=s(2585),y=s(8055),x=s(4725),P=s(4269),k=s(6171),S=s(3734),T=r.DomRendererRowFactory=class{constructor(D,F,I,V,ae,oe,W){this._document=D,this._characterJoinerService=F,this._optionsService=I,this._coreBrowserService=V,this._coreService=ae,this._decorationService=oe,this._themeService=W,this._workCell=new v.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,F,I){this._selectionStart=D,this._selectionEnd=F,this._columnSelectMode=I}createRow(D,F,I,V,ae,oe,W,G,Ce,we,me){let Ie=[],ue=this._characterJoinerService.getJoinedCharacters(F),H=this._themeService.colors,ee,le=D.getNoBgTrimmedLength();I&&le0&&ri===ue[0][0]){bo=!0;let tr=ue.shift();Hn=new P.JoinedCellData(this._workCell,D.translateToString(!0,tr[0],tr[1]),tr[1]-tr[0]),qr=tr[1]-1,Lo=Hn.getWidth()}let ep=this._isCellInSelection(ri,F),Ku=I&&ri===oe,wk=Tt&&ri>=we&&ri<=me,Mk=!1;this._decorationService.forEachDecorationAtCell(ri,F,void 0,tr=>{Mk=!0});let bv=Hn.getChars()||h.WHITESPACE_CELL_CHAR;if(bv===" "&&(Hn.isUnderline()||Hn.isOverline())&&(bv="\xA0"),Ze=Lo*G-Ce.get(bv,Hn.isBold(),Hn.isItalic()),ee){if(de&&(ep&&Re||!ep&&!Re&&Hn.bg===je)&&(ep&&Re&&H.selectionForeground||Hn.fg===tt)&&Hn.extended.ext===et&&wk===ye&&Ze===Y&&!Ku&&!bo&&!Mk){Hn.isInvisible()?De+=h.WHITESPACE_CELL_CHAR:De+=bv,de++;continue}de&&(ee.textContent=De),ee=this._document.createElement("span"),de=0,De=""}else ee=this._document.createElement("span");if(je=Hn.bg,tt=Hn.fg,et=Hn.extended.ext,ye=wk,Y=Ze,Re=ep,bo&&oe>=ri&&oe<=qr&&(oe=ri),!this._coreService.isCursorHidden&&Ku&&this._coreService.isCursorInitialized){if(ct.push("xterm-cursor"),this._coreBrowserService.isFocused)W&&ct.push("xterm-cursor-blink"),ct.push(V==="bar"?"xterm-cursor-bar":V==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(ae)switch(ae){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(Hn.isBold()&&ct.push("xterm-bold"),Hn.isItalic()&&ct.push("xterm-italic"),Hn.isDim()&&ct.push("xterm-dim"),De=Hn.isInvisible()?h.WHITESPACE_CELL_CHAR:Hn.getChars()||h.WHITESPACE_CELL_CHAR,Hn.isUnderline()&&(ct.push(`xterm-underline-${Hn.extended.underlineStyle}`),De===" "&&(De="\xA0"),!Hn.isUnderlineColorDefault()))if(Hn.isUnderlineColorRGB())ee.style.textDecorationColor=`rgb(${S.AttributeData.toColorRGB(Hn.getUnderlineColor()).join(",")})`;else{let tr=Hn.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Hn.isBold()&&tr<8&&(tr+=8),ee.style.textDecorationColor=H.ansi[tr].css}Hn.isOverline()&&(ct.push("xterm-overline"),De===" "&&(De="\xA0")),Hn.isStrikethrough()&&ct.push("xterm-strikethrough"),wk&&(ee.style.textDecoration="underline");let il=Hn.getFgColor(),J_=Hn.getFgColorMode(),bc=Hn.getBgColor(),ef=Hn.getBgColorMode(),Sk=!!Hn.isInverse();if(Sk){let tr=il;il=bc,bc=tr;let _H=J_;J_=ef,ef=_H}let tp,wv,np,tf=!1;switch(this._decorationService.forEachDecorationAtCell(ri,F,void 0,tr=>{tr.options.layer!=="top"&&tf||(tr.backgroundColorRGB&&(ef=50331648,bc=tr.backgroundColorRGB.rgba>>8&16777215,tp=tr.backgroundColorRGB),tr.foregroundColorRGB&&(J_=50331648,il=tr.foregroundColorRGB.rgba>>8&16777215,wv=tr.foregroundColorRGB),tf=tr.options.layer==="top")}),!tf&&ep&&(tp=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,bc=tp.rgba>>8&16777215,ef=50331648,tf=!0,H.selectionForeground&&(J_=50331648,il=H.selectionForeground.rgba>>8&16777215,wv=H.selectionForeground)),tf&&ct.push("xterm-decoration-top"),ef){case 16777216:case 33554432:np=H.ansi[bc],ct.push(`xterm-bg-${bc}`);break;case 50331648:np=y.channels.toColor(bc>>16,bc>>8&255,255&bc),this._addStyle(ee,`background-color:#${A((bc>>>0).toString(16),"0",6)}`);break;default:Sk?(np=H.foreground,ct.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):np=H.background}switch(tp||Hn.isDim()&&(tp=y.color.multiplyOpacity(np,.5)),J_){case 16777216:case 33554432:Hn.isBold()&&il<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(il+=8),this._applyMinimumContrast(ee,np,H.ansi[il],Hn,tp,void 0)||ct.push(`xterm-fg-${il}`);break;case 50331648:let tr=y.channels.toColor(il>>16&255,il>>8&255,255&il);this._applyMinimumContrast(ee,np,tr,Hn,tp,wv)||this._addStyle(ee,`color:#${A(il.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(ee,np,H.foreground,Hn,tp,wv)||Sk&&ct.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ct.length&&(ee.className=ct.join(" "),ct.length=0),Ku||bo||Mk?ee.textContent=De:de++,Ze!==this.defaultSpacing&&(ee.style.letterSpacing=`${Ze}px`),Ie.push(ee),ri=qr}return ee&&de&&(ee.textContent=De),Ie}_applyMinimumContrast(D,F,I,V,ae,oe){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,k.treatGlyphAsBackgroundColor)(V.getCode()))return!1;let W=this._getContrastCache(V),G;if(ae||oe||(G=W.getColor(F.rgba,I.rgba)),G===void 0){let Ce=this._optionsService.rawOptions.minimumContrastRatio/(V.isDim()?2:1);G=y.color.ensureContrastRatio(ae||F,oe||I,Ce),W.setColor((ae||F).rgba,(oe||I).rgba,G??null)}return!!G&&(this._addStyle(D,`color:${G.css}`),!0)}_getContrastCache(D){return D.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(D,F){D.setAttribute("style",`${D.getAttribute("style")||""}${F};`)}_isCellInSelection(D,F){let I=this._selectionStart,V=this._selectionEnd;return!(!I||!V)&&(this._columnSelectMode?I[0]<=V[0]?D>=I[0]&&F>=I[1]&&D=I[1]&&D>=V[0]&&F<=V[1]:F>I[1]&&F=I[0]&&D=I[0])}};function A(D,F,I){for(;D.length{Object.defineProperty(r,"__esModule",{value:!0}),r.WidthCache=void 0,r.WidthCache=class{constructor(s,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=s.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=s.createElement("span");m.classList.add("xterm-char-measure-element");let u=s.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";let h=s.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontStyle="italic";let v=s.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontWeight="bold",v.style.fontStyle="italic",this._measureElements=[m,u,h,v],this._container.appendChild(m),this._container.appendChild(u),this._container.appendChild(h),this._container.appendChild(v),d.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(s,d,m,u){s===this._font&&d===this._fontSize&&m===this._weight&&u===this._weightBold||(this._font=s,this._fontSize=d,this._weight=m,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(s,d,m){let u=0;if(!d&&!m&&s.length===1&&(u=s.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];let b=this._measure(s,0);return b>0&&(this._flat[u]=b),b}let h=s;d&&(h+="B"),m&&(h+="I");let v=this._holey.get(h);if(v===void 0){let b=0;d&&(b|=1),m&&(b|=2),v=this._measure(s,b),v>0&&this._holey.set(h,v)}return v}_measure(s,d){let m=this._measureElements[d];return m.textContent=s.repeat(32),m.offsetWidth/32}}},2223:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;let d=s(6114);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(i,r)=>{function s(m){return 57508<=m&&m<=57558}function d(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=s,r.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},r.isEmoji=d,r.allowRescaling=function(m,u,h,v){return u===1&&h>Math.ceil(1.5*v)&&m!==void 0&&m>255&&!d(m)&&!s(m)&&!(function(b){return 57344<=b&&b<=63743})(m)},r.treatGlyphAsBackgroundColor=function(m){return s(m)||(function(u){return 9472<=u&&u<=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,u,h=0){return(m-(2*Math.round(u)-h))%(2*Math.round(u))}},6052:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSelectionRenderModel=void 0;class s{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,u,h,v=!1){if(this.selectionStart=u,this.selectionEnd=h,!u||!h||u[0]===h[0]&&u[1]===h[1])return void this.clear();let b=m.buffers.active.ydisp,y=u[1]-b,x=h[1]-b,P=Math.max(y,0),k=Math.min(x,m.rows-1);P>=m.rows||k<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=v,this.viewportStartRow=y,this.viewportEndRow=x,this.viewportCappedStartRow=P,this.viewportCappedEndRow=k,this.startCol=u[0],this.endCol=h[0])}isCellSelected(m,u,h){return!!this.hasSelection&&(h-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&h>=this.viewportCappedStartRow&&u=this.viewportCappedStartRow&&u>=this.endCol&&h<=this.viewportCappedEndRow:h>this.viewportStartRow&&h=this.startCol&&u=this.startCol)}}r.createSelectionRenderModel=function(){return new s}},456:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionModel=void 0,r.SelectionModel=class{constructor(s){this._bufferService=s,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 s=this.selectionStart[0]+this.selectionStartLength;return s>this._bufferService.cols?s%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(s/this._bufferService.cols)-1]:[s%this._bufferService.cols,this.selectionStart[1]+Math.floor(s/this._bufferService.cols)]:[s,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let s=this.selectionStart[0]+this.selectionStartLength;return s>this._bufferService.cols?[s%this._bufferService.cols,this.selectionStart[1]+Math.floor(s/this._bufferService.cols)]:[Math.max(s,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let s=this.selectionStart,d=this.selectionEnd;return!(!s||!d)&&(s[1]>d[1]||s[1]===d[1]&&s[0]>d[0])}handleTrim(s){return this.selectionStart&&(this.selectionStart[1]-=s),this.selectionEnd&&(this.selectionEnd[1]-=s),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(i,r,s){var d=this&&this.__decorate||function(k,S,T,A){var D,F=arguments.length,I=F<3?S:A===null?A=Object.getOwnPropertyDescriptor(S,T):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(k,S,T,A);else for(var V=k.length-1;V>=0;V--)(D=k[V])&&(I=(F<3?D(I):F>3?D(S,T,I):D(S,T))||I);return F>3&&I&&Object.defineProperty(S,T,I),I},m=this&&this.__param||function(k,S){return function(T,A){S(T,A,k)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharSizeService=void 0;let u=s(2585),h=s(8460),v=s(844),b=r.CharSizeService=class extends v.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(k,S,T){super(),this._optionsService=T,this.width=0,this.height=0,this._onCharSizeChange=this.register(new h.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new P(this._optionsService))}catch{this._measureStrategy=this.register(new x(k,S,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){let k=this._measureStrategy.measure();k.width===this.width&&k.height===this.height||(this.width=k.width,this.height=k.height,this._onCharSizeChange.fire())}};r.CharSizeService=b=d([m(2,u.IOptionsService)],b);class y extends v.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(S,T){S!==void 0&&S>0&&T!==void 0&&T>0&&(this._result.width=S,this._result.height=T)}}class x extends y{constructor(S,T,A){super(),this._document=S,this._parentElement=T,this._optionsService=A,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 P extends y{constructor(S){super(),this._optionsService=S,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let T=this._ctx.measureText("W");if(!("width"in T&&"fontBoundingBoxAscent"in T&&"fontBoundingBoxDescent"in T))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let S=this._ctx.measureText("W");return this._validateAndSet(S.width,S.fontBoundingBoxAscent+S.fontBoundingBoxDescent),this._result}}},4269:function(i,r,s){var d=this&&this.__decorate||function(P,k,S,T){var A,D=arguments.length,F=D<3?k:T===null?T=Object.getOwnPropertyDescriptor(k,S):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(P,k,S,T);else for(var I=P.length-1;I>=0;I--)(A=P[I])&&(F=(D<3?A(F):D>3?A(k,S,F):A(k,S))||F);return D>3&&F&&Object.defineProperty(k,S,F),F},m=this&&this.__param||function(P,k){return function(S,T){k(S,T,P)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;let u=s(3734),h=s(643),v=s(511),b=s(2585);class y extends u.AttributeData{constructor(k,S,T){super(),this.content=0,this.combinedData="",this.fg=k.fg,this.bg=k.bg,this.combinedData=S,this._width=T}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(k){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.JoinedCellData=y;let x=r.CharacterJoinerService=class mj{constructor(k){this._bufferService=k,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new v.CellData}register(k){let S={id:this._nextCharacterJoinerId++,handler:k};return this._characterJoiners.push(S),S.id}deregister(k){for(let S=0;S1){let W=this._getJoinedRanges(A,I,F,S,D);for(let G=0;G1){let oe=this._getJoinedRanges(A,I,F,S,D);for(let W=0;W{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreBrowserService=void 0;let d=s(844),m=s(8460),u=s(3656);class h extends d.Disposable{constructor(y,x,P){super(),this._textarea=y,this._window=x,this.mainDocument=P,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new v(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(k=>this._screenDprMonitor.setWindow(k))),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(y){this._window!==y&&(this._window=y,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 v extends d.Disposable{constructor(y){super(),this._parentWindow=y,this._windowResizeListener=this.register(new d.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,d.toDisposable)(()=>this.clearListener()))}setWindow(y){this._parentWindow=y,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.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:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkProviderService=void 0;let d=s(844);class m extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(h){return this.linkProviders.push(h),{dispose:()=>{let v=this.linkProviders.indexOf(h);v!==-1&&this.linkProviders.splice(v,1)}}}}r.LinkProviderService=m},8934:function(i,r,s){var d=this&&this.__decorate||function(b,y,x,P){var k,S=arguments.length,T=S<3?y:P===null?P=Object.getOwnPropertyDescriptor(y,x):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,y,x,P);else for(var A=b.length-1;A>=0;A--)(k=b[A])&&(T=(S<3?k(T):S>3?k(y,x,T):k(y,x))||T);return S>3&&T&&Object.defineProperty(y,x,T),T},m=this&&this.__param||function(b,y){return function(x,P){y(x,P,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MouseService=void 0;let u=s(4725),h=s(9806),v=r.MouseService=class{constructor(b,y){this._renderService=b,this._charSizeService=y}getCoords(b,y,x,P,k){return(0,h.getCoords)(window,b,y,x,P,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,k)}getMouseReportCoords(b,y){let x=(0,h.getCoordsRelativeToElement)(window,b,y);if(this._charSizeService.hasValidSize)return x[0]=Math.min(Math.max(x[0],0),this._renderService.dimensions.css.canvas.width-1),x[1]=Math.min(Math.max(x[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(x[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(x[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(x[0]),y:Math.floor(x[1])}}};r.MouseService=v=d([m(0,u.IRenderService),m(1,u.ICharSizeService)],v)},3230:function(i,r,s){var d=this&&this.__decorate||function(k,S,T,A){var D,F=arguments.length,I=F<3?S:A===null?A=Object.getOwnPropertyDescriptor(S,T):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(k,S,T,A);else for(var V=k.length-1;V>=0;V--)(D=k[V])&&(I=(F<3?D(I):F>3?D(S,T,I):D(S,T))||I);return F>3&&I&&Object.defineProperty(S,T,I),I},m=this&&this.__param||function(k,S){return function(T,A){S(T,A,k)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RenderService=void 0;let u=s(6193),h=s(4725),v=s(8460),b=s(844),y=s(7226),x=s(2585),P=r.RenderService=class extends b.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(k,S,T,A,D,F,I,V){super(),this._rowCount=k,this._charSizeService=A,this._renderer=this.register(new b.MutableDisposable),this._pausedResizeTask=new y.DebouncedIdleTask,this._observerDisposable=this.register(new b.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 v.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new v.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new v.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new v.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((ae,oe)=>this._renderRows(ae,oe),I),this.register(this._renderDebouncer),this.register(I.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(F.onResize(()=>this._fullRefresh())),this.register(F.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this.register(T.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(D.onDecorationRegistered(()=>this._fullRefresh())),this.register(D.onDecorationRemoved(()=>this._fullRefresh())),this.register(T.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(F.cols,F.rows),this._fullRefresh()})),this.register(T.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(F.buffer.y,F.buffer.y,!0))),this.register(V.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(I.window,S),this.register(I.onWindowChange(ae=>this._registerIntersectionObserver(ae,S)))}_registerIntersectionObserver(k,S){if("IntersectionObserver"in k){let T=new k.IntersectionObserver(A=>this._handleIntersectionChange(A[A.length-1]),{threshold:0});T.observe(S),this._observerDisposable.value=(0,b.toDisposable)(()=>T.disconnect())}}_handleIntersectionChange(k){this._isPaused=k.isIntersecting===void 0?k.intersectionRatio===0:!k.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(k,S,T=!1){this._isPaused?this._needsFullRefresh=!0:(T||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(k,S,this._rowCount))}_renderRows(k,S){this._renderer.value&&(k=Math.min(k,this._rowCount-1),S=Math.min(S,this._rowCount-1),this._renderer.value.renderRows(k,S),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:k,end:S}),this._onRender.fire({start:k,end:S}),this._isNextRenderRedrawOnly=!0)}resize(k,S){this._rowCount=S,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(k){this._renderer.value=k,this._renderer.value&&(this._renderer.value.onRequestRedraw(S=>this.refreshRows(S.start,S.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(k){return this._renderDebouncer.addRefreshCallback(k)}_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(k,S){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(k,S)):this._renderer.value.handleResize(k,S),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(k,S,T){this._selectionState.start=k,this._selectionState.end=S,this._selectionState.columnSelectMode=T,this._renderer.value?.handleSelectionChanged(k,S,T)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};r.RenderService=P=d([m(2,x.IOptionsService),m(3,h.ICharSizeService),m(4,x.IDecorationService),m(5,x.IBufferService),m(6,h.ICoreBrowserService),m(7,h.IThemeService)],P)},9312:function(i,r,s){var d=this&&this.__decorate||function(I,V,ae,oe){var W,G=arguments.length,Ce=G<3?V:oe===null?oe=Object.getOwnPropertyDescriptor(V,ae):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ce=Reflect.decorate(I,V,ae,oe);else for(var we=I.length-1;we>=0;we--)(W=I[we])&&(Ce=(G<3?W(Ce):G>3?W(V,ae,Ce):W(V,ae))||Ce);return G>3&&Ce&&Object.defineProperty(V,ae,Ce),Ce},m=this&&this.__param||function(I,V){return function(ae,oe){V(ae,oe,I)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionService=void 0;let u=s(9806),h=s(9504),v=s(456),b=s(4725),y=s(8460),x=s(844),P=s(6114),k=s(4841),S=s(511),T=s(2585),A="\xA0",D=new RegExp(A,"g"),F=r.SelectionService=class extends x.Disposable{constructor(I,V,ae,oe,W,G,Ce,we,me){super(),this._element=I,this._screenElement=V,this._linkifier=ae,this._bufferService=oe,this._coreService=W,this._mouseService=G,this._optionsService=Ce,this._renderService=we,this._coreBrowserService=me,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new S.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new y.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new y.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new y.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new y.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 v.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,x.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 I=this._model.finalSelectionStart,V=this._model.finalSelectionEnd;return!(!I||!V||I[0]===V[0]&&I[1]===V[1])}get selectionText(){let I=this._model.finalSelectionStart,V=this._model.finalSelectionEnd;if(!I||!V)return"";let ae=this._bufferService.buffer,oe=[];if(this._activeSelectionMode===3){if(I[0]===V[0])return"";let W=I[0]W.replace(D," ")).join(P.isWindows?`\r `:` `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(I){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),P.isLinux&&I&&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(I){let V=this._getMouseBufferCoords(I),ae=this._model.finalSelectionStart,oe=this._model.finalSelectionEnd;return!!(ae&&oe&&V)&&this._areCoordsInSelection(V,ae,oe)}isCellInSelection(I,V){let ae=this._model.finalSelectionStart,oe=this._model.finalSelectionEnd;return!(!ae||!oe)&&this._areCoordsInSelection([I,V],ae,oe)}_areCoordsInSelection(I,V,ae){return I[1]>V[1]&&I[1]=V[0]&&I[0]=V[0]}_selectWordAtCursor(I,V){let ae=this._linkifier.currentLink?.link?.range;if(ae)return this._model.selectionStart=[ae.start.x-1,ae.start.y-1],this._model.selectionStartLength=(0,k.getRangeLength)(ae,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let oe=this._getMouseBufferCoords(I);return!!oe&&(this._selectWordAt(oe,V),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(I,V){this._model.clearSelection(),I=Math.max(I,0),V=Math.min(V,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,I],this._model.selectionEnd=[this._bufferService.cols,V],this.refresh(),this._onSelectionChange.fire()}_handleTrim(I){this._model.handleTrim(I)&&this.refresh()}_getMouseBufferCoords(I){let V=this._mouseService.getCoords(I,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(V)return V[0]--,V[1]--,V[1]+=this._bufferService.buffer.ydisp,V}_getMouseEventScrollAmount(I){let V=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,I,this._screenElement)[1],ae=this._renderService.dimensions.css.canvas.height;return V>=0&&V<=ae?0:(V>ae&&(V-=ae),V=Math.min(Math.max(V,-50),50),V/=50,V/Math.abs(V)+Math.round(14*V))}shouldForceSelection(I){return P.isMac?I.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:I.shiftKey}handleMouseDown(I){if(this._mouseDownTimeStamp=I.timeStamp,(I.button!==2||!this.hasSelection)&&I.button===0){if(!this._enabled){if(!this.shouldForceSelection(I))return;I.stopPropagation()}I.preventDefault(),this._dragScrollAmount=0,this._enabled&&I.shiftKey?this._handleIncrementalClick(I):I.detail===1?this._handleSingleClick(I):I.detail===2?this._handleDoubleClick(I):I.detail===3&&this._handleTripleClick(I),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(I){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(I))}_handleSingleClick(I){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(I)?3:0,this._model.selectionStart=this._getMouseBufferCoords(I),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let V=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);V&&V.length!==this._model.selectionStart[0]&&V.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(I){this._selectWordAtCursor(I,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(I){let V=this._getMouseBufferCoords(I);V&&(this._activeSelectionMode=2,this._selectLineAt(V[1]))}shouldColumnSelect(I){return I.altKey&&!(P.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(I){if(I.stopImmediatePropagation(),!this._model.selectionStart)return;let V=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(I),!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 ae=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(I.ydisp+this._bufferService.rows,I.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=I.ydisp),this.refresh()}}_handleMouseUp(I){let V=I.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&V<500&&I.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let ae=this._mouseService.getCoords(I,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(ae&&ae[0]!==void 0&&ae[1]!==void 0){let oe=(0,h.moveToCellSequence)(ae[0]-1,ae[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(oe,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let I=this._model.finalSelectionStart,V=this._model.finalSelectionEnd,ae=!(!I||!V||I[0]===V[0]&&I[1]===V[1]);ae?I&&V&&(this._oldSelectionStart&&this._oldSelectionEnd&&I[0]===this._oldSelectionStart[0]&&I[1]===this._oldSelectionStart[1]&&V[0]===this._oldSelectionEnd[0]&&V[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(I,V,ae)):this._oldHasSelection&&this._fireOnSelectionChange(I,V,ae)}_fireOnSelectionChange(I,V,ae){this._oldSelectionStart=I,this._oldSelectionEnd=V,this._oldHasSelection=ae,this._onSelectionChange.fire()}_handleBufferActivate(I){this.clearSelection(),this._trimListener.dispose(),this._trimListener=I.activeBuffer.lines.onTrim(V=>this._handleTrim(V))}_convertViewportColToCharacterIndex(I,V){let ae=V;for(let oe=0;V>=oe;oe++){let W=I.loadCell(oe,this._workCell).getChars().length;this._workCell.getWidth()===0?ae--:W>1&&V!==oe&&(ae+=W-1)}return ae}setSelection(I,V,ae){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[I,V],this._model.selectionStartLength=ae,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(I){this._isClickInSelection(I)||(this._selectWordAtCursor(I,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(I,V,ae=!0,oe=!0){if(I[0]>=this._bufferService.cols)return;let W=this._bufferService.buffer,G=W.lines.get(I[1]);if(!G)return;let Ce=W.translateBufferLineToString(I[1],!1),we=this._convertViewportColToCharacterIndex(G,I[0]),me=we,Ie=I[0]-we,ue=0,H=0,ee=0,le=0;if(Ce.charAt(we)===" "){for(;we>0&&Ce.charAt(we-1)===" ";)we--;for(;me1&&(le+=et-1,me+=et-1);je>0&&we>0&&!this._isCharWordSeparator(G.loadCell(je-1,this._workCell));){G.loadCell(je-1,this._workCell);let ye=this._workCell.getChars().length;this._workCell.getWidth()===0?(ue++,je--):ye>1&&(ee+=ye-1,we-=ye-1),we--,je--}for(;tt1&&(le+=ye-1,me+=ye-1),me++,tt++}}me++;let de=we+Ie-ue+ee,De=Math.min(this._bufferService.cols,me-we+ue+H-ee-le);if(V||Ce.slice(we,me).trim()!==""){if(ae&&de===0&&G.getCodePoint(0)!==32){let je=W.lines.get(I[1]-1);if(je&&G.isWrapped&&je.getCodePoint(this._bufferService.cols-1)!==32){let tt=this._getWordAt([this._bufferService.cols-1,I[1]-1],!1,!0,!1);if(tt){let et=this._bufferService.cols-tt.start;de-=et,De+=et}}}if(oe&&de+De===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){let je=W.lines.get(I[1]+1);if(je?.isWrapped&&je.getCodePoint(0)!==32){let tt=this._getWordAt([0,I[1]+1],!1,!1,!0);tt&&(De+=tt.length)}}return{start:de,length:De}}}_selectWordAt(I,V){let ae=this._getWordAt(I,V);if(ae){for(;ae.start<0;)ae.start+=this._bufferService.cols,I[1]--;this._model.selectionStart=[ae.start,I[1]],this._model.selectionStartLength=ae.length}}_selectToWordAt(I){let V=this._getWordAt(I,!0);if(V){let ae=I[1];for(;V.start<0;)V.start+=this._bufferService.cols,ae--;if(!this._model.areSelectionValuesReversed())for(;V.start+V.length>this._bufferService.cols;)V.length-=this._bufferService.cols,ae++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?V.start:V.start+V.length,ae]}}_isCharWordSeparator(I){return I.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(I.getChars())>=0}_selectLineAt(I){let V=this._bufferService.buffer.getWrappedRangeForLine(I),ae={start:{x:0,y:V.first},end:{x:this._bufferService.cols-1,y:V.last}};this._model.selectionStart=[0,V.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,k.getRangeLength)(ae,this._bufferService.cols)}};r.SelectionService=F=d([m(3,T.IBufferService),m(4,T.ICoreService),m(5,b.IMouseService),m(6,T.IOptionsService),m(7,b.IRenderService),m(8,b.ICoreBrowserService)],F)},4725:(i,r,s)=>{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 d=s(8343);r.ICharSizeService=(0,d.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),r.IMouseService=(0,d.createDecorator)("MouseService"),r.IRenderService=(0,d.createDecorator)("RenderService"),r.ISelectionService=(0,d.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,d.createDecorator)("ThemeService"),r.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(i,r,s){var d=this&&this.__decorate||function(F,I,V,ae){var oe,W=arguments.length,G=W<3?I:ae===null?ae=Object.getOwnPropertyDescriptor(I,V):ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(F,I,V,ae);else for(var Ce=F.length-1;Ce>=0;Ce--)(oe=F[Ce])&&(G=(W<3?oe(G):W>3?oe(I,V,G):oe(I,V))||G);return W>3&&G&&Object.defineProperty(I,V,G),G},m=this&&this.__param||function(F,I){return function(V,ae){I(V,ae,F)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;let u=s(7239),h=s(8055),v=s(8460),b=s(844),y=s(2585),x=h.css.toColor("#ffffff"),P=h.css.toColor("#000000"),k=h.css.toColor("#ffffff"),S=h.css.toColor("#000000"),T={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{let F=[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")],I=[0,95,135,175,215,255];for(let V=0;V<216;V++){let ae=I[V/36%6|0],oe=I[V/6%6|0],W=I[V%6];F.push({css:h.channels.toCss(ae,oe,W),rgba:h.channels.toRgba(ae,oe,W)})}for(let V=0;V<24;V++){let ae=8+10*V;F.push({css:h.channels.toCss(ae,ae,ae),rgba:h.channels.toRgba(ae,ae,ae)})}return F})());let A=r.ThemeService=class extends b.Disposable{get colors(){return this._colors}constructor(F){super(),this._optionsService=F,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new v.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:x,background:P,cursor:k,cursorAccent:S,selectionForeground:void 0,selectionBackgroundTransparent:T,selectionBackgroundOpaque:h.color.blend(P,T),selectionInactiveBackgroundTransparent:T,selectionInactiveBackgroundOpaque:h.color.blend(P,T),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(F={}){let I=this._colors;if(I.foreground=D(F.foreground,x),I.background=D(F.background,P),I.cursor=D(F.cursor,k),I.cursorAccent=D(F.cursorAccent,S),I.selectionBackgroundTransparent=D(F.selectionBackground,T),I.selectionBackgroundOpaque=h.color.blend(I.background,I.selectionBackgroundTransparent),I.selectionInactiveBackgroundTransparent=D(F.selectionInactiveBackground,I.selectionBackgroundTransparent),I.selectionInactiveBackgroundOpaque=h.color.blend(I.background,I.selectionInactiveBackgroundTransparent),I.selectionForeground=F.selectionForeground?D(F.selectionForeground,h.NULL_COLOR):void 0,I.selectionForeground===h.NULL_COLOR&&(I.selectionForeground=void 0),h.color.isOpaque(I.selectionBackgroundTransparent)&&(I.selectionBackgroundTransparent=h.color.opacity(I.selectionBackgroundTransparent,.3)),h.color.isOpaque(I.selectionInactiveBackgroundTransparent)&&(I.selectionInactiveBackgroundTransparent=h.color.opacity(I.selectionInactiveBackgroundTransparent,.3)),I.ansi=r.DEFAULT_ANSI_COLORS.slice(),I.ansi[0]=D(F.black,r.DEFAULT_ANSI_COLORS[0]),I.ansi[1]=D(F.red,r.DEFAULT_ANSI_COLORS[1]),I.ansi[2]=D(F.green,r.DEFAULT_ANSI_COLORS[2]),I.ansi[3]=D(F.yellow,r.DEFAULT_ANSI_COLORS[3]),I.ansi[4]=D(F.blue,r.DEFAULT_ANSI_COLORS[4]),I.ansi[5]=D(F.magenta,r.DEFAULT_ANSI_COLORS[5]),I.ansi[6]=D(F.cyan,r.DEFAULT_ANSI_COLORS[6]),I.ansi[7]=D(F.white,r.DEFAULT_ANSI_COLORS[7]),I.ansi[8]=D(F.brightBlack,r.DEFAULT_ANSI_COLORS[8]),I.ansi[9]=D(F.brightRed,r.DEFAULT_ANSI_COLORS[9]),I.ansi[10]=D(F.brightGreen,r.DEFAULT_ANSI_COLORS[10]),I.ansi[11]=D(F.brightYellow,r.DEFAULT_ANSI_COLORS[11]),I.ansi[12]=D(F.brightBlue,r.DEFAULT_ANSI_COLORS[12]),I.ansi[13]=D(F.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),I.ansi[14]=D(F.brightCyan,r.DEFAULT_ANSI_COLORS[14]),I.ansi[15]=D(F.brightWhite,r.DEFAULT_ANSI_COLORS[15]),F.extendedAnsi){let V=Math.min(I.ansi.length-16,F.extendedAnsi.length);for(let ae=0;ae{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;let d=s(8460),m=s(844);class u extends m.Disposable{constructor(v){super(),this._maxLength=v,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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(v){if(this._maxLength===v)return;let b=new Array(v);for(let y=0;ythis._length)for(let b=this._length;b=v;x--)this._array[this._getCyclicIndex(x+y.length)]=this._array[this._getCyclicIndex(x)];for(let x=0;xthis._maxLength){let x=this._length+y.length-this._maxLength;this._startIndex+=x,this._length=this._maxLength,this.onTrimEmitter.fire(x)}else this._length+=y.length}trimStart(v){v>this._length&&(v=this._length),this._startIndex+=v,this._length-=v,this.onTrimEmitter.fire(v)}shiftElements(v,b,y){if(!(b<=0)){if(v<0||v>=this._length)throw new Error("start argument out of range");if(v+y<0)throw new Error("Cannot shift elements in list beyond index 0");if(y>0){for(let P=b-1;P>=0;P--)this.set(v+P+y,this.get(v+P));let x=v+b+y-this._length;if(x>0)for(this._length+=x;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let x=0;x{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function s(d,m=5){if(typeof d!="object")return d;let u=Array.isArray(d)?[]:{};for(let h in d)u[h]=m<=1?d[h]:d[h]&&s(d[h],m-1);return u}},8055:(i,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 s=0,d=0,m=0,u=0;var h,v,b,y,x;function P(S){let T=S.toString(16);return T.length<2?"0"+T:T}function k(S,T){return S>>0},S.toColor=function(T,A,D,F){return{css:S.toCss(T,A,D,F),rgba:S.toRgba(T,A,D,F)}}})(h||(r.channels=h={})),(function(S){function T(A,D){return u=Math.round(255*D),[s,d,m]=x.toChannels(A.rgba),{css:h.toCss(s,d,m,u),rgba:h.toRgba(s,d,m,u)}}S.blend=function(A,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};let F=D.rgba>>24&255,I=D.rgba>>16&255,V=D.rgba>>8&255,ae=A.rgba>>24&255,oe=A.rgba>>16&255,W=A.rgba>>8&255;return s=ae+Math.round((F-ae)*u),d=oe+Math.round((I-oe)*u),m=W+Math.round((V-W)*u),{css:h.toCss(s,d,m),rgba:h.toRgba(s,d,m)}},S.isOpaque=function(A){return(255&A.rgba)==255},S.ensureContrastRatio=function(A,D,F){let I=x.ensureContrastRatio(A.rgba,D.rgba,F);if(I)return h.toColor(I>>24&255,I>>16&255,I>>8&255)},S.opaque=function(A){let D=(255|A.rgba)>>>0;return[s,d,m]=x.toChannels(D),{css:h.toCss(s,d,m),rgba:D}},S.opacity=T,S.multiplyOpacity=function(A,D){return u=255&A.rgba,T(A,u*D/255)},S.toColorRGB=function(A){return[A.rgba>>24&255,A.rgba>>16&255,A.rgba>>8&255]}})(v||(r.color=v={})),(function(S){let T,A;try{let D=document.createElement("canvas");D.width=1,D.height=1;let F=D.getContext("2d",{willReadFrequently:!0});F&&(T=F,T.globalCompositeOperation="copy",A=T.createLinearGradient(0,0,1,1))}catch{}S.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return s=parseInt(D.slice(1,2).repeat(2),16),d=parseInt(D.slice(2,3).repeat(2),16),m=parseInt(D.slice(3,4).repeat(2),16),h.toColor(s,d,m);case 5:return s=parseInt(D.slice(1,2).repeat(2),16),d=parseInt(D.slice(2,3).repeat(2),16),m=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),h.toColor(s,d,m,u);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}let F=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(F)return s=parseInt(F[1]),d=parseInt(F[2]),m=parseInt(F[3]),u=Math.round(255*(F[5]===void 0?1:parseFloat(F[5]))),h.toColor(s,d,m,u);if(!T||!A)throw new Error("css.toColor: Unsupported css format");if(T.fillStyle=A,T.fillStyle=D,typeof T.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(T.fillRect(0,0,1,1),[s,d,m,u]=T.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:h.toRgba(s,d,m,u),css:D}}})(b||(r.css=b={})),(function(S){function T(A,D,F){let I=A/255,V=D/255,ae=F/255;return .2126*(I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4))+.7152*(V<=.03928?V/12.92:Math.pow((V+.055)/1.055,2.4))+.0722*(ae<=.03928?ae/12.92:Math.pow((ae+.055)/1.055,2.4))}S.relativeLuminance=function(A){return T(A>>16&255,A>>8&255,255&A)},S.relativeLuminance2=T})(y||(r.rgb=y={})),(function(S){function T(D,F,I){let V=D>>24&255,ae=D>>16&255,oe=D>>8&255,W=F>>24&255,G=F>>16&255,Ce=F>>8&255,we=k(y.relativeLuminance2(W,G,Ce),y.relativeLuminance2(V,ae,oe));for(;we0||G>0||Ce>0);)W-=Math.max(0,Math.ceil(.1*W)),G-=Math.max(0,Math.ceil(.1*G)),Ce-=Math.max(0,Math.ceil(.1*Ce)),we=k(y.relativeLuminance2(W,G,Ce),y.relativeLuminance2(V,ae,oe));return(W<<24|G<<16|Ce<<8|255)>>>0}function A(D,F,I){let V=D>>24&255,ae=D>>16&255,oe=D>>8&255,W=F>>24&255,G=F>>16&255,Ce=F>>8&255,we=k(y.relativeLuminance2(W,G,Ce),y.relativeLuminance2(V,ae,oe));for(;we>>0}S.blend=function(D,F){if(u=(255&F)/255,u===1)return F;let I=F>>24&255,V=F>>16&255,ae=F>>8&255,oe=D>>24&255,W=D>>16&255,G=D>>8&255;return s=oe+Math.round((I-oe)*u),d=W+Math.round((V-W)*u),m=G+Math.round((ae-G)*u),h.toRgba(s,d,m)},S.ensureContrastRatio=function(D,F,I){let V=y.relativeLuminance(D>>8),ae=y.relativeLuminance(F>>8);if(k(V,ae)>8));if(Cek(V,y.relativeLuminance(we>>8))?G:we}return G}let oe=A(D,F,I),W=k(V,y.relativeLuminance(oe>>8));if(Wk(V,y.relativeLuminance(G>>8))?oe:G}return oe}},S.reduceLuminance=T,S.increaseLuminance=A,S.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(x||(r.rgba=x={})),r.toPaddedHex=P,r.contrastRatio=k},8969:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;let d=s(844),m=s(2585),u=s(4348),h=s(7866),v=s(744),b=s(7302),y=s(6975),x=s(8460),P=s(1753),k=s(1480),S=s(7994),T=s(9282),A=s(5435),D=s(5981),F=s(2660),I=!1;class V extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new x.EventEmitter),this._onScroll.event(oe=>{this._onScrollApi?.fire(oe.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(oe){for(let W in oe)this.optionsService.options[W]=oe[W]}constructor(oe){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new x.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new x.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new x.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new x.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new x.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new x.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new b.OptionsService(oe)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(v.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(y.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(P.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(k.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(S.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(F.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new A.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,x.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,x.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,x.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,x.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(W=>{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(W=>{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 D.WriteBuffer((W,G)=>this._inputHandler.parse(W,G))),this.register((0,x.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(oe,W){this._writeBuffer.write(oe,W)}writeSync(oe,W){this._logService.logLevel<=m.LogLevelEnum.WARN&&!I&&(this._logService.warn("writeSync is unreliable and will be removed soon."),I=!0),this._writeBuffer.writeSync(oe,W)}input(oe,W=!0){this.coreService.triggerDataEvent(oe,W)}resize(oe,W){isNaN(oe)||isNaN(W)||(oe=Math.max(oe,v.MINIMUM_COLS),W=Math.max(W,v.MINIMUM_ROWS),this._bufferService.resize(oe,W))}scroll(oe,W=!1){this._bufferService.scroll(oe,W)}scrollLines(oe,W,G){this._bufferService.scrollLines(oe,W,G)}scrollPages(oe){this.scrollLines(oe*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(oe){let W=oe-this._bufferService.buffer.ydisp;W!==0&&this.scrollLines(W)}registerEscHandler(oe,W){return this._inputHandler.registerEscHandler(oe,W)}registerDcsHandler(oe,W){return this._inputHandler.registerDcsHandler(oe,W)}registerCsiHandler(oe,W){return this._inputHandler.registerCsiHandler(oe,W)}registerOscHandler(oe,W){return this._inputHandler.registerOscHandler(oe,W)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let oe=!1,W=this.optionsService.rawOptions.windowsPty;W&&W.buildNumber!==void 0&&W.buildNumber!==void 0?oe=W.backend==="conpty"&&W.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(oe=!0),oe?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let oe=[];oe.push(this.onLineFeed(T.updateWindowsModeWrappedState.bind(null,this._bufferService))),oe.push(this.registerCsiHandler({final:"H"},()=>((0,T.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)(()=>{for(let W of oe)W.dispose()})}}}r.CoreTerminal=V},8460:(i,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=s=>(this._listeners.push(s),{dispose:()=>{if(!this._disposed){for(let d=0;dd.fire(m))},r.runAndSubscribe=function(s,d){return d(void 0),s(m=>d(m))}},5435:function(i,r,s){var d=this&&this.__decorate||function(ue,H,ee,le){var de,De=arguments.length,je=De<3?H:le===null?le=Object.getOwnPropertyDescriptor(H,ee):le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")je=Reflect.decorate(ue,H,ee,le);else for(var tt=ue.length-1;tt>=0;tt--)(de=ue[tt])&&(je=(De<3?de(je):De>3?de(H,ee,je):de(H,ee))||je);return De>3&&je&&Object.defineProperty(H,ee,je),je},m=this&&this.__param||function(ue,H){return function(ee,le){H(ee,le,ue)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;let u=s(2584),h=s(7116),v=s(2015),b=s(844),y=s(482),x=s(8437),P=s(8460),k=s(643),S=s(511),T=s(3734),A=s(2585),D=s(1480),F=s(6242),I=s(6351),V=s(5941),ae={"(":0,")":1,"*":2,"+":3,"-":1,".":2},oe=131072;function W(ue,H){if(ue>24)return H.setWinLines||!1;switch(ue){case 1:return!!H.restoreWin;case 2:return!!H.minimizeWin;case 3:return!!H.setWinPosition;case 4:return!!H.setWinSizePixels;case 5:return!!H.raiseWin;case 6:return!!H.lowerWin;case 7:return!!H.refreshWin;case 8:return!!H.setWinSizeChars;case 9:return!!H.maximizeWin;case 10:return!!H.fullscreenWin;case 11:return!!H.getWinState;case 13:return!!H.getWinPosition;case 14:return!!H.getWinSizePixels;case 15:return!!H.getScreenSizePixels;case 16:return!!H.getCellSizePixels;case 18:return!!H.getWinSizeChars;case 19:return!!H.getScreenSizeChars;case 20:return!!H.getIconTitle;case 21:return!!H.getWinTitle;case 22:return!!H.pushTitle;case 23:return!!H.popTitle;case 24:return!!H.setWinLines}return!1}var G;(function(ue){ue[ue.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ue[ue.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(r.WindowsOptionsReportType=G={}));let Ce=0;class we extends b.Disposable{getAttrData(){return this._curAttrData}constructor(H,ee,le,de,De,je,tt,et,ye=new v.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=ee,this._coreService=le,this._logService=de,this._optionsService=De,this._oscLinkService=je,this._coreMouseService=tt,this._unicodeService=et,this._parser=ye,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new y.StringToUtf32,this._utf8Decoder=new y.Utf8ToUtf32,this._workCell=new S.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=x.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=x.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new P.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new P.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new P.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new P.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new P.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new P.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new P.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new P.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new P.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new P.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new P.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new P.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new P.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 me(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(Y=>this._activeBuffer=Y.activeBuffer)),this._parser.setCsiHandlerFallback((Y,Re)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(Y),params:Re.toArray()})}),this._parser.setEscHandlerFallback(Y=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(Y)})}),this._parser.setExecuteHandlerFallback(Y=>{this._logService.debug("Unknown EXECUTE code: ",{code:Y})}),this._parser.setOscHandlerFallback((Y,Re,Ze)=>{this._logService.debug("Unknown OSC code: ",{identifier:Y,action:Re,data:Ze})}),this._parser.setDcsHandlerFallback((Y,Re,Ze)=>{Re==="HOOK"&&(Ze=Ze.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(Y),action:Re,payload:Ze})}),this._parser.setPrintHandler((Y,Re,Ze)=>this.print(Y,Re,Ze)),this._parser.registerCsiHandler({final:"@"},Y=>this.insertChars(Y)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},Y=>this.scrollLeft(Y)),this._parser.registerCsiHandler({final:"A"},Y=>this.cursorUp(Y)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},Y=>this.scrollRight(Y)),this._parser.registerCsiHandler({final:"B"},Y=>this.cursorDown(Y)),this._parser.registerCsiHandler({final:"C"},Y=>this.cursorForward(Y)),this._parser.registerCsiHandler({final:"D"},Y=>this.cursorBackward(Y)),this._parser.registerCsiHandler({final:"E"},Y=>this.cursorNextLine(Y)),this._parser.registerCsiHandler({final:"F"},Y=>this.cursorPrecedingLine(Y)),this._parser.registerCsiHandler({final:"G"},Y=>this.cursorCharAbsolute(Y)),this._parser.registerCsiHandler({final:"H"},Y=>this.cursorPosition(Y)),this._parser.registerCsiHandler({final:"I"},Y=>this.cursorForwardTab(Y)),this._parser.registerCsiHandler({final:"J"},Y=>this.eraseInDisplay(Y,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},Y=>this.eraseInDisplay(Y,!0)),this._parser.registerCsiHandler({final:"K"},Y=>this.eraseInLine(Y,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},Y=>this.eraseInLine(Y,!0)),this._parser.registerCsiHandler({final:"L"},Y=>this.insertLines(Y)),this._parser.registerCsiHandler({final:"M"},Y=>this.deleteLines(Y)),this._parser.registerCsiHandler({final:"P"},Y=>this.deleteChars(Y)),this._parser.registerCsiHandler({final:"S"},Y=>this.scrollUp(Y)),this._parser.registerCsiHandler({final:"T"},Y=>this.scrollDown(Y)),this._parser.registerCsiHandler({final:"X"},Y=>this.eraseChars(Y)),this._parser.registerCsiHandler({final:"Z"},Y=>this.cursorBackwardTab(Y)),this._parser.registerCsiHandler({final:"`"},Y=>this.charPosAbsolute(Y)),this._parser.registerCsiHandler({final:"a"},Y=>this.hPositionRelative(Y)),this._parser.registerCsiHandler({final:"b"},Y=>this.repeatPrecedingCharacter(Y)),this._parser.registerCsiHandler({final:"c"},Y=>this.sendDeviceAttributesPrimary(Y)),this._parser.registerCsiHandler({prefix:">",final:"c"},Y=>this.sendDeviceAttributesSecondary(Y)),this._parser.registerCsiHandler({final:"d"},Y=>this.linePosAbsolute(Y)),this._parser.registerCsiHandler({final:"e"},Y=>this.vPositionRelative(Y)),this._parser.registerCsiHandler({final:"f"},Y=>this.hVPosition(Y)),this._parser.registerCsiHandler({final:"g"},Y=>this.tabClear(Y)),this._parser.registerCsiHandler({final:"h"},Y=>this.setMode(Y)),this._parser.registerCsiHandler({prefix:"?",final:"h"},Y=>this.setModePrivate(Y)),this._parser.registerCsiHandler({final:"l"},Y=>this.resetMode(Y)),this._parser.registerCsiHandler({prefix:"?",final:"l"},Y=>this.resetModePrivate(Y)),this._parser.registerCsiHandler({final:"m"},Y=>this.charAttributes(Y)),this._parser.registerCsiHandler({final:"n"},Y=>this.deviceStatus(Y)),this._parser.registerCsiHandler({prefix:"?",final:"n"},Y=>this.deviceStatusPrivate(Y)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},Y=>this.softReset(Y)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},Y=>this.setCursorStyle(Y)),this._parser.registerCsiHandler({final:"r"},Y=>this.setScrollRegion(Y)),this._parser.registerCsiHandler({final:"s"},Y=>this.saveCursor(Y)),this._parser.registerCsiHandler({final:"t"},Y=>this.windowOptions(Y)),this._parser.registerCsiHandler({final:"u"},Y=>this.restoreCursor(Y)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},Y=>this.insertColumns(Y)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},Y=>this.deleteColumns(Y)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},Y=>this.selectProtected(Y)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},Y=>this.requestMode(Y,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},Y=>this.requestMode(Y,!1)),this._parser.setExecuteHandler(u.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(u.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(u.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(u.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(u.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(u.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(u.C1.IND,()=>this.index()),this._parser.setExecuteHandler(u.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(u.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new F.OscHandler(Y=>(this.setTitle(Y),this.setIconName(Y),!0))),this._parser.registerOscHandler(1,new F.OscHandler(Y=>this.setIconName(Y))),this._parser.registerOscHandler(2,new F.OscHandler(Y=>this.setTitle(Y))),this._parser.registerOscHandler(4,new F.OscHandler(Y=>this.setOrReportIndexedColor(Y))),this._parser.registerOscHandler(8,new F.OscHandler(Y=>this.setHyperlink(Y))),this._parser.registerOscHandler(10,new F.OscHandler(Y=>this.setOrReportFgColor(Y))),this._parser.registerOscHandler(11,new F.OscHandler(Y=>this.setOrReportBgColor(Y))),this._parser.registerOscHandler(12,new F.OscHandler(Y=>this.setOrReportCursorColor(Y))),this._parser.registerOscHandler(104,new F.OscHandler(Y=>this.restoreIndexedColor(Y))),this._parser.registerOscHandler(110,new F.OscHandler(Y=>this.restoreFgColor(Y))),this._parser.registerOscHandler(111,new F.OscHandler(Y=>this.restoreBgColor(Y))),this._parser.registerOscHandler(112,new F.OscHandler(Y=>this.restoreCursorColor(Y))),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 Y in h.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:Y},()=>this.selectCharset("("+Y)),this._parser.registerEscHandler({intermediates:")",final:Y},()=>this.selectCharset(")"+Y)),this._parser.registerEscHandler({intermediates:"*",final:Y},()=>this.selectCharset("*"+Y)),this._parser.registerEscHandler({intermediates:"+",final:Y},()=>this.selectCharset("+"+Y)),this._parser.registerEscHandler({intermediates:"-",final:Y},()=>this.selectCharset("-"+Y)),this._parser.registerEscHandler({intermediates:".",final:Y},()=>this.selectCharset("."+Y)),this._parser.registerEscHandler({intermediates:"/",final:Y},()=>this.selectCharset("/"+Y));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(Y=>(this._logService.error("Parsing error: ",Y),Y)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new I.DcsHandler((Y,Re)=>this.requestStatusString(Y,Re)))}_preserveStack(H,ee,le,de){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=ee,this._parseStack.decodedLength=le,this._parseStack.position=de}_logSlowResolvingAsync(H){this._logService.logLevel<=A.LogLevelEnum.WARN&&Promise.race([H,new Promise((ee,le)=>setTimeout(()=>le("#SLOW_TIMEOUT"),5e3))]).catch(ee=>{if(ee!=="#SLOW_TIMEOUT")throw ee;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(H,ee){let le,de=this._activeBuffer.x,De=this._activeBuffer.y,je=0,tt=this._parseStack.paused;if(tt){if(le=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,ee))return this._logSlowResolvingAsync(le),le;de=this._parseStack.cursorStartX,De=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>oe&&(je=this._parseStack.position+oe)}if(this._logService.logLevel<=A.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof H=="string"?` "${H}"`:` "${Array.prototype.map.call(H,Y=>String.fromCharCode(Y)).join("")}"`),typeof H=="string"?H.split("").map(Y=>Y.charCodeAt(0)):H),this._parseBuffer.lengthoe)for(let Y=je;Y0&&Ze.getWidth(this._activeBuffer.x-1)===2&&Ze.setCellFromCodepoint(this._activeBuffer.x-1,0,1,Re);let ct=this._parser.precedingJoinState;for(let Tt=ee;Ttet){if(ye){let qr=Ze,Hn=this._activeBuffer.x-bo;for(this._activeBuffer.x=bo,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),Ze=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),bo>0&&Ze instanceof x.BufferLine&&Ze.copyCellsFrom(qr,Hn,0,bo,!1);Hn=0;)Ze.setCellFromCodepoint(this._activeBuffer.x++,0,0,Re)}else if(Y&&(Ze.insertCells(this._activeBuffer.x,De-bo,this._activeBuffer.getNullCell(Re)),Ze.getWidth(et-1)===2&&Ze.setCellFromCodepoint(et-1,k.NULL_CELL_CODE,k.NULL_CELL_WIDTH,Re)),Ze.setCellFromCodepoint(this._activeBuffer.x++,de,De,Re),De>0)for(;--De;)Ze.setCellFromCodepoint(this._activeBuffer.x++,0,0,Re)}this._parser.precedingJoinState=ct,this._activeBuffer.x0&&Ze.getWidth(this._activeBuffer.x)===0&&!Ze.hasContent(this._activeBuffer.x)&&Ze.setCellFromCodepoint(this._activeBuffer.x,0,1,Re),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,ee){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,ee):this._parser.registerCsiHandler(H,le=>!W(le.params[0],this._optionsService.rawOptions.windowOptions)||ee(le))}registerDcsHandler(H,ee){return this._parser.registerDcsHandler(H,new I.DcsHandler(ee))}registerEscHandler(H,ee){return this._parser.registerEscHandler(H,ee)}registerOscHandler(H,ee){return this._parser.registerOscHandler(H,new F.OscHandler(ee))}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 H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-H),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(H=this._bufferService.cols-1){this._activeBuffer.x=Math.min(H,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(H,ee){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+ee):(this._activeBuffer.x=H,this._activeBuffer.y=ee),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,ee){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+ee)}cursorUp(H){let ee=this._activeBuffer.y-this._activeBuffer.scrollTop;return ee>=0?this._moveCursor(0,-Math.min(ee,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){let ee=this._activeBuffer.scrollBottom-this._activeBuffer.y;return ee>=0?this._moveCursor(0,Math.min(ee,H.params[0]||1)):this._moveCursor(0,H.params[0]||1),!0}cursorForward(H){return this._moveCursor(H.params[0]||1,0),!0}cursorBackward(H){return this._moveCursor(-(H.params[0]||1),0),!0}cursorNextLine(H){return this.cursorDown(H),this._activeBuffer.x=0,!0}cursorPrecedingLine(H){return this.cursorUp(H),this._activeBuffer.x=0,!0}cursorCharAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(H){return this._setCursor(H.length>=2?(H.params[1]||1)-1:0,(H.params[0]||1)-1),!0}charPosAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(H){return this._moveCursor(H.params[0]||1,0),!0}linePosAbsolute(H){return this._setCursor(this._activeBuffer.x,(H.params[0]||1)-1),!0}vPositionRelative(H){return this._moveCursor(0,H.params[0]||1),!0}hVPosition(H){return this.cursorPosition(H),!0}tabClear(H){let ee=H.params[0];return ee===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:ee===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let ee=H.params[0]||1;for(;ee--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let ee=H.params[0]||1;for(;ee--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){let ee=H.params[0];return ee===1&&(this._curAttrData.bg|=536870912),ee!==2&&ee!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,ee,le,de=!1,De=!1){let je=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);je.replaceCells(ee,le,this._activeBuffer.getNullCell(this._eraseAttrData()),De),de&&(je.isWrapped=!1)}_resetBufferLine(H,ee=!1){let le=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);le&&(le.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),ee),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),le.isWrapped=!1)}eraseInDisplay(H,ee=!1){let le;switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:for(le=this._activeBuffer.y,this._dirtyRowTracker.markDirty(le),this._eraseInBufferLine(le++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,ee);le=this._bufferService.cols&&(this._activeBuffer.lines.get(le+1).isWrapped=!1);le--;)this._resetBufferLine(le,ee);this._dirtyRowTracker.markDirty(0);break;case 2:for(le=this._bufferService.rows,this._dirtyRowTracker.markDirty(le-1);le--;)this._resetBufferLine(le,ee);this._dirtyRowTracker.markDirty(0);break;case 3:let de=this._activeBuffer.lines.length-this._bufferService.rows;de>0&&(this._activeBuffer.lines.trimStart(de),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-de,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-de,0),this._onScroll.fire(0))}return!0}eraseInLine(H,ee=!1){switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,ee);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,ee);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,ee)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(H){this._restrictCursor();let ee=H.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 ye=et;for(let Y=1;Y0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(H){return H.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(H.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(H){return(this._optionsService.rawOptions.termName+"").indexOf(H)===0}setMode(H){for(let ee=0;eeLo?1:2,ct=H.params[0];return Tt=ct,ri=ee?ct===2?4:ct===4?Ze(je.modes.insertMode):ct===12?3:ct===20?Ze(Re.convertEol):0:ct===1?Ze(le.applicationCursorKeys):ct===3?Re.windowOptions.setWinLines?et===80?2:et===132?1:0:0:ct===6?Ze(le.origin):ct===7?Ze(le.wraparound):ct===8?3:ct===9?Ze(de==="X10"):ct===12?Ze(Re.cursorBlink):ct===25?Ze(!je.isCursorHidden):ct===45?Ze(le.reverseWraparound):ct===66?Ze(le.applicationKeypad):ct===67?4:ct===1e3?Ze(de==="VT200"):ct===1002?Ze(de==="DRAG"):ct===1003?Ze(de==="ANY"):ct===1004?Ze(le.sendFocus):ct===1005?4:ct===1006?Ze(De==="SGR"):ct===1015?4:ct===1016?Ze(De==="SGR_PIXELS"):ct===1048?1:ct===47||ct===1047||ct===1049?Ze(ye===Y):ct===2004?Ze(le.bracketedPasteMode):0,je.triggerDataEvent(`${u.C0.ESC}[${ee?"":"?"}${Tt};${ri}$y`),!0;var Tt,ri}_updateAttrColor(H,ee,le,de,De){return ee===2?(H|=50331648,H&=-16777216,H|=T.AttributeData.fromColorRGB([le,de,De])):ee===5&&(H&=-50331904,H|=33554432|255&le),H}_extractColor(H,ee,le){let de=[0,0,-1,0,0,0],De=0,je=0;do{if(de[je+De]=H.params[ee+je],H.hasSubParams(ee+je)){let tt=H.getSubParams(ee+je),et=0;do de[1]===5&&(De=1),de[je+et+1+De]=tt[et];while(++et=2||de[1]===2&&je+De>=5)break;de[1]&&(De=1)}while(++je+ee5)&&(H=1),ee.extended.underlineStyle=H,ee.fg|=268435456,H===0&&(ee.fg&=-268435457),ee.updateExtended()}_processSGR0(H){H.fg=x.DEFAULT_ATTR_DATA.fg,H.bg=x.DEFAULT_ATTR_DATA.bg,H.extended=H.extended.clone(),H.extended.underlineStyle=0,H.extended.underlineColor&=-67108864,H.updateExtended()}charAttributes(H){if(H.length===1&&H.params[0]===0)return this._processSGR0(this._curAttrData),!0;let ee=H.length,le,de=this._curAttrData;for(let De=0;De=30&&le<=37?(de.fg&=-50331904,de.fg|=16777216|le-30):le>=40&&le<=47?(de.bg&=-50331904,de.bg|=16777216|le-40):le>=90&&le<=97?(de.fg&=-50331904,de.fg|=16777224|le-90):le>=100&&le<=107?(de.bg&=-50331904,de.bg|=16777224|le-100):le===0?this._processSGR0(de):le===1?de.fg|=134217728:le===3?de.bg|=67108864:le===4?(de.fg|=268435456,this._processUnderline(H.hasSubParams(De)?H.getSubParams(De)[0]:1,de)):le===5?de.fg|=536870912:le===7?de.fg|=67108864:le===8?de.fg|=1073741824:le===9?de.fg|=2147483648:le===2?de.bg|=134217728:le===21?this._processUnderline(2,de):le===22?(de.fg&=-134217729,de.bg&=-134217729):le===23?de.bg&=-67108865:le===24?(de.fg&=-268435457,this._processUnderline(0,de)):le===25?de.fg&=-536870913:le===27?de.fg&=-67108865:le===28?de.fg&=-1073741825:le===29?de.fg&=2147483647:le===39?(de.fg&=-67108864,de.fg|=16777215&x.DEFAULT_ATTR_DATA.fg):le===49?(de.bg&=-67108864,de.bg|=16777215&x.DEFAULT_ATTR_DATA.bg):le===38||le===48||le===58?De+=this._extractColor(H,De,de):le===53?de.bg|=1073741824:le===55?de.bg&=-1073741825:le===59?(de.extended=de.extended.clone(),de.extended.underlineColor=-1,de.updateExtended()):le===100?(de.fg&=-67108864,de.fg|=16777215&x.DEFAULT_ATTR_DATA.fg,de.bg&=-67108864,de.bg|=16777215&x.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",le);return!0}deviceStatus(H){switch(H.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:let ee=this._activeBuffer.y+1,le=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${ee};${le}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){let ee=this._activeBuffer.y+1,le=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${ee};${le}R`)}return!0}softReset(H){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=x.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(H){let ee=H.params[0]||1;switch(ee){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 le=ee%2==1;return this._optionsService.options.cursorBlink=le,!0}setScrollRegion(H){let ee=H.params[0]||1,le;return(H.length<2||(le=H.params[1])>this._bufferService.rows||le===0)&&(le=this._bufferService.rows),le>ee&&(this._activeBuffer.scrollTop=ee-1,this._activeBuffer.scrollBottom=le-1,this._setCursor(0,0)),!0}windowOptions(H){if(!W(H.params[0],this._optionsService.rawOptions.windowOptions))return!0;let ee=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:ee!==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(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:ee!==0&&ee!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),ee!==0&&ee!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:ee!==0&&ee!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),ee!==0&&ee!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(H){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(H){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(H){return this._windowTitle=H,this._onTitleChange.fire(H),!0}setIconName(H){return this._iconName=H,!0}setOrReportIndexedColor(H){let ee=[],le=H.split(";");for(;le.length>1;){let de=le.shift(),De=le.shift();if(/^\d+$/.exec(de)){let je=parseInt(de);if(Ie(je))if(De==="?")ee.push({type:0,index:je});else{let tt=(0,V.parseColor)(De);tt&&ee.push({type:1,index:je,color:tt})}}}return ee.length&&this._onColor.fire(ee),!0}setHyperlink(H){let ee=H.split(";");return!(ee.length<2)&&(ee[1]?this._createHyperlink(ee[0],ee[1]):!ee[0]&&this._finishHyperlink())}_createHyperlink(H,ee){this._getCurrentLinkId()&&this._finishHyperlink();let le=H.split(":"),de,De=le.findIndex(je=>je.startsWith("id="));return De!==-1&&(de=le[De].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:de,uri:ee}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(H,ee){let le=H.split(";");for(let de=0;de=this._specialColors.length);++de,++ee)if(le[de]==="?")this._onColor.fire([{type:0,index:this._specialColors[ee]}]);else{let De=(0,V.parseColor)(le[de]);De&&this._onColor.fire([{type:1,index:this._specialColors[ee],color:De}])}return!0}setOrReportFgColor(H){return this._setOrReportSpecialColor(H,0)}setOrReportBgColor(H){return this._setOrReportSpecialColor(H,1)}setOrReportCursorColor(H){return this._setOrReportSpecialColor(H,2)}restoreIndexedColor(H){if(!H)return this._onColor.fire([{type:2}]),!0;let ee=[],le=H.split(";");for(let de=0;de=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 H=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,H,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=x.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=x.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(H){return this._charsetService.setgLevel(H),!0}screenAlignmentPattern(){let H=new S.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let ee=0;ee(this._coreService.triggerDataEvent(`${u.C0.ESC}${De}${u.C0.ESC}\\`),!0))(H==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:H==='"p'?'P1$r61;1"p':H==="r"?`P1$r${le.scrollTop+1};${le.scrollBottom+1}r`:H==="m"?"P1$r0m":H===" q"?`P1$r${{block:2,underline:4,bar:6}[de.cursorStyle]-(de.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,ee){this._dirtyRowTracker.markRangeDirty(H,ee)}}r.InputHandler=we;let me=class{constructor(ue){this._bufferService=ue,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ue){uethis.end&&(this.end=ue)}markRangeDirty(ue,H){ue>H&&(Ce=ue,ue=H,H=Ce),uethis.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Ie(ue){return 0<=ue&&ue<256}me=d([m(0,A.IBufferService)],me)},844:(i,r)=>{function s(d){for(let m of d)m.dispose();d.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 d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){let m=this._disposables.indexOf(d);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(d){this._isDisposed||d===this._value||(this._value?.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},r.toDisposable=function(d){return{dispose:d}},r.disposeArray=s,r.getDisposeArrayDisposable=function(d){return{dispose:()=>s(d)}}},1505:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class s{constructor(){this._data={}}set(m,u,h){this._data[m]||(this._data[m]={}),this._data[m][u]=h}get(m,u){return this._data[m]?this._data[m][u]:void 0}clear(){this._data={}}}r.TwoKeyMap=s,r.FourKeyMap=class{constructor(){this._data=new s}set(d,m,u,h,v){this._data.get(d,m)||this._data.set(d,m,new s),this._data.get(d,m).set(u,h,v)}get(d,m,u,h){return this._data.get(d,m)?.get(u,h)}clear(){this._data.clear()}}},6114:(i,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 s=r.isNode?"node":navigator.userAgent,d=r.isNode?"node":navigator.platform;r.isFirefox=s.includes("Firefox"),r.isLegacyEdge=s.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(s),r.getSafariVersion=function(){if(!r.isSafari)return 0;let m=s.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),r.isIpad=d==="iPad",r.isIphone=d==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),r.isLinux=d.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(s)},6106:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let s=0;r.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(s=this._search(this._getKey(d)),this._array.splice(s,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;let m=this._getKey(d);if(m===void 0||(s=this._search(m),s===-1)||this._getKey(this._array[s])!==m)return!1;do if(this._array[s]===d)return this._array.splice(s,1),!0;while(++s=this._array.length)&&this._getKey(this._array[s])===d))do yield this._array[s];while(++s=this._array.length)&&this._getKey(this._array[s])===d))do m(this._array[s]);while(++s=m;){let h=m+u>>1,v=this._getKey(this._array[h]);if(v>d)u=h-1;else{if(!(v0&&this._getKey(this._array[h-1])===d;)h--;return h}m=h+1}}return m}}},7226:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;let d=s(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(v){this._tasks.push(v),this._start()}flush(){for(;this._iP)return x-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(x-b))}ms`),void this._start();x=P}this.clear()}}class u extends m{_requestCallback(v){return setTimeout(()=>v(this._createDeadline(16)))}_cancelCallback(v){clearTimeout(v)}_createDeadline(v){let b=Date.now()+v;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}r.PriorityTaskQueue=u,r.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(h){return requestIdleCallback(h)}_cancelCallback(h){cancelIdleCallback(h)}}:u,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(h){this._queue.clear(),this._queue.enqueue(h)}flush(){this._queue.flush()}}},9282:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;let d=s(643);r.updateWindowsModeWrappedState=function(m){let u=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),h=u?.get(m.cols-1),v=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);v&&h&&(v.isWrapped=h[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&h[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class s{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){let u=new s;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}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=s;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){let u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,h=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=h}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=d},9092:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;let d=s(6349),m=s(7226),u=s(3734),h=s(8437),v=s(4634),b=s(511),y=s(643),x=s(4863),P=s(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(k,S,T){this._hasScrollback=k,this._optionsService=S,this._bufferService=T,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=P.DEFAULT_CHARSET,this.markers=[],this._nullCell=b.CellData.fromCharData([0,y.NULL_CELL_CHAR,y.NULL_CELL_WIDTH,y.NULL_CELL_CODE]),this._whitespaceCell=b.CellData.fromCharData([0,y.WHITESPACE_CELL_CHAR,y.WHITESPACE_CELL_WIDTH,y.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 d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(k){return k?(this._nullCell.fg=k.fg,this._nullCell.bg=k.bg,this._nullCell.extended=k.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(k){return k?(this._whitespaceCell.fg=k.fg,this._whitespaceCell.bg=k.bg,this._whitespaceCell.extended=k.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(k,S){return new h.BufferLine(this._bufferService.cols,this.getNullCell(k),S)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let k=this.ybase+this.y-this.ydisp;return k>=0&&kr.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:S}fillViewportRows(k){if(this.lines.length===0){k===void 0&&(k=h.DEFAULT_ATTR_DATA);let S=this._rows;for(;S--;)this.lines.push(this.getBlankLine(k))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(k,S){let T=this.getNullCell(h.DEFAULT_ATTR_DATA),A=0,D=this._getCorrectBufferLength(S);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+F+1?(this.ybase--,F++,this.ydisp>0&&this.ydisp--):this.lines.push(new h.BufferLine(k,T)));else for(let I=this._rows;I>S;I--)this.lines.length>S+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D0&&(this.lines.trimStart(I),this.ybase=Math.max(this.ybase-I,0),this.ydisp=Math.max(this.ydisp-I,0),this.savedY=Math.max(this.savedY-I,0)),this.lines.maxLength=D}this.x=Math.min(this.x,k-1),this.y=Math.min(this.y,S-1),F&&(this.y+=F),this.savedX=Math.min(this.savedX,k-1),this.scrollTop=0}if(this.scrollBottom=S-1,this._isReflowEnabled&&(this._reflow(k,S),this._cols>k))for(let F=0;F.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let k=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,k=!1);let S=0;for(;this._memoryCleanupPosition100)return!0;return k}get _isReflowEnabled(){let k=this._optionsService.rawOptions.windowsPty;return k&&k.buildNumber?this._hasScrollback&&k.backend==="conpty"&&k.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(k,S){this._cols!==k&&(k>this._cols?this._reflowLarger(k,S):this._reflowSmaller(k,S))}_reflowLarger(k,S){let T=(0,v.reflowLargerGetLinesToRemove)(this.lines,this._cols,k,this.ybase+this.y,this.getNullCell(h.DEFAULT_ATTR_DATA));if(T.length>0){let A=(0,v.reflowLargerCreateNewLayout)(this.lines,T);(0,v.reflowLargerApplyNewLayout)(this.lines,A.layout),this._reflowLargerAdjustViewport(k,S,A.countRemoved)}}_reflowLargerAdjustViewport(k,S,T){let A=this.getNullCell(h.DEFAULT_ATTR_DATA),D=T;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;F--){let I=this.lines.get(F);if(!I||!I.isWrapped&&I.getTrimmedLength()<=k)continue;let V=[I];for(;I.isWrapped&&F>0;)I=this.lines.get(--F),V.unshift(I);let ae=this.ybase+this.y;if(ae>=F&&ae0&&(A.push({start:F+V.length+D,newLines:we}),D+=we.length),V.push(...we);let me=W.length-1,Ie=W[me];Ie===0&&(me--,Ie=W[me]);let ue=V.length-G-1,H=oe;for(;ue>=0;){let le=Math.min(H,Ie);if(V[me]===void 0)break;if(V[me].copyCellsFrom(V[ue],H-le,Ie-le,le,!0),Ie-=le,Ie===0&&(me--,Ie=W[me]),H-=le,H===0){ue--;let de=Math.max(ue,0);H=(0,v.getWrappedLineTrimmedLength)(V,de,this._cols)}}for(let le=0;le0;)this.ybase===0?this.y0){let F=[],I=[];for(let me=0;me=0;me--)if(W&&W.start>ae+G){for(let Ie=W.newLines.length-1;Ie>=0;Ie--)this.lines.set(me--,W.newLines[Ie]);me++,F.push({index:ae+1,amount:W.newLines.length}),G+=W.newLines.length,W=A[++oe]}else this.lines.set(me,I[ae--]);let Ce=0;for(let me=F.length-1;me>=0;me--)F[me].index+=Ce,this.lines.onInsertEmitter.fire(F[me]),Ce+=F[me].amount;let we=Math.max(0,V+D-this.lines.maxLength);we>0&&this.lines.onTrimEmitter.fire(we)}}translateBufferLineToString(k,S,T=0,A){let D=this.lines.get(k);return D?D.translateToString(S,T,A):""}getWrappedRangeForLine(k){let S=k,T=k;for(;S>0&&this.lines.get(S).isWrapped;)S--;for(;T+10;);return k>=this._cols?this._cols-1:k<0?0:k}nextStop(k){for(k==null&&(k=this.x);!this.tabs[++k]&&k=this._cols?this._cols-1:k<0?0:k}clearMarkers(k){this._isClearing=!0;for(let S=0;S{S.line-=T,S.line<0&&S.dispose()})),S.register(this.lines.onInsert(T=>{S.line>=T.index&&(S.line+=T.amount)})),S.register(this.lines.onDelete(T=>{S.line>=T.index&&S.lineT.index&&(S.line-=T.amount)})),S.register(S.onDispose(()=>this._removeMarker(S))),S}_removeMarker(k){this._isClearing||this.markers.splice(this.markers.indexOf(k),1)}}},8437:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;let d=s(3734),m=s(511),u=s(643),h=s(482);r.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let v=0;class b{constructor(x,P,k=!1){this.isWrapped=k,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*x);let S=P||m.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let T=0;T>22,2097152&P?this._combined[x].charCodeAt(this._combined[x].length-1):k]}set(x,P){this._data[3*x+1]=P[u.CHAR_DATA_ATTR_INDEX],P[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[x]=P[1],this._data[3*x+0]=2097152|x|P[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*x+0]=P[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|P[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(x){return this._data[3*x+0]>>22}hasWidth(x){return 12582912&this._data[3*x+0]}getFg(x){return this._data[3*x+1]}getBg(x){return this._data[3*x+2]}hasContent(x){return 4194303&this._data[3*x+0]}getCodePoint(x){let P=this._data[3*x+0];return 2097152&P?this._combined[x].charCodeAt(this._combined[x].length-1):2097151&P}isCombined(x){return 2097152&this._data[3*x+0]}getString(x){let P=this._data[3*x+0];return 2097152&P?this._combined[x]:2097151&P?(0,h.stringFromCodePoint)(2097151&P):""}isProtected(x){return 536870912&this._data[3*x+2]}loadCell(x,P){return v=3*x,P.content=this._data[v+0],P.fg=this._data[v+1],P.bg=this._data[v+2],2097152&P.content&&(P.combinedData=this._combined[x]),268435456&P.bg&&(P.extended=this._extendedAttrs[x]),P}setCell(x,P){2097152&P.content&&(this._combined[x]=P.combinedData),268435456&P.bg&&(this._extendedAttrs[x]=P.extended),this._data[3*x+0]=P.content,this._data[3*x+1]=P.fg,this._data[3*x+2]=P.bg}setCellFromCodepoint(x,P,k,S){268435456&S.bg&&(this._extendedAttrs[x]=S.extended),this._data[3*x+0]=P|k<<22,this._data[3*x+1]=S.fg,this._data[3*x+2]=S.bg}addCodepointToCell(x,P,k){let S=this._data[3*x+0];2097152&S?this._combined[x]+=(0,h.stringFromCodePoint)(P):2097151&S?(this._combined[x]=(0,h.stringFromCodePoint)(2097151&S)+(0,h.stringFromCodePoint)(P),S&=-2097152,S|=2097152):S=P|4194304,k&&(S&=-12582913,S|=k<<22),this._data[3*x+0]=S}insertCells(x,P,k){if((x%=this.length)&&this.getWidth(x-1)===2&&this.setCellFromCodepoint(x-1,0,1,k),P=0;--T)this.setCell(x+P+T,this.loadCell(x+T,S));for(let T=0;Tthis.length){if(this._data.buffer.byteLength>=4*k)this._data=new Uint32Array(this._data.buffer,0,k);else{let S=new Uint32Array(k);S.set(this._data),this._data=S}for(let S=this.length;S=x&&delete this._combined[D]}let T=Object.keys(this._extendedAttrs);for(let A=0;A=x&&delete this._extendedAttrs[D]}}return this.length=x,4*k*2=0;--x)if(4194303&this._data[3*x+0])return x+(this._data[3*x+0]>>22);return 0}getNoBgTrimmedLength(){for(let x=this.length-1;x>=0;--x)if(4194303&this._data[3*x+0]||50331648&this._data[3*x+2])return x+(this._data[3*x+0]>>22);return 0}copyCellsFrom(x,P,k,S,T){let A=x._data;if(T)for(let F=S-1;F>=0;F--){for(let I=0;I<3;I++)this._data[3*(k+F)+I]=A[3*(P+F)+I];268435456&A[3*(P+F)+2]&&(this._extendedAttrs[k+F]=x._extendedAttrs[P+F])}else for(let F=0;F=P&&(this._combined[I-P+k]=x._combined[I])}}translateToString(x,P,k,S){P=P??0,k=k??this.length,x&&(k=Math.min(k,this.getTrimmedLength())),S&&(S.length=0);let T="";for(;P>22||1}return S&&S.push(P),T}}r.BufferLine=b},4841:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(s,d){if(s.start.y>s.end.y)throw new Error(`Buffer range end (${s.end.x}, ${s.end.y}) cannot be before start (${s.start.x}, ${s.start.y})`);return d*(s.end.y-s.start.y)+(s.end.x-s.start.x+1)}},4634:(i,r)=>{function s(d,m,u){if(m===d.length-1)return d[m].getTrimmedLength();let h=!d[m].hasContent(u-1)&&d[m].getWidth(u-1)===1,v=d[m+1].getWidth(0)===2;return h&&v?u-1:u}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(d,m,u,h,v){let b=[];for(let y=0;y=y&&h0&&(I>S||k[I].getTrimmedLength()===0);I--)F++;F>0&&(b.push(y+k.length-F),b.push(F)),y+=k.length-1}return b},r.reflowLargerCreateNewLayout=function(d,m){let u=[],h=0,v=m[h],b=0;for(let y=0;ys(d,k,m)).reduce((P,k)=>P+k),b=0,y=0,x=0;for(;xP&&(b-=P,y++);let k=d[y].getWidth(b-1)===2;k&&b--;let S=k?u-1:u;h.push(S),x+=S}return h},r.getWrappedLineTrimmedLength=s},5295:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;let d=s(8460),m=s(844),u=s(9092);class h extends m.Disposable{constructor(b,y){super(),this._optionsService=b,this._bufferService=y,this._onBufferActivate=this.register(new d.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 u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.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(b){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(b),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(b,y){this._normal.resize(b,y),this._alt.resize(b,y),this.setupTabStops(b)}setupTabStops(b){this._normal.setupTabStops(b),this._alt.setupTabStops(b)}}r.BufferSet=h},511:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;let d=s(482),m=s(643),u=s(3734);class h extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(b){let y=new h;return y.setFromCharData(b),y}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(b){this.fg=b[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let y=!1;if(b[m.CHAR_DATA_CHAR_INDEX].length>2)y=!0;else if(b[m.CHAR_DATA_CHAR_INDEX].length===2){let x=b[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=x&&x<=56319){let P=b[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=P&&P<=57343?this.content=1024*(x-55296)+P-56320+65536|b[m.CHAR_DATA_WIDTH_INDEX]<<22:y=!0}else y=!0}else this.content=b[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[m.CHAR_DATA_WIDTH_INDEX]<<22;y&&(this.combinedData=b[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=h},643:(i,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:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;let d=s(8460),m=s(844);class u{get id(){return this._id}constructor(v){this.line=v,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new d.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(v){return this._disposables.push(v),v}}r.Marker=u,u._nextId=1},7116:(i,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:(i,r)=>{var s,d,m;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=` `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL="\x7F"})(s||(r.C0=s={})),(function(u){u.PAD="\x80",u.HOP="\x81",u.BPH="\x82",u.NBH="\x83",u.IND="\x84",u.NEL="\x85",u.SSA="\x86",u.ESA="\x87",u.HTS="\x88",u.HTJ="\x89",u.VTS="\x8A",u.PLD="\x8B",u.PLU="\x8C",u.RI="\x8D",u.SS2="\x8E",u.SS3="\x8F",u.DCS="\x90",u.PU1="\x91",u.PU2="\x92",u.STS="\x93",u.CCH="\x94",u.MW="\x95",u.SPA="\x96",u.EPA="\x97",u.SOS="\x98",u.SGCI="\x99",u.SCI="\x9A",u.CSI="\x9B",u.ST="\x9C",u.OSC="\x9D",u.PM="\x9E",u.APC="\x9F"})(d||(r.C1=d={})),(function(u){u.ST=`${s.ESC}\\`})(m||(r.C1_ESCAPED=m={}))},7399:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;let d=s(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(u,h,v,b){let y={type:0,cancel:!1,key:void 0},x=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?y.key=h?d.C0.ESC+"OA":d.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?y.key=h?d.C0.ESC+"OD":d.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?y.key=h?d.C0.ESC+"OC":d.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(y.key=h?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:y.key=u.ctrlKey?"\b":d.C0.DEL,u.altKey&&(y.key=d.C0.ESC+y.key);break;case 9:if(u.shiftKey){y.key=d.C0.ESC+"[Z";break}y.key=d.C0.HT,y.cancel=!0;break;case 13:y.key=u.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,y.cancel=!0;break;case 27:y.key=d.C0.ESC,u.altKey&&(y.key=d.C0.ESC+d.C0.ESC),y.cancel=!0;break;case 37:if(u.metaKey)break;x?(y.key=d.C0.ESC+"[1;"+(x+1)+"D",y.key===d.C0.ESC+"[1;3D"&&(y.key=d.C0.ESC+(v?"b":"[1;5D"))):y.key=h?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(u.metaKey)break;x?(y.key=d.C0.ESC+"[1;"+(x+1)+"C",y.key===d.C0.ESC+"[1;3C"&&(y.key=d.C0.ESC+(v?"f":"[1;5C"))):y.key=h?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(u.metaKey)break;x?(y.key=d.C0.ESC+"[1;"+(x+1)+"A",v||y.key!==d.C0.ESC+"[1;3A"||(y.key=d.C0.ESC+"[1;5A")):y.key=h?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(u.metaKey)break;x?(y.key=d.C0.ESC+"[1;"+(x+1)+"B",v||y.key!==d.C0.ESC+"[1;3B"||(y.key=d.C0.ESC+"[1;5B")):y.key=h?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(y.key=d.C0.ESC+"[2~");break;case 46:y.key=x?d.C0.ESC+"[3;"+(x+1)+"~":d.C0.ESC+"[3~";break;case 36:y.key=x?d.C0.ESC+"[1;"+(x+1)+"H":h?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:y.key=x?d.C0.ESC+"[1;"+(x+1)+"F":h?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:u.shiftKey?y.type=2:u.ctrlKey?y.key=d.C0.ESC+"[5;"+(x+1)+"~":y.key=d.C0.ESC+"[5~";break;case 34:u.shiftKey?y.type=3:u.ctrlKey?y.key=d.C0.ESC+"[6;"+(x+1)+"~":y.key=d.C0.ESC+"[6~";break;case 112:y.key=x?d.C0.ESC+"[1;"+(x+1)+"P":d.C0.ESC+"OP";break;case 113:y.key=x?d.C0.ESC+"[1;"+(x+1)+"Q":d.C0.ESC+"OQ";break;case 114:y.key=x?d.C0.ESC+"[1;"+(x+1)+"R":d.C0.ESC+"OR";break;case 115:y.key=x?d.C0.ESC+"[1;"+(x+1)+"S":d.C0.ESC+"OS";break;case 116:y.key=x?d.C0.ESC+"[15;"+(x+1)+"~":d.C0.ESC+"[15~";break;case 117:y.key=x?d.C0.ESC+"[17;"+(x+1)+"~":d.C0.ESC+"[17~";break;case 118:y.key=x?d.C0.ESC+"[18;"+(x+1)+"~":d.C0.ESC+"[18~";break;case 119:y.key=x?d.C0.ESC+"[19;"+(x+1)+"~":d.C0.ESC+"[19~";break;case 120:y.key=x?d.C0.ESC+"[20;"+(x+1)+"~":d.C0.ESC+"[20~";break;case 121:y.key=x?d.C0.ESC+"[21;"+(x+1)+"~":d.C0.ESC+"[21~";break;case 122:y.key=x?d.C0.ESC+"[23;"+(x+1)+"~":d.C0.ESC+"[23~";break;case 123:y.key=x?d.C0.ESC+"[24;"+(x+1)+"~":d.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(v&&!b||!u.altKey||u.metaKey)!v||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?y.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(y.key=d.C0.US),u.key==="@"&&(y.key=d.C0.NUL)):u.keyCode===65&&(y.type=1);else{let P=m[u.keyCode],k=P?.[u.shiftKey?1:0];if(k)y.key=d.C0.ESC+k;else if(u.keyCode>=65&&u.keyCode<=90){let S=u.ctrlKey?u.keyCode-64:u.keyCode+32,T=String.fromCharCode(S);u.shiftKey&&(T=T.toUpperCase()),y.key=d.C0.ESC+T}else if(u.keyCode===32)y.key=d.C0.ESC+(u.ctrlKey?d.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let S=u.code.slice(3,4);u.shiftKey||(S=S.toLowerCase()),y.key=d.C0.ESC+S,y.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?y.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?y.key=d.C0.NUL:u.keyCode>=51&&u.keyCode<=55?y.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?y.key=d.C0.DEL:u.keyCode===219?y.key=d.C0.ESC:u.keyCode===220?y.key=d.C0.FS:u.keyCode===221&&(y.key=d.C0.GS)}return y}},482:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(s){return s>65535?(s-=65536,String.fromCharCode(55296+(s>>10))+String.fromCharCode(s%1024+56320)):String.fromCharCode(s)},r.utf32ToString=function(s,d=0,m=s.length){let u="";for(let h=d;h65535?(v-=65536,u+=String.fromCharCode(55296+(v>>10))+String.fromCharCode(v%1024+56320)):u+=String.fromCharCode(v)}return u},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(s,d){let m=s.length;if(!m)return 0;let u=0,h=0;if(this._interim){let v=s.charCodeAt(h++);56320<=v&&v<=57343?d[u++]=1024*(this._interim-55296)+v-56320+65536:(d[u++]=this._interim,d[u++]=v),this._interim=0}for(let v=h;v=m)return this._interim=b,u;let y=s.charCodeAt(v);56320<=y&&y<=57343?d[u++]=1024*(b-55296)+y-56320+65536:(d[u++]=b,d[u++]=y)}else b!==65279&&(d[u++]=b)}return u}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(s,d){let m=s.length;if(!m)return 0;let u,h,v,b,y=0,x=0,P=0;if(this.interim[0]){let T=!1,A=this.interim[0];A&=(224&A)==192?31:(240&A)==224?15:7;let D,F=0;for(;(D=63&this.interim[++F])&&F<4;)A<<=6,A|=D;let I=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,V=I-F;for(;P=m)return 0;if(D=s[P++],(192&D)!=128){P--,T=!0;break}this.interim[F++]=D,A<<=6,A|=63&D}T||(I===2?A<128?P--:d[y++]=A:I===3?A<2048||A>=55296&&A<=57343||A===65279||(d[y++]=A):A<65536||A>1114111||(d[y++]=A)),this.interim.fill(0)}let k=m-4,S=P;for(;S=m)return this.interim[0]=u,y;if(h=s[S++],(192&h)!=128){S--;continue}if(x=(31&u)<<6|63&h,x<128){S--;continue}d[y++]=x}else if((240&u)==224){if(S>=m)return this.interim[0]=u,y;if(h=s[S++],(192&h)!=128){S--;continue}if(S>=m)return this.interim[0]=u,this.interim[1]=h,y;if(v=s[S++],(192&v)!=128){S--;continue}if(x=(15&u)<<12|(63&h)<<6|63&v,x<2048||x>=55296&&x<=57343||x===65279)continue;d[y++]=x}else if((248&u)==240){if(S>=m)return this.interim[0]=u,y;if(h=s[S++],(192&h)!=128){S--;continue}if(S>=m)return this.interim[0]=u,this.interim[1]=h,y;if(v=s[S++],(192&v)!=128){S--;continue}if(S>=m)return this.interim[0]=u,this.interim[1]=h,this.interim[2]=v,y;if(b=s[S++],(192&b)!=128){S--;continue}if(x=(7&u)<<18|(63&h)<<12|(63&v)<<6|63&b,x<65536||x>1114111)continue;d[y++]=x}}return y}}},225:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;let d=s(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]],u=[[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 v=0;vy[k][1])return!1;for(;k>=P;)if(x=P+k>>1,b>y[x][1])P=x+1;else{if(!(b=131072&&v<=196605||v>=196608&&v<=262141?2:1}charProperties(v,b){let y=this.wcwidth(v),x=y===0&&b!==0;if(x){let P=d.UnicodeService.extractWidth(b);P===0?x=!1:P>y&&(y=P)}return d.UnicodeService.createPropertyValue(0,y,x)}}},5981:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;let d=s(8460),m=s(844);class u extends m.Disposable{constructor(v){super(),this._action=v,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(v,b){if(b!==void 0&&this._syncCalls>b)return void(this._syncCalls=0);if(this._pendingData+=v.length,this._writeBuffer.push(v),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let y;for(this._isSyncWriting=!0;y=this._writeBuffer.shift();){this._action(y);let x=this._callbacks.shift();x&&x()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(v,b){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+=v.length,this._writeBuffer.push(v),this._callbacks.push(b),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=v.length,this._writeBuffer.push(v),this._callbacks.push(b)}_innerWrite(v=0,b=!0){let y=v||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){let x=this._writeBuffer[this._bufferOffset],P=this._action(x,b);if(P){let S=T=>Date.now()-y>=12?setTimeout(()=>this._innerWrite(0,T)):this._innerWrite(y,T);return void P.catch(T=>(queueMicrotask(()=>{throw T}),Promise.resolve(!1))).then(S)}let k=this._callbacks[this._bufferOffset];if(k&&k(),this._bufferOffset++,this._pendingData-=x.length,Date.now()-y>=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=u},5941:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;let s=/^([\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})$/,d=/^[\da-f]+$/;function m(u,h){let v=u.toString(16),b=v.length<2?"0"+v:v;switch(h){case 4:return v[0];case 8:return b;case 12:return(b+b).slice(0,3);default:return b+b}}r.parseColor=function(u){if(!u)return;let h=u.toLowerCase();if(h.indexOf("rgb:")===0){h=h.slice(4);let v=s.exec(h);if(v){let b=v[1]?15:v[4]?255:v[7]?4095:65535;return[Math.round(parseInt(v[1]||v[4]||v[7]||v[10],16)/b*255),Math.round(parseInt(v[2]||v[5]||v[8]||v[11],16)/b*255),Math.round(parseInt(v[3]||v[6]||v[9]||v[12],16)/b*255)]}}else if(h.indexOf("#")===0&&(h=h.slice(1),d.exec(h)&&[3,6,9,12].includes(h.length))){let v=h.length/3,b=[0,0,0];for(let y=0;y<3;++y){let x=parseInt(h.slice(v*y,v*y+v),16);b[y]=v===1?x<<4:v===2?x:v===3?x>>4:x>>8}return b}},r.toRgbString=function(u,h=16){let[v,b,y]=u;return`rgb:${m(v,h)}/${m(b,h)}/${m(y,h)}`}},5770:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;let d=s(482),m=s(8742),u=s(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(b,y){this._handlers[b]===void 0&&(this._handlers[b]=[]);let x=this._handlers[b];return x.push(y),{dispose:()=>{let P=x.indexOf(y);P!==-1&&x.splice(P,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}reset(){if(this._active.length)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].unhook(!1);this._stack.paused=!1,this._active=h,this._ident=0}hook(b,y){if(this.reset(),this._ident=b,this._active=this._handlers[b]||h,this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].hook(y);else this._handlerFb(this._ident,"HOOK",y)}put(b,y,x){if(this._active.length)for(let P=this._active.length-1;P>=0;P--)this._active[P].put(b,y,x);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(b,y,x))}unhook(b,y=!0){if(this._active.length){let x=!1,P=this._active.length-1,k=!1;if(this._stack.paused&&(P=this._stack.loopPosition-1,x=y,k=this._stack.fallThrough,this._stack.paused=!1),!k&&x===!1){for(;P>=0&&(x=this._active[P].unhook(b),x!==!0);P--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=P,this._stack.fallThrough=!1,x;P--}for(;P>=0;P--)if(x=this._active[P].unhook(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=P,this._stack.fallThrough=!0,x}else this._handlerFb(this._ident,"UNHOOK",b);this._active=h,this._ident=0}};let v=new m.Params;v.addParam(0),r.DcsHandler=class{constructor(b){this._handler=b,this._data="",this._params=v,this._hitLimit=!1}hook(b){this._params=b.length>1||b.params[0]?b.clone():v,this._data="",this._hitLimit=!1}put(b,y,x){this._hitLimit||(this._data+=(0,d.utf32ToString)(b,y,x),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(b){let y=!1;if(this._hitLimit)y=!1;else if(b&&(y=this._handler(this._data,this._params),y instanceof Promise))return y.then(x=>(this._params=v,this._data="",this._hitLimit=!1,x));return this._params=v,this._data="",this._hitLimit=!1,y}}},2015:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;let d=s(844),m=s(8742),u=s(6242),h=s(6351);class v{constructor(P){this.table=new Uint8Array(P)}setDefault(P,k){this.table.fill(P<<4|k)}add(P,k,S,T){this.table[k<<8|P]=S<<4|T}addMany(P,k,S,T){for(let A=0;AI),k=(F,I)=>P.slice(F,I),S=k(32,127),T=k(0,24);T.push(25),T.push.apply(T,k(28,32));let A=k(0,14),D;for(D in x.setDefault(1,0),x.addMany(S,0,2,0),A)x.addMany([24,26,153,154],D,3,0),x.addMany(k(128,144),D,3,0),x.addMany(k(144,152),D,3,0),x.add(156,D,0,0),x.add(27,D,11,1),x.add(157,D,4,8),x.addMany([152,158,159],D,0,7),x.add(155,D,11,3),x.add(144,D,11,9);return x.addMany(T,0,3,0),x.addMany(T,1,3,1),x.add(127,1,0,1),x.addMany(T,8,0,8),x.addMany(T,3,3,3),x.add(127,3,0,3),x.addMany(T,4,3,4),x.add(127,4,0,4),x.addMany(T,6,3,6),x.addMany(T,5,3,5),x.add(127,5,0,5),x.addMany(T,2,3,2),x.add(127,2,0,2),x.add(93,1,4,8),x.addMany(S,8,5,8),x.add(127,8,5,8),x.addMany([156,27,24,26,7],8,6,0),x.addMany(k(28,32),8,0,8),x.addMany([88,94,95],1,0,7),x.addMany(S,7,0,7),x.addMany(T,7,0,7),x.add(156,7,0,0),x.add(127,7,0,7),x.add(91,1,11,3),x.addMany(k(64,127),3,7,0),x.addMany(k(48,60),3,8,4),x.addMany([60,61,62,63],3,9,4),x.addMany(k(48,60),4,8,4),x.addMany(k(64,127),4,7,0),x.addMany([60,61,62,63],4,0,6),x.addMany(k(32,64),6,0,6),x.add(127,6,0,6),x.addMany(k(64,127),6,0,0),x.addMany(k(32,48),3,9,5),x.addMany(k(32,48),5,9,5),x.addMany(k(48,64),5,0,6),x.addMany(k(64,127),5,7,0),x.addMany(k(32,48),4,9,5),x.addMany(k(32,48),1,9,2),x.addMany(k(32,48),2,9,2),x.addMany(k(48,127),2,10,0),x.addMany(k(48,80),1,10,0),x.addMany(k(81,88),1,10,0),x.addMany([89,90,92],1,10,0),x.addMany(k(96,127),1,10,0),x.add(80,1,11,9),x.addMany(T,9,0,9),x.add(127,9,0,9),x.addMany(k(28,32),9,0,9),x.addMany(k(32,48),9,9,12),x.addMany(k(48,60),9,8,10),x.addMany([60,61,62,63],9,9,10),x.addMany(T,11,0,11),x.addMany(k(32,128),11,0,11),x.addMany(k(28,32),11,0,11),x.addMany(T,10,0,10),x.add(127,10,0,10),x.addMany(k(28,32),10,0,10),x.addMany(k(48,60),10,8,10),x.addMany([60,61,62,63],10,0,11),x.addMany(k(32,48),10,9,12),x.addMany(T,12,0,12),x.add(127,12,0,12),x.addMany(k(28,32),12,0,12),x.addMany(k(32,48),12,9,12),x.addMany(k(48,64),12,0,11),x.addMany(k(64,127),12,12,13),x.addMany(k(64,127),10,12,13),x.addMany(k(64,127),9,12,13),x.addMany(T,13,13,13),x.addMany(S,13,13,13),x.add(127,13,0,13),x.addMany([27,156,24,26],13,14,0),x.add(b,0,2,0),x.add(b,8,5,8),x.add(b,6,0,6),x.add(b,11,0,11),x.add(b,13,13,13),x})();class y extends d.Disposable{constructor(P=r.VT500_TRANSITION_TABLE){super(),this._transitions=P,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=(k,S,T)=>{},this._executeHandlerFb=k=>{},this._csiHandlerFb=(k,S)=>{},this._escHandlerFb=k=>{},this._errorHandlerFb=k=>k,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new h.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(P,k=[64,126]){let S=0;if(P.prefix){if(P.prefix.length>1)throw new Error("only one byte as prefix supported");if(S=P.prefix.charCodeAt(0),S&&60>S||S>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(P.intermediates){if(P.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let A=0;AD||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");S<<=8,S|=D}}if(P.final.length!==1)throw new Error("final must be a single byte");let T=P.final.charCodeAt(0);if(k[0]>T||T>k[1])throw new Error(`final must be in range ${k[0]} .. ${k[1]}`);return S<<=8,S|=T,S}identToString(P){let k=[];for(;P;)k.push(String.fromCharCode(255&P)),P>>=8;return k.reverse().join("")}setPrintHandler(P){this._printHandler=P}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(P,k){let S=this._identifier(P,[48,126]);this._escHandlers[S]===void 0&&(this._escHandlers[S]=[]);let T=this._escHandlers[S];return T.push(k),{dispose:()=>{let A=T.indexOf(k);A!==-1&&T.splice(A,1)}}}clearEscHandler(P){this._escHandlers[this._identifier(P,[48,126])]&&delete this._escHandlers[this._identifier(P,[48,126])]}setEscHandlerFallback(P){this._escHandlerFb=P}setExecuteHandler(P,k){this._executeHandlers[P.charCodeAt(0)]=k}clearExecuteHandler(P){this._executeHandlers[P.charCodeAt(0)]&&delete this._executeHandlers[P.charCodeAt(0)]}setExecuteHandlerFallback(P){this._executeHandlerFb=P}registerCsiHandler(P,k){let S=this._identifier(P);this._csiHandlers[S]===void 0&&(this._csiHandlers[S]=[]);let T=this._csiHandlers[S];return T.push(k),{dispose:()=>{let A=T.indexOf(k);A!==-1&&T.splice(A,1)}}}clearCsiHandler(P){this._csiHandlers[this._identifier(P)]&&delete this._csiHandlers[this._identifier(P)]}setCsiHandlerFallback(P){this._csiHandlerFb=P}registerDcsHandler(P,k){return this._dcsParser.registerHandler(this._identifier(P),k)}clearDcsHandler(P){this._dcsParser.clearHandler(this._identifier(P))}setDcsHandlerFallback(P){this._dcsParser.setHandlerFallback(P)}registerOscHandler(P,k){return this._oscParser.registerHandler(P,k)}clearOscHandler(P){this._oscParser.clearHandler(P)}setOscHandlerFallback(P){this._oscParser.setHandlerFallback(P)}setErrorHandler(P){this._errorHandler=P}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(P,k,S,T,A){this._parseStack.state=P,this._parseStack.handlers=k,this._parseStack.handlerPos=S,this._parseStack.transition=T,this._parseStack.chunkPos=A}parse(P,k,S){let T,A=0,D=0,F=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,F=this._parseStack.chunkPos+1;else{if(S===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let I=this._parseStack.handlers,V=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(S===!1&&V>-1){for(;V>=0&&(T=I[V](this._params),T!==!0);V--)if(T instanceof Promise)return this._parseStack.handlerPos=V,T}this._parseStack.handlers=[];break;case 4:if(S===!1&&V>-1){for(;V>=0&&(T=I[V](),T!==!0);V--)if(T instanceof Promise)return this._parseStack.handlerPos=V,T}this._parseStack.handlers=[];break;case 6:if(A=P[this._parseStack.chunkPos],T=this._dcsParser.unhook(A!==24&&A!==26,S),T)return T;A===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(A=P[this._parseStack.chunkPos],T=this._oscParser.end(A!==24&&A!==26,S),T)return T;A===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,F=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let I=F;I>4){case 2:for(let G=I+1;;++G){if(G>=k||(A=P[G])<32||A>126&&A=k||(A=P[G])<32||A>126&&A=k||(A=P[G])<32||A>126&&A=k||(A=P[G])<32||A>126&&A=0&&(T=V[ae](this._params),T!==!0);ae--)if(T instanceof Promise)return this._preserveStack(3,V,ae,D,I),T;ae<0&&this._csiHandlerFb(this._collect<<8|A,this._params),this.precedingJoinState=0;break;case 8:do switch(A){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(A-48)}while(++I47&&A<60);I--;break;case 9:this._collect<<=8,this._collect|=A;break;case 10:let oe=this._escHandlers[this._collect<<8|A],W=oe?oe.length-1:-1;for(;W>=0&&(T=oe[W](),T!==!0);W--)if(T instanceof Promise)return this._preserveStack(4,oe,W,D,I),T;W<0&&this._escHandlerFb(this._collect<<8|A),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|A,this._params);break;case 13:for(let G=I+1;;++G)if(G>=k||(A=P[G])===24||A===26||A===27||A>127&&A=k||(A=P[G])<32||A>127&&A{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;let d=s(5770),m=s(482),u=[];r.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(h,v){this._handlers[h]===void 0&&(this._handlers[h]=[]);let b=this._handlers[h];return b.push(v),{dispose:()=>{let y=b.indexOf(v);y!==-1&&b.splice(y,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=u}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=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,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,v,b){if(this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].put(h,v,b);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(h,v,b))}start(){this.reset(),this._state=1}put(h,v,b){if(this._state!==3){if(this._state===1)for(;v0&&this._put(h,v,b)}}end(h,v=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let b=!1,y=this._active.length-1,x=!1;if(this._stack.paused&&(y=this._stack.loopPosition-1,b=v,x=this._stack.fallThrough,this._stack.paused=!1),!x&&b===!1){for(;y>=0&&(b=this._active[y].end(h),b!==!0);y--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!1,b;y--}for(;y>=0;y--)if(b=this._active[y].end(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!0,b}else this._handlerFb(this._id,"END",h);this._active=u,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,v,b){this._hitLimit||(this._data+=(0,m.utf32ToString)(h,v,b),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(h){let v=!1;if(this._hitLimit)v=!1;else if(h&&(v=this._handler(this._data),v instanceof Promise))return v.then(b=>(this._data="",this._hitLimit=!1,b));return this._data="",this._hitLimit=!1,v}}},8742:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;let s=2147483647;class d{static fromArray(u){let h=new d;if(!u.length)return h;for(let v=Array.isArray(u[0])?1:0;v256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){let u=new d(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){let u=[];for(let h=0;h>8,b=255&this._subParamsIdx[h];b-v>0&&u.push(Array.prototype.slice.call(this._subParams,v,b))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>s?s:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>s?s:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){let h=this._subParamsIdx[u]>>8,v=255&this._subParamsIdx[u];return v-h>0?this._subParams.subarray(h,v):null}getSubParamsAll(){let u={};for(let h=0;h>8,b=255&this._subParamsIdx[h];b-v>0&&(u[h]=this._subParams.slice(v,b))}return u}addDigit(u){let h;if(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let v=this._digitIsSub?this._subParams:this.params,b=v[h-1];v[h-1]=~b?Math.min(10*b+u,s):u}}r.Params=d},5741:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let s=this._addons.length-1;s>=0;s--)this._addons[s].instance.dispose()}loadAddon(s,d){let m={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(m),d.dispose=()=>this._wrappedAddonDispose(m),d.activate(s)}_wrappedAddonDispose(s){if(s.isDisposed)return;let d=-1;for(let m=0;m{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;let d=s(3785),m=s(511);r.BufferApiView=class{constructor(u,h){this._buffer=u,this.type=h}init(u){return this._buffer=u,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(u){let h=this._buffer.lines.get(u);if(h)return new d.BufferLineApiView(h)}getNullCell(){return new m.CellData}}},3785:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;let d=s(511);r.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,u){if(!(m<0||m>=this._line.length))return u?(this._line.loadCell(m,u),u):this._line.loadCell(m,new d.CellData)}translateToString(m,u,h){return this._line.translateToString(m,u,h)}}},8285:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;let d=s(8771),m=s(8460),u=s(844);class h extends u.Disposable{constructor(b){super(),this._core=b,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(s){this._core=s}registerCsiHandler(s,d){return this._core.registerCsiHandler(s,m=>d(m.toArray()))}addCsiHandler(s,d){return this.registerCsiHandler(s,d)}registerDcsHandler(s,d){return this._core.registerDcsHandler(s,(m,u)=>d(m,u.toArray()))}addDcsHandler(s,d){return this.registerDcsHandler(s,d)}registerEscHandler(s,d){return this._core.registerEscHandler(s,d)}addEscHandler(s,d){return this.registerEscHandler(s,d)}registerOscHandler(s,d){return this._core.registerOscHandler(s,d)}addOscHandler(s,d){return this.registerOscHandler(s,d)}}},7090:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(s){this._core=s}register(s){this._core.unicodeService.register(s)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(s){this._core.unicodeService.activeVersion=s}}},744:function(i,r,s){var d=this&&this.__decorate||function(x,P,k,S){var T,A=arguments.length,D=A<3?P:S===null?S=Object.getOwnPropertyDescriptor(P,k):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,P,k,S);else for(var F=x.length-1;F>=0;F--)(T=x[F])&&(D=(A<3?T(D):A>3?T(P,k,D):T(P,k))||D);return A>3&&D&&Object.defineProperty(P,k,D),D},m=this&&this.__param||function(x,P){return function(k,S){P(k,S,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;let u=s(8460),h=s(844),v=s(5295),b=s(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let y=r.BufferService=class extends h.Disposable{get buffer(){return this.buffers.active}constructor(x){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(x.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(x.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new v.BufferSet(x,this))}resize(x,P){this.cols=x,this.rows=P,this.buffers.resize(x,P),this._onResize.fire({cols:x,rows:P})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(x,P=!1){let k=this.buffer,S;S=this._cachedBlankLine,S&&S.length===this.cols&&S.getFg(0)===x.fg&&S.getBg(0)===x.bg||(S=k.getBlankLine(x,P),this._cachedBlankLine=S),S.isWrapped=P;let T=k.ybase+k.scrollTop,A=k.ybase+k.scrollBottom;if(k.scrollTop===0){let D=k.lines.isFull;A===k.lines.length-1?D?k.lines.recycle().copyFrom(S):k.lines.push(S.clone()):k.lines.splice(A+1,0,S.clone()),D?this.isUserScrolling&&(k.ydisp=Math.max(k.ydisp-1,0)):(k.ybase++,this.isUserScrolling||k.ydisp++)}else{let D=A-T+1;k.lines.shiftElements(T+1,D-1,-1),k.lines.set(A,S.clone())}this.isUserScrolling||(k.ydisp=k.ybase),this._onScroll.fire(k.ydisp)}scrollLines(x,P,k){let S=this.buffer;if(x<0){if(S.ydisp===0)return;this.isUserScrolling=!0}else x+S.ydisp>=S.ybase&&(this.isUserScrolling=!1);let T=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+x,S.ybase),0),T!==S.ydisp&&(P||this._onScroll.fire(S.ydisp))}};r.BufferService=y=d([m(0,b.IOptionsService)],y)},7994:(i,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(s){this.glevel=s,this.charset=this._charsets[s]}setgCharset(s,d){this._charsets[s]=d,this.glevel===s&&(this.charset=d)}}},1753:function(i,r,s){var d=this&&this.__decorate||function(S,T,A,D){var F,I=arguments.length,V=I<3?T:D===null?D=Object.getOwnPropertyDescriptor(T,A):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(S,T,A,D);else for(var ae=S.length-1;ae>=0;ae--)(F=S[ae])&&(V=(I<3?F(V):I>3?F(T,A,V):F(T,A))||V);return I>3&&V&&Object.defineProperty(T,A,V),V},m=this&&this.__param||function(S,T){return function(A,D){T(A,D,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;let u=s(2585),h=s(8460),v=s(844),b={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:S=>S.button!==4&&S.action===1&&(S.ctrl=!1,S.alt=!1,S.shift=!1,!0)},VT200:{events:19,restrict:S=>S.action!==32},DRAG:{events:23,restrict:S=>S.action!==32||S.button!==3},ANY:{events:31,restrict:S=>!0}};function y(S,T){let A=(S.ctrl?16:0)|(S.shift?4:0)|(S.alt?8:0);return S.button===4?(A|=64,A|=S.action):(A|=3&S.button,4&S.button&&(A|=64),8&S.button&&(A|=128),S.action===32?A|=32:S.action!==0||T||(A|=3)),A}let x=String.fromCharCode,P={DEFAULT:S=>{let T=[y(S,!1)+32,S.col+32,S.row+32];return T[0]>255||T[1]>255||T[2]>255?"":`\x1B[M${x(T[0])}${x(T[1])}${x(T[2])}`},SGR:S=>{let T=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${y(S,!0)};${S.col};${S.row}${T}`},SGR_PIXELS:S=>{let T=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${y(S,!0)};${S.x};${S.y}${T}`}},k=r.CoreMouseService=class extends v.Disposable{constructor(S,T){super(),this._bufferService=S,this._coreService=T,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 A of Object.keys(b))this.addProtocol(A,b[A]);for(let A of Object.keys(P))this.addEncoding(A,P[A]);this.reset()}addProtocol(S,T){this._protocols[S]=T}addEncoding(S,T){this._encodings[S]=T}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(S){if(!this._protocols[S])throw new Error(`unknown protocol "${S}"`);this._activeProtocol=S,this._onProtocolChange.fire(this._protocols[S].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(S){if(!this._encodings[S])throw new Error(`unknown encoding "${S}"`);this._activeEncoding=S}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(S){if(S.col<0||S.col>=this._bufferService.cols||S.row<0||S.row>=this._bufferService.rows||S.button===4&&S.action===32||S.button===3&&S.action!==32||S.button!==4&&(S.action===2||S.action===3)||(S.col++,S.row++,S.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,S,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(S))return!1;let T=this._encodings[this._activeEncoding](S);return T&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(T):this._coreService.triggerDataEvent(T,!0)),this._lastEvent=S,!0}explainEvents(S){return{down:!!(1&S),up:!!(2&S),drag:!!(4&S),move:!!(8&S),wheel:!!(16&S)}}_equalEvents(S,T,A){if(A){if(S.x!==T.x||S.y!==T.y)return!1}else if(S.col!==T.col||S.row!==T.row)return!1;return S.button===T.button&&S.action===T.action&&S.ctrl===T.ctrl&&S.alt===T.alt&&S.shift===T.shift}};r.CoreMouseService=k=d([m(0,u.IBufferService),m(1,u.ICoreService)],k)},6975:function(i,r,s){var d=this&&this.__decorate||function(k,S,T,A){var D,F=arguments.length,I=F<3?S:A===null?A=Object.getOwnPropertyDescriptor(S,T):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(k,S,T,A);else for(var V=k.length-1;V>=0;V--)(D=k[V])&&(I=(F<3?D(I):F>3?D(S,T,I):D(S,T))||I);return F>3&&I&&Object.defineProperty(S,T,I),I},m=this&&this.__param||function(k,S){return function(T,A){S(T,A,k)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;let u=s(1439),h=s(8460),v=s(844),b=s(2585),y=Object.freeze({insertMode:!1}),x=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),P=r.CoreService=class extends v.Disposable{constructor(k,S,T){super(),this._bufferService=k,this._logService=S,this._optionsService=T,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,u.clone)(y),this.decPrivateModes=(0,u.clone)(x)}reset(){this.modes=(0,u.clone)(y),this.decPrivateModes=(0,u.clone)(x)}triggerDataEvent(k,S=!1){if(this._optionsService.rawOptions.disableStdin)return;let T=this._bufferService.buffer;S&&this._optionsService.rawOptions.scrollOnUserInput&&T.ybase!==T.ydisp&&this._onRequestScrollToBottom.fire(),S&&this._onUserInput.fire(),this._logService.debug(`sending data "${k}"`,()=>k.split("").map(A=>A.charCodeAt(0))),this._onData.fire(k)}triggerBinaryEvent(k){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${k}"`,()=>k.split("").map(S=>S.charCodeAt(0))),this._onBinary.fire(k))}};r.CoreService=P=d([m(0,b.IBufferService),m(1,b.ILogService),m(2,b.IOptionsService)],P)},9074:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;let d=s(8055),m=s(8460),u=s(844),h=s(6106),v=0,b=0;class y extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new h.SortedList(k=>k?.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,u.toDisposable)(()=>this.reset()))}registerDecoration(k){if(k.marker.isDisposed)return;let S=new x(k);if(S){let T=S.marker.onDispose(()=>S.dispose());S.onDispose(()=>{S&&(this._decorations.delete(S)&&this._onDecorationRemoved.fire(S),T.dispose())}),this._decorations.insert(S),this._onDecorationRegistered.fire(S)}return S}reset(){for(let k of this._decorations.values())k.dispose();this._decorations.clear()}*getDecorationsAtCell(k,S,T){let A=0,D=0;for(let F of this._decorations.getKeyIterator(S))A=F.options.x??0,D=A+(F.options.width??1),k>=A&&k{v=D.options.x??0,b=v+(D.options.width??1),k>=v&&k{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;let d=s(2585),m=s(8343);class u{constructor(...v){this._entries=new Map;for(let[b,y]of v)this.set(b,y)}set(v,b){let y=this._entries.get(v);return this._entries.set(v,b),y}forEach(v){for(let[b,y]of this._entries.entries())v(b,y)}has(v){return this._entries.has(v)}get(v){return this._entries.get(v)}}r.ServiceCollection=u,r.InstantiationService=class{constructor(){this._services=new u,this._services.set(d.IInstantiationService,this)}setService(h,v){this._services.set(h,v)}getService(h){return this._services.get(h)}createInstance(h,...v){let b=(0,m.getServiceDependencies)(h).sort((P,k)=>P.index-k.index),y=[];for(let P of b){let k=this._services.get(P.id);if(!k)throw new Error(`[createInstance] ${h.name} depends on UNKNOWN service ${P.id}.`);y.push(k)}let x=b.length>0?b[0].index:v.length;if(v.length!==x)throw new Error(`[createInstance] First service dependency of ${h.name} at position ${x+1} conflicts with ${v.length} static arguments`);return new h(...v,...y)}}},7866:function(i,r,s){var d=this&&this.__decorate||function(x,P,k,S){var T,A=arguments.length,D=A<3?P:S===null?S=Object.getOwnPropertyDescriptor(P,k):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,P,k,S);else for(var F=x.length-1;F>=0;F--)(T=x[F])&&(D=(A<3?T(D):A>3?T(P,k,D):T(P,k))||D);return A>3&&D&&Object.defineProperty(P,k,D),D},m=this&&this.__param||function(x,P){return function(k,S){P(k,S,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;let u=s(844),h=s(2585),v={trace:h.LogLevelEnum.TRACE,debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF},b,y=r.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(x){super(),this._optionsService=x,this._logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),b=this}_updateLogLevel(){this._logLevel=v[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(x){for(let P=0;PJSON.stringify(D)).join(", ")})`);let A=S.apply(this,T);return b.trace(`GlyphRenderer#${S.name} return`,A),A}}},7302:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;let d=s(8460),m=s(844),u=s(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:u.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 v extends m.Disposable{constructor(y){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;let x=q({},r.DEFAULT_OPTIONS);for(let P in y)if(P in x)try{let k=y[P];x[P]=this._sanitizeAndValidateOption(P,k)}catch(k){console.error(k)}this.rawOptions=x,this.options=q({},x),this._setupOptions(),this.register((0,m.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(y,x){return this.onOptionChange(P=>{P===y&&x(this.rawOptions[y])})}onMultipleOptionChange(y,x){return this.onOptionChange(P=>{y.indexOf(P)!==-1&&x()})}_setupOptions(){let y=P=>{if(!(P in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${P}"`);return this.rawOptions[P]},x=(P,k)=>{if(!(P in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${P}"`);k=this._sanitizeAndValidateOption(P,k),this.rawOptions[P]!==k&&(this.rawOptions[P]=k,this._onOptionChange.fire(P))};for(let P in this.rawOptions){let k={get:y.bind(this,P),set:x.bind(this,P)};Object.defineProperty(this.options,P,k)}}_sanitizeAndValidateOption(y,x){switch(y){case"cursorStyle":if(x||(x=r.DEFAULT_OPTIONS[y]),!(function(P){return P==="block"||P==="underline"||P==="bar"})(x))throw new Error(`"${x}" is not a valid value for ${y}`);break;case"wordSeparator":x||(x=r.DEFAULT_OPTIONS[y]);break;case"fontWeight":case"fontWeightBold":if(typeof x=="number"&&1<=x&&x<=1e3)break;x=h.includes(x)?x:r.DEFAULT_OPTIONS[y];break;case"cursorWidth":x=Math.floor(x);case"lineHeight":case"tabStopWidth":if(x<1)throw new Error(`${y} cannot be less than 1, value: ${x}`);break;case"minimumContrastRatio":x=Math.max(1,Math.min(21,Math.round(10*x)/10));break;case"scrollback":if((x=Math.min(x,4294967295))<0)throw new Error(`${y} cannot be less than 0, value: ${x}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(x<=0)throw new Error(`${y} cannot be less than or equal to 0, value: ${x}`);break;case"rows":case"cols":if(!x&&x!==0)throw new Error(`${y} must be numeric, value: ${x}`);break;case"windowsPty":x=x??{}}return x}}r.OptionsService=v},2660:function(i,r,s){var d=this&&this.__decorate||function(v,b,y,x){var P,k=arguments.length,S=k<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(v,b,y,x);else for(var T=v.length-1;T>=0;T--)(P=v[T])&&(S=(k<3?P(S):k>3?P(b,y,S):P(b,y))||S);return k>3&&S&&Object.defineProperty(b,y,S),S},m=this&&this.__param||function(v,b){return function(y,x){b(y,x,v)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;let u=s(2585),h=r.OscLinkService=class{constructor(v){this._bufferService=v,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(v){let b=this._bufferService.buffer;if(v.id===void 0){let T=b.addMarker(b.ybase+b.y),A={data:v,id:this._nextId++,lines:[T]};return T.onDispose(()=>this._removeMarkerFromLink(A,T)),this._dataByLinkId.set(A.id,A),A.id}let y=v,x=this._getEntryIdKey(y),P=this._entriesWithId.get(x);if(P)return this.addLineToLink(P.id,b.ybase+b.y),P.id;let k=b.addMarker(b.ybase+b.y),S={id:this._nextId++,key:this._getEntryIdKey(y),data:y,lines:[k]};return k.onDispose(()=>this._removeMarkerFromLink(S,k)),this._entriesWithId.set(S.key,S),this._dataByLinkId.set(S.id,S),S.id}addLineToLink(v,b){let y=this._dataByLinkId.get(v);if(y&&y.lines.every(x=>x.line!==b)){let x=this._bufferService.buffer.addMarker(b);y.lines.push(x),x.onDispose(()=>this._removeMarkerFromLink(y,x))}}getLinkData(v){return this._dataByLinkId.get(v)?.data}_getEntryIdKey(v){return`${v.id};;${v.uri}`}_removeMarkerFromLink(v,b){let y=v.lines.indexOf(b);y!==-1&&(v.lines.splice(y,1),v.lines.length===0&&(v.data.id!==void 0&&this._entriesWithId.delete(v.key),this._dataByLinkId.delete(v.id)))}};r.OscLinkService=h=d([m(0,u.IBufferService)],h)},8343:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;let s="di$target",d="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(m){return m[d]||[]},r.createDecorator=function(m){if(r.serviceRegistry.has(m))return r.serviceRegistry.get(m);let u=function(h,v,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(y,x,P){x[s]===x?x[d].push({id:y,index:P}):(x[d]=[{id:y,index:P}],x[s]=x)})(u,h,b)};return u.toString=()=>m,r.serviceRegistry.set(m,u),u}},2585:(i,r,s)=>{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 d=s(8343);var m;r.IBufferService=(0,d.createDecorator)("BufferService"),r.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),r.ICoreService=(0,d.createDecorator)("CoreService"),r.ICharsetService=(0,d.createDecorator)("CharsetService"),r.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(m||(r.LogLevelEnum=m={})),r.ILogService=(0,d.createDecorator)("LogService"),r.IOptionsService=(0,d.createDecorator)("OptionsService"),r.IOscLinkService=(0,d.createDecorator)("OscLinkService"),r.IUnicodeService=(0,d.createDecorator)("UnicodeService"),r.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(i,r,s)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;let d=s(8460),m=s(225);class u{static extractShouldJoin(v){return(1&v)!=0}static extractWidth(v){return v>>1&3}static extractCharKind(v){return v>>3}static createPropertyValue(v,b,y=!1){return(16777215&v)<<3|(3&b)<<1|(y?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;let v=new m.UnicodeV6;this.register(v),this._active=v.version,this._activeProvider=v}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(v){if(!this._providers[v])throw new Error(`unknown Unicode version "${v}"`);this._active=v,this._activeProvider=this._providers[v],this._onChange.fire(v)}register(v){this._providers[v.version]=v}wcwidth(v){return this._activeProvider.wcwidth(v)}getStringCellWidth(v){let b=0,y=0,x=v.length;for(let P=0;P=x)return b+this.wcwidth(k);let A=v.charCodeAt(P);56320<=A&&A<=57343?k=1024*(k-55296)+A-56320+65536:b+=this.wcwidth(A)}let S=this.charProperties(k,y),T=u.extractWidth(S);u.extractShouldJoin(S)&&(T-=u.extractWidth(y)),b+=T,y=S}return b}charProperties(v,b){return this._activeProvider.charProperties(v,b)}}r.UnicodeService=u}},o={};function e(i){var r=o[i];if(r!==void 0)return r.exports;var s=o[i]={exports:{}};return n[i].call(s.exports,s,s.exports,e),s.exports}var t={};return(()=>{var i=t;Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;let r=e(9042),s=e(3236),d=e(844),m=e(5741),u=e(8285),h=e(7975),v=e(7090),b=["cols","rows"];class y extends d.Disposable{constructor(P){super(),this._core=this.register(new s.Terminal(P)),this._addonManager=this.register(new m.AddonManager),this._publicOptions=q({},this._core.options);let k=T=>this._core.options[T],S=(T,A)=>{this._checkReadonlyOptions(T),this._core.options[T]=A};for(let T in this._core.options){let A={get:k.bind(this,T),set:S.bind(this,T)};Object.defineProperty(this._publicOptions,T,A)}}_checkReadonlyOptions(P){if(b.includes(P))throw new Error(`Option "${P}" 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 v.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 u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let P=this._core.coreService.decPrivateModes,k="none";switch(this._core.coreMouseService.activeProtocol){case"X10":k="x10";break;case"VT200":k="vt200";break;case"DRAG":k="drag";break;case"ANY":k="any"}return{applicationCursorKeysMode:P.applicationCursorKeys,applicationKeypadMode:P.applicationKeypad,bracketedPasteMode:P.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:k,originMode:P.origin,reverseWraparoundMode:P.reverseWraparound,sendFocusMode:P.sendFocus,wraparoundMode:P.wraparound}}get options(){return this._publicOptions}set options(P){for(let k in P)this._publicOptions[k]=P[k]}blur(){this._core.blur()}focus(){this._core.focus()}input(P,k=!0){this._core.input(P,k)}resize(P,k){this._verifyIntegers(P,k),this._core.resize(P,k)}open(P){this._core.open(P)}attachCustomKeyEventHandler(P){this._core.attachCustomKeyEventHandler(P)}attachCustomWheelEventHandler(P){this._core.attachCustomWheelEventHandler(P)}registerLinkProvider(P){return this._core.registerLinkProvider(P)}registerCharacterJoiner(P){return this._checkProposedApi(),this._core.registerCharacterJoiner(P)}deregisterCharacterJoiner(P){this._checkProposedApi(),this._core.deregisterCharacterJoiner(P)}registerMarker(P=0){return this._verifyIntegers(P),this._core.registerMarker(P)}registerDecoration(P){return this._checkProposedApi(),this._verifyPositiveIntegers(P.x??0,P.width??0,P.height??0),this._core.registerDecoration(P)}hasSelection(){return this._core.hasSelection()}select(P,k,S){this._verifyIntegers(P,k,S),this._core.select(P,k,S)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(P,k){this._verifyIntegers(P,k),this._core.selectLines(P,k)}dispose(){super.dispose()}scrollLines(P){this._verifyIntegers(P),this._core.scrollLines(P)}scrollPages(P){this._verifyIntegers(P),this._core.scrollPages(P)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(P){this._verifyIntegers(P),this._core.scrollToLine(P)}clear(){this._core.clear()}write(P,k){this._core.write(P,k)}writeln(P,k){this._core.write(P),this._core.write(`\r `,k)}paste(P){this._core.paste(P)}refresh(P,k){this._verifyIntegers(P,k),this._core.refresh(P,k)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(P){this._addonManager.loadAddon(this,P)}static get strings(){return r}_verifyIntegers(...P){for(let k of P)if(k===1/0||isNaN(k)||k%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...P){for(let k of P)if(k&&(k===1/0||isNaN(k)||k%1!=0||k<0))throw new Error("This API only accepts positive integers")}}i.Terminal=y})(),t})())});var C4=Vs((t2,f4)=>{(function(n,o){typeof t2=="object"&&typeof f4=="object"?f4.exports=o():typeof define=="function"&&define.amd?define([],o):typeof t2=="object"?t2.AttachAddon=o():n.AttachAddon=o()})(self,()=>(()=>{"use strict";var n={};return(()=>{var o=n;function e(t,i,r){return t.addEventListener(i,r),{dispose:()=>{r&&t.removeEventListener(i,r)}}}Object.defineProperty(o,"__esModule",{value:!0}),o.AttachAddon=void 0,o.AttachAddon=class{constructor(t,i){this._disposables=[],this._socket=t,this._socket.binaryType="arraybuffer",this._bidirectional=!(i&&i.bidirectional===!1)}activate(t){this._disposables.push(e(this._socket,"message",i=>{let r=i.data;t.write(typeof r=="string"?r:new Uint8Array(r))})),this._bidirectional&&(this._disposables.push(t.onData(i=>this._sendData(i))),this._disposables.push(t.onBinary(i=>this._sendBinary(i)))),this._disposables.push(e(this._socket,"close",()=>this.dispose())),this._disposables.push(e(this._socket,"error",()=>this.dispose()))}dispose(){for(let t of this._disposables)t.dispose()}_sendData(t){this._checkOpenSocket()&&this._socket.send(t)}_sendBinary(t){if(!this._checkOpenSocket())return;let i=new Uint8Array(t.length);for(let r=0;r{(function(n,o){typeof n2=="object"&&typeof v4=="object"?v4.exports=o():typeof define=="function"&&define.amd?define([],o):typeof n2=="object"?n2.FitAddon=o():n.FitAddon=o()})(self,()=>(()=>{"use strict";var n={};return(()=>{var o=n;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.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 t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._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,t=e._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let i=this._terminal.options.scrollback===0?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(r.getPropertyValue("height")),d=Math.max(0,parseInt(r.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),u=s-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),h=d-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-i;return{cols:Math.max(2,Math.floor(h/t.css.cell.width)),rows:Math.max(1,Math.floor(u/t.css.cell.height))}}}})(),n})())});var _5=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),Ag=class n{element=null;classNames=[];attrs=[];notSelectors=[];static parse(o){let e=[],t=(m,u)=>{u.notSelectors.length>0&&!u.element&&u.classNames.length==0&&u.attrs.length==0&&(u.element="*"),m.push(u)},i=new n,r,s=i,d=!1;for(_5.lastIndex=0;r=_5.exec(o);){if(r[1]){if(d)throw new Error("Nesting :not in a selector is not allowed");d=!0,s=new n,i.notSelectors.push(s)}let m=r[2];if(m){let h=r[3];h==="#"?s.addAttribute("id",m.slice(1)):h==="."?s.addClassName(m.slice(1)):s.setElement(m)}let u=r[4];if(u&&s.addAttribute(s.unescapeAttribute(u),r[6]),r[7]&&(d=!1,s=i),r[8]){if(d)throw new Error("Multiple selectors in :not are not supported");t(e,i),i=s=new n}}return t(e,i),e}unescapeAttribute(o){let e="",t=!1;for(let i=0;i0&&o.push("class",this.classNames.join(" ")),o.concat(this.attrs)}addAttribute(o,e=""){this.attrs.push(o,e&&e.toLowerCase()||"")}addClassName(o){this.classNames.push(o.toLowerCase())}toString(){let o=this.element||"";if(this.classNames&&this.classNames.forEach(e=>o+=`.${e}`),this.attrs)for(let e=0;eo+=`:not(${e})`),o}},xx=class n{static createNotMatcher(o){let e=new n;return e.addSelectables(o,null),e}_elementMap=new Map;_elementPartialMap=new Map;_classMap=new Map;_classPartialMap=new Map;_attrValueMap=new Map;_attrValuePartialMap=new Map;_listContexts=[];addSelectables(o,e){let t=null;o.length>1&&(t=new nP(o),this._listContexts.push(t));for(let i=0;i0&&(!this.listContext||!this.listContext.alreadyMatched)&&(t=!xx.createNotMatcher(this.notSelectors).match(o,null)),t&&e&&(!this.listContext||!this.listContext.alreadyMatched)&&(this.listContext&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),t}},yx=class{registry;constructor(o){this.registry=o}match(o){return this.registry.has(o)?this.registry.get(o):[]}},mi=(function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n[n.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",n})(mi||{}),gx,f5="svg",fH="math";function CH(){return gx||(gx={},dp(mi.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),dp(mi.STYLE,void 0,[["*",["style"]]]),dp(mi.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),dp(mi.URL,fH,[["*",["href","xlink:href"]],["annotation",["href","xlink:href"]],["annotation-xml",["href","xlink:href"]],["maction",["href","xlink:href"]],["malignmark",["href","xlink:href"]],["math",["href","xlink:href"]],["mroot",["href","xlink:href"]],["msqrt",["href","xlink:href"]],["merror",["href","xlink:href"]],["mfrac",["href","xlink:href"]],["mglyph",["href","xlink:href"]],["msub",["href","xlink:href"]],["msup",["href","xlink:href"]],["msubsup",["href","xlink:href"]],["mmultiscripts",["href","xlink:href"]],["mprescripts",["href","xlink:href"]],["mi",["href","xlink:href"]],["mn",["href","xlink:href"]],["mo",["href","xlink:href"]],["mpadded",["href","xlink:href"]],["mphantom",["href","xlink:href"]],["mrow",["href","xlink:href"]],["ms",["href","xlink:href"]],["mspace",["href","xlink:href"]],["mstyle",["href","xlink:href"]],["mtable",["href","xlink:href"]],["mtd",["href","xlink:href"]],["mtr",["href","xlink:href"]],["mtext",["href","xlink:href"]],["mover",["href","xlink:href"]],["munder",["href","xlink:href"]],["munderover",["href","xlink:href"]],["semantics",["href","xlink:href"]],["none",["href","xlink:href"]]]),dp(mi.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),dp(mi.URL,f5,[["a",["href","xlink:href"]]]),dp(mi.ATTRIBUTE_NO_BINDING,f5,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),dp(mi.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]]])),gx}function dp(n,o,e){for(let[t,i]of e){let r=o&&t!=="unknown"?`:${o}:${t}`:t;r=r.toLowerCase();for(let s of i)gx[`${r}|${s.toLowerCase()}`]=n}}var zm=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n[n.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",n})(zm||{}),IT=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n[n.Eager=1]="Eager",n})(IT||{}),vf=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(vf||{}),C5={name:"custom-elements"},v5={name:"no-errors-schema"};function vH(n){let o=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return[n.element&&n.element!=="*"?n.element:"",...n.attrs,...o]}function xH(n){let o=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return n.element?[5,n.element,...n.attrs,...o]:n.attrs.length?[3,...n.attrs,...o]:n.classNames&&n.classNames.length?[9,...n.classNames]:[]}function yH(n){let o=vH(n),e=n.notSelectors&&n.notSelectors.length?n.notSelectors.map(t=>xH(t)):[];return o.concat(...e)}function AT(n){return n?Ag.parse(n).map(yH):[]}var kd=(function(n){return n[n.Directive=0]="Directive",n[n.Component=1]="Component",n[n.Injectable=2]="Injectable",n[n.Pipe=3]="Pipe",n[n.NgModule=4]="NgModule",n})(kd||{});var bx;function bH(n){return kH(SH(n.nodes).join("")+`[${n.meaning}]`)}function wH(n){return n.id||mN(n)}function mN(n){let o=new oP,e=n.nodes.map(t=>t.visit(o,null));return uN(e.join(""),n.meaning)}var wx=class{visitText(o,e){return o.value}visitContainer(o,e){return`[${o.children.map(t=>t.visit(this)).join(", ")}]`}visitIcu(o,e){let t=Object.keys(o.cases).map(i=>`${i} {${o.cases[i].visit(this)}}`);return`{${o.expression}, ${o.type}, ${t.join(", ")}}`}visitTagPlaceholder(o,e){return o.isVoid?``:`${o.children.map(t=>t.visit(this)).join(", ")}`}visitPlaceholder(o,e){return o.value?`${o.value}`:``}visitIcuPlaceholder(o,e){return`${o.value.visit(this)}`}visitBlockPlaceholder(o,e){return`${o.children.map(t=>t.visit(this)).join(", ")}`}},MH=new wx;function SH(n){return n.map(o=>o.visit(MH,null))}var oP=class extends wx{visitIcu(o){let e=Object.keys(o.cases).map(t=>`${t} {${o.cases[t].visit(this)}}`);return`{${o.type}, ${e.join(", ")}}`}};function kH(n){bx??=new TextEncoder;let o=[...bx.encode(n)],e=EH(o,NT.Big),t=o.length*8,i=new Uint32Array(80),r=1732584193,s=4023233417,d=2562383102,m=271733878,u=3285377520;e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(let h=0;h>>0).toString(16).padStart(8,"0")}function PH(n,o,e,t){return n<20?[o&e|~o&t,1518500249]:n<40?[o^e^t,1859775393]:n<60?[o&e|o&t|e&t,2400959708]:[o^e^t,3395469782]}function x5(n){bx??=new TextEncoder;let o=bx.encode(n),e=new DataView(o.buffer,o.byteOffset,o.byteLength),t=y5(e,o.length,0),i=y5(e,o.length,102072);return t==0&&(i==0||i==1)&&(t=t^319790063,i=i^-1801410264),BigInt.asUintN(32,BigInt(t))<>BigInt(63)&BigInt(1),e+=x5(o)),BigInt.asUintN(63,e).toString()}function y5(n,o,e){let t=2654435769,i=2654435769,r=0,s=o-12;for(;r<=s;r+=12){t+=n.getUint32(r,!0),i+=n.getUint32(r+4,!0),e+=n.getUint32(r+8,!0);let m=b5(t,i,e);t=m[0],i=m[1],e=m[2]}let d=o-r;return e+=o,d>=4?(t+=n.getUint32(r,!0),r+=4,d>=8?(i+=n.getUint32(r,!0),r+=4,d>=9&&(e+=n.getUint8(r++)<<8),d>=10&&(e+=n.getUint8(r++)<<16),d===11&&(e+=n.getUint8(r++)<<24)):(d>=5&&(i+=n.getUint8(r++)),d>=6&&(i+=n.getUint8(r++)<<8),d===7&&(i+=n.getUint8(r++)<<16))):(d>=1&&(t+=n.getUint8(r++)),d>=2&&(t+=n.getUint8(r++)<<8),d===3&&(t+=n.getUint8(r++)<<16)),b5(t,i,e)[2]}function b5(n,o,e){return n-=o,n-=e,n^=e>>>13,o-=e,o-=n,o^=n<<8,e-=n,e-=o,e^=o>>>13,n-=o,n-=e,n^=e>>>12,o-=e,o-=n,o^=n<<16,e-=n,e-=o,e^=o>>>5,n-=o,n-=e,n^=e>>>3,o-=e,o-=n,o^=n<<10,e-=n,e-=o,e^=o>>>15,[n,o,e]}var NT=(function(n){return n[n.Little=0]="Little",n[n.Big=1]="Big",n})(NT||{});function _g(n,o){return TH(n,o)[1]}function TH(n,o){let e=(n&65535)+(o&65535),t=(n>>>16)+(o>>>16)+(e>>>16);return[t>>>16,t<<16|e&65535]}function Fk(n,o){return n<>>32-o}function EH(n,o){let e=n.length+3>>>2,t=[];for(let i=0;i=n.length?0:n[o]}function OH(n,o,e){let t=0;if(e===NT.Big)for(let i=0;i<4;i++)t+=w5(n,o+i)<<24-8*i;else for(let i=0;i<4;i++)t+=w5(n,o+i)<<8*i;return t}var gN=(function(n){return n[n.None=0]="None",n[n.Const=1]="Const",n})(gN||{}),Mx=class{modifiers;constructor(o=gN.None){this.modifiers=o}hasModifier(o){return(this.modifiers&o)!==0}},Fd=(function(n){return n[n.Dynamic=0]="Dynamic",n[n.Bool=1]="Bool",n[n.String=2]="String",n[n.Int=3]="Int",n[n.Number=4]="Number",n[n.Function=5]="Function",n[n.Inferred=6]="Inferred",n[n.None=7]="None",n})(Fd||{}),Fc=class extends Mx{name;constructor(o,e){super(e),this.name=o}visitType(o,e){return o.visitBuiltinType(this,e)}},xl=class extends Mx{value;typeParams;constructor(o,e,t=null){super(e),this.value=o,this.typeParams=t}visitType(o,e){return o.visitExpressionType(this,e)}};var xs=new Fc(Fd.Dynamic),ec=new Fc(Fd.Inferred),DH=new Fc(Fd.Bool),vje=new Fc(Fd.Int),Jm=new Fc(Fd.Number),FT=new Fc(Fd.String),xje=new Fc(Fd.Function),Rc=new Fc(Fd.None),Nf=(function(n){return n[n.Minus=0]="Minus",n[n.Plus=1]="Plus",n})(Nf||{}),lt=(function(n){return n[n.Equals=0]="Equals",n[n.NotEquals=1]="NotEquals",n[n.Assign=2]="Assign",n[n.Identical=3]="Identical",n[n.NotIdentical=4]="NotIdentical",n[n.Minus=5]="Minus",n[n.Plus=6]="Plus",n[n.Divide=7]="Divide",n[n.Multiply=8]="Multiply",n[n.Modulo=9]="Modulo",n[n.And=10]="And",n[n.Or=11]="Or",n[n.BitwiseOr=12]="BitwiseOr",n[n.BitwiseAnd=13]="BitwiseAnd",n[n.Lower=14]="Lower",n[n.LowerEquals=15]="LowerEquals",n[n.Bigger=16]="Bigger",n[n.BiggerEquals=17]="BiggerEquals",n[n.NullishCoalesce=18]="NullishCoalesce",n[n.Exponentiation=19]="Exponentiation",n[n.In=20]="In",n[n.InstanceOf=21]="InstanceOf",n[n.AdditionAssignment=22]="AdditionAssignment",n[n.SubtractionAssignment=23]="SubtractionAssignment",n[n.MultiplicationAssignment=24]="MultiplicationAssignment",n[n.DivisionAssignment=25]="DivisionAssignment",n[n.RemainderAssignment=26]="RemainderAssignment",n[n.ExponentiationAssignment=27]="ExponentiationAssignment",n[n.AndAssignment=28]="AndAssignment",n[n.OrAssignment=29]="OrAssignment",n[n.NullishCoalesceAssignment=30]="NullishCoalesceAssignment",n})(lt||{});function IH(n,o){return n==null||o==null?n==o:n.isEquivalent(o)}function hN(n,o,e){let t=n.length;if(t!==o.length)return!1;for(let i=0;ie.isEquivalent(t))}var Wi=class{type;sourceSpan;constructor(o,e){this.type=o||null,this.sourceSpan=e||null}prop(o,e){return new Ks(this,o,null,e)}key(o,e,t){return new Id(this,o,e,t)}callFn(o,e,t){return new ys(this,o,null,e,t)}instantiate(o,e,t){return new Rf(this,o,e,t)}conditional(o,e=null,t){return new Lc(this,o,e,null,t)}equals(o,e){return new Si(lt.Equals,this,o,null,e)}notEquals(o,e){return new Si(lt.NotEquals,this,o,null,e)}identical(o,e){return new Si(lt.Identical,this,o,null,e)}notIdentical(o,e){return new Si(lt.NotIdentical,this,o,null,e)}minus(o,e){return new Si(lt.Minus,this,o,null,e)}plus(o,e){return new Si(lt.Plus,this,o,null,e)}divide(o,e){return new Si(lt.Divide,this,o,null,e)}multiply(o,e){return new Si(lt.Multiply,this,o,null,e)}modulo(o,e){return new Si(lt.Modulo,this,o,null,e)}power(o,e){return new Si(lt.Exponentiation,this,o,null,e)}and(o,e){return new Si(lt.And,this,o,null,e)}bitwiseOr(o,e){return new Si(lt.BitwiseOr,this,o,null,e)}bitwiseAnd(o,e){return new Si(lt.BitwiseAnd,this,o,null,e)}or(o,e){return new Si(lt.Or,this,o,null,e)}lower(o,e){return new Si(lt.Lower,this,o,null,e)}lowerEquals(o,e){return new Si(lt.LowerEquals,this,o,null,e)}bigger(o,e){return new Si(lt.Bigger,this,o,null,e)}biggerEquals(o,e){return new Si(lt.BiggerEquals,this,o,null,e)}isBlank(o){return this.equals(LH,o)}nullishCoalesce(o,e){return new Si(lt.NullishCoalesce,this,o,null,e)}toStmt(){return new fa(this,null)}},tc=class n extends Wi{name;constructor(o,e,t){super(e,t),this.name=o}isEquivalent(o){return o instanceof n&&this.name===o.name}isConstant(){return!1}visitExpression(o,e){return o.visitReadVarExpr(this,e)}clone(){return new n(this.name,this.type,this.sourceSpan)}set(o){return new Si(lt.Assign,this,o,null,this.sourceSpan)}},Ng=class n extends Wi{expr;constructor(o,e,t){super(e,t),this.expr=o}visitExpression(o,e){return o.visitTypeofExpr(this,e)}isEquivalent(o){return o instanceof n&&o.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},Sx=class n extends Wi{expr;constructor(o,e,t){super(e,t),this.expr=o}visitExpression(o,e){return o.visitVoidExpr(this,e)}isEquivalent(o){return o instanceof n&&o.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},hi=class n extends Wi{node;constructor(o,e,t){super(e,t),this.node=o}isEquivalent(o){return o instanceof n&&this.node===o.node}isConstant(){return!1}visitExpression(o,e){return o.visitWrappedNodeExpr(this,e)}clone(){return new n(this.node,this.type,this.sourceSpan)}},ys=class n extends Wi{fn;args;pure;constructor(o,e,t,i,r=!1){super(t,i),this.fn=o,this.args=e,this.pure=r}get receiver(){return this.fn}isEquivalent(o){return o instanceof n&&this.fn.isEquivalent(o.fn)&&Qs(this.args,o.args)&&this.pure===o.pure}isConstant(){return!1}visitExpression(o,e){return o.visitInvokeFunctionExpr(this,e)}clone(){return new n(this.fn.clone(),this.args.map(o=>o.clone()),this.type,this.sourceSpan,this.pure)}},Ff=class n extends Wi{tag;template;constructor(o,e,t,i){super(t,i),this.tag=o,this.template=e}isEquivalent(o){return o instanceof n&&this.tag.isEquivalent(o.tag)&&this.template.isEquivalent(o.template)}isConstant(){return!1}visitExpression(o,e){return o.visitTaggedTemplateLiteralExpr(this,e)}clone(){return new n(this.tag.clone(),this.template.clone(),this.type,this.sourceSpan)}},Rf=class n extends Wi{classExpr;args;constructor(o,e,t,i){super(t,i),this.classExpr=o,this.args=e}isEquivalent(o){return o instanceof n&&this.classExpr.isEquivalent(o.classExpr)&&Qs(this.args,o.args)}isConstant(){return!1}visitExpression(o,e){return o.visitInstantiateExpr(this,e)}clone(){return new n(this.classExpr.clone(),this.args.map(o=>o.clone()),this.type,this.sourceSpan)}},Fg=class n extends Wi{body;flags;constructor(o,e,t){super(null,t),this.body=o,this.flags=e}isEquivalent(o){return o instanceof n&&this.body===o.body&&this.flags===o.flags}isConstant(){return!0}visitExpression(o,e){return o.visitRegularExpressionLiteral(this,e)}clone(){return new n(this.body,this.flags,this.sourceSpan)}},_a=class n extends Wi{value;constructor(o,e,t){super(e,t),this.value=o}isEquivalent(o){return o instanceof n&&this.value===o.value}isConstant(){return!0}visitExpression(o,e){return o.visitLiteralExpr(this,e)}clone(){return new n(this.value,this.type,this.sourceSpan)}},Lf=class n extends Wi{elements;expressions;constructor(o,e,t){super(null,t),this.elements=o,this.expressions=e}isEquivalent(o){return o instanceof n&&hN(this.elements,o.elements,(e,t)=>e.text===t.text)&&Qs(this.expressions,o.expressions)}isConstant(){return!1}visitExpression(o,e){return o.visitTemplateLiteralExpr(this,e)}clone(){return new n(this.elements.map(o=>o.clone()),this.expressions.map(o=>o.clone()))}},kx=class n extends Wi{text;rawText;constructor(o,e,t){super(FT,e),this.text=o,this.rawText=t??rP(hx(o))}visitExpression(o,e){return o.visitTemplateLiteralElementExpr(this,e)}isEquivalent(o){return o instanceof n&&o.text===this.text&&o.rawText===this.rawText}isConstant(){return!0}clone(){return new n(this.text,this.sourceSpan,this.rawText)}},Gm=class{text;sourceSpan;constructor(o,e){this.text=o,this.sourceSpan=e}},Og=class{text;sourceSpan;associatedMessage;constructor(o,e,t){this.text=o,this.sourceSpan=e,this.associatedMessage=t}},AH="|",M5="@@",NH="\u241F",Px=class n extends Wi{metaBlock;messageParts;placeHolderNames;expressions;constructor(o,e,t,i,r){super(FT,r),this.metaBlock=o,this.messageParts=e,this.placeHolderNames=t,this.expressions=i}isEquivalent(o){return!1}isConstant(){return!1}visitExpression(o,e){return o.visitLocalizedString(this,e)}clone(){return new n(this.metaBlock,this.messageParts,this.placeHolderNames,this.expressions.map(o=>o.clone()),this.sourceSpan)}serializeI18nHead(){let o=this.metaBlock.description||"";return this.metaBlock.meaning&&(o=`${this.metaBlock.meaning}${AH}${o}`),this.metaBlock.customId&&(o=`${o}${M5}${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(e=>{o=`${o}${NH}${e}`}),S5(o,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(o){return this.messageParts[o]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(o){return this.placeHolderNames[o]?.sourceSpan??this.expressions[o]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(o){let e=this.placeHolderNames[o-1],t=this.messageParts[o],i=e.text;return e.associatedMessage?.legacyIds.length===0&&(i+=`${M5}${uN(e.associatedMessage.messageString,e.associatedMessage.meaning)}`),S5(i,t.text,this.getMessagePartSourceSpan(o))}},hx=n=>n.replace(/\\/g,"\\\\"),FH=n=>n.replace(/^:/,"\\:"),RH=n=>n.replace(/:/g,"\\:"),rP=n=>n.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function S5(n,o,e){return n===""?{cooked:o,raw:rP(FH(hx(o))),range:e}:{cooked:`:${n}:${o}`,raw:rP(`:${RH(hx(n))}:${hx(o)}`),range:e}}var eu=class n extends Wi{value;typeParams;constructor(o,e,t=null,i){super(e,i),this.value=o,this.typeParams=t}isEquivalent(o){return o instanceof n&&this.value.name===o.value.name&&this.value.moduleName===o.value.moduleName}isConstant(){return!1}visitExpression(o,e){return o.visitExternalExpr(this,e)}clone(){return new n(this.value,this.type,this.typeParams,this.sourceSpan)}};var Lc=class n extends Wi{condition;falseCase;trueCase;constructor(o,e,t=null,i,r){super(i||e.type,r),this.condition=o,this.falseCase=t,this.trueCase=e}isEquivalent(o){return o instanceof n&&this.condition.isEquivalent(o.condition)&&this.trueCase.isEquivalent(o.trueCase)&&IH(this.falseCase,o.falseCase)}isConstant(){return!1}visitExpression(o,e){return o.visitConditionalExpr(this,e)}clone(){return new n(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}};var zf=class n extends Wi{condition;constructor(o,e){super(DH,e),this.condition=o}isEquivalent(o){return o instanceof n&&this.condition.isEquivalent(o.condition)}isConstant(){return!1}visitExpression(o,e){return o.visitNotExpr(this,e)}clone(){return new n(this.condition.clone(),this.sourceSpan)}},Er=class n{name;type;constructor(o,e=null){this.name=o,this.type=e}isEquivalent(o){return this.name===o.name}clone(){return new n(this.name,this.type)}},xp=class n extends Wi{params;statements;name;constructor(o,e,t,i,r){super(t,i),this.params=o,this.statements=e,this.name=r}isEquivalent(o){return(o instanceof n||o instanceof Vf)&&Qs(this.params,o.params)&&Qs(this.statements,o.statements)}isConstant(){return!1}visitExpression(o,e){return o.visitFunctionExpr(this,e)}toDeclStmt(o,e){return new Vf(o,this.params,this.statements,this.type,e,this.sourceSpan)}clone(){return new n(this.params.map(o=>o.clone()),this.statements,this.type,this.sourceSpan,this.name)}},gu=class aP extends Wi{params;body;constructor(o,e,t,i){super(t,i),this.params=o,this.body=e}isEquivalent(o){return!(o instanceof aP)||!Qs(this.params,o.params)?!1:this.body instanceof Wi&&o.body instanceof Wi?this.body.isEquivalent(o.body):Array.isArray(this.body)&&Array.isArray(o.body)?Qs(this.body,o.body):!1}isConstant(){return!1}visitExpression(o,e){return o.visitArrowFunctionExpr(this,e)}clone(){return new aP(this.params.map(o=>o.clone()),Array.isArray(this.body)?this.body:this.body.clone(),this.type,this.sourceSpan)}toDeclStmt(o,e){return new Ur(o,this,ec,e,this.sourceSpan)}},tu=class n extends Wi{operator;expr;parens;constructor(o,e,t,i,r=!0){super(t||Jm,i),this.operator=o,this.expr=e,this.parens=r}isEquivalent(o){return o instanceof n&&this.operator===o.operator&&this.expr.isEquivalent(o.expr)}isConstant(){return!1}visitExpression(o,e){return o.visitUnaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.expr.clone(),this.type,this.sourceSpan,this.parens)}},nc=class n extends Wi{expr;constructor(o,e,t){super(e,t),this.expr=o}visitExpression(o,e){return o.visitParenthesizedExpr(this,e)}isEquivalent(o){return o instanceof n&&o.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},Si=class n extends Wi{operator;rhs;lhs;constructor(o,e,t,i,r){super(i||e.type,r),this.operator=o,this.rhs=t,this.lhs=e}isEquivalent(o){return o instanceof n&&this.operator===o.operator&&this.lhs.isEquivalent(o.lhs)&&this.rhs.isEquivalent(o.rhs)}isConstant(){return!1}visitExpression(o,e){return o.visitBinaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let o=this.operator;return o===lt.Assign||o===lt.AdditionAssignment||o===lt.SubtractionAssignment||o===lt.MultiplicationAssignment||o===lt.DivisionAssignment||o===lt.RemainderAssignment||o===lt.ExponentiationAssignment||o===lt.AndAssignment||o===lt.OrAssignment||o===lt.NullishCoalesceAssignment}},Ks=class n extends Wi{receiver;name;constructor(o,e,t,i){super(t,i),this.receiver=o,this.name=e}get index(){return this.name}isEquivalent(o){return o instanceof n&&this.receiver.isEquivalent(o.receiver)&&this.name===o.name}isConstant(){return!1}visitExpression(o,e){return o.visitReadPropExpr(this,e)}set(o){return new Si(lt.Assign,this.receiver.prop(this.name),o,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},Id=class n extends Wi{receiver;index;constructor(o,e,t,i){super(t,i),this.receiver=o,this.index=e}isEquivalent(o){return o instanceof n&&this.receiver.isEquivalent(o.receiver)&&this.index.isEquivalent(o.index)}isConstant(){return!1}visitExpression(o,e){return o.visitReadKeyExpr(this,e)}set(o){return new Si(lt.Assign,this.receiver.key(this.index),o,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},zc=class n extends Wi{entries;constructor(o,e,t){super(e,t),this.entries=o}isConstant(){return this.entries.every(o=>o.isConstant())}isEquivalent(o){return o instanceof n&&Qs(this.entries,o.entries)}visitExpression(o,e){return o.visitLiteralArrayExpr(this,e)}clone(){return new n(this.entries.map(o=>o.clone()),this.type,this.sourceSpan)}},Rg=class n{key;value;quoted;constructor(o,e,t){this.key=o,this.value=e,this.quoted=t}isEquivalent(o){return this.key===o.key&&this.value.isEquivalent(o.value)}clone(){return new n(this.key,this.value.clone(),this.quoted)}isConstant(){return this.value.isConstant()}},yp=class n{expression;constructor(o){this.expression=o}isEquivalent(o){return o instanceof n&&this.expression.isEquivalent(o.expression)}clone(){return new n(this.expression.clone())}isConstant(){return this.expression.isConstant()}},ic=class n extends Wi{entries;valueType=null;constructor(o,e,t){super(e,t),this.entries=o,e&&(this.valueType=e.valueType)}isEquivalent(o){return o instanceof n&&Qs(this.entries,o.entries)}isConstant(){return this.entries.every(o=>o.isConstant())}visitExpression(o,e){return o.visitLiteralMapExpr(this,e)}clone(){let o=this.entries.map(e=>e.clone());return new n(o,this.type,this.sourceSpan)}};var nu=class n extends Wi{expression;constructor(o,e){super(null,e),this.expression=o}isEquivalent(o){return o instanceof n&&this.expression.isEquivalent(o.expression)}isConstant(){return this.expression.isConstant()}visitExpression(o,e){return o.visitSpreadElementExpr(this,e)}clone(){return new n(this.expression.clone(),this.sourceSpan)}},Lg=new _a(null,null,null),LH=new _a(null,ec,null),ua=(function(n){return n[n.None=0]="None",n[n.Final=1]="Final",n[n.Private=2]="Private",n[n.Exported=4]="Exported",n[n.Static=8]="Static",n})(ua||{}),sP=class{text;multiline;trailingNewline;constructor(o,e,t){this.text=o,this.multiline=e,this.trailingNewline=t}toString(){return this.multiline?` ${this.text} `:this.text}},Tx=class extends sP{tags;constructor(o){super("",!0,!0),this.tags=o}toString(){return $H(this.tags)}},iu=class{modifiers;sourceSpan;leadingComments;constructor(o=ua.None,e=null,t){this.modifiers=o,this.sourceSpan=e,this.leadingComments=t}hasModifier(o){return(this.modifiers&o)!==0}addLeadingComment(o){this.leadingComments=this.leadingComments??[],this.leadingComments.push(o)}},Ur=class n extends iu{name;value;type;constructor(o,e,t,i,r,s){super(i,r,s),this.name=o,this.value=e,this.type=t||e&&e.type||null}isEquivalent(o){return o instanceof n&&this.name===o.name&&(this.value?!!o.value&&this.value.isEquivalent(o.value):!o.value)}visitStatement(o,e){return o.visitDeclareVarStmt(this,e)}},Vf=class n extends iu{name;params;statements;type;constructor(o,e,t,i,r,s,d){super(r,s,d),this.name=o,this.params=e,this.statements=t,this.type=i||null}isEquivalent(o){return o instanceof n&&Qs(this.params,o.params)&&Qs(this.statements,o.statements)}visitStatement(o,e){return o.visitDeclareFunctionStmt(this,e)}},fa=class n extends iu{expr;constructor(o,e,t){super(ua.None,e,t),this.expr=o}isEquivalent(o){return o instanceof n&&this.expr.isEquivalent(o.expr)}visitStatement(o,e){return o.visitExpressionStmt(this,e)}},Or=class n extends iu{value;constructor(o,e=null,t){super(ua.None,e,t),this.value=o}isEquivalent(o){return o instanceof n&&this.value.isEquivalent(o.value)}visitStatement(o,e){return o.visitReturnStmt(this,e)}},Ex=class n extends iu{condition;trueCase;falseCase;constructor(o,e,t=[],i,r){super(ua.None,i,r),this.condition=o,this.trueCase=e,this.falseCase=t}isEquivalent(o){return o instanceof n&&this.condition.isEquivalent(o.condition)&&Qs(this.trueCase,o.trueCase)&&Qs(this.falseCase,o.falseCase)}visitStatement(o,e){return o.visitIfStmt(this,e)}};function zH(n=[]){return new Tx(n)}function si(n,o,e){return new tc(n,o,e)}function Vt(n,o=null,e){return new eu(n,null,o,e)}function ga(n,o,e){return new xl(n,o,e)}function D0(n){return new Ng(n)}function Ji(n,o,e){return new zc(n,o,e)}function yl(n,o=null){return new ic(n.map(e=>new Rg(e.key,e.value,e.quoted)),o,null)}function VH(n,o){return new zf(n,o)}function bp(n,o,e,t,i){return new xp(n,o,e,t,i)}function Xs(n,o,e,t){return new gu(n,o,e,t)}function T1(n,o,e,t,i){return new Ex(n,o,e,t,i)}function BH(n,o,e,t){return new Ff(n,o,e,t)}function Oe(n,o,e){return new _a(n,o,e)}function jH(n,o,e,t,i){return new Px(n,o,e,t,i)}function k5(n){let o="";if(n.tagName&&(o+=` @${n.tagName}`),n.text){if(n.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');o+=" "+n.text.replace(/@/g,"\\@")}return o}function $H(n){if(n.length===0)return"";if(n.length===1&&n[0].tagName&&!n[0].text)return`*${k5(n[0])} `;let o=`* `;for(let e of n)o+=" *",o+=k5(e).replace(/\n/g,` * `),o+=` `;return o+=" ",o}var HH="_c",UH={},WH=50,Ox=class n extends Wi{resolved;original;shared=!1;constructor(o){super(o.type),this.resolved=o,this.original=o}visitExpression(o,e){return e===UH?this.original.visitExpression(o,e):this.resolved.visitExpression(o,e)}isEquivalent(o){return o instanceof n&&this.resolved.isEquivalent(o.resolved)}isConstant(){return!0}clone(){throw new Error("Not supported.")}fixup(o){this.resolved=o,this.shared=!0}},Dx=class{isClosureCompilerEnabled;statements=[];literals=new Map;literalFactories=new Map;sharedConstants=new Map;_claimedNames=new Map;nextNameIndex=0;constructor(o=!1){this.isClosureCompilerEnabled=o}getConstLiteral(o,e){if(o instanceof _a&&!P5(o)||o instanceof Ox)return o;let t=Bf.INSTANCE.keyOf(o),i=this.literals.get(t),r=!1;if(i||(i=new Ox(o),this.literals.set(t,i),r=!0),!r&&!i.shared||r&&e){let s=this.freshName(),d,m;this.isClosureCompilerEnabled&&P5(o)?(d=new xp([],[new Or(o)]),m=si(s).callFn([])):(d=o,m=si(s)),this.statements.push(new Ur(s,d,ec,ua.Final)),i.fixup(m)}return i}getSharedConstant(o,e){let t=o.keyOf(e);if(!this.sharedConstants.has(t)){let i=this.freshName();this.sharedConstants.set(t,si(i)),this.statements.push(o.toSharedConstantDeclaration(i,e))}return this.sharedConstants.get(t)}getSharedFunctionReference(o,e,t=!0){let i=o instanceof gu;for(let s of this.statements)if(i&&s instanceof Ur&&s.value?.isEquivalent(o)||!i&&s instanceof Vf&&o instanceof xp&&o.isEquivalent(s))return si(s.name);let r=t?this.uniqueName(e):e;return this.statements.push(o instanceof xp?o.toDeclStmt(r,ua.Final):new Ur(r,o,ec,ua.Final,o.sourceSpan)),si(r)}uniqueName(o,e=!0){let t=this._claimedNames.get(o)??0,i=t===0&&!e?`${o}`:`${o}${t}`;return this._claimedNames.set(o,t+1),i}freshName(){return this.uniqueName(HH)}},Bf=class n{static INSTANCE=new n;keyOf(o){if(o instanceof _a&&typeof o.value=="string")return`"${o.value}"`;if(o instanceof _a)return String(o.value);if(o instanceof Fg)return`/${o.body}/${o.flags??""}`;if(o instanceof zc){let e=[];for(let t of o.entries)e.push(this.keyOf(t));return`[${e.join(",")}]`}else if(o instanceof ic){let e=[];for(let t of o.entries)if(t instanceof yp)e.push("..."+this.keyOf(t.expression));else{let i=t.key;t.quoted&&(i=`"${i}"`),e.push(i+":"+this.keyOf(t.value))}return`{${e.join(",")}}`}else{if(o instanceof eu)return`import("${o.value.moduleName}", ${o.value.name})`;if(o instanceof tc)return`read(${o.name})`;if(o instanceof Ng)return`typeof(${this.keyOf(o.expr)})`;if(o instanceof nu)return`...${this.keyOf(o.expression)}`;throw new Error(`${this.constructor.name} does not handle expressions of type ${o.constructor.name}`)}}};function P5(n){return n instanceof _a&&typeof n.value=="string"&&n.value.length>=WH}var xe="@angular/core",ge=(()=>{class n{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 n})(),GH=/-+([a-z0-9])/g;function qH(n){return n.replace(GH,(...o)=>o[1].toUpperCase())}function QH(n,o){return _N(n,":",o)}function KH(n,o){return _N(n,".",o)}function _N(n,o,e){let t=n.indexOf(o);return t==-1?e:[n.slice(0,t).trim(),n.slice(t+1).trim()]}function XH(n){let o=[];for(let e=0;e=55296&&t<=56319&&n.length>e+1){let i=n.charCodeAt(e+1);i>=56320&&i<=57343&&(e++,t=(t-55296<<10)+i-56320+65536)}t<=127?o.push(t):t<=2047?o.push(t>>6&31|192,t&63|128):t<=65535?o.push(t>>12|224,t>>6&63|128,t&63|128):t<=2097151&&o.push(t>>18&7|240,t>>12&63|128,t>>6&63|128,t&63|128)}return o}function fN(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(fN).join(", ")}]`;if(n==null)return""+n;let o=n.overriddenName||n.name;if(o)return`${o}`;if(!n.toString)return"object";let e=n.toString();if(e==null)return""+e;let t=e.indexOf(` `);return t>=0?e.slice(0,t):e}var lP=class{full;major;minor;patch;constructor(o){this.full=o;let e=o.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}},Sf=globalThis,YH=/^([1-9]|1[0-8])\./;function CN(n){return n.startsWith("0.")?!0:!YH.test(n)}var ZH=3,JH="# sourceMappingURL=data:application/json;base64,",cP=class{file;sourcesContent=new Map;lines=[];lastCol0=0;hasMappings=!1;constructor(o=null){this.file=o}addSource(o,e=null){return this.sourcesContent.has(o)||this.sourcesContent.set(o,e),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(o,e,t,i){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(o==null)throw new Error("The column in the generated code must be provided");if(o{o.set(u,h),e.push(u),t.push(this.sourcesContent.get(u)||null)});let i="",r=0,s=0,d=0,m=0;return this.lines.forEach(u=>{r=0,i+=u.map(h=>{let v=nx(h.col0-r);return r=h.col0,h.sourceUrl!=null&&(v+=nx(o.get(h.sourceUrl)-s),s=o.get(h.sourceUrl),v+=nx(h.sourceLine0-d),d=h.sourceLine0,v+=nx(h.sourceCol0-m),m=h.sourceCol0),v}).join(","),i+=";"}),i=i.slice(0,-1),{file:this.file||"",version:ZH,sourceRoot:"",sources:e,sourcesContent:t,mappings:i}}toJsComment(){return this.hasMappings?"//"+JH+eU(JSON.stringify(this,null,0)):""}};function eU(n){let o="",e=XH(n);for(let t=0;t>2),o+=xf((i&3)<<4|(r===null?0:r>>4)),o+=r===null?"=":xf((r&15)<<2|(s===null?0:s>>6)),o+=r===null||s===null?"=":xf(s&63)}return o}function nx(n){n=n<0?(-n<<1)+1:n<<1;let o="";do{let e=n&31;n=n>>5,n>0&&(e=e|32),o+=xf(e)}while(n>0);return o}var tU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function xf(n){if(n<0||n>=64)throw new Error("Can only encode value in the range [0, 63]");return tU[n]}var nU=/'|\\|\n|\r|\$/g,iU=/^[$A-Z_][0-9A-Z_$]*$/i,dP=" ",Ix=class{indent;partsLength=0;parts=[];srcSpans=[];constructor(o){this.indent=o}},oU=new Map([[lt.And,"&&"],[lt.Bigger,">"],[lt.BiggerEquals,">="],[lt.BitwiseOr,"|"],[lt.BitwiseAnd,"&"],[lt.Divide,"/"],[lt.Assign,"="],[lt.Equals,"=="],[lt.Identical,"==="],[lt.Lower,"<"],[lt.LowerEquals,"<="],[lt.Minus,"-"],[lt.Modulo,"%"],[lt.Exponentiation,"**"],[lt.Multiply,"*"],[lt.NotEquals,"!="],[lt.NotIdentical,"!=="],[lt.NullishCoalesce,"??"],[lt.Or,"||"],[lt.Plus,"+"],[lt.In,"in"],[lt.InstanceOf,"instanceof"],[lt.AdditionAssignment,"+="],[lt.SubtractionAssignment,"-="],[lt.MultiplicationAssignment,"*="],[lt.DivisionAssignment,"/="],[lt.RemainderAssignment,"%="],[lt.ExponentiationAssignment,"**="],[lt.AndAssignment,"&&="],[lt.OrAssignment,"||="],[lt.NullishCoalesceAssignment,"??="]]),pP=class n{_indent;static createRoot(){return new n(0)}_lines;constructor(o){this._indent=o,this._lines=[new Ix(o)]}get _currentLine(){return this._lines[this._lines.length-1]}println(o,e=""){this.print(o||null,e,!0)}lineIsEmpty(){return this._currentLine.parts.length===0}lineLength(){return this._currentLine.indent*dP.length+this._currentLine.partsLength}print(o,e,t=!1){e.length>0&&(this._currentLine.parts.push(e),this._currentLine.partsLength+=e.length,this._currentLine.srcSpans.push(o&&o.sourceSpan||null)),t&&this._lines.push(new Ix(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(o=>o.parts.length>0?T5(o.indent)+o.parts.join(""):"").join(` `)}toSourceMapGenerator(o,e=0){let t=new cP(o),i=!1,r=()=>{i||(t.addSource(o," ").addMapping(0,o,0,0),i=!0)};for(let s=0;s{t.addLine();let m=s.srcSpans,u=s.parts,h=s.indent*dP.length,v=0;for(;vi)return t.srcSpans[r];i-=s.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}},mP=class{_escapeDollarInStrings;lastIfCondition=null;constructor(o){this._escapeDollarInStrings=o}printLeadingComments(o,e){if(o.leadingComments!==void 0)for(let t of o.leadingComments)t instanceof Tx?e.print(o,`/*${t.toString()}*/`,t.trailingNewline):t.multiline?e.print(o,`/* ${t.text} */`,t.trailingNewline):t.text.split(` `).forEach(i=>{e.println(o,`// ${i}`)})}visitExpressionStmt(o,e){return this.printLeadingComments(o,e),o.expr.visitExpression(this,e),e.println(o,";"),null}visitReturnStmt(o,e){return this.printLeadingComments(o,e),e.print(o,"return "),o.value.visitExpression(this,e),e.println(o,";"),null}visitIfStmt(o,e){this.printLeadingComments(o,e),e.print(o,"if ("),this.lastIfCondition=o.condition,o.condition.visitExpression(this,e),this.lastIfCondition=null,e.print(o,") {");let t=o.falseCase!=null&&o.falseCase.length>0;return o.trueCase.length<=1&&!t?(e.print(o," "),this.visitAllStatements(o.trueCase,e),e.removeEmptyLastLine(),e.print(o," ")):(e.println(),e.incIndent(),this.visitAllStatements(o.trueCase,e),e.decIndent(),t&&(e.println(o,"} else {"),e.incIndent(),this.visitAllStatements(o.falseCase,e),e.decIndent())),e.println(o,"}"),null}visitInvokeFunctionExpr(o,e){let t=o.fn instanceof gu;return t&&e.print(o.fn,"("),o.fn.visitExpression(this,e),t&&e.print(o.fn,")"),e.print(o,"("),this.visitAllExpressions(o.args,e,","),e.print(o,")"),null}visitTaggedTemplateLiteralExpr(o,e){return o.tag.visitExpression(this,e),o.template.visitExpression(this,e),null}visitTemplateLiteralExpr(o,e){e.print(o,"`");for(let t=0;t{t instanceof yp?(e.print(o,"..."),t.expression.visitExpression(this,e)):(e.print(o,`${$m(t.key,this._escapeDollarInStrings,t.quoted)}:`),t.value.visitExpression(this,e))},o.entries,e,","),e.print(o,"}"),null}visitCommaExpr(o,e){return e.print(o,"("),this.visitAllExpressions(o.parts,e,","),e.print(o,")"),null}visitParenthesizedExpr(o,e){o.expr.visitExpression(this,e)}visitSpreadElementExpr(o,e){e.print(o,"..."),o.expression.visitExpression(this,e)}visitAllExpressions(o,e,t){this.visitAllObjects(i=>i.visitExpression(this,e),o,e,t)}visitAllObjects(o,e,t,i){let r=!1;for(let s=0;s0&&(t.lineLength()>80?(t.print(null,i,!0),r||(t.incIndent(),t.incIndent(),r=!0)):t.print(null,i,!1)),o(e[s]);r&&(t.decIndent(),t.decIndent())}visitAllStatements(o,e){o.forEach(t=>t.visitStatement(this,e))}};function $m(n,o,e=!0){if(n==null)return null;let t=n.replace(nU,(...r)=>r[0]=="$"?o?"\\$":"$":r[0]==` `?"\\n":r[0]=="\r"?"\\r":`\\${r[0]}`);return e||!iU.test(t)?`'${t}'`:t}function T5(n){let o="";for(let e=0;et.value));return o?Xs([],e):e}function RT(n,o){return{expression:n,forwardRef:o}}function lU({expression:n,forwardRef:o}){switch(o){case 0:case 1:return n;case 2:return cU(n)}}function cU(n){return Vt(ge.forwardRef).callFn([Xs([],n)])}var Ax=(function(n){return n[n.Class=0]="Class",n[n.Function=1]="Function",n})(Ax||{});function Vm(n){let o=si("__ngFactoryType__"),e=null,t=O5(n)?o:new Si(lt.Or,o,n.type.value),i=null;n.deps!==null?n.deps!=="invalid"&&(i=new Rf(t,E5(n.deps,n.target))):(e=si(`\u0275${n.name}_BaseFactory`),i=e.callFn([t]));let r=[],s=null;function d(u){let h=si("__ngConditionalFactory__");r.push(new Ur(h.name,Lg,ec));let v=i!==null?h.set(i).toStmt():Vt(ge.invalidFactory).callFn([]).toStmt();return r.push(T1(o,[v],[h.set(u).toStmt()])),h}if(O5(n)){let u=E5(n.delegateDeps,n.target),h=new(n.delegateType===Ax.Class?Rf:ys)(n.delegate,u);s=d(h)}else gU(n)?s=d(n.expression):s=i;if(s===null)r.push(Vt(ge.invalidFactory).callFn([]).toStmt());else if(e!==null){let u=Vt(ge.getInheritedFactory).callFn([n.type.value]),h=new Si(lt.Or,e,e.set(u));r.push(new Or(h.callFn([t])))}else r.push(new Or(s));let m=bp([new Er(o.name,xs)],r,ec,void 0,`${n.name}_Factory`);return e!==null&&(m=Xs([],[new Ur(e.name),new Or(m)]).callFn([],void 0,!0)),{expression:m,statements:[],type:dU(n)}}function dU(n){let o=n.deps!==null&&n.deps!=="invalid"?mU(n.deps):Rc;return ga(Vt(ge.FactoryDeclaration,[E1(n.type.type,n.typeArgumentCount),o]))}function E5(n,o){return n.map((e,t)=>pU(e,o,t))}function pU(n,o,e){if(n.token===null)return Vt(ge.invalidFactoryDep).callFn([Oe(e)]);if(n.attributeNameType===null){let t=0|(n.self?2:0)|(n.skipSelf?4:0)|(n.host?1:0)|(n.optional?8:0)|(o===kd.Pipe?16:0),i=t!==0||n.optional?Oe(t):null,r=[n.token];i&&r.push(i);let s=hU(o);return Vt(s).callFn(r)}else return Vt(ge.injectAttribute).callFn([n.token])}function mU(n){let o=!1,e=n.map(t=>{let i=uU(t);return i!==null?(o=!0,i):Oe(null)});return o?ga(Ji(e)):Rc}function uU(n){let o=[];return n.attributeNameType!==null&&o.push({key:"attribute",value:n.attributeNameType,quoted:!1}),n.optional&&o.push({key:"optional",value:Oe(!0),quoted:!1}),n.host&&o.push({key:"host",value:Oe(!0),quoted:!1}),n.self&&o.push({key:"self",value:Oe(!0),quoted:!1}),n.skipSelf&&o.push({key:"skipSelf",value:Oe(!0),quoted:!1}),o.length>0?yl(o):null}function O5(n){return n.delegateType!==void 0}function gU(n){return n.expression!==void 0}function hU(n){switch(n){case kd.Component:case kd.Directive:case kd.Pipe:return ge.directiveInject;case kd.NgModule:case kd.Injectable:default:return ge.inject}}var ou=class{start;end;constructor(o,e){this.start=o,this.end=e}toAbsolute(o){return new Gs(o+this.start,o+this.end)}},so=class{span;sourceSpan;constructor(o,e){this.span=o,this.sourceSpan=e}toString(){return"AST"}},jf=class extends so{nameSpan;constructor(o,e,t){super(o,e),this.nameSpan=t}},Ea=class extends so{visit(o,e=null){return o.visitEmptyExpr?.(this,e)}},Vc=class extends so{visit(o,e=null){return o.visitImplicitReceiver(this,e)}},$f=class extends so{visit(o,e=null){return o.visitThisReceiver?.(this,e)}},zg=class extends so{expressions;constructor(o,e,t){super(o,e),this.expressions=t}visit(o,e=null){return o.visitChain(this,e)}},Nx=class extends so{condition;trueExp;falseExp;constructor(o,e,t,i,r){super(o,e),this.condition=t,this.trueExp=i,this.falseExp=r}visit(o,e=null){return o.visitConditional(this,e)}},Ac=class extends jf{receiver;name;constructor(o,e,t,i,r){super(o,e,t),this.receiver=i,this.name=r}visit(o,e=null){return o.visitPropertyRead(this,e)}},Hf=class extends jf{receiver;name;constructor(o,e,t,i,r){super(o,e,t),this.receiver=i,this.name=r}visit(o,e=null){return o.visitSafePropertyRead(this,e)}},ru=class extends so{receiver;key;constructor(o,e,t,i){super(o,e),this.receiver=t,this.key=i}visit(o,e=null){return o.visitKeyedRead(this,e)}},Uf=class extends so{receiver;key;constructor(o,e,t,i){super(o,e),this.receiver=t,this.key=i}visit(o,e=null){return o.visitSafeKeyedRead(this,e)}},_x=(function(n){return n[n.ReferencedByName=0]="ReferencedByName",n[n.ReferencedDirectly=1]="ReferencedDirectly",n})(_x||{}),Fx=class extends jf{exp;name;args;type;constructor(o,e,t,i,r,s,d){super(o,e,d),this.exp=t,this.name=i,this.args=r,this.type=s}visit(o,e=null){return o.visitPipe(this,e)}},_s=class extends so{value;constructor(o,e,t){super(o,e),this.value=t}visit(o,e=null){return o.visitLiteralPrimitive(this,e)}},Wf=class extends so{expressions;constructor(o,e,t){super(o,e),this.expressions=t}visit(o,e=null){return o.visitLiteralArray(this,e)}},Rx=class extends so{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitSpreadElement(this,e)}},au=class extends so{keys;values;constructor(o,e,t,i){super(o,e),this.keys=t,this.values=i}visit(o,e=null){return o.visitLiteralMap(this,e)}},I0=class extends so{strings;expressions;constructor(o,e,t,i){super(o,e),this.strings=t,this.expressions=i}visit(o,e=null){return o.visitInterpolation(this,e)}},qa=class extends so{operation;left;right;constructor(o,e,t,i,r){super(o,e),this.operation=t,this.left=i,this.right=r}visit(o,e=null){return o.visitBinary(this,e)}static isAssignmentOperation(o){return o==="="||o==="+="||o==="-="||o==="*="||o==="/="||o==="%="||o==="**="||o==="&&="||o==="||="||o==="??="}},Dg=class n extends qa{operator;expr;left=null;right=null;operation=null;static createMinus(o,e,t){return new n(o,e,"-",t,"-",new _s(o,e,0),t)}static createPlus(o,e,t){return new n(o,e,"+",t,"-",t,new _s(o,e,0))}constructor(o,e,t,i,r,s,d){super(o,e,r,s,d),this.operator=t,this.expr=i}visit(o,e=null){return o.visitUnary!==void 0?o.visitUnary(this,e):o.visitBinary(this,e)}},Gf=class extends so{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitPrefixNot(this,e)}},qf=class extends so{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitTypeofExpression(this,e)}},Qf=class extends so{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitVoidExpression(this,e)}},Kf=class extends so{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitNonNullAssert(this,e)}},Vg=class extends so{receiver;args;argumentSpan;constructor(o,e,t,i,r){super(o,e),this.receiver=t,this.args=i,this.argumentSpan=r}visit(o,e=null){return o.visitCall(this,e)}},Lx=class extends so{receiver;args;argumentSpan;constructor(o,e,t,i,r){super(o,e),this.receiver=t,this.args=i,this.argumentSpan=r}visit(o,e=null){return o.visitSafeCall(this,e)}},Xf=class extends so{tag;template;constructor(o,e,t,i){super(o,e),this.tag=t,this.template=i}visit(o,e){return o.visitTaggedTemplateLiteral(this,e)}},Yf=class extends so{elements;expressions;constructor(o,e,t,i){super(o,e),this.elements=t,this.expressions=i}visit(o,e){return o.visitTemplateLiteral(this,e)}},zx=class extends so{text;constructor(o,e,t){super(o,e),this.text=t}visit(o,e){return o.visitTemplateLiteralElement(this,e)}},Zf=class extends so{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e){return o.visitParenthesizedExpression(this,e)}},uP=class{name;span;sourceSpan;constructor(o,e,t){this.name=o,this.span=e,this.sourceSpan=t}},Vx=class extends so{parameters;body;constructor(o,e,t,i){super(o,e),this.parameters=t,this.body=i}visit(o,e){return o.visitArrowFunction(this,e)}},Bx=class extends so{body;flags;constructor(o,e,t,i){super(o,e),this.body=t,this.flags=i}visit(o,e){return o.visitRegularExpressionLiteral(this,e)}},Gs=class{start;end;constructor(o,e){this.start=o,this.end=e}},Cs=class extends so{ast;source;location;errors;constructor(o,e,t,i,r){super(new ou(0,e===null?0:e.length),new Gs(i,e===null?i:i+e.length)),this.ast=o,this.source=e,this.location=t,this.errors=r}visit(o,e=null){return o.visitASTWithSource?o.visitASTWithSource(this,e):this.ast.visit(o,e)}toString(){return`${this.source} in ${this.location}`}},Jf=class{sourceSpan;key;value;constructor(o,e,t){this.sourceSpan=o,this.key=e,this.value=t}},gP=class{sourceSpan;key;value;constructor(o,e,t){this.sourceSpan=o,this.key=e,this.value=t}},Bg=class{visit(o,e){o.visit(this,e)}visitUnary(o,e){this.visit(o.expr,e)}visitBinary(o,e){this.visit(o.left,e),this.visit(o.right,e)}visitChain(o,e){this.visitAll(o.expressions,e)}visitConditional(o,e){this.visit(o.condition,e),this.visit(o.trueExp,e),this.visit(o.falseExp,e)}visitPipe(o,e){this.visit(o.exp,e),this.visitAll(o.args,e)}visitImplicitReceiver(o,e){}visitThisReceiver(o,e){}visitInterpolation(o,e){this.visitAll(o.expressions,e)}visitKeyedRead(o,e){this.visit(o.receiver,e),this.visit(o.key,e)}visitLiteralArray(o,e){this.visitAll(o.expressions,e)}visitLiteralMap(o,e){this.visitAll(o.values,e)}visitLiteralPrimitive(o,e){}visitPrefixNot(o,e){this.visit(o.expression,e)}visitTypeofExpression(o,e){this.visit(o.expression,e)}visitVoidExpression(o,e){this.visit(o.expression,e)}visitNonNullAssert(o,e){this.visit(o.expression,e)}visitPropertyRead(o,e){this.visit(o.receiver,e)}visitSafePropertyRead(o,e){this.visit(o.receiver,e)}visitSafeKeyedRead(o,e){this.visit(o.receiver,e),this.visit(o.key,e)}visitCall(o,e){this.visit(o.receiver,e),this.visitAll(o.args,e)}visitSafeCall(o,e){this.visit(o.receiver,e),this.visitAll(o.args,e)}visitTemplateLiteral(o,e){for(let t=0;tt!==null);Rk(o,e)}visitTriggers(o,e,t){Rk(t,o.map(i=>e[i]))}},Gx=class extends bs{expression;groups;unknownBlocks;exhaustiveCheck;constructor(o,e,t,i,r,s,d,m){super(m,r,s,d),this.expression=o,this.groups=e,this.unknownBlocks=t,this.exhaustiveCheck=i}visit(o){return o.visitSwitchBlock(this)}},MP=class extends bs{expression;constructor(o,e,t,i,r){super(r,e,t,i),this.expression=o}visit(o){return o.visitSwitchBlockCase(this)}},o0=class extends bs{cases;children;i18n;constructor(o,e,t,i,r,s,d){super(s,t,i,r),this.cases=o,this.children=e,this.i18n=d}visit(o){return o.visitSwitchBlockCaseGroup(this)}},SP=class extends bs{constructor(o,e,t,i){super(i,o,e,t)}visit(o){return o.visitSwitchExhaustiveCheck(this)}},Hg=class extends bs{item;expression;trackBy;trackKeywordSpan;contextVariables;children;empty;mainBlockSpan;i18n;constructor(o,e,t,i,r,s,d,m,u,h,v,b,y){super(b,m,h,v),this.item=o,this.expression=e,this.trackBy=t,this.trackKeywordSpan=i,this.contextVariables=r,this.children=s,this.empty=d,this.mainBlockSpan=u,this.i18n=y}visit(o){return o.visitForLoopBlock(this)}},r0=class extends bs{children;i18n;constructor(o,e,t,i,r,s){super(r,e,t,i),this.children=o,this.i18n=s}visit(o){return o.visitForLoopBlockEmpty(this)}},qx=class extends bs{branches;constructor(o,e,t,i,r){super(r,e,t,i),this.branches=o}visit(o){return o.visitIfBlock(this)}},qm=class extends bs{expression;children;expressionAlias;i18n;constructor(o,e,t,i,r,s,d,m){super(d,i,r,s),this.expression=o,this.children=e,this.expressionAlias=t,this.i18n=m}visit(o){return o.visitIfBlockBranch(this)}},Qx=class{name;sourceSpan;nameSpan;constructor(o,e,t){this.name=o,this.sourceSpan=e,this.nameSpan=t}visit(o){return o.visitUnknownBlock(this)}},LT=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(o,e,t,i,r){this.name=o,this.value=e,this.sourceSpan=t,this.nameSpan=i,this.valueSpan=r}visit(o){return o.visitLetDeclaration(this)}},kf=class{componentName;tagName;fullName;attributes;inputs;outputs;directives;children;references;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(o,e,t,i,r,s,d,m,u,h,v,b,y,x){this.componentName=o,this.tagName=e,this.fullName=t,this.attributes=i,this.inputs=r,this.outputs=s,this.directives=d,this.children=m,this.references=u,this.isSelfClosing=h,this.sourceSpan=v,this.startSourceSpan=b,this.endSourceSpan=y,this.i18n=x}visit(o){return o.visitComponent(this)}},vN=class{name;attributes;inputs;outputs;references;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(o,e,t,i,r,s,d,m,u){this.name=o,this.attributes=e,this.inputs=t,this.outputs=i,this.references=r,this.sourceSpan=s,this.startSourceSpan=d,this.endSourceSpan=m,this.i18n=u}visit(o){return o.visitDirective(this)}},qs=class{tagName;attributes;inputs;outputs;directives;templateAttrs;children;references;variables;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(o,e,t,i,r,s,d,m,u,h,v,b,y,x){this.tagName=o,this.attributes=e,this.inputs=t,this.outputs=i,this.directives=r,this.templateAttrs=s,this.children=d,this.references=m,this.variables=u,this.isSelfClosing=h,this.sourceSpan=v,this.startSourceSpan=b,this.endSourceSpan=y,this.i18n=x}visit(o){return o.visitTemplate(this)}},Ug=class{selector;attributes;children;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;name="ng-content";constructor(o,e,t,i,r,s,d,m){this.selector=o,this.attributes=e,this.children=t,this.isSelfClosing=i,this.sourceSpan=r,this.startSourceSpan=s,this.endSourceSpan=d,this.i18n=m}visit(o){return o.visitContent(this)}},wp=class{name;value;sourceSpan;keySpan;valueSpan;constructor(o,e,t,i,r){this.name=o,this.value=e,this.sourceSpan=t,this.keySpan=i,this.valueSpan=r}visit(o){return o.visitVariable(this)}},a0=class{name;value;sourceSpan;keySpan;valueSpan;constructor(o,e,t,i,r){this.name=o,this.value=e,this.sourceSpan=t,this.keySpan=i,this.valueSpan=r}visit(o){return o.visitReference(this)}},xN=class{vars;placeholders;sourceSpan;i18n;constructor(o,e,t,i){this.vars=o,this.placeholders=e,this.sourceSpan=t,this.i18n=i}visit(o){return o.visitIcu(this)}},s0=class{tagNames;bindings;listeners;sourceSpan;constructor(o,e,t,i){if(this.tagNames=o,this.bindings=e,this.listeners=t,this.sourceSpan=i,o.length===0)throw new Error("HostElement must have at least one tag name.")}visit(){throw new Error("HostElement cannot be visited")}};function Rk(n,o){let e=[];if(n.visit)for(let t of o)n.visit(t);else for(let t of o){let i=t.visit(n);i&&e.push(i)}return e}var Ja=class{nodes;placeholders;placeholderToMessage;meaning;description;customId;sources;id;legacyIds=[];messageString;constructor(o,e,t,i,r,s){this.nodes=o,this.placeholders=e,this.placeholderToMessage=t,this.meaning=i,this.description=r,this.customId=s,this.id=this.customId,this.messageString=fU(this.nodes),o.length?this.sources=[{filePath:o[0].sourceSpan.start.file.url,startLine:o[0].sourceSpan.start.line+1,startCol:o[0].sourceSpan.start.col+1,endLine:o[o.length-1].sourceSpan.end.line+1,endCol:o[0].sourceSpan.start.col+1}]:this.sources=[]}},df=class{value;sourceSpan;constructor(o,e){this.value=o,this.sourceSpan=e}visit(o,e){return o.visitText(this,e)}},Ed=class{children;sourceSpan;constructor(o,e){this.children=o,this.sourceSpan=e}visit(o,e){return o.visitContainer(this,e)}},Kx=class{expression;type;cases;sourceSpan;expressionPlaceholder;constructor(o,e,t,i,r){this.expression=o,this.type=e,this.cases=t,this.sourceSpan=i,this.expressionPlaceholder=r}visit(o,e){return o.visitIcu(this,e)}},Mp=class{tag;attrs;startName;closeName;children;isVoid;sourceSpan;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r,s,d,m,u){this.tag=o,this.attrs=e,this.startName=t,this.closeName=i,this.children=r,this.isVoid=s,this.sourceSpan=d,this.startSourceSpan=m,this.endSourceSpan=u}visit(o,e){return o.visitTagPlaceholder(this,e)}},l0=class{value;name;sourceSpan;constructor(o,e,t){this.value=o,this.name=e,this.sourceSpan=t}visit(o,e){return o.visitPlaceholder(this,e)}},Wg=class{value;name;sourceSpan;previousMessage;constructor(o,e,t){this.value=o,this.name=e,this.sourceSpan=t}visit(o,e){return o.visitIcuPlaceholder(this,e)}},Sp=class{name;parameters;startName;closeName;children;sourceSpan;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r,s,d,m){this.name=o,this.parameters=e,this.startName=t,this.closeName=i,this.children=r,this.sourceSpan=s,this.startSourceSpan=d,this.endSourceSpan=m}visit(o,e){return o.visitBlockPlaceholder(this,e)}};function fU(n){let o=new kP;return n.map(t=>t.visit(o)).join("")}var kP=class{visitText(o){return o.value}visitContainer(o){return o.children.map(e=>e.visit(this)).join("")}visitIcu(o){let e=Object.keys(o.cases).map(t=>`${t} {${o.cases[t].visit(this)}}`);return`{${o.expressionPlaceholder}, ${o.type}, ${e.join(" ")}}`}visitTagPlaceholder(o){let e=o.children.map(t=>t.visit(this)).join("");return`{$${o.startName}}${e}{$${o.closeName}}`}visitPlaceholder(o){return`{$${o.name}}`}visitIcuPlaceholder(o){return`{$${o.name}}`}visitBlockPlaceholder(o){let e=o.children.map(t=>t.visit(this)).join("");return`{$${o.startName}}${e}{$${o.closeName}}`}};var CU=class{visitTag(o){let e=this._serializeAttributes(o.attrs);if(o.children.length==0)return`<${o.name}${e}/>`;let t=o.children.map(i=>i.visit(this));return`<${o.name}${e}>${t.join("")}`}visitText(o){return o.value}visitDeclaration(o){return``}_serializeAttributes(o){let e=Object.keys(o).map(t=>`${t}="${o[t]}"`).join(" ");return e.length>0?" "+e:""}visitDoctype(o){return``}},Ije=new CU;function vU(n){return n.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}var yN="i18n",PP="i18n-",xU="VAR_";function bN(n){return n===yN||n.startsWith(PP)}function yU(n){return n.attrs.some(o=>bN(o.name))}function wN(n){return n.nodes[0]}function zT(n={},o){let e={};return n&&Object.keys(n).length&&Object.keys(n).forEach(t=>e[A0(t,o)]=n[t]),e}function A0(n,o=!0){let e=vU(n);if(!o)return e;let t=e.split("_");if(t.length===1)return n.toLowerCase();let i;/^\d+$/.test(t[t.length-1])&&(i=t.pop());let r=t.shift().toLowerCase();return t.length&&(r+=t.map(s=>s.charAt(0).toUpperCase()+s.slice(1).toLowerCase()).join("")),i?`${r}_${i}`:r}var bU=/[-.]/,VT="_t",Ys="ctx",Jg="rf";function MN(n,o){let e=null;return()=>(e||(n(new Ur(VT,void 0,xs)),e=si(o)),e)}function kg(n){return Array.isArray(n)?Ji(n.map(kg)):Oe(n,ec)}function I5(n,o){let e=Object.getOwnPropertyNames(n);return e.length===0?null:yl(e.map(t=>{let i=n[t],r,s,d,m;if(typeof i=="string")r=t,d=t,s=i,m=kg(s);else{d=t,r=i.classPropertyName,s=i.bindingPropertyName;let u=s!==r,h=i.transformFunction!==null,v=vf.None;if(i.isSignal&&(v|=vf.SignalBased),h&&(v|=vf.HasDecoratorInputTransform),o&&(u||h||v!==vf.None)){let b=[Oe(v),kg(s)];(u||h)&&(b.push(kg(r)),h&&b.push(i.transformFunction)),m=Ji(b)}else m=kg(s)}return{key:d,quoted:bU.test(d),value:m}}))}var kp=class{values=[];set(o,e){if(e){let t=this.values.find(i=>i.key===o);t?t.value=e:this.values.push({key:o,value:e,quoted:!1})}}toLiteralMap(){return yl(this.values)}};function wU(n){let o=n instanceof Bc?n.name:"ng-template",e=MU(n),t=new Ag,i=ha(o)[1];return t.setElement(i),Object.getOwnPropertyNames(e).forEach(r=>{let s=ha(r)[1],d=e[r];t.addAttribute(s,d),r.toLowerCase()==="class"&&d.trim().split(/\s+/).forEach(u=>t.addClassName(u))}),t}function MU(n){let o={};return n instanceof qs&&n.tagName!=="ng-template"?n.templateAttrs.forEach(e=>o[e.name]=""):(n.attributes.forEach(e=>{bN(e.name)||(o[e.name]=e.value)}),n.inputs.forEach(e=>{(e.type===Fi.Property||e.type===Fi.TwoWay)&&(o[e.name]="")}),n.outputs.forEach(e=>{o[e.name]=""})),o}function A5(n,o){let e=null,t={name:n.name,type:n.type,typeArgumentCount:n.typeArgumentCount,deps:[],target:kd.Injectable};if(n.useClass!==void 0){let d=n.useClass.expression.isEquivalent(n.type.value),m;n.deps!==void 0&&(m=n.deps),m!==void 0?e=Vm(Le(q({},t),{delegate:n.useClass.expression,delegateDeps:m,delegateType:Ax.Class})):d?e=Vm(t):e={statements:[],expression:N5(n.type.value,n.useClass.expression,o)}}else n.useFactory!==void 0?n.deps!==void 0?e=Vm(Le(q({},t),{delegate:n.useFactory,delegateDeps:n.deps||[],delegateType:Ax.Function})):e={statements:[],expression:Xs([],n.useFactory.callFn([]))}:n.useValue!==void 0?e=Vm(Le(q({},t),{expression:n.useValue.expression})):n.useExisting!==void 0?e=Vm(Le(q({},t),{expression:Vt(ge.inject).callFn([n.useExisting.expression])})):e={statements:[],expression:N5(n.type.value,n.type.value,o)};let i=n.type.value,r=new kp;return r.set("token",i),r.set("factory",e.expression),n.providedIn.expression.value!==null&&r.set("providedIn",lU(n.providedIn)),{expression:Vt(ge.\u0275\u0275defineInjectable).callFn([r.toLiteralMap()],void 0,!0),type:SU(n),statements:e.statements}}function SU(n){return new xl(Vt(ge.InjectableDeclaration,[E1(n.type.type,n.typeArgumentCount)]))}function N5(n,o,e){if(n.node===o.node)return o.prop("\u0275fac");if(!e)return F5(o);let t=Vt(ge.resolveForwardRef).callFn([o]);return F5(t)}function F5(n){let o=new Er("__ngFactoryType__",xs);return Xs([o],n.prop("\u0275fac").callFn([si(o.name)]))}var ia=0,kU=8,BT=9,Qm=10,SN=11,kN=12,jT=13,PN=32,TP=33,c0=34,TN=35,D1=36,PU=37,Xx=38,d0=39,Ya=40,Pr=41,R5=42,EN=43,Oa=44,Yx=45,Lm=46,ul=47,Dc=58,fs=59,Ig=60,ta=61,Us=62,L5=63,$T=48,TU=55,ON=57,Ip=65,EU=69,OU=70,DU=88,eh=90,Nc=91,Km=92,Pd=93,IU=94,Ap=95,lu=97,AU=98,NU=101,HT=102,DN=110,IN=114,AN=116,NN=117,FN=118,RN=120,N0=122,_l=123,z5=124,Ka=125,LN=160,fg=64,EP=96;function p0(n){return n>=BT&&n<=PN||n==LN}function gl(n){return $T<=n&&n<=ON}function Pp(n){return n>=lu&&n<=N0||n>=Ip&&n<=eh}function FU(n){return n>=lu&&n<=HT||n>=Ip&&n<=OU||gl(n)}function Zx(n){return n===Qm||n===jT}function V5(n){return $T<=n&&n<=TU}function Pf(n){return n===d0||n===c0||n===EP}var m0=class n{file;offset;line;col;constructor(o,e,t,i){this.file=o,this.offset=e,this.line=t,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(o){let e=this.file.content,t=e.length,i=this.offset,r=this.line,s=this.col;for(;i>0&&o<0;)if(i--,o++,e.charCodeAt(i)==Qm){r--;let m=e.substring(0,i-1).lastIndexOf(String.fromCharCode(Qm));s=m>0?i-m:i}else s--;for(;i0;){let d=e.charCodeAt(i);i++,o--,d==Qm?(r++,s=0):s++}return new n(this.file,i,r,s)}getContext(o,e){let t=this.file.content,i=this.offset;if(i!=null){i>t.length-1&&(i=t.length-1);let r=i,s=0,d=0;for(;s0&&(i--,s++,!(t[i]==` `&&++d==e)););for(s=0,d=0;s]${o.after}")`:this.msg}toString(){let o=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${o}`}};function RU(n,o,e){let t=`in ${n} ${o} in ${e}`,i=new Jx("",t);return new On(new m0(i,-1,-1,-1),new m0(i,-1,-1,-1))}var LU=0;function zU(n){if(!n||!n.reference)return null;let o=n.reference;if(o.__anonymousType)return o.__anonymousType;if(o.__forward_ref__)return"__forward_ref__";let e=fN(o);return e.indexOf("(")>=0?(e=`anonymous_${LU++}`,o.__anonymousType=e):e=Bm(e),e}function Bm(n){return n.replace(/\W/g,"_")}var B5='(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})',OP=class extends mP{constructor(){super(!1)}visitWrappedNodeExpr(o,e){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitDeclareVarStmt(o,e){return e.print(o,`var ${o.name}`),o.value&&(e.print(o," = "),o.value.visitExpression(this,e)),e.println(o,";"),null}visitTaggedTemplateLiteralExpr(o,e){let t=o.template.elements;return o.tag.visitExpression(this,e),e.print(o,`(${B5}(`),e.print(o,`[${t.map(i=>$m(i.text,!1)).join(", ")}], `),e.print(o,`[${t.map(i=>$m(i.rawText,!1)).join(", ")}])`),o.template.expressions.forEach(i=>{e.print(o,", "),i.visitExpression(this,e)}),e.print(o,")"),null}visitTemplateLiteralExpr(o,e){e.print(o,"`");for(let t=0;t"),Array.isArray(o.body))e.println(o,"{"),e.incIndent(),this.visitAllStatements(o.body,e),e.decIndent(),e.print(o,"}");else{let t=o.body instanceof ic;t&&e.print(o,"("),o.body.visitExpression(this,e),t&&e.print(o,")")}return null}visitDeclareFunctionStmt(o,e){return e.print(o,`function ${o.name}(`),this._visitParams(o.params,e),e.println(o,") {"),e.incIndent(),this.visitAllStatements(o.statements,e),e.decIndent(),e.println(o,"}"),null}visitLocalizedString(o,e){e.print(o,`$localize(${B5}(`);let t=[o.serializeI18nHead()];for(let i=1;i$m(i.cooked,!1)).join(", ")}], `),e.print(o,`[${t.map(i=>$m(i.raw,!1)).join(", ")}])`),o.expressions.forEach(i=>{e.print(o,", "),i.visitExpression(this,e)}),e.print(o,")"),null}_visitParams(o,e){this.visitAllObjects(t=>e.print(null,t.name),o,e,",")}},ix;function VU(){if(ix===void 0){let n=Sf.trustedTypes;if(ix=null,n)try{ix=n.createPolicy("angular#unsafe-jit",{createScript:o=>o})}catch{}}return ix}function BU(n){return VU()?.createScript(n)||n}function j5(...n){if(!Sf.trustedTypes)return new Function(...n);let o=n.slice(0,-1).join(","),e=n[n.length-1],t=`(function anonymous(${o} ) { ${e} })`,i=Sf.eval(BU(t));return i.bind===void 0?new Function(...n):(i.toString=()=>t,i.bind(Sf))}var DP=class{evaluateStatements(o,e,t,i){let r=new IP(t),s=pP.createRoot();return e.length>0&&!jU(e[0])&&(e=[Oe("use strict").toStmt(),...e]),r.visitAllStatements(e,s),r.createReturnStmt(s),this.evaluateCode(o,s,r.getArgs(),i)}evaluateCode(o,e,t,i){let r=`"use strict";${e.toSource()} //# sourceURL=${o}`,s=[],d=[];for(let u in t)d.push(t[u]),s.push(u);if(i){let u=j5(...s.concat("return null;")).toString(),h=u.slice(0,u.indexOf("return null;")).split(` `).length-1;r+=` ${e.toSourceMapGenerator(o,h).toJsComment()}`}let m=j5(...s.concat(r));return this.executeFunction(m,d)}executeFunction(o,e){return o(...e)}},IP=class extends OP{refResolver;_evalArgNames=[];_evalArgValues=[];_evalExportedVars=[];constructor(o){super(),this.refResolver=o}createReturnStmt(o){new Or(new ic(this._evalExportedVars.map(t=>new Rg(t,si(t),!1)))).visitStatement(this,o)}getArgs(){let o={};for(let e=0;e0&&o.set("imports",Ji(n.imports));let e=Vt(ge.defineInjector).callFn([o.toLiteralMap()],void 0,!0),t=$U(n);return{expression:e,type:t,statements:[]}}function $U(n){return new xl(Vt(ge.InjectorDeclaration,[new xl(n.type.type)]))}var AP=class{context;constructor(o){this.context=o}resolveExternalReference(o){if(o.moduleName!=="@angular/core")throw new Error(`Cannot resolve external reference to ${o.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(o.name))throw new Error(`No value provided for @angular/core symbol '${o.name}'.`);return this.context[o.name]}},e1=(function(n){return n[n.Inline=0]="Inline",n[n.SideEffect=1]="SideEffect",n[n.Omit=2]="Omit",n})(e1||{}),vp=(function(n){return n[n.Global=0]="Global",n[n.Local=1]="Local",n})(vp||{});function HU(n){let o=[],e=new kp;if(e.set("type",n.type.value),n.kind===vp.Global&&n.bootstrap.length>0&&e.set("bootstrap",Hm(n.bootstrap,n.containsForwardDecls)),n.selectorScopeMode===e1.Inline)n.declarations.length>0&&e.set("declarations",Hm(n.declarations,n.containsForwardDecls)),n.imports.length>0&&e.set("imports",Hm(n.imports,n.containsForwardDecls)),n.exports.length>0&&e.set("exports",Hm(n.exports,n.containsForwardDecls));else if(n.selectorScopeMode===e1.SideEffect){let r=GU(n);r!==null&&o.push(r)}n.schemas!==null&&n.schemas.length>0&&e.set("schemas",Ji(n.schemas.map(r=>r.value))),n.id!==null&&(e.set("id",n.id),o.push(Vt(ge.registerNgModuleType).callFn([n.type.value,n.id]).toStmt()));let t=Vt(ge.defineNgModule).callFn([e.toLiteralMap()],void 0,!0),i=WU(n);return{expression:t,type:i,statements:o}}function UU(n){let o=new kp;return o.set("type",new hi(n.type)),n.bootstrap!==void 0&&o.set("bootstrap",new hi(n.bootstrap)),n.declarations!==void 0&&o.set("declarations",new hi(n.declarations)),n.imports!==void 0&&o.set("imports",new hi(n.imports)),n.exports!==void 0&&o.set("exports",new hi(n.exports)),n.schemas!==void 0&&o.set("schemas",new hi(n.schemas)),n.id!==void 0&&o.set("id",new hi(n.id)),Vt(ge.defineNgModule).callFn([o.toLiteralMap()])}function WU(n){if(n.kind===vp.Local)return new xl(n.type.value);let{type:o,declarations:e,exports:t,imports:i,includeImportTypes:r,publicDeclarationTypes:s}=n;return new xl(Vt(ge.NgModuleDeclaration,[new xl(o.type),s===null?Lk(e):qU(s),r?Lk(i):Rc,Lk(t)]))}function GU(n){let o=new kp;if(n.kind===vp.Global?n.declarations.length>0&&o.set("declarations",Hm(n.declarations,n.containsForwardDecls)):n.declarationsExpression&&o.set("declarations",n.declarationsExpression),n.kind===vp.Global?n.imports.length>0&&o.set("imports",Hm(n.imports,n.containsForwardDecls)):n.importsExpression&&o.set("imports",n.importsExpression),n.kind===vp.Global?n.exports.length>0&&o.set("exports",Hm(n.exports,n.containsForwardDecls)):n.exportsExpression&&o.set("exports",n.exportsExpression),n.kind===vp.Local&&n.bootstrapExpression&&o.set("bootstrap",n.bootstrapExpression),Object.keys(o.values).length===0)return null;let e=new ys(Vt(ge.setNgModuleScope),[n.type.value,o.toLiteralMap()]),t=aU(e),i=new xp([],[t.toStmt()]);return new ys(i,[]).toStmt()}function Lk(n){let o=n.map(e=>D0(e.type));return n.length>0?ga(Ji(o)):Rc}function qU(n){let o=n.map(e=>D0(e));return n.length>0?ga(Ji(o)):Rc}function H5(n){let o=[];o.push({key:"name",value:Oe(n.pipeName??n.name),quoted:!1}),o.push({key:"type",value:n.type.value,quoted:!1}),o.push({key:"pure",value:Oe(n.pure),quoted:!1}),n.isStandalone===!1&&o.push({key:"standalone",value:Oe(!1),quoted:!1});let e=Vt(ge.definePipe).callFn([yl(o)],void 0,!0),t=QU(n);return{expression:e,type:t,statements:[]}}function QU(n){return new xl(Vt(ge.PipeDeclaration,[E1(n.type.type,n.typeArgumentCount),new xl(new _a(n.pipeName)),new xl(new _a(n.isStandalone))]))}var Gg=(function(n){return n[n.Directive=0]="Directive",n[n.Pipe=1]="Pipe",n[n.NgModule=2]="NgModule",n})(Gg||{}),KU=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"]),XU=["@media","@supports","@document","@layer","@container","@scope","@starting-style"],NP=class{shimCssText(o,e,t=""){let i=[];o=o.replace(mW,d=>{if(d.match(uW))i.push(d);else{let m=d.match(pW);i.push(m?.join("")??"")}return WT}),o=this._insertDirectives(o);let r=this._scopeCssText(o,e,t),s=0;return r.replace(gW,()=>i[s++])}_insertDirectives(o){return o=this._insertPolyfillDirectivesInCssText(o),this._insertPolyfillRulesInCssText(o)}_scopeKeyframesRelatedCss(o,e){let t=new Set,i=ox(o,r=>this._scopeLocalKeyframeDeclarations(r,e,t));return ox(i,r=>this._scopeAnimationRule(r,e,t))}_scopeLocalKeyframeDeclarations(o,e,t){return Le(q({},o),{selector:o.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/,(i,r,s,d,m)=>(t.add(G5(d,s)),`${r}${s}${e}_${d}${s}${m}`))})}_scopeAnimationKeyframe(o,e,t){return o.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/,(i,r,s,d,m)=>(d=`${t.has(G5(d,s))?e+"_":""}${d}`,`${r}${s}${d}${s}${m}`))}_animationDeclarationKeyframesRe=/(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;_scopeAnimationRule(o,e,t){let i=o.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g,(r,s,d)=>s+d.replace(this._animationDeclarationKeyframesRe,(m,u,h="",v,b)=>v?`${u}${this._scopeAnimationKeyframe(`${h}${v}${h}`,e,t)}`:KU.has(b)?m:`${u}${this._scopeAnimationKeyframe(b,e,t)}`));return i=i.replace(/((?:^|\s+|;)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g,(r,s,d)=>`${s}${d.split(",").map(m=>this._scopeAnimationKeyframe(m,e,t)).join(",")}`),Le(q({},o),{content:i})}_insertPolyfillDirectivesInCssText(o){return o.replace(ZU,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(o){return o.replace(JU,(...e)=>{let t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(o,e,t){let i=this._extractUnscopedRulesFromCssText(o);return o=this._insertPolyfillHostInCssText(o),o=this._convertColonHost(o),o=this._convertColonHostContext(o),o=this._convertShadowDOMSelectors(o),e&&(o=this._scopeKeyframesRelatedCss(o,e),o=this._scopeSelectors(o,e,t)),o=o+` `+i,o.trim()}_extractUnscopedRulesFromCssText(o){let e="",t;for(U5.lastIndex=0;(t=U5.exec(o))!==null;){let i=t[0].replace(t[2],"").replace(t[1],t[4]);e+=i+` `}return e}_convertColonHost(o){return o.replace(iW,(e,t,i)=>{if(t){let r=[];for(let s of this._splitOnTopLevelCommas(t,!0)){let d=s.trim();if(!d)break;let m=hp+d.replace(t1,"")+i;r.push(m)}return r.join(",")}else return hp+i})}*_splitOnTopLevelCommas(o,e){let t=o.length,i=0,r=0;for(let s=0;s{let i=[[]],r=e.indexOf(wg);for(;r!==-1;){let s=e.substring(r+wg.length);if(!s||s[0]!=="("){e=s,r=e.indexOf(wg);continue}let d=[],m=0;for(let h of this._splitOnTopLevelCommas(s.substring(1),!0)){m=m+h.length+1;let v=h.trim();v&&d.push(v)}let u=i.length;SW(i,d.length);for(let h=0;hMW(s,e,t)).join(", ")})}_convertShadowDOMSelectors(o){return sW.reduce((e,t)=>e.replace(t," "),o)}_scopeSelectors(o,e,t){return ox(o,i=>{let r=i.selector,s=i.content;return i.selector[0]!=="@"?r=this._scopeSelector({selector:r,scopeSelector:e,hostSelector:t,isParentSelector:!0}):XU.some(d=>i.selector.startsWith(d))?s=this._scopeSelectors(i.content,e,t):(i.selector.startsWith("@font-face")||i.selector.startsWith("@page"))&&(s=this._stripScopingSelectors(i.content)),new u0(r,s)})}_stripScopingSelectors(o){return ox(o,e=>{let t=e.selector.replace(W5," ").replace(zk," ");return new u0(t,e.content)})}_safeSelector;_shouldScopeIndicator;_scopeSelector({selector:o,scopeSelector:e,hostSelector:t,isParentSelector:i=!1}){let r=/ ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;return o.split(r).map(s=>s.split(W5)).map(s=>{let[d,...m]=s;return[(h=>this._selectorNeedsScoping(h,e)?this._applySelectorScope({selector:h,scopeSelector:e,hostSelector:t,isParentSelector:i}):h)(d),...m].join(" ")}).join(", ")}_selectorNeedsScoping(o,e){return!this._makeScopeMatcher(e).test(o)}_makeScopeMatcher(o){let e=/\[/g,t=/\]/g;return o=o.replace(e,"\\[").replace(t,"\\]"),new RegExp("^("+o+")"+lW,"m")}_applySimpleSelectorScope(o,e,t){if(Pg.lastIndex=0,Pg.test(o)){let i=`[${t}]`,r=o;for(;r.match(zk);)r=r.replace(zk,(s,d)=>d.replace(/([^:\)]*)(:*)(.*)/,(m,u,h,v)=>u+i+h+v));return r.replace(Pg,i)}return e+" "+o}_applySelectorScope({selector:o,scopeSelector:e,hostSelector:t,isParentSelector:i}){let r=/\[is=([^\]]*)\]/g;e=e.replace(r,(P,...k)=>k[0]);let s=`[${e}]`,d=P=>{let k=P.trim();if(!k)return P;if(P.includes(hp)){if(k=this._applySimpleSelectorScope(P,e,t),!P.match(aW)){let[S,T,A,D]=k.match(/([^:]*)(:*)([\s\S]*)/);k=T+s+A+D}}else{let S=P.replace(Pg,"");if(S.length>0){let T=S.match(/([^:]*)(:*)([\s\S]*)/);T&&(k=T[1]+s+T[2]+T[3])}}return k},m=P=>{let k="",S=[],T;for(;(T=pf.exec(P))!==null;){let A=1,D=pf.lastIndex;for(;D{let[D]=A.match(pf)??[],F=A.slice(D?.length,-1);F.includes(hp)&&(this._shouldScopeIndicator=!0);let I=this._scopeSelector({selector:F,scopeSelector:e,hostSelector:t});return`${D}${I})`}).join(""):(this._shouldScopeIndicator=this._shouldScopeIndicator||P.includes(hp),k=this._shouldScopeIndicator?d(P):P),k};i&&(this._safeSelector=new FP(o),o=this._safeSelector.content());let u="",h=0,v,b=/( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g,y=o.includes(hp);for((i||this._shouldScopeIndicator)&&(this._shouldScopeIndicator=!y);(v=b.exec(o))!==null;){let P=v[1],k=o.slice(h,v.index);if(k.match(/__esc-ph-(\d+)__/)&&o[v.index+1]?.match(/[a-fA-F\d]/))continue;let S=m(k);u+=`${S} ${P} `,h=b.lastIndex}let x=o.substring(h);return u+=m(x),this._safeSelector.restore(u)}_insertPolyfillHostInCssText(o){return o.replace(dW,wg).replace(cW,t1)}},FP=class{placeholders=[];index=0;_content;constructor(o){o=this._escapeRegexMatches(o,/(\[[^\]]*\])/g),o=o.replace(/(\\.)/g,(e,t)=>{let i=`__esc-ph-${this.index}__`;return this.placeholders.push(t),this.index++,i}),this._content=o.replace(nW,(e,t,i)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(`(${i})`),this.index++,t+r})}restore(o){return o.replace(/__(?:ph|esc-ph)-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}_escapeRegexMatches(o,e){return o.replace(e,(t,i)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(i),this.index++,r})}},YU="(:(where|is)\\()?",pf=/:(where|is)\(/gi,ZU=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,JU=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,U5=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,t1="-shadowcsshost",wg="-shadowcsscontext",RP="[^)(]*",eW=String.raw`(?:\(${RP}\)|${RP})+?`,tW=String.raw`(?:\(${eW}\)|${RP})+?`,UT=String.raw`(?:\((${tW})\))`,nW=new RegExp(String.raw`(:nth-[-\w]+)`+UT,"g"),iW=new RegExp(t1+UT+"?([^,{]*)","gim"),oW=wg+UT+"?([^{]*)",rW=new RegExp(`${YU}(${oW})`,"gim"),hp=t1+"-no-combinator",aW=new RegExp(`${hp}(?![^(]*\\))`,"g"),zk=/-shadowcsshost-no-combinator([^\s,]*)/,sW=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],W5=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,lW="([>\\s~+[.,{:][\\s\\S]*)?$",Pg=/-shadowcsshost/gim,cW=/:host/gim,dW=/:host-context/gim,pW=/\r?\n/g,mW=/\/\*[\s\S]*?\*\//g,uW=/\/\*\s*#\s*source(Mapping)?URL=/g,WT="%COMMENT%",gW=new RegExp(WT,"g"),Vk="%BLOCK%",hW=new RegExp(`(\\s*(?:${WT}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g"),_W=new Map([["{","}"]]),zN="%COMMA_IN_PLACEHOLDER%",VN="%SEMI_IN_PLACEHOLDER%",BN="%COLON_IN_PLACEHOLDER%",fW=new RegExp(zN,"g"),CW=new RegExp(VN,"g"),vW=new RegExp(BN,"g"),u0=class{selector;content;constructor(o,e){this.selector=o,this.content=e}};function ox(n,o){let e=bW(n),t=xW(e,_W,Vk),i=0,r=t.escapedString.replace(hW,(...s)=>{let d=s[2],m="",u=s[4],h="";u&&u.startsWith("{"+Vk)&&(m=t.blocks[i++],u=u.substring(Vk.length+1),h="{");let v=o(new u0(d,m));return`${s[1]}${v.selector}${s[3]}${h}${v.content}${u}`});return wW(r)}var LP=class{escapedString;blocks;constructor(o,e){this.escapedString=o,this.blocks=e}};function xW(n,o,e){let t=[],i=[],r=0,s=0,d=-1,m,u;for(let h=0;h0;){let s=r.length,d=n.pop();for(let m=0;mi?`${e}${s}${o}`:`${e}${s}${t}${o}, ${e}${s} ${t}${o}`).join(",")}function SW(n,o){let e=n.length;for(let t=1;t{class n{static nextListId=0;debugListId=n.nextListId++;head={kind:j.ListEnd,next:null,prev:null,debugListId:this.debugListId};tail={kind:j.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 i of e)this.push(i);return}n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=this.debugListId;let t=this.tail.prev;e.prev=t,t.next=e,e.next=this.tail,this.tail.prev=e}prepend(e){if(e.length===0)return;for(let r of e)n.assertIsNotEnd(r),n.assertIsUnowned(r),r.debugListId=this.debugListId;let t=this.head.next,i=this.head;for(let r of e)i.next=r,r.prev=i,i=r;i.next=t,t.prev=i}*[Symbol.iterator](){let e=this.head.next;for(;e!==this.tail;){n.assertIsOwned(e,this.debugListId);let t=e.next;yield e,e=t}}*reversed(){let e=this.tail.prev;for(;e!==this.head;){n.assertIsOwned(e,this.debugListId);let t=e.prev;yield e,e=t}}static replace(e,t){n.assertIsNotEnd(e),n.assertIsNotEnd(t),n.assertIsOwned(e),n.assertIsUnowned(t),t.debugListId=e.debugListId,e.prev!==null&&(e.prev.next=t,t.prev=e.prev),e.next!==null&&(e.next.prev=t,t.next=e.next),e.debugListId=null,e.prev=null,e.next=null}static replaceWithMany(e,t){if(t.length===0){n.remove(e);return}n.assertIsNotEnd(e),n.assertIsOwned(e);let i=e.debugListId;e.debugListId=null;for(let h of t)n.assertIsNotEnd(h),n.assertIsUnowned(h);let{prev:r,next:s}=e;e.prev=null,e.next=null;let d=r;for(let h of t)n.assertIsUnowned(h),h.debugListId=i,d.next=h,h.prev=d,h.next=null,d=h;let m=t[0],u=d;r!==null&&(r.next=m,m.prev=r),s!==null&&(s.prev=u,u.next=s)}static remove(e){n.assertIsNotEnd(e),n.assertIsOwned(e),e.prev.next=e.next,e.next.prev=e.prev,e.debugListId=null,e.prev=null,e.next=null}static insertBefore(e,t){if(Array.isArray(e)){for(let i of e)n.insertBefore(i,t);return}if(n.assertIsOwned(t),t.prev===null)throw new Error("AssertionError: illegal operation on list start");n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=t.debugListId,e.prev=null,t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e}static insertAfter(e,t){if(n.assertIsOwned(t),t.next===null)throw new Error("AssertionError: illegal operation on list end");n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=t.debugListId,t.next.prev=e,e.next=t.next,e.prev=t,t.next=e}static assertIsUnowned(e){if(e.debugListId!==null)throw new Error(`AssertionError: illegal operation on owned node: ${j[e.kind]}`)}static assertIsOwned(e,t){if(e.debugListId===null)throw new Error(`AssertionError: illegal operation on unowned node: ${j[e.kind]}`);if(t!==void 0&&e.debugListId!==t)throw new Error(`AssertionError: node belongs to the wrong list (expected ${t}, actual ${e.debugListId})`)}static assertIsNotEnd(e){if(e.kind===j.ListEnd)throw new Error("AssertionError: illegal operation on list head or tail")}}return n})();function Zs(n){return q({kind:j.Statement,statement:n},Dn)}function fp(n,o,e,t){return q({kind:j.Variable,xref:n,variable:o,initializer:e,flags:t},Dn)}var Dn={debugListId:null,prev:null,next:null},jN=Symbol("ConsumesSlot"),GT=Symbol("DependsOnSlotContext"),hu=Symbol("ConsumesVars"),F0=Symbol("UsesVarOffset"),bl={[jN]:!0,numSlotsUsed:1},ws={[GT]:!0},Ms={[hu]:!0};function nh(n){return n[jN]===!0}function h0(n){return n[GT]===!0}function Bk(n){return n[hu]===!0}function q5(n){return n[F0]===!0}function kW(n,o,e){return q(q(q({kind:j.InterpolateText,target:n,interpolation:o,sourceSpan:e},ws),Ms),Dn)}var nr=class{strings;expressions;i18nPlaceholders;constructor(o,e,t){if(this.strings=o,this.expressions=e,this.i18nPlaceholders=t,t.length!==0&&t.length!==e.length)throw new Error(`Expected ${e.length} placeholders to match interpolation expression count, but got ${t.length}`)}};function cu(n,o,e,t,i,r,s,d,m,u,h){return q({kind:j.Binding,bindingKind:o,target:n,name:e,expression:t,unit:i,securityContext:r,isTextAttribute:s,isStructuralTemplateAttribute:d,templateKind:m,i18nContext:null,i18nMessage:u,sourceSpan:h},Dn)}function PW(n,o,e,t,i,r,s,d,m,u){return q(q(q({kind:j.Property,target:n,name:o,expression:e,bindingKind:t,securityContext:i,sanitizer:null,isStructuralTemplateAttribute:r,templateKind:s,i18nContext:d,i18nMessage:m,sourceSpan:u},ws),Ms),Dn)}function TW(n,o,e,t,i,r,s,d,m){return q(q(q({kind:j.TwoWayProperty,target:n,name:o,expression:e,securityContext:t,sanitizer:null,isStructuralTemplateAttribute:i,templateKind:r,i18nContext:s,i18nMessage:d,sourceSpan:m},ws),Ms),Dn)}function EW(n,o,e,t,i){return q(q(q({kind:j.StyleProp,target:n,name:o,expression:e,unit:t,sourceSpan:i},ws),Ms),Dn)}function OW(n,o,e,t){return q(q(q({kind:j.ClassProp,target:n,name:o,expression:e,sourceSpan:t},ws),Ms),Dn)}function DW(n,o,e){return q(q(q({kind:j.StyleMap,target:n,expression:o,sourceSpan:e},ws),Ms),Dn)}function IW(n,o,e){return q(q(q({kind:j.ClassMap,target:n,expression:o,sourceSpan:e},ws),Ms),Dn)}function Q5(n,o,e,t,i,r,s,d,m,u){return q(q(q({kind:j.Attribute,target:n,namespace:o,name:e,expression:t,securityContext:i,sanitizer:null,isTextAttribute:r,isStructuralTemplateAttribute:s,templateKind:d,i18nContext:null,i18nMessage:m,sourceSpan:u},ws),Ms),Dn)}function AW(n,o){return q({kind:j.Advance,delta:n,sourceSpan:o},Dn)}function $N(n,o,e,t){return q(q(q({kind:j.Conditional,target:n,test:o,conditions:e,processed:null,sourceSpan:t,contextValue:null},Dn),ws),Ms)}function NW(n,o,e,t){return q(q({kind:j.Repeater,target:n,targetSlot:o,collection:e,sourceSpan:t},Dn),ws)}function K5(n,o,e,t,i,r,s){return q({kind:j.AnimationBinding,name:n,target:o,animationKind:e,expression:t,i18nMessage:null,securityContext:i,sanitizer:null,sourceSpan:r,animationBindingKind:s},Dn)}function FW(n,o,e,t){return q(q(q({kind:j.DeferWhen,target:n,expr:o,modifier:e,sourceSpan:t},Dn),ws),Ms)}function HN(n,o,e,t,i,r,s,d,m,u,h){return q(q(q({kind:j.I18nExpression,context:n,target:o,i18nOwner:e,handle:t,expression:i,icuPlaceholder:r,i18nPlaceholder:s,resolutionTime:d,usage:m,name:u,sourceSpan:h},Dn),Ms),ws)}function RW(n,o,e){return q({kind:j.I18nApply,owner:n,handle:o,sourceSpan:e},Dn)}function LW(n,o,e,t){return q(q(q({kind:j.StoreLet,target:n,declaredName:o,value:e,sourceSpan:t},ws),Ms),Dn)}function zW(n,o){return q(q({kind:j.Control,sourceSpan:o,target:n},ws),Dn)}function $c(n){return n instanceof eo}var eo=class extends Wi{constructor(o=null){super(null,o)}},na=class n extends eo{name;kind=Jt.LexicalRead;constructor(o){super(),this.name=o}visitExpression(o,e){}isEquivalent(o){return this.name===o.name}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.name)}},n1=class n extends eo{target;targetSlot;offset;kind=Jt.Reference;constructor(o,e,t){super(),this.target=o,this.targetSlot=e,this.offset=t}visitExpression(){}isEquivalent(o){return o instanceof n&&o.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot,this.offset)}},_0=class n extends eo{target;value;sourceSpan;kind=Jt.StoreLet;[hu]=!0;[GT]=!0;constructor(o,e,t){super(),this.target=o,this.value=e,this.sourceSpan=t}visitExpression(){}isEquivalent(o){return o instanceof n&&o.target===this.target&&o.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(o,e){this.value=Rt(this.value,o,e)}clone(){return new n(this.target,this.value,this.sourceSpan)}},f0=class n extends eo{target;targetSlot;kind=Jt.ContextLetReference;constructor(o,e){super(),this.target=o,this.targetSlot=e}visitExpression(){}isEquivalent(o){return o instanceof n&&o.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot)}},Tp=class n extends eo{view;kind=Jt.Context;constructor(o){super(),this.view=o}visitExpression(){}isEquivalent(o){return o instanceof n&&o.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},zP=class n extends eo{view;kind=Jt.TrackContext;constructor(o){super(),this.view=o}visitExpression(){}isEquivalent(o){return o instanceof n&&o.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},i1=class n extends eo{kind=Jt.NextContext;steps=1;visitExpression(){}isEquivalent(o){return o instanceof n&&o.steps===this.steps}isConstant(){return!1}transformInternalExpressions(){}clone(){let o=new n;return o.steps=this.steps,o}},VP=class n extends eo{kind=Jt.GetCurrentView;constructor(){super()}visitExpression(){}isEquivalent(o){return o instanceof n}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n}},C0=class n extends eo{view;kind=Jt.RestoreView;constructor(o){super(),this.view=o}visitExpression(o,e){typeof this.view!="number"&&this.view.visitExpression(o,e)}isEquivalent(o){return!(o instanceof n)||typeof o.view!=typeof this.view?!1:typeof this.view=="number"?this.view===o.view:this.view.isEquivalent(o.view)}isConstant(){return!1}transformInternalExpressions(o,e){typeof this.view!="number"&&(this.view=Rt(this.view,o,e))}clone(){return new n(this.view instanceof Wi?this.view.clone():this.view)}},o1=class n extends eo{expr;kind=Jt.ResetView;constructor(o){super(),this.expr=o}visitExpression(o,e){this.expr.visitExpression(o,e)}isEquivalent(o){return o instanceof n&&this.expr.isEquivalent(o.expr)}isConstant(){return!1}transformInternalExpressions(o,e){this.expr=Rt(this.expr,o,e)}clone(){return new n(this.expr.clone())}},r1=class n extends eo{target;value;kind=Jt.TwoWayBindingSet;constructor(o,e){super(),this.target=o,this.value=e}visitExpression(o,e){this.target.visitExpression(o,e),this.value.visitExpression(o,e)}isEquivalent(o){return this.target.isEquivalent(o.target)&&this.value.isEquivalent(o.value)}isConstant(){return!1}transformInternalExpressions(o,e){this.target=Rt(this.target,o,e),this.value=Rt(this.value,o,e)}clone(){return new n(this.target,this.value)}},Od=class n extends eo{xref;kind=Jt.ReadVariable;name=null;constructor(o){super(),this.xref=o}visitExpression(){}isEquivalent(o){return o instanceof n&&o.xref===this.xref}isConstant(){return!1}transformInternalExpressions(){}clone(){let o=new n(this.xref);return o.name=this.name,o}},du=class n extends eo{kind=Jt.PureFunctionExpr;[hu]=!0;[F0]=!0;varOffset=null;body;args;fn=null;constructor(o,e){super(),this.body=o,this.args=e}visitExpression(o,e){this.body?.visitExpression(o,e);for(let t of this.args)t.visitExpression(o,e)}isEquivalent(o){return!(o instanceof n)||o.args.length!==this.args.length?!1:o.body!==null&&this.body!==null&&o.body.isEquivalent(this.body)&&o.args.every((e,t)=>e.isEquivalent(this.args[t]))}isConstant(){return!1}transformInternalExpressions(o,e){this.body!==null?this.body=Rt(this.body,o,e|ii.InChildOperation):this.fn!==null&&(this.fn=Rt(this.fn,o,e));for(let t=0;te.clone()));return o.fn=this.fn?.clone()??null,o.varOffset=this.varOffset,o}},Ep=class n extends eo{index;kind=Jt.PureFunctionParameterExpr;constructor(o){super(),this.index=o}visitExpression(){}isEquivalent(o){return o instanceof n&&o.index===this.index}isConstant(){return!0}transformInternalExpressions(){}clone(){return new n(this.index)}},pu=class n extends eo{target;targetSlot;name;args;kind=Jt.PipeBinding;[hu]=!0;[F0]=!0;varOffset=null;constructor(o,e,t,i){super(),this.target=o,this.targetSlot=e,this.name=t,this.args=i}visitExpression(o,e){for(let t of this.args)t.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){for(let t=0;te.clone()));return o.varOffset=this.varOffset,o}},v0=class n extends eo{target;targetSlot;name;args;numArgs;kind=Jt.PipeBindingVariadic;[hu]=!0;[F0]=!0;varOffset=null;constructor(o,e,t,i,r){super(),this.target=o,this.targetSlot=e,this.name=t,this.args=i,this.numArgs=r}visitExpression(o,e){this.args.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.args=Rt(this.args,o,e)}clone(){let o=new n(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return o.varOffset=this.varOffset,o}},qg=class n extends eo{receiver;name;kind=Jt.SafePropertyRead;constructor(o,e){super(),this.receiver=o,this.name=e}get index(){return this.name}visitExpression(o,e){this.receiver.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.receiver=Rt(this.receiver,o,e)}clone(){return new n(this.receiver.clone(),this.name)}},Qg=class n extends eo{receiver;index;kind=Jt.SafeKeyedRead;constructor(o,e,t){super(t),this.receiver=o,this.index=e}visitExpression(o,e){this.receiver.visitExpression(o,e),this.index.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.receiver=Rt(this.receiver,o,e),this.index=Rt(this.index,o,e)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.sourceSpan)}},mu=class n extends eo{receiver;args;kind=Jt.SafeInvokeFunction;constructor(o,e){super(),this.receiver=o,this.args=e}visitExpression(o,e){this.receiver.visitExpression(o,e);for(let t of this.args)t.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.receiver=Rt(this.receiver,o,e);for(let t=0;to.clone()))}},Kg=class n extends eo{guard;expr;kind=Jt.SafeTernaryExpr;constructor(o,e){super(),this.guard=o,this.expr=e}visitExpression(o,e){this.guard.visitExpression(o,e),this.expr.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.guard=Rt(this.guard,o,e),this.expr=Rt(this.expr,o,e)}clone(){return new n(this.guard.clone(),this.expr.clone())}},x0=class n extends eo{kind=Jt.EmptyExpr;visitExpression(o,e){}isEquivalent(o){return o instanceof n}isConstant(){return!0}clone(){return new n}transformInternalExpressions(){}},Hc=class n extends eo{expr;xref;kind=Jt.AssignTemporaryExpr;name=null;constructor(o,e){super(),this.expr=o,this.xref=e}visitExpression(o,e){this.expr.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.expr=Rt(this.expr,o,e)}clone(){let o=new n(this.expr.clone(),this.xref);return o.name=this.name,o}},Op=class n extends eo{xref;kind=Jt.ReadTemporaryExpr;name=null;constructor(o){super(),this.xref=o}visitExpression(o,e){}isEquivalent(){return this.xref===this.xref}isConstant(){return!1}transformInternalExpressions(o,e){}clone(){let o=new n(this.xref);return o.name=this.name,o}},a1=class n extends eo{slot;kind=Jt.SlotLiteralExpr;constructor(o){super(),this.slot=o}visitExpression(o,e){}isEquivalent(o){return o instanceof n&&o.slot===this.slot}isConstant(){return!0}clone(){return new n(this.slot)}transformInternalExpressions(){}},s1=class n extends eo{expr;target;targetSlot;alias;kind=Jt.ConditionalCase;constructor(o,e,t,i=null){super(),this.expr=o,this.target=e,this.targetSlot=t,this.alias=i}visitExpression(o,e){this.expr!==null&&this.expr.visitExpression(o,e)}isEquivalent(o){return o instanceof n&&o.expr===this.expr}isConstant(){return!0}clone(){return new n(this.expr,this.target,this.targetSlot)}transformInternalExpressions(o,e){this.expr!==null&&(this.expr=Rt(this.expr,o,e))}},y0=class n extends eo{expr;kind=Jt.ConstCollected;constructor(o){super(),this.expr=o}transformInternalExpressions(o,e){this.expr=o(this.expr,e)}visitExpression(o,e){this.expr.visitExpression(o,e)}isEquivalent(o){return o instanceof n?this.expr.isEquivalent(o.expr):!1}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr)}},BP=class n extends eo{parameters;body;kind=Jt.ArrowFunction;[hu]=!0;[F0]=!0;contextName=Ys;currentViewName="view";varOffset=null;ops;constructor(o,e){super(),this.parameters=o,this.body=e,this.ops=new Je,this.ops.push([Zs(new Or(e,e.sourceSpan))])}visitExpression(o,e){for(let t of this.ops)xr(t,i=>{i.visitExpression(o,e)})}isEquivalent(o){return o instanceof n&&o.parameters.length===this.parameters.length&&o.parameters.every((e,t)=>e.isEquivalent(this.parameters[t]))&&o.body.isEquivalent(this.body)}isConstant(){return!1}transformInternalExpressions(o,e){for(let t of this.ops)ir(t,o,e|(ii.InChildOperation|ii.InArrowFunctionOperation))}clone(){let o=new n(this.parameters,this.body);return o.varOffset=this.varOffset,o.ops=this.ops,o}};function xr(n,o){ir(n,(e,t)=>(o(e,t),e),ii.None)}var ii=(function(n){return n[n.None=0]="None",n[n.InChildOperation=1]="InChildOperation",n[n.InArrowFunctionOperation=2]="InArrowFunctionOperation",n})(ii||{});function jk(n,o,e){for(let t=0;tRt(t,o,e));else if(n instanceof gu)if(Array.isArray(n.body))for(let t=0;t{!s&&h0(d)&&d.target!==r.xref&&(s=!0)}),s)break;e=e.next}}}}function pG(n){if(!(!n.enableDebugLocations||n.relativeTemplatePath===null))for(let o of n.units){let e=[];for(let t of o.create)if(t.kind===j.ElementStart||t.kind===j.Element){let i=t.startSourceSpan.start;e.push({targetSlot:t.handle,offset:i.offset,line:i.line,column:i.col})}e.length>0&&o.create.push(iG(n.relativeTemplatePath,e))}}function JN(n){let o=new Map;for(let e of n.create)nh(e)&&(o.set(e.xref,e),e.kind===j.RepeaterCreate&&e.emptyView!==null&&o.set(e.emptyView,e));return o}function mG(n){for(let o of n.units){let e=JN(o);for(let t of o.ops())switch(t.kind){case j.Attribute:uG(o,t,e);break;case j.Property:if(t.bindingKind!==qt.LegacyAnimation&&t.bindingKind!==qt.Animation){let i;t.i18nMessage!==null&&t.templateKind===null?i=qt.I18n:t.isStructuralTemplateAttribute?i=qt.Template:i=qt.Property,Je.insertBefore(Cl(t.target,i,null,t.name,null,null,null,t.securityContext),Mg(e,t.target))}break;case j.TwoWayProperty:Je.insertBefore(Cl(t.target,qt.TwoWayProperty,null,t.name,null,null,null,t.securityContext),Mg(e,t.target));break;case j.StyleProp:case j.ClassProp:t.expression instanceof x0&&Je.insertBefore(Cl(t.target,qt.Property,null,t.name,null,null,null,mi.STYLE),Mg(e,t.target));break;case j.Listener:if(!t.isLegacyAnimationListener){let i=Cl(t.target,qt.Property,null,t.name,null,null,null,mi.NONE);if(n.kind===Et.Host)break;Je.insertBefore(i,Mg(e,t.target))}break;case j.TwoWayListener:if(n.kind!==Et.Host){let i=Cl(t.target,qt.Property,null,t.name,null,null,null,mi.NONE);Je.insertBefore(i,Mg(e,t.target))}break}}}function Mg(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function uG(n,o,e){if(!(o.expression instanceof nr)&&o.isTextAttribute){let t=Cl(o.target,o.isStructuralTemplateAttribute?qt.Template:qt.Attribute,o.namespace,o.name,o.expression,o.i18nContext,o.i18nMessage,o.securityContext);if(n.job.kind===Et.Host)n.create.push(t);else{let i=Mg(e,o.target);Je.insertBefore(t,i)}Je.remove(o)}}var X5="aria-";function eF(n){return n.startsWith(X5)&&n.length>X5.length}function gG(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function hG(n){let o=new Map;for(let e of n.units)for(let t of e.create)Dp(t)&&o.set(t.xref,t);for(let e of n.units)for(let t of e.ops())if(t.kind===j.Binding)switch(t.bindingKind){case qt.Attribute:if(t.name==="ngNonBindable"){Je.remove(t);let i=gG(o,t.target);i.nonBindable=!0}else if(t.name.startsWith("animate."))Je.replace(t,K5(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,0));else{let[i,r]=ha(t.name);Je.replace(t,Q5(t.target,i,r,t.expression,t.securityContext,t.isTextAttribute,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan))}break;case qt.Animation:Je.replace(t,K5(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,1));break;case qt.Property:case qt.LegacyAnimation:n.mode===hs.DomOnly&&eF(t.name)?Je.replace(t,Q5(t.target,null,t.name,t.expression,t.securityContext,!1,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan)):n.kind===Et.Host?Je.replace(t,rG(t.name,t.expression,t.bindingKind,t.i18nContext,t.securityContext,t.sourceSpan)):Je.replace(t,PW(t.target,t.name,t.expression,t.bindingKind,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case qt.TwoWayProperty:if(!(t.expression instanceof Wi))throw new Error(`Expected value of two-way property binding "${t.name}" to be an expression`);Je.replace(t,TW(t.target,t.name,t.expression,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case qt.I18n:case qt.ClassName:case qt.StyleProperty:throw new Error(`Unhandled binding of kind ${qt[t.bindingKind]}`)}}var Y5=new Map([[ge.ariaProperty,ge.ariaProperty],[ge.attribute,ge.attribute],[ge.classProp,ge.classProp],[ge.element,ge.element],[ge.elementContainer,ge.elementContainer],[ge.elementContainerEnd,ge.elementContainerEnd],[ge.elementContainerStart,ge.elementContainerStart],[ge.elementEnd,ge.elementEnd],[ge.elementStart,ge.elementStart],[ge.domProperty,ge.domProperty],[ge.i18nExp,ge.i18nExp],[ge.listener,ge.listener],[ge.listener,ge.listener],[ge.property,ge.property],[ge.styleProp,ge.styleProp],[ge.syntheticHostListener,ge.syntheticHostListener],[ge.syntheticHostProperty,ge.syntheticHostProperty],[ge.templateCreate,ge.templateCreate],[ge.twoWayProperty,ge.twoWayProperty],[ge.twoWayListener,ge.twoWayListener],[ge.declareLet,ge.declareLet],[ge.conditionalCreate,ge.conditionalBranchCreate],[ge.conditionalBranchCreate,ge.conditionalBranchCreate],[ge.domElement,ge.domElement],[ge.domElementStart,ge.domElementStart],[ge.domElementEnd,ge.domElementEnd],[ge.domElementContainer,ge.domElementContainer],[ge.domElementContainerStart,ge.domElementContainerStart],[ge.domElementContainerEnd,ge.domElementContainerEnd],[ge.domListener,ge.domListener],[ge.domTemplate,ge.domTemplate],[ge.animationEnter,ge.animationEnter],[ge.animationLeave,ge.animationLeave],[ge.animationEnterListener,ge.animationEnterListener],[ge.animationLeaveListener,ge.animationLeaveListener]]),_G=256;function fG(n){for(let o of n.units)Z5(o.create),Z5(o.update)}function Z5(n){let o=null;for(let e of n){if(e.kind!==j.Statement||!(e.statement instanceof fa)){o=null;continue}if(!(e.statement.expr instanceof ys)||!(e.statement.expr.fn instanceof eu)){o=null;continue}let t=e.statement.expr.fn.value;if(!Y5.has(t)){o=null;continue}if(o!==null&&Y5.get(o.instruction)===t&&o.length<_G){let i=o.expression.callFn(e.statement.expr.args,e.statement.expr.sourceSpan,e.statement.expr.pure);o.expression=i,o.op.statement=i.toStmt(),o.length++,Je.remove(e)}else o={op:e,instruction:t,expression:e.statement.expr,length:1}}}function CG(n){for(let o of n.units)for(let e of o.update)(e.kind===j.Attribute||e.kind===j.StyleProp||e.kind==j.StyleMap||e.kind===j.ClassMap)&&e.expression instanceof nr&&e.expression.strings.length===2&&e.expression.strings.every(i=>i==="")&&(e.expression=e.expression.expressions[0])}function vG(n){for(let o of n.units)for(let e of o.ops()){if(e.kind!==j.Conditional)continue;let t,i=e.conditions.findIndex(d=>d.expr===null);if(i>=0){let d=e.conditions.splice(i,1)[0].targetSlot;t=new a1(d)}else t=Oe(-1);let r=e.test==null?null:new Hc(e.test,n.allocateXrefId()),s=null;for(let d=e.conditions.length-1;d>=0;d--){let m=e.conditions[d];if(m.expr!==null){if(r!==null){let u=d===0?r:new Op(r.xref);m.expr=new Si(lt.Identical,u,m.expr)}else m.alias!==null&&(s??=n.allocateXrefId(),m.expr=new Hc(m.expr,s),e.contextValue=new Op(s));t=new Lc(m.expr,new a1(m.targetSlot),t)}}e.processed=t,e.conditions=[]}}var xG=new Map([["&&",lt.And],[">",lt.Bigger],[">=",lt.BiggerEquals],["|",lt.BitwiseOr],["&",lt.BitwiseAnd],["/",lt.Divide],["=",lt.Assign],["==",lt.Equals],["===",lt.Identical],["<",lt.Lower],["<=",lt.LowerEquals],["-",lt.Minus],["%",lt.Modulo],["**",lt.Exponentiation],["*",lt.Multiply],["!=",lt.NotEquals],["!==",lt.NotIdentical],["??",lt.NullishCoalesce],["||",lt.Or],["+",lt.Plus],["in",lt.In],["instanceof",lt.InstanceOf],["+=",lt.AdditionAssignment],["-=",lt.SubtractionAssignment],["*=",lt.MultiplicationAssignment],["/=",lt.DivisionAssignment],["%=",lt.RemainderAssignment],["**=",lt.ExponentiationAssignment],["&&=",lt.AndAssignment],["||=",lt.OrAssignment],["??=",lt.NullishCoalesceAssignment]]);function tF(n){let o=new Map([["svg",Tr.SVG],["math",Tr.Math]]);return n===null?Tr.HTML:o.get(n)??Tr.HTML}function yG(n){let o=new Map([["svg",Tr.SVG],["math",Tr.Math]]);for(let[e,t]of o.entries())if(t===n)return e;return null}function bG(n,o){return o===Tr.HTML?n:`:${yG(o)}:${n}`}function Xg(n){return Array.isArray(n)?Ji(n.map(Xg)):Oe(n)}function wG(n){let o=new Map;for(let e of n.units)for(let t of e.create)if(t.kind===j.ExtractedAttribute){let i=o.get(t.target)||new $P;o.set(t.target,i),i.add(t.bindingKind,t.name,t.expression,t.namespace,t.trustedValueFn),Je.remove(t)}if(n instanceof b0)for(let e of n.units)for(let t of e.create)if(t.kind==j.Projection){let i=o.get(t.xref);if(i!==void 0){let r=HP(i);r.entries.length>0&&(t.attributes=n.pool.getConstLiteral(r,!0))}}else Dp(t)&&(t.attributes=J5(n,o,t.xref),t.kind===j.RepeaterCreate&&t.emptyView!==null&&(t.emptyAttributes=J5(n,o,t.emptyView)));else if(n instanceof p1)for(let[e,t]of o.entries()){if(e!==n.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 i=HP(t);i.entries.length>0&&(n.root.attributes=i)}}function J5(n,o,e){let t=o.get(e);if(t!==void 0){let i=HP(t);if(i.entries.length>0)return n.addConst(i)}return null}var Cg=Object.freeze([]),$P=class{known=new Map;byKind=new Map;propertyBindings=null;projectAs=null;get attributes(){return this.byKind.get(qt.Attribute)??Cg}get classes(){return this.byKind.get(qt.ClassName)??Cg}get styles(){return this.byKind.get(qt.StyleProperty)??Cg}get bindings(){return this.propertyBindings??Cg}get template(){return this.byKind.get(qt.Template)??Cg}get i18n(){return this.byKind.get(qt.I18n)??Cg}isKnown(o,e){let t=this.known.get(o)??new Set;return this.known.set(o,t),t.has(e)?!0:(t.add(e),!1)}add(o,e,t,i,r){if(!(o===qt.Attribute||o===qt.ClassName||o===qt.StyleProperty)&&this.isKnown(o,e))return;if(e==="ngProjectAs"){if(t===null||!(t instanceof _a)||t.value==null||typeof t.value?.toString()!="string")throw Error("ngProjectAs must have a string literal value");this.projectAs=t.value.toString()}let d=this.arrayFor(o);if(d.push(...MG(i,e)),o===qt.Attribute||o===qt.StyleProperty){if(t===null)throw Error("Attribute, i18n attribute, & style element attributes must have a value");r!==null&&UN(t)?d.push(BH(r,new Lf([new kx(t.value)],[]),void 0,t.sourceSpan)):d.push(t)}}arrayFor(o){return o===qt.Property||o===qt.TwoWayProperty?(this.propertyBindings??=[],this.propertyBindings):(this.byKind.has(o)||this.byKind.set(o,[]),this.byKind.get(o))}};function MG(n,o){let e=Oe(o);return n?[Oe(0),Oe(n),e]:[e]}function HP({attributes:n,bindings:o,classes:e,i18n:t,projectAs:i,styles:r,template:s}){let d=[...n];if(i!==null){let m=AT(i)[0];d.push(Oe(5),Xg(m))}return e.length>0&&d.push(Oe(1),...e),r.length>0&&d.push(Oe(2),...r),o.length>0&&d.push(Oe(3),...o),s.length>0&&d.push(Oe(4),...s),t.length>0&&d.push(Oe(6),...t),Ji(d)}function SG(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function kG(n){let o=new Map;for(let e of n.units)for(let t of e.create)Dp(t)&&o.set(t.xref,t);for(let e of n.units)for(let t of e.ops())if(t.kind===j.AnimationBinding){let i=PG(t);n.kind===Et.Host?e.create.push(i):Je.insertAfter(i,SG(o,t.target)),Je.remove(t)}}function PG(n){if(n.animationBindingKind===0)return WW(n.name,n.target,n.name==="animate.enter"?"enter":"leave",n.expression,n.securityContext,n.sourceSpan);{let o=n.expression;return GW(n.name,n.target,n.name==="animate.enter"?"enter":"leave",[Zs(new Or(o,o.sourceSpan))],n.securityContext,n.sourceSpan)}}function TG(n){let o=new Map;for(let e of n.units){for(let t of e.create)t.kind===j.I18nAttributes&&o.set(t.target,t);for(let t of e.update)switch(t.kind){case j.Property:case j.Attribute:if(t.i18nContext===null||!(t.expression instanceof nr))continue;let i=o.get(t.target);if(i===void 0)throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");if(i.target!==t.target)throw new Error("AssertionError: Expected i18nAttributes target element to match binding target element");let r=[];for(let s=0;sHG(t,{job:n}),ii.None),ir(e,UG,ii.None)}function Hs(n){return n instanceof tu?Hs(n.expr):n instanceof Si?Hs(n.lhs)||Hs(n.rhs):n instanceof Lc?n.falseCase&&Hs(n.falseCase)?!0:Hs(n.condition)||Hs(n.trueCase):n instanceof zf?Hs(n.condition):n instanceof Hc?Hs(n.expr):n instanceof Ks?Hs(n.receiver):n instanceof Id?Hs(n.receiver)||Hs(n.index):n instanceof nc?Hs(n.expr):n instanceof ys||n instanceof zc||n instanceof ic||n instanceof mu||n instanceof pu}function zG(n){let o=new Set;return Rt(n,e=>(e instanceof Hc&&o.add(e.xref),e),ii.None),o}function VG(n,o,e){return Rt(n,t=>{if(t instanceof Hc&&o.has(t.xref)){let i=new Op(t.xref);return new Hc(i,i.xref)}return t},ii.None),n}function vg(n,o,e){let t;if(Hs(n)){let i=e.job.allocateXrefId();t=[new Hc(n,i),new Op(i)]}else t=[n,n.clone()],VG(t[1],zG(t[0]));return new Kg(t[0],o(t[1]))}function BG(n){return n instanceof qg||n instanceof Qg||n instanceof mu}function jG(n){return n instanceof Ks||n instanceof Id||n instanceof ys}function nF(n){return BG(n)||jG(n)}function $G(n){if(nF(n)&&n.receiver instanceof Kg){let o=n.receiver;for(;o.expr instanceof Kg;)o=o.expr;return o}return null}function HG(n,o){if(!nF(n))return n;let e=$G(n);if(e){if(n instanceof ys)return e.expr=e.expr.callFn(n.args),n.receiver;if(n instanceof Ks)return e.expr=e.expr.prop(n.name),n.receiver;if(n instanceof Id)return e.expr=e.expr.key(n.index),n.receiver;if(n instanceof mu)return e.expr=vg(e.expr,t=>t.callFn(n.args),o),n.receiver;if(n instanceof qg)return e.expr=vg(e.expr,t=>t.prop(n.name),o),n.receiver;if(n instanceof Qg)return e.expr=vg(e.expr,t=>t.key(n.index),o),n.receiver}else{if(n instanceof mu)return vg(n.receiver,t=>t.callFn(n.args),o);if(n instanceof qg)return vg(n.receiver,t=>t.prop(n.name),o);if(n instanceof Qg)return vg(n.receiver,t=>t.key(n.index),o)}return n}function UG(n){return n instanceof Kg?new nc(new Lc(new Si(lt.Equals,n.guard,Lg),Lg,n.expr)):n}var e6="\uFFFD",WG="#",GG="*",qG="/",QG=":",KG="[",XG="]",YG="|";function ZG(n){let o=new Map,e=new Map,t=new Map;for(let r of n.units)for(let s of r.create)switch(s.kind){case j.I18nContext:let d=JG(n,s);r.create.push(d),o.set(s.xref,d),t.set(s.xref,s);break;case j.I18nStart:e.set(s.xref,s);break}let i=null;for(let r of n.units)for(let s of r.create)switch(s.kind){case j.IcuStart:i=s,Je.remove(s);let d=t.get(s.context);if(d.contextKind!==Wm.Icu)continue;let m=e.get(d.i18nBlock);if(m.context===d.xref)continue;let u=e.get(m.root),h=o.get(u.context);if(h===void 0)throw Error("AssertionError: ICU sub-message should belong to a root message.");let v=o.get(d.xref);v.messagePlaceholder=s.messagePlaceholder,h.subMessages.push(v.xref);break;case j.IcuEnd:i=null,Je.remove(s);break;case j.IcuPlaceholder:if(i===null||i.context==null)throw Error("AssertionError: Unexpected ICU placeholder outside of i18n context");o.get(i.context).postprocessingParams.set(s.name,Oe(eq(s))),Je.remove(s);break}}function JG(n,o,e){let t=t6(o.params),i=t6(o.postprocessingParams),r=[...o.params.values()].some(s=>s.length>1);return JW(n.allocateXrefId(),o.xref,o.i18nBlock,o.message,null,t,i,r)}function eq(n){if(n.strings.length!==n.expressionPlaceholders.length+1)throw Error(`AssertionError: Invalid ICU placeholder with ${n.strings.length} strings and ${n.expressionPlaceholders.length} expressions`);let o=n.expressionPlaceholders.map(Tg);return n.strings.flatMap((e,t)=>[e,o[t]||""]).join("")}function t6(n){let o=new Map;for(let[e,t]of n){let i=tq(t);i!==null&&o.set(e,Oe(i))}return o}function tq(n){if(n.length===0)return null;let o=n.map(e=>Tg(e));return o.length===1?o[0]:`${KG}${o.join(YG)}${XG}`}function Tg(n){if(n.flags&mo.ElementTag&&n.flags&mo.TemplateTag){if(typeof n.value!="object")throw Error("AssertionError: Expected i18n param value to have an element and template slot");let i=Tg(Le(q({},n),{value:n.value.element,flags:n.flags&~mo.TemplateTag})),r=Tg(Le(q({},n),{value:n.value.template,flags:n.flags&~mo.ElementTag}));return n.flags&mo.OpenTag&&n.flags&mo.CloseTag?`${r}${i}${r}`:n.flags&mo.CloseTag?`${i}${r}`:`${r}${i}`}if(n.flags&mo.OpenTag&&n.flags&mo.CloseTag)return`${Tg(Le(q({},n),{flags:n.flags&~mo.CloseTag}))}${Tg(Le(q({},n),{flags:n.flags&~mo.OpenTag}))}`;if(n.flags===mo.None)return`${n.value}`;let o="",e="";n.flags&mo.ElementTag?o=WG:n.flags&mo.TemplateTag&&(o=GG),o!==""&&(e=n.flags&mo.CloseTag?qG:"");let t=n.subTemplateIndex===null?"":`${QG}${n.subTemplateIndex}`;return`${e6}${e}${o}${n.value}${t}${e6}`}function nq(n){for(let o of n.units){let e=new Map;for(let i of o.create){if(nh(i)){if(i.handle.slot===null)throw new Error("AssertionError: expected slots to have been allocated before generating advance() calls")}else continue;e.set(i.xref,i.handle.slot)}let t=0;for(let i of o.update){let r=null;if(h0(i)?r=i:xr(i,d=>{r===null&&h0(d)&&(r=d)}),r===null)continue;if(!e.has(r.target))throw new Error(`AssertionError: reference to unknown slot for target ${r.target}`);let s=e.get(r.target);if(t!==s){let d=s-t;if(d<0)throw new Error("AssertionError: slot counter should never need to move backwards");Je.insertBefore(AW(d,r.sourceSpan),i),t=s}}}}function iq(n){for(let o of n.units)for(let e of o.update){if(e.kind!==j.StoreLet)continue;let t={kind:oa.Identifier,name:null,identifier:e.declaredName,local:!0};Je.replace(e,fp(n.allocateXrefId(),t,new _0(e.target,e.value,e.sourceSpan),fl.None))}}function oq(n){let e=[],t=0;for(let i of n.units)for(let r of i.create)r.kind===j.Projection&&(e.push(r.selector),r.projectionSlotIndex=t++);if(e.length>0){let i=null;if(e.length>1||e[0]!=="*"){let r=e.map(s=>s==="*"?s:AT(s));i=n.pool.getConstLiteral(Xg(r),!0)}n.contentSelectors=n.pool.getConstLiteral(Xg(e),!0),n.root.create.prepend([KW(i)])}}function rq(n){yf(n.root,null)}function yf(n,o){let e=n6(n,o);for(let t of n.create)switch(t.kind){case j.ConditionalCreate:case j.ConditionalBranchCreate:case j.Template:yf(n.job.views.get(t.xref),e);break;case j.Projection:t.fallbackView!==null&&yf(n.job.views.get(t.fallbackView),e);break;case j.RepeaterCreate:yf(n.job.views.get(t.xref),e),t.emptyView&&yf(n.job.views.get(t.emptyView),e),t.trackByOps!==null&&t.trackByOps.prepend(bf(n,e,!1));break;case j.Animation:case j.AnimationListener:case j.Listener:case j.TwoWayListener:t.handlerOps.prepend(bf(n,e,!0));break}n.update.prepend(bf(n,e,!1));for(let t of n.functions)t.ops.prepend(bf(n,n6(n,o),!0))}function n6(n,o){let e={view:n.xref,viewContextVariable:{kind:oa.Context,name:null,view:n.xref},contextVariables:new Map,aliases:n.aliases,references:[],letDeclarations:[],parent:o};for(let t of n.contextVariables.keys())e.contextVariables.set(t,{kind:oa.Identifier,name:null,identifier:t,local:!1});for(let t of n.create)switch(t.kind){case j.ElementStart:case j.ConditionalCreate:case j.ConditionalBranchCreate:case j.Template:if(!Array.isArray(t.localRefs))throw new Error("AssertionError: expected localRefs to be an array");for(let i=0;it instanceof y0?Oe(n.addConst(t.expr)):t,ii.None)}var i6="style.",o6="class.",sq="style!",r6="class!",a6="!important";function lq(n){for(let o of n.root.update)if(o.kind===j.Binding&&o.bindingKind===qt.Property)if(o.name.endsWith(a6)&&(o.name=o.name.substring(0,o.name.length-a6.length)),o.name.startsWith(i6)){o.bindingKind=qt.StyleProperty,o.name=o.name.substring(i6.length),cq(o.name)||(o.name=dq(o.name));let{property:e,suffix:t}=Hk(o.name);o.name=e,o.unit=t}else o.name.startsWith(sq)?(o.bindingKind=qt.StyleProperty,o.name="style"):o.name.startsWith(o6)?(o.bindingKind=qt.ClassName,o.name=Hk(o.name.substring(o6.length)).property):o.name.startsWith(r6)&&(o.bindingKind=qt.ClassName,o.name=Hk(o.name.substring(r6.length)).property)}function cq(n){return n.startsWith("--")}function dq(n){return n.replace(/[a-z][A-Z]/g,o=>o.charAt(0)+"-"+o.charAt(1)).toLowerCase()}function Hk(n){let o=n.indexOf("!important");o!==-1&&(n=o>0?n.substring(0,o):"");let e=null,t=n,i=n.lastIndexOf(".");return i>0&&(e=n.slice(i+1),t=n.substring(0,i)),{property:t,suffix:e}}function UP(n,o=!1){return yl(Object.keys(n).map(e=>({key:e,quoted:o,value:n[e]})))}var WP=class{visitText(o){return o.value}visitContainer(o){return o.children.map(e=>e.visit(this)).join("")}visitIcu(o){let e=Object.keys(o.cases).map(i=>`${i} {${o.cases[i].visit(this)}}`);return`{${o.expressionPlaceholder}, ${o.type}, ${e.join(" ")}}`}visitTagPlaceholder(o){return o.isVoid?this.formatPh(o.startName):`${this.formatPh(o.startName)}${o.children.map(e=>e.visit(this)).join("")}${this.formatPh(o.closeName)}`}visitPlaceholder(o){return this.formatPh(o.name)}visitBlockPlaceholder(o){return`${this.formatPh(o.startName)}${o.children.map(e=>e.visit(this)).join("")}${this.formatPh(o.closeName)}`}visitIcuPlaceholder(o,e){return this.formatPh(o.name)}formatPh(o){return`{${A0(o,!1)}}`}},pq=new WP;function iF(n){return n.visit(pq)}var Ad=class{sourceSpan;i18n;constructor(o,e){this.sourceSpan=o,this.i18n=e}},uu=class extends Ad{value;tokens;constructor(o,e,t,i){super(e,i),this.value=o,this.tokens=t}visit(o,e){return o.visitText(this,e)}},Xm=class extends Ad{switchValue;type;cases;switchValueSourceSpan;constructor(o,e,t,i,r,s){super(i,s),this.switchValue=o,this.type=e,this.cases=t,this.switchValueSourceSpan=r}visit(o,e){return o.visitExpansion(this,e)}},m1=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(o,e,t,i,r){this.value=o,this.expression=e,this.sourceSpan=t,this.valueSourceSpan=i,this.expSourceSpan=r}visit(o,e){return o.visitExpansionCase(this,e)}},GP=class extends Ad{name;value;keySpan;valueSpan;valueTokens;constructor(o,e,t,i,r,s,d){super(t,d),this.name=o,this.value=e,this.keySpan=i,this.valueSpan=r,this.valueTokens=s}visit(o,e){return o.visitAttribute(this,e)}},ml=class extends Ad{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;isVoid;constructor(o,e,t,i,r,s,d,m=null,u,h){super(s,h),this.name=o,this.attrs=e,this.directives=t,this.children=i,this.isSelfClosing=r,this.startSourceSpan=d,this.endSourceSpan=m,this.isVoid=u}visit(o,e){return o.visitElement(this,e)}},w0=class{value;sourceSpan;constructor(o,e){this.value=o,this.sourceSpan=e}visit(o,e){return o.visitComment(this,e)}},hl=class extends Ad{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r,s,d=null,m){super(i,m),this.name=o,this.parameters=e,this.children=t,this.nameSpan=r,this.startSourceSpan=s,this.endSourceSpan=d}visit(o,e){return o.visitBlock(this,e)}},Qa=class extends Ad{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r,s,d,m,u,h=null,v){super(m,v),this.componentName=o,this.tagName=e,this.fullName=t,this.attrs=i,this.directives=r,this.children=s,this.isSelfClosing=d,this.startSourceSpan=u,this.endSourceSpan=h}visit(o,e){return o.visitComponent(this,e)}},qP=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r=null){this.name=o,this.attrs=e,this.sourceSpan=t,this.startSourceSpan=i,this.endSourceSpan=r}visit(o,e){return o.visitDirective(this,e)}},u1=class{expression;sourceSpan;constructor(o,e){this.expression=o,this.sourceSpan=e}visit(o,e){return o.visitBlockParameter(this,e)}},g1=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(o,e,t,i,r){this.name=o,this.value=e,this.sourceSpan=t,this.nameSpan=i,this.valueSpan=r}visit(o,e){return o.visitLetDeclaration(this,e)}};function Mo(n,o,e=null){let t=[],i=n.visit?r=>n.visit(r,e)||r.visit(n,e):r=>r.visit(n,e);return o.forEach(r=>{let s=i(r);s&&t.push(s)}),t}var M0={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"},oF="\uE500";M0.ngsp=oF;var QP=class{tokens;errors;nonNormalizedIcuExpressions;constructor(o,e,t){this.tokens=o,this.errors=e,this.nonNormalizedIcuExpressions=t}};function mq(n,o,e,t={}){let i=new XP(new Jx(n,o),e,t);return i.tokenize(),new QP(bq(i.tokens),i.errors,i.nonNormalizedIcuExpressions)}var uq=/\r\n?/g;function xg(n){return`Unexpected character "${n===ia?"EOF":String.fromCharCode(n)}"`}function s6(n){return`Unknown entity "${n}" - use the "&#;" or "&#x;" syntax`}function gq(n,o){return`Unable to parse entity "${o}" - ${n} character reference entities must end with ";"`}var KP=(function(n){return n.HEX="hexadecimal",n.DEC="decimal",n})(KP||{}),hq=["@if","@else","@for","@switch","@case","@default","@empty","@defer","@placeholder","@loading","@error"],mf={start:"{{",end:"}}"},XP=class{_getTagDefinition;_cursor;_tokenizeIcu;_leadingTriviaCodePoints;_currentTokenStart=null;_currentTokenType=null;_expansionCaseStack=[];_openDirectiveCount=0;_inInterpolation=!1;_preserveLineEndings;_i18nNormalizeLineEndingsInICUs;_tokenizeBlocks;_tokenizeLet;_selectorlessEnabled;tokens=[];errors=[];nonNormalizedIcuExpressions=[];constructor(o,e,t){this._getTagDefinition=e,this._tokenizeIcu=t.tokenizeExpansionForms||!1,this._leadingTriviaCodePoints=t.leadingTriviaChars&&t.leadingTriviaChars.map(r=>r.codePointAt(0)||0);let i=t.range||{endPos:o.content.length,startPos:0,startLine:0,startCol:0};this._cursor=t.escapedString?new YP(o,i):new h1(o,i),this._preserveLineEndings=t.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=t.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=t.tokenizeBlocks??!0,this._tokenizeLet=t.tokenizeLet??!0,this._selectorlessEnabled=t.selectorlessEnabled??!1;try{this._cursor.init()}catch(r){this.handleError(r)}}_processCarriageReturns(o){return this._preserveLineEndings?o:o.replace(uq,` `)}tokenize(){for(;this._cursor.peek()!==ia;){let o=this._cursor.clone();try{this._attemptCharCode(Ig)?this._attemptCharCode(TP)?this._attemptCharCode(Nc)?this._consumeCdata(o):this._attemptCharCode(Yx)?this._consumeComment(o):this._consumeDocType(o):this._attemptCharCode(ul)?this._consumeTagClose(o):this._consumeTagOpen(o):this._tokenizeLet&&this._cursor.peek()===fg&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(o):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(o):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(Ka)?this._consumeBlockEnd(o):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(41),this._endToken([])}_getBlockName(){let o=!1,e=this._cursor.clone();return this._attemptCharCodeUntilFn(t=>p0(t)?!o:yq(t)?(o=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeBlockStart(o){this._requireCharCode(fg),this._beginToken(24,o);let e=this._endToken([this._getBlockName()]);if(e.parts[0]==="default never"&&this._attemptCharCode(fs)){this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([]);return}if(this._cursor.peek()===Ya)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Bo),this._attemptCharCode(Pr))this._attemptCharCodeUntilFn(Bo);else{e.type=28;return}this._attemptCharCode(_l)?(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(o){this._beginToken(26,o),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(c6);this._cursor.peek()!==Pr&&this._cursor.peek()!==ia;){this._beginToken(27);let o=this._cursor.clone(),e=null,t=0;for(;this._cursor.peek()!==fs&&this._cursor.peek()!==ia||e!==null;){let i=this._cursor.peek();if(i===Km)this._cursor.advance();else if(i===e)e=null;else if(e===null&&Pf(i))e=i;else if(i===Ya&&e===null)t++;else if(i===Pr&&e===null){if(t===0)break;t>0&&t--}this._cursor.advance()}this._endToken([this._cursor.getChars(o)]),this._attemptCharCodeUntilFn(c6)}}_consumeLetDeclaration(o){if(this._requireStr("@let"),this._beginToken(29,o),p0(this._cursor.peek()))this._attemptCharCodeUntilFn(Bo);else{let i=this._endToken([this._cursor.getChars(o)]);i.type=32;return}let e=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(Bo),!this._attemptCharCode(ta)){e.type=32;return}this._attemptCharCodeUntilFn(i=>Bo(i)&&!Zx(i)),this._consumeLetDeclarationValue(),this._cursor.peek()===fs?(this._beginToken(31),this._cursor.advance(),this._endToken([])):(e.type=32,e.sourceSpan=this._cursor.getSpan(o))}_getLetDeclarationName(){let o=this._cursor.clone(),e=!1;return this._attemptCharCodeUntilFn(t=>Pp(t)||t===D1||t===Ap||e&&gl(t)?(e=!0,!1):!0),this._cursor.getChars(o).trim()}_consumeLetDeclarationValue(){let o=this._cursor.clone();for(this._beginToken(30,o);this._cursor.peek()!==ia;){let e=this._cursor.peek();if(e===fs)break;Pf(e)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(t=>t===Km?(this._cursor.advance(),!1):t===e)),this._cursor.advance()}this._endToken([this._cursor.getChars(o)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(vq(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===Ka){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(o,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=o}_endToken(o,e){if(this._currentTokenStart===null)throw new dn(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 dn(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let t={type:this._currentTokenType,parts:o,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(t),this._currentTokenStart=null,this._currentTokenType=null,t}_createError(o,e){this._isInExpansionForm()&&(o+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let t=new dn(e,o);return this._currentTokenStart=null,this._currentTokenType=null,t}handleError(o){if(o instanceof S0&&(o=this._createError(o.msg,this._cursor.getSpan(o.cursor))),o instanceof dn)this.errors.push(o);else throw o}_attemptCharCode(o){return this._cursor.peek()===o?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(o){return xq(this._cursor.peek(),o)?(this._cursor.advance(),!0):!1}_requireCharCode(o){let e=this._cursor.clone();if(!this._attemptCharCode(o))throw this._createError(xg(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(o){let e=o.length;if(this._cursor.charsLeft()this._peekStr(o))}_isLetStart(){return this._cursor.peek()===fg&&this._peekStr("@let")}_consumeEntity(o){this._beginToken(9);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(TN)){let t=this._attemptCharCode(RN)||this._attemptCharCode(DU),i=this._cursor.clone();if(this._attemptCharCodeUntilFn(fq),this._cursor.peek()!=fs){this._cursor.advance();let s=t?KP.HEX:KP.DEC;throw this._createError(gq(s,this._cursor.getChars(e)),this._cursor.getSpan())}let r=this._cursor.getChars(i);this._cursor.advance();try{let s=parseInt(r,t?16:10);this._endToken([String.fromCodePoint(s),this._cursor.getChars(e)])}catch{throw this._createError(s6(this._cursor.getChars(e)),this._cursor.getSpan())}}else{let t=this._cursor.clone();if(this._attemptCharCodeUntilFn(Cq),this._cursor.peek()!=fs)this._beginToken(o,e),this._cursor=t,this._endToken(["&"]);else{let i=this._cursor.getChars(t);this._cursor.advance();let r=M0.hasOwnProperty(i)&&M0[i];if(!r)throw this._createError(s6(i),this._cursor.getSpan(e));this._endToken([r,`&${i};`])}}}_consumeRawText(o,e){this._beginToken(o?6:7);let t=[];for(;;){let i=this._cursor.clone(),r=e();if(this._cursor=i,r)break;o&&this._cursor.peek()===Xx?(this._endToken([this._processCarriageReturns(t.join(""))]),t.length=0,this._consumeEntity(6),this._beginToken(6)):t.push(this._readChar())}this._endToken([this._processCarriageReturns(t.join(""))])}_consumeComment(o){this._beginToken(10,o),this._requireCharCode(Yx),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeCdata(o){this._beginToken(12,o),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(o){this._beginToken(18,o);let e=this._cursor.clone();this._attemptUntilChar(Us);let t=this._cursor.getChars(e);this._cursor.advance(),this._endToken([t])}_consumePrefixAndName(o){let e=this._cursor.clone(),t="";for(;this._cursor.peek()!==Dc&&!_q(this._cursor.peek());)this._cursor.advance();let i;this._cursor.peek()===Dc?(t=this._cursor.getChars(e),this._cursor.advance(),i=this._cursor.clone()):i=e,this._requireCharCodeUntilFn(o,t===""?0:1);let r=this._cursor.getChars(i);return[t,r]}_consumeTagOpen(o){let e,t,i,r;try{if(this._selectorlessEnabled&&rx(this._cursor.peek()))r=this._consumeComponentOpenStart(o),[i,t,e]=r.parts,t&&(i+=`:${t}`),e&&(i+=`:${e}`),this._attemptCharCodeUntilFn(Bo);else{if(!Pp(this._cursor.peek()))throw this._createError(xg(this._cursor.peek()),this._cursor.getSpan(o));r=this._consumeTagOpenStart(o),t=r.parts[0],e=i=r.parts[1],this._attemptCharCodeUntilFn(Bo)}for(;!p6(this._cursor.peek());)if(this._selectorlessEnabled&&this._cursor.peek()===fg){let d=this._cursor.clone(),m=d.clone();m.advance(),rx(m.peek())&&this._consumeDirective(d,m)}else this._consumeAttribute();r.type===33?this._consumeComponentOpenEnd():this._consumeTagOpenEnd()}catch(d){if(d instanceof dn){r?r.type=r.type===33?37:4:(this._beginToken(5,o),this._endToken(["<"]));return}throw d}let s=this._getTagDefinition(e).getContentType(t);s===Oc.RAW_TEXT?this._consumeRawTextWithTagClose(r,i,!1):s===Oc.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,i,!0)}_consumeRawTextWithTagClose(o,e,t){this._consumeRawText(t,()=>!this._attemptCharCode(Ig)||!this._attemptCharCode(ul)||(this._attemptCharCodeUntilFn(Bo),!this._attemptStrCaseInsensitive(e))?!1:(this._attemptCharCodeUntilFn(Bo),this._attemptCharCode(Us))),this._beginToken(o.type===33?36:3),this._requireCharCodeUntilFn(i=>i===Us,3),this._cursor.advance(),this._endToken(o.parts)}_consumeTagOpenStart(o){this._beginToken(0,o);let e=this._consumePrefixAndName(Rm);return this._endToken(e)}_consumeComponentOpenStart(o){this._beginToken(33,o);let e=this._consumeComponentName();return this._endToken(e)}_consumeComponentName(){let o=this._cursor.clone();for(;d6(this._cursor.peek());)this._cursor.advance();let e=this._cursor.getChars(o),t="",i="";return this._cursor.peek()===Dc&&(this._cursor.advance(),[t,i]=this._consumePrefixAndName(Rm)),[e,t,i]}_consumeAttribute(){this._consumeAttributeName(),this._attemptCharCodeUntilFn(Bo),this._attemptCharCode(ta)&&(this._attemptCharCodeUntilFn(Bo),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Bo)}_consumeAttributeName(){let o=this._cursor.peek();if(o===d0||o===c0)throw this._createError(xg(o),this._cursor.getSpan());this._beginToken(14);let e;if(this._openDirectiveCount>0){let i=0;e=r=>{if(this._openDirectiveCount>0){if(r===Ya)i++;else if(r===Pr){if(i===0)return!0;i--}}return Rm(r)}}else if(o===Nc){let i=0;e=r=>(r===Nc?i++:r===Pd&&i--,i<=0?Rm(r):Zx(r))}else e=Rm;let t=this._consumePrefixAndName(e);this._endToken(t)}_consumeAttributeValue(){if(this._cursor.peek()===d0||this._cursor.peek()===c0){let o=this._cursor.peek();this._consumeQuote(o);let e=()=>this._cursor.peek()===o;this._consumeWithInterpolation(16,17,e,e),this._consumeQuote(o)}else{let o=()=>Rm(this._cursor.peek());this._consumeWithInterpolation(16,17,o,o)}}_consumeQuote(o){this._beginToken(15),this._requireCharCode(o),this._endToken([String.fromCodePoint(o)])}_consumeTagOpenEnd(){let o=this._attemptCharCode(ul)?2:1;this._beginToken(o),this._requireCharCode(Us),this._endToken([])}_consumeComponentOpenEnd(){let o=this._attemptCharCode(ul)?35:34;this._beginToken(o),this._requireCharCode(Us),this._endToken([])}_consumeTagClose(o){if(this._selectorlessEnabled){let t=o.clone();for(;t.peek()!==Us&&!rx(t.peek());)t.advance();if(rx(t.peek())){this._beginToken(36,o);let i=this._consumeComponentName();this._attemptCharCodeUntilFn(Bo),this._requireCharCode(Us),this._endToken(i);return}}this._beginToken(3,o),this._attemptCharCodeUntilFn(Bo);let e=this._consumePrefixAndName(Rm);this._attemptCharCodeUntilFn(Bo),this._requireCharCode(Us),this._endToken(e)}_consumeExpansionFormStart(){this._beginToken(19),this._requireCharCode(_l),this._endToken([]),this._expansionCaseStack.push(19),this._beginToken(7);let o=this._readUntil(Oa),e=this._processCarriageReturns(o);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([e]);else{let i=this._endToken([o]);e!==o&&this.nonNormalizedIcuExpressions.push(i)}this._requireCharCode(Oa),this._attemptCharCodeUntilFn(Bo),this._beginToken(7);let t=this._readUntil(Oa);this._endToken([t]),this._requireCharCode(Oa),this._attemptCharCodeUntilFn(Bo)}_consumeExpansionCaseStart(){this._beginToken(20);let o=this._readUntil(_l).trim();this._endToken([o]),this._attemptCharCodeUntilFn(Bo),this._beginToken(21),this._requireCharCode(_l),this._endToken([]),this._attemptCharCodeUntilFn(Bo),this._expansionCaseStack.push(21)}_consumeExpansionCaseEnd(){this._beginToken(22),this._requireCharCode(Ka),this._endToken([]),this._attemptCharCodeUntilFn(Bo),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(23),this._requireCharCode(Ka),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(o,e,t,i){this._beginToken(o);let r=[];for(;!t();){let s=this._cursor.clone();this._attemptStr(mf.start)?(this._endToken([this._processCarriageReturns(r.join(""))],s),r.length=0,this._consumeInterpolation(e,s,i),this._beginToken(o)):this._cursor.peek()===Xx?(this._endToken([this._processCarriageReturns(r.join(""))]),r.length=0,this._consumeEntity(o),this._beginToken(o)):r.push(this._readChar())}this._inInterpolation=!1,this._endToken([this._processCarriageReturns(r.join(""))])}_consumeInterpolation(o,e,t){let i=[];this._beginToken(o,e),i.push(mf.start);let r=this._cursor.clone(),s=null,d=!1;for(;this._cursor.peek()!==ia&&(t===null||!t());){let m=this._cursor.clone();if(this._isTagStart()){this._cursor=m,i.push(this._getProcessedChars(r,m)),this._endToken(i);return}if(s===null)if(this._attemptStr(mf.end)){i.push(this._getProcessedChars(r,m)),i.push(mf.end),this._endToken(i);return}else this._attemptStr("//")&&(d=!0);let u=this._cursor.peek();this._cursor.advance(),u===Km?this._cursor.advance():u===s?s=null:!d&&s===null&&Pf(u)&&(s=u)}i.push(this._getProcessedChars(r,this._cursor)),this._endToken(i)}_consumeDirective(o,e){for(this._requireCharCode(fg),this._cursor.advance();d6(this._cursor.peek());)this._cursor.advance();this._beginToken(38,o);let t=this._cursor.getChars(e);if(this._endToken([t]),this._attemptCharCodeUntilFn(Bo),this._cursor.peek()===Ya){for(this._openDirectiveCount++,this._beginToken(39),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Bo);!p6(this._cursor.peek())&&this._cursor.peek()!==Pr;)this._consumeAttribute();if(this._attemptCharCodeUntilFn(Bo),this._openDirectiveCount--,this._cursor.peek()!==Pr){if(this._cursor.peek()===Us||this._cursor.peek()===ul)return;throw this._createError(xg(this._cursor.peek()),this._cursor.getSpan(o))}this._beginToken(40),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Bo)}}_getProcessedChars(o,e){return this._processCarriageReturns(e.getChars(o))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===ia||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===Ka&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._isLetStart()||this._cursor.peek()===Ka))}_isTagStart(){if(this._cursor.peek()===Ig){let o=this._cursor.clone();o.advance();let e=o.peek();if(lu<=e&&e<=N0||Ip<=e&&e<=eh||e===ul||e===TP)return!0}return!1}_readUntil(o){let e=this._cursor.clone();return this._attemptUntilChar(o),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()!==_l)return!1;let o=this._cursor.clone(),e=this._attemptStr(mf.start);return this._cursor=o,!e}};function Bo(n){return!p0(n)||n===ia}function Rm(n){return p0(n)||n===Us||n===Ig||n===ul||n===d0||n===c0||n===ta||n===ia}function _q(n){return(nON)}function fq(n){return n===fs||n===ia||!FU(n)}function Cq(n){return n===fs||n===ia||!(Pp(n)||gl(n))}function vq(n){return n!==Ka}function xq(n,o){return l6(n)===l6(o)}function l6(n){return n>=lu&&n<=N0?n-lu+Ip:n}function yq(n){return Pp(n)||gl(n)||n===Ap}function c6(n){return n!==fs&&Bo(n)}function rx(n){return n===Ap||n>=Ip&&n<=eh}function d6(n){return Pp(n)||gl(n)||n===Ap}function p6(n){return n===ul||n===Us||n===Ig||n===ia}function bq(n){let o=[],e;for(let t=0;t0&&e.indexOf(o.peek())!==-1;)t===o&&(o=o.clone()),o.advance();let i=this.locationFromCursor(o),r=this.locationFromCursor(this),s=t!==o?this.locationFromCursor(t):i;return new On(i,r,s)}getChars(o){return this.input.substring(o.state.offset,this.state.offset)}charAt(o){return this.input.charCodeAt(o)}advanceState(o){if(o.offset>=this.end)throw this.state=o,new S0('Unexpected character "EOF"',this);let e=this.charAt(o.offset);e===Qm?(o.line++,o.column=0):Zx(e)||o.column++,o.offset++,this.updatePeek(o)}updatePeek(o){o.peek=o.offset>=this.end?ia:this.charAt(o.offset)}locationFromCursor(o){return new m0(o.file,o.state.offset,o.state.line,o.state.column)}},YP=class n extends h1{internalState;constructor(o,e){o instanceof n?(super(o),this.internalState=q({},o.internalState)):(super(o,e),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new n(this)}getChars(o){let e=o.clone(),t="";for(;e.internalState.offsetthis.internalState.peek;if(o()===Km)if(this.internalState=q({},this.state),this.advanceState(this.internalState),o()===DN)this.state.peek=Qm;else if(o()===IN)this.state.peek=jT;else if(o()===FN)this.state.peek=SN;else if(o()===AN)this.state.peek=BT;else if(o()===AU)this.state.peek=kU;else if(o()===HT)this.state.peek=kN;else if(o()===NN)if(this.advanceState(this.internalState),o()===_l){this.advanceState(this.internalState);let e=this.clone(),t=0;for(;o()!==Ka;)this.advanceState(this.internalState),t++;this.state.peek=this.decodeHexDigits(e,t)}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(o()===RN){this.advanceState(this.internalState);let e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(V5(o())){let e="",t=0,i=this.clone();for(;V5(o())&&t<3;)i=this.clone(),e+=String.fromCodePoint(o()),this.advanceState(this.internalState),t++;this.state.peek=parseInt(e,8),this.internalState=i.internalState}else Zx(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(o,e){let t=this.input.slice(o.internalState.offset,o.internalState.offset+e),i=parseInt(t,16);if(isNaN(i))throw o.state=o.internalState,new S0("Invalid hexadecimal escape sequence",o);return i}},S0=class extends Error{msg;cursor;constructor(o,e){super(o),this.msg=o,this.cursor=e,Object.setPrototypeOf(this,new.target.prototype)}},vr=class n extends dn{elementName;static create(o,e,t){return new n(o,e,t)}constructor(o,e,t){super(e,t),this.elementName=o}},_1=class{rootNodes;errors;constructor(o,e){this.rootNodes=o,this.errors=e}},wq=class{getTagDefinition;constructor(o){this.getTagDefinition=o}parse(o,e,t){let i=mq(o,e,this.getTagDefinition,t),r=new ZP(i.tokens,this.getTagDefinition);return r.build(),new _1(r.rootNodes,[...i.errors,...r.errors])}},ZP=class n{tokens;tagDefinitionResolver;_index=-1;_peek;_containerStack=[];rootNodes=[];errors=[];constructor(o,e){this.tokens=o,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 o of this._containerStack)o instanceof hl&&this.errors.push(vr.create(o.name,o.sourceSpan,`Unclosed block "${o.name}"`))}_advance(){let o=this._peek;return this._index0)return this.errors=this.errors.concat(r.errors),null;let s=new On(o.sourceSpan.start,i.sourceSpan.end,o.sourceSpan.fullStart),d=new On(e.sourceSpan.start,i.sourceSpan.end,e.sourceSpan.fullStart);return new m1(o.parts[0],r.rootNodes,s,o.sourceSpan,d)}_collectExpansionExpTokens(o){let e=[],t=[21];for(;;){if((this._peek.type===19||this._peek.type===21)&&t.push(this._peek.type),this._peek.type===22)if(m6(t,21)){if(t.pop(),t.length===0)return e}else return this.errors.push(vr.create(null,o.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===23)if(m6(t,19))t.pop();else return this.errors.push(vr.create(null,o.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===41)return this.errors.push(vr.create(null,o.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}}_consumeText(o){let e=[o],t=o.sourceSpan,i=o.parts[0];if(i.length>0&&i[0]===` `){let r=this._getContainer();r!=null&&r.children.length===0&&this._getTagDefinition(r)?.ignoreFirstLf&&(i=i.substring(1),e[0]={type:o.type,sourceSpan:o.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)o=this._advance(),e.push(o),o.type===8?i+=o.parts.join("").replace(/&([^;]+);/g,u6):o.type===9?i+=o.parts[0]:i+=o.parts.join("");if(i.length>0){let r=o.sourceSpan;this._addToParent(new uu(i,new On(t.start,r.end,t.fullStart,t.details),e))}}_closeVoidElement(){let o=this._getContainer();o!==null&&this._getTagDefinition(o)?.isVoid&&this._containerStack.pop()}_consumeElementStartTag(o){let e=[],t=[];this._consumeAttributesAndDirectives(e,t);let i=this._getElementFullName(o,this._getClosestElementLikeParent()),r=this._getTagDefinition(i),s=!1;this._peek.type===2?(this._advance(),s=!0,r?.canSelfClose||fP(i)!==null||r?.isVoid||this.errors.push(vr.create(i,o.sourceSpan,`Only void, custom and foreign elements can be self closed "${o.parts[1]}"`))):this._peek.type===1&&(this._advance(),s=!1);let d=this._peek.sourceSpan.fullStart,m=new On(o.sourceSpan.start,d,o.sourceSpan.fullStart),u=new On(o.sourceSpan.start,d,o.sourceSpan.fullStart),h=new ml(i,e,t,[],s,m,u,void 0,r?.isVoid??!1),v=this._getContainer(),b=v!==null&&!!this._getTagDefinition(v)?.isClosedByChild(h.name);this._pushContainer(h,b),s?this._popContainer(i,ml,m):o.type===4&&(this._popContainer(i,ml,null),this.errors.push(vr.create(i,m,`Opening tag "${i}" not terminated.`)))}_consumeComponentStartTag(o){let e=o.parts[0],t=[],i=[];this._consumeAttributesAndDirectives(t,i);let r=this._getClosestElementLikeParent(),s=this._getComponentTagName(o,r),d=this._getComponentFullName(o,r),m=this._peek.type===35;this._advance();let u=this._peek.sourceSpan.fullStart,h=new On(o.sourceSpan.start,u,o.sourceSpan.fullStart),v=new On(o.sourceSpan.start,u,o.sourceSpan.fullStart),b=new Qa(e,s,d,t,i,[],m,h,v,void 0),y=this._getContainer(),x=y!==null&&b.tagName!==null&&!!this._getTagDefinition(y)?.isClosedByChild(b.tagName);this._pushContainer(b,x),m?this._popContainer(d,Qa,h):o.type===37&&(this._popContainer(d,Qa,null),this.errors.push(vr.create(d,h,`Opening tag "${d}" not terminated.`)))}_consumeAttributesAndDirectives(o,e){for(;this._peek.type===14||this._peek.type===38;)this._peek.type===38?e.push(this._consumeDirective(this._peek)):o.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(o){let e=this._getComponentFullName(o,this._getClosestElementLikeParent());if(!this._popContainer(e,Qa,o.sourceSpan)){let t=this._containerStack[this._containerStack.length-1],i;t instanceof Qa&&t.componentName===o.parts[0]?i=`, did you mean "${t.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let r=`Unexpected closing tag "${e}"${i}`;this.errors.push(vr.create(e,o.sourceSpan,r))}}_getTagDefinition(o){return typeof o=="string"?this.tagDefinitionResolver(o):o instanceof ml?this.tagDefinitionResolver(o.name):o instanceof Qa&&o.tagName!==null?this.tagDefinitionResolver(o.tagName):null}_pushContainer(o,e){e&&this._containerStack.pop(),this._addToParent(o),this._containerStack.push(o)}_consumeElementEndTag(o){let e=this._getElementFullName(o,this._getClosestElementLikeParent());if(this._getTagDefinition(e)?.isVoid)this.errors.push(vr.create(e,o.sourceSpan,`Void elements do not have end tags "${o.parts[1]}"`));else if(!this._popContainer(e,ml,o.sourceSpan)){let t=`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(vr.create(e,o.sourceSpan,t))}}_popContainer(o,e,t){let i=!1;for(let r=this._containerStack.length-1;r>=0;r--){let s=this._containerStack[r];if(((s instanceof Qa?s.fullName:s.name)===o||o===null)&&s instanceof e)return s.endSourceSpan=t,s.sourceSpan.end=t!==null?t.end:s.sourceSpan.end,this._containerStack.splice(r,this._containerStack.length-r),!i;(s instanceof hl||!this._getTagDefinition(s)?.closedByParent)&&(i=!0)}return!1}_consumeAttr(o){let e=fx(o.parts[0],o.parts[1]),t=o.sourceSpan.end;this._peek.type===15&&this._advance();let i="",r=[],s,d;if(this._peek.type===16)for(s=this._peek.sourceSpan,d=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?i+=h.parts.join("").replace(/&([^;]+);/g,u6):h.type===9?i+=h.parts[0]:i+=h.parts.join(""),d=t=h.sourceSpan.end}this._peek.type===15&&(t=this._advance().sourceSpan.end);let u=s&&d&&new On(s.start,d,s.fullStart);return new GP(e,i,new On(o.sourceSpan.start,t,o.sourceSpan.fullStart),o.sourceSpan,u,r.length>0?r:void 0,void 0)}_consumeDirective(o){let e=[],t=o.sourceSpan.end,i=null;if(this._advance(),this._peek.type===39){for(t=this._peek.sourceSpan.end,this._advance();this._peek.type===14;)e.push(this._consumeAttr(this._advance()));this._peek.type===40?(i=this._peek.sourceSpan,this._advance()):this.errors.push(vr.create(null,o.sourceSpan,"Unterminated directive definition"))}let r=new On(o.sourceSpan.start,t,o.sourceSpan.fullStart),s=new On(r.start,i===null?o.sourceSpan.end:i.end,r.fullStart);return new qP(o.parts[0],e,s,r,i)}_consumeBlockOpen(o){let e=[];for(;this._peek.type===27;){let d=this._advance();e.push(new u1(d.parts[0],d.sourceSpan))}this._peek.type===25&&this._advance();let t=this._peek.sourceSpan.fullStart,i=new On(o.sourceSpan.start,t,o.sourceSpan.fullStart),r=new On(o.sourceSpan.start,t,o.sourceSpan.fullStart),s=new hl(o.parts[0],e,[],i,o.sourceSpan,r);this._pushContainer(s,!1)}_consumeBlockClose(o){let e=this._containerStack.length,t=this._containerStack[e-1];if(!this._popContainer(null,hl,o.sourceSpan)){if(this._containerStack.length element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));return}this.errors.push(vr.create(null,o.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(o){let e=[];for(;this._peek.type===27;){let d=this._advance();e.push(new u1(d.parts[0],d.sourceSpan))}let t=this._peek.sourceSpan.fullStart,i=new On(o.sourceSpan.start,t,o.sourceSpan.fullStart),r=new On(o.sourceSpan.start,t,o.sourceSpan.fullStart),s=new hl(o.parts[0],e,[],i,o.sourceSpan,r);this._pushContainer(s,!1),this._popContainer(null,hl,null),this.errors.push(vr.create(o.parts[0],i,`Incomplete block "${o.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(o){let e=o.parts[0],t,i;if(this._peek.type!==30){this.errors.push(vr.create(o.parts[0],o.sourceSpan,`Invalid @let declaration "${e}". Declaration must have a value.`));return}else t=this._advance();if(this._peek.type!==31){this.errors.push(vr.create(o.parts[0],o.sourceSpan,`Unterminated @let declaration "${e}". Declaration must be terminated with a semicolon.`));return}else i=this._advance();let r=i.sourceSpan.end,s=new On(o.sourceSpan.start,r,o.sourceSpan.fullStart),d=o.sourceSpan.toString().lastIndexOf(e),m=o.sourceSpan.start.moveBy(d),u=new On(m,o.sourceSpan.end),h=new g1(e,t.parts[0],s,u,t.sourceSpan);this._addToParent(h)}_consumeIncompleteLet(o){let e=o.parts[0]??"",t=e?` "${e}"`:"";if(e.length>0){let i=o.sourceSpan.toString().lastIndexOf(e),r=o.sourceSpan.start.moveBy(i),s=new On(r,o.sourceSpan.end),d=new On(o.sourceSpan.start,o.sourceSpan.start.moveBy(0)),m=new g1(e,"",o.sourceSpan,s,d);this._addToParent(m)}this.errors.push(vr.create(o.parts[0],o.sourceSpan,`Incomplete @let declaration${t}. @let declarations must be written as \`@let = ;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestElementLikeParent(){for(let o=this._containerStack.length-1;o>-1;o--){let e=this._containerStack[o];if(e instanceof ml||e instanceof Qa)return e}return null}_addToParent(o){let e=this._getContainer();e===null?this.rootNodes.push(o):e.children.push(o)}_getElementFullName(o,e){let t=this._getPrefix(o,e);return fx(t,o.parts[1])}_getComponentFullName(o,e){let t=o.parts[0],i=this._getComponentTagName(o,e);return i===null?t:i.startsWith(":")?t+i:`${t}:${i}`}_getComponentTagName(o,e){let t=this._getPrefix(o,e),i=o.parts[2];return!t&&!i?null:!t&&i?i:fx(t,i||"ng-component")}_getPrefix(o,e){let t,i;if(o.type===33||o.type===37||o.type===36?(t=o.parts[1],i=o.parts[2]):(t=o.parts[0],i=o.parts[1]),t=t||this._getTagDefinition(i)?.implicitNamespacePrefix||"",!t&&e){let r=e instanceof ml?e.name:e.tagName;if(r!==null){let s=ha(r)[1],d=this._getTagDefinition(s);d!==null&&!d.preventNamespaceInheritance&&(t=fP(r))}}return t}};function m6(n,o){return n.length>0&&n[n.length-1]===o}function u6(n,o){return M0[o]!==void 0?M0[o]||n:/^#x[a-f0-9]+$/i.test(o)?String.fromCodePoint(parseInt(o.slice(2),16)):/^#\d+$/.test(o)?String.fromCodePoint(parseInt(o.slice(1),10)):n}var rF="ngPreserveWhitespaces",g6=new Set(["pre","template","textarea","script","style"]),aF=` \f \r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,Mq=new RegExp(`[^${aF}]`),Sq=new RegExp(`[${aF}]{2,}`,"g");function h6(n){return n.some(o=>o.name===rF)}function sF(n){return n.replace(new RegExp(oF,"g")," ")}var f1=class{preserveSignificantWhitespace;originalNodeMap;requireContext;icuExpansionDepth=0;constructor(o,e,t=!0){this.preserveSignificantWhitespace=o,this.originalNodeMap=e,this.requireContext=t}visitElement(o,e){if(g6.has(o.name)||h6(o.attrs)){let i=new ml(o.name,Pc(this,o.attrs),Pc(this,o.directives),o.children,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.isVoid,o.i18n);return this.originalNodeMap?.set(i,o),i}let t=new ml(o.name,o.attrs,o.directives,Pc(this,o.children),o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.isVoid,o.i18n);return this.originalNodeMap?.set(t,o),t}visitAttribute(o,e){return o.name!==rF?o:null}visitText(o,e){let t=o.value.match(Mq),i=e&&(e.prev instanceof Xm||e.next instanceof Xm);if(this.icuExpansionDepth>0&&this.preserveSignificantWhitespace)return o;if(t||i){let s=o.tokens.map(h=>h.type===5?Eq(h):h);if(!this.preserveSignificantWhitespace&&s.length>0){let h=s[0];s.splice(0,1,kq(h,e));let v=s[s.length-1];s.splice(s.length-1,1,Pq(v,e))}let d=cF(o.value),m=this.preserveSignificantWhitespace?d:Tq(d,e),u=new uu(m,o.sourceSpan,s,o.i18n);return this.originalNodeMap?.set(u,o),u}return null}visitComment(o,e){return o}visitExpansion(o,e){this.icuExpansionDepth++;let t;try{t=new Xm(o.switchValue,o.type,Pc(this,o.cases),o.sourceSpan,o.switchValueSourceSpan,o.i18n)}finally{this.icuExpansionDepth--}return this.originalNodeMap?.set(t,o),t}visitExpansionCase(o,e){let t=new m1(o.value,Pc(this,o.expression),o.sourceSpan,o.valueSourceSpan,o.expSourceSpan);return this.originalNodeMap?.set(t,o),t}visitBlock(o,e){let t=new hl(o.name,o.parameters,Pc(this,o.children),o.sourceSpan,o.nameSpan,o.startSourceSpan,o.endSourceSpan);return this.originalNodeMap?.set(t,o),t}visitBlockParameter(o,e){return o}visitLetDeclaration(o,e){return o}visitComponent(o,e){if(o.tagName&&g6.has(o.tagName)||h6(o.attrs)){let i=new Qa(o.componentName,o.tagName,o.fullName,Pc(this,o.attrs),Pc(this,o.directives),o.children,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n);return this.originalNodeMap?.set(i,o),i}let t=new Qa(o.componentName,o.tagName,o.fullName,o.attrs,o.directives,Pc(this,o.children),o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n);return this.originalNodeMap?.set(t,o),t}visitDirective(o,e){return o}visit(o,e){if(this.requireContext&&!e)throw new Error("WhitespaceVisitor requires context. Visit via `visitAllWithSiblings` to get this context.");return!1}};function kq(n,o){return n.type!==5||!!o?.prev?n:lF(n,t=>t.trimStart())}function Pq(n,o){return n.type!==5||!!o?.next?n:lF(n,t=>t.trimEnd())}function Tq(n,o){let e=!o?.prev,t=!o?.next,i=e?n.trimStart():n;return t?i.trimEnd():i}function Eq({type:n,parts:o,sourceSpan:e}){return{type:n,parts:[cF(o[0])],sourceSpan:e}}function lF({type:n,parts:o,sourceSpan:e},t){return{type:n,parts:[t(o[0])],sourceSpan:e}}function cF(n){return sF(n).replace(Sq," ")}function Pc(n,o){let e=[];return o.forEach((t,i)=>{let r={prev:o[i-1],next:o[i+1]},s=t.visit(n,r);s&&e.push(s)}),e}var Cn=(function(n){return n[n.Character=0]="Character",n[n.Identifier=1]="Identifier",n[n.PrivateIdentifier=2]="PrivateIdentifier",n[n.Keyword=3]="Keyword",n[n.String=4]="String",n[n.Operator=5]="Operator",n[n.Number=6]="Number",n[n.RegExpBody=7]="RegExpBody",n[n.RegExpFlags=8]="RegExpFlags",n[n.Error=9]="Error",n})(Cn||{}),Ym=(function(n){return n[n.Plain=0]="Plain",n[n.TemplateLiteralPart=1]="TemplateLiteralPart",n[n.TemplateLiteralEnd=2]="TemplateLiteralEnd",n})(Ym||{}),Oq=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],k0=class{tokenize(o){return new JP(o).scan()}},Js=class{index;end;type;numValue;strValue;constructor(o,e,t,i,r){this.index=o,this.end=e,this.type=t,this.numValue=i,this.strValue=r}isCharacter(o){return this.type===Cn.Character&&this.numValue===o}isNumber(){return this.type===Cn.Number}isString(){return this.type===Cn.String}isOperator(o){return this.type===Cn.Operator&&this.strValue===o}isIdentifier(){return this.type===Cn.Identifier}isPrivateIdentifier(){return this.type===Cn.PrivateIdentifier}isKeyword(){return this.type===Cn.Keyword}isKeywordLet(){return this.type===Cn.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===Cn.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===Cn.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===Cn.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===Cn.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===Cn.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===Cn.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===Cn.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===Cn.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===Cn.Keyword&&this.strValue==="in"}isKeywordInstanceOf(){return this.type===Cn.Keyword&&this.strValue==="instanceof"}isError(){return this.type===Cn.Error}isRegExpBody(){return this.type===Cn.RegExpBody}isRegExpFlags(){return this.type===Cn.RegExpFlags}toNumber(){return this.type===Cn.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===Ym.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===Ym.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case Cn.Character:case Cn.Identifier:case Cn.Keyword:case Cn.Operator:case Cn.PrivateIdentifier:case Cn.String:case Cn.Error:case Cn.RegExpBody:case Cn.RegExpFlags:return this.strValue;case Cn.Number:return this.numValue.toString();default:return null}}},Tf=class extends Js{kind;constructor(o,e,t,i){super(o,e,Cn.String,0,t),this.kind=i}};function uf(n,o,e){return new Js(n,o,Cn.Character,e,String.fromCharCode(e))}function Dq(n,o,e){return new Js(n,o,Cn.Identifier,0,e)}function Iq(n,o,e){return new Js(n,o,Cn.PrivateIdentifier,0,e)}function Aq(n,o,e){return new Js(n,o,Cn.Keyword,0,e)}function pp(n,o,e){return new Js(n,o,Cn.Operator,0,e)}function Nq(n,o,e){return new Js(n,o,Cn.Number,e,"")}function Fq(n,o,e){return new Js(n,o,Cn.Error,0,e)}function Rq(n,o,e){return new Js(n,o,Cn.RegExpBody,0,e)}function Lq(n,o,e){return new Js(n,o,Cn.RegExpFlags,0,e)}var gf=new Js(-1,-1,Cn.Character,0,""),JP=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(o){this.input=o,this.length=o.length,this.advance()}scan(){let o=this.scanToken();for(;o!==null;)this.tokens.push(o),o=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?ia:this.input.charCodeAt(this.index)}scanToken(){let o=this.input,e=this.length,t=this.peek,i=this.index;for(;t<=PN;)if(++i>=e){t=ia;break}else t=o.charCodeAt(i);if(this.peek=t,this.index=i,i>=e)return null;if(_6(t))return this.scanIdentifier();if(gl(t))return this.scanNumber(i);let r=i;switch(t){case Lm:return this.advance(),gl(this.peek)?this.scanNumber(r):this.peek!==Lm?uf(r,this.index,Lm):(this.advance(),this.peek===Lm?(this.advance(),pp(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(t)}]`,0));case Ya:case Pr:case Nc:case Pd:case Oa:case Dc:case fs:return this.scanCharacter(r,t);case _l:return this.scanOpenBrace(r,t);case Ka:return this.scanCloseBrace(r,t);case d0:case c0:return this.scanString();case EP:return this.advance(),this.scanTemplateLiteralPart(r);case TN:return this.scanPrivateIdentifier();case EN:return this.scanComplexOperator(r,"+",ta,"=");case Yx:return this.scanComplexOperator(r,"-",ta,"=");case ul:return this.isStartOfRegex()?this.scanRegex(i):this.scanComplexOperator(r,"/",ta,"=");case PU:return this.scanComplexOperator(r,"%",ta,"=");case IU:return this.scanOperator(r,"^");case R5:return this.scanStar(r);case L5:return this.scanQuestion(r);case Ig:case Us:return this.scanComplexOperator(r,String.fromCharCode(t),ta,"=");case TP:return this.scanComplexOperator(r,"!",ta,"=",ta,"=");case ta:return this.scanEquals(r);case Xx:return this.scanComplexOperator(r,"&",Xx,"&",ta,"=");case z5:return this.scanComplexOperator(r,"|",z5,"|",ta,"=");case LN:for(;p0(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(t)}]`,0)}scanCharacter(o,e){return this.advance(),uf(o,this.index,e)}scanOperator(o,e){return this.advance(),pp(o,this.index,e)}scanOpenBrace(o,e){return this.braceStack.push("expression"),this.advance(),uf(o,this.index,e)}scanCloseBrace(o,e){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(uf(o,this.index,Ka)),this.scanTemplateLiteralPart(this.index)):uf(o,this.index,e)}scanComplexOperator(o,e,t,i,r,s){this.advance();let d=e;return this.peek==t&&(this.advance(),d+=i),r!=null&&this.peek==r&&(this.advance(),d+=s),pp(o,this.index,d)}scanEquals(o){this.advance();let e="=";if(this.peek===ta)this.advance(),e+="=";else if(this.peek===Us)return this.advance(),e+=">",pp(o,this.index,e);return this.peek===ta&&(this.advance(),e+="="),pp(o,this.index,e)}scanIdentifier(){let o=this.index;for(this.advance();f6(this.peek);)this.advance();let e=this.input.substring(o,this.index);return Oq.indexOf(e)>-1?Aq(o,this.index,e):Dq(o,this.index,e)}scanPrivateIdentifier(){let o=this.index;if(this.advance(),!_6(this.peek))return this.error("Invalid character [#]",-1);for(;f6(this.peek);)this.advance();let e=this.input.substring(o,this.index);return Iq(o,this.index,e)}scanNumber(o){let e=this.index===o,t=!1;for(this.advance();;){if(!gl(this.peek))if(this.peek===Ap){if(!gl(this.input.charCodeAt(this.index-1))||!gl(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);t=!0}else if(this.peek===Lm)e=!1;else if(zq(this.peek)){if(this.advance(),Vq(this.peek)&&this.advance(),!gl(this.peek))return this.error("Invalid exponent",-1);e=!1}else break;this.advance()}let i=this.input.substring(o,this.index);t&&(i=i.replace(/_/g,""));let r=e?jq(i):parseFloat(i);return Nq(o,this.index,r)}scanString(){let o=this.index,e=this.peek;this.advance();let t="",i=this.index,r=this.input;for(;this.peek!=e;)if(this.peek==Km){let d=this.scanStringBackslash(t,i);if(typeof d!="string")return d;t=d,i=this.index}else{if(this.peek==ia)return this.error("Unterminated quote",0);this.advance()}let s=r.substring(i,this.index);return this.advance(),new Tf(o,this.index,t+s,Ym.Plain)}scanQuestion(o){this.advance();let e="?";return this.peek===L5?(e+="?",this.advance(),this.peek===ta&&(e+="=",this.advance())):this.peek===Lm&&(e+=".",this.advance()),pp(o,this.index,e)}scanTemplateLiteralPart(o){let e="",t=this.index;for(;this.peek!==EP;)if(this.peek===Km){let r=this.scanStringBackslash(e,t);if(typeof r!="string")return r;e=r,t=this.index}else if(this.peek===D1){let r=this.index;if(this.advance(),this.peek===_l)return this.braceStack.push("interpolation"),this.tokens.push(new Tf(o,r,e+this.input.substring(t,r),Ym.TemplateLiteralPart)),this.advance(),pp(r,this.index,this.input.substring(r,this.index))}else{if(this.peek===ia)return this.error("Unterminated template literal",0);this.advance()}let i=this.input.substring(t,this.index);return this.advance(),new Tf(o,this.index,e+i,Ym.TemplateLiteralEnd)}error(o,e){let t=this.index+e;return Fq(t,this.index,`Lexer Error: ${o} at column ${t} in expression [${this.input}]`)}scanStringBackslash(o,e){o+=this.input.substring(e,this.index);let t;if(this.advance(),this.peek===NN){let i=this.input.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(i))t=parseInt(i,16);else return this.error(`Invalid unicode escape [\\u${i}]`,0);for(let r=0;r<5;r++)this.advance()}else t=Bq(this.peek),this.advance();return o+=String.fromCharCode(t),o}scanStar(o){this.advance();let e="*";return this.peek===R5?(e+="*",this.advance(),this.peek===ta&&(e+="=",this.advance())):this.peek===ta&&(e+="=",this.advance()),pp(o,this.index,e)}isStartOfRegex(){if(this.tokens.length===0)return!0;let o=this.tokens[this.tokens.length-1];if(o.isOperator("!")){let e=this.tokens.length>1?this.tokens[this.tokens.length-2]:null;return e===null||e.type!==Cn.Identifier&&!e.isCharacter(Pr)&&!e.isCharacter(Pd)}return o.type===Cn.Operator||o.isCharacter(Ya)||o.isCharacter(Nc)||o.isCharacter(Oa)||o.isCharacter(Dc)}scanRegex(o){this.advance();let e=this.index,t=!1,i=!1;for(;;){let m=this.peek;if(m===ia)return this.error("Unterminated regular expression",0);if(t)t=!1;else if(m===Km)t=!0;else if(m===Nc)i=!0;else if(m===Pd)i=!1;else if(m===ul&&!i)break;this.advance()}let r=this.input.substring(e,this.index);this.advance();let s=Rq(o,this.index,r),d=this.scanRegexFlags(this.index);return d!==null?(this.tokens.push(s),d):s}scanRegexFlags(o){if(!Pp(this.peek))return null;for(;Pp(this.peek);)this.advance();return Lq(o,this.index,this.input.substring(o,this.index))}};function _6(n){return lu<=n&&n<=N0||Ip<=n&&n<=eh||n==Ap||n==D1}function f6(n){return Pp(n)||gl(n)||n==Ap||n==D1}function zq(n){return n==NU||n==EU}function Vq(n){return n==Yx||n==EN}function Bq(n){switch(n){case DN:return Qm;case HT:return kN;case IN:return jT;case AN:return BT;case FN:return SN;default:return n}}function jq(n){let o=parseInt(n);if(isNaN(o))throw new Error("Invalid integer literal when parsing "+n);return o}var eT=class{strings;expressions;offsets;constructor(o,e,t){this.strings=o,this.expressions=e,this.offsets=t}},tT=class{templateBindings;warnings;errors;constructor(o,e,t){this.templateBindings=o,this.warnings=e,this.errors=t}};function _p(n){return n.start.toString()||"(unknown)"}var C1=class{_lexer;_supportsDirectPipeReferences;constructor(o,e=!1){this._lexer=o,this._supportsDirectPipeReferences=e}parseAction(o,e,t){let i=[];this._checkNoInterpolation(i,o,e);let{stripped:r}=this._stripComments(o),s=this._lexer.tokenize(r),d=new jm(o,e,t,s,1,i,0,this._supportsDirectPipeReferences).parseChain();return new Cs(d,o,_p(e),t,i)}parseBinding(o,e,t){let i=[],r=this._parseBindingAst(o,e,t,i);return new Cs(r,o,_p(e),t,i)}checkSimpleExpression(o){let e=new nT;return o.visit(e),e.errors}parseSimpleBinding(o,e,t){let i=[],r=this._parseBindingAst(o,e,t,i),s=this.checkSimpleExpression(r);return s.length>0&&i.push(Eg(`Host binding expression cannot contain ${s.join(" ")}`,o,"",e)),new Cs(r,o,_p(e),t,i)}_parseBindingAst(o,e,t,i){this._checkNoInterpolation(i,o,e);let{stripped:r}=this._stripComments(o),s=this._lexer.tokenize(r);return new jm(o,e,t,s,0,i,0,this._supportsDirectPipeReferences).parseChain()}parseTemplateBindings(o,e,t,i,r){let s=this._lexer.tokenize(e),d=[];return new jm(e,t,r,s,0,d,0,this._supportsDirectPipeReferences).parseTemplateBindings({source:o,span:new Gs(i,i+o.length)})}parseInterpolation(o,e,t,i){let r=[],{strings:s,expressions:d,offsets:m}=this.splitInterpolation(o,e,r,i);if(d.length===0)return null;let u=[];for(let h=0;hh.text),u,o,_p(e),t,r)}parseInterpolationExpression(o,e,t){let{stripped:i}=this._stripComments(o),r=this._lexer.tokenize(i),s=[],d=new jm(o,e,t,r,0,s,0,this._supportsDirectPipeReferences).parseChain(),m=["",""];return this.createInterpolationAst(m,[d],o,_p(e),t,s)}createInterpolationAst(o,e,t,i,r,s){let d=new ou(0,t.length),m=new I0(d,d.toAbsolute(r),o,e);return new Cs(m,t,i,r,s)}splitInterpolation(o,e,t,i){let r=[],s=[],d=[],m=i?$q(i):null,u=0,h=!1,v=!1,b="{{",y="}}";for(;u-1)break;i>-1&&r>-1&&o.push(Eg("Got interpolation ({{}}) where expression was expected",e,`at column ${i} in`,t))}_getInterpolationEndIndex(o,e,t){for(let i of this._forEachUnquotedChar(o,t)){if(o.startsWith(e,i))return i;if(o.startsWith("//",i))return o.indexOf(e,i)}return-1}*_forEachUnquotedChar(o,e){let t=null,i=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(o,e){let t=this.currentEndIndex;if(e!==void 0&&e>this.currentEndIndex&&(t=e),o>t){let i=t;t=o,o=i}return new ou(o,t)}sourceSpan(o,e){let t=`${o}@${this.inputIndex}:${e}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(o,e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(o,e){this.context|=o;let t=e();return this.context^=o,t}consumeOptionalCharacter(o){return this.next.isCharacter(o)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(o){this.consumeOptionalCharacter(o)||this.error(`Missing expected ${String.fromCharCode(o)}`)}consumeOptionalOperator(o){return this.next.isOperator(o)?(this.advance(),!0):!1}isAssignmentOperator(o){return o.type===Cn.Operator&&qa.isAssignmentOperation(o.strValue)}expectOperator(o){this.consumeOptionalOperator(o)||this.error(`Missing expected operator ${o}`)}prettyPrintToken(o){return o===gf?"end of input":`token ${o}`}expectIdentifierOrKeyword(){let o=this.next;return!o.isIdentifier()&&!o.isKeyword()?(o.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(o,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(o)}, expected identifier or keyword`),null):(this.advance(),o.toString())}expectIdentifierOrKeywordOrString(){let o=this.next;return!o.isIdentifier()&&!o.isKeyword()&&!o.isString()?(o.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(o,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(o)}, expected identifier, keyword, or string`),""):(this.advance(),o.toString())}parseChain(){let o=[],e=this.inputIndex;for(;this.index=Ip&&u<=eh?_x.ReferencedDirectly:_x.ReferencedByName}else m=_x.ReferencedByName;e=new Fx(this.span(o),this.sourceSpan(o,s),e,i,d,m,r)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){let o=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let t=this.parsePipe(),i;if(this.consumeOptionalCharacter(Dc))i=this.parsePipe();else{let r=this.inputIndex,s=this.input.substring(o,r);this.error(`Conditional expression ${s} requires all 3 expressions`),i=new Ea(this.span(o),this.sourceSpan(o))}return new Nx(this.span(o),this.sourceSpan(o),e,t,i)}else return e}parseLogicalOr(){let o=this.inputIndex,e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let t=this.parseLogicalAnd();e=new qa(this.span(o),this.sourceSpan(o),"||",e,t)}return e}parseLogicalAnd(){let o=this.inputIndex,e=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let t=this.parseNullishCoalescing();e=new qa(this.span(o),this.sourceSpan(o),"&&",e,t)}return e}parseNullishCoalescing(){let o=this.inputIndex,e=this.parseEquality();for(;this.consumeOptionalOperator("??");){let t=this.parseEquality();e=new qa(this.span(o),this.sourceSpan(o),"??",e,t)}return e}parseEquality(){let o=this.inputIndex,e=this.parseRelational();for(;this.next.type==Cn.Operator;){let t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();let i=this.parseRelational();e=new qa(this.span(o),this.sourceSpan(o),t,e,i);continue}break}return e}parseRelational(){let o=this.inputIndex,e=this.parseAdditive();for(;this.next.type==Cn.Operator||this.next.isKeywordIn()||this.next.isKeywordInstanceOf();){let t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":case"in":case"instanceof":this.advance();let i=this.parseAdditive();e=new qa(this.span(o),this.sourceSpan(o),t,e,i);continue}break}return e}parseAdditive(){let o=this.inputIndex,e=this.parseMultiplicative();for(;this.next.type==Cn.Operator;){let t=this.next.strValue;switch(t){case"+":case"-":this.advance();let i=this.parseMultiplicative();e=new qa(this.span(o),this.sourceSpan(o),t,e,i);continue}break}return e}parseMultiplicative(){let o=this.inputIndex,e=this.parseExponentiation();for(;this.next.type==Cn.Operator;){let t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let i=this.parseExponentiation();e=new qa(this.span(o),this.sourceSpan(o),t,e,i);continue}break}return e}parseExponentiation(){let o=this.inputIndex,e=this.parsePrefix();for(;this.next.type==Cn.Operator&&this.next.strValue==="**";){(e instanceof Dg||e instanceof Gf||e instanceof qf||e instanceof Qf)&&this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"),this.advance();let t=this.parseExponentiation();e=new qa(this.span(o),this.sourceSpan(o),"**",e,t)}return e}parsePrefix(){if(this.next.type==Cn.Operator){let o=this.inputIndex,e=this.next.strValue,t;switch(e){case"+":return this.advance(),t=this.parsePrefix(),Dg.createPlus(this.span(o),this.sourceSpan(o),t);case"-":return this.advance(),t=this.parsePrefix(),Dg.createMinus(this.span(o),this.sourceSpan(o),t);case"!":return this.advance(),t=this.parsePrefix(),new Gf(this.span(o),this.sourceSpan(o),t)}}else if(this.next.isKeywordTypeof()){let o=this.inputIndex;this.advance();let e=this.parsePrefix();return new qf(this.span(o),this.sourceSpan(o),e)}else if(this.next.isKeywordVoid()){let o=this.inputIndex;this.advance();let e=this.parsePrefix();return new Qf(this.span(o),this.sourceSpan(o),e)}return this.parseCallChain()}parseCallChain(){let o=this.inputIndex,e=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(Lm))e=this.parseAccessMember(e,o,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(Ya)?e=this.parseCall(e,o,!0):e=this.consumeOptionalCharacter(Nc)?this.parseKeyedReadOrWrite(e,o,!0):this.parseAccessMember(e,o,!0);else if(this.consumeOptionalCharacter(Nc))e=this.parseKeyedReadOrWrite(e,o,!1);else if(this.consumeOptionalCharacter(Ya))e=this.parseCall(e,o,!1);else if(this.consumeOptionalOperator("!"))e=new Kf(this.span(o),this.sourceSpan(o),e);else if(this.next.isTemplateLiteralEnd())e=this.parseNoInterpolationTaggedTemplateLiteral(e,o);else if(this.next.isTemplateLiteralPart())e=this.parseTaggedTemplateLiteral(e,o);else return e}parsePrimary(){let o=this.inputIndex;if(this.isArrowFunction())return this.parseArrowFunction(o);if(this.consumeOptionalCharacter(Ya)){this.rparensExpected++;let e=this.parsePipe();return this.consumeOptionalCharacter(Pr)||(this.error("Missing closing parentheses"),this.consumeOptionalCharacter(Pr)),this.rparensExpected--,new Zf(this.span(o),this.sourceSpan(o),e)}else{if(this.next.isKeywordNull())return this.advance(),new _s(this.span(o),this.sourceSpan(o),null);if(this.next.isKeywordUndefined())return this.advance(),new _s(this.span(o),this.sourceSpan(o),void 0);if(this.next.isKeywordTrue())return this.advance(),new _s(this.span(o),this.sourceSpan(o),!0);if(this.next.isKeywordFalse())return this.advance(),new _s(this.span(o),this.sourceSpan(o),!1);if(this.next.isKeywordIn())return this.advance(),new _s(this.span(o),this.sourceSpan(o),"in");if(this.next.isKeywordThis())return this.advance(),new $f(this.span(o),this.sourceSpan(o));if(this.consumeOptionalCharacter(Nc))return this.parseLiteralArray(o);if(this.next.isCharacter(_l))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new Vc(this.span(o),this.sourceSpan(o)),o,!1);if(this.next.isNumber()){let e=this.next.toNumber();return this.advance(),new _s(this.span(o),this.sourceSpan(o),e)}else{if(this.next.isTemplateLiteralEnd())return this.parseNoInterpolationTemplateLiteral();if(this.next.isTemplateLiteralPart())return this.parseTemplateLiteral();if(this.next.isString()&&this.next.kind===Ym.Plain){let e=this.next.toString();return this.advance(),new _s(this.span(o),this.sourceSpan(o),e)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new Ea(this.span(o),this.sourceSpan(o))):this.next.isRegExpBody()?this.parseRegularExpressionLiteral():this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new Ea(this.span(o),this.sourceSpan(o))):(this.error(`Unexpected token ${this.next}`),new Ea(this.span(o),this.sourceSpan(o)))}}}parseLiteralArray(o){this.rbracketsExpected++;let e=[];do if(this.next.isOperator("..."))e.push(this.parseSpreadElement());else if(!this.next.isCharacter(Pd))e.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(Oa));return this.rbracketsExpected--,this.expectCharacter(Pd),new Wf(this.span(o),this.sourceSpan(o),e)}parseLiteralMap(){let o=[],e=[],t=this.inputIndex;if(this.expectCharacter(_l),!this.consumeOptionalCharacter(Ka)){this.rbracesExpected++;do{let i=this.inputIndex;if(this.next.isOperator("...")){this.advance(),o.push({kind:"spread",span:this.span(i),sourceSpan:this.sourceSpan(i)}),e.push(this.parsePipe());continue}let r=this.next.isString(),s=this.expectIdentifierOrKeywordOrString(),d=this.span(i),m=this.sourceSpan(i),u={kind:"property",key:s,quoted:r,span:d,sourceSpan:m};o.push(u),r?(this.expectCharacter(Dc),e.push(this.parsePipe())):this.consumeOptionalCharacter(Dc)?e.push(this.parsePipe()):(u.isShorthandInitialized=!0,e.push(new Ac(d,m,m,new Vc(d,m),s)))}while(this.consumeOptionalCharacter(Oa)&&!this.next.isCharacter(Ka));this.rbracesExpected--,this.expectCharacter(Ka)}return new au(this.span(t),this.sourceSpan(t),o,e)}parseAccessMember(o,e,t){let i=this.inputIndex,r=this.withContext(wf.Writable,()=>{let d=this.expectIdentifierOrKeyword()??"";return d.length===0&&this.error("Expected identifier for property access",o.span.end),d}),s=this.sourceSpan(i);if(t)return this.isAssignmentOperator(this.next)?(this.advance(),this.error("The '?.' operator cannot be used in the assignment"),new Ea(this.span(e),this.sourceSpan(e))):new Hf(this.span(e),this.sourceSpan(e),s,o,r);if(this.isAssignmentOperator(this.next)){let d=this.next.strValue;if(!(this.parseFlags&1))return this.advance(),this.error("Bindings cannot contain assignments"),new Ea(this.span(e),this.sourceSpan(e));let m=new Ac(this.span(e),this.sourceSpan(e),s,o,r);this.advance();let u=this.parseConditional();return new qa(this.span(e),this.sourceSpan(e),d,m,u)}else return new Ac(this.span(e),this.sourceSpan(e),s,o,r)}parseCall(o,e,t){let i=this.inputIndex;this.rparensExpected++;let r=this.parseCallArguments(),s=this.span(i,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(Pr),this.rparensExpected--;let d=this.span(e),m=this.sourceSpan(e);return t?new Lx(d,m,o,r,s):new Vg(d,m,o,r,s)}parseCallArguments(){if(this.next.isCharacter(Pr))return[];let o=[];do o.push(this.next.isOperator("...")?this.parseSpreadElement():this.parsePipe());while(this.consumeOptionalCharacter(Oa));return o}parseSpreadElement(){this.next.isOperator("...")||this.error("Spread element must start with '...' operator");let o=this.inputIndex;this.advance();let e=this.parsePipe(),t=this.span(o),i=this.sourceSpan(o);return new Rx(t,i,e)}expectTemplateBindingKey(){let o="",e=!1,t=this.currentAbsoluteOffset;do o+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(o+="-");while(e);return{source:o,span:new Gs(t,t+o.length)}}parseTemplateBindings(o){let e=[];for(e.push(...this.parseDirectiveKeywordBindings(o));this.index{this.rbracketsExpected++;let i=this.parsePipe();if(i instanceof Ea&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(Pd),this.isAssignmentOperator(this.next)){let r=this.next.strValue;if(t)this.advance(),this.error("The '?.' operator cannot be used in the assignment");else{let s=new ru(this.span(e),this.sourceSpan(e),o,i);this.advance();let d=this.parseConditional();return new qa(this.span(e),this.sourceSpan(e),r,s,d)}}else return t?new Uf(this.span(e),this.sourceSpan(e),o,i):new ru(this.span(e),this.sourceSpan(e),o,i);return new Ea(this.span(e),this.sourceSpan(e))})}parseDirectiveKeywordBindings(o){let e=[];this.consumeOptionalCharacter(Dc);let t=this.getDirectiveBoundTarget(),i=this.currentAbsoluteOffset,r=this.parseAsBinding(o);r||(this.consumeStatementTerminator(),i=this.currentAbsoluteOffset);let s=new Gs(o.span.start,i);return e.push(new gP(s,o,t)),r&&e.push(r),e}getDirectiveBoundTarget(){if(this.next===gf||this.peekKeywordAs()||this.peekKeywordLet())return null;let o=this.parsePipe(),{start:e,end:t}=o.span,i=this.input.substring(e,t);return new Cs(o,i,_p(this.parseSourceSpan),this.absoluteOffset+e,this.errors)}parseAsBinding(o){if(!this.peekKeywordAs())return null;this.advance();let e=this.expectTemplateBindingKey();this.consumeStatementTerminator();let t=new Gs(o.span.start,this.currentAbsoluteOffset);return new Jf(t,e,o)}parseLetBinding(){if(!this.peekKeywordLet())return null;let o=this.currentAbsoluteOffset;this.advance();let e=this.expectTemplateBindingKey(),t=null;this.consumeOptionalOperator("=")&&(t=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let i=new Gs(o,this.currentAbsoluteOffset);return new Jf(i,e,t)}parseNoInterpolationTaggedTemplateLiteral(o,e){let t=this.parseNoInterpolationTemplateLiteral();return new Xf(this.span(e),this.sourceSpan(e),o,t)}parseNoInterpolationTemplateLiteral(){let o=this.next.strValue,e=this.inputIndex;this.advance();let t=this.span(e),i=this.sourceSpan(e);return new Yf(t,i,[new zx(t,i,o)],[])}parseTaggedTemplateLiteral(o,e){let t=this.parseTemplateLiteral();return new Xf(this.span(e),this.sourceSpan(e),o,t)}parseTemplateLiteral(){let o=[],e=[],t=this.inputIndex;for(;this.next!==gf;){let i=this.next;if(i.isTemplateLiteralPart()||i.isTemplateLiteralEnd()){let r=this.inputIndex;if(this.advance(),o.push(new zx(this.span(r),this.sourceSpan(r),i.strValue)),i.isTemplateLiteralEnd())break}else if(i.isTemplateLiteralInterpolationStart()){this.advance(),this.rbracesExpected++;let r=this.parsePipe();r instanceof Ea?this.error("Template literal interpolation cannot be empty"):e.push(r),this.rbracesExpected--}else this.advance()}return new Yf(this.span(t),this.sourceSpan(t),o,e)}parseRegularExpressionLiteral(){let o=this.next;if(this.advance(),!o.isRegExpBody())return new Ea(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 s=0;s`"${m}"`).join(", "),e.index+s)}}let t=o.index,i=e?e.end:o.end;return new Bx(this.span(t,i),this.sourceSpan(t,i),o.strValue,e?e.strValue:null)}parseArrowFunction(o){let e;if(this.next.isIdentifier()){let i=this.next;this.advance(),e=[this.getArrowFunctionIdentifierArg(i)]}else this.next.isCharacter(Ya)?(this.rparensExpected++,this.advance(),e=this.parseArrowFunctionParameters(),this.rparensExpected--):(e=[],this.error(`Unexpected token ${this.next}`));this.expectOperator("=>");let t;if(this.next.isCharacter(_l))this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."),t=new Ea(this.span(o),this.sourceSpan(o));else{let i=this.parseFlags;this.parseFlags=1,t=this.parseExpression(),this.parseFlags=i}return new Vx(this.span(o),this.sourceSpan(o),e,t)}parseArrowFunctionParameters(){let o=[];if(!this.consumeOptionalCharacter(Pr))for(;this.next!==gf;)if(this.next.isIdentifier()){let e=this.next;if(this.advance(),o.push(this.getArrowFunctionIdentifierArg(e)),this.consumeOptionalCharacter(Pr))break;this.expectCharacter(Oa)}else{this.error(`Unexpected token ${this.next}`);break}return o}getArrowFunctionIdentifierArg(o){return new uP(o.strValue,this.span(o.index),this.sourceSpan(o.index))}isArrowFunction(){let o=this.index,e=this.tokens;if(o>e.length-2)return!1;if(e[o].isIdentifier()&&e[o+1].isOperator("=>"))return!0;if(e[o].isCharacter(Ya)){let t=o+1;for(t;t")}return!1}consumeStatementTerminator(){this.consumeOptionalCharacter(fs)||this.consumeOptionalCharacter(Oa)}error(o,e=this.index){this.errors.push(Eg(o,this.input,this.getErrorLocationText(e),this.parseSourceSpan)),this.skip()}getErrorLocationText(o){return o0&&(e=` ${e} `);let i=_p(t),r=`Parser Error: ${n}${e}[${o}] in ${i}`;return new dn(t,r)}var nT=class extends Bg{errors=[];visitPipe(){this.errors.push("pipes")}};function $q(n){let o=new Map,e=0,t=0,i=0;for(;id+m.length,0);t+=s,e+=s}o.set(t,e),i++}return o}function Hq(n){return n.visit(new iT)}var iT=class{visitUnary(o,e){return`${o.operator}${o.expr.visit(this,e)}`}visitBinary(o,e){return`${o.left.visit(this,e)} ${o.operation} ${o.right.visit(this,e)}`}visitChain(o,e){return o.expressions.map(t=>t.visit(this,e)).join("; ")}visitConditional(o,e){return`${o.condition.visit(this,e)} ? ${o.trueExp.visit(this,e)} : ${o.falseExp.visit(this,e)}`}visitThisReceiver(){return"this"}visitImplicitReceiver(){return""}visitInterpolation(o,e){return Wq(o.strings,o.expressions.map(t=>t.visit(this,e))).join("")}visitKeyedRead(o,e){return`${o.receiver.visit(this,e)}[${o.key.visit(this,e)}]`}visitLiteralArray(o,e){return`[${o.expressions.map(t=>t.visit(this,e)).join(", ")}]`}visitLiteralMap(o,e){return`{${Uq(o.keys.map(t=>t.kind==="spread"?"...":t.quoted?`'${t.key}'`:t.key),o.values.map(t=>t.visit(this,e))).map(([t,i])=>`${t}: ${i}`).join(", ")}}`}visitLiteralPrimitive(o){if(o.value===null)return"null";switch(typeof o.value){case"number":case"boolean":return o.value.toString();case"undefined":return"undefined";case"string":return`'${o.value.replace(/'/g,"\\'")}'`;default:throw new Error(`Unsupported primitive type: ${o.value}`)}}visitPipe(o,e){return`${o.exp.visit(this,e)} | ${o.name}`}visitPrefixNot(o,e){return`!${o.expression.visit(this,e)}`}visitNonNullAssert(o,e){return`${o.expression.visit(this,e)}!`}visitPropertyRead(o,e){return o.receiver instanceof Vc||o.receiver instanceof $f?o.name:`${o.receiver.visit(this,e)}.${o.name}`}visitSafePropertyRead(o,e){return`${o.receiver.visit(this,e)}?.${o.name}`}visitSafeKeyedRead(o,e){return`${o.receiver.visit(this,e)}?.[${o.key.visit(this,e)}]`}visitCall(o,e){return`${o.receiver.visit(this,e)}(${o.args.map(t=>t.visit(this,e)).join(", ")})`}visitSafeCall(o,e){return`${o.receiver.visit(this,e)}?.(${o.args.map(t=>t.visit(this,e)).join(", ")})`}visitTypeofExpression(o,e){return`typeof ${o.expression.visit(this,e)}`}visitVoidExpression(o,e){return`void ${o.expression.visit(this,e)}`}visitRegularExpressionLiteral(o,e){return`/${o.body}/${o.flags||""}`}visitArrowFunction(o,e){let t;return o.parameters.length===1?t=o.parameters[0].name:t=`(${o.parameters.map(i=>i.name).join(", ")})`,`${t} => ${o.body.visit(this,e)}`}visitASTWithSource(o,e){return o.ast.visit(this,e)}visitTemplateLiteral(o,e){let t="";for(let i=0;i[e,o[t]])}function Wq(n,o){let e=[];for(let t=0;t(n.set(o,e),n),new Map),Yg=class extends oT{_schema=new Map;_eventSchema=new Map;constructor(){super(),Xq.forEach(o=>{let e=new Map,t=new Set,[i,r]=o.split("|"),s=r.split(","),[d,m]=i.split("^");d.split(",").forEach(h=>{this._schema.set(h.toLowerCase(),e),this._eventSchema.set(h.toLowerCase(),t)});let u=m&&this._schema.get(m.toLowerCase());if(u){for(let[h,v]of u)e.set(h,v);for(let h of this._eventSchema.get(m.toLowerCase()))t.add(h)}s.forEach(h=>{if(h.length>0)switch(h[0]){case"*":t.add(h.substring(1));break;case"!":e.set(h.substring(1),Gq);break;case"#":e.set(h.substring(1),qq);break;case"%":e.set(h.substring(1),Kq);break;default:e.set(h,Qq)}})})}hasProperty(o,e,t){if(t.some(s=>s.name===v5.name))return!0;let i=hf(o);if(i.includes("-")){if(D5(i)||_P(i))return!1;if(t.some(s=>s.name===C5.name))return!0}return(this._schema.get(i)||this._schema.get("unknown")).has(e)}hasElement(o,e){if(e.some(i=>i.name===v5.name))return!0;let t=hf(o);return t.includes("-")&&(D5(t)||_P(t)||e.some(i=>i.name===C5.name))?!0:this._schema.has(t)}securityContext(o,e,t){t&&(e=this.getMappedPropName(e));let i=hf(o);e=e.toLowerCase();let[r]=ha(i,!1),s=CH();return s[i+"|"+e]??(r?s[`:${r}:*|${e}`]:void 0)??s["*|"+e]??mi.NONE}getMappedPropName(o){return dF.get(o)??o}getDefaultComponentElementName(){return"ng-component"}validateProperty(o){return o.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${o}' is disallowed for security reasons, please use (${o.slice(2)})=... If '${o}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(o){return o.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${o}' is disallowed for security reasons, please use (${o.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(o){let e=hf(o),t=this._schema.get(e)||this._schema.get("unknown");return Array.from(t.keys()).map(i=>Yq.get(i)??i)}allKnownEventsOfElement(o){let e=hf(o);return Array.from(this._eventSchema.get(e)??[])}normalizeAnimationStyleProperty(o){return qH(o)}normalizeAnimationStyleValue(o,e,t){let i="",r=t.toString().trim(),s=null;if(Zq(o)&&t!==0&&t!=="0")if(typeof t=="number")i="px";else{let d=t.match(/^[+-]?[\d\.]+([a-z]*)$/);d&&d[1].length==0&&(s=`Please provide a CSS unit value for ${e}:${t}`)}return{error:s,value:r+i}}};function Zq(n){switch(n){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:o,implicitNamespacePrefix:e,contentType:t=Oc.PARSABLE_DATA,closedByParent:i=!1,isVoid:r=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:d=!1,canSelfClose:m=!1}={}){o&&o.length>0&&o.forEach(u=>this.closedByChildren[u]=!0),this.isVoid=r,this.closedByParent=i||r,this.implicitNamespacePrefix=e||null,this.contentType=t,this.ignoreFirstLf=s,this.preventNamespaceInheritance=d,this.canSelfClose=m??r}isClosedByChild(o){return this.isVoid||o.toLowerCase()in this.closedByChildren}getContentType(o){return typeof this.contentType=="object"?(o===void 0?void 0:this.contentType[o])??this.contentType.default:this.contentType}},v6,yg;function rT(n){return yg||(v6=new ai({canSelfClose:!0}),yg=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:Oc.RAW_TEXT}),script:new ai({contentType:Oc.RAW_TEXT}),title:new ai({contentType:{default:Oc.ESCAPABLE_RAW_TEXT,svg:Oc.PARSABLE_DATA}}),textarea:new ai({contentType:Oc.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Yg().allKnownElementNames().forEach(o=>{!yg[o]&&fP(o)===null&&(yg[o]=new ai({canSelfClose:!1}))})),yg[n]??yg[n.toLowerCase()]??v6}var x6={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"},aT=class{_placeHolderNameCounts={};_signatureToName={};getStartTagPlaceholderName(o,e,t){let i=this._hashTag(o,e,t);if(this._signatureToName[i])return this._signatureToName[i];let r=o.toUpperCase(),s=x6[r]||`TAG_${r}`,d=this._generateUniqueName(t?s:`START_${s}`);return this._signatureToName[i]=d,d}getCloseTagPlaceholderName(o){let e=this._hashClosingTag(o);if(this._signatureToName[e])return this._signatureToName[e];let t=o.toUpperCase(),i=x6[t]||`TAG_${t}`,r=this._generateUniqueName(`CLOSE_${i}`);return this._signatureToName[e]=r,r}getPlaceholderName(o,e){let t=o.toUpperCase(),i=`PH: ${t}=${e}`;if(this._signatureToName[i])return this._signatureToName[i];let r=this._generateUniqueName(t);return this._signatureToName[i]=r,r}getUniquePlaceholder(o){return this._generateUniqueName(o.toUpperCase())}getStartBlockPlaceholderName(o,e){let t=this._hashBlock(o,e);if(this._signatureToName[t])return this._signatureToName[t];let i=this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(o)}`);return this._signatureToName[t]=i,i}getCloseBlockPlaceholderName(o){let e=this._hashClosingBlock(o);if(this._signatureToName[e])return this._signatureToName[e];let t=this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(o)}`);return this._signatureToName[e]=t,t}_hashTag(o,e,t){let i=`<${o}`,r=Object.keys(e).sort().map(d=>` ${d}=${e[d]}`).join(""),s=t?"/>":`>`;return i+r+s}_hashClosingTag(o){return this._hashTag(`/${o}`,{},!1)}_hashBlock(o,e){let t=e.length===0?"":` (${e.sort().join("; ")})`;return`@${o}${t} {}`}_hashClosingBlock(o){return this._hashBlock(`close_${o}`,[])}_toSnakeCase(o){return o.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_generateUniqueName(o){if(!this._placeHolderNameCounts.hasOwnProperty(o))return this._placeHolderNameCounts[o]=1,o;let t=this._placeHolderNameCounts[o];return this._placeHolderNameCounts[o]=t+1,`${o}_${t}`}},Jq=new C1(new k0);function eQ(n,o){let e=new sT(Jq,n,o);return(t,i,r,s,d)=>e.toI18nMessage(t,i,r,s,d)}function tQ(n,o){return o}var sT=class{_expressionParser;_retainEmptyTokens;_preserveExpressionWhitespace;constructor(o,e,t){this._expressionParser=o,this._retainEmptyTokens=e,this._preserveExpressionWhitespace=t}toI18nMessage(o,e="",t="",i="",r){let s={isIcu:o.length==1&&o[0]instanceof Xm,icuDepth:0,placeholderRegistry:new aT,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||tQ},d=Mo(this,o,s);return new Ja(d,s.placeholderToContent,s.placeholderToMessage,e,t,i)}visitElement(o,e){return this._visitElementLike(o,e)}visitComponent(o,e){return this._visitElementLike(o,e)}visitDirective(o,e){throw new Error("Unreachable code")}visitAttribute(o,e){let t=o.valueTokens===void 0||o.valueTokens.length===1?new df(o.value,o.valueSpan||o.sourceSpan):this._visitTextWithInterpolation(o.valueTokens,o.valueSpan||o.sourceSpan,e,o.i18n);return e.visitNodeFn(o,t)}visitText(o,e){let t=o.tokens.length===1?new df(o.value,o.sourceSpan):this._visitTextWithInterpolation(o.tokens,o.sourceSpan,e,o.i18n);return e.visitNodeFn(o,t)}visitComment(o,e){return null}visitExpansion(o,e){e.icuDepth++;let t={},i=new Kx(o.switchValue,o.type,t,o.sourceSpan);if(o.cases.forEach(d=>{t[d.value]=new Ed(d.expression.map(m=>m.visit(this,e)),d.expSourceSpan)}),e.icuDepth--,e.isIcu||e.icuDepth>0){let d=e.placeholderRegistry.getUniquePlaceholder(`VAR_${o.type}`);return i.expressionPlaceholder=d,e.placeholderToContent[d]={text:o.switchValue,sourceSpan:o.switchValueSourceSpan},e.visitNodeFn(o,i)}let r=e.placeholderRegistry.getPlaceholderName("ICU",o.sourceSpan.toString());e.placeholderToMessage[r]=this.toI18nMessage([o],"","","",void 0);let s=new Wg(i,r,o.sourceSpan);return e.visitNodeFn(o,s)}visitExpansionCase(o,e){throw new Error("Unreachable code")}visitBlock(o,e){let t=Mo(this,o.children,e);if(o.name==="switch")return new Ed(t,o.sourceSpan);let i=o.parameters.map(m=>m.expression),r=e.placeholderRegistry.getStartBlockPlaceholderName(o.name,i),s=e.placeholderRegistry.getCloseBlockPlaceholderName(o.name);e.placeholderToContent[r]={text:o.startSourceSpan.toString(),sourceSpan:o.startSourceSpan},e.placeholderToContent[s]={text:o.endSourceSpan?o.endSourceSpan.toString():"}",sourceSpan:o.endSourceSpan??o.sourceSpan};let d=new Sp(o.name,i,r,s,t,o.sourceSpan,o.startSourceSpan,o.endSourceSpan);return e.visitNodeFn(o,d)}visitBlockParameter(o,e){throw new Error("Unreachable code")}visitLetDeclaration(o,e){return null}_visitElementLike(o,e){let t=Mo(this,o.children,e),i={},r=v=>{i[v.name]=v.value},s,d;o instanceof ml?(s=o.name,d=rT(o.name).isVoid):(s=o.fullName,d=o.tagName?rT(o.tagName).isVoid:!1),o.attrs.forEach(r),o.directives.forEach(v=>v.attrs.forEach(r));let m=e.placeholderRegistry.getStartTagPlaceholderName(s,i,d);e.placeholderToContent[m]={text:o.startSourceSpan.toString(),sourceSpan:o.startSourceSpan};let u="";d||(u=e.placeholderRegistry.getCloseTagPlaceholderName(s),e.placeholderToContent[u]={text:``,sourceSpan:o.endSourceSpan??o.sourceSpan});let h=new Mp(s,i,m,u,t,d,o.sourceSpan,o.startSourceSpan,o.endSourceSpan);return e.visitNodeFn(o,h)}_visitTextWithInterpolation(o,e,t,i){let r=[],s=!1;for(let d of o)switch(d.type){case 8:case 17:s=!0;let[m,u,h]=d.parts,v=aQ(u)||"INTERPOLATION",b=t.placeholderRegistry.getPlaceholderName(v,u);if(this._preserveExpressionWhitespace)t.placeholderToContent[b]={text:d.parts.join(""),sourceSpan:d.sourceSpan},r.push(new l0(u,b,d.sourceSpan));else{let y=this.normalizeExpression(d);t.placeholderToContent[b]={text:`${m}${y}${h}`,sourceSpan:d.sourceSpan},r.push(new l0(y,b,d.sourceSpan))}break;default:if(d.parts[0].length>0||this._retainEmptyTokens){let y=r[r.length-1];y instanceof df?(y.value+=d.parts[0],y.sourceSpan=new On(y.sourceSpan.start,d.sourceSpan.end,y.sourceSpan.fullStart,y.sourceSpan.details)):r.push(new df(d.parts[0],d.sourceSpan))}else this._retainEmptyTokens&&r.push(new df(d.parts[0],d.sourceSpan));break}return s?(nQ(r,i),new Ed(r,e)):r[0]}normalizeExpression(o){let e=o.parts[1],t=this._expressionParser.parseBinding(e,o.sourceSpan,o.sourceSpan.start.offset);return Hq(t)}};function nQ(n,o){if(o instanceof Ja&&(iQ(o),o=o.nodes[0]),o instanceof Ed){oQ(o.children,n);for(let e=0;e`"${e.sourceSpan.toString()}"`).join(` `)} Second pass (${o.length} tokens): ${o.map(e=>`"${e.sourceSpan.toString()}"`).join(` `)} `.trim());if(n.some((e,t)=>o[t].constructor!==e.constructor))throw new Error("The types of the i18n message children changed between first and second pass.")}var rQ=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;function aQ(n){return n.split(rQ)[2]}var y6=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","iframe|src","object|codebase","object|data"]);function b6(n,o){return n=n.toLowerCase(),o=o.toLowerCase(),y6.has(n+"|"+o)||y6.has("*|"+o)}var sQ=n=>(o,e)=>{let t=n.get(o)??o;return t instanceof Ad&&(e instanceof Wg&&t.i18n instanceof Ja&&(e.previousMessage=t.i18n),t.i18n=e),e},v1=class{keepI18nAttrs;enableI18nLegacyMessageIdFormat;preserveSignificantWhitespace;retainEmptyTokens;hasI18nMeta=!1;_errors=[];constructor(o=!1,e=!1,t=!0,i=!t){this.keepI18nAttrs=o,this.enableI18nLegacyMessageIdFormat=e,this.preserveSignificantWhitespace=t,this.retainEmptyTokens=i}_generateI18nMessage(o,e="",t){let{meaning:i,description:r,customId:s}=this._parseMetadata(e),m=eQ(this.retainEmptyTokens,this.preserveSignificantWhitespace)(o,i,r,s,t);return this._setMessageId(m,e),this._setLegacyIds(m,e),m}visitAllWithErrors(o){let e=o.map(t=>t.visit(this,null));return new _1(e,this._errors)}visitElement(o){return this._visitElementLike(o),o}visitComponent(o,e){return this._visitElementLike(o),o}visitExpansion(o,e){let t,i=o.i18n;if(this.hasI18nMeta=!0,i instanceof Wg){let r=i.name;t=this._generateI18nMessage([o],i);let s=wN(t);s.name=r,e!==null&&(e.placeholderToMessage[r]=t)}else t=this._generateI18nMessage([o],e||i);return o.i18n=t,o}visitText(o){return o}visitAttribute(o){return o}visitComment(o){return o}visitExpansionCase(o){return o}visitBlock(o,e){return Mo(this,o.children,e),o}visitBlockParameter(o,e){return o}visitLetDeclaration(o,e){return o}visitDirective(o,e){return o}_visitElementLike(o){let e;if(yU(o)){this.hasI18nMeta=!0;let t=[],i={};for(let r of o.attrs)if(r.name===yN){let s=o.i18n||r.value,d=new Map,m=this.preserveSignificantWhitespace?o.children:Pc(new f1(!1,d),o.children);e=this._generateI18nMessage(m,s,sQ(d)),e.nodes.length===0&&(e=void 0),o.i18n=e}else if(r.name.startsWith(PP)){let s=r.name.slice(PP.length),d;o instanceof Qa?d=o.tagName===null?!1:b6(o.tagName,s):d=b6(o.name,s),d||mQ(s)?this._reportError(r,`Translating attribute '${s}' is disallowed for security reasons.`):i[s]=r.value}else t.push(r);if(Object.keys(i).length)for(let r of t){let s=i[r.name];s!==void 0&&r.value&&(r.i18n=this._generateI18nMessage([r],r.i18n||s))}this.keepI18nAttrs||(o.attrs=t)}Mo(this,o.children,e)}_parseMetadata(o){return typeof o=="string"?dQ(o):o instanceof Ja?o:{}}_setMessageId(o,e){o.id||(o.id=e instanceof Ja&&e.id||wH(o))}_setLegacyIds(o,e){if(this.enableI18nLegacyMessageIdFormat)o.legacyIds=[bH(o),mN(o)];else if(typeof e!="string"){let t=e instanceof Ja?e:e instanceof Wg?e.previousMessage:void 0;o.legacyIds=t?t.legacyIds:[]}}_reportError(o,e){this._errors.push(new dn(o.sourceSpan,e))}},lQ="|",cQ="@@";function dQ(n=""){let o,e,t;if(n=n.trim(),n){let i=n.indexOf(cQ),r=n.indexOf(lQ),s;[s,o]=i>-1?[n.slice(0,i),n.slice(i+2)]:[n,""],[e,t]=r>-1?[s.slice(0,r),s.slice(r+1)]:["",s]}return{customId:o,meaning:e,description:t}}function pQ(n){let o=[];return n.description?o.push({tagName:"desc",text:n.description}):o.push({tagName:"suppress",text:"{msgDescriptions}"}),n.meaning&&o.push({tagName:"meaning",text:n.meaning}),zH(o)}function mQ(n){let o=n.toLowerCase();return o.length>2&&o!=="only"&&o.startsWith("on")}var uQ="goog.getMsg";function gQ(n,o,e,t){let i=_Q(o),r=[Oe(i)];Object.keys(t).length&&(r.push(UP(zT(t,!0),!0)),r.push(UP({original_code:yl(Object.keys(t).map(m=>({key:A0(m),quoted:!0,value:o.placeholders[m]?Oe(o.placeholders[m].sourceSpan.toString()):Oe(o.placeholderToMessage[m].nodes.map(u=>u.sourceSpan.toString()).join(""))})))})));let s=new Ur(e.name,si(uQ).callFn(r),ec,ua.Final);s.addLeadingComment(pQ(o));let d=new fa(n.set(e));return[s,d]}var lT=class{formatPh(o){return`{$${A0(o)}}`}visitText(o){return o.value}visitContainer(o){return o.children.map(e=>e.visit(this)).join("")}visitIcu(o){return iF(o)}visitTagPlaceholder(o){return o.isVoid?this.formatPh(o.startName):`${this.formatPh(o.startName)}${o.children.map(e=>e.visit(this)).join("")}${this.formatPh(o.closeName)}`}visitPlaceholder(o){return this.formatPh(o.name)}visitBlockPlaceholder(o){return`${this.formatPh(o.startName)}${o.children.map(e=>e.visit(this)).join("")}${this.formatPh(o.closeName)}`}visitIcuPlaceholder(o,e){return this.formatPh(o.name)}},hQ=new lT;function _Q(n){return n.nodes.map(o=>o.visit(hQ,null)).join("")}function fQ(n,o,e){let{messageParts:t,placeHolders:i}=CQ(o),r=vQ(o),s=i.map(u=>e[u.text]),d=jH(o,t,i,s,r),m=n.set(d);return[new fa(m)]}var cT=class{placeholderToMessage;pieces;constructor(o,e){this.placeholderToMessage=o,this.pieces=e}visitText(o){if(this.pieces[this.pieces.length-1]instanceof Gm)this.pieces[this.pieces.length-1].text+=o.value;else{let e=new On(o.sourceSpan.fullStart,o.sourceSpan.end,o.sourceSpan.fullStart,o.sourceSpan.details);this.pieces.push(new Gm(o.value,e))}}visitContainer(o){o.children.forEach(e=>e.visit(this))}visitIcu(o){this.pieces.push(new Gm(iF(o),o.sourceSpan))}visitTagPlaceholder(o){this.pieces.push(this.createPlaceholderPiece(o.startName,o.startSourceSpan??o.sourceSpan)),o.isVoid||(o.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(o.closeName,o.endSourceSpan??o.sourceSpan)))}visitPlaceholder(o){this.pieces.push(this.createPlaceholderPiece(o.name,o.sourceSpan))}visitBlockPlaceholder(o){this.pieces.push(this.createPlaceholderPiece(o.startName,o.startSourceSpan??o.sourceSpan)),o.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(o.closeName,o.endSourceSpan??o.sourceSpan))}visitIcuPlaceholder(o){this.pieces.push(this.createPlaceholderPiece(o.name,o.sourceSpan,this.placeholderToMessage[o.name]))}createPlaceholderPiece(o,e,t){return new Og(A0(o,!1),e,t)}};function CQ(n){let o=[],e=new cT(n.placeholderToMessage,o);return n.nodes.forEach(t=>t.visit(e)),xQ(o)}function vQ(n){let o=n.nodes[0],e=n.nodes[n.nodes.length-1];return new On(o.sourceSpan.fullStart,e.sourceSpan.end,o.sourceSpan.fullStart,o.sourceSpan.details)}function xQ(n){let o=[],e=[];n[0]instanceof Og&&o.push(Uk(n[0].sourceSpan.start));for(let t=0;t{let P=b.has(x.name);return b.add(x.name),!P});let y=v.flatMap(x=>{let P=s.get(x.context);if(P===void 0)throw new Error("AssertionError: Could not find i18n expression's value");return[Oe(x.name),P]});h.i18nAttributesConfig=n.addConst(new zc(y))}for(let m of n.units)for(let u of m.create)if(u.kind===j.I18nStart){let h=d.get(u.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?");u.messageIndex=h}}function pF(n,o,e,t){let i=[],r=new Map;for(let u of t.subMessages){let h=e.get(u),{mainVar:v,statements:b}=pF(n,o,e,h);i.push(...b);let y=r.get(h.messagePlaceholder)??[];y.push(v),r.set(h.messagePlaceholder,y)}kQ(t,r),t.params=new Map([...t.params.entries()].sort());let s=si(n.pool.uniqueName(yQ)),d=EQ(n.pool,t.message.id,o,n.i18nUseExternalIds),m;if(t.needsPostprocessing||t.postprocessingParams.size>0){let u=Object.fromEntries([...t.postprocessingParams.entries()].sort()),h=zT(u,!1),v=[];t.postprocessingParams.size>0&&v.push(UP(h,!0)),m=b=>Vt(ge.i18nPostprocess).callFn([b,...v])}return i.push(...PQ(t.message,s,d,t.params,m)),{mainVar:s,statements:i}}function kQ(n,o){for(let[e,t]of o)t.length===1?n.params.set(e,t[0]):(n.params.set(e,Oe(`${M6}${bQ}${e}${M6}`)),n.postprocessingParams.set(e,Ji(t)))}function PQ(n,o,e,t,i){let r=Object.fromEntries(t),s=[MQ(o),T1(TQ(),gQ(o,n,e,r),fQ(o,n,zT(r,!1)))];return i&&s.push(new fa(o.set(i(o)))),s}function TQ(){return D0(si(w6)).notIdentical(Oe("undefined",FT)).and(si(w6))}function EQ(n,o,e,t){let i,r=e;if(t){let s=S6("EXTERNAL_"),d=n.uniqueName(r);i=`${s}${Bm(o)}$$${d}`}else{let s=S6(r);i=n.uniqueName(s)}return si(i)}function OQ(n){for(let o of n.units){let e=null,t=null,i=new Map,r=new Map,s=new Map;for(let d of o.create)switch(d.kind){case j.I18nStart:if(d.context===null)throw Error("I18n op should have its context set.");e=d;break;case j.I18nEnd:e=null;break;case j.IcuStart:if(d.context===null)throw Error("Icu op should have its context set.");t=d;break;case j.IcuEnd:t=null;break;case j.Text:if(e!==null)if(i.set(d.xref,e),r.set(d.xref,t),d.icuPlaceholder!==null){let m=nG(n.allocateXrefId(),d.icuPlaceholder,[d.initialValue]);Je.replace(d,m),s.set(d.xref,m)}else Je.remove(d);break}for(let d of o.update)switch(d.kind){case j.InterpolateText:if(!i.has(d.target))continue;let m=i.get(d.target),u=r.get(d.target),h=s.get(d.target),v=u?u.context:m.context,b=u?g0.Postproccessing:g0.Creation,y=[];for(let x=0;x0){let t=IQ(e.localRefs);e.localRefs=n.addConst(t)}else e.localRefs=null;break}}function IQ(n){let o=[];for(let e of n)o.push(Oe(e.name),Oe(e.target));return Ji(o)}function AQ(n){for(let o of n.units){let e=Tr.HTML;for(let t of o.create)t.kind===j.ElementStart&&t.namespace!==e&&(Je.insertBefore(QW(t.namespace),t),e=t.namespace)}}function NQ(n){let o=[],e=0,t=0,i=0,r=0,s=0,d=null;for(;e0&&t===0&&i===0){let u=n.substring(r,e-1).trim();o.push(d,u),s=e,r=0,d=null}break}if(d&&r){let m=n.slice(r).trim();o.push(d,m)}return o}function mF(n){return n.replace(/[a-z][A-Z]/g,o=>o.charAt(0)+"-"+o.charAt(1)).toLowerCase()}function FQ(n){let o=new Map;for(let e of n.units)for(let t of e.create)Dp(t)&&o.set(t.xref,t);for(let e of n.units)for(let t of e.create)if(t.kind===j.ExtractedAttribute&&t.bindingKind===qt.Attribute&&UN(t.expression)){let i=o.get(t.target);if(i!==void 0&&(i.kind===j.Template||i.kind===j.ConditionalCreate||i.kind===j.ConditionalBranchCreate)&&i.templateKind===vs.Structural)continue;if(t.name==="style"){let r=NQ(t.expression.value);for(let s=0;s{if(!(!(r instanceof Od)||r.name!==null)){if(!t.has(r.xref))throw new Error(`Variable ${r.xref} not yet named`);r.name=t.get(r.xref)}})}function LQ(n,o){if(n.name===null)switch(n.kind){case oa.Context:n.name=`ctx_r${o.index++}`;break;case oa.Identifier:let e=n.identifier===Ys?"i":"";n.name=`${n.identifier}_${e}r${++o.index}`;break;default:n.name=`_r${++o.index}`;break}return n.name}function zQ(n){return n.startsWith("--")?n:mF(n)}function k6(n){let o=n.indexOf("!important");return o>-1?n.substring(0,o):n}function VQ(n){for(let o of n.units){for(let e of o.functions)Wk(e.ops);for(let e of o.create)(e.kind===j.Listener||e.kind===j.Animation||e.kind===j.AnimationListener||e.kind===j.TwoWayListener)&&Wk(e.handlerOps);Wk(o.update)}}function Wk(n){for(let o of n){if(o.kind!==j.Statement||!(o.statement instanceof fa)||!(o.statement.expr instanceof i1))continue;let e=o.statement.expr.steps,t=!0;for(let i=o.next;i.kind!==j.ListEnd&&t;i=i.next)xr(i,(r,s)=>{if(!$c(r))return r;if(t&&!(s&ii.InChildOperation))switch(r.kind){case Jt.NextContext:r.steps+=e,Je.remove(o),t=!1;break;case Jt.GetCurrentView:case Jt.Reference:case Jt.ContextLetReference:t=!1;break}})}}var BQ="ng-container";function jQ(n){for(let o of n.units){let e=new Set;for(let t of o.create)t.kind===j.ElementStart&&t.tag===BQ&&(t.kind=j.ContainerStart,e.add(t.xref)),t.kind===j.ElementEnd&&e.has(t.xref)&&(t.kind=j.ContainerEnd)}}function $Q(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function HQ(n){let o=new Map;for(let e of n.units)for(let t of e.create)Dp(t)&&o.set(t.xref,t);for(let e of n.units)for(let t of e.create)(t.kind===j.ElementStart||t.kind===j.ContainerStart)&&t.nonBindable&&Je.insertAfter(HW(t.xref),t),(t.kind===j.ElementEnd||t.kind===j.ContainerEnd)&&$Q(o,t.xref).nonBindable&&Je.insertBefore(UW(t.xref),t)}function Ic(n){return o=>o.kind===n}function Ef(n,o){return e=>e.kind===n&&o===e.expression instanceof nr}function UQ(n){return n.kind===j.Listener&&!(n.hostListener&&n.isLegacyAnimationListener)||n.kind===j.TwoWayListener||n.kind===j.Animation||n.kind===j.AnimationListener}function WQ(n){return(n.kind===j.Property||n.kind===j.TwoWayProperty)&&!(n.expression instanceof nr)}var GQ=[{test:n=>n.kind===j.Listener&&n.hostListener&&n.isLegacyAnimationListener},{test:UQ}],qQ=[{test:Ic(j.StyleMap),transform:x1},{test:Ic(j.ClassMap),transform:x1},{test:Ic(j.StyleProp)},{test:Ic(j.ClassProp)},{test:Ef(j.Attribute,!0)},{test:Ef(j.Property,!0)},{test:WQ},{test:Ef(j.Attribute,!1)},{test:Ic(j.Control)}],QQ=[{test:Ef(j.DomProperty,!0)},{test:Ef(j.DomProperty,!1)},{test:Ic(j.Attribute)},{test:Ic(j.StyleMap),transform:x1},{test:Ic(j.ClassMap),transform:x1},{test:Ic(j.StyleProp)},{test:Ic(j.ClassProp)}],P6=new Set([j.Listener,j.TwoWayListener,j.AnimationListener,j.StyleMap,j.ClassMap,j.StyleProp,j.ClassProp,j.Property,j.TwoWayProperty,j.DomProperty,j.Attribute,j.Animation,j.Control]);function KQ(n){for(let o of n.units){T6(o.create,GQ);let e=o.job.kind===Et.Host?QQ:qQ;T6(o.update,e)}}function T6(n,o){let e=[],t=null;for(let i of n){let r=h0(i)?i.target:null;(!P6.has(i.kind)||r!==t&&t!==null&&r!==null)&&(Je.insertBefore(E6(e,o),i),e=[],t=null),P6.has(i.kind)&&(e.push(i),Je.remove(i),t=r??t)}n.push(E6(e,o))}function E6(n,o){let e=Array.from(o,()=>new Array);for(let t of n){let i=o.findIndex(r=>r.test(t));e[i].push(t)}return e.flatMap((t,i)=>{let r=o[i].transform;return r?r(t):t})}function x1(n){return n.slice(n.length-1)}function XQ(n){for(let o of n.units){let e=JN(o);for(let t of o.ops())if(t.kind===j.Binding){let i=ZQ(e,t.target);YQ(t.name)&&i.kind===j.Projection&&Je.remove(t)}}}function YQ(n){return n.toLowerCase()==="select"}function ZQ(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an slottable target.");return e}function JQ(n){for(let o of n.units)eK(o)}function eK(n){for(let o of n.update)xr(o,(e,t)=>{if(!$c(e)||e.kind!==Jt.PipeBinding)return;if(t&ii.InChildOperation)throw new Error("AssertionError: pipe bindings should not appear in child expressions");if(o.target==null)throw new Error("AssertionError: expected slot handle to be assigned for pipe creation");tK(n,o.target,e)})}function tK(n,o,e){for(let t=n.create.head.next;t.kind!==j.ListEnd;t=t.next){if(!nh(t)||t.xref!==o)continue;for(;t.next.kind===j.Pipe;)t=t.next;let i=qW(e.target,e.targetSlot,e.name);Je.insertBefore(i,t.next);return}throw new Error(`AssertionError: unable to find insertion point for pipe ${e.name}`)}function nK(n){for(let o of n.units)for(let e of o.update)ir(e,t=>!(t instanceof pu)||t.args.length<=4?t:new v0(t.target,t.targetSlot,t.name,Ji(t.args),t.args.length),ii.None)}function iK(n){uF(n.root,0)}function uF(n,o){let e=null;for(let t of n.create)switch(t.kind){case j.I18nStart:t.subTemplateIndex=o===0?null:o,e=t;break;case j.I18nEnd:e.subTemplateIndex===null&&(o=0),e=null;break;case j.ConditionalCreate:case j.ConditionalBranchCreate:case j.Template:o=ax(n.job.views.get(t.xref),e,t.i18nPlaceholder,o);break;case j.RepeaterCreate:let i=n.job.views.get(t.xref);o=ax(i,e,t.i18nPlaceholder,o),t.emptyView!==null&&(o=ax(n.job.views.get(t.emptyView),e,t.emptyI18nPlaceholder,o));break;case j.Projection:t.fallbackView!==null&&(o=ax(n.job.views.get(t.fallbackView),e,t.fallbackViewI18nPlaceholder,o));break}return o}function ax(n,o,e,t){if(e!==void 0){if(o===null)throw Error("Expected template with i18n placeholder to be in an i18n block.");t++,oK(n,o)}return uF(n,t)}function oK(n,o){if(n.create.head.next?.kind!==j.I18nStart){let e=n.job.allocateXrefId();Je.insertAfter(I1(e,o.message,o.root,null),n.create.head),Je.insertBefore(A1(e,null),n.create.tail)}}function rK(n){for(let o of n.units)for(let e of o.ops())xr(e,t=>{if(!(t instanceof du)||t.body===null)return;let i=new dT(t.args.length);t.fn=n.pool.getSharedConstant(i,t.body),t.body=null})}var dT=class extends Bf{numArgs;constructor(o){super(),this.numArgs=o}keyOf(o){return o instanceof Ep?`param(${o.index})`:super.keyOf(o)}toSharedConstantDeclaration(o,e){let t=[];for(let r=0;rr instanceof Ep?si("a"+r.index):r,ii.None);return new Ur(o,new gu(t,i),void 0,ua.Final)}};function aK(n){for(let o of n.units)for(let e of o.update)ir(e,(t,i)=>i&ii.InChildOperation?t:t instanceof zc?sK(t):t instanceof ic?lK(t):t,ii.None)}function sK(n){let o=[],e=[];for(let t of n.entries){if(t instanceof nu){if(t.expression.isConstant())o.push(t);else{let i=e.length;e.push(t.expression),o.push(new nu(new Ep(i)))}continue}if(t.isConstant())o.push(t);else{let i=e.length;e.push(t),o.push(new Ep(i))}}return new du(Ji(o),e)}function lK(n){let o=[],e=[];for(let t of n.entries){if(t instanceof yp){if(t.expression.isConstant())o.push(t);else{let i=e.length;e.push(t.expression),o.push(new yp(new Ep(i)))}continue}if(t.value.isConstant())o.push(t);else{let i=e.length;e.push(t.value),o.push(new Rg(t.key,new Ep(i),t.quoted))}}return new du(new ic(o),e)}function cK(n){for(let o of n.units)for(let e of o.ops())ir(e,t=>t instanceof Fg&&(t.flags===null||!t.flags.includes("g"))?n.pool.getSharedConstant(new pT,t):t,ii.None)}var pT=class extends Bf{toSharedConstantDeclaration(o,e){return new Ur(o,e,void 0,ua.Final)}};function dK(n,o,e,t,i){return Np(ge.element,n,o,e,t,i)}function pK(n,o,e,t,i){return Np(ge.elementStart,n,o,e,t,i)}function Np(n,o,e,t,i,r){let s=[Oe(o)];return e!==null&&s.push(Oe(e)),i!==null?s.push(Oe(t),Oe(i)):t!==null&&s.push(Oe(t)),jn(n,s,r)}function gF(n,o,e,t,i,r,s,d,m){let u=[Oe(o),e,Oe(t),Oe(i),Oe(r),Oe(s)];for(d!==null&&(u.push(Oe(d)),u.push(Vt(ge.templateRefExtractor)));u[u.length-1].isEquivalent(Lg);)u.pop();return jn(n,u,m)}function QT(n,o,e,t,i){let r=[Oe(o)];return e instanceof nr?r.push(ih(e,i)):r.push(e),t!==null&&r.push(t),jn(n,r,i)}function mK(n){return jn(ge.elementEnd,[],n)}function uK(n,o,e,t){return Np(ge.elementContainerStart,n,null,o,e,t)}function gK(n,o,e,t){return Np(ge.elementContainer,n,null,o,e,t)}function hK(){return jn(ge.elementContainerEnd,[],null)}function _K(n,o,e,t,i,r,s,d){return gF(ge.templateCreate,n,o,e,t,i,r,s,d)}function fK(){return jn(ge.disableBindings,[],null)}function CK(){return jn(ge.enableBindings,[],null)}function vK(n,o,e,t,i){let r=[Oe(n),o];return e!==null&&r.push(Vt(e)),jn(t?ge.syntheticHostListener:ge.listener,r,i)}function O6(n,o){return Vt(ge.twoWayBindingSet).callFn([n,o])}function xK(n,o,e){return jn(ge.twoWayListener,[Oe(n),o],e)}function yK(n,o){return jn(ge.pipe,[Oe(n),Oe(o)],null)}function bK(){return jn(ge.namespaceHTML,[],null)}function wK(){return jn(ge.namespaceSVG,[],null)}function MK(){return jn(ge.namespaceMathML,[],null)}function SK(n,o){return jn(ge.advance,n>1?[Oe(n)]:[],o)}function kK(n){return Vt(ge.reference).callFn([Oe(n)])}function PK(n){return Vt(ge.nextContext).callFn(n===1?[]:[Oe(n)])}function TK(){return Vt(ge.getCurrentView).callFn([])}function EK(n){return Vt(ge.restoreView).callFn([n])}function OK(n){return Vt(ge.resetView).callFn([n])}function DK(n,o,e){let t=[Oe(n,null)];return o!==""&&t.push(Oe(o)),jn(ge.text,t,e)}function IK(n,o,e,t,i,r,s,d,m,u,h){let v=[Oe(n),Oe(o),e??Oe(null),Oe(t),Oe(i),Oe(r),s??Oe(null),d??Oe(null),m?Vt(ge.deferEnableTimerScheduling):Oe(null),Oe(h)],b;for(;(b=v[v.length-1])!==null&&b instanceof _a&&b.value===null;)v.pop();return jn(ge.defer,v,u)}var AK=new Map([[ao.Idle,{none:ge.deferOnIdle,prefetch:ge.deferPrefetchOnIdle,hydrate:ge.deferHydrateOnIdle}],[ao.Immediate,{none:ge.deferOnImmediate,prefetch:ge.deferPrefetchOnImmediate,hydrate:ge.deferHydrateOnImmediate}],[ao.Timer,{none:ge.deferOnTimer,prefetch:ge.deferPrefetchOnTimer,hydrate:ge.deferHydrateOnTimer}],[ao.Hover,{none:ge.deferOnHover,prefetch:ge.deferPrefetchOnHover,hydrate:ge.deferHydrateOnHover}],[ao.Interaction,{none:ge.deferOnInteraction,prefetch:ge.deferPrefetchOnInteraction,hydrate:ge.deferHydrateOnInteraction}],[ao.Viewport,{none:ge.deferOnViewport,prefetch:ge.deferPrefetchOnViewport,hydrate:ge.deferHydrateOnViewport}],[ao.Never,{none:ge.deferHydrateNever,prefetch:ge.deferHydrateNever,hydrate:ge.deferHydrateNever}]]);function NK(n,o,e,t){let i=AK.get(n)?.[e];if(i===void 0)throw new Error(`Unable to determine instruction for trigger ${n}`);return jn(i,o,t)}function FK(n){return jn(ge.projectionDef,n?[n]:[],null)}function RK(n,o,e,t,i,r,s){let d=[Oe(n)];return(o!==0||e!==null||t!==null)&&(d.push(Oe(o)),e!==null&&d.push(e),t!==null&&(e===null&&d.push(Oe(null)),d.push(si(t),Oe(i),Oe(r)))),jn(ge.projection,d,s)}function LK(n,o,e,t){let i=[Oe(n),Oe(o)];return e!==null&&i.push(Oe(e)),jn(ge.i18nStart,i,t)}function zK(n,o,e,t,i,r,s,d){let m=[Oe(n),o,Oe(e),Oe(t),Oe(i),Oe(r)];for(s!==null&&(m.push(Oe(s)),m.push(Vt(ge.templateRefExtractor)));m[m.length-1].isEquivalent(Lg);)m.pop();return jn(ge.conditionalCreate,m,d)}function VK(n,o,e,t,i,r,s,d){let m=[Oe(n),o,Oe(e),Oe(t),Oe(i),Oe(r)];for(s!==null&&(m.push(Oe(s)),m.push(Vt(ge.templateRefExtractor)));m[m.length-1].isEquivalent(Lg);)m.pop();return jn(ge.conditionalBranchCreate,m,d)}function BK(n,o,e,t,i,r,s,d,m,u,h,v,b,y){let x=[Oe(n),si(o),Oe(e),Oe(t),Oe(i),Oe(r),s];return(d||m!==null)&&(x.push(Oe(d)),m!==null&&(x.push(si(m),Oe(u),Oe(h)),(v!==null||b!==null)&&x.push(Oe(v)),b!==null&&x.push(Oe(b)))),jn(ge.repeaterCreate,x,y)}function jK(n,o){return jn(ge.repeater,[n],o)}function $K(n,o,e){return n==="prefetch"?jn(ge.deferPrefetchWhen,[o],e):n==="hydrate"?jn(ge.deferHydrateWhen,[o],e):jn(ge.deferWhen,[o],e)}function HK(n,o){return jn(ge.declareLet,[Oe(n)],o)}function UK(n,o){return Vt(ge.storeLet).callFn([n],o)}function WK(n){return Vt(ge.readContextLet).callFn([Oe(n)])}function GK(n,o,e,t){let i=[Oe(n),Oe(o)];return e&&i.push(Oe(e)),jn(ge.i18n,i,t)}function qK(n){return jn(ge.i18nEnd,[],n)}function QK(n,o){let e=[Oe(n),Oe(o)];return jn(ge.i18nAttributes,e,null)}function KK(n,o,e){return QT(ge.ariaProperty,n,o,null,e)}function XK(n,o,e,t){return QT(ge.property,n,o,e,t)}function YK(n){return jn(ge.control,[],n)}function ZK(n){return jn(ge.controlCreate,[],n)}function JK(n,o,e,t){let i=[Oe(n),o];return e!==null&&i.push(e),jn(ge.twoWayProperty,i,t)}function eX(n,o,e,t,i){let r=[Oe(n)];return o instanceof nr?r.push(ih(o,i)):r.push(o),(e!==null||t!==null)&&r.push(e??Oe(null)),t!==null&&r.push(Oe(t)),jn(ge.attribute,r,null)}function tX(n,o,e,t){let i=[Oe(n)];return o instanceof nr?i.push(ih(o,t)):i.push(o),e!==null&&i.push(Oe(e)),jn(ge.styleProp,i,t)}function nX(n,o,e){return jn(ge.classProp,[Oe(n),o],e)}function iX(n,o){let e=n instanceof nr?ih(n,o):n;return jn(ge.styleMap,[e],o)}function oX(n,o){let e=n instanceof nr?ih(n,o):n;return jn(ge.classMap,[e],o)}function rX(n,o,e,t,i){return Np(ge.domElement,n,o,e,t,i)}function aX(n,o,e,t,i){return Np(ge.domElementStart,n,o,e,t,i)}function sX(n){return jn(ge.domElementEnd,[],n)}function lX(n,o,e,t){return Np(ge.domElementContainerStart,n,null,o,e,t)}function cX(n,o,e,t){return Np(ge.domElementContainer,n,null,o,e,t)}function dX(){return jn(ge.domElementContainerEnd,[],null)}function pX(n,o,e,t){let i=[Oe(n),o];return e!==null&&i.push(Vt(e)),jn(ge.domListener,i,t)}function mX(n,o,e,t,i,r,s,d){return gF(ge.domTemplate,n,o,e,t,i,r,s,d)}var D6=[ge.pipeBind1,ge.pipeBind2,ge.pipeBind3,ge.pipeBind4];function uX(n,o,e){if(e.length<1||e.length>D6.length)throw new Error("pipeBind() argument count out of bounds");let t=D6[e.length-1];return Vt(t).callFn([Oe(n),Oe(o),...e])}function gX(n,o,e){return Vt(ge.pipeBindV).callFn([Oe(n),Oe(o),e])}function hX(n,o,e){let t=hF(n,o);return OX(PX,[],t,e)}function _X(n,o){return jn(ge.i18nExp,[n],o)}function fX(n,o){return jn(ge.i18nApply,[Oe(n)],o)}function CX(n,o,e,t){return QT(ge.domProperty,n,o,e,t)}function vX(n,o,e,t){let i=[o];e!==null&&i.push(e);let r=n==="enter"?ge.animationEnter:ge.animationLeave;return jn(r,i,t)}function xX(n,o,e,t){let r=[o instanceof nr?ih(o,t):o];e!==null&&r.push(e);let s=n==="enter"?ge.animationEnter:ge.animationLeave;return jn(s,r,t)}function yX(n,o,e,t){let i=[o],r=n==="enter"?ge.animationEnterListener:ge.animationLeaveListener;return jn(r,i,t)}function bX(n,o,e){return jn(ge.syntheticHostProperty,[Oe(n),o],e)}function wX(n,o,e){return KT(EX,[Oe(n),o],e,null)}function MX(n,o){return jn(ge.attachSourceLocations,[Oe(n),o],null)}function SX(n,o,e){return Vt(ge.arrowFunction).callFn([Oe(n),o,e])}function hF(n,o){if(n.length<1||o.length!==n.length-1)throw new Error("AssertionError: expected specific shape of args for strings/expressions in interpolation");let e=[];if(o.length===1&&n[0]===""&&n[1]==="")e.push(o[0]);else{let t;for(t=0;t{if(n%2===0)throw new Error("Expected odd number of arguments");return(n-1)/2}},TX={constant:[ge.interpolate,ge.interpolate1,ge.interpolate2,ge.interpolate3,ge.interpolate4,ge.interpolate5,ge.interpolate6,ge.interpolate7,ge.interpolate8],variable:ge.interpolateV,mapping:n=>{if(n%2===0)throw new Error("Expected odd number of arguments");return(n-1)/2}},EX={constant:[ge.pureFunction0,ge.pureFunction1,ge.pureFunction2,ge.pureFunction3,ge.pureFunction4,ge.pureFunction5,ge.pureFunction6,ge.pureFunction7,ge.pureFunction8],variable:ge.pureFunctionV,mapping:n=>n};function KT(n,o,e,t){let i=n.mapping(e.length),r=e.at(-1);if(e.length>1&&r instanceof _a&&r.value===""&&e.pop(),i_F(n,t),ii.None),e.kind){case j.Text:Je.replace(e,DK(e.handle.slot,e.initialValue,e.sourceSpan));break;case j.ElementStart:Je.replace(e,n.job.mode===hs.DomOnly?aX(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan):pK(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case j.Element:Je.replace(e,n.job.mode===hs.DomOnly?rX(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan):dK(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan));break;case j.ElementEnd:Je.replace(e,n.job.mode===hs.DomOnly?sX(e.sourceSpan):mK(e.sourceSpan));break;case j.ContainerStart:Je.replace(e,n.job.mode===hs.DomOnly?lX(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan):uK(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan));break;case j.Container:Je.replace(e,n.job.mode===hs.DomOnly?cX(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan):gK(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan));break;case j.ContainerEnd:Je.replace(e,n.job.mode===hs.DomOnly?dX():hK());break;case j.I18nStart:Je.replace(e,LK(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case j.I18nEnd:Je.replace(e,qK(e.sourceSpan));break;case j.I18n:Je.replace(e,GK(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case j.I18nAttributes:if(e.i18nAttributesConfig===null)throw new Error("AssertionError: i18nAttributesConfig was not set");Je.replace(e,QK(e.handle.slot,e.i18nAttributesConfig));break;case j.Template:if(!(n instanceof vl))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=n.job.views.get(e.xref);Je.replace(e,e.templateKind===vs.Block||n.job.mode===hs.DomOnly?mX(e.handle.slot,si(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan):_K(e.handle.slot,si(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case j.DisableBindings:Je.replace(e,fK());break;case j.EnableBindings:Je.replace(e,CK());break;case j.Pipe:Je.replace(e,yK(e.handle.slot,e.name));break;case j.DeclareLet:Je.replace(e,HK(e.handle.slot,e.sourceSpan));break;case j.AnimationString:Je.replace(e,xX(e.animationKind,e.expression,e.sanitizer,e.sourceSpan));break;case j.Animation:let i=sx(n,e.handlerFnName,e.handlerOps,!1);Je.replace(e,vX(e.animationKind,i,e.sanitizer,e.sourceSpan));break;case j.AnimationListener:let r=sx(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent);Je.replace(e,yX(e.animationKind,r,null,e.sourceSpan));break;case j.Listener:let s=sx(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent),d=e.eventTarget?DX.get(e.eventTarget):null;if(d===void 0)throw new Error(`Unexpected global target '${e.eventTarget}' defined for '${e.name}' event. Supported list of global targets: window,document,body.`);Je.replace(e,n.job.mode===hs.DomOnly&&!e.hostListener&&!e.isLegacyAnimationListener?pX(e.name,s,d,e.sourceSpan):vK(e.name,s,d,e.hostListener&&e.isLegacyAnimationListener,e.sourceSpan));break;case j.TwoWayListener:Je.replace(e,xK(e.name,sx(n,e.handlerFnName,e.handlerOps,!0),e.sourceSpan));break;case j.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);Je.replace(e,Zs(new Ur(e.variable.name,e.initializer,void 0,ua.Final)));break;case j.Namespace:switch(e.active){case Tr.HTML:Je.replace(e,bK());break;case Tr.SVG:Je.replace(e,wK());break;case Tr.Math:Je.replace(e,MK());break}break;case j.Defer:let m=!!e.loadingMinimumTime||!!e.loadingAfterTime||!!e.placeholderMinimumTime;Je.replace(e,IK(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 j.DeferOn:let u=[];switch(e.trigger.kind){case ao.Never:case ao.Idle:case ao.Immediate:break;case ao.Timer:u=[Oe(e.trigger.delay)];break;case ao.Viewport:e.modifier==="hydrate"?u=e.trigger.options?[e.trigger.options]:[]:(u=[Oe(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0?u.push(Oe(e.trigger.targetSlotViewSteps)):e.trigger.options&&u.push(Oe(null)),e.trigger.options&&u.push(e.trigger.options));break;case ao.Interaction:case ao.Hover:e.modifier==="hydrate"?u=[]:(u=[Oe(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0&&u.push(Oe(e.trigger.targetSlotViewSteps)));break;default:throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${e.trigger.kind}`)}Je.replace(e,NK(e.trigger.kind,u,e.modifier,e.sourceSpan));break;case j.ProjectionDef:Je.replace(e,FK(e.def));break;case j.Projection:if(e.handle.slot===null)throw new Error("No slot was assigned for project instruction");let h=null,v=null,b=null;if(e.fallbackView!==null){if(!(n instanceof vl))throw new Error("AssertionError: must be compiling a component");let D=n.job.views.get(e.fallbackView);if(D===void 0)throw new Error("AssertionError: projection had fallback view xref, but fallback view was not found");if(D.fnName===null||D.decls===null||D.vars===null)throw new Error("AssertionError: expected projection fallback view to have been named and counted");h=D.fnName,v=D.decls,b=D.vars}Je.replace(e,RK(e.handle.slot,e.projectionSlotIndex,e.attributes,h,v,b,e.sourceSpan));break;case j.ConditionalCreate:if(!(n instanceof vl))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 y=n.job.views.get(e.xref);Je.replace(e,zK(e.handle.slot,si(y.fnName),y.decls,y.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case j.ConditionalBranchCreate:if(!(n instanceof vl))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 x=n.job.views.get(e.xref);Je.replace(e,VK(e.handle.slot,si(x.fnName),x.decls,x.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case j.RepeaterCreate:if(e.handle.slot===null)throw new Error("No slot was assigned for repeater instruction");if(!(n instanceof vl))throw new Error("AssertionError: must be compiling a component");let P=n.job.views.get(e.xref);if(P.fnName===null)throw new Error("AssertionError: expected repeater primary view to have been named");let k=null,S=null,T=null;if(e.emptyView!==null){let D=n.job.views.get(e.emptyView);if(D===void 0)throw new Error("AssertionError: repeater had empty view xref, but empty view was not found");if(D.fnName===null||D.decls===null||D.vars===null)throw new Error("AssertionError: expected repeater empty view to have been named and counted");k=D.fnName,S=D.decls,T=D.vars}Je.replace(e,BK(e.handle.slot,P.fnName,e.decls,e.vars,e.tag,e.attributes,LX(n,e),e.usesComponentInstance,k,S,T,e.emptyTag,e.emptyAttributes,e.wholeSourceSpan));break;case j.SourceLocation:let A=Ji(e.locations.map(({targetSlot:D,offset:F,line:I,column:V})=>{if(D.slot===null)throw new Error("No slot was assigned for source location");return Ji([Oe(D.slot),Oe(F),Oe(I),Oe(V)])}));Je.replace(e,MX(e.templatePath,A));break;case j.ControlCreate:Je.replace(e,ZK(e.sourceSpan));break;case j.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of create op ${j[e.kind]}`)}}function R1(n,o){for(let e of o)switch(ir(e,t=>_F(n,t),ii.None),e.kind){case j.Advance:Je.replace(e,SK(e.delta,e.sourceSpan));break;case j.Property:Je.replace(e,n.job.mode===hs.DomOnly&&e.bindingKind!==qt.LegacyAnimation&&e.bindingKind!==qt.Animation?I6(e):FX(e));break;case j.Control:Je.replace(e,RX(e));break;case j.TwoWayProperty:Je.replace(e,JK(e.name,e.expression,e.sanitizer,e.sourceSpan));break;case j.StyleProp:Je.replace(e,tX(e.name,e.expression,e.unit,e.sourceSpan));break;case j.ClassProp:Je.replace(e,nX(e.name,e.expression,e.sourceSpan));break;case j.StyleMap:Je.replace(e,iX(e.expression,e.sourceSpan));break;case j.ClassMap:Je.replace(e,oX(e.expression,e.sourceSpan));break;case j.I18nExpression:Je.replace(e,_X(e.expression,e.sourceSpan));break;case j.I18nApply:Je.replace(e,fX(e.handle.slot,e.sourceSpan));break;case j.InterpolateText:Je.replace(e,hX(e.interpolation.strings,e.interpolation.expressions,e.sourceSpan));break;case j.Attribute:Je.replace(e,eX(e.name,e.expression,e.sanitizer,e.namespace,e.sourceSpan));break;case j.DomProperty:if(e.expression instanceof nr)throw new Error("not yet handled");e.bindingKind===qt.LegacyAnimation||e.bindingKind===qt.Animation?Je.replace(e,bX(e.name,e.expression,e.sourceSpan)):Je.replace(e,I6(e));break;case j.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);Je.replace(e,Zs(new Ur(e.variable.name,e.initializer,void 0,ua.Final)));break;case j.Conditional:if(e.processed===null)throw new Error("Conditional test was not set.");Je.replace(e,kX(e.processed,e.contextValue,e.sourceSpan));break;case j.Repeater:Je.replace(e,jK(e.collection,e.sourceSpan));break;case j.DeferWhen:Je.replace(e,$K(e.modifier,e.expr,e.sourceSpan));break;case j.StoreLet:throw new Error(`AssertionError: unexpected storeLet ${e.declaredName}`);case j.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of update op ${j[e.kind]}`)}}function I6(n){return CX(IX.get(n.name)??n.name,n.expression,n.sanitizer,n.sourceSpan)}function FX(n){return eF(n.name)?KK(n.name,n.expression,n.sourceSpan):XK(n.name,n.expression,n.sanitizer,n.sourceSpan)}function RX(n){return YK(n.sourceSpan)}function _F(n,o){if(!$c(o))return o;switch(o.kind){case Jt.NextContext:return PK(o.steps);case Jt.Reference:return kK(o.targetSlot.slot+1+o.offset);case Jt.LexicalRead:throw new Error(`AssertionError: unresolved LexicalRead of ${o.name}`);case Jt.TwoWayBindingSet:throw new Error("AssertionError: unresolved TwoWayBindingSet");case Jt.RestoreView:if(typeof o.view=="number")throw new Error("AssertionError: unresolved RestoreView");return EK(o.view);case Jt.ResetView:return OK(o.expr);case Jt.GetCurrentView:return TK();case Jt.ReadVariable:if(o.name===null)throw new Error(`Read of unnamed variable ${o.xref}`);return si(o.name);case Jt.ReadTemporaryExpr:if(o.name===null)throw new Error(`Read of unnamed temporary ${o.xref}`);return si(o.name);case Jt.AssignTemporaryExpr:if(o.name===null)throw new Error(`Assign of unnamed temporary ${o.xref}`);return si(o.name).set(o.expr);case Jt.PureFunctionExpr:if(o.fn===null)throw new Error("AssertionError: expected PureFunctions to have been extracted");return wX(o.varOffset,o.fn,o.args);case Jt.PureFunctionParameterExpr:throw new Error("AssertionError: expected PureFunctionParameterExpr to have been extracted");case Jt.PipeBinding:return uX(o.targetSlot.slot,o.varOffset,o.args);case Jt.PipeBindingVariadic:return gX(o.targetSlot.slot,o.varOffset,o.args);case Jt.SlotLiteralExpr:return Oe(o.slot.slot);case Jt.ContextLetReference:return WK(o.targetSlot.slot);case Jt.StoreLet:return UK(o.value,o.sourceSpan);case Jt.TrackContext:return si("this");case Jt.ArrowFunction:if(o.varOffset===null)throw new Error("AssertionError: variable offset was not assigned to arrow function");return SX(o.varOffset,n.job.pool.getSharedFunctionReference(zX(n,o),"arrowFn"),si(Ys));default:throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${Jt[o.kind]}`)}}function sx(n,o,e,t){R1(n,e);let i=[];for(let s of e){if(s.kind!==j.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${j[s.kind]}`);i.push(s.statement)}let r=[];return t&&r.push(new Er("$event",xs)),bp(r,i,void 0,void 0,o)}function LX(n,o){if(o.trackByFn!==null)return o.trackByFn;let e=[new Er("$index",Jm),new Er("$item",xs)],t;if(o.trackByOps===null)t=o.usesComponentInstance?bp(e,[new Or(o.track)]):Xs(e,o.track);else{R1(n,o.trackByOps);let i=[];for(let r of o.trackByOps){if(r.kind!==j.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${j[r.kind]}`);i.push(r.statement)}t=o.usesComponentInstance||i.length!==1||!(i[0]instanceof Or)?bp(e,i):Xs(e,i[0].value)}return o.trackByFn=n.job.pool.getSharedFunctionReference(t,"_forTrack"),o.trackByFn}function zX(n,o){R1(n,o.ops);let e=[];for(let i of o.ops){if(i.kind!==j.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${j[i.kind]}`);e.push(i.statement)}let t=e.length===1&&e[0]instanceof Or?e[0].value:e;return Xs([new Er(o.contextName,xs),new Er(o.currentViewName,xs)],Xs(o.parameters,t))}function VX(n){for(let o of n.units)for(let e of o.update)switch(e.kind){case j.Attribute:case j.Binding:case j.ClassProp:case j.ClassMap:case j.Property:case j.StyleProp:case j.StyleMap:e.expression instanceof x0&&Je.remove(e);break}}function BX(n){for(let o of n.units)for(let e of o.create)switch(e.kind){case j.I18nContext:Je.remove(e);break;case j.I18nStart:e.context=null;break}}function jX(n){for(let o of n.units)for(let e of o.update){if(e.kind!==j.Variable||e.variable.kind!==oa.Identifier||!(e.initializer instanceof _0))continue;let t=e.variable.identifier,i=e;for(;i&&i.kind!==j.ListEnd;)ir(i,r=>r instanceof na&&r.name===t?Oe(void 0):r,ii.None),i=i.prev}}function $X(n){for(let o of n.units){let e=new Set;for(let t of o.update)t.kind===j.I18nExpression&&e.add(t.i18nOwner);for(let t of o.create)switch(t.kind){case j.I18nAttributes:if(e.has(t.xref))continue;Je.remove(t)}}}function HX(n){for(let o of n.units){for(let e of o.functions)Of(o,e.ops);Of(o,o.create),Of(o,o.update)}}function Of(n,o){let e=new Map;e.set(n.xref,si(Ys));for(let t of o)switch(t.kind){case j.Variable:t.variable.kind===oa.Context&&e.set(t.variable.view,new Od(t.xref));break;case j.Animation:case j.AnimationListener:case j.Listener:case j.TwoWayListener:Of(n,t.handlerOps);break;case j.RepeaterCreate:t.trackByOps!==null&&Of(n,t.trackByOps);break}n===n.job.root&&e.set(n.xref,si(Ys));for(let t of o)ir(t,i=>{if(i instanceof Tp){if(!e.has(i.view))throw new Error(`No context found for reference to view ${i.view} from view ${n.xref}`);return e.get(i.view)}else return i},ii.None)}function UX(n){for(let o of n.units)for(let e of o.create)if(e.kind===j.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 t=o.fnName?.replace("_Template","");e.resolverFn=n.pool.getSharedFunctionReference(e.ownResolverFn,`${t}_Defer_${e.handle.slot}_DepsFn`,!1)}}}function WX(n){for(let o of n.units)A6(o.create),A6(o.update)}function A6(n){for(let o of n)(o.kind===j.Listener||o.kind===j.TwoWayListener||o.kind===j.AnimationListener)&&ir(o,e=>e instanceof na&&e.name==="$event"?((o.kind===j.Listener||o.kind===j.AnimationListener)&&(o.consumesDollarEvent=!0),new tc(e.name)):e,ii.InChildOperation)}function GX(n){let o=new Map,e=new Map;for(let t of n.units)for(let i of t.create)switch(i.kind){case j.I18nContext:o.set(i.xref,i);break;case j.ElementStart:e.set(i.xref,i);break}Tc(n,n.root,o,e)}function Tc(n,o,e,t,i){let r=null,s=new Map;for(let d of o.create)switch(d.kind){case j.I18nStart:if(!d.context)throw Error("Could not find i18n context for i18n op");r={i18nBlock:d,i18nContext:e.get(d.context)};break;case j.I18nEnd:r=null;break;case j.ElementStart:if(d.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");N6(d,r.i18nContext,r.i18nBlock,i),i&&d.i18nPlaceholder.closeName&&s.set(d.xref,i),i=void 0}break;case j.ElementEnd:let m=t.get(d.xref);if(m&&m.i18nPlaceholder!==void 0){if(r===null)throw Error("AssertionError: i18n tag placeholder should only occur inside an i18n block");F6(m,r.i18nContext,r.i18nBlock,s.get(d.xref)),s.delete(d.xref)}break;case j.Projection:if(d.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");N6(d,r.i18nContext,r.i18nBlock,i),F6(d,r.i18nContext,r.i18nBlock,i),i=void 0}if(d.fallbackView!==null){let b=n.views.get(d.fallbackView);if(d.fallbackViewI18nPlaceholder===void 0)Tc(n,b,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");lx(n,b,d.handle.slot,d.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,i),Tc(n,b,e,t),cx(n,b,d.handle.slot,d.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,i),i=void 0}}break;case j.ConditionalCreate:case j.ConditionalBranchCreate:case j.Template:let u=n.views.get(d.xref);if(d.i18nPlaceholder===void 0)Tc(n,u,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");d.templateKind===vs.Structural?Tc(n,u,e,t,d):(lx(n,u,d.handle.slot,d.i18nPlaceholder,r.i18nContext,r.i18nBlock,i),Tc(n,u,e,t),cx(n,u,d.handle.slot,d.i18nPlaceholder,r.i18nContext,r.i18nBlock,i),i=void 0)}break;case j.RepeaterCreate:if(i!==void 0)throw Error("AssertionError: Unexpected structural directive associated with @for block");let h=d.handle.slot+1,v=n.views.get(d.xref);if(d.i18nPlaceholder===void 0)Tc(n,v,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");lx(n,v,h,d.i18nPlaceholder,r.i18nContext,r.i18nBlock,i),Tc(n,v,e,t),cx(n,v,h,d.i18nPlaceholder,r.i18nContext,r.i18nBlock,i),i=void 0}if(d.emptyView!==null){let b=d.handle.slot+2,y=n.views.get(d.emptyView);if(d.emptyI18nPlaceholder===void 0)Tc(n,y,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");lx(n,y,b,d.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,i),Tc(n,y,e,t),cx(n,y,b,d.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,i),i=void 0}}break}}function N6(n,o,e,t){let{startName:i,closeName:r}=n.i18nPlaceholder,s=mo.ElementTag|mo.OpenTag,d=n.handle.slot;t!==void 0&&(s|=mo.TemplateTag,d={element:d,template:t.handle.slot}),r||(s|=mo.CloseTag),Zg(o.params,i,d,e.subTemplateIndex,s)}function F6(n,o,e,t){let{closeName:i}=n.i18nPlaceholder;if(i){let r=mo.ElementTag|mo.CloseTag,s=n.handle.slot;t!==void 0&&(r|=mo.TemplateTag,s={element:s,template:t.handle.slot}),Zg(o.params,i,s,e.subTemplateIndex,r)}}function lx(n,o,e,t,i,r,s){let{startName:d,closeName:m}=t,u=mo.TemplateTag|mo.OpenTag;m||(u|=mo.CloseTag),s!==void 0&&Zg(i.params,d,s.handle.slot,r.subTemplateIndex,u),Zg(i.params,d,e,fF(n,r,o),u)}function cx(n,o,e,t,i,r,s){let{closeName:d}=t,m=mo.TemplateTag|mo.CloseTag;d&&(Zg(i.params,d,e,fF(n,r,o),m),s!==void 0&&Zg(i.params,d,s.handle.slot,r.subTemplateIndex,m))}function fF(n,o,e){for(let t of e.create)if(t.kind===j.I18nStart)return t.subTemplateIndex;return o.subTemplateIndex}function Zg(n,o,e,t,i){let r=n.get(o)??[];r.push({value:e,subTemplateIndex:t,flags:i}),n.set(o,r)}function qX(n){let o=new Map,e=new Map,t=new Map;for(let s of n.units)for(let d of s.create)switch(d.kind){case j.I18nStart:o.set(d.xref,d.subTemplateIndex);break;case j.I18nContext:e.set(d.xref,d);break;case j.IcuPlaceholder:t.set(d.xref,d);break}let i=new Map,r=s=>s.usage===th.I18nText?s.i18nOwner:s.context;for(let s of n.units)for(let d of s.update)if(d.kind===j.I18nExpression){let m=i.get(r(d))||0,u=o.get(d.i18nOwner)??null,h={value:m,subTemplateIndex:u,flags:mo.ExpressionIndex};QX(d,h,e,t),i.set(r(d),m+1)}}function QX(n,o,e,t){if(n.i18nPlaceholder!==null){let i=e.get(n.context),r=n.resolutionTime===g0.Creation?i.params:i.postprocessingParams,s=r.get(n.i18nPlaceholder)||[];s.push(o),r.set(n.i18nPlaceholder,s)}n.icuPlaceholder!==null&&t.get(n.icuPlaceholder)?.expressionPlaceholders.push(o)}function KX(n){let o=new Map;for(let e of n.units)for(let t of e.ops())if(t.kind===j.ElementStart||t.kind===j.Template){let i=t.tag??"";switch(t.namespace){case Tr.SVG:i=`:${N1}:${i}`;break;case Tr.Math:i=`:${F1}:${i}`;break}o.set(t.xref,i)}for(let e of n.units)for(let t of e.create)if(t.kind===j.ExtractedAttribute&&t.i18nContext!==null&&t.expression!==null){let i=o.get(t.target)??"",r=t.expression;switch(t.securityContext){case mi.HTML:r=Vt(ge.sanitizeHtml).callFn([r]);break;case mi.STYLE:r=Vt(ge.sanitizeStyle).callFn([r]);break;case mi.SCRIPT:r=Vt(ge.sanitizeScript).callFn([r]);break;case mi.URL:r=Vt(ge.sanitizeUrl).callFn([r]);break;case mi.RESOURCE_URL:r=Vt(ge.sanitizeResourceUrl).callFn([r]);break;case mi.ATTRIBUTE_NO_BINDING:r=Vt(ge.validateAttribute).callFn([r,Oe(i),Oe(t.name)]);break}t.expression=r}}function XX(n){for(let o of n.units){for(let e of o.functions)Df(o,e.ops,null);Df(o,o.create,null),Df(o,o.update,null)}}function Df(n,o,e){let t=new Map,i=new Map;for(let r of o)switch(r.kind){case j.Variable:switch(r.variable.kind){case oa.Identifier:if(r.variable.local){if(i.has(r.variable.identifier))continue;i.set(r.variable.identifier,r.xref)}else if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case oa.Alias:if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case oa.SavedView:e={view:r.variable.view,variable:r.xref};break}break;case j.Animation:case j.AnimationListener:case j.Listener:case j.TwoWayListener:Df(n,r.handlerOps,e);break;case j.RepeaterCreate:r.trackByOps!==null&&Df(n,r.trackByOps,e);break}for(let r of o)r.kind===j.Listener||r.kind===j.TwoWayListener||r.kind===j.Animation||r.kind===j.AnimationListener||ir(r,s=>{if(s instanceof na)return i.has(s.name)?new Od(i.get(s.name)):t.has(s.name)?new Od(t.get(s.name)):new Ks(new Tp(n.job.root.xref),s.name);if(s instanceof C0&&typeof s.view=="number"){if(e===null||e.view!==s.view)throw new Error(`AssertionError: no saved view ${s.view} from view ${n.xref}`);return s.view=new Od(e.variable),s}else return s},ii.None);for(let r of o)xr(r,s=>{if(s instanceof na)throw new Error(`AssertionError: no lexical reads should remain, but found read of ${s.name}`)})}var YX=new Map([[mi.HTML,ge.sanitizeHtml],[mi.RESOURCE_URL,ge.sanitizeResourceUrl],[mi.SCRIPT,ge.sanitizeScript],[mi.STYLE,ge.sanitizeStyle],[mi.URL,ge.sanitizeUrl],[mi.ATTRIBUTE_NO_BINDING,ge.validateAttribute]]),ZX=new Map([[mi.HTML,ge.trustConstantHtml],[mi.RESOURCE_URL,ge.trustConstantResourceUrl]]);function JX(n){for(let o of n.units){if(n.kind!==Et.Host){for(let e of o.create)if(e.kind===j.ExtractedAttribute){let t=ZX.get(R6(e.securityContext))??null;e.trustedValueFn=t!==null?Vt(t):null}}for(let e of o.update)switch(e.kind){case j.Property:case j.Attribute:case j.DomProperty:case j.TwoWayProperty:let t=null;Array.isArray(e.securityContext)&&eY(e.securityContext)?t=ge.sanitizeUrlOrResourceUrl:t=YX.get(R6(e.securityContext))??null,e.sanitizer=t!==null?Vt(t):null;break}}}function eY(n){let o=!1,e=!1,t=!1;for(let i of n)switch(i){case mi.URL:o=!0;break;case mi.RESOURCE_URL:e=!0;break;case mi.NONE:t=!0;break;default:return!1}return(o||e)&&t||o&&e}function R6(n){if(!Array.isArray(n))return n;if(n.length<2)return n[0]??mi.NONE;let o=n.filter(e=>e!==mi.NONE);if(o.length>1)throw Error("AssertionError: Ambiguous security context");return o[0]??mi.NONE}function tY(n){for(let o of n.units){for(let e of o.functions)L6(n,o,e.ops)&&z6(o,e.ops,si(e.currentViewName));o.create.prepend([fp(o.job.allocateXrefId(),{kind:oa.SavedView,name:null,view:o.xref},new VP,fl.None)]);for(let e of o.create)(e.kind===j.Listener||e.kind===j.TwoWayListener||e.kind===j.Animation||e.kind===j.AnimationListener)&&L6(n,o,e.handlerOps)&&z6(o,e.handlerOps,o.xref)}}function L6(n,o,e){let t=o!==n.root;if(!t)for(let i of e)xr(i,r=>{(r instanceof n1||r instanceof f0)&&(t=!0)});return t}function z6(n,o,e){o.prepend([fp(n.job.allocateXrefId(),{kind:oa.Context,name:null,view:n.xref},new C0(e),fl.None)]);for(let t of o)t.kind===j.Statement&&t.statement instanceof Or&&(t.statement.value=new o1(t.statement.value))}function nY(n){let o=new Map;for(let e of n.units){let t=0;for(let i of e.create)nh(i)&&(i.handle.slot=t,o.set(i.xref,i.handle.slot),t+=i.numSlotsUsed);e.decls=t}for(let e of n.units)for(let t of e.ops())if(t.kind===j.Template||t.kind===j.ConditionalCreate||t.kind===j.ConditionalBranchCreate||t.kind===j.RepeaterCreate){let i=n.views.get(t.xref);t.decls=i.decls}}function iY(n){let o=new Set,e=new Map;for(let t of n.units)for(let i of t.ops())i.kind===j.DeclareLet&&e.set(i.xref,i),xr(i,r=>{r instanceof f0&&o.add(r.target)});for(let t of n.units)for(let i of t.update)ir(i,r=>r instanceof _0&&!o.has(r.target)?(oY(r)||Je.remove(e.get(r.target)),r.value):r,ii.None)}function oY(n){let o=!1;return Rt(n,e=>((e instanceof pu||e instanceof v0)&&(o=!0),e),ii.None),o}function rY(n){let o=new Set;for(let e of n.units)for(let t of e.ops())xr(t,i=>{if(i instanceof Si)switch(i.operator){case lt.Exponentiation:aY(i,o);break;case lt.NullishCoalesce:sY(i,o);break;case lt.And:case lt.Or:lY(i,o)}});for(let e of n.units)for(let t of e.ops())ir(t,i=>i instanceof nc?o.has(i)?i:i.expr:i,ii.None)}function aY(n,o){n.lhs instanceof nc&&n.lhs.expr instanceof tu&&o.add(n.lhs)}function sY(n,o){n.lhs instanceof nc&&(V6(n.lhs.expr)||n.lhs.expr instanceof Lc)&&o.add(n.lhs),n.rhs instanceof nc&&(V6(n.rhs.expr)||n.rhs.expr instanceof Lc)&&o.add(n.rhs)}function lY(n,o){n.lhs instanceof nc&&n.lhs.expr instanceof Si&&n.lhs.expr.operator===lt.NullishCoalesce&&o.add(n.lhs)}function V6(n){return n instanceof Si&&(n.operator===lt.And||n.operator===lt.Or)}function cY(n){for(let o of n.units)for(let e of o.update)if(e.kind===j.Binding)switch(e.bindingKind){case qt.ClassName:if(e.expression instanceof nr)throw new Error("Unexpected interpolation in ClassName binding");Je.replace(e,OW(e.target,e.name,e.expression,e.sourceSpan));break;case qt.StyleProperty:Je.replace(e,EW(e.target,e.name,e.expression,e.unit,e.sourceSpan));break;case qt.Property:case qt.Template:e.name==="style"?Je.replace(e,DW(e.target,e.expression,e.sourceSpan)):e.name==="class"&&Je.replace(e,IW(e.target,e.expression,e.sourceSpan));break}}function dY(n){for(let o of n.units){o.create.prepend(If(o.create)),o.update.prepend(If(o.update));for(let e of o.functions)e.ops.prepend(If(e.ops))}}function If(n){let o=0,e=[];for(let t of n){let i=new Map;xr(t,(u,h)=>{h&ii.InChildOperation||u instanceof Op&&i.set(u.xref,u)});let r=0,s=new Set,d=new Set,m=new Map;xr(t,(u,h)=>{h&ii.InChildOperation||(u instanceof Hc?(s.has(u.xref)||(s.add(u.xref),m.set(u.xref,`tmp_${o}_${r++}`)),B6(m,u)):u instanceof Op&&(i.get(u.xref)===u&&(d.add(u.xref),r--),B6(m,u)))}),e.push(...Array.from(new Set(m.values())).map(u=>Zs(new Ur(u)))),o++,t.kind===j.Listener||t.kind===j.Animation||t.kind===j.AnimationListener||t.kind===j.TwoWayListener?t.handlerOps.prepend(If(t.handlerOps)):t.kind===j.RepeaterCreate&&t.trackByOps!==null&&t.trackByOps.prepend(If(t.trackByOps))}return e}function B6(n,o){let e=n.get(o.xref);if(e===void 0)throw new Error(`Found xref with unassigned name: ${o.xref}`);o.name=e}function pY(n){for(let o of n.units)for(let e of o.create)if(e.kind===j.RepeaterCreate)if(e.track instanceof tc&&e.track.name==="$index")e.trackByFn=Vt(ge.repeaterTrackByIndex);else if(e.track instanceof tc&&e.track.name==="$item")e.trackByFn=Vt(ge.repeaterTrackByIdentity);else if(mY(n.root.xref,e.track))e.usesComponentInstance=!0,e.track.receiver.receiver.view===o.xref?e.trackByFn=e.track.receiver:(e.trackByFn=Vt(ge.componentInstance).callFn([]).prop(e.track.receiver.name),e.track=e.trackByFn);else{e.track=Rt(e.track,i=>{if(i instanceof pu||i instanceof v0)throw new Error("Illegal State: Pipes are not allowed in this context");return i instanceof Tp?(e.usesComponentInstance=!0,new zP(i.view)):i},ii.None);let t=new Je;t.push(Zs(new Or(e.track,e.track.sourceSpan))),e.trackByOps=t}}function mY(n,o){if(!(o instanceof ys)||o.args.length===0||o.args.length>2||!(o.receiver instanceof Ks&&o.receiver.receiver instanceof Tp)||o.receiver.receiver.view!==n)return!1;let[e,t]=o.args;return!(e instanceof tc)||e.name!=="$index"?!1:o.args.length===1?!0:!(!(t instanceof tc)||t.name!=="$item")}function uY(n){for(let o of n.units)for(let e of o.create)e.kind===j.RepeaterCreate&&(e.track=Rt(e.track,t=>{if(t instanceof na){if(e.varNames.$index.has(t.name))return si("$index");if(t.name===e.varNames.$implicit)return si("$item")}return t},ii.None))}function gY(n){for(let o of n.units)for(let e of o.create)e.kind===j.TwoWayListener&&ir(e,t=>{if(!(t instanceof r1))return t;let{target:i,value:r}=t;if(i instanceof Ks||i instanceof Id)return O6(i,r).or(i.set(r));if(i instanceof Od)return O6(i,r);throw new Error("Unsupported expression in two-way action binding.")},ii.InChildOperation)}function hY(n){for(let o of n.units){let e=0;for(let r of o.ops())Bk(r)&&(e+=_Y(r));let t=r=>{$c(r)&&(r instanceof du||(q5(r)&&(r.varOffset=e),Bk(r)&&(e+=j6(r))))},i=r=>{!$c(r)||!(r instanceof du)||(q5(r)&&(r.varOffset=e),Bk(r)&&(e+=j6(r)))};for(let r of o.create)xr(r,t);for(let r of o.update)xr(r,t);for(let r of o.create)xr(r,i);for(let r of o.update)xr(r,i);o.vars=e}if(n instanceof b0)for(let o of n.units)for(let e of o.create){if(e.kind!==j.Template&&e.kind!==j.RepeaterCreate&&e.kind!==j.ConditionalCreate&&e.kind!==j.ConditionalBranchCreate)continue;let t=n.views.get(e.xref);e.vars=t.vars}}function _Y(n){let o;switch(n.kind){case j.Attribute:return o=1,n.expression instanceof nr&&!fY(n.expression)&&(o+=n.expression.expressions.length),o;case j.Property:case j.DomProperty:return o=1,n.expression instanceof nr&&(o+=n.expression.expressions.length),o;case j.Control:return 2;case j.TwoWayProperty:return 1;case j.StyleProp:case j.ClassProp:case j.StyleMap:case j.ClassMap:return o=2,n.expression instanceof nr&&(o+=n.expression.expressions.length),o;case j.InterpolateText:return n.interpolation.expressions.length;case j.I18nExpression:case j.Conditional:case j.DeferWhen:case j.StoreLet:return 1;case j.RepeaterCreate:return n.emptyView?1:0;default:throw new Error(`Unhandled op: ${j[n.kind]}`)}}function j6(n){switch(n.kind){case Jt.PureFunctionExpr:return 1+n.args.length;case Jt.PipeBinding:return 1+n.args.length;case Jt.PipeBindingVariadic:return 1+n.numArgs;case Jt.StoreLet:case Jt.ArrowFunction:return 1;default:throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${n.constructor.name}`)}}function fY(n){return!(n.expressions.length!==1||n.strings.length!==2||n.strings[0]!==""||n.strings[1]!=="")}function CY(n){for(let o of n.units){for(let e of o.functions)_f(e.ops);_f(o.create),_f(o.update);for(let e of o.create)e.kind===j.Listener||e.kind===j.Animation||e.kind===j.AnimationListener||e.kind===j.TwoWayListener?_f(e.handlerOps):e.kind===j.RepeaterCreate&&e.trackByOps!==null&&_f(e.trackByOps);for(let e of o.functions)ff(e.ops,null),$6(e.ops);for(let e of o.create)e.kind===j.Listener||e.kind===j.Animation||e.kind===j.AnimationListener||e.kind===j.TwoWayListener?(ff(e.handlerOps,dx),$6(e.handlerOps)):e.kind===j.RepeaterCreate&&e.trackByOps!==null&&ff(e.trackByOps,dx);ff(o.create,dx),ff(o.update,dx)}}var Hr=(function(n){return n[n.None=0]="None",n[n.ViewContextRead=1]="ViewContextRead",n[n.ViewContextWrite=2]="ViewContextWrite",n[n.SideEffectful=4]="SideEffectful",n})(Hr||{});function dx(n){return!(n&ii.InArrowFunctionOperation)}function _f(n){let o=new Map;for(let e of n)e.kind===j.Variable&&e.flags&fl.AlwaysInline&&(xr(e,t=>{if($c(t)&&XT(t)!==Hr.None)throw new Error("AssertionError: A context-sensitive variable was marked AlwaysInline")}),o.set(e.xref,e)),ir(e,t=>t instanceof Od&&o.has(t.xref)?o.get(t.xref).initializer.clone():t,ii.None);for(let e of o.values())Je.remove(e)}function ff(n,o){let e=new Map,t=new Map,i=new Set,r=new Map;for(let u of n){if(u.kind===j.Variable){if(e.has(u.xref)||t.has(u.xref))throw new Error(`Should not see two declarations of the same variable: ${u.xref}`);e.set(u.xref,u),t.set(u.xref,0)}r.set(u,vY(u,o)),xY(u,t,i,o)}let s=!1;for(let u of n.reversed()){let h=r.get(u);if(u.kind===j.Variable&&t.get(u.xref)===0){if(s&&h.fences&Hr.ViewContextWrite||h.fences&Hr.SideEffectful){let v=Zs(u.initializer.toStmt());r.set(v,h),Je.replace(u,v)}else yY(u,t),Je.remove(u);r.delete(u),e.delete(u.xref),t.delete(u.xref);continue}h.fences&Hr.ViewContextRead&&(s=!0)}let d=[];for(let[u,h]of t){let b=!!(e.get(u).flags&fl.AlwaysInline);h!==1||b||i.has(u)||d.push(u)}let m;for(;m=d.pop();){let u=e.get(m),h=r.get(u);if(!!(u.flags&fl.AlwaysInline))throw new Error("AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.");for(let b=u.next;b.kind!==j.ListEnd;b=b.next){let y=r.get(b);if(y.variablesUsed.has(m)){if(!wY(u,b))break;if(bY(m,u.initializer,b,h.fences)){y.variablesUsed.delete(m);for(let x of h.variablesUsed)y.variablesUsed.add(x);y.fences|=h.fences,e.delete(m),t.delete(m),r.delete(u),Je.remove(u)}break}if(!CF(y.fences,h.fences))break}}}function XT(n){switch(n.kind){case Jt.NextContext:return Hr.ViewContextRead|Hr.ViewContextWrite;case Jt.RestoreView:return Hr.ViewContextRead|Hr.ViewContextWrite|Hr.SideEffectful;case Jt.StoreLet:return Hr.SideEffectful;case Jt.Reference:case Jt.ContextLetReference:return Hr.ViewContextRead;default:return Hr.None}}function vY(n,o){let e=Hr.None,t=new Set;return xr(n,(i,r)=>{!$c(i)||o!==null&&!o(r)||(i.kind===Jt.ReadVariable?t.add(i.xref):e|=XT(i))}),{fences:e,variablesUsed:t}}function xY(n,o,e,t){xr(n,(i,r)=>{if(!$c(i)||t!==null&&!t(r)||i.kind!==Jt.ReadVariable)return;let s=o.get(i.xref);s!==void 0&&(o.set(i.xref,s+1),r&ii.InChildOperation&&e.add(i.xref))})}function yY(n,o){xr(n,e=>{if(!$c(e)||e.kind!==Jt.ReadVariable)return;let t=o.get(e.xref);if(t!==void 0){if(t===0)throw new Error(`Inaccurate variable count: ${e.xref} - found another read but count is already 0`);o.set(e.xref,t-1)}})}function CF(n,o){if(n&Hr.ViewContextWrite){if(o&Hr.ViewContextRead)return!1}else if(n&Hr.ViewContextRead&&o&Hr.ViewContextWrite)return!1;return!0}function bY(n,o,e,t){let i=!1,r=!0;return ir(e,(s,d)=>{if(!$c(s)||i||!r)return s;if(d&ii.InChildOperation&&t&Hr.ViewContextRead)return s;switch(s.kind){case Jt.ReadVariable:if(s.xref===n)return i=!0,o;break;default:let m=XT(s);r=r&&CF(m,t);break}return s},ii.None),i}function wY(n,o){switch(n.variable.kind){case oa.Identifier:return n.initializer instanceof tc&&n.initializer.name===Ys;case oa.Context:return o.kind===j.Variable;default:return!0}}function $6(n){let o=n.head.next,e=n.tail.prev;o!==null&&e!==null&&o.next===e&&o.kind===j.Statement&&o.statement instanceof fa&&o.statement.expr instanceof C0&&e.kind===j.Statement&&e.statement instanceof Or&&e.statement.value instanceof o1&&(Je.remove(o),e.statement.value=e.statement.value.expr)}function MY(n){for(let o of n.units){let e=null,t=null;for(let i of o.create)switch(i.kind){case j.I18nStart:e=i;break;case j.I18nEnd:e=null;break;case j.IcuStart:e===null&&(t=n.allocateXrefId(),Je.insertBefore(I1(t,i.message,void 0,null),i));break;case j.IcuEnd:t!==null&&(Je.insertAfter(A1(t,null),i),t=null);break}}}function SY(n){for(let o of n.units){for(let e of o.create)e.kind!==j.Animation&&e.kind!==j.AnimationListener&&e.kind!==j.Listener&&e.kind!==j.TwoWayListener&&H6(o,e);for(let e of o.update)H6(o,e)}}function H6(n,o){ir(o,(e,t)=>{if(!(e instanceof gu)||t&ii.InChildOperation)return e;if(Array.isArray(e.body))throw new Error("AssertionError: unexpected multi-line arrow function");let i=new BP(e.params,e.body);return n.functions.add(i),i},ii.None)}var kY=new Set(["formField"]);function PY(n){for(let o of n.units)TY(o)}function TY(n){for(let o of n.update)o.kind===j.Property&&kY.has(o.name)&&IY(n,o)}var EY=new Set([j.Container,j.ContainerStart,j.ContainerEnd,j.Element,j.ElementStart,j.ElementEnd,j.Template]);function OY(n){return EY.has(n.kind)}function DY(n,o){let e=null;for(let t of n.create)!OY(t)||t.xref!==o||(e=t);return e}function IY(n,o){let e=DY(n,o.target);if(e===null)throw new Error(`No create instruction found for control target ${o.target}`);let t=oG(o.sourceSpan);Je.insertAfter(t,e),Je.insertAfter(zW(o.target,o.sourceSpan),o)}var AY=[{kind:Et.Tmpl,fn:XQ},{kind:Et.Both,fn:cK},{kind:Et.Host,fn:lq},{kind:Et.Tmpl,fn:AQ},{kind:Et.Tmpl,fn:iK},{kind:Et.Tmpl,fn:MY},{kind:Et.Both,fn:OG},{kind:Et.Both,fn:cY},{kind:Et.Both,fn:hG},{kind:Et.Tmpl,fn:PY},{kind:Et.Both,fn:kG},{kind:Et.Both,fn:mG},{kind:Et.Tmpl,fn:EG},{kind:Et.Both,fn:FQ},{kind:Et.Tmpl,fn:VX},{kind:Et.Both,fn:CG},{kind:Et.Both,fn:KQ},{kind:Et.Tmpl,fn:vG},{kind:Et.Tmpl,fn:JQ},{kind:Et.Tmpl,fn:DG},{kind:Et.Tmpl,fn:nK},{kind:Et.Both,fn:SY},{kind:Et.Both,fn:aK},{kind:Et.Tmpl,fn:oq},{kind:Et.Tmpl,fn:iq},{kind:Et.Tmpl,fn:rq},{kind:Et.Tmpl,fn:tY},{kind:Et.Both,fn:aG},{kind:Et.Both,fn:WX},{kind:Et.Tmpl,fn:uY},{kind:Et.Tmpl,fn:jX},{kind:Et.Both,fn:XX},{kind:Et.Tmpl,fn:IG},{kind:Et.Tmpl,fn:gY},{kind:Et.Tmpl,fn:pY},{kind:Et.Both,fn:HX},{kind:Et.Both,fn:JX},{kind:Et.Tmpl,fn:DQ},{kind:Et.Both,fn:LG},{kind:Et.Both,fn:rY},{kind:Et.Both,fn:dY},{kind:Et.Both,fn:CY},{kind:Et.Both,fn:iY},{kind:Et.Tmpl,fn:OQ},{kind:Et.Tmpl,fn:TG},{kind:Et.Tmpl,fn:$X},{kind:Et.Tmpl,fn:dG},{kind:Et.Tmpl,fn:lG},{kind:Et.Tmpl,fn:nY},{kind:Et.Tmpl,fn:GX},{kind:Et.Tmpl,fn:qX},{kind:Et.Tmpl,fn:ZG},{kind:Et.Tmpl,fn:SQ},{kind:Et.Tmpl,fn:KX},{kind:Et.Tmpl,fn:aq},{kind:Et.Both,fn:wG},{kind:Et.Tmpl,fn:BX},{kind:Et.Both,fn:hY},{kind:Et.Tmpl,fn:nq},{kind:Et.Both,fn:RQ},{kind:Et.Tmpl,fn:UX},{kind:Et.Tmpl,fn:VQ},{kind:Et.Tmpl,fn:jQ},{kind:Et.Tmpl,fn:RG},{kind:Et.Tmpl,fn:pG},{kind:Et.Tmpl,fn:HQ},{kind:Et.Both,fn:rK},{kind:Et.Both,fn:AX},{kind:Et.Both,fn:fG}];function vF(n,o){for(let e of AY)(e.kind===o||e.kind===Et.Both)&&e.fn(n)}function NY(n,o){let e=yF(n.root);return xF(n.root,o),e}function xF(n,o){for(let e of n.job.units){if(e.parent!==n.xref)continue;xF(e,o);let t=yF(e);o.statements.push(t.toDeclStmt(t.name))}}function yF(n){if(n.fnName===null)throw new Error(`AssertionError: view ${n.xref} is unnamed`);let o=[];for(let r of n.create){if(r.kind!==j.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${j[r.kind]}`);o.push(r.statement)}let e=[];for(let r of n.update){if(r.kind!==j.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${j[r.kind]}`);e.push(r.statement)}let t=y1(1,o),i=y1(2,e);return bp([new Er(Jg,Jm),new Er(Ys,xs)],[...t,...i],void 0,void 0,n.fnName)}function y1(n,o){return o.length===0?[]:[T1(new Si(lt.BitwiseAnd,si(Jg),Oe(n)),o)]}function FY(n){if(n.root.fnName===null)throw new Error("AssertionError: host binding function is unnamed");let o=[];for(let r of n.root.create){if(r.kind!==j.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${j[r.kind]}`);o.push(r.statement)}let e=[];for(let r of n.root.update){if(r.kind!==j.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${j[r.kind]}`);e.push(r.statement)}if(o.length===0&&e.length===0)return null;let t=y1(1,o),i=y1(2,e);return bp([new Er(Jg,Jm),new Er(Ys,xs)],[...t,...i],void 0,void 0,n.root.fnName)}var px=".",RY="attr",Gk="animate",LY="class",zY="style",VY="*",qk="animate-",mT=class{_exprParser;_schemaRegistry;errors;constructor(o,e,t){this._exprParser=o,this._schemaRegistry=e,this.errors=t}createBoundHostProperties(o,e){let t=[];for(let i of Object.keys(o)){let r=o[i];typeof r=="string"?this.parsePropertyBinding(i,r,!0,!1,e,e.start.offset,void 0,[],t,e):this._reportError(`Value of the host property binding "${i}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}createDirectiveHostEventAsts(o,e){let t=[];for(let i of Object.keys(o)){let r=o[i];typeof r=="string"?this.parseEvent(i,r,!1,e,e,[],t,e):this._reportError(`Value of the host listener "${i}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}parseInterpolation(o,e,t){let i=e.fullStart.offset;try{let r=this._exprParser.parseInterpolation(o,e,i,t);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,i)}}parseInterpolationExpression(o,e){let t=e.start.offset;try{let i=this._exprParser.parseInterpolationExpression(o,e,t);return i&&this.errors.push(...i.errors),i}catch(i){return this._reportError(`${i}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}parseInlineTemplateBinding(o,e,t,i,r,s,d,m){let u=t.start.offset+VY.length,h=this._parseTemplateBindings(o,e,t,u,i);for(let v of h){let b=mp(t,v.sourceSpan),y=v.key.source,x=mp(t,v.key.span);if(v instanceof Jf){let P=v.value?v.value.source:"$implicit",k=v.value?mp(t,v.value.span):void 0;d.push(new hP(y,P,b,x,k))}else if(v.value){let P=m?b:t,k=mp(t,v.value.ast.sourceSpan);this._parsePropertyAst(y,v.value,!1,P,x,k,r,s)}else r.push([y,""]),this.parseLiteralAttr(y,null,x,i,void 0,r,s,x)}}_parseTemplateBindings(o,e,t,i,r){try{let s=this._exprParser.parseTemplateBindings(o,e,t,i,r);return s.errors.forEach(d=>this.errors.push(d)),s.warnings.forEach(d=>{this._reportError(d,t,Cp.WARNING)}),s.templateBindings}catch(s){return this._reportError(`${s}`,t),[]}}parseLiteralAttr(o,e,t,i,r,s,d,m){Qk(o)?(o=o.substring(1),m!==void 0&&(m=mp(m,new Gs(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.',t,Cp.ERROR),this._parseLegacyAnimation(o,e,t,i,m,r,s,d)):d.push(new Sg(o,this._exprParser.wrapLiteralPrimitive(e,"",i),Ec.LITERAL_ATTR,t,m,r))}parsePropertyBinding(o,e,t,i,r,s,d,m,u,h){o.length===0&&this._reportError("Property name is missing in binding",r);let v=!1;o.startsWith(qk)?(v=!0,o=o.substring(qk.length),h!==void 0&&(h=mp(h,new Gs(h.start.offset+qk.length,h.end.offset)))):Qk(o)&&(v=!0,o=o.substring(1),h!==void 0&&(h=mp(h,new Gs(h.start.offset+1,h.end.offset)))),v?this._parseLegacyAnimation(o,e,r,s,h,d,m,u):o.startsWith(`${Gk}${px}`)?this._parseAnimation(o,this.parseBinding(e,t,d||r,s),r,h,d,m,u):this._parsePropertyAst(o,this.parseBinding(e,t,d||r,s),i,r,h,d,m,u)}parsePropertyInterpolation(o,e,t,i,r,s,d,m){let u=this.parseInterpolation(e,i||t,m);return u?(this._parsePropertyAst(o,u,!1,t,d,i,r,s),!0):!1}_parsePropertyAst(o,e,t,i,r,s,d,m){d.push([o,e.source]),m.push(new Sg(o,e,t?Ec.TWO_WAY:Ec.DEFAULT,i,r,s))}_parseAnimation(o,e,t,i,r,s,d){s.push([o,e.source]),d.push(new Sg(o,e,Ec.ANIMATION,t,i,r))}_parseLegacyAnimation(o,e,t,i,r,s,d,m){o.length===0&&this._reportError("Animation trigger is missing",t);let u=this.parseBinding(e||"undefined",!1,s||t,i);d.push([o,u.source]),m.push(new Sg(o,u,Ec.LEGACY_ANIMATION,t,r,s))}parseBinding(o,e,t,i){try{let r=e?this._exprParser.parseSimpleBinding(o,t,i):this._exprParser.parseBinding(o,t,i);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,t),this._exprParser.wrapLiteralPrimitive("ERROR",t,i)}}createBoundElementProperty(o,e,t=!1,i=!0){if(e.isLegacyAnimation)return new $x(e.name,Fi.LegacyAnimation,mi.NONE,e.expression,null,e.sourceSpan,e.keySpan,e.valueSpan);let r=null,s,d=null,m=e.name.split(px),u;if(m.length>1)if(m[0]==RY){d=m.slice(1).join(px),t||this._validatePropertyOrAttributeName(d,e.sourceSpan,!0),u=Cx(this._schemaRegistry,o,d,!0);let h=d.indexOf(":");if(h>-1){let v=d.substring(0,h),b=d.substring(h+1);d=fx(v,b)}s=Fi.Attribute}else m[0]==LY?(d=m[1],s=Fi.Class,u=[mi.NONE]):m[0]==zY?(r=m.length>2?m[2]:null,d=m[1],s=Fi.Style,u=[mi.STYLE]):m[0]==Gk&&(d=e.name,s=Fi.Animation,u=[mi.NONE]);if(d===null){let h=this._schemaRegistry.getMappedPropName(e.name);d=i?h:e.name,u=Cx(this._schemaRegistry,o,h,!1),s=e.type===Ec.TWO_WAY?Fi.TwoWay:Fi.Property,t||this._validatePropertyOrAttributeName(h,e.sourceSpan,!1)}return new $x(d,s,u[0],e.expression,r,e.sourceSpan,e.keySpan,e.valueSpan)}parseEvent(o,e,t,i,r,s,d,m){o.length===0&&this._reportError("Event name is missing in binding",i),Qk(o)?(o=o.slice(1),m!==void 0&&(m=mp(m,new Gs(m.start.offset+1,m.end.offset))),this._parseLegacyAnimationEvent(o,e,i,r,d,m)):this._parseRegularEvent(o,e,t,i,r,s,d,m)}calcPossibleSecurityContexts(o,e,t){let i=this._schemaRegistry.getMappedPropName(e);return Cx(this._schemaRegistry,o,i,t)}parseEventListenerName(o){let[e,t]=QH(o,[null,o]);return{eventName:t,target:e}}parseLegacyAnimationEventName(o){let e=KH(o,[o,null]);return{eventName:e[0],phase:e[1]===null?null:e[1].toLowerCase()}}_parseLegacyAnimationEvent(o,e,t,i,r,s){let{eventName:d,phase:m}=this.parseLegacyAnimationEventName(o),u=this._parseAction(e,i);r.push(new jx(d,m,Za.LegacyAnimation,u,t,i,s)),d.length===0&&this._reportError("Animation event name is missing in binding",t),m?m!=="start"&&m!=="done"&&this._reportError(`The provided animation output phase value "${m}" for "@${d}" is not supported (use start or done)`,t):this._reportError(`The animation trigger output event (@${d}) is missing its phase value name (start or done are currently supported)`,t)}_parseRegularEvent(o,e,t,i,r,s,d,m){let{eventName:u,target:h}=this.parseEventListenerName(o),v=this.errors.length,b=this._parseAction(e,r),y=this.errors.length===v;s.push([o,b.source]),t&&y&&!this._isAllowedAssignmentEvent(b)&&this._reportError("Unsupported expression in a two-way binding",i);let x=Za.Regular;t&&(x=Za.TwoWay),o.startsWith(`${Gk}${px}`)&&(x=Za.Animation),d.push(new jx(u,h,x,b,i,r,m))}_parseAction(o,e){let t=e&&e.start?e.start.offset:0;try{let i=this._exprParser.parseAction(o,e,t);return i&&this.errors.push(...i.errors),!i||i.ast instanceof Ea?(this._reportError("Empty expressions are not allowed",e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)):i}catch(i){return this._reportError(`${i}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}_reportError(o,e,t=Cp.ERROR){this.errors.push(new dn(e,o,t))}_validatePropertyOrAttributeName(o,e,t){let i=t?this._schemaRegistry.validateAttribute(o):this._schemaRegistry.validateProperty(o);i.error&&this._reportError(i.msg,e,Cp.ERROR)}_isAllowedAssignmentEvent(o){return o instanceof Cs?this._isAllowedAssignmentEvent(o.ast):o instanceof Kf?this._isAllowedAssignmentEvent(o.expression):o instanceof Vg&&o.args.length===1&&o.receiver instanceof Ac&&o.receiver.name==="$any"&&o.receiver.receiver instanceof Vc?this._isAllowedAssignmentEvent(o.args[0]):(o instanceof Ac||o instanceof ru)&&!uT(o)}};function uT(n){return n instanceof Hf||n instanceof Uf?!0:n instanceof Zf?uT(n.expression):n instanceof Ac||n instanceof ru||n instanceof Vg?uT(n.receiver):!1}function Qk(n){return n[0]=="@"}function Cx(n,o,e,t){let i,[r,s]=o?ha(o,!1):[null,o],d=u=>{let[h,v]=ha(u,!1),b=h??r,y=b?`:${b}:${v}`:v;return n.securityContext(y,e,t)},m=n.allKnownElementNames();return s===null?i=m.map(d):(i=[],Ag.parse(s).forEach(u=>{let h=u.element?[u.element]:m;if(u.element&&!n.hasElement(u.element,[])){let y=`:${N1}:${u.element}`,x=`:${F1}:${u.element}`;n.hasElement(y,[])?h=[y]:n.hasElement(x,[])&&(h=[x])}let v=new Set(u.notSelectors.filter(y=>y.isElementSelector()).map(y=>y.element?.toLowerCase())),b=h.filter(y=>{let x=y.toLowerCase();return!v.has(x)&&!v.has(ha(x)[1])});i.push(...b.map(d))})),i.length===0?[mi.NONE]:Array.from(new Set(i)).sort()}function mp(n,o){let e=o.start-n.start.offset,t=o.end-n.end.offset;return new On(n.start.moveBy(e),n.end.moveBy(t),n.fullStart.moveBy(e),n.details)}var Dd=new Yg,Zm="ng-template",BY="animate.";function vx(n){return n instanceof Ja}function jY(n){return vx(n)&&n.nodes.length===1&&n.nodes[0]instanceof Kx}function $Y(n,o,e,t,i,r,s,d,m,u){let h=new b0(n,e,t,i,r,s,d,m,u);return Nd(h.root,o),h}function HY(n,o,e){let t=new p1(n.componentName,e,hs.DomOnly);for(let i of n.properties??[]){let r=qt.Property;i.name.startsWith("attr.")&&(i.name=i.name.substring(5),r=qt.Attribute),i.isLegacyAnimation&&(r=qt.LegacyAnimation),i.isAnimation&&(r=qt.Animation);let s=U6(o,n.componentSelector,i.name,r===qt.Attribute);UY(t,i,r,s)}for(let[i,r]of Object.entries(n.attributes)??[]){let s=U6(o,n.componentSelector,i,!0);WY(t,i,r,s)}for(let i of n.events??[])GY(t,i);return t}function U6(n,o,e,t){let i=n.calcPossibleSecurityContexts(o,e,t),r=Cx(Dd,null,Dd.getMappedPropName(e),t),s=r.filter(u=>u!==mi.NONE),d=s.length;return d!==r.length&&d>0||s.some(u=>!i.includes(u))?r:i.filter(u=>u!==mi.NONE)}function UY(n,o,e,t){let i,r=o.expression.ast;r instanceof I0?i=new nr(r.strings,r.expressions.map(s=>Qn(s,n,o.sourceSpan)),[]):i=Qn(r,n,o.sourceSpan),n.root.update.push(cu(n.root.xref,e,o.name,i,null,t,!1,!1,null,null,o.sourceSpan))}function WY(n,o,e,t){let i=cu(n.root.xref,qt.Attribute,o,e,null,t,!0,!1,null,null,e.sourceSpan);n.root.update.push(i)}function GY(n,o){let e;if(o.type===Za.Animation)e=KN(n.root.xref,new Ca,o.name,null,P0(n.root,o.handler,o.handlerSpan),o.name.endsWith("enter")?"enter":"leave",o.targetOrPhase,!0,o.sourceSpan);else{let[t,i]=o.type!==Za.LegacyAnimation?[null,o.targetOrPhase]:[o.targetOrPhase,null];e=qT(n.root.xref,new Ca,o.name,null,P0(n.root,o.handler,o.handlerSpan),t,i,!0,o.sourceSpan)}n.root.create.push(e)}function Nd(n,o){for(let e of o)if(e instanceof Bc)qY(n,e);else if(e instanceof qs)QY(n,e);else if(e instanceof Ug)KY(n,e);else if(e instanceof Um)bF(n,e,null);else if(e instanceof jg)wF(n,e,null);else if(e instanceof qx)XY(n,e);else if(e instanceof Gx)YY(n,e);else if(e instanceof su)ZY(n,e);else if(e instanceof xN)eZ(n,e);else if(e instanceof Hg)tZ(n,e);else if(e instanceof LT)iZ(n,e);else if(!(e instanceof kf))throw new Error(`Unsupported template node: ${e.constructor.name}`)}function qY(n,o){if(o.i18n!==void 0&&!(o.i18n instanceof Ja||o.i18n instanceof Mp))throw Error(`Unhandled i18n metadata type for element: ${o.i18n.constructor.name}`);let e=n.job.allocateXrefId(),[t,i]=ha(o.name),r=BW(i,e,tF(t),o.i18n instanceof Mp?o.i18n:void 0,o.startSourceSpan,o.sourceSpan);n.create.push(r),rZ(n,r,o),kF(r,o);let s=null;o.i18n instanceof Ja&&(s=n.job.allocateXrefId(),n.create.push(I1(s,o.i18n,void 0,o.startSourceSpan))),Nd(n,o.children);let d=$W(e,o.endSourceSpan??o.startSourceSpan);n.create.push(d),s!==null&&Je.insertBefore(A1(s,o.endSourceSpan??o.startSourceSpan),d)}function QY(n,o){if(o.i18n!==void 0&&!(o.i18n instanceof Ja||o.i18n instanceof Mp))throw Error(`Unhandled i18n metadata type for template: ${o.i18n.constructor.name}`);let e=n.job.allocateView(n.xref),t=o.tagName,i="";o.tagName&&([i,t]=ha(o.tagName));let r=o.i18n instanceof Mp?o.i18n:void 0,s=tF(i),d=t===null?"":bG(t,s),m=oZ(o)?vs.NgTemplate:vs.Structural,u=WN(e.xref,m,t,d,s,r,o.startSourceSpan,o.sourceSpan);n.create.push(u),aZ(n,u,o,m),kF(u,o),Nd(e,o.children);for(let{name:h,value:v}of o.variables)e.contextVariables.set(h,v!==""?v:"$implicit");if(m===vs.NgTemplate&&o.i18n instanceof Ja){let h=n.job.allocateXrefId();Je.insertAfter(I1(h,o.i18n,void 0,o.startSourceSpan),e.create.head),Je.insertBefore(A1(h,o.endSourceSpan??o.startSourceSpan),e.create.tail)}}function KY(n,o){if(o.i18n!==void 0&&!(o.i18n instanceof Mp))throw Error(`Unhandled i18n metadata type for element: ${o.i18n.constructor.name}`);let e=null;o.children.some(r=>!(r instanceof O1)&&(!(r instanceof Um)||r.value.trim().length>0))&&(e=n.job.allocateView(n.xref),Nd(e,o.children));let t=n.job.allocateXrefId(),i=XW(t,o.selector,o.i18n,e?.xref??null,o.sourceSpan);for(let r of o.attributes){let s=Dd.securityContext(o.name,r.name,!0);n.update.push(cu(i.xref,qt.Attribute,r.name,Oe(r.value),null,s,!0,!1,null,Td(r.i18n),r.sourceSpan))}n.create.push(i)}function bF(n,o,e){n.create.push(QN(n.job.allocateXrefId(),o.value,e,o.sourceSpan))}function wF(n,o,e){let t=o.value;if(t instanceof Cs&&(t=t.ast),!(t instanceof I0))throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${t.constructor.name}`);if(o.i18n!==void 0&&!(o.i18n instanceof Ed))throw Error(`Unhandled i18n metadata type for text interpolation: ${o.i18n?.constructor.name}`);let i=o.i18n instanceof Ed?o.i18n.children.filter(s=>s instanceof l0).map(s=>s.name):[];if(i.length>0&&i.length!==t.expressions.length)throw Error(`Unexpected number of i18n placeholders (${t.expressions.length}) for BoundText with ${t.expressions.length} expressions`);let r=n.job.allocateXrefId();n.create.push(QN(r,"",e,o.sourceSpan)),n.update.push(kW(r,new nr(t.strings,t.expressions.map(s=>Qn(s,n.job,null)),i),o.sourceSpan))}function XY(n,o){let e=null,t=[];for(let i=0;ib.modifier==="none")||h.some(b=>b.modifier==="none")||u.push(gp(d,{kind:ao.Idle},"none",null)),n.create.push(u),n.update.push(h)}function JY(n){return Object.keys(n.hydrateTriggers).length>0?1:null}function Kk(n,o,e,t,i,r){if(o.idle!==void 0){let s=gp(r,{kind:ao.Idle},n,o.idle.sourceSpan);e.push(s)}if(o.immediate!==void 0){let s=gp(r,{kind:ao.Immediate},n,o.immediate.sourceSpan);e.push(s)}if(o.timer!==void 0){let s=gp(r,{kind:ao.Timer,delay:o.timer.delay},n,o.timer.sourceSpan);e.push(s)}if(o.hover!==void 0){let s=gp(r,{kind:ao.Hover,targetName:o.hover.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,o.hover.sourceSpan);e.push(s)}if(o.interaction!==void 0){let s=gp(r,{kind:ao.Interaction,targetName:o.interaction.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,o.interaction.sourceSpan);e.push(s)}if(o.viewport!==void 0){let s=gp(r,{kind:ao.Viewport,targetName:o.viewport.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null,options:o.viewport.options?Qn(o.viewport.options,i.job,o.viewport.sourceSpan):null},n,o.viewport.sourceSpan);e.push(s)}if(o.never!==void 0){let s=gp(r,{kind:ao.Never},n,o.never.sourceSpan);e.push(s)}if(o.when!==void 0){if(o.when.value instanceof I0)throw new Error("Unexpected interpolation in defer block when trigger");let s=FW(r,Qn(o.when.value,i.job,o.when.sourceSpan),n,o.when.sourceSpan);t.push(s)}}function eZ(n,o){if(o.i18n instanceof Ja&&jY(o.i18n)){let e=n.job.allocateXrefId();n.create.push(eG(e,o.i18n,wN(o.i18n).name,null));for(let[t,i]of Object.entries(q(q({},o.vars),o.placeholders)))i instanceof jg?wF(n,i,t):bF(n,i,t);n.create.push(tG(e))}else throw Error(`Unhandled i18n metadata type for ICU: ${o.i18n?.constructor.name}`)}function tZ(n,o){let e=n.job.allocateView(n.xref),t=`\u0275$index_${e.xref}`,i=`\u0275$count_${e.xref}`,r=new Set;e.contextVariables.set(o.item.name,o.item.value);for(let S of o.contextVariables)S.value==="$index"&&r.add(S.name),S.name==="$index"?e.contextVariables.set("$index",S.value).set(t,S.value):S.name==="$count"?e.contextVariables.set("$count",S.value).set(i,S.value):e.aliases.add({kind:oa.Alias,name:null,identifier:S.name,expression:nZ(S,t,i)});let s=jr(o.trackBy.span,o.sourceSpan),d=Qn(o.trackBy,n.job,s);Nd(e,o.children);let m=null,u=null;o.empty!==null&&(m=n.job.allocateView(n.xref),Nd(m,o.empty.children),u=b1(n,m.xref,o.empty));let h={$index:r,$implicit:o.item.name};if(o.i18n!==void 0&&!(o.i18n instanceof Sp))throw Error("AssertionError: Unhandled i18n metadata type or @for");if(o.empty?.i18n!==void 0&&!(o.empty.i18n instanceof Sp))throw Error("AssertionError: Unhandled i18n metadata type or @empty");let v=o.i18n,b=o.empty?.i18n,y=b1(n,e.xref,o),x=jW(e.xref,m?.xref??null,y,d,h,u,v,b,o.startSourceSpan,o.sourceSpan);n.create.push(x);let P=Qn(o.expression,n.job,jr(o.expression.span,o.sourceSpan)),k=NW(x.xref,x.handle,P,o.sourceSpan);n.update.push(k)}function nZ(n,o,e){switch(n.value){case"$index":return new na(o);case"$count":return new na(e);case"$first":return new na(o).identical(Oe(0));case"$last":return new na(o).identical(new na(e).minus(Oe(1)));case"$even":return new na(o).modulo(Oe(2)).identical(Oe(0));case"$odd":return new na(o).modulo(Oe(2)).notIdentical(Oe(0));default:throw new Error(`AssertionError: unknown @for loop variable ${n.value}`)}}function iZ(n,o){let e=n.job.allocateXrefId();n.create.push(ZW(e,o.name,o.sourceSpan)),n.update.push(LW(e,o.name,Qn(o.value,n.job,o.valueSpan),o.sourceSpan))}function Qn(n,o,e){if(n instanceof Cs)return Qn(n.ast,o,e);if(n instanceof Ac)return n.receiver instanceof Vc?new na(n.name):new Ks(Qn(n.receiver,o,e),n.name,null,jr(n.span,e));if(n instanceof Vg){if(n.receiver instanceof Vc)throw new Error("Unexpected ImplicitReceiver");return new ys(Qn(n.receiver,o,e),n.args.map(t=>Qn(t,o,e)),void 0,jr(n.span,e))}else{if(n instanceof _s)return Oe(n.value,void 0,jr(n.span,e));if(n instanceof Dg)switch(n.operator){case"+":return new tu(Nf.Plus,Qn(n.expr,o,e),void 0,jr(n.span,e));case"-":return new tu(Nf.Minus,Qn(n.expr,o,e),void 0,jr(n.span,e));default:throw new Error(`AssertionError: unknown unary operator ${n.operator}`)}else if(n instanceof qa){let t=xG.get(n.operation);if(t===void 0)throw new Error(`AssertionError: unknown binary operator ${n.operation}`);return new Si(t,Qn(n.left,o,e),Qn(n.right,o,e),void 0,jr(n.span,e))}else{if(n instanceof $f)return new Tp(o.root.xref);if(n instanceof ru)return new Id(Qn(n.receiver,o,e),Qn(n.key,o,e),void 0,jr(n.span,e));if(n instanceof zg)throw new Error("AssertionError: Chain in unknown context");if(n instanceof au){let t=n.keys.map((i,r)=>{let s=Qn(n.values[r],o,e);return i.kind==="spread"?new yp(s):new Rg(i.key,s,i.quoted)});return new ic(t,void 0,jr(n.span,e))}else{if(n instanceof Wf)return new zc(n.expressions.map(t=>Qn(t,o,e)));if(n instanceof Nx)return new Lc(Qn(n.condition,o,e),Qn(n.trueExp,o,e),Qn(n.falseExp,o,e),void 0,jr(n.span,e));if(n instanceof Kf)return Qn(n.expression,o,e);if(n instanceof Fx)return new pu(o.allocateXrefId(),new Ca,n.name,[Qn(n.exp,o,e),...n.args.map(t=>Qn(t,o,e))]);if(n instanceof Uf)return new Qg(Qn(n.receiver,o,e),Qn(n.key,o,e),jr(n.span,e));if(n instanceof Hf)return new qg(Qn(n.receiver,o,e),n.name);if(n instanceof Lx)return new mu(Qn(n.receiver,o,e),n.args.map(t=>Qn(t,o,e)));if(n instanceof Ea)return new x0(jr(n.span,e));if(n instanceof Gf)return VH(Qn(n.expression,o,e),jr(n.span,e));if(n instanceof qf)return D0(Qn(n.expression,o,e));if(n instanceof Qf)return new Sx(Qn(n.expression,o,e),void 0,jr(n.span,e));if(n instanceof Yf)return W6(n,o,e);if(n instanceof Xf)return new Ff(Qn(n.tag,o,e),W6(n.template,o,e),void 0,jr(n.span,e));if(n instanceof Zf)return new nc(Qn(n.expression,o,e),void 0,jr(n.span,e));if(n instanceof Bx)return new Fg(n.body,n.flags,e);if(n instanceof Rx)return new nu(Qn(n.expression,o,e));if(n instanceof Vx)return lZ(Xs(n.parameters.map(t=>new Er(t.name,xs)),Qn(n.body,o,e)));throw new Error(`Unhandled expression type "${n.constructor.name}" in file "${e?.start.file.url}"`)}}}}function W6(n,o,e){return new Lf(n.elements.map(t=>new kx(t.text,jr(t.span,e))),n.expressions.map(t=>Qn(t,o,e)),jr(n.span,e))}function gT(n,o,e,t){let i;return o instanceof I0?i=new nr(o.strings,o.expressions.map(r=>Qn(r,n,null)),Object.keys(Td(e)?.placeholders??{})):o instanceof so?i=Qn(o,n,null):i=Oe(o),i}var MF=new Map([[Fi.Property,qt.Property],[Fi.TwoWay,qt.TwoWayProperty],[Fi.Attribute,qt.Attribute],[Fi.Class,qt.ClassName],[Fi.Style,qt.StyleProperty],[Fi.LegacyAnimation,qt.LegacyAnimation],[Fi.Animation,qt.Animation]]);function oZ(n){return ha(n.tagName??"")[1]===Zm}function Td(n){if(n==null)return null;if(!(n instanceof Ja))throw Error(`Expected i18n meta to be a Message, but got: ${n.constructor.name}`);return n}function rZ(n,o,e){let t=new Array,i=new Set;for(let r of e.attributes){let[s,d]=ha(e.name),m=s;if(!s)switch(o.namespace){case Tr.SVG:m=N1;break;case Tr.Math:m=F1;break}let u=Dd.securityContext(m?`:${m}:${d}`:d,r.name,!0);t.push(cu(o.xref,qt.Attribute,r.name,gT(n.job,r.value,r.i18n),null,u,!0,!1,null,Td(r.i18n),r.sourceSpan)),r.i18n&&i.add(r.name)}for(let r of e.inputs)i.has(r.name)&&console.error(`On component ${n.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.`),t.push(cu(o.xref,MF.get(r.type),r.name,gT(n.job,T0(r.value),r.i18n),r.unit,r.securityContext,!1,!1,null,Td(r.i18n)??null,r.sourceSpan));n.create.push(t.filter(r=>r?.kind===j.ExtractedAttribute)),n.update.push(t.filter(r=>r?.kind===j.Binding));for(let r of e.outputs){if(r.type===Za.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");r.type===Za.TwoWay?n.create.push(XN(o.xref,o.handle,r.name,o.tag,SF(n,r.handler,r.handlerSpan),r.sourceSpan)):r.type===Za.Animation?n.create.push(KN(o.xref,o.handle,r.name,o.tag,P0(n,r.handler,r.handlerSpan),r.name.endsWith("enter")?"enter":"leave",r.target,!1,r.sourceSpan)):n.create.push(qT(o.xref,o.handle,r.name,o.tag,P0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))}t.some(r=>r?.i18nMessage)!==null&&n.create.push(YN(n.job.allocateXrefId(),new Ca,o.xref))}function aZ(n,o,e,t){let i=new Array;for(let r of e.templateAttrs)if(r instanceof $g){let s=Dd.securityContext(Zm,r.name,!0);i.push(ux(n,o.xref,Fi.Attribute,r.name,r.value,null,s,!0,t,Td(r.i18n),r.sourceSpan))}else i.push(ux(n,o.xref,r.type,r.name,T0(r.value),r.unit,r.securityContext,!0,t,Td(r.i18n),r.sourceSpan));for(let r of e.attributes){let s=Dd.securityContext(Zm,r.name,!0);i.push(ux(n,o.xref,Fi.Attribute,r.name,r.value,null,s,!1,t,Td(r.i18n),r.sourceSpan))}for(let r of e.inputs)i.push(ux(n,o.xref,r.type,r.name,T0(r.value),r.unit,r.securityContext,!1,t,Td(r.i18n),r.sourceSpan));n.create.push(i.filter(r=>r?.kind===j.ExtractedAttribute)),n.update.push(i.filter(r=>r?.kind===j.Binding));for(let r of e.outputs){if(r.type===Za.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");if(t===vs.NgTemplate&&(r.type===Za.TwoWay?n.create.push(XN(o.xref,o.handle,r.name,o.tag,SF(n,r.handler,r.handlerSpan),r.sourceSpan)):n.create.push(qT(o.xref,o.handle,r.name,o.tag,P0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))),t===vs.Structural&&r.type!==Za.LegacyAnimation){let s=Dd.securityContext(Zm,r.name,!1);n.create.push(Cl(o.xref,qt.Property,null,r.name,null,null,null,s))}}i.some(r=>r?.i18nMessage)!==null&&n.create.push(YN(n.job.allocateXrefId(),new Ca,o.xref))}function ux(n,o,e,t,i,r,s,d,m,u,h){let v=typeof i=="string";if(m===vs.Structural){if(!d)switch(e){case Fi.Property:case Fi.Class:case Fi.Style:return Cl(o,qt.Property,null,t,null,null,u,s);case Fi.TwoWay:return Cl(o,qt.TwoWayProperty,null,t,null,null,u,s)}if(!v&&(e===Fi.Attribute||e===Fi.LegacyAnimation||e===Fi.Animation))return null}let b=MF.get(e);return m===vs.NgTemplate&&(e===Fi.Class||e===Fi.Style||e===Fi.Attribute&&!v)&&(b=qt.Property),cu(o,b,t,gT(n.job,i,u),r,s,v,d,m,u,h)}function P0(n,o,e){o=T0(o);let t=new Array,i=o instanceof zg?o.expressions:[o];if(i.length===0)throw new Error("Expected listener to have non-empty expression list.");let r=i.map(d=>Qn(d,n.job,e)),s=r.pop();return t.push(...r.map(d=>Zs(new fa(d,d.sourceSpan)))),t.push(Zs(new Or(s,s.sourceSpan))),t}function SF(n,o,e){o=T0(o);let t=new Array;if(o instanceof zg)if(o.expressions.length===1)o=o.expressions[0];else throw new Error("Expected two-way listener to have a single expression.");let i=Qn(o,n.job,e),r=new na("$event"),s=new r1(i,r);return t.push(Zs(new fa(s))),t.push(Zs(new Or(r))),t}function T0(n){return n instanceof Cs?n.ast:n}function kF(n,o){sZ(n.localRefs);for(let{name:e,value:t}of o.references)n.localRefs.push({name:e,target:t})}function sZ(n){if(!Array.isArray(n))throw new Error("AssertionError: expected an array")}function jr(n,o){if(o===null)return null;let e=o.start.moveBy(n.start),t=o.start.moveBy(n.end),i=o.fullStart.moveBy(n.start);return new On(e,t,i)}function b1(n,o,e){let t=null;for(let i of e.children)if(!(i instanceof O1||i instanceof LT)){if(t!==null)return null;if(i instanceof Bc||i instanceof qs&&i.tagName!==null)t=i;else return null}if(t!==null){for(let r of t.attributes)if(!r.name.startsWith(BY)){let s=Dd.securityContext(Zm,r.name,!0);n.update.push(cu(o,qt.Attribute,r.name,Oe(r.value),null,s,!0,!1,null,Td(r.i18n),r.sourceSpan))}for(let r of t.inputs)if(r.type!==Fi.LegacyAnimation&&r.type!==Fi.Animation&&r.type!==Fi.Attribute){let s=Dd.securityContext(Zm,r.name,!0);n.create.push(Cl(o,qt.Property,null,r.name,null,null,null,s))}let i=t instanceof Bc?t.name:t.tagName;return i===Zm?null:i}return null}function lZ(n){let o=new Set(n.params.map(e=>e.name));return Rt(n,e=>{if(e instanceof gu)for(let t of e.params)o.add(t.name);else if(e instanceof na&&o.has(e.name))return si(e.name);return e},ii.None)}var cZ=!1;function dZ(){return cZ}function w1(n,o){return T1(si(Jg).bitwiseAnd(Oe(n),null),o)}function pZ(n){return(n.descendants?1:0)|(n.static?2:0)|(n.emitDistinctChangesOnly?4:0)}function mZ(n,o){if(Array.isArray(n.predicate)){let e=[];return n.predicate.forEach(t=>{let i=t.split(",").map(r=>Oe(r.trim()));e.push(...i)}),o.getConstLiteral(Ji(e),!0)}else switch(n.predicate.forwardRef){case 0:case 2:return n.predicate.expression;case 1:return Vt(ge.resolveForwardRef).callFn([n.predicate.expression])}}function PF(n,o,e){let t=[];return e!==void 0&&t.push(...e),n.isSignal&&t.push(new Ks(si(Ys),n.propertyName)),t.push(mZ(n,o),Oe(pZ(n))),n.read&&t.push(n.read),t}var YT=Symbol("queryAdvancePlaceholder");function TF(n){let o=[],e=0,t=()=>{e>0&&(o.unshift(Vt(ge.queryAdvance).callFn(e===1?[]:[Oe(e)]).toStmt()),e=0)};for(let i=n.length-1;i>=0;i--){let r=n[i];r===YT?e++:(t(),o.unshift(r))}return t(),o}function uZ(n,o,e){let t=[],i=[],r=MN(u=>i.push(u),VT),s=null,d=null;n.forEach(u=>{let h=PF(u,o);if(u.isSignal?(s??=Vt(ge.viewQuerySignal),s=s.callFn(h)):(d??=Vt(ge.viewQuery),d=d.callFn(h)),u.isSignal){i.push(YT);return}let v=r(),b=Vt(ge.loadQuery).callFn([]),y=Vt(ge.queryRefresh).callFn([v.set(b)]),x=si(Ys).prop(u.propertyName).set(u.first?v.prop("first"):v);i.push(y.and(x).toStmt())}),s!==null&&t.push(new fa(s)),d!==null&&t.push(new fa(d));let m=e?`${e}_Query`:null;return bp([new Er(Jg,Jm),new Er(Ys,xs)],[w1(1,t),w1(2,TF(i))],ec,null,m)}function gZ(n,o,e){let t=[],i=[],r=MN(u=>i.push(u),VT),s=null,d=null;for(let u of n){let h=PF(u,o,[si("dirIndex")]);if(u.isSignal?(s??=Vt(ge.contentQuerySignal),s=s.callFn(h)):(d??=Vt(ge.contentQuery),d=d.callFn(h)),u.isSignal){i.push(YT);continue}let v=r(),b=Vt(ge.loadQuery).callFn([]),y=Vt(ge.queryRefresh).callFn([v.set(b)]),x=si(Ys).prop(u.propertyName).set(u.first?v.prop("first"):v);i.push(y.and(x).toStmt())}s!==null&&t.push(new fa(s)),d!==null&&t.push(new fa(d));let m=e?`${e}_ContentQueries`:null;return bp([new Er(Jg,Jm),new Er(Ys,xs),new Er("dirIndex",Jm)],[w1(1,t),w1(2,TF(i))],ec,null,m)}var hT=class extends wq{constructor(){super(rT)}parse(o,e,t){return super.parse(o,e,t)}};function hZ(n){if(n==null||n.length===0||n[0]=="/")return!1;let o=n.match(_Z);return o===null||o[1]=="package"||o[1]=="asset"}var _Z=/^([^:/?#]+):/,fZ="select",CZ="link",vZ="rel",xZ="href",yZ="stylesheet",bZ="style",wZ=new Set([":svg:script","script"]),MZ="ngNonBindable",SZ="ngProjectAs";function EF(n){let o=null,e=null,t=null,i=!1,r="";for(let m of n.attrs){let u=m.name.toLowerCase();u==fZ?o=m.value:u==xZ?e=m.value:u==vZ?t=m.value:m.name==MZ?i=!0:m.name==SZ&&m.value.length>0&&(r=m.value)}o||="*";let s=n.name.toLowerCase(),d=Ws.OTHER;return _P(s)?d=Ws.NG_CONTENT:bZ===s?d=Ws.STYLE:wZ.has(s)?d=Ws.SCRIPT:s==CZ&&t==yZ&&(d=Ws.STYLESHEET),new _T(d,o,e,i,r)}var Ws=(function(n){return n[n.NG_CONTENT=0]="NG_CONTENT",n[n.STYLE=1]="STYLE",n[n.STYLESHEET=2]="STYLESHEET",n[n.SCRIPT=3]="SCRIPT",n[n.OTHER=4]="OTHER",n})(Ws||{}),_T=class{type;selectAttr;hrefAttr;nonBindable;projectAs;constructor(o,e,t,i,r){this.type=o,this.selectAttr=e,this.hrefAttr=t,this.nonBindable=i,this.projectAs=r}},kZ=/^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/,PZ=/^track\s+([\S\s]*)/,TZ=/^(as\s+)(.*)/,L1=/^else[^\S\r\n]+if/,EZ=/^let\s+([\S\s]*)/,OZ=/^[$A-Z_][0-9A-Z_$]*$/i,G6=/(\s*)(\S+)(\s*)/,Af=new Set(["$index","$first","$last","$even","$odd","$count"]);function q6(n){return n==="empty"}function Q6(n){return n==="else"||L1.test(n)}function DZ(n,o,e,t){let i=LZ(o),r=[],s=K6(n,i,t);s!==null&&r.push(new qm(s.expression,Mo(e,n.children,n.children),s.expressionAlias,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan,n.i18n));for(let v of o)if(L1.test(v.name)){let b=K6(v,i,t);if(b!==null){let y=Mo(e,v.children,v.children);r.push(new qm(b.expression,y,b.expressionAlias,v.sourceSpan,v.startSourceSpan,v.endSourceSpan,v.nameSpan,v.i18n))}}else if(v.name==="else"){let b=Mo(e,v.children,v.children);r.push(new qm(null,b,null,v.sourceSpan,v.startSourceSpan,v.endSourceSpan,v.nameSpan,v.i18n))}let d=r.length>0?r[0].startSourceSpan:n.startSourceSpan,m=r.length>0?r[r.length-1].endSourceSpan:n.endSourceSpan,u=n.sourceSpan,h=r[r.length-1];return h!==void 0&&(u=new On(d.start,h.sourceSpan.end)),{node:new qx(r,u,n.startSourceSpan,m,n.nameSpan),errors:i}}function IZ(n,o,e,t){let i=[],r=NZ(n,i,t),s=null,d=null;for(let m of o)m.name==="empty"?d!==null?i.push(new dn(m.sourceSpan,"@for loop can only have one @empty block")):m.parameters.length>0?i.push(new dn(m.sourceSpan,"@empty block cannot have parameters")):d=new r0(Mo(e,m.children,m.children),m.sourceSpan,m.startSourceSpan,m.endSourceSpan,m.nameSpan,m.i18n):i.push(new dn(m.sourceSpan,`Unrecognized @for loop block "${m.name}"`));if(r!==null)if(r.trackBy===null)i.push(new dn(n.startSourceSpan,'@for loop must have a "track" expression'));else{let m=d?.endSourceSpan??n.endSourceSpan,u=new On(n.sourceSpan.start,m?.end??n.sourceSpan.end);FZ(r.trackBy.expression,r.trackBy.keywordSpan,i),s=new Hg(r.itemName,r.expression,r.trackBy.expression,r.trackBy.keywordSpan,r.context,Mo(e,n.children,n.children),d,u,n.sourceSpan,n.startSourceSpan,m,n.nameSpan,n.i18n)}return{node:s,errors:i}}function AZ(n,o,e){let t=zZ(n),i=n.parameters.length>0?E0(n.parameters[0],e):e.parseBinding("",!1,n.sourceSpan,0),r=[],s=[],d=[],m=null,u=null;for(let v of n.children){if(!(v instanceof hl))continue;if((v.name!=="case"||v.parameters.length===0)&&v.name!=="default"&&v.name!=="default never"){s.push(new Qx(v.name,v.sourceSpan,v.nameSpan));continue}u!==null&&t.push(new dn(v.sourceSpan,'@default block with "never" parameter must be the last case in a switch'));let b=v.name==="case",y=null;if(b)y=E0(v.parameters[0],e);else if(v.name==="default never"){(v.children.length>0||v.endSourceSpan!==null&&v.endSourceSpan.start.offset!==v.endSourceSpan.end.offset)&&t.push(new dn(v.sourceSpan,'@default block with "never" parameter cannot have a body')),d.length>0&&t.push(new dn(v.sourceSpan,'A @case block with no body cannot be followed by a @default block with "never" parameter')),u=new SP(v.sourceSpan,v.startSourceSpan,v.endSourceSpan,v.nameSpan);continue}let x=new MP(y,v.sourceSpan,v.startSourceSpan,v.endSourceSpan,v.nameSpan);if(d.push(x),v.children.length===0&&v.endSourceSpan!==null&&v.endSourceSpan.start.offset===v.endSourceSpan.end.offset){m===null&&(m=v.sourceSpan);continue}let k=v.sourceSpan,S=v.startSourceSpan;m!==null&&(k=new On(m.start,v.sourceSpan.end),S=new On(m.start,v.startSourceSpan.end),m=null);let T=new o0(d,Mo(o,v.children,v.children),k,S,v.endSourceSpan,v.nameSpan,v.i18n);r.push(T),d=[]}return{node:new Gx(i,r,s,u,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan),errors:t}}function NZ(n,o,e){if(n.parameters.length===0)return o.push(new dn(n.startSourceSpan,"@for loop does not have an expression")),null;let[t,...i]=n.parameters,r=VZ(t,o)?.match(kZ);if(!r||r[2].trim().length===0)return o.push(new dn(t.sourceSpan,'Cannot parse expression. @for loop expression must match the pattern " of "')),null;let[,s,d]=r;Af.has(s)&&o.push(new dn(t.sourceSpan,`@for loop item name cannot be one of ${Array.from(Af).join(", ")}.`));let m=t.expression.split(" ")[0],u=new On(t.sourceSpan.start,t.sourceSpan.start.moveBy(m.length)),h={itemName:new wp(s,"$implicit",u,u),trackBy:null,expression:E0(t,e,d),context:Array.from(Af,v=>{let b=new On(n.startSourceSpan.end,n.startSourceSpan.end);return new wp(v,v,b,b)})};for(let v of i){let b=v.expression.match(EZ);if(b!==null){let x=new On(v.sourceSpan.start.moveBy(b[0].length-b[1].length),v.sourceSpan.end);RZ(v.sourceSpan,b[1],x,s,h.context,o);continue}let y=v.expression.match(PZ);if(y!==null){if(h.trackBy!==null)o.push(new dn(v.sourceSpan,'@for loop can only have one "track" expression'));else{let x=E0(v,e,y[1]);x.ast instanceof Ea&&o.push(new dn(n.startSourceSpan,'@for loop must have a "track" expression'));let P=new On(v.sourceSpan.start,v.sourceSpan.start.moveBy(5));h.trackBy={expression:x,keywordSpan:P}}continue}o.push(new dn(v.sourceSpan,`Unrecognized @for loop parameter "${v.expression}"`))}return h}function FZ(n,o,e){let t=new fT;n.ast.visit(t),t.hasPipe&&e.push(new dn(o,"Cannot use pipes in track expressions"))}function RZ(n,o,e,t,i,r){let s=o.split(","),d=e.start;for(let m of s){let u=m.split("="),h=u.length===2?u[0].trim():"",v=u.length===2?u[1].trim():"";if(h.length===0||v.length===0)r.push(new dn(n,'Invalid @for loop "let" parameter. Parameter should match the pattern " = "'));else if(!Af.has(v))r.push(new dn(n,`Unknown "let" parameter variable "${v}". The allowed variables are: ${Array.from(Af).join(", ")}`));else if(h===t)r.push(new dn(n,`Invalid @for loop "let" parameter. Variable cannot be called "${t}"`));else if(i.some(b=>b.name===h))r.push(new dn(n,`Duplicate "let" parameter variable "${v}"`));else{let[,b,y]=u[0].match(G6)??[],x=b!==void 0&&u.length===2?new On(d.moveBy(b.length),d.moveBy(b.length+y.length)):e,P;if(u.length===2){let[,S,T]=u[1].match(G6)??[];P=S!==void 0?new On(d.moveBy(u[0].length+1+S.length),d.moveBy(u[0].length+1+S.length+T.length)):void 0}let k=new On(x.start,P?.end??x.end);i.push(new wp(h,v,k,x,P))}d=d.moveBy(m.length+1)}}function LZ(n){let o=[],e=!1;for(let t=0;t1&&t0&&o.push(new dn(i.startSourceSpan,"@else block cannot have parameters")),e=!0):L1.test(i.name)||o.push(new dn(i.startSourceSpan,`Unrecognized conditional block @${i.name}`))}return o}function zZ(n){let o=[],e=!1;if(n.parameters.length!==1)return o.push(new dn(n.startSourceSpan,"@switch block must have exactly one parameter")),o;for(let t of n.children)if(!(t instanceof w0||t instanceof uu&&t.value.trim().length===0)){if(!(t instanceof hl)||t.name!=="case"&&t.name!=="default"&&t.name!=="default never"){o.push(new dn(t.sourceSpan,"@switch block can only contain @case and @default blocks"));continue}t.name==="default never"?(e&&o.push(new dn(t.startSourceSpan,"@switch block can only have one @default block")),e=!0):t.name==="default"?(e?o.push(new dn(t.startSourceSpan,"@switch block can only have one @default block")):t.parameters.length>0&&o.push(new dn(t.startSourceSpan,"@default block cannot have parameters")),e=!0):t.name==="case"&&t.parameters.length!==1&&o.push(new dn(t.startSourceSpan,"@case block must have exactly one parameter"))}return o}function E0(n,o,e){let t,i;return typeof e=="string"?(t=Math.max(0,n.expression.lastIndexOf(e)),i=t+e.length):(t=0,i=n.expression.length),o.parseBinding(n.expression.slice(t,i),!1,n.sourceSpan,n.sourceSpan.start.offset+t)}function K6(n,o,e){if(n.parameters.length===0)return o.push(new dn(n.startSourceSpan,"Conditional block does not have an expression")),null;let t=E0(n.parameters[0],e),i=null;for(let r=1;r-1;d--){let m=e[d];if(m===")"){if(s=d,i--,i===0)break}else{if(t.test(m))continue;break}}return i!==0?(o.push(new dn(n.sourceSpan,"Unclosed parentheses in expression")),null):e.slice(r,s)}var fT=class extends Bg{hasPipe=!1;visitPipe(){this.hasPipe=!0}},BZ=/^\d+\.?\d*(ms|s)?$/,jZ=/^\s$/,X6=new Map([[_l,Ka],[Nc,Pd],[Ya,Pr]]),Xa=(function(n){return n.IDLE="idle",n.TIMER="timer",n.INTERACTION="interaction",n.IMMEDIATE="immediate",n.HOVER="hover",n.VIEWPORT="viewport",n.NEVER="never",n})(Xa||{});function $Z({expression:n,sourceSpan:o},e,t){let i=n.indexOf("never"),r=new On(o.start.moveBy(i),o.start.moveBy(i+5)),s=ZT(n,o),d=JT(n,o);i===-1?t.push(new dn(o,'Could not find "never" keyword in expression')):eE("never",e,t,new xP(r,o,s,null,d))}function Xk({expression:n,sourceSpan:o},e,t,i){let r=n.indexOf("when"),s=new On(o.start.moveBy(r),o.start.moveBy(r+4)),d=ZT(n,o),m=JT(n,o);if(r===-1)i.push(new dn(o,'Could not find "when" keyword in expression'));else{let u=O0(n,r+1),h=e.parseBinding(n.slice(u),!1,o,o.start.offset+u);eE("when",t,i,new Hx(h,o,d,s,m))}}function Yk({expression:n,sourceSpan:o},e,t,i,r){let s=n.indexOf("on"),d=new On(o.start.moveBy(s),o.start.moveBy(s+2)),m=ZT(n,o),u=JT(n,o);if(s===-1)i.push(new dn(o,'Could not find "on" keyword in expression'));else{let h=O0(n,s+1),v=n.startsWith("hydrate");new CT(n,e,h,o,t,i,v?XZ:KZ,v,m,d,u).parse()}}function ZT(n,o){return n.startsWith("prefetch")?new On(o.start,o.start.moveBy(8)):null}function JT(n,o){return n.startsWith("hydrate")?new On(o.start,o.start.moveBy(7)):null}var CT=class{expression;bindingParser;start;span;triggers;errors;validator;isHydrationTrigger;prefetchSpan;onSourceSpan;hydrateSpan;index=0;tokens;constructor(o,e,t,i,r,s,d,m,u,h,v){this.expression=o,this.bindingParser=e,this.start=t,this.span=i,this.triggers=r,this.errors=s,this.validator=d,this.isHydrationTrigger=m,this.prefetchSpan=u,this.onSourceSpan=h,this.hydrateSpan=v,this.tokens=new k0().tokenize(o.slice(t))}parse(){for(;this.tokens.length>0&&this.index0&&i.isCharacter(e[e.length-1])&&e.pop(),e.length===0&&i.isCharacter(Oa)&&t.length>0){o.push({expression:this.tokenRangeText(t),start:t[0].index}),this.advance(),t=[];continue}t.push(i),this.advance()}return(!this.token().isCharacter(Pr)||e.length>0)&&this.error(this.token(),"Unexpected end of expression"),this.index0)throw new Error(`"${Xa.IDLE}" trigger cannot have parameters`);return new yP(o,e,t,i,r)}function UZ(n,o,e,t,i,r){if(n.length!==1)throw new Error(`"${Xa.TIMER}" trigger must have exactly one parameter`);let s=M1(n[0].expression);if(s===null)throw new Error(`Could not parse time value of trigger "${Xa.TIMER}"`);return new wP(s,o,e,t,i,r)}function WZ(n,o,e,t,i,r){if(n.length>0)throw new Error(`"${Xa.IMMEDIATE}" trigger cannot have parameters`);return new bP(o,e,t,i,r)}function GZ(n,o,e,t,i,r,s){return s(Xa.HOVER,n),new Ux(n[0]?.expression??null,o,e,t,i,r)}function qZ(n,o,e,t,i,r,s){return s(Xa.INTERACTION,n),new Wx(n[0]?.expression??null,o,e,t,i,r)}function QZ(n,o,e,t,i,r,s,d,m,u){u(Xa.VIEWPORT,t);let h,v;if(t.length===0)h=v=null;else if(!t[0].expression.startsWith("{"))h=t[0].expression,v=null;else{let b=e.parseBinding(t[0].expression,!1,r,r.start.offset+n+t[0].start);if(b.ast instanceof au){if(b.ast.keys.some(x=>x.kind==="spread"))throw new Error("Spread operator are not allowed in this context");if(b.ast.keys.some(x=>x.kind==="property"&&x.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 y=b.ast.keys.findIndex(x=>x.kind==="property"&&x.key==="trigger");if(y===-1)h=null,v=b.ast;else{let x=b.ast.values[y],P=(k,S)=>S!==y;if(!(x instanceof Ac)||!(x.receiver instanceof Vc))throw new Error('"trigger" option of the "viewport" trigger must be an identifier');h=x.name,v=new au(b.ast.span,b.ast.sourceSpan,b.ast.keys.filter(P),b.ast.values.filter(P))}}if(o&&h!==null)throw new Error('"viewport" hydration trigger cannot have a "trigger"');if(v){let b=vT.findDynamicNode(v);if(b!==null)throw new Error(`Options of the "viewport" trigger must be an object literal containing only literal values, but "${b.constructor.name}" was found`)}return new e0(h,v,i,r,s,d,m)}function KZ(n,o){if(o.length>1)throw new Error(`"${n}" trigger can only have zero or one parameters`)}function XZ(n,o){if(n===Xa.VIEWPORT){if(o.length>1)throw new Error(`Hydration trigger "${n}" cannot have more than one parameter`);return}if(o.length>0)throw new Error(`Hydration trigger "${n}" cannot have parameters`)}function O0(n,o=0){let e=!1;for(let t=o;t0){let P=o[o.length-1];v=P.endSourceSpan,b=P.sourceSpan.end}let y=new On(n.sourceSpan.start,b);return{node:new su(Mo(e,n.children,n.children),m,u,h,r,s,d,n.nameSpan,y,n.sourceSpan,n.startSourceSpan,v,n.i18n),errors:i}}function aJ(n,o,e){let t=null,i=null,r=null;for(let s of n)try{if(!xT(s.name)){o.push(new dn(s.startSourceSpan,`Unrecognized block "@${s.name}"`));break}switch(s.name){case"placeholder":t!==null?o.push(new dn(s.startSourceSpan,"@defer block can only have one @placeholder block")):t=sJ(s,e);break;case"loading":i!==null?o.push(new dn(s.startSourceSpan,"@defer block can only have one @loading block")):i=lJ(s,e);break;case"error":r!==null?o.push(new dn(s.startSourceSpan,"@defer block can only have one @error block")):r=cJ(s,e);break}}catch(d){o.push(new dn(s.startSourceSpan,d.message))}return{placeholder:t,loading:i,error:r}}function sJ(n,o){let e=null;for(let t of n.parameters)if(OF.test(t.expression)){if(e!=null)throw new Error('@placeholder block can only have one "minimum" parameter');let i=M1(t.expression.slice(O0(t.expression)));if(i===null)throw new Error('Could not parse time value of parameter "minimum"');e=i}else throw new Error(`Unrecognized parameter in @placeholder block: "${t.expression}"`);return new t0(Mo(o,n.children,n.children),e,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function lJ(n,o){let e=null,t=null;for(let i of n.parameters)if(nJ.test(i.expression)){if(e!=null)throw new Error('@loading block can only have one "after" parameter');let r=M1(i.expression.slice(O0(i.expression)));if(r===null)throw new Error('Could not parse time value of parameter "after"');e=r}else if(OF.test(i.expression)){if(t!=null)throw new Error('@loading block can only have one "minimum" parameter');let r=M1(i.expression.slice(O0(i.expression)));if(r===null)throw new Error('Could not parse time value of parameter "minimum"');t=r}else throw new Error(`Unrecognized parameter in @loading block: "${i.expression}"`);return new n0(Mo(o,n.children,n.children),e,t,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function cJ(n,o){if(n.parameters.length>0)throw new Error("@error block cannot have parameters");return new i0(Mo(o,n.children,n.children),n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function dJ(n,o,e,t){let i={},r={},s={};for(let d of n.parameters)iJ.test(d.expression)?Xk(d,o,i,e):oJ.test(d.expression)?Yk(d,o,i,e):YZ.test(d.expression)?Xk(d,o,r,e):ZZ.test(d.expression)?Yk(d,o,r,e):JZ.test(d.expression)?Xk(d,o,s,e):eJ.test(d.expression)?Yk(d,o,s,e):tJ.test(d.expression)?$Z(d,s,e):e.push(new dn(d.sourceSpan,"Unrecognized trigger"));return s.never&&Object.keys(s).length>1&&e.push(new dn(n.startSourceSpan,"Cannot specify additional `hydrate` triggers if `hydrate never` is present")),{triggers:i,prefetchTriggers:r,hydrateTriggers:s}}var pJ=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,Y6=1,Z6=2,J6=3,eN=4,tN=5,mJ=6,Cf=7,up={BANANA_BOX:{start:"[(",end:")]"},PROPERTY:{start:"[",end:"]"},EVENT:{start:"(",end:")"}},Zk="*",uJ=new Set(["link","style","script","ng-template","ng-container","ng-content"]),gJ=new Set(["ngProjectAs","ngNonBindable"]);function hJ(n,o,e){let t=new yT(o,e),i=Mo(t,n,n),r=o.errors.concat(t.errors),s={nodes:i,errors:r,styleUrls:t.styleUrls,styles:t.styles,ngContentSelectors:t.ngContentSelectors};return e.collectCommentNodes&&(s.commentNodes=t.commentNodes),s}var yT=class{bindingParser;options;errors=[];styles=[];styleUrls=[];ngContentSelectors=[];commentNodes=[];inI18nBlock=!1;processedNodes=new Set;constructor(o,e){this.bindingParser=o,this.options=e}visitElement(o){let e=vx(o.i18n);e&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",o.sourceSpan),this.inI18nBlock=!0);let t=EF(o);if(t.type===Ws.SCRIPT)return null;if(t.type===Ws.STYLE){let S=_J(o);return S!==null&&this.styles.push(S),null}else if(t.type===Ws.STYLESHEET&&hZ(t.hrefAttr))return this.styleUrls.push(t.hrefAttr),null;let i=_U(o.name),{attributes:r,boundEvents:s,references:d,variables:m,templateVariables:u,elementHasInlineTemplate:h,parsedProperties:v,templateParsedProperties:b,i18nAttrsMeta:y}=this.prepareAttributes(o.attrs,i),x=this.extractDirectives(o),P;t.nonBindable?P=Mo(nN,o.children).flat(1/0):P=Mo(this,o.children,o.children);let k;if(t.type===Ws.NG_CONTENT){let S=t.selectAttr,T=o.attrs.map(A=>this.visitAttribute(A));k=new Ug(S,T,P,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n),this.ngContentSelectors.push(S)}else if(i){let S=this.categorizePropertyAttributes(o.name,v,y);k=new qs(o.name,r,S.bound,s,x,[],P,d,m,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n)}else{let S=this.categorizePropertyAttributes(o.name,v,y);if(o.name==="ng-container")for(let T of S.bound)T.type===Fi.Attribute&&this.reportError("Attribute bindings are not supported on ng-container. Use property bindings instead.",T.sourceSpan);k=new Bc(o.name,r,S.bound,s,x,P,d,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.isVoid,o.i18n)}return h&&(k=this.wrapInTemplate(k,b,u,y,i,e)),e&&(this.inI18nBlock=!1),k}visitAttribute(o){return new $g(o.name,o.value,o.sourceSpan,o.keySpan,o.valueSpan,o.i18n)}visitText(o){return this.processedNodes.has(o)?null:this._visitTextWithInterpolation(o.value,o.sourceSpan,o.tokens,o.i18n)}visitExpansion(o){if(!o.i18n)return null;if(!vx(o.i18n))throw new Error(`Invalid type "${o.i18n.constructor}" for "i18n" property of ${o.sourceSpan.toString()}. Expected a "Message"`);let e=o.i18n,t={},i={};return Object.keys(e.placeholders).forEach(r=>{let s=e.placeholders[r];if(r.startsWith(xU)){let d=r.trim(),m=this.bindingParser.parseInterpolationExpression(s.text,s.sourceSpan);t[d]=new jg(m,s.sourceSpan)}else i[r]=this._visitTextWithInterpolation(s.text,s.sourceSpan,null)}),new xN(t,i,o.sourceSpan,e)}visitExpansionCase(o){return null}visitComment(o){return this.options.collectCommentNodes&&this.commentNodes.push(new O1(o.value||"",o.sourceSpan)),null}visitLetDeclaration(o,e){let t=this.bindingParser.parseBinding(o.value,!1,o.valueSpan,o.valueSpan.start.offset);return t.errors.length===0&&t.ast instanceof Ea&&this.reportError("@let declaration value cannot be empty",o.valueSpan),new LT(o.name,t,o.sourceSpan,o.nameSpan,o.valueSpan)}visitComponent(o){let e=vx(o.i18n);if(e&&(this.inI18nBlock&&this.reportError("Cannot mark a component as translatable inside of a translatable section. Please remove the nested i18n marker.",o.sourceSpan),this.inI18nBlock=!0),o.tagName!==null&&uJ.has(o.tagName))return this.reportError(`Tag name "${o.tagName}" cannot be used as a component tag`,o.startSourceSpan),null;let{attributes:t,boundEvents:i,references:r,templateVariables:s,elementHasInlineTemplate:d,parsedProperties:m,templateParsedProperties:u,i18nAttrsMeta:h}=this.prepareAttributes(o.attrs,!1);this.validateSelectorlessReferences(r);let v=this.extractDirectives(o),b;o.attrs.find(P=>P.name==="ngNonBindable")?b=Mo(nN,o.children).flat(1/0):b=Mo(this,o.children,o.children);let y=this.categorizePropertyAttributes(o.tagName,m,h),x=new kf(o.componentName,o.tagName,o.fullName,t,y.bound,i,v,b,r,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n);return d&&(x=this.wrapInTemplate(x,u,s,h,!1,e)),e&&(this.inI18nBlock=!1),x}visitDirective(){return null}visitBlockParameter(){return null}visitBlock(o,e){let t=Array.isArray(e)?e.indexOf(o):-1;if(t===-1)throw new Error("Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context");if(this.processedNodes.has(o))return null;let i=null;switch(o.name){case"defer":i=rJ(o,this.findConnectedBlocks(t,e,xT),this,this.bindingParser);break;case"switch":i=AZ(o,this,this.bindingParser);break;case"for":i=IZ(o,this.findConnectedBlocks(t,e,q6),this,this.bindingParser);break;case"if":i=DZ(o,this.findConnectedBlocks(t,e,Q6),this,this.bindingParser);break;default:let r;xT(o.name)?(r=`@${o.name} block can only be used after an @defer block.`,this.processedNodes.add(o)):q6(o.name)?(r=`@${o.name} block can only be used after an @for block.`,this.processedNodes.add(o)):Q6(o.name)?(r=`@${o.name} block can only be used after an @if or @else if block.`,this.processedNodes.add(o)):r=`Unrecognized block @${o.name}.`,i={node:new Qx(o.name,o.sourceSpan,o.nameSpan),errors:[new dn(o.sourceSpan,r)]};break}return this.errors.push(...i.errors),i.node}findConnectedBlocks(o,e,t){let i=[];for(let r=o+1;r{let d=t[s.name];if(s.isLiteral)r.push(new $g(s.name,s.expression.source||"",s.sourceSpan,s.keySpan,s.valueSpan,d));else{let m=s.name.toLowerCase().startsWith("attr.on"),u=this.bindingParser.createBoundElementProperty(o,s,!m,!1);i.push(CP.fromBoundElementProperty(u,d))}}),{bound:i,literal:r}}prepareAttributes(o,e){let t=[],i=[],r=[],s=[],d=[],m={},u=[],h=[],v=!1;for(let b of o){let y=!1,x=iN(b.name),P=!1;if(b.i18n&&(m[b.name]=b.i18n),x.startsWith(Zk)){v&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",b.sourceSpan),P=!0,v=!0;let k=b.value,S=x.substring(Zk.length),T=[],A=b.valueSpan?b.valueSpan.fullStart.offset:b.sourceSpan.fullStart.offset+b.name.length;this.bindingParser.parseInlineTemplateBinding(S,k,b.sourceSpan,A,[],u,T,!0),h.push(...T.map(D=>new wp(D.name,D.value,D.sourceSpan,D.keySpan,D.valueSpan)))}else y=this.parseAttribute(e,b,[],t,i,r,s);!y&&!P&&d.push(this.visitAttribute(b))}return{attributes:d,boundEvents:i,references:s,variables:r,templateVariables:h,elementHasInlineTemplate:v,parsedProperties:t,templateParsedProperties:u,i18nAttrsMeta:m}}parseAttribute(o,e,t,i,r,s,d){let m=iN(e.name),u=e.value,h=e.sourceSpan,v=e.valueSpan?e.valueSpan.fullStart.offset:h.fullStart.offset;function b(S,T,A){let D=e.name.length-m.length,F=S.start.moveBy(T.length+D),I=F.moveBy(A.length);return new On(F,I,F,A)}let y=m.match(pJ);if(y){if(y[Y6]!=null){let S=y[Cf],T=b(h,y[Y6],S);this.bindingParser.parsePropertyBinding(S,u,!1,!1,h,v,e.valueSpan,t,i,T)}else if(y[Z6])if(o){let S=y[Cf],T=b(h,y[Z6],S);this.parseVariable(S,u,h,T,e.valueSpan,s)}else this.reportError('"let-" is only supported on ng-template elements.',h);else if(y[J6]){let S=y[Cf],T=b(h,y[J6],S);this.parseReference(S,u,h,T,e.valueSpan,d)}else if(y[eN]){let S=[],T=y[Cf],A=b(h,y[eN],T);this.bindingParser.parseEvent(T,u,!1,h,e.valueSpan||h,t,S,A),Jk(S,r)}else if(y[tN]){let S=y[Cf],T=b(h,y[tN],S);this.bindingParser.parsePropertyBinding(S,u,!1,!0,h,v,e.valueSpan,t,i,T),this.parseAssignmentEvent(S,u,h,e.valueSpan,t,r,T,v)}else if(y[mJ]){let S=b(h,"",m);this.bindingParser.parseLiteralAttr(m,u,h,v,e.valueSpan,t,i,S)}return!0}let x=null;if(m.startsWith(up.BANANA_BOX.start)?x=up.BANANA_BOX:m.startsWith(up.PROPERTY.start)?x=up.PROPERTY:m.startsWith(up.EVENT.start)&&(x=up.EVENT),x!==null&&m.endsWith(x.end)&&m.length>x.start.length+x.end.length){let S=m.substring(x.start.length,m.length-x.end.length),T=b(h,x.start,S);if(x.start===up.BANANA_BOX.start)this.bindingParser.parsePropertyBinding(S,u,!1,!0,h,v,e.valueSpan,t,i,T),this.parseAssignmentEvent(S,u,h,e.valueSpan,t,r,T,v);else if(x.start===up.PROPERTY.start)this.bindingParser.parsePropertyBinding(S,u,!1,!1,h,v,e.valueSpan,t,i,T);else{let A=[];this.bindingParser.parseEvent(S,u,!1,h,e.valueSpan||h,t,A,T),Jk(A,r)}return!0}let P=b(h,"",m);return this.bindingParser.parsePropertyInterpolation(m,u,h,e.valueSpan,t,i,P,e.valueTokens??null)}extractDirectives(o){let e=o instanceof Qa?o.tagName:o.name,t=[],i=new Set;for(let r of o.directives){let s=!1;for(let y of r.attrs)y.name.startsWith(Zk)?(s=!0,this.reportError(`Shorthand template syntax "${y.name}" is not supported inside a directive context`,y.sourceSpan)):gJ.has(y.name)&&(s=!0,this.reportError(`Attribute "${y.name}" is not supported in a directive context`,y.sourceSpan));if(!s&&i.has(r.name)&&(s=!0,this.reportError(`Cannot apply directive "${r.name}" multiple times on the same element`,r.sourceSpan)),s)continue;let{attributes:d,parsedProperties:m,boundEvents:u,references:h,i18nAttrsMeta:v}=this.prepareAttributes(r.attrs,!1);this.validateSelectorlessReferences(h);let{bound:b}=this.categorizePropertyAttributes(e,m,v);for(let y of b)y.type!==Fi.Property&&y.type!==Fi.TwoWay&&(s=!0,this.reportError("Binding is not supported in a directive context",y.sourceSpan));s||(i.add(r.name),t.push(new vN(r.name,d,b,u,h,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,void 0)))}return t}filterAnimationAttributes(o){return o.filter(e=>!e.name.startsWith("animate."))}filterAnimationInputs(o){return o.filter(e=>e.type!==Fi.Animation)}wrapInTemplate(o,e,t,i,r,s){let d=this.categorizePropertyAttributes("ng-template",e,i),m=[];d.literal.forEach(b=>m.push(b)),d.bound.forEach(b=>m.push(b));let u={attributes:[],inputs:[],outputs:[]};(o instanceof Bc||o instanceof kf)&&(u.attributes.push(...this.filterAnimationAttributes(o.attributes)),u.inputs.push(...this.filterAnimationInputs(o.inputs)),u.outputs.push(...o.outputs));let h=r&&s?void 0:o.i18n,v;return o instanceof kf?v=o.tagName:o instanceof qs?v=null:v=o.name,new qs(v,u.attributes,u.inputs,u.outputs,[],m,[o],[],t,!1,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,h)}_visitTextWithInterpolation(o,e,t,i){let r=sF(o),s=this.bindingParser.parseInterpolation(r,e,t);return s?new jg(s,e,i):new Um(r,e)}parseVariable(o,e,t,i,r,s){o.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',t):o.length===0&&this.reportError("Variable does not have a name",t),s.push(new wp(o,e,t,i,r))}parseReference(o,e,t,i,r,s){o.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',t):o.length===0?this.reportError("Reference does not have a name",t):s.some(d=>d.name===o)&&this.reportError(`Reference "#${o}" is defined more than once`,t),s.push(new a0(o,e,t,i,r))}parseAssignmentEvent(o,e,t,i,r,s,d,m){let u=[];this.bindingParser.parseEvent(`${o}Change`,e,!0,t,i||t,r,u,d),Jk(u,s)}validateSelectorlessReferences(o){if(o.length===0)return;let e=new Set;for(let t of o)t.value.length>0?this.reportError("Cannot specify a value for a local reference in this context",t.valueSpan||t.sourceSpan):e.has(t.name)?this.reportError("Duplicate reference names are not allowed",t.sourceSpan):e.add(t.name)}reportError(o,e,t=Cp.ERROR){this.errors.push(new dn(e,o,t))}},bT=class{visitElement(o){let e=EF(o);if(e.type===Ws.SCRIPT||e.type===Ws.STYLE||e.type===Ws.STYLESHEET)return null;let t=Mo(this,o.children,null);return new Bc(o.name,Mo(this,o.attrs),[],[],[],t,[],o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.isVoid)}visitComment(o){return null}visitAttribute(o){return new $g(o.name,o.value,o.sourceSpan,o.keySpan,o.valueSpan,o.i18n)}visitText(o){return new Um(o.value,o.sourceSpan)}visitExpansion(o){return null}visitExpansionCase(o){return null}visitBlock(o,e){let t=[new Um(o.startSourceSpan.toString(),o.startSourceSpan),...Mo(this,o.children)];return o.endSourceSpan!==null&&t.push(new Um(o.endSourceSpan.toString(),o.endSourceSpan)),t}visitBlockParameter(o,e){return null}visitLetDeclaration(o,e){return new Um(`@let ${o.name} = ${o.value};`,o.sourceSpan)}visitComponent(o,e){let t=Mo(this,o.children,null);return new Bc(o.fullName,Mo(this,o.attrs),[],[],[],t,[],o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,!1)}visitDirective(o,e){return null}},nN=new bT;function iN(n){return/^data-/i.test(n)?n.substring(5):n}function Jk(n,o){o.push(...n.map(e=>vP.fromParsedEvent(e)))}function _J(n){return n.children.length!==1||!(n.children[0]instanceof uu)?null:n.children[0].value}var fJ=[" ",` `,"\r"," "];function CJ(n,o,e={}){let{preserveWhitespaces:t,enableI18nLegacyMessageIdFormat:i}=e,r=e.enableSelectorless??!1,s=S1(r),m=new hT().parse(n,o,Le(q({leadingTriviaChars:fJ},e),{tokenizeExpansionForms:!0,tokenizeBlocks:e.enableBlockSyntax??!0,tokenizeLet:e.enableLetSyntax??!0,selectorlessEnabled:r}));if(!e.alwaysAttemptHtmlToR3AstConversion&&m.errors&&m.errors.length>0){let D={preserveWhitespaces:t,errors:m.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}let u=m.rootNodes,h=!(e.preserveSignificantWhitespace??!0),v=new v1(!t,i,e.preserveSignificantWhitespace,h),b=v.visitAllWithErrors(u);if(!e.alwaysAttemptHtmlToR3AstConversion&&b.errors&&b.errors.length>0){let D={preserveWhitespaces:t,errors:b.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}u=b.rootNodes,t||(u=Mo(new f1(!0,void 0,!1),u),v.hasI18nMeta&&(u=Mo(new v1(!1,void 0,!0,h),u)));let{nodes:y,errors:x,styleUrls:P,styles:k,ngContentSelectors:S,commentNodes:T}=hJ(u,s,{collectCommentNodes:!!e.collectCommentNodes});x.push(...m.errors,...b.errors);let A={preserveWhitespaces:t,errors:x.length>0?x:null,nodes:y,styleUrls:P,styles:k,ngContentSelectors:S};return e.collectCommentNodes&&(A.commentNodes=T),A}var vJ=new Yg;function S1(n=!1){return new mT(new C1(new k0,n),vJ,[])}var DF="%COMP%",xJ=`_nghost-${DF}`,yJ=`_ngcontent-${DF}`;function IF(n,o,e){let t=new kp,i=AT(n.selector);return t.set("type",n.type.value),i.length>0&&t.set("selectors",kg(i)),n.queries.length>0&&t.set("contentQueries",gZ(n.queries,o,n.name)),n.viewQueries.length&&t.set("viewQuery",uZ(n.viewQueries,o,n.name)),t.set("hostBindings",EJ(n.host,n.typeSourceSpan,e,o,n.selector||"",n.name,t)),t.set("inputs",I5(n.inputs,!0)),t.set("outputs",I5(n.outputs)),n.exportAs!==null&&t.set("exportAs",Ji(n.exportAs.map(r=>Oe(r)))),n.isStandalone===!1&&t.set("standalone",Oe(!1)),n.isSignal&&t.set("signals",Oe(!0)),t}function AF(n,o){let e=[],t=o.providers,i=o.viewProviders;if(t||i){let r=[t||new zc([])];i&&r.push(i),e.push(Vt(ge.ProvidersFeature).callFn(r))}if(o.hostDirectives?.length&&e.push(Vt(ge.HostDirectivesFeature).callFn([NJ(o.hostDirectives)])),o.usesInheritance&&e.push(Vt(ge.InheritDefinitionFeature)),o.lifecycle.usesOnChanges&&e.push(Vt(ge.NgOnChangesFeature)),o.controlCreate!==null&&e.push(Vt(ge.ControlFeature).callFn([Oe(o.controlCreate.passThroughInput)])),"externalStyles"in o&&o.externalStyles?.length){let r=o.externalStyles.map(s=>Oe(s));e.push(Vt(ge.ExternalStylesFeature).callFn([Ji(r)]))}e.length&&n.set("features",Ji(e))}function bJ(n,o,e){let t=IF(n,o,e);AF(t,n);let i=Vt(ge.defineDirective).callFn([t.toLiteralMap()],void 0,!0),r=TJ(n);return{expression:i,type:r,statements:[]}}function wJ(n,o,e){let t=IF(n,o,e);AF(t,n);let i=n.selector&&Ag.parse(n.selector),r=i&&i[0];if(r){let x=r.getAttrs();x.length&&t.set("attrs",o.getConstLiteral(Ji(x.map(P=>P!=null?Oe(P):Oe(void 0))),!0))}let s=n.name,d=null;if(n.defer.mode===1&&n.defer.dependenciesFn!==null){let x=`${s}_DeferFn`;o.statements.push(new Ur(x,n.defer.dependenciesFn,void 0,ua.Final)),d=si(x)}let m=n.isStandalone&&!n.hasDirectiveDependencies?hs.DomOnly:hs.Full,u=$Y(n.name,n.template.nodes,o,m,n.relativeContextFilePath,n.i18nUseExternalIds,n.defer,d,n.relativeTemplatePath,dZ());vF(u,Et.Tmpl);let h=NY(u,o);if(u.contentSelectors!==null&&t.set("ngContentSelectors",u.contentSelectors),t.set("decls",Oe(u.root.decls)),t.set("vars",Oe(u.root.vars)),u.consts.length>0&&(u.constsInitializers.length>0?t.set("consts",Xs([],[...u.constsInitializers,new Or(Ji(u.consts))])):t.set("consts",Ji(u.consts))),t.set("template",h),n.declarationListEmitMode!==3&&n.declarations.length>0)t.set("dependencies",SJ(Ji(n.declarations.map(x=>x.type)),n.declarationListEmitMode));else if(n.declarationListEmitMode===3){let x=[n.type.value];n.rawImports&&x.push(n.rawImports),t.set("dependencies",Vt(ge.getComponentDepsFactory).callFn(x))}n.encapsulation===null&&(n.encapsulation=zm.Emulated);let v=!!n.externalStyles?.length;if(n.styles&&n.styles.length){let P=(n.encapsulation==zm.Emulated?AJ(n.styles,yJ,xJ):n.styles).reduce((k,S)=>(S.trim().length>0&&k.push(o.getConstLiteral(Oe(S))),k),[]);P.length>0&&(v=!0,t.set("styles",Ji(P)))}!v&&n.encapsulation===zm.Emulated&&(n.encapsulation=zm.None),n.encapsulation!==zm.Emulated&&t.set("encapsulation",Oe(n.encapsulation)),n.animations!==null&&t.set("data",yl([{key:"animation",value:n.animations,quoted:!1}])),n.changeDetection!==null&&(typeof n.changeDetection=="number"&&n.changeDetection!==IT.Default?t.set("changeDetection",Oe(n.changeDetection)):typeof n.changeDetection=="object"&&t.set("changeDetection",n.changeDetection));let b=Vt(ge.defineComponent).callFn([t.toLiteralMap()],void 0,!0),y=MJ(n);return{expression:b,type:y,statements:[]}}function MJ(n){let o=NF(n);return o.push(MT(n.template.ngContentSelectors)),o.push(ga(Oe(n.isStandalone))),o.push(FF(n)),n.isSignal&&o.push(ga(Oe(n.isSignal))),ga(Vt(ge.ComponentDeclaration,o))}function SJ(n,o){switch(o){case 0:return n;case 1:return Xs([],n);case 2:let e=n.prop("map").callFn([Vt(ge.resolveForwardRef)]);return Xs([],e);case 3:throw new Error("Unsupported with an array of pre-resolved dependencies")}}function kJ(n){return ga(Oe(n))}function wT(n){let o=Object.keys(n).map(e=>{let t=Array.isArray(n[e])?n[e][0]:n[e];return{key:e,value:Oe(t),quoted:!0}});return yl(o)}function MT(n){return n.length>0?ga(Ji(n.map(o=>Oe(o)))):Rc}function NF(n){let o=n.selector!==null?n.selector.replace(/\n/g,""):null;return[E1(n.type.type,n.typeArgumentCount),o!==null?kJ(o):Rc,n.exportAs!==null?MT(n.exportAs):Rc,ga(PJ(n)),ga(wT(n.outputs)),MT(n.queries.map(e=>e.propertyName))]}function PJ(n){return yl(Object.keys(n.inputs).map(o=>{let e=n.inputs[o],t=[{key:"alias",value:Oe(e.bindingPropertyName),quoted:!0},{key:"required",value:Oe(e.required),quoted:!0}];return e.isSignal&&t.push({key:"isSignal",value:Oe(e.isSignal),quoted:!0}),{key:o,value:yl(t),quoted:!0}}))}function TJ(n){let o=NF(n);return o.push(Rc),o.push(ga(Oe(n.isStandalone))),o.push(FF(n)),n.isSignal&&o.push(ga(Oe(n.isSignal))),ga(Vt(ge.DirectiveDeclaration,o))}function EJ(n,o,e,t,i,r,s){let d=e.createBoundHostProperties(n.properties,o),m=e.createDirectiveHostEventAsts(n.listeners,o);n.specialAttributes.styleAttr&&(n.attributes.style=Oe(n.specialAttributes.styleAttr)),n.specialAttributes.classAttr&&(n.attributes.class=Oe(n.specialAttributes.classAttr));let u=HY({componentName:r,componentSelector:i,properties:d,events:m,attributes:n.attributes},e,t);vF(u,Et.Host),s.set("hostAttrs",u.root.attributes);let h=u.root.vars;return h!==null&&h>0&&s.set("hostVars",Oe(h)),FY(u)}function OJ(n){let o={},e={},t={},i={};for(let r of Object.keys(n)){let s=n[r];if(r.startsWith("(")&&r.endsWith(")")){if(typeof s!="string")throw new Error("Event binding must be string");e[r.slice(1,-1)]=s}else if(r.startsWith("[")&&r.endsWith("]")){if(typeof s!="string")throw new Error("Property binding must be string");t[r.slice(1,-1)]=s}else switch(r){case"class":if(typeof s!="string")throw new Error("Class binding must be string");i.classAttr=s;break;case"style":if(typeof s!="string")throw new Error("Style binding must be string");i.styleAttr=s;break;default:typeof s=="string"?o[r]=Oe(s):o[r]=s}}return{attributes:o,listeners:e,properties:t,specialAttributes:i}}function DJ(n,o){let e=S1();return e.createDirectiveHostEventAsts(n.listeners,o),e.createBoundHostProperties(n.properties,o),IJ(n,e,o),e.errors}function IJ(n,o,e){for(let t in n.properties){let i=t.startsWith("attr."),r=i?t.slice(5):t;if(r.toLowerCase().startsWith("on")){let s=i?"attribute":"property",d=`(${r.slice(2)})=...`,m=`Binding to event ${s} '${r}' is disallowed for security reasons, please use ${d}`;i||(m+=` If '${t}' is a directive input, make sure the directive is imported by the current module.`),o.errors.push(new dn(e,m))}}}function AJ(n,o,e){let t=new NP;return n.map(i=>t.shimCssText(i,o,e))}function FF(n){return n.hostDirectives?.length?ga(Ji(n.hostDirectives.map(o=>yl([{key:"directive",value:D0(o.directive.type),quoted:!1},{key:"inputs",value:wT(o.inputs||{}),quoted:!1},{key:"outputs",value:wT(o.outputs||{}),quoted:!1}])))):Rc}function NJ(n){let o=[],e=!1;for(let t of n){if(!t.inputs&&!t.outputs)o.push(t.directive.type);else{let i=[{key:"directive",value:t.directive.type,quoted:!1}];if(t.inputs){let r=oN(t.inputs);r&&i.push({key:"inputs",value:r,quoted:!1})}if(t.outputs){let r=oN(t.outputs);r&&i.push({key:"outputs",value:r,quoted:!1})}o.push(yl(i))}t.isForwardReference&&(e=!0)}return e?new xp([],[new Or(Ji(o))]):Ji(o)}function oN(n){let o=[];for(let e in n)n.hasOwnProperty(e)&&o.push(Oe(e),Oe(n[e]));return o.length>0?Ji(o):null}var ST=class extends Bg{visit(o){o instanceof Cs?this.visit(o.ast):o.visit(this)}visitElement(o){this.visitAllTemplateNodes(o.attributes),this.visitAllTemplateNodes(o.inputs),this.visitAllTemplateNodes(o.outputs),this.visitAllTemplateNodes(o.directives),this.visitAllTemplateNodes(o.references),this.visitAllTemplateNodes(o.children)}visitTemplate(o){this.visitAllTemplateNodes(o.attributes),this.visitAllTemplateNodes(o.inputs),this.visitAllTemplateNodes(o.outputs),this.visitAllTemplateNodes(o.directives),this.visitAllTemplateNodes(o.templateAttrs),this.visitAllTemplateNodes(o.variables),this.visitAllTemplateNodes(o.references),this.visitAllTemplateNodes(o.children)}visitContent(o){this.visitAllTemplateNodes(o.children)}visitBoundAttribute(o){this.visit(o.value)}visitBoundEvent(o){this.visit(o.handler)}visitBoundText(o){this.visit(o.value)}visitIcu(o){Object.keys(o.vars).forEach(e=>this.visit(o.vars[e])),Object.keys(o.placeholders).forEach(e=>this.visit(o.placeholders[e]))}visitDeferredBlock(o){o.visitAll(this)}visitDeferredTrigger(o){o instanceof Hx?this.visit(o.value):o instanceof e0&&o.options!==null&&this.visit(o.options)}visitDeferredBlockPlaceholder(o){this.visitAllTemplateNodes(o.children)}visitDeferredBlockError(o){this.visitAllTemplateNodes(o.children)}visitDeferredBlockLoading(o){this.visitAllTemplateNodes(o.children)}visitSwitchBlock(o){this.visit(o.expression),this.visitAllTemplateNodes(o.groups)}visitSwitchBlockCase(o){o.expression&&this.visit(o.expression)}visitSwitchBlockCaseGroup(o){this.visitAllTemplateNodes(o.cases),this.visitAllTemplateNodes(o.children)}visitSwitchExhaustiveCheck(o){}visitForLoopBlock(o){o.item.visit(this),this.visitAllTemplateNodes(o.contextVariables),this.visit(o.expression),this.visitAllTemplateNodes(o.children),o.empty?.visit(this)}visitForLoopBlockEmpty(o){this.visitAllTemplateNodes(o.children)}visitIfBlock(o){this.visitAllTemplateNodes(o.branches)}visitIfBlockBranch(o){o.expression&&this.visit(o.expression),o.expressionAlias?.visit(this),this.visitAllTemplateNodes(o.children)}visitLetDeclaration(o){this.visit(o.value)}visitComponent(o){this.visitAllTemplateNodes(o.attributes),this.visitAllTemplateNodes(o.inputs),this.visitAllTemplateNodes(o.outputs),this.visitAllTemplateNodes(o.directives),this.visitAllTemplateNodes(o.references),this.visitAllTemplateNodes(o.children)}visitDirective(o){this.visitAllTemplateNodes(o.attributes),this.visitAllTemplateNodes(o.inputs),this.visitAllTemplateNodes(o.outputs),this.visitAllTemplateNodes(o.references)}visitVariable(o){}visitReference(o){}visitTextAttribute(o){}visitText(o){}visitUnknownBlock(o){}visitAllTemplateNodes(o){for(let e of o)this.visit(e)}};var kT=class{directiveMatcher;constructor(o){this.directiveMatcher=o}bind(o){if(!o.template&&!o.host)throw new Error("Empty bound targets are not supported");let e=new Map,t=[],i=new Set,r=new Map,s=new Map,d=new Map,m=new Map,u=new Map,h=new Map,v=new Set,b=new Set,y=[];if(o.template){let x=k1.apply(o.template);FJ(x,d),PT.apply(o.template,this.directiveMatcher,e,t,i,r,s),P1.applyWithScope(o.template,x,m,u,h,v,b,y)}return o.host&&(e.set(o.host.node,o.host.directives),P1.applyWithScope(o.host.node,k1.apply(o.host.node),m,u,h,v,b,y)),new TT(o,e,t,i,r,s,m,u,h,d,v,b,y)}},k1=class n{parentScope;rootNode;namedEntities=new Map;elementLikeInScope=new Set;childScopes=new Map;isDeferred;constructor(o,e){this.parentScope=o,this.rootNode=e,this.isDeferred=o!==null&&o.isDeferred?!0:e instanceof su}static newRootScope(){return new n(null,null)}static apply(o){let e=n.newRootScope();return e.ingest(o),e}ingest(o){o instanceof qs?(o.variables.forEach(e=>this.visitVariable(e)),o.children.forEach(e=>e.visit(this))):o instanceof qm?(o.expressionAlias!==null&&this.visitVariable(o.expressionAlias),o.children.forEach(e=>e.visit(this))):o instanceof Hg?(this.visitVariable(o.item),o.contextVariables.forEach(e=>this.visitVariable(e)),o.children.forEach(e=>e.visit(this))):o instanceof o0||o instanceof r0||o instanceof su||o instanceof i0||o instanceof t0||o instanceof n0||o instanceof Ug?o.children.forEach(e=>e.visit(this)):o instanceof s0||o.forEach(e=>e.visit(this))}visitElement(o){this.visitElementLike(o)}visitTemplate(o){o.directives.forEach(e=>e.visit(this)),o.references.forEach(e=>this.visitReference(e)),this.ingestScopedNode(o)}visitVariable(o){this.maybeDeclare(o)}visitReference(o){this.maybeDeclare(o)}visitDeferredBlock(o){this.ingestScopedNode(o),o.placeholder?.visit(this),o.loading?.visit(this),o.error?.visit(this)}visitDeferredBlockPlaceholder(o){this.ingestScopedNode(o)}visitDeferredBlockError(o){this.ingestScopedNode(o)}visitDeferredBlockLoading(o){this.ingestScopedNode(o)}visitSwitchBlock(o){o.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(o){}visitSwitchBlockCaseGroup(o){this.ingestScopedNode(o)}visitSwitchExhaustiveCheck(o){}visitForLoopBlock(o){this.ingestScopedNode(o),o.empty?.visit(this)}visitForLoopBlockEmpty(o){this.ingestScopedNode(o)}visitIfBlock(o){o.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(o){this.ingestScopedNode(o)}visitContent(o){this.ingestScopedNode(o)}visitLetDeclaration(o){this.maybeDeclare(o)}visitComponent(o){this.visitElementLike(o)}visitDirective(o){o.references.forEach(e=>this.visitReference(e))}visitBoundAttribute(o){}visitBoundEvent(o){}visitBoundText(o){}visitText(o){}visitTextAttribute(o){}visitIcu(o){}visitDeferredTrigger(o){}visitUnknownBlock(o){}visitElementLike(o){o.directives.forEach(e=>e.visit(this)),o.references.forEach(e=>this.visitReference(e)),o.children.forEach(e=>e.visit(this)),this.elementLikeInScope.add(o)}maybeDeclare(o){this.namedEntities.has(o.name)||this.namedEntities.set(o.name,o)}lookup(o){return this.namedEntities.has(o)?this.namedEntities.get(o):this.parentScope!==null?this.parentScope.lookup(o):null}getChildScope(o){let e=this.childScopes.get(o);if(e===void 0)throw new Error(`Assertion error: child scope for ${o} not found`);return e}ingestScopedNode(o){let e=new n(this,o);e.ingest(o),this.childScopes.set(o,e)}},PT=class n{directiveMatcher;directives;eagerDirectives;missingDirectives;bindings;references;isInDeferBlock=!1;constructor(o,e,t,i,r,s){this.directiveMatcher=o,this.directives=e,this.eagerDirectives=t,this.missingDirectives=i,this.bindings=r,this.references=s}static apply(o,e,t,i,r,s,d){new n(e,t,i,r,s,d).ingest(o)}ingest(o){o.forEach(e=>e.visit(this))}visitElement(o){this.visitElementOrTemplate(o)}visitTemplate(o){this.visitElementOrTemplate(o)}visitDeferredBlock(o){let e=this.isInDeferBlock;this.isInDeferBlock=!0,o.children.forEach(t=>t.visit(this)),this.isInDeferBlock=e,o.placeholder?.visit(this),o.loading?.visit(this),o.error?.visit(this)}visitDeferredBlockPlaceholder(o){o.children.forEach(e=>e.visit(this))}visitDeferredBlockError(o){o.children.forEach(e=>e.visit(this))}visitDeferredBlockLoading(o){o.children.forEach(e=>e.visit(this))}visitSwitchBlock(o){o.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(o){}visitSwitchBlockCaseGroup(o){o.children.forEach(e=>e.visit(this))}visitSwitchExhaustiveCheck(o){}visitForLoopBlock(o){o.item.visit(this),o.contextVariables.forEach(e=>e.visit(this)),o.children.forEach(e=>e.visit(this)),o.empty?.visit(this)}visitForLoopBlockEmpty(o){o.children.forEach(e=>e.visit(this))}visitIfBlock(o){o.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(o){o.expressionAlias?.visit(this),o.children.forEach(e=>e.visit(this))}visitContent(o){o.children.forEach(e=>e.visit(this))}visitComponent(o){if(this.directiveMatcher instanceof yx){let e=this.directiveMatcher.match(o.componentName);e.length>0?this.trackSelectorlessMatchesAndDirectives(o,e):this.missingDirectives.add(o.componentName)}o.directives.forEach(e=>e.visit(this)),o.children.forEach(e=>e.visit(this))}visitDirective(o){if(this.directiveMatcher instanceof yx){let e=this.directiveMatcher.match(o.name);e.length>0?this.trackSelectorlessMatchesAndDirectives(o,e):this.missingDirectives.add(o.name)}}visitElementOrTemplate(o){if(this.directiveMatcher instanceof xx){let e=[],t=wU(o);this.directiveMatcher.match(t,(i,r)=>e.push(...r)),this.trackSelectorBasedBindingsAndDirectives(o,e)}else o.references.forEach(e=>{e.value.trim()===""&&this.references.set(e,o)});o.directives.forEach(e=>e.visit(this)),o.children.forEach(e=>e.visit(this))}trackMatchedDirectives(o,e){e.length>0&&(this.directives.set(o,e),this.isInDeferBlock||this.eagerDirectives.push(...e))}trackSelectorlessMatchesAndDirectives(o,e){if(e.length===0)return;this.trackMatchedDirectives(o,e);let t=(i,r,s)=>{i[s].hasBindingPropertyName(r.name)&&this.bindings.set(r,i)};for(let i of e)o.inputs.forEach(r=>t(i,r,"inputs")),o.attributes.forEach(r=>t(i,r,"inputs")),o.outputs.forEach(r=>t(i,r,"outputs"));o.references.forEach(i=>this.references.set(i,{directive:e[0],node:o}))}trackSelectorBasedBindingsAndDirectives(o,e){this.trackMatchedDirectives(o,e),o.references.forEach(i=>{let r=null;if(i.value.trim()==="")r=e.find(s=>s.isComponent)||null;else if(r=e.find(s=>s.exportAs!==null&&s.exportAs.some(d=>d===i.value))||null,r===null)return;r!==null?this.references.set(i,{directive:r,node:o}):this.references.set(i,o)});let t=(i,r)=>{let s=e.find(m=>m[r].hasBindingPropertyName(i.name)),d=s!==void 0?s:o;this.bindings.set(i,d)};o.inputs.forEach(i=>t(i,"inputs")),o.attributes.forEach(i=>t(i,"inputs")),o instanceof qs&&o.templateAttrs.forEach(i=>t(i,"inputs")),o.outputs.forEach(i=>t(i,"outputs"))}visitVariable(o){}visitReference(o){}visitTextAttribute(o){}visitBoundAttribute(o){}visitBoundEvent(o){}visitBoundAttributeOrEvent(o){}visitText(o){}visitBoundText(o){}visitIcu(o){}visitDeferredTrigger(o){}visitUnknownBlock(o){}visitLetDeclaration(o){}},P1=class n extends ST{bindings;symbols;usedPipes;eagerPipes;deferBlocks;nestingLevel;scope;rootNode;level;visitNode=o=>o.visit(this);constructor(o,e,t,i,r,s,d,m,u){super(),this.bindings=o,this.symbols=e,this.usedPipes=t,this.eagerPipes=i,this.deferBlocks=r,this.nestingLevel=s,this.scope=d,this.rootNode=m,this.level=u}static applyWithScope(o,e,t,i,r,s,d,m){let u=o instanceof qs?o:null;new n(t,i,s,d,m,r,e,u,0).ingest(o)}ingest(o){if(o instanceof qs)o.variables.forEach(this.visitNode),o.children.forEach(this.visitNode),this.nestingLevel.set(o,this.level);else if(o instanceof qm)o.expressionAlias!==null&&this.visitNode(o.expressionAlias),o.children.forEach(this.visitNode),this.nestingLevel.set(o,this.level);else if(o instanceof Hg)this.visitNode(o.item),o.contextVariables.forEach(e=>this.visitNode(e)),o.trackBy.visit(this),o.children.forEach(this.visitNode),this.nestingLevel.set(o,this.level);else if(o instanceof su){if(this.scope.rootNode!==o)throw new Error(`Assertion error: resolved incorrect scope for deferred block ${o}`);this.deferBlocks.push([o,this.scope]),o.children.forEach(e=>e.visit(this)),this.nestingLevel.set(o,this.level)}else o instanceof o0||o instanceof r0||o instanceof i0||o instanceof t0||o instanceof n0||o instanceof Ug?(o.children.forEach(e=>e.visit(this)),this.nestingLevel.set(o,this.level)):o instanceof s0?this.nestingLevel.set(o,0):o.forEach(this.visitNode)}visitTemplate(o){o.inputs.forEach(this.visitNode),o.outputs.forEach(this.visitNode),o.directives.forEach(this.visitNode),o.templateAttrs.forEach(this.visitNode),o.references.forEach(this.visitNode),this.ingestScopedNode(o)}visitVariable(o){this.rootNode!==null&&this.symbols.set(o,this.rootNode)}visitReference(o){this.rootNode!==null&&this.symbols.set(o,this.rootNode)}visitDeferredBlock(o){this.ingestScopedNode(o),o.triggers.when?.value.visit(this),o.prefetchTriggers.when?.value.visit(this),o.hydrateTriggers.when?.value.visit(this),o.hydrateTriggers.never?.visit(this),o.placeholder&&this.visitNode(o.placeholder),o.loading&&this.visitNode(o.loading),o.error&&this.visitNode(o.error)}visitDeferredBlockPlaceholder(o){this.ingestScopedNode(o)}visitDeferredBlockError(o){this.ingestScopedNode(o)}visitDeferredBlockLoading(o){this.ingestScopedNode(o)}visitSwitchBlockCase(o){o.expression?.visit(this)}visitSwitchBlockCaseGroup(o){o.cases.forEach(e=>e.visit(this)),this.ingestScopedNode(o)}visitSwitchExhaustiveCheck(o){}visitForLoopBlock(o){o.expression.visit(this),this.ingestScopedNode(o),o.empty?.visit(this)}visitForLoopBlockEmpty(o){this.ingestScopedNode(o)}visitIfBlockBranch(o){o.expression?.visit(this),this.ingestScopedNode(o)}visitContent(o){this.ingestScopedNode(o)}visitLetDeclaration(o){super.visitLetDeclaration(o),this.rootNode!==null&&this.symbols.set(o,this.rootNode)}visitPipe(o,e){return this.usedPipes.add(o.name),this.scope.isDeferred||this.eagerPipes.add(o.name),super.visitPipe(o,e)}visitPropertyRead(o,e){return this.maybeMap(o,o.name),super.visitPropertyRead(o,e)}visitSafePropertyRead(o,e){return this.maybeMap(o,o.name),super.visitSafePropertyRead(o,e)}ingestScopedNode(o){let e=this.scope.getChildScope(o);new n(this.bindings,this.symbols,this.usedPipes,this.eagerPipes,this.deferBlocks,this.nestingLevel,e,o,this.level+1).ingest(o)}maybeMap(o,e){if(!(o.receiver instanceof Vc))return;let t=this.scope.lookup(e);t!==null&&this.bindings.set(o,t)}},TT=class{target;directives;eagerDirectives;missingDirectives;bindings;references;exprTargets;symbols;nestingLevel;scopedNodeEntities;usedPipes;eagerPipes;deferredBlocks;deferredScopes;constructor(o,e,t,i,r,s,d,m,u,h,v,b,y){this.target=o,this.directives=e,this.eagerDirectives=t,this.missingDirectives=i,this.bindings=r,this.references=s,this.exprTargets=d,this.symbols=m,this.nestingLevel=u,this.scopedNodeEntities=h,this.usedPipes=v,this.eagerPipes=b,this.deferredBlocks=y.map(x=>x[0]),this.deferredScopes=new Map(y)}getEntitiesInScope(o){return this.scopedNodeEntities.get(o)??new Set}getDirectivesOfNode(o){return this.directives.get(o)||null}getReferenceTarget(o){return this.references.get(o)||null}getConsumerOfBinding(o){return this.bindings.get(o)||null}getExpressionTarget(o){return this.exprTargets.get(o)||null}getDefinitionNodeOfSymbol(o){return this.symbols.get(o)||null}getNestingLevel(o){return this.nestingLevel.get(o)||0}getUsedDirectives(){let o=new Set;return this.directives.forEach(e=>e.forEach(t=>o.add(t))),Array.from(o.values())}getEagerlyUsedDirectives(){let o=new Set(this.eagerDirectives);return Array.from(o.values())}getUsedPipes(){return Array.from(this.usedPipes)}getEagerlyUsedPipes(){return Array.from(this.eagerPipes)}getDeferBlocks(){return this.deferredBlocks}getDeferredTriggerTarget(o,e){if(!(e instanceof Wx)&&!(e instanceof e0)&&!(e instanceof Ux))return null;let t=e.reference;if(t===null){let r=null;if(o.placeholder!==null){for(let s of o.placeholder.children)if(!(s instanceof O1)){if(r!==null)return null;s instanceof Bc&&(r=s)}}return r}let i=this.findEntityInScope(o,t);if(i instanceof a0&&this.getDefinitionNodeOfSymbol(i)!==o){let r=this.getReferenceTarget(i);if(r!==null)return this.referenceTargetToElement(r)}if(o.placeholder!==null){let r=this.findEntityInScope(o.placeholder,t),s=r instanceof a0?this.getReferenceTarget(r):null;if(s!==null)return this.referenceTargetToElement(s)}return null}isDeferred(o){for(let e of this.deferredBlocks){if(!this.deferredScopes.has(e))continue;let t=[this.deferredScopes.get(e)];for(;t.length>0;){let i=t.pop();if(i.elementLikeInScope.has(o))return!0;t.push(...i.childScopes.values())}}return!1}referencedDirectiveExists(o){return!this.missingDirectives.has(o)}findEntityInScope(o,e){let t=this.getEntitiesInScope(o);for(let i of t)if(i.name===e)return i;return null}referenceTargetToElement(o){return o instanceof Bc?o:o instanceof qs||o.node instanceof kf||o.node instanceof vN||o.node instanceof s0?null:this.referenceTargetToElement(o.node)}};function FJ(n,o){let e=new Map;function t(r){if(e.has(r.rootNode))return e.get(r.rootNode);let s=r.namedEntities,d;return r.parentScope!==null?d=new Map([...t(r.parentScope),...s]):d=new Map(s),e.set(r.rootNode,d),d}let i=[n];for(;i.length>0;){let r=i.pop();for(let s of r.childScopes.values())i.push(s);t(r)}for(let[r,s]of e)o.set(r,new Set(s.values()))}var ET=class{},OT=class{jitEvaluator;FactoryTarget=kd;ResourceLoader=ET;elementSchemaRegistry=new Yg;constructor(o=new DP){this.jitEvaluator=o}compilePipe(o,e,t){let i={name:t.name,type:$r(t.type),typeArgumentCount:0,pipeName:t.pipeName,pure:t.pure,isStandalone:t.isStandalone},r=H5(i);return this.jitExpression(r.expression,o,e,[])}compilePipeDeclaration(o,e,t){let i=ZJ(t),r=H5(i);return this.jitExpression(r.expression,o,e,[])}compileInjectable(o,e,t){let{expression:i,statements:r}=A5({name:t.name,type:$r(t.type),typeArgumentCount:t.typeArgumentCount,providedIn:dN(t.providedIn),useClass:bg(t,"useClass"),useFactory:cN(t,"useFactory"),useValue:bg(t,"useValue"),useExisting:bg(t,"useExisting"),deps:t.deps?.map(VF)},!0);return this.jitExpression(i,o,e,r)}compileInjectableDeclaration(o,e,t){let{expression:i,statements:r}=A5({name:t.type.name,type:$r(t.type),typeArgumentCount:0,providedIn:dN(t.providedIn),useClass:bg(t,"useClass"),useFactory:cN(t,"useFactory"),useValue:bg(t,"useValue"),useExisting:bg(t,"useExisting"),deps:t.deps?.map(pN)},!0);return this.jitExpression(i,o,e,r)}compileInjector(o,e,t){let i={type:$r(t.type),providers:t.providers&&t.providers.length>0?new hi(t.providers):null,imports:t.imports.map(s=>new hi(s))},r=$5(i);return this.jitExpression(r.expression,o,e,[])}compileInjectorDeclaration(o,e,t){let i=JJ(t),r=$5(i);return this.jitExpression(r.expression,o,e,[])}compileNgModule(o,e,t){let i={kind:vp.Global,type:$r(t.type),bootstrap:t.bootstrap.map($r),declarations:t.declarations.map($r),publicDeclarationTypes:null,imports:t.imports.map($r),includeImportTypes:!0,exports:t.exports.map($r),selectorScopeMode:e1.Inline,containsForwardDecls:!1,schemas:t.schemas?t.schemas.map($r):null,id:t.id?new hi(t.id):null},r=HU(i);return this.jitExpression(r.expression,o,e,[])}compileNgModuleDeclaration(o,e,t){let i=UU(t);return this.jitExpression(i,o,e,[])}compileDirective(o,e,t){let i=sN(t);return this.compileDirectiveFromMeta(o,e,i)}compileDirectiveDeclaration(o,e,t){let i=this.createParseSourceSpan("Directive",t.type.name,e),r=LF(t,i);return this.compileDirectiveFromMeta(o,e,r)}compileDirectiveFromMeta(o,e,t){let i=new Dx,r=S1(),s=bJ(t,i,r);return this.jitExpression(s.expression,o,e,i.statements)}compileComponent(o,e,t){let{template:i,defer:r}=zF(t.template,t.name,e,t.preserveWhitespaces,void 0),s=Le(q(q({},t),sN(t)),{selector:t.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:i,declarations:t.declarations.map(VJ),declarationListEmitMode:0,defer:r,styles:[...t.styles,...i.styles],encapsulation:t.encapsulation,changeDetection:t.changeDetection??null,animations:t.animations!=null?new hi(t.animations):null,viewProviders:t.viewProviders!=null?new hi(t.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null}),d=`ng:///${t.name}.js`;return this.compileComponentFromMeta(o,d,s)}compileComponentDeclaration(o,e,t){let i=this.createParseSourceSpan("Component",t.type.name,e),r=zJ(t,i,e);return this.compileComponentFromMeta(o,e,r)}compileComponentFromMeta(o,e,t){let i=new Dx,r=S1(),s=wJ(t,i,r);return this.jitExpression(s.expression,o,e,i.statements)}compileFactory(o,e,t){let i=Vm({name:t.name,type:$r(t.type),typeArgumentCount:t.typeArgumentCount,deps:$J(t.deps),target:t.target});return this.jitExpression(i.expression,o,e,i.statements)}compileFactoryDeclaration(o,e,t){let i=Vm({name:t.type.name,type:$r(t.type),typeArgumentCount:0,deps:Array.isArray(t.deps)?t.deps.map(pN):t.deps,target:t.target});return this.jitExpression(i.expression,o,e,i.statements)}createParseSourceSpan(o,e,t){return RU(o,e,t)}jitExpression(o,e,t,i){let r=[...i,new Ur("$def",o,void 0,ua.Exported)];return this.jitEvaluator.evaluateStatements(t,r,new AP(e),!0).$def}};function rN(n){return Le(q({},n),{isSignal:n.isSignal,predicate:RF(n.predicate),read:n.read?new hi(n.read):null,static:n.static,emitDistinctChangesOnly:n.emitDistinctChangesOnly})}function aN(n){return{propertyName:n.propertyName,first:n.first??!1,predicate:RF(n.predicate),descendants:n.descendants??!1,read:n.read?new hi(n.read):null,static:n.static??!1,emitDistinctChangesOnly:n.emitDistinctChangesOnly??!0,isSignal:!!n.isSignal}}function RF(n){return Array.isArray(n)?n:RT(new hi(n),1)}function sN(n){let o=YJ(n.inputs||[]),e=tP(n.outputs||[]),t=n.propMetadata,i={},r={};for(let d in t)t.hasOwnProperty(d)&&t[d].forEach(m=>{qJ(m)?i[d]={bindingPropertyName:m.alias||d,classPropertyName:d,required:m.required||!1,isSignal:!!m.isSignal,transformFunction:m.transform!=null?new hi(m.transform):null}:QJ(m)&&(r[d]=m.alias||d)});let s=n.hostDirectives?.length?n.hostDirectives.map(d=>typeof d=="function"?{directive:$r(d),inputs:null,outputs:null,isForwardReference:!1}:{directive:$r(d.directive),isForwardReference:!1,inputs:d.inputs?tP(d.inputs):null,outputs:d.outputs?tP(d.outputs):null}):null;return Le(q({},n),{typeArgumentCount:0,typeSourceSpan:n.typeSourceSpan,type:$r(n.type),deps:null,host:q({},UJ(n.propMetadata,n.typeSourceSpan,n.host)),inputs:q(q({},o),i),outputs:q(q({},e),r),queries:n.queries.map(rN),providers:n.providers!=null?new hi(n.providers):null,viewQueries:n.viewQueries.map(rN),hostDirectives:s})}function LF(n,o){let e=n.hostDirectives?.length?n.hostDirectives.map(t=>({directive:$r(t.directive),isForwardReference:!1,inputs:t.inputs?lN(t.inputs):null,outputs:t.outputs?lN(t.outputs):null})):null;return{name:n.type.name,type:$r(n.type),typeSourceSpan:o,selector:n.selector??null,inputs:n.inputs?KJ(n.inputs):{},outputs:n.outputs??{},host:RJ(n.host),queries:(n.queries??[]).map(aN),viewQueries:(n.viewQueries??[]).map(aN),providers:n.providers!==void 0?new hi(n.providers):null,exportAs:n.exportAs??null,usesInheritance:n.usesInheritance??!1,controlCreate:n.controlCreate??null,lifecycle:{usesOnChanges:n.usesOnChanges??!1},deps:null,typeArgumentCount:0,isStandalone:n.isStandalone??CN(n.version),isSignal:n.isSignal??!1,hostDirectives:e}}function RJ(n={}){return{attributes:LJ(n.attributes??{}),listeners:n.listeners??{},properties:n.properties??{},specialAttributes:{classAttr:n.classAttribute,styleAttr:n.styleAttribute}}}function lN(n){let o=null;for(let e=1;eeP(d,!0))),n.directives&&r.push(...n.directives.map(d=>eP(d))),n.pipes&&r.push(...BJ(n.pipes)));let s=r.some(({kind:d})=>d===Gg.Directive||d===Gg.NgModule);return Le(q({},LF(n,o)),{template:t,styles:n.styles??[],declarations:r,viewProviders:n.viewProviders!==void 0?new hi(n.viewProviders):null,animations:n.animations!==void 0?new hi(n.animations):null,defer:i,changeDetection:n.changeDetection??IT.Default,encapsulation:n.encapsulation??zm.Emulated,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null,hasDirectiveDependencies:s})}function VJ(n){return Le(q({},n),{type:new hi(n.type)})}function eP(n,o=null){return{kind:Gg.Directive,isComponent:o||n.kind==="component",selector:n.selector,type:new hi(n.type),inputs:n.inputs??[],outputs:n.outputs??[],exportAs:n.exportAs??null}}function BJ(n){return n?Object.keys(n).map(o=>({kind:Gg.Pipe,name:o,type:new hi(n[o])})):[]}function jJ(n){return{kind:Gg.Pipe,name:n.name,type:new hi(n.type)}}function zF(n,o,e,t,i){let r=CJ(n,e,{preserveWhitespaces:t});if(r.errors!==null){let m=r.errors.map(u=>u.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${o}: ${m}`)}let d=new kT(null).bind({template:r.nodes});return{template:r,defer:HJ(d,i)}}function bg(n,o){if(n.hasOwnProperty(o))return RT(new hi(n[o]),0)}function cN(n,o){if(n.hasOwnProperty(o))return new hi(n[o])}function dN(n){let o=typeof n=="function"?new hi(n):new _a(n??null);return RT(o,0)}function $J(n){return n==null?null:n.map(VF)}function VF(n){let o=n.attribute!=null,e=n.token===null?null:new hi(n.token),t=o?new hi(n.attribute):e;return BF(t,o,n.host,n.optional,n.self,n.skipSelf)}function pN(n){let o=n.attribute??!1,e=n.token===null?null:new hi(n.token);return BF(e,o,n.host??!1,n.optional??!1,n.self??!1,n.skipSelf??!1)}function BF(n,o,e,t,i,r){let s=o?Oe("unknown"):null;return{token:n,attributeNameType:s,host:e,optional:t,self:i,skipSelf:r}}function HJ(n,o){let e=n.getDeferBlocks(),t=new Map;for(let i=0;i{WJ(s)?t.properties[s.hostPropertyName||r]=rU("this",r):GJ(s)&&(t.listeners[s.eventName||r]=`${r}(${(s.args||[]).join(",")})`)});let i=DJ(t,o);if(i.length)throw new Error(i.map(r=>r.msg).join(` `));return t}function WJ(n){return n.ngMetadataName==="HostBinding"}function GJ(n){return n.ngMetadataName==="HostListener"}function qJ(n){return n.ngMetadataName==="Input"}function QJ(n){return n.ngMetadataName==="Output"}function KJ(n){return Object.keys(n).reduce((o,e)=>{let t=n[e];return typeof t=="string"||Array.isArray(t)?o[e]=XJ(t):o[e]={bindingPropertyName:t.publicName,classPropertyName:e,transformFunction:t.transformFunction!==null?new hi(t.transformFunction):null,required:t.isRequired,isSignal:t.isSignal},o},{})}function XJ(n){return typeof n=="string"?{bindingPropertyName:n,classPropertyName:n,transformFunction:null,required:!1,isSignal:!1}:{bindingPropertyName:n[0],classPropertyName:n[1],transformFunction:n[2]?new hi(n[2]):null,required:!1,isSignal:!1}}function YJ(n){return n.reduce((o,e)=>{if(typeof e=="string"){let[t,i]=jF(e);o[i]={bindingPropertyName:t,classPropertyName:i,required:!1,isSignal:!1,transformFunction:null}}else o[e.name]={bindingPropertyName:e.alias||e.name,classPropertyName:e.name,required:e.required||!1,isSignal:!1,transformFunction:e.transform!=null?new hi(e.transform):null};return o},{})}function tP(n){return n.reduce((o,e)=>{let[t,i]=jF(e);return o[i]=t,o},{})}function jF(n){let[o,e]=n.split(":",2).map(t=>t.trim());return[e??o,o]}function ZJ(n){return{name:n.type.name,type:$r(n.type),typeArgumentCount:0,pipeName:n.name,deps:null,pure:n.pure??!0,isStandalone:n.isStandalone??CN(n.version)}}function JJ(n){return{name:n.type.name,type:$r(n.type),providers:n.providers!==void 0&&n.providers.length>0?new hi(n.providers):null,imports:n.imports!==void 0?n.imports.map(o=>new hi(o)):[]}}function eee(n){let o=n.ng||(n.ng={});o.\u0275compilerFacade=new OT}var DT=class{closedByParent=!1;implicitNamespacePrefix=null;isVoid=!1;ignoreFirstLf=!1;canSelfClose=!0;preventNamespaceInheritance=!1;requireExtraParent(o){return!1}isClosedByChild(o){return!1}getContentType(){return Oc.PARSABLE_DATA}},Fje=new DT;var Rje=new lP("21.2.21");eee(Sf);function iE(n){let o=n.cloneNode(!0),e=o.querySelectorAll("[id]"),t=n.nodeName.toLowerCase();o.removeAttribute("id");for(let i=0;i=t&&e<=i&&o>=r&&o<=s}function nee(n,o){let e=o.leftn.right,i=o.topn.bottom;return e||t||i||r}function z0(n,o,e){n.top+=o,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function WF(n,o,e,t){let{top:i,right:r,bottom:s,left:d,width:m,height:u}=n,h=m*o,v=u*o;return t>i-v&&td-h&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:dE(e)})})}handleScroll(o){let e=Im(o),t=this.positions.get(e);if(!t)return null;let i=t.scrollPosition,r,s;if(e===this._document){let u=this.getViewportScrollPosition();r=u.top,s=u.left}else r=e.scrollTop,s=e.scrollLeft;let d=i.top-r,m=i.left-s;return this.positions.forEach((u,h)=>{u.clientRect&&e!==h&&e.contains(h)&&z0(u.clientRect,d,m)}),i.top=r,i.left=s,{top:d,left:m}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function n8(n,o){let e=n.rootNodes;if(e.length===1&&e[0].nodeType===o.ELEMENT_NODE)return e[0];let t=o.createElement("div");return e.forEach(i=>t.appendChild(i)),t}function pE(n,o,e){for(let t in o)if(o.hasOwnProperty(t)){let i=o[t];i?n.setProperty(t,i,e?.has(t)?"important":""):n.removeProperty(t)}return n}function oh(n,o){let e=o?"":"none";pE(n.style,{"touch-action":o?"":"none","-webkit-user-drag":o?"":"none","-webkit-tap-highlight-color":o?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function GF(n,o,e){pE(n.style,{position:o?"":"fixed",top:o?"":"0",opacity:o?"":"0",left:o?"":"-999em"},e)}function V1(n,o){return o&&o!="none"?n+" "+o:n}function qF(n,o){n.style.width=`${o.width}px`,n.style.height=`${o.height}px`,n.style.transform=V0(o.left,o.top)}function V0(n,o){return`translate3d(${Math.round(n)}px, ${Math.round(o)}px, 0)`}var R0={capture:!0},tE={passive:!1,capture:!0},iee=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(t,i){},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 n})(),j1=(()=>{class n{_ngZone=f(Ki);_document=f(Eo);_styleLoader=f(kr);_renderer=f(Dm).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new Ye;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=R([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new Ye;pointerUp=new Ye;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,tE)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,t){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(iee),this._activeDragInstances.update(i=>[...i,e]),this._activeDragInstances().length===1)){let i=t.type.startsWith("touch"),r=d=>this.pointerUp.next(d),s=[["scroll",d=>this._scroll.next(d),R0],["selectstart",this._preventDefaultWhileDragging,tE]];i?s.push(["touchend",r,R0],["touchcancel",r,R0]):s.push(["mouseup",r,R0]),i||s.push(["mousemove",d=>this.pointerMove.next(d),tE]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=s.map(([d,m,u])=>this._renderer.listen(this._document,d,m,u))})}}stopDragging(e){this._activeDragInstances.update(t=>{let i=t.indexOf(e);return i>-1?(t.splice(i,1),[...t]):t}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let t=[this._scroll];return e&&e!==this._document&&t.push(new ls(i=>this._ngZone.runOutsideAngular(()=>{let r=this._renderer.listen(e,"scroll",s=>{this._activeDragInstances().length&&i.next(s)},R0);return()=>{r()}}))),io(...t)}registerDirectiveNode(e,t){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,t)}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(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function QF(n){let o=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*o}function oee(n){let o=getComputedStyle(n),e=nE(o,"transition-property"),t=e.find(d=>d==="transform"||d==="all");if(!t)return 0;let i=e.indexOf(t),r=nE(o,"transition-duration"),s=nE(o,"transition-delay");return QF(r[i])+QF(s[i])}function nE(n,o){return n.getPropertyValue(o).split(",").map(t=>t.trim())}var ree=new Set(["position"]),rE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(o,e,t,i,r,s,d,m,u,h){this._document=o,this._rootElement=e,this._direction=t,this._initialDomRect=i,this._previewTemplate=r,this._previewClass=s,this._pickupPositionOnPage=d,this._initialTransform=m,this._zIndex=u,this._renderer=h}attach(o){this._preview=this._createPreview(),o.appendChild(this._preview),KF(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(o){this._preview.style.transform=o}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(o){this._preview.classList.add(o)}getTransitionDuration(){return oee(this._preview)}addEventListener(o,e){return this._renderer.listen(this._preview,o,e)}_createPreview(){let o=this._previewTemplate,e=this._previewClass,t=o?o.template:null,i;if(t&&o){let r=o.matchSize?this._initialDomRect:null,s=o.viewContainer.createEmbeddedView(t,o.context);s.detectChanges(),i=n8(s,this._document),this._previewEmbeddedView=s,o.matchSize?qF(i,r):i.style.transform=V0(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=iE(this._rootElement),qF(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return pE(i.style,{"pointer-events":"none",margin:KF(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},ree),oh(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(r=>i.classList.add(r)):i.classList.add(e)),i}};function KF(n){return"showPopover"in n}var aee={passive:!0},XF={passive:!1},see={passive:!1,capture:!0},lee=800,YF="cdk-drag-placeholder",ZF=new Set(["position"]);function i8(n,o,e={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let t=n.get(Ui,null,{optional:!0})||n.get(Dm).createRenderer(null,null);return new aE(o,e,n.get(Eo),n.get(Ki),n.get(wd),n.get(j1),t)}var aE=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=R(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new Ye;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=To.EMPTY;_pointerUpSubscription=To.EMPTY;_scrollSubscription=To.EMPTY;_resizeSubscription=To.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(o){o!==this._disabled&&(this._disabled=o,this._toggleNativeDragInteractions(),this._handles.forEach(e=>oh(e,o)))}_disabled=!1;beforeStarted=new Ye;started=new Ye;released=new Ye;ended=new Ye;entered=new Ye;exited=new Ye;dropped=new Ye;moved=this._moveEvents;data;constrainPosition;constructor(o,e,t,i,r,s,d){this._config=e,this._document=t,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=s,this._renderer=d,this.withRootElement(o).withParent(e.parentDragRef||null),this._parentPositions=new z1(t),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(o){this._handles=o.map(t=>sl(t)),this._handles.forEach(t=>oh(t,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&e.add(t)}),this._disabledHandles=e,this}withPreviewTemplate(o){return this._previewTemplate=o,this}withPlaceholderTemplate(o){return this._placeholderTemplate=o,this}withRootElement(o){let e=sl(o);if(e!==this._rootElement){this._removeRootElementListeners();let t=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[t.listen(e,"mousedown",this._pointerDown,XF),t.listen(e,"touchstart",this._pointerDown,aee),t.listen(e,"dragstart",this._nativeDragStart,XF)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(o){return this._boundaryElement=o?sl(o):null,this._resizeSubscription.unsubscribe(),o&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(o){return this._parentDragRef=o,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&&nee(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let o=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),t=0,i=0;e.lefto.right&&(t=o.right-e.right),e.topo.bottom&&(i=o.bottom-e.bottom);let r=this._activeTransform.x,s=this._activeTransform.y,d=r+t,m=s+i;this._rootElement.style.transform=V0(d,m),this._activeTransform={x:d,y:m},this._passiveTransform={x:d,y:m}}}disableHandle(o){!this._disabledHandles.has(o)&&this._handles.indexOf(o)>-1&&(this._disabledHandles.add(o),oh(o,!0))}enableHandle(o){this._disabledHandles.has(o)&&(this._disabledHandles.delete(o),oh(o,this.disabled))}withDirection(o){return this._direction=o,this}_withDropContainer(o){this._dropContainer=o}getFreeDragPosition(){let o=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:o.x,y:o.y}}setFreeDragPosition(o){return this._activeTransform={x:0,y:0},this._passiveTransform.x=o.x,this._passiveTransform.y=o.y,this._dropContainer||this._applyRootElementTransform(o.x,o.y),this}withPreviewContainer(o){return this._previewContainer=o,this}_sortFromLastPointerPosition(){let o=this._lastKnownPointerPosition;o&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(o),o)}_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=o=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(o);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,o)}else this.disabled||this._initializeDragSequence(this._rootElement,o)};_pointerMove=o=>{let e=this._getPointerPositionOnPage(o);if(!this._hasStartedDragging()){let i=Math.abs(e.x-this._pickupPositionOnPage.x),r=Math.abs(e.y-this._pickupPositionOnPage.y);if(i+r>=this._config.dragStartThreshold){let d=Date.now()>=this._dragStartTime+this._getDragStartDelay(o),m=this._dropContainer;if(!d){this._endDragSequence(o);return}(!m||!m.isDragging()&&!m.isReceiving())&&(o.cancelable&&o.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(o)))}return}o.cancelable&&o.preventDefault();let t=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(t),this._dropContainer)this._updateActiveDropContainer(t,e);else{let i=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=t.x-i.x+this._passiveTransform.x,r.y=t.y-i.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:t,event:o,distance:this._getDragDistance(t),delta:this._pointerDirectionDelta})})};_pointerUp=o=>{this._endDragSequence(o)};_endDragSequence(o){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:o}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(o),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(o);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:o})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(o){L0(o)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),t=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",cee,see)}),t){let i=this._rootElement,r=i.parentNode,s=this._placeholder=this._createPlaceholderElement(),d=this._marker=this._marker||this._document.createComment("");r.insertBefore(d,i),this._initialTransform=i.style.transform||"",this._preview=new rE(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)),GF(i,!1,ZF),this._document.body.appendChild(r.replaceChild(s,i)),this.started.next({source:this,event:o}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:o}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(o,e){this._parentDragRef&&e.stopPropagation();let t=this.isDragging(),i=L0(e),r=!i&&e.button!==0,s=this._rootElement,d=Im(e),m=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+lee>Date.now(),u=i?_A(e):hA(e);if(d&&d.draggable&&e.type==="mousedown"&&e.preventDefault(),t||r||m||u)return;if(this._handles.length){let b=s.style;this._rootElementTapHighlight=b.webkitTapHighlightColor||"",b.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(b=>this._updateOnScroll(b)),this._boundaryElement&&(this._boundaryRect=dE(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,o,e);let v=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:v.x,y:v.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(o){GF(this._rootElement,!0,ZF),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,t=e.getItemIndex(this),i=this._getPointerPositionOnPage(o),r=this._getDragDistance(i),s=e._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:r,dropPoint:i,event:o}),this.dropped.next({item:this,currentIndex:t,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:r,dropPoint:i,event:o}),e.drop(this,t,this._initialIndex,this._initialContainer,s,r,i,o),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:o,y:e},{x:t,y:i}){let r=this._initialContainer._getSiblingContainerFromPosition(this,o,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(o,e)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let s=this._dropContainer.getItemIndex(this),d=this._dropContainer.getItemAtIndex(s+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,d),this._dropContainer=r,this._dropContainer.enter(this,o,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(t,i),this._dropContainer._sortItem(this,o,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(o,e):this._applyPreviewTransform(o-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let o=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(o.left,o.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{let i=d=>{(!d||this._preview&&Im(d)===this._preview.element&&d.propertyName==="transform")&&(s(),t(),clearTimeout(r))},r=setTimeout(i,e*1.5),s=this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){let o=this._placeholderTemplate,e=o?o.template:null,t;return e?(this._placeholderRef=o.viewContainer.createEmbeddedView(e,o.context),this._placeholderRef.detectChanges(),t=n8(this._placeholderRef,this._document)):t=iE(this._rootElement),t.style.pointerEvents="none",t.classList.add(YF),t}_getPointerPositionInElement(o,e,t){let i=e===this._rootElement?null:e,r=i?i.getBoundingClientRect():o,s=L0(t)?t.targetTouches[0]:t,d=this._getViewportScrollPosition(),m=s.pageX-r.left-d.left,u=s.pageY-r.top-d.top;return{x:r.left-o.left+m,y:r.top-o.top+u}}_getPointerPositionOnPage(o){let e=this._getViewportScrollPosition(),t=L0(o)?o.touches[0]||o.changedTouches[0]||{pageX:0,pageY:0}:o,i=t.pageX-e.left,r=t.pageY-e.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let d=this._ownerSVGElement.createSVGPoint();return d.x=i,d.y=r,d.matrixTransform(s.inverse())}}return{x:i,y:r}}_getConstrainedPointerPosition(o){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:t,y:i}=this.constrainPosition?this.constrainPosition(o,this,this._initialDomRect,this._pickupPositionInElement):o;if(this.lockAxis==="x"||e==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(t=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,d=this._boundaryRect,{width:m,height:u}=this._getPreviewRect(),h=d.top+s,v=d.bottom-(u-s),b=d.left+r,y=d.right-(m-r);t=JF(t,b,y),i=JF(i,h,v)}return{x:t,y:i}}_updatePointerDirectionDelta(o){let{x:e,y:t}=o,i=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-r.x),d=Math.abs(t-r.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=e>r.x?1:-1,r.x=e),d>this._config.pointerDirectionChangeThreshold&&(i.y=t>r.y?1:-1,r.y=t),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let o=this._handles.length>0||!this.isDragging();o!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=o,oh(this._rootElement,o))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(o=>o()),this._rootElementCleanups=void 0}_applyRootElementTransform(o,e){let t=1/this.scale,i=V0(o*t,e*t),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=V1(i,this._initialTransform)}_applyPreviewTransform(o,e){let t=this._previewTemplate?.template?void 0:this._initialTransform,i=V0(o,e);this._preview.setTransform(V1(i,t))}_getDragDistance(o){let e=this._pickupPositionOnPage;return e?{x:o.x-e.x,y:o.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:o,y:e}=this._passiveTransform;if(o===0&&e===0||this.isDragging()||!this._boundaryElement)return;let t=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||t.width===0&&t.height===0)return;let r=i.left-t.left,s=t.right-i.right,d=i.top-t.top,m=t.bottom-i.bottom;i.width>t.width?(r>0&&(o+=r),s>0&&(o-=s)):o=0,i.height>t.height?(d>0&&(e+=d),m>0&&(e-=m)):e=0,(o!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:o})}_getDragStartDelay(o){let e=this.dragStartDelay;return typeof e=="number"?e:L0(o)?e.touch:e?e.mouse:0}_updateOnScroll(o){let e=this._parentPositions.handleScroll(o);if(e){let t=Im(o);this._boundaryRect&&t!==this._boundaryElement&&t.contains(this._boundaryElement)&&z0(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=Rv(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(o,e){let t=this._previewContainer||"global";if(t==="parent")return o;if(t==="global"){let i=this._document;return e||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return sl(t)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=o=>{if(this._handles.length){let e=this._getTargetHandle(o);e&&!this._disabledHandles.has(e)&&!this.disabled&&o.preventDefault()}else this.disabled||o.preventDefault()};_getTargetHandle(o){return this._handles.find(e=>o.target&&(o.target===e||e.contains(o.target)))}_conditionallyInsertAnchor(o,e,t){if(o===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let i=this._anchor??=iE(this._placeholder);i.classList.remove(YF),i.classList.add("cdk-drag-anchor"),i.style.transform="",t?t.before(i):sl(e.element).appendChild(i)}}};function JF(n,o,e){return Math.max(o,Math.min(e,n))}function L0(n){return n.type[0]==="t"}function cee(n){n.preventDefault()}function o8(n,o,e){let t=e8(o,n.length-1),i=e8(e,n.length-1);if(t===i)return;let r=n[t],s=i0)return null;let d=this.orientation==="horizontal",m=r.findIndex(k=>k.drag===o),u=r[s],h=r[m].clientRect,v=u.clientRect,b=m>s?1:-1,y=this._getItemOffsetPx(h,v,b),x=this._getSiblingOffsetPx(m,r,b),P=r.slice();return o8(r,m,s),r.forEach((k,S)=>{if(P[S]===k)return;let T=k.drag===o,A=T?y:x,D=T?o.getPlaceholderElement():k.drag.getRootElement();k.offset+=A;let F=Math.round(k.offset*(1/k.drag.scale));d?(D.style.transform=V1(`translate3d(${F}px, 0, 0)`,k.initialTransform),z0(k.clientRect,0,A)):(D.style.transform=V1(`translate3d(0, ${F}px, 0)`,k.initialTransform),z0(k.clientRect,A,0))}),this._previousSwap.overlaps=oE(v,e,t),this._previousSwap.drag=u.drag,this._previousSwap.delta=d?i.x:i.y,{previousIndex:m,currentIndex:s}}enter(o,e,t,i){let r=this._activeDraggables,s=r.indexOf(o),d=o.getPlaceholderElement();s>-1&&r.splice(s,1);let m=i==null||i<0?this._getItemIndexFromPointerPosition(o,e,t):i,u=r[m];if(u===o&&(u=r[m+1]),!u&&(m==null||m===-1||m{let e=o.getRootElement();if(e){let t=this._itemPositions.find(i=>i.drag===o)?.initialTransform;e.style.transform=t||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(o){return this._getVisualItemPositions().findIndex(e=>e.drag===o)}getItemAtIndex(o){return this._getVisualItemPositions()[o]?.drag||null}updateOnScroll(o,e){this._itemPositions.forEach(({clientRect:t})=>{z0(t,o,e)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(o){this._element=o}_cacheItemPositions(){let o=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let t=e.getVisibleElement();return{drag:e,offset:0,initialTransform:t.style.transform||"",clientRect:dE(t)}}).sort((e,t)=>o?e.clientRect.left-t.clientRect.left:e.clientRect.top-t.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(o,e,t){let i=this.orientation==="horizontal",r=i?e.left-o.left:e.top-o.top;return t===-1&&(r+=i?e.width-o.width:e.height-o.height),r}_getSiblingOffsetPx(o,e,t){let i=this.orientation==="horizontal",r=e[o].clientRect,s=e[o+t*-1],d=r[i?"width":"height"]*t;if(s){let m=i?"left":"top",u=i?"right":"bottom";t===-1?d-=s.clientRect[m]-r[u]:d+=r[m]-s.clientRect[u]}return d}_shouldEnterAsFirstChild(o,e){if(!this._activeDraggables.length)return!1;let t=this._itemPositions,i=this.orientation==="horizontal";if(t[0].drag!==this._activeDraggables[0]){let s=t[t.length-1].clientRect;return i?o>=s.right:e>=s.bottom}else{let s=t[0].clientRect;return i?o<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(o,e,t,i){let r=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:d,clientRect:m})=>{if(d===o)return!1;if(i){let u=r?i.x:i.y;if(d===this._previousSwap.drag&&this._previousSwap.overlaps&&u===this._previousSwap.delta)return!1}return r?e>=Math.floor(m.left)&&e=Math.floor(m.top)&&tm?h.after(u):h.before(u),o8(this._activeItems,m,r);let v=this._getRootNode().elementFromPoint(e,t);return s.deltaX=i.x,s.deltaY=i.y,s.drag=d,s.overlaps=h===v||h.contains(v),{previousIndex:m,currentIndex:r}}enter(o,e,t,i){let r=this._activeItems.indexOf(o);r>-1&&this._activeItems.splice(r,1);let s=i==null||i<0?this._getItemIndexFromPointerPosition(o,e,t):i;s===-1&&(s=this._getClosestItemIndexToPointer(o,e,t));let d=this._activeItems[s];d&&!this._dragDropRegistry.isDragging(d)?(this._activeItems.splice(s,0,o),d.getRootElement().before(o.getPlaceholderElement())):(this._activeItems.push(o),this._element.appendChild(o.getPlaceholderElement()))}withItems(o){this._activeItems=o.slice()}withSortPredicate(o){this._sortPredicate=o}reset(){let o=this._element,e=this._previousSwap;for(let t=this._relatedNodes.length-1;t>-1;t--){let[i,r]=this._relatedNodes[t];i.parentNode===o&&i.nextSibling!==r&&(r===null?o.appendChild(i):r.parentNode===o&&o.insertBefore(i,r))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(o){return this._activeItems.indexOf(o)}getItemAtIndex(o){return this._activeItems[o]||null}updateOnScroll(){this._activeItems.forEach(o=>{this._dragDropRegistry.isDragging(o)&&o._sortFromLastPointerPosition()})}withElementContainer(o){o!==this._element&&(this._element=o,this._rootNode=void 0)}_getItemIndexFromPointerPosition(o,e,t){let i=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(t)),r=i?this._activeItems.findIndex(s=>{let d=s.getRootElement();return i===d||d.contains(i)}):-1;return r===-1||!this._sortPredicate(r,o)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=Rv(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(o,e,t){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let i=1/0,r=-1;for(let s=0;s!0;sortPredicate=()=>!0;beforeStarted=new Ye;entered=new Ye;exited=new Ye;dropped=new Ye;sorted=new Ye;receivingStarted=new Ye;receivingStopped=new Ye;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=To.EMPTY;_verticalScrollDirection=wl.NONE;_horizontalScrollDirection=es.NONE;_scrollNode;_stopScrollTimers=new Ye;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(o,e,t,i,r){this._dragDropRegistry=e,this._ngZone=i,this._viewportRuler=r;let s=this.element=sl(o);this._document=t,this.withOrientation("vertical").withElementContainer(s),e.registerDropContainer(this),this._parentPositions=new z1(t)}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(o,e,t,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(o)),this._sortStrategy.enter(o,e,t,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:o,container:this,currentIndex:this.getItemIndex(o)})}exit(o){this._reset(),this.exited.next({item:o,container:this})}drop(o,e,t,i,r,s,d,m={}){this._reset(),this.dropped.next({item:o,currentIndex:e,previousIndex:t,container:this,previousContainer:i,isPointerOverContainer:r,distance:s,dropPoint:d,event:m})}withItems(o){let e=this._draggables;return this._draggables=o,o.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(i=>i.isDragging()).every(i=>o.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(o){return this._direction=o,this._sortStrategy instanceof B1&&(this._sortStrategy.direction=o),this}connectedTo(o){return this._siblings=o.slice(),this}withOrientation(o){if(o==="mixed")this._sortStrategy=new sE(this._document,this._dragDropRegistry);else{let e=new B1(this._dragDropRegistry);e.direction=this._direction,e.orientation=o,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,t)=>this.sortPredicate(e,t,this)),this}withScrollableParents(o){let e=this._container;return this._scrollableElements=o.indexOf(e)===-1?[e,...o]:o.slice(),this}withElementContainer(o){if(o===this._container)return this;let e=sl(this.element),t=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(o);return t>-1&&this._scrollableElements.splice(t,1),i>-1&&this._scrollableElements.splice(i,1),this._sortStrategy&&this._sortStrategy.withElementContainer(o),this._cachedShadowRoot=null,this._scrollableElements.unshift(o),this._container=o,this}getScrollableParents(){return this._scrollableElements}getItemIndex(o){return this._isDragging?this._sortStrategy.getItemIndex(o):this._draggables.indexOf(o)}getItemAtIndex(o){return this._isDragging?this._sortStrategy.getItemAtIndex(o):this._draggables[o]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(o,e,t,i){if(this.sortingDisabled||!this._domRect||!WF(this._domRect,t8,e,t))return;let r=this._sortStrategy.sort(o,e,t,i);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:o})}_startScrollingIfNecessary(o,e){if(this.autoScrollDisabled)return;let t,i=wl.NONE,r=es.NONE;if(this._parentPositions.positions.forEach((s,d)=>{d===this._document||!s.clientRect||t||WF(s.clientRect,t8,o,e)&&([i,r]=pee(d,s.clientRect,this._direction,o,e),(i||r)&&(t=d))}),!i&&!r){let{width:s,height:d}=this._viewportRuler.getViewportSize(),m={width:s,height:d,top:0,right:s,bottom:d,left:0};i=a8(m,e),r=s8(m,o),t=window}t&&(i!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||t!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=r,this._scrollNode=t,(i||r)&&t?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let o=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=o.msScrollSnapType||o.scrollSnapType||"",o.scrollSnapType=o.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 o=this._container.style;o.scrollSnapType=o.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),kv(0,ol).pipe($e(this._stopScrollTimers)).subscribe(()=>{let o=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===wl.UP?o.scrollBy(0,-e):this._verticalScrollDirection===wl.DOWN&&o.scrollBy(0,e),this._horizontalScrollDirection===es.LEFT?o.scrollBy(-e,0):this._horizontalScrollDirection===es.RIGHT&&o.scrollBy(e,0)})};_isOverContainer(o,e){return this._domRect!=null&&oE(this._domRect,o,e)}_getSiblingContainerFromPosition(o,e,t){return this._siblings.find(i=>i._canReceive(o,e,t))}_canReceive(o,e,t){if(!this._domRect||!oE(this._domRect,e,t)||!this.enterPredicate(o,this))return!1;let i=this._getShadowRoot().elementFromPoint(e,t);return i?i===this._container||this._container.contains(i):!1}_startReceiving(o,e){let t=this._activeSiblings;!t.has(o)&&e.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(t.add(o),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:o,receiver:this,items:e}))}_stopReceiving(o){this._activeSiblings.delete(o),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:o,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(o=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(o);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let o=Rv(this._container);this._cachedShadowRoot=o||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let o=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,o))}};function a8(n,o){let{top:e,bottom:t,height:i}=n,r=i*r8;return o>=e-r&&o<=e+r?wl.UP:o>=t-r&&o<=t+r?wl.DOWN:wl.NONE}function s8(n,o){let{left:e,right:t,width:i}=n,r=i*r8;return o>=e-r&&o<=e+r?es.LEFT:o>=t-r&&o<=t+r?es.RIGHT:es.NONE}function pee(n,o,e,t,i){let r=a8(o,i),s=s8(o,t),d=wl.NONE,m=es.NONE;if(r){let u=n.scrollTop;r===wl.UP?u>0&&(d=wl.UP):n.scrollHeight-u>n.clientHeight&&(d=wl.DOWN)}if(s){let u=n.scrollLeft;e==="rtl"?s===es.RIGHT?u<0&&(m=es.RIGHT):n.scrollWidth+u>n.clientWidth&&(m=es.LEFT):s===es.LEFT?u>0&&(m=es.LEFT):n.scrollWidth-u>n.clientWidth&&(m=es.RIGHT)}return[d,m]}var mee=(()=>{class n{_injector=f(Cr);constructor(){}createDrag(e,t){return i8(this._injector,e,t)}createDropList(e){return dee(this._injector,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),cE=new mn("CDK_DRAG_PARENT");var l8=new mn("CdkDragHandle"),c8=(()=>{class n{element=f(Qt);_parentDrag=f(cE,{optional:!0,skipSelf:!0});_dragDropRegistry=f(j1);_stateChanges=new Ye;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._stateChanges.next(this)}_disabled=!1;constructor(){this._parentDrag?._addHandle(this)}ngAfterViewInit(){if(!this._parentDrag){let e=this.element.nativeElement.parentElement;for(;e;){let t=this._dragDropRegistry.getDragDirectiveForNode(e);if(t){this._parentDrag=t,t._addHandle(this);break}e=e.parentElement}}}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",At]},features:[un([{provide:l8,useExisting:n}])]})}return n})(),uee=new mn("CDK_DRAG_CONFIG"),gee=new mn("CdkDropList"),d8=(()=>{class n{element=f(Qt);dropContainer=f(gee,{optional:!0,skipSelf:!0});_ngZone=f(Ki);_viewContainerRef=f($o);_dir=f(Ua,{optional:!0});_changeDetectorRef=f(ie);_selfHandle=f(l8,{optional:!0,self:!0});_parentDrag=f(cE,{optional:!0,skipSelf:!0});_dragDropRegistry=f(j1);_destroyed=new Ye;_handles=new sn([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}_disabled=!1;constrainPosition;previewClass;previewContainer;scale=1;started=new ve;released=new ve;ended=new ve;entered=new ve;exited=new ve;dropped=new ve;moved=new ls(e=>{let t=this._dragRef.moved.pipe(Pt(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(e);return()=>{t.unsubscribe()}});_injector=f(Cr);constructor(){let e=this.dropContainer,t=f(uee,{optional:!0});this._dragRef=i8(this._injector,this.element,{dragStartThreshold:t&&t.dragStartThreshold!=null?t.dragStartThreshold:5,pointerDirectionChangeThreshold:t&&t.pointerDirectionChangeThreshold!=null?t.pointerDirectionChangeThreshold:5,zIndex:t?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),t&&this._assignDefaults(t),e&&(e.addItem(this),e._dropListRef.beforeStarted.pipe($e(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){Kr(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let t=e.rootElementSelector,i=e.freeDragPosition;t&&!t.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let t=this._handles.getValue();t.push(e),this._handles.next(t)}_removeHandle(e){let t=this._handles.getValue(),i=t.indexOf(e);i>-1&&(t.splice(i,1),this._handles.next(t))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,t=e;this.rootElementSelector&&(t=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(t||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):sl(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let t=this._dir,i=this.dragStartDelay,r=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof i=="object"&&i?i:ap(i),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),t&&e.withDirection(t.value)}}),e.beforeStarted.pipe($a(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let t=this.element.nativeElement.parentElement;for(;t;){let i=this._dragDropRegistry.getDragDirectiveForNode(t);if(i){e.withParent(i._dragRef);break}t=t.parentElement}})}_handleEvents(e){e.started.subscribe(t=>{this.started.emit({source:this,event:t.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(t=>{this.released.emit({source:this,event:t.event})}),e.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance,dropPoint:t.dropPoint,event:t.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),e.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),e.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance,dropPoint:t.dropPoint,event:t.event})})}_assignDefaults(e){let{lockAxis:t,dragStartDelay:i,constrainPosition:r,previewClass:s,boundaryElement:d,draggingDisabled:m,rootElementSelector:u,previewContainer:h}=e;this.disabled=m??!1,this.dragStartDelay=i||0,this.lockAxis=t||null,r&&(this.constrainPosition=r),s&&(this.previewClass=s),d&&(this.boundaryElement=d),u&&(this.rootElementSelector=u),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(ei(e=>{let t=e.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&t.push(this.element),this._dragRef.withHandles(t)}),$n(e=>io(...e.map(t=>t._stateChanges.pipe(Oi(t))))),$e(this._destroyed)).subscribe(e=>{let t=this._dragRef,i=e.element.nativeElement;e.disabled?t.disableHandle(i):t.enableHandle(i)})}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,i){t&2&&se("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",At],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Ho]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[un([{provide:cE,useExisting:n}]),In]})}return n})();var $1=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({providers:[mee],imports:[Nm]})}return n})();var _ee=[[["caption"]],[["colgroup"],["col"]],"*"],fee=["caption","colgroup, col","*"];function Cee(n,o){n&1&&Zt(0,2)}function vee(n,o){n&1&&(a(0,"thead",0),Ci(1,1),l(),a(2,"tbody",0),Ci(3,2)(4,3),l(),a(5,"tfoot",0),Ci(6,4),l())}function xee(n,o){n&1&&Ci(0,1)(1,2)(2,3)(3,4)}var oc=new mn("CDK_TABLE");var W1=(()=>{class n{template=f(lr);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkCellDef",""]]})}return n})(),G1=(()=>{class n{template=f(lr);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkHeaderCellDef",""]]})}return n})(),u8=(()=>{class n{template=f(lr);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkFooterCellDef",""]]})}return n})(),Fp=(()=>{class n{_table=f(oc,{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(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,i,r){if(t&1&&Xi(r,W1,5)(r,G1,5)(r,u8,5),t&2){let s;gt(s=ht())&&(i.cell=s.first),gt(s=ht())&&(i.headerCell=s.first),gt(s=ht())&&(i.footerCell=s.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",At],stickyEnd:[2,"stickyEnd","stickyEnd",At]}})}return n})(),U1=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}},g8=(()=>{class n extends U1{constructor(){super(f(Fp),f(Qt))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[li]})}return n})();var h8=(()=>{class n extends U1{constructor(){let e=f(Fp),t=f(Qt);super(e,t);let i=e._table?._getCellRole();i&&t.nativeElement.setAttribute("role",i)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[li]})}return n})();var uE=(()=>{class n{template=f(lr);_differs=f(yd);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof j0?e.headerCell.template:this instanceof gE?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,features:[In]})}return n})(),j0=(()=>{class n extends uE{_table=f(oc,{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(lr),f(yd))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",At]},features:[li,In]})}return n})(),gE=(()=>{class n extends uE{_table=f(oc,{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(lr),f(yd))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",At]},features:[li,In]})}return n})(),q1=(()=>{class n extends uE{_table=f(oc,{optional:!0});when;constructor(){super(f(lr),f(yd))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[li]})}return n})(),_u=(()=>{class n{_viewContainer=f($o);cells;context;static mostRecentCellOutlet=null;constructor(){n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","cdkCellOutlet",""]]})}return n})(),hE=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&Ci(0,0)},dependencies:[_u],encapsulation:2})}return n})();var _E=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&Ci(0,0)},dependencies:[_u],encapsulation:2})}return n})(),_8=(()=>{class n{templateRef=f(lr);_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(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["ng-template","cdkNoDataRow",""]]})}return n})(),p8=["top","bottom","left","right"],mE=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(o=>this._updateCachedSizes(o)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(o,e,t=!0,i=!0,r,s,d){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=i,this.direction=r,this._positionListener=s,this._tableInjector=d,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(o,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(o);let t=[];for(let i of o)i.nodeType===i.ELEMENT_NODE&&t.push(i,...Array.from(i.children));Kr({write:()=>{for(let i of t)this._removeStickyStyle(i,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,i=!0,r=!0){if(!o.length||!this._isBrowser||!(e.some(k=>k)||t.some(k=>k))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let s=o[0],d=s.children.length,m=this.direction==="rtl",u=m?"right":"left",h=m?"left":"right",v=e.lastIndexOf(!0),b=t.indexOf(!0),y,x,P;r&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),Kr({earlyRead:()=>{y=this._getCellWidths(s,i),x=this._getStickyStartColumnPositions(y,e),P=this._getStickyEndColumnPositions(y,t)},write:()=>{for(let k of o)for(let S=0;S!!k)&&(this._positionListener.stickyColumnsUpdated({sizes:v===-1?[]:y.slice(0,v+1).map((k,S)=>e[S]?k:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:b===-1?[]:y.slice(b).map((k,S)=>t[S+b]?k:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let i=t==="bottom"?o.slice().reverse():o,r=t==="bottom"?e.slice().reverse():e,s=[],d=[],m=[];Kr({earlyRead:()=>{for(let u=0,h=0;u{let u=r.lastIndexOf(!0);for(let h=0;h{let t=o.querySelector("tfoot");t&&(e.some(i=>!i)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let i of e)o.style[i]="",o.classList.remove(this._borderCellCss[i]);p8.some(i=>e.indexOf(i)===-1&&o.style[i])?o.style.zIndex=this._getCalculatedZIndex(o):(o.style.zIndex="",this._needsPositionStickyOnElement&&(o.style.position=""),o.classList.remove(this._stickCellCss))}_addStickyStyle(o,e,t,i){o.classList.add(this._stickCellCss),i&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}px`,o.style.zIndex=this._getCalculatedZIndex(o),this._needsPositionStickyOnElement&&(o.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(o){let e={top:100,bottom:10,left:1,right:1},t=0;for(let i of p8)o.style[i]&&(t+=e[i]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],i=o.children;for(let r=0;r0;r--)e[r]&&(t[r]=i,i+=o[r]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),i={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(o,i),this._resizeObserver.observe(o,{box:"border-box"})),i}_updateStickyColumnReplayQueue(o){this._removeFromStickyColumnReplayQueue(o.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(o)}_removeFromStickyColumnReplayQueue(o){let e=new Set(o);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(i=>!e.has(i));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let i=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};i.width!==this._elemSizeCache.get(t.target)?.width&&yee(t.target)&&(e=!0),this._elemSizeCache.set(t.target,i)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function yee(n){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>n.classList.contains(o))}var B0=new mn("STICKY_POSITIONING_LISTENER");var fE=(()=>{class n{viewContainer=f($o);elementRef=f(Qt);constructor(){let e=f(oc);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","rowOutlet",""]]})}return n})(),CE=(()=>{class n{viewContainer=f($o);elementRef=f(Qt);constructor(){let e=f(oc);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","headerRowOutlet",""]]})}return n})(),vE=(()=>{class n{viewContainer=f($o);elementRef=f(Qt);constructor(){let e=f(oc);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","footerRowOutlet",""]]})}return n})(),xE=(()=>{class n{viewContainer=f($o);elementRef=f(Qt);constructor(){let e=f(oc);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["","noDataRowOutlet",""]]})}return n})(),yE=(()=>{class n{_differs=f(yd);_changeDetectorRef=f(ie);_elementRef=f(Qt);_dir=f(Ua,{optional:!0});_platform=f(Vr);_viewRepeater;_viewportRuler=f(wd);_injector=f(Cr);_virtualScrollViewport=f(yA,{optional:!0,host:!0});_positionListener=f(B0,{optional:!0})||f(B0,{optional:!0,skipSelf:!0});_document=f(Eo);_data;_renderedRange;_onDestroy=new Ye;_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 Ye;_footerRowStickyUpdates=new Ye;_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 Ye;_dataStream=new Ye;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 sn({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){f(new op("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((t,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe($e(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new xA:new TA,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(),og(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 t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(i,r,s)=>this._getEmbeddedViewArgs(i.item,s),i=>i.item.data,i=>{i.operation===vA.INSERTED&&i.context&&this._renderCellTemplateForItem(i.record.item.rowDef,i.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(i=>{let r=t.get(i.currentIndex);r.context.$implicit=i.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 i=m8(this._headerRowOutlet,"thead");i&&(i.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let i=m8(this._footerRowOutlet,"tfoot");i&&(i.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...i],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,s)=>{this._addStickyColumnStyles([r],this._headerRowDefs[s])}),this._rowDefs.forEach(r=>{let s=[];for(let d=0;d{this._addStickyColumnStyles([r],this._footerRowDefs[s])}),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 t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,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=[],t=Math.min(this._data.length,this._renderedRange.end),i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r{let d=i&&i.has(s)?i.get(s):[];if(d.length){let m=d.shift();return m.dataIndex=t,m}else return{data:e,rowDef:s,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),H1(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=H1(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=H1(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=H1(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(s,d)=>{let m=!!d.getColumnsDiff();return s||m},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let i=this._headerRowDefs.reduce(e,!1);i&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),t||i||r}_switchDataSource(e){this._data=[],og(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;og(this.dataSource)?e=this.dataSource.connect(this):nf(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ut(this.dataSource)),this._renderChangeSubscription=da([e,this.viewChange]).pipe($e(this._onDestroy)).subscribe(([t,i])=>{this._data=t||[],this._renderedRange=i,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let i=Array.from(t?.columns||[]).map(d=>{let m=this._columnDefsByName.get(d);return m}),r=i.map(d=>d.sticky),s=i.map(d=>d.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,s,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let i=0;i!r.when||r.when(t,e));else{let r=this._rowDefs.find(s=>s.when&&s.when(t,e))||this._defaultRowDef;r&&i.push(r)}return i.length,i}_getEmbeddedViewArgs(e,t){let i=e.rowDef,r={$implicit:e.data};return{templateRef:i.template,context:r,index:t}}_renderRow(e,t,i,r={}){let s=e.viewContainer.createEmbeddedView(t.template,r,i);return this._renderCellTemplateForItem(t,r),s}_renderCellTemplateForItem(e,t){for(let i of this._getCellTemplates(e))_u.mostRecentCellOutlet&&_u.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,i=e.length;t{let i=this._columnDefsByName.get(t);return e.extractCellTemplate(i)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,i)=>t||i.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",t=this._injector;this._stickyStyler=new mE(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ut()).pipe($e(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?ol:j4;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(rl(0,t),$e(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(i,r)=>this._measureRangeSize(i,r)}),da([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe($e(this._onDestroy)).subscribe(([i,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let i=this._noDataRowOutlet.viewContainer;if(t){let r=i.createEmbeddedView(e.templateRef),s=r.rootNodes[0];if(r.rootNodes.length===1&&s?.nodeType===this._document.ELEMENT_NODE){s.setAttribute("role","row"),s.classList.add(...e._contentClassNames);let d=s.querySelectorAll(e._cellSelector);for(let m=0;m=e.end||t!=="vertical")return 0;let i=this.viewChange.value,r=this._rowOutlet.viewContainer;e.starti.end;let s=e.start-i.start,d=e.end-e.start,m,u;for(let b=0;b-1;b--){let y=r.get(b+s);if(y&&y.rootNodes.length){u=y.rootNodes[y.rootNodes.length-1];break}}let h=m?.getBoundingClientRect?.(),v=u?.getBoundingClientRect?.();return h&&v?v.bottom-h.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,i,r){if(t&1&&Xi(r,_8,5)(r,Fp,5)(r,q1,5)(r,j0,5)(r,gE,5),t&2){let s;gt(s=ht())&&(i._noDataRow=s.first),gt(s=ht())&&(i._contentColumnDefs=s),gt(s=ht())&&(i._contentRowDefs=s),gt(s=ht())&&(i._contentHeaderRowDefs=s),gt(s=ht())&&(i._contentFooterRowDefs=s)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,i){t&2&&se("cdk-table-fixed-layout",i.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",At],fixedLayout:[2,"fixedLayout","fixedLayout",At],recycleRows:[2,"recycleRows","recycleRows",At]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[un([{provide:oc,useExisting:n},{provide:B0,useValue:null}])],ngContentSelectors:fee,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,i){t&1&&(ci(_ee),Zt(0),Zt(1,1),E(2,Cee,1,0),E(3,vee,7,0)(4,xee,4,0)),t&2&&(p(2),O(i._isServer?2:-1),p(),O(i._isNativeHtmlTable?3:4))},dependencies:[CE,fE,xE,vE],styles:[`.cdk-table-fixed-layout { table-layout: fixed; } `],encapsulation:2})}return n})();function H1(n,o){return n.concat(Array.from(o))}function m8(n,o){let e=o.toUpperCase(),t=n.viewContainer.element.nativeElement;for(;t;){let i=t.nodeType===1?t.nodeName:null;if(i===e)return t;if(i==="TABLE")break;t=t.parentNode}return null}var Q1=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({imports:[bA]})}return n})();var f8=["*"],bee=["content"],wee=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],Mee=["mat-drawer","mat-drawer-content","*"];function See(n,o){if(n&1){let e=L();a(0,"div",1),_("click",function(){w(e);let i=g();return M(i._onBackdropClicked())}),l()}if(n&2){let e=g();se("mat-drawer-shown",e._isShowingBackdrop())}}function kee(n,o){n&1&&(a(0,"mat-drawer-content"),Zt(1,2),l())}var Pee=new mn("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:()=>!1}),C8=new mn("MAT_DRAWER_CONTAINER"),$0=(()=>{class n extends Lv{_platform=f(Vr);_changeDetectorRef=f(ie);_container=f(wE);constructor(){let e=f(Qt),t=f(Dk),i=f(Ki);super(e,t,i)}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}_shouldBeHidden(){if(this._platform.isBrowser)return!1;let{start:e,end:t}=this._container;return e!=null&&e.mode!=="over"&&e.opened||t!=null&&t.mode!=="over"&&t.opened}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:6,hostBindings:function(t,i){t&2&&(Ot("margin-left",i._container._contentMargins.left,"px")("margin-right",i._container._contentMargins.right,"px"),se("mat-drawer-content-hidden",i._shouldBeHidden()))},features:[un([{provide:Lv,useExisting:n}]),li],ngContentSelectors:f8,decls:1,vars:0,template:function(t,i){t&1&&(ci(),Zt(0))},encapsulation:2,changeDetection:0})}return n})(),bE=(()=>{class n{_elementRef=f(Qt);_focusTrapFactory=f(zA);_focusMonitor=f(ms);_platform=f(Vr);_ngZone=f(Ki);_renderer=f(Ui);_interactivityChecker=f(LA);_doc=f(Eo);_container=f(C8,{optional:!0});_focusTrap=null;_elementFocusedBeforeDrawerWasOpened=null;_eventCleanups;_isAttached=!1;_anchor=null;get position(){return this._position}set position(e){e=e==="end"?"end":"start",e!==this._position&&(this._isAttached&&this._updatePositionInParent(e),this._position=e,this.onPositionChanged.emit())}_position="start";get mode(){return this._mode}set mode(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}_mode="over";get disableClose(){return this._disableClose}set disableClose(e){this._disableClose=Pa(e)}_disableClose=!1;get autoFocus(){let e=this._autoFocus;return e??(this.mode==="side"?"dialog":"first-tabbable")}set autoFocus(e){(e==="true"||e==="false"||e==null)&&(e=Pa(e)),this._autoFocus=e}_autoFocus;get opened(){return this._opened()}set opened(e){this.toggle(Pa(e))}_opened=R(!1);_openedVia=null;_animationStarted=new Ye;_animationEnd=new Ye;openedChange=new ve(!0);_openedStream=this.openedChange.pipe(oo(e=>e),Pt(()=>{}));openedStart=this._animationStarted.pipe(oo(()=>this.opened),of(void 0));_closedStream=this.openedChange.pipe(oo(e=>!e),Pt(()=>{}));closedStart=this._animationStarted.pipe(oo(()=>!this.opened),of(void 0));_destroyed=new Ye;onPositionChanged=new ve;_content;_modeChanged=new Ye;_injector=f(Cr);_changeDetectorRef=f(ie);constructor(){this.openedChange.pipe($e(this._destroyed)).subscribe(e=>{e?(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement,this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._eventCleanups=this._ngZone.runOutsideAngular(()=>{let e=this._renderer,t=this._elementRef.nativeElement;return[e.listen(t,"keydown",i=>{i.keyCode===27&&!this.disableClose&&!ds(i)&&this._ngZone.run(()=>{this.close(),i.stopPropagation(),i.preventDefault()})}),e.listen(t,"transitionend",this._handleTransitionEvent),e.listen(t,"transitioncancel",this._handleTransitionEvent)]}),this._animationEnd.subscribe(()=>{this.openedChange.emit(this.opened)})}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{r(),s(),e.removeAttribute("tabindex")},r=this._renderer.listen(e,"blur",i),s=this._renderer.listen(e,"mousedown",i)})),e.focus(t)}_focusByCssSelector(e,t){let i=this._elementRef.nativeElement.querySelector(e);i&&this._forceFocus(i,t)}_takeFocus(){if(!this._focusTrap)return;let e=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":Kr(()=>{!this._focusTrap.focusInitialElement()&&typeof e.focus=="function"&&e.focus()},{injector:this._injector});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus);break}}_restoreFocus(e){this.autoFocus!=="dialog"&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,e):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){let e=this._doc.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterViewInit(){this._isAttached=!0,this._position==="end"&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngOnDestroy(){this._eventCleanups.forEach(e=>e()),this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(e){return this.toggle(!0,e)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(e=!this.opened,t){e&&t&&(this._openedVia=t);let i=this._setOpen(e,!e&&this._isFocusWithinDrawer(),this._openedVia||"program");return e||(this._openedVia=null),i}_setOpen(e,t,i){return e===this.opened?Promise.resolve(e?"open":"close"):(this._opened.set(e),this._container?._transitionsEnabled?(this._setIsAnimating(!0),setTimeout(()=>this._animationStarted.next())):setTimeout(()=>{this._animationStarted.next(),this._animationEnd.next()}),this._elementRef.nativeElement.classList.toggle("mat-drawer-opened",e),!e&&t&&this._restoreFocus(i),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(r=>{this.openedChange.pipe($a(1)).subscribe(s=>r(s?"open":"close"))}))}_setIsAnimating(e){this._elementRef.nativeElement.classList.toggle("mat-drawer-animating",e)}_getWidth(){return this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&!!this._container?._isShowingBackdrop())}_updatePositionInParent(e){if(!this._platform.isBrowser)return;let t=this._elementRef.nativeElement,i=t.parentNode;e==="end"?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),i.insertBefore(this._anchor,t)),i.appendChild(t)):this._anchor&&this._anchor.parentNode.insertBefore(t,this._anchor)}_handleTransitionEvent=e=>{let t=this._elementRef.nativeElement;e.target===t&&this._ngZone.run(()=>{e.type==="transitionend"&&this._setIsAnimating(!1),this._animationEnd.next(e)})};static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["mat-drawer"]],viewQuery:function(t,i){if(t&1&&Gn(bee,5),t&2){let r;gt(r=ht())&&(i._content=r.first)}},hostAttrs:[1,"mat-drawer"],hostVars:12,hostBindings:function(t,i){t&2&&(Ve("align",null)("tabIndex",i.mode!=="side"?"-1":null),Ot("visibility",!i._container&&!i.opened?"hidden":null),se("mat-drawer-end",i.position==="end")("mat-drawer-over",i.mode==="over")("mat-drawer-push",i.mode==="push")("mat-drawer-side",i.mode==="side"))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:f8,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(t,i){t&1&&(ci(),a(0,"div",1,0),Zt(2),l())},dependencies:[Lv],encapsulation:2,changeDetection:0})}return n})(),wE=(()=>{class n{_dir=f(Ua,{optional:!0});_element=f(Qt);_ngZone=f(Ki);_changeDetectorRef=f(ie);_animationDisabled=Br();_transitionsEnabled=!1;_allDrawers;_drawers=new Zl;_content;_userContent;get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(e){this._autosize=Pa(e)}_autosize=f(Pee);get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(e){this._backdropOverride=e==null?null:Pa(e)}_backdropOverride=null;backdropClick=new ve;_start=null;_end=null;_left=null;_right=null;_destroyed=new Ye;_doCheckSubject=new Ye;_contentMargins={left:null,right:null};_contentMarginChanges=new Ye;get scrollable(){return this._userContent||this._content}_injector=f(Cr);constructor(){let e=f(Vr),t=f(wd);this._dir?.change.pipe($e(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),t.change().pipe($e(this._destroyed)).subscribe(()=>this.updateContentMargins()),!this._animationDisabled&&e.isBrowser&&this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._element.nativeElement.classList.add("mat-drawer-transition"),this._transitionsEnabled=!0},200)})}ngAfterContentInit(){this._allDrawers.changes.pipe(Oi(this._allDrawers),$e(this._destroyed)).subscribe(e=>{this._drawers.reset(e.filter(t=>!t._container||t._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Oi(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(e=>{this._watchDrawerToggle(e),this._watchDrawerPosition(e),this._watchDrawerMode(e)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Ju(10),$e(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(e=>e.open())}close(){this._drawers.forEach(e=>e.close())}updateContentMargins(){let e=0,t=0;if(this._left&&this._left.opened){if(this._left.mode=="side")e+=this._left._getWidth();else if(this._left.mode=="push"){let i=this._left._getWidth();e+=i,t-=i}}if(this._right&&this._right.opened){if(this._right.mode=="side")t+=this._right._getWidth();else if(this._right.mode=="push"){let i=this._right._getWidth();t+=i,e-=i}}e=e||null,t=t||null,(e!==this._contentMargins.left||t!==this._contentMargins.right)&&(this._contentMargins={left:e,right:t},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(e){e._animationStarted.pipe($e(this._drawers.changes)).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),e.mode!=="side"&&e.openedChange.pipe($e(this._drawers.changes)).subscribe(()=>this._setContainerClass(e.opened))}_watchDrawerPosition(e){e.onPositionChanged.pipe($e(this._drawers.changes)).subscribe(()=>{Kr({read:()=>this._validateDrawers()},{injector:this._injector})})}_watchDrawerMode(e){e._modeChanged.pipe($e(io(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(e){let t=this._element.nativeElement.classList,i="mat-drawer-container-has-open";e?t.add(i):t.remove(i)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(e=>{e.position=="end"?(this._end!=null,this._end=e):(this._start!=null,this._start=e)}),this._right=this._left=null,this._dir&&this._dir.value==="rtl"?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&this._start.mode!="over"||this._isDrawerOpen(this._end)&&this._end.mode!="over"}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(e=>e&&!e.disableClose&&this._drawerHasBackdrop(e)).forEach(e=>e._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(e){return e!=null&&e.opened}_drawerHasBackdrop(e){return this._backdropOverride==null?!!e&&e.mode!=="side":this._backdropOverride}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["mat-drawer-container"]],contentQueries:function(t,i,r){if(t&1&&Xi(r,$0,5)(r,bE,5),t&2){let s;gt(s=ht())&&(i._content=s.first),gt(s=ht())&&(i._allDrawers=s)}},viewQuery:function(t,i){if(t&1&&Gn($0,5),t&2){let r;gt(r=ht())&&(i._userContent=r.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(t,i){t&2&&se("mat-drawer-container-explicit-backdrop",i._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[un([{provide:C8,useExisting:n}])],ngContentSelectors:Mee,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(t,i){t&1&&(ci(wee),E(0,See,1,2,"div",0),Zt(1),Zt(2,1),E(3,kee,2,0,"mat-drawer-content")),t&2&&(O(i.hasBackdrop?0:-1),p(3),O(i._content?-1:3))},dependencies:[$0],styles:[`.mat-drawer-container { position: relative; z-index: 1; color: var(--mat-sidenav-content-text-color, var(--mat-sys-on-background)); background-color: var(--mat-sidenav-content-background-color, var(--mat-sys-background)); box-sizing: border-box; display: block; overflow: hidden; } .mat-drawer-container[fullscreen] { top: 0; left: 0; right: 0; bottom: 0; position: absolute; } .mat-drawer-container[fullscreen].mat-drawer-container-has-open { overflow: hidden; } .mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side { z-index: 3; } .mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop, .mat-drawer-container.ng-animate-disabled .mat-drawer-content, .ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop, .ng-animate-disabled .mat-drawer-container .mat-drawer-content { transition: none; } .mat-drawer-backdrop { top: 0; left: 0; right: 0; bottom: 0; position: absolute; display: block; z-index: 3; visibility: hidden; } .mat-drawer-backdrop.mat-drawer-shown { visibility: visible; background-color: var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent)); } .mat-drawer-transition .mat-drawer-backdrop { transition-duration: 400ms; transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1); transition-property: background-color, visibility; } @media (forced-colors: active) { .mat-drawer-backdrop { opacity: 0.5; } } .mat-drawer-content { position: relative; z-index: 1; display: block; height: 100%; overflow: auto; } .mat-drawer-content.mat-drawer-content-hidden { opacity: 0; } .mat-drawer-transition .mat-drawer-content { transition-duration: 400ms; transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1); transition-property: transform, margin-left, margin-right; } .mat-drawer { position: relative; z-index: 4; color: var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant)); box-shadow: var(--mat-sidenav-container-elevation-shadow, none); background-color: var(--mat-sidenav-container-background-color, var(--mat-sys-surface)); border-top-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large)); border-bottom-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large)); width: var(--mat-sidenav-container-width, 360px); display: block; position: absolute; top: 0; bottom: 0; z-index: 3; outline: 0; box-sizing: border-box; overflow-y: auto; transform: translate3d(-100%, 0, 0); } @media (forced-colors: active) { .mat-drawer, [dir=rtl] .mat-drawer.mat-drawer-end { border-right: solid 1px currentColor; } } @media (forced-colors: active) { [dir=rtl] .mat-drawer, .mat-drawer.mat-drawer-end { border-left: solid 1px currentColor; border-right: none; } } .mat-drawer.mat-drawer-side { z-index: 2; } .mat-drawer.mat-drawer-end { right: 0; transform: translate3d(100%, 0, 0); border-top-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large)); border-bottom-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large)); border-top-right-radius: 0; border-bottom-right-radius: 0; } [dir=rtl] .mat-drawer { border-top-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large)); border-bottom-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large)); border-top-right-radius: 0; border-bottom-right-radius: 0; transform: translate3d(100%, 0, 0); } [dir=rtl] .mat-drawer.mat-drawer-end { border-top-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large)); border-bottom-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large)); border-top-left-radius: 0; border-bottom-left-radius: 0; left: 0; right: auto; transform: translate3d(-100%, 0, 0); } .mat-drawer-transition .mat-drawer { transition: transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1); } .mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) { visibility: hidden; box-shadow: none; } .mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container { display: none; } .mat-drawer.mat-drawer-opened.mat-drawer-opened { transform: none; } .mat-drawer-side { box-shadow: none; border-right-color: var(--mat-sidenav-container-divider-color, transparent); border-right-width: 1px; border-right-style: solid; } .mat-drawer-side.mat-drawer-end { border-left-color: var(--mat-sidenav-container-divider-color, transparent); border-left-width: 1px; border-left-style: solid; border-right: none; } [dir=rtl] .mat-drawer-side { border-left-color: var(--mat-sidenav-container-divider-color, transparent); border-left-width: 1px; border-left-style: solid; border-right: none; } [dir=rtl] .mat-drawer-side.mat-drawer-end { border-right-color: var(--mat-sidenav-container-divider-color, transparent); border-right-width: 1px; border-right-style: solid; border-left: none; } .mat-drawer-inner-container { width: 100%; height: 100%; overflow: auto; } .mat-sidenav-fixed { position: fixed; } `],encapsulation:2,changeDetection:0})}return n})();var X1=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({imports:[Nm,zi,Nm]})}return n})();var bi=(function(n){return n[n.State=0]="State",n[n.Transition=1]="Transition",n[n.Sequence=2]="Sequence",n[n.Group=3]="Group",n[n.Animate=4]="Animate",n[n.Keyframes=5]="Keyframes",n[n.Style=6]="Style",n[n.Trigger=7]="Trigger",n[n.Reference=8]="Reference",n[n.AnimateChild=9]="AnimateChild",n[n.AnimateRef=10]="AnimateRef",n[n.Query=11]="Query",n[n.Stagger=12]="Stagger",n})(bi||{}),rc="*";function v8(n,o=null){return{type:bi.Sequence,steps:n,options:o}}function ME(n){return{type:bi.Style,styles:n,offset:null}}var Rd=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(o=0,e=0){this.totalTime=o+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}onStart(o){this._originalOnStartFns.push(o),this._onStartFns.push(o)}onDone(o){this._originalOnDoneFns.push(o),this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(o=>o()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(o){this._position=this.totalTime?o*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(o){let e=o=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},rh=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(o){this.players=o;let e=0,t=0,i=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==r&&this._onFinish()}),s.onDestroy(()=>{++t==r&&this._onDestroy()}),s.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((s,d)=>Math.max(s,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}init(){this.players.forEach(o=>o.init())}onStart(o){this._onStartFns.push(o)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(o=>o()),this._onStartFns=[])}onDone(o){this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(o=>o.play())}pause(){this.players.forEach(o=>o.pause())}restart(){this.players.forEach(o=>o.restart())}finish(){this._onFinish(),this.players.forEach(o=>o.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(o=>o.destroy()),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}reset(){this.players.forEach(o=>o.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(o){let e=o*this.totalTime;this.players.forEach(t=>{let i=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(i)})}getPosition(){let o=this.players.reduce((e,t)=>e===null||t.totalTime>e.totalTime?t:e,null);return o!=null?o.getPosition():0}beforeDestroy(){this.players.forEach(o=>{o.beforeDestroy&&o.beforeDestroy()})}triggerCallback(o){let e=o=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},H0="!";function x8(n){return new Di(3e3,!1)}function Eee(){return new Di(3100,!1)}function Oee(){return new Di(3101,!1)}function Dee(n){return new Di(3001,!1)}function Iee(n){return new Di(3003,!1)}function Aee(n){return new Di(3004,!1)}function b8(n,o){return new Di(3005,!1)}function w8(){return new Di(3006,!1)}function M8(){return new Di(3007,!1)}function S8(n,o){return new Di(3008,!1)}function k8(n){return new Di(3002,!1)}function P8(n,o,e,t,i){return new Di(3010,!1)}function T8(){return new Di(3011,!1)}function E8(){return new Di(3012,!1)}function O8(){return new Di(3200,!1)}function D8(){return new Di(3202,!1)}function I8(){return new Di(3013,!1)}function A8(n){return new Di(3014,!1)}function N8(n){return new Di(3015,!1)}function F8(n){return new Di(3016,!1)}function R8(n,o){return new Di(3404,!1)}function Nee(n){return new Di(3502,!1)}function L8(n){return new Di(3503,!1)}function z8(){return new Di(3300,!1)}function V8(n){return new Di(3504,!1)}function B8(n){return new Di(3301,!1)}function j8(n,o){return new Di(3302,!1)}function $8(n){return new Di(3303,!1)}function H8(n,o){return new Di(3400,!1)}function U8(n){return new Di(3401,!1)}function W8(n){return new Di(3402,!1)}function G8(n,o){return new Di(3505,!1)}function Ld(n){switch(n.length){case 0:return new Rd;case 1:return n[0];default:return new rh(n)}}function TE(n,o,e=new Map,t=new Map){let i=[],r=[],s=-1,d=null;if(o.forEach(m=>{let u=m.get("offset"),h=u==s,v=h&&d||new Map;m.forEach((b,y)=>{let x=y,P=b;if(y!=="offset")switch(x=n.normalizePropertyName(x,i),P){case H0:P=e.get(y);break;case rc:P=t.get(y);break;default:P=n.normalizeStyleValue(y,x,P,i);break}v.set(x,P)}),h||r.push(v),d=v,s=u}),i.length)throw Nee(i);return r}function Y1(n,o,e,t){switch(o){case"start":n.onStart(()=>t(e&&SE(e,"start",n)));break;case"done":n.onDone(()=>t(e&&SE(e,"done",n)));break;case"destroy":n.onDestroy(()=>t(e&&SE(e,"destroy",n)));break}}function SE(n,o,e){let t=e.totalTime,i=!!e.disabled,r=Z1(n.element,n.triggerName,n.fromState,n.toState,o||n.phaseName,t??n.totalTime,i),s=n._data;return s!=null&&(r._data=s),r}function Z1(n,o,e,t,i="",r=0,s){return{element:n,triggerName:o,fromState:e,toState:t,phaseName:i,totalTime:r,disabled:!!s}}function Ss(n,o,e){let t=n.get(o);return t||n.set(o,t=e),t}function EE(n){let o=n.indexOf(":"),e=n.substring(1,o),t=n.slice(o+1);return[e,t]}var Fee=typeof document>"u"?null:document.documentElement;function J1(n){let o=n.parentNode||n.host||null;return o===Fee?null:o}function Ree(n){return n.substring(1,6)=="ebkit"}var fu=null,y8=!1;function q8(n){fu||(fu=Lee()||{},y8=fu.style?"WebkitAppearance"in fu.style:!1);let o=!0;return fu.style&&!Ree(n)&&(o=n in fu.style,!o&&y8&&(o="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in fu.style)),o}function Lee(){return typeof document<"u"?document.body:null}function OE(n,o){for(;o;){if(o===n)return!0;o=J1(o)}return!1}function DE(n,o,e){if(e)return Array.from(n.querySelectorAll(o));let t=n.querySelector(o);return t?[t]:[]}var zee=1e3,IE="{{",Vee="}}",AE="ng-enter",ey="ng-leave",U0="ng-trigger",W0=".ng-trigger",NE="ng-animating",ty=".ng-animating";function Uc(n){if(typeof n=="number")return n;let o=n.match(/^(-?[\.\d]+)(m?s)/);return!o||o.length<2?0:kE(parseFloat(o[1]),o[2])}function kE(n,o){return o==="s"?n*zee:n}function G0(n,o,e){return n.hasOwnProperty("duration")?n:jee(n,o,e)}var Bee=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function jee(n,o,e){let t,i=0,r="";if(typeof n=="string"){let s=n.match(Bee);if(s===null)return o.push(x8(n)),{duration:0,delay:0,easing:""};t=kE(parseFloat(s[1]),s[2]);let d=s[3];d!=null&&(i=kE(parseFloat(d),s[4]));let m=s[5];m&&(r=m)}else t=n;if(!e){let s=!1,d=o.length;t<0&&(o.push(Eee()),s=!0),i<0&&(o.push(Oee()),s=!0),s&&o.splice(d,0,x8(n))}return{duration:t,delay:i,easing:r}}function Q8(n){return n.length?n[0]instanceof Map?n:n.map(o=>new Map(Object.entries(o))):[]}function ac(n,o,e){o.forEach((t,i)=>{let r=ny(i);e&&!e.has(i)&&e.set(i,n.style[r]),n.style[r]=t})}function Rp(n,o){o.forEach((e,t)=>{let i=ny(t);n.style[i]=""})}function ah(n){return Array.isArray(n)?n.length==1?n[0]:v8(n):n}function K8(n,o,e){let t=o.params||{},i=FE(n);i.length&&i.forEach(r=>{t.hasOwnProperty(r)||e.push(Dee(r))})}var PE=new RegExp(`${IE}\\s*(.+?)\\s*${Vee}`,"g");function FE(n){let o=[];if(typeof n=="string"){let e;for(;e=PE.exec(n);)o.push(e[1]);PE.lastIndex=0}return o}function sh(n,o,e){let t=`${n}`,i=t.replace(PE,(r,s)=>{let d=o[s];return d==null&&(e.push(Iee(s)),d=""),d.toString()});return i==t?n:i}var $ee=/-+([a-z0-9])/g;function ny(n){return n.replace($ee,(...o)=>o[1].toUpperCase())}function X8(n,o){return n===0||o===0}function Y8(n,o,e){if(e.size&&o.length){let t=o[0],i=[];if(e.forEach((r,s)=>{t.has(s)||i.push(s),t.set(s,r)}),i.length)for(let r=1;rs.set(d,iy(n,d)))}}return o}function ks(n,o,e){switch(o.type){case bi.Trigger:return n.visitTrigger(o,e);case bi.State:return n.visitState(o,e);case bi.Transition:return n.visitTransition(o,e);case bi.Sequence:return n.visitSequence(o,e);case bi.Group:return n.visitGroup(o,e);case bi.Animate:return n.visitAnimate(o,e);case bi.Keyframes:return n.visitKeyframes(o,e);case bi.Style:return n.visitStyle(o,e);case bi.Reference:return n.visitReference(o,e);case bi.AnimateChild:return n.visitAnimateChild(o,e);case bi.AnimateRef:return n.visitAnimateRef(o,e);case bi.Query:return n.visitQuery(o,e);case bi.Stagger:return n.visitStagger(o,e);default:throw Aee(o.type)}}function iy(n,o){return window.getComputedStyle(n)[o]}var ZE=(()=>{class n{validateStyleProperty(e){return q8(e)}containsElement(e,t){return OE(e,t)}getParentElement(e){return J1(e)}query(e,t,i){return DE(e,t,i)}computeStyle(e,t,i){return i||""}animate(e,t,i,r,s,d=[],m){return new Rd(i,r)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})(),vu=class{static NOOP=new ZE},xu=class{};var Hee=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"]),ly=class extends xu{normalizePropertyName(o,e){return ny(o)}normalizeStyleValue(o,e,t,i){let r="",s=t.toString().trim();if(Hee.has(e)&&t!==0&&t!=="0")if(typeof t=="number")r="px";else{let d=t.match(/^[+-]?[\d\.]+([a-z]*)$/);d&&d[1].length==0&&i.push(b8(o,t))}return s+r}};var cy="*";function Uee(n,o){let e=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(t=>Wee(t,e,o)):e.push(n),e}function Wee(n,o,e){if(n[0]==":"){let m=Gee(n,e);if(typeof m=="function"){o.push(m);return}n=m}let t=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return e.push(N8(n)),o;let i=t[1],r=t[2],s=t[3];o.push(Z8(i,s));let d=i==cy&&s==cy;r[0]=="<"&&!d&&o.push(Z8(s,i))}function Gee(n,o){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t) *"}}var oy=new Set(["true","1"]),ry=new Set(["false","0"]);function Z8(n,o){let e=oy.has(n)||ry.has(n),t=oy.has(o)||ry.has(o);return(i,r)=>{let s=n==cy||n==i,d=o==cy||o==r;return!s&&e&&typeof i=="boolean"&&(s=i?oy.has(n):ry.has(n)),!d&&t&&typeof r=="boolean"&&(d=r?oy.has(o):ry.has(o)),s&&d}}var lR=":self",qee=new RegExp(`s*${lR}s*,?`,"g");function cR(n,o,e,t){return new jE(n).build(o,e,t)}var J8="",jE=class{_driver;constructor(o){this._driver=o}build(o,e,t){let i=new $E(e);return this._resetContextStyleTimingState(i),ks(this,ah(o),i)}_resetContextStyleTimingState(o){o.currentQuerySelector=J8,o.collectedStyles=new Map,o.collectedStyles.set(J8,new Map),o.currentTime=0}visitTrigger(o,e){let t=e.queryCount=0,i=e.depCount=0,r=[],s=[];return o.name.charAt(0)=="@"&&e.errors.push(w8()),o.definitions.forEach(d=>{if(this._resetContextStyleTimingState(e),d.type==bi.State){let m=d,u=m.name;u.toString().split(/\s*,\s*/).forEach(h=>{m.name=h,r.push(this.visitState(m,e))}),m.name=u}else if(d.type==bi.Transition){let m=this.visitTransition(d,e);t+=m.queryCount,i+=m.depCount,s.push(m)}else e.errors.push(M8())}),{type:bi.Trigger,name:o.name,states:r,transitions:s,queryCount:t,depCount:i,options:null}}visitState(o,e){let t=this.visitStyle(o.styles,e),i=o.options&&o.options.params||null;if(t.containsDynamicStyles){let r=new Set,s=i||{};t.styles.forEach(d=>{d instanceof Map&&d.forEach(m=>{FE(m).forEach(u=>{s.hasOwnProperty(u)||r.add(u)})})}),r.size&&e.errors.push(S8(o.name,[...r.values()]))}return{type:bi.State,name:o.name,style:t,options:i?{params:i}:null}}visitTransition(o,e){e.queryCount=0,e.depCount=0;let t=ks(this,ah(o.animation),e),i=Uee(o.expr,e.errors);return{type:bi.Transition,matchers:i,animation:t,queryCount:e.queryCount,depCount:e.depCount,options:Cu(o.options)}}visitSequence(o,e){return{type:bi.Sequence,steps:o.steps.map(t=>ks(this,t,e)),options:Cu(o.options)}}visitGroup(o,e){let t=e.currentTime,i=0,r=o.steps.map(s=>{e.currentTime=t;let d=ks(this,s,e);return i=Math.max(i,e.currentTime),d});return e.currentTime=i,{type:bi.Group,steps:r,options:Cu(o.options)}}visitAnimate(o,e){let t=Yee(o.timings,e.errors);e.currentAnimateTimings=t;let i,r=o.styles?o.styles:ME({});if(r.type==bi.Keyframes)i=this.visitKeyframes(r,e);else{let s=o.styles,d=!1;if(!s){d=!0;let u={};t.easing&&(u.easing=t.easing),s=ME(u)}e.currentTime+=t.duration+t.delay;let m=this.visitStyle(s,e);m.isEmptyStep=d,i=m}return e.currentAnimateTimings=null,{type:bi.Animate,timings:t,style:i,options:null}}visitStyle(o,e){let t=this._makeStyleAst(o,e);return this._validateStyleAst(t,e),t}_makeStyleAst(o,e){let t=[],i=Array.isArray(o.styles)?o.styles:[o.styles];for(let d of i)typeof d=="string"?d===rc?t.push(d):e.errors.push(k8(d)):t.push(new Map(Object.entries(d)));let r=!1,s=null;return t.forEach(d=>{if(d instanceof Map&&(d.has("easing")&&(s=d.get("easing"),d.delete("easing")),!r)){for(let m of d.values())if(m.toString().indexOf(IE)>=0){r=!0;break}}}),{type:bi.Style,styles:t,easing:s,offset:o.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(o,e){let t=e.currentAnimateTimings,i=e.currentTime,r=e.currentTime;t&&r>0&&(r-=t.duration+t.delay),o.styles.forEach(s=>{typeof s!="string"&&s.forEach((d,m)=>{let u=e.collectedStyles.get(e.currentQuerySelector),h=u.get(m),v=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(e.errors.push(P8(m,h.startTime,h.endTime,r,i)),v=!1),r=h.startTime),v&&u.set(m,{startTime:r,endTime:i}),e.options&&K8(d,e.options,e.errors)})})}visitKeyframes(o,e){let t={type:bi.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(T8()),t;let i=1,r=0,s=[],d=!1,m=!1,u=0,h=o.steps.map(S=>{let T=this._makeStyleAst(S,e),A=T.offset!=null?T.offset:Xee(T.styles),D=0;return A!=null&&(r++,D=T.offset=A),m=m||D<0||D>1,d=d||D0&&r{let A=b>0?T==y?1:b*T:s[T],D=A*k;e.currentTime=x+P.delay+D,P.duration=D,this._validateStyleAst(S,e),S.offset=A,t.styles.push(S)}),t}visitReference(o,e){return{type:bi.Reference,animation:ks(this,ah(o.animation),e),options:Cu(o.options)}}visitAnimateChild(o,e){return e.depCount++,{type:bi.AnimateChild,options:Cu(o.options)}}visitAnimateRef(o,e){return{type:bi.AnimateRef,animation:this.visitReference(o.animation,e),options:Cu(o.options)}}visitQuery(o,e){let t=e.currentQuerySelector,i=o.options||{};e.queryCount++,e.currentQuery=o;let[r,s]=Qee(o.selector);e.currentQuerySelector=t.length?t+" "+r:r,Ss(e.collectedStyles,e.currentQuerySelector,new Map);let d=ks(this,ah(o.animation),e);return e.currentQuery=null,e.currentQuerySelector=t,{type:bi.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:d,originalSelector:o.selector,options:Cu(o.options)}}visitStagger(o,e){e.currentQuery||e.errors.push(I8());let t=o.timings==="full"?{duration:0,delay:0,easing:"full"}:G0(o.timings,e.errors,!0);return{type:bi.Stagger,animation:ks(this,ah(o.animation),e),timings:t,options:null}}};function Qee(n){let o=!!n.split(/\s*,\s*/).find(e=>e==lR);return o&&(n=n.replace(qee,"")),n=n.replace(/@\*/g,W0).replace(/@\w+/g,e=>W0+"-"+e.slice(1)).replace(/:animating/g,ty),[n,o]}function Kee(n){return n?q({},n):null}var $E=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(o){this.errors=o}};function Xee(n){if(typeof n=="string")return null;let o=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){let t=e;o=parseFloat(t.get("offset")),t.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let e=n;o=parseFloat(e.get("offset")),e.delete("offset")}return o}function Yee(n,o){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=G0(n,o).duration;return RE(r,0,"")}let e=n;if(e.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=RE(0,0,"");return r.dynamic=!0,r.strValue=e,r}let i=G0(e,o);return RE(i.duration,i.delay,i.easing)}function Cu(n){return n?(n=q({},n),n.params&&(n.params=Kee(n.params))):n={},n}function RE(n,o,e){return{duration:n,delay:o,easing:e}}function JE(n,o,e,t,i,r,s=null,d=!1){return{type:1,element:n,keyframes:o,preStyleProps:e,postStyleProps:t,duration:i,delay:r,totalTime:i+r,easing:s,subTimeline:d}}var Q0=class{_map=new Map;get(o){return this._map.get(o)||[]}append(o,e){let t=this._map.get(o);t||this._map.set(o,t=[]),t.push(...e)}has(o){return this._map.has(o)}clear(){this._map.clear()}},Zee=1,Jee=":enter",ete=new RegExp(Jee,"g"),tte=":leave",nte=new RegExp(tte,"g");function dR(n,o,e,t,i,r=new Map,s=new Map,d,m,u=[]){return new HE().buildKeyframes(n,o,e,t,i,r,s,d,m,u)}var HE=class{buildKeyframes(o,e,t,i,r,s,d,m,u,h=[]){u=u||new Q0;let v=new UE(o,e,u,i,r,h,[]);v.options=m;let b=m.delay?Uc(m.delay):0;v.currentTimeline.delayNextStep(b),v.currentTimeline.setStyles([s],null,v.errors,m),ks(this,t,v);let y=v.timelines.filter(x=>x.containsAnimation());if(y.length&&d.size){let x;for(let P=y.length-1;P>=0;P--){let k=y[P];if(k.element===e){x=k;break}}x&&!x.allowOnlyTimelineStyles()&&x.setStyles([d],null,v.errors,m)}return y.length?y.map(x=>x.buildKeyframes()):[JE(e,[],[],[],0,b,"",!1)]}visitTrigger(o,e){}visitState(o,e){}visitTransition(o,e){}visitAnimateChild(o,e){let t=e.subInstructions.get(e.element);if(t){let i=e.createSubContext(o.options),r=e.currentTimeline.currentTime,s=this._visitSubInstructions(t,i,i.options);r!=s&&e.transformIntoNewTimeline(s)}e.previousNode=o}visitAnimateRef(o,e){let t=e.createSubContext(o.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([o.options,o.animation.options],e,t),this.visitReference(o.animation,t),e.transformIntoNewTimeline(t.currentTimeline.currentTime),e.previousNode=o}_applyAnimationRefDelays(o,e,t){for(let i of o){let r=i?.delay;if(r){let s=typeof r=="number"?r:Uc(sh(r,i?.params??{},e.errors));t.delayNextStep(s)}}}_visitSubInstructions(o,e,t){let r=e.currentTimeline.currentTime,s=t.duration!=null?Uc(t.duration):null,d=t.delay!=null?Uc(t.delay):null;return s!==0&&o.forEach(m=>{let u=e.appendInstructionToTimeline(m,s,d);r=Math.max(r,u.duration+u.delay)}),r}visitReference(o,e){e.updateOptions(o.options,!0),ks(this,o.animation,e),e.previousNode=o}visitSequence(o,e){let t=e.subContextCount,i=e,r=o.options;if(r&&(r.params||r.delay)&&(i=e.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==bi.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=dy);let s=Uc(r.delay);i.delayNextStep(s)}o.steps.length&&(o.steps.forEach(s=>ks(this,s,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>t&&i.transformIntoNewTimeline()),e.previousNode=o}visitGroup(o,e){let t=[],i=e.currentTimeline.currentTime,r=o.options&&o.options.delay?Uc(o.options.delay):0;o.steps.forEach(s=>{let d=e.createSubContext(o.options);r&&d.delayNextStep(r),ks(this,s,d),i=Math.max(i,d.currentTimeline.currentTime),t.push(d.currentTimeline)}),t.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(i),e.previousNode=o}_visitTiming(o,e){if(o.dynamic){let t=o.strValue,i=e.params?sh(t,e.params,e.errors):t;return G0(i,e.errors)}else return{duration:o.duration,delay:o.delay,easing:o.easing}}visitAnimate(o,e){let t=e.currentAnimateTimings=this._visitTiming(o.timings,e),i=e.currentTimeline;t.delay&&(e.incrementTime(t.delay),i.snapshotCurrentStyles());let r=o.style;r.type==bi.Keyframes?this.visitKeyframes(r,e):(e.incrementTime(t.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=o}visitStyle(o,e){let t=e.currentTimeline,i=e.currentAnimateTimings;!i&&t.hasCurrentStyleProperties()&&t.forwardFrame();let r=i&&i.easing||o.easing;o.isEmptyStep?t.applyEmptyStep(r):t.setStyles(o.styles,r,e.errors,e.options),e.previousNode=o}visitKeyframes(o,e){let t=e.currentAnimateTimings,i=e.currentTimeline.duration,r=t.duration,d=e.createSubContext().currentTimeline;d.easing=t.easing,o.styles.forEach(m=>{let u=m.offset||0;d.forwardTime(u*r),d.setStyles(m.styles,m.easing,e.errors,e.options),d.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(d),e.transformIntoNewTimeline(i+r),e.previousNode=o}visitQuery(o,e){let t=e.currentTimeline.currentTime,i=o.options||{},r=i.delay?Uc(i.delay):0;r&&(e.previousNode.type===bi.Style||t==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=dy);let s=t,d=e.invokeQuery(o.selector,o.originalSelector,o.limit,o.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=d.length;let m=null;d.forEach((u,h)=>{e.currentQueryIndex=h;let v=e.createSubContext(o.options,u);r&&v.delayNextStep(r),u===e.element&&(m=v.currentTimeline),ks(this,o.animation,v),v.currentTimeline.applyStylesToKeyframe();let b=v.currentTimeline.currentTime;s=Math.max(s,b)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),m&&(e.currentTimeline.mergeTimelineCollectedStyles(m),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=o}visitStagger(o,e){let t=e.parentContext,i=e.currentTimeline,r=o.timings,s=Math.abs(r.duration),d=s*(e.currentQueryTotal-1),m=s*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":m=d-m;break;case"full":m=t.currentStaggerTime;break}let h=e.currentTimeline;m&&h.delayNextStep(m);let v=h.currentTime;ks(this,o.animation,e),e.previousNode=o,t.currentStaggerTime=i.currentTime-v+(i.startTime-t.currentTimeline.startTime)}},dy={},UE=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=dy;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(o,e,t,i,r,s,d,m){this._driver=o,this.element=e,this.subInstructions=t,this._enterClassName=i,this._leaveClassName=r,this.errors=s,this.timelines=d,this.currentTimeline=m||new py(this._driver,e,0),d.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(o,e){if(!o)return;let t=o,i=this.options;t.duration!=null&&(i.duration=Uc(t.duration)),t.delay!=null&&(i.delay=Uc(t.delay));let r=t.params;if(r){let s=i.params;s||(s=this.options.params={}),Object.keys(r).forEach(d=>{(!e||!s.hasOwnProperty(d))&&(s[d]=sh(r[d],s,this.errors))})}}_copyOptions(){let o={};if(this.options){let e=this.options.params;if(e){let t=o.params={};Object.keys(e).forEach(i=>{t[i]=e[i]})}}return o}createSubContext(o=null,e,t){let i=e||this.element,r=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,t||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(o),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(o){return this.previousNode=dy,this.currentTimeline=this.currentTimeline.fork(this.element,o),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(o,e,t){let i={duration:e??o.duration,delay:this.currentTimeline.currentTime+(t??0)+o.delay,easing:""},r=new WE(this._driver,o.element,o.keyframes,o.preStyleProps,o.postStyleProps,i,o.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(o){this.currentTimeline.forwardTime(this.currentTimeline.duration+o)}delayNextStep(o){o>0&&this.currentTimeline.delayNextStep(o)}invokeQuery(o,e,t,i,r,s){let d=[];if(i&&d.push(this.element),o.length>0){o=o.replace(ete,"."+this._enterClassName),o=o.replace(nte,"."+this._leaveClassName);let m=t!=1,u=this._driver.query(this.element,o,m);t!==0&&(u=t<0?u.slice(u.length+t,u.length):u.slice(0,t)),d.push(...u)}return!r&&d.length==0&&s.push(A8(e)),d}},py=class n{_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(o,e,t,i){this._driver=o,this.element=e,this.startTime=t,this._elementTimelineStylesLookup=i,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(o){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+o),e&&this.snapshotCurrentStyles()):this.startTime+=o}fork(o,e){return this.applyStylesToKeyframe(),new n(this._driver,o,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+=Zee,this._loadKeyframe()}forwardTime(o){this.applyStylesToKeyframe(),this.duration=o,this._loadKeyframe()}_updateStyle(o,e){this._localTimelineStyles.set(o,e),this._globalTimelineStyles.set(o,e),this._styleSummary.set(o,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(o){o&&this._previousKeyframe.set("easing",o);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||rc),this._currentKeyframe.set(e,rc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(o,e,t,i){e&&this._previousKeyframe.set("easing",e);let r=i&&i.params||{},s=ite(o,this._globalTimelineStyles);for(let[d,m]of s){let u=sh(m,r,t);this._pendingStyles.set(d,u),this._localTimelineStyles.has(d)||this._backFill.set(d,this._globalTimelineStyles.get(d)??rc),this._updateStyle(d,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((o,e)=>{this._currentKeyframe.set(e,o)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((o,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,o)}))}snapshotCurrentStyles(){for(let[o,e]of this._localTimelineStyles)this._pendingStyles.set(o,e),this._updateStyle(o,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let o=[];for(let e in this._currentKeyframe)o.push(e);return o}mergeTimelineCollectedStyles(o){o._styleSummary.forEach((e,t)=>{let i=this._styleSummary.get(t);(!i||e.time>i.time)&&this._updateStyle(t,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let o=new Set,e=new Set,t=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((d,m)=>{let u=new Map([...this._backFill,...d]);u.forEach((h,v)=>{h===H0?o.add(v):h===rc&&e.add(v)}),t||u.set("offset",m/this.duration),i.push(u)});let r=[...o.values()],s=[...e.values()];if(t){let d=i[0],m=new Map(d);d.set("offset",0),m.set("offset",1),i=[d,m]}return JE(this.element,i,r,s,this.duration,this.startTime,this.easing,!1)}},WE=class extends py{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(o,e,t,i,r,s,d=!1){super(o,e,s.delay),this.keyframes=t,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=d,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let o=this.keyframes,{delay:e,duration:t,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){let r=[],s=t+e,d=e/s,m=new Map(o[0]);m.set("offset",0),r.push(m);let u=new Map(o[0]);u.set("offset",eR(d)),r.push(u);let h=o.length-1;for(let v=1;v<=h;v++){let b=new Map(o[v]),y=b.get("offset"),x=e+y*t;b.set("offset",eR(x/s)),r.push(b)}t=s,e=0,i="",o=r}return JE(this.element,o,this.preStyleProps,this.postStyleProps,t,e,i,!0)}};function eR(n,o=3){let e=Math.pow(10,o-1);return Math.round(n*e)/e}function ite(n,o){let e=new Map,t;return n.forEach(i=>{if(i==="*"){t??=o.keys();for(let r of t)e.set(r,rc)}else for(let[r,s]of i)e.set(r,s)}),e}function tR(n,o,e,t,i,r,s,d,m,u,h,v,b){return{type:0,element:n,triggerName:o,isRemovalTransition:i,fromState:e,fromStyles:r,toState:t,toStyles:s,timelines:d,queriedElements:m,preStyleProps:u,postStyleProps:h,totalTime:v,errors:b}}var LE={},my=class{_triggerName;ast;_stateStyles;constructor(o,e,t){this._triggerName=o,this.ast=e,this._stateStyles=t}match(o,e,t,i){return ote(this.ast.matchers,o,e,t,i)}buildStyles(o,e,t){let i=this._stateStyles.get("*");return o!==void 0&&(i=this._stateStyles.get(o?.toString())||i),i?i.buildStyles(e,t):new Map}build(o,e,t,i,r,s,d,m,u,h){let v=[],b=this.ast.options&&this.ast.options.params||LE,y=d&&d.params||LE,x=this.buildStyles(t,y,v),P=m&&m.params||LE,k=this.buildStyles(i,P,v),S=new Set,T=new Map,A=new Map,D=i==="void",F={params:pR(P,b),delay:this.ast.options?.delay},I=h?[]:dR(o,e,this.ast.animation,r,s,x,k,F,u,v),V=0;return I.forEach(ae=>{V=Math.max(ae.duration+ae.delay,V)}),v.length?tR(e,this._triggerName,t,i,D,x,k,[],[],T,A,V,v):(I.forEach(ae=>{let oe=ae.element,W=Ss(T,oe,new Set);ae.preStyleProps.forEach(Ce=>W.add(Ce));let G=Ss(A,oe,new Set);ae.postStyleProps.forEach(Ce=>G.add(Ce)),oe!==e&&S.add(oe)}),tR(e,this._triggerName,t,i,D,x,k,I,[...S.values()],T,A,V))}};function ote(n,o,e,t,i){return n.some(r=>r(o,e,t,i))}function pR(n,o){let e=q({},o);return Object.entries(n).forEach(([t,i])=>{i!=null&&(e[t]=i)}),e}var GE=class{styles;defaultParams;normalizer;constructor(o,e,t){this.styles=o,this.defaultParams=e,this.normalizer=t}buildStyles(o,e){let t=new Map,i=pR(o,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((s,d)=>{s&&(s=sh(s,i,e));let m=this.normalizer.normalizePropertyName(d,e);s=this.normalizer.normalizeStyleValue(d,m,s,e),t.set(d,s)})}),t}};function rte(n,o,e){return new qE(n,o,e)}var qE=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(o,e,t){this.name=o,this.ast=e,this._normalizer=t,e.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new GE(i.style,r,t))}),nR(this.states,"true","1"),nR(this.states,"false","0"),e.transitions.forEach(i=>{this.transitionFactories.push(new my(o,i,this.states))}),this.fallbackTransition=ate(o,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(o,e,t,i){return this.transitionFactories.find(s=>s.match(o,e,t,i))||null}matchStyles(o,e,t){return this.fallbackTransition.buildStyles(o,e,t)}};function ate(n,o,e){let t=[(s,d)=>!0],i={type:bi.Sequence,steps:[],options:null},r={type:bi.Transition,animation:i,matchers:t,options:null,queryCount:0,depCount:0};return new my(n,r,o)}function nR(n,o,e){n.has(o)?n.has(e)||n.set(e,n.get(o)):n.has(e)&&n.set(o,n.get(e))}var ste=new Q0,QE=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(o,e,t){this.bodyNode=o,this._driver=e,this._normalizer=t}register(o,e){let t=[],i=[],r=cR(this._driver,e,t,i);if(t.length)throw L8(t);this._animations.set(o,r)}_buildPlayer(o,e,t){let i=o.element,r=TE(this._normalizer,o.keyframes,e,t);return this._driver.animate(i,r,o.duration,o.delay,o.easing,[],!0)}create(o,e,t={}){let i=[],r=this._animations.get(o),s,d=new Map;if(r?(s=dR(this._driver,e,r,AE,ey,new Map,new Map,t,ste,i),s.forEach(h=>{let v=Ss(d,h.element,new Map);h.postStyleProps.forEach(b=>v.set(b,null))})):(i.push(z8()),s=[]),i.length)throw V8(i);d.forEach((h,v)=>{h.forEach((b,y)=>{h.set(y,this._driver.computeStyle(v,y,rc))})});let m=s.map(h=>{let v=d.get(h.element);return this._buildPlayer(h,new Map,v)}),u=Ld(m);return this._playersById.set(o,u),u.onDestroy(()=>this.destroy(o)),this.players.push(u),u}destroy(o){let e=this._getPlayer(o);e.destroy(),this._playersById.delete(o);let t=this.players.indexOf(e);t>=0&&this.players.splice(t,1)}_getPlayer(o){let e=this._playersById.get(o);if(!e)throw B8(o);return e}listen(o,e,t,i){let r=Z1(e,"","","");return Y1(this._getPlayer(o),t,r,i),()=>{}}command(o,e,t,i){if(t=="register"){this.register(o,i[0]);return}if(t=="create"){let s=i[0]||{};this.create(o,e,s);return}let r=this._getPlayer(o);switch(t){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(i[0]));break;case"destroy":this.destroy(o);break}}},iR="ng-animate-queued",lte=".ng-animate-queued",zE="ng-animate-disabled",cte=".ng-animate-disabled",dte="ng-star-inserted",pte=".ng-star-inserted",mte=[],mR={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ute={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},sc="__ng_removed",K0=class{namespaceId;value;options;get params(){return this.options.params}constructor(o,e=""){this.namespaceId=e;let t=o&&o.hasOwnProperty("value"),i=t?o.value:o;if(this.value=hte(i),t){let r=o,{value:s}=r,d=Mv(r,["value"]);this.options=d}else this.options={};this.options.params||(this.options.params={})}absorbOptions(o){let e=o.params;if(e){let t=this.options.params;Object.keys(e).forEach(i=>{t[i]==null&&(t[i]=e[i])})}}},q0="void",VE=new K0(q0),KE=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(o,e,t){this.id=o,this.hostElement=e,this._engine=t,this._hostClassName="ng-tns-"+o,Ml(e,this._hostClassName)}listen(o,e,t,i){if(!this._triggers.has(e))throw j8(t,e);if(t==null||t.length==0)throw $8(e);if(!_te(t))throw H8(t,e);let r=Ss(this._elementListeners,o,[]),s={name:e,phase:t,callback:i};r.push(s);let d=Ss(this._engine.statesByElement,o,new Map);return d.has(e)||(Ml(o,U0),Ml(o,U0+"-"+e),d.set(e,VE)),()=>{this._engine.afterFlush(()=>{let m=r.indexOf(s);m>=0&&r.splice(m,1),this._triggers.has(e)||d.delete(e)})}}register(o,e){return this._triggers.has(o)?!1:(this._triggers.set(o,e),!0)}_getTrigger(o){let e=this._triggers.get(o);if(!e)throw U8(o);return e}trigger(o,e,t,i=!0){let r=this._getTrigger(e),s=new X0(this.id,e,o),d=this._engine.statesByElement.get(o);d||(Ml(o,U0),Ml(o,U0+"-"+e),this._engine.statesByElement.set(o,d=new Map));let m=d.get(e),u=new K0(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&m&&u.absorbOptions(m.options),d.set(e,u),m||(m=VE),!(u.value===q0)&&m.value===u.value){if(!vte(m.params,u.params)){let P=[],k=r.matchStyles(m.value,m.params,P),S=r.matchStyles(u.value,u.params,P);P.length?this._engine.reportError(P):this._engine.afterFlush(()=>{Rp(o,k),ac(o,S)})}return}let b=Ss(this._engine.playersByElement,o,[]);b.forEach(P=>{P.namespaceId==this.id&&P.triggerName==e&&P.queued&&P.destroy()});let y=r.matchTransition(m.value,u.value,o,u.params),x=!1;if(!y){if(!i)return;y=r.fallbackTransition,x=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:e,transition:y,fromState:m,toState:u,player:s,isFallbackTransition:x}),x||(Ml(o,iR),s.onStart(()=>{lh(o,iR)})),s.onDone(()=>{let P=this.players.indexOf(s);P>=0&&this.players.splice(P,1);let k=this._engine.playersByElement.get(o);if(k){let S=k.indexOf(s);S>=0&&k.splice(S,1)}}),this.players.push(s),b.push(s),s}deregister(o){this._triggers.delete(o),this._engine.statesByElement.forEach(e=>e.delete(o)),this._elementListeners.forEach((e,t)=>{this._elementListeners.set(t,e.filter(i=>i.name!=o))})}clearElementCache(o){this._engine.statesByElement.delete(o),this._elementListeners.delete(o);let e=this._engine.playersByElement.get(o);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(o))}_signalRemovalForInnerTriggers(o,e){let t=this._engine.driver.query(o,W0,!0);t.forEach(i=>{if(i[sc])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(s=>s.triggerLeaveAnimation(i,e,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(o,e,t,i){let r=this._engine.statesByElement.get(o),s=new Map;if(r){let d=[];if(r.forEach((m,u)=>{if(s.set(u,m.value),this._triggers.has(u)){let h=this.trigger(o,u,q0,i);h&&d.push(h)}}),d.length)return this._engine.markElementAsRemoved(this.id,o,!0,e,s),t&&Ld(d).onDone(()=>this._engine.processLeaveNode(o)),!0}return!1}prepareLeaveAnimationListeners(o){let e=this._elementListeners.get(o),t=this._engine.statesByElement.get(o);if(e&&t){let i=new Set;e.forEach(r=>{let s=r.name;if(i.has(s))return;i.add(s);let m=this._triggers.get(s).fallbackTransition,u=t.get(s)||VE,h=new K0(q0),v=new X0(this.id,s,o);this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:s,transition:m,fromState:u,toState:h,player:v,isFallbackTransition:!0})})}}removeNode(o,e){let t=this._engine;if(o.childElementCount&&this._signalRemovalForInnerTriggers(o,e),this.triggerLeaveAnimation(o,e,!0))return;let i=!1;if(t.totalAnimations){let r=t.players.length?t.playersByQueriedElement.get(o):[];if(r&&r.length)i=!0;else{let s=o;for(;s=s.parentNode;)if(t.statesByElement.get(s)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(o),i)t.markElementAsRemoved(this.id,o,!1,e);else{let r=o[sc];(!r||r===mR)&&(t.afterFlush(()=>this.clearElementCache(o)),t.destroyInnerAnimations(o),t._onRemovalComplete(o,e))}}insertNode(o,e){Ml(o,this._hostClassName)}drainQueuedTransitions(o){let e=[];return this._queue.forEach(t=>{let i=t.player;if(i.destroyed)return;let r=t.element,s=this._elementListeners.get(r);s&&s.forEach(d=>{if(d.name==t.triggerName){let m=Z1(r,t.triggerName,t.fromState.value,t.toState.value);m._data=o,Y1(t.player,d.phase,m,d.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(t)}),this._queue=[],e.sort((t,i)=>{let r=t.transition.ast.depCount,s=i.transition.ast.depCount;return r==0||s==0?r-s:this._engine.driver.containsElement(t.element,i.element)?1:-1})}destroy(o){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,o)}},XE=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=(o,e)=>{};_onRemovalComplete(o,e){this.onRemovalComplete(o,e)}constructor(o,e,t){this.bodyNode=o,this.driver=e,this._normalizer=t}get queuedPlayers(){let o=[];return this._namespaceList.forEach(e=>{e.players.forEach(t=>{t.queued&&o.push(t)})}),o}createNamespace(o,e){let t=new KE(o,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(t,e):(this.newHostElements.set(e,t),this.collectEnterElement(e)),this._namespaceLookup[o]=t}_balanceNamespaceList(o,e){let t=this._namespaceList,i=this.namespacesByHostElement;if(t.length-1>=0){let s=!1,d=this.driver.getParentElement(e);for(;d;){let m=i.get(d);if(m){let u=t.indexOf(m);t.splice(u+1,0,o),s=!0;break}d=this.driver.getParentElement(d)}s||t.unshift(o)}else t.push(o);return i.set(e,o),o}register(o,e){let t=this._namespaceLookup[o];return t||(t=this.createNamespace(o,e)),t}registerTrigger(o,e,t){let i=this._namespaceLookup[o];i&&i.register(e,t)&&this.totalAnimations++}destroy(o,e){o&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(o);this.namespacesByHostElement.delete(t.hostElement);let i=this._namespaceList.indexOf(t);i>=0&&this._namespaceList.splice(i,1),t.destroy(e),delete this._namespaceLookup[o]}))}_fetchNamespace(o){return this._namespaceLookup[o]}fetchNamespacesByElement(o){let e=new Set,t=this.statesByElement.get(o);if(t){for(let i of t.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&e.add(r)}}return e}trigger(o,e,t,i){if(ay(e)){let r=this._fetchNamespace(o);if(r)return r.trigger(e,t,i),!0}return!1}insertNode(o,e,t,i){if(!ay(e))return;let r=e[sc];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(o){let s=this._fetchNamespace(o);s&&s.insertNode(e,t)}i&&this.collectEnterElement(e)}collectEnterElement(o){this.collectedEnterElements.push(o)}markElementAsDisabled(o,e){e?this.disabledNodes.has(o)||(this.disabledNodes.add(o),Ml(o,zE)):this.disabledNodes.has(o)&&(this.disabledNodes.delete(o),lh(o,zE))}removeNode(o,e,t){if(ay(e)){let i=o?this._fetchNamespace(o):null;i?i.removeNode(e,t):this.markElementAsRemoved(o,e,!1,t);let r=this.namespacesByHostElement.get(e);r&&r.id!==o&&r.removeNode(e,t)}else this._onRemovalComplete(e,t)}markElementAsRemoved(o,e,t,i,r){this.collectedLeaveElements.push(e),e[sc]={namespaceId:o,setForRemoval:i,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:r}}listen(o,e,t,i,r){return ay(e)?this._fetchNamespace(o).listen(e,t,i,r):()=>{}}_buildInstruction(o,e,t,i,r){return o.transition.build(this.driver,o.element,o.fromState.value,o.toState.value,t,i,o.fromState.options,o.toState.options,e,r)}destroyInnerAnimations(o){let e=this.driver.query(o,W0,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(o,ty,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(o){let e=this.playersByElement.get(o);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(o){let e=this.playersByQueriedElement.get(o);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(o=>{if(this.players.length)return Ld(this.players).onDone(()=>o());o()})}processLeaveNode(o){let e=o[sc];if(e&&e.setForRemoval){if(o[sc]=mR,e.namespaceId){this.destroyInnerAnimations(o);let t=this._fetchNamespace(e.namespaceId);t&&t.clearElementCache(o)}this._onRemovalComplete(o,e.setForRemoval)}o.classList?.contains(zE)&&this.markElementAsDisabled(o,!1),this.driver.query(o,cte,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(o=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,i)=>this._balanceNamespaceList(t,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;tt()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],e.length?Ld(e).onDone(()=>{t.forEach(i=>i())}):t.forEach(i=>i())}}reportError(o){throw W8(o)}_flushAnimations(o,e){let t=new Q0,i=[],r=new Map,s=[],d=new Map,m=new Map,u=new Map,h=new Set;this.disabledNodes.forEach(ue=>{h.add(ue);let H=this.driver.query(ue,lte,!0);for(let ee=0;ee{let ee=AE+P++;x.set(H,ee),ue.forEach(le=>Ml(le,ee))});let k=[],S=new Set,T=new Set;for(let ue=0;ueS.add(le)):T.add(H))}let A=new Map,D=aR(b,Array.from(S));D.forEach((ue,H)=>{let ee=ey+P++;A.set(H,ee),ue.forEach(le=>Ml(le,ee))}),o.push(()=>{y.forEach((ue,H)=>{let ee=x.get(H);ue.forEach(le=>lh(le,ee))}),D.forEach((ue,H)=>{let ee=A.get(H);ue.forEach(le=>lh(le,ee))}),k.forEach(ue=>{this.processLeaveNode(ue)})});let F=[],I=[];for(let ue=this._namespaceList.length-1;ue>=0;ue--)this._namespaceList[ue].drainQueuedTransitions(e).forEach(ee=>{let le=ee.player,de=ee.element;if(F.push(le),this.collectedEnterElements.length){let Re=de[sc];if(Re&&Re.setForMove){if(Re.previousTriggersValues&&Re.previousTriggersValues.has(ee.triggerName)){let Ze=Re.previousTriggersValues.get(ee.triggerName),ct=this.statesByElement.get(ee.element);if(ct&&ct.has(ee.triggerName)){let Tt=ct.get(ee.triggerName);Tt.value=Ze,ct.set(ee.triggerName,Tt)}}le.destroy();return}}let De=!v||!this.driver.containsElement(v,de),je=A.get(de),tt=x.get(de),et=this._buildInstruction(ee,t,tt,je,De);if(et.errors&&et.errors.length){I.push(et);return}if(De){le.onStart(()=>Rp(de,et.fromStyles)),le.onDestroy(()=>ac(de,et.toStyles)),i.push(le);return}if(ee.isFallbackTransition){le.onStart(()=>Rp(de,et.fromStyles)),le.onDestroy(()=>ac(de,et.toStyles)),i.push(le);return}let ye=[];et.timelines.forEach(Re=>{Re.stretchStartingKeyframe=!0,this.disabledNodes.has(Re.element)||ye.push(Re)}),et.timelines=ye,t.append(de,et.timelines);let Y={instruction:et,player:le,element:de};s.push(Y),et.queriedElements.forEach(Re=>Ss(d,Re,[]).push(le)),et.preStyleProps.forEach((Re,Ze)=>{if(Re.size){let ct=m.get(Ze);ct||m.set(Ze,ct=new Set),Re.forEach((Tt,ri)=>ct.add(ri))}}),et.postStyleProps.forEach((Re,Ze)=>{let ct=u.get(Ze);ct||u.set(Ze,ct=new Set),Re.forEach((Tt,ri)=>ct.add(ri))})});if(I.length){let ue=[];I.forEach(H=>{ue.push(G8(H.triggerName,H.errors))}),F.forEach(H=>H.destroy()),this.reportError(ue)}let V=new Map,ae=new Map;s.forEach(ue=>{let H=ue.element;t.has(H)&&(ae.set(H,H),this._beforeAnimationBuild(ue.player.namespaceId,ue.instruction,V))}),i.forEach(ue=>{let H=ue.element;this._getPreviousPlayers(H,!1,ue.namespaceId,ue.triggerName,null).forEach(le=>{Ss(V,H,[]).push(le),le.destroy()})});let oe=k.filter(ue=>sR(ue,m,u)),W=new Map;rR(W,this.driver,T,u,rc).forEach(ue=>{sR(ue,m,u)&&oe.push(ue)});let Ce=new Map;y.forEach((ue,H)=>{rR(Ce,this.driver,new Set(ue),m,H0)}),oe.forEach(ue=>{let H=W.get(ue),ee=Ce.get(ue);W.set(ue,new Map([...H?.entries()??[],...ee?.entries()??[]]))});let we=[],me=[],Ie={};s.forEach(ue=>{let{element:H,player:ee,instruction:le}=ue;if(t.has(H)){if(h.has(H)){ee.onDestroy(()=>ac(H,le.toStyles)),ee.disabled=!0,ee.overrideTotalTime(le.totalTime),i.push(ee);return}let de=Ie;if(ae.size>1){let je=H,tt=[];for(;je=je.parentNode;){let et=ae.get(je);if(et){de=et;break}tt.push(je)}tt.forEach(et=>ae.set(et,de))}let De=this._buildAnimation(ee.namespaceId,le,V,r,Ce,W);if(ee.setRealPlayer(De),de===Ie)we.push(ee);else{let je=this.playersByElement.get(de);je&&je.length&&(ee.parentPlayer=Ld(je)),i.push(ee)}}else Rp(H,le.fromStyles),ee.onDestroy(()=>ac(H,le.toStyles)),me.push(ee),h.has(H)&&i.push(ee)}),me.forEach(ue=>{let H=r.get(ue.element);if(H&&H.length){let ee=Ld(H);ue.setRealPlayer(ee)}}),i.forEach(ue=>{ue.parentPlayer?ue.syncPlayerEvents(ue.parentPlayer):ue.destroy()});for(let ue=0;ue!De.destroyed);de.length?fte(this,H,de):this.processLeaveNode(H)}return k.length=0,we.forEach(ue=>{this.players.push(ue),ue.onDone(()=>{ue.destroy();let H=this.players.indexOf(ue);this.players.splice(H,1)}),ue.play()}),we}afterFlush(o){this._flushFns.push(o)}afterFlushAnimationsDone(o){this._whenQuietFns.push(o)}_getPreviousPlayers(o,e,t,i,r){let s=[];if(e){let d=this.playersByQueriedElement.get(o);d&&(s=d)}else{let d=this.playersByElement.get(o);if(d){let m=!r||r==q0;d.forEach(u=>{u.queued||!m&&u.triggerName!=i||s.push(u)})}}return(t||i)&&(s=s.filter(d=>!(t&&t!=d.namespaceId||i&&i!=d.triggerName))),s}_beforeAnimationBuild(o,e,t){let i=e.triggerName,r=e.element,s=e.isRemovalTransition?void 0:o,d=e.isRemovalTransition?void 0:i;for(let m of e.timelines){let u=m.element,h=u!==r,v=Ss(t,u,[]);this._getPreviousPlayers(u,h,s,d,e.toState).forEach(y=>{let x=y.getRealPlayer();x.beforeDestroy&&x.beforeDestroy(),y.destroy(),v.push(y)})}Rp(r,e.fromStyles)}_buildAnimation(o,e,t,i,r,s){let d=e.triggerName,m=e.element,u=[],h=new Set,v=new Set,b=e.timelines.map(x=>{let P=x.element;h.add(P);let k=P[sc];if(k&&k.removedBeforeQueried)return new Rd(x.duration,x.delay);let S=P!==m,T=Cte((t.get(P)||mte).map(V=>V.getRealPlayer())).filter(V=>{let ae=V;return ae.element?ae.element===P:!1}),A=r.get(P),D=s.get(P),F=TE(this._normalizer,x.keyframes,A,D),I=this._buildPlayer(x,F,T);if(x.subTimeline&&i&&v.add(P),S){let V=new X0(o,d,P);V.setRealPlayer(I),u.push(V)}return I});u.forEach(x=>{Ss(this.playersByQueriedElement,x.element,[]).push(x),x.onDone(()=>gte(this.playersByQueriedElement,x.element,x))}),h.forEach(x=>Ml(x,NE));let y=Ld(b);return y.onDestroy(()=>{h.forEach(x=>lh(x,NE)),ac(m,e.toStyles)}),v.forEach(x=>{Ss(i,x,[]).push(y)}),y}_buildPlayer(o,e,t){return e.length>0?this.driver.animate(o.element,e,o.duration,o.delay,o.easing,t):new Rd(o.duration,o.delay)}},X0=class{namespaceId;triggerName;element;_player=new Rd;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(o,e,t){this.namespaceId=o,this.triggerName=e,this.element=t}setRealPlayer(o){this._containsRealPlayer||(this._player=o,this._queuedCallbacks.forEach((e,t)=>{e.forEach(i=>Y1(o,t,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(o.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(o){this.totalTime=o}syncPlayerEvents(o){let e=this._player;e.triggerCallback&&o.onStart(()=>e.triggerCallback("start")),o.onDone(()=>this.finish()),o.onDestroy(()=>this.destroy())}_queueEvent(o,e){Ss(this._queuedCallbacks,o,[]).push(e)}onDone(o){this.queued&&this._queueEvent("done",o),this._player.onDone(o)}onStart(o){this.queued&&this._queueEvent("start",o),this._player.onStart(o)}onDestroy(o){this.queued&&this._queueEvent("destroy",o),this._player.onDestroy(o)}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(o){this.queued||this._player.setPosition(o)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(o){let e=this._player;e.triggerCallback&&e.triggerCallback(o)}};function gte(n,o,e){let t=n.get(o);if(t){if(t.length){let i=t.indexOf(e);t.splice(i,1)}t.length==0&&n.delete(o)}return t}function hte(n){return n??null}function ay(n){return n&&n.nodeType===1}function _te(n){return n=="start"||n=="done"}function oR(n,o){let e=n.style.display;return n.style.display=o??"none",e}function rR(n,o,e,t,i){let r=[];e.forEach(m=>r.push(oR(m)));let s=[];t.forEach((m,u)=>{let h=new Map;m.forEach(v=>{let b=o.computeStyle(u,v,i);h.set(v,b),(!b||b.length==0)&&(u[sc]=ute,s.push(u))}),n.set(u,h)});let d=0;return e.forEach(m=>oR(m,r[d++])),s}function aR(n,o){let e=new Map;if(n.forEach(d=>e.set(d,[])),o.length==0)return e;let t=1,i=new Set(o),r=new Map;function s(d){if(!d)return t;let m=r.get(d);if(m)return m;let u=d.parentNode;return e.has(u)?m=u:i.has(u)?m=t:m=s(u),r.set(d,m),m}return o.forEach(d=>{let m=s(d);m!==t&&e.get(m).push(d)}),e}function Ml(n,o){n.classList?.add(o)}function lh(n,o){n.classList?.remove(o)}function fte(n,o,e){Ld(e).onDone(()=>n.processLeaveNode(o))}function Cte(n){let o=[];return uR(n,o),o}function uR(n,o){for(let e=0;ei.add(r)):o.set(n,t),e.delete(n),!0}var ch=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(o,e)=>{};constructor(o,e,t){this._driver=e,this._normalizer=t,this._transitionEngine=new XE(o.body,e,t),this._timelineEngine=new QE(o.body,e,t),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(o,e,t,i,r){let s=o+"-"+i,d=this._triggerCache[s];if(!d){let m=[],u=[],h=cR(this._driver,r,m,u);if(m.length)throw R8(i,m);d=rte(i,h,this._normalizer),this._triggerCache[s]=d}this._transitionEngine.registerTrigger(e,i,d)}register(o,e){this._transitionEngine.register(o,e)}destroy(o,e){this._transitionEngine.destroy(o,e)}onInsert(o,e,t,i){this._transitionEngine.insertNode(o,e,t,i)}onRemove(o,e,t){this._transitionEngine.removeNode(o,e,t)}disableAnimations(o,e){this._transitionEngine.markElementAsDisabled(o,e)}process(o,e,t,i){if(t.charAt(0)=="@"){let[r,s]=EE(t),d=i;this._timelineEngine.command(r,e,s,d)}else this._transitionEngine.trigger(o,e,t,i)}listen(o,e,t,i,r){if(t.charAt(0)=="@"){let[s,d]=EE(t);return this._timelineEngine.listen(s,e,d,r)}return this._transitionEngine.listen(o,e,t,i,r)}flush(o=-1){this._transitionEngine.flush(o)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(o){this._transitionEngine.afterFlushAnimationsDone(o)}};function xte(n,o){let e=null,t=null;return Array.isArray(o)&&o.length?(e=BE(o[0]),o.length>1&&(t=BE(o[o.length-1]))):o instanceof Map&&(e=BE(o)),e||t?new yte(n,e,t):null}var yte=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,t,i){this._element=e,this._startStyles=t,this._endStyles=i;let r=n.initialStylesByElement.get(e);r||n.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&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Rp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Rp(this._element,this._endStyles),this._endStyles=null),ac(this._element,this._initialStyles),this._state=3)}}return n})();function BE(n){let o=null;return n.forEach((e,t)=>{bte(t)&&(o=o||new Map,o.set(t,e))}),o}function bte(n){return n==="display"||n==="position"}var uy=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(o,e,t,i){this.element=o,this.keyframes=e,this.options=t,this._specialStyles=i,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let o=this.keyframes,e=this._triggerWebAnimation(this.element,o,this.options);if(!e)return this._onFinish(),null;this.domPlayer=e,this._finalKeyframe=o.length?o[o.length-1]:new Map;let t=()=>this._onFinish();return e.addEventListener("finish",t),this.onDestroy(()=>{e.removeEventListener("finish",t)}),e}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(o){let e=[];return o.forEach(t=>{e.push(Object.fromEntries(t))}),e}_triggerWebAnimation(o,e,t){let i=this._convertKeyframesToObject(e);try{return o.animate(i,t)}catch{return null}}onStart(o){this._originalOnStartFns.push(o),this._onStartFns.push(o)}onDone(o){this._originalOnDoneFns.push(o),this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}play(){let o=this._buildPlayer();o&&(this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),o.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(o=>o()),this._onDestroyFns=[])}setPosition(o){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=o*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 o=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,i)=>{i!=="offset"&&o.set(i,this._finished?t:iy(this.element,i))}),this.currentSnapshot=o}triggerCallback(o){let e=o==="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},gy=class{validateStyleProperty(o){return!0}validateAnimatableStyleProperty(o){return!0}containsElement(o,e){return OE(o,e)}getParentElement(o){return J1(o)}query(o,e,t){return DE(o,e,t)}computeStyle(o,e,t){return iy(o,e)}animate(o,e,t,i,r,s=[]){let d=i==0?"both":"forwards",m={duration:t,delay:i,fill:d};r&&(m.easing=r);let u=new Map,h=s.filter(y=>y instanceof uy);X8(t,i)&&h.forEach(y=>{y.currentSnapshot.forEach((x,P)=>u.set(P,x))});let v=Q8(e).map(y=>new Map(y));v=Y8(o,v,u);let b=xte(o,v);return new uy(o,v,m,b)}};var sy="@",gR="@.disabled",hy=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(o,e,t,i){this.namespaceId=o,this.delegate=e,this.engine=t,this._onDestroy=i}get data(){return this.delegate.data}destroyNode(o){this.delegate.destroyNode?.(o)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(o,e){return this.delegate.createElement(o,e)}createComment(o){return this.delegate.createComment(o)}createText(o){return this.delegate.createText(o)}appendChild(o,e){this.delegate.appendChild(o,e),this.engine.onInsert(this.namespaceId,e,o,!1)}insertBefore(o,e,t,i=!0){this.delegate.insertBefore(o,e,t),this.engine.onInsert(this.namespaceId,e,o,i)}removeChild(o,e,t,i){if(i){this.delegate.removeChild(o,e,t,i);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(o,e){return this.delegate.selectRootElement(o,e)}parentNode(o){return this.delegate.parentNode(o)}nextSibling(o){return this.delegate.nextSibling(o)}setAttribute(o,e,t,i){this.delegate.setAttribute(o,e,t,i)}removeAttribute(o,e,t){this.delegate.removeAttribute(o,e,t)}addClass(o,e){this.delegate.addClass(o,e)}removeClass(o,e){this.delegate.removeClass(o,e)}setStyle(o,e,t,i){this.delegate.setStyle(o,e,t,i)}removeStyle(o,e,t){this.delegate.removeStyle(o,e,t)}setProperty(o,e,t){e.charAt(0)==sy&&e==gR?this.disableAnimations(o,!!t):this.delegate.setProperty(o,e,t)}setValue(o,e){this.delegate.setValue(o,e)}listen(o,e,t,i){return this.delegate.listen(o,e,t,i)}disableAnimations(o,e){this.engine.disableAnimations(o,e)}},YE=class extends hy{factory;constructor(o,e,t,i,r){super(e,t,i,r),this.factory=o,this.namespaceId=e}setProperty(o,e,t){e.charAt(0)==sy?e.charAt(1)=="."&&e==gR?(t=t===void 0?!0:!!t,this.disableAnimations(o,t)):this.engine.process(this.namespaceId,o,e.slice(1),t):this.delegate.setProperty(o,e,t)}listen(o,e,t,i){if(e.charAt(0)==sy){let r=wte(o),s=e.slice(1),d="";return s.charAt(0)!=sy&&([s,d]=Mte(s)),this.engine.listen(this.namespaceId,r,s,d,m=>{let u=m._data||-1;this.factory.scheduleListenerCallback(u,t,m)})}return this.delegate.listen(o,e,t,i)}};function wte(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function Mte(n){let o=n.indexOf("."),e=n.substring(0,o),t=n.slice(o+1);return[e,t]}var _y=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(o,e,t){this.delegate=o,this.engine=e,this._zone=t,e.onRemovalComplete=(i,r)=>{r?.removeChild(null,i)}}createRenderer(o,e){let i=this.delegate.createRenderer(o,e);if(!o||!e?.data?.animation){let u=this._rendererCache,h=u.get(i);if(!h){let v=()=>u.delete(i);h=new hy("",i,this.engine,v),u.set(i,h)}return h}let r=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,o);let d=u=>{Array.isArray(u)?u.forEach(d):this.engine.registerTrigger(r,s,o,u.name,u)};return e.data.animation.forEach(d),new YE(this,s,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(o,e,t){if(o>=0&&oe(t));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[s,d]=r;s(d)}),this._animationCallbacksBuffer=[]})}),i.push([e,t])}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(o){this.engine.flush(),this.delegate.componentReplaced?.(o)}};var kte=(()=>{class n extends ch{constructor(e,t,i){super(e,t,i)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||n)(he(Eo),he(vu),he(xu))};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();function Pte(){return new ly}function Tte(){return new _y(f(sA),f(ch),f(Ki))}var _R=[{provide:xu,useFactory:Pte},{provide:ch,useClass:kte},{provide:Dm,useFactory:Tte}],Ete=[{provide:vu,useClass:ZE},{provide:Ok,useValue:"NoopAnimations"},..._R],hR=[{provide:vu,useFactory:()=>new gy},{provide:Ok,useFactory:()=>"BrowserAnimations"},..._R],fR=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?Ete:hR}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({providers:hR,imports:[Nv]})}return n})();var CR=void 0;typeof Object.create!="function"?CR=(function(n){var o=function(){};return function(e,t){if(e!==Object(e)&&e!==null)throw TypeError("Argument must be an object, or null");o.prototype=e||{};var i=new o;return o.prototype=null,t!==n&&Object.defineProperties(i,t),e===null&&(i.__proto__=null),i}})():CR=Object.create;var Y0=["webkit","moz","ms","o"],dHe=(function(){if(typeof window>"u")return function(){};for(var n=0,o=Y0.length;n"u")return function(){};for(var n=0,o=Y0.length;n{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=nn({type:n})}static{this.\u0275inj=tn({})}}return n})();var Z0=class{constructor(o){this.rawFile=o;let e=o instanceof HTMLInputElement?o.value:o;this[`_createFrom${typeof e=="string"?"FakePath":"Object"}`](e)}_createFromFakePath(o){this.lastModifiedDate=void 0,this.size=void 0,this.type=`like/${o.slice(o.lastIndexOf(".")+1).toLowerCase()}`,this.name=o.slice(o.lastIndexOf("/")+o.lastIndexOf("\\")+2)}_createFromObject(o){this.size=o.size,this.type=o.type,this.name=o.name}},e3=class{constructor(o,e,t){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=o,this.some=e,this.options=t,this.file=new Z0(e),this._file=e,o.options&&(this.method=o.options.method||"POST",this.alias=o.options.itemAlias||"file"),this.url=o.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(o){return{form:o}}onProgress(o){return{progress:o}}onSuccess(o,e,t){return{response:o,status:e,headers:t}}onError(o,e,t){return{response:o,status:e,headers:t}}onCancel(o,e,t){return{response:o,status:e,headers:t}}onComplete(o,e,t){return{response:o,status:e,headers:t}}_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(o){this.onBuildForm(o)}_onProgress(o){this.progress=o,this.onProgress(o)}_onSuccess(o,e,t){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(o,e,t)}_onError(o,e,t){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(o,e,t)}_onCancel(o,e,t){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(o,e,t)}_onComplete(o,e,t){this.onComplete(o,e,t),this.uploader.options.removeAfterUpload&&this.remove()}_prepareToUploading(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0}},Ote=(()=>{class n{static getMimeClass(e){let t="application";return e?.type&&this.mime_psd.indexOf(e.type)!==-1||e?.type?.match("image.*")?t="image":e?.type?.match("video.*")?t="video":e?.type?.match("audio.*")?t="audio":e?.type==="application/pdf"?t="pdf":e?.type&&this.mime_compress.indexOf(e.type)!==-1?t="compress":e?.type&&this.mime_doc.indexOf(e.type)!==-1?t="doc":e?.type&&this.mime_xsl.indexOf(e.type)!==-1?t="xls":e?.type&&this.mime_ppt.indexOf(e.type)!==-1&&(t="ppt"),t==="application"&&e?.name&&(t=this.fileTypeDetection(e.name)),t}static fileTypeDetection(e){let t={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"},i=e.split(".");if(i.length<2)return"application";let r=i[i.length-1].toLowerCase();return t[r]===void 0?"application":t[r]}}return n.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"],n.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"],n.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"],n.mime_psd=["image/photoshop","image/x-photoshop","image/psd","application/photoshop","application/psd","zz-application/zz-winassoc-psd"],n.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"],n})();function Dte(n){return File&&n instanceof File}var Sl=class{constructor(o){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(o),this.response=new ve}setOptions(o){this.options=Object.assign(this.options,o),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{i||(i=this.options);let h=new Z0(u);if(this._isValidFile(h,s,i)){let v=new e3(this,u,i);m.push(v),this.queue.push(v),this._onAfterAddingFile(v)}else if(this._failFilterIndex){let v=s[this._failFilterIndex];this._onWhenAddingFileFailed(h,v,i)}}),this.queue.length!==d&&(this._onAfterAddingAll(m),this.progress=this._getTotalProgress()),this._render(),this.options.autoUpload&&this.uploadAll()}removeFromQueue(o){let e=this.getIndexOfItem(o),t=this.queue[e];t.isUploading&&t.cancel(),this.queue.splice(e,1),this.progress=this._getTotalProgress()}clearQueue(){for(;this.queue.length;)this.queue[0].remove();this.progress=0}uploadItem(o){let e=this.getIndexOfItem(o),t=this.queue[e],i=this.options.isHTML5?"_xhrTransport":"_iframeTransport";t._prepareToUploading(),!this.isUploading&&(this.isUploading=!0,this[i](t))}cancelItem(o){let e=this.getIndexOfItem(o),t=this.queue[e],i=this.options.isHTML5?t._xhr:t._form;t&&t.isUploading&&i.abort()}uploadAll(){let o=this.getNotUploadedItems().filter(e=>!e.isUploading);o.length&&(o.map(e=>e._prepareToUploading()),o[0].upload())}cancelAll(){this.getNotUploadedItems().map(e=>e.cancel())}isFile(o){return Dte(o)}isFileLikeObject(o){return o instanceof Z0}getIndexOfItem(o){return typeof o=="number"?o:this.queue.indexOf(o)}getNotUploadedItems(){return this.queue.filter(o=>!o.isUploaded)}getReadyItems(){return this.queue.filter(o=>o.isReady&&!o.isUploading).sort((o,e)=>o.index-e.index)}onAfterAddingAll(o){return{fileItems:o}}onBuildItemForm(o,e){return{fileItem:o,form:e}}onAfterAddingFile(o){return{fileItem:o}}onWhenAddingFileFailed(o,e,t){return{item:o,filter:e,options:t}}onBeforeUploadItem(o){return{fileItem:o}}onProgressItem(o,e){return{fileItem:o,progress:e}}onProgressAll(o){return{progress:o}}onSuccessItem(o,e,t,i){return{item:o,response:e,status:t,headers:i}}onErrorItem(o,e,t,i){return{item:o,response:e,status:t,headers:i}}onCancelItem(o,e,t,i){return{item:o,response:e,status:t,headers:i}}onCompleteItem(o,e,t,i){return{item:o,response:e,status:t,headers:i}}onCompleteAll(){}_mimeTypeFilter(o){return!(o?.type&&this.options.allowedMimeType&&this.options.allowedMimeType?.indexOf(o.type)===-1)}_fileSizeFilter(o){return!(this.options.maxFileSize&&o.size>this.options.maxFileSize)}_fileTypeFilter(o){return!(this.options.allowedFileType&&this.options.allowedFileType.indexOf(Ote.getMimeClass(o))===-1)}_onErrorItem(o,e,t,i){o._onError(e,t,i),this.onErrorItem(o,e,t,i)}_onCompleteItem(o,e,t,i){o._onComplete(e,t,i),this.onCompleteItem(o,e,t,i);let r=this.getReadyItems()[0];if(this.isUploading=!1,r){r.upload();return}this.onCompleteAll(),this.progress=this._getTotalProgress(),this._render()}_headersGetter(o){return e=>e?o[e.toLowerCase()]||void 0:o}_xhrTransport(o){let e=this,t=o._xhr=new XMLHttpRequest,i;if(this._onBeforeUploadItem(o),typeof o._file.size!="number")throw new TypeError("The file specified is no longer valid");if(this.options.disableMultipart)this.options.formatDataFunction&&(i=this.options.formatDataFunction(o));else{i=new FormData,this._onBuildItemForm(o,i);let r=()=>i.append(o.alias,o._file,o.file.name);this.options.parametersBeforeFiles||r(),this.options.additionalParameter!==void 0&&Object.keys(this.options.additionalParameter).forEach(s=>{let d=this.options.additionalParameter?.[s];typeof d=="string"&&d.indexOf("{{file_name}}")>=0&&o.file?.name&&(d=d.replace("{{file_name}}",o.file.name)),i.append(s,d)}),r&&this.options.parametersBeforeFiles&&r()}if(t.upload.onprogress=r=>{let s=Math.round(r.lengthComputable?r.loaded*100/r.total:0);this._onProgressItem(o,s)},t.onload=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),s=this._transformResponse(t.response,r),m=`_on${this._isSuccessCode(t.status)?"Success":"Error"}Item`;this[m](o,s,t.status,r),this._onCompleteItem(o,s,t.status,r)},t.onerror=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),s=this._transformResponse(t.response,r);this._onErrorItem(o,s,t.status,r),this._onCompleteItem(o,s,t.status,r)},t.onabort=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),s=this._transformResponse(t.response,r);this._onCancelItem(o,s,t.status,r),this._onCompleteItem(o,s,t.status,r)},o.method&&o.url&&t.open(o.method,o.url,!0),t.withCredentials=o.withCredentials,this.options.headers)for(let r of this.options.headers)t.setRequestHeader(r.name,r.value);if(o.headers.length)for(let r of o.headers)t.setRequestHeader(r.name,r.value);this.authToken&&this.authTokenHeader&&t.setRequestHeader(this.authTokenHeader,this.authToken),t.onreadystatechange=function(){t.readyState==XMLHttpRequest.DONE&&e.response.emit(t.responseText)},this.options.formatDataFunctionIsAsync?i.then(r=>t.send(JSON.stringify(r))):t.send(i),this._render()}_getTotalProgress(o=0){if(this.options.removeAfterUpload)return o;let e=this.getNotUploadedItems().length,t=e?this.queue.length-e:this.queue.length,i=100/this.queue.length,r=o*i/100;return Math.round(t*i+r)}_getFilters(o){if(!o)return this.options?.filters||[];if(Array.isArray(o))return o;if(typeof o=="string"){let e=o.match(/[^\s,]+/g);return this.options?.filters||[].filter(t=>e?.indexOf(t.name)!==-1)}return this.options?.filters||[]}_render(){}_queueLimitFilter(){return this.options.queueLimit===void 0||this.queue.length(this._failFilterIndex&&this._failFilterIndex++,i.fn.call(this,o,t))):!0}_isSuccessCode(o){return o>=200&&o<300||o===304}_transformResponse(o,e){return o}_parseHeaders(o){let e={},t,i,r;return o&&o.split(` `).map(s=>{r=s.indexOf(":"),t=s.slice(0,r).trim().toLowerCase(),i=s.slice(r+1).trim(),t&&(e[t]=e[t]?e[t]+", "+i:i)}),e}_onWhenAddingFileFailed(o,e,t){this.onWhenAddingFileFailed(o,e,t)}_onAfterAddingFile(o){this.onAfterAddingFile(o)}_onAfterAddingAll(o){this.onAfterAddingAll(o)}_onBeforeUploadItem(o){o._onBeforeUpload(),this.onBeforeUploadItem(o)}_onBuildItemForm(o,e){o._onBuildForm(e),this.onBuildItemForm(o,e)}_onProgressItem(o,e){let t=this._getTotalProgress(e);this.progress=t,o._onProgress(e),this.onProgressItem(o,e),this.onProgressAll(t),this._render()}_onSuccessItem(o,e,t,i){o._onSuccess(e,t,i),this.onSuccessItem(o,e,t,i)}_onCancelItem(o,e,t,i){o._onCancel(e,t,i),this.onCancelItem(o,e,t,i)}};var Wc=(()=>{class n{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,t=this.getOptions(),i=this.getFilters();this.uploader?.addToQueue(e,t,i),this.onFileSelected.emit(e),this.isEmptyAfterSelection()&&(this.element.nativeElement.value="")}}return n.\u0275fac=function(e){return new(e||n)(wt(Qt))},n.\u0275dir=yt({type:n,selectors:[["","ng2FileSelect",""]],hostBindings:function(e,t){e&1&&_("change",function(){return t.onChange()})},inputs:{uploader:"uploader"},outputs:{onFileSelected:"onFileSelected"},standalone:!1}),n})(),kl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=nn({type:n}),n.\u0275inj=tn({imports:[fe]}),n})();var yu=class{visible;error;clear;constructor(o,e,t=!1){this.visible=o,this.error=e,this.clear=t}},lo=(()=>{class n{state=new sn(new yu(!1));constructor(){}setError(e){this.state.next(new yu(!1,e.error))}clear(){this.state.next(new yu(!1,null,!0))}activate(){this.state.next(new yu(!0))}deactivate(){this.state.next(new yu(!1))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();function Ite(n,o){n&1&&(a(0,"div",1),z(1,"mat-spinner",3),l())}function Ate(n,o){if(n&1){let e=L();a(0,"div",2)(1,"div",4)(2,"mat-icon"),c(3,"error_outline"),l()(),a(4,"div"),c(5),l(),a(6,"div")(7,"button",5),_("click",function(){w(e);let i=g(2);return M(i.refresh())}),a(8,"mat-icon"),c(9,"refresh"),l()(),a(10,"button",6)(11,"mat-icon"),c(12,"home"),l()()()()}if(n&2){let e,t=g(2);p(5),Z("Error occurred: ",(e=t.error())==null?null:e.message)}}function Nte(n,o){if(n&1&&(a(0,"div",0),E(1,Ite,2,0,"div",1),E(2,Ate,13,1,"div",2),l()),n&2){let e=g();p(),O(e.visible()&&!e.error()?1:-1),p(),O(e.error()?2:-1)}}var Lp=(()=>{class n{progressService=f(lo);router=f(It);visible=R(!1);error=R(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(t){return new(t||n)};static \u0275cmp=B({type:n,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(t,i){t&1&&E(0,Nte,3,2,"div",0),t&2&&O(i.visible()||i.error()?0:-1)},dependencies:[fe,ot,dt,ne,pe,X,_e,at,pt,fo],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 n})();var fy=(()=>{class n{document;router=f(It);controllerService=f(_t);progressService=f(lo);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(t=>{this.router.navigate(["/controller",t.id,"projects"]),this.progressService.deactivate()})},100)}static \u0275fac=function(t){return new(t||n)(wt(Eo))};static \u0275cmp=B({type:n,selectors:[["app-bundled-controller-finder"]],decls:1,vars:0,template:function(t,i){t&1&&z(0,"app-progress")},dependencies:[Lp],encapsulation:2,changeDetection:0})}return n})();var Fte=[[["caption"]],[["colgroup"],["col"]],"*"],Rte=["caption","colgroup, col","*"];function Lte(n,o){n&1&&Zt(0,2)}function zte(n,o){n&1&&(a(0,"thead",0),Ci(1,1),l(),a(2,"tbody",2),Ci(3,3)(4,4),l(),a(5,"tfoot",0),Ci(6,5),l())}function Vte(n,o){n&1&&Ci(0,1)(1,3)(2,4)(3,5)}var vn=(()=>{class n extends yE{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(i){return(e||(e=yi(n)))(i||n)}})();static \u0275cmp=B({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,i){t&2&&se("mat-table-fixed-layout",i.fixedLayout)},exportAs:["matTable"],features:[un([{provide:yE,useExisting:n},{provide:oc,useExisting:n},{provide:B0,useValue:null}]),li],ngContentSelectors:Rte,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,i){t&1&&(ci(Fte),Zt(0),Zt(1,1),E(2,Lte,1,0),E(3,zte,7,0)(4,Vte,4,0)),t&2&&(p(2),O(i._isServer?2:-1),p(),O(i._isNativeHtmlTable?3:4))},dependencies:[CE,fE,xE,vE],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 n})(),xn=(()=>{class n extends W1{static \u0275fac=(()=>{let e;return function(i){return(e||(e=yi(n)))(i||n)}})();static \u0275dir=yt({type:n,selectors:[["","matCellDef",""]],features:[un([{provide:W1,useExisting:n}]),li]})}return n})(),yn=(()=>{class n extends G1{static \u0275fac=(()=>{let e;return function(i){return(e||(e=yi(n)))(i||n)}})();static \u0275dir=yt({type:n,selectors:[["","matHeaderCellDef",""]],features:[un([{provide:G1,useExisting:n}]),li]})}return n})();var bn=(()=>{class n extends Fp{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(i){return(e||(e=yi(n)))(i||n)}})();static \u0275dir=yt({type:n,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[un([{provide:Fp,useExisting:n}]),li]})}return n})(),wn=(()=>{class n extends g8{static \u0275fac=(()=>{let e;return function(i){return(e||(e=yi(n)))(i||n)}})();static \u0275dir=yt({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[li]})}return n})();var Mn=(()=>{class n extends h8{static \u0275fac=(()=>{let e;return function(i){return(e||(e=yi(n)))(i||n)}})();static \u0275dir=yt({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[li]})}return n})();var Sn=(()=>{class n extends j0{static \u0275fac=(()=>{let e;return function(i){return(e||(e=yi(n)))(i||n)}})();static \u0275dir=yt({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",At]},features:[un([{provide:j0,useExisting:n}]),li]})}return n})();var kn=(()=>{class n extends q1{static \u0275fac=(()=>{let e;return function(i){return(e||(e=yi(n)))(i||n)}})();static \u0275dir=yt({type:n,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[un([{provide:q1,useExisting:n}]),li]})}return n})(),Pn=(()=>{class n extends hE{static \u0275fac=(()=>{let e;return function(i){return(e||(e=yi(n)))(i||n)}})();static \u0275cmp=B({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[un([{provide:hE,useExisting:n}]),li],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&Ci(0,0)},dependencies:[_u],encapsulation:2})}return n})();var Tn=(()=>{class n extends _E{static \u0275fac=(()=>{let e;return function(i){return(e||(e=yi(n)))(i||n)}})();static \u0275cmp=B({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[un([{provide:_E,useExisting:n}]),li],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&Ci(0,0)},dependencies:[_u],encapsulation:2})}return n})();var _n=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({imports:[Q1,zi]})}return n})(),Bte=9007199254740991,Da=class extends Am{_data;_renderData=new sn([]);_filter=new sn("");_internalPageChanges=new Ye;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(o){o=Array.isArray(o)?o:[],this._data.next(o),this._renderChangesSubscription||this._filterData(o)}get filter(){return this._filter.value}set filter(o){this._filter.next(o),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(o){this._sort=o,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(o){this._paginator=o,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(o,e)=>{let t=o[e];if(fA(t)){let i=Number(t);return i{let t=e.active,i=e.direction;return!t||i==""?o:o.sort((r,s)=>{let d=this.sortingDataAccessor(r,t),m=this.sortingDataAccessor(s,t),u=typeof d,h=typeof m;u!==h&&(u==="number"&&(d+=""),h==="number"&&(m+=""));let v=0;return d!=null&&m!=null?d>m?v=1:d{let t=e.trim().toLowerCase();return Object.values(o).some(i=>`${i}`.toLowerCase().includes(t))};constructor(o=[]){super(),this._data=new sn(o),this._updateChangeSubscription()}_updateChangeSubscription(){let o=this._sort?io(this._sort.sortChange,this._sort.initialized):Ut(null),e=this._paginator?io(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Ut(null),t=this._data,i=da([t,this._filter]).pipe(Pt(([d])=>this._filterData(d))),r=da([i,o]).pipe(Pt(([d])=>this._orderData(d))),s=da([r,e]).pipe(Pt(([d])=>this._pageData(d)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=s.subscribe(d=>this._renderData.next(d))}_filterData(o){return this.filteredData=this.filter==null||this.filter===""?o:o.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(o){return this.sort?this.sortData(o.slice(),this.sort):o}_pageData(o){if(!this.paginator)return o;let e=this.paginator.pageIndex*this.paginator.pageSize;return o.slice(e,e+this.paginator.pageSize)}_updatePaginator(o){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=o,e.pageIndex>0)){let t=Math.ceil(e.length/e.pageSize)-1||0,i=Math.min(e.pageIndex,t);i!==e.pageIndex&&(e.pageIndex=i,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};var xR=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,i){},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 n})(),jte={passive:!0},yR=(()=>{class n{_platform=f(Vr);_ngZone=f(Ki);_renderer=f(Dm).createRenderer(null,null);_styleLoader=f(kr);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return Yu;this._styleLoader.load(xR);let t=sl(e),i=this._monitoredElements.get(t);if(i)return i.subject;let r=new Ye,s="cdk-text-field-autofilled",d=u=>{u.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(s)?(t.classList.add(s),this._ngZone.run(()=>r.next({target:u.target,isAutofilled:!0}))):u.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(s)&&(t.classList.remove(s),this._ngZone.run(()=>r.next({target:u.target,isAutofilled:!1})))},m=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",d,jte)));return this._monitoredElements.set(t,{subject:r,unlisten:m}),r}stopMonitoring(e){let t=sl(e),i=this._monitoredElements.get(t);i&&(i.unlisten(),i.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Gc=(()=>{class n{_elementRef=f(Qt);_platform=f(Vr);_ngZone=f(Ki);_renderer=f(Ui);_resizeEvents=new Ye;_previousValue;_initialHeight;_destroyed=new Ye;_listenerCleanups;_minRows;_maxRows;_enabled=!0;_previousMinRows=-1;_textareaElement;get minRows(){return this._minRows}set minRows(e){this._minRows=ap(e),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(e){this._maxRows=ap(e),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&((this._enabled=e)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(e){this._cachedPlaceholderHeight=void 0,e?this._textareaElement.setAttribute("placeholder",e):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}_cachedLineHeight;_cachedPlaceholderHeight;_document=f(Eo);_hasFocus=!1;_isViewInited=!1;constructor(){f(kr).load(xR),this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){let e=this.minRows&&this._cachedLineHeight?`${this.minRows*this._cachedLineHeight}px`:null;e&&(this._textareaElement.style.minHeight=e)}_setMaxHeight(){let e=this.maxRows&&this._cachedLineHeight?`${this.maxRows*this._cachedLineHeight}px`:null;e&&(this._textareaElement.style.maxHeight=e)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[this._renderer.listen("window","resize",()=>this._resizeEvents.next()),this._renderer.listen(this._textareaElement,"focus",this._handleFocusEvent),this._renderer.listen(this._textareaElement,"blur",this._handleFocusEvent)],this._resizeEvents.pipe(rl(16)).subscribe(()=>{this._cachedLineHeight=this._cachedPlaceholderHeight=void 0,this.resizeToFitContent(!0)})}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._listenerCleanups?.forEach(e=>e()),this._resizeEvents.complete(),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let e=this._textareaElement.cloneNode(!1),t=e.style;e.rows=1,t.position="absolute",t.visibility="hidden",t.border="none",t.padding="0",t.height="",t.minHeight="",t.maxHeight="",t.top=t.bottom=t.left=t.right="auto",t.overflow="hidden",this._textareaElement.parentNode.appendChild(e),this._cachedLineHeight=e.clientHeight,e.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){let e=this._textareaElement,t=e.style.marginBottom||"",i=this._platform.FIREFOX,r=this._hasFocus,s=i?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";r&&(e.style.marginBottom=`${e.clientHeight}px`),e.classList.add(s);let d=e.scrollHeight-4;return e.classList.remove(s),r&&(e.style.marginBottom=t),d}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||this._cachedPlaceholderHeight!=null)return;if(!this.placeholder){this._cachedPlaceholderHeight=0;return}let e=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=e}_handleFocusEvent=e=>{this._hasFocus=e.type==="focus"};ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(e=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;let t=this._elementRef.nativeElement,i=t.value;if(!e&&this._minRows===this._previousMinRows&&i===this._previousValue)return;let r=this._measureScrollHeight(),s=Math.max(r,this._cachedPlaceholderHeight||0);t.style.height=`${s}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(t)):setTimeout(()=>this._scrollToCaretPosition(t))}),this._previousValue=i,this._previousMinRows=this._minRows}reset(){this._initialHeight!==void 0&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_scrollToCaretPosition(e){let{selectionStart:t,selectionEnd:i}=e;!this._destroyed.isStopped&&this._hasFocus&&e.setSelectionRange(t,i)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(t,i){t&1&&_("input",function(){return i._noopInputHandler()})},inputs:{minRows:[0,"cdkAutosizeMinRows","minRows"],maxRows:[0,"cdkAutosizeMaxRows","maxRows"],enabled:[2,"cdkTextareaAutosize","enabled",At],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"]})}return n})(),bR=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({})}return n})();var wR=new mn("MAT_INPUT_VALUE_ACCESSOR");var $te=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Hte=new mn("MAT_INPUT_CONFIG"),Pe=(()=>{class n{_elementRef=f(Qt);_platform=f(Vr);ngControl=f($v,{optional:!0,self:!0});_autofillMonitor=f(yR);_ngZone=f(Ki);_formField=f(mg,{optional:!0});_renderer=f(Ui);_uid=f(cr).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=f(Hte,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new Ye;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=Pa(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(We.required)??!1}set required(e){this._required=Pa(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Ak().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=Pa(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=>Ak().has(e));constructor(){let e=f(Yi,{optional:!0}),t=f(Ht,{optional:!0}),i=f(Sd),r=f(wR,{optional:!0,self:!0}),s=this._elementRef.nativeElement,d=s.nodeName.toLowerCase();r?K4(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r:this._inputValueAccessor=s,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(s,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Zv(i,this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=d==="select",this._isTextarea=d==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=s.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&zn(()=>{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 t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.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 t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){$te.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,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.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 t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,i){t&1&&_("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),t&2&&(ma("id",i.id)("disabled",i.disabled&&!i.disabledInteractive)("required",i.required),Ve("name",i.name||null)("readonly",i._getReadonlyAttribute())("aria-disabled",i.disabled&&i.disabledInteractive?"true":null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required)("id",i.id),se("mat-input-server",i._isServer)("mat-mdc-form-field-textarea-control",i._isInFormField&&i._isTextarea)("mat-mdc-form-field-input-control",i._isInFormField)("mat-mdc-input-disabled-interactive",i.disabledInteractive)("mdc-text-field__input",i._isInFormField)("mat-mdc-native-select-inline",i._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",At]},exportAs:["matInput"],features:[un([{provide:Yv,useExisting:n}]),In]})}return n})(),be=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({imports:[Me,Me,bR,zi]})}return n})();function Ute(n,o){if(n&1&&(a(0,"li"),c(1),l()),n&2){let e=o.$implicit;p(),N(e)}}function Wte(n,o){if(n&1&&(a(0,"ul",4),Q(1,Ute,2,1,"li",null,Ee),l()),n&2){let e=g();p(),K(e.data.details)}}function Gte(n,o){if(n&1&&(a(0,"p",5),c(1),l()),n&2){let e=g();p(),N(e.data.note)}}function qte(n,o){if(n&1){let e=L();a(0,"button",9),_("click",function(){w(e);let i=g();return M(i.onYesClick())}),c(1),l()}if(n&2){let e=g();se("destructive-button",e.tone==="danger"),p(),Z(" ",e.confirmButtonText," ")}}var Bt=(()=>{class n{dialogRef;data;constructor(e,t){this.dialogRef=e,this.data=t}get title(){return this.data.title||"Confirm action"}get confirmButtonText(){return this.data.confirmButtonText||"Confirm"}get cancelButtonText(){return this.data.cancelButtonText||"Cancel"}get tone(){return this.data.tone||"danger"}get icon(){return this.data.icon?this.data.icon:this.tone==="danger"?"delete_forever":this.tone==="warning"?"warning":"help"}onNoClick(){this.dialogRef.close(!1)}onYesClick(){this.dialogRef.close(!0)}static \u0275fac=function(t){return new(t||n)(wt(He),wt(Wt))};static \u0275cmp=B({type:n,selectors:[["app-confirmation-dialog"]],decls:16,vars:11,consts:[[1,"confirmation-dialog"],["mat-dialog-title","",1,"confirmation-dialog__header"],["aria-hidden","true",1,"confirmation-dialog__icon"],[1,"confirmation-dialog__content"],[1,"confirmation-dialog__details"],[1,"confirmation-dialog__note"],["align","end",1,"confirmation-dialog__actions"],["mat-stroked-button","","type","button","cdkFocusInitial","",1,"cancel-button",3,"click"],["mat-flat-button","","type","button",1,"confirm-button",3,"destructive-button"],["mat-flat-button","","type","button",1,"confirm-button",3,"click"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"div",1)(2,"span",2)(3,"mat-icon"),c(4),l()(),a(5,"h2"),c(6),l()(),a(7,"mat-dialog-content",3)(8,"p"),c(9),l(),E(10,Wte,3,0,"ul",4),E(11,Gte,2,1,"p",5),l(),a(12,"mat-dialog-actions",6)(13,"button",7),_("click",function(){return i.onNoClick()}),c(14),l(),E(15,qte,2,3,"button",8),l()()),t&2&&(se("confirmation-dialog--danger",i.tone==="danger")("confirmation-dialog--warning",i.tone==="warning"),p(4),N(i.icon),p(2),N(i.title),p(3),N(i.data.message),p(),O(i.data.details!=null&&i.data.details.length?10:-1),p(),O(i.data.note?11:-1),p(3),Z(" ",i.cancelButtonText," "),p(),O(i.data.hideConfirm?-1:15))},dependencies:[fe,Se,Ge,qe,xt,ne,pe,X,_e],styles:[".confirmation-dialog[_ngcontent-%COMP%]{--confirmation-accent: var(--mat-sys-primary);color:var(--mat-sys-on-surface)}.confirmation-dialog--danger[_ngcontent-%COMP%]{--confirmation-accent: var(--mat-sys-error)}.confirmation-dialog--warning[_ngcontent-%COMP%]{--confirmation-accent: var(--mat-sys-tertiary)}.confirmation-dialog__header[_ngcontent-%COMP%]{min-height:var(--gns3-density-section-header-height);margin:0;padding:var(--gns3-density-section-header-padding);display:flex;align-items:center;gap:var(--gns3-density-space-3);box-sizing:border-box;color:var(--mat-sys-on-primary-container);background:var(--mat-sys-primary-container);border-bottom:1px solid var(--mat-sys-outline-variant)}.confirmation-dialog__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--mat-sys-on-primary-container);font-family:var(--gns3-density-section-header-font);font-size:var(--gns3-density-section-header-title-size);font-weight:650;line-height:1.2;letter-spacing:-.01em}.confirmation-dialog__icon[_ngcontent-%COMP%]{width:var(--gns3-density-dialog-icon-container);height:var(--gns3-density-dialog-icon-container);display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;color:var(--confirmation-accent);background:color-mix(in srgb,var(--confirmation-accent) 12%,transparent);border-radius:var(--gns3-density-radius-sm)}.confirmation-dialog__icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:var(--gns3-density-dialog-icon-size);height:var(--gns3-density-dialog-icon-size);font-size:var(--gns3-density-dialog-icon-size)}.confirmation-dialog__content[_ngcontent-%COMP%]{padding:var(--gns3-density-space-4);color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium);font-size:var(--gns3-density-dialog-body-size);line-height:1.45}.confirmation-dialog__content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;white-space:pre-line}.confirmation-dialog__details[_ngcontent-%COMP%]{max-height:180px;margin:var(--gns3-density-space-3) 0 0;padding:var(--gns3-density-space-2) var(--gns3-density-space-3) var(--gns3-density-space-2) calc(var(--gns3-density-space-5) + var(--gns3-density-space-2));overflow-y:auto;background:var(--mat-sys-surface-container);border:1px solid var(--mat-sys-outline-variant);border-radius:var(--gns3-density-radius-sm)}.confirmation-dialog__content[_ngcontent-%COMP%] .confirmation-dialog__note[_ngcontent-%COMP%]{margin-top:var(--gns3-density-space-3);color:var(--confirmation-accent);font-weight:600}.confirmation-dialog__actions[_ngcontent-%COMP%]{min-height:var(--gns3-density-section-header-height);padding:var(--gns3-density-space-2) var(--gns3-density-space-4);gap:var(--gns3-density-space-2);border-top:1px solid var(--mat-sys-outline-variant)}.confirmation-dialog__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:96px;height:var(--gns3-density-button-height);padding-inline:var(--gns3-density-space-4);border-radius:var(--gns3-density-radius-sm);font:var(--mat-sys-label-large);font-size:var(--gns3-density-dialog-action-size)}.confirmation-dialog__actions[_ngcontent-%COMP%] .confirm-button[_ngcontent-%COMP%]:not(.destructive-button){color:var(--mat-sys-on-primary);background:var(--mat-sys-primary)}html[data-density=compact][_nghost-%COMP%] .confirmation-dialog__header[_ngcontent-%COMP%], html[data-density=compact] [_nghost-%COMP%] .confirmation-dialog__header[_ngcontent-%COMP%]{gap:var(--gns3-density-space-2)}html[data-density=compact][_nghost-%COMP%] .confirmation-dialog__content[_ngcontent-%COMP%], html[data-density=compact] [_nghost-%COMP%] .confirmation-dialog__content[_ngcontent-%COMP%]{padding:var(--gns3-density-space-3) var(--gns3-density-space-4)}html[data-density=compact][_nghost-%COMP%] .confirmation-dialog__actions[_ngcontent-%COMP%], html[data-density=compact] [_nghost-%COMP%] .confirmation-dialog__actions[_ngcontent-%COMP%]{min-height:var(--gns3-density-section-header-height);padding:var(--gns3-density-space-1) var(--gns3-density-space-4)}html[data-density=compact][_nghost-%COMP%] .confirmation-dialog__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], html[data-density=compact] [_nghost-%COMP%] .confirmation-dialog__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:80px;padding-inline:var(--gns3-density-space-3)}"],changeDetection:0})}return n})();function Qte(n,o){n&1&&(a(0,"div",21),z(1,"mat-progress-spinner",24),a(2,"span"),c(3,"Loading computes\u2026"),l()())}function Kte(n,o){n&1&&(a(0,"mat-header-cell"),c(1,"Name"),l())}function Xte(n,o){if(n&1&&(a(0,"mat-cell")(1,"div",35)(2,"span",36)(3,"mat-icon"),c(4),l()(),a(5,"span",37)(6,"strong"),c(7),l(),a(8,"small"),c(9),l()()()()),n&2){let e=o.$implicit;p(4),N(e.compute_id==="local"?"computer":"dns"),p(3),N(e.name||e.compute_id),p(2),N(e.compute_id==="local"?"Local compute":e.compute_id)}}function Yte(n,o){n&1&&(a(0,"mat-header-cell"),c(1,"Status"),l())}function Zte(n,o){if(n&1&&(a(0,"mat-cell")(1,"span",38),z(2,"span"),c(3),l()()),n&2){let e=o.$implicit;p(),se("computes-page__status--connected",e.connected),C("matTooltip",e.last_error||""),p(2),Z(" ",e.connected?"Connected":"Disconnected"," ")}}function Jte(n,o){n&1&&(a(0,"mat-header-cell"),c(1,"Host"),l())}function ene(n,o){if(n&1&&(a(0,"mat-cell")(1,"span",39),c(2),l()()),n&2){let e=o.$implicit,t=g(2);p(),C("matTooltip",e.protocol+"//"+t.formatHost(e)),p(),Z(" ",t.formatHost(e)," ")}}function tne(n,o){n&1&&(a(0,"mat-header-cell"),c(1,"Platform"),l())}function nne(n,o){if(n&1&&(a(0,"mat-cell")(1,"span",40)(2,"mat-icon"),c(3,"memory"),l(),c(4),l()()),n&2){let e=o.$implicit,t=g(2);p(4),Z(" ",t.getPlatform(e)," ")}}function ine(n,o){n&1&&(a(0,"mat-header-cell"),c(1,"Resources"),l())}function one(n,o){if(n&1&&(a(0,"div",41)(1,"span",43)(2,"mat-icon"),c(3,"developer_board"),l(),c(4),l(),a(5,"span",44)(6,"mat-icon"),c(7,"memory"),l(),c(8),l(),a(9,"span",45)(10,"mat-icon"),c(11,"storage"),l(),c(12),l()()),n&2){let e=g().$implicit,t=g(2);p(4),N(t.formatPercent(e.cpu_usage_percent)),p(4),N(t.formatPercent(e.memory_usage_percent)),p(4),N(t.formatPercent(e.disk_usage_percent))}}function rne(n,o){n&1&&(a(0,"span",42),c(1,"Unavailable"),l())}function ane(n,o){if(n&1&&(a(0,"mat-cell"),E(1,one,13,3,"div",41)(2,rne,2,0,"span",42),l()),n&2){let e=o.$implicit;p(),O(e.connected?1:2)}}function sne(n,o){n&1&&(a(0,"mat-header-cell"),c(1,"Actions"),l())}function lne(n,o){if(n&1){let e=L();a(0,"div",46)(1,"button",48),_("click",function(){w(e);let i=g().$implicit,r=g(2);return M(r.connectCompute(i))}),a(2,"mat-icon"),c(3,"link"),l()(),a(4,"button",49),_("click",function(){w(e);let i=g().$implicit,r=g(2);return M(r.openEditDialog(i))}),a(5,"mat-icon"),c(6,"edit"),l()(),a(7,"button",50),_("click",function(){w(e);let i=g().$implicit,r=g(2);return M(r.deleteCompute(i))}),a(8,"mat-icon"),c(9,"delete"),l()()()}if(n&2){let e=g().$implicit;p(),Ve("aria-label","Connect "+(e.name||e.compute_id)),p(3),Ve("aria-label","Edit "+(e.name||e.compute_id)),p(3),Ve("aria-label","Delete "+(e.name||e.compute_id))}}function cne(n,o){n&1&&(a(0,"span",47),c(1," Controller managed "),l())}function dne(n,o){if(n&1&&(a(0,"mat-cell"),E(1,lne,10,3,"div",46)(2,cne,2,0,"span",47),l()),n&2){let e=o.$implicit;p(),O(e.compute_id!=="local"?1:2)}}function pne(n,o){n&1&&z(0,"mat-header-row")}function mne(n,o){if(n&1&&z(0,"mat-row"),n&2){let e=o.$implicit;se("computes-page__row--connected",e.connected)}}function une(n,o){if(n&1&&(a(0,"mat-table",22),Ae(1,25),ce(2,Kte,2,0,"mat-header-cell",26)(3,Xte,10,3,"mat-cell",27),Ne(),Ae(4,28),ce(5,Yte,2,0,"mat-header-cell",26)(6,Zte,4,4,"mat-cell",27),Ne(),Ae(7,29),ce(8,Jte,2,0,"mat-header-cell",26)(9,ene,3,2,"mat-cell",27),Ne(),Ae(10,30),ce(11,tne,2,0,"mat-header-cell",26)(12,nne,5,1,"mat-cell",27),Ne(),Ae(13,31),ce(14,ine,2,0,"mat-header-cell",26)(15,ane,3,1,"mat-cell",27),Ne(),Ae(16,32),ce(17,sne,2,0,"mat-header-cell",26)(18,dne,3,1,"mat-cell",27),Ne(),ce(19,pne,1,0,"mat-header-row",33)(20,mne,1,2,"mat-row",34),l()),n&2){let e=g();C("dataSource",e.filteredComputes())("trackBy",e.trackCompute),p(19),C("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",!0),p(),C("matRowDefColumns",e.displayedColumns)}}function gne(n,o){n&1&&c(0," Try changing the search or status filter. ")}function hne(n,o){n&1&&c(0," Add a compute server to extend the controller's resources. ")}function _ne(n,o){if(n&1){let e=L();a(0,"button",52),_("click",function(){w(e);let i=g(2);return M(i.openAddDialog())}),a(1,"mat-icon"),c(2,"add"),l(),c(3," Add Compute "),l()}}function fne(n,o){if(n&1&&(a(0,"div",23)(1,"mat-icon"),c(2,"dns"),l(),a(3,"h3"),c(4,"No computes found"),l(),a(5,"p"),E(6,gne,1,0)(7,hne,1,0),l(),E(8,_ne,4,0,"button",51),l()),n&2){let e=g();p(6),O(e.searchText()||e.statusFilter()!=="all"?6:7),p(2),O(!e.searchText()&&e.statusFilter()==="all"?8:-1)}}var Cne=(n,o)=>o.key;function vne(n,o){if(n&1&&(a(0,"mat-option",6),c(1),l()),n&2){let e=o.$implicit;C("value",e.key),p(),N(e.name)}}function xne(n,o){n&1&&(a(0,"mat-error"),c(1,"You must select a protocol"),l())}function yne(n,o){n&1&&(a(0,"mat-error"),c(1,"You must enter a host"),l())}function bne(n,o){n&1&&(a(0,"mat-error"),c(1,"You must enter a port"),l())}function wne(n,o){n&1&&(a(0,"mat-error"),c(1,"Port must be between 1 and 65535"),l())}var SR=(()=>{class n{route=f(Lt);controllerService=f(_t);computeService=f(dl);notificationService=f(us);toasterService=f(re);dialog=f(Xe);cd=f(ie);controller;_computes=R([]);computes=Fe(()=>[...this._computes()].sort((t,i)=>t.compute_id==="local"?-1:i.compute_id==="local"?1:(t.name||"").localeCompare(i.name||"")));searchText=R("");statusFilter=R("all");filteredComputes=Fe(()=>{let e=this.searchText().trim().toLowerCase(),t=this.statusFilter();return this.computes().filter(i=>{let r=t==="all"||t==="connected"&&i.connected||t==="disconnected"&&!i.connected,s=[i.name,i.compute_id,i.host,i.port,i.protocol,i.capabilities?.platform,...i.capabilities?.node_types||[]].filter(d=>d!=null).join(" ").toLowerCase();return r&&(!e||s.includes(e))})});connectedCount=Fe(()=>this.computes().filter(e=>e.connected).length);displayedColumns=["name","status","host","platform","resources","actions"];loading=R(!0);subscription=new To;ngOnInit(){this.loadControllerAndComputes()}ngOnDestroy(){this.subscription.unsubscribe()}loadControllerAndComputes(){let e=this.route.snapshot.paramMap.get("controller_id");this.controllerService.get(parseInt(e,10)).then(t=>{if(this.controller=t,this.cd.markForCheck(),this.notificationService.hasCachedData()){let i=this.notificationService.getCachedComputes();this._computes.set(i),this.loading.set(!1),this.cd.markForCheck()}else this.loadComputes();this.subscription.add(this.notificationService.computeNotificationEmitter.subscribe(i=>{this.handleComputeNotification(i)})),this.subscription.add(this.notificationService.computeCacheUpdated.subscribe(i=>{this._computes.set(i),this.loading.set(!1),this.cd.markForCheck()}))},t=>{let i=t.error?.message||t.message||"Failed to load controller";this.toasterService.error(i),this.loading.set(!1),this.cd.markForCheck()})}handleComputeNotification(e){switch(e.action){case"compute.created":this._computes.update(t=>[...t,e.event]),this.toasterService.success(`Compute "${e.event.name}" added`);break;case"compute.updated":this._computes.update(t=>t.map(i=>i.compute_id===e.event.compute_id?e.event:i));break;case"compute.deleted":this._computes.update(t=>t.filter(i=>i.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=>{let t=e.error?.message||e.message||"Failed to load computes";this.loading.set(!1),this.toasterService.error(t),this.cd.markForCheck()}})}openAddDialog(){this.dialog.open(MR,{panelClass:["base-dialog-panel","simple-dialog-panel","dialog-medium-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller}}).afterClosed().subscribe(t=>{t&&this.computeService.createCompute(this.controller,t).subscribe({next:()=>{this.toasterService.success("Compute added successfully"),this.loadComputes()},error:i=>{let r=i.error?.message||i.message||"Failed to add compute";this.toasterService.error(r),this.cd.markForCheck()}})})}openEditDialog(e){this.computeService.getCompute(this.controller,e.compute_id).subscribe({next:t=>{this.dialog.open(MR,{panelClass:["base-dialog-panel","simple-dialog-panel","dialog-medium-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller,compute:t}}).afterClosed().subscribe(r=>{r&&this.computeService.updateCompute(this.controller,e.compute_id,r).subscribe({next:()=>{this.toasterService.success("Compute updated successfully"),this.loadComputes()},error:s=>{let d=s.error?.message||s.message||"Failed to update compute";this.toasterService.error(d),this.cd.markForCheck()}})})},error:t=>{let i=t.error?.message||t.message||"Failed to load compute details";this.toasterService.error(i),this.cd.markForCheck()}})}deleteCompute(e){this.dialog.open(Bt,{panelClass:["base-confirmation-dialog-panel","confirmation-danger-panel","dialog-small-panel"],autoFocus:".cancel-button",disableClose:!0,data:{title:"Delete compute?",message:`Compute "${e.name||e.compute_id}" will be permanently deleted.`,note:"This action cannot be undone.",confirmButtonText:"Delete compute",tone:"danger"}}).afterClosed().subscribe(i=>{i&&this.computeService.deleteCompute(this.controller,e.compute_id).subscribe({next:()=>{this.toasterService.success("Compute deleted successfully"),this.loadComputes()},error:r=>{let s=r.error?.message||r.message||"Failed to delete compute";this.toasterService.error(s),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:t=>{let i=this.computes().map(r=>r.compute_id===t.compute_id?t:r);this._computes.set(i),this.cd.markForCheck()},error:()=>{this.loadComputes()}})},error:t=>{let i=t.error?.message||t.message||"Failed to connect compute";this.toasterService.error(i),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}`}onSearchChange(e){this.searchText.set(e)}onStatusFilterChange(e){this.statusFilter.set(e)}trackCompute(e,t){return t.compute_id}getPlatform(e){return e.capabilities?.platform||"Unknown"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["app-computes"]],decls:56,vars:10,consts:[[1,"computes-page"],[1,"computes-page__header"],[1,"computes-page__heading"],[1,"computes-page__title"],[1,"computes-page__header-actions"],["mat-raised-button","","color","primary",1,"computes-page__button",3,"click","disabled"],[1,"computes-page__toolbar"],["subscriptSizing","dynamic",1,"computes-page__search"],["matPrefix",""],["matInput","","placeholder","Search by name, host, platform, or node type",3,"input","value"],["subscriptSizing","dynamic",1,"computes-page__filter"],[3,"valueChange","value"],["value","all"],["value","connected"],["value","disconnected"],[1,"computes-page__main"],["aria-label","Compute summary",1,"computes-page__summary"],[1,"computes-page__summary-item"],[1,"computes-page__summary-item","computes-page__summary-item--connected"],[1,"computes-page__summary-item","computes-page__summary-item--disconnected"],[1,"computes-page__table-container"],[1,"computes-page__loading"],[3,"dataSource","trackBy"],[1,"computes-page__empty"],["diameter","42","mode","indeterminate"],["matColumnDef","name"],[4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","status"],["matColumnDef","host"],["matColumnDef","platform"],["matColumnDef","resources"],["matColumnDef","actions"],[4,"matHeaderRowDef","matHeaderRowDefSticky"],[3,"computes-page__row--connected",4,"matRowDef","matRowDefColumns"],[1,"computes-page__name-cell"],[1,"computes-page__compute-icon"],[1,"computes-page__name-copy"],[1,"computes-page__status",3,"matTooltip"],[1,"computes-page__host",3,"matTooltip"],[1,"computes-page__platform"],[1,"computes-page__resources"],[1,"computes-page__unavailable"],["matTooltip","CPU usage"],["matTooltip","Memory usage"],["matTooltip","Disk usage"],[1,"computes-page__actions-cell"],["matTooltip","The local compute is managed by the controller",1,"computes-page__managed-label"],["mat-icon-button","","matTooltip","Connect compute",1,"computes-page__action","computes-page__action--connect",3,"click"],["mat-icon-button","","matTooltip","Edit compute",1,"computes-page__action","computes-page__action--edit",3,"click"],["mat-icon-button","","matTooltip","Delete compute",1,"computes-page__action","computes-page__action--delete",3,"click"],["mat-raised-button","","color","primary",1,"computes-page__button"],["mat-raised-button","","color","primary",1,"computes-page__button",3,"click"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1",3),c(4,"Computes"),l()(),a(5,"div",4)(6,"button",5),_("click",function(){return i.loadComputes()}),a(7,"mat-icon"),c(8,"refresh"),l(),c(9," Refresh "),l(),a(10,"button",5),_("click",function(){return i.openAddDialog()}),a(11,"mat-icon"),c(12,"add"),l(),c(13," Add Compute "),l()()(),a(14,"section",6)(15,"mat-form-field",7)(16,"mat-icon",8),c(17,"search"),l(),a(18,"input",9),_("input",function(s){return i.onSearchChange(s.target.value)}),l()(),a(19,"mat-form-field",10)(20,"mat-label"),c(21,"Status"),l(),a(22,"mat-select",11),_("valueChange",function(s){return i.onStatusFilterChange(s)}),a(23,"mat-option",12),c(24,"All statuses"),l(),a(25,"mat-option",13),c(26,"Connected"),l(),a(27,"mat-option",14),c(28,"Disconnected"),l()()()(),a(29,"main",15)(30,"section",16)(31,"div",17)(32,"mat-icon"),c(33,"dns"),l(),a(34,"span")(35,"strong"),c(36),l(),c(37," Total "),l()(),a(38,"div",18)(39,"mat-icon"),c(40,"check_circle"),l(),a(41,"span")(42,"strong"),c(43),l(),c(44," Connected "),l()(),a(45,"div",19)(46,"mat-icon"),c(47,"error_outline"),l(),a(48,"span")(49,"strong"),c(50),l(),c(51," Disconnected "),l()()(),a(52,"div",20),E(53,Qte,4,0,"div",21)(54,une,21,5,"mat-table",22)(55,fne,9,2,"div",23),l()()()),t&2&&(p(6),C("disabled",i.loading()),p(4),C("disabled",!i.controller),p(8),C("value",i.searchText()),p(4),C("value",i.statusFilter()),p(14),N(i.computes().length),p(7),N(i.connectedCount()),p(7),N(i.computes().length-i.connectedCount()),p(2),se("computes-page__table-container--loading",i.loading()),p(),O(i.loading()?53:i.filteredComputes().length?54:55))},dependencies:[fe,fn,X,_e,Be,ne,pe,rt,_n,vn,yn,Sn,bn,xn,kn,wn,Mn,Pn,Tn,at,pt,Se,Me,ke,ze,Go,be,Pe,st,mt,nt,ot,dt,Ft],styles:["[_nghost-%COMP%]{display:block;width:100%;background:transparent}.computes-page[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_computes-fade-in .4s ease-out}.computes-page__header[_ngcontent-%COMP%], .computes-page__toolbar[_ngcontent-%COMP%], .computes-page__main[_ngcontent-%COMP%]{max-width:1600px;margin-inline:auto}.computes-page__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 20px 16px}.computes-page__heading[_ngcontent-%COMP%]{min-width:0}.computes-page__title[_ngcontent-%COMP%]{margin:0;color:var(--mat-sys-on-surface);font-size:32px;font-weight:500}.computes-page__header-actions[_ngcontent-%COMP%], .computes-page__toolbar[_ngcontent-%COMP%], .computes-page__resources[_ngcontent-%COMP%], .computes-page__actions-cell[_ngcontent-%COMP%]{display:flex;align-items:center}.computes-page__header-actions[_ngcontent-%COMP%]{flex:0 0 auto;gap:var(--gns3-density-space-3)}button.computes-page__button[_ngcontent-%COMP%]{height:var(--gns3-density-control-height);padding-inline:18px;border-radius:12px;font-size:15px;font-weight:500;letter-spacing:.3px;text-transform:none;transition:transform .2s ease,box-shadow .2s ease}button.computes-page__button[_ngcontent-%COMP%]:hover:not([disabled]){transform:translateY(-2px);box-shadow:0 4px 12px color-mix(in srgb,var(--mat-sys-primary) 25%,transparent)}.computes-page__toolbar[_ngcontent-%COMP%]{gap:var(--gns3-density-card-gap);padding:0 20px 8px}.computes-page__search[_ngcontent-%COMP%]{flex:1;min-width:260px}.computes-page__filter[_ngcontent-%COMP%]{flex:0 0 190px}.computes-page__main[_ngcontent-%COMP%]{padding:0 20px 24px}.computes-page__summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gns3-density-space-3);margin-bottom:var(--gns3-density-card-gap)}.computes-page__summary-item[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:0;gap:var(--gns3-density-space-3);padding:14px 16px;border:1px solid var(--mat-sys-outline-variant);border-radius:14px;color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface-container)}.computes-page__summary-item[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{display:grid;flex:0 0 38px;width:38px;height:38px;place-items:center;border-radius:10px;color:var(--mat-sys-on-primary-container);background:var(--mat-sys-primary-container)}.computes-page__summary-item[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;min-width:0;flex-direction:column;font-size:12px}.computes-page__summary-item[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface);font-size:20px;line-height:1.15}.computes-page__summary-item--connected[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{color:var(--mat-sys-on-primary-container);background:var(--mat-sys-primary-container)}.computes-page__summary-item--disconnected[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{color:var(--mat-sys-on-error-container);background:var(--mat-sys-error-container)}.computes-page__table-container[_ngcontent-%COMP%]{position:relative;min-width:0;overflow:hidden;border-radius:16px;background:var(--mat-sys-surface);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-page__table-container--loading[_ngcontent-%COMP%]{min-height:320px}.computes-page__loading[_ngcontent-%COMP%]{position:absolute;z-index:2;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:320px;gap:var(--gns3-density-card-gap);color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface)}mat-table[_ngcontent-%COMP%]{width:100%;min-width:980px}.mat-mdc-row[_ngcontent-%COMP%], .mat-row[_ngcontent-%COMP%]{height:var(--mat-table-row-item-container-height);min-height:var(--mat-table-row-item-container-height)}.mat-header-row[_ngcontent-%COMP%], .mat-mdc-header-row[_ngcontent-%COMP%]{position:sticky;z-index:10;top:0;background:color-mix(in srgb,var(--mat-sys-primary-container) 72%,var(--mat-sys-surface))}.mat-header-row[_ngcontent-%COMP%] mat-header-cell[_ngcontent-%COMP%], .mat-mdc-header-row[_ngcontent-%COMP%] mat-header-cell[_ngcontent-%COMP%]{color:var(--mat-sys-on-primary-container);font-size:13px;font-weight:650;letter-spacing:.5px;text-transform:uppercase}mat-row[_ngcontent-%COMP%]{border-left:3px solid var(--mat-sys-error);transition:background-color .18s ease}mat-row[_ngcontent-%COMP%]:nth-child(2n){background:color-mix(in srgb,var(--mat-sys-on-surface) 1%,transparent)}mat-row[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--mat-sys-primary) 5%,transparent)}mat-row.computes-page__row--connected[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-primary)}mat-cell[_ngcontent-%COMP%], mat-header-cell[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:inherit;overflow:hidden;color:var(--mat-sys-on-surface);text-overflow:ellipsis;white-space:nowrap}.mat-column-name[_ngcontent-%COMP%]{flex:0 0 24%;min-width:235px}.mat-column-status[_ngcontent-%COMP%]{flex:0 0 14%;min-width:135px;justify-content:center}.mat-column-host[_ngcontent-%COMP%]{flex:0 0 17%;min-width:150px;justify-content:center}.mat-column-platform[_ngcontent-%COMP%]{flex:0 0 14%;min-width:130px;justify-content:center}.mat-column-resources[_ngcontent-%COMP%]{flex:1 0 20%;min-width:225px;justify-content:center}.mat-column-actions[_ngcontent-%COMP%]{flex:0 0 14%;min-width:155px;justify-content:center}.computes-page__name-cell[_ngcontent-%COMP%], .computes-page__platform[_ngcontent-%COMP%]{display:flex;align-items:center}.computes-page__name-cell[_ngcontent-%COMP%]{min-width:0;gap:var(--gns3-density-space-3)}.computes-page__compute-icon[_ngcontent-%COMP%]{display:grid;flex:0 0 38px;width:38px;height:38px;place-items:center;border-radius:10px;color:var(--mat-sys-on-primary-container);background:color-mix(in srgb,var(--mat-sys-primary-container) 82%,var(--mat-sys-surface))}.computes-page__compute-icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:21px;height:21px;font-size:21px}.computes-page__name-copy[_ngcontent-%COMP%]{display:flex;min-width:0;flex-direction:column}.computes-page__name-copy[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .computes-page__name-copy[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.computes-page__name-copy[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:14px;font-weight:600}.computes-page__name-copy[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font-size:11px}.computes-page__status[_ngcontent-%COMP%]{display:inline-flex;align-items:center;width:fit-content;gap:var(--gns3-density-space-2);padding:4px 10px;border:1px solid var(--mat-sys-error);border-radius:18px;color:var(--mat-sys-on-error-container);background:var(--mat-sys-error-container);font-size:12px;font-weight:600}.computes-page__status[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background:currentColor}.computes-page__status--connected[_ngcontent-%COMP%]{border-color:var(--mat-sys-primary);color:var(--mat-sys-on-primary-container);background:var(--mat-sys-primary-container)}.computes-page__host[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.computes-page__platform[_ngcontent-%COMP%]{gap:var(--gns3-density-space-2);color:var(--mat-sys-on-surface-variant);font-size:13px}.computes-page__platform[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:17px;height:17px;font-size:17px}.computes-page__resources[_ngcontent-%COMP%]{gap:var(--gns3-density-space-3)}.computes-page__resources[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;font-size:12px}.computes-page__resources[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:16px;height:16px;color:var(--mat-sys-on-surface-variant);font-size:16px}.computes-page__unavailable[_ngcontent-%COMP%], .computes-page__managed-label[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font-size:12px}.computes-page__actions-cell[_ngcontent-%COMP%]{gap:4px}button.computes-page__action[_ngcontent-%COMP%]{--compute-action-color: var(--mat-sys-on-surface-variant);width:32px;height:32px;color:var(--compute-action-color);--mat-icon-button-state-layer-size: 32px;--mat-icon-button-icon-size: 20px}button.computes-page__action[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--compute-action-color);transition:transform .15s ease}button.computes-page__action[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{transform:scale(1.15)}button.computes-page__action--connect[_ngcontent-%COMP%]{--compute-action-color: var(--mat-sys-secondary)}button.computes-page__action--edit[_ngcontent-%COMP%]{--compute-action-color: var(--mat-sys-primary)}button.computes-page__action--delete[_ngcontent-%COMP%]{--compute-action-color: var(--mat-sys-error)}.computes-page__empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:260px;padding:32px;color:var(--mat-sys-on-surface-variant);text-align:center}.computes-page__empty[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{width:48px;height:48px;font-size:48px;opacity:.55}.computes-page__empty[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:12px 0 0;color:var(--mat-sys-on-surface);font-size:17px}.computes-page__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:5px 0 16px;font-size:14px}[data-density=compact][_nghost-%COMP%] button.computes-page__button[_ngcontent-%COMP%], [data-density=compact] [_nghost-%COMP%] button.computes-page__button[_ngcontent-%COMP%]{min-height:40px;height:40px}@keyframes _ngcontent-%COMP%_computes-fade-in{0%{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}@media(max-width:900px){.computes-page__header[_ngcontent-%COMP%], .computes-page__toolbar[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column}.computes-page__header-actions[_ngcontent-%COMP%]{width:100%}.computes-page__filter[_ngcontent-%COMP%]{flex:1}}@media(max-width:600px){.computes-page__header[_ngcontent-%COMP%]{padding:20px 16px 12px}.computes-page__toolbar[_ngcontent-%COMP%], .computes-page__main[_ngcontent-%COMP%]{padding-inline:16px}.computes-page__title[_ngcontent-%COMP%]{font-size:25px}.computes-page__header-actions[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}button.computes-page__button[_ngcontent-%COMP%]{width:100%}.computes-page__summary[_ngcontent-%COMP%]{grid-template-columns:1fr}}"],changeDetection:0})}return n})(),MR=(()=>{class n{dialogRef=f(He);data=f(Wt);protocols=[{key:"http",name:"HTTP"},{key:"https",name:"HTTPS"}];computeForm=new Uo({name:new Qe(""),protocol:new Qe("http",[We.required]),host:new Qe("",[We.required]),port:new Qe(3080,[We.required,We.min(1),We.max(65535)]),user:new Qe("gns3"),password:new Qe("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,t={protocol:e.protocol,host:e.host,port:e.port,user:e.user||void 0,name:e.name||void 0};e.password&&e.password.trim()!==""&&(t.password=e.password),this.dialogRef.close(t)}onCancelClick(){this.dialogRef.close()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,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(t,i){t&1&&(a(0,"h2",0),c(1),l(),a(2,"form",1)(3,"div",2)(4,"mat-form-field",3)(5,"mat-label"),c(6,"Name (optional)"),l(),z(7,"input",4),l(),a(8,"mat-form-field",3)(9,"mat-label"),c(10,"Protocol"),l(),a(11,"mat-select",5),Q(12,vne,2,2,"mat-option",6,Cne),l(),E(14,xne,2,0,"mat-error"),l(),a(15,"mat-form-field",3)(16,"mat-label"),c(17,"Host"),l(),z(18,"input",7),E(19,yne,2,0,"mat-error"),l(),a(20,"mat-form-field",3)(21,"mat-label"),c(22,"Port"),l(),z(23,"input",8),E(24,bne,2,0,"mat-error"),E(25,wne,2,0,"mat-error"),l(),a(26,"mat-form-field",3)(27,"mat-label"),c(28,"User"),l(),z(29,"input",9),l(),a(30,"mat-form-field",3)(31,"mat-label"),c(32,"Password"),l(),z(33,"input",10),l()(),a(34,"div",11)(35,"button",12),_("click",function(){return i.onCancelClick()}),c(36,"Cancel"),l(),a(37,"button",13),_("click",function(){return i.onSaveClick()}),c(38),l()()()),t&2&&(p(),N(i.isEditMode?"Edit Compute":"Add Compute"),p(),C("formGroup",i.computeForm),p(10),K(i.protocols),p(2),O(i.computeForm.get("protocol").hasError("required")?14:-1),p(5),O(i.computeForm.get("host").hasError("required")?19:-1),p(5),O(i.computeForm.get("port").hasError("required")?24:-1),p(),O(i.computeForm.get("port").hasError("min")||i.computeForm.get("port").hasError("max")?25:-1),p(12),C("disabled",i.computeForm.invalid),p(),Z(" ",i.isEditMode?"Update":"Add"," "))},dependencies:[fe,Ft,vt,jt,Wo,$t,Ct,Ht,Kt,Se,Ge,qe,xt,X,_e,Me,ke,ze,ni,be,Pe,st,mt,nt],encapsulation:2,changeDetection:0})}return n})();var Mne=["*"];var Sne=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],kne=["[mat-card-avatar], [matCardAvatar]",`mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], [matCardTitle], [matCardSubtitle]`,"*"],Pne=new mn("MAT_CARD_CONFIG"),Kn=(()=>{class n{appearance;constructor(){let e=f(Pne,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(t,i){t&2&&se("mat-mdc-card-outlined",i.appearance==="outlined")("mdc-card--outlined",i.appearance==="outlined")("mat-mdc-card-filled",i.appearance==="filled")("mdc-card--filled",i.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Mne,decls:1,vars:0,template:function(t,i){t&1&&(ci(),Zt(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 transparent; 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 n})(),qc=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"]})}return n})();var Pl=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return n})();var Cy=(()=>{class n{align="start";static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(t,i){t&2&&se("mat-mdc-card-actions-align-end",i.align==="end")},inputs:{align:"align"},exportAs:["matCardActions"]})}return n})(),Qc=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],ngContentSelectors:kne,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(t,i){t&1&&(ci(Sne),Zt(0),ti(1,"div",0),Zt(2,1),wi(),Zt(3,2))},encapsulation:2,changeDetection:0})}return n})();var gn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({imports:[zi]})}return n})();var dh=(()=>{class n{dataChange=new sn([]);constructor(){}get data(){return this.dataChange.value}addController(e){let t=this.data.slice();t.push(e),this.dataChange.next(t)}addControllers(e){this.dataChange.next(e)}remove(e){let t=this.data.indexOf(e);t>=0&&(this.data.splice(t,1),this.dataChange.next(this.data.slice()))}find(e){return this.data.find(t=>t.name===e)}findById(e){return this.data.find(t=>t.id===e)}findIndex(e){return this.data.findIndex(t=>t.name===e)}findIndexById(e){return this.data.findIndex(t=>t.id===e)}update(e){let t=this.findIndexById(e.id);t>=0&&(this.data[t]=e,this.dataChange.next(this.data.slice()))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();var kR=(n,o)=>o.key;function Tne(n,o){n&1&&(a(0,"mat-error"),c(1,"You must enter a value"),l())}function Ene(n,o){if(n&1&&(a(0,"mat-option",9),c(1),l()),n&2){let e=o.$implicit;C("value",e.key),p(),Z(" ",e.name," ")}}function One(n,o){if(n&1&&(a(0,"mat-option",9),c(1),l()),n&2){let e=o.$implicit;C("value",e.key),p(),Z(" ",e.name," ")}}var vy=(()=>{class n{controllerService=f(_t);controllerDatabase=f(dh);route=f(Lt);router=f(It);toasterService=f(re);cdr=f(ie);controllerOptionsVisibility=R(!1);controllerIp;controllerPort;projectId;protocols=[{key:"http:",name:"HTTP"},{key:"https:",name:"HTTPS"}];locations=[{key:"local",name:"Local"},{key:"remote",name:"Remote"}];controllerForm=new Uo({name:new Qe("",[We.required]),location:new Qe(""),protocol:new Qe("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");try{let t=(await this.controllerService.findAll()).filter(i=>i.host===this.controllerIp&&i.port===this.controllerPort)[0];t?this.router.navigate(["/controller",t.id,"project",this.projectId]):(this.controllerOptionsVisibility.set(!0),this.cdr.markForCheck())}catch(e){let t=e.error?.message||e.message||"Failed to load controllers";this.toasterService.error(t),this.cdr.markForCheck()}}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 KA;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(t=>{this.toasterService.success(`Controller "${t.name}" added.`),this.router.navigate(["/controller",t.id,"project",this.projectId])},t=>{let i=t.error?.message||t.message||"Failed to create controller";this.toasterService.error(i),this.cdr.markForCheck()})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,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(t,i){t&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),c(4,"Add new controller"),l()()(),a(5,"div",4)(6,"mat-card",5)(7,"form",6)(8,"mat-form-field"),z(9,"input",7),E(10,Tne,2,0,"mat-error"),l(),a(11,"mat-form-field")(12,"mat-select",8),Q(13,Ene,2,2,"mat-option",9,kR),l()(),a(15,"mat-form-field")(16,"mat-select",10),Q(17,One,2,2,"mat-option",9,kR),l()()()(),a(19,"div",11)(20,"button",12),_("click",function(){return i.createController()}),c(21,"Add controller"),l()()()()),t&2&&(C("hidden",!i.controllerOptionsVisibility()),p(7),C("formGroup",i.controllerForm),p(3),O(i.controllerForm.get("name").hasError("required")?10:-1),p(3),K(i.locations),p(4),K(i.protocols))},dependencies:[fe,Ft,vt,jt,$t,Ct,Ht,Kt,fn,gn,Kn,Me,ke,ni,be,Pe,st,mt,nt,Vo,X,_e],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}return n})();var t3=new mn("CdkAccordion"),PR=(()=>{class n{_stateChanges=new Ye;_openCloseAllActions=new Ye;id=f(cr).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(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",At]},exportAs:["cdkAccordion"],features:[un([{provide:t3,useExisting:n}]),In]})}return n})(),TR=(()=>{class n{accordion=f(t3,{optional:!0,skipSelf:!0});_changeDetectorRef=f(ie);_expansionDispatcher=f(pg);_openCloseAllSubscription=To.EMPTY;closed=new ve;opened=new ve;destroyed=new ve;expandedChange=new ve;id=f(cr).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 t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=R(!1);_removeUniqueSelectionListener=()=>{};constructor(){}ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&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(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",At],disabled:[2,"disabled","disabled",At]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[un([{provide:t3,useValue:void 0}])]})}return n})(),xy=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({})}return n})();var Dne=["body"],Ine=["bodyWrapper"],Ane=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Nne=["mat-expansion-panel-header","*","mat-action-row"];function Fne(n,o){}var Rne=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Lne=["mat-panel-title","mat-panel-description","*"];function zne(n,o){n&1&&(ti(0,"span",1),gi(),ti(1,"svg",2),Sa(2,"path",3),wi()())}var n3=new mn("MAT_ACCORDION"),ER=new mn("MAT_EXPANSION_PANEL"),Vne=(()=>{class n{_template=f(lr);_expansionPanel=f(ER,{optional:!0});constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]})}return n})(),OR=new mn("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),zd=(()=>{class n extends TR{_viewContainerRef=f($o);_animationsDisabled=Br();_document=f(Eo);_ngZone=f(Ki);_elementRef=f(Qt);_renderer=f(Ui);_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 Ye;accordion=f(n3,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=f(cr).getId("mat-expansion-panel-header-");constructor(){super();let e=f(OR,{optional:!0});this._expansionDispatcher=f(pg),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(Oi(null),oo(()=>this.expanded&&!this._portal),$a(1)).subscribe(()=>{this._portal=new rg(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,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:t})=>{e===this._bodyWrapper?.nativeElement&&t==="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(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(t,i,r){if(t&1&&Xi(r,Vne,5),t&2){let s;gt(s=ht())&&(i._lazyContent=s.first)}},viewQuery:function(t,i){if(t&1&&Gn(Dne,5)(Ine,5),t&2){let r;gt(r=ht())&&(i._body=r.first),gt(r=ht())&&(i._bodyWrapper=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,i){t&2&&se("mat-expanded",i.expanded)("mat-expansion-panel-spacing",i._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",At],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[un([{provide:n3,useValue:void 0},{provide:ER,useExisting:n}]),li,In],ngContentSelectors:Nne,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(t,i){t&1&&(ci(Ane),Zt(0),a(1,"div",2,0)(3,"div",3,1)(5,"div",4),Zt(6,1),ce(7,Fne,0,0,"ng-template",5),l(),Zt(8,2),l()()),t&2&&(p(),Ve("inert",i.expanded?null:""),p(2),C("id",i.id),Ve("aria-labelledby",i._headerId),p(4),C("cdkPortalOutlet",i._portal))},dependencies:[zv],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 n})();var Vd=(()=>{class n{panel=f(zd,{host:!0});_element=f(Qt);_focusMonitor=f(ms);_changeDetectorRef=f(ie);_parentChangeSubscription=To.EMPTY;constructor(){f(kr).load(Wa);let e=this.panel,t=f(OR,{optional:!0}),i=f(new op("tabindex"),{optional:!0}),r=e.accordion?e.accordion._stateChanges.pipe(oo(s=>!!(s.hideToggle||s.togglePosition))):Yu;this.tabIndex=parseInt(i||"")||0,this._parentChangeSubscription=io(e.opened,e.closed,r,e._inputChanges.pipe(oo(s=>!!(s.hideToggle||s.disabled||s.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(oo(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),t&&(this.expandedHeight=t.expandedHeight,this.collapsedHeight=t.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:ds(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}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(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(t,i){t&1&&_("click",function(){return i._toggle()})("keydown",function(s){return i._keydown(s)}),t&2&&(Ve("id",i.panel._headerId)("tabindex",i.disabled?-1:i.tabIndex)("aria-controls",i._getPanelId())("aria-expanded",i._isExpanded())("aria-disabled",i.panel.disabled),Ot("height",i._getHeaderHeight()),se("mat-expanded",i._isExpanded())("mat-expansion-toggle-indicator-after",i._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",i._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Ho(e)]},ngContentSelectors:Lne,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(t,i){t&1&&(ci(Rne),ti(0,"span",0),Zt(1),Zt(2,1),Zt(3,2),wi(),E(4,zne,3,0,"span",1)),t&2&&(se("mat-content-hide-toggle",!i._showToggle()),p(4),O(i._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 n})(),DR=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return n})(),zp=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=yt({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return n})(),mh=(()=>{class n extends PR{_keyManager;_ownHeaders=new Zl;_headers;hideToggle=!1;displayMode="default";togglePosition="after";ngAfterContentInit(){this._headers.changes.pipe(Oi(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(t=>t.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new cg(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(i){return(e||(e=yi(n)))(i||n)}})();static \u0275dir=yt({type:n,selectors:[["mat-accordion"]],contentQueries:function(t,i,r){if(t&1&&Xi(r,Vd,5),t&2){let s;gt(s=ht())&&(i._headers=s)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,i){t&2&&se("mat-accordion-multi",i.multi)},inputs:{hideToggle:[2,"hideToggle","hideToggle",At],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],features:[un([{provide:n3,useExisting:n}]),li]})}return n})(),Tl=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=nn({type:n});static \u0275inj=tn({imports:[xy,Vv,zi]})}return n})();var by=(()=>{class n{httpClient=f(cs);sanitizer=f(ka);toasterService=f(re);cd=f(ie);thirdpartylicenses=R("");releasenotes=R("");ngOnInit(){this.httpClient.get(window.location.href+"/3rdpartylicenses.txt",{responseType:"text"}).subscribe({next:e=>{let t=e.replace(new RegExp(` `,"g"),"
");this.thirdpartylicenses.set(this.sanitizer.bypassSecurityTrustHtml(t))},error:e=>{if(e.status===404)this.thirdpartylicenses.set("Download Solar-PuTTY");else{let t=e.error?.message||e.message||"Failed to load third party licenses";this.toasterService.error(t)}this.cd.markForCheck()}}),this.httpClient.get("ReleaseNotes.txt",{responseType:"text"}).subscribe({next:e=>{let t=e.replace(new RegExp(` `,"g"),"
");this.releasenotes.set(this.sanitizer.bypassSecurityTrustHtml(t))},error:e=>{let t=e.error?.message||e.message||"Failed to load release notes";this.toasterService.error(t),this.cd.markForCheck()}})}goToDocumentation(){window.location.href="https://docs.gns3.com/docs/"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["app-help"]],decls:107,vars:2,consts:[[1,"help-page"],[1,"help-page__header"],[1,"help-page__title"],["mat-raised-button","","color","primary",1,"help-page__button",3,"click"],[1,"help-page__main"],[1,"help-page__overview"],[1,"help-page__overview-icon"],[1,"help-page__panel"],["multi",""],[1,"help-page__panel-title"],[1,"help-page__shortcuts"],[1,"help-page__shortcut"],["href","https://downloads.solarwinds.com/solarwinds/GNS3/Solar-PuTTY/Solar-PuTTY-Optional.exe",1,"help-page__link"],[3,"innerHTML"],[1,"help-page__release-notes",3,"innerHTML"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"header",1)(2,"h1",2),c(3,"Help"),l(),a(4,"button",3),_("click",function(){return i.goToDocumentation()}),a(5,"mat-icon"),c(6,"open_in_new"),l(),c(7," Documentation "),l()(),a(8,"main",4)(9,"section",5)(10,"span",6)(11,"mat-icon"),c(12,"help_outline"),l()(),a(13,"div")(14,"h2"),c(15,"GNS3 Web UI help"),l(),a(16,"p"),c(17,"Find keyboard shortcuts, third-party component information, and release notes."),l()()(),a(18,"section",7)(19,"mat-accordion",8)(20,"mat-expansion-panel")(21,"mat-expansion-panel-header")(22,"mat-panel-title")(23,"span",9)(24,"mat-icon"),c(25,"keyboard"),l(),c(26," Useful shortcuts "),l()()(),a(27,"div",10)(28,"div",11)(29,"span")(30,"kbd"),c(31,"Ctrl"),l(),a(32,"kbd"),c(33,"+"),l()(),a(34,"span"),c(35,"Zoom in"),l()(),a(36,"div",11)(37,"span")(38,"kbd"),c(39,"Ctrl"),l(),a(40,"kbd"),c(41,"-"),l()(),a(42,"span"),c(43,"Zoom out"),l()(),a(44,"div",11)(45,"span")(46,"kbd"),c(47,"Ctrl"),l(),a(48,"kbd"),c(49,"0"),l()(),a(50,"span"),c(51,"Reset zoom"),l()(),a(52,"div",11)(53,"span")(54,"kbd"),c(55,"Ctrl"),l(),a(56,"kbd"),c(57,"H"),l()(),a(58,"span"),c(59,"Hide toolbar"),l()(),a(60,"div",11)(61,"span")(62,"kbd"),c(63,"Ctrl"),l(),a(64,"kbd"),c(65,"A"),l()(),a(66,"span"),c(67,"Select all map items"),l()(),a(68,"div",11)(69,"span")(70,"kbd"),c(71,"Ctrl"),l(),a(72,"kbd"),c(73,"Shift"),l(),a(74,"kbd"),c(75,"A"),l()(),a(76,"span"),c(77,"Deselect all map items"),l()(),a(78,"div",11)(79,"span")(80,"kbd"),c(81,"Ctrl"),l(),a(82,"kbd"),c(83,"Shift"),l(),a(84,"kbd"),c(85,"S"),l()(),a(86,"span"),c(87,"Open preferences"),l()()()(),a(88,"mat-expansion-panel")(89,"mat-expansion-panel-header")(90,"mat-panel-title")(91,"span",9)(92,"mat-icon"),c(93,"extension"),l(),c(94," Third-party components "),l()()(),a(95,"a",12)(96,"mat-icon"),c(97,"download"),l(),z(98,"span",13),l()(),a(99,"mat-expansion-panel")(100,"mat-expansion-panel-header")(101,"mat-panel-title")(102,"span",9)(103,"mat-icon"),c(104,"description"),l(),c(105," Release notes "),l()()(),z(106,"div",14),l()()()()()),t&2&&(p(98),C("innerHTML",i.thirdpartylicenses(),rf),p(8),C("innerHTML",i.releasenotes(),rf))},dependencies:[X,_e,Tl,mh,zd,Vd,zp,ne,pe],styles:["[_nghost-%COMP%]{display:block;width:100%;background:transparent}.help-page[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_help-fade-in .4s ease-out}.help-page__header[_ngcontent-%COMP%], .help-page__main[_ngcontent-%COMP%]{max-width:1600px;margin-inline:auto}.help-page__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 20px 16px}.help-page__title[_ngcontent-%COMP%]{margin:0;color:var(--mat-sys-on-surface);font-size:32px;font-weight:500;white-space:nowrap}button.help-page__button[_ngcontent-%COMP%]{height:var(--gns3-density-control-height);padding-inline:18px;border-radius:12px;font-size:15px;font-weight:500;letter-spacing:.3px;text-transform:none;transition:transform .2s ease,box-shadow .2s ease}button.help-page__button[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 4px 12px color-mix(in srgb,var(--mat-sys-primary) 25%,transparent)}.help-page__main[_ngcontent-%COMP%]{padding:0 20px 24px}.help-page__overview[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--gns3-density-card-gap);margin-bottom:var(--gns3-density-card-gap);padding:16px 18px;border:1px solid var(--mat-sys-outline-variant);border-radius:14px;background:var(--mat-sys-surface-container)}.help-page__overview[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--mat-sys-on-surface);font-size:17px;font-weight:600}.help-page__overview[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:3px 0 0;color:var(--mat-sys-on-surface-variant);font-size:14px}.help-page__overview-icon[_ngcontent-%COMP%]{display:grid;flex:0 0 42px;width:42px;height:42px;place-items:center;border-radius:11px;color:var(--mat-sys-on-primary-container);background:var(--mat-sys-primary-container)}.help-page__panel[_ngcontent-%COMP%]{overflow:hidden;border-radius:16px;background:var(--mat-sys-surface);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%]{border-bottom:1px solid var(--mat-sys-outline-variant);border-radius:0;background:var(--mat-sys-surface);box-shadow:none}.mat-expansion-panel[_ngcontent-%COMP%]:last-child{border-bottom:0}.mat-expansion-panel-header[_ngcontent-%COMP%]{min-height:var(--gns3-density-section-header-height);padding-inline:20px;color:var(--mat-sys-on-surface);background:color-mix(in srgb,var(--mat-sys-primary-container) 28%,var(--mat-sys-surface))}.mat-expansion-panel[_ngcontent-%COMP%] .mat-expansion-panel-header[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--mat-sys-primary-container) 45%,var(--mat-sys-surface))}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface)}.help-page__panel-title[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--gns3-density-space-3);font-size:15px;font-weight:600}.help-page__panel-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--mat-sys-primary)}.help-page__shortcuts[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;overflow:hidden;margin:4px 0 8px;border:1px solid var(--mat-sys-outline-variant);border-radius:12px;background:var(--mat-sys-outline-variant)}.help-page__shortcut[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;min-height:54px;gap:var(--gns3-density-card-gap);padding:10px 14px;color:var(--mat-sys-on-surface);background:var(--mat-sys-surface-container-low);font-size:14px}.help-page__shortcut[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:first-child{display:flex;flex:0 0 auto;align-items:center;gap:5px}kbd[_ngcontent-%COMP%]{min-width:25px;padding:4px 7px;border:1px solid var(--mat-sys-outline-variant);border-bottom-width:2px;border-radius:6px;color:var(--mat-sys-on-surface);background:var(--mat-sys-surface-container-highest);font:inherit;font-size:12px;font-weight:600;line-height:1;text-align:center}.help-page__link[_ngcontent-%COMP%]{display:inline-flex;align-items:flex-start;max-width:100%;gap:8px;padding-block:8px;color:var(--mat-sys-primary);font-size:14px;text-decoration:none}.help-page__link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{flex:0 0 auto;width:19px;height:19px;font-size:19px}.help-page__link[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{min-width:0;overflow-wrap:anywhere}.help-page__link[_ngcontent-%COMP%]:hover{text-decoration:underline}.help-page__release-notes[_ngcontent-%COMP%]{max-height:min(60vh,640px);overflow:auto;padding:8px 4px 12px;color:var(--mat-sys-on-surface);font-size:14px;line-height:1.6;overflow-wrap:anywhere}[data-density=compact][_nghost-%COMP%] button.help-page__button[_ngcontent-%COMP%], [data-density=compact] [_nghost-%COMP%] button.help-page__button[_ngcontent-%COMP%]{min-height:40px;height:40px}[data-density=compact][_nghost-%COMP%] .mat-expansion-panel-header[_ngcontent-%COMP%], [data-density=compact] [_nghost-%COMP%] .mat-expansion-panel-header[_ngcontent-%COMP%]{min-height:52px}@keyframes _ngcontent-%COMP%_help-fade-in{0%{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}@media(max-width:800px){.help-page__shortcuts[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media(max-width:600px){.help-page__header[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column;padding:20px 16px 12px}.help-page__title[_ngcontent-%COMP%]{font-size:25px}.help-page__main[_ngcontent-%COMP%]{padding-inline:16px}button.help-page__button[_ngcontent-%COMP%]{width:100%}.help-page__overview[_ngcontent-%COMP%]{align-items:flex-start}.help-page__shortcut[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column;gap:8px}}"],changeDetection:0})}return n})();var wy=(()=>{class n{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(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();var My=(()=>{class n{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}],t={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 Li.solarputty_download_url&&(t.resource=Li.solarputty_download_url,e.push(t)),e}getForLinux(){return[]}getForDarwin(){return[]}static \u0275fac=function(t){return new(t||n)(he(wy))};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();var Sy=(()=>{class n{externalSoftwareDefinition;constructor(e){this.externalSoftwareDefinition=e}list(){return this.externalSoftwareDefinition.get().map(t=>(t.installed=!1,t))}static \u0275fac=function(t){return new(t||n)(he(My))};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();var $ne=(n,o)=>({hidden:n,lightTheme:o}),Hne=/(.*)<\/a>(.*)\s*