blob: 28cb8520eb665c611151f6ef5bbb991dce231265 [file] [log] [blame]
import{_ as nd}from"./app-cbe6e1e7.js";import{aX as rd,aY as id,aZ as G1,b as Pc,a_ as K1,z as So,g as Gr,m as $r,r as zn,o as Oc,w as Ya,E as sd,O as qt,P as pn,af as Dc,aj as od,Q as Ft,ai as Wr,ad as gl,ah as Hi,a4 as Is,N as ko,H as X1,ae as Ja,a$ as ad,b0 as ld,b1 as ud,b2 as cd,b3 as fd,b4 as hd,b5 as pd,k as As,a8 as V1,an as Rc,aa as Y1,u as Mt,S as Mo,a9 as qi,T as dd,as as Mc,aD as md,at as J1,aP as gd,aQ as vd}from"./framework-44b8a372.js";const kd=["onMousedown"],yd=Gr({__name:"SplitPane",props:{layout:null},setup(n){const o=n,l=As(()=>o.layout==="vertical"),c=zn(),p=$r("store"),g=zn(p.initialShowOutput),_=Pc({dragging:!1,split:50}),S=As(()=>{const{split:T}=_;return T<20?20:T>80?80:T});let w=0,C=0;function y(T){_.dragging=!0,w=l.value?T.pageY:T.pageX,C=S.value}function E(T){if(_.dragging){const F=l.value?T.pageY:T.pageX,R=l.value?c.value.offsetHeight:c.value.offsetWidth,W=F-w;_.split=C+~~(W/R*100)}}function L(){_.dragging=!1}return(T,F)=>(qt(),pn("div",{ref_key:"container",ref:c,class:qi(["split-pane",{dragging:_.dragging,"show-output":g.value,vertical:Mt(l)}]),onMousemove:E,onMouseup:L,onMouseleave:L},[Ft("div",{class:"left",style:Y1({[Mt(l)?"height":"width"]:Mt(S)+"%"})},[V1(T.$slots,"left",{},void 0,!0),Ft("div",{class:"dragger",onMousedown:Rc(y,["prevent"])},null,40,kd)],4),Ft("div",{class:"right",style:Y1({[Mt(l)?"height":"width"]:100-Mt(S)+"%"})},[V1(T.$slots,"right",{},void 0,!0)],4),Ft("button",{class:"toggler",onClick:F[0]||(F[0]=R=>g.value=!g.value)},Mo(g.value?"< Code":"Output >"),1)],34))}}),pi=(n,o)=>{const l=n.__vccOpts||n;for(const[c,p]of o)l[c]=p;return l},bd=pi(yd,[["__scopeId","data-v-3102671e"]]),Fc=n=>(gd("data-v-cbb0a4e5"),n=n(),vd(),n),wd=["onClick"],xd={class:"label"},_d=["onClick"],Sd=Fc(()=>Ft("svg",{class:"icon",width:"12",height:"12",viewBox:"0 0 24 24"},[Ft("line",{stroke:"#999",x1:"18",y1:"6",x2:"6",y2:"18"}),Ft("line",{stroke:"#999",x1:"6",y1:"6",x2:"18",y2:"18"})],-1)),Td=[Sd],Cd={key:0,class:"file pending"},Id=["onKeyup"],Ad={key:1,class:"import-map-wrapper"},Ld=Fc(()=>Ft("span",{class:"label"},"Import Map",-1)),Ed=[Ld],Nd=Gr({__name:"FileSelector",setup(n){const o=$r("store"),l=zn(!1),c=zn("Comp.vue"),p="import-map.json",g=$r("import-map"),_=As(()=>Object.entries(o.state.files).filter(([T,F])=>T!==p&&!F.hidden).map(([T])=>T));function S(){let T=0,F="Comp.vue";for(;;){let R=!1;for(const W in o.state.files)if(W===F){R=!0,F=`Comp${++T}.vue`;break}if(!R)break}c.value=F,l.value=!0}function w(){l.value=!1}function C({el:T}){T.focus()}function y(){if(!l.value)return;const T=c.value;if(!/\.(vue|js|ts|css)$/.test(T)){o.state.errors=["Playground only supports *.vue, *.js, *.ts, *.css files."];return}if(T in o.state.files){o.state.errors=[`File "${T}" already exists.`];return}o.state.errors=[],w(),o.addFile(T)}const E=zn(null);function L(T){T.preventDefault();const F=E.value,W=30*((Math.abs(T.deltaX)>=Math.abs(T.deltaY)?T.deltaX:T.deltaY)>0?1:-1);F.scrollTo({left:F.scrollLeft+W})}return(T,F)=>(qt(),pn("div",{class:qi(["file-selector",{"has-import-map":Mt(g)}]),onWheel:L,ref_key:"fileSel",ref:E},[(qt(!0),pn(Is,null,Mc(Mt(_),(R,W)=>(qt(),pn("div",{class:qi(["file",{active:Mt(o).state.activeFile.filename===R}]),onClick:D=>Mt(o).setActive(R)},[Ft("span",xd,Mo(R===p?"Import Map":R),1),W>0?(qt(),pn("span",{key:0,class:"remove",onClick:Rc(D=>Mt(o).deleteFile(R),["stop"])},Td,8,_d)):Hi("",!0)],10,wd))),256)),l.value?(qt(),pn("div",Cd,[Dc(Ft("input",{"onUpdate:modelValue":F[0]||(F[0]=R=>c.value=R),spellcheck:"false",onBlur:y,onKeyup:[J1(y,["enter"]),J1(w,["esc"])],onVnodeMounted:C},null,40,Id),[[md,c.value]])])):Hi("",!0),Ft("button",{class:"add",onClick:S},"+"),Mt(g)?(qt(),pn("div",Ad,[Ft("div",{class:qi(["file import-map",{active:Mt(o).state.activeFile.filename===p}]),onClick:F[1]||(F[1]=R=>Mt(o).setActive(p))},Ed,2)])):Hi("",!0)],34))}}),Pd=pi(Nd,[["__scopeId","data-v-cbb0a4e5"]]);var zt=Uint8Array,yn=Uint16Array,Fo=Uint32Array,Bo=new zt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),jo=new zt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Qa=new zt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Bc=function(n,o){for(var l=new yn(31),c=0;c<31;++c)l[c]=o+=1<<n[c-1];for(var p=new Fo(l[30]),c=1;c<30;++c)for(var g=l[c];g<l[c+1];++g)p[g]=g-l[c]<<5|c;return[l,p]},jc=Bc(Bo,2),Wc=jc[0],Za=jc[1];Wc[28]=258,Za[258]=28;var Hc=Bc(jo,0),Od=Hc[0],Q1=Hc[1],el=new yn(32768);for(var vt=0;vt<32768;++vt){var Br=(vt&43690)>>>1|(vt&21845)<<1;Br=(Br&52428)>>>2|(Br&13107)<<2,Br=(Br&61680)>>>4|(Br&3855)<<4,el[vt]=((Br&65280)>>>8|(Br&255)<<8)>>>1}var rr=function(n,o,l){for(var c=n.length,p=0,g=new yn(o);p<c;++p)n[p]&&++g[n[p]-1];var _=new yn(o);for(p=0;p<o;++p)_[p]=_[p-1]+g[p-1]<<1;var S;if(l){S=new yn(1<<o);var w=15-o;for(p=0;p<c;++p)if(n[p])for(var C=p<<4|n[p],y=o-n[p],E=_[n[p]-1]++<<y,L=E|(1<<y)-1;E<=L;++E)S[el[E]>>>w]=C}else for(S=new yn(c),p=0;p<c;++p)n[p]&&(S[p]=el[_[n[p]-1]++]>>>15-n[p]);return S},Ur=new zt(288);for(var vt=0;vt<144;++vt)Ur[vt]=8;for(var vt=144;vt<256;++vt)Ur[vt]=9;for(var vt=256;vt<280;++vt)Ur[vt]=7;for(var vt=280;vt<288;++vt)Ur[vt]=8;var Ls=new zt(32);for(var vt=0;vt<32;++vt)Ls[vt]=5;var Dd=rr(Ur,9,0),Rd=rr(Ur,9,1),Md=rr(Ls,5,0),Fd=rr(Ls,5,1),Ha=function(n){for(var o=n[0],l=1;l<n.length;++l)n[l]>o&&(o=n[l]);return o},Wn=function(n,o,l){var c=o/8|0;return(n[c]|n[c+1]<<8)>>(o&7)&l},qa=function(n,o){var l=o/8|0;return(n[l]|n[l+1]<<8|n[l+2]<<16)>>(o&7)},vl=function(n){return(n+7)/8|0},Wo=function(n,o,l){(o==null||o<0)&&(o=0),(l==null||l>n.length)&&(l=n.length);var c=new(n.BYTES_PER_ELEMENT==2?yn:n.BYTES_PER_ELEMENT==4?Fo:zt)(l-o);return c.set(n.subarray(o,l)),c},Bd=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Hn=function(n,o,l){var c=new Error(o||Bd[n]);if(c.code=n,Error.captureStackTrace&&Error.captureStackTrace(c,Hn),!l)throw c;return c},jd=function(n,o,l){var c=n.length;if(!c||l&&l.f&&!l.l)return o||new zt(0);var p=!o||l,g=!l||l.i;l||(l={}),o||(o=new zt(c*3));var _=function(z){var V=o.length;if(z>V){var ee=new zt(Math.max(V*2,z));ee.set(o),o=ee}},S=l.f||0,w=l.p||0,C=l.b||0,y=l.l,E=l.d,L=l.m,T=l.n,F=c*8;do{if(!y){S=Wn(n,w,1);var R=Wn(n,w+1,3);if(w+=3,R)if(R==1)y=Rd,E=Fd,L=9,T=5;else if(R==2){var M=Wn(n,w,31)+257,B=Wn(n,w+10,15)+4,U=M+Wn(n,w+5,31)+1;w+=14;for(var ae=new zt(U),ue=new zt(19),te=0;te<B;++te)ue[Qa[te]]=Wn(n,w+te*3,7);w+=B*3;for(var ye=Ha(ue),ge=(1<<ye)-1,ke=rr(ue,ye,1),te=0;te<U;){var Te=ke[Wn(n,w,ge)];w+=Te&15;var W=Te>>>4;if(W<16)ae[te++]=W;else{var G=0,K=0;for(W==16?(K=3+Wn(n,w,3),w+=2,G=ae[te-1]):W==17?(K=3+Wn(n,w,7),w+=3):W==18&&(K=11+Wn(n,w,127),w+=7);K--;)ae[te++]=G}}var b=ae.subarray(0,M),oe=ae.subarray(M);L=Ha(b),T=Ha(oe),y=rr(b,L,1),E=rr(oe,T,1)}else Hn(1);else{var W=vl(w)+4,D=n[W-4]|n[W-3]<<8,I=W+D;if(I>c){g&&Hn(0);break}p&&_(C+D),o.set(n.subarray(W,I),C),l.b=C+=D,l.p=w=I*8,l.f=S;continue}if(w>F){g&&Hn(0);break}}p&&_(C+131072);for(var Q=(1<<L)-1,le=(1<<T)-1,Pe=w;;Pe=w){var G=y[qa(n,w)&Q],Ae=G>>>4;if(w+=G&15,w>F){g&&Hn(0);break}if(G||Hn(2),Ae<256)o[C++]=Ae;else if(Ae==256){Pe=w,y=null;break}else{var Fe=Ae-254;if(Ae>264){var te=Ae-257,Qe=Bo[te];Fe=Wn(n,w,(1<<Qe)-1)+Wc[te],w+=Qe}var He=E[qa(n,w)&le],qe=He>>>4;He||Hn(3),w+=He&15;var oe=Od[qe];if(qe>3){var Qe=jo[qe];oe+=qa(n,w)&(1<<Qe)-1,w+=Qe}if(w>F){g&&Hn(0);break}p&&_(C+131072);for(var X=C+Fe;C<X;C+=4)o[C]=o[C-oe],o[C+1]=o[C+1-oe],o[C+2]=o[C+2-oe],o[C+3]=o[C+3-oe];C=X}}l.l=y,l.p=Pe,l.b=C,l.f=S,y&&(S=1,l.m=L,l.d=E,l.n=T)}while(!S);return C==o.length?o:Wo(o,0,C)},wr=function(n,o,l){l<<=o&7;var c=o/8|0;n[c]|=l,n[c+1]|=l>>>8},ws=function(n,o,l){l<<=o&7;var c=o/8|0;n[c]|=l,n[c+1]|=l>>>8,n[c+2]|=l>>>16},za=function(n,o){for(var l=[],c=0;c<n.length;++c)n[c]&&l.push({s:c,f:n[c]});var p=l.length,g=l.slice();if(!p)return[kl,0];if(p==1){var _=new zt(l[0].s+1);return _[l[0].s]=1,[_,1]}l.sort(function(U,ae){return U.f-ae.f}),l.push({s:-1,f:25001});var S=l[0],w=l[1],C=0,y=1,E=2;for(l[0]={s:-1,f:S.f+w.f,l:S,r:w};y!=p-1;)S=l[l[C].f<l[E].f?C++:E++],w=l[C!=y&&l[C].f<l[E].f?C++:E++],l[y++]={s:-1,f:S.f+w.f,l:S,r:w};for(var L=g[0].s,c=1;c<p;++c)g[c].s>L&&(L=g[c].s);var T=new yn(L+1),F=tl(l[y-1],T,0);if(F>o){var c=0,R=0,W=F-o,D=1<<W;for(g.sort(function(ae,ue){return T[ue.s]-T[ae.s]||ae.f-ue.f});c<p;++c){var I=g[c].s;if(T[I]>o)R+=D-(1<<F-T[I]),T[I]=o;else break}for(R>>>=W;R>0;){var M=g[c].s;T[M]<o?R-=1<<o-T[M]++-1:++c}for(;c>=0&&R;--c){var B=g[c].s;T[B]==o&&(--T[B],++R)}F=o}return[new zt(T),F]},tl=function(n,o,l){return n.s==-1?Math.max(tl(n.l,o,l+1),tl(n.r,o,l+1)):o[n.s]=l},Z1=function(n){for(var o=n.length;o&&!n[--o];);for(var l=new yn(++o),c=0,p=n[0],g=1,_=function(w){l[c++]=w},S=1;S<=o;++S)if(n[S]==p&&S!=o)++g;else{if(!p&&g>2){for(;g>138;g-=138)_(32754);g>2&&(_(g>10?g-11<<5|28690:g-3<<5|12305),g=0)}else if(g>3){for(_(p),--g;g>6;g-=6)_(8304);g>2&&(_(g-3<<5|8208),g=0)}for(;g--;)_(p);g=1,p=n[S]}return[l.subarray(0,c),o]},xs=function(n,o){for(var l=0,c=0;c<o.length;++c)l+=n[c]*o[c];return l},nl=function(n,o,l){var c=l.length,p=vl(o+2);n[p]=c&255,n[p+1]=c>>>8,n[p+2]=n[p]^255,n[p+3]=n[p+1]^255;for(var g=0;g<c;++g)n[p+g+4]=l[g];return(p+4+c)*8},ec=function(n,o,l,c,p,g,_,S,w,C,y){wr(o,y++,l),++p[256];for(var E=za(p,15),L=E[0],T=E[1],F=za(g,15),R=F[0],W=F[1],D=Z1(L),I=D[0],M=D[1],B=Z1(R),U=B[0],ae=B[1],ue=new yn(19),te=0;te<I.length;++te)ue[I[te]&31]++;for(var te=0;te<U.length;++te)ue[U[te]&31]++;for(var ye=za(ue,7),ge=ye[0],ke=ye[1],Te=19;Te>4&&!ge[Qa[Te-1]];--Te);var G=C+5<<3,K=xs(p,Ur)+xs(g,Ls)+_,b=xs(p,L)+xs(g,R)+_+14+3*Te+xs(ue,ge)+(2*ue[16]+3*ue[17]+7*ue[18]);if(G<=K&&G<=b)return nl(o,y,n.subarray(w,w+C));var oe,Q,le,Pe;if(wr(o,y,1+(b<K)),y+=2,b<K){oe=rr(L,T,0),Q=L,le=rr(R,W,0),Pe=R;var Ae=rr(ge,ke,0);wr(o,y,M-257),wr(o,y+5,ae-1),wr(o,y+10,Te-4),y+=14;for(var te=0;te<Te;++te)wr(o,y+3*te,ge[Qa[te]]);y+=3*Te;for(var Fe=[I,U],Qe=0;Qe<2;++Qe)for(var He=Fe[Qe],te=0;te<He.length;++te){var qe=He[te]&31;wr(o,y,Ae[qe]),y+=ge[qe],qe>15&&(wr(o,y,He[te]>>>5&127),y+=He[te]>>>12)}}else oe=Dd,Q=Ur,le=Md,Pe=Ls;for(var te=0;te<S;++te)if(c[te]>255){var qe=c[te]>>>18&31;ws(o,y,oe[qe+257]),y+=Q[qe+257],qe>7&&(wr(o,y,c[te]>>>23&31),y+=Bo[qe]);var X=c[te]&31;ws(o,y,le[X]),y+=Pe[X],X>3&&(ws(o,y,c[te]>>>5&8191),y+=jo[X])}else ws(o,y,oe[c[te]]),y+=Q[c[te]];return ws(o,y,oe[256]),y+Q[256]},Wd=new Fo([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),kl=new zt(0),Hd=function(n,o,l,c,p,g){var _=n.length,S=new zt(c+_+5*(1+Math.ceil(_/7e3))+p),w=S.subarray(c,S.length-p),C=0;if(!o||_<8)for(var y=0;y<=_;y+=65535){var E=y+65535;E>=_&&(w[C>>3]=g),C=nl(w,C+1,n.subarray(y,E))}else{for(var L=Wd[o-1],T=L>>>13,F=L&8191,R=(1<<l)-1,W=new yn(32768),D=new yn(R+1),I=Math.ceil(l/3),M=2*I,B=function(Je){return(n[Je]^n[Je+1]<<I^n[Je+2]<<M)&R},U=new Fo(25e3),ae=new yn(288),ue=new yn(32),te=0,ye=0,y=0,ge=0,ke=0,Te=0;y<_;++y){var G=B(y),K=y&32767,b=D[G];if(W[K]=b,D[G]=K,ke<=y){var oe=_-y;if((te>7e3||ge>24576)&&oe>423){C=ec(n,w,0,U,ae,ue,ye,ge,Te,y-Te,C),ge=te=ye=0,Te=y;for(var Q=0;Q<286;++Q)ae[Q]=0;for(var Q=0;Q<30;++Q)ue[Q]=0}var le=2,Pe=0,Ae=F,Fe=K-b&32767;if(oe>2&&G==B(y-Fe))for(var Qe=Math.min(T,oe)-1,He=Math.min(32767,y),qe=Math.min(258,oe);Fe<=He&&--Ae&&K!=b;){if(n[y+le]==n[y+le-Fe]){for(var X=0;X<qe&&n[y+X]==n[y+X-Fe];++X);if(X>le){if(le=X,Pe=Fe,X>Qe)break;for(var z=Math.min(Fe,X-2),V=0,Q=0;Q<z;++Q){var ee=y-Fe+Q+32768&32767,fe=W[ee],ve=ee-fe+32768&32767;ve>V&&(V=ve,b=ee)}}}K=b,b=W[K],Fe+=K-b+32768&32767}if(Pe){U[ge++]=268435456|Za[le]<<18|Q1[Pe];var de=Za[le]&31,Me=Q1[Pe]&31;ye+=Bo[de]+jo[Me],++ae[257+de],++ue[Me],ke=y+le,++te}else U[ge++]=n[y],++ae[n[y]]}}C=ec(n,w,g,U,ae,ue,ye,ge,Te,y-Te,C),!g&&C&7&&(C=nl(w,C+1,kl))}return Wo(S,0,c+vl(C)+p)},qd=function(){var n=1,o=0;return{p:function(l){for(var c=n,p=o,g=l.length|0,_=0;_!=g;){for(var S=Math.min(_+2655,g);_<S;++_)p+=c+=l[_];c=(c&65535)+15*(c>>16),p=(p&65535)+15*(p>>16)}n=c,o=p},d:function(){return n%=65521,o%=65521,(n&255)<<24|n>>>8<<16|(o&255)<<8|o>>>8}}},zd=function(n,o,l,c,p){return Hd(n,o.level==null?6:o.level,o.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):12+o.mem,l,c,!p)},$d=function(n,o,l){for(;l;++o)n[o]=l,l>>>=8},Ud=function(n,o){var l=o.level,c=l==0?0:l<6?1:l==9?3:2;n[0]=120,n[1]=c<<6|(c?32-2*c:1)},Gd=function(n){((n[0]&15)!=8||n[0]>>>4>7||(n[0]<<8|n[1])%31)&&Hn(6,"invalid zlib data"),n[1]&32&&Hn(6,"invalid zlib data: preset dictionaries not supported")};function Kd(n,o){o||(o={});var l=qd();l.p(n);var c=zd(n,o,2,4);return Ud(c,o),$d(c,c.length-4,l.d()),c}function Xd(n,o){return jd((Gd(n),n.subarray(2,-4)),o)}var tc=typeof TextEncoder<"u"&&new TextEncoder,rl=typeof TextDecoder<"u"&&new TextDecoder,Vd=0;try{rl.decode(kl,{stream:!0}),Vd=1}catch{}var Yd=function(n){for(var o="",l=0;;){var c=n[l++],p=(c>127)+(c>223)+(c>239);if(l+p>n.length)return[o,Wo(n,l-1)];p?p==3?(c=((c&15)<<18|(n[l++]&63)<<12|(n[l++]&63)<<6|n[l++]&63)-65536,o+=String.fromCharCode(55296|c>>10,56320|c&1023)):p&1?o+=String.fromCharCode((c&31)<<6|n[l++]&63):o+=String.fromCharCode((c&15)<<12|(n[l++]&63)<<6|n[l++]&63):o+=String.fromCharCode(c)}};function qc(n,o){if(o){for(var l=new zt(n.length),c=0;c<n.length;++c)l[c]=n.charCodeAt(c);return l}if(tc)return tc.encode(n);for(var p=n.length,g=new zt(n.length+(n.length>>1)),_=0,S=function(y){g[_++]=y},c=0;c<p;++c){if(_+5>g.length){var w=new zt(_+8+(p-c<<1));w.set(g),g=w}var C=n.charCodeAt(c);C<128||o?S(C):C<2048?(S(192|C>>6),S(128|C&63)):C>55295&&C<57344?(C=65536+(C&1023<<10)|n.charCodeAt(++c)&1023,S(240|C>>18),S(128|C>>12&63),S(128|C>>6&63),S(128|C&63)):(S(224|C>>12),S(128|C>>6&63),S(128|C&63))}return Wo(g,0,_)}function zc(n,o){if(o){for(var l="",c=0;c<n.length;c+=16384)l+=String.fromCharCode.apply(null,n.subarray(c,c+16384));return l}else{if(rl)return rl.decode(n);var p=Yd(n),g=p[0],_=p[1];return _.length&&Hn(8),g}}function $c(n,o=100){let l;return(...c)=>{l&&clearTimeout(l),l=setTimeout(()=>{n(...c)},o)}}function Jd(n){const o=qc(n),l=Kd(o,{level:9}),c=zc(l,!0);return btoa(c)}function Qd(n){const o=atob(n);if(o.startsWith("xÚ")){const l=qc(o,!0),c=Xd(l);return zc(c)}return decodeURIComponent(escape(o))}var ui=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var To={},em={get exports(){return To},set exports(n){To=n}},nc;function wn(){return nc||(nc=1,function(n,o){(function(l,c){n.exports=c()})(ui,function(){var l=navigator.userAgent,c=navigator.platform,p=/gecko\/\d/i.test(l),g=/MSIE \d/.test(l),_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(l),S=/Edge\/(\d+)/.exec(l),w=g||_||S,C=w&&(g?document.documentMode||6:+(S||_)[1]),y=!S&&/WebKit\//.test(l),E=y&&/Qt\/\d+\.\d+/.test(l),L=!S&&/Chrome\//.test(l),T=/Opera\//.test(l),F=/Apple Computer/.test(navigator.vendor),R=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(l),W=/PhantomJS/.test(l),D=F&&(/Mobile\/\w+/.test(l)||navigator.maxTouchPoints>2),I=/Android/.test(l),M=D||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(l),B=D||/Mac/.test(c),U=/\bCrOS\b/.test(l),ae=/win/i.test(c),ue=T&&l.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(T=!1,y=!0);var te=B&&(E||T&&(ue==null||ue<12.11)),ye=p||w&&C>=9;function ge(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ke=function(e,t){var i=e.className,r=ge(t).exec(i);if(r){var a=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(a?r[1]+a:"")}};function Te(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function G(e,t){return Te(e).appendChild(t)}function K(e,t,i,r){var a=document.createElement(e);if(i&&(a.className=i),r&&(a.style.cssText=r),typeof t=="string")a.appendChild(document.createTextNode(t));else if(t)for(var u=0;u<t.length;++u)a.appendChild(t[u]);return a}function b(e,t,i,r){var a=K(e,t,i,r);return a.setAttribute("role","presentation"),a}var oe;document.createRange?oe=function(e,t,i,r){var a=document.createRange();return a.setEnd(r||e,i),a.setStart(e,t),a}:oe=function(e,t,i){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",i),r.moveStart("character",t),r};function Q(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function le(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Pe(e,t){var i=e.className;ge(t).test(i)||(e.className+=(i?" ":"")+t)}function Ae(e,t){for(var i=e.split(" "),r=0;r<i.length;r++)i[r]&&!ge(i[r]).test(t)&&(t+=" "+i[r]);return t}var Fe=function(e){e.select()};D?Fe=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(Fe=function(e){try{e.select()}catch{}});function Qe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function He(e,t,i){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(i!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function qe(e,t,i,r,a){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var u=r||0,f=a||0;;){var d=e.indexOf(" ",u);if(d<0||d>=t)return f+(t-u);f+=d-u,f+=i-f%i,u=d+1}}var X=function(){this.id=null,this.f=null,this.time=0,this.handler=Qe(this.onTimeout,this)};X.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},X.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function z(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var V=50,ee={toString:function(){return"CodeMirror.Pass"}},fe={scroll:!1},ve={origin:"*mouse"},de={origin:"+move"};function Me(e,t,i){for(var r=0,a=0;;){var u=e.indexOf(" ",r);u==-1&&(u=e.length);var f=u-r;if(u==e.length||a+f>=t)return r+Math.min(f,t-a);if(a+=u-r,a+=i-a%i,r=u+1,a>=t)return r}}var et=[""];function Je(e){for(;et.length<=e;)et.push(Le(et)+" ");return et[e]}function Le(e){return e[e.length-1]}function ze(e,t){for(var i=[],r=0;r<e.length;r++)i[r]=t(e[r],r);return i}function Xe(e,t,i){for(var r=0,a=i(t);r<e.length&&i(e[r])<=a;)r++;e.splice(r,0,t)}function at(){}function ut(e,t){var i;return Object.create?i=Object.create(e):(at.prototype=e,i=new at),t&&He(t,i),i}var rn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function nt(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||rn.test(e))}function $(e,t){return t?t.source.indexOf("\\w")>-1&&nt(e)?!0:t.test(e):nt(e)}function pe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Z=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ve(e){return e.charCodeAt(0)>=768&&Z.test(e)}function It(e,t,i){for(;(i<0?t>0:t<e.length)&&Ve(e.charAt(t));)t+=i;return t}function dn(e,t,i){for(var r=t>i?-1:1;;){if(t==i)return t;var a=(t+i)/2,u=r<0?Math.ceil(a):Math.floor(a);if(u==t)return e(u)?t:i;e(u)?i=u:t=u+r}}function Xr(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var a=!1,u=0;u<e.length;++u){var f=e[u];(f.from<i&&f.to>t||t==i&&f.to==t)&&(r(Math.max(f.from,t),Math.min(f.to,i),f.level==1?"rtl":"ltr",u),a=!0)}a||r(t,i,"ltr")}var Gt=null;function ft(e,t,i){var r;Gt=null;for(var a=0;a<e.length;++a){var u=e[a];if(u.from<t&&u.to>t)return a;u.to==t&&(u.from!=u.to&&i=="before"?r=a:Gt=a),u.from==t&&(u.from!=u.to&&i!="before"?r=a:Gt=a)}return r??Gt}var Dn=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(v){return v<=247?e.charAt(v):1424<=v&&v<=1524?"R":1536<=v&&v<=1785?t.charAt(v-1536):1774<=v&&v<=2220?"r":8192<=v&&v<=8203?"w":v==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=/[stwN]/,u=/[LRr]/,f=/[Lb1n]/,d=/[1n]/;function m(v,A,N){this.level=v,this.from=A,this.to=N}return function(v,A){var N=A=="ltr"?"L":"R";if(v.length==0||A=="ltr"&&!r.test(v))return!1;for(var q=v.length,j=[],Y=0;Y<q;++Y)j.push(i(v.charCodeAt(Y)));for(var se=0,me=N;se<q;++se){var be=j[se];be=="m"?j[se]=me:me=be}for(var _e=0,we=N;_e<q;++_e){var Ce=j[_e];Ce=="1"&&we=="r"?j[_e]="n":u.test(Ce)&&(we=Ce,Ce=="r"&&(j[_e]="R"))}for(var Oe=1,Ee=j[0];Oe<q-1;++Oe){var Ye=j[Oe];Ye=="+"&&Ee=="1"&&j[Oe+1]=="1"?j[Oe]="1":Ye==","&&Ee==j[Oe+1]&&(Ee=="1"||Ee=="n")&&(j[Oe]=Ee),Ee=Ye}for(var ct=0;ct<q;++ct){var Dt=j[ct];if(Dt==",")j[ct]="N";else if(Dt=="%"){var kt=void 0;for(kt=ct+1;kt<q&&j[kt]=="%";++kt);for(var kn=ct&&j[ct-1]=="!"||kt<q&&j[kt]=="1"?"1":"N",un=ct;un<kt;++un)j[un]=kn;ct=kt-1}}for(var Tt=0,cn=N;Tt<q;++Tt){var Ht=j[Tt];cn=="L"&&Ht=="1"?j[Tt]="L":u.test(Ht)&&(cn=Ht)}for(var At=0;At<q;++At)if(a.test(j[At])){var Ct=void 0;for(Ct=At+1;Ct<q&&a.test(j[Ct]);++Ct);for(var bt=(At?j[At-1]:N)=="L",fn=(Ct<q?j[Ct]:N)=="L",Di=bt==fn?bt?"L":"R":N,Fr=At;Fr<Ct;++Fr)j[Fr]=Di;At=Ct-1}for(var Qt=[],tr,Rt=0;Rt<q;)if(f.test(j[Rt])){var ja=Rt;for(++Rt;Rt<q&&f.test(j[Rt]);++Rt);Qt.push(new m(0,ja,Rt))}else{var br=Rt,si=Qt.length,oi=A=="rtl"?1:0;for(++Rt;Rt<q&&j[Rt]!="L";++Rt);for(var nn=br;nn<Rt;)if(d.test(j[nn])){br<nn&&(Qt.splice(si,0,new m(1,br,nn)),si+=oi);var Ri=nn;for(++nn;nn<Rt&&d.test(j[nn]);++nn);Qt.splice(si,0,new m(2,Ri,nn)),si+=oi,br=nn}else++nn;br<Rt&&Qt.splice(si,0,new m(1,br,Rt))}return A=="ltr"&&(Qt[0].level==1&&(tr=v.match(/^\s+/))&&(Qt[0].from=tr[0].length,Qt.unshift(new m(0,0,tr[0].length))),Le(Qt).level==1&&(tr=v.match(/\s+$/))&&(Le(Qt).to-=tr[0].length,Qt.push(new m(0,q-tr[0].length,q)))),A=="rtl"?Qt.reverse():Qt}}();function Wt(e,t){var i=e.order;return i==null&&(i=e.order=Dn(e.text,t)),i}var xn=[],Ne=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||xn).concat(i)}};function Kn(e,t){return e._handlers&&e._handlers[t]||xn}function Lt(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var r=e._handlers,a=r&&r[t];if(a){var u=z(a,i);u>-1&&(r[t]=a.slice(0,u).concat(a.slice(u+1)))}}}function Be(e,t){var i=Kn(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),a=0;a<i.length;++a)i[a].apply(null,r)}function dt(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Be(e,i||t.type,e,t),Kt(t)||t.codemirrorIgnore}function Xn(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)z(i,t[r])==-1&&i.push(t[r])}function xt(e,t){return Kn(e,t).length>0}function mn(e){e.prototype.on=function(t,i){Ne(this,t,i)},e.prototype.off=function(t,i){Lt(this,t,i)}}function St(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Vn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Kt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Rn(e){St(e),Vn(e)}function Ln(e){return e.target||e.srcElement}function Sr(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),B&&e.ctrlKey&&t==1&&(t=3),t}var lr=function(){if(w&&C<9)return!1;var e=K("div");return"draggable"in e||"dragDrop"in e}(),Et;function Tr(e){if(Et==null){var t=K("span","​");G(e,K("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Et=t.offsetWidth<=1&&t.offsetHeight>2&&!(w&&C<8))}var i=Et?K("span","​"):K("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var ur;function gn(e){if(ur!=null)return ur;var t=G(e,document.createTextNode("AخA")),i=oe(t,0,1).getBoundingClientRect(),r=oe(t,1,2).getBoundingClientRect();return Te(e),!i||i.left==i.right?!1:ur=r.right-i.right<3}var cr=`
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var a=e.indexOf(`
`,t);a==-1&&(a=e.length);var u=e.slice(t,e.charAt(a-1)=="\r"?a-1:a),f=u.indexOf("\r");f!=-1?(i.push(u.slice(0,f)),t+=f+1):(i.push(u),t=a+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Cr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ir=function(){var e=K("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),fr=null;function En(e){if(fr!=null)return fr;var t=G(e,K("span","x")),i=t.getBoundingClientRect(),r=oe(t,0,1).getBoundingClientRect();return fr=Math.abs(i.left-r.left)>1}var Zt={},Xt={};function Ar(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Zt[e]=t}function _n(e,t){Xt[e]=t}function Yn(e){if(typeof e=="string"&&Xt.hasOwnProperty(e))e=Xt[e];else if(e&&typeof e.name=="string"&&Xt.hasOwnProperty(e.name)){var t=Xt[e.name];typeof t=="string"&&(t={name:t}),e=ut(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Yn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Yn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Jn(e,t){t=Yn(t);var i=Zt[t.name];if(!i)return Jn(e,"text/plain");var r=i(e,t);if(sn.hasOwnProperty(t.name)){var a=sn[t.name];for(var u in a)a.hasOwnProperty(u)&&(r.hasOwnProperty(u)&&(r["_"+u]=r[u]),r[u]=a[u])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var f in t.modeProps)r[f]=t.modeProps[f];return r}var sn={};function on(e,t){var i=sn.hasOwnProperty(e)?sn[e]:sn[e]={};He(t,i)}function Vt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var a=t[r];a instanceof Array&&(a=a.concat([])),i[r]=a}return i}function hr(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function pr(e,t,i){return e.startState?e.startState(t,i):!0}var mt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};mt.prototype.eol=function(){return this.pos>=this.string.length},mt.prototype.sol=function(){return this.pos==this.lineStart},mt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},mt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},mt.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},mt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},mt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},mt.prototype.skipToEnd=function(){this.pos=this.string.length},mt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},mt.prototype.backUp=function(e){this.pos-=e},mt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},mt.prototype.indentation=function(){return qe(this.string,null,this.tabSize)-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},mt.prototype.match=function(e,t,i){if(typeof e=="string"){var r=function(f){return i?f.toLowerCase():f},a=this.string.substr(this.pos,e.length);if(r(a)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var u=this.string.slice(this.pos).match(e);return u&&u.index>0?null:(u&&t!==!1&&(this.pos+=u[0].length),u)}},mt.prototype.current=function(){return this.string.slice(this.start,this.pos)},mt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},mt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},mt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ie(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var r=0;;++r){var a=i.children[r],u=a.chunkSize();if(t<u){i=a;break}t-=u}return i.lines[t]}function Nn(e,t,i){var r=[],a=t.line;return e.iter(t.line,i.line+1,function(u){var f=u.text;a==i.line&&(f=f.slice(0,i.ch)),a==t.line&&(f=f.slice(t.ch)),r.push(f),++a}),r}function Vr(e,t,i){var r=[];return e.iter(t,i,function(a){r.push(a.text)}),r}function en(e,t){var i=t-e.height;if(i)for(var r=e;r;r=r.parent)r.height+=i}function rt(e){if(e.parent==null)return null;for(var t=e.parent,i=z(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var a=0;r.children[a]!=t;++a)i+=r.children[a].chunkSize();return i+t.first}function Pn(e,t){var i=e.first;e:do{for(var r=0;r<e.children.length;++r){var a=e.children[r],u=a.height;if(t<u){e=a;continue e}t-=u,i+=a.chunkSize()}return i}while(!e.lines);for(var f=0;f<e.lines.length;++f){var d=e.lines[f],m=d.height;if(t<m)break;t-=m}return i+f}function dr(e,t){return t>=e.first&&t<e.first+e.size}function Yr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ce(e,t,i){if(i===void 0&&(i=null),!(this instanceof ce))return new ce(e,t,i);this.line=e,this.ch=t,this.sticky=i}function k(e,t){return e.line-t.line||e.ch-t.ch}function P(e,t){return e.sticky==t.sticky&&k(e,t)==0}function ne(e){return ce(e.line,e.ch)}function he(e,t){return k(e,t)<0?t:e}function je(e,t){return k(e,t)<0?e:t}function Ze(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Se(e,t){if(t.line<e.first)return ce(e.first,0);var i=e.first+e.size-1;return t.line>i?ce(i,Ie(e,i).text.length):Yt(t,Ie(e,t.line).text.length)}function Yt(e,t){var i=e.ch;return i==null||i>t?ce(e.line,t):i<0?ce(e.line,0):e}function Sn(e,t){for(var i=[],r=0;r<t.length;r++)i[r]=Se(e,t[r]);return i}var gi=function(e,t){this.state=e,this.lookAhead=t},Qn=function(e,t,i,r){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Qn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Qn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Qn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Qn.fromSaved=function(e,t,i){return t instanceof gi?new Qn(e,Vt(e.mode,t.state),i,t.lookAhead):new Qn(e,Vt(e.mode,t),i)},Qn.prototype.save=function(e){var t=e!==!1?Vt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new gi(t,this.maxLookAhead):t};function Xl(e,t,i,r){var a=[e.state.modeGen],u={};eu(e,t.text,e.doc.mode,i,function(v,A){return a.push(v,A)},u,r);for(var f=i.state,d=function(v){i.baseTokens=a;var A=e.state.overlays[v],N=1,q=0;i.state=!0,eu(e,t.text,A.mode,i,function(j,Y){for(var se=N;q<j;){var me=a[N];me>j&&a.splice(N,1,j,a[N+1],me),N+=2,q=Math.min(j,me)}if(Y)if(A.opaque)a.splice(se,N-se,j,"overlay "+Y),N=se+2;else for(;se<N;se+=2){var be=a[se+1];a[se+1]=(be?be+" ":"")+"overlay "+Y}},u),i.state=f,i.baseTokens=null,i.baseTokenPos=1},m=0;m<e.state.overlays.length;++m)d(m);return{styles:a,classes:u.bgClass||u.textClass?u:null}}function Vl(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Xi(e,rt(t)),a=t.text.length>e.options.maxHighlightLength&&Vt(e.doc.mode,r.state),u=Xl(e,t,r);a&&(r.state=a),t.stateAfter=r.save(!a),t.styles=u.styles,u.classes?t.styleClasses=u.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Xi(e,t,i){var r=e.doc,a=e.display;if(!r.mode.startState)return new Qn(r,!0,t);var u=ih(e,t,i),f=u>r.first&&Ie(r,u-1).stateAfter,d=f?Qn.fromSaved(r,f,u):new Qn(r,pr(r.mode),u);return r.iter(u,t,function(m){Vo(e,m.text,d);var v=d.line;m.stateAfter=v==t-1||v%5==0||v>=a.viewFrom&&v<a.viewTo?d.save():null,d.nextLine()}),i&&(r.modeFrontier=d.line),d}function Vo(e,t,i,r){var a=e.doc.mode,u=new mt(t,e.options.tabSize,i);for(u.start=u.pos=r||0,t==""&&Yl(a,i.state);!u.eol();)Yo(a,u,i.state),u.start=u.pos}function Yl(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var i=hr(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function Yo(e,t,i,r){for(var a=0;a<10;a++){r&&(r[0]=hr(e,i).mode);var u=e.token(t,i);if(t.pos>t.start)return u}throw new Error("Mode "+e.name+" failed to advance stream.")}var Jl=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Ql(e,t,i,r){var a=e.doc,u=a.mode,f;t=Se(a,t);var d=Ie(a,t.line),m=Xi(e,t.line,i),v=new mt(d.text,e.options.tabSize,m),A;for(r&&(A=[]);(r||v.pos<t.ch)&&!v.eol();)v.start=v.pos,f=Yo(u,v,m.state),r&&A.push(new Jl(v,f,Vt(a.mode,m.state)));return r?A:new Jl(v,f,m.state)}function Zl(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var r=i[1]?"bgClass":"textClass";t[r]==null?t[r]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+i[2])}return e}function eu(e,t,i,r,a,u,f){var d=i.flattenSpans;d==null&&(d=e.options.flattenSpans);var m=0,v=null,A=new mt(t,e.options.tabSize,r),N,q=e.options.addModeClass&&[null];for(t==""&&Zl(Yl(i,r.state),u);!A.eol();){if(A.pos>e.options.maxHighlightLength?(d=!1,f&&Vo(e,t,r,A.pos),A.pos=t.length,N=null):N=Zl(Yo(i,A,r.state,q),u),q){var j=q[0].name;j&&(N="m-"+(N?j+" "+N:j))}if(!d||v!=N){for(;m<A.start;)m=Math.min(A.start,m+5e3),a(m,v);v=N}A.start=A.pos}for(;m<A.pos;){var Y=Math.min(A.pos,m+5e3);a(Y,v),m=Y}}function ih(e,t,i){for(var r,a,u=e.doc,f=i?-1:t-(e.doc.mode.innerMode?1e3:100),d=t;d>f;--d){if(d<=u.first)return u.first;var m=Ie(u,d-1),v=m.stateAfter;if(v&&(!i||d+(v instanceof gi?v.lookAhead:0)<=u.modeFrontier))return d;var A=qe(m.text,null,e.options.tabSize);(a==null||r>A)&&(a=d-1,r=A)}return a}function sh(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,r=t-1;r>i;r--){var a=Ie(e,r).stateAfter;if(a&&(!(a instanceof gi)||r+a.lookAhead<t)){i=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var tu=!1,mr=!1;function oh(){tu=!0}function ah(){mr=!0}function qs(e,t,i){this.marker=e,this.from=t,this.to=i}function Vi(e,t){if(e)for(var i=0;i<e.length;++i){var r=e[i];if(r.marker==t)return r}}function lh(e,t){for(var i,r=0;r<e.length;++r)e[r]!=t&&(i||(i=[])).push(e[r]);return i}function uh(e,t,i){var r=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function ch(e,t,i){var r;if(e)for(var a=0;a<e.length;++a){var u=e[a],f=u.marker,d=u.from==null||(f.inclusiveLeft?u.from<=t:u.from<t);if(d||u.from==t&&f.type=="bookmark"&&(!i||!u.marker.insertLeft)){var m=u.to==null||(f.inclusiveRight?u.to>=t:u.to>t);(r||(r=[])).push(new qs(f,u.from,m?null:u.to))}}return r}function fh(e,t,i){var r;if(e)for(var a=0;a<e.length;++a){var u=e[a],f=u.marker,d=u.to==null||(f.inclusiveRight?u.to>=t:u.to>t);if(d||u.from==t&&f.type=="bookmark"&&(!i||u.marker.insertLeft)){var m=u.from==null||(f.inclusiveLeft?u.from<=t:u.from<t);(r||(r=[])).push(new qs(f,m?null:u.from-t,u.to==null?null:u.to-t))}}return r}function Jo(e,t){if(t.full)return null;var i=dr(e,t.from.line)&&Ie(e,t.from.line).markedSpans,r=dr(e,t.to.line)&&Ie(e,t.to.line).markedSpans;if(!i&&!r)return null;var a=t.from.ch,u=t.to.ch,f=k(t.from,t.to)==0,d=ch(i,a,f),m=fh(r,u,f),v=t.text.length==1,A=Le(t.text).length+(v?a:0);if(d)for(var N=0;N<d.length;++N){var q=d[N];if(q.to==null){var j=Vi(m,q.marker);j?v&&(q.to=j.to==null?null:j.to+A):q.to=a}}if(m)for(var Y=0;Y<m.length;++Y){var se=m[Y];if(se.to!=null&&(se.to+=A),se.from==null){var me=Vi(d,se.marker);me||(se.from=A,v&&(d||(d=[])).push(se))}else se.from+=A,v&&(d||(d=[])).push(se)}d&&(d=nu(d)),m&&m!=d&&(m=nu(m));var be=[d];if(!v){var _e=t.text.length-2,we;if(_e>0&&d)for(var Ce=0;Ce<d.length;++Ce)d[Ce].to==null&&(we||(we=[])).push(new qs(d[Ce].marker,null,null));for(var Oe=0;Oe<_e;++Oe)be.push(we);be.push(m)}return be}function nu(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function hh(e,t,i){var r=null;if(e.iter(t.line,i.line+1,function(j){if(j.markedSpans)for(var Y=0;Y<j.markedSpans.length;++Y){var se=j.markedSpans[Y].marker;se.readOnly&&(!r||z(r,se)==-1)&&(r||(r=[])).push(se)}}),!r)return null;for(var a=[{from:t,to:i}],u=0;u<r.length;++u)for(var f=r[u],d=f.find(0),m=0;m<a.length;++m){var v=a[m];if(!(k(v.to,d.from)<0||k(v.from,d.to)>0)){var A=[m,1],N=k(v.from,d.from),q=k(v.to,d.to);(N<0||!f.inclusiveLeft&&!N)&&A.push({from:v.from,to:d.from}),(q>0||!f.inclusiveRight&&!q)&&A.push({from:d.to,to:v.to}),a.splice.apply(a,A),m+=A.length-3}}return a}function ru(e){var t=e.markedSpans;if(t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function iu(e,t){if(t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function zs(e){return e.inclusiveLeft?-1:0}function $s(e){return e.inclusiveRight?1:0}function Qo(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var r=e.find(),a=t.find(),u=k(r.from,a.from)||zs(e)-zs(t);if(u)return-u;var f=k(r.to,a.to)||$s(e)-$s(t);return f||t.id-e.id}function su(e,t){var i=mr&&e.markedSpans,r;if(i)for(var a=void 0,u=0;u<i.length;++u)a=i[u],a.marker.collapsed&&(t?a.from:a.to)==null&&(!r||Qo(r,a.marker)<0)&&(r=a.marker);return r}function ou(e){return su(e,!0)}function Us(e){return su(e,!1)}function ph(e,t){var i=mr&&e.markedSpans,r;if(i)for(var a=0;a<i.length;++a){var u=i[a];u.marker.collapsed&&(u.from==null||u.from<t)&&(u.to==null||u.to>t)&&(!r||Qo(r,u.marker)<0)&&(r=u.marker)}return r}function au(e,t,i,r,a){var u=Ie(e,t),f=mr&&u.markedSpans;if(f)for(var d=0;d<f.length;++d){var m=f[d];if(m.marker.collapsed){var v=m.marker.find(0),A=k(v.from,i)||zs(m.marker)-zs(a),N=k(v.to,r)||$s(m.marker)-$s(a);if(!(A>=0&&N<=0||A<=0&&N>=0)&&(A<=0&&(m.marker.inclusiveRight&&a.inclusiveLeft?k(v.to,i)>=0:k(v.to,i)>0)||A>=0&&(m.marker.inclusiveRight&&a.inclusiveLeft?k(v.from,r)<=0:k(v.from,r)<0)))return!0}}}function Mn(e){for(var t;t=ou(e);)e=t.find(-1,!0).line;return e}function dh(e){for(var t;t=Us(e);)e=t.find(1,!0).line;return e}function mh(e){for(var t,i;t=Us(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Zo(e,t){var i=Ie(e,t),r=Mn(i);return i==r?t:rt(r)}function lu(e,t){if(t>e.lastLine())return t;var i=Ie(e,t),r;if(!Lr(e,i))return t;for(;r=Us(i);)i=r.find(1,!0).line;return rt(i)+1}function Lr(e,t){var i=mr&&t.markedSpans;if(i){for(var r=void 0,a=0;a<i.length;++a)if(r=i[a],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&ea(e,t,r))return!0}}}function ea(e,t,i){if(i.to==null){var r=i.marker.find(1,!0);return ea(e,r.line,Vi(r.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var a=void 0,u=0;u<t.markedSpans.length;++u)if(a=t.markedSpans[u],a.marker.collapsed&&!a.marker.widgetNode&&a.from==i.to&&(a.to==null||a.to!=i.from)&&(a.marker.inclusiveLeft||i.marker.inclusiveRight)&&ea(e,t,a))return!0}function gr(e){e=Mn(e);for(var t=0,i=e.parent,r=0;r<i.lines.length;++r){var a=i.lines[r];if(a==e)break;t+=a.height}for(var u=i.parent;u;i=u,u=i.parent)for(var f=0;f<u.children.length;++f){var d=u.children[f];if(d==i)break;t+=d.height}return t}function Gs(e){if(e.height==0)return 0;for(var t=e.text.length,i,r=e;i=ou(r);){var a=i.find(0,!0);r=a.from.line,t+=a.from.ch-a.to.ch}for(r=e;i=Us(r);){var u=i.find(0,!0);t-=r.text.length-u.from.ch,r=u.to.line,t+=r.text.length-u.to.ch}return t}function ta(e){var t=e.display,i=e.doc;t.maxLine=Ie(i,i.first),t.maxLineLength=Gs(t.maxLine),t.maxLineChanged=!0,i.iter(function(r){var a=Gs(r);a>t.maxLineLength&&(t.maxLineLength=a,t.maxLine=r)})}var vi=function(e,t,i){this.text=e,iu(this,t),this.height=i?i(this):1};vi.prototype.lineNo=function(){return rt(this)},mn(vi);function gh(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ru(e),iu(e,i);var a=r?r(e):1;a!=e.height&&en(e,a)}function vh(e){e.parent=null,ru(e)}var kh={},yh={};function uu(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?yh:kh;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function cu(e,t){var i=b("span",null,null,y?"padding-right: .1px":null),r={pre:b("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var a=0;a<=(t.rest?t.rest.length:0);a++){var u=a?t.rest[a-1]:t.line,f=void 0;r.pos=0,r.addToken=wh,gn(e.display.measure)&&(f=Wt(u,e.doc.direction))&&(r.addToken=_h(r.addToken,f)),r.map=[];var d=t!=e.display.externalMeasured&&rt(u);Sh(u,r,Vl(e,u,d)),u.styleClasses&&(u.styleClasses.bgClass&&(r.bgClass=Ae(u.styleClasses.bgClass,r.bgClass||"")),u.styleClasses.textClass&&(r.textClass=Ae(u.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Tr(e.display.measure))),a==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(y){var m=r.content.lastChild;(/\bcm-tab\b/.test(m.className)||m.querySelector&&m.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Be(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Ae(r.pre.className,r.textClass||"")),r}function bh(e){var t=K("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function wh(e,t,i,r,a,u,f){if(t){var d=e.splitSpaces?xh(t,e.trailingSpace):t,m=e.cm.state.specialChars,v=!1,A;if(!m.test(t))e.col+=t.length,A=document.createTextNode(d),e.map.push(e.pos,e.pos+t.length,A),w&&C<9&&(v=!0),e.pos+=t.length;else{A=document.createDocumentFragment();for(var N=0;;){m.lastIndex=N;var q=m.exec(t),j=q?q.index-N:t.length-N;if(j){var Y=document.createTextNode(d.slice(N,N+j));w&&C<9?A.appendChild(K("span",[Y])):A.appendChild(Y),e.map.push(e.pos,e.pos+j,Y),e.col+=j,e.pos+=j}if(!q)break;N+=j+1;var se=void 0;if(q[0]==" "){var me=e.cm.options.tabSize,be=me-e.col%me;se=A.appendChild(K("span",Je(be),"cm-tab")),se.setAttribute("role","presentation"),se.setAttribute("cm-text"," "),e.col+=be}else q[0]=="\r"||q[0]==`
`?(se=A.appendChild(K("span",q[0]=="\r"?"␍":"␤","cm-invalidchar")),se.setAttribute("cm-text",q[0]),e.col+=1):(se=e.cm.options.specialCharPlaceholder(q[0]),se.setAttribute("cm-text",q[0]),w&&C<9?A.appendChild(K("span",[se])):A.appendChild(se),e.col+=1);e.map.push(e.pos,e.pos+1,se),e.pos++}}if(e.trailingSpace=d.charCodeAt(t.length-1)==32,i||r||a||v||u||f){var _e=i||"";r&&(_e+=r),a&&(_e+=a);var we=K("span",[A],_e,u);if(f)for(var Ce in f)f.hasOwnProperty(Ce)&&Ce!="style"&&Ce!="class"&&we.setAttribute(Ce,f[Ce]);return e.content.appendChild(we)}e.content.appendChild(A)}}function xh(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,r="",a=0;a<e.length;a++){var u=e.charAt(a);u==" "&&i&&(a==e.length-1||e.charCodeAt(a+1)==32)&&(u=" "),r+=u,i=u==" "}return r}function _h(e,t){return function(i,r,a,u,f,d,m){a=a?a+" cm-force-border":"cm-force-border";for(var v=i.pos,A=v+r.length;;){for(var N=void 0,q=0;q<t.length&&(N=t[q],!(N.to>v&&N.from<=v));q++);if(N.to>=A)return e(i,r,a,u,f,d,m);e(i,r.slice(0,N.to-v),a,u,null,d,m),u=null,r=r.slice(N.to-v),v=N.to}}}function fu(e,t,i,r){var a=!r&&i.widgetNode;a&&e.map.push(e.pos,e.pos+t,a),!r&&e.cm.display.input.needsContentAttribute&&(a||(a=e.content.appendChild(document.createElement("span"))),a.setAttribute("cm-marker",i.id)),a&&(e.cm.display.input.setUneditable(a),e.content.appendChild(a)),e.pos+=t,e.trailingSpace=!1}function Sh(e,t,i){var r=e.markedSpans,a=e.text,u=0;if(!r){for(var f=1;f<i.length;f+=2)t.addToken(t,a.slice(u,u=i[f]),uu(i[f+1],t.cm.options));return}for(var d=a.length,m=0,v=1,A="",N,q,j=0,Y,se,me,be,_e;;){if(j==m){Y=se=me=q="",_e=null,be=null,j=1/0;for(var we=[],Ce=void 0,Oe=0;Oe<r.length;++Oe){var Ee=r[Oe],Ye=Ee.marker;if(Ye.type=="bookmark"&&Ee.from==m&&Ye.widgetNode)we.push(Ye);else if(Ee.from<=m&&(Ee.to==null||Ee.to>m||Ye.collapsed&&Ee.to==m&&Ee.from==m)){if(Ee.to!=null&&Ee.to!=m&&j>Ee.to&&(j=Ee.to,se=""),Ye.className&&(Y+=" "+Ye.className),Ye.css&&(q=(q?q+";":"")+Ye.css),Ye.startStyle&&Ee.from==m&&(me+=" "+Ye.startStyle),Ye.endStyle&&Ee.to==j&&(Ce||(Ce=[])).push(Ye.endStyle,Ee.to),Ye.title&&((_e||(_e={})).title=Ye.title),Ye.attributes)for(var ct in Ye.attributes)(_e||(_e={}))[ct]=Ye.attributes[ct];Ye.collapsed&&(!be||Qo(be.marker,Ye)<0)&&(be=Ee)}else Ee.from>m&&j>Ee.from&&(j=Ee.from)}if(Ce)for(var Dt=0;Dt<Ce.length;Dt+=2)Ce[Dt+1]==j&&(se+=" "+Ce[Dt]);if(!be||be.from==m)for(var kt=0;kt<we.length;++kt)fu(t,0,we[kt]);if(be&&(be.from||0)==m){if(fu(t,(be.to==null?d+1:be.to)-m,be.marker,be.from==null),be.to==null)return;be.to==m&&(be=!1)}}if(m>=d)break;for(var kn=Math.min(d,j);;){if(A){var un=m+A.length;if(!be){var Tt=un>kn?A.slice(0,kn-m):A;t.addToken(t,Tt,N?N+Y:Y,me,m+Tt.length==j?se:"",q,_e)}if(un>=kn){A=A.slice(kn-m),m=kn;break}m=un,me=""}A=a.slice(u,u=i[v++]),N=uu(i[v++],t.cm.options)}}}function hu(e,t,i){this.line=t,this.rest=mh(t),this.size=this.rest?rt(Le(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Lr(e,t)}function Ks(e,t,i){for(var r=[],a,u=t;u<i;u=a){var f=new hu(e.doc,Ie(e.doc,u),u);a=u+f.size,r.push(f)}return r}var ki=null;function Th(e){ki?ki.ops.push(e):e.ownsGroup=ki={ops:[e],delayedCallbacks:[]}}function Ch(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var r=0;r<e.ops.length;r++){var a=e.ops[r];if(a.cursorActivityHandlers)for(;a.cursorActivityCalled<a.cursorActivityHandlers.length;)a.cursorActivityHandlers[a.cursorActivityCalled++].call(null,a.cm)}}while(i<t.length)}function Ih(e,t){var i=e.ownsGroup;if(i)try{Ch(i)}finally{ki=null,t(i)}}var Yi=null;function Nt(e,t){var i=Kn(e,t);if(i.length){var r=Array.prototype.slice.call(arguments,2),a;ki?a=ki.delayedCallbacks:Yi?a=Yi:(a=Yi=[],setTimeout(Ah,0));for(var u=function(d){a.push(function(){return i[d].apply(null,r)})},f=0;f<i.length;++f)u(f)}}function Ah(){var e=Yi;Yi=null;for(var t=0;t<e.length;++t)e[t]()}function pu(e,t,i,r){for(var a=0;a<t.changes.length;a++){var u=t.changes[a];u=="text"?Eh(e,t):u=="gutter"?mu(e,t,i,r):u=="class"?na(e,t):u=="widget"&&Nh(e,t,r)}t.changes=null}function Ji(e){return e.node==e.text&&(e.node=K("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&C<8&&(e.node.style.zIndex=2)),e.node}function Lh(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var r=Ji(t);t.background=r.insertBefore(K("div",null,i),r.firstChild),e.display.input.setUneditable(t.background)}}function du(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):cu(e,t)}function Eh(e,t){var i=t.text.className,r=du(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,na(e,t)):i&&(t.text.className=i)}function na(e,t){Lh(e,t),t.line.wrapClass?Ji(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function mu(e,t,i,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var a=Ji(t);t.gutterBackground=K("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),a.insertBefore(t.gutterBackground,t.text)}var u=t.line.gutterMarkers;if(e.options.lineNumbers||u){var f=Ji(t),d=t.gutter=K("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(d.setAttribute("aria-hidden","true"),e.display.input.setUneditable(d),f.insertBefore(d,t.text),t.line.gutterClass&&(d.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!u||!u["CodeMirror-linenumbers"])&&(t.lineNumber=d.appendChild(K("div",Yr(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),u)for(var m=0;m<e.display.gutterSpecs.length;++m){var v=e.display.gutterSpecs[m].className,A=u.hasOwnProperty(v)&&u[v];A&&d.appendChild(K("div",[A],"CodeMirror-gutter-elt","left: "+r.gutterLeft[v]+"px; width: "+r.gutterWidth[v]+"px"))}}}function Nh(e,t,i){t.alignable&&(t.alignable=null);for(var r=ge("CodeMirror-linewidget"),a=t.node.firstChild,u=void 0;a;a=u)u=a.nextSibling,r.test(a.className)&&t.node.removeChild(a);gu(e,t,i)}function Ph(e,t,i,r){var a=du(e,t);return t.text=t.node=a.pre,a.bgClass&&(t.bgClass=a.bgClass),a.textClass&&(t.textClass=a.textClass),na(e,t),mu(e,t,i,r),gu(e,t,r),t.node}function gu(e,t,i){if(vu(e,t.line,t,i,!0),t.rest)for(var r=0;r<t.rest.length;r++)vu(e,t.rest[r],t,i,!1)}function vu(e,t,i,r,a){if(t.widgets)for(var u=Ji(i),f=0,d=t.widgets;f<d.length;++f){var m=d[f],v=K("div",[m.node],"CodeMirror-linewidget"+(m.className?" "+m.className:""));m.handleMouseEvents||v.setAttribute("cm-ignore-events","true"),Oh(m,v,i,r),e.display.input.setUneditable(v),a&&m.above?u.insertBefore(v,i.gutter||i.text):u.appendChild(v),Nt(m,"redraw")}}function Oh(e,t,i,r){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var a=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(a-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=a+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Qi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Q(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),G(t.display.measure,K("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function vr(e,t){for(var i=Ln(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Xs(e){return e.lineSpace.offsetTop}function ra(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ku(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=G(e.measure,K("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function Zn(e){return V-e.display.nativeBarWidth}function Jr(e){return e.display.scroller.clientWidth-Zn(e)-e.display.barWidth}function ia(e){return e.display.scroller.clientHeight-Zn(e)-e.display.barHeight}function Dh(e,t,i){var r=e.options.lineWrapping,a=r&&Jr(e);if(!t.measure.heights||r&&t.measure.width!=a){var u=t.measure.heights=[];if(r){t.measure.width=a;for(var f=t.text.firstChild.getClientRects(),d=0;d<f.length-1;d++){var m=f[d],v=f[d+1];Math.abs(m.bottom-v.bottom)>2&&u.push((m.bottom+v.top)/2-i.top)}}u.push(i.bottom-i.top)}}function yu(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var a=0;a<e.rest.length;a++)if(rt(e.rest[a])>i)return{map:e.measure.maps[a],cache:e.measure.caches[a],before:!0}}}function Rh(e,t){t=Mn(t);var i=rt(t),r=e.display.externalMeasured=new hu(e.doc,t,i);r.lineN=i;var a=r.built=cu(e,r);return r.text=a.pre,G(e.display.lineMeasure,a.pre),r}function bu(e,t,i,r){return er(e,yi(e,t),i,r)}function sa(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ei(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function yi(e,t){var i=rt(t),r=sa(e,i);r&&!r.text?r=null:r&&r.changes&&(pu(e,r,i,ca(e)),e.curOp.forceUpdate=!0),r||(r=Rh(e,t));var a=yu(r,t,i);return{line:t,view:r,rect:null,map:a.map,cache:a.cache,before:a.before,hasHeights:!1}}function er(e,t,i,r,a){t.before&&(i=-1);var u=i+(r||""),f;return t.cache.hasOwnProperty(u)?f=t.cache[u]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Dh(e,t.view,t.rect),t.hasHeights=!0),f=Fh(e,t,i,r),f.bogus||(t.cache[u]=f)),{left:f.left,right:f.right,top:a?f.rtop:f.top,bottom:a?f.rbottom:f.bottom}}var wu={left:0,right:0,top:0,bottom:0};function xu(e,t,i){for(var r,a,u,f,d,m,v=0;v<e.length;v+=3)if(d=e[v],m=e[v+1],t<d?(a=0,u=1,f="left"):t<m?(a=t-d,u=a+1):(v==e.length-3||t==m&&e[v+3]>t)&&(u=m-d,a=u-1,t>=m&&(f="right")),a!=null){if(r=e[v+2],d==m&&i==(r.insertLeft?"left":"right")&&(f=i),i=="left"&&a==0)for(;v&&e[v-2]==e[v-3]&&e[v-1].insertLeft;)r=e[(v-=3)+2],f="left";if(i=="right"&&a==m-d)for(;v<e.length-3&&e[v+3]==e[v+4]&&!e[v+5].insertLeft;)r=e[(v+=3)+2],f="right";break}return{node:r,start:a,end:u,collapse:f,coverStart:d,coverEnd:m}}function Mh(e,t){var i=wu;if(t=="left")for(var r=0;r<e.length&&(i=e[r]).left==i.right;r++);else for(var a=e.length-1;a>=0&&(i=e[a]).left==i.right;a--);return i}function Fh(e,t,i,r){var a=xu(t.map,i,r),u=a.node,f=a.start,d=a.end,m=a.collapse,v;if(u.nodeType==3){for(var A=0;A<4;A++){for(;f&&Ve(t.line.text.charAt(a.coverStart+f));)--f;for(;a.coverStart+d<a.coverEnd&&Ve(t.line.text.charAt(a.coverStart+d));)++d;if(w&&C<9&&f==0&&d==a.coverEnd-a.coverStart?v=u.parentNode.getBoundingClientRect():v=Mh(oe(u,f,d).getClientRects(),r),v.left||v.right||f==0)break;d=f,f=f-1,m="right"}w&&C<11&&(v=Bh(e.display.measure,v))}else{f>0&&(m=r="right");var N;e.options.lineWrapping&&(N=u.getClientRects()).length>1?v=N[r=="right"?N.length-1:0]:v=u.getBoundingClientRect()}if(w&&C<9&&!f&&(!v||!v.left&&!v.right)){var q=u.parentNode.getClientRects()[0];q?v={left:q.left,right:q.left+wi(e.display),top:q.top,bottom:q.bottom}:v=wu}for(var j=v.top-t.rect.top,Y=v.bottom-t.rect.top,se=(j+Y)/2,me=t.view.measure.heights,be=0;be<me.length-1&&!(se<me[be]);be++);var _e=be?me[be-1]:0,we=me[be],Ce={left:(m=="right"?v.right:v.left)-t.rect.left,right:(m=="left"?v.left:v.right)-t.rect.left,top:_e,bottom:we};return!v.left&&!v.right&&(Ce.bogus=!0),e.options.singleCursorHeightPerLine||(Ce.rtop=j,Ce.rbottom=Y),Ce}function Bh(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!En(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*r,bottom:t.bottom*r}}function _u(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Su(e){e.display.externalMeasure=null,Te(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)_u(e.display.view[t])}function Zi(e){Su(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Tu(){return L&&I?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Cu(){return L&&I?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function oa(e){var t=Mn(e),i=t.widgets,r=0;if(i)for(var a=0;a<i.length;++a)i[a].above&&(r+=Qi(i[a]));return r}function Vs(e,t,i,r,a){if(!a){var u=oa(t);i.top+=u,i.bottom+=u}if(r=="line")return i;r||(r="local");var f=gr(t);if(r=="local"?f+=Xs(e.display):f-=e.display.viewOffset,r=="page"||r=="window"){var d=e.display.lineSpace.getBoundingClientRect();f+=d.top+(r=="window"?0:Cu());var m=d.left+(r=="window"?0:Tu());i.left+=m,i.right+=m}return i.top+=f,i.bottom+=f,i}function Iu(e,t,i){if(i=="div")return t;var r=t.left,a=t.top;if(i=="page")r-=Tu(),a-=Cu();else if(i=="local"||!i){var u=e.display.sizer.getBoundingClientRect();r+=u.left,a+=u.top}var f=e.display.lineSpace.getBoundingClientRect();return{left:r-f.left,top:a-f.top}}function Ys(e,t,i,r,a){return r||(r=Ie(e.doc,t.line)),Vs(e,r,bu(e,r,t.ch,a),i)}function Fn(e,t,i,r,a,u){r=r||Ie(e.doc,t.line),a||(a=yi(e,r));function f(Y,se){var me=er(e,a,Y,se?"right":"left",u);return se?me.left=me.right:me.right=me.left,Vs(e,r,me,i)}var d=Wt(r,e.doc.direction),m=t.ch,v=t.sticky;if(m>=r.text.length?(m=r.text.length,v="before"):m<=0&&(m=0,v="after"),!d)return f(v=="before"?m-1:m,v=="before");function A(Y,se,me){var be=d[se],_e=be.level==1;return f(me?Y-1:Y,_e!=me)}var N=ft(d,m,v),q=Gt,j=A(m,N,v=="before");return q!=null&&(j.other=A(m,q,v!="before")),j}function Au(e,t){var i=0;t=Se(e.doc,t),e.options.lineWrapping||(i=wi(e.display)*t.ch);var r=Ie(e.doc,t.line),a=gr(r)+Xs(e.display);return{left:i,right:i,top:a,bottom:a+r.height}}function aa(e,t,i,r,a){var u=ce(e,t,i);return u.xRel=a,r&&(u.outside=r),u}function la(e,t,i){var r=e.doc;if(i+=e.display.viewOffset,i<0)return aa(r.first,0,null,-1,-1);var a=Pn(r,i),u=r.first+r.size-1;if(a>u)return aa(r.first+r.size-1,Ie(r,u).text.length,null,1,1);t<0&&(t=0);for(var f=Ie(r,a);;){var d=jh(e,f,a,t,i),m=ph(f,d.ch+(d.xRel>0||d.outside>0?1:0));if(!m)return d;var v=m.find(1);if(v.line==a)return v;f=Ie(r,a=v.line)}}function Lu(e,t,i,r){r-=oa(t);var a=t.text.length,u=dn(function(f){return er(e,i,f-1).bottom<=r},a,0);return a=dn(function(f){return er(e,i,f).top>r},u,a),{begin:u,end:a}}function Eu(e,t,i,r){i||(i=yi(e,t));var a=Vs(e,t,er(e,i,r),"line").top;return Lu(e,t,i,a)}function ua(e,t,i,r){return e.bottom<=i?!1:e.top>i?!0:(r?e.left:e.right)>t}function jh(e,t,i,r,a){a-=gr(t);var u=yi(e,t),f=oa(t),d=0,m=t.text.length,v=!0,A=Wt(t,e.doc.direction);if(A){var N=(e.options.lineWrapping?Hh:Wh)(e,t,i,u,A,r,a);v=N.level!=1,d=v?N.from:N.to-1,m=v?N.to:N.from-1}var q=null,j=null,Y=dn(function(Oe){var Ee=er(e,u,Oe);return Ee.top+=f,Ee.bottom+=f,ua(Ee,r,a,!1)?(Ee.top<=a&&Ee.left<=r&&(q=Oe,j=Ee),!0):!1},d,m),se,me,be=!1;if(j){var _e=r-j.left<j.right-r,we=_e==v;Y=q+(we?0:1),me=we?"after":"before",se=_e?j.left:j.right}else{!v&&(Y==m||Y==d)&&Y++,me=Y==0?"after":Y==t.text.length?"before":er(e,u,Y-(v?1:0)).bottom+f<=a==v?"after":"before";var Ce=Fn(e,ce(i,Y,me),"line",t,u);se=Ce.left,be=a<Ce.top?-1:a>=Ce.bottom?1:0}return Y=It(t.text,Y,1),aa(i,Y,me,be,r-se)}function Wh(e,t,i,r,a,u,f){var d=dn(function(N){var q=a[N],j=q.level!=1;return ua(Fn(e,ce(i,j?q.to:q.from,j?"before":"after"),"line",t,r),u,f,!0)},0,a.length-1),m=a[d];if(d>0){var v=m.level!=1,A=Fn(e,ce(i,v?m.from:m.to,v?"after":"before"),"line",t,r);ua(A,u,f,!0)&&A.top>f&&(m=a[d-1])}return m}function Hh(e,t,i,r,a,u,f){var d=Lu(e,t,r,f),m=d.begin,v=d.end;/\s/.test(t.text.charAt(v-1))&&v--;for(var A=null,N=null,q=0;q<a.length;q++){var j=a[q];if(!(j.from>=v||j.to<=m)){var Y=j.level!=1,se=er(e,r,Y?Math.min(v,j.to)-1:Math.max(m,j.from)).right,me=se<u?u-se+1e9:se-u;(!A||N>me)&&(A=j,N=me)}}return A||(A=a[a.length-1]),A.from<m&&(A={from:m,to:A.to,level:A.level}),A.to>v&&(A={from:A.from,to:v,level:A.level}),A}var Qr;function bi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Qr==null){Qr=K("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Qr.appendChild(document.createTextNode("x")),Qr.appendChild(K("br"));Qr.appendChild(document.createTextNode("x"))}G(e.measure,Qr);var i=Qr.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),Te(e.measure),i||1}function wi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=K("span","xxxxxxxxxx"),i=K("pre",[t],"CodeMirror-line-like");G(e.measure,i);var r=t.getBoundingClientRect(),a=(r.right-r.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function ca(e){for(var t=e.display,i={},r={},a=t.gutters.clientLeft,u=t.gutters.firstChild,f=0;u;u=u.nextSibling,++f){var d=e.display.gutterSpecs[f].className;i[d]=u.offsetLeft+u.clientLeft+a,r[d]=u.clientWidth}return{fixedPos:fa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function fa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Nu(e){var t=bi(e.display),i=e.options.lineWrapping,r=i&&Math.max(5,e.display.scroller.clientWidth/wi(e.display)-3);return function(a){if(Lr(e.doc,a))return 0;var u=0;if(a.widgets)for(var f=0;f<a.widgets.length;f++)a.widgets[f].height&&(u+=a.widgets[f].height);return i?u+(Math.ceil(a.text.length/r)||1)*t:u+t}}function ha(e){var t=e.doc,i=Nu(e);t.iter(function(r){var a=i(r);a!=r.height&&en(r,a)})}function Zr(e,t,i,r){var a=e.display;if(!i&&Ln(t).getAttribute("cm-not-content")=="true")return null;var u,f,d=a.lineSpace.getBoundingClientRect();try{u=t.clientX-d.left,f=t.clientY-d.top}catch{return null}var m=la(e,u,f),v;if(r&&m.xRel>0&&(v=Ie(e.doc,m.line).text).length==m.ch){var A=qe(v,v.length,e.options.tabSize)-v.length;m=ce(m.line,Math.max(0,Math.round((u-ku(e.display).left)/wi(e.display))-A))}return m}function ei(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,r=0;r<i.length;r++)if(t-=i[r].size,t<0)return r}function an(e,t,i,r){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),r||(r=0);var a=e.display;if(r&&i<a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>t)&&(a.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=a.viewTo)mr&&Zo(e.doc,t)<a.viewTo&&Nr(e);else if(i<=a.viewFrom)mr&&lu(e.doc,i+r)>a.viewFrom?Nr(e):(a.viewFrom+=r,a.viewTo+=r);else if(t<=a.viewFrom&&i>=a.viewTo)Nr(e);else if(t<=a.viewFrom){var u=Js(e,i,i+r,1);u?(a.view=a.view.slice(u.index),a.viewFrom=u.lineN,a.viewTo+=r):Nr(e)}else if(i>=a.viewTo){var f=Js(e,t,t,-1);f?(a.view=a.view.slice(0,f.index),a.viewTo=f.lineN):Nr(e)}else{var d=Js(e,t,t,-1),m=Js(e,i,i+r,1);d&&m?(a.view=a.view.slice(0,d.index).concat(Ks(e,d.lineN,m.lineN)).concat(a.view.slice(m.index)),a.viewTo+=r):Nr(e)}var v=a.externalMeasured;v&&(i<v.lineN?v.lineN+=r:t<v.lineN+v.size&&(a.externalMeasured=null))}function Er(e,t,i){e.curOp.viewChanged=!0;var r=e.display,a=e.display.externalMeasured;if(a&&t>=a.lineN&&t<a.lineN+a.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var u=r.view[ei(e,t)];if(u.node!=null){var f=u.changes||(u.changes=[]);z(f,i)==-1&&f.push(i)}}}function Nr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Js(e,t,i,r){var a=ei(e,t),u,f=e.display.view;if(!mr||i==e.doc.first+e.doc.size)return{index:a,lineN:i};for(var d=e.display.viewFrom,m=0;m<a;m++)d+=f[m].size;if(d!=t){if(r>0){if(a==f.length-1)return null;u=d+f[a].size-t,a++}else u=d-t;t+=u,i+=u}for(;Zo(e.doc,i)!=i;){if(a==(r<0?0:f.length-1))return null;i+=r*f[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:i}}function qh(e,t,i){var r=e.display,a=r.view;a.length==0||t>=r.viewTo||i<=r.viewFrom?(r.view=Ks(e,t,i),r.viewFrom=t):(r.viewFrom>t?r.view=Ks(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ei(e,t))),r.viewFrom=t,r.viewTo<i?r.view=r.view.concat(Ks(e,r.viewTo,i)):r.viewTo>i&&(r.view=r.view.slice(0,ei(e,i)))),r.viewTo=i}function Pu(e){for(var t=e.display.view,i=0,r=0;r<t.length;r++){var a=t[r];!a.hidden&&(!a.node||a.changes)&&++i}return i}function es(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ou(e,t){t===void 0&&(t=!0);var i=e.doc,r={},a=r.cursors=document.createDocumentFragment(),u=r.selection=document.createDocumentFragment(),f=e.options.$customCursor;f&&(t=!0);for(var d=0;d<i.sel.ranges.length;d++)if(!(!t&&d==i.sel.primIndex)){var m=i.sel.ranges[d];if(!(m.from().line>=e.display.viewTo||m.to().line<e.display.viewFrom)){var v=m.empty();if(f){var A=f(e,m);A&&pa(e,A,a)}else(v||e.options.showCursorWhenSelecting)&&pa(e,m.head,a);v||zh(e,m,u)}}return r}function pa(e,t,i){var r=Fn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),a=i.appendChild(K("div"," ","CodeMirror-cursor"));if(a.style.left=r.left+"px",a.style.top=r.top+"px",a.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var u=Ys(e,t,"div",null,null),f=u.right-u.left;a.style.width=(f>0?f:e.defaultCharWidth())+"px"}if(r.other){var d=i.appendChild(K("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));d.style.display="",d.style.left=r.other.left+"px",d.style.top=r.other.top+"px",d.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Qs(e,t){return e.top-t.top||e.left-t.left}function zh(e,t,i){var r=e.display,a=e.doc,u=document.createDocumentFragment(),f=ku(e.display),d=f.left,m=Math.max(r.sizerWidth,Jr(e)-r.sizer.offsetLeft)-f.right,v=a.direction=="ltr";function A(we,Ce,Oe,Ee){Ce<0&&(Ce=0),Ce=Math.round(Ce),Ee=Math.round(Ee),u.appendChild(K("div",null,"CodeMirror-selected","position: absolute; left: "+we+`px;
top: `+Ce+"px; width: "+(Oe??m-we)+`px;
height: `+(Ee-Ce)+"px"))}function N(we,Ce,Oe){var Ee=Ie(a,we),Ye=Ee.text.length,ct,Dt;function kt(Tt,cn){return Ys(e,ce(we,Tt),"div",Ee,cn)}function kn(Tt,cn,Ht){var At=Eu(e,Ee,null,Tt),Ct=cn=="ltr"==(Ht=="after")?"left":"right",bt=Ht=="after"?At.begin:At.end-(/\s/.test(Ee.text.charAt(At.end-1))?2:1);return kt(bt,Ct)[Ct]}var un=Wt(Ee,a.direction);return Xr(un,Ce||0,Oe??Ye,function(Tt,cn,Ht,At){var Ct=Ht=="ltr",bt=kt(Tt,Ct?"left":"right"),fn=kt(cn-1,Ct?"right":"left"),Di=Ce==null&&Tt==0,Fr=Oe==null&&cn==Ye,Qt=At==0,tr=!un||At==un.length-1;if(fn.top-bt.top<=3){var Rt=(v?Di:Fr)&&Qt,ja=(v?Fr:Di)&&tr,br=Rt?d:(Ct?bt:fn).left,si=ja?m:(Ct?fn:bt).right;A(br,bt.top,si-br,bt.bottom)}else{var oi,nn,Ri,Wa;Ct?(oi=v&&Di&&Qt?d:bt.left,nn=v?m:kn(Tt,Ht,"before"),Ri=v?d:kn(cn,Ht,"after"),Wa=v&&Fr&&tr?m:fn.right):(oi=v?kn(Tt,Ht,"before"):d,nn=!v&&Di&&Qt?m:bt.right,Ri=!v&&Fr&&tr?d:fn.left,Wa=v?kn(cn,Ht,"after"):m),A(oi,bt.top,nn-oi,bt.bottom),bt.bottom<fn.top&&A(d,bt.bottom,null,fn.top),A(Ri,fn.top,Wa-Ri,fn.bottom)}(!ct||Qs(bt,ct)<0)&&(ct=bt),Qs(fn,ct)<0&&(ct=fn),(!Dt||Qs(bt,Dt)<0)&&(Dt=bt),Qs(fn,Dt)<0&&(Dt=fn)}),{start:ct,end:Dt}}var q=t.from(),j=t.to();if(q.line==j.line)N(q.line,q.ch,j.ch);else{var Y=Ie(a,q.line),se=Ie(a,j.line),me=Mn(Y)==Mn(se),be=N(q.line,q.ch,me?Y.text.length+1:null).end,_e=N(j.line,me?0:null,j.ch).start;me&&(be.top<_e.top-2?(A(be.right,be.top,null,be.bottom),A(d,_e.top,_e.left,_e.bottom)):A(be.right,be.top,_e.left-be.right,be.bottom)),be.bottom<_e.top&&A(d,be.bottom,null,_e.top)}i.appendChild(u)}function da(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||xi(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Du(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ga(e))}function ma(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&xi(e))},100)}function ga(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Be(e,"focus",e,t),e.state.focused=!0,Pe(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),y&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),da(e))}function xi(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Be(e,"blur",e,t),e.state.focused=!1,ke(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Zs(e){for(var t=e.display,i=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),a=t.lineDiv.getBoundingClientRect().top,u=0,f=0;f<t.view.length;f++){var d=t.view[f],m=e.options.lineWrapping,v=void 0,A=0;if(!d.hidden){if(a+=d.line.height,w&&C<8){var N=d.node.offsetTop+d.node.offsetHeight;v=N-i,i=N}else{var q=d.node.getBoundingClientRect();v=q.bottom-q.top,!m&&d.text.firstChild&&(A=d.text.firstChild.getBoundingClientRect().right-q.left-1)}var j=d.line.height-v;if((j>.005||j<-.005)&&(a<r&&(u-=j),en(d.line,v),Ru(d.line),d.rest))for(var Y=0;Y<d.rest.length;Y++)Ru(d.rest[Y]);if(A>e.display.sizerWidth){var se=Math.ceil(A/wi(e.display));se>e.display.maxLineLength&&(e.display.maxLineLength=se,e.display.maxLine=d.line,e.display.maxLineChanged=!0)}}}Math.abs(u)>2&&(t.scroller.scrollTop+=u)}function Ru(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],r=i.node.parentNode;r&&(i.height=r.offsetHeight)}}function eo(e,t,i){var r=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;r=Math.floor(r-Xs(e));var a=i&&i.bottom!=null?i.bottom:r+e.wrapper.clientHeight,u=Pn(t,r),f=Pn(t,a);if(i&&i.ensure){var d=i.ensure.from.line,m=i.ensure.to.line;d<u?(u=d,f=Pn(t,gr(Ie(t,d))+e.wrapper.clientHeight)):Math.min(m,t.lastLine())>=f&&(u=Pn(t,gr(Ie(t,m))-e.wrapper.clientHeight),f=m)}return{from:u,to:Math.max(f,u+1)}}function $h(e,t){if(!dt(e,"scrollCursorIntoView")){var i=e.display,r=i.sizer.getBoundingClientRect(),a=null;if(t.top+r.top<0?a=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(a=!1),a!=null&&!W){var u=K("div","​",null,`position: absolute;
top: `+(t.top-i.viewOffset-Xs(e.display))+`px;
height: `+(t.bottom-t.top+Zn(e)+i.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(u),u.scrollIntoView(a),e.display.lineSpace.removeChild(u)}}}function Uh(e,t,i,r){r==null&&(r=0);var a;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?ce(t.line,t.ch+1,"before"):t,t=t.ch?ce(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var u=0;u<5;u++){var f=!1,d=Fn(e,t),m=!i||i==t?d:Fn(e,i);a={left:Math.min(d.left,m.left),top:Math.min(d.top,m.top)-r,right:Math.max(d.left,m.left),bottom:Math.max(d.bottom,m.bottom)+r};var v=va(e,a),A=e.doc.scrollTop,N=e.doc.scrollLeft;if(v.scrollTop!=null&&(ns(e,v.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(f=!0)),v.scrollLeft!=null&&(ti(e,v.scrollLeft),Math.abs(e.doc.scrollLeft-N)>1&&(f=!0)),!f)break}return a}function Gh(e,t){var i=va(e,t);i.scrollTop!=null&&ns(e,i.scrollTop),i.scrollLeft!=null&&ti(e,i.scrollLeft)}function va(e,t){var i=e.display,r=bi(e.display);t.top<0&&(t.top=0);var a=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,u=ia(e),f={};t.bottom-t.top>u&&(t.bottom=t.top+u);var d=e.doc.height+ra(i),m=t.top<r,v=t.bottom>d-r;if(t.top<a)f.scrollTop=m?0:t.top;else if(t.bottom>a+u){var A=Math.min(t.top,(v?d:t.bottom)-u);A!=a&&(f.scrollTop=A)}var N=e.options.fixedGutter?0:i.gutters.offsetWidth,q=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-N,j=Jr(e)-i.gutters.offsetWidth,Y=t.right-t.left>j;return Y&&(t.right=t.left+j),t.left<10?f.scrollLeft=0:t.left<q?f.scrollLeft=Math.max(0,t.left+N-(Y?0:10)):t.right>j+q-3&&(f.scrollLeft=t.right+(Y?0:10)-j),f}function ka(e,t){t!=null&&(to(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function _i(e){to(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ts(e,t,i){(t!=null||i!=null)&&to(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Kh(e,t){to(e),e.curOp.scrollToPos=t}function to(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=Au(e,t.from),r=Au(e,t.to);Mu(e,i,r,t.margin)}}function Mu(e,t,i,r){var a=va(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-r,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+r});ts(e,a.scrollLeft,a.scrollTop)}function ns(e,t){Math.abs(e.doc.scrollTop-t)<2||(p||ba(e,{top:t}),Fu(e,t,!0),p&&ba(e),ss(e,100))}function Fu(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function ti(e,t,i,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,qu(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function rs(e){var t=e.display,i=t.gutters.offsetWidth,r=Math.round(e.doc.height+ra(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:r,scrollHeight:r+Zn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var ni=function(e,t,i){this.cm=i;var r=this.vert=K("div",[K("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),a=this.horiz=K("div",[K("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=a.tabIndex=-1,e(r),e(a),Ne(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ne(a,"scroll",function(){a.clientWidth&&t(a.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&C<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ni.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var a=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+a)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var u=e.viewWidth-e.barLeft-(i?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+u)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?r:0,bottom:t?r:0}},ni.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ni.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ni.prototype.zeroWidthHack=function(){var e=B&&!R?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new X,this.disableVert=new X},ni.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function r(){var a=e.getBoundingClientRect(),u=i=="vert"?document.elementFromPoint(a.right-1,(a.top+a.bottom)/2):document.elementFromPoint((a.right+a.left)/2,a.bottom-1);u!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},ni.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var is=function(){};is.prototype.update=function(){return{bottom:0,right:0}},is.prototype.setScrollLeft=function(){},is.prototype.setScrollTop=function(){},is.prototype.clear=function(){};function Si(e,t){t||(t=rs(e));var i=e.display.barWidth,r=e.display.barHeight;Bu(e,t);for(var a=0;a<4&&i!=e.display.barWidth||r!=e.display.barHeight;a++)i!=e.display.barWidth&&e.options.lineWrapping&&Zs(e),Bu(e,rs(e)),i=e.display.barWidth,r=e.display.barHeight}function Bu(e,t){var i=e.display,r=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=r.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=r.bottom)+"px",i.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=r.bottom+"px",i.scrollbarFiller.style.width=r.right+"px"):i.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=r.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var ju={native:ni,null:is};function Wu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ke(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ju[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ne(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?ti(e,t):ns(e,t)},e),e.display.scrollbars.addClass&&Pe(e.display.wrapper,e.display.scrollbars.addClass)}var Xh=0;function ri(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Xh,markArrays:null},Th(e.curOp)}function ii(e){var t=e.curOp;t&&Ih(t,function(i){for(var r=0;r<i.ops.length;r++)i.ops[r].cm.curOp=null;Vh(i)})}function Vh(e){for(var t=e.ops,i=0;i<t.length;i++)Yh(t[i]);for(var r=0;r<t.length;r++)Jh(t[r]);for(var a=0;a<t.length;a++)Qh(t[a]);for(var u=0;u<t.length;u++)Zh(t[u]);for(var f=0;f<t.length;f++)ep(t[f])}function Yh(e){var t=e.cm,i=t.display;np(t),e.updateMaxLine&&ta(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new no(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Jh(e){e.updatedDisplay=e.mustUpdate&&ya(e.cm,e.update)}function Qh(e){var t=e.cm,i=t.display;e.updatedDisplay&&Zs(t),e.barMeasure=rs(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=bu(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Zn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Jr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function Zh(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ti(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==le();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Si(t,e.barMeasure),e.updatedDisplay&&xa(t,e.barMeasure),e.selectionChanged&&da(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&Du(e.cm)}function ep(e){var t=e.cm,i=t.display,r=t.doc;if(e.updatedDisplay&&Hu(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&Fu(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ti(t,e.scrollLeft,!0,!0),e.scrollToPos){var a=Uh(t,Se(r,e.scrollToPos.from),Se(r,e.scrollToPos.to),e.scrollToPos.margin);$h(t,a)}var u=e.maybeHiddenMarkers,f=e.maybeUnhiddenMarkers;if(u)for(var d=0;d<u.length;++d)u[d].lines.length||Be(u[d],"hide");if(f)for(var m=0;m<f.length;++m)f[m].lines.length&&Be(f[m],"unhide");i.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Be(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function vn(e,t){if(e.curOp)return t();ri(e);try{return t()}finally{ii(e)}}function Pt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ri(e);try{return t.apply(e,arguments)}finally{ii(e)}}}function tn(e){return function(){if(this.curOp)return e.apply(this,arguments);ri(this);try{return e.apply(this,arguments)}finally{ii(this)}}}function Ot(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ri(t);try{return e.apply(this,arguments)}finally{ii(t)}}}function ss(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,Qe(tp,e))}function tp(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,r=Xi(e,t.highlightFrontier),a=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(u){if(r.line>=e.display.viewFrom){var f=u.styles,d=u.text.length>e.options.maxHighlightLength?Vt(t.mode,r.state):null,m=Xl(e,u,r,!0);d&&(r.state=d),u.styles=m.styles;var v=u.styleClasses,A=m.classes;A?u.styleClasses=A:v&&(u.styleClasses=null);for(var N=!f||f.length!=u.styles.length||v!=A&&(!v||!A||v.bgClass!=A.bgClass||v.textClass!=A.textClass),q=0;!N&&q<f.length;++q)N=f[q]!=u.styles[q];N&&a.push(r.line),u.stateAfter=r.save(),r.nextLine()}else u.text.length<=e.options.maxHighlightLength&&Vo(e,u.text,r),u.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>i)return ss(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),a.length&&vn(e,function(){for(var u=0;u<a.length;u++)Er(e,a[u],"text")})}}var no=function(e,t,i){var r=e.display;this.viewport=t,this.visible=eo(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Jr(e),this.force=i,this.dims=ca(e),this.events=[]};no.prototype.signal=function(e,t){xt(e,t)&&this.events.push(arguments)},no.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Be.apply(null,this.events[e])};function np(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Zn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Zn(e)+"px",t.scrollbarsClipped=!0)}function rp(e){if(e.hasFocus())return null;var t=le();if(!t||!Q(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&Q(e.display.lineDiv,r.anchorNode)&&(i.anchorNode=r.anchorNode,i.anchorOffset=r.anchorOffset,i.focusNode=r.focusNode,i.focusOffset=r.focusOffset)}return i}function ip(e){if(!(!e||!e.activeElt||e.activeElt==le())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Q(document.body,e.anchorNode)&&Q(document.body,e.focusNode))){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function ya(e,t){var i=e.display,r=e.doc;if(t.editorIsHidden)return Nr(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&Pu(e)==0)return!1;zu(e)&&(Nr(e),t.dims=ca(e));var a=r.first+r.size,u=Math.max(t.visible.from-e.options.viewportMargin,r.first),f=Math.min(a,t.visible.to+e.options.viewportMargin);i.viewFrom<u&&u-i.viewFrom<20&&(u=Math.max(r.first,i.viewFrom)),i.viewTo>f&&i.viewTo-f<20&&(f=Math.min(a,i.viewTo)),mr&&(u=Zo(e.doc,u),f=lu(e.doc,f));var d=u!=i.viewFrom||f!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;qh(e,u,f),i.viewOffset=gr(Ie(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var m=Pu(e);if(!d&&m==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var v=rp(e);return m>4&&(i.lineDiv.style.display="none"),sp(e,i.updateLineNumbers,t.dims),m>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,ip(v),Te(i.cursorDiv),Te(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,d&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,ss(e,400)),i.updateLineNumbers=null,!0}function Hu(e,t){for(var i=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Jr(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+ra(e.display)-ia(e),i.top)}),t.visible=eo(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=eo(e.display,e.doc,i));if(!ya(e,t))break;Zs(e);var a=rs(e);es(e),Si(e,a),xa(e,a),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ba(e,t){var i=new no(e,t);if(ya(e,i)){Zs(e),Hu(e,i);var r=rs(e);es(e),Si(e,r),xa(e,r),i.finish()}}function sp(e,t,i){var r=e.display,a=e.options.lineNumbers,u=r.lineDiv,f=u.firstChild;function d(Y){var se=Y.nextSibling;return y&&B&&e.display.currentWheelTarget==Y?Y.style.display="none":Y.parentNode.removeChild(Y),se}for(var m=r.view,v=r.viewFrom,A=0;A<m.length;A++){var N=m[A];if(!N.hidden)if(!N.node||N.node.parentNode!=u){var q=Ph(e,N,v,i);u.insertBefore(q,f)}else{for(;f!=N.node;)f=d(f);var j=a&&t!=null&&t<=v&&N.lineNumber;N.changes&&(z(N.changes,"gutter")>-1&&(j=!1),pu(e,N,v,i)),j&&(Te(N.lineNumber),N.lineNumber.appendChild(document.createTextNode(Yr(e.options,v)))),f=N.node.nextSibling}v+=N.size}for(;f;)f=d(f)}function wa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Nt(e,"gutterChanged",e)}function xa(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Zn(e)+"px"}function qu(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=fa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,a=t.gutters.offsetWidth,u=r+"px",f=0;f<i.length;f++)if(!i[f].hidden){e.options.fixedGutter&&(i[f].gutter&&(i[f].gutter.style.left=u),i[f].gutterBackground&&(i[f].gutterBackground.style.left=u));var d=i[f].alignable;if(d)for(var m=0;m<d.length;m++)d[m].style.left=u}e.options.fixedGutter&&(t.gutters.style.left=r+a+"px")}}function zu(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=Yr(e.options,t.first+t.size-1),r=e.display;if(i.length!=r.lineNumChars){var a=r.measure.appendChild(K("div",[K("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),u=a.firstChild.offsetWidth,f=a.offsetWidth-u;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(u,r.lineGutter.offsetWidth-f)+1,r.lineNumWidth=r.lineNumInnerWidth+f,r.lineNumChars=r.lineNumInnerWidth?i.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",wa(e.display),!0}return!1}function _a(e,t){for(var i=[],r=!1,a=0;a<e.length;a++){var u=e[a],f=null;if(typeof u!="string"&&(f=u.style,u=u.className),u=="CodeMirror-linenumbers")if(t)r=!0;else continue;i.push({className:u,style:f})}return t&&!r&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function $u(e){var t=e.gutters,i=e.gutterSpecs;Te(t),e.lineGutter=null;for(var r=0;r<i.length;++r){var a=i[r],u=a.className,f=a.style,d=t.appendChild(K("div",null,"CodeMirror-gutter "+u));f&&(d.style.cssText=f),u=="CodeMirror-linenumbers"&&(e.lineGutter=d,d.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",wa(e)}function os(e){$u(e.display),an(e),qu(e)}function op(e,t,i,r){var a=this;this.input=i,a.scrollbarFiller=K("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=K("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=b("div",null,"CodeMirror-code"),a.selectionDiv=K("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=K("div",null,"CodeMirror-cursors"),a.measure=K("div",null,"CodeMirror-measure"),a.lineMeasure=K("div",null,"CodeMirror-measure"),a.lineSpace=b("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var u=b("div",[a.lineSpace],"CodeMirror-lines");a.mover=K("div",[u],null,"position: relative"),a.sizer=K("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=K("div",null,null,"position: absolute; height: "+V+"px; width: 1px;"),a.gutters=K("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=K("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=K("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),a.wrapper.setAttribute("translate","no"),w&&C<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!y&&!(p&&M)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=_a(r.gutters,r.lineNumbers),$u(a),i.init(a)}var ro=0,kr=null;w?kr=-.53:p?kr=15:L?kr=-.7:F&&(kr=-1/3);function Uu(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function ap(e){var t=Uu(e);return t.x*=kr,t.y*=kr,t}function Gu(e,t){var i=Uu(t),r=i.x,a=i.y,u=kr;t.deltaMode===0&&(r=t.deltaX,a=t.deltaY,u=1);var f=e.display,d=f.scroller,m=d.scrollWidth>d.clientWidth,v=d.scrollHeight>d.clientHeight;if(r&&m||a&&v){if(a&&B&&y){e:for(var A=t.target,N=f.view;A!=d;A=A.parentNode)for(var q=0;q<N.length;q++)if(N[q].node==A){e.display.currentWheelTarget=A;break e}}if(r&&!p&&!T&&u!=null){a&&v&&ns(e,Math.max(0,d.scrollTop+a*u)),ti(e,Math.max(0,d.scrollLeft+r*u)),(!a||a&&v)&&St(t),f.wheelStartX=null;return}if(a&&u!=null){var j=a*u,Y=e.doc.scrollTop,se=Y+f.wrapper.clientHeight;j<0?Y=Math.max(0,Y+j-50):se=Math.min(e.doc.height,se+j+50),ba(e,{top:Y,bottom:se})}ro<20&&t.deltaMode!==0&&(f.wheelStartX==null?(f.wheelStartX=d.scrollLeft,f.wheelStartY=d.scrollTop,f.wheelDX=r,f.wheelDY=a,setTimeout(function(){if(f.wheelStartX!=null){var me=d.scrollLeft-f.wheelStartX,be=d.scrollTop-f.wheelStartY,_e=be&&f.wheelDY&&be/f.wheelDY||me&&f.wheelDX&&me/f.wheelDX;f.wheelStartX=f.wheelStartY=null,_e&&(kr=(kr*ro+_e)/(ro+1),++ro)}},200)):(f.wheelDX+=r,f.wheelDY+=a))}}var Tn=function(e,t){this.ranges=e,this.primIndex=t};Tn.prototype.primary=function(){return this.ranges[this.primIndex]},Tn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],r=e.ranges[t];if(!P(i.anchor,r.anchor)||!P(i.head,r.head))return!1}return!0},Tn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new st(ne(this.ranges[t].anchor),ne(this.ranges[t].head));return new Tn(e,this.primIndex)},Tn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Tn.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var r=this.ranges[i];if(k(t,r.from())>=0&&k(e,r.to())<=0)return i}return-1};var st=function(e,t){this.anchor=e,this.head=t};st.prototype.from=function(){return je(this.anchor,this.head)},st.prototype.to=function(){return he(this.anchor,this.head)},st.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Bn(e,t,i){var r=e&&e.options.selectionsMayTouch,a=t[i];t.sort(function(q,j){return k(q.from(),j.from())}),i=z(t,a);for(var u=1;u<t.length;u++){var f=t[u],d=t[u-1],m=k(d.to(),f.from());if(r&&!f.empty()?m>0:m>=0){var v=je(d.from(),f.from()),A=he(d.to(),f.to()),N=d.empty()?f.from()==f.head:d.from()==d.head;u<=i&&--i,t.splice(--u,2,new st(N?A:v,N?v:A))}}return new Tn(t,i)}function Pr(e,t){return new Tn([new st(e,t||e)],0)}function Or(e){return e.text?ce(e.from.line+e.text.length-1,Le(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ku(e,t){if(k(e,t.from)<0)return e;if(k(e,t.to)<=0)return Or(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Or(t).ch-t.to.ch),ce(i,r)}function Sa(e,t){for(var i=[],r=0;r<e.sel.ranges.length;r++){var a=e.sel.ranges[r];i.push(new st(Ku(a.anchor,t),Ku(a.head,t)))}return Bn(e.cm,i,e.sel.primIndex)}function Xu(e,t,i){return e.line==t.line?ce(i.line,e.ch-t.ch+i.ch):ce(i.line+(e.line-t.line),e.ch)}function lp(e,t,i){for(var r=[],a=ce(e.first,0),u=a,f=0;f<t.length;f++){var d=t[f],m=Xu(d.from,a,u),v=Xu(Or(d),a,u);if(a=d.to,u=v,i=="around"){var A=e.sel.ranges[f],N=k(A.head,A.anchor)<0;r[f]=new st(N?v:m,N?m:v)}else r[f]=new st(m,m)}return new Tn(r,e.sel.primIndex)}function Ta(e){e.doc.mode=Jn(e.options,e.doc.modeOption),as(e)}function as(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ss(e,100),e.state.modeGen++,e.curOp&&an(e)}function Vu(e,t){return t.from.ch==0&&t.to.ch==0&&Le(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ca(e,t,i,r){function a(_e){return i?i[_e]:null}function u(_e,we,Ce){gh(_e,we,Ce,r),Nt(_e,"change",_e,t)}function f(_e,we){for(var Ce=[],Oe=_e;Oe<we;++Oe)Ce.push(new vi(v[Oe],a(Oe),r));return Ce}var d=t.from,m=t.to,v=t.text,A=Ie(e,d.line),N=Ie(e,m.line),q=Le(v),j=a(v.length-1),Y=m.line-d.line;if(t.full)e.insert(0,f(0,v.length)),e.remove(v.length,e.size-v.length);else if(Vu(e,t)){var se=f(0,v.length-1);u(N,N.text,j),Y&&e.remove(d.line,Y),se.length&&e.insert(d.line,se)}else if(A==N)if(v.length==1)u(A,A.text.slice(0,d.ch)+q+A.text.slice(m.ch),j);else{var me=f(1,v.length-1);me.push(new vi(q+A.text.slice(m.ch),j,r)),u(A,A.text.slice(0,d.ch)+v[0],a(0)),e.insert(d.line+1,me)}else if(v.length==1)u(A,A.text.slice(0,d.ch)+v[0]+N.text.slice(m.ch),a(0)),e.remove(d.line+1,Y);else{u(A,A.text.slice(0,d.ch)+v[0],a(0)),u(N,q+N.text.slice(m.ch),j);var be=f(1,v.length-1);Y>1&&e.remove(d.line+1,Y-1),e.insert(d.line+1,be)}Nt(e,"change",e,t)}function Dr(e,t,i){function r(a,u,f){if(a.linked)for(var d=0;d<a.linked.length;++d){var m=a.linked[d];if(m.doc!=u){var v=f&&m.sharedHist;i&&!v||(t(m.doc,v),r(m.doc,a,v))}}}r(e,null,!0)}function Yu(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ha(e),Ta(e),Ju(e),e.options.direction=t.direction,e.options.lineWrapping||ta(e),e.options.mode=t.modeOption,an(e)}function Ju(e){(e.doc.direction=="rtl"?Pe:ke)(e.display.lineDiv,"CodeMirror-rtl")}function up(e){vn(e,function(){Ju(e),an(e)})}function io(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Ia(e,t){var i={from:ne(t.from),to:Or(t),text:Nn(e,t.from,t.to)};return e1(e,i,t.from.line,t.to.line+1),Dr(e,function(r){return e1(r,i,t.from.line,t.to.line+1)},!0),i}function Qu(e){for(;e.length;){var t=Le(e);if(t.ranges)e.pop();else break}}function cp(e,t){if(t)return Qu(e.done),Le(e.done);if(e.done.length&&!Le(e.done).ranges)return Le(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Le(e.done)}function Zu(e,t,i,r){var a=e.history;a.undone.length=0;var u=+new Date,f,d;if((a.lastOp==r||a.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&a.lastModTime>u-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(f=cp(a,a.lastOp==r)))d=Le(f.changes),k(t.from,t.to)==0&&k(t.from,d.to)==0?d.to=Or(t):f.changes.push(Ia(e,t));else{var m=Le(a.done);for((!m||!m.ranges)&&so(e.sel,a.done),f={changes:[Ia(e,t)],generation:a.generation},a.done.push(f);a.done.length>a.undoDepth;)a.done.shift(),a.done[0].ranges||a.done.shift()}a.done.push(i),a.generation=++a.maxGeneration,a.lastModTime=a.lastSelTime=u,a.lastOp=a.lastSelOp=r,a.lastOrigin=a.lastSelOrigin=t.origin,d||Be(e,"historyAdded")}function fp(e,t,i,r){var a=t.charAt(0);return a=="*"||a=="+"&&i.ranges.length==r.ranges.length&&i.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function hp(e,t,i,r){var a=e.history,u=r&&r.origin;i==a.lastSelOp||u&&a.lastSelOrigin==u&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==u||fp(e,u,Le(a.done),t))?a.done[a.done.length-1]=t:so(t,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=u,a.lastSelOp=i,r&&r.clearRedo!==!1&&Qu(a.undone)}function so(e,t){var i=Le(t);i&&i.ranges&&i.equals(e)||t.push(e)}function e1(e,t,i,r){var a=t["spans_"+e.id],u=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,r),function(f){f.markedSpans&&((a||(a=t["spans_"+e.id]={}))[u]=f.markedSpans),++u})}function pp(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function dp(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var r=[],a=0;a<t.text.length;++a)r.push(pp(i[a]));return r}function t1(e,t){var i=dp(e,t),r=Jo(e,t);if(!i)return r;if(!r)return i;for(var a=0;a<i.length;++a){var u=i[a],f=r[a];if(u&&f){e:for(var d=0;d<f.length;++d){for(var m=f[d],v=0;v<u.length;++v)if(u[v].marker==m.marker)continue e;u.push(m)}}else f&&(i[a]=f)}return i}function Ti(e,t,i){for(var r=[],a=0;a<e.length;++a){var u=e[a];if(u.ranges){r.push(i?Tn.prototype.deepCopy.call(u):u);continue}var f=u.changes,d=[];r.push({changes:d});for(var m=0;m<f.length;++m){var v=f[m],A=void 0;if(d.push({from:v.from,to:v.to,text:v.text}),t)for(var N in v)(A=N.match(/^spans_(\d+)$/))&&z(t,Number(A[1]))>-1&&(Le(d)[N]=v[N],delete v[N])}}return r}function Aa(e,t,i,r){if(r){var a=e.anchor;if(i){var u=k(t,a)<0;u!=k(i,a)<0?(a=t,t=i):u!=k(t,i)<0&&(t=i)}return new st(a,t)}else return new st(i||t,t)}function oo(e,t,i,r,a){a==null&&(a=e.cm&&(e.cm.display.shift||e.extend)),Jt(e,new Tn([Aa(e.sel.primary(),t,i,a)],0),r)}function n1(e,t,i){for(var r=[],a=e.cm&&(e.cm.display.shift||e.extend),u=0;u<e.sel.ranges.length;u++)r[u]=Aa(e.sel.ranges[u],t[u],null,a);var f=Bn(e.cm,r,e.sel.primIndex);Jt(e,f,i)}function La(e,t,i,r){var a=e.sel.ranges.slice(0);a[t]=i,Jt(e,Bn(e.cm,a,e.sel.primIndex),r)}function r1(e,t,i,r){Jt(e,Pr(t,i),r)}function mp(e,t,i){var r={ranges:t.ranges,update:function(a){this.ranges=[];for(var u=0;u<a.length;u++)this.ranges[u]=new st(Se(e,a[u].anchor),Se(e,a[u].head))},origin:i&&i.origin};return Be(e,"beforeSelectionChange",e,r),e.cm&&Be(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Bn(e.cm,r.ranges,r.ranges.length-1):t}function i1(e,t,i){var r=e.history.done,a=Le(r);a&&a.ranges?(r[r.length-1]=t,ao(e,t,i)):Jt(e,t,i)}function Jt(e,t,i){ao(e,t,i),hp(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function ao(e,t,i){(xt(e,"beforeSelectionChange")||e.cm&&xt(e.cm,"beforeSelectionChange"))&&(t=mp(e,t,i));var r=i&&i.bias||(k(t.primary().head,e.sel.primary().head)<0?-1:1);s1(e,a1(e,t,r,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&_i(e.cm)}function s1(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Xn(e.cm)),Nt(e,"cursorActivity",e))}function o1(e){s1(e,a1(e,e.sel,null,!1))}function a1(e,t,i,r){for(var a,u=0;u<t.ranges.length;u++){var f=t.ranges[u],d=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[u],m=lo(e,f.anchor,d&&d.anchor,i,r),v=lo(e,f.head,d&&d.head,i,r);(a||m!=f.anchor||v!=f.head)&&(a||(a=t.ranges.slice(0,u)),a[u]=new st(m,v))}return a?Bn(e.cm,a,t.primIndex):t}function Ci(e,t,i,r,a){var u=Ie(e,t.line);if(u.markedSpans)for(var f=0;f<u.markedSpans.length;++f){var d=u.markedSpans[f],m=d.marker,v="selectLeft"in m?!m.selectLeft:m.inclusiveLeft,A="selectRight"in m?!m.selectRight:m.inclusiveRight;if((d.from==null||(v?d.from<=t.ch:d.from<t.ch))&&(d.to==null||(A?d.to>=t.ch:d.to>t.ch))){if(a&&(Be(m,"beforeCursorEnter"),m.explicitlyCleared))if(u.markedSpans){--f;continue}else break;if(!m.atomic)continue;if(i){var N=m.find(r<0?1:-1),q=void 0;if((r<0?A:v)&&(N=l1(e,N,-r,N&&N.line==t.line?u:null)),N&&N.line==t.line&&(q=k(N,i))&&(r<0?q<0:q>0))return Ci(e,N,t,r,a)}var j=m.find(r<0?-1:1);return(r<0?v:A)&&(j=l1(e,j,r,j.line==t.line?u:null)),j?Ci(e,j,t,r,a):null}}return t}function lo(e,t,i,r,a){var u=r||1,f=Ci(e,t,i,u,a)||!a&&Ci(e,t,i,u,!0)||Ci(e,t,i,-u,a)||!a&&Ci(e,t,i,-u,!0);return f||(e.cantEdit=!0,ce(e.first,0))}function l1(e,t,i,r){return i<0&&t.ch==0?t.line>e.first?Se(e,ce(t.line-1)):null:i>0&&t.ch==(r||Ie(e,t.line)).text.length?t.line<e.first+e.size-1?ce(t.line+1,0):null:new ce(t.line,t.ch+i)}function u1(e){e.setSelection(ce(e.firstLine(),0),ce(e.lastLine()),fe)}function c1(e,t,i){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return i&&(r.update=function(a,u,f,d){a&&(r.from=Se(e,a)),u&&(r.to=Se(e,u)),f&&(r.text=f),d!==void 0&&(r.origin=d)}),Be(e,"beforeChange",e,r),e.cm&&Be(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Ii(e,t,i){if(e.cm){if(!e.cm.curOp)return Pt(e.cm,Ii)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((xt(e,"beforeChange")||e.cm&&xt(e.cm,"beforeChange"))&&(t=c1(e,t,!0),!t))){var r=tu&&!i&&hh(e,t.from,t.to);if(r)for(var a=r.length-1;a>=0;--a)f1(e,{from:r[a].from,to:r[a].to,text:a?[""]:t.text,origin:t.origin});else f1(e,t)}}function f1(e,t){if(!(t.text.length==1&&t.text[0]==""&&k(t.from,t.to)==0)){var i=Sa(e,t);Zu(e,t,i,e.cm?e.cm.curOp.id:NaN),ls(e,t,i,Jo(e,t));var r=[];Dr(e,function(a,u){!u&&z(r,a.history)==-1&&(m1(a.history,t),r.push(a.history)),ls(a,t,null,Jo(a,t))})}}function uo(e,t,i){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!i)){for(var a=e.history,u,f=e.sel,d=t=="undo"?a.done:a.undone,m=t=="undo"?a.undone:a.done,v=0;v<d.length&&(u=d[v],!(i?u.ranges&&!u.equals(e.sel):!u.ranges));v++);if(v!=d.length){for(a.lastOrigin=a.lastSelOrigin=null;;)if(u=d.pop(),u.ranges){if(so(u,m),i&&!u.equals(e.sel)){Jt(e,u,{clearRedo:!1});return}f=u}else if(r){d.push(u);return}else break;var A=[];so(f,m),m.push({changes:A,generation:a.generation}),a.generation=u.generation||++a.maxGeneration;for(var N=xt(e,"beforeChange")||e.cm&&xt(e.cm,"beforeChange"),q=function(se){var me=u.changes[se];if(me.origin=t,N&&!c1(e,me,!1))return d.length=0,{};A.push(Ia(e,me));var be=se?Sa(e,me):Le(d);ls(e,me,be,t1(e,me)),!se&&e.cm&&e.cm.scrollIntoView({from:me.from,to:Or(me)});var _e=[];Dr(e,function(we,Ce){!Ce&&z(_e,we.history)==-1&&(m1(we.history,me),_e.push(we.history)),ls(we,me,null,t1(we,me))})},j=u.changes.length-1;j>=0;--j){var Y=q(j);if(Y)return Y.v}}}}function h1(e,t){if(t!=0&&(e.first+=t,e.sel=new Tn(ze(e.sel.ranges,function(a){return new st(ce(a.anchor.line+t,a.anchor.ch),ce(a.head.line+t,a.head.ch))}),e.sel.primIndex),e.cm)){an(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,r=i.viewFrom;r<i.viewTo;r++)Er(e.cm,r,"gutter")}}function ls(e,t,i,r){if(e.cm&&!e.cm.curOp)return Pt(e.cm,ls)(e,t,i,r);if(t.to.line<e.first){h1(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var a=t.text.length-1-(e.first-t.from.line);h1(e,a),t={from:ce(e.first,0),to:ce(t.to.line+a,t.to.ch),text:[Le(t.text)],origin:t.origin}}var u=e.lastLine();t.to.line>u&&(t={from:t.from,to:ce(u,Ie(e,u).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Nn(e,t.from,t.to),i||(i=Sa(e,t)),e.cm?gp(e.cm,t,r):Ca(e,t,r),ao(e,i,fe),e.cantEdit&&lo(e,ce(e.firstLine(),0))&&(e.cantEdit=!1)}}function gp(e,t,i){var r=e.doc,a=e.display,u=t.from,f=t.to,d=!1,m=u.line;e.options.lineWrapping||(m=rt(Mn(Ie(r,u.line))),r.iter(m,f.line+1,function(j){if(j==a.maxLine)return d=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Xn(e),Ca(r,t,i,Nu(e)),e.options.lineWrapping||(r.iter(m,u.line+t.text.length,function(j){var Y=Gs(j);Y>a.maxLineLength&&(a.maxLine=j,a.maxLineLength=Y,a.maxLineChanged=!0,d=!1)}),d&&(e.curOp.updateMaxLine=!0)),sh(r,u.line),ss(e,400);var v=t.text.length-(f.line-u.line)-1;t.full?an(e):u.line==f.line&&t.text.length==1&&!Vu(e.doc,t)?Er(e,u.line,"text"):an(e,u.line,f.line+1,v);var A=xt(e,"changes"),N=xt(e,"change");if(N||A){var q={from:u,to:f,text:t.text,removed:t.removed,origin:t.origin};N&&Nt(e,"change",e,q),A&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(q)}e.display.selForContextMenu=null}function Ai(e,t,i,r,a){var u;r||(r=i),k(r,i)<0&&(u=[r,i],i=u[0],r=u[1]),typeof t=="string"&&(t=e.splitLines(t)),Ii(e,{from:i,to:r,text:t,origin:a})}function p1(e,t,i,r){i<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function d1(e,t,i,r){for(var a=0;a<e.length;++a){var u=e[a],f=!0;if(u.ranges){u.copied||(u=e[a]=u.deepCopy(),u.copied=!0);for(var d=0;d<u.ranges.length;d++)p1(u.ranges[d].anchor,t,i,r),p1(u.ranges[d].head,t,i,r);continue}for(var m=0;m<u.changes.length;++m){var v=u.changes[m];if(i<v.from.line)v.from=ce(v.from.line+r,v.from.ch),v.to=ce(v.to.line+r,v.to.ch);else if(t<=v.to.line){f=!1;break}}f||(e.splice(0,a+1),a=0)}}function m1(e,t){var i=t.from.line,r=t.to.line,a=t.text.length-(r-i)-1;d1(e.done,i,r,a),d1(e.undone,i,r,a)}function us(e,t,i,r){var a=t,u=t;return typeof t=="number"?u=Ie(e,Ze(e,t)):a=rt(t),a==null?null:(r(u,a)&&e.cm&&Er(e.cm,a,i),u)}function cs(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}cs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,r=e+t;i<r;++i){var a=this.lines[i];this.height-=a.height,vh(a),Nt(a,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,i){for(var r=e+t;e<r;++e)if(i(this.lines[e]))return!0}};function fs(e){this.children=e;for(var t=0,i=0,r=0;r<e.length;++r){var a=e[r];t+=a.chunkSize(),i+=a.height,a.parent=this}this.size=t,this.height=i,this.parent=null}fs.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var r=this.children[i],a=r.chunkSize();if(e<a){var u=Math.min(t,a-e),f=r.height;if(r.removeInner(e,u),this.height-=f-r.height,a==u&&(this.children.splice(i--,1),r.parent=null),(t-=u)==0)break;e=0}else e-=a}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof cs))){var d=[];this.collapse(d),this.children=[new cs(d)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var r=0;r<this.children.length;++r){var a=this.children[r],u=a.chunkSize();if(e<=u){if(a.insertInner(e,t,i),a.lines&&a.lines.length>50){for(var f=a.lines.length%25+25,d=f;d<a.lines.length;){var m=new cs(a.lines.slice(d,d+=25));a.height-=m.height,this.children.splice(++r,0,m),m.parent=this}a.lines=a.lines.slice(0,f),this.maybeSpill()}break}e-=u}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new fs(t);if(e.parent){e.size-=i.size,e.height-=i.height;var a=z(e.parent.children,e);e.parent.children.splice(a+1,0,i)}else{var r=new fs(e.children);r.parent=e,e.children=[r,i],e=r}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var r=0;r<this.children.length;++r){var a=this.children[r],u=a.chunkSize();if(e<u){var f=Math.min(t,u-e);if(a.iterN(e,f,i))return!0;if((t-=f)==0)break;e=0}else e-=u}}};var hs=function(e,t,i){if(i)for(var r in i)i.hasOwnProperty(r)&&(this[r]=i[r]);this.doc=e,this.node=t};hs.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,r=rt(i);if(!(r==null||!t)){for(var a=0;a<t.length;++a)t[a]==this&&t.splice(a--,1);t.length||(i.widgets=null);var u=Qi(this);en(i,Math.max(0,i.height-u)),e&&(vn(e,function(){g1(e,i,-u),Er(e,r,"widget")}),Nt(e,"lineWidgetCleared",e,this,r))}},hs.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,r=this.line;this.height=null;var a=Qi(this)-t;a&&(Lr(this.doc,r)||en(r,r.height+a),i&&vn(i,function(){i.curOp.forceUpdate=!0,g1(i,r,a),Nt(i,"lineWidgetChanged",i,e,rt(r))}))},mn(hs);function g1(e,t,i){gr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ka(e,i)}function vp(e,t,i,r){var a=new hs(e,i,r),u=e.cm;return u&&a.noHScroll&&(u.display.alignWidgets=!0),us(e,t,"widget",function(f){var d=f.widgets||(f.widgets=[]);if(a.insertAt==null?d.push(a):d.splice(Math.min(d.length,Math.max(0,a.insertAt)),0,a),a.line=f,u&&!Lr(e,f)){var m=gr(f)<e.scrollTop;en(f,f.height+Qi(a)),m&&ka(u,a.height),u.curOp.forceUpdate=!0}return!0}),u&&Nt(u,"lineWidgetAdded",u,a,typeof t=="number"?t:rt(t)),a}var v1=0,Rr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++v1};Rr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ri(e),xt(this,"clear")){var i=this.find();i&&Nt(this,"clear",i.from,i.to)}for(var r=null,a=null,u=0;u<this.lines.length;++u){var f=this.lines[u],d=Vi(f.markedSpans,this);e&&!this.collapsed?Er(e,rt(f),"text"):e&&(d.to!=null&&(a=rt(f)),d.from!=null&&(r=rt(f))),f.markedSpans=lh(f.markedSpans,d),d.from==null&&this.collapsed&&!Lr(this.doc,f)&&e&&en(f,bi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var m=0;m<this.lines.length;++m){var v=Mn(this.lines[m]),A=Gs(v);A>e.display.maxLineLength&&(e.display.maxLine=v,e.display.maxLineLength=A,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&an(e,r,a+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&o1(e.doc)),e&&Nt(e,"markerCleared",e,this,r,a),t&&ii(e),this.parent&&this.parent.clear()}},Rr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,r,a=0;a<this.lines.length;++a){var u=this.lines[a],f=Vi(u.markedSpans,this);if(f.from!=null&&(i=ce(t?u:rt(u),f.from),e==-1))return i;if(f.to!=null&&(r=ce(t?u:rt(u),f.to),e==1))return r}return i&&{from:i,to:r}},Rr.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,r=this.doc.cm;!t||!r||vn(r,function(){var a=t.line,u=rt(t.line),f=sa(r,u);if(f&&(_u(f),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Lr(i.doc,a)&&i.height!=null){var d=i.height;i.height=null;var m=Qi(i)-d;m&&en(a,a.height+m)}Nt(r,"markerChanged",r,e)})},Rr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||z(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Rr.prototype.detachLine=function(e){if(this.lines.splice(z(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},mn(Rr);function Li(e,t,i,r,a){if(r&&r.shared)return kp(e,t,i,r,a);if(e.cm&&!e.cm.curOp)return Pt(e.cm,Li)(e,t,i,r,a);var u=new Rr(e,a),f=k(t,i);if(r&&He(r,u,!1),f>0||f==0&&u.clearWhenEmpty!==!1)return u;if(u.replacedWith&&(u.collapsed=!0,u.widgetNode=b("span",[u.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||u.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(u.widgetNode.insertLeft=!0)),u.collapsed){if(au(e,t.line,t,i,u)||t.line!=i.line&&au(e,i.line,t,i,u))throw new Error("Inserting collapsed marker partially overlapping an existing one");ah()}u.addToHistory&&Zu(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var d=t.line,m=e.cm,v;if(e.iter(d,i.line+1,function(N){m&&u.collapsed&&!m.options.lineWrapping&&Mn(N)==m.display.maxLine&&(v=!0),u.collapsed&&d!=t.line&&en(N,0),uh(N,new qs(u,d==t.line?t.ch:null,d==i.line?i.ch:null),e.cm&&e.cm.curOp),++d}),u.collapsed&&e.iter(t.line,i.line+1,function(N){Lr(e,N)&&en(N,0)}),u.clearOnEnter&&Ne(u,"beforeCursorEnter",function(){return u.clear()}),u.readOnly&&(oh(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),u.collapsed&&(u.id=++v1,u.atomic=!0),m){if(v&&(m.curOp.updateMaxLine=!0),u.collapsed)an(m,t.line,i.line+1);else if(u.className||u.startStyle||u.endStyle||u.css||u.attributes||u.title)for(var A=t.line;A<=i.line;A++)Er(m,A,"text");u.atomic&&o1(m.doc),Nt(m,"markerAdded",m,u)}return u}var ps=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};ps.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Nt(this,"clear")}},ps.prototype.find=function(e,t){return this.primary.find(e,t)},mn(ps);function kp(e,t,i,r,a){r=He(r),r.shared=!1;var u=[Li(e,t,i,r,a)],f=u[0],d=r.widgetNode;return Dr(e,function(m){d&&(r.widgetNode=d.cloneNode(!0)),u.push(Li(m,Se(m,t),Se(m,i),r,a));for(var v=0;v<m.linked.length;++v)if(m.linked[v].isParent)return;f=Le(u)}),new ps(u,f)}function k1(e){return e.findMarks(ce(e.first,0),e.clipPos(ce(e.lastLine())),function(t){return t.parent})}function yp(e,t){for(var i=0;i<t.length;i++){var r=t[i],a=r.find(),u=e.clipPos(a.from),f=e.clipPos(a.to);if(k(u,f)){var d=Li(e,u,f,r.primary,r.primary.type);r.markers.push(d),d.parent=r}}}function bp(e){for(var t=function(r){var a=e[r],u=[a.primary.doc];Dr(a.primary.doc,function(m){return u.push(m)});for(var f=0;f<a.markers.length;f++){var d=a.markers[f];z(u,d.doc)==-1&&(d.parent=null,a.markers.splice(f--,1))}},i=0;i<e.length;i++)t(i)}var wp=0,ln=function(e,t,i,r,a){if(!(this instanceof ln))return new ln(e,t,i,r,a);i==null&&(i=0),fs.call(this,[new cs([new vi("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var u=ce(i,0);this.sel=Pr(u),this.history=new io(null),this.id=++wp,this.modeOption=t,this.lineSep=r,this.direction=a=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ca(this,{from:u,to:u,text:e}),Jt(this,Pr(u),fe)};ln.prototype=ut(fs.prototype,{constructor:ln,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,r=0;r<t.length;++r)i+=t[r].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Vr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Ot(function(e){var t=ce(this.first,0),i=this.first+this.size-1;Ii(this,{from:t,to:ce(i,Ie(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ts(this.cm,0,0),Jt(this,Pr(t),fe)}),replaceRange:function(e,t,i,r){t=Se(this,t),i=i?Se(this,i):t,Ai(this,e,t,i,r)},getRange:function(e,t,i){var r=Nn(this,Se(this,e),Se(this,t));return i===!1?r:i===""?r.join(""):r.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(dr(this,e))return Ie(this,e)},getLineNumber:function(e){return rt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ie(this,e)),Mn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Se(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ot(function(e,t,i){r1(this,Se(this,typeof e=="number"?ce(e,t||0):e),null,i)}),setSelection:Ot(function(e,t,i){r1(this,Se(this,e),Se(this,t||e),i)}),extendSelection:Ot(function(e,t,i){oo(this,Se(this,e),t&&Se(this,t),i)}),extendSelections:Ot(function(e,t){n1(this,Sn(this,e),t)}),extendSelectionsBy:Ot(function(e,t){var i=ze(this.sel.ranges,e);n1(this,Sn(this,i),t)}),setSelections:Ot(function(e,t,i){if(e.length){for(var r=[],a=0;a<e.length;a++)r[a]=new st(Se(this,e[a].anchor),Se(this,e[a].head||e[a].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Jt(this,Bn(this.cm,r,t),i)}}),addSelection:Ot(function(e,t,i){var r=this.sel.ranges.slice(0);r.push(new st(Se(this,e),Se(this,t||e))),Jt(this,Bn(this.cm,r,r.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,r=0;r<t.length;r++){var a=Nn(this,t[r].from(),t[r].to());i=i?i.concat(a):a}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,r=0;r<i.length;r++){var a=Nn(this,i[r].from(),i[r].to());e!==!1&&(a=a.join(e||this.lineSeparator())),t[r]=a}return t},replaceSelection:function(e,t,i){for(var r=[],a=0;a<this.sel.ranges.length;a++)r[a]=e;this.replaceSelections(r,t,i||"+input")},replaceSelections:Ot(function(e,t,i){for(var r=[],a=this.sel,u=0;u<a.ranges.length;u++){var f=a.ranges[u];r[u]={from:f.from(),to:f.to(),text:this.splitLines(e[u]),origin:i}}for(var d=t&&t!="end"&&lp(this,r,t),m=r.length-1;m>=0;m--)Ii(this,r[m]);d?i1(this,d):this.cm&&_i(this.cm)}),undo:Ot(function(){uo(this,"undo")}),redo:Ot(function(){uo(this,"redo")}),undoSelection:Ot(function(){uo(this,"undo",!0)}),redoSelection:Ot(function(){uo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var a=0;a<e.undone.length;a++)e.undone[a].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new io(this.history),Dr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ti(this.history.done),undone:Ti(this.history.undone)}},setHistory:function(e){var t=this.history=new io(this.history);t.done=Ti(e.done.slice(0),null,!0),t.undone=Ti(e.undone.slice(0),null,!0)},setGutterMarker:Ot(function(e,t,i){return us(this,e,"gutter",function(r){var a=r.gutterMarkers||(r.gutterMarkers={});return a[t]=i,!i&&pe(a)&&(r.gutterMarkers=null),!0})}),clearGutter:Ot(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&us(t,i,"gutter",function(){return i.gutterMarkers[e]=null,pe(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!dr(this,e)||(t=e,e=Ie(this,e),!e))return null}else if(t=rt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Ot(function(e,t,i){return us(this,e,t=="gutter"?"gutter":"class",function(r){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[a])r[a]=i;else{if(ge(i).test(r[a]))return!1;r[a]+=" "+i}return!0})}),removeLineClass:Ot(function(e,t,i){return us(this,e,t=="gutter"?"gutter":"class",function(r){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",u=r[a];if(u)if(i==null)r[a]=null;else{var f=u.match(ge(i));if(!f)return!1;var d=f.index+f[0].length;r[a]=u.slice(0,f.index)+(!f.index||d==u.length?"":" ")+u.slice(d)||null}else return!1;return!0})}),addLineWidget:Ot(function(e,t,i){return vp(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return Li(this,Se(this,e),Se(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Se(this,e),Li(this,e,e,i,"bookmark")},findMarksAt:function(e){e=Se(this,e);var t=[],i=Ie(this,e.line).markedSpans;if(i)for(var r=0;r<i.length;++r){var a=i[r];(a.from==null||a.from<=e.ch)&&(a.to==null||a.to>=e.ch)&&t.push(a.marker.parent||a.marker)}return t},findMarks:function(e,t,i){e=Se(this,e),t=Se(this,t);var r=[],a=e.line;return this.iter(e.line,t.line+1,function(u){var f=u.markedSpans;if(f)for(var d=0;d<f.length;d++){var m=f[d];!(m.to!=null&&a==e.line&&e.ch>=m.to||m.from==null&&a!=e.line||m.from!=null&&a==t.line&&m.from>=t.ch)&&(!i||i(m.marker))&&r.push(m.marker.parent||m.marker)}++a}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var r=0;r<i.length;++r)i[r].from!=null&&e.push(i[r].marker)}),e},posFromIndex:function(e){var t,i=this.first,r=this.lineSeparator().length;return this.iter(function(a){var u=a.text.length+r;if(u>e)return t=e,!0;e-=u,++i}),Se(this,ce(i,t))},indexFromPos:function(e){e=Se(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+i}),t},copy:function(e){var t=new ln(Vr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var r=new ln(Vr(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],yp(r,k1(this)),r},unlinkDoc:function(e){if(e instanceof gt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),bp(k1(this));break}}if(e.history==this.history){var r=[e.id];Dr(e,function(a){return r.push(a.id)},!0),e.history=new io(null),e.history.done=Ti(this.history.done,r),e.history.undone=Ti(this.history.undone,r)}},iterLinkedDocs:function(e){Dr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):cr(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Ot(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&up(this.cm))})}),ln.prototype.eachLine=ln.prototype.iter;var y1=0;function xp(e){var t=this;if(b1(t),!(dt(t,e)||vr(t.display,e))){St(e),w&&(y1=+new Date);var i=Zr(t,e,!0),r=e.dataTransfer.files;if(!(!i||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var a=r.length,u=Array(a),f=0,d=function(){++f==a&&Pt(t,function(){i=Se(t.doc,i);var j={from:i,to:i,text:t.doc.splitLines(u.filter(function(Y){return Y!=null}).join(t.doc.lineSeparator())),origin:"paste"};Ii(t.doc,j),i1(t.doc,Pr(Se(t.doc,i),Se(t.doc,Or(j))))})()},m=function(j,Y){if(t.options.allowDropFileTypes&&z(t.options.allowDropFileTypes,j.type)==-1){d();return}var se=new FileReader;se.onerror=function(){return d()},se.onload=function(){var me=se.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(me)){d();return}u[Y]=me,d()},se.readAsText(j)},v=0;v<r.length;v++)m(r[v],v);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var A=e.dataTransfer.getData("Text");if(A){var N;if(t.state.draggingText&&!t.state.draggingText.copy&&(N=t.listSelections()),ao(t.doc,Pr(i,i)),N)for(var q=0;q<N.length;++q)Ai(t.doc,"",N[q].anchor,N[q].head,"drag");t.replaceSelection(A,"around","paste"),t.display.input.focus()}}catch{}}}}function _p(e,t){if(w&&(!e.state.draggingText||+new Date-y1<100)){Rn(t);return}if(!(dt(e,t)||vr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!F)){var i=K("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",T&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),T&&i.parentNode.removeChild(i)}}function Sp(e,t){var i=Zr(e,t);if(i){var r=document.createDocumentFragment();pa(e,i,r),e.display.dragCursor||(e.display.dragCursor=K("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),G(e.display.dragCursor,r)}}function b1(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function w1(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],r=0;r<t.length;r++){var a=t[r].CodeMirror;a&&i.push(a)}i.length&&i[0].operation(function(){for(var u=0;u<i.length;u++)e(i[u])})}}var x1=!1;function Tp(){x1||(Cp(),x1=!0)}function Cp(){var e;Ne(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,w1(Ip)},100))}),Ne(window,"blur",function(){return w1(xi)})}function Ip(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Mr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ds=0;ds<10;ds++)Mr[ds+48]=Mr[ds+96]=String(ds);for(var co=65;co<=90;co++)Mr[co]=String.fromCharCode(co);for(var ms=1;ms<=12;ms++)Mr[ms+111]=Mr[ms+63235]="F"+ms;var yr={};yr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},yr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},yr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},yr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},yr.default=B?yr.macDefault:yr.pcDefault;function Ap(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,r,a,u,f=0;f<t.length-1;f++){var d=t[f];if(/^(cmd|meta|m)$/i.test(d))u=!0;else if(/^a(lt)?$/i.test(d))i=!0;else if(/^(c|ctrl|control)$/i.test(d))r=!0;else if(/^s(hift)?$/i.test(d))a=!0;else throw new Error("Unrecognized modifier name: "+d)}return i&&(e="Alt-"+e),r&&(e="Ctrl-"+e),u&&(e="Cmd-"+e),a&&(e="Shift-"+e),e}function Lp(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(r=="..."){delete e[i];continue}for(var a=ze(i.split(" "),Ap),u=0;u<a.length;u++){var f=void 0,d=void 0;u==a.length-1?(d=a.join(" "),f=r):(d=a.slice(0,u+1).join(" "),f="...");var m=t[d];if(!m)t[d]=f;else if(m!=f)throw new Error("Inconsistent bindings for "+d)}delete e[i]}for(var v in t)e[v]=t[v];return e}function Ei(e,t,i,r){t=fo(t);var a=t.call?t.call(e,r):t[e];if(a===!1)return"nothing";if(a==="...")return"multi";if(a!=null&&i(a))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ei(e,t.fallthrough,i,r);for(var u=0;u<t.fallthrough.length;u++){var f=Ei(e,t.fallthrough[u],i,r);if(f)return f}}}function _1(e){var t=typeof e=="string"?e:Mr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function S1(e,t,i){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(te?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(te?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function T1(e,t){if(T&&e.keyCode==34&&e.char)return!1;var i=Mr[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),S1(i,e,t))}function fo(e){return typeof e=="string"?yr[e]:e}function Ni(e,t){for(var i=e.doc.sel.ranges,r=[],a=0;a<i.length;a++){for(var u=t(i[a]);r.length&&k(u.from,Le(r).to)<=0;){var f=r.pop();if(k(f.from,u.from)<0){u.from=f.from;break}}r.push(u)}vn(e,function(){for(var d=r.length-1;d>=0;d--)Ai(e.doc,"",r[d].from,r[d].to,"+delete");_i(e)})}function Ea(e,t,i){var r=It(e.text,t+i,i);return r<0||r>e.text.length?null:r}function Na(e,t,i){var r=Ea(e,t.ch,i);return r==null?null:new ce(t.line,r,i<0?"after":"before")}function Pa(e,t,i,r,a){if(e){t.doc.direction=="rtl"&&(a=-a);var u=Wt(i,t.doc.direction);if(u){var f=a<0?Le(u):u[0],d=a<0==(f.level==1),m=d?"after":"before",v;if(f.level>0||t.doc.direction=="rtl"){var A=yi(t,i);v=a<0?i.text.length-1:0;var N=er(t,A,v).top;v=dn(function(q){return er(t,A,q).top==N},a<0==(f.level==1)?f.from:f.to-1,v),m=="before"&&(v=Ea(i,v,1))}else v=a<0?f.to:f.from;return new ce(r,v,m)}}return new ce(r,a<0?i.text.length:0,a<0?"before":"after")}function Ep(e,t,i,r){var a=Wt(t,e.doc.direction);if(!a)return Na(t,i,r);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var u=ft(a,i.ch,i.sticky),f=a[u];if(e.doc.direction=="ltr"&&f.level%2==0&&(r>0?f.to>i.ch:f.from<i.ch))return Na(t,i,r);var d=function(be,_e){return Ea(t,be instanceof ce?be.ch:be,_e)},m,v=function(be){return e.options.lineWrapping?(m=m||yi(e,t),Eu(e,t,m,be)):{begin:0,end:t.text.length}},A=v(i.sticky=="before"?d(i,-1):i.ch);if(e.doc.direction=="rtl"||f.level==1){var N=f.level==1==r<0,q=d(i,N?1:-1);if(q!=null&&(N?q<=f.to&&q<=A.end:q>=f.from&&q>=A.begin)){var j=N?"before":"after";return new ce(i.line,q,j)}}var Y=function(be,_e,we){for(var Ce=function(ct,Dt){return Dt?new ce(i.line,d(ct,1),"before"):new ce(i.line,ct,"after")};be>=0&&be<a.length;be+=_e){var Oe=a[be],Ee=_e>0==(Oe.level!=1),Ye=Ee?we.begin:d(we.end,-1);if(Oe.from<=Ye&&Ye<Oe.to||(Ye=Ee?Oe.from:d(Oe.to,-1),we.begin<=Ye&&Ye<we.end))return Ce(Ye,Ee)}},se=Y(u+r,r,A);if(se)return se;var me=r>0?A.end:d(A.begin,-1);return me!=null&&!(r>0&&me==t.text.length)&&(se=Y(r>0?0:a.length-1,r,v(me)),se)?se:null}var gs={selectAll:u1,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),fe)},killLine:function(e){return Ni(e,function(t){if(t.empty()){var i=Ie(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:ce(t.head.line+1,0)}:{from:t.head,to:ce(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ni(e,function(t){return{from:ce(t.from().line,0),to:Se(e.doc,ce(t.to().line+1,0))}})},delLineLeft:function(e){return Ni(e,function(t){return{from:ce(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Ni(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Ni(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ce(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ce(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return C1(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return I1(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Np(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},de)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},de)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return r.ch<e.getLine(r.line).search(/\S/)?I1(e,t.head):r},de)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),r=e.options.tabSize,a=0;a<i.length;a++){var u=i[a].from(),f=qe(e.getLine(u.line),u.ch,r);t.push(Je(r-f%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return vn(e,function(){for(var t=e.listSelections(),i=[],r=0;r<t.length;r++)if(t[r].empty()){var a=t[r].head,u=Ie(e.doc,a.line).text;if(u){if(a.ch==u.length&&(a=new ce(a.line,a.ch-1)),a.ch>0)a=new ce(a.line,a.ch+1),e.replaceRange(u.charAt(a.ch-1)+u.charAt(a.ch-2),ce(a.line,a.ch-2),a,"+transpose");else if(a.line>e.doc.first){var f=Ie(e.doc,a.line-1).text;f&&(a=new ce(a.line,1),e.replaceRange(u.charAt(0)+e.doc.lineSeparator()+f.charAt(f.length-1),ce(a.line-1,f.length-1),a,"+transpose"))}}i.push(new st(a,a))}e.setSelections(i)})},newlineAndIndent:function(e){return vn(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);_i(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function C1(e,t){var i=Ie(e.doc,t),r=Mn(i);return r!=i&&(t=rt(r)),Pa(!0,e,r,t,1)}function Np(e,t){var i=Ie(e.doc,t),r=dh(i);return r!=i&&(t=rt(r)),Pa(!0,e,i,t,-1)}function I1(e,t){var i=C1(e,t.line),r=Ie(e.doc,i.line),a=Wt(r,e.doc.direction);if(!a||a[0].level==0){var u=Math.max(i.ch,r.text.search(/\S/)),f=t.line==i.line&&t.ch<=u&&t.ch;return ce(i.line,f?0:u,i.sticky)}return i}function ho(e,t,i){if(typeof t=="string"&&(t=gs[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),a=t(e)!=ee}finally{e.display.shift=r,e.state.suppressEdits=!1}return a}function Pp(e,t,i){for(var r=0;r<e.state.keyMaps.length;r++){var a=Ei(t,e.state.keyMaps[r],i,e);if(a)return a}return e.options.extraKeys&&Ei(t,e.options.extraKeys,i,e)||Ei(t,e.options.keyMap,i,e)}var Op=new X;function vs(e,t,i,r){var a=e.state.keySeq;if(a){if(_1(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Op.set(50,function(){e.state.keySeq==a&&(e.state.keySeq=null,e.display.input.reset())}),A1(e,a+" "+t,i,r))return!0}return A1(e,t,i,r)}function A1(e,t,i,r){var a=Pp(e,t,r);return a=="multi"&&(e.state.keySeq=t),a=="handled"&&Nt(e,"keyHandled",e,t,i),(a=="handled"||a=="multi")&&(St(i),da(e)),!!a}function L1(e,t){var i=T1(t,!0);return i?t.shiftKey&&!e.state.keySeq?vs(e,"Shift-"+i,t,function(r){return ho(e,r,!0)})||vs(e,i,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ho(e,r)}):vs(e,i,t,function(r){return ho(e,r)}):!1}function Dp(e,t,i){return vs(e,"'"+i+"'",t,function(r){return ho(e,r,!0)})}var Oa=null;function E1(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=le(),!dt(t,e))){w&&C<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var r=L1(t,e);T&&(Oa=r?i:null,!r&&i==88&&!Ir&&(B?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),p&&!B&&!r&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Rp(t)}}function Rp(e){var t=e.display.lineDiv;Pe(t,"CodeMirror-crosshair");function i(r){(r.keyCode==18||!r.altKey)&&(ke(t,"CodeMirror-crosshair"),Lt(document,"keyup",i),Lt(document,"mouseover",i))}Ne(document,"keyup",i),Ne(document,"mouseover",i)}function N1(e){e.keyCode==16&&(this.doc.sel.shift=!1),dt(this,e)}function P1(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(vr(t.display,e)||dt(t,e)||e.ctrlKey&&!e.altKey||B&&e.metaKey)){var i=e.keyCode,r=e.charCode;if(T&&i==Oa){Oa=null,St(e);return}if(!(T&&(!e.which||e.which<10)&&L1(t,e))){var a=String.fromCharCode(r??i);a!="\b"&&(Dp(t,e,a)||t.display.input.onKeyPress(e))}}}var Mp=400,Da=function(e,t,i){this.time=e,this.pos=t,this.button=i};Da.prototype.compare=function(e,t,i){return this.time+Mp>e&&k(t,this.pos)==0&&i==this.button};var ks,ys;function Fp(e,t){var i=+new Date;return ys&&ys.compare(i,e,t)?(ks=ys=null,"triple"):ks&&ks.compare(i,e,t)?(ys=new Da(i,e,t),ks=null,"double"):(ks=new Da(i,e,t),ys=null,"single")}function O1(e){var t=this,i=t.display;if(!(dt(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,vr(i,e)){y||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!Ra(t,e)){var r=Zr(t,e),a=Sr(e),u=r?Fp(r,a):"single";window.focus(),a==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Bp(t,a,r,u,e))&&(a==1?r?Wp(t,r,u,e):Ln(e)==i.scroller&&St(e):a==2?(r&&oo(t.doc,r),setTimeout(function(){return i.input.focus()},20)):a==3&&(ye?t.display.input.onContextMenu(e):ma(t)))}}}function Bp(e,t,i,r,a){var u="Click";return r=="double"?u="Double"+u:r=="triple"&&(u="Triple"+u),u=(t==1?"Left":t==2?"Middle":"Right")+u,vs(e,S1(u,a),a,function(f){if(typeof f=="string"&&(f=gs[f]),!f)return!1;var d=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),d=f(e,i)!=ee}finally{e.state.suppressEdits=!1}return d})}function jp(e,t,i){var r=e.getOption("configureMouse"),a=r?r(e,t,i):{};if(a.unit==null){var u=U?i.shiftKey&&i.metaKey:i.altKey;a.unit=u?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(a.extend==null||e.doc.extend)&&(a.extend=e.doc.extend||i.shiftKey),a.addNew==null&&(a.addNew=B?i.metaKey:i.ctrlKey),a.moveOnDrag==null&&(a.moveOnDrag=!(B?i.altKey:i.ctrlKey)),a}function Wp(e,t,i,r){w?setTimeout(Qe(Du,e),0):e.curOp.focus=le();var a=jp(e,i,r),u=e.doc.sel,f;e.options.dragDrop&&lr&&!e.isReadOnly()&&i=="single"&&(f=u.contains(t))>-1&&(k((f=u.ranges[f]).from(),t)<0||t.xRel>0)&&(k(f.to(),t)>0||t.xRel<0)?Hp(e,r,t,a):qp(e,r,t,a)}function Hp(e,t,i,r){var a=e.display,u=!1,f=Pt(e,function(v){y&&(a.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ma(e)),Lt(a.wrapper.ownerDocument,"mouseup",f),Lt(a.wrapper.ownerDocument,"mousemove",d),Lt(a.scroller,"dragstart",m),Lt(a.scroller,"drop",f),u||(St(v),r.addNew||oo(e.doc,i,null,null,r.extend),y&&!F||w&&C==9?setTimeout(function(){a.wrapper.ownerDocument.body.focus({preventScroll:!0}),a.input.focus()},20):a.input.focus())}),d=function(v){u=u||Math.abs(t.clientX-v.clientX)+Math.abs(t.clientY-v.clientY)>=10},m=function(){return u=!0};y&&(a.scroller.draggable=!0),e.state.draggingText=f,f.copy=!r.moveOnDrag,Ne(a.wrapper.ownerDocument,"mouseup",f),Ne(a.wrapper.ownerDocument,"mousemove",d),Ne(a.scroller,"dragstart",m),Ne(a.scroller,"drop",f),e.state.delayingBlurEvent=!0,setTimeout(function(){return a.input.focus()},20),a.scroller.dragDrop&&a.scroller.dragDrop()}function D1(e,t,i){if(i=="char")return new st(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new st(ce(t.line,0),Se(e.doc,ce(t.line+1,0)));var r=i(e,t);return new st(r.from,r.to)}function qp(e,t,i,r){w&&ma(e);var a=e.display,u=e.doc;St(t);var f,d,m=u.sel,v=m.ranges;if(r.addNew&&!r.extend?(d=u.sel.contains(i),d>-1?f=v[d]:f=new st(i,i)):(f=u.sel.primary(),d=u.sel.primIndex),r.unit=="rectangle")r.addNew||(f=new st(i,i)),i=Zr(e,t,!0,!0),d=-1;else{var A=D1(e,i,r.unit);r.extend?f=Aa(f,A.anchor,A.head,r.extend):f=A}r.addNew?d==-1?(d=v.length,Jt(u,Bn(e,v.concat([f]),d),{scroll:!1,origin:"*mouse"})):v.length>1&&v[d].empty()&&r.unit=="char"&&!r.extend?(Jt(u,Bn(e,v.slice(0,d).concat(v.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),m=u.sel):La(u,d,f,ve):(d=0,Jt(u,new Tn([f],0),ve),m=u.sel);var N=i;function q(we){if(k(N,we)!=0)if(N=we,r.unit=="rectangle"){for(var Ce=[],Oe=e.options.tabSize,Ee=qe(Ie(u,i.line).text,i.ch,Oe),Ye=qe(Ie(u,we.line).text,we.ch,Oe),ct=Math.min(Ee,Ye),Dt=Math.max(Ee,Ye),kt=Math.min(i.line,we.line),kn=Math.min(e.lastLine(),Math.max(i.line,we.line));kt<=kn;kt++){var un=Ie(u,kt).text,Tt=Me(un,ct,Oe);ct==Dt?Ce.push(new st(ce(kt,Tt),ce(kt,Tt))):un.length>Tt&&Ce.push(new st(ce(kt,Tt),ce(kt,Me(un,Dt,Oe))))}Ce.length||Ce.push(new st(i,i)),Jt(u,Bn(e,m.ranges.slice(0,d).concat(Ce),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(we)}else{var cn=f,Ht=D1(e,we,r.unit),At=cn.anchor,Ct;k(Ht.anchor,At)>0?(Ct=Ht.head,At=je(cn.from(),Ht.anchor)):(Ct=Ht.anchor,At=he(cn.to(),Ht.head));var bt=m.ranges.slice(0);bt[d]=zp(e,new st(Se(u,At),Ct)),Jt(u,Bn(e,bt,d),ve)}}var j=a.wrapper.getBoundingClientRect(),Y=0;function se(we){var Ce=++Y,Oe=Zr(e,we,!0,r.unit=="rectangle");if(Oe)if(k(Oe,N)!=0){e.curOp.focus=le(),q(Oe);var Ee=eo(a,u);(Oe.line>=Ee.to||Oe.line<Ee.from)&&setTimeout(Pt(e,function(){Y==Ce&&se(we)}),150)}else{var Ye=we.clientY<j.top?-20:we.clientY>j.bottom?20:0;Ye&&setTimeout(Pt(e,function(){Y==Ce&&(a.scroller.scrollTop+=Ye,se(we))}),50)}}function me(we){e.state.selectingText=!1,Y=1/0,we&&(St(we),a.input.focus()),Lt(a.wrapper.ownerDocument,"mousemove",be),Lt(a.wrapper.ownerDocument,"mouseup",_e),u.history.lastSelOrigin=null}var be=Pt(e,function(we){we.buttons===0||!Sr(we)?me(we):se(we)}),_e=Pt(e,me);e.state.selectingText=_e,Ne(a.wrapper.ownerDocument,"mousemove",be),Ne(a.wrapper.ownerDocument,"mouseup",_e)}function zp(e,t){var i=t.anchor,r=t.head,a=Ie(e.doc,i.line);if(k(i,r)==0&&i.sticky==r.sticky)return t;var u=Wt(a);if(!u)return t;var f=ft(u,i.ch,i.sticky),d=u[f];if(d.from!=i.ch&&d.to!=i.ch)return t;var m=f+(d.from==i.ch==(d.level!=1)?0:1);if(m==0||m==u.length)return t;var v;if(r.line!=i.line)v=(r.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var A=ft(u,r.ch,r.sticky),N=A-f||(r.ch-i.ch)*(d.level==1?-1:1);A==m-1||A==m?v=N<0:v=N>0}var q=u[m+(v?-1:0)],j=v==(q.level==1),Y=j?q.from:q.to,se=j?"after":"before";return i.ch==Y&&i.sticky==se?t:new st(new ce(i.line,Y,se),r)}function R1(e,t,i,r){var a,u;if(t.touches)a=t.touches[0].clientX,u=t.touches[0].clientY;else try{a=t.clientX,u=t.clientY}catch{return!1}if(a>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&St(t);var f=e.display,d=f.lineDiv.getBoundingClientRect();if(u>d.bottom||!xt(e,i))return Kt(t);u-=d.top-f.viewOffset;for(var m=0;m<e.display.gutterSpecs.length;++m){var v=f.gutters.childNodes[m];if(v&&v.getBoundingClientRect().right>=a){var A=Pn(e.doc,u),N=e.display.gutterSpecs[m];return Be(e,i,e,A,N.className,t),Kt(t)}}}function Ra(e,t){return R1(e,t,"gutterClick",!0)}function M1(e,t){vr(e.display,t)||$p(e,t)||dt(e,t,"contextmenu")||ye||e.display.input.onContextMenu(t)}function $p(e,t){return xt(e,"gutterContextMenu")?R1(e,t,"gutterContextMenu",!1):!1}function F1(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Zi(e)}var Pi={toString:function(){return"CodeMirror.Init"}},B1={},po={};function Up(e){var t=e.optionHandlers;function i(r,a,u,f){e.defaults[r]=a,u&&(t[r]=f?function(d,m,v){v!=Pi&&u(d,m,v)}:u)}e.defineOption=i,e.Init=Pi,i("value","",function(r,a){return r.setValue(a)},!0),i("mode",null,function(r,a){r.doc.modeOption=a,Ta(r)},!0),i("indentUnit",2,Ta,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(r){as(r),Zi(r),an(r)},!0),i("lineSeparator",null,function(r,a){if(r.doc.lineSep=a,!!a){var u=[],f=r.doc.first;r.doc.iter(function(m){for(var v=0;;){var A=m.text.indexOf(a,v);if(A==-1)break;v=A+a.length,u.push(ce(f,A))}f++});for(var d=u.length-1;d>=0;d--)Ai(r.doc,a,u[d],ce(u[d].line,u[d].ch+a.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,a,u){r.state.specialChars=new RegExp(a.source+(a.test(" ")?"":"| "),"g"),u!=Pi&&r.refresh()}),i("specialCharPlaceholder",bh,function(r){return r.refresh()},!0),i("electricChars",!0),i("inputStyle",M?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(r,a){return r.getInputField().spellcheck=a},!0),i("autocorrect",!1,function(r,a){return r.getInputField().autocorrect=a},!0),i("autocapitalize",!1,function(r,a){return r.getInputField().autocapitalize=a},!0),i("rtlMoveVisually",!ae),i("wholeLineUpdateBefore",!0),i("theme","default",function(r){F1(r),os(r)},!0),i("keyMap","default",function(r,a,u){var f=fo(a),d=u!=Pi&&fo(u);d&&d.detach&&d.detach(r,f),f.attach&&f.attach(r,d||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Kp,!0),i("gutters",[],function(r,a){r.display.gutterSpecs=_a(a,r.options.lineNumbers),os(r)},!0),i("fixedGutter",!0,function(r,a){r.display.gutters.style.left=a?fa(r.display)+"px":"0",r.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(r){return Si(r)},!0),i("scrollbarStyle","native",function(r){Wu(r),Si(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),i("lineNumbers",!1,function(r,a){r.display.gutterSpecs=_a(r.options.gutters,a),os(r)},!0),i("firstLineNumber",1,os,!0),i("lineNumberFormatter",function(r){return r},os,!0),i("showCursorWhenSelecting",!1,es,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(r,a){a=="nocursor"&&(xi(r),r.display.input.blur()),r.display.input.readOnlyChanged(a)}),i("screenReaderLabel",null,function(r,a){a=a===""?null:a,r.display.input.screenReaderLabelChanged(a)}),i("disableInput",!1,function(r,a){a||r.display.input.reset()},!0),i("dragDrop",!0,Gp),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,es,!0),i("singleCursorHeightPerLine",!0,es,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,as,!0),i("addModeClass",!1,as,!0),i("pollInterval",100),i("undoDepth",200,function(r,a){return r.doc.history.undoDepth=a}),i("historyEventDelay",1250),i("viewportMargin",10,function(r){return r.refresh()},!0),i("maxHighlightLength",1e4,as,!0),i("moveInputWithCursor",!0,function(r,a){a||r.display.input.resetPosition()}),i("tabindex",null,function(r,a){return r.display.input.getField().tabIndex=a||""}),i("autofocus",null),i("direction","ltr",function(r,a){return r.doc.setDirection(a)},!0),i("phrases",null)}function Gp(e,t,i){var r=i&&i!=Pi;if(!t!=!r){var a=e.display.dragFunctions,u=t?Ne:Lt;u(e.display.scroller,"dragstart",a.start),u(e.display.scroller,"dragenter",a.enter),u(e.display.scroller,"dragover",a.over),u(e.display.scroller,"dragleave",a.leave),u(e.display.scroller,"drop",a.drop)}}function Kp(e){e.options.lineWrapping?(Pe(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ke(e.display.wrapper,"CodeMirror-wrap"),ta(e)),ha(e),an(e),Zi(e),setTimeout(function(){return Si(e)},100)}function gt(e,t){var i=this;if(!(this instanceof gt))return new gt(e,t);this.options=t=t?He(t):{},He(B1,t,!1);var r=t.value;typeof r=="string"?r=new ln(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var a=new gt.inputStyles[t.inputStyle](this),u=this.display=new op(e,r,a,t);u.wrapper.CodeMirror=this,F1(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new X,keySeq:null,specialChars:null},t.autofocus&&!M&&u.input.focus(),w&&C<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Xp(this),Tp(),ri(this),this.curOp.forceUpdate=!0,Yu(this,r),t.autofocus&&!M||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&ga(i)},20):xi(this);for(var f in po)po.hasOwnProperty(f)&&po[f](this,t[f],Pi);zu(this),t.finishInit&&t.finishInit(this);for(var d=0;d<Ma.length;++d)Ma[d](this);ii(this),y&&t.lineWrapping&&getComputedStyle(u.lineDiv).textRendering=="optimizelegibility"&&(u.lineDiv.style.textRendering="auto")}gt.defaults=B1,gt.optionHandlers=po;function Xp(e){var t=e.display;Ne(t.scroller,"mousedown",Pt(e,O1)),w&&C<11?Ne(t.scroller,"dblclick",Pt(e,function(m){if(!dt(e,m)){var v=Zr(e,m);if(!(!v||Ra(e,m)||vr(e.display,m))){St(m);var A=e.findWordAt(v);oo(e.doc,A.anchor,A.head)}}})):Ne(t.scroller,"dblclick",function(m){return dt(e,m)||St(m)}),Ne(t.scroller,"contextmenu",function(m){return M1(e,m)}),Ne(t.input.getField(),"contextmenu",function(m){t.scroller.contains(m.target)||M1(e,m)});var i,r={end:0};function a(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function u(m){if(m.touches.length!=1)return!1;var v=m.touches[0];return v.radiusX<=1&&v.radiusY<=1}function f(m,v){if(v.left==null)return!0;var A=v.left-m.left,N=v.top-m.top;return A*A+N*N>20*20}Ne(t.scroller,"touchstart",function(m){if(!dt(e,m)&&!u(m)&&!Ra(e,m)){t.input.ensurePolled(),clearTimeout(i);var v=+new Date;t.activeTouch={start:v,moved:!1,prev:v-r.end<=300?r:null},m.touches.length==1&&(t.activeTouch.left=m.touches[0].pageX,t.activeTouch.top=m.touches[0].pageY)}}),Ne(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ne(t.scroller,"touchend",function(m){var v=t.activeTouch;if(v&&!vr(t,m)&&v.left!=null&&!v.moved&&new Date-v.start<300){var A=e.coordsChar(t.activeTouch,"page"),N;!v.prev||f(v,v.prev)?N=new st(A,A):!v.prev.prev||f(v,v.prev.prev)?N=e.findWordAt(A):N=new st(ce(A.line,0),Se(e.doc,ce(A.line+1,0))),e.setSelection(N.anchor,N.head),e.focus(),St(m)}a()}),Ne(t.scroller,"touchcancel",a),Ne(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ns(e,t.scroller.scrollTop),ti(e,t.scroller.scrollLeft,!0),Be(e,"scroll",e))}),Ne(t.scroller,"mousewheel",function(m){return Gu(e,m)}),Ne(t.scroller,"DOMMouseScroll",function(m){return Gu(e,m)}),Ne(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(m){dt(e,m)||Rn(m)},over:function(m){dt(e,m)||(Sp(e,m),Rn(m))},start:function(m){return _p(e,m)},drop:Pt(e,xp),leave:function(m){dt(e,m)||b1(e)}};var d=t.input.getField();Ne(d,"keyup",function(m){return N1.call(e,m)}),Ne(d,"keydown",Pt(e,E1)),Ne(d,"keypress",Pt(e,P1)),Ne(d,"focus",function(m){return ga(e,m)}),Ne(d,"blur",function(m){return xi(e,m)})}var Ma=[];gt.defineInitHook=function(e){return Ma.push(e)};function bs(e,t,i,r){var a=e.doc,u;i==null&&(i="add"),i=="smart"&&(a.mode.indent?u=Xi(e,t).state:i="prev");var f=e.options.tabSize,d=Ie(a,t),m=qe(d.text,null,f);d.stateAfter&&(d.stateAfter=null);var v=d.text.match(/^\s*/)[0],A;if(!r&&!/\S/.test(d.text))A=0,i="not";else if(i=="smart"&&(A=a.mode.indent(u,d.text.slice(v.length),d.text),A==ee||A>150)){if(!r)return;i="prev"}i=="prev"?t>a.first?A=qe(Ie(a,t-1).text,null,f):A=0:i=="add"?A=m+e.options.indentUnit:i=="subtract"?A=m-e.options.indentUnit:typeof i=="number"&&(A=m+i),A=Math.max(0,A);var N="",q=0;if(e.options.indentWithTabs)for(var j=Math.floor(A/f);j;--j)q+=f,N+=" ";if(q<A&&(N+=Je(A-q)),N!=v)return Ai(a,N,ce(t,0),ce(t,v.length),"+input"),d.stateAfter=null,!0;for(var Y=0;Y<a.sel.ranges.length;Y++){var se=a.sel.ranges[Y];if(se.head.line==t&&se.head.ch<v.length){var me=ce(t,v.length);La(a,Y,new st(me,me));break}}}var jn=null;function mo(e){jn=e}function Fa(e,t,i,r,a){var u=e.doc;e.display.shift=!1,r||(r=u.sel);var f=+new Date-200,d=a=="paste"||e.state.pasteIncoming>f,m=cr(t),v=null;if(d&&r.ranges.length>1)if(jn&&jn.text.join(`
`)==t){if(r.ranges.length%jn.text.length==0){v=[];for(var A=0;A<jn.text.length;A++)v.push(u.splitLines(jn.text[A]))}}else m.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(v=ze(m,function(be){return[be]}));for(var N=e.curOp.updateInput,q=r.ranges.length-1;q>=0;q--){var j=r.ranges[q],Y=j.from(),se=j.to();j.empty()&&(i&&i>0?Y=ce(Y.line,Y.ch-i):e.state.overwrite&&!d?se=ce(se.line,Math.min(Ie(u,se.line).text.length,se.ch+Le(m).length)):d&&jn&&jn.lineWise&&jn.text.join(`
`)==m.join(`
`)&&(Y=se=ce(Y.line,0)));var me={from:Y,to:se,text:v?v[q%v.length]:m,origin:a||(d?"paste":e.state.cutIncoming>f?"cut":"+input")};Ii(e.doc,me),Nt(e,"inputRead",e,me)}t&&!d&&W1(e,t),_i(e),e.curOp.updateInput<2&&(e.curOp.updateInput=N),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function j1(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&vn(t,function(){return Fa(t,i,0,null,"paste")}),!0}function W1(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,r=i.ranges.length-1;r>=0;r--){var a=i.ranges[r];if(!(a.head.ch>100||r&&i.ranges[r-1].head.line==a.head.line)){var u=e.getModeAt(a.head),f=!1;if(u.electricChars){for(var d=0;d<u.electricChars.length;d++)if(t.indexOf(u.electricChars.charAt(d))>-1){f=bs(e,a.head.line,"smart");break}}else u.electricInput&&u.electricInput.test(Ie(e.doc,a.head.line).text.slice(0,a.head.ch))&&(f=bs(e,a.head.line,"smart"));f&&Nt(e,"electricInput",e,a.head.line)}}}function H1(e){for(var t=[],i=[],r=0;r<e.doc.sel.ranges.length;r++){var a=e.doc.sel.ranges[r].head.line,u={anchor:ce(a,0),head:ce(a+1,0)};i.push(u),t.push(e.getRange(u.anchor,u.head))}return{text:t,ranges:i}}function q1(e,t,i,r){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function z1(){var e=K("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=K("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return y?e.style.width="1000px":e.setAttribute("wrap","off"),D&&(e.style.border="1px solid black"),q1(e),t}function Vp(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,a){var u=this.options,f=u[r];u[r]==a&&r!="mode"||(u[r]=a,t.hasOwnProperty(r)&&Pt(this,t[r])(this,a,f),Be(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,a){this.state.keyMaps[a?"push":"unshift"](fo(r))},removeKeyMap:function(r){for(var a=this.state.keyMaps,u=0;u<a.length;++u)if(a[u]==r||a[u].name==r)return a.splice(u,1),!0},addOverlay:tn(function(r,a){var u=r.token?r:e.getMode(this.options,r);if(u.startState)throw new Error("Overlays may not be stateful.");Xe(this.state.overlays,{mode:u,modeSpec:r,opaque:a&&a.opaque,priority:a&&a.priority||0},function(f){return f.priority}),this.state.modeGen++,an(this)}),removeOverlay:tn(function(r){for(var a=this.state.overlays,u=0;u<a.length;++u){var f=a[u].modeSpec;if(f==r||typeof r=="string"&&f.name==r){a.splice(u,1),this.state.modeGen++,an(this);return}}}),indentLine:tn(function(r,a,u){typeof a!="string"&&typeof a!="number"&&(a==null?a=this.options.smartIndent?"smart":"prev":a=a?"add":"subtract"),dr(this.doc,r)&&bs(this,r,a,u)}),indentSelection:tn(function(r){for(var a=this.doc.sel.ranges,u=-1,f=0;f<a.length;f++){var d=a[f];if(d.empty())d.head.line>u&&(bs(this,d.head.line,r,!0),u=d.head.line,f==this.doc.sel.primIndex&&_i(this));else{var m=d.from(),v=d.to(),A=Math.max(u,m.line);u=Math.min(this.lastLine(),v.line-(v.ch?0:1))+1;for(var N=A;N<u;++N)bs(this,N,r);var q=this.doc.sel.ranges;m.ch==0&&a.length==q.length&&q[f].from().ch>0&&La(this.doc,f,new st(m,q[f].to()),fe)}}}),getTokenAt:function(r,a){return Ql(this,r,a)},getLineTokens:function(r,a){return Ql(this,ce(r),a,!0)},getTokenTypeAt:function(r){r=Se(this.doc,r);var a=Vl(this,Ie(this.doc,r.line)),u=0,f=(a.length-1)/2,d=r.ch,m;if(d==0)m=a[2];else for(;;){var v=u+f>>1;if((v?a[v*2-1]:0)>=d)f=v;else if(a[v*2+1]<d)u=v+1;else{m=a[v*2+2];break}}var A=m?m.indexOf("overlay "):-1;return A<0?m:A==0?null:m.slice(0,A-1)},getModeAt:function(r){var a=this.doc.mode;return a.innerMode?e.innerMode(a,this.getTokenAt(r).state).mode:a},getHelper:function(r,a){return this.getHelpers(r,a)[0]},getHelpers:function(r,a){var u=[];if(!i.hasOwnProperty(a))return u;var f=i[a],d=this.getModeAt(r);if(typeof d[a]=="string")f[d[a]]&&u.push(f[d[a]]);else if(d[a])for(var m=0;m<d[a].length;m++){var v=f[d[a][m]];v&&u.push(v)}else d.helperType&&f[d.helperType]?u.push(f[d.helperType]):f[d.name]&&u.push(f[d.name]);for(var A=0;A<f._global.length;A++){var N=f._global[A];N.pred(d,this)&&z(u,N.val)==-1&&u.push(N.val)}return u},getStateAfter:function(r,a){var u=this.doc;return r=Ze(u,r??u.first+u.size-1),Xi(this,r+1,a).state},cursorCoords:function(r,a){var u,f=this.doc.sel.primary();return r==null?u=f.head:typeof r=="object"?u=Se(this.doc,r):u=r?f.from():f.to(),Fn(this,u,a||"page")},charCoords:function(r,a){return Ys(this,Se(this.doc,r),a||"page")},coordsChar:function(r,a){return r=Iu(this,r,a||"page"),la(this,r.left,r.top)},lineAtHeight:function(r,a){return r=Iu(this,{top:r,left:0},a||"page").top,Pn(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,a,u){var f=!1,d;if(typeof r=="number"){var m=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>m&&(r=m,f=!0),d=Ie(this.doc,r)}else d=r;return Vs(this,d,{top:0,left:0},a||"page",u||f).top+(f?this.doc.height-gr(d):0)},defaultTextHeight:function(){return bi(this.display)},defaultCharWidth:function(){return wi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,a,u,f,d){var m=this.display;r=Fn(this,Se(this.doc,r));var v=r.bottom,A=r.left;if(a.style.position="absolute",a.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(a),m.sizer.appendChild(a),f=="over")v=r.top;else if(f=="above"||f=="near"){var N=Math.max(m.wrapper.clientHeight,this.doc.height),q=Math.max(m.sizer.clientWidth,m.lineSpace.clientWidth);(f=="above"||r.bottom+a.offsetHeight>N)&&r.top>a.offsetHeight?v=r.top-a.offsetHeight:r.bottom+a.offsetHeight<=N&&(v=r.bottom),A+a.offsetWidth>q&&(A=q-a.offsetWidth)}a.style.top=v+"px",a.style.left=a.style.right="",d=="right"?(A=m.sizer.clientWidth-a.offsetWidth,a.style.right="0px"):(d=="left"?A=0:d=="middle"&&(A=(m.sizer.clientWidth-a.offsetWidth)/2),a.style.left=A+"px"),u&&Gh(this,{left:A,top:v,right:A+a.offsetWidth,bottom:v+a.offsetHeight})},triggerOnKeyDown:tn(E1),triggerOnKeyPress:tn(P1),triggerOnKeyUp:N1,triggerOnMouseDown:tn(O1),execCommand:function(r){if(gs.hasOwnProperty(r))return gs[r].call(null,this)},triggerElectric:tn(function(r){W1(this,r)}),findPosH:function(r,a,u,f){var d=1;a<0&&(d=-1,a=-a);for(var m=Se(this.doc,r),v=0;v<a&&(m=Ba(this.doc,m,d,u,f),!m.hitSide);++v);return m},moveH:tn(function(r,a){var u=this;this.extendSelectionsBy(function(f){return u.display.shift||u.doc.extend||f.empty()?Ba(u.doc,f.head,r,a,u.options.rtlMoveVisually):r<0?f.from():f.to()},de)}),deleteH:tn(function(r,a){var u=this.doc.sel,f=this.doc;u.somethingSelected()?f.replaceSelection("",null,"+delete"):Ni(this,function(d){var m=Ba(f,d.head,r,a,!1);return r<0?{from:m,to:d.head}:{from:d.head,to:m}})}),findPosV:function(r,a,u,f){var d=1,m=f;a<0&&(d=-1,a=-a);for(var v=Se(this.doc,r),A=0;A<a;++A){var N=Fn(this,v,"div");if(m==null?m=N.left:N.left=m,v=$1(this,N,d,u),v.hitSide)break}return v},moveV:tn(function(r,a){var u=this,f=this.doc,d=[],m=!this.display.shift&&!f.extend&&f.sel.somethingSelected();if(f.extendSelectionsBy(function(A){if(m)return r<0?A.from():A.to();var N=Fn(u,A.head,"div");A.goalColumn!=null&&(N.left=A.goalColumn),d.push(N.left);var q=$1(u,N,r,a);return a=="page"&&A==f.sel.primary()&&ka(u,Ys(u,q,"div").top-N.top),q},de),d.length)for(var v=0;v<f.sel.ranges.length;v++)f.sel.ranges[v].goalColumn=d[v]}),findWordAt:function(r){var a=this.doc,u=Ie(a,r.line).text,f=r.ch,d=r.ch;if(u){var m=this.getHelper(r,"wordChars");(r.sticky=="before"||d==u.length)&&f?--f:++d;for(var v=u.charAt(f),A=$(v,m)?function(N){return $(N,m)}:/\s/.test(v)?function(N){return/\s/.test(N)}:function(N){return!/\s/.test(N)&&!$(N)};f>0&&A(u.charAt(f-1));)--f;for(;d<u.length&&A(u.charAt(d));)++d}return new st(ce(r.line,f),ce(r.line,d))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Pe(this.display.cursorDiv,"CodeMirror-overwrite"):ke(this.display.cursorDiv,"CodeMirror-overwrite"),Be(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==le()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:tn(function(r,a){ts(this,r,a)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-Zn(this)-this.display.barHeight,width:r.scrollWidth-Zn(this)-this.display.barWidth,clientHeight:ia(this),clientWidth:Jr(this)}},scrollIntoView:tn(function(r,a){r==null?(r={from:this.doc.sel.primary().head,to:null},a==null&&(a=this.options.cursorScrollMargin)):typeof r=="number"?r={from:ce(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=a||0,r.from.line!=null?Kh(this,r):Mu(this,r.from,r.to,r.margin)}),setSize:tn(function(r,a){var u=this,f=function(m){return typeof m=="number"||/^\d+$/.test(String(m))?m+"px":m};r!=null&&(this.display.wrapper.style.width=f(r)),a!=null&&(this.display.wrapper.style.height=f(a)),this.options.lineWrapping&&Su(this);var d=this.display.viewFrom;this.doc.iter(d,this.display.viewTo,function(m){if(m.widgets){for(var v=0;v<m.widgets.length;v++)if(m.widgets[v].noHScroll){Er(u,d,"widget");break}}++d}),this.curOp.forceUpdate=!0,Be(this,"refresh",this)}),operation:function(r){return vn(this,r)},startOperation:function(){return ri(this)},endOperation:function(){return ii(this)},refresh:tn(function(){var r=this.display.cachedTextHeight;an(this),this.curOp.forceUpdate=!0,Zi(this),ts(this,this.doc.scrollLeft,this.doc.scrollTop),wa(this.display),(r==null||Math.abs(r-bi(this.display))>.5||this.options.lineWrapping)&&ha(this),Be(this,"refresh",this)}),swapDoc:tn(function(r){var a=this.doc;return a.cm=null,this.state.selectingText&&this.state.selectingText(),Yu(this,r),Zi(this),this.display.input.reset(),ts(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,Nt(this,"swapDoc",this,a),a}),phrase:function(r){var a=this.options.phrases;return a&&Object.prototype.hasOwnProperty.call(a,r)?a[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},mn(e),e.registerHelper=function(r,a,u){i.hasOwnProperty(r)||(i[r]=e[r]={_global:[]}),i[r][a]=u},e.registerGlobalHelper=function(r,a,u,f){e.registerHelper(r,a,f),i[r]._global.push({pred:u,val:f})}}function Ba(e,t,i,r,a){var u=t,f=i,d=Ie(e,t.line),m=a&&e.direction=="rtl"?-i:i;function v(){var _e=t.line+m;return _e<e.first||_e>=e.first+e.size?!1:(t=new ce(_e,t.ch,t.sticky),d=Ie(e,_e))}function A(_e){var we;if(r=="codepoint"){var Ce=d.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(Ce))we=null;else{var Oe=i>0?Ce>=55296&&Ce<56320:Ce>=56320&&Ce<57343;we=new ce(t.line,Math.max(0,Math.min(d.text.length,t.ch+i*(Oe?2:1))),-i)}}else a?we=Ep(e.cm,d,t,i):we=Na(d,t,i);if(we==null)if(!_e&&v())t=Pa(a,e.cm,d,t.line,m);else return!1;else t=we;return!0}if(r=="char"||r=="codepoint")A();else if(r=="column")A(!0);else if(r=="word"||r=="group")for(var N=null,q=r=="group",j=e.cm&&e.cm.getHelper(t,"wordChars"),Y=!0;!(i<0&&!A(!Y));Y=!1){var se=d.text.charAt(t.ch)||`
`,me=$(se,j)?"w":q&&se==`
`?"n":!q||/\s/.test(se)?null:"p";if(q&&!Y&&!me&&(me="s"),N&&N!=me){i<0&&(i=1,A(),t.sticky="after");break}if(me&&(N=me),i>0&&!A(!Y))break}var be=lo(e,t,u,f,!0);return P(u,be)&&(be.hitSide=!0),be}function $1(e,t,i,r){var a=e.doc,u=t.left,f;if(r=="page"){var d=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),m=Math.max(d-.5*bi(e.display),3);f=(i>0?t.bottom:t.top)+i*m}else r=="line"&&(f=i>0?t.bottom+3:t.top-3);for(var v;v=la(e,u,f),!!v.outside;){if(i<0?f<=0:f>=a.height){v.hitSide=!0;break}f+=i*5}return v}var lt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new X,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};lt.prototype.init=function(e){var t=this,i=this,r=i.cm,a=i.div=e.lineDiv;a.contentEditable=!0,q1(a,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function u(d){for(var m=d.target;m;m=m.parentNode){if(m==a)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(m.className))break}return!1}Ne(a,"paste",function(d){!u(d)||dt(r,d)||j1(d,r)||C<=11&&setTimeout(Pt(r,function(){return t.updateFromDOM()}),20)}),Ne(a,"compositionstart",function(d){t.composing={data:d.data,done:!1}}),Ne(a,"compositionupdate",function(d){t.composing||(t.composing={data:d.data,done:!1})}),Ne(a,"compositionend",function(d){t.composing&&(d.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ne(a,"touchstart",function(){return i.forceCompositionEnd()}),Ne(a,"input",function(){t.composing||t.readFromDOMSoon()});function f(d){if(!(!u(d)||dt(r,d))){if(r.somethingSelected())mo({lineWise:!1,text:r.getSelections()}),d.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var m=H1(r);mo({lineWise:!0,text:m.text}),d.type=="cut"&&r.operation(function(){r.setSelections(m.ranges,0,fe),r.replaceSelection("",null,"cut")})}else return;if(d.clipboardData){d.clipboardData.clearData();var v=jn.text.join(`
`);if(d.clipboardData.setData("Text",v),d.clipboardData.getData("Text")==v){d.preventDefault();return}}var A=z1(),N=A.firstChild;r.display.lineSpace.insertBefore(A,r.display.lineSpace.firstChild),N.value=jn.text.join(`
`);var q=le();Fe(N),setTimeout(function(){r.display.lineSpace.removeChild(A),q.focus(),q==a&&i.showPrimarySelection()},50)}}Ne(a,"copy",f),Ne(a,"cut",f)},lt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},lt.prototype.prepareSelection=function(){var e=Ou(this.cm,!1);return e.focus=le()==this.div,e},lt.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},lt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},lt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),a=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||a.line<t.display.viewFrom){e.removeAllRanges();return}var u=go(t,e.anchorNode,e.anchorOffset),f=go(t,e.focusNode,e.focusOffset);if(!(u&&!u.bad&&f&&!f.bad&&k(je(u,f),r)==0&&k(he(u,f),a)==0)){var d=t.display.view,m=r.line>=t.display.viewFrom&&U1(t,r)||{node:d[0].measure.map[2],offset:0},v=a.line<t.display.viewTo&&U1(t,a);if(!v){var A=d[d.length-1].measure,N=A.maps?A.maps[A.maps.length-1]:A.map;v={node:N[N.length-1],offset:N[N.length-2]-N[N.length-3]}}if(!m||!v){e.removeAllRanges();return}var q=e.rangeCount&&e.getRangeAt(0),j;try{j=oe(m.node,m.offset,v.offset,v.node)}catch{}j&&(!p&&t.state.focused?(e.collapse(m.node,m.offset),j.collapsed||(e.removeAllRanges(),e.addRange(j))):(e.removeAllRanges(),e.addRange(j)),q&&e.anchorNode==null?e.addRange(q):p&&this.startGracePeriod()),this.rememberSelection()}},lt.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},lt.prototype.showMultipleSelections=function(e){G(this.cm.display.cursorDiv,e.cursors),G(this.cm.display.selectionDiv,e.selection)},lt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},lt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Q(this.div,t)},lt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||le()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},lt.prototype.blur=function(){this.div.blur()},lt.prototype.getField=function(){return this.div},lt.prototype.supportsTouch=function(){return!0},lt.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):vn(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function i(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},lt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},lt.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(I&&L&&this.cm.display.gutterSpecs.length&&Yp(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=go(t,e.anchorNode,e.anchorOffset),r=go(t,e.focusNode,e.focusOffset);i&&r&&vn(t,function(){Jt(t.doc,Pr(i,r),fe),(i.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},lt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),r=i.from(),a=i.to();if(r.ch==0&&r.line>e.firstLine()&&(r=ce(r.line-1,Ie(e.doc,r.line-1).length)),a.ch==Ie(e.doc,a.line).text.length&&a.line<e.lastLine()&&(a=ce(a.line+1,0)),r.line<t.viewFrom||a.line>t.viewTo-1)return!1;var u,f,d;r.line==t.viewFrom||(u=ei(e,r.line))==0?(f=rt(t.view[0].line),d=t.view[0].node):(f=rt(t.view[u].line),d=t.view[u-1].node.nextSibling);var m=ei(e,a.line),v,A;if(m==t.view.length-1?(v=t.viewTo-1,A=t.lineDiv.lastChild):(v=rt(t.view[m+1].line)-1,A=t.view[m+1].node.previousSibling),!d)return!1;for(var N=e.doc.splitLines(Jp(e,d,A,f,v)),q=Nn(e.doc,ce(f,0),ce(v,Ie(e.doc,v).text.length));N.length>1&&q.length>1;)if(Le(N)==Le(q))N.pop(),q.pop(),v--;else if(N[0]==q[0])N.shift(),q.shift(),f++;else break;for(var j=0,Y=0,se=N[0],me=q[0],be=Math.min(se.length,me.length);j<be&&se.charCodeAt(j)==me.charCodeAt(j);)++j;for(var _e=Le(N),we=Le(q),Ce=Math.min(_e.length-(N.length==1?j:0),we.length-(q.length==1?j:0));Y<Ce&&_e.charCodeAt(_e.length-Y-1)==we.charCodeAt(we.length-Y-1);)++Y;if(N.length==1&&q.length==1&&f==r.line)for(;j&&j>r.ch&&_e.charCodeAt(_e.length-Y-1)==we.charCodeAt(we.length-Y-1);)j--,Y++;N[N.length-1]=_e.slice(0,_e.length-Y).replace(/^\u200b+/,""),N[0]=N[0].slice(j).replace(/\u200b+$/,"");var Oe=ce(f,j),Ee=ce(v,q.length?Le(q).length-Y:0);if(N.length>1||N[0]||k(Oe,Ee))return Ai(e.doc,N,Oe,Ee,"+input"),!0},lt.prototype.ensurePolled=function(){this.forceCompositionEnd()},lt.prototype.reset=function(){this.forceCompositionEnd()},lt.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},lt.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},lt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&vn(this.cm,function(){return an(e.cm)})},lt.prototype.setUneditable=function(e){e.contentEditable="false"},lt.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Pt(this.cm,Fa)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},lt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},lt.prototype.onContextMenu=function(){},lt.prototype.resetPosition=function(){},lt.prototype.needsContentAttribute=!0;function U1(e,t){var i=sa(e,t.line);if(!i||i.hidden)return null;var r=Ie(e.doc,t.line),a=yu(i,r,t.line),u=Wt(r,e.doc.direction),f="left";if(u){var d=ft(u,t.ch);f=d%2?"right":"left"}var m=xu(a.map,t.ch,f);return m.offset=m.collapse=="right"?m.end:m.start,m}function Yp(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Oi(e,t){return t&&(e.bad=!0),e}function Jp(e,t,i,r,a){var u="",f=!1,d=e.doc.lineSeparator(),m=!1;function v(j){return function(Y){return Y.id==j}}function A(){f&&(u+=d,m&&(u+=d),f=m=!1)}function N(j){j&&(A(),u+=j)}function q(j){if(j.nodeType==1){var Y=j.getAttribute("cm-text");if(Y){N(Y);return}var se=j.getAttribute("cm-marker"),me;if(se){var be=e.findMarks(ce(r,0),ce(a+1,0),v(+se));be.length&&(me=be[0].find(0))&&N(Nn(e.doc,me.from,me.to).join(d));return}if(j.getAttribute("contenteditable")=="false")return;var _e=/^(pre|div|p|li|table|br)$/i.test(j.nodeName);if(!/^br$/i.test(j.nodeName)&&j.textContent.length==0)return;_e&&A();for(var we=0;we<j.childNodes.length;we++)q(j.childNodes[we]);/^(pre|p)$/i.test(j.nodeName)&&(m=!0),_e&&(f=!0)}else j.nodeType==3&&N(j.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;q(t),t!=i;)t=t.nextSibling,m=!1;return u}function go(e,t,i){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[i],!r)return Oi(e.clipPos(ce(e.display.viewTo-1)),!0);t=null,i=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var a=0;a<e.display.view.length;a++){var u=e.display.view[a];if(u.node==r)return Qp(u,t,i)}}function Qp(e,t,i){var r=e.text.firstChild,a=!1;if(!t||!Q(r,t))return Oi(ce(rt(e.line),0),!0);if(t==r&&(a=!0,t=r.childNodes[i],i=0,!t)){var u=e.rest?Le(e.rest):e.line;return Oi(ce(rt(u),u.text.length),a)}var f=t.nodeType==3?t:null,d=t;for(!f&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(f=t.firstChild,i&&(i=f.nodeValue.length));d.parentNode!=r;)d=d.parentNode;var m=e.measure,v=m.maps;function A(me,be,_e){for(var we=-1;we<(v?v.length:0);we++)for(var Ce=we<0?m.map:v[we],Oe=0;Oe<Ce.length;Oe+=3){var Ee=Ce[Oe+2];if(Ee==me||Ee==be){var Ye=rt(we<0?e.line:e.rest[we]),ct=Ce[Oe]+_e;return(_e<0||Ee!=me)&&(ct=Ce[Oe+(_e?1:0)]),ce(Ye,ct)}}}var N=A(f,d,i);if(N)return Oi(N,a);for(var q=d.nextSibling,j=f?f.nodeValue.length-i:0;q;q=q.nextSibling){if(N=A(q,q.firstChild,0),N)return Oi(ce(N.line,N.ch-j),a);j+=q.textContent.length}for(var Y=d.previousSibling,se=i;Y;Y=Y.previousSibling){if(N=A(Y,Y.firstChild,-1),N)return Oi(ce(N.line,N.ch+se),a);se+=Y.textContent.length}}var _t=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new X,this.hasSelection=!1,this.composing=null};_t.prototype.init=function(e){var t=this,i=this,r=this.cm;this.createField(e);var a=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),D&&(a.style.width="0px"),Ne(a,"input",function(){w&&C>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Ne(a,"paste",function(f){dt(r,f)||j1(f,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())});function u(f){if(!dt(r,f)){if(r.somethingSelected())mo({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var d=H1(r);mo({lineWise:!0,text:d.text}),f.type=="cut"?r.setSelections(d.ranges,null,fe):(i.prevInput="",a.value=d.text.join(`
`),Fe(a))}else return;f.type=="cut"&&(r.state.cutIncoming=+new Date)}}Ne(a,"cut",u),Ne(a,"copy",u),Ne(e.scroller,"paste",function(f){if(!(vr(e,f)||dt(r,f))){if(!a.dispatchEvent){r.state.pasteIncoming=+new Date,i.focus();return}var d=new Event("paste");d.clipboardData=f.clipboardData,a.dispatchEvent(d)}}),Ne(e.lineSpace,"selectstart",function(f){vr(e,f)||St(f)}),Ne(a,"compositionstart",function(){var f=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:f,range:r.markText(f,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ne(a,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},_t.prototype.createField=function(e){this.wrapper=z1(),this.textarea=this.wrapper.firstChild},_t.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},_t.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,r=Ou(e);if(e.options.moveInputWithCursor){var a=Fn(e,i.sel.primary().head,"div"),u=t.wrapper.getBoundingClientRect(),f=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,a.top+f.top-u.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,a.left+f.left-u.left))}return r},_t.prototype.showSelection=function(e){var t=this.cm,i=t.display;G(i.cursorDiv,e.cursors),G(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},_t.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&Fe(this.textarea),w&&C>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",w&&C>=9&&(this.hasSelection=null))}},_t.prototype.getField=function(){return this.textarea},_t.prototype.supportsTouch=function(){return!1},_t.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!M||le()!=this.textarea))try{this.textarea.focus()}catch{}},_t.prototype.blur=function(){this.textarea.blur()},_t.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},_t.prototype.receivedFocus=function(){this.slowPoll()},_t.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},_t.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},_t.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Cr(i)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var a=i.value;if(a==r&&!t.somethingSelected())return!1;if(w&&C>=9&&this.hasSelection===a||B&&/[\uf700-\uf7ff]/.test(a))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var u=a.charCodeAt(0);if(u==8203&&!r&&(r="​"),u==8666)return this.reset(),this.cm.execCommand("undo")}for(var f=0,d=Math.min(r.length,a.length);f<d&&r.charCodeAt(f)==a.charCodeAt(f);)++f;return vn(t,function(){Fa(t,a.slice(f),r.length-f,null,e.composing?"*compose":null),a.length>1e3||a.indexOf(`
`)>-1?i.value=e.prevInput="":e.prevInput=a,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},_t.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},_t.prototype.onKeyPress=function(){w&&C>=9&&(this.hasSelection=null),this.fastPoll()},_t.prototype.onContextMenu=function(e){var t=this,i=t.cm,r=i.display,a=t.textarea;t.contextMenuPending&&t.contextMenuPending();var u=Zr(i,e),f=r.scroller.scrollTop;if(!u||T)return;var d=i.options.resetSelectionOnContextMenu;d&&i.doc.sel.contains(u)==-1&&Pt(i,Jt)(i.doc,Pr(u),fe);var m=a.style.cssText,v=t.wrapper.style.cssText,A=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",a.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-A.top-5)+"px; left: "+(e.clientX-A.left-5)+`px;
z-index: 1000; background: `+(w?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var N;y&&(N=window.scrollY),r.input.focus(),y&&window.scrollTo(null,N),r.input.reset(),i.somethingSelected()||(a.value=t.prevInput=" "),t.contextMenuPending=j,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll);function q(){if(a.selectionStart!=null){var se=i.somethingSelected(),me="​"+(se?a.value:"");a.value="⇚",a.value=me,t.prevInput=se?"":"​",a.selectionStart=1,a.selectionEnd=me.length,r.selForContextMenu=i.doc.sel}}function j(){if(t.contextMenuPending==j&&(t.contextMenuPending=!1,t.wrapper.style.cssText=v,a.style.cssText=m,w&&C<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=f),a.selectionStart!=null)){(!w||w&&C<9)&&q();var se=0,me=function(){r.selForContextMenu==i.doc.sel&&a.selectionStart==0&&a.selectionEnd>0&&t.prevInput=="​"?Pt(i,u1)(i):se++<10?r.detectingSelectAll=setTimeout(me,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(me,200)}}if(w&&C>=9&&q(),ye){Rn(e);var Y=function(){Lt(window,"mouseup",Y),setTimeout(j,20)};Ne(window,"mouseup",Y)}else setTimeout(j,50)},_t.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},_t.prototype.setUneditable=function(){},_t.prototype.needsContentAttribute=!1;function Zp(e,t){if(t=t?He(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=le();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=d.getValue()}var a;if(e.form&&(Ne(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var u=e.form;a=u.submit;try{var f=u.submit=function(){r(),u.submit=a,u.submit(),u.submit=f}}catch{}}t.finishInit=function(m){m.save=r,m.getTextArea=function(){return e},m.toTextArea=function(){m.toTextArea=isNaN,r(),e.parentNode.removeChild(m.getWrapperElement()),e.style.display="",e.form&&(Lt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=a))}},e.style.display="none";var d=gt(function(m){return e.parentNode.insertBefore(m,e.nextSibling)},t);return d}function ed(e){e.off=Lt,e.on=Ne,e.wheelEventPixels=ap,e.Doc=ln,e.splitLines=cr,e.countColumn=qe,e.findColumn=Me,e.isWordChar=nt,e.Pass=ee,e.signal=Be,e.Line=vi,e.changeEnd=Or,e.scrollbarModel=ju,e.Pos=ce,e.cmpPos=k,e.modes=Zt,e.mimeModes=Xt,e.resolveMode=Yn,e.getMode=Jn,e.modeExtensions=sn,e.extendMode=on,e.copyState=Vt,e.startState=pr,e.innerMode=hr,e.commands=gs,e.keyMap=yr,e.keyName=T1,e.isModifierKey=_1,e.lookupKey=Ei,e.normalizeKeyMap=Lp,e.StringStream=mt,e.SharedTextMarker=ps,e.TextMarker=Rr,e.LineWidget=hs,e.e_preventDefault=St,e.e_stopPropagation=Vn,e.e_stop=Rn,e.addClass=Pe,e.contains=Q,e.rmClass=ke,e.keyNames=Mr}Up(gt),Vp(gt);var td="iter insert remove copy getEditor constructor".split(" ");for(var vo in ln.prototype)ln.prototype.hasOwnProperty(vo)&&z(td,vo)<0&&(gt.prototype[vo]=function(e){return function(){return e.apply(this.doc,arguments)}}(ln.prototype[vo]));return mn(ln),gt.inputStyles={textarea:_t,contenteditable:lt},gt.defineMode=function(e){!gt.defaults.mode&&e!="null"&&(gt.defaults.mode=e),Ar.apply(this,arguments)},gt.defineMIME=_n,gt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),gt.defineMIME("text/plain","null"),gt.defineExtension=function(e,t){gt.prototype[e]=t},gt.defineDocExtension=function(e,t){ln.prototype[e]=t},gt.fromTextArea=Zp,ed(gt),gt.version="5.65.3",gt})}(em)),To}var tm=wn();const nm=Zd(tm);var rm={};(function(n,o){(function(l){l(wn())})(function(l){l.defineMode("javascript",function(c,p){var g=c.indentUnit,_=p.statementIndent,S=p.jsonld,w=p.json||S,C=p.trackScope!==!1,y=p.typescript,E=p.wordCharacters||/[\w$\xa1-\uffff]/,L=function(){function k(Yt){return{type:Yt,style:"keyword"}}var P=k("keyword a"),ne=k("keyword b"),he=k("keyword c"),je=k("keyword d"),Ze=k("operator"),Se={type:"atom",style:"atom"};return{if:k("if"),while:P,with:P,else:ne,do:ne,try:ne,finally:ne,return:je,break:je,continue:je,new:k("new"),delete:he,void:he,throw:he,debugger:k("debugger"),var:k("var"),const:k("var"),let:k("var"),function:k("function"),catch:k("catch"),for:k("for"),switch:k("switch"),case:k("case"),default:k("default"),in:Ze,typeof:Ze,instanceof:Ze,true:Se,false:Se,null:Se,undefined:Se,NaN:Se,Infinity:Se,this:k("this"),class:k("class"),super:k("atom"),yield:he,export:k("export"),import:k("import"),extends:he,await:he}}(),T=/[+\-*&%=<>!?|~^@]/,F=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function R(k){for(var P=!1,ne,he=!1;(ne=k.next())!=null;){if(!P){if(ne=="/"&&!he)return;ne=="["?he=!0:he&&ne=="]"&&(he=!1)}P=!P&&ne=="\\"}}var W,D;function I(k,P,ne){return W=k,D=ne,P}function M(k,P){var ne=k.next();if(ne=='"'||ne=="'")return P.tokenize=B(ne),P.tokenize(k,P);if(ne=="."&&k.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return I("number","number");if(ne=="."&&k.match(".."))return I("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ne))return I(ne);if(ne=="="&&k.eat(">"))return I("=>","operator");if(ne=="0"&&k.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return I("number","number");if(/\d/.test(ne))return k.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),I("number","number");if(ne=="/")return k.eat("*")?(P.tokenize=U,U(k,P)):k.eat("/")?(k.skipToEnd(),I("comment","comment")):ce(k,P,1)?(R(k),k.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),I("regexp","string-2")):(k.eat("="),I("operator","operator",k.current()));if(ne=="`")return P.tokenize=ae,ae(k,P);if(ne=="#"&&k.peek()=="!")return k.skipToEnd(),I("meta","meta");if(ne=="#"&&k.eatWhile(E))return I("variable","property");if(ne=="<"&&k.match("!--")||ne=="-"&&k.match("->")&&!/\S/.test(k.string.slice(0,k.start)))return k.skipToEnd(),I("comment","comment");if(T.test(ne))return(ne!=">"||!P.lexical||P.lexical.type!=">")&&(k.eat("=")?(ne=="!"||ne=="=")&&k.eat("="):/[<>*+\-|&?]/.test(ne)&&(k.eat(ne),ne==">"&&k.eat(ne))),ne=="?"&&k.eat(".")?I("."):I("operator","operator",k.current());if(E.test(ne)){k.eatWhile(E);var he=k.current();if(P.lastType!="."){if(L.propertyIsEnumerable(he)){var je=L[he];return I(je.type,je.style,he)}if(he=="async"&&k.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return I("async","keyword",he)}return I("variable","variable",he)}}function B(k){return function(P,ne){var he=!1,je;if(S&&P.peek()=="@"&&P.match(F))return ne.tokenize=M,I("jsonld-keyword","meta");for(;(je=P.next())!=null&&!(je==k&&!he);)he=!he&&je=="\\";return he||(ne.tokenize=M),I("string","string")}}function U(k,P){for(var ne=!1,he;he=k.next();){if(he=="/"&&ne){P.tokenize=M;break}ne=he=="*"}return I("comment","comment")}function ae(k,P){for(var ne=!1,he;(he=k.next())!=null;){if(!ne&&(he=="`"||he=="$"&&k.eat("{"))){P.tokenize=M;break}ne=!ne&&he=="\\"}return I("quasi","string-2",k.current())}var ue="([{}])";function te(k,P){P.fatArrowAt&&(P.fatArrowAt=null);var ne=k.string.indexOf("=>",k.start);if(!(ne<0)){if(y){var he=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(k.string.slice(k.start,ne));he&&(ne=he.index)}for(var je=0,Ze=!1,Se=ne-1;Se>=0;--Se){var Yt=k.string.charAt(Se),Sn=ue.indexOf(Yt);if(Sn>=0&&Sn<3){if(!je){++Se;break}if(--je==0){Yt=="("&&(Ze=!0);break}}else if(Sn>=3&&Sn<6)++je;else if(E.test(Yt))Ze=!0;else if(/["'\/`]/.test(Yt))for(;;--Se){if(Se==0)return;var gi=k.string.charAt(Se-1);if(gi==Yt&&k.string.charAt(Se-2)!="\\"){Se--;break}}else if(Ze&&!je){++Se;break}}Ze&&!je&&(P.fatArrowAt=Se)}}var ye={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function ge(k,P,ne,he,je,Ze){this.indented=k,this.column=P,this.type=ne,this.prev=je,this.info=Ze,he!=null&&(this.align=he)}function ke(k,P){if(!C)return!1;for(var ne=k.localVars;ne;ne=ne.next)if(ne.name==P)return!0;for(var he=k.context;he;he=he.prev)for(var ne=he.vars;ne;ne=ne.next)if(ne.name==P)return!0}function Te(k,P,ne,he,je){var Ze=k.cc;for(G.state=k,G.stream=je,G.marked=null,G.cc=Ze,G.style=P,k.lexical.hasOwnProperty("align")||(k.lexical.align=!0);;){var Se=Ze.length?Ze.pop():w?de:fe;if(Se(ne,he)){for(;Ze.length&&Ze[Ze.length-1].lex;)Ze.pop()();return G.marked?G.marked:ne=="variable"&&ke(k,he)?"variable-2":P}}}var G={state:null,column:null,marked:null,cc:null};function K(){for(var k=arguments.length-1;k>=0;k--)G.cc.push(arguments[k])}function b(){return K.apply(null,arguments),!0}function oe(k,P){for(var ne=P;ne;ne=ne.next)if(ne.name==k)return!0;return!1}function Q(k){var P=G.state;if(G.marked="def",!!C){if(P.context){if(P.lexical.info=="var"&&P.context&&P.context.block){var ne=le(k,P.context);if(ne!=null){P.context=ne;return}}else if(!oe(k,P.localVars)){P.localVars=new Fe(k,P.localVars);return}}p.globalVars&&!oe(k,P.globalVars)&&(P.globalVars=new Fe(k,P.globalVars))}}function le(k,P){if(P)if(P.block){var ne=le(k,P.prev);return ne?ne==P.prev?P:new Ae(ne,P.vars,!0):null}else return oe(k,P.vars)?P:new Ae(P.prev,new Fe(k,P.vars),!1);else return null}function Pe(k){return k=="public"||k=="private"||k=="protected"||k=="abstract"||k=="readonly"}function Ae(k,P,ne){this.prev=k,this.vars=P,this.block=ne}function Fe(k,P){this.name=k,this.next=P}var Qe=new Fe("this",new Fe("arguments",null));function He(){G.state.context=new Ae(G.state.context,G.state.localVars,!1),G.state.localVars=Qe}function qe(){G.state.context=new Ae(G.state.context,G.state.localVars,!0),G.state.localVars=null}He.lex=qe.lex=!0;function X(){G.state.localVars=G.state.context.vars,G.state.context=G.state.context.prev}X.lex=!0;function z(k,P){var ne=function(){var he=G.state,je=he.indented;if(he.lexical.type=="stat")je=he.lexical.indented;else for(var Ze=he.lexical;Ze&&Ze.type==")"&&Ze.align;Ze=Ze.prev)je=Ze.indented;he.lexical=new ge(je,G.stream.column(),k,null,he.lexical,P)};return ne.lex=!0,ne}function V(){var k=G.state;k.lexical.prev&&(k.lexical.type==")"&&(k.indented=k.lexical.indented),k.lexical=k.lexical.prev)}V.lex=!0;function ee(k){function P(ne){return ne==k?b():k==";"||ne=="}"||ne==")"||ne=="]"?K():b(P)}return P}function fe(k,P){return k=="var"?b(z("vardef",P),lr,ee(";"),V):k=="keyword a"?b(z("form"),et,fe,V):k=="keyword b"?b(z("form"),fe,V):k=="keyword d"?G.stream.match(/^\s*$/,!1)?b():b(z("stat"),Le,ee(";"),V):k=="debugger"?b(ee(";")):k=="{"?b(z("}"),qe,Wt,V,X):k==";"?b():k=="if"?(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==V&&G.state.cc.pop()(),b(z("form"),et,fe,V,Cr)):k=="function"?b(Zt):k=="for"?b(z("form"),qe,Ir,fe,X,V):k=="class"||y&&P=="interface"?(G.marked="keyword",b(z("form",k=="class"?k:P),Jn,V)):k=="variable"?y&&P=="declare"?(G.marked="keyword",b(fe)):y&&(P=="module"||P=="enum"||P=="type")&&G.stream.match(/^\s*\w/,!1)?(G.marked="keyword",P=="enum"?b(Pn):P=="type"?b(Ar,ee("operator"),Be,ee(";")):b(z("form"),Et,ee("{"),z("}"),Wt,V,V)):y&&P=="namespace"?(G.marked="keyword",b(z("form"),de,fe,V)):y&&P=="abstract"?(G.marked="keyword",b(fe)):b(z("stat"),Ve):k=="switch"?b(z("form"),et,ee("{"),z("}","switch"),qe,Wt,V,V,X):k=="case"?b(de,ee(":")):k=="default"?b(ee(":")):k=="catch"?b(z("form"),He,ve,fe,V,X):k=="export"?b(z("stat"),hr,V):k=="import"?b(z("stat"),mt,V):k=="async"?b(fe):P=="@"?b(de,fe):K(z("stat"),de,ee(";"),V)}function ve(k){if(k=="(")return b(_n,ee(")"))}function de(k,P){return Je(k,P,!1)}function Me(k,P){return Je(k,P,!0)}function et(k){return k!="("?K():b(z(")"),Le,ee(")"),V)}function Je(k,P,ne){if(G.state.fatArrowAt==G.stream.start){var he=ne?nt:rn;if(k=="(")return b(He,z(")"),ft(_n,")"),V,ee("=>"),he,X);if(k=="variable")return K(He,Et,ee("=>"),he,X)}var je=ne?Xe:ze;return ye.hasOwnProperty(k)?b(je):k=="function"?b(Zt,je):k=="class"||y&&P=="interface"?(G.marked="keyword",b(z("form"),Yn,V)):k=="keyword c"||k=="async"?b(ne?Me:de):k=="("?b(z(")"),Le,ee(")"),V,je):k=="operator"||k=="spread"?b(ne?Me:de):k=="["?b(z("]"),rt,V,je):k=="{"?Dn(dn,"}",null,je):k=="quasi"?K(at,je):k=="new"?b($(ne)):b()}function Le(k){return k.match(/[;\}\)\],]/)?K():K(de)}function ze(k,P){return k==","?b(Le):Xe(k,P,!1)}function Xe(k,P,ne){var he=ne==!1?ze:Xe,je=ne==!1?de:Me;if(k=="=>")return b(He,ne?nt:rn,X);if(k=="operator")return/\+\+|--/.test(P)||y&&P=="!"?b(he):y&&P=="<"&&G.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?b(z(">"),ft(Be,">"),V,he):P=="?"?b(de,ee(":"),je):b(je);if(k=="quasi")return K(at,he);if(k!=";"){if(k=="(")return Dn(Me,")","call",he);if(k==".")return b(It,he);if(k=="[")return b(z("]"),Le,ee("]"),V,he);if(y&&P=="as")return G.marked="keyword",b(Be,he);if(k=="regexp")return G.state.lastType=G.marked="operator",G.stream.backUp(G.stream.pos-G.stream.start-1),b(je)}}function at(k,P){return k!="quasi"?K():P.slice(P.length-2)!="${"?b(at):b(Le,ut)}function ut(k){if(k=="}")return G.marked="string-2",G.state.tokenize=ae,b(at)}function rn(k){return te(G.stream,G.state),K(k=="{"?fe:de)}function nt(k){return te(G.stream,G.state),K(k=="{"?fe:Me)}function $(k){return function(P){return P=="."?b(k?Z:pe):P=="variable"&&y?b(Rn,k?Xe:ze):K(k?Me:de)}}function pe(k,P){if(P=="target")return G.marked="keyword",b(ze)}function Z(k,P){if(P=="target")return G.marked="keyword",b(Xe)}function Ve(k){return k==":"?b(V,fe):K(ze,ee(";"),V)}function It(k){if(k=="variable")return G.marked="property",b()}function dn(k,P){if(k=="async")return G.marked="property",b(dn);if(k=="variable"||G.style=="keyword"){if(G.marked="property",P=="get"||P=="set")return b(Xr);var ne;return y&&G.state.fatArrowAt==G.stream.start&&(ne=G.stream.match(/^\s*:\s*/,!1))&&(G.state.fatArrowAt=G.stream.pos+ne[0].length),b(Gt)}else{if(k=="number"||k=="string")return G.marked=S?"property":G.style+" property",b(Gt);if(k=="jsonld-keyword")return b(Gt);if(y&&Pe(P))return G.marked="keyword",b(dn);if(k=="[")return b(de,xn,ee("]"),Gt);if(k=="spread")return b(Me,Gt);if(P=="*")return G.marked="keyword",b(dn);if(k==":")return K(Gt)}}function Xr(k){return k!="variable"?K(Gt):(G.marked="property",b(Zt))}function Gt(k){if(k==":")return b(Me);if(k=="(")return K(Zt)}function ft(k,P,ne){function he(je,Ze){if(ne?ne.indexOf(je)>-1:je==","){var Se=G.state.lexical;return Se.info=="call"&&(Se.pos=(Se.pos||0)+1),b(function(Yt,Sn){return Yt==P||Sn==P?K():K(k)},he)}return je==P||Ze==P?b():ne&&ne.indexOf(";")>-1?K(k):b(ee(P))}return function(je,Ze){return je==P||Ze==P?b():K(k,he)}}function Dn(k,P,ne){for(var he=3;he<arguments.length;he++)G.cc.push(arguments[he]);return b(z(P,ne),ft(k,P),V)}function Wt(k){return k=="}"?b():K(fe,Wt)}function xn(k,P){if(y){if(k==":")return b(Be);if(P=="?")return b(xn)}}function Ne(k,P){if(y&&(k==":"||P=="in"))return b(Be)}function Kn(k){if(y&&k==":")return G.stream.match(/^\s*\w+\s+is\b/,!1)?b(de,Lt,Be):b(Be)}function Lt(k,P){if(P=="is")return G.marked="keyword",b()}function Be(k,P){if(P=="keyof"||P=="typeof"||P=="infer"||P=="readonly")return G.marked="keyword",b(P=="typeof"?Me:Be);if(k=="variable"||P=="void")return G.marked="type",b(Kt);if(P=="|"||P=="&")return b(Be);if(k=="string"||k=="number"||k=="atom")return b(Kt);if(k=="[")return b(z("]"),ft(Be,"]",","),V,Kt);if(k=="{")return b(z("}"),Xn,V,Kt);if(k=="(")return b(ft(Vn,")"),dt,Kt);if(k=="<")return b(ft(Be,">"),Be);if(k=="quasi")return K(mn,Kt)}function dt(k){if(k=="=>")return b(Be)}function Xn(k){return k.match(/[\}\)\]]/)?b():k==","||k==";"?b(Xn):K(xt,Xn)}function xt(k,P){if(k=="variable"||G.style=="keyword")return G.marked="property",b(xt);if(P=="?"||k=="number"||k=="string")return b(xt);if(k==":")return b(Be);if(k=="[")return b(ee("variable"),Ne,ee("]"),xt);if(k=="(")return K(Xt,xt);if(!k.match(/[;\}\)\],]/))return b()}function mn(k,P){return k!="quasi"?K():P.slice(P.length-2)!="${"?b(mn):b(Be,St)}function St(k){if(k=="}")return G.marked="string-2",G.state.tokenize=ae,b(mn)}function Vn(k,P){return k=="variable"&&G.stream.match(/^\s*[?:]/,!1)||P=="?"?b(Vn):k==":"?b(Be):k=="spread"?b(Vn):K(Be)}function Kt(k,P){if(P=="<")return b(z(">"),ft(Be,">"),V,Kt);if(P=="|"||k=="."||P=="&")return b(Be);if(k=="[")return b(Be,ee("]"),Kt);if(P=="extends"||P=="implements")return G.marked="keyword",b(Be);if(P=="?")return b(Be,ee(":"),Be)}function Rn(k,P){if(P=="<")return b(z(">"),ft(Be,">"),V,Kt)}function Ln(){return K(Be,Sr)}function Sr(k,P){if(P=="=")return b(Be)}function lr(k,P){return P=="enum"?(G.marked="keyword",b(Pn)):K(Et,xn,gn,cr)}function Et(k,P){if(y&&Pe(P))return G.marked="keyword",b(Et);if(k=="variable")return Q(P),b();if(k=="spread")return b(Et);if(k=="[")return Dn(ur,"]");if(k=="{")return Dn(Tr,"}")}function Tr(k,P){return k=="variable"&&!G.stream.match(/^\s*:/,!1)?(Q(P),b(gn)):(k=="variable"&&(G.marked="property"),k=="spread"?b(Et):k=="}"?K():k=="["?b(de,ee("]"),ee(":"),Tr):b(ee(":"),Et,gn))}function ur(){return K(Et,gn)}function gn(k,P){if(P=="=")return b(Me)}function cr(k){if(k==",")return b(lr)}function Cr(k,P){if(k=="keyword b"&&P=="else")return b(z("form","else"),fe,V)}function Ir(k,P){if(P=="await")return b(Ir);if(k=="(")return b(z(")"),fr,V)}function fr(k){return k=="var"?b(lr,En):k=="variable"?b(En):K(En)}function En(k,P){return k==")"?b():k==";"?b(En):P=="in"||P=="of"?(G.marked="keyword",b(de,En)):K(de,En)}function Zt(k,P){if(P=="*")return G.marked="keyword",b(Zt);if(k=="variable")return Q(P),b(Zt);if(k=="(")return b(He,z(")"),ft(_n,")"),V,Kn,fe,X);if(y&&P=="<")return b(z(">"),ft(Ln,">"),V,Zt)}function Xt(k,P){if(P=="*")return G.marked="keyword",b(Xt);if(k=="variable")return Q(P),b(Xt);if(k=="(")return b(He,z(")"),ft(_n,")"),V,Kn,X);if(y&&P=="<")return b(z(">"),ft(Ln,">"),V,Xt)}function Ar(k,P){if(k=="keyword"||k=="variable")return G.marked="type",b(Ar);if(P=="<")return b(z(">"),ft(Ln,">"),V)}function _n(k,P){return P=="@"&&b(de,_n),k=="spread"?b(_n):y&&Pe(P)?(G.marked="keyword",b(_n)):y&&k=="this"?b(xn,gn):K(Et,xn,gn)}function Yn(k,P){return k=="variable"?Jn(k,P):sn(k,P)}function Jn(k,P){if(k=="variable")return Q(P),b(sn)}function sn(k,P){if(P=="<")return b(z(">"),ft(Ln,">"),V,sn);if(P=="extends"||P=="implements"||y&&k==",")return P=="implements"&&(G.marked="keyword"),b(y?Be:de,sn);if(k=="{")return b(z("}"),on,V)}function on(k,P){if(k=="async"||k=="variable"&&(P=="static"||P=="get"||P=="set"||y&&Pe(P))&&G.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return G.marked="keyword",b(on);if(k=="variable"||G.style=="keyword")return G.marked="property",b(Vt,on);if(k=="number"||k=="string")return b(Vt,on);if(k=="[")return b(de,xn,ee("]"),Vt,on);if(P=="*")return G.marked="keyword",b(on);if(y&&k=="(")return K(Xt,on);if(k==";"||k==",")return b(on);if(k=="}")return b();if(P=="@")return b(de,on)}function Vt(k,P){if(P=="!"||P=="?")return b(Vt);if(k==":")return b(Be,gn);if(P=="=")return b(Me);var ne=G.state.lexical.prev,he=ne&&ne.info=="interface";return K(he?Xt:Zt)}function hr(k,P){return P=="*"?(G.marked="keyword",b(en,ee(";"))):P=="default"?(G.marked="keyword",b(de,ee(";"))):k=="{"?b(ft(pr,"}"),en,ee(";")):K(fe)}function pr(k,P){if(P=="as")return G.marked="keyword",b(ee("variable"));if(k=="variable")return K(Me,pr)}function mt(k){return k=="string"?b():k=="("?K(de):k=="."?K(ze):K(Ie,Nn,en)}function Ie(k,P){return k=="{"?Dn(Ie,"}"):(k=="variable"&&Q(P),P=="*"&&(G.marked="keyword"),b(Vr))}function Nn(k){if(k==",")return b(Ie,Nn)}function Vr(k,P){if(P=="as")return G.marked="keyword",b(Ie)}function en(k,P){if(P=="from")return G.marked="keyword",b(de)}function rt(k){return k=="]"?b():K(ft(Me,"]"))}function Pn(){return K(z("form"),Et,ee("{"),z("}"),ft(dr,"}"),V,V)}function dr(){return K(Et,gn)}function Yr(k,P){return k.lastType=="operator"||k.lastType==","||T.test(P.charAt(0))||/[,.]/.test(P.charAt(0))}function ce(k,P,ne){return P.tokenize==M&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(P.lastType)||P.lastType=="quasi"&&/\{\s*$/.test(k.string.slice(0,k.pos-(ne||0)))}return{startState:function(k){var P={tokenize:M,lastType:"sof",cc:[],lexical:new ge((k||0)-g,0,"block",!1),localVars:p.localVars,context:p.localVars&&new Ae(null,null,!1),indented:k||0};return p.globalVars&&typeof p.globalVars=="object"&&(P.globalVars=p.globalVars),P},token:function(k,P){if(k.sol()&&(P.lexical.hasOwnProperty("align")||(P.lexical.align=!1),P.indented=k.indentation(),te(k,P)),P.tokenize!=U&&k.eatSpace())return null;var ne=P.tokenize(k,P);return W=="comment"?ne:(P.lastType=W=="operator"&&(D=="++"||D=="--")?"incdec":W,Te(P,ne,W,D,k))},indent:function(k,P){if(k.tokenize==U||k.tokenize==ae)return l.Pass;if(k.tokenize!=M)return 0;var ne=P&&P.charAt(0),he=k.lexical,je;if(!/^\s*else\b/.test(P))for(var Ze=k.cc.length-1;Ze>=0;--Ze){var Se=k.cc[Ze];if(Se==V)he=he.prev;else if(Se!=Cr&&Se!=X)break}for(;(he.type=="stat"||he.type=="form")&&(ne=="}"||(je=k.cc[k.cc.length-1])&&(je==ze||je==Xe)&&!/^[,\.=+\-*:?[\(]/.test(P));)he=he.prev;_&&he.type==")"&&he.prev.type=="stat"&&(he=he.prev);var Yt=he.type,Sn=ne==Yt;return Yt=="vardef"?he.indented+(k.lastType=="operator"||k.lastType==","?he.info.length+1:0):Yt=="form"&&ne=="{"?he.indented:Yt=="form"?he.indented+g:Yt=="stat"?he.indented+(Yr(k,P)?_||g:0):he.info=="switch"&&!Sn&&p.doubleIndentSwitch!=!1?he.indented+(/^(?:case|default)\b/.test(P)?g:2*g):he.align?he.column+(Sn?0:1):he.indented+(Sn?0:g)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:w?null:"/*",blockCommentEnd:w?null:"*/",blockCommentContinue:w?null:" * ",lineComment:w?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:w?"json":"javascript",jsonldMode:S,jsonMode:w,expressionAllowed:ce,skipExpression:function(k){Te(k,"atom","atom","true",new l.StringStream("",2,null))}}}),l.registerHelper("wordChars","javascript",/[\w$]/),l.defineMIME("text/javascript","javascript"),l.defineMIME("text/ecmascript","javascript"),l.defineMIME("application/javascript","javascript"),l.defineMIME("application/x-javascript","javascript"),l.defineMIME("application/ecmascript","javascript"),l.defineMIME("application/json",{name:"javascript",json:!0}),l.defineMIME("application/x-json",{name:"javascript",json:!0}),l.defineMIME("application/manifest+json",{name:"javascript",json:!0}),l.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),l.defineMIME("text/typescript",{name:"javascript",typescript:!0}),l.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var im={};(function(n,o){(function(l){l(wn())})(function(l){l.defineMode("css",function(ge,ke){var Te=ke.inline;ke.propertyKeywords||(ke=l.resolveMode("text/css"));var G=ge.indentUnit,K=ke.tokenHooks,b=ke.documentTypes||{},oe=ke.mediaTypes||{},Q=ke.mediaFeatures||{},le=ke.mediaValueKeywords||{},Pe=ke.propertyKeywords||{},Ae=ke.nonStandardPropertyKeywords||{},Fe=ke.fontProperties||{},Qe=ke.counterDescriptors||{},He=ke.colorKeywords||{},qe=ke.valueKeywords||{},X=ke.allowNested,z=ke.lineComment,V=ke.supportsAtComponent===!0,ee=ge.highlightNonStandardPropertyKeywords!==!1,fe,ve;function de($,pe){return fe=pe,$}function Me($,pe){var Z=$.next();if(K[Z]){var Ve=K[Z]($,pe);if(Ve!==!1)return Ve}if(Z=="@")return $.eatWhile(/[\w\\\-]/),de("def",$.current());if(Z=="="||(Z=="~"||Z=="|")&&$.eat("="))return de(null,"compare");if(Z=='"'||Z=="'")return pe.tokenize=et(Z),pe.tokenize($,pe);if(Z=="#")return $.eatWhile(/[\w\\\-]/),de("atom","hash");if(Z=="!")return $.match(/^\s*\w*/),de("keyword","important");if(/\d/.test(Z)||Z=="."&&$.eat(/\d/))return $.eatWhile(/[\w.%]/),de("number","unit");if(Z==="-"){if(/[\d.]/.test($.peek()))return $.eatWhile(/[\w.%]/),de("number","unit");if($.match(/^-[\w\\\-]*/))return $.eatWhile(/[\w\\\-]/),$.match(/^\s*:/,!1)?de("variable-2","variable-definition"):de("variable-2","variable");if($.match(/^\w+-/))return de("meta","meta")}else return/[,+>*\/]/.test(Z)?de(null,"select-op"):Z=="."&&$.match(/^-?[_a-z][_a-z0-9-]*/i)?de("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(Z)?de(null,Z):$.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test($.current())&&(pe.tokenize=Je),de("variable callee","variable")):/[\w\\\-]/.test(Z)?($.eatWhile(/[\w\\\-]/),de("property","word")):de(null,null)}function et($){return function(pe,Z){for(var Ve=!1,It;(It=pe.next())!=null;){if(It==$&&!Ve){$==")"&&pe.backUp(1);break}Ve=!Ve&&It=="\\"}return(It==$||!Ve&&$!=")")&&(Z.tokenize=null),de("string","string")}}function Je($,pe){return $.next(),$.match(/^\s*[\"\')]/,!1)?pe.tokenize=null:pe.tokenize=et(")"),de(null,"(")}function Le($,pe,Z){this.type=$,this.indent=pe,this.prev=Z}function ze($,pe,Z,Ve){return $.context=new Le(Z,pe.indentation()+(Ve===!1?0:G),$.context),Z}function Xe($){return $.context.prev&&($.context=$.context.prev),$.context.type}function at($,pe,Z){return nt[Z.context.type]($,pe,Z)}function ut($,pe,Z,Ve){for(var It=Ve||1;It>0;It--)Z.context=Z.context.prev;return at($,pe,Z)}function rn($){var pe=$.current().toLowerCase();qe.hasOwnProperty(pe)?ve="atom":He.hasOwnProperty(pe)?ve="keyword":ve="variable"}var nt={};return nt.top=function($,pe,Z){if($=="{")return ze(Z,pe,"block");if($=="}"&&Z.context.prev)return Xe(Z);if(V&&/@component/i.test($))return ze(Z,pe,"atComponentBlock");if(/^@(-moz-)?document$/i.test($))return ze(Z,pe,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test($))return ze(Z,pe,"atBlock");if(/^@(font-face|counter-style)/i.test($))return Z.stateArg=$,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test($))return"keyframes";if($&&$.charAt(0)=="@")return ze(Z,pe,"at");if($=="hash")ve="builtin";else if($=="word")ve="tag";else{if($=="variable-definition")return"maybeprop";if($=="interpolation")return ze(Z,pe,"interpolation");if($==":")return"pseudo";if(X&&$=="(")return ze(Z,pe,"parens")}return Z.context.type},nt.block=function($,pe,Z){if($=="word"){var Ve=pe.current().toLowerCase();return Pe.hasOwnProperty(Ve)?(ve="property","maybeprop"):Ae.hasOwnProperty(Ve)?(ve=ee?"string-2":"property","maybeprop"):X?(ve=pe.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(ve+=" error","maybeprop")}else return $=="meta"?"block":!X&&($=="hash"||$=="qualifier")?(ve="error","block"):nt.top($,pe,Z)},nt.maybeprop=function($,pe,Z){return $==":"?ze(Z,pe,"prop"):at($,pe,Z)},nt.prop=function($,pe,Z){if($==";")return Xe(Z);if($=="{"&&X)return ze(Z,pe,"propBlock");if($=="}"||$=="{")return ut($,pe,Z);if($=="(")return ze(Z,pe,"parens");if($=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(pe.current()))ve+=" error";else if($=="word")rn(pe);else if($=="interpolation")return ze(Z,pe,"interpolation");return"prop"},nt.propBlock=function($,pe,Z){return $=="}"?Xe(Z):$=="word"?(ve="property","maybeprop"):Z.context.type},nt.parens=function($,pe,Z){return $=="{"||$=="}"?ut($,pe,Z):$==")"?Xe(Z):$=="("?ze(Z,pe,"parens"):$=="interpolation"?ze(Z,pe,"interpolation"):($=="word"&&rn(pe),"parens")},nt.pseudo=function($,pe,Z){return $=="meta"?"pseudo":$=="word"?(ve="variable-3",Z.context.type):at($,pe,Z)},nt.documentTypes=function($,pe,Z){return $=="word"&&b.hasOwnProperty(pe.current())?(ve="tag",Z.context.type):nt.atBlock($,pe,Z)},nt.atBlock=function($,pe,Z){if($=="(")return ze(Z,pe,"atBlock_parens");if($=="}"||$==";")return ut($,pe,Z);if($=="{")return Xe(Z)&&ze(Z,pe,X?"block":"top");if($=="interpolation")return ze(Z,pe,"interpolation");if($=="word"){var Ve=pe.current().toLowerCase();Ve=="only"||Ve=="not"||Ve=="and"||Ve=="or"?ve="keyword":oe.hasOwnProperty(Ve)?ve="attribute":Q.hasOwnProperty(Ve)?ve="property":le.hasOwnProperty(Ve)?ve="keyword":Pe.hasOwnProperty(Ve)?ve="property":Ae.hasOwnProperty(Ve)?ve=ee?"string-2":"property":qe.hasOwnProperty(Ve)?ve="atom":He.hasOwnProperty(Ve)?ve="keyword":ve="error"}return Z.context.type},nt.atComponentBlock=function($,pe,Z){return $=="}"?ut($,pe,Z):$=="{"?Xe(Z)&&ze(Z,pe,X?"block":"top",!1):($=="word"&&(ve="error"),Z.context.type)},nt.atBlock_parens=function($,pe,Z){return $==")"?Xe(Z):$=="{"||$=="}"?ut($,pe,Z,2):nt.atBlock($,pe,Z)},nt.restricted_atBlock_before=function($,pe,Z){return $=="{"?ze(Z,pe,"restricted_atBlock"):$=="word"&&Z.stateArg=="@counter-style"?(ve="variable","restricted_atBlock_before"):at($,pe,Z)},nt.restricted_atBlock=function($,pe,Z){return $=="}"?(Z.stateArg=null,Xe(Z)):$=="word"?(Z.stateArg=="@font-face"&&!Fe.hasOwnProperty(pe.current().toLowerCase())||Z.stateArg=="@counter-style"&&!Qe.hasOwnProperty(pe.current().toLowerCase())?ve="error":ve="property","maybeprop"):"restricted_atBlock"},nt.keyframes=function($,pe,Z){return $=="word"?(ve="variable","keyframes"):$=="{"?ze(Z,pe,"top"):at($,pe,Z)},nt.at=function($,pe,Z){return $==";"?Xe(Z):$=="{"||$=="}"?ut($,pe,Z):($=="word"?ve="tag":$=="hash"&&(ve="builtin"),"at")},nt.interpolation=function($,pe,Z){return $=="}"?Xe(Z):$=="{"||$==";"?ut($,pe,Z):($=="word"?ve="variable":$!="variable"&&$!="("&&$!=")"&&(ve="error"),"interpolation")},{startState:function($){return{tokenize:null,state:Te?"block":"top",stateArg:null,context:new Le(Te?"block":"top",$||0,null)}},token:function($,pe){if(!pe.tokenize&&$.eatSpace())return null;var Z=(pe.tokenize||Me)($,pe);return Z&&typeof Z=="object"&&(fe=Z[1],Z=Z[0]),ve=Z,fe!="comment"&&(pe.state=nt[pe.state](fe,$,pe)),ve},indent:function($,pe){var Z=$.context,Ve=pe&&pe.charAt(0),It=Z.indent;return Z.type=="prop"&&(Ve=="}"||Ve==")")&&(Z=Z.prev),Z.prev&&(Ve=="}"&&(Z.type=="block"||Z.type=="top"||Z.type=="interpolation"||Z.type=="restricted_atBlock")?(Z=Z.prev,It=Z.indent):(Ve==")"&&(Z.type=="parens"||Z.type=="atBlock_parens")||Ve=="{"&&(Z.type=="at"||Z.type=="atBlock"))&&(It=Math.max(0,Z.indent-G))),It},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:z,fold:"brace"}});function c(ge){for(var ke={},Te=0;Te<ge.length;++Te)ke[ge[Te].toLowerCase()]=!0;return ke}var p=["domain","regexp","url","url-prefix"],g=c(p),_=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],S=c(_),w=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],C=c(w),y=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],E=c(y),L=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],T=c(L),F=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],R=c(F),W=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],D=c(W),I=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],M=c(I),B=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],U=c(B),ae=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],ue=c(ae),te=p.concat(_).concat(w).concat(y).concat(L).concat(F).concat(B).concat(ae);l.registerHelper("hintWords","css",te);function ye(ge,ke){for(var Te=!1,G;(G=ge.next())!=null;){if(Te&&G=="/"){ke.tokenize=null;break}Te=G=="*"}return["comment","comment"]}l.defineMIME("text/css",{documentTypes:g,mediaTypes:S,mediaFeatures:C,mediaValueKeywords:E,propertyKeywords:T,nonStandardPropertyKeywords:R,fontProperties:D,counterDescriptors:M,colorKeywords:U,valueKeywords:ue,tokenHooks:{"/":function(ge,ke){return ge.eat("*")?(ke.tokenize=ye,ye(ge,ke)):!1}},name:"css"}),l.defineMIME("text/x-scss",{mediaTypes:S,mediaFeatures:C,mediaValueKeywords:E,propertyKeywords:T,nonStandardPropertyKeywords:R,colorKeywords:U,valueKeywords:ue,fontProperties:D,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ge,ke){return ge.eat("/")?(ge.skipToEnd(),["comment","comment"]):ge.eat("*")?(ke.tokenize=ye,ye(ge,ke)):["operator","operator"]},":":function(ge){return ge.match(/^\s*\{/,!1)?[null,null]:!1},$:function(ge){return ge.match(/^[\w-]+/),ge.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(ge){return ge.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),l.defineMIME("text/x-less",{mediaTypes:S,mediaFeatures:C,mediaValueKeywords:E,propertyKeywords:T,nonStandardPropertyKeywords:R,colorKeywords:U,valueKeywords:ue,fontProperties:D,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ge,ke){return ge.eat("/")?(ge.skipToEnd(),["comment","comment"]):ge.eat("*")?(ke.tokenize=ye,ye(ge,ke)):["operator","operator"]},"@":function(ge){return ge.eat("{")?[null,"interpolation"]:ge.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(ge.eatWhile(/[\w\\\-]/),ge.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),l.defineMIME("text/x-gss",{documentTypes:g,mediaTypes:S,mediaFeatures:C,propertyKeywords:T,nonStandardPropertyKeywords:R,fontProperties:D,counterDescriptors:M,colorKeywords:U,valueKeywords:ue,supportsAtComponent:!0,tokenHooks:{"/":function(ge,ke){return ge.eat("*")?(ke.tokenize=ye,ye(ge,ke)):!1}},name:"css",helperType:"gss"})})})();var rc={},ic;function sm(){return ic||(ic=1,function(n,o){(function(l){l(wn())})(function(l){var c={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},p={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};l.defineMode("xml",function(g,_){var S=g.indentUnit,w={},C=_.htmlMode?c:p;for(var y in C)w[y]=C[y];for(var y in _)w[y]=_[y];var E,L;function T(b,oe){function Q(Ae){return oe.tokenize=Ae,Ae(b,oe)}var le=b.next();if(le=="<")return b.eat("!")?b.eat("[")?b.match("CDATA[")?Q(W("atom","]]>")):null:b.match("--")?Q(W("comment","-->")):b.match("DOCTYPE",!0,!0)?(b.eatWhile(/[\w\._\-]/),Q(D(1))):null:b.eat("?")?(b.eatWhile(/[\w\._\-]/),oe.tokenize=W("meta","?>"),"meta"):(E=b.eat("/")?"closeTag":"openTag",oe.tokenize=F,"tag bracket");if(le=="&"){var Pe;return b.eat("#")?b.eat("x")?Pe=b.eatWhile(/[a-fA-F\d]/)&&b.eat(";"):Pe=b.eatWhile(/[\d]/)&&b.eat(";"):Pe=b.eatWhile(/[\w\.\-:]/)&&b.eat(";"),Pe?"atom":"error"}else return b.eatWhile(/[^&<]/),null}T.isInText=!0;function F(b,oe){var Q=b.next();if(Q==">"||Q=="/"&&b.eat(">"))return oe.tokenize=T,E=Q==">"?"endTag":"selfcloseTag","tag bracket";if(Q=="=")return E="equals",null;if(Q=="<"){oe.tokenize=T,oe.state=ae,oe.tagName=oe.tagStart=null;var le=oe.tokenize(b,oe);return le?le+" tag error":"tag error"}else return/[\'\"]/.test(Q)?(oe.tokenize=R(Q),oe.stringStartCol=b.column(),oe.tokenize(b,oe)):(b.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function R(b){var oe=function(Q,le){for(;!Q.eol();)if(Q.next()==b){le.tokenize=F;break}return"string"};return oe.isInAttribute=!0,oe}function W(b,oe){return function(Q,le){for(;!Q.eol();){if(Q.match(oe)){le.tokenize=T;break}Q.next()}return b}}function D(b){return function(oe,Q){for(var le;(le=oe.next())!=null;){if(le=="<")return Q.tokenize=D(b+1),Q.tokenize(oe,Q);if(le==">")if(b==1){Q.tokenize=T;break}else return Q.tokenize=D(b-1),Q.tokenize(oe,Q)}return"meta"}}function I(b){return b&&b.toLowerCase()}function M(b,oe,Q){this.prev=b.context,this.tagName=oe||"",this.indent=b.indented,this.startOfLine=Q,(w.doNotIndent.hasOwnProperty(oe)||b.context&&b.context.noIndent)&&(this.noIndent=!0)}function B(b){b.context&&(b.context=b.context.prev)}function U(b,oe){for(var Q;;){if(!b.context||(Q=b.context.tagName,!w.contextGrabbers.hasOwnProperty(I(Q))||!w.contextGrabbers[I(Q)].hasOwnProperty(I(oe))))return;B(b)}}function ae(b,oe,Q){return b=="openTag"?(Q.tagStart=oe.column(),ue):b=="closeTag"?te:ae}function ue(b,oe,Q){return b=="word"?(Q.tagName=oe.current(),L="tag",ke):w.allowMissingTagName&&b=="endTag"?(L="tag bracket",ke(b,oe,Q)):(L="error",ue)}function te(b,oe,Q){if(b=="word"){var le=oe.current();return Q.context&&Q.context.tagName!=le&&w.implicitlyClosed.hasOwnProperty(I(Q.context.tagName))&&B(Q),Q.context&&Q.context.tagName==le||w.matchClosing===!1?(L="tag",ye):(L="tag error",ge)}else return w.allowMissingTagName&&b=="endTag"?(L="tag bracket",ye(b,oe,Q)):(L="error",ge)}function ye(b,oe,Q){return b!="endTag"?(L="error",ye):(B(Q),ae)}function ge(b,oe,Q){return L="error",ye(b,oe,Q)}function ke(b,oe,Q){if(b=="word")return L="attribute",Te;if(b=="endTag"||b=="selfcloseTag"){var le=Q.tagName,Pe=Q.tagStart;return Q.tagName=Q.tagStart=null,b=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(I(le))?U(Q,le):(U(Q,le),Q.context=new M(Q,le,Pe==Q.indented)),ae}return L="error",ke}function Te(b,oe,Q){return b=="equals"?G:(w.allowMissing||(L="error"),ke(b,oe,Q))}function G(b,oe,Q){return b=="string"?K:b=="word"&&w.allowUnquoted?(L="string",ke):(L="error",ke(b,oe,Q))}function K(b,oe,Q){return b=="string"?K:ke(b,oe,Q)}return{startState:function(b){var oe={tokenize:T,state:ae,indented:b||0,tagName:null,tagStart:null,context:null};return b!=null&&(oe.baseIndent=b),oe},token:function(b,oe){if(!oe.tagName&&b.sol()&&(oe.indented=b.indentation()),b.eatSpace())return null;E=null;var Q=oe.tokenize(b,oe);return(Q||E)&&Q!="comment"&&(L=null,oe.state=oe.state(E||Q,b,oe),L&&(Q=L=="error"?Q+" error":L)),Q},indent:function(b,oe,Q){var le=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+S;if(le&&le.noIndent)return l.Pass;if(b.tokenize!=F&&b.tokenize!=T)return Q?Q.match(/^(\s*)/)[0].length:0;if(b.tagName)return w.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+S*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(oe))return 0;var Pe=oe&&/^<(\/)?([\w_:\.-]*)/.exec(oe);if(Pe&&Pe[1])for(;le;)if(le.tagName==Pe[2]){le=le.prev;break}else if(w.implicitlyClosed.hasOwnProperty(I(le.tagName)))le=le.prev;else break;else if(Pe)for(;le;){var Ae=w.contextGrabbers[I(le.tagName)];if(Ae&&Ae.hasOwnProperty(I(Pe[2])))le=le.prev;else break}for(;le&&le.prev&&!le.startOfLine;)le=le.prev;return le?le.indent+S:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(b){b.state==G&&(b.state=ke)},xmlCurrentTag:function(b){return b.tagName?{name:b.tagName,close:b.type=="closeTag"}:null},xmlCurrentContext:function(b){for(var oe=[],Q=b.context;Q;Q=Q.prev)oe.push(Q.tagName);return oe.reverse()}}}),l.defineMIME("text/xml","xml"),l.defineMIME("application/xml","xml"),l.mimeModes.hasOwnProperty("text/html")||l.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),rc}(function(n,o){(function(l){l(wn(),sm(),rm,im)})(function(l){var c={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function p(E,L,T){var F=E.current(),R=F.search(L);return R>-1?E.backUp(F.length-R):F.match(/<\/?$/)&&(E.backUp(F.length),E.match(L,!1)||E.match(F)),T}var g={};function _(E){var L=g[E];return L||(g[E]=new RegExp("\\s+"+E+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function S(E,L){var T=E.match(_(L));return T?/^\s*(.*?)\s*$/.exec(T[2])[1]:""}function w(E,L){return new RegExp((L?"^":"")+"</\\s*"+E+"\\s*>","i")}function C(E,L){for(var T in E)for(var F=L[T]||(L[T]=[]),R=E[T],W=R.length-1;W>=0;W--)F.unshift(R[W])}function y(E,L){for(var T=0;T<E.length;T++){var F=E[T];if(!F[0]||F[1].test(S(L,F[0])))return F[2]}}l.defineMode("htmlmixed",function(E,L){var T=l.getMode(E,{name:"xml",htmlMode:!0,multilineTagIndentFactor:L.multilineTagIndentFactor,multilineTagIndentPastTag:L.multilineTagIndentPastTag,allowMissingTagName:L.allowMissingTagName}),F={},R=L&&L.tags,W=L&&L.scriptTypes;if(C(c,F),R&&C(R,F),W)for(var D=W.length-1;D>=0;D--)F.script.unshift(["type",W[D].matches,W[D].mode]);function I(M,B){var U=T.token(M,B.htmlState),ae=/\btag\b/.test(U),ue;if(ae&&!/[<>\s\/]/.test(M.current())&&(ue=B.htmlState.tagName&&B.htmlState.tagName.toLowerCase())&&F.hasOwnProperty(ue))B.inTag=ue+" ";else if(B.inTag&&ae&&/>$/.test(M.current())){var te=/^([\S]+) (.*)/.exec(B.inTag);B.inTag=null;var ye=M.current()==">"&&y(F[te[1]],te[2]),ge=l.getMode(E,ye),ke=w(te[1],!0),Te=w(te[1],!1);B.token=function(G,K){return G.match(ke,!1)?(K.token=I,K.localState=K.localMode=null,null):p(G,Te,K.localMode.token(G,K.localState))},B.localMode=ge,B.localState=l.startState(ge,T.indent(B.htmlState,"",""))}else B.inTag&&(B.inTag+=M.current(),M.eol()&&(B.inTag+=" "));return U}return{startState:function(){var M=l.startState(T);return{token:I,inTag:null,localMode:null,localState:null,htmlState:M}},copyState:function(M){var B;return M.localState&&(B=l.copyState(M.localMode,M.localState)),{token:M.token,inTag:M.inTag,localMode:M.localMode,localState:B,htmlState:l.copyState(T,M.htmlState)}},token:function(M,B){return B.token(M,B)},indent:function(M,B,U){return!M.localMode||/^\s*<\//.test(B)?T.indent(M.htmlState,B,U):M.localMode.indent?M.localMode.indent(M.localState,B,U):l.Pass},innerMode:function(M){return{state:M.localState||M.htmlState,mode:M.localMode||T}}}},"xml","javascript","css"),l.defineMIME("text/html","htmlmixed")})})();(function(n,o){(function(l){l(wn())})(function(l){var c={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},p=l.Pos;l.defineOption("autoCloseBrackets",!1,function(D,I,M){M&&M!=l.Init&&(D.removeKeyMap(_),D.state.closeBrackets=null),I&&(S(g(I,"pairs")),D.state.closeBrackets=I,D.addKeyMap(_))});function g(D,I){return I=="pairs"&&typeof D=="string"?D:typeof D=="object"&&D[I]!=null?D[I]:c[I]}var _={Backspace:y,Enter:E};function S(D){for(var I=0;I<D.length;I++){var M=D.charAt(I),B="'"+M+"'";_[B]||(_[B]=w(M))}}S(c.pairs+"`");function w(D){return function(I){return F(I,D)}}function C(D){var I=D.state.closeBrackets;if(!I||I.override)return I;var M=D.getModeAt(D.getCursor());return M.closeBrackets||I}function y(D){var I=C(D);if(!I||D.getOption("disableInput"))return l.Pass;for(var M=g(I,"pairs"),B=D.listSelections(),U=0;U<B.length;U++){if(!B[U].empty())return l.Pass;var ae=R(D,B[U].head);if(!ae||M.indexOf(ae)%2!=0)return l.Pass}for(var U=B.length-1;U>=0;U--){var ue=B[U].head;D.replaceRange("",p(ue.line,ue.ch-1),p(ue.line,ue.ch+1),"+delete")}}function E(D){var I=C(D),M=I&&g(I,"explode");if(!M||D.getOption("disableInput"))return l.Pass;for(var B=D.listSelections(),U=0;U<B.length;U++){if(!B[U].empty())return l.Pass;var ae=R(D,B[U].head);if(!ae||M.indexOf(ae)%2!=0)return l.Pass}D.operation(function(){var ue=D.lineSeparator()||`
`;D.replaceSelection(ue+ue,null),L(D,-1),B=D.listSelections();for(var te=0;te<B.length;te++){var ye=B[te].head.line;D.indentLine(ye,null,!0),D.indentLine(ye+1,null,!0)}})}function L(D,I){for(var M=[],B=D.listSelections(),U=0,ae=0;ae<B.length;ae++){var ue=B[ae];ue.head==D.getCursor()&&(U=ae);var te=ue.head.ch||I>0?{line:ue.head.line,ch:ue.head.ch+I}:{line:ue.head.line-1};M.push({anchor:te,head:te})}D.setSelections(M,U)}function T(D){var I=l.cmpPos(D.anchor,D.head)>0;return{anchor:new p(D.anchor.line,D.anchor.ch+(I?-1:1)),head:new p(D.head.line,D.head.ch+(I?1:-1))}}function F(D,I){var M=C(D);if(!M||D.getOption("disableInput"))return l.Pass;var B=g(M,"pairs"),U=B.indexOf(I);if(U==-1)return l.Pass;for(var ae=g(M,"closeBefore"),ue=g(M,"triples"),te=B.charAt(U+1)==I,ye=D.listSelections(),ge=U%2==0,ke,Te=0;Te<ye.length;Te++){var G=ye[Te],K=G.head,b,oe=D.getRange(K,p(K.line,K.ch+1));if(ge&&!G.empty())b="surround";else if((te||!ge)&&oe==I)te&&W(D,K)?b="both":ue.indexOf(I)>=0&&D.getRange(K,p(K.line,K.ch+3))==I+I+I?b="skipThree":b="skip";else if(te&&K.ch>1&&ue.indexOf(I)>=0&&D.getRange(p(K.line,K.ch-2),K)==I+I){if(K.ch>2&&/\bstring/.test(D.getTokenTypeAt(p(K.line,K.ch-2))))return l.Pass;b="addFour"}else if(te){var Q=K.ch==0?" ":D.getRange(p(K.line,K.ch-1),K);if(!l.isWordChar(oe)&&Q!=I&&!l.isWordChar(Q))b="both";else return l.Pass}else if(ge&&(oe.length===0||/\s/.test(oe)||ae.indexOf(oe)>-1))b="both";else return l.Pass;if(!ke)ke=b;else if(ke!=b)return l.Pass}var le=U%2?B.charAt(U-1):I,Pe=U%2?I:B.charAt(U+1);D.operation(function(){if(ke=="skip")L(D,1);else if(ke=="skipThree")L(D,3);else if(ke=="surround"){for(var Ae=D.getSelections(),Fe=0;Fe<Ae.length;Fe++)Ae[Fe]=le+Ae[Fe]+Pe;D.replaceSelections(Ae,"around"),Ae=D.listSelections().slice();for(var Fe=0;Fe<Ae.length;Fe++)Ae[Fe]=T(Ae[Fe]);D.setSelections(Ae)}else ke=="both"?(D.replaceSelection(le+Pe,null),D.triggerElectric(le+Pe),L(D,-1)):ke=="addFour"&&(D.replaceSelection(le+le+le+le,"before"),L(D,1))})}function R(D,I){var M=D.getRange(p(I.line,I.ch-1),p(I.line,I.ch+1));return M.length==2?M:null}function W(D,I){var M=D.getTokenAt(p(I.line,I.ch+1));return/\bstring/.test(M.type)&&M.start==I.ch&&(I.ch==0||!/\bstring/.test(D.getTokenTypeAt(I)))}})})();var sc={},oc;function om(){return oc||(oc=1,function(n,o){(function(l){l(wn())})(function(l){var c=l.Pos;function p(I,M){return I.line-M.line||I.ch-M.ch}var g="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",_=g+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",S=new RegExp("<(/?)(["+g+"]["+_+"]*)","g");function w(I,M,B,U){this.line=M,this.ch=B,this.cm=I,this.text=I.getLine(M),this.min=U?Math.max(U.from,I.firstLine()):I.firstLine(),this.max=U?Math.min(U.to-1,I.lastLine()):I.lastLine()}function C(I,M){var B=I.cm.getTokenTypeAt(c(I.line,M));return B&&/\btag\b/.test(B)}function y(I){if(!(I.line>=I.max))return I.ch=0,I.text=I.cm.getLine(++I.line),!0}function E(I){if(!(I.line<=I.min))return I.text=I.cm.getLine(--I.line),I.ch=I.text.length,!0}function L(I){for(;;){var M=I.text.indexOf(">",I.ch);if(M==-1){if(y(I))continue;return}if(!C(I,M+1)){I.ch=M+1;continue}var B=I.text.lastIndexOf("/",M),U=B>-1&&!/\S/.test(I.text.slice(B+1,M));return I.ch=M+1,U?"selfClose":"regular"}}function T(I){for(;;){var M=I.ch?I.text.lastIndexOf("<",I.ch-1):-1;if(M==-1){if(E(I))continue;return}if(!C(I,M+1)){I.ch=M;continue}S.lastIndex=M,I.ch=M;var B=S.exec(I.text);if(B&&B.index==M)return B}}function F(I){for(;;){S.lastIndex=I.ch;var M=S.exec(I.text);if(!M){if(y(I))continue;return}if(!C(I,M.index+1)){I.ch=M.index+1;continue}return I.ch=M.index+M[0].length,M}}function R(I){for(;;){var M=I.ch?I.text.lastIndexOf(">",I.ch-1):-1;if(M==-1){if(E(I))continue;return}if(!C(I,M+1)){I.ch=M;continue}var B=I.text.lastIndexOf("/",M),U=B>-1&&!/\S/.test(I.text.slice(B+1,M));return I.ch=M+1,U?"selfClose":"regular"}}function W(I,M){for(var B=[];;){var U=F(I),ae,ue=I.line,te=I.ch-(U?U[0].length:0);if(!U||!(ae=L(I)))return;if(ae!="selfClose")if(U[1]){for(var ye=B.length-1;ye>=0;--ye)if(B[ye]==U[2]){B.length=ye;break}if(ye<0&&(!M||M==U[2]))return{tag:U[2],from:c(ue,te),to:c(I.line,I.ch)}}else B.push(U[2])}}function D(I,M){for(var B=[];;){var U=R(I);if(!U)return;if(U=="selfClose"){T(I);continue}var ae=I.line,ue=I.ch,te=T(I);if(!te)return;if(te[1])B.push(te[2]);else{for(var ye=B.length-1;ye>=0;--ye)if(B[ye]==te[2]){B.length=ye;break}if(ye<0&&(!M||M==te[2]))return{tag:te[2],from:c(I.line,I.ch),to:c(ae,ue)}}}}l.registerHelper("fold","xml",function(I,M){for(var B=new w(I,M.line,0);;){var U=F(B);if(!U||B.line!=M.line)return;var ae=L(B);if(!ae)return;if(!U[1]&&ae!="selfClose"){var ue=c(B.line,B.ch),te=W(B,U[2]);return te&&p(te.from,ue)>0?{from:ue,to:te.from}:null}}}),l.findMatchingTag=function(I,M,B){var U=new w(I,M.line,M.ch,B);if(!(U.text.indexOf(">")==-1&&U.text.indexOf("<")==-1)){var ae=L(U),ue=ae&&c(U.line,U.ch),te=ae&&T(U);if(!(!ae||!te||p(U,M)>0)){var ye={from:c(U.line,U.ch),to:ue,tag:te[2]};return ae=="selfClose"?{open:ye,close:null,at:"open"}:te[1]?{open:D(U,te[2]),close:ye,at:"close"}:(U=new w(I,ue.line,ue.ch,B),{open:ye,close:W(U,te[2]),at:"open"})}}},l.findEnclosingTag=function(I,M,B,U){for(var ae=new w(I,M.line,M.ch,B);;){var ue=D(ae,U);if(!ue)break;var te=new w(I,M.line,M.ch,B),ye=W(te,ue.tag);if(ye)return{open:ue,close:ye}}},l.scanForClosingTag=function(I,M,B,U){var ae=new w(I,M.line,M.ch,U?{from:0,to:U}:null);return W(ae,B)}})}()),sc}(function(n,o){(function(l){l(wn(),om())})(function(l){l.defineOption("autoCloseTags",!1,function(y,E,L){if(L!=l.Init&&L&&y.removeKeyMap("autoCloseTags"),!!E){var T={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(T["'/'"]=function(F){return S(F)}),(typeof E!="object"||E.whenOpening!==!1)&&(T["'>'"]=function(F){return g(F)}),y.addKeyMap(T)}});var c=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],p=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function g(y){if(y.getOption("disableInput"))return l.Pass;for(var E=y.listSelections(),L=[],T=y.getOption("autoCloseTags"),F=0;F<E.length;F++){if(!E[F].empty())return l.Pass;var R=E[F].head,W=y.getTokenAt(R),D=l.innerMode(y.getMode(),W.state),I=D.state,M=D.mode.xmlCurrentTag&&D.mode.xmlCurrentTag(I),B=M&&M.name;if(!B)return l.Pass;var U=D.mode.configuration=="html",ae=typeof T=="object"&&T.dontCloseTags||U&&c,ue=typeof T=="object"&&T.indentTags||U&&p;W.end>R.ch&&(B=B.slice(0,B.length-W.end+R.ch));var te=B.toLowerCase();if(!B||W.type=="string"&&(W.end!=R.ch||!/[\"\']/.test(W.string.charAt(W.string.length-1))||W.string.length==1)||W.type=="tag"&&M.close||W.string.indexOf("/")==R.ch-W.start-1||ae&&w(ae,te)>-1||C(y,D.mode.xmlCurrentContext&&D.mode.xmlCurrentContext(I)||[],B,R,!0))return l.Pass;var ye=typeof T=="object"&&T.emptyTags;if(ye&&w(ye,B)>-1){L[F]={text:"/>",newPos:l.Pos(R.line,R.ch+2)};continue}var ge=ue&&w(ue,te)>-1;L[F]={indent:ge,text:">"+(ge?`
`:"")+"</"+B+">",newPos:ge?l.Pos(R.line+1,0):l.Pos(R.line,R.ch+1)}}for(var ke=typeof T=="object"&&T.dontIndentOnAutoClose,F=E.length-1;F>=0;F--){var Te=L[F];y.replaceRange(Te.text,E[F].head,E[F].anchor,"+insert");var G=y.listSelections().slice(0);G[F]={head:Te.newPos,anchor:Te.newPos},y.setSelections(G),!ke&&Te.indent&&(y.indentLine(Te.newPos.line,null,!0),y.indentLine(Te.newPos.line+1,null,!0))}}function _(y,E){for(var L=y.listSelections(),T=[],F=E?"/":"</",R=y.getOption("autoCloseTags"),W=typeof R=="object"&&R.dontIndentOnSlash,D=0;D<L.length;D++){if(!L[D].empty())return l.Pass;var I=L[D].head,M=y.getTokenAt(I),B=l.innerMode(y.getMode(),M.state),U=B.state;if(E&&(M.type=="string"||M.string.charAt(0)!="<"||M.start!=I.ch-1))return l.Pass;var ae,ue=B.mode.name!="xml"&&y.getMode().name=="htmlmixed";if(ue&&B.mode.name=="javascript")ae=F+"script";else if(ue&&B.mode.name=="css")ae=F+"style";else{var te=B.mode.xmlCurrentContext&&B.mode.xmlCurrentContext(U),ye=te.length?te[te.length-1]:"";if(!te||te.length&&C(y,te,ye,I))return l.Pass;ae=F+ye}y.getLine(I.line).charAt(M.end)!=">"&&(ae+=">"),T[D]=ae}if(y.replaceSelections(T),L=y.listSelections(),!W)for(var D=0;D<L.length;D++)(D==L.length-1||L[D].head.line<L[D+1].head.line)&&y.indentLine(L[D].head.line)}function S(y){return y.getOption("disableInput")?l.Pass:_(y,!0)}l.commands.closeTag=function(y){return _(y)};function w(y,E){if(y.indexOf)return y.indexOf(E);for(var L=0,T=y.length;L<T;++L)if(y[L]==E)return L;return-1}function C(y,E,L,T,F){if(!l.scanForClosingTag)return!1;var R=Math.min(y.lastLine()+1,T.line+500),W=l.scanForClosingTag(y,T,null,R);if(!W||W.tag!=L)return!1;for(var D=F?1:0,I=E.length-1;I>=0&&E[I]==L;I--)++D;T=W.to;for(var I=1;I<D;I++){var M=l.scanForClosingTag(y,T,null,R);if(!M||M.tag!=L)return!1;T=M.to}return!0}})})();(function(n,o){(function(l){l(wn())})(function(l){var c={},p=/[^\s\u00a0]/,g=l.Pos,_=l.cmpPos;function S(y){var E=y.search(p);return E==-1?0:E}l.commands.toggleComment=function(y){y.toggleComment()},l.defineExtension("toggleComment",function(y){y||(y=c);for(var E=this,L=1/0,T=this.listSelections(),F=null,R=T.length-1;R>=0;R--){var W=T[R].from(),D=T[R].to();W.line>=L||(D.line>=L&&(D=g(L,0)),L=W.line,F==null?E.uncomment(W,D,y)?F="un":(E.lineComment(W,D,y),F="line"):F=="un"?E.uncomment(W,D,y):E.lineComment(W,D,y))}});function w(y,E,L){return/\bstring\b/.test(y.getTokenTypeAt(g(E.line,0)))&&!/^[\'\"\`]/.test(L)}function C(y,E){var L=y.getMode();return L.useInnerComments===!1||!L.innerMode?L:y.getModeAt(E)}l.defineExtension("lineComment",function(y,E,L){L||(L=c);var T=this,F=C(T,y),R=T.getLine(y.line);if(!(R==null||w(T,y,R))){var W=L.lineComment||F.lineComment;if(!W){(L.blockCommentStart||F.blockCommentStart)&&(L.fullLines=!0,T.blockComment(y,E,L));return}var D=Math.min(E.ch!=0||E.line==y.line?E.line+1:E.line,T.lastLine()+1),I=L.padding==null?" ":L.padding,M=L.commentBlankLines||y.line==E.line;T.operation(function(){if(L.indent){for(var B=null,U=y.line;U<D;++U){var ae=T.getLine(U),ue=ae.slice(0,S(ae));(B==null||B.length>ue.length)&&(B=ue)}for(var U=y.line;U<D;++U){var ae=T.getLine(U),te=B.length;!M&&!p.test(ae)||(ae.slice(0,te)!=B&&(te=S(ae)),T.replaceRange(B+W+I,g(U,0),g(U,te)))}}else for(var U=y.line;U<D;++U)(M||p.test(T.getLine(U)))&&T.replaceRange(W+I,g(U,0))})}}),l.defineExtension("blockComment",function(y,E,L){L||(L=c);var T=this,F=C(T,y),R=L.blockCommentStart||F.blockCommentStart,W=L.blockCommentEnd||F.blockCommentEnd;if(!R||!W){(L.lineComment||F.lineComment)&&L.fullLines!=!1&&T.lineComment(y,E,L);return}if(!/\bcomment\b/.test(T.getTokenTypeAt(g(y.line,0)))){var D=Math.min(E.line,T.lastLine());D!=y.line&&E.ch==0&&p.test(T.getLine(D))&&--D;var I=L.padding==null?" ":L.padding;y.line>D||T.operation(function(){if(L.fullLines!=!1){var M=p.test(T.getLine(D));T.replaceRange(I+W,g(D)),T.replaceRange(R+I,g(y.line,0));var B=L.blockCommentLead||F.blockCommentLead;if(B!=null)for(var U=y.line+1;U<=D;++U)(U!=D||M)&&T.replaceRange(B+I,g(U,0))}else{var ae=_(T.getCursor("to"),E)==0,ue=!T.somethingSelected();T.replaceRange(W,E),ae&&T.setSelection(ue?E:T.getCursor("from"),E),T.replaceRange(R,y)}})}}),l.defineExtension("uncomment",function(y,E,L){L||(L=c);var T=this,F=C(T,y),R=Math.min(E.ch!=0||E.line==y.line?E.line:E.line-1,T.lastLine()),W=Math.min(y.line,R),D=L.lineComment||F.lineComment,I=[],M=L.padding==null?" ":L.padding,B;e:{if(!D)break e;for(var U=W;U<=R;++U){var ae=T.getLine(U),ue=ae.indexOf(D);if(ue>-1&&!/comment/.test(T.getTokenTypeAt(g(U,ue+1)))&&(ue=-1),ue==-1&&p.test(ae)||ue>-1&&p.test(ae.slice(0,ue)))break e;I.push(ae)}if(T.operation(function(){for(var Ae=W;Ae<=R;++Ae){var Fe=I[Ae-W],Qe=Fe.indexOf(D),He=Qe+D.length;Qe<0||(Fe.slice(He,He+M.length)==M&&(He+=M.length),B=!0,T.replaceRange("",g(Ae,Qe),g(Ae,He)))}}),B)return!0}var te=L.blockCommentStart||F.blockCommentStart,ye=L.blockCommentEnd||F.blockCommentEnd;if(!te||!ye)return!1;var ge=L.blockCommentLead||F.blockCommentLead,ke=T.getLine(W),Te=ke.indexOf(te);if(Te==-1)return!1;var G=R==W?ke:T.getLine(R),K=G.indexOf(ye,R==W?Te+te.length:0),b=g(W,Te+1),oe=g(R,K+1);if(K==-1||!/comment/.test(T.getTokenTypeAt(b))||!/comment/.test(T.getTokenTypeAt(oe))||T.getRange(b,oe,`
`).indexOf(ye)>-1)return!1;var Q=ke.lastIndexOf(te,y.ch),le=Q==-1?-1:ke.slice(0,y.ch).indexOf(ye,Q+te.length);if(Q!=-1&&le!=-1&&le+ye.length!=y.ch)return!1;le=G.indexOf(ye,E.ch);var Pe=G.slice(E.ch).lastIndexOf(te,le-E.ch);return Q=le==-1||Pe==-1?-1:E.ch+Pe,le!=-1&&Q!=-1&&Q!=E.ch?!1:(T.operation(function(){T.replaceRange("",g(R,K-(M&&G.slice(K-M.length,K)==M?M.length:0)),g(R,K+ye.length));var Ae=Te+te.length;if(M&&ke.slice(Ae,Ae+M.length)==M&&(Ae+=M.length),T.replaceRange("",g(W,Te),g(W,Ae)),ge)for(var Fe=W+1;Fe<=R;++Fe){var Qe=T.getLine(Fe),He=Qe.indexOf(ge);if(!(He==-1||p.test(Qe.slice(0,He)))){var qe=He+ge.length;M&&Qe.slice(qe,qe+M.length)==M&&(qe+=M.length),T.replaceRange("",g(Fe,He),g(Fe,qe))}}}),!0)})})})();var am={};(function(n,o){(function(l){l(wn())})(function(l){function c(S,w,C,y){if(C&&C.call){var E=C;C=null}else var E=_(S,C,"rangeFinder");typeof w=="number"&&(w=l.Pos(w,0));var L=_(S,C,"minFoldSize");function T(D){var I=E(S,w);if(!I||I.to.line-I.from.line<L)return null;if(y==="fold")return I;for(var M=S.findMarksAt(I.from),B=0;B<M.length;++B)if(M[B].__isFold){if(!D)return null;I.cleared=!0,M[B].clear()}return I}var F=T(!0);if(_(S,C,"scanUp"))for(;!F&&w.line>S.firstLine();)w=l.Pos(w.line-1,0),F=T(!1);if(!(!F||F.cleared||y==="unfold")){var R=p(S,C,F);l.on(R,"mousedown",function(D){W.clear(),l.e_preventDefault(D)});var W=S.markText(F.from,F.to,{replacedWith:R,clearOnEnter:_(S,C,"clearOnEnter"),__isFold:!0});W.on("clear",function(D,I){l.signal(S,"unfold",S,D,I)}),l.signal(S,"fold",S,F.from,F.to)}}function p(S,w,C){var y=_(S,w,"widget");if(typeof y=="function"&&(y=y(C.from,C.to)),typeof y=="string"){var E=document.createTextNode(y);y=document.createElement("span"),y.appendChild(E),y.className="CodeMirror-foldmarker"}else y&&(y=y.cloneNode(!0));return y}l.newFoldFunction=function(S,w){return function(C,y){c(C,y,{rangeFinder:S,widget:w})}},l.defineExtension("foldCode",function(S,w,C){c(this,S,w,C)}),l.defineExtension("isFolded",function(S){for(var w=this.findMarksAt(S),C=0;C<w.length;++C)if(w[C].__isFold)return!0}),l.commands.toggleFold=function(S){S.foldCode(S.getCursor())},l.commands.fold=function(S){S.foldCode(S.getCursor(),null,"fold")},l.commands.unfold=function(S){S.foldCode(S.getCursor(),{scanUp:!1},"unfold")},l.commands.foldAll=function(S){S.operation(function(){for(var w=S.firstLine(),C=S.lastLine();w<=C;w++)S.foldCode(l.Pos(w,0),{scanUp:!1},"fold")})},l.commands.unfoldAll=function(S){S.operation(function(){for(var w=S.firstLine(),C=S.lastLine();w<=C;w++)S.foldCode(l.Pos(w,0),{scanUp:!1},"unfold")})},l.registerHelper("fold","combine",function(){var S=Array.prototype.slice.call(arguments,0);return function(w,C){for(var y=0;y<S.length;++y){var E=S[y](w,C);if(E)return E}}}),l.registerHelper("fold","auto",function(S,w){for(var C=S.getHelpers(w,"fold"),y=0;y<C.length;y++){var E=C[y](S,w);if(E)return E}});var g={rangeFinder:l.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};l.defineOption("foldOptions",null);function _(S,w,C){if(w&&w[C]!==void 0)return w[C];var y=S.options.foldOptions;return y&&y[C]!==void 0?y[C]:g[C]}l.defineExtension("foldOption",function(S,w){return _(this,S,w)})})})();(function(n,o){(function(l){l(wn(),am)})(function(l){l.defineOption("foldGutter",!1,function(R,W,D){D&&D!=l.Init&&(R.clearGutter(R.state.foldGutter.options.gutter),R.state.foldGutter=null,R.off("gutterClick",E),R.off("changes",L),R.off("viewportChange",T),R.off("fold",F),R.off("unfold",F),R.off("swapDoc",L)),W&&(R.state.foldGutter=new p(g(W)),y(R),R.on("gutterClick",E),R.on("changes",L),R.on("viewportChange",T),R.on("fold",F),R.on("unfold",F),R.on("swapDoc",L))});var c=l.Pos;function p(R){this.options=R,this.from=this.to=0}function g(R){return R===!0&&(R={}),R.gutter==null&&(R.gutter="CodeMirror-foldgutter"),R.indicatorOpen==null&&(R.indicatorOpen="CodeMirror-foldgutter-open"),R.indicatorFolded==null&&(R.indicatorFolded="CodeMirror-foldgutter-folded"),R}function _(R,W){for(var D=R.findMarks(c(W,0),c(W+1,0)),I=0;I<D.length;++I)if(D[I].__isFold){var M=D[I].find(-1);if(M&&M.line===W)return D[I]}}function S(R){if(typeof R=="string"){var W=document.createElement("div");return W.className=R+" CodeMirror-guttermarker-subtle",W}else return R.cloneNode(!0)}function w(R,W,D){var I=R.state.foldGutter.options,M=W-1,B=R.foldOption(I,"minFoldSize"),U=R.foldOption(I,"rangeFinder"),ae=typeof I.indicatorFolded=="string"&&C(I.indicatorFolded),ue=typeof I.indicatorOpen=="string"&&C(I.indicatorOpen);R.eachLine(W,D,function(te){++M;var ye=null,ge=te.gutterMarkers;if(ge&&(ge=ge[I.gutter]),_(R,M)){if(ae&&ge&&ae.test(ge.className))return;ye=S(I.indicatorFolded)}else{var ke=c(M,0),Te=U&&U(R,ke);if(Te&&Te.to.line-Te.from.line>=B){if(ue&&ge&&ue.test(ge.className))return;ye=S(I.indicatorOpen)}}!ye&&!ge||R.setGutterMarker(te,I.gutter,ye)})}function C(R){return new RegExp("(^|\\s)"+R+"(?:$|\\s)\\s*")}function y(R){var W=R.getViewport(),D=R.state.foldGutter;D&&(R.operation(function(){w(R,W.from,W.to)}),D.from=W.from,D.to=W.to)}function E(R,W,D){var I=R.state.foldGutter;if(I){var M=I.options;if(D==M.gutter){var B=_(R,W);B?B.clear():R.foldCode(c(W,0),M)}}}function L(R){var W=R.state.foldGutter;if(W){var D=W.options;W.from=W.to=0,clearTimeout(W.changeUpdate),W.changeUpdate=setTimeout(function(){y(R)},D.foldOnChangeTimeSpan||600)}}function T(R){var W=R.state.foldGutter;if(W){var D=W.options;clearTimeout(W.changeUpdate),W.changeUpdate=setTimeout(function(){var I=R.getViewport();W.from==W.to||I.from-W.to>20||W.from-I.to>20?y(R):R.operation(function(){I.from<W.from&&(w(R,I.from,W.from),W.from=I.from),I.to>W.to&&(w(R,W.to,I.to),W.to=I.to)})},D.updateViewportTimeSpan||400)}}function F(R,W){var D=R.state.foldGutter;if(D){var I=W.line;I>=D.from&&I<D.to&&w(R,I,I+1)}}})})();(function(n,o){(function(l){l(wn())})(function(l){function c(p){return function(g,_){var S=_.line,w=g.getLine(S);function C(R){for(var W,D=_.ch,I=0;;){var M=D<=0?-1:w.lastIndexOf(R[0],D-1);if(M==-1){if(I==1)break;I=1,D=w.length;continue}if(I==1&&M<_.ch)break;if(W=g.getTokenTypeAt(l.Pos(S,M+1)),!/^(comment|string)/.test(W))return{ch:M+1,tokenType:W,pair:R};D=M-1}}function y(R){var W=1,D=g.lastLine(),I,M=R.ch,B;e:for(var U=S;U<=D;++U)for(var ae=g.getLine(U),ue=U==S?M:0;;){var te=ae.indexOf(R.pair[0],ue),ye=ae.indexOf(R.pair[1],ue);if(te<0&&(te=ae.length),ye<0&&(ye=ae.length),ue=Math.min(te,ye),ue==ae.length)break;if(g.getTokenTypeAt(l.Pos(U,ue+1))==R.tokenType){if(ue==te)++W;else if(!--W){I=U,B=ue;break e}}++ue}return I==null||S==I?null:{from:l.Pos(S,M),to:l.Pos(I,B)}}for(var E=[],L=0;L<p.length;L++){var T=C(p[L]);T&&E.push(T)}E.sort(function(R,W){return R.ch-W.ch});for(var L=0;L<E.length;L++){var F=y(E[L]);if(F)return F}return null}}l.registerHelper("fold","brace",c([["{","}"],["[","]"]])),l.registerHelper("fold","brace-paren",c([["{","}"],["[","]"],["(",")"]])),l.registerHelper("fold","import",function(p,g){function _(L){if(L<p.firstLine()||L>p.lastLine())return null;var T=p.getTokenAt(l.Pos(L,1));if(/\S/.test(T.string)||(T=p.getTokenAt(l.Pos(L,T.end+1))),T.type!="keyword"||T.string!="import")return null;for(var F=L,R=Math.min(p.lastLine(),L+10);F<=R;++F){var W=p.getLine(F),D=W.indexOf(";");if(D!=-1)return{startCh:T.end,end:l.Pos(F,D)}}}var S=g.line,w=_(S),C;if(!w||_(S-1)||(C=_(S-2))&&C.end.line==S-1)return null;for(var y=w.end;;){var E=_(y.line+1);if(E==null)break;y=E.end}return{from:p.clipPos(l.Pos(S,w.startCh+1)),to:y}}),l.registerHelper("fold","include",function(p,g){function _(E){if(E<p.firstLine()||E>p.lastLine())return null;var L=p.getTokenAt(l.Pos(E,1));if(/\S/.test(L.string)||(L=p.getTokenAt(l.Pos(E,L.end+1))),L.type=="meta"&&L.string.slice(0,8)=="#include")return L.start+8}var S=g.line,w=_(S);if(w==null||_(S-1)!=null)return null;for(var C=S;;){var y=_(C+1);if(y==null)break;++C}return{from:l.Pos(S,w+1),to:p.clipPos(l.Pos(C))}})})})();(function(n,o){(function(l){l(wn())})(function(l){function c(p,g){var _=p.getLine(g),S=_.search(/\S/);return S==-1||/\bcomment\b/.test(p.getTokenTypeAt(l.Pos(g,S+1)))?-1:l.countColumn(_,null,p.getOption("tabSize"))}l.registerHelper("fold","indent",function(p,g){var _=c(p,g.line);if(!(_<0)){for(var S=null,w=g.line+1,C=p.lastLine();w<=C;++w){var y=c(p,w);if(y!=-1)if(y>_)S=w;else break}if(S)return{from:l.Pos(g.line,p.getLine(g.line).length),to:l.Pos(S,p.getLine(S).length)}}})})})();(function(n,o){(function(l){l(wn())})(function(l){l.registerGlobalHelper("fold","comment",function(c){return c.blockCommentStart&&c.blockCommentEnd},function(c,p){var g=c.getModeAt(p),_=g.blockCommentStart,S=g.blockCommentEnd;if(!_||!S)return;for(var w=p.line,C=c.getLine(w),y,E=p.ch,L=0;;){var T=E<=0?-1:C.lastIndexOf(_,E-1);if(T==-1){if(L==1)return;L=1,E=C.length;continue}if(L==1&&T<p.ch)return;if(/comment/.test(c.getTokenTypeAt(l.Pos(w,T+1)))&&(T==0||C.slice(T-S.length,T)==S||!/comment/.test(c.getTokenTypeAt(l.Pos(w,T))))){y=T+_.length;break}E=T-1}var F=1,R=c.lastLine(),W,D;e:for(var I=w;I<=R;++I)for(var M=c.getLine(I),B=I==w?y:0;;){var U=M.indexOf(_,B),ae=M.indexOf(S,B);if(U<0&&(U=M.length),ae<0&&(ae=M.length),B=Math.min(U,ae),B==M.length)break;if(B==U)++F;else if(!--F){W=I,D=B;break e}++B}if(!(W==null||w==W&&D==y))return{from:l.Pos(w,y),to:l.Pos(W,D)}})})})();const Uc=Gr({__name:"CodeMirror",props:{mode:{default:"htmlmixed"},value:{default:""},readonly:{type:Boolean,default:!1}},emits:["change"],setup(n,{emit:o}){const l=n,c=zn(),p=$r("autoresize");return Oc(()=>{const g={autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]},_=nm(c.value,{value:"",mode:l.mode,readOnly:l.readonly,tabSize:2,lineWrapping:!0,lineNumbers:!0,...g});_.on("change",()=>{o("change",_.getValue())}),So(()=>{const S=_.getValue();l.value!==S&&_.setValue(l.value)}),So(()=>{_.setOption("mode",l.mode)}),setTimeout(()=>{_.refresh()},50),p&&window.addEventListener("resize",$c(()=>{_.refresh()}))}),(g,_)=>(qt(),pn("div",{class:"editor",ref_key:"el",ref:c},null,512))}}),lm=Gr({__name:"Message",props:["err","warn"],setup(n){const o=n,l=zn(!1);Ya(()=>[o.err,o.warn],()=>{l.value=!1});function c(p){if(typeof p=="string")return p;{let g=p.message;const _=p.loc;return _&&_.start&&(g=`(${_.start.line}:${_.start.column}) `+g),g}}return(p,g)=>(qt(),gl(dd,{name:"fade"},{default:Ja(()=>[!l.value&&(n.err||n.warn)?(qt(),pn("div",{key:0,class:qi(["msg",n.err?"err":"warn"])},[Ft("pre",null,Mo(c(n.err||n.warn)),1),Ft("button",{class:"dismiss",onClick:g[0]||(g[0]=_=>l.value=!0)},"✕")],2)):Hi("",!0)]),_:1}))}}),il=pi(lm,[["__scopeId","data-v-92411507"]]),um={class:"editor-container"},cm=Gr({__name:"Editor",setup(n){const o=$r("store"),l=$c(p=>{o.state.activeFile.code=p},250),c=As(()=>{const{filename:p}=o.state.activeFile;return p.endsWith(".vue")||p.endsWith(".html")?"htmlmixed":p.endsWith(".css")?"css":"javascript"});return(p,g)=>(qt(),pn(Is,null,[Wr(Pd),Ft("div",um,[Wr(Uc,{onChange:Mt(l),value:Mt(o).state.activeFile.code,mode:Mt(c)},null,8,["onChange","value","mode"]),Wr(il,{err:Mt(o).state.errors[0]},null,8,["err"])])],64))}}),fm=pi(cm,[["__scopeId","data-v-0384e940"]]),hm=`<!doctype html>
<html>
<head>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
</style>
<style id="__sfc-styles"></style>
<script>
(() => {
let scriptEls = []
window.process = { env: {} }
window.__modules__ = {}
window.__export__ = (mod, key, get) => {
Object.defineProperty(mod, key, {
enumerable: true,
configurable: true,
get
})
}
window.__dynamic_import__ = key => {
return Promise.resolve(window.__modules__[key])
}
async function handle_message(ev) {
let { action, cmd_id } = ev.data;
const send_message = (payload) => parent.postMessage( { ...payload }, ev.origin);
const send_reply = (payload) => send_message({ ...payload, cmd_id });
const send_ok = () => send_reply({ action: 'cmd_ok' });
const send_error = (message, stack) => send_reply({ action: 'cmd_error', message, stack });
if (action === 'eval') {
try {
if (scriptEls.length) {
scriptEls.forEach(el => {
document.head.removeChild(el)
})
scriptEls.length = 0
}
let { script: scripts } = ev.data.args
if (typeof scripts === 'string') scripts = [scripts]
for (const script of scripts) {
const scriptEl = document.createElement('script')
scriptEl.setAttribute('type', 'module')
// send ok in the module script to ensure sequential evaluation
// of multiple proxy.eval() calls
const done = new Promise((resolve) => {
window.__next__ = resolve
})
scriptEl.innerHTML = script + \`\\nwindow.__next__()\`
document.head.appendChild(scriptEl)
scriptEl.onerror = err => send_error(err.message, err.stack)
scriptEls.push(scriptEl)
await done
}
send_ok()
} catch (e) {
send_error(e.message, e.stack);
}
}
if (action === 'catch_clicks') {
try {
const top_origin = ev.origin;
document.body.addEventListener('click', event => {
if (event.which !== 1) return;
if (event.metaKey || event.ctrlKey || event.shiftKey) return;
if (event.defaultPrevented) return;
// ensure target is a link
let el = event.target;
while (el && el.nodeName !== 'A') el = el.parentNode;
if (!el || el.nodeName !== 'A') return;
if (el.hasAttribute('download') || el.getAttribute('rel') === 'external' || el.target) return;
event.preventDefault();
if (el.href.startsWith(top_origin)) {
const url = new URL(el.href);
if (url.hash[0] === '#') {
window.location.hash = url.hash;
return;
}
}
window.open(el.href, '_blank');
});
send_ok();
} catch(e) {
send_error(e.message, e.stack);
}
}
}
window.addEventListener('message', handle_message, false);
window.onerror = function (msg, url, lineNo, columnNo, error) {
// ignore errors from import map polyfill - these are necessary for
// it to detect browser support
if (msg.includes('module specifier “vue”')) {
// firefox only error, ignore
return false
}
if (msg.includes('Module specifier, \\'vue')) {
// Safari only
return false
}
try {
parent.postMessage({ action: 'error', value: error }, '*');
} catch (e) {
parent.postMessage({ action: 'error', value: msg }, '*');
}
}
window.addEventListener("unhandledrejection", event => {
if (event.reason.message.includes('Cross-origin')) {
event.preventDefault()
return
}
try {
parent.postMessage({ action: 'unhandledrejection', value: event.reason }, '*');
} catch (e) {
parent.postMessage({ action: 'unhandledrejection', value: event.reason.message }, '*');
}
});
let previous = { level: null, args: null };
['clear', 'log', 'info', 'dir', 'warn', 'error', 'table'].forEach((level) => {
const original = console[level];
console[level] = (...args) => {
const msg = String(args[0])
if (
msg.includes('You are running a development build of Vue') ||
msg.includes('You are running the esm-bundler build of Vue')
) {
return
}
const stringifiedArgs = stringify(args);
if (
previous.level === level &&
previous.args &&
previous.args === stringifiedArgs
) {
parent.postMessage({ action: 'console', level, duplicate: true }, '*');
} else {
previous = { level, args: stringifiedArgs };
try {
parent.postMessage({ action: 'console', level, args }, '*');
} catch (err) {
parent.postMessage({ action: 'console', level, args: args.map(a => {
return a instanceof Error ? a.message : String(a)
}) }, '*');
}
}
original(...args);
}
});
[
{ method: 'group', action: 'console_group' },
{ method: 'groupEnd', action: 'console_group_end' },
{ method: 'groupCollapsed', action: 'console_group_collapsed' },
].forEach((group_action) => {
const original = console[group_action.method];
console[group_action.method] = (label) => {
parent.postMessage({ action: group_action.action, label }, '*');
original(label);
};
});
const timers = new Map();
const original_time = console.time;
const original_timelog = console.timeLog;
const original_timeend = console.timeEnd;
console.time = (label = 'default') => {
original_time(label);
timers.set(label, performance.now());
}
console.timeLog = (label = 'default') => {
original_timelog(label);
const now = performance.now();
if (timers.has(label)) {
parent.postMessage({ action: 'console', level: 'system-log', args: [\`\${label}: \${now - timers.get(label)}ms\`] }, '*');
} else {
parent.postMessage({ action: 'console', level: 'system-warn', args: [\`Timer '\${label}' does not exist\`] }, '*');
}
}
console.timeEnd = (label = 'default') => {
original_timeend(label);
const now = performance.now();
if (timers.has(label)) {
parent.postMessage({ action: 'console', level: 'system-log', args: [\`\${label}: \${now - timers.get(label)}ms\`] }, '*');
} else {
parent.postMessage({ action: 'console', level: 'system-warn', args: [\`Timer '\${label}' does not exist\`] }, '*');
}
timers.delete(label);
};
const original_assert = console.assert;
console.assert = (condition, ...args) => {
if (condition) {
const stack = new Error().stack;
parent.postMessage({ action: 'console', level: 'assert', args, stack }, '*');
}
original_assert(condition, ...args);
};
const counter = new Map();
const original_count = console.count;
const original_countreset = console.countReset;
console.count = (label = 'default') => {
counter.set(label, (counter.get(label) || 0) + 1);
parent.postMessage({ action: 'console', level: 'system-log', args: \`\${label}: \${counter.get(label)}\` }, '*');
original_count(label);
};
console.countReset = (label = 'default') => {
if (counter.has(label)) {
counter.set(label, 0);
} else {
parent.postMessage({ action: 'console', level: 'system-warn', args: \`Count for '\${label}' does not exist\` }, '*');
}
original_countreset(label);
};
const original_trace = console.trace;
console.trace = (...args) => {
const stack = new Error().stack;
parent.postMessage({ action: 'console', level: 'trace', args, stack }, '*');
original_trace(...args);
};
function stringify(args) {
try {
return JSON.stringify(args);
} catch (error) {
return null;
}
}
})()
<\/script>
<!-- ES Module Shims: Import maps polyfill for modules browsers without import maps support (all except Chrome 89+) -->
<script async src="https://unpkg.com/es-module-shims@1.5.18/dist/es-module-shims.wasm.js"><\/script>
<script type="importmap"><!--IMPORT_MAP--><\/script>
</head>
<body></body>
</html>
`;let pm=1;class dm{constructor(o,l){this.iframe=o,this.handlers=l,this.pending_cmds=new Map,this.handle_event=c=>this.handle_repl_message(c),window.addEventListener("message",this.handle_event,!1)}destroy(){window.removeEventListener("message",this.handle_event)}iframe_command(o,l){return new Promise((c,p)=>{const g=pm++;this.pending_cmds.set(g,{resolve:c,reject:p}),this.iframe.contentWindow.postMessage({action:o,cmd_id:g,args:l},"*")})}handle_command_message(o){let l=o.action,c=o.cmd_id,p=this.pending_cmds.get(c);if(p){if(this.pending_cmds.delete(c),l==="cmd_error"){let{message:g,stack:_}=o,S=new Error(g);S.stack=_,p.reject(S)}l==="cmd_ok"&&p.resolve(o.args)}else l!=="cmd_error"&&l!=="cmd_ok"&&console.error("command not found",c,o,[...this.pending_cmds.keys()])}handle_repl_message(o){if(o.source!==this.iframe.contentWindow)return;const{action:l,args:c}=o.data;switch(l){case"cmd_error":case"cmd_ok":return this.handle_command_message(o.data);case"fetch_progress":return this.handlers.on_fetch_progress(c.remaining);case"error":return this.handlers.on_error(o.data);case"unhandledrejection":return this.handlers.on_unhandled_rejection(o.data);case"console":return this.handlers.on_console(o.data);case"console_group":return this.handlers.on_console_group(o.data);case"console_group_collapsed":return this.handlers.on_console_group_collapsed(o.data);case"console_group_end":return this.handlers.on_console_group_end(o.data)}}eval(o){return this.iframe_command("eval",{script:o})}handle_links(){return this.iframe_command("catch_clicks",{})}}function ac(n,o=!1){const l=new Set,c=[];if(yl(n,n.state.files[n.state.mainFile],c,l,o),!o){for(const p in n.state.files)if(p.endsWith(".css")){const g=n.state.files[p];l.has(g)||c.push(`
window.__css__ += ${JSON.stringify(g.compiled.css)}`)}}return c}const lc="__modules__",$a="__export__",mm="__dynamic_import__",_s="__module__";function yl(n,o,l,c,p){if(c.has(o))return[];if(c.add(o),!p&&o.filename.endsWith(".html"))return km(n,o.code,o.filename,l,c);let[g,_]=Gc(n,p?o.compiled.ssr:o.compiled.js,o.filename);if(!p&&o.compiled.css&&(g+=`
window.__css__ += ${JSON.stringify(o.compiled.css)}`),_.size)for(const S of _)yl(n,n.state.files[S],l,c,p);l.push(g)}function Gc(n,o,l){const c=new ad(o),p=ld(o,{sourceFilename:l,sourceType:"module"}).program.body,g=new Map,_=new Set,S=new Set,w=new Map;function C(E,L){const T=L.replace(/^\.\/+/,"");if(!(T in n.state.files))throw new Error(`File "${T}" does not exist.`);if(S.has(T))return w.get(T);S.add(T);const F=`__import_${S.size}__`;return w.set(T,F),c.appendLeft(E.start,`const ${F} = ${lc}[${JSON.stringify(T)}]
`),F}function y(E,L=E){c.append(`
${$a}(${_s}, "${E}", () => ${L})`)}c.prepend(`const ${_s} = ${lc}[${JSON.stringify(l)}] = { [Symbol.toStringTag]: "Module" }
`);for(const E of p)if(E.type==="ImportDeclaration"&&E.source.value.startsWith("./")){const T=C(E,E.source.value);for(const F of E.specifiers)F.type==="ImportSpecifier"?g.set(F.local.name,`${T}.${F.imported.name}`):F.type==="ImportDefaultSpecifier"?g.set(F.local.name,`${T}.default`):g.set(F.local.name,T);c.remove(E.start,E.end)}for(const E of p){if(E.type==="ExportNamedDeclaration")if(E.declaration){if(E.declaration.type==="FunctionDeclaration"||E.declaration.type==="ClassDeclaration")y(E.declaration.id.name);else if(E.declaration.type==="VariableDeclaration")for(const L of E.declaration.declarations)for(const T of ud(L.id))y(T.name);c.remove(E.start,E.declaration.start)}else if(E.source){const L=C(E,E.source.value);for(const T of E.specifiers)y(T.exported.name,`${L}.${T.local.name}`);c.remove(E.start,E.end)}else{for(const L of E.specifiers){const T=L.local.name,F=g.get(T);y(L.exported.name,F||T)}c.remove(E.start,E.end)}if(E.type==="ExportDefaultDeclaration")if("id"in E.declaration&&E.declaration.id){const{name:L}=E.declaration.id;c.remove(E.start,E.start+15),c.append(`
${$a}(${_s}, "default", () => ${L})`)}else c.overwrite(E.start,E.start+14,`${_s}.default =`);if(E.type==="ExportAllDeclaration"){const L=C(E,E.source.value);c.remove(E.start,E.end),c.append(`
for (const key in ${L}) {
if (key !== 'default') {
${$a}(${_s}, key, () => ${L}[key])
}
}`)}}for(const E of p)E.type!=="ImportDeclaration"&&cd(E,(L,T,F)=>{const R=g.get(L.name);if(R)if(fd(T)&&T.shorthand)(!T.inPattern||hd(T,F))&&c.appendLeft(L.end,`: ${R}`);else if(T.type==="ClassDeclaration"&&L===T.superClass){if(!_.has(L.name)){_.add(L.name);const W=F[1];c.prependRight(W.start,`const ${L.name} = ${R};
`)}}else c.overwrite(L.start,L.end,R)});return pd(p,{enter(E,L){if(E.type==="Import"&&L.type==="CallExpression"){const T=L.arguments[0];T.type==="StringLiteral"&&T.value.startsWith("./")&&(c.overwrite(E.start,E.start+6,mm),c.overwrite(T.start,T.end,JSON.stringify(T.value.replace(/^\.\/+/,""))))}}}),[c.toString(),S]}const gm=/<script\b(?:\s[^>]*>|>)([^]*?)<\/script>/gi,vm=/<script\b[^>]*type\s*=\s*(?:"module"|'module')[^>]*>([^]*?)<\/script>/gi;function km(n,o,l,c,p){const g=[];let _="";const S=o.replace(vm,(w,C)=>{const[y,E]=Gc(n,C,l);if(E.size)for(const L of E)yl(n,n.state.files[L],g,p,!1);return _+=`
`+y,""}).replace(gm,(w,C)=>(_+=`
`+C,""));c.push(`document.body.innerHTML = ${JSON.stringify(S)}`),c.push(...g),c.push(_)}const ym=Gr({__name:"Preview",props:{show:{type:Boolean},ssr:{type:Boolean}},setup(n){const o=n,l=$r("store"),c=$r("clear-console"),p=zn(),g=zn(),_=zn();let S,w,C;Oc(y),Ya(()=>l.state.files["import-map.json"].code,L=>{try{if(!JSON.parse(L).imports){l.state.errors=['import-map.json is missing "imports" field.'];return}y()}catch(T){l.state.errors=[T];return}}),Ya(()=>l.state.resetFlip,y),sd(()=>{w.destroy(),C&&C()});function y(){S&&(w.destroy(),C&&C(),p.value.removeChild(S)),S=document.createElement("iframe"),S.setAttribute("sandbox",["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation"].join(" "));const L=l.getImportMap();L.imports||(L.imports={}),L.imports.vue||(L.imports.vue=l.state.vueRuntimeURL);const T=hm.replace(/<!--IMPORT_MAP-->/,JSON.stringify(L));S.srcdoc=T,p.value.appendChild(S),w=new dm(S,{on_fetch_progress:F=>{},on_error:F=>{const R=F.value instanceof Error?F.value.message:F.value;R.includes("Failed to resolve module specifier")||R.includes("Error resolving module specifier")?g.value=R.replace(/\. Relative references must.*$/,"")+`.
Tip: edit the "Import Map" tab to specify import paths for dependencies.`:g.value=F.value},on_unhandled_rejection:F=>{let R=F.value;typeof R=="string"&&(R={message:R}),g.value="Uncaught (in promise): "+R.message},on_console:F=>{F.duplicate||(F.level==="error"?F.args[0]instanceof Error?g.value=F.args[0].message:g.value=F.args[0]:F.level==="warn"&&F.args[0].toString().includes("[Vue warn]")&&(_.value=F.args.join("").replace(/\[Vue warn\]:/,"").trim()))},on_console_group:F=>{},on_console_group_end:()=>{},on_console_group_collapsed:F=>{}}),S.addEventListener("load",()=>{w.handle_links(),C=So(E)})}async function E(){c.value&&console.clear(),g.value=null,_.value=null;let L=o.ssr;if(l.vueVersion){const[T,F,R]=l.vueVersion.split(".").map(W=>parseInt(W,10));T===3&&(F<2||F===2&&R<27)&&(alert(`The selected version of Vue (${l.vueVersion}) does not support in-browser SSR. Rendering in client mode instead.`),L=!1)}try{const T=l.state.mainFile;if(L&&T.endsWith(".vue")){const W=ac(l,!0);console.log(`[@vue/repl] successfully compiled ${W.length} modules for SSR.`),await w.eval(["const __modules__ = {};",...W,`import { renderToString as _renderToString } from 'vue/server-renderer'
import { createSSRApp as _createApp } from 'vue'
const AppComponent = __modules__["${T}"].default
AppComponent.name = 'Repl'
const app = _createApp(AppComponent)
if (!app.config.hasOwnProperty('unwrapInjectedRef')) {
app.config.unwrapInjectedRef = true
}
app.config.warnHandler = () => {}
window.__ssr_promise__ = _renderToString(app).then(html => {
document.body.innerHTML = '<div id="app">' + html + '</div>'
}).catch(err => {
console.error("SSR Error", err)
})
`])}const F=ac(l);console.log(`[@vue/repl] successfully compiled ${F.length} module${F.length>1?"s":""}.`);const R=[`window.__modules__ = {}
window.__css__ = ''
if (window.__app__) window.__app__.unmount()
`+(L?"":`document.body.innerHTML = '<div id="app"></div>'`),...F,"document.getElementById('__sfc-styles').innerHTML = window.__css__"];T.endsWith(".vue")&&R.push(`import { ${L?"createSSRApp":"createApp"} as _createApp } from "vue"
const _mount = () => {
const AppComponent = __modules__["${T}"].default
AppComponent.name = 'Repl'
const app = window.__app__ = _createApp(AppComponent)
if (!app.config.hasOwnProperty('unwrapInjectedRef')) {
app.config.unwrapInjectedRef = true
}
app.config.errorHandler = e => console.error(e)
app.mount('#app')
}
if (window.__ssr_promise__) {
window.__ssr_promise__.then(_mount)
} else {
_mount()
}`),await w.eval(R)}catch(T){g.value=T.message}}return(L,T)=>(qt(),pn(Is,null,[Dc(Ft("div",{class:"iframe-container",ref_key:"container",ref:p},null,512),[[od,n.show]]),Wr(il,{err:g.value},null,8,["err"]),g.value?Hi("",!0):(qt(),gl(il,{key:0,warn:_.value},null,8,["warn"]))],64))}}),bm=pi(ym,[["__scopeId","data-v-6c05459a"]]),wm={class:"tab-buttons"},xm=["onClick"],_m={class:"output-container"},Sm=Gr({__name:"Output",props:{showCompileOutput:{type:Boolean},ssr:{type:Boolean}},setup(n){const o=n,l=$r("store"),c=As(()=>o.showCompileOutput?["preview","js","css","ssr"]:["preview"]),p=zn(c.value.includes(l.initialOutputMode)?l.initialOutputMode:"preview");return(g,_)=>(qt(),pn(Is,null,[Ft("div",wm,[(qt(!0),pn(Is,null,Mc(Mt(c),S=>(qt(),pn("button",{class:qi({active:p.value===S}),onClick:w=>p.value=S},[Ft("span",null,Mo(S),1)],10,xm))),256))]),Ft("div",_m,[Wr(bm,{show:p.value==="preview",ssr:n.ssr},null,8,["show","ssr"]),p.value!=="preview"?(qt(),gl(Uc,{key:0,readonly:"",mode:p.value==="css"?"css":"javascript",value:Mt(l).state.activeFile.compiled[p.value]},null,8,["mode","value"])):Hi("",!0)])],64))}}),Tm=pi(Sm,[["__scopeId","data-v-5d2df9cb"]]);var O;(function(n){n[n.NONE=0]="NONE";const l=0+1;n[n._abstract=l]="_abstract";const c=l+1;n[n._accessor=c]="_accessor";const p=c+1;n[n._as=p]="_as";const g=p+1;n[n._assert=g]="_assert";const _=g+1;n[n._asserts=_]="_asserts";const S=_+1;n[n._async=S]="_async";const w=S+1;n[n._await=w]="_await";const C=w+1;n[n._checks=C]="_checks";const y=C+1;n[n._constructor=y]="_constructor";const E=y+1;n[n._declare=E]="_declare";const L=E+1;n[n._enum=L]="_enum";const T=L+1;n[n._exports=T]="_exports";const F=T+1;n[n._from=F]="_from";const R=F+1;n[n._get=R]="_get";const W=R+1;n[n._global=W]="_global";const D=W+1;n[n._implements=D]="_implements";const I=D+1;n[n._infer=I]="_infer";const M=I+1;n[n._interface=M]="_interface";const B=M+1;n[n._is=B]="_is";const U=B+1;n[n._keyof=U]="_keyof";const ae=U+1;n[n._mixins=ae]="_mixins";const ue=ae+1;n[n._module=ue]="_module";const te=ue+1;n[n._namespace=te]="_namespace";const ye=te+1;n[n._of=ye]="_of";const ge=ye+1;n[n._opaque=ge]="_opaque";const ke=ge+1;n[n._out=ke]="_out";const Te=ke+1;n[n._override=Te]="_override";const G=Te+1;n[n._private=G]="_private";const K=G+1;n[n._protected=K]="_protected";const b=K+1;n[n._proto=b]="_proto";const oe=b+1;n[n._public=oe]="_public";const Q=oe+1;n[n._readonly=Q]="_readonly";const le=Q+1;n[n._require=le]="_require";const Pe=le+1;n[n._satisfies=Pe]="_satisfies";const Ae=Pe+1;n[n._set=Ae]="_set";const Fe=Ae+1;n[n._static=Fe]="_static";const Qe=Fe+1;n[n._symbol=Qe]="_symbol";const He=Qe+1;n[n._type=He]="_type";const qe=He+1;n[n._unique=qe]="_unique"})(O||(O={}));var s;(function(n){n[n.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";const l=1<<4;n[n.IS_KEYWORD=l]="IS_KEYWORD";const c=1<<5;n[n.IS_ASSIGN=c]="IS_ASSIGN";const p=1<<6;n[n.IS_RIGHT_ASSOCIATIVE=p]="IS_RIGHT_ASSOCIATIVE";const g=1<<7;n[n.IS_PREFIX=g]="IS_PREFIX";const _=1<<8;n[n.IS_POSTFIX=_]="IS_POSTFIX";const S=1<<9;n[n.IS_EXPRESSION_START=S]="IS_EXPRESSION_START";const w=512;n[n.num=w]="num";const C=1536;n[n.bigint=C]="bigint";const y=2560;n[n.decimal=y]="decimal";const E=3584;n[n.regexp=E]="regexp";const L=4608;n[n.string=L]="string";const T=5632;n[n.name=T]="name";const F=6144;n[n.eof=F]="eof";const R=7680;n[n.bracketL=R]="bracketL";const W=8192;n[n.bracketR=W]="bracketR";const D=9728;n[n.braceL=D]="braceL";const I=10752;n[n.braceBarL=I]="braceBarL";const M=11264;n[n.braceR=M]="braceR";const B=12288;n[n.braceBarR=B]="braceBarR";const U=13824;n[n.parenL=U]="parenL";const ae=14336;n[n.parenR=ae]="parenR";const ue=15360;n[n.comma=ue]="comma";const te=16384;n[n.semi=te]="semi";const ye=17408;n[n.colon=ye]="colon";const ge=18432;n[n.doubleColon=ge]="doubleColon";const ke=19456;n[n.dot=ke]="dot";const Te=20480;n[n.question=Te]="question";const G=21504;n[n.questionDot=G]="questionDot";const K=22528;n[n.arrow=K]="arrow";const b=23552;n[n.template=b]="template";const oe=24576;n[n.ellipsis=oe]="ellipsis";const Q=25600;n[n.backQuote=Q]="backQuote";const le=27136;n[n.dollarBraceL=le]="dollarBraceL";const Pe=27648;n[n.at=Pe]="at";const Ae=29184;n[n.hash=Ae]="hash";const Fe=29728;n[n.eq=Fe]="eq";const Qe=30752;n[n.assign=Qe]="assign";const He=32640;n[n.preIncDec=He]="preIncDec";const qe=33664;n[n.postIncDec=qe]="postIncDec";const X=34432;n[n.bang=X]="bang";const z=35456;n[n.tilde=z]="tilde";const V=35841;n[n.pipeline=V]="pipeline";const ee=36866;n[n.nullishCoalescing=ee]="nullishCoalescing";const fe=37890;n[n.logicalOR=fe]="logicalOR";const ve=38915;n[n.logicalAND=ve]="logicalAND";const de=39940;n[n.bitwiseOR=de]="bitwiseOR";const Me=40965;n[n.bitwiseXOR=Me]="bitwiseXOR";const et=41990;n[n.bitwiseAND=et]="bitwiseAND";const Je=43015;n[n.equality=Je]="equality";const Le=44040;n[n.lessThan=Le]="lessThan";const ze=45064;n[n.greaterThan=ze]="greaterThan";const Xe=46088;n[n.relationalOrEqual=Xe]="relationalOrEqual";const at=47113;n[n.bitShiftL=at]="bitShiftL";const ut=48137;n[n.bitShiftR=ut]="bitShiftR";const rn=49802;n[n.plus=rn]="plus";const nt=50826;n[n.minus=nt]="minus";const $=51723;n[n.modulo=$]="modulo";const pe=52235;n[n.star=pe]="star";const Z=53259;n[n.slash=Z]="slash";const Ve=54348;n[n.exponent=Ve]="exponent";const It=55296;n[n.jsxName=It]="jsxName";const dn=56320;n[n.jsxText=dn]="jsxText";const Xr=57344;n[n.jsxEmptyText=Xr]="jsxEmptyText";const Gt=58880;n[n.jsxTagStart=Gt]="jsxTagStart";const ft=59392;n[n.jsxTagEnd=ft]="jsxTagEnd";const Dn=60928;n[n.typeParameterStart=Dn]="typeParameterStart";const Wt=61440;n[n.nonNullAssertion=Wt]="nonNullAssertion";const xn=62480;n[n._break=xn]="_break";const Ne=63504;n[n._case=Ne]="_case";const Kn=64528;n[n._catch=Kn]="_catch";const Lt=65552;n[n._continue=Lt]="_continue";const Be=66576;n[n._debugger=Be]="_debugger";const dt=67600;n[n._default=dt]="_default";const Xn=68624;n[n._do=Xn]="_do";const xt=69648;n[n._else=xt]="_else";const mn=70672;n[n._finally=mn]="_finally";const St=71696;n[n._for=St]="_for";const Vn=73232;n[n._function=Vn]="_function";const Kt=73744;n[n._if=Kt]="_if";const Rn=74768;n[n._return=Rn]="_return";const Ln=75792;n[n._switch=Ln]="_switch";const Sr=77456;n[n._throw=Sr]="_throw";const lr=77840;n[n._try=lr]="_try";const Et=78864;n[n._var=Et]="_var";const Tr=79888;n[n._let=Tr]="_let";const ur=80912;n[n._const=ur]="_const";const gn=81936;n[n._while=gn]="_while";const cr=82960;n[n._with=cr]="_with";const Cr=84496;n[n._new=Cr]="_new";const Ir=85520;n[n._this=Ir]="_this";const fr=86544;n[n._super=fr]="_super";const En=87568;n[n._class=En]="_class";const Zt=88080;n[n._extends=Zt]="_extends";const Xt=89104;n[n._export=Xt]="_export";const Ar=90640;n[n._import=Ar]="_import";const _n=91664;n[n._yield=_n]="_yield";const Yn=92688;n[n._null=Yn]="_null";const Jn=93712;n[n._true=Jn]="_true";const sn=94736;n[n._false=sn]="_false";const on=95256;n[n._in=on]="_in";const Vt=96280;n[n._instanceof=Vt]="_instanceof";const hr=97936;n[n._typeof=hr]="_typeof";const pr=98960;n[n._void=pr]="_void";const mt=99984;n[n._delete=mt]="_delete";const Ie=100880;n[n._async=Ie]="_async";const Nn=101904;n[n._get=Nn]="_get";const Vr=102928;n[n._set=Vr]="_set";const en=103952;n[n._declare=en]="_declare";const rt=104976;n[n._readonly=rt]="_readonly";const Pn=106e3;n[n._abstract=Pn]="_abstract";const dr=107024;n[n._static=dr]="_static";const Yr=107536;n[n._public=Yr]="_public";const ce=108560;n[n._private=ce]="_private";const k=109584;n[n._protected=k]="_protected";const P=110608;n[n._override=P]="_override";const ne=112144;n[n._as=ne]="_as";const he=113168;n[n._enum=he]="_enum";const je=114192;n[n._type=je]="_type";const Ze=115216;n[n._implements=Ze]="_implements"})(s||(s={}));function Cm(n){switch(n){case s.num:return"num";case s.bigint:return"bigint";case s.decimal:return"decimal";case s.regexp:return"regexp";case s.string:return"string";case s.name:return"name";case s.eof:return"eof";case s.bracketL:return"[";case s.bracketR:return"]";case s.braceL:return"{";case s.braceBarL:return"{|";case s.braceR:return"}";case s.braceBarR:return"|}";case s.parenL:return"(";case s.parenR:return")";case s.comma:return",";case s.semi:return";";case s.colon:return":";case s.doubleColon:return"::";case s.dot:return".";case s.question:return"?";case s.questionDot:return"?.";case s.arrow:return"=>";case s.template:return"template";case s.ellipsis:return"...";case s.backQuote:return"`";case s.dollarBraceL:return"${";case s.at:return"@";case s.hash:return"#";case s.eq:return"=";case s.assign:return"_=";case s.preIncDec:return"++/--";case s.postIncDec:return"++/--";case s.bang:return"!";case s.tilde:return"~";case s.pipeline:return"|>";case s.nullishCoalescing:return"??";case s.logicalOR:return"||";case s.logicalAND:return"&&";case s.bitwiseOR:return"|";case s.bitwiseXOR:return"^";case s.bitwiseAND:return"&";case s.equality:return"==/!=";case s.lessThan:return"<";case s.greaterThan:return">";case s.relationalOrEqual:return"<=/>=";case s.bitShiftL:return"<<";case s.bitShiftR:return">>/>>>";case s.plus:return"+";case s.minus:return"-";case s.modulo:return"%";case s.star:return"*";case s.slash:return"/";case s.exponent:return"**";case s.jsxName:return"jsxName";case s.jsxText:return"jsxText";case s.jsxEmptyText:return"jsxEmptyText";case s.jsxTagStart:return"jsxTagStart";case s.jsxTagEnd:return"jsxTagEnd";case s.typeParameterStart:return"typeParameterStart";case s.nonNullAssertion:return"nonNullAssertion";case s._break:return"break";case s._case:return"case";case s._catch:return"catch";case s._continue:return"continue";case s._debugger:return"debugger";case s._default:return"default";case s._do:return"do";case s._else:return"else";case s._finally:return"finally";case s._for:return"for";case s._function:return"function";case s._if:return"if";case s._return:return"return";case s._switch:return"switch";case s._throw:return"throw";case s._try:return"try";case s._var:return"var";case s._let:return"let";case s._const:return"const";case s._while:return"while";case s._with:return"with";case s._new:return"new";case s._this:return"this";case s._super:return"super";case s._class:return"class";case s._extends:return"extends";case s._export:return"export";case s._import:return"import";case s._yield:return"yield";case s._null:return"null";case s._true:return"true";case s._false:return"false";case s._in:return"in";case s._instanceof:return"instanceof";case s._typeof:return"typeof";case s._void:return"void";case s._delete:return"delete";case s._async:return"async";case s._get:return"get";case s._set:return"set";case s._declare:return"declare";case s._readonly:return"readonly";case s._abstract:return"abstract";case s._static:return"static";case s._public:return"public";case s._private:return"private";case s._protected:return"protected";case s._override:return"override";case s._as:return"as";case s._enum:return"enum";case s._type:return"type";case s._implements:return"implements";default:return""}}class or{constructor(o,l,c){this.startTokenIndex=o,this.endTokenIndex=l,this.isFunctionScope=c}}class Im{constructor(o,l,c,p,g,_,S,w,C,y,E,L,T){this.potentialArrowAt=o,this.noAnonFunctionType=l,this.inDisallowConditionalTypesContext=c,this.tokensLength=p,this.scopesLength=g,this.pos=_,this.type=S,this.contextualKeyword=w,this.start=C,this.end=y,this.isType=E,this.scopeDepth=L,this.error=T}}class hn{constructor(){hn.prototype.__init.call(this),hn.prototype.__init2.call(this),hn.prototype.__init3.call(this),hn.prototype.__init4.call(this),hn.prototype.__init5.call(this),hn.prototype.__init6.call(this),hn.prototype.__init7.call(this),hn.prototype.__init8.call(this),hn.prototype.__init9.call(this),hn.prototype.__init10.call(this),hn.prototype.__init11.call(this),hn.prototype.__init12.call(this),hn.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=s.eof}__init8(){this.contextualKeyword=O.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new Im(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(o){this.potentialArrowAt=o.potentialArrowAt,this.noAnonFunctionType=o.noAnonFunctionType,this.inDisallowConditionalTypesContext=o.inDisallowConditionalTypesContext,this.tokens.length=o.tokensLength,this.scopes.length=o.scopesLength,this.pos=o.pos,this.type=o.type,this.contextualKeyword=o.contextualKeyword,this.start=o.start,this.end=o.end,this.isType=o.isType,this.scopeDepth=o.scopeDepth,this.error=o.error}}var H;(function(n){n[n.backSpace=8]="backSpace";const l=10;n[n.lineFeed=l]="lineFeed";const c=9;n[n.tab=c]="tab";const p=13;n[n.carriageReturn=p]="carriageReturn";const g=14;n[n.shiftOut=g]="shiftOut";const _=32;n[n.space=_]="space";const S=33;n[n.exclamationMark=S]="exclamationMark";const w=34;n[n.quotationMark=w]="quotationMark";const C=35;n[n.numberSign=C]="numberSign";const y=36;n[n.dollarSign=y]="dollarSign";const E=37;n[n.percentSign=E]="percentSign";const L=38;n[n.ampersand=L]="ampersand";const T=39;n[n.apostrophe=T]="apostrophe";const F=40;n[n.leftParenthesis=F]="leftParenthesis";const R=41;n[n.rightParenthesis=R]="rightParenthesis";const W=42;n[n.asterisk=W]="asterisk";const D=43;n[n.plusSign=D]="plusSign";const I=44;n[n.comma=I]="comma";const M=45;n[n.dash=M]="dash";const B=46;n[n.dot=B]="dot";const U=47;n[n.slash=U]="slash";const ae=48;n[n.digit0=ae]="digit0";const ue=49;n[n.digit1=ue]="digit1";const te=50;n[n.digit2=te]="digit2";const ye=51;n[n.digit3=ye]="digit3";const ge=52;n[n.digit4=ge]="digit4";const ke=53;n[n.digit5=ke]="digit5";const Te=54;n[n.digit6=Te]="digit6";const G=55;n[n.digit7=G]="digit7";const K=56;n[n.digit8=K]="digit8";const b=57;n[n.digit9=b]="digit9";const oe=58;n[n.colon=oe]="colon";const Q=59;n[n.semicolon=Q]="semicolon";const le=60;n[n.lessThan=le]="lessThan";const Pe=61;n[n.equalsTo=Pe]="equalsTo";const Ae=62;n[n.greaterThan=Ae]="greaterThan";const Fe=63;n[n.questionMark=Fe]="questionMark";const Qe=64;n[n.atSign=Qe]="atSign";const He=65;n[n.uppercaseA=He]="uppercaseA";const qe=66;n[n.uppercaseB=qe]="uppercaseB";const X=67;n[n.uppercaseC=X]="uppercaseC";const z=68;n[n.uppercaseD=z]="uppercaseD";const V=69;n[n.uppercaseE=V]="uppercaseE";const ee=70;n[n.uppercaseF=ee]="uppercaseF";const fe=71;n[n.uppercaseG=fe]="uppercaseG";const ve=72;n[n.uppercaseH=ve]="uppercaseH";const de=73;n[n.uppercaseI=de]="uppercaseI";const Me=74;n[n.uppercaseJ=Me]="uppercaseJ";const et=75;n[n.uppercaseK=et]="uppercaseK";const Je=76;n[n.uppercaseL=Je]="uppercaseL";const Le=77;n[n.uppercaseM=Le]="uppercaseM";const ze=78;n[n.uppercaseN=ze]="uppercaseN";const Xe=79;n[n.uppercaseO=Xe]="uppercaseO";const at=80;n[n.uppercaseP=at]="uppercaseP";const ut=81;n[n.uppercaseQ=ut]="uppercaseQ";const rn=82;n[n.uppercaseR=rn]="uppercaseR";const nt=83;n[n.uppercaseS=nt]="uppercaseS";const $=84;n[n.uppercaseT=$]="uppercaseT";const pe=85;n[n.uppercaseU=pe]="uppercaseU";const Z=86;n[n.uppercaseV=Z]="uppercaseV";const Ve=87;n[n.uppercaseW=Ve]="uppercaseW";const It=88;n[n.uppercaseX=It]="uppercaseX";const dn=89;n[n.uppercaseY=dn]="uppercaseY";const Xr=90;n[n.uppercaseZ=Xr]="uppercaseZ";const Gt=91;n[n.leftSquareBracket=Gt]="leftSquareBracket";const ft=92;n[n.backslash=ft]="backslash";const Dn=93;n[n.rightSquareBracket=Dn]="rightSquareBracket";const Wt=94;n[n.caret=Wt]="caret";const xn=95;n[n.underscore=xn]="underscore";const Ne=96;n[n.graveAccent=Ne]="graveAccent";const Kn=97;n[n.lowercaseA=Kn]="lowercaseA";const Lt=98;n[n.lowercaseB=Lt]="lowercaseB";const Be=99;n[n.lowercaseC=Be]="lowercaseC";const dt=100;n[n.lowercaseD=dt]="lowercaseD";const Xn=101;n[n.lowercaseE=Xn]="lowercaseE";const xt=102;n[n.lowercaseF=xt]="lowercaseF";const mn=103;n[n.lowercaseG=mn]="lowercaseG";const St=104;n[n.lowercaseH=St]="lowercaseH";const Vn=105;n[n.lowercaseI=Vn]="lowercaseI";const Kt=106;n[n.lowercaseJ=Kt]="lowercaseJ";const Rn=107;n[n.lowercaseK=Rn]="lowercaseK";const Ln=108;n[n.lowercaseL=Ln]="lowercaseL";const Sr=109;n[n.lowercaseM=Sr]="lowercaseM";const lr=110;n[n.lowercaseN=lr]="lowercaseN";const Et=111;n[n.lowercaseO=Et]="lowercaseO";const Tr=112;n[n.lowercaseP=Tr]="lowercaseP";const ur=113;n[n.lowercaseQ=ur]="lowercaseQ";const gn=114;n[n.lowercaseR=gn]="lowercaseR";const cr=115;n[n.lowercaseS=cr]="lowercaseS";const Cr=116;n[n.lowercaseT=Cr]="lowercaseT";const Ir=117;n[n.lowercaseU=Ir]="lowercaseU";const fr=118;n[n.lowercaseV=fr]="lowercaseV";const En=119;n[n.lowercaseW=En]="lowercaseW";const Zt=120;n[n.lowercaseX=Zt]="lowercaseX";const Xt=121;n[n.lowercaseY=Xt]="lowercaseY";const Ar=122;n[n.lowercaseZ=Ar]="lowercaseZ";const _n=123;n[n.leftCurlyBrace=_n]="leftCurlyBrace";const Yn=124;n[n.verticalBar=Yn]="verticalBar";const Jn=125;n[n.rightCurlyBrace=Jn]="rightCurlyBrace";const sn=126;n[n.tilde=sn]="tilde";const on=160;n[n.nonBreakingSpace=on]="nonBreakingSpace";const Vt=5760;n[n.oghamSpaceMark=Vt]="oghamSpaceMark";const hr=8232;n[n.lineSeparator=hr]="lineSeparator";const pr=8233;n[n.paragraphSeparator=pr]="paragraphSeparator"})(H||(H={}));let Ho,tt,it,h,xe,Kc;function Es(){return Kc++}function Am(n){if("pos"in n){const o=Em(n.pos);n.message+=` (${o.line}:${o.column})`,n.loc=o}return n}class Lm{constructor(o,l){this.line=o,this.column=l}}function Em(n){let o=1,l=1;for(let c=0;c<n;c++)xe.charCodeAt(c)===H.lineFeed?(o++,l=1):l++;return new Lm(o,l)}function Nm(n,o,l,c){xe=n,h=new hn,Kc=1,Ho=o,tt=l,it=c}function Re(n){return h.contextualKeyword===n}function Xc(n){const o=Fs();return o.type===s.name&&o.contextualKeyword===n}function jt(n){return h.contextualKeyword===n&&J(s.name)}function Bt(n){jt(n)||Ue()}function Cn(){return x(s.eof)||x(s.braceR)||In()}function In(){const n=h.tokens[h.tokens.length-1],o=n?n.end:0;for(let l=o;l<h.start;l++){const c=xe.charCodeAt(l);if(c===H.lineFeed||c===H.carriageReturn||c===8232||c===8233)return!0}return!1}function Pm(){const n=bl();for(let o=h.end;o<n;o++){const l=xe.charCodeAt(o);if(l===H.lineFeed||l===H.carriageReturn||l===8232||l===8233)return!0}return!1}function nr(){return J(s.semi)||Cn()}function pt(){nr()||Ue('Unexpected token, expected ";"')}function re(n){J(n)||Ue(`Unexpected token, expected "${Cm(n)}"`)}function Ue(n="Unexpected token",o=h.start){if(h.error)return;const l=new SyntaxError(n);l.pos=o,h.error=l,h.pos=xe.length,$e(s.eof)}const Vc=[9,11,12,H.space,H.nonBreakingSpace,H.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],uc=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Yc=new Uint8Array(65536);for(const n of Vc)Yc[n]=1;function Om(n){if(n<48)return n===36;if(n<58)return!0;if(n<65)return!1;if(n<91)return!0;if(n<97)return n===95;if(n<123)return!0;if(n<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const $n=new Uint8Array(65536);for(let n=0;n<128;n++)$n[n]=Om(n)?1:0;for(let n=128;n<65536;n++)$n[n]=1;for(const n of Vc)$n[n]=0;$n[8232]=0;$n[8233]=0;const Ms=$n.slice();for(let n=H.digit0;n<=H.digit9;n++)Ms[n]=0;const cc=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8343,8505,-1,8721,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,O._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,O._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,O._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,O._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,O._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,O._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(s._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(s._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,O._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(s._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(s._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(s._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,O._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(s._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(s._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(s._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,O._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(s._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,O._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(s._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,O._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(s._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,O._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(s._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,O._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,O._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,O._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,O._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,O._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(s._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(s._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(s._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,O._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,(s._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8451,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,8640,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8613,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8829,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function Dm(){let n=0,o=0,l=h.pos;for(;l<xe.length&&(o=xe.charCodeAt(l),!(o<H.lowercaseA||o>H.lowercaseZ));){const p=cc[n+(o-H.lowercaseA)+1];if(p===-1)break;n=p,l++}const c=cc[n];if(c>-1&&!$n[o]){h.pos=l,c&1?$e(c>>>1):$e(s.name,c>>>1);return}for(;l<xe.length;){const p=xe.charCodeAt(l);if($n[p])l++;else if(p===H.backslash){if(l+=2,xe.charCodeAt(l)===H.leftCurlyBrace){for(;l<xe.length&&xe.charCodeAt(l)!==H.rightCurlyBrace;)l++;l++}}else if(p===H.atSign&&xe.charCodeAt(l+1)===H.atSign)l+=2;else break}h.pos=l,$e(s.name)}var De;(function(n){n[n.Access=0]="Access";const l=0+1;n[n.ExportAccess=l]="ExportAccess";const c=l+1;n[n.TopLevelDeclaration=c]="TopLevelDeclaration";const p=c+1;n[n.FunctionScopedDeclaration=p]="FunctionScopedDeclaration";const g=p+1;n[n.BlockScopedDeclaration=g]="BlockScopedDeclaration";const _=g+1;n[n.ObjectShorthandTopLevelDeclaration=_]="ObjectShorthandTopLevelDeclaration";const S=_+1;n[n.ObjectShorthandFunctionScopedDeclaration=S]="ObjectShorthandFunctionScopedDeclaration";const w=S+1;n[n.ObjectShorthandBlockScopedDeclaration=w]="ObjectShorthandBlockScopedDeclaration";const C=w+1;n[n.ObjectShorthand=C]="ObjectShorthand";const y=C+1;n[n.ImportDeclaration=y]="ImportDeclaration";const E=y+1;n[n.ObjectKey=E]="ObjectKey";const L=E+1;n[n.ImportAccess=L]="ImportAccess"})(De||(De={}));var qn;(function(n){n[n.NoChildren=0]="NoChildren";const l=0+1;n[n.OneChild=l]="OneChild";const c=l+1;n[n.StaticChildren=c]="StaticChildren";const p=c+1;n[n.KeyAfterPropSpread=p]="KeyAfterPropSpread"})(qn||(qn={}));function Jc(n){const o=n.identifierRole;return o===De.TopLevelDeclaration||o===De.FunctionScopedDeclaration||o===De.BlockScopedDeclaration||o===De.ObjectShorthandTopLevelDeclaration||o===De.ObjectShorthandFunctionScopedDeclaration||o===De.ObjectShorthandBlockScopedDeclaration}function Rm(n){const o=n.identifierRole;return o===De.FunctionScopedDeclaration||o===De.BlockScopedDeclaration||o===De.ObjectShorthandFunctionScopedDeclaration||o===De.ObjectShorthandBlockScopedDeclaration}function Qc(n){const o=n.identifierRole;return o===De.TopLevelDeclaration||o===De.ObjectShorthandTopLevelDeclaration||o===De.ImportDeclaration}function Mm(n){const o=n.identifierRole;return o===De.TopLevelDeclaration||o===De.BlockScopedDeclaration||o===De.ObjectShorthandTopLevelDeclaration||o===De.ObjectShorthandBlockScopedDeclaration}function Fm(n){const o=n.identifierRole;return o===De.FunctionScopedDeclaration||o===De.ObjectShorthandFunctionScopedDeclaration}function Bm(n){return n.identifierRole===De.ObjectShorthandTopLevelDeclaration||n.identifierRole===De.ObjectShorthandBlockScopedDeclaration||n.identifierRole===De.ObjectShorthandFunctionScopedDeclaration}class qo{constructor(){this.type=h.type,this.contextualKeyword=h.contextualKeyword,this.start=h.start,this.end=h.end,this.scopeDepth=h.scopeDepth,this.isType=h.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}}function ie(){h.tokens.push(new qo),nf()}function jr(){h.tokens.push(new qo),h.start=h.pos,ng()}function jm(){h.type===s.assign&&--h.pos,Zm()}function Ge(n){for(let l=h.tokens.length-n;l<h.tokens.length;l++)h.tokens[l].isType=!0;const o=h.isType;return h.isType=!0,o}function Ke(n){h.isType=n}function J(n){return x(n)?(ie(),!0):!1}function Zc(n){const o=h.isType;h.isType=!0,J(n),h.isType=o}function x(n){return h.type===n}function wt(){const n=h.snapshot();ie();const o=h.type;return h.restoreFromSnapshot(n),o}class Wm{constructor(o,l){this.type=o,this.contextualKeyword=l}}function Fs(){const n=h.snapshot();ie();const o=h.type,l=h.contextualKeyword;return h.restoreFromSnapshot(n),new Wm(o,l)}function bl(){return ef(h.pos)}function ef(n){uc.lastIndex=n;const o=uc.exec(xe);return n+o[0].length}function tf(){return xe.charCodeAt(bl())}function nf(){if(sf(),h.start=h.pos,h.pos>=xe.length){const n=h.tokens;n.length>=2&&n[n.length-1].start>=xe.length&&n[n.length-2].start>=xe.length&&Ue("Unexpectedly reached the end of input."),$e(s.eof);return}Hm(xe.charCodeAt(h.pos))}function Hm(n){Ms[n]||n===H.backslash||n===H.atSign&&xe.charCodeAt(h.pos+1)===H.atSign?Dm():af(n)}function qm(){for(;xe.charCodeAt(h.pos)!==H.asterisk||xe.charCodeAt(h.pos+1)!==H.slash;)if(h.pos++,h.pos>xe.length){Ue("Unterminated comment",h.pos-2);return}h.pos+=2}function rf(n){let o=xe.charCodeAt(h.pos+=n);if(h.pos<xe.length)for(;o!==H.lineFeed&&o!==H.carriageReturn&&o!==H.lineSeparator&&o!==H.paragraphSeparator&&++h.pos<xe.length;)o=xe.charCodeAt(h.pos)}function sf(){for(;h.pos<xe.length;){const n=xe.charCodeAt(h.pos);switch(n){case H.carriageReturn:xe.charCodeAt(h.pos+1)===H.lineFeed&&++h.pos;case H.lineFeed:case H.lineSeparator:case H.paragraphSeparator:++h.pos;break;case H.slash:switch(xe.charCodeAt(h.pos+1)){case H.asterisk:h.pos+=2,qm();break;case H.slash:rf(2);break;default:return}break;default:if(Yc[n])++h.pos;else return}}}function $e(n,o=O.NONE){h.end=h.pos,h.type=n,h.contextualKeyword=o}function zm(){const n=xe.charCodeAt(h.pos+1);if(n>=H.digit0&&n<=H.digit9){lf(!0);return}n===H.dot&&xe.charCodeAt(h.pos+2)===H.dot?(h.pos+=3,$e(s.ellipsis)):(++h.pos,$e(s.dot))}function $m(){xe.charCodeAt(h.pos+1)===H.equalsTo?ot(s.assign,2):ot(s.slash,1)}function Um(n){let o=n===H.asterisk?s.star:s.modulo,l=1,c=xe.charCodeAt(h.pos+1);n===H.asterisk&&c===H.asterisk&&(l++,c=xe.charCodeAt(h.pos+2),o=s.exponent),c===H.equalsTo&&xe.charCodeAt(h.pos+2)!==H.greaterThan&&(l++,o=s.assign),ot(o,l)}function Gm(n){const o=xe.charCodeAt(h.pos+1);if(o===n){xe.charCodeAt(h.pos+2)===H.equalsTo?ot(s.assign,3):ot(n===H.verticalBar?s.logicalOR:s.logicalAND,2);return}if(n===H.verticalBar){if(o===H.greaterThan){ot(s.pipeline,2);return}else if(o===H.rightCurlyBrace&&it){ot(s.braceBarR,2);return}}if(o===H.equalsTo){ot(s.assign,2);return}ot(n===H.verticalBar?s.bitwiseOR:s.bitwiseAND,1)}function Km(){xe.charCodeAt(h.pos+1)===H.equalsTo?ot(s.assign,2):ot(s.bitwiseXOR,1)}function Xm(n){const o=xe.charCodeAt(h.pos+1);if(o===n){ot(s.preIncDec,2);return}o===H.equalsTo?ot(s.assign,2):n===H.plusSign?ot(s.plus,1):ot(s.minus,1)}function Vm(){const n=xe.charCodeAt(h.pos+1);if(n===H.lessThan){if(xe.charCodeAt(h.pos+2)===H.equalsTo){ot(s.assign,3);return}ot(s.bitShiftL,2);return}n===H.equalsTo?ot(s.relationalOrEqual,2):ot(s.lessThan,1)}function of(){if(h.isType){ot(s.greaterThan,1);return}const n=xe.charCodeAt(h.pos+1);if(n===H.greaterThan){const o=xe.charCodeAt(h.pos+2)===H.greaterThan?3:2;if(xe.charCodeAt(h.pos+o)===H.equalsTo){ot(s.assign,o+1);return}ot(s.bitShiftR,o);return}n===H.equalsTo?ot(s.relationalOrEqual,2):ot(s.greaterThan,1)}function Ym(){h.type===s.greaterThan&&(h.pos-=1,of())}function Jm(n){const o=xe.charCodeAt(h.pos+1);if(o===H.equalsTo){ot(s.equality,xe.charCodeAt(h.pos+2)===H.equalsTo?3:2);return}if(n===H.equalsTo&&o===H.greaterThan){h.pos+=2,$e(s.arrow);return}ot(n===H.equalsTo?s.eq:s.bang,1)}function Qm(){const n=xe.charCodeAt(h.pos+1),o=xe.charCodeAt(h.pos+2);n===H.questionMark&&!(it&&h.isType)?o===H.equalsTo?ot(s.assign,3):ot(s.nullishCoalescing,2):n===H.dot&&!(o>=H.digit0&&o<=H.digit9)?(h.pos+=2,$e(s.questionDot)):(++h.pos,$e(s.question))}function af(n){switch(n){case H.numberSign:++h.pos,$e(s.hash);return;case H.dot:zm();return;case H.leftParenthesis:++h.pos,$e(s.parenL);return;case H.rightParenthesis:++h.pos,$e(s.parenR);return;case H.semicolon:++h.pos,$e(s.semi);return;case H.comma:++h.pos,$e(s.comma);return;case H.leftSquareBracket:++h.pos,$e(s.bracketL);return;case H.rightSquareBracket:++h.pos,$e(s.bracketR);return;case H.leftCurlyBrace:it&&xe.charCodeAt(h.pos+1)===H.verticalBar?ot(s.braceBarL,2):(++h.pos,$e(s.braceL));return;case H.rightCurlyBrace:++h.pos,$e(s.braceR);return;case H.colon:xe.charCodeAt(h.pos+1)===H.colon?ot(s.doubleColon,2):(++h.pos,$e(s.colon));return;case H.questionMark:Qm();return;case H.atSign:++h.pos,$e(s.at);return;case H.graveAccent:++h.pos,$e(s.backQuote);return;case H.digit0:{const o=xe.charCodeAt(h.pos+1);if(o===H.lowercaseX||o===H.uppercaseX||o===H.lowercaseO||o===H.uppercaseO||o===H.lowercaseB||o===H.uppercaseB){eg();return}}case H.digit1:case H.digit2:case H.digit3:case H.digit4:case H.digit5:case H.digit6:case H.digit7:case H.digit8:case H.digit9:lf(!1);return;case H.quotationMark:case H.apostrophe:tg(n);return;case H.slash:$m();return;case H.percentSign:case H.asterisk:Um(n);return;case H.verticalBar:case H.ampersand:Gm(n);return;case H.caret:Km();return;case H.plusSign:case H.dash:Xm(n);return;case H.lessThan:Vm();return;case H.greaterThan:of();return;case H.equalsTo:case H.exclamationMark:Jm(n);return;case H.tilde:ot(s.tilde,1);return}Ue(`Unexpected character '${String.fromCharCode(n)}'`,h.pos)}function ot(n,o){h.pos+=o,$e(n)}function Zm(){const n=h.pos;let o=!1,l=!1;for(;;){if(h.pos>=xe.length){Ue("Unterminated regular expression",n);return}const c=xe.charCodeAt(h.pos);if(o)o=!1;else{if(c===H.leftSquareBracket)l=!0;else if(c===H.rightSquareBracket&&l)l=!1;else if(c===H.slash&&!l)break;o=c===H.backslash}++h.pos}++h.pos,rg(),$e(s.regexp)}function Ua(){for(;;){const n=xe.charCodeAt(h.pos);if(n>=H.digit0&&n<=H.digit9||n===H.underscore)h.pos++;else break}}function eg(){for(h.pos+=2;;){const o=xe.charCodeAt(h.pos);if(o>=H.digit0&&o<=H.digit9||o>=H.lowercaseA&&o<=H.lowercaseF||o>=H.uppercaseA&&o<=H.uppercaseF||o===H.underscore)h.pos++;else break}xe.charCodeAt(h.pos)===H.lowercaseN?(++h.pos,$e(s.bigint)):$e(s.num)}function lf(n){let o=!1,l=!1;n||Ua();let c=xe.charCodeAt(h.pos);if(c===H.dot&&(++h.pos,Ua(),c=xe.charCodeAt(h.pos)),(c===H.uppercaseE||c===H.lowercaseE)&&(c=xe.charCodeAt(++h.pos),(c===H.plusSign||c===H.dash)&&++h.pos,Ua(),c=xe.charCodeAt(h.pos)),c===H.lowercaseN?(++h.pos,o=!0):c===H.lowercaseM&&(++h.pos,l=!0),o){$e(s.bigint);return}if(l){$e(s.decimal);return}$e(s.num)}function tg(n){for(h.pos++;;){if(h.pos>=xe.length){Ue("Unterminated string constant");return}const o=xe.charCodeAt(h.pos);if(o===H.backslash)h.pos++;else if(o===n)break;h.pos++}h.pos++,$e(s.string)}function ng(){for(;;){if(h.pos>=xe.length){Ue("Unterminated template");return}const n=xe.charCodeAt(h.pos);if(n===H.graveAccent||n===H.dollarSign&&xe.charCodeAt(h.pos+1)===H.leftCurlyBrace){if(h.pos===h.start&&x(s.template))if(n===H.dollarSign){h.pos+=2,$e(s.dollarBraceL);return}else{++h.pos,$e(s.backQuote);return}$e(s.template);return}n===H.backslash&&h.pos++,h.pos++}}function rg(){for(;h.pos<xe.length;){const n=xe.charCodeAt(h.pos);if($n[n])h.pos++;else if(n===H.backslash){if(h.pos+=2,xe.charCodeAt(h.pos)===H.leftCurlyBrace){for(;h.pos<xe.length&&xe.charCodeAt(h.pos)!==H.rightCurlyBrace;)h.pos++;h.pos++}}else break}}function Ns(n,o=n.currentIndex()){let l=o+1;if(yo(n,l)){const c=n.identifierNameAtIndex(o);return{isType:!1,leftName:c,rightName:c,endIndex:l}}if(l++,yo(n,l))return{isType:!0,leftName:null,rightName:null,endIndex:l};if(l++,yo(n,l))return{isType:!1,leftName:n.identifierNameAtIndex(o),rightName:n.identifierNameAtIndex(o+2),endIndex:l};if(l++,yo(n,l))return{isType:!0,leftName:null,rightName:null,endIndex:l};throw new Error(`Unexpected import/export specifier at ${o}`)}function yo(n,o){const l=n.tokens[o];return l.type===s.braceR||l.type===s.comma}const ig=new Map([["quot",'"'],["amp","&"],["apos","'"],["lt","<"],["gt",">"],["nbsp"," "],["iexcl","¡"],["cent","¢"],["pound","£"],["curren","¤"],["yen","¥"],["brvbar","¦"],["sect","§"],["uml","¨"],["copy","©"],["ordf","ª"],["laquo","«"],["not","¬"],["shy","­"],["reg","®"],["macr","¯"],["deg","°"],["plusmn","±"],["sup2","²"],["sup3","³"],["acute","´"],["micro","µ"],["para","¶"],["middot","·"],["cedil","¸"],["sup1","¹"],["ordm","º"],["raquo","»"],["frac14","¼"],["frac12","½"],["frac34","¾"],["iquest","¿"],["Agrave","À"],["Aacute","Á"],["Acirc","Â"],["Atilde","Ã"],["Auml","Ä"],["Aring","Å"],["AElig","Æ"],["Ccedil","Ç"],["Egrave","È"],["Eacute","É"],["Ecirc","Ê"],["Euml","Ë"],["Igrave","Ì"],["Iacute","Í"],["Icirc","Î"],["Iuml","Ï"],["ETH","Ð"],["Ntilde","Ñ"],["Ograve","Ò"],["Oacute","Ó"],["Ocirc","Ô"],["Otilde","Õ"],["Ouml","Ö"],["times","×"],["Oslash","Ø"],["Ugrave","Ù"],["Uacute","Ú"],["Ucirc","Û"],["Uuml","Ü"],["Yacute","Ý"],["THORN","Þ"],["szlig","ß"],["agrave","à"],["aacute","á"],["acirc","â"],["atilde","ã"],["auml","ä"],["aring","å"],["aelig","æ"],["ccedil","ç"],["egrave","è"],["eacute","é"],["ecirc","ê"],["euml","ë"],["igrave","ì"],["iacute","í"],["icirc","î"],["iuml","ï"],["eth","ð"],["ntilde","ñ"],["ograve","ò"],["oacute","ó"],["ocirc","ô"],["otilde","õ"],["ouml","ö"],["divide","÷"],["oslash","ø"],["ugrave","ù"],["uacute","ú"],["ucirc","û"],["uuml","ü"],["yacute","ý"],["thorn","þ"],["yuml","ÿ"],["OElig","Œ"],["oelig","œ"],["Scaron","Š"],["scaron","š"],["Yuml","Ÿ"],["fnof","ƒ"],["circ","ˆ"],["tilde","˜"],["Alpha","Α"],["Beta","Β"],["Gamma","Γ"],["Delta","Δ"],["Epsilon","Ε"],["Zeta","Ζ"],["Eta","Η"],["Theta","Θ"],["Iota","Ι"],["Kappa","Κ"],["Lambda","Λ"],["Mu","Μ"],["Nu","Ν"],["Xi","Ξ"],["Omicron","Ο"],["Pi","Π"],["Rho","Ρ"],["Sigma","Σ"],["Tau","Τ"],["Upsilon","Υ"],["Phi","Φ"],["Chi","Χ"],["Psi","Ψ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["iota","ι"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["omicron","ο"],["pi","π"],["rho","ρ"],["sigmaf","ς"],["sigma","σ"],["tau","τ"],["upsilon","υ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"],["thetasym","ϑ"],["upsih","ϒ"],["piv","ϖ"],["ensp"," "],["emsp"," "],["thinsp"," "],["zwnj","‌"],["zwj","‍"],["lrm","‎"],["rlm","‏"],["ndash","–"],["mdash","—"],["lsquo","‘"],["rsquo","’"],["sbquo","‚"],["ldquo","“"],["rdquo","”"],["bdquo","„"],["dagger","†"],["Dagger","‡"],["bull","•"],["hellip","…"],["permil","‰"],["prime","′"],["Prime","″"],["lsaquo","‹"],["rsaquo","›"],["oline","‾"],["frasl","⁄"],["euro","€"],["image","ℑ"],["weierp","℘"],["real","ℜ"],["trade","™"],["alefsym","ℵ"],["larr","←"],["uarr","↑"],["rarr","→"],["darr","↓"],["harr","↔"],["crarr","↵"],["lArr","⇐"],["uArr","⇑"],["rArr","⇒"],["dArr","⇓"],["hArr","⇔"],["forall","∀"],["part","∂"],["exist","∃"],["empty","∅"],["nabla","∇"],["isin","∈"],["notin","∉"],["ni","∋"],["prod","∏"],["sum","∑"],["minus","−"],["lowast","∗"],["radic","√"],["prop","∝"],["infin","∞"],["ang","∠"],["and","∧"],["or","∨"],["cap","∩"],["cup","∪"],["int","∫"],["there4","∴"],["sim","∼"],["cong","≅"],["asymp","≈"],["ne","≠"],["equiv","≡"],["le","≤"],["ge","≥"],["sub","⊂"],["sup","⊃"],["nsub","⊄"],["sube","⊆"],["supe","⊇"],["oplus","⊕"],["otimes","⊗"],["perp","⊥"],["sdot","⋅"],["lceil","⌈"],["rceil","⌉"],["lfloor","⌊"],["rfloor","⌋"],["lang","〈"],["rang","〉"],["loz","◊"],["spades","♠"],["clubs","♣"],["hearts","♥"],["diams","♦"]]);function uf(n){const[o,l]=fc(n.jsxPragma||"React.createElement"),[c,p]=fc(n.jsxFragmentPragma||"React.Fragment");return{base:o,suffix:l,fragmentBase:c,fragmentSuffix:p}}function fc(n){let o=n.indexOf(".");return o===-1&&(o=n.length),[n.slice(0,o),n.slice(o)]}class Un{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}class ai extends Un{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(o,l,c,p,g){super(),this.rootTransformer=o,this.tokens=l,this.importProcessor=c,this.nameManager=p,this.options=g,ai.prototype.__init.call(this),ai.prototype.__init2.call(this),ai.prototype.__init3.call(this),ai.prototype.__init4.call(this),ai.prototype.__init5.call(this),this.jsxPragmaInfo=uf(g),this.isAutomaticRuntime=g.jsxRuntime==="automatic",this.jsxImportSource=g.jsxImportSource||"react"}process(){return this.tokens.matches1(s.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let o="";if(this.filenameVarName&&(o+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`),this.isAutomaticRuntime)if(this.importProcessor)for(const[l,c]of Object.entries(this.cjsAutomaticModuleNameResolutions))o+=`var ${c} = require("${l}");`;else{const{createElement:l,...c}=this.esmAutomaticImportNameResolutions;l&&(o+=`import {createElement as ${l}} from "${this.jsxImportSource}";`);const p=Object.entries(c).map(([g,_])=>`${g} as ${_}`).join(", ");if(p){const g=this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime");o+=`import {${p}} from "${g}";`}}return o}processJSXTag(){const{jsxRole:o,start:l}=this.tokens.currentToken(),c=this.options.production?null:this.getElementLocationCode(l);this.isAutomaticRuntime&&o!==qn.KeyAfterPropSpread?this.transformTagToJSXFunc(c,o):this.transformTagToCreateElement(c)}getElementLocationCode(o){return`lineNumber: ${this.getLineNumberForIndex(o)}`}getLineNumberForIndex(o){const l=this.tokens.code;for(;this.lastIndex<o&&this.lastIndex<l.length;)l[this.lastIndex]===`
`&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(o,l){const c=l===qn.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(c));let p=null;if(this.tokens.matches1(s.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(l);else{if(this.processTagIntro(),this.tokens.appendCode(", {"),p=this.processProps(!0),this.tokens.matches2(s.slash,s.jsxTagEnd))this.tokens.appendCode("}");else if(this.tokens.matches1(s.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(l);else throw new Error("Expected either /> or > at the end of the tag.");p&&this.tokens.appendCode(`, ${p}`)}for(this.options.production||(p===null&&this.tokens.appendCode(", void 0"),this.tokens.appendCode(`, ${c}, ${this.getDevSource(o)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(s.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}transformTagToCreateElement(o){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(s.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(o),!this.tokens.matches2(s.slash,s.jsxTagEnd))if(this.tokens.matches1(s.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw new Error("Expected either /> or > at the end of the tag.");for(this.tokens.removeInitialToken();!this.tokens.matches1(s.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}getJSXFuncInvocationCode(o){return this.options.production?o?this.claimAutoImportedFuncInvocation("jsxs","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsx","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsxDEV","/jsx-dev-runtime")}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation("createElement","");{const{jsxPragmaInfo:o}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(o.base)||o.base}${o.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName("Fragment",this.options.production?"/jsx-runtime":"/jsx-dev-runtime");{const{jsxPragmaInfo:o}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(o.fragmentBase)||o.fragmentBase)+o.fragmentSuffix}}claimAutoImportedFuncInvocation(o,l){const c=this.claimAutoImportedName(o,l);return this.importProcessor?`${c}.call(void 0, `:`${c}(`}claimAutoImportedName(o,l){if(this.importProcessor){const c=this.jsxImportSource+l;return this.cjsAutomaticModuleNameResolutions[c]||(this.cjsAutomaticModuleNameResolutions[c]=this.importProcessor.getFreeIdentifierForPath(c)),`${this.cjsAutomaticModuleNameResolutions[c]}.${o}`}else return this.esmAutomaticImportNameResolutions[o]||(this.esmAutomaticImportNameResolutions[o]=this.nameManager.claimFreeName(`_${o}`)),this.esmAutomaticImportNameResolutions[o]}processTagIntro(){let o=this.tokens.currentIndex()+1;for(;this.tokens.tokens[o].isType||!this.tokens.matches2AtIndex(o-1,s.jsxName,s.jsxName)&&!this.tokens.matches2AtIndex(o-1,s.greaterThan,s.jsxName)&&!this.tokens.matches1AtIndex(o,s.braceL)&&!this.tokens.matches1AtIndex(o,s.jsxTagEnd)&&!this.tokens.matches2AtIndex(o,s.slash,s.jsxTagEnd);)o++;if(o===this.tokens.currentIndex()+1){const l=this.tokens.identifierName();cf(l)&&this.tokens.replaceToken(`'${l}'`)}for(;this.tokens.currentIndex()<o;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(o){const l=this.options.production?"":`__self: this, __source: ${this.getDevSource(o)}`;if(!this.tokens.matches1(s.jsxName)&&!this.tokens.matches1(s.braceL)){l?this.tokens.appendCode(`, {${l}}`):this.tokens.appendCode(", null");return}this.tokens.appendCode(", {"),this.processProps(!1),l?this.tokens.appendCode(` ${l}}`):this.tokens.appendCode("}")}processProps(o){let l=null;for(;;){if(this.tokens.matches2(s.jsxName,s.eq)){const c=this.tokens.identifierName();if(o&&c==="key"){l!==null&&this.tokens.appendCode(l.replace(/[^\n]/g,"")),this.tokens.removeToken(),this.tokens.removeToken();const p=this.tokens.snapshot();this.processPropValue(),l=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(p);continue}else this.processPropName(c),this.tokens.replaceToken(": "),this.processPropValue()}else if(this.tokens.matches1(s.jsxName)){const c=this.tokens.identifierName();this.processPropName(c),this.tokens.appendCode(": true")}else if(this.tokens.matches1(s.braceL))this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("");else break;this.tokens.appendCode(",")}return l}processPropName(o){o.includes("-")?this.tokens.replaceToken(`'${o}'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(s.braceL)?(this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")):this.tokens.matches1(s.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){const o=this.tokens.currentToken(),l=this.tokens.code.slice(o.start+1,o.end-1),c=hc(l),p=og(l);this.tokens.replaceToken(p+c)}processAutomaticChildrenAndEndProps(o){o===qn.StaticChildren?(this.tokens.appendCode(" children: ["),this.processChildren(!1),this.tokens.appendCode("]}")):(o===qn.OneChild&&this.tokens.appendCode(" children: "),this.processChildren(!1),this.tokens.appendCode("}"))}processChildren(o){let l=o;for(;;){if(this.tokens.matches2(s.jsxTagStart,s.slash))return;let c=!1;if(this.tokens.matches1(s.braceL))this.tokens.matches2(s.braceL,s.braceR)?(this.tokens.replaceToken(""),this.tokens.replaceToken("")):(this.tokens.replaceToken(l?", ":""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(""),c=!0);else if(this.tokens.matches1(s.jsxTagStart))this.tokens.appendCode(l?", ":""),this.processJSXTag(),c=!0;else if(this.tokens.matches1(s.jsxText)||this.tokens.matches1(s.jsxEmptyText))c=this.processChildTextElement(l);else throw new Error("Unexpected token when processing JSX children.");c&&(l=!0)}}processChildTextElement(o){const l=this.tokens.currentToken(),c=this.tokens.code.slice(l.start,l.end),p=hc(c),g=sg(c);return g==='""'?(this.tokens.replaceToken(p),!1):(this.tokens.replaceToken(`${o?", ":""}${g}${p}`),!0)}getDevSource(o){return`{fileName: ${this.getFilenameVarName()}, ${o}}`}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}}function cf(n){const o=n.charCodeAt(0);return o>=H.lowercaseA&&o<=H.lowercaseZ}function sg(n){let o="",l="",c=!1,p=!1;for(let g=0;g<n.length;g++){const _=n[g];if(_===" "||_===" "||_==="\r")c||(l+=_);else if(_===`
`)l="",c=!0;else{if(p&&c&&(o+=" "),o+=l,l="",_==="&"){const{entity:S,newI:w}=ff(n,g+1);g=w-1,o+=S}else o+=_;p=!0,c=!1}}return c||(o+=l),JSON.stringify(o)}function hc(n){let o=0,l=0;for(const c of n)c===`
`?(o++,l=0):c===" "&&l++;return`
`.repeat(o)+" ".repeat(l)}function og(n){let o="";for(let l=0;l<n.length;l++){const c=n[l];if(c===`
`)if(/\s/.test(n[l+1]))for(o+=" ";l<n.length&&/\s/.test(n[l+1]);)l++;else o+=`
`;else if(c==="&"){const{entity:p,newI:g}=ff(n,l+1);o+=p,l=g-1}else o+=c}return JSON.stringify(o)}function ff(n,o){let l="",c=0,p,g=o;if(n[g]==="#"){let _=10;g++;let S;if(n[g]==="x")for(_=16,g++,S=g;g<n.length&&lg(n.charCodeAt(g));)g++;else for(S=g;g<n.length&&ag(n.charCodeAt(g));)g++;if(n[g]===";"){const w=n.slice(S,g);w&&(g++,p=String.fromCodePoint(parseInt(w,_)))}}else for(;g<n.length&&c++<10;){const _=n[g];if(g++,_===";"){p=ig.get(l);break}l+=_}return p?{entity:p,newI:g}:{entity:"&",newI:o}}function ag(n){return n>=H.digit0&&n<=H.digit9}function lg(n){return n>=H.digit0&&n<=H.digit9||n>=H.lowercaseA&&n<=H.lowercaseF||n>=H.uppercaseA&&n<=H.uppercaseF}function hf(n,o){const l=uf(o),c=new Set;for(let p=0;p<n.tokens.length;p++){const g=n.tokens[p];if(g.type===s.name&&!g.isType&&(g.identifierRole===De.Access||g.identifierRole===De.ObjectShorthand||g.identifierRole===De.ExportAccess)&&!g.shadowsGlobal&&c.add(n.identifierNameForToken(g)),g.type===s.jsxTagStart&&c.add(l.base),g.type===s.jsxTagStart&&p+1<n.tokens.length&&n.tokens[p+1].type===s.jsxTagEnd&&(c.add(l.base),c.add(l.fragmentBase)),g.type===s.jsxName&&g.identifierRole===De.Access){const _=n.identifierNameForToken(g);(!cf(_)||n.tokens[p+1].type===s.dot)&&c.add(n.identifierNameForToken(g))}}return c}class li{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(o,l,c,p,g,_){this.nameManager=o,this.tokens=l,this.enableLegacyTypeScriptModuleInterop=c,this.options=p,this.isTypeScriptTransformEnabled=g,this.helperManager=_,li.prototype.__init.call(this),li.prototype.__init2.call(this),li.prototype.__init3.call(this),li.prototype.__init4.call(this),li.prototype.__init5.call(this)}preprocessTokens(){for(let o=0;o<this.tokens.tokens.length;o++)this.tokens.matches1AtIndex(o,s._import)&&!this.tokens.matches3AtIndex(o,s._import,s.name,s.eq)&&this.preprocessImportAtIndex(o),this.tokens.matches1AtIndex(o,s._export)&&!this.tokens.matches2AtIndex(o,s._export,s.eq)&&this.preprocessExportAtIndex(o);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=hf(this.tokens,this.options);for(const[o,l]of this.importInfoByPath.entries()){if(l.hasBareImport||l.hasStarExport||l.exportStarNames.length>0||l.namedExports.length>0)continue;[...l.defaultNames,...l.wildcardNames,...l.namedImports.map(({localName:p})=>p)].every(p=>this.isTypeName(p))&&this.importsToReplace.set(o,"")}}isTypeName(o){return this.isTypeScriptTransformEnabled&&!this.nonTypeIdentifiers.has(o)}generateImportReplacements(){for(const[o,l]of this.importInfoByPath.entries()){const{defaultNames:c,wildcardNames:p,namedImports:g,namedExports:_,exportStarNames:S,hasStarExport:w}=l;if(c.length===0&&p.length===0&&g.length===0&&_.length===0&&S.length===0&&!w){this.importsToReplace.set(o,`require('${o}');`);continue}const C=this.getFreeIdentifierForPath(o);let y;this.enableLegacyTypeScriptModuleInterop?y=C:y=p.length>0?p[0]:this.getFreeIdentifierForPath(o);let E=`var ${C} = require('${o}');`;if(p.length>0)for(const L of p){const T=this.enableLegacyTypeScriptModuleInterop?C:`${this.helperManager.getHelperName("interopRequireWildcard")}(${C})`;E+=` var ${L} = ${T};`}else S.length>0&&y!==C?E+=` var ${y} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${C});`:c.length>0&&y!==C&&(E+=` var ${y} = ${this.helperManager.getHelperName("interopRequireDefault")}(${C});`);for(const{importedName:L,localName:T}of _)E+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${C}, '${T}', '${L}');`;for(const L of S)E+=` exports.${L} = ${y};`;w&&(E+=` ${this.helperManager.getHelperName("createStarExport")}(${C});`),this.importsToReplace.set(o,E);for(const L of c)this.identifierReplacements.set(L,`${y}.default`);for(const{importedName:L,localName:T}of g)this.identifierReplacements.set(T,`${C}.${L}`)}}getFreeIdentifierForPath(o){const l=o.split("/"),p=l[l.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${p}`)}preprocessImportAtIndex(o){const l=[],c=[],p=[];if(o++,(this.tokens.matchesContextualAtIndex(o,O._type)||this.tokens.matches1AtIndex(o,s._typeof))&&!this.tokens.matches1AtIndex(o+1,s.comma)&&!this.tokens.matchesContextualAtIndex(o+1,O._from)||this.tokens.matches1AtIndex(o,s.parenL))return;if(this.tokens.matches1AtIndex(o,s.name)&&(l.push(this.tokens.identifierNameAtIndex(o)),o++,this.tokens.matches1AtIndex(o,s.comma)&&o++),this.tokens.matches1AtIndex(o,s.star)&&(o+=2,c.push(this.tokens.identifierNameAtIndex(o)),o++),this.tokens.matches1AtIndex(o,s.braceL)){const S=this.getNamedImports(o+1);o=S.newIndex;for(const w of S.namedImports)w.importedName==="default"?l.push(w.localName):p.push(w)}if(this.tokens.matchesContextualAtIndex(o,O._from)&&o++,!this.tokens.matches1AtIndex(o,s.string))throw new Error("Expected string token at the end of import statement.");const g=this.tokens.stringValueAtIndex(o),_=this.getImportInfo(g);_.defaultNames.push(...l),_.wildcardNames.push(...c),_.namedImports.push(...p),l.length===0&&c.length===0&&p.length===0&&(_.hasBareImport=!0)}preprocessExportAtIndex(o){if(this.tokens.matches2AtIndex(o,s._export,s._var)||this.tokens.matches2AtIndex(o,s._export,s._let)||this.tokens.matches2AtIndex(o,s._export,s._const))this.preprocessVarExportAtIndex(o);else if(this.tokens.matches2AtIndex(o,s._export,s._function)||this.tokens.matches2AtIndex(o,s._export,s._class)){const l=this.tokens.identifierNameAtIndex(o+2);this.addExportBinding(l,l)}else if(this.tokens.matches3AtIndex(o,s._export,s.name,s._function)){const l=this.tokens.identifierNameAtIndex(o+3);this.addExportBinding(l,l)}else this.tokens.matches2AtIndex(o,s._export,s.braceL)?this.preprocessNamedExportAtIndex(o):this.tokens.matches2AtIndex(o,s._export,s.star)&&this.preprocessExportStarAtIndex(o)}preprocessVarExportAtIndex(o){let l=0;for(let c=o+2;;c++)if(this.tokens.matches1AtIndex(c,s.braceL)||this.tokens.matches1AtIndex(c,s.dollarBraceL)||this.tokens.matches1AtIndex(c,s.bracketL))l++;else if(this.tokens.matches1AtIndex(c,s.braceR)||this.tokens.matches1AtIndex(c,s.bracketR))l--;else{if(l===0&&!this.tokens.matches1AtIndex(c,s.name))break;if(this.tokens.matches1AtIndex(1,s.eq)){const p=this.tokens.currentToken().rhsEndIndex;if(p==null)throw new Error("Expected = token with an end index.");c=p-1}else{const p=this.tokens.tokens[c];if(Jc(p)){const g=this.tokens.identifierNameAtIndex(c);this.identifierReplacements.set(g,`exports.${g}`)}}}}preprocessNamedExportAtIndex(o){o+=2;const{newIndex:l,namedImports:c}=this.getNamedImports(o);if(o=l,this.tokens.matchesContextualAtIndex(o,O._from))o++;else{for(const{importedName:_,localName:S}of c)this.addExportBinding(_,S);return}if(!this.tokens.matches1AtIndex(o,s.string))throw new Error("Expected string token at the end of import statement.");const p=this.tokens.stringValueAtIndex(o);this.getImportInfo(p).namedExports.push(...c)}preprocessExportStarAtIndex(o){let l=null;if(this.tokens.matches3AtIndex(o,s._export,s.star,s._as)?(o+=3,l=this.tokens.identifierNameAtIndex(o),o+=2):o+=3,!this.tokens.matches1AtIndex(o,s.string))throw new Error("Expected string token at the end of star export statement.");const c=this.tokens.stringValueAtIndex(o),p=this.getImportInfo(c);l!==null?p.exportStarNames.push(l):p.hasStarExport=!0}getNamedImports(o){const l=[];for(;;){if(this.tokens.matches1AtIndex(o,s.braceR)){o++;break}const c=Ns(this.tokens,o);if(o=c.endIndex,c.isType||l.push({importedName:c.leftName,localName:c.rightName}),this.tokens.matches2AtIndex(o,s.comma,s.braceR)){o+=2;break}else if(this.tokens.matches1AtIndex(o,s.braceR)){o++;break}else if(this.tokens.matches1AtIndex(o,s.comma))o++;else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[o])}`)}return{newIndex:o,namedImports:l}}getImportInfo(o){const l=this.importInfoByPath.get(o);if(l)return l;const c={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(o,c),c}addExportBinding(o,l){this.exportBindingsByLocalName.has(o)||this.exportBindingsByLocalName.set(o,[]),this.exportBindingsByLocalName.get(o).push(l)}claimImportCode(o){const l=this.importsToReplace.get(o);return this.importsToReplace.set(o,""),l||""}getIdentifierReplacement(o){return this.identifierReplacements.get(o)||null}resolveExportBinding(o){const l=this.exportBindingsByLocalName.get(o);return!l||l.length===0?null:l.map(c=>`exports.${c}`).join(" = ")}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}function ug(n,o,{compiledFilename:l}){let c="AAAA";for(let p=0;p<n.length;p++)n.charCodeAt(p)===H.lineFeed&&(c+=";AACA");return{version:3,file:l||"",sources:[o],mappings:c,names:[]}}const cg={require:`
import {createRequire as CREATE_REQUIRE_NAME} from "module";
const require = CREATE_REQUIRE_NAME(import.meta.url);
`,interopRequireWildcard:`
function interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};
if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
return newObj;
}
}
`,interopRequireDefault:`
function interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
`,createNamedExportFrom:`
function createNamedExportFrom(obj, localName, importedName) {
Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});
}
`,createStarExport:`
function createStarExport(obj) {
Object.keys(obj)
.filter((key) => key !== "default" && key !== "__esModule")
.forEach((key) => {
if (exports.hasOwnProperty(key)) {
return;
}
Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});
});
}
`,nullishCoalesce:`
function nullishCoalesce(lhs, rhsFn) {
if (lhs != null) {
return lhs;
} else {
return rhsFn();
}
}
`,asyncNullishCoalesce:`
async function asyncNullishCoalesce(lhs, rhsFn) {
if (lhs != null) {
return lhs;
} else {
return await rhsFn();
}
}
`,optionalChain:`
function optionalChain(ops) {
let lastAccessLHS = undefined;
let value = ops[0];
let i = 1;
while (i < ops.length) {
const op = ops[i];
const fn = ops[i + 1];
i += 2;
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
return undefined;
}
if (op === 'access' || op === 'optionalAccess') {
lastAccessLHS = value;
value = fn(value);
} else if (op === 'call' || op === 'optionalCall') {
value = fn((...args) => value.call(lastAccessLHS, ...args));
lastAccessLHS = undefined;
}
}
return value;
}
`,asyncOptionalChain:`
async function asyncOptionalChain(ops) {
let lastAccessLHS = undefined;
let value = ops[0];
let i = 1;
while (i < ops.length) {
const op = ops[i];
const fn = ops[i + 1];
i += 2;
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
return undefined;
}
if (op === 'access' || op === 'optionalAccess') {
lastAccessLHS = value;
value = await fn(value);
} else if (op === 'call' || op === 'optionalCall') {
value = await fn((...args) => value.call(lastAccessLHS, ...args));
lastAccessLHS = undefined;
}
}
return value;
}
`,optionalChainDelete:`
function optionalChainDelete(ops) {
const result = OPTIONAL_CHAIN_NAME(ops);
return result == null ? true : result;
}
`,asyncOptionalChainDelete:`
async function asyncOptionalChainDelete(ops) {
const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
return result == null ? true : result;
}
`};class Co{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(o){this.nameManager=o,Co.prototype.__init.call(this),Co.prototype.__init2.call(this)}getHelperName(o){let l=this.helperNames[o];return l||(l=this.nameManager.claimFreeName(`_${o}`),this.helperNames[o]=l,l)}emitHelpers(){let o="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[l,c]of Object.entries(cg)){const p=this.helperNames[l];let g=c;l==="optionalChainDelete"?g=g.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):l==="asyncOptionalChainDelete"?g=g.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):l==="require"&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),g=g.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),p&&(o+=" ",o+=g.replace(l,p).replace(/\s+/g," ").trim())}return o}}function pc(n,o,l){fg(n,l)&&hg(n,o,l)}function fg(n,o){for(const l of n.tokens)if(l.type===s.name&&Rm(l)&&o.has(n.identifierNameForToken(l)))return!0;return!1}function hg(n,o,l){const c=[];let p=o.length-1;for(let g=n.tokens.length-1;;g--){for(;c.length>0&&c[c.length-1].startTokenIndex===g+1;)c.pop();for(;p>=0&&o[p].endTokenIndex===g+1;)c.push(o[p]),p--;if(g<0)break;const _=n.tokens[g],S=n.identifierNameForToken(_);if(c.length>1&&_.type===s.name&&l.has(S)){if(Mm(_))dc(c[c.length-1],n,S);else if(Fm(_)){let w=c.length-1;for(;w>0&&!c[w].isFunctionScope;)w--;if(w<0)throw new Error("Did not find parent function scope.");dc(c[w],n,S)}}}if(c.length>0)throw new Error("Expected empty scope stack after processing file.")}function dc(n,o,l){for(let c=n.startTokenIndex;c<n.endTokenIndex;c++){const p=o.tokens[c];(p.type===s.name||p.type===s.jsxName)&&o.identifierNameForToken(p)===l&&(p.shadowsGlobal=!0)}}function pg(n,o){const l=[];for(const c of o)c.type===s.name&&l.push(n.slice(c.start,c.end));return l}class wl{__init(){this.usedNames=new Set}constructor(o,l){wl.prototype.__init.call(this),this.usedNames=new Set(pg(o,l))}claimFreeName(o){const l=this.findFreeName(o);return this.usedNames.add(l),l}findFreeName(o){if(!this.usedNames.has(o))return o;let l=2;for(;this.usedNames.has(o+String(l));)l++;return o+String(l)}}var ht={},sl={},ir={},dg=ui&&ui.__extends||function(){var n=function(o,l){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var g in p)p.hasOwnProperty(g)&&(c[g]=p[g])},n(o,l)};return function(o,l){n(o,l);function c(){this.constructor=o}o.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}}();Object.defineProperty(ir,"__esModule",{value:!0});ir.DetailContext=ir.NoopContext=ir.VError=void 0;var pf=function(n){dg(o,n);function o(l,c){var p=n.call(this,c)||this;return p.path=l,Object.setPrototypeOf(p,o.prototype),p}return o}(Error);ir.VError=pf;var mg=function(){function n(){}return n.prototype.fail=function(o,l,c){return!1},n.prototype.unionResolver=function(){return this},n.prototype.createContext=function(){return this},n.prototype.resolveUnion=function(o){},n}();ir.NoopContext=mg;var df=function(){function n(){this._propNames=[""],this._messages=[null],this._score=0}return n.prototype.fail=function(o,l,c){return this._propNames.push(o),this._messages.push(l),this._score+=c,!1},n.prototype.unionResolver=function(){return new gg},n.prototype.resolveUnion=function(o){for(var l,c,p=o,g=null,_=0,S=p.contexts;_<S.length;_++){var w=S[_];(!g||w._score>=g._score)&&(g=w)}g&&g._score>0&&((l=this._propNames).push.apply(l,g._propNames),(c=this._messages).push.apply(c,g._messages))},n.prototype.getError=function(o){for(var l=[],c=this._propNames.length-1;c>=0;c--){var p=this._propNames[c];o+=typeof p=="number"?"["+p+"]":p?"."+p:"";var g=this._messages[c];g&&l.push(o+" "+g)}return new pf(o,l.join("; "))},n.prototype.getErrorDetail=function(o){for(var l=[],c=this._propNames.length-1;c>=0;c--){var p=this._propNames[c];o+=typeof p=="number"?"["+p+"]":p?"."+p:"";var g=this._messages[c];g&&l.push({path:o,message:g})}for(var _=null,c=l.length-1;c>=0;c--)_&&(l[c].nested=[_]),_=l[c];return _},n}();ir.DetailContext=df;var gg=function(){function n(){this.contexts=[]}return n.prototype.createContext=function(){var o=new df;return this.contexts.push(o),o},n}();(function(n){var o=ui&&ui.__extends||function(){var X=function(z,V){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,fe){ee.__proto__=fe}||function(ee,fe){for(var ve in fe)fe.hasOwnProperty(ve)&&(ee[ve]=fe[ve])},X(z,V)};return function(z,V){X(z,V);function ee(){this.constructor=z}z.prototype=V===null?Object.create(V):(ee.prototype=V.prototype,new ee)}}();Object.defineProperty(n,"__esModule",{value:!0}),n.basicTypes=n.BasicType=n.TParamList=n.TParam=n.param=n.TFunc=n.func=n.TProp=n.TOptional=n.opt=n.TIface=n.iface=n.TEnumLiteral=n.enumlit=n.TEnumType=n.enumtype=n.TIntersection=n.intersection=n.TUnion=n.union=n.TTuple=n.tuple=n.TArray=n.array=n.TLiteral=n.lit=n.TName=n.name=n.TType=void 0;var l=ir,c=function(){function X(){}return X}();n.TType=c;function p(X){return typeof X=="string"?_(X):X}function g(X,z){var V=X[z];if(!V)throw new Error("Unknown type "+z);return V}function _(X){return new S(X)}n.name=_;var S=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.name=V,ee._failMsg="is not a "+V,ee}return z.prototype.getChecker=function(V,ee,fe){var ve=this,de=g(V,this.name),Me=de.getChecker(V,ee,fe);return de instanceof le||de instanceof z?Me:function(et,Je){return Me(et,Je)?!0:Je.fail(null,ve._failMsg,0)}},z}(c);n.TName=S;function w(X){return new C(X)}n.lit=w;var C=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.value=V,ee.name=JSON.stringify(V),ee._failMsg="is not "+ee.name,ee}return z.prototype.getChecker=function(V,ee){var fe=this;return function(ve,de){return ve===fe.value?!0:de.fail(null,fe._failMsg,-1)}},z}(c);n.TLiteral=C;function y(X){return new E(p(X))}n.array=y;var E=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.ttype=V,ee}return z.prototype.getChecker=function(V,ee){var fe=this.ttype.getChecker(V,ee);return function(ve,de){if(!Array.isArray(ve))return de.fail(null,"is not an array",0);for(var Me=0;Me<ve.length;Me++){var et=fe(ve[Me],de);if(!et)return de.fail(Me,null,1)}return!0}},z}(c);n.TArray=E;function L(){for(var X=[],z=0;z<arguments.length;z++)X[z]=arguments[z];return new T(X.map(function(V){return p(V)}))}n.tuple=L;var T=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.ttypes=V,ee}return z.prototype.getChecker=function(V,ee){var fe=this.ttypes.map(function(de){return de.getChecker(V,ee)}),ve=function(de,Me){if(!Array.isArray(de))return Me.fail(null,"is not an array",0);for(var et=0;et<fe.length;et++){var Je=fe[et](de[et],Me);if(!Je)return Me.fail(et,null,1)}return!0};return ee?function(de,Me){return ve(de,Me)?de.length<=fe.length?!0:Me.fail(fe.length,"is extraneous",2):!1}:ve},z}(c);n.TTuple=T;function F(){for(var X=[],z=0;z<arguments.length;z++)X[z]=arguments[z];return new R(X.map(function(V){return p(V)}))}n.union=F;var R=function(X){o(z,X);function z(V){var ee=X.call(this)||this;ee.ttypes=V;var fe=V.map(function(de){return de instanceof S||de instanceof C?de.name:null}).filter(function(de){return de}),ve=V.length-fe.length;return fe.length?(ve>0&&fe.push(ve+" more"),ee._failMsg="is none of "+fe.join(", ")):ee._failMsg="is none of "+ve+" types",ee}return z.prototype.getChecker=function(V,ee){var fe=this,ve=this.ttypes.map(function(de){return de.getChecker(V,ee)});return function(de,Me){for(var et=Me.unionResolver(),Je=0;Je<ve.length;Je++){var Le=ve[Je](de,et.createContext());if(Le)return!0}return Me.resolveUnion(et),Me.fail(null,fe._failMsg,0)}},z}(c);n.TUnion=R;function W(){for(var X=[],z=0;z<arguments.length;z++)X[z]=arguments[z];return new D(X.map(function(V){return p(V)}))}n.intersection=W;var D=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.ttypes=V,ee}return z.prototype.getChecker=function(V,ee){var fe=new Set,ve=this.ttypes.map(function(de){return de.getChecker(V,ee,fe)});return function(de,Me){var et=ve.every(function(Je){return Je(de,Me)});return et?!0:Me.fail(null,null,0)}},z}(c);n.TIntersection=D;function I(X){return new M(X)}n.enumtype=I;var M=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.members=V,ee.validValues=new Set,ee._failMsg="is not a valid enum value",ee.validValues=new Set(Object.keys(V).map(function(fe){return V[fe]})),ee}return z.prototype.getChecker=function(V,ee){var fe=this;return function(ve,de){return fe.validValues.has(ve)?!0:de.fail(null,fe._failMsg,0)}},z}(c);n.TEnumType=M;function B(X,z){return new U(X,z)}n.enumlit=B;var U=function(X){o(z,X);function z(V,ee){var fe=X.call(this)||this;return fe.enumName=V,fe.prop=ee,fe._failMsg="is not "+V+"."+ee,fe}return z.prototype.getChecker=function(V,ee){var fe=this,ve=g(V,this.enumName);if(!(ve instanceof M))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var de=ve.members[this.prop];if(!ve.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(Me,et){return Me===de?!0:et.fail(null,fe._failMsg,-1)}},z}(c);n.TEnumLiteral=U;function ae(X){return Object.keys(X).map(function(z){return ue(z,X[z])})}function ue(X,z){return z instanceof ke?new Te(X,z.ttype,!0):new Te(X,p(z),!1)}function te(X,z){return new ye(X,ae(z))}n.iface=te;var ye=function(X){o(z,X);function z(V,ee){var fe=X.call(this)||this;return fe.bases=V,fe.props=ee,fe.propSet=new Set(ee.map(function(ve){return ve.name})),fe}return z.prototype.getChecker=function(V,ee,fe){var ve=this,de=this.bases.map(function(Xe){return g(V,Xe).getChecker(V,ee)}),Me=this.props.map(function(Xe){return Xe.ttype.getChecker(V,ee)}),et=new l.NoopContext,Je=this.props.map(function(Xe,at){return!Xe.isOpt&&!Me[at](void 0,et)}),Le=function(Xe,at){if(typeof Xe!="object"||Xe===null)return at.fail(null,"is not an object",0);for(var ut=0;ut<de.length;ut++)if(!de[ut](Xe,at))return!1;for(var ut=0;ut<Me.length;ut++){var rn=ve.props[ut].name,nt=Xe[rn];if(nt===void 0){if(Je[ut])return at.fail(rn,"is missing",1)}else{var $=Me[ut](nt,at);if(!$)return at.fail(rn,null,1)}}return!0};if(!ee)return Le;var ze=this.propSet;return fe&&(this.propSet.forEach(function(Xe){return fe.add(Xe)}),ze=fe),function(Xe,at){if(!Le(Xe,at))return!1;for(var ut in Xe)if(!ze.has(ut))return at.fail(ut,"is extraneous",2);return!0}},z}(c);n.TIface=ye;function ge(X){return new ke(p(X))}n.opt=ge;var ke=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.ttype=V,ee}return z.prototype.getChecker=function(V,ee){var fe=this.ttype.getChecker(V,ee);return function(ve,de){return ve===void 0||fe(ve,de)}},z}(c);n.TOptional=ke;var Te=function(){function X(z,V,ee){this.name=z,this.ttype=V,this.isOpt=ee}return X}();n.TProp=Te;function G(X){for(var z=[],V=1;V<arguments.length;V++)z[V-1]=arguments[V];return new K(new Q(z),p(X))}n.func=G;var K=function(X){o(z,X);function z(V,ee){var fe=X.call(this)||this;return fe.paramList=V,fe.result=ee,fe}return z.prototype.getChecker=function(V,ee){return function(fe,ve){return typeof fe=="function"?!0:ve.fail(null,"is not a function",0)}},z}(c);n.TFunc=K;function b(X,z,V){return new oe(X,p(z),Boolean(V))}n.param=b;var oe=function(){function X(z,V,ee){this.name=z,this.ttype=V,this.isOpt=ee}return X}();n.TParam=oe;var Q=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.params=V,ee}return z.prototype.getChecker=function(V,ee){var fe=this,ve=this.params.map(function(Je){return Je.ttype.getChecker(V,ee)}),de=new l.NoopContext,Me=this.params.map(function(Je,Le){return!Je.isOpt&&!ve[Le](void 0,de)}),et=function(Je,Le){if(!Array.isArray(Je))return Le.fail(null,"is not an array",0);for(var ze=0;ze<ve.length;ze++){var Xe=fe.params[ze];if(Je[ze]===void 0){if(Me[ze])return Le.fail(Xe.name,"is missing",1)}else{var at=ve[ze](Je[ze],Le);if(!at)return Le.fail(Xe.name,null,1)}}return!0};return ee?function(Je,Le){return et(Je,Le)?Je.length<=ve.length?!0:Le.fail(ve.length,"is extraneous",2):!1}:et},z}(c);n.TParamList=Q;var le=function(X){o(z,X);function z(V,ee){var fe=X.call(this)||this;return fe.validator=V,fe.message=ee,fe}return z.prototype.getChecker=function(V,ee){var fe=this;return function(ve,de){return fe.validator(ve)?!0:de.fail(null,fe.message,0)}},z}(c);n.BasicType=le,n.basicTypes={any:new le(function(X){return!0},"is invalid"),number:new le(function(X){return typeof X=="number"},"is not a number"),object:new le(function(X){return typeof X=="object"&&X},"is not an object"),boolean:new le(function(X){return typeof X=="boolean"},"is not a boolean"),string:new le(function(X){return typeof X=="string"},"is not a string"),symbol:new le(function(X){return typeof X=="symbol"},"is not a symbol"),void:new le(function(X){return X==null},"is not void"),undefined:new le(function(X){return X===void 0},"is not undefined"),null:new le(function(X){return X===null},"is not null"),never:new le(function(X){return!1},"is unexpected"),Date:new le(Ae("[object Date]"),"is not a Date"),RegExp:new le(Ae("[object RegExp]"),"is not a RegExp")};var Pe=Object.prototype.toString;function Ae(X){return function(z){return typeof z=="object"&&z&&Pe.call(z)===X}}typeof Buffer<"u"&&(n.basicTypes.Buffer=new le(function(X){return Buffer.isBuffer(X)},"is not a Buffer"));for(var Fe=function(X){n.basicTypes[X.name]=new le(function(z){return z instanceof X},"is not a "+X.name)},Qe=0,He=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];Qe<He.length;Qe++){var qe=He[Qe];Fe(qe)}})(sl);(function(n){var o=ui&&ui.__spreadArrays||function(){for(var w=0,C=0,y=arguments.length;C<y;C++)w+=arguments[C].length;for(var E=Array(w),L=0,C=0;C<y;C++)for(var T=arguments[C],F=0,R=T.length;F<R;F++,L++)E[L]=T[F];return E};Object.defineProperty(n,"__esModule",{value:!0}),n.Checker=n.createCheckers=void 0;var l=sl,c=ir,p=sl;Object.defineProperty(n,"TArray",{enumerable:!0,get:function(){return p.TArray}}),Object.defineProperty(n,"TEnumType",{enumerable:!0,get:function(){return p.TEnumType}}),Object.defineProperty(n,"TEnumLiteral",{enumerable:!0,get:function(){return p.TEnumLiteral}}),Object.defineProperty(n,"TFunc",{enumerable:!0,get:function(){return p.TFunc}}),Object.defineProperty(n,"TIface",{enumerable:!0,get:function(){return p.TIface}}),Object.defineProperty(n,"TLiteral",{enumerable:!0,get:function(){return p.TLiteral}}),Object.defineProperty(n,"TName",{enumerable:!0,get:function(){return p.TName}}),Object.defineProperty(n,"TOptional",{enumerable:!0,get:function(){return p.TOptional}}),Object.defineProperty(n,"TParam",{enumerable:!0,get:function(){return p.TParam}}),Object.defineProperty(n,"TParamList",{enumerable:!0,get:function(){return p.TParamList}}),Object.defineProperty(n,"TProp",{enumerable:!0,get:function(){return p.TProp}}),Object.defineProperty(n,"TTuple",{enumerable:!0,get:function(){return p.TTuple}}),Object.defineProperty(n,"TType",{enumerable:!0,get:function(){return p.TType}}),Object.defineProperty(n,"TUnion",{enumerable:!0,get:function(){return p.TUnion}}),Object.defineProperty(n,"TIntersection",{enumerable:!0,get:function(){return p.TIntersection}}),Object.defineProperty(n,"array",{enumerable:!0,get:function(){return p.array}}),Object.defineProperty(n,"enumlit",{enumerable:!0,get:function(){return p.enumlit}}),Object.defineProperty(n,"enumtype",{enumerable:!0,get:function(){return p.enumtype}}),Object.defineProperty(n,"func",{enumerable:!0,get:function(){return p.func}}),Object.defineProperty(n,"iface",{enumerable:!0,get:function(){return p.iface}}),Object.defineProperty(n,"lit",{enumerable:!0,get:function(){return p.lit}}),Object.defineProperty(n,"name",{enumerable:!0,get:function(){return p.name}}),Object.defineProperty(n,"opt",{enumerable:!0,get:function(){return p.opt}}),Object.defineProperty(n,"param",{enumerable:!0,get:function(){return p.param}}),Object.defineProperty(n,"tuple",{enumerable:!0,get:function(){return p.tuple}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return p.union}}),Object.defineProperty(n,"intersection",{enumerable:!0,get:function(){return p.intersection}}),Object.defineProperty(n,"BasicType",{enumerable:!0,get:function(){return p.BasicType}});var g=ir;Object.defineProperty(n,"VError",{enumerable:!0,get:function(){return g.VError}});function _(){for(var w=[],C=0;C<arguments.length;C++)w[C]=arguments[C];for(var y=Object.assign.apply(Object,o([{},l.basicTypes],w)),E={},L=0,T=w;L<T.length;L++)for(var F=T[L],R=0,W=Object.keys(F);R<W.length;R++){var D=W[R];E[D]=new S(y,F[D])}return E}n.createCheckers=_;var S=function(){function w(C,y,E){if(E===void 0&&(E="value"),this.suite=C,this.ttype=y,this._path=E,this.props=new Map,y instanceof l.TIface)for(var L=0,T=y.props;L<T.length;L++){var F=T[L];this.props.set(F.name,F.ttype)}this.checkerPlain=this.ttype.getChecker(C,!1),this.checkerStrict=this.ttype.getChecker(C,!0)}return w.prototype.setReportedPath=function(C){this._path=C},w.prototype.check=function(C){return this._doCheck(this.checkerPlain,C)},w.prototype.test=function(C){return this.checkerPlain(C,new c.NoopContext)},w.prototype.validate=function(C){return this._doValidate(this.checkerPlain,C)},w.prototype.strictCheck=function(C){return this._doCheck(this.checkerStrict,C)},w.prototype.strictTest=function(C){return this.checkerStrict(C,new c.NoopContext)},w.prototype.strictValidate=function(C){return this._doValidate(this.checkerStrict,C)},w.prototype.getProp=function(C){var y=this.props.get(C);if(!y)throw new Error("Type has no property "+C);return new w(this.suite,y,this._path+"."+C)},w.prototype.methodArgs=function(C){var y=this._getMethod(C);return new w(this.suite,y.paramList)},w.prototype.methodResult=function(C){var y=this._getMethod(C);return new w(this.suite,y.result)},w.prototype.getArgs=function(){if(!(this.ttype instanceof l.TFunc))throw new Error("getArgs() applied to non-function");return new w(this.suite,this.ttype.paramList)},w.prototype.getResult=function(){if(!(this.ttype instanceof l.TFunc))throw new Error("getResult() applied to non-function");return new w(this.suite,this.ttype.result)},w.prototype.getType=function(){return this.ttype},w.prototype._doCheck=function(C,y){var E=new c.NoopContext;if(!C(y,E)){var L=new c.DetailContext;throw C(y,L),L.getError(this._path)}},w.prototype._doValidate=function(C,y){var E=new c.NoopContext;if(C(y,E))return null;var L=new c.DetailContext;return C(y,L),L.getErrorDetail(this._path)},w.prototype._getMethod=function(C){var y=this.props.get(C);if(!y)throw new Error("Type has no property "+C);if(!(y instanceof l.TFunc))throw new Error("Property "+C+" is not a method");return y},w}();n.Checker=S})(ht);const vg=ht.union(ht.lit("jsx"),ht.lit("typescript"),ht.lit("flow"),ht.lit("imports"),ht.lit("react-hot-loader"),ht.lit("jest")),kg=ht.iface([],{compiledFilename:"string"}),yg=ht.iface([],{transforms:ht.array("Transform"),disableESTransforms:ht.opt("boolean"),jsxRuntime:ht.opt(ht.union(ht.lit("classic"),ht.lit("automatic"))),production:ht.opt("boolean"),jsxImportSource:ht.opt("string"),jsxPragma:ht.opt("string"),jsxFragmentPragma:ht.opt("string"),preserveDynamicImport:ht.opt("boolean"),injectCreateRequireForImportRequire:ht.opt("boolean"),enableLegacyTypeScriptModuleInterop:ht.opt("boolean"),enableLegacyBabel5ModuleInterop:ht.opt("boolean"),sourceMapOptions:ht.opt("SourceMapOptions"),filePath:ht.opt("string")}),bg={Transform:vg,SourceMapOptions:kg,Options:yg},{Options:wg}=ht.createCheckers(bg);function xg(n){wg.strictCheck(n)}function mf(){ie(),Ut(!1)}function gf(n){ie(),zo(n)}function Kr(n){We(),xl(n)}function Io(){We(),h.tokens[h.tokens.length-1].identifierRole=De.ImportDeclaration}function xl(n){let o;h.scopeDepth===0?o=De.TopLevelDeclaration:n?o=De.BlockScopedDeclaration:o=De.FunctionScopedDeclaration,h.tokens[h.tokens.length-1].identifierRole=o}function zo(n){switch(h.type){case s._this:{const o=Ge(0);ie(),Ke(o);return}case s._yield:case s.name:{h.type=s.name,Kr(n);return}case s.bracketL:{ie(),_l(s.bracketR,n,!0);return}case s.braceL:Dl(!0,n);return;default:Ue()}}function _l(n,o,l=!1,c=!1,p=0){let g=!0,_=!1;const S=h.tokens.length;for(;!J(n)&&!h.error;)if(g?g=!1:(re(s.comma),h.tokens[h.tokens.length-1].contextId=p,!_&&h.tokens[S].isType&&(h.tokens[h.tokens.length-1].isType=!0,_=!0)),!(l&&x(s.comma))){if(J(n))break;if(x(s.ellipsis)){gf(o),vf(),J(s.comma),re(n);break}else _g(c,o)}}function _g(n,o){n&&Sl([O._public,O._protected,O._private,O._readonly,O._override]),Ao(o),vf(),Ao(o,!0)}function vf(){it?Hk():tt&&Nv()}function Ao(n,o=!1){if(o||zo(n),!J(s.eq))return;const l=h.tokens.length-1;Ut(),h.tokens[l].rhsEndIndex=h.tokens.length}function ol(){return x(s.name)}function Sg(){return x(s.name)||Boolean(h.type&s.IS_KEYWORD)||x(s.string)||x(s.num)||x(s.bigint)||x(s.decimal)}function kf(){const n=h.snapshot();return ie(),(x(s.bracketL)||x(s.braceL)||x(s.star)||x(s.ellipsis)||x(s.hash)||Sg())&&!In()?!0:(h.restoreFromSnapshot(n),!1)}function Sl(n){for(;yf(n)!==null;);}function yf(n){if(!x(s.name))return null;const o=h.contextualKeyword;if(n.indexOf(o)!==-1&&kf()){switch(o){case O._readonly:h.tokens[h.tokens.length-1].type=s._readonly;break;case O._abstract:h.tokens[h.tokens.length-1].type=s._abstract;break;case O._static:h.tokens[h.tokens.length-1].type=s._static;break;case O._public:h.tokens[h.tokens.length-1].type=s._public;break;case O._private:h.tokens[h.tokens.length-1].type=s._private;break;case O._protected:h.tokens[h.tokens.length-1].type=s._protected;break;case O._override:h.tokens[h.tokens.length-1].type=s._override;break;case O._declare:h.tokens[h.tokens.length-1].type=s._declare;break}return o}return null}function Bs(){for(We();J(s.dot);)We()}function Tg(){Bs(),!In()&&x(s.lessThan)&&Gi()}function Cg(){ie(),js()}function Ig(){ie()}function Ag(){re(s._typeof),x(s._import)?bf():Bs(),!In()&&x(s.lessThan)&&Gi()}function bf(){re(s._import),re(s.parenL),re(s.string),re(s.parenR),J(s.dot)&&Bs(),x(s.lessThan)&&Gi()}function Lg(){const n=J(s._in),o=jt(O._out);(n||o)&&!x(s.name)?h.tokens[h.tokens.length-1].type=s.name:We(),J(s._extends)&&yt(),J(s.eq)&&yt()}function di(){x(s.lessThan)&&$o()}function $o(){const n=Ge(0);for(x(s.lessThan)||x(s.typeParameterStart)?ie():Ue();!J(s.greaterThan)&&!h.error;)Lg(),J(s.comma);Ke(n)}function Tl(n){const o=n===s.arrow;di(),re(s.parenL),h.scopeDepth++,Eg(!1),h.scopeDepth--,(o||x(n))&&Ps(n)}function Eg(n){_l(s.parenR,n)}function Lo(){J(s.comma)||pt()}function mc(){Tl(s.colon),Lo()}function Ng(){const n=h.snapshot();ie();const o=J(s.name)&&x(s.colon);return h.restoreFromSnapshot(n),o}function wf(){if(!(x(s.bracketL)&&Ng()))return!1;const n=Ge(0);return re(s.bracketL),We(),js(),re(s.bracketR),Ui(),Lo(),Ke(n),!0}function gc(n){J(s.question),!n&&(x(s.parenL)||x(s.lessThan))?(Tl(s.colon),Lo()):(Ui(),Lo())}function Pg(){if(x(s.parenL)||x(s.lessThan)){mc();return}if(x(s._new)){ie(),x(s.parenL)||x(s.lessThan)?mc():gc(!1);return}const n=!!yf([O._readonly]);wf()||((Re(O._get)||Re(O._set))&&kf(),Os(-1),gc(n))}function Og(){xf()}function xf(){for(re(s.braceL);!J(s.braceR)&&!h.error;)Pg()}function Dg(){const n=h.snapshot(),o=Rg();return h.restoreFromSnapshot(n),o}function Rg(){return ie(),J(s.plus)||J(s.minus)?Re(O._readonly):(Re(O._readonly)&&ie(),!x(s.bracketL)||(ie(),!ol())?!1:(ie(),x(s._in)))}function Mg(){We(),re(s._in),yt()}function Fg(){re(s.braceL),x(s.plus)||x(s.minus)?(ie(),Bt(O._readonly)):jt(O._readonly),re(s.bracketL),Mg(),jt(O._as)&&yt(),re(s.bracketR),x(s.plus)||x(s.minus)?(ie(),re(s.question)):J(s.question),Jg(),pt(),re(s.braceR)}function Bg(){for(re(s.bracketL);!J(s.bracketR)&&!h.error;)jg(),J(s.comma)}function jg(){J(s.ellipsis)?yt():(yt(),J(s.question)),J(s.colon)&&yt()}function Wg(){re(s.parenL),yt(),re(s.parenR)}function Hg(){for(jr(),jr();!x(s.backQuote)&&!h.error;)re(s.dollarBraceL),yt(),jr(),jr();ie()}var Hr;(function(n){n[n.TSFunctionType=0]="TSFunctionType";const l=0+1;n[n.TSConstructorType=l]="TSConstructorType";const c=l+1;n[n.TSAbstractConstructorType=c]="TSAbstractConstructorType"})(Hr||(Hr={}));function Ga(n){n===Hr.TSAbstractConstructorType&&Bt(O._abstract),(n===Hr.TSConstructorType||n===Hr.TSAbstractConstructorType)&&re(s._new);const o=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!1,Tl(s.arrow),h.inDisallowConditionalTypesContext=o}function qg(){switch(h.type){case s.name:Tg();return;case s._void:case s._null:ie();return;case s.string:case s.num:case s.bigint:case s.decimal:case s._true:case s._false:$i();return;case s.minus:ie(),$i();return;case s._this:{Ig(),Re(O._is)&&!In()&&Cg();return}case s._typeof:Ag();return;case s._import:bf();return;case s.braceL:Dg()?Fg():Og();return;case s.bracketL:Bg();return;case s.parenL:Wg();return;case s.backQuote:Hg();return;default:if(h.type&s.IS_KEYWORD){ie(),h.tokens[h.tokens.length-1].type=s.name;return}break}Ue()}function zg(){for(qg();!In()&&J(s.bracketL);)J(s.bracketR)||(yt(),re(s.bracketR))}function $g(){if(Bt(O._infer),We(),x(s._extends)){const n=h.snapshot();re(s._extends);const o=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!0,yt(),h.inDisallowConditionalTypesContext=o,(h.error||!h.inDisallowConditionalTypesContext&&x(s.question))&&h.restoreFromSnapshot(n)}}function al(){if(Re(O._keyof)||Re(O._unique)||Re(O._readonly))ie(),al();else if(Re(O._infer))$g();else{const n=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!1,zg(),h.inDisallowConditionalTypesContext=n}}function vc(){if(J(s.bitwiseAND),al(),x(s.bitwiseAND))for(;J(s.bitwiseAND);)al()}function Ug(){if(J(s.bitwiseOR),vc(),x(s.bitwiseOR))for(;J(s.bitwiseOR);)vc()}function Gg(){return x(s.lessThan)?!0:x(s.parenL)&&Xg()}function Kg(){if(x(s.name)||x(s._this))return ie(),!0;if(x(s.braceL)||x(s.bracketL)){let n=1;for(ie();n>0&&!h.error;)x(s.braceL)||x(s.bracketL)?n++:(x(s.braceR)||x(s.bracketR))&&n--,ie();return!0}return!1}function Xg(){const n=h.snapshot(),o=Vg();return h.restoreFromSnapshot(n),o}function Vg(){return ie(),!!(x(s.parenR)||x(s.ellipsis)||Kg()&&(x(s.colon)||x(s.comma)||x(s.question)||x(s.eq)||x(s.parenR)&&(ie(),x(s.arrow))))}function Ps(n){const o=Ge(0);re(n),Qg()||yt(),Ke(o)}function Yg(){x(s.colon)&&Ps(s.colon)}function Ui(){x(s.colon)&&js()}function Jg(){J(s.colon)&&yt()}function Qg(){const n=h.snapshot();return Re(O._asserts)?(ie(),jt(O._is)?(yt(),!0):ol()||x(s._this)?(ie(),jt(O._is)&&yt(),!0):(h.restoreFromSnapshot(n),!1)):ol()||x(s._this)?(ie(),Re(O._is)&&!In()?(ie(),yt(),!0):(h.restoreFromSnapshot(n),!1)):!1}function js(){const n=Ge(0);re(s.colon),yt(),Ke(n)}function yt(){if(kc(),h.inDisallowConditionalTypesContext||In()||!J(s._extends))return;const n=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!0,kc(),h.inDisallowConditionalTypesContext=n,re(s.question),yt(),re(s.colon),yt()}function Zg(){return Re(O._abstract)&&wt()===s._new}function kc(){if(Gg()){Ga(Hr.TSFunctionType);return}if(x(s._new)){Ga(Hr.TSConstructorType);return}else if(Zg()){Ga(Hr.TSAbstractConstructorType);return}Ug()}function ev(){const n=Ge(1);yt(),re(s.greaterThan),Ke(n),Ws()}function tv(){if(J(s.jsxTagStart)){h.tokens[h.tokens.length-1].type=s.typeParameterStart;const n=Ge(1);for(;!x(s.greaterThan)&&!h.error;)yt(),J(s.comma);On(),Ke(n)}}function _f(){for(;!x(s.braceL)&&!h.error;)nv(),J(s.comma)}function nv(){Bs(),x(s.lessThan)&&Gi()}function rv(){Kr(!1),di(),J(s._extends)&&_f(),xf()}function iv(){Kr(!1),di(),re(s.eq),yt(),pt()}function sv(){if(x(s.string)?$i():We(),J(s.eq)){const n=h.tokens.length-1;Ut(),h.tokens[n].rhsEndIndex=h.tokens.length}}function Cl(){for(Kr(!1),re(s.braceL);!J(s.braceR)&&!h.error;)sv(),J(s.comma)}function Il(){re(s.braceL),Xo(s.braceR)}function ll(){Kr(!1),J(s.dot)?ll():Il()}function Sf(){Re(O._global)?We():x(s.string)?_r():Ue(),x(s.braceL)?Il():pt()}function ul(){Io(),re(s.eq),av(),pt()}function ov(){return Re(O._require)&&wt()===s.parenL}function av(){ov()?lv():Bs()}function lv(){Bt(O._require),re(s.parenL),x(s.string)||Ue(),$i(),re(s.parenR)}function uv(){if(nr())return!1;switch(h.type){case s._function:{const n=Ge(1);ie();const o=h.start;return fi(o,!0),Ke(n),!0}case s._class:{const n=Ge(1);return hi(!0,!1),Ke(n),!0}case s._const:if(x(s._const)&&Xc(O._enum)){const n=Ge(1);return re(s._const),Bt(O._enum),h.tokens[h.tokens.length-1].type=s._enum,Cl(),Ke(n),!0}case s._var:case s._let:{const n=Ge(1);return Uf(h.type),Ke(n),!0}case s.name:{const n=Ge(1),o=h.contextualKeyword;let l=!1;return o===O._global?(Sf(),l=!0):l=Uo(o,!0),Ke(n),l}default:return!1}}function yc(){return Uo(h.contextualKeyword,!0)}function cv(n){switch(n){case O._declare:{const o=h.tokens.length-1;if(uv())return h.tokens[o].type=s._declare,!0;break}case O._global:if(x(s.braceL))return Il(),!0;break;default:return Uo(n,!1)}return!1}function Uo(n,o){switch(n){case O._abstract:if(Mi(o)&&x(s._class))return h.tokens[h.tokens.length-1].type=s._abstract,hi(!0,!1),!0;break;case O._enum:if(Mi(o)&&x(s.name))return h.tokens[h.tokens.length-1].type=s._enum,Cl(),!0;break;case O._interface:if(Mi(o)&&x(s.name)){const l=Ge(o?2:1);return rv(),Ke(l),!0}break;case O._module:if(Mi(o)){if(x(s.string)){const l=Ge(o?2:1);return Sf(),Ke(l),!0}else if(x(s.name)){const l=Ge(o?2:1);return ll(),Ke(l),!0}}break;case O._namespace:if(Mi(o)&&x(s.name)){const l=Ge(o?2:1);return ll(),Ke(l),!0}break;case O._type:if(Mi(o)&&x(s.name)){const l=Ge(o?2:1);return iv(),Ke(l),!0}break}return!1}function Mi(n){return n?(ie(),!0):!nr()}function fv(){const n=h.snapshot();return $o(),Ki(),Yg(),re(s.arrow),h.error?(h.restoreFromSnapshot(n),!1):(Hs(!0),!0)}function Al(){h.type===s.bitShiftL&&(h.pos-=1,$e(s.lessThan)),Gi()}function Gi(){const n=Ge(0);for(re(s.lessThan);!J(s.greaterThan)&&!h.error;)yt(),J(s.comma);Ke(n)}function Tf(){if(x(s.name))switch(h.contextualKeyword){case O._abstract:case O._declare:case O._enum:case O._interface:case O._module:case O._namespace:case O._type:return!0}return!1}function hv(n,o){if(x(s.colon)&&Ps(s.colon),!x(s.braceL)&&nr()){let l=h.tokens.length-1;for(;l>=0&&(h.tokens[l].start>=n||h.tokens[l].type===s._default||h.tokens[l].type===s._export);)h.tokens[l].isType=!0,l--;return}Hs(!1,o)}function pv(n,o,l){if(!In()&&J(s.bang)){h.tokens[h.tokens.length-1].type=s.nonNullAssertion;return}if(x(s.lessThan)||x(s.bitShiftL)){const c=h.snapshot();if(!o&&Of()&&fv())return;if(Al(),!o&&J(s.parenL)?(h.tokens[h.tokens.length-1].subscriptStartIndex=n,qr()):x(s.backQuote)?Ol():(h.type===s.greaterThan||h.type!==s.parenL&&Boolean(h.type&s.IS_EXPRESSION_START)&&!In())&&Ue(),h.error)h.restoreFromSnapshot(c);else return}else!o&&x(s.questionDot)&&wt()===s.lessThan&&(ie(),h.tokens[n].isOptionalChainStart=!0,h.tokens[h.tokens.length-1].subscriptStartIndex=n,Gi(),re(s.parenL),qr());El(n,o,l)}function dv(){return J(s._import)?(Re(O._type)&&wt()!==s.eq&&Bt(O._type),ul(),!0):J(s.eq)?($t(),pt(),!0):jt(O._as)?(Bt(O._namespace),We(),pt(),!0):(Re(O._type)&&wt()===s.braceL&&ie(),!1)}function mv(){if(We(),x(s.comma)||x(s.braceR)){h.tokens[h.tokens.length-1].identifierRole=De.ImportDeclaration;return}if(We(),x(s.comma)||x(s.braceR)){h.tokens[h.tokens.length-1].identifierRole=De.ImportDeclaration,h.tokens[h.tokens.length-2].isType=!0,h.tokens[h.tokens.length-1].isType=!0;return}if(We(),x(s.comma)||x(s.braceR)){h.tokens[h.tokens.length-3].identifierRole=De.ImportAccess,h.tokens[h.tokens.length-1].identifierRole=De.ImportDeclaration;return}We(),h.tokens[h.tokens.length-3].identifierRole=De.ImportAccess,h.tokens[h.tokens.length-1].identifierRole=De.ImportDeclaration,h.tokens[h.tokens.length-4].isType=!0,h.tokens[h.tokens.length-3].isType=!0,h.tokens[h.tokens.length-2].isType=!0,h.tokens[h.tokens.length-1].isType=!0}function gv(){if(We(),x(s.comma)||x(s.braceR)){h.tokens[h.tokens.length-1].identifierRole=De.ExportAccess;return}if(We(),x(s.comma)||x(s.braceR)){h.tokens[h.tokens.length-1].identifierRole=De.ExportAccess,h.tokens[h.tokens.length-2].isType=!0,h.tokens[h.tokens.length-1].isType=!0;return}if(We(),x(s.comma)||x(s.braceR)){h.tokens[h.tokens.length-3].identifierRole=De.ExportAccess;return}We(),h.tokens[h.tokens.length-3].identifierRole=De.ExportAccess,h.tokens[h.tokens.length-4].isType=!0,h.tokens[h.tokens.length-3].isType=!0,h.tokens[h.tokens.length-2].isType=!0,h.tokens[h.tokens.length-1].isType=!0}function vv(){if(Re(O._abstract)&&wt()===s._class)return h.type=s._abstract,ie(),hi(!0,!0),!0;if(Re(O._interface)){const n=Ge(2);return Uo(O._interface,!0),Ke(n),!0}return!1}function kv(){if(h.type===s._const){const n=Fs();if(n.type===s.name&&n.contextualKeyword===O._enum)return re(s._const),Bt(O._enum),h.tokens[h.tokens.length-1].type=s._enum,Cl(),!0}return!1}function yv(n){const o=h.tokens.length;Sl([O._abstract,O._readonly,O._declare,O._static,O._override]);const l=h.tokens.length;if(wf()){const p=n?o-1:o;for(let g=p;g<l;g++)h.tokens[g].isType=!0;return!0}return!1}function bv(n){cv(n)||pt()}function wv(){const n=jt(O._declare);n&&(h.tokens[h.tokens.length-1].type=s._declare);let o=!1;if(x(s.name))if(n){const l=Ge(2);o=yc(),Ke(l)}else o=yc();if(!o)if(n){const l=Ge(2);An(!0),Ke(l)}else An(!0)}function xv(n){if(n&&(x(s.lessThan)||x(s.bitShiftL))&&Al(),jt(O._implements)){h.tokens[h.tokens.length-1].type=s._implements;const o=Ge(1);_f(),Ke(o)}}function _v(){di()}function Sv(){di()}function Tv(){const n=Ge(0);In()||J(s.bang),Ui(),Ke(n)}function Cv(){x(s.colon)&&js()}function Iv(n,o){return Ho?Av(n,o):Lv(n,o)}function Av(n,o){if(!x(s.lessThan))return sr(n,o);const l=h.snapshot();let c=sr(n,o);if(h.error)h.restoreFromSnapshot(l);else return c;return h.type=s.typeParameterStart,$o(),c=sr(n,o),c||Ue(),c}function Lv(n,o){if(!x(s.lessThan))return sr(n,o);const l=h.snapshot();$o();const c=sr(n,o);if(c||Ue(),h.error)h.restoreFromSnapshot(l);else return c;return sr(n,o)}function Ev(){if(x(s.colon)){const n=h.snapshot();Ps(s.colon),Cn()&&Ue(),x(s.arrow)||Ue(),h.error&&h.restoreFromSnapshot(n)}return J(s.arrow)}function Nv(){const n=Ge(0);J(s.question),Ui(),Ke(n)}function Pv(){(x(s.lessThan)||x(s.bitShiftL))&&Al(),$f()}function Ov(){let n=!1,o=!1;for(;;){if(h.pos>=xe.length){Ue("Unterminated JSX contents");return}const l=xe.charCodeAt(h.pos);if(l===H.lessThan||l===H.leftCurlyBrace){if(h.pos===h.start){if(l===H.lessThan){h.pos++,$e(s.jsxTagStart);return}af(l);return}$e(n&&!o?s.jsxEmptyText:s.jsxText);return}l===H.lineFeed?n=!0:l!==H.space&&l!==H.carriageReturn&&l!==H.tab&&(o=!0),h.pos++}}function Dv(n){for(h.pos++;;){if(h.pos>=xe.length){Ue("Unterminated string constant");return}if(xe.charCodeAt(h.pos)===n){h.pos++;break}h.pos++}$e(s.string)}function Rv(){let n;do{if(h.pos>xe.length){Ue("Unexpectedly reached the end of input.");return}n=xe.charCodeAt(++h.pos)}while($n[n]||n===H.dash);$e(s.jsxName)}function cl(){On()}function Cf(n){if(cl(),!J(s.colon)){h.tokens[h.tokens.length-1].identifierRole=n;return}cl()}function If(){for(Cf(De.Access);x(s.dot);)On(),cl()}function Mv(){switch(h.type){case s.braceL:ie(),$t(),On();return;case s.jsxTagStart:Lf(),On();return;case s.string:On();return;default:Ue("JSX value should be either an expression or a quoted JSX text")}}function Fv(){re(s.ellipsis),$t()}function Bv(n){if(x(s.jsxTagEnd))return!1;If(),tt&&tv();let o=!1;for(;!x(s.slash)&&!x(s.jsxTagEnd)&&!h.error;){if(J(s.braceL)){o=!0,re(s.ellipsis),Ut(),On();continue}o&&h.end-h.start===3&&xe.charCodeAt(h.start)===H.lowercaseK&&xe.charCodeAt(h.start+1)===H.lowercaseE&&xe.charCodeAt(h.start+2)===H.lowercaseY&&(h.tokens[n].jsxRole=qn.KeyAfterPropSpread),Cf(De.ObjectKey),x(s.eq)&&(On(),Mv())}const l=x(s.slash);return l&&On(),l}function jv(){x(s.jsxTagEnd)||If()}function Af(){const n=h.tokens.length-1;h.tokens[n].jsxRole=qn.NoChildren;let o=0;if(!Bv(n))for(Fi();;)switch(h.type){case s.jsxTagStart:if(On(),x(s.slash)){On(),jv(),h.tokens[n].jsxRole!==qn.KeyAfterPropSpread&&(o===1?h.tokens[n].jsxRole=qn.OneChild:o>1&&(h.tokens[n].jsxRole=qn.StaticChildren));return}o++,Af(),Fi();break;case s.jsxText:o++,Fi();break;case s.jsxEmptyText:Fi();break;case s.braceL:ie(),x(s.ellipsis)?(Fv(),Fi(),o+=2):(x(s.braceR)||(o++,$t()),Fi());break;default:Ue();return}}function Lf(){On(),Af()}function On(){h.tokens.push(new qo),sf(),h.start=h.pos;const n=xe.charCodeAt(h.pos);if(Ms[n])Rv();else if(n===H.quotationMark||n===H.apostrophe)Dv(n);else switch(++h.pos,n){case H.greaterThan:$e(s.jsxTagEnd);break;case H.lessThan:$e(s.jsxTagStart);break;case H.slash:$e(s.slash);break;case H.equalsTo:$e(s.eq);break;case H.leftCurlyBrace:$e(s.braceL);break;case H.dot:$e(s.dot);break;case H.colon:$e(s.colon);break;default:Ue()}}function Fi(){h.tokens.push(new qo),h.start=h.pos,Ov()}function Wv(n){if(x(s.question)){const o=wt();if(o===s.colon||o===s.comma||o===s.parenR)return}Ef(n)}function Hv(){Zc(s.question),x(s.colon)&&(tt?js():it&&mi())}class qv{constructor(o){this.stop=o}}function $t(n=!1){if(Ut(n),x(s.comma))for(;J(s.comma);)Ut(n)}function Ut(n=!1,o=!1){return tt?Iv(n,o):it?Kk(n,o):sr(n,o)}function sr(n,o){if(x(s._yield))return ik(),!1;(x(s.parenL)||x(s.name)||x(s._yield))&&(h.potentialArrowAt=h.start);const l=zv(n);return o&&Pl(),h.type&s.IS_ASSIGN?(ie(),Ut(n),!1):l}function zv(n){return Uv(n)?!0:($v(n),!1)}function $v(n){tt||it?Wv(n):Ef(n)}function Ef(n){J(s.question)&&(Ut(),re(s.colon),Ut(n))}function Uv(n){const o=h.tokens.length;return Ws()?!0:(wo(o,-1,n),!1)}function wo(n,o,l){if(tt&&(s._in&s.PRECEDENCE_MASK)>o&&!In()&&(jt(O._as)||jt(O._satisfies))){const p=Ge(1);yt(),Ke(p),Ym(),wo(n,o,l);return}const c=h.type&s.PRECEDENCE_MASK;if(c>0&&(!l||!x(s._in))&&c>o){const p=h.type;ie(),p===s.nullishCoalescing&&(h.tokens[h.tokens.length-1].nullishStartIndex=n);const g=h.tokens.length;Ws(),wo(g,p&s.IS_RIGHT_ASSOCIATIVE?c-1:c,l),p===s.nullishCoalescing&&(h.tokens[n].numNullishCoalesceStarts++,h.tokens[h.tokens.length-1].numNullishCoalesceEnds++),wo(n,o,l)}}function Ws(){if(tt&&!Ho&&J(s.lessThan))return ev(),!1;if(Re(O._module)&&tf()===H.leftCurlyBrace&&!Pm())return sk(),!1;if(h.type&s.IS_PREFIX)return ie(),Ws(),!1;if(Nf())return!0;for(;h.type&s.IS_POSTFIX&&!Cn();)h.type===s.preIncDec&&(h.type=s.postIncDec),ie();return!1}function Nf(){const n=h.tokens.length;return _r()?!0:(Ll(n),h.tokens.length>n&&h.tokens[n].isOptionalChainStart&&(h.tokens[h.tokens.length-1].isOptionalChainEnd=!0),!1)}function Ll(n,o=!1){it?Vk(n,o):Pf(n,o)}function Pf(n,o=!1){const l=new qv(!1);do Gv(n,o,l);while(!l.stop&&!h.error)}function Gv(n,o,l){tt?pv(n,o,l):it?Lk(n,o,l):El(n,o,l)}function El(n,o,l){if(!o&&J(s.doubleColon))Nl(),l.stop=!0,Ll(n,o);else if(x(s.questionDot)){if(h.tokens[n].isOptionalChainStart=!0,o&&wt()===s.parenL){l.stop=!0;return}ie(),h.tokens[h.tokens.length-1].subscriptStartIndex=n,J(s.bracketL)?($t(),re(s.bracketR)):J(s.parenL)?qr():Eo()}else if(J(s.dot))h.tokens[h.tokens.length-1].subscriptStartIndex=n,Eo();else if(J(s.bracketL))h.tokens[h.tokens.length-1].subscriptStartIndex=n,$t(),re(s.bracketR);else if(!o&&x(s.parenL))if(Of()){const c=h.snapshot(),p=h.tokens.length;ie(),h.tokens[h.tokens.length-1].subscriptStartIndex=n;const g=Es();h.tokens[h.tokens.length-1].contextId=g,qr(),h.tokens[h.tokens.length-1].contextId=g,Kv()&&(h.restoreFromSnapshot(c),l.stop=!0,h.scopeDepth++,Ki(),Xv(p))}else{ie(),h.tokens[h.tokens.length-1].subscriptStartIndex=n;const c=Es();h.tokens[h.tokens.length-1].contextId=c,qr(),h.tokens[h.tokens.length-1].contextId=c}else x(s.backQuote)?Ol():l.stop=!0}function Of(){return h.tokens[h.tokens.length-1].contextualKeyword===O._async&&!Cn()}function qr(){let n=!0;for(;!J(s.parenR)&&!h.error;){if(n)n=!1;else if(re(s.comma),J(s.parenR))break;Ff(!1)}}function Kv(){return x(s.colon)||x(s.arrow)}function Xv(n){tt?Cv():it&&Gk(),re(s.arrow),Ds(n)}function Nl(){const n=h.tokens.length;_r(),Ll(n,!0)}function _r(){if(J(s.modulo))return We(),!1;if(x(s.jsxText)||x(s.jsxEmptyText))return $i(),!1;if(x(s.lessThan)&&Ho)return h.type=s.jsxTagStart,Lf(),ie(),!1;const n=h.potentialArrowAt===h.start;switch(h.type){case s.slash:case s.assign:jm();case s._super:case s._this:case s.regexp:case s.num:case s.bigint:case s.decimal:case s.string:case s._null:case s._true:case s._false:return ie(),!1;case s._import:return ie(),x(s.dot)&&(h.tokens[h.tokens.length-1].type=s.name,ie(),We()),!1;case s.name:{const o=h.tokens.length,l=h.start,c=h.contextualKeyword;return We(),c===O._await?(rk(),!1):c===O._async&&x(s._function)&&!Cn()?(ie(),fi(l,!1),!1):n&&c===O._async&&!Cn()&&x(s.name)?(h.scopeDepth++,Kr(!1),re(s.arrow),Ds(o),!0):x(s._do)&&!Cn()?(ie(),zr(),!1):n&&!Cn()&&x(s.arrow)?(h.scopeDepth++,xl(!1),re(s.arrow),Ds(o),!0):(h.tokens[h.tokens.length-1].identifierRole=De.Access,!1)}case s._do:return ie(),zr(),!1;case s.parenL:return Df(n);case s.bracketL:return ie(),Mf(s.bracketR,!0),!1;case s.braceL:return Dl(!1,!1),!1;case s._function:return Vv(),!1;case s.at:zl();case s._class:return hi(!1),!1;case s._new:return Jv(),!1;case s.backQuote:return Ol(),!1;case s.doubleColon:return ie(),Nl(),!1;case s.hash:{const o=tf();return Ms[o]||o===H.backslash?Eo():ie(),!1}default:return Ue(),!1}}function Eo(){J(s.hash),We()}function Vv(){const n=h.start;We(),J(s.dot)&&We(),fi(n,!1)}function $i(){ie()}function Go(){re(s.parenL),$t(),re(s.parenR)}function Df(n){const o=h.snapshot(),l=h.tokens.length;re(s.parenL);let c=!0;for(;!x(s.parenR)&&!h.error;){if(c)c=!1;else if(re(s.comma),x(s.parenR))break;if(x(s.ellipsis)){gf(!1),Pl();break}else Ut(!1,!0)}return re(s.parenR),n&&Yv()&&fl()?(h.restoreFromSnapshot(o),h.scopeDepth++,Ki(),fl(),Ds(l),h.error?(h.restoreFromSnapshot(o),Df(!1),!1):!0):!1}function Yv(){return x(s.colon)||!Cn()}function fl(){return tt?Ev():it?Xk():J(s.arrow)}function Pl(){(tt||it)&&Hv()}function Jv(){if(re(s._new),J(s.dot)){We();return}Qv(),it&&Ek(),J(s.parenL)&&Mf(s.parenR)}function Qv(){Nl(),J(s.questionDot)}function Ol(){for(jr(),jr();!x(s.backQuote)&&!h.error;)re(s.dollarBraceL),$t(),jr(),jr();ie()}function Dl(n,o){const l=Es();let c=!0;for(ie(),h.tokens[h.tokens.length-1].contextId=l;!J(s.braceR)&&!h.error;){if(c)c=!1;else if(re(s.comma),J(s.braceR))break;let p=!1;if(x(s.ellipsis)){const g=h.tokens.length;if(mf(),n&&(h.tokens.length===g+2&&xl(o),J(s.braceR)))break;continue}n||(p=J(s.star)),!n&&Re(O._async)?(p&&Ue(),We(),x(s.colon)||x(s.parenL)||x(s.braceR)||x(s.eq)||x(s.comma)||(x(s.star)&&(ie(),p=!0),Os(l))):Os(l),nk(n,o,l)}h.tokens[h.tokens.length-1].contextId=l}function Zv(n){return!n&&(x(s.string)||x(s.num)||x(s.bracketL)||x(s.name)||!!(h.type&s.IS_KEYWORD))}function ek(n,o){const l=h.start;return x(s.parenL)?(n&&Ue(),hl(l,!1),!0):Zv(n)?(Os(o),hl(l,!1),!0):!1}function tk(n,o){if(J(s.colon)){n?Ao(o):Ut(!1);return}let l;n?h.scopeDepth===0?l=De.ObjectShorthandTopLevelDeclaration:o?l=De.ObjectShorthandBlockScopedDeclaration:l=De.ObjectShorthandFunctionScopedDeclaration:l=De.ObjectShorthand,h.tokens[h.tokens.length-1].identifierRole=l,Ao(o,!0)}function nk(n,o,l){tt?_v():it&&Wk(),ek(n,l)||tk(n,o)}function Os(n){it&&ql(),J(s.bracketL)?(h.tokens[h.tokens.length-1].contextId=n,Ut(),re(s.bracketR),h.tokens[h.tokens.length-1].contextId=n):(x(s.num)||x(s.string)||x(s.bigint)||x(s.decimal)?_r():Eo(),h.tokens[h.tokens.length-1].identifierRole=De.ObjectKey,h.tokens[h.tokens.length-1].contextId=n)}function hl(n,o){const l=Es();h.scopeDepth++;const c=h.tokens.length;Ki(o,l),Rf(n,l);const g=h.tokens.length;h.scopes.push(new or(c,g,!0)),h.scopeDepth--}function Ds(n){Hs(!0);const o=h.tokens.length;h.scopes.push(new or(n,o,!0)),h.scopeDepth--}function Rf(n,o=0){tt?hv(n,o):it?Ak(o):Hs(!1,o)}function Hs(n,o=0){n&&!x(s.braceL)?Ut():zr(!0,o)}function Mf(n,o=!1){let l=!0;for(;!J(n)&&!h.error;){if(l)l=!1;else if(re(s.comma),J(n))break;Ff(o)}}function Ff(n){n&&x(s.comma)||(x(s.ellipsis)?(mf(),Pl()):x(s.question)?ie():Ut(!1,!0))}function We(){ie(),h.tokens[h.tokens.length-1].type=s.name}function rk(){Ws()}function ik(){ie(),!x(s.semi)&&!Cn()&&(J(s.star),Ut())}function sk(){Bt(O._module),re(s.braceL),Xo(s.braceR)}function ok(n){return(n.type===s.name||!!(n.type&s.IS_KEYWORD))&&n.contextualKeyword!==O._from}function ar(n){const o=Ge(0);re(n||s.colon),bn(),Ke(o)}function bc(){re(s.modulo),Bt(O._checks),J(s.parenL)&&($t(),re(s.parenR))}function Rl(){const n=Ge(0);re(s.colon),x(s.modulo)?bc():(bn(),x(s.modulo)&&bc()),Ke(n)}function ak(){ie(),Ml(!0)}function lk(){ie(),We(),x(s.lessThan)&&Gn(),re(s.parenL),dl(),re(s.parenR),Rl(),pt()}function pl(){x(s._class)?ak():x(s._function)?lk():x(s._var)?uk():jt(O._module)?J(s.dot)?hk():ck():Re(O._type)?pk():Re(O._opaque)?dk():Re(O._interface)?mk():x(s._export)?fk():Ue()}function uk(){ie(),Hf(),pt()}function ck(){for(x(s.string)?_r():We(),re(s.braceL);!x(s.braceR)&&!h.error;)x(s._import)?(ie(),Jf()):Ue();re(s.braceR)}function fk(){re(s._export),J(s._default)?x(s._function)||x(s._class)?pl():(bn(),pt()):x(s._var)||x(s._function)||x(s._class)||Re(O._opaque)?pl():x(s.star)||x(s.braceL)||Re(O._interface)||Re(O._type)||Re(O._opaque)?Vf():Ue()}function hk(){Bt(O._exports),mi(),pt()}function pk(){ie(),Bl()}function dk(){ie(),jl(!0)}function mk(){ie(),Ml()}function Ml(n=!1){if(Ko(),x(s.lessThan)&&Gn(),J(s._extends))do xo();while(!n&&J(s.comma));if(Re(O._mixins)){ie();do xo();while(J(s.comma))}if(Re(O._implements)){ie();do xo();while(J(s.comma))}No(n,!1,n)}function xo(){Bf(!1),x(s.lessThan)&&ci()}function Fl(){Ml()}function Ko(){We()}function Bl(){Ko(),x(s.lessThan)&&Gn(),ar(s.eq),pt()}function jl(n){Bt(O._type),Ko(),x(s.lessThan)&&Gn(),x(s.colon)&&ar(s.colon),n||ar(s.eq),pt()}function gk(){ql(),Hf(),J(s.eq)&&bn()}function Gn(){const n=Ge(0);x(s.lessThan)||x(s.typeParameterStart)?ie():Ue();do gk(),x(s.greaterThan)||re(s.comma);while(!x(s.greaterThan)&&!h.error);re(s.greaterThan),Ke(n)}function ci(){const n=Ge(0);for(re(s.lessThan);!x(s.greaterThan)&&!h.error;)bn(),x(s.greaterThan)||re(s.comma);re(s.greaterThan),Ke(n)}function vk(){if(Bt(O._interface),J(s._extends))do xo();while(J(s.comma));No(!1,!1,!1)}function Wl(){x(s.num)||x(s.string)?_r():We()}function kk(){wt()===s.colon?(Wl(),ar()):bn(),re(s.bracketR),ar()}function yk(){Wl(),re(s.bracketR),re(s.bracketR),x(s.lessThan)||x(s.parenL)?Hl():(J(s.question),ar())}function Hl(){for(x(s.lessThan)&&Gn(),re(s.parenL);!x(s.parenR)&&!x(s.ellipsis)&&!h.error;)Po(),x(s.parenR)||re(s.comma);J(s.ellipsis)&&Po(),re(s.parenR),ar()}function bk(){Hl()}function No(n,o,l){let c;for(o&&x(s.braceBarL)?(re(s.braceBarL),c=s.braceBarR):(re(s.braceL),c=s.braceR);!x(c)&&!h.error;){if(l&&Re(O._proto)){const p=wt();p!==s.colon&&p!==s.question&&(ie(),n=!1)}if(n&&Re(O._static)){const p=wt();p!==s.colon&&p!==s.question&&ie()}if(ql(),J(s.bracketL))J(s.bracketL)?yk():kk();else if(x(s.parenL)||x(s.lessThan))bk();else{if(Re(O._get)||Re(O._set)){const p=wt();(p===s.name||p===s.string||p===s.num)&&ie()}wk()}xk()}re(c)}function wk(){if(x(s.ellipsis)){if(re(s.ellipsis),J(s.comma)||J(s.semi),x(s.braceR))return;bn()}else Wl(),x(s.lessThan)||x(s.parenL)?Hl():(J(s.question),ar())}function xk(){!J(s.semi)&&!J(s.comma)&&!x(s.braceR)&&!x(s.braceBarR)&&Ue()}function Bf(n){for(n||We();J(s.dot);)We()}function _k(){Bf(!0),x(s.lessThan)&&ci()}function Sk(){re(s._typeof),jf()}function Tk(){for(re(s.bracketL);h.pos<xe.length&&!x(s.bracketR)&&(bn(),!x(s.bracketR));)re(s.comma);re(s.bracketR)}function Po(){const n=wt();n===s.colon||n===s.question?(We(),J(s.question),ar()):bn()}function dl(){for(;!x(s.parenR)&&!x(s.ellipsis)&&!h.error;)Po(),x(s.parenR)||re(s.comma);J(s.ellipsis)&&Po()}function jf(){let n=!1;const o=h.noAnonFunctionType;switch(h.type){case s.name:{if(Re(O._interface)){vk();return}We(),_k();return}case s.braceL:No(!1,!1,!1);return;case s.braceBarL:No(!1,!0,!1);return;case s.bracketL:Tk();return;case s.lessThan:Gn(),re(s.parenL),dl(),re(s.parenR),re(s.arrow),bn();return;case s.parenL:if(ie(),!x(s.parenR)&&!x(s.ellipsis))if(x(s.name)){const l=wt();n=l!==s.question&&l!==s.colon}else n=!0;if(n)if(h.noAnonFunctionType=!1,bn(),h.noAnonFunctionType=o,h.noAnonFunctionType||!(x(s.comma)||x(s.parenR)&&wt()===s.arrow)){re(s.parenR);return}else J(s.comma);dl(),re(s.parenR),re(s.arrow),bn();return;case s.minus:ie(),$i();return;case s.string:case s.num:case s._true:case s._false:case s._null:case s._this:case s._void:case s.star:ie();return;default:if(h.type===s._typeof){Sk();return}else if(h.type&s.IS_KEYWORD){ie(),h.tokens[h.tokens.length-1].type=s.name;return}}Ue()}function Ck(){for(jf();!Cn()&&(x(s.bracketL)||x(s.questionDot));)J(s.questionDot),re(s.bracketL),J(s.bracketR)||(bn(),re(s.bracketR))}function Wf(){J(s.question)?Wf():Ck()}function wc(){Wf(),!h.noAnonFunctionType&&J(s.arrow)&&bn()}function xc(){for(J(s.bitwiseAND),wc();J(s.bitwiseAND);)wc()}function Ik(){for(J(s.bitwiseOR),xc();J(s.bitwiseOR);)xc()}function bn(){Ik()}function mi(){ar()}function Hf(){We(),x(s.colon)&&mi()}function ql(){(x(s.plus)||x(s.minus))&&(ie(),h.tokens[h.tokens.length-1].isType=!0)}function Ak(n){x(s.colon)&&Rl(),Hs(!1,n)}function Lk(n,o,l){if(x(s.questionDot)&&wt()===s.lessThan){if(o){l.stop=!0;return}ie(),ci(),re(s.parenL),qr();return}else if(!o&&x(s.lessThan)){const c=h.snapshot();if(ci(),re(s.parenL),qr(),h.error)h.restoreFromSnapshot(c);else return}El(n,o,l)}function Ek(){if(x(s.lessThan)){const n=h.snapshot();ci(),h.error&&h.restoreFromSnapshot(n)}}function Nk(){if(x(s.name)&&h.contextualKeyword===O._interface){const n=Ge(0);return ie(),Fl(),Ke(n),!0}else if(Re(O._enum))return qf(),!0;return!1}function Pk(){return Re(O._enum)?(qf(),!0):!1}function Ok(n){if(n===O._declare){if(x(s._class)||x(s.name)||x(s._function)||x(s._var)||x(s._export)){const o=Ge(1);pl(),Ke(o)}}else if(x(s.name)){if(n===O._interface){const o=Ge(1);Fl(),Ke(o)}else if(n===O._type){const o=Ge(1);Bl(),Ke(o)}else if(n===O._opaque){const o=Ge(1);jl(!1),Ke(o)}}pt()}function Dk(){return Re(O._type)||Re(O._interface)||Re(O._opaque)||Re(O._enum)}function Rk(){return x(s.name)&&(h.contextualKeyword===O._type||h.contextualKeyword===O._interface||h.contextualKeyword===O._opaque||h.contextualKeyword===O._enum)}function Mk(){if(Re(O._type)){const n=Ge(1);ie(),x(s.braceL)?($l(),Rs()):Bl(),Ke(n)}else if(Re(O._opaque)){const n=Ge(1);ie(),jl(!1),Ke(n)}else if(Re(O._interface)){const n=Ge(1);ie(),Fl(),Ke(n)}else An(!0)}function Fk(){return x(s.star)||Re(O._type)&&wt()===s.star}function Bk(){if(jt(O._type)){const n=Ge(2);ml(),Ke(n)}else ml()}function jk(n){if(n&&x(s.lessThan)&&ci(),Re(O._implements)){const o=Ge(0);ie(),h.tokens[h.tokens.length-1].type=s._implements;do Ko(),x(s.lessThan)&&ci();while(J(s.comma));Ke(o)}}function Wk(){x(s.lessThan)&&(Gn(),x(s.parenL)||Ue())}function Hk(){const n=Ge(0);J(s.question),x(s.colon)&&mi(),Ke(n)}function qk(){if(x(s._typeof)||Re(O._type)){const n=Fs();(ok(n)||n.type===s.braceL||n.type===s.star)&&ie()}}function zk(){const n=h.contextualKeyword===O._type||h.type===s._typeof;n?ie():We(),Re(O._as)&&!Xc(O._as)?(We(),n&&!x(s.name)&&!(h.type&s.IS_KEYWORD)||We()):(n&&(x(s.name)||h.type&s.IS_KEYWORD)&&We(),jt(O._as)&&We())}function $k(){if(x(s.lessThan)){const n=Ge(0);Gn(),Ke(n)}}function Uk(){x(s.colon)&&mi()}function Gk(){if(x(s.colon)){const n=h.noAnonFunctionType;h.noAnonFunctionType=!0,mi(),h.noAnonFunctionType=n}}function Kk(n,o){if(x(s.lessThan)){const l=h.snapshot();let c=sr(n,o);if(h.error)h.restoreFromSnapshot(l),h.type=s.typeParameterStart;else return c;const p=Ge(0);if(Gn(),Ke(p),c=sr(n,o),c)return!0;Ue()}return sr(n,o)}function Xk(){if(x(s.colon)){const n=Ge(0),o=h.snapshot(),l=h.noAnonFunctionType;h.noAnonFunctionType=!0,Rl(),h.noAnonFunctionType=l,Cn()&&Ue(),x(s.arrow)||Ue(),h.error&&h.restoreFromSnapshot(o),Ke(n)}return J(s.arrow)}function Vk(n,o=!1){if(h.tokens[h.tokens.length-1].contextualKeyword===O._async&&x(s.lessThan)){const l=h.snapshot();if(Yk()&&!h.error)return;h.restoreFromSnapshot(l)}Pf(n,o)}function Yk(){h.scopeDepth++;const n=h.tokens.length;return Ki(),fl()?(Ds(n),!0):!1}function qf(){Bt(O._enum),h.tokens[h.tokens.length-1].type=s._enum,We(),Jk()}function Jk(){jt(O._of)&&ie(),re(s.braceL),Qk(),re(s.braceR)}function Qk(){for(;!x(s.braceR)&&!h.error&&!J(s.ellipsis);)Zk(),x(s.braceR)||re(s.comma)}function Zk(){We(),J(s.eq)&&ie()}function ey(){if(Xo(s.eof),h.scopes.push(new or(0,h.tokens.length,!0)),h.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${h.scopeDepth}`);return new Fy(h.tokens,h.scopes)}function An(n){it&&Nk()||(x(s.at)&&zl(),ty(n))}function ty(n){if(tt&&kv())return;const o=h.type;switch(o){case s._break:case s._continue:ry();return;case s._debugger:iy();return;case s._do:sy();return;case s._for:oy();return;case s._function:if(wt()===s.dot)break;n||Ue(),ly();return;case s._class:n||Ue(),hi(!0);return;case s._if:uy();return;case s._return:cy();return;case s._switch:fy();return;case s._throw:hy();return;case s._try:dy();return;case s._let:case s._const:n||Ue();case s._var:Uf(o);return;case s._while:my();return;case s.braceL:zr();return;case s.semi:gy();return;case s._export:case s._import:{const p=wt();if(p===s.parenL||p===s.dot)break;ie(),o===s._import?Jf():Vf();return}case s.name:if(h.contextualKeyword===O._async){const p=h.start,g=h.snapshot();if(ie(),x(s._function)&&!Cn()){re(s._function),fi(p,!0);return}else h.restoreFromSnapshot(g)}}const l=h.tokens.length;$t();let c=null;if(h.tokens.length===l+1){const p=h.tokens[h.tokens.length-1];p.type===s.name&&(c=p.contextualKeyword)}if(c==null){pt();return}J(s.colon)?vy():ky(c)}function zl(){for(;x(s.at);)zf()}function zf(){if(ie(),J(s.parenL))$t(),re(s.parenR);else for(We();J(s.dot);)We();ny()}function ny(){tt?Pv():$f()}function $f(){J(s.parenL)&&qr()}function ry(){ie(),nr()||(We(),pt())}function iy(){ie(),pt()}function sy(){ie(),An(!1),re(s._while),Go(),J(s.semi)}function oy(){h.scopeDepth++;const n=h.tokens.length;ay();const o=h.tokens.length;h.scopes.push(new or(n,o,!1)),h.scopeDepth--}function ay(){ie();let n=!1;if(Re(O._await)&&(n=!0,ie()),re(s.parenL),x(s.semi)){n&&Ue(),Ka();return}if(x(s._var)||x(s._let)||x(s._const)){const o=h.type;if(ie(),Gf(!0,o),x(s._in)||Re(O._of)){_c(n);return}Ka();return}if($t(!0),x(s._in)||Re(O._of)){_c(n);return}n&&Ue(),Ka()}function ly(){const n=h.start;ie(),fi(n,!0)}function uy(){ie(),Go(),An(!1),J(s._else)&&An(!1)}function cy(){ie(),nr()||($t(),pt())}function fy(){ie(),Go(),h.scopeDepth++;const n=h.tokens.length;for(re(s.braceL);!x(s.braceR)&&!h.error;)if(x(s._case)||x(s._default)){const l=x(s._case);ie(),l&&$t(),re(s.colon)}else An(!0);ie();const o=h.tokens.length;h.scopes.push(new or(n,o,!1)),h.scopeDepth--}function hy(){ie(),$t(),pt()}function py(){zo(!0),tt&&Ui()}function dy(){if(ie(),zr(),x(s._catch)){ie();let n=null;if(x(s.parenL)&&(h.scopeDepth++,n=h.tokens.length,re(s.parenL),py(),re(s.parenR)),zr(),n!=null){const o=h.tokens.length;h.scopes.push(new or(n,o,!1)),h.scopeDepth--}}J(s._finally)&&zr()}function Uf(n){ie(),Gf(!1,n),pt()}function my(){ie(),Go(),An(!1)}function gy(){ie()}function vy(){An(!0)}function ky(n){tt?bv(n):it?Ok(n):pt()}function zr(n=!1,o=0){const l=h.tokens.length;h.scopeDepth++,re(s.braceL),o&&(h.tokens[h.tokens.length-1].contextId=o),Xo(s.braceR),o&&(h.tokens[h.tokens.length-1].contextId=o);const c=h.tokens.length;h.scopes.push(new or(l,c,n)),h.scopeDepth--}function Xo(n){for(;!J(n)&&!h.error;)An(!0)}function Ka(){re(s.semi),x(s.semi)||$t(),re(s.semi),x(s.parenR)||$t(),re(s.parenR),An(!1)}function _c(n){n?jt(O._of):ie(),$t(),re(s.parenR),An(!1)}function Gf(n,o){for(;;){const l=o===s._const||o===s._let;if(yy(l),J(s.eq)){const c=h.tokens.length-1;Ut(n),h.tokens[c].rhsEndIndex=h.tokens.length}if(!J(s.comma))break}}function yy(n){zo(n),tt?Tv():it&&Uk()}function fi(n,o,l=!1){x(s.star)&&ie(),o&&!l&&!x(s.name)&&!x(s._yield)&&Ue();let c=null;x(s.name)&&(o||(c=h.tokens.length,h.scopeDepth++),Kr(!1));const p=h.tokens.length;h.scopeDepth++,Ki(),Rf(n);const g=h.tokens.length;h.scopes.push(new or(p,g,!0)),h.scopeDepth--,c!==null&&(h.scopes.push(new or(c,g,!0)),h.scopeDepth--)}function Ki(n=!1,o=0){tt?Sv():it&&$k(),re(s.parenL),o&&(h.tokens[h.tokens.length-1].contextId=o),_l(s.parenR,!1,!1,n,o),o&&(h.tokens[h.tokens.length-1].contextId=o)}function hi(n,o=!1){const l=Es();ie(),h.tokens[h.tokens.length-1].contextId=l,h.tokens[h.tokens.length-1].isExpression=!n;let c=null;n||(c=h.tokens.length,h.scopeDepth++),_y(n,o),Sy();const p=h.tokens.length;if(by(l),!h.error&&(h.tokens[p].contextId=l,h.tokens[h.tokens.length-1].contextId=l,c!==null)){const g=h.tokens.length;h.scopes.push(new or(c,g,!1)),h.scopeDepth--}}function Kf(){return x(s.eq)||x(s.semi)||x(s.braceR)||x(s.bang)||x(s.colon)}function Xf(){return x(s.parenL)||x(s.lessThan)}function by(n){for(re(s.braceL);!J(s.braceR)&&!h.error;){if(J(s.semi))continue;if(x(s.at)){zf();continue}const o=h.start;wy(o,n)}}function wy(n,o){tt&&Sl([O._declare,O._public,O._protected,O._private,O._override]);let l=!1;if(x(s.name)&&h.contextualKeyword===O._static){if(We(),Xf()){Ts(n,!1);return}else if(Kf()){_o();return}if(h.tokens[h.tokens.length-1].type=s._static,l=!0,x(s.braceL)){h.tokens[h.tokens.length-1].contextId=o,zr();return}}xy(n,l,o)}function xy(n,o,l){if(tt&&yv(o))return;if(J(s.star)){Ss(l),Ts(n,!1);return}Ss(l);let c=!1;const p=h.tokens[h.tokens.length-1];p.contextualKeyword===O._constructor&&(c=!0),Sc(),Xf()?Ts(n,c):Kf()?_o():p.contextualKeyword===O._async&&!nr()?(h.tokens[h.tokens.length-1].type=s._async,x(s.star)&&ie(),Ss(l),Sc(),Ts(n,!1)):(p.contextualKeyword===O._get||p.contextualKeyword===O._set)&&!(nr()&&x(s.star))?(p.contextualKeyword===O._get?h.tokens[h.tokens.length-1].type=s._get:h.tokens[h.tokens.length-1].type=s._set,Ss(l),Ts(n,!1)):p.contextualKeyword===O._accessor&&!nr()?(Ss(l),_o()):nr()?_o():Ue()}function Ts(n,o){tt?di():it&&x(s.lessThan)&&Gn(),hl(n,o)}function Ss(n){Os(n)}function Sc(){if(tt){const n=Ge(0);J(s.question),Ke(n)}}function _o(){if(tt?(Zc(s.bang),Ui()):it&&x(s.colon)&&mi(),x(s.eq)){const n=h.tokens.length;ie(),Ut(),h.tokens[n].rhsEndIndex=h.tokens.length}pt()}function _y(n,o=!1){tt&&(!n||o)&&Re(O._implements)||(x(s.name)&&Kr(!0),tt?di():it&&x(s.lessThan)&&Gn())}function Sy(){let n=!1;J(s._extends)?(Nf(),n=!0):n=!1,tt?xv(n):it&&jk(n)}function Vf(){const n=h.tokens.length-1;tt&&dv()||(Ay()?Ly():Iy()?(We(),x(s.comma)&&wt()===s.star?(re(s.comma),re(s.star),Bt(O._as),We()):Yf(),Rs()):J(s._default)?Ty():Ny()?Cy():($l(),Rs()),h.tokens[n].rhsEndIndex=h.tokens.length)}function Ty(){if(tt&&vv()||it&&Pk())return;const n=h.start;J(s._function)?fi(n,!0,!0):Re(O._async)&&wt()===s._function?(jt(O._async),J(s._function),fi(n,!0,!0)):x(s._class)?hi(!0,!0):x(s.at)?(zl(),hi(!0,!0)):(Ut(),pt())}function Cy(){tt?wv():it?Mk():An(!0)}function Iy(){if(tt&&Tf())return!1;if(it&&Rk())return!1;if(x(s.name))return h.contextualKeyword!==O._async;if(!x(s._default))return!1;const n=bl(),o=Fs(),l=o.type===s.name&&o.contextualKeyword===O._from;if(o.type===s.comma)return!0;if(l){const c=xe.charCodeAt(ef(n+4));return c===H.quotationMark||c===H.apostrophe}return!1}function Yf(){J(s.comma)&&$l()}function Rs(){jt(O._from)&&(_r(),Qf()),pt()}function Ay(){return it?Fk():x(s.star)}function Ly(){it?Bk():ml()}function ml(){re(s.star),Re(O._as)?Ey():Rs()}function Ey(){ie(),h.tokens[h.tokens.length-1].type=s._as,We(),Yf(),Rs()}function Ny(){return tt&&Tf()||it&&Dk()||h.type===s._var||h.type===s._const||h.type===s._let||h.type===s._function||h.type===s._class||Re(O._async)||x(s.at)}function $l(){let n=!0;for(re(s.braceL);!J(s.braceR)&&!h.error;){if(n)n=!1;else if(re(s.comma),J(s.braceR))break;Py()}}function Py(){if(tt){gv();return}We(),h.tokens[h.tokens.length-1].identifierRole=De.ExportAccess,jt(O._as)&&We()}function Jf(){if(tt&&x(s.name)&&wt()===s.eq){ul();return}if(tt&&Re(O._type)){const n=Fs();if(n.type===s.name&&n.contextualKeyword!==O._from){if(Bt(O._type),wt()===s.eq){ul();return}}else(n.type===s.star||n.type===s.braceL)&&Bt(O._type)}x(s.string)||(Dy(),Bt(O._from)),_r(),Qf(),pt()}function Oy(){return x(s.name)}function Tc(){Io()}function Dy(){it&&qk();let n=!0;if(!(Oy()&&(Tc(),!J(s.comma)))){if(x(s.star)){ie(),Bt(O._as),Tc();return}for(re(s.braceL);!J(s.braceR)&&!h.error;){if(n)n=!1;else if(J(s.colon)&&Ue("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),re(s.comma),J(s.braceR))break;Ry()}}}function Ry(){if(tt){mv();return}if(it){zk();return}Io(),Re(O._as)&&(h.tokens[h.tokens.length-1].identifierRole=De.ImportAccess,ie(),Io())}function Qf(){Re(O._assert)&&!In()&&(ie(),Dl(!1,!1))}function My(){return h.pos===0&&xe.charCodeAt(0)===H.numberSign&&xe.charCodeAt(1)===H.exclamationMark&&rf(2),nf(),ey()}let Fy=class{constructor(o,l){this.tokens=o,this.scopes=l}};function By(n,o,l,c){if(c&&l)throw new Error("Cannot combine flow and typescript plugins.");Nm(n,o,l,c);const p=My();if(h.error)throw Am(h.error);return p}function jy(n){let o=n.currentIndex(),l=0;const c=n.currentToken();do{const p=n.tokens[o];if(p.isOptionalChainStart&&l++,p.isOptionalChainEnd&&l--,l+=p.numNullishCoalesceStarts,l-=p.numNullishCoalesceEnds,p.contextualKeyword===O._await&&p.identifierRole==null&&p.scopeDepth===c.scopeDepth)return!0;o+=1}while(l>0&&o<n.tokens.length);return!1}class Oo{__init(){this.resultCode=""}__init2(){this.tokenIndex=0}constructor(o,l,c,p,g){this.code=o,this.tokens=l,this.isFlowEnabled=c,this.disableESTransforms=p,this.helperManager=g,Oo.prototype.__init.call(this),Oo.prototype.__init2.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(o){this.resultCode=o.resultCode,this.tokenIndex=o.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(o){const l=this.resultCode.slice(o.resultCode.length);return this.resultCode=o.resultCode,l}reset(){this.resultCode="",this.tokenIndex=0}matchesContextualAtIndex(o,l){return this.matches1AtIndex(o,s.name)&&this.tokens[o].contextualKeyword===l}identifierNameAtIndex(o){return this.identifierNameForToken(this.tokens[o])}identifierNameAtRelativeIndex(o){return this.identifierNameForToken(this.tokenAtRelativeIndex(o))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(o){return this.code.slice(o.start,o.end)}rawCodeForToken(o){return this.code.slice(o.start,o.end)}stringValueAtIndex(o){return this.stringValueForToken(this.tokens[o])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(o){return this.code.slice(o.start+1,o.end-1)}matches1AtIndex(o,l){return this.tokens[o].type===l}matches2AtIndex(o,l,c){return this.tokens[o].type===l&&this.tokens[o+1].type===c}matches3AtIndex(o,l,c,p){return this.tokens[o].type===l&&this.tokens[o+1].type===c&&this.tokens[o+2].type===p}matches1(o){return this.tokens[this.tokenIndex].type===o}matches2(o,l){return this.tokens[this.tokenIndex].type===o&&this.tokens[this.tokenIndex+1].type===l}matches3(o,l,c){return this.tokens[this.tokenIndex].type===o&&this.tokens[this.tokenIndex+1].type===l&&this.tokens[this.tokenIndex+2].type===c}matches4(o,l,c,p){return this.tokens[this.tokenIndex].type===o&&this.tokens[this.tokenIndex+1].type===l&&this.tokens[this.tokenIndex+2].type===c&&this.tokens[this.tokenIndex+3].type===p}matches5(o,l,c,p,g){return this.tokens[this.tokenIndex].type===o&&this.tokens[this.tokenIndex+1].type===l&&this.tokens[this.tokenIndex+2].type===c&&this.tokens[this.tokenIndex+3].type===p&&this.tokens[this.tokenIndex+4].type===g}matchesContextual(o){return this.matchesContextualAtIndex(this.tokenIndex,o)}matchesContextIdAndLabel(o,l){return this.matches1(o)&&this.currentToken().contextId===l}previousWhitespaceAndComments(){let o=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(o=o.replace(/@flow/g,"")),o}replaceToken(o){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=o,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(o){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultCode+=o,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}removeBalancedCode(){let o=0;for(;!this.isAtEnd();){if(this.matches1(s.braceL))o++;else if(this.matches1(s.braceR)){if(o===0)return;o--}this.removeToken()}}copyExpectedToken(o){if(this.tokens[this.tokenIndex].type!==o)throw new Error(`Expected token ${o}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(o){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=o,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const o=this.currentToken();if((o.numNullishCoalesceStarts||o.isOptionalChainStart)&&(o.isAsyncOperation=jy(this)),!this.disableESTransforms){if(o.numNullishCoalesceStarts)for(let l=0;l<o.numNullishCoalesceStarts;l++)o.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";o.isOptionalChainStart&&(o.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===s._delete?o.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):o.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const o=this.currentToken();if(o.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),o.numNullishCoalesceEnds&&!this.disableESTransforms)for(let l=0;l<o.numNullishCoalesceEnds;l++)this.resultCode+="))"}appendCode(o){this.resultCode+=o}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){const o=this.currentToken();return this.code.slice(o.start,o.end)}tokenAtRelativeIndex(o){return this.tokens[this.tokenIndex+o]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),this.resultCode}isAtEnd(){return this.tokenIndex===this.tokens.length}}function Wy(n,o,l,c){const p=o.snapshot(),g=Hy(o);let _=[];const S=[],w=[];let C=null;const y=[],E=[],L=o.currentToken().contextId;if(L==null)throw new Error("Expected non-null class context ID on class open-brace.");for(o.nextToken();!o.matchesContextIdAndLabel(s.braceR,L);)if(o.matchesContextual(O._constructor)&&!o.currentToken().isType)({constructorInitializerStatements:_,constructorInsertPos:C}=Cc(o));else if(o.matches1(s.semi))c||E.push({start:o.currentIndex(),end:o.currentIndex()+1}),o.nextToken();else if(o.currentToken().isType)o.nextToken();else{const T=o.currentIndex();let F=!1,R=!1,W=!1;for(;Do(o.currentToken());)o.matches1(s._static)&&(F=!0),o.matches1(s.hash)&&(R=!0),(o.matches1(s._declare)||o.matches1(s._abstract))&&(W=!0),o.nextToken();if(F&&o.matches1(s.braceL)){Xa(o,L);continue}if(R){Xa(o,L);continue}if(o.matchesContextual(O._constructor)&&!o.currentToken().isType){({constructorInitializerStatements:_,constructorInsertPos:C}=Cc(o));continue}const D=o.currentIndex();if(qy(o),o.matches1(s.lessThan)||o.matches1(s.parenL)){Xa(o,L);continue}for(;o.currentToken().isType;)o.nextToken();if(o.matches1(s.eq)){const I=o.currentIndex(),M=o.currentToken().rhsEndIndex;if(M==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(o.nextToken();o.currentIndex()<M;)n.processToken();let B;F?(B=l.claimFreeName("__initStatic"),w.push(B)):(B=l.claimFreeName("__init"),S.push(B)),y.push({initializerName:B,equalsIndex:I,start:D,end:o.currentIndex()})}else(!c||W)&&E.push({start:T,end:o.currentIndex()})}return o.restoreToSnapshot(p),c?{headerInfo:g,constructorInitializerStatements:_,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:C,fields:[],rangesToRemove:E}:{headerInfo:g,constructorInitializerStatements:_,instanceInitializerNames:S,staticInitializerNames:w,constructorInsertPos:C,fields:y,rangesToRemove:E}}function Xa(n,o){for(n.nextToken();n.currentToken().contextId!==o;)n.nextToken();for(;Do(n.tokenAtRelativeIndex(-1));)n.previousToken()}function Hy(n){const o=n.currentToken(),l=o.contextId;if(l==null)throw new Error("Expected context ID on class token.");const c=o.isExpression;if(c==null)throw new Error("Expected isExpression on class token.");let p=null,g=!1;for(n.nextToken(),n.matches1(s.name)&&(p=n.identifierName());!n.matchesContextIdAndLabel(s.braceL,l);)n.matches1(s._extends)&&!n.currentToken().isType&&(g=!0),n.nextToken();return{isExpression:c,className:p,hasSuperclass:g}}function Cc(n){const o=[];n.nextToken();const l=n.currentToken().contextId;if(l==null)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!n.matchesContextIdAndLabel(s.parenR,l);)if(n.currentToken().contextId===l){if(n.nextToken(),Do(n.currentToken())){for(n.nextToken();Do(n.currentToken());)n.nextToken();const g=n.currentToken();if(g.type!==s.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const _=n.identifierNameForToken(g);o.push(`this.${_} = ${_}`)}}else n.nextToken();n.nextToken();let c=n.currentIndex(),p=!1;for(;!n.matchesContextIdAndLabel(s.braceR,l);){if(!p&&n.matches2(s._super,s.parenL)){n.nextToken();const g=n.currentToken().contextId;if(g==null)throw new Error("Expected a context ID on the super call");for(;!n.matchesContextIdAndLabel(s.parenR,g);)n.nextToken();c=n.currentIndex(),p=!0}n.nextToken()}return n.nextToken(),{constructorInitializerStatements:o,constructorInsertPos:c}}function Do(n){return[s._async,s._get,s._set,s.plus,s.minus,s._readonly,s._static,s._public,s._private,s._protected,s._override,s._abstract,s.star,s._declare,s.hash].includes(n.type)}function qy(n){if(n.matches1(s.bracketL)){const l=n.currentToken().contextId;if(l==null)throw new Error("Expected class context ID on computed name open bracket.");for(;!n.matchesContextIdAndLabel(s.bracketR,l);)n.nextToken();n.nextToken()}else n.nextToken()}function Zf(n){if(n.removeInitialToken(),n.removeToken(),n.removeToken(),n.removeToken(),n.matches1(s.parenL))n.removeToken(),n.removeToken(),n.removeToken();else for(;n.matches1(s.dot);)n.removeToken(),n.removeToken()}const eh={typeDeclarations:new Set,valueDeclarations:new Set};function th(n){const o=new Set,l=new Set;for(let c=0;c<n.tokens.length;c++){const p=n.tokens[c];p.type===s.name&&Qc(p)&&(p.isType?o.add(n.identifierNameForToken(p)):l.add(n.identifierNameForToken(p)))}return{typeDeclarations:o,valueDeclarations:l}}function Wi(n){n.matches2(s.name,s.braceL)&&n.matchesContextual(O._assert)&&(n.removeToken(),n.removeToken(),n.removeBalancedCode(),n.removeToken())}function nh(n,o,l){if(!n)return!1;const c=o.currentToken();if(c.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");const p=c.rhsEndIndex-o.currentIndex();if(p!==3&&!(p===4&&o.matches1AtIndex(c.rhsEndIndex-1,s.semi)))return!1;const g=o.tokenAtRelativeIndex(2);if(g.type!==s.name)return!1;const _=o.identifierNameForToken(g);return l.typeDeclarations.has(_)&&!l.valueDeclarations.has(_)}class Cs extends Un{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(o,l,c,p,g,_,S,w){super(),this.rootTransformer=o,this.tokens=l,this.importProcessor=c,this.nameManager=p,this.reactHotLoaderTransformer=g,this.enableLegacyBabel5ModuleInterop=_,this.isTypeScriptTransformEnabled=S,this.preserveDynamicImport=w,Cs.prototype.__init.call(this),Cs.prototype.__init2.call(this),Cs.prototype.__init3.call(this),this.declarationInfo=S?th(l):eh}getPrefixCode(){let o="";return this.hadExport&&(o+='Object.defineProperty(exports, "__esModule", {value: true});'),o}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
module.exports = exports.default;
`:""}process(){return this.tokens.matches3(s._import,s.name,s.eq)?this.processImportEquals():this.tokens.matches1(s._import)?(this.processImport(),!0):this.tokens.matches2(s._export,s.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(s._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(s.name,s.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(s.name)||this.tokens.matches1(s.jsxName)?this.processIdentifier():this.tokens.matches1(s.eq)?this.processAssignment():this.tokens.matches1(s.assign)?this.processComplexAssignment():this.tokens.matches1(s.preIncDec)?this.processPreIncDec():!1}processImportEquals(){const o=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.isTypeName(o)?Zf(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(s._import,s.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}this.tokens.replaceToken("Promise.resolve().then(() => require");const l=this.tokens.currentToken().contextId;if(l==null)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(s.parenR,l);)this.rootTransformer.processToken();this.tokens.replaceToken("))");return}if(this.removeImportAndDetectIfType())this.tokens.removeToken();else{const l=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(l)),this.tokens.appendCode(this.importProcessor.claimImportCode(l))}Wi(this.tokens),this.tokens.matches1(s.semi)&&this.tokens.removeToken()}removeImportAndDetectIfType(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(O._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,s.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,O._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(s.name)||this.tokens.matches1(s.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(s.string))return!1;let o=!1;for(;!this.tokens.matches1(s.string);)(!o&&this.tokens.matches1(s.braceL)||this.tokens.matches1(s.comma))&&(this.tokens.removeToken(),(this.tokens.matches2(s.name,s.comma)||this.tokens.matches2(s.name,s.braceR)||this.tokens.matches4(s.name,s.name,s.name,s.comma)||this.tokens.matches4(s.name,s.name,s.name,s.braceR))&&(o=!0)),this.tokens.removeToken();return!o}removeRemainingImport(){for(;!this.tokens.matches1(s.string);)this.tokens.removeToken()}processIdentifier(){const o=this.tokens.currentToken();if(o.shadowsGlobal)return!1;if(o.identifierRole===De.ObjectShorthand)return this.processObjectShorthand();if(o.identifierRole!==De.Access)return!1;const l=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(o));if(!l)return!1;let c=this.tokens.currentIndex()+1;for(;c<this.tokens.tokens.length&&this.tokens.tokens[c].type===s.parenR;)c++;return this.tokens.tokens[c].type===s.parenL?this.tokens.tokenAtRelativeIndex(1).type===s.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==s._new?(this.tokens.replaceToken(`${l}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.parenR)):this.tokens.replaceToken(`(0, ${l})`):this.tokens.replaceToken(l),!0}processObjectShorthand(){const o=this.tokens.identifierName(),l=this.importProcessor.getIdentifierReplacement(o);return l?(this.tokens.replaceToken(`${o}: ${l}`),!0):!1}processExport(){if(this.tokens.matches2(s._export,s._enum)||this.tokens.matches3(s._export,s._const,s._enum))return!1;if(this.tokens.matches2(s._export,s._default))return this.hadDefaultExport=!0,this.tokens.matches3(s._export,s._default,s._enum)?!1:(this.processExportDefault(),!0);if(this.hadNamedExport=!0,this.tokens.matches2(s._export,s._var)||this.tokens.matches2(s._export,s._let)||this.tokens.matches2(s._export,s._const))return this.processExportVar(),!0;if(this.tokens.matches2(s._export,s._function)||this.tokens.matches3(s._export,s.name,s._function))return this.processExportFunction(),!0;if(this.tokens.matches2(s._export,s._class)||this.tokens.matches3(s._export,s._abstract,s._class))return this.processExportClass(),!0;if(this.tokens.matches2(s._export,s.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(s._export,s.star))return this.processExportStar(),!0;if(this.tokens.matches3(s._export,s.name,s.braceL)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,O._type)){for(this.tokens.removeInitialToken();!this.tokens.matches1(s.braceR);)this.tokens.removeToken();return this.tokens.removeToken(),this.tokens.matchesContextual(O._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,s.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),Wi(this.tokens)),!0}else throw new Error("Unrecognized export syntax.")}processAssignment(){const o=this.tokens.currentIndex(),l=this.tokens.tokens[o-1];if(l.isType||l.type!==s.name||l.shadowsGlobal||o>=2&&this.tokens.matches1AtIndex(o-2,s.dot)||o>=2&&[s._var,s._let,s._const].includes(this.tokens.tokens[o-2].type))return!1;const c=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(l));return c?(this.tokens.copyToken(),this.tokens.appendCode(` ${c} =`),!0):!1}processComplexAssignment(){const o=this.tokens.currentIndex(),l=this.tokens.tokens[o-1];if(l.type!==s.name||l.shadowsGlobal||o>=2&&this.tokens.matches1AtIndex(o-2,s.dot))return!1;const c=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(l));return c?(this.tokens.appendCode(` = ${c}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){const o=this.tokens.currentIndex(),l=this.tokens.tokens[o+1];if(l.type!==s.name||l.shadowsGlobal||o+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(o+2,s.dot)||this.tokens.matches1AtIndex(o+2,s.bracketL)||this.tokens.matches1AtIndex(o+2,s.parenL)))return!1;const c=this.tokens.identifierNameForToken(l),p=this.importProcessor.resolveExportBinding(c);return p?(this.tokens.appendCode(`${p} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){const o=this.tokens.currentIndex(),l=this.tokens.tokens[o],c=this.tokens.tokens[o+1];if(l.type!==s.name||l.shadowsGlobal||o>=1&&this.tokens.matches1AtIndex(o-1,s.dot))return!1;const p=this.tokens.identifierNameForToken(l),g=this.importProcessor.resolveExportBinding(p);if(!g)return!1;const _=this.tokens.rawCodeForToken(c),S=this.importProcessor.getIdentifierReplacement(p)||p;if(_==="++")this.tokens.replaceToken(`(${S} = ${g} = ${S} + 1, ${S} - 1)`);else if(_==="--")this.tokens.replaceToken(`(${S} = ${g} = ${S} - 1, ${S} + 1)`);else throw new Error(`Unexpected operator: ${_}`);return this.tokens.removeToken(),!0}processExportDefault(){if(this.tokens.matches4(s._export,s._default,s._function,s.name)||this.tokens.matches5(s._export,s._default,s.name,s._function,s.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,O._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const o=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${o};`)}else if(this.tokens.matches4(s._export,s._default,s._class,s.name)||this.tokens.matches5(s._export,s._default,s._abstract,s._class,s.name)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(s._abstract)&&this.tokens.removeToken();const o=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${o};`)}else{if(this.tokens.matches3(s._export,s._default,s.at))throw new Error("Export default statements with decorators are not yet supported.");if(nh(this.isTypeScriptTransformEnabled,this.tokens,this.declarationInfo))this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const o=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${o}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${o} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(o)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =")}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let o=this.tokens.currentIndex();if(o++,o++,!this.tokens.matches1AtIndex(o,s.name))return!1;for(o++;o<this.tokens.tokens.length&&this.tokens.tokens[o].isType;)o++;return!!this.tokens.matches1AtIndex(o,s.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();const o=this.tokens.identifierName();for(;!this.tokens.matches1(s.eq);)this.rootTransformer.processToken();const l=this.tokens.currentToken().rhsEndIndex;if(l==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<l;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${o} = ${o}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();const o=this.tokens.matches1(s.braceL);o&&this.tokens.appendCode("(");let l=0;for(;;)if(this.tokens.matches1(s.braceL)||this.tokens.matches1(s.dollarBraceL)||this.tokens.matches1(s.bracketL))l++,this.tokens.copyToken();else if(this.tokens.matches1(s.braceR)||this.tokens.matches1(s.bracketR))l--,this.tokens.copyToken();else{if(l===0&&!this.tokens.matches1(s.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(s.eq)){const c=this.tokens.currentToken().rhsEndIndex;if(c==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<c;)this.rootTransformer.processToken()}else{const c=this.tokens.currentToken();if(Jc(c)){const p=this.tokens.identifierName();let g=this.importProcessor.getIdentifierReplacement(p);if(g===null)throw new Error(`Expected a replacement for ${p} in \`export var\` syntax.`);Bm(c)&&(g=`${p}: ${g}`),this.tokens.replaceToken(g)}else this.rootTransformer.processToken()}}if(o){const c=this.tokens.currentToken().rhsEndIndex;if(c==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<c;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");const o=this.processNamedFunction();this.tokens.appendCode(` exports.${o} = ${o};`)}processNamedFunction(){if(this.tokens.matches1(s._function))this.tokens.copyToken();else if(this.tokens.matches2(s.name,s._function)){if(!this.tokens.matchesContextual(O._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(s.star)&&this.tokens.copyToken(),!this.tokens.matches1(s.name))throw new Error("Expected identifier for exported function name.");const o=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(s.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(s.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.braceR),o}processExportClass(){this.tokens.removeInitialToken(),this.tokens.matches1(s._abstract)&&this.tokens.removeToken();const o=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${o} = ${o};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();const o=[];for(;;){if(this.tokens.matches1(s.braceR)){this.tokens.removeToken();break}const l=Ns(this.tokens);for(;this.tokens.currentIndex()<l.endIndex;)this.tokens.removeToken();if(!l.isType&&!this.shouldElideExportedIdentifier(l.leftName)){const c=l.leftName,p=l.rightName,g=this.importProcessor.getIdentifierReplacement(c);o.push(`exports.${p} = ${g||c};`)}if(this.tokens.matches1(s.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(s.comma,s.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(s.comma))this.tokens.removeToken();else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(O._from)){this.tokens.removeToken();const l=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(l)),Wi(this.tokens)}else this.tokens.appendCode(o.join(" "));this.tokens.matches1(s.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(s.string);)this.tokens.removeToken();const o=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(o)),Wi(this.tokens),this.tokens.matches1(s.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(o){return this.isTypeScriptTransformEnabled&&!this.declarationInfo.valueDeclarations.has(o)}}class zy extends Un{constructor(o,l,c,p,g,_){super(),this.tokens=o,this.nameManager=l,this.helperManager=c,this.reactHotLoaderTransformer=p,this.isTypeScriptTransformEnabled=g,this.nonTypeIdentifiers=g?hf(o,_):new Set,this.declarationInfo=g?th(o):eh,this.injectCreateRequireForImportRequire=Boolean(_.injectCreateRequireForImportRequire)}process(){if(this.tokens.matches3(s._import,s.name,s.eq))return this.processImportEquals();if(this.tokens.matches4(s._import,s.name,s.name,s.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,O._type)){this.tokens.removeInitialToken();for(let o=0;o<7;o++)this.tokens.removeToken();return!0}if(this.tokens.matches2(s._export,s.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(s._export,s._import,s.name,s.name,s.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,O._type)){this.tokens.removeInitialToken();for(let o=0;o<8;o++)this.tokens.removeToken();return!0}if(this.tokens.matches1(s._import))return this.processImport();if(this.tokens.matches2(s._export,s._default))return this.processExportDefault();if(this.tokens.matches2(s._export,s.braceL))return this.processNamedExports();if(this.tokens.matches3(s._export,s.name,s.braceL)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,O._type)){for(this.tokens.removeInitialToken();!this.tokens.matches1(s.braceR);)this.tokens.removeToken();return this.tokens.removeToken(),this.tokens.matchesContextual(O._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,s.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),Wi(this.tokens)),!0}return!1}processImportEquals(){const o=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.isTypeName(o)?Zf(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(s._import,s.parenL))return!1;const o=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(o);!this.tokens.matches1(s.string);)this.tokens.removeToken();this.tokens.removeToken(),Wi(this.tokens),this.tokens.matches1(s.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(s._import),this.tokens.matchesContextual(O._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,s.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,O._from))return!0;if(this.tokens.matches1(s.string))return this.tokens.copyToken(),!1;let o=!1,l=!1;if(this.tokens.matches1(s.name)&&(this.isTypeName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(s.comma)&&this.tokens.removeToken()):(o=!0,this.tokens.copyToken(),this.tokens.matches1(s.comma)&&(l=!0,this.tokens.removeToken()))),this.tokens.matches1(s.star))this.isTypeName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(l&&this.tokens.appendCode(","),o=!0,this.tokens.copyExpectedToken(s.star),this.tokens.copyExpectedToken(s.name),this.tokens.copyExpectedToken(s.name));else if(this.tokens.matches1(s.braceL)){for(l&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(s.braceR);){const c=Ns(this.tokens);if(c.isType||this.isTypeName(c.rightName)){for(;this.tokens.currentIndex()<c.endIndex;)this.tokens.removeToken();this.tokens.matches1(s.comma)&&this.tokens.removeToken()}else{for(o=!0;this.tokens.currentIndex()<c.endIndex;)this.tokens.copyToken();this.tokens.matches1(s.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(s.braceR)}return!o}isTypeName(o){return this.isTypeScriptTransformEnabled&&!this.nonTypeIdentifiers.has(o)}processExportDefault(){if(nh(this.isTypeScriptTransformEnabled,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(s._export,s._default,s._function,s.name)||this.tokens.matches5(s._export,s._default,s.name,s._function,s.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,O._async)||this.tokens.matches4(s._export,s._default,s._class,s.name)||this.tokens.matches5(s._export,s._default,s._abstract,s._class,s.name))&&this.reactHotLoaderTransformer){const l=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${l}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${l} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(l),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;for(this.tokens.copyExpectedToken(s._export),this.tokens.copyExpectedToken(s.braceL);!this.tokens.matches1(s.braceR);){const o=Ns(this.tokens);if(o.isType||this.shouldElideExportedName(o.leftName)){for(;this.tokens.currentIndex()<o.endIndex;)this.tokens.removeToken();this.tokens.matches1(s.comma)&&this.tokens.removeToken()}else{for(;this.tokens.currentIndex()<o.endIndex;)this.tokens.copyToken();this.tokens.matches1(s.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(s.braceR),!0}shouldElideExportedName(o){return this.isTypeScriptTransformEnabled&&this.declarationInfo.typeDeclarations.has(o)&&!this.declarationInfo.valueDeclarations.has(o)}}class $y extends Un{constructor(o,l,c){super(),this.rootTransformer=o,this.tokens=l,this.isImportsTransformEnabled=c}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(s._enum)?(this.processEnum(),!0):this.tokens.matches2(s._export,s._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(s._export,s._default,s._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();const o=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${o} = ${o};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();const o=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${o};`):this.tokens.appendCode(` export default ${o};`)}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(s.name);let o=!1;this.tokens.matchesContextual(O._of)&&(this.tokens.removeToken(),o=this.tokens.matchesContextual(O._symbol),this.tokens.removeToken());const l=this.tokens.matches3(s.braceL,s.name,s.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');const c=!o&&!l;for(this.tokens.replaceTokenTrimmingLeftWhitespace(c?".Mirrored([":"({");!this.tokens.matches1(s.braceR);){if(this.tokens.matches1(s.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(o,l),this.tokens.matches1(s.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(c?"]);":"});")}processEnumElement(o,l){if(o){const c=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${c}")`)}else l?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}}function Uy(n){let o,l=n[0],c=1;for(;c<n.length;){const p=n[c],g=n[c+1];if(c+=2,(p==="optionalAccess"||p==="optionalCall")&&l==null)return;p==="access"||p==="optionalAccess"?(o=l,l=g(l)):(p==="call"||p==="optionalCall")&&(l=g((..._)=>l.call(o,..._)),o=void 0)}return l}const bo="jest",Gy=["mock","unmock","enableAutomock","disableAutomock"];class Ul extends Un{__init(){this.hoistedFunctionNames=[]}constructor(o,l,c,p){super(),this.rootTransformer=o,this.tokens=l,this.nameManager=c,this.importProcessor=p,Ul.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(s.name,s.dot,s.name,s.parenL)&&this.tokens.identifierName()===bo?Uy([this,"access",o=>o.importProcessor,"optionalAccess",o=>o.getGlobalNames,"call",o=>o(),"optionalAccess",o=>o.has,"call",o=>o(bo)])?!1:this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(o=>`${o}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let o=!1;for(;this.tokens.matches3(s.dot,s.name,s.parenL);){const l=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(Gy.includes(l)){const p=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(p),this.tokens.replaceToken(`function ${p}(){${bo}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.parenR),this.tokens.appendCode(";}"),o=!1}else o?this.tokens.copyToken():this.tokens.replaceToken(`${bo}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.parenR),o=!0}return!0}}class Ky extends Un{constructor(o){super(),this.tokens=o}process(){if(this.tokens.matches1(s.num)){const o=this.tokens.currentTokenCode();if(o.includes("_"))return this.tokens.replaceToken(o.replace(/_/g,"")),!0}return!1}}class Xy extends Un{constructor(o,l){super(),this.tokens=o,this.nameManager=l}process(){return this.tokens.matches2(s._catch,s.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0):!1}}class Vy extends Un{constructor(o,l){super(),this.tokens=o,this.nameManager=l}process(){if(this.tokens.matches1(s.nullishCoalescing)){const c=this.tokens.currentToken();return this.tokens.tokens[c.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(s._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;const l=this.tokens.currentToken().subscriptStartIndex;if(l!=null&&this.tokens.tokens[l].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==s._super){const c=this.nameManager.claimFreeName("_");let p;if(l>0&&this.tokens.matches1AtIndex(l-1,s._delete)&&this.isLastSubscriptInChain()?p=`${c} => delete ${c}`:p=`${c} => ${c}`,this.tokens.tokens[l].isAsyncOperation&&(p=`async ${p}`),this.tokens.matches2(s.questionDot,s.parenL)||this.tokens.matches2(s.questionDot,s.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${p}`);else if(this.tokens.matches2(s.questionDot,s.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${p}`);else if(this.tokens.matches1(s.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${p}.`);else if(this.tokens.matches1(s.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${p}.`);else if(this.tokens.matches1(s.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${p}[`);else if(this.tokens.matches1(s.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${p}(`);else throw new Error("Unexpected subscript operator in optional chain.");return!0}return!1}isLastSubscriptInChain(){let o=0;for(let l=this.tokens.currentIndex()+1;;l++){if(l>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[l].isOptionalChainStart?o++:this.tokens.tokens[l].isOptionalChainEnd&&o--,o<0)return!0;if(o===0&&this.tokens.tokens[l].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let o=0,l=this.tokens.currentIndex()-1;for(;;){if(l<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[l].isOptionalChainStart?o--:this.tokens.tokens[l].isOptionalChainEnd&&o++,o<0)return!1;if(o===0&&this.tokens.tokens[l].subscriptStartIndex!=null)return this.tokens.tokens[l-1].type===s._super;l--}}}class Yy extends Un{constructor(o,l,c,p){super(),this.rootTransformer=o,this.tokens=l,this.importProcessor=c,this.options=p}process(){const o=this.tokens.currentIndex();if(this.tokens.identifierName()==="createReactClass"){const l=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return l?this.tokens.replaceToken(`(0, ${l})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(o),!0}if(this.tokens.matches3(s.name,s.dot,s.name)&&this.tokens.identifierName()==="React"&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)==="createClass"){const l=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return l?(this.tokens.replaceToken(l),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(o),!0}return!1}tryProcessCreateClassCall(o){const l=this.findDisplayName(o);l&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(s.parenL),this.tokens.copyExpectedToken(s.braceL),this.tokens.appendCode(`displayName: '${l}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.braceR),this.tokens.copyExpectedToken(s.parenR))}findDisplayName(o){return o<2?null:this.tokens.matches2AtIndex(o-2,s.name,s.eq)?this.tokens.identifierNameAtIndex(o-2):o>=2&&this.tokens.tokens[o-2].identifierRole===De.ObjectKey?this.tokens.identifierNameAtIndex(o-2):this.tokens.matches2AtIndex(o-2,s._export,s._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const l=(this.options.filePath||"unknown").split("/"),c=l[l.length-1],p=c.lastIndexOf("."),g=p===-1?c:c.slice(0,p);return g==="index"&&l[l.length-2]?l[l.length-2]:g}classNeedsDisplayName(){let o=this.tokens.currentIndex();if(!this.tokens.matches2(s.parenL,s.braceL))return!1;const l=o+1,c=this.tokens.tokens[l].contextId;if(c==null)throw new Error("Expected non-null context ID on object open-brace.");for(;o<this.tokens.tokens.length;o++){const p=this.tokens.tokens[o];if(p.type===s.braceR&&p.contextId===c){o++;break}if(this.tokens.identifierNameAtIndex(o)==="displayName"&&this.tokens.tokens[o].identifierRole===De.ObjectKey&&p.contextId===c)return!1}if(o===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(o,s.parenR)||this.tokens.matches2AtIndex(o,s.comma,s.parenR)}}class Gl extends Un{__init(){this.extractedDefaultExportName=null}constructor(o,l){super(),this.tokens=o,this.filePath=l,Gl.prototype.__init.call(this)}setExtractedDefaultExportName(o){this.extractedDefaultExportName=o}getPrefixCode(){return`
(function () {
var enterModule = require('react-hot-loader').enterModule;
enterModule && enterModule(module);
})();`.replace(/\s+/g," ").trim()}getSuffixCode(){const o=new Set;for(const c of this.tokens.tokens)!c.isType&&Qc(c)&&c.identifierRole!==De.ImportDeclaration&&o.add(this.tokens.identifierNameForToken(c));const l=Array.from(o).map(c=>({variableName:c,uniqueLocalName:c}));return this.extractedDefaultExportName&&l.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`
;(function () {
var reactHotLoader = require('react-hot-loader').default;
var leaveModule = require('react-hot-loader').leaveModule;
if (!reactHotLoader) {
return;
}
${l.map(({variableName:c,uniqueLocalName:p})=>` reactHotLoader.register(${c}, "${p}", ${JSON.stringify(this.filePath||"")});`).join(`
`)}
leaveModule(module);
})();`}process(){return!1}}const Jy=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function Ic(n){if(n.length===0||!Ms[n.charCodeAt(0)])return!1;for(let o=1;o<n.length;o++)if(!$n[n.charCodeAt(o)])return!1;return!Jy.has(n)}class Qy extends Un{constructor(o,l,c){super(),this.rootTransformer=o,this.tokens=l,this.isImportsTransformEnabled=c}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(s._public)||this.tokens.matches1(s._protected)||this.tokens.matches1(s._private)||this.tokens.matches1(s._abstract)||this.tokens.matches1(s._readonly)||this.tokens.matches1(s._override)||this.tokens.matches1(s.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(s._enum)||this.tokens.matches2(s._const,s._enum)?(this.processEnum(),!0):this.tokens.matches2(s._export,s._enum)||this.tokens.matches3(s._export,s._const,s._enum)?(this.processEnum(!0),!0):!1}processEnum(o=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(s._const)||this.tokens.matches1(s._enum);)this.tokens.removeToken();const l=this.tokens.identifierName();this.tokens.removeToken(),o&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${l}; (function (${l})`),this.tokens.copyExpectedToken(s.braceL),this.processEnumBody(l),this.tokens.copyExpectedToken(s.braceR),o&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${l} || (exports.${l} = ${l} = {}));`):this.tokens.appendCode(`)(${l} || (${l} = {}));`)}processEnumBody(o){let l=null;for(;!this.tokens.matches1(s.braceR);){const{nameStringCode:c,variableName:p}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(s.eq,s.string,s.comma)||this.tokens.matches3(s.eq,s.string,s.braceR)?this.processStringLiteralEnumMember(o,c,p):this.tokens.matches1(s.eq)?this.processExplicitValueEnumMember(o,c,p):this.processImplicitValueEnumMember(o,c,p,l),this.tokens.matches1(s.comma)&&this.tokens.removeToken(),p!=null?l=p:l=`${o}[${c}]`}}extractEnumKeyInfo(o){if(o.type===s.name){const l=this.tokens.identifierNameForToken(o);return{nameStringCode:`"${l}"`,variableName:Ic(l)?l:null}}else if(o.type===s.string){const l=this.tokens.stringValueForToken(o);return{nameStringCode:this.tokens.code.slice(o.start,o.end),variableName:Ic(l)?l:null}}else throw new Error("Expected name or string at beginning of enum element.")}processStringLiteralEnumMember(o,l,c){c!=null?(this.tokens.appendCode(`const ${c}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${o}[${l}] = ${c};`)):(this.tokens.appendCode(`${o}[${l}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"))}processExplicitValueEnumMember(o,l,c){const p=this.tokens.currentToken().rhsEndIndex;if(p==null)throw new Error("Expected rhsEndIndex on enum assign.");if(c!=null){for(this.tokens.appendCode(`const ${c}`),this.tokens.copyToken();this.tokens.currentIndex()<p;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${o}[${o}[${l}] = ${c}] = ${l};`)}else{for(this.tokens.appendCode(`${o}[${o}[${l}]`),this.tokens.copyToken();this.tokens.currentIndex()<p;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${l};`)}}processImplicitValueEnumMember(o,l,c,p){let g=p!=null?`${p} + 1`:"0";c!=null&&(this.tokens.appendCode(`const ${c} = ${g}; `),g=c),this.tokens.appendCode(`${o}[${o}[${l}] = ${g}] = ${l};`)}}class Ro{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(o,l,c,p){Ro.prototype.__init.call(this),Ro.prototype.__init2.call(this),this.nameManager=o.nameManager,this.helperManager=o.helperManager;const{tokenProcessor:g,importProcessor:_}=o;this.tokens=g,this.isImportsTransformEnabled=l.includes("imports"),this.isReactHotLoaderTransformEnabled=l.includes("react-hot-loader"),this.disableESTransforms=Boolean(p.disableESTransforms),p.disableESTransforms||(this.transformers.push(new Vy(g,this.nameManager)),this.transformers.push(new Ky(g)),this.transformers.push(new Xy(g,this.nameManager))),l.includes("jsx")&&(this.transformers.push(new ai(this,g,_,this.nameManager,p)),this.transformers.push(new Yy(this,g,_,p)));let S=null;if(l.includes("react-hot-loader")){if(!p.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");S=new Gl(g,p.filePath),this.transformers.push(S)}if(l.includes("imports")){if(_===null)throw new Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new Cs(this,g,_,this.nameManager,S,c,l.includes("typescript"),Boolean(p.preserveDynamicImport)))}else this.transformers.push(new zy(g,this.nameManager,this.helperManager,S,l.includes("typescript"),p));l.includes("flow")&&this.transformers.push(new $y(this,g,l.includes("imports"))),l.includes("typescript")&&this.transformers.push(new Qy(this,g,l.includes("imports"))),l.includes("jest")&&this.transformers.push(new Ul(this,g,this.nameManager,_))}transform(){this.tokens.reset(),this.processBalancedCode();let l=this.isImportsTransformEnabled?'"use strict";':"";for(const g of this.transformers)l+=g.getPrefixCode();l+=this.helperManager.emitHelpers(),l+=this.generatedVariables.map(g=>` var ${g};`).join("");for(const g of this.transformers)l+=g.getHoistedCode();let c="";for(const g of this.transformers)c+=g.getSuffixCode();let p=this.tokens.finish();if(p.startsWith("#!")){let g=p.indexOf(`
`);return g===-1&&(g=p.length,p+=`
`),p.slice(0,g+1)+l+p.slice(g+1)+c}else return l+this.tokens.finish()+c}processBalancedCode(){let o=0,l=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(s.braceL)||this.tokens.matches1(s.dollarBraceL))o++;else if(this.tokens.matches1(s.braceR)){if(o===0)return;o--}if(this.tokens.matches1(s.parenL))l++;else if(this.tokens.matches1(s.parenR)){if(l===0)return;l--}this.processToken()}}processToken(){if(this.tokens.matches1(s._class)){this.processClass();return}for(const o of this.transformers)if(o.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(s._class,s.name))throw new Error("Expected identifier for exported class name.");const o=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),o}processClass(){const o=Wy(this,this.tokens,this.nameManager,this.disableESTransforms),l=(o.headerInfo.isExpression||!o.headerInfo.className)&&o.staticInitializerNames.length+o.instanceInitializerNames.length>0;let c=o.headerInfo.className;l&&(c=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(c),this.tokens.appendCode(` (${c} =`));const g=this.tokens.currentToken().contextId;if(g==null)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(s._class);!this.tokens.matchesContextIdAndLabel(s.braceL,g);)this.processToken();this.processClassBody(o,c);const _=o.staticInitializerNames.map(S=>`${c}.${S}()`);l?this.tokens.appendCode(`, ${_.map(S=>`${S}, `).join("")}${c})`):o.staticInitializerNames.length>0&&this.tokens.appendCode(` ${_.map(S=>`${S};`).join(" ")}`)}processClassBody(o,l){const{headerInfo:c,constructorInsertPos:p,constructorInitializerStatements:g,fields:_,instanceInitializerNames:S,rangesToRemove:w}=o;let C=0,y=0;const E=this.tokens.currentToken().contextId;if(E==null)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(s.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");const L=g.length+S.length>0;if(p===null&&L){const T=this.makeConstructorInitCode(g,S,l);if(c.hasSuperclass){const F=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${F}) { super(...${F}); ${T}; }`)}else this.tokens.appendCode(`constructor() { ${T}; }`)}for(;!this.tokens.matchesContextIdAndLabel(s.braceR,E);)if(C<_.length&&this.tokens.currentIndex()===_[C].start){let T=!1;for(this.tokens.matches1(s.bracketL)?this.tokens.copyTokenWithPrefix(`${_[C].initializerName}() {this`):this.tokens.matches1(s.string)||this.tokens.matches1(s.num)?(this.tokens.copyTokenWithPrefix(`${_[C].initializerName}() {this[`),T=!0):this.tokens.copyTokenWithPrefix(`${_[C].initializerName}() {this.`);this.tokens.currentIndex()<_[C].end;)T&&this.tokens.currentIndex()===_[C].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),C++}else if(y<w.length&&this.tokens.currentIndex()>=w[y].start){for(this.tokens.currentIndex()<w[y].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<w[y].end;)this.tokens.removeToken();y++}else this.tokens.currentIndex()===p?(this.tokens.copyToken(),L&&this.tokens.appendCode(`;${this.makeConstructorInitCode(g,S,l)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(s.braceR)}makeConstructorInitCode(o,l,c){return[...o,...l.map(p=>`${c}.prototype.${p}.call(this)`)].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(s.parenR,s.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let o=this.tokens.currentIndex()+1;for(;this.tokens.tokens[o].isType;)o++;if(this.tokens.matches1AtIndex(o,s.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<o;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(O._async)&&!this.tokens.matches1(s._async))return!1;const o=this.tokens.tokenAtRelativeIndex(1);if(o.type!==s.lessThan||!o.isType)return!1;let l=this.tokens.currentIndex()+1;for(;this.tokens.tokens[l].isType;)l++;if(this.tokens.matches1AtIndex(l,s.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<l;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}}var Zy={};(function(n){n.__esModule=!0,n.LinesAndColumns=void 0;var o=`
`,l="\r",c=function(){function p(g){this.string=g;for(var _=[0],S=0;S<g.length;)switch(g[S]){case o:S+=o.length,_.push(S);break;case l:S+=l.length,g[S]===o&&(S+=o.length),_.push(S);break;default:S++;break}this.offsets=_}return p.prototype.locationForIndex=function(g){if(g<0||g>this.string.length)return null;for(var _=0,S=this.offsets;S[_+1]<=g;)_++;var w=g-S[_];return{line:_,column:w}},p.prototype.indexForLocation=function(g){var _=g.line,S=g.column;return _<0||_>=this.offsets.length||S<0||S>this.lengthOfLine(_)?null:this.offsets[_]+S},p.prototype.lengthOfLine=function(g){var _=this.offsets[g],S=g===this.offsets.length-1?this.string.length:this.offsets[g+1];return S-_},p}();n.LinesAndColumns=c,n.default=c})(Zy);function e0(n){const o=new Set;for(let l=0;l<n.tokens.length;l++)n.matches1AtIndex(l,s._import)&&!n.matches3AtIndex(l,s._import,s.name,s.eq)&&t0(n,l,o);return o}function t0(n,o,l){o++,!n.matches1AtIndex(o,s.parenL)&&(n.matches1AtIndex(o,s.name)&&(l.add(n.identifierNameAtIndex(o)),o++,n.matches1AtIndex(o,s.comma)&&o++),n.matches1AtIndex(o,s.star)&&(o+=2,l.add(n.identifierNameAtIndex(o)),o++),n.matches1AtIndex(o,s.braceL)&&(o++,n0(n,o,l)))}function n0(n,o,l){for(;;){if(n.matches1AtIndex(o,s.braceR))return;const c=Ns(n,o);if(o=c.endIndex,c.isType||l.add(c.rightName),n.matches2AtIndex(o,s.comma,s.braceR))return;if(n.matches1AtIndex(o,s.braceR))return;if(n.matches1AtIndex(o,s.comma))o++;else throw new Error(`Unexpected token: ${JSON.stringify(n.tokens[o])}`)}}function r0(n,o){xg(o);try{const l=i0(n,o);let p={code:new Ro(l,o.transforms,Boolean(o.enableLegacyBabel5ModuleInterop),o).transform()};if(o.sourceMapOptions){if(!o.filePath)throw new Error("filePath must be specified when generating a source map.");p={...p,sourceMap:ug(p.code,o.filePath,o.sourceMapOptions)}}return p}catch(l){throw o.filePath&&(l.message=`Error transforming ${o.filePath}: ${l.message}`),l}}function i0(n,o){const l=o.transforms.includes("jsx"),c=o.transforms.includes("typescript"),p=o.transforms.includes("flow"),g=o.disableESTransforms===!0,_=By(n,l,c,p),S=_.tokens,w=_.scopes,C=new wl(n,S),y=new Co(C),E=new Oo(n,S,p,g,y),L=Boolean(o.enableLegacyTypeScriptModuleInterop);let T=null;return o.transforms.includes("imports")?(T=new li(C,E,L,o,o.transforms.includes("typescript"),y),T.preprocessTokens(),pc(E,w,T.getGlobalNames()),o.transforms.includes("typescript")&&T.pruneTypeOnlyImports()):o.transforms.includes("typescript")&&pc(E,w,e0(E)),{tokenProcessor:E,scopes:w,nameManager:C,importProcessor:T,helperManager:y}}function s0(n,o){for(;n.length<o;)n="0"+n;return n}function xr(n,o){var l,c,p;if(o.length===0)return n;for(l=0,p=o.length;l<p;l++)c=o.charCodeAt(l),n=(n<<5)-n+c,n|=0;return n<0?n*-2:n}function o0(n,o,l){return Object.keys(o).sort().reduce(c,n);function c(p,g){return rh(p,o[g],g,l)}}function rh(n,o,l,c){var p=xr(xr(xr(n,l),a0(o)),typeof o);if(o===null)return xr(p,"null");if(o===void 0)return xr(p,"undefined");if(typeof o=="object"||typeof o=="function"){if(c.indexOf(o)!==-1)return xr(p,"[Circular]"+l);c.push(o);var g=o0(p,o,c);if(!("valueOf"in o)||typeof o.valueOf!="function")return g;try{return xr(g,String(o.valueOf()))}catch(_){return xr(g,"[valueOf exception]"+(_.stack||_.message))}}return xr(p,o.toString())}function a0(n){return Object.prototype.toString.call(n)}function l0(n){return s0(rh(0,n,"",[]).toString(16),8)}var u0=l0;const zi="__sfc__";async function Kl(n){return r0(n,{transforms:["typescript"]}).code}async function Va(n,{filename:o,code:l,compiled:c}){var D,I,M;if(!l.trim()){n.state.errors=[];return}if(o.endsWith(".css")){c.css=l,n.state.errors=[];return}if(o.endsWith(".js")||o.endsWith(".ts")){rd(l)&&(l=id(l,{filename:o}).code),o.endsWith(".ts")&&(l=await Kl(l)),c.js=c.ssr=l,n.state.errors=[];return}if(!o.endsWith(".vue")){n.state.errors=[];return}const p=u0(o),{errors:g,descriptor:_}=n.compiler.parse(l,{filename:o,sourceMap:!0});if(g.length){n.state.errors=g;return}if(_.styles.some(B=>B.lang)||_.template&&_.template.lang){n.state.errors=['lang="x" pre-processors for <template> or <style> are currently not supported.'];return}const S=_.script&&_.script.lang||_.scriptSetup&&_.scriptSetup.lang,w=S==="ts";if(S&&!w){n.state.errors=['Only lang="ts" is supported for <script> blocks.'];return}const C=_.styles.some(B=>B.scoped);let y="",E="";const L=B=>{y+=B,E+=B},T=await Ac(n,_,p,!1,w);if(!T)return;const[F,R]=T;if(y+=F,_.scriptSetup){const B=await Ac(n,_,p,!0,w);B?E+=B[0]:E=`/* SSR compile error: ${n.state.errors[0]} */`}else E+=F;if(_.template&&(!_.scriptSetup||((I=(D=n.options)==null?void 0:D.script)==null?void 0:I.inlineTemplate)===!1)){const B=await Lc(n,_,p,R,!1,w);if(!B)return;y+=B;const U=await Lc(n,_,p,R,!0,w);U?E+=U:E=`/* SSR compile error: ${n.state.errors[0]} */`}C&&L(`
${zi}.__scopeId = ${JSON.stringify(`data-v-${p}`)}`),(y||E)&&(L(`
${zi}.__file = ${JSON.stringify(o)}
export default ${zi}`),c.js=y.trimStart(),c.ssr=E.trimStart());let W="";for(const B of _.styles){if(B.module){n.state.errors=["<style module> is not supported in the playground."];return}const U=await n.compiler.compileStyleAsync({...(M=n.options)==null?void 0:M.style,source:B.content,filename:o,id:p,scoped:B.scoped,modules:!!B.module});U.errors.length?U.errors[0].message.includes("pathToFileURL")||(n.state.errors=U.errors):W+=U.code+`
`}W?c.css=W.trim():c.css="/* No <style> tags present */",n.state.errors=[]}async function Ac(n,o,l,c,p){var g,_,S,w;if(o.script||o.scriptSetup)try{const C=p?["typescript"]:void 0,y=n.compiler.compileScript(o,{inlineTemplate:!0,...(g=n.options)==null?void 0:g.script,id:l,templateOptions:{...(_=n.options)==null?void 0:_.template,ssr:c,ssrCssVars:o.cssVars,compilerOptions:{...(w=(S=n.options)==null?void 0:S.template)==null?void 0:w.compilerOptions,expressionPlugins:C}}});let E="";return y.bindings&&(E+=`
/* Analyzed bindings: ${JSON.stringify(y.bindings,null,2)} */`),E+=`
`+n.compiler.rewriteDefault(y.content,zi,C),(o.script||o.scriptSetup).lang==="ts"&&(E=await Kl(E)),[E,y.bindings]}catch(C){n.state.errors=[C.stack.split(`
`).slice(0,12).join(`
`)];return}else return[`
const ${zi} = {}`,void 0]}async function Lc(n,o,l,c,p,g){var C,y,E,L;const _=n.compiler.compileTemplate({...(C=n.options)==null?void 0:C.template,source:o.template.content,filename:o.filename,id:l,scoped:o.styles.some(T=>T.scoped),slotted:o.slotted,ssr:p,ssrCssVars:o.cssVars,isProd:!1,compilerOptions:{...(E=(y=n.options)==null?void 0:y.template)==null?void 0:E.compilerOptions,bindingMetadata:c,expressionPlugins:g?["typescript"]:void 0}});if(_.errors.length){n.state.errors=_.errors;return}const S=p?"ssrRender":"render";let w=`
${_.code.replace(/\nexport (function|const) (render|ssrRender)/,`$1 ${S}`)}
${zi}.${S} = ${S}`;return((L=o.script||o.scriptSetup)==null?void 0:L.lang)==="ts"&&(w=await Kl(w)),w}const Bi="App.vue",Ec=`
<script setup>
import { ref } from 'vue'
const msg = ref('Hello World!')
<\/script>
<template>
<h1>{{ msg }}</h1>
<input v-model="msg">
</template>
`.trim();class ji{constructor(o,l="",c=!1){this.compiled={js:"",css:"",ssr:""},this.filename=o,this.code=l,this.hidden=c}}class c0{constructor({serializedState:o="",defaultVueRuntimeURL:l=`https://unpkg.com/@vue/runtime-dom@${K1}/dist/runtime-dom.esm-browser.js`,defaultVueServerRendererURL:c=`https://unpkg.com/@vue/server-renderer@${K1}/dist/server-renderer.esm-browser.js`,showOutput:p=!1,outputMode:g="preview"}={}){this.compiler=G1,this.pendingCompiler=null;let _={};if(o){const w=JSON.parse(Qd(o));for(const C in w)_[C]=new ji(C,w[C])}else _={[Bi]:new ji(Bi,Ec)};this.defaultVueRuntimeURL=l,this.defaultVueServerRendererURL=c,this.initialShowOutput=p,this.initialOutputMode=g;let S=Bi;_[S]||(S=Object.keys(_)[0]),this.state=Pc({mainFile:S,files:_,activeFile:_[S],errors:[],vueRuntimeURL:this.defaultVueRuntimeURL,vueServerRendererURL:this.defaultVueServerRendererURL,resetFlip:!0}),this.initImportMap()}init(){So(()=>Va(this,this.state.activeFile));for(const o in this.state.files)o!==Bi&&Va(this,this.state.files[o])}setActive(o){this.state.activeFile=this.state.files[o]}addFile(o){const l=typeof o=="string"?new ji(o):o;this.state.files[l.filename]=l,l.hidden||this.setActive(l.filename)}deleteFile(o){confirm(`Are you sure you want to delete ${o}?`)&&(this.state.activeFile.filename===o&&(this.state.activeFile=this.state.files[this.state.mainFile]),delete this.state.files[o])}serialize(){const o=this.getFiles(),l=o["import-map.json"];if(l){const{imports:c}=JSON.parse(l);c.vue===this.defaultVueRuntimeURL&&delete c.vue,c["vue/server-renderer"]===this.defaultVueServerRendererURL&&delete c["vue/server-renderer"],Object.keys(c).length?o["import-map.json"]=JSON.stringify({imports:c},null,2):delete o["import-map.json"]}return"#"+Jd(JSON.stringify(o))}getFiles(){const o={};for(const l in this.state.files)o[l]=this.state.files[l].code;return o}async setFiles(o,l=Bi){const c={};l===Bi&&!o[l]&&(c[l]=new ji(l,Ec));for(const p in o)c[p]=new ji(p,o[p]);for(const p in c)await Va(this,c[p]);this.state.mainFile=l,this.state.files=c,this.initImportMap(),this.setActive(l),this.forceSandboxReset()}forceSandboxReset(){this.state.resetFlip=!this.state.resetFlip}initImportMap(){const o=this.state.files["import-map.json"];if(!o)this.state.files["import-map.json"]=new ji("import-map.json",JSON.stringify({imports:{vue:this.defaultVueRuntimeURL,"vue/server-renderer":this.defaultVueServerRendererURL}},null,2));else try{const l=JSON.parse(o.code);l.imports.vue?l.imports.vue=Nc(l.imports.vue):l.imports.vue=this.defaultVueRuntimeURL,l.imports["vue/server-renderer"]?l.imports["vue/server-renderer"]=Nc(l.imports["vue/server-renderer"]):l.imports["vue/server-renderer"]=this.defaultVueServerRendererURL,o.code=JSON.stringify(l,null,2)}catch{}}getImportMap(){try{return JSON.parse(this.state.files["import-map.json"].code)}catch(o){return this.state.errors=[`Syntax error in import-map.json: ${o.message}`],{}}}setImportMap(o){this.state.files["import-map.json"].code=JSON.stringify(o,null,2)}async setVueVersion(o){this.vueVersion=o;const l=`https://unpkg.com/@vue/compiler-sfc@${o}/dist/compiler-sfc.esm-browser.js`,c=`https://unpkg.com/@vue/runtime-dom@${o}/dist/runtime-dom.esm-browser.js`,p=`https://unpkg.com/@vue/server-renderer@${o}/dist/server-renderer.esm-browser.js`;this.pendingCompiler=nd(()=>import(l),[]),this.compiler=await this.pendingCompiler,this.pendingCompiler=null,this.state.vueRuntimeURL=c,this.state.vueServerRendererURL=p;const g=this.getImportMap(),_=g.imports||(g.imports={});_.vue=c,_["vue/server-renderer"]=p,this.setImportMap(g),this.forceSandboxReset(),console.info(`[@vue/repl] Now using Vue version: ${o}`)}resetVueVersion(){this.vueVersion=void 0,this.compiler=G1,this.state.vueRuntimeURL=this.defaultVueRuntimeURL,this.state.vueServerRendererURL=this.defaultVueServerRendererURL;const o=this.getImportMap(),l=o.imports||(o.imports={});l.vue=this.defaultVueRuntimeURL,l["vue/server-renderer"]=this.defaultVueServerRendererURL,this.setImportMap(o),this.forceSandboxReset(),console.info("[@vue/repl] Now using default Vue version")}}function Nc(n){return n.replace("https://sfc.vuejs","https://play.vuejs")}const f0={class:"vue-repl"},h0=Gr({__name:"Repl",props:{store:{default:()=>new c0},autoResize:{type:Boolean,default:!0},showCompileOutput:{type:Boolean,default:!0},showImportMap:{type:Boolean,default:!0},clearConsole:{type:Boolean,default:!0},sfcOptions:null,layout:null,ssr:{type:Boolean,default:!1}},setup(n){const o=n,{store:l}=o,c=l.options=o.sfcOptions||{};return c.script||(c.script={}),c.script.fs={fileExists(p){return p.startsWith("/")&&(p=p.slice(1)),!!l.state.files[p]},readFile(p){return p.startsWith("/")&&(p=p.slice(1)),l.state.files[p].code}},l.init(),ko("store",l),ko("autoresize",o.autoResize),ko("import-map",X1(o,"showImportMap")),ko("clear-console",X1(o,"clearConsole")),(p,g)=>(qt(),pn("div",f0,[Wr(bd,{layout:n.layout},{left:Ja(()=>[Wr(fm)]),right:Ja(()=>[Wr(Tm,{showCompileOutput:o.showCompileOutput,ssr:!!o.ssr},null,8,["showCompileOutput","ssr"])]),_:1},8,["layout"])]))}}),g0=pi(h0,[["__scopeId","data-v-46cab3d6"]]);export{ji as File,bm as Preview,g0 as Repl,c0 as ReplStore,Va as compileFile};