livebook/static/assets/app.js
2023-10-05 16:34:57 +00:00

1371 lines
2 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{b as xre}from"./chunk-JY7ZYBHV.js";import{a as Zh}from"./chunk-BZUL2CAN.js";import{$ as gi,$a as Ie,$b as Me,$c as LP,$d as KP,$e as rO,$f as DO,$g as Ine,$h as uF,$i as kF,$j as WF,$k as ny,$l as Ns,A as ci,Aa as Zi,Ab as qi,Ac as An,Ad as Y3,Ae as zi,Af as pO,Ag as zO,Ah as ba,Ai as wl,Aj as Pi,Ak as ZF,Al as _z,B as Je,Ba as $r,Bb as of,Bc as SP,Bd as lf,Be as ki,Bf as g_,Bg as Ym,Bh as iF,Bi as dk,Bj as V_,Bk as Yne,Bl as xu,C as D3,Ca as Mm,Cb as F3,Cc as one,Cd as X3,Ce as Jt,Cf as bl,Cg as BO,Ch as yu,Ci as uk,Cj as kl,Ck,Cl as Ca,D as W9,Da as aP,Db as mP,Dc as V3,Dd as Ot,De as Vc,Df as b_,Dg as HO,Dh as ig,Di as _F,Dj as Sf,Dk as Xne,Dl as ug,E as ei,Ea as lP,Eb as z3,Ec as sne,Ed as Un,Ee as Mo,Ef as mO,Eg as Sne,Eh as Ane,Ei as yF,Ej as Wne,Ek as ty,El as sre,F as V9,Fa as cP,Fb as B3,Fc as kP,Fd as n_,Fe as hf,Ff as gO,Fg as w_,Fh as wf,Fi as wF,Fj as El,Fk as JF,Fl as yz,G as q9,Ga as P3,Gb as zc,Gc as ane,Gd as hne,Ge as gl,Gf as bO,Gg as kne,Gh as Ri,Gi as O_,Gj as q_,Gk as ez,Gl as are,H as K9,Ha as bi,Hb as gP,Hc as hl,Hd as jc,He as u_,Hf as vO,Hg as Xm,Hh as No,Hi as Dn,Hj as bk,Hk as Qne,Hl as lre,I as Bv,Ia as cu,Ib as bP,Ic as EP,Id as fne,Ie as la,If as jm,Ig as ma,Ih as nF,Ii as hk,Ij as OF,Ik as Sk,Il as wz,J as Hv,Ja as Cs,Jb as vP,Jc as Qv,Jd as Q3,Je as ui,Jf as _O,Jg as UO,Jh as va,Ji as og,Jj as K_,Jk as kk,Jl as xz,K as M3,Ka as Te,Kb as _P,Kc as Zv,Kd as mu,Ke as tO,Kf as Wm,Kg as Ls,Kh as _l,Ki as F_,Kj as vk,Kk as Ek,Kl as Cz,L as Lm,La as du,Lb as $v,Lc as Jv,Ld as r_,Le as h_,Lf as fa,Lg as Qm,Lh as $c,Li as _a,Lj as FF,Lk as Zne,Ll as Sz,M as $9,Ma as Le,Mb as yP,Mc as lne,Md as BP,Me as f_,Mf as vl,Mg as jO,Mh as Kt,Mi as z_,Mj as Vne,Mk as tz,Ml as cre,N as Bt,Na as dP,Nb as Gv,Nc as fu,Nd as o_,Ne as Mr,Nf as yO,Ng as WO,Nh as Wn,Ni as Xr,Nj as zF,Nk as iz,Nl as dre,O as Nc,Oa as ur,Ob as H3,Oc as q3,Od as pne,Oe as iO,Of as vu,Og as VO,Oh as rF,Oi as B_,Oj as _k,Ok as nz,Ol as ure,P as G9,Pa as Hn,Pb as Ni,Pc as Uc,Pd as F,Pe as jt,Pf as wO,Pg as vf,Ph as I_,Pi as wu,Pj as BF,Pk as Jne,Pl as hre,Q as Bn,Qa as uP,Qb as fe,Qc as cne,Qd as ti,Qe as nO,Qf as ek,Qg as qO,Qh as oF,Qi as xF,Qj as HF,Qk as iy,Ql as fre,R as Rc,Ra as Kv,Rb as ht,Rc as sf,Rd as cf,Re as ff,Rf as xO,Rg as ok,Rh as sF,Ri as rr,Rj as qne,Rk as rz,Rl as pre,S as Er,Sa as Ht,Sb as it,Sc as Om,Sd as s_,Se as J3,Sf as CO,Sg as _f,Sh as Dne,Si as xl,Sj as or,Sk as oz,Sl as mre,T as Y9,Ta as ln,Tb as wt,Tc as TP,Td as HP,Te as Yr,Tf as SO,Tg as fr,Th as aF,Ti as H_,Tj as yk,Tk as sz,Tl as gre,U as Pc,Ua as uu,Ub as wP,Uc as Fm,Ud as aa,Ue as ca,Uf as kO,Ug as KO,Uh as lF,Ui as CF,Uj as wa,Uk as ere,Ul as bre,V as Uv,Va as Lo,Vb as rne,Vc as IP,Vd as df,Ve as bu,Vf as EO,Vg as $O,Vh as cF,Vi as SF,Vj as sg,Vk as Tk,Vl as vre,W as Am,Wa as Ke,Wb as er,Wc as zm,Wd as UP,We as qc,Wf as TO,Wg as GO,Wh as L_,Wi as One,Wj as Ro,Wk as az,Wl as _re,X as X9,Xa as Zn,Xb as ul,Xc as dne,Xd as jP,Xe as Is,Xf as IO,Xg as Ene,Xh as dF,Xi as cn,Xj as wk,Xk as tre,Xl as yre,Y as jv,Ya as Ut,Yb as Ao,Yc as Es,Yd as WP,Ye as Hm,Yf as tk,Yg as YO,Yh as xf,Yi as Ms,Yj as UF,Yk as cg,Yl as wre,Z as Q9,Za as ai,Zb as U3,Zc as pu,Zd as VP,Ze as vt,Zf as LO,Zg as Tne,Zh as lk,Zi as ii,Zj as jF,Zk as Ik,Zl as Cu,_ as Tr,_a as Ir,_b as xP,_c as e_,_d as qP,_e as da,_f as AO,_g as XO,_h as A_,_i as ya,_j as pr,_k as lz,_l as Sa,a as b,aa as cl,ab as di,ac as ks,ad as K3,ae as gu,af as bne,ag as MO,ah as sk,ai as hF,aj as Fne,ak as $_,al as Lk,am as Rs,b as He,ba as N3,bb as Di,bc as Jo,bd as hr,be as pl,bf as oO,bg as NO,bh as yf,bi as Mne,bj as Cl,bk as Tl,bl as Ak,c as ft,ca as nne,cb as Qo,cc as Pm,cd as $3,ce as a_,cf as pf,cg as RO,ch as mt,ci as tn,cj as fk,ck as VF,cl as Dk,d as Xt,da as Wv,db as Sn,dc as oa,dd as AP,de as l_,df as vne,dg as PO,dh as jn,di as ns,dj as EF,dk as qF,dl as cz,e as Xo,ea as Z9,eb as ra,ec as es,ed as Ki,ee as $P,ef as sO,eg as OO,eh as x_,ei as D_,ej as TF,ek as KF,el as dz,f as Pv,fa as Vv,fb as Zo,fc as Si,fd as DP,fe as ml,ff as _ne,fg as pa,fh as Lne,fi as Nne,fj as pk,fk as xa,fl as uz,g as Eo,ga as J9,gb as Ss,gc as Ji,gd as MP,ge as GP,gf as mf,gg as Vm,gh as ak,gi as fF,gj as IF,gk as ag,gl as ire,h as Im,ha as eP,hb as Nm,hc as Ar,hd as t_,he as mne,hf as yne,hg as qm,hh as QO,hi as Rne,hj as U_,hk as $F,hl as hz,i as qt,ia as ef,ib as tf,ic as Bc,id as NP,ie as YP,if as aO,ig as Km,ih as ZO,ii as ck,ij as Yc,ik as G_,il as nre,j as Ov,ja as qv,jb as Fc,jc as Hc,jd as RP,je as gne,jf as wne,jg as $m,jh as JO,ji as Pne,jj as j_,jk as Y_,jl as ry,k as H9,ka as tP,kb as pt,kc as Yv,kd as PP,ke as XP,kf as lO,kg as FO,kh as As,ki as yl,kj as LF,kk as GF,kl as fz,l as kr,la as yt,lb as Jn,lc as Xv,ld as OP,le as Z3,lf as xne,lg as v_,lh as Zm,li as M_,lj as zne,lk as xk,ll as dg,m as Jh,ma as Ln,mb as _t,mc as Fi,md as mi,me as c_,mf as cO,mg as gf,mh as eF,mi as pF,mj as W_,mk as Kne,ml as pz,n as Fv,na as To,nb as Lr,nc as de,nd as FP,ne as QP,nf as Cne,ng as ik,nh as C_,ni as Cf,nj as AF,nk as kf,nl as Mk,o as ji,oa as Dm,ob as _i,oc as j3,od as une,oe as Dr,of as ua,og as Gm,oh as ga,oi as N_,oj as DF,ok as lg,ol as rre,p as A3,pa as Kr,pb as Dt,pc as sa,pd as i_,pe as ZP,pf as je,pg as Nr,ph as S_,pi as R_,pj as MF,pk as X_,pl as mz,q as ni,qa as iP,qb as Vi,qc as Gr,qd as zP,qe as uf,qf as ze,qg as __,qh as Jm,qi as mF,qj as NF,qk as Q_,ql as ore,r as le,ra as At,rb as nf,rc as We,rd as Mt,re as JP,rf as dO,rg as ir,rh as eg,ri as ng,rj as Bne,rk as Z_,rl as Ef,s as ce,sa as Io,sb as O3,sc as ee,sd as kn,se as eO,sf as Um,sg as _u,sh as k_,si as gF,sj as mk,sk as YF,sl as Nk,t as Wi,ta as nP,tb as hP,tc as W3,td as en,te as Bm,tf as uO,tg as nk,th as tF,ti as Ds,tj as Sl,tk as J_,tl as oy,u as U9,ua as R3,ub as rf,uc as CP,ud as ts,ue as Do,uf as is,ug as rk,uh as Kc,ui as rg,uj as gk,uk as XF,ul as gz,v as ke,va as rP,vb as dl,vc as Ue,vd as tr,ve as $i,vf as ha,vg as vn,vh as E_,vi as bF,vj as RF,vk as $ne,vl as bz,w as zv,wa as Oc,wb as fP,wc as lt,wd as fl,we as Wc,wf as p_,wg as Ei,wh as tg,wi as P_,wj as Hne,wk as QF,wl as Rk,x as j9,xa as Qt,xb as pP,xc as B,xd as bn,xe as d_,xf as m_,xg as bf,xh as Se,xi as vF,xj as Une,xk as Gne,xl as vz,y as gn,ya as oP,yb as hu,yc as et,yd as G3,ye as Ts,yf as hO,yg as nr,yh as Pt,yi as Gc,yj as PF,yk as Il,yl as Pk,z as ll,za as sP,zb as Rm,zc as Qe,zd as af,ze as st,zf as fO,zg as y_,zh as T_,zi as rs,zj as jne,zk as ey,zl as sy}from"./chunk-23JDWT7I.js";import{a as ue,b as xt,c as lu,d as lo,e as N,f as Qi,g as Xh,h as qr,i as Qh,j as Cn,k as B9}from"./chunk-EP6THQJ3.js";var IB=Qi((BSe,TB)=>{"use strict";var Ly=Object.prototype.hasOwnProperty,EB=Object.prototype.toString,yB=Object.defineProperty,wB=Object.getOwnPropertyDescriptor,xB=function(e){return typeof Array.isArray=="function"?Array.isArray(e):EB.call(e)==="[object Array]"},CB=function(e){if(!e||EB.call(e)!=="[object Object]")return!1;var t=Ly.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Ly.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!n)return!1;var r;for(r in e);return typeof r=="undefined"||Ly.call(e,r)},SB=function(e,t){yB&&t.name==="__proto__"?yB(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},kB=function(e,t){if(t==="__proto__")if(Ly.call(e,t)){if(wB)return wB(e,t).value}else return;return e[t]};TB.exports=function i(){var e,t,n,r,o,s,a=arguments[0],l=1,c=arguments.length,d=!1;for(typeof a=="boolean"&&(d=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(t in e)n=kB(a,t),r=kB(e,t),a!==r&&(d&&r&&(CB(r)||(o=xB(r)))?(o?(o=!1,s=n&&xB(n)?n:[]):s=n&&CB(n)?n:{},SB(a,{name:t,newValue:i(d,s,r)})):typeof r!="undefined"&&SB(a,{name:t,newValue:r}));return a}});var lq=N(()=>{});var cq=N(()=>{lq()});var Rme,Pme,_x,uT,yx,Zl,hT,fT,pT,mT,gT=N(()=>{Lo();Ts();cl();cq();lt();An();ti();He();wt();Rme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Pme=function(i,e){return function(t,n){e(t,n,i)}},_x=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},yx=new ht("selectionAnchorSet",!1),Zl=uT=class{static get(e){return e.getContribution(uT.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=yx.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Qe.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new $i().appendText(b("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ln(b("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(Qe.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Zl.ID="editor.contrib.selectionAnchorController";Zl=uT=Rme([Pme(1,it)],Zl);hT=class extends de{constructor(){super({id:"editor.action.setSelectionAnchor",label:b("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2080),weight:100}})}run(e,t){var n;return _x(this,void 0,void 0,function*(){(n=Zl.get(t))===null||n===void 0||n.setSelectionAnchor()})}},fT=class extends de{constructor(){super({id:"editor.action.goToSelectionAnchor",label:b("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:yx})}run(e,t){var n;return _x(this,void 0,void 0,function*(){(n=Zl.get(t))===null||n===void 0||n.goToSelectionAnchor()})}},pT=class extends de{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:b("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:yx,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2089),weight:100}})}run(e,t){var n;return _x(this,void 0,void 0,function*(){(n=Zl.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}},mT=class extends de{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:b("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:yx,kbOpts:{kbExpr:F.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return _x(this,void 0,void 0,function*(){(n=Zl.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}};Ue(Zl.ID,Zl,4);ee(hT);ee(fT);ee(pT);ee(mT)});var dq=N(()=>{});var uq=N(()=>{dq()});var Ome,bT,vT,_T,yT,Ha,wT=N(()=>{jt();ke();uq();lt();di();et();An();ti();qc();jn();He();Ji();ir();nr();Ome=je("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},b("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),bT=class extends de{constructor(){super({id:"editor.action.jumpToBracket",label:b("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=Ha.get(t))===null||n===void 0||n.jumpToBracket()}},vT=class extends de{constructor(){super({id:"editor.action.selectToBracket",label:b("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var r;let o=!0;n&&n.selectBrackets===!1&&(o=!1),(r=Ha.get(t))===null||r===void 0||r.selectToBracket(o)}},_T=class extends de{constructor(){super({id:"editor.action.removeBrackets",label:b("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=Ha.get(t))===null||n===void 0||n.removeBrackets(this.id)}},yT=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},Ha=class i extends ce{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new ui(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(70),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(70)&&(this._matchBrackets=this._editor.getOption(70),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{let r=n.getStartPosition(),o=e.bracketPairs.matchBracket(r),s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new Qe(s.lineNumber,s.column,s.lineNumber,s.column):new Qe(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(r=>{let o=r.getStartPosition(),s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){let c=t.bracketPairs.findNextBracket(o);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(B.compareRangesUsingStarts);let[c,d]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(o)){let u=a;a=l,l=u}}a&&l&&n.push(new Qe(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let r=n.getPosition(),o=t.bracketPairs.matchBracket(r);o||(o=t.bracketPairs.findEnclosingBrackets(r)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),n=t.getVersionId(),r=[];this._lastVersionId===n&&(r=this._lastBracketsData);let o=[],s=0;for(let u=0,h=e.length;u<h;u++){let f=e[u];f.isEmpty()&&(o[s++]=f.getStartPosition())}o.length>1&&o.sort(Ie.compare);let a=[],l=0,c=0,d=r.length;for(let u=0,h=o.length;u<h;u++){let f=o[u];for(;c<d&&r[c].position.isBefore(f);)c++;if(c<d&&r[c].position.equals(f))a[l++]=r[c];else{let m=t.bracketPairs.matchBracket(f,20),g=i._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!m&&this._matchBrackets==="always"&&(m=t.bracketPairs.findEnclosingBrackets(f,20),g=i._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new yT(f,m,g)}}this._lastBracketsData=a,this._lastVersionId=n}};Ha.ID="editor.contrib.bracketMatchingController";Ha._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=mt.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Ei(Ome),position:Yr.Center}});Ha._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=mt.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});Ue(Ha.ID,Ha,1);ee(vT);ee(bT);ee(_T);Jo.appendMenuItem(Me.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:b({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})});var wx,hq=N(()=>{et();An();wx=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let n=this._selection.startLineNumber,r=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&r===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(n)))if(this._isMovingLeft){let s=new B(n,r-1,n,r),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new B(n,o,n,o),a)}else{let s=new B(n,o,n,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new B(n,r,n,r),a)}}computeCursorState(e,t){return this._isMovingLeft?new Qe(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Qe(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}});var xx,xT,CT,ST=N(()=>{lt();ti();hq();He();xx=class extends de{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],r=t.getSelections();for(let o of r)n.push(new wx(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},xT=class extends xx{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:b("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:F.writable})}},CT=class extends xx{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:b("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:F.writable})}};ee(xT);ee(CT)});var kT,ET=N(()=>{lt();Zv();lne();et();ti();He();kT=class extends de{constructor(){super({id:"editor.action.transposeLetters",label:b("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=[],o=t.getSelections();for(let s of o){if(!s.isEmpty())continue;let a=s.startLineNumber,l=s.startColumn,c=n.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let d=l===c?s.getPosition():Jv.rightPosition(n,s.getPosition().lineNumber,s.getPosition().column),u=Jv.leftPosition(n,d),h=Jv.leftPosition(n,u),f=n.getValueInRange(B.fromPositions(h,u)),m=n.getValueInRange(B.fromPositions(u,d)),g=B.fromPositions(h,d);r.push(new hl(g,m+f))}r.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}};ee(kT)});function LT(i){return i.register(),i}function pq(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{let r=t.get(ai).getFocusedCodeEditor();if(r&&r.hasTextFocus()){let o=r.getOption(36),s=r.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>(document.execCommand(e),!0)))}var Fme,qu,zme,fq,Bme,Hme,Ume,TT,IT,AT=N(()=>{K9();Tr();JO();lt();Ir();ti();He();Ji();Zm();wt();Fme=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qu="9_cutcopypaste",zme=Pc||document.queryCommandSupported("cut"),fq=Pc||document.queryCommandSupported("copy"),Bme=typeof navigator.clipboard=="undefined"||q9?document.queryCommandSupported("paste"):!0;Hme=zme?LT(new Xv({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Pc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Me.MenubarEditMenu,group:"2_ccp",title:b({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Me.EditorContext,group:qu,title:b("actions.clipboard.cutLabel","Cut"),when:F.writable,order:1},{menuId:Me.CommandPalette,group:"",title:b("actions.clipboard.cutLabel","Cut"),order:1},{menuId:Me.SimpleEditorContext,group:qu,title:b("actions.clipboard.cutLabel","Cut"),when:F.writable,order:1}]})):void 0,Ume=fq?LT(new Xv({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Pc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Me.MenubarEditMenu,group:"2_ccp",title:b({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Me.EditorContext,group:qu,title:b("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Me.CommandPalette,group:"",title:b("actions.clipboard.copyLabel","Copy"),order:1},{menuId:Me.SimpleEditorContext,group:qu,title:b("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Jo.appendMenuItem(Me.MenubarEditMenu,{submenu:Me.MenubarCopy,title:{value:b("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});Jo.appendMenuItem(Me.EditorContext,{submenu:Me.EditorContextCopy,title:{value:b("copy as","Copy As"),original:"Copy As"},group:qu,order:3});Jo.appendMenuItem(Me.EditorContext,{submenu:Me.EditorContextShare,title:{value:b("share","Share"),original:"Share"},group:"11_share",order:-1,when:fe.and(fe.notEquals("resourceScheme","output"),F.editorTextFocus)});Jo.appendMenuItem(Me.EditorTitleContext,{submenu:Me.EditorTitleContextShare,title:{value:b("share","Share"),original:"Share"},group:"11_share",order:-1});Jo.appendMenuItem(Me.ExplorerContext,{submenu:Me.ExplorerContextShare,title:{value:b("share","Share"),original:"Share"},group:"11_share",order:-1});TT=Bme?LT(new Xv({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Pc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Me.MenubarEditMenu,group:"2_ccp",title:b({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:Me.EditorContext,group:qu,title:b("actions.clipboard.pasteLabel","Paste"),when:F.writable,order:4},{menuId:Me.CommandPalette,group:"",title:b("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:Me.SimpleEditorContext,group:qu,title:b("actions.clipboard.pasteLabel","Paste"),when:F.writable,order:4}]})):void 0,IT=class extends de{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:b("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(36)&&t.getSelection().isEmpty()||(ak.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),ak.forceCopyWithSyntaxHighlighting=!1)}};pq(Hme,"cut");pq(Ume,"copy");TT&&(TT.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(ai),n=i.get(As),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&Uv?(()=>Fme(void 0,void 0,void 0,function*(){let s=yield n.readText();if(s!==""){let a=QO.INSTANCE.get(s),l=!1,c=null,d=null;a&&(l=r.getOption(36)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,d=a.mode),r.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),TT.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0)));fq&&ee(IT)});function mq(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>bq(e,t,i.include))||!i.includeSourceActions&&rt.Source.contains(e))}function gq(i,e){let t=e.kind?new rt(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>bq(t,n,i.include))||!i.includeSourceActions&&t&&rt.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function bq(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var jme,rt,qn,Cd,Cx,Sd=N(()=>{qt();jme=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},rt=class i{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new i(this.value+i.sep+e)}};rt.sep=".";rt.None=new rt("@@none@@");rt.Empty=new rt("");rt.QuickFix=new rt("quickfix");rt.Refactor=new rt("refactor");rt.RefactorExtract=rt.Refactor.append("extract");rt.RefactorInline=rt.Refactor.append("inline");rt.RefactorMove=rt.Refactor.append("move");rt.RefactorRewrite=rt.Refactor.append("rewrite");rt.Source=new rt("source");rt.SourceOrganizeImports=rt.Source.append("organizeImports");rt.SourceFixAll=rt.Source.append("fixAll");rt.SurroundWith=rt.Refactor.append("surround");(function(i){i.Refactor="refactor",i.RefactorPreview="refactor preview",i.Lightbulb="lightbulb",i.Default="other (default)",i.SourceAction="source action",i.QuickFix="quick fix action",i.FixAll="fix all",i.OrganizeImports="organize imports",i.AutoFix="auto fix",i.QuickFixHover="quick fix hover window",i.OnSave="save participants",i.ProblemsView="problems view"})(qn||(qn={}));Cd=class i{static fromUser(e,t){return!e||typeof e!="object"?new i(t.kind,t.apply,!1):new i(i.getKindFromUser(e,t.kind),i.getApplyFromUser(e,t.apply),i.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new rt(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}},Cx=class{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return jme(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(r){Xt(r)}n&&(this.action.edit=n.edit)}return this})}}});function L0(i,e,t,n,r,o){var s;return Sx(this,void 0,void 0,function*(){let a=n.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:n.type},c=new iF(e,o),d=Wme(i,e,a),u=new le,h=d.map(m=>Sx(this,void 0,void 0,function*(){try{r.report(m);let g=yield m.provideCodeActions(e,t,l,c.token);if(g&&u.add(g),c.token.isCancellationRequested)return vq;let w=((g==null?void 0:g.actions)||[]).filter(E=>E&&gq(a,E)),_=qme(m,w,a.include);return{actions:w.map(E=>new Cx(E,m)),documentation:_}}catch(g){if(Xo(g))throw g;return Xt(g),vq}})),f=i.onDidChange(()=>{let m=i.all(e);Es(m,d)||c.cancel()});try{let m=yield Promise.all(h),g=m.map(_=>_.actions).flat(),w=[...hr(m.map(_=>_.documentation)),...Vme(i,e,n,g)];return new DT(g,w,u)}finally{f.dispose(),c.dispose()}})}function Wme(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(r=>mq(t,new rt(r))):!0)}function*Vme(i,e,t,n){var r,o,s;if(e&&n.length)for(let a of i.all(e))a._getAdditionalMenuItems&&(yield*B9((r=a._getAdditionalMenuItems)===null||r===void 0?void 0:r.call(a,{trigger:t.type,only:(s=(o=t.filter)===null||o===void 0?void 0:o.include)===null||s===void 0?void 0:s.value},n.map(l=>l.action))))}function qme(i,e,t){if(!i.documentation)return;let n=i.documentation.map(r=>({kind:new rt(r.kind),command:r.command}));if(t){let r;for(let o of n)o.kind.contains(t)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r==null?void 0:r.command}for(let r of e)if(r.kind){for(let o of n)if(o.kind.contains(new rt(r.kind)))return o.command}}function _q(i,e,t,n,r=st.None){var o;return Sx(this,void 0,void 0,function*(){let s=i.get(Kc),a=i.get(_i),l=i.get(Ar),c=i.get(Ri);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(r),!r.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==E0.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(d){let u=Kme(d);c.error(typeof u=="string"?u:b("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Kme(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}var Sx,kx,tp,Ex,Tx,Ix,T0,I0,DT,vq,E0,Ku=N(()=>{mi();ki();qt();ke();Ln();tg();et();An();Pt();Qo();yu();He();Vi();No();$c();Bc();Sd();Sx=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},kx="editor.action.codeAction",tp="editor.action.quickFix",Ex="editor.action.autoFix",Tx="editor.action.refactor",Ix="editor.action.sourceAction",T0="editor.action.organizeImports",I0="editor.action.fixAll",DT=class i extends ce{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Ki(e.diagnostics)?Ki(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:Ki(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&rt.QuickFix.contains(new rt(e.kind))&&!!e.isPreferred)}},vq={actions:[],documentation:void 0};(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions"})(E0||(E0={}));Dt.registerCommand("_executeCodeActionProvider",function(i,e,t,n,r){return Sx(this,void 0,void 0,function*(){if(!(e instanceof yt))throw Eo();let{codeActionProvider:o}=i.get(Se),s=i.get(Di).getModel(e);if(!s)throw Eo();let a=Qe.isISelection(t)?Qe.liftSelection(t):B.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Eo();let l=typeof n=="string"?new rt(n):void 0,c=yield L0(o,s,a,{type:1,triggerAction:qn.Default,filter:{includeSourceActions:!0,include:l}},va.None,st.None),d=[],u=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let h=0;h<u;h++)d.push(c.validActions[h].resolve(st.None));try{return yield Promise.all(d),c.validActions.map(h=>h.action)}finally{setTimeout(()=>c.dispose(),100)}})})});var $me,Gme,MT,A0,yq=N(()=>{O3();Ku();Sd();Wn();$me=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Gme=function(i,e){return function(t,n){e(t,n,i)}},A0=MT=class{constructor(e){this.keybindingService=e}getResolver(){let e=new nf(()=>this.keybindingService.getKeybindings().filter(t=>MT.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===T0?n={kind:rt.SourceOrganizeImports.value}:t.command===I0&&(n={kind:rt.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Cd.fromUser(n,{kind:rt.None,apply:"never"}))}));return t=>{if(t.kind){let n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let n=new rt(e.kind);return t.filter(r=>r.kind.contains(n)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}};A0.codeActionCommands=[Tx,kx,Ix,T0,I0];A0=MT=$me([Gme(0,Kt)],A0)});var wq=N(()=>{});var xq=N(()=>{wq()});var Cq=N(()=>{});var Sq=N(()=>{Cq()});var D0=N(()=>{xq();Sq()});var kq=N(()=>{});var Eq=N(()=>{kq()});var XPe,QPe,ZPe,JPe,eOe,tOe,iOe,nOe,rOe,oOe,sOe,aOe,lOe,cOe,dOe,uOe,hOe,fOe,pOe,mOe,gOe,bOe,vOe,_Oe,yOe,wOe,xOe,COe,SOe,kOe,EOe,TOe,IOe,Lx=N(()=>{Eq();He();ir();XPe=je("symbolIcon.arrayForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),QPe=je("symbolIcon.booleanForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ZPe=je("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},b("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),JPe=je("symbolIcon.colorForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),eOe=je("symbolIcon.constantForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),tOe=je("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},b("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),iOe=je("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},b("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),nOe=je("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),rOe=je("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},b("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),oOe=je("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),sOe=je("symbolIcon.fileForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),aOe=je("symbolIcon.folderForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),lOe=je("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},b("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),cOe=je("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),dOe=je("symbolIcon.keyForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),uOe=je("symbolIcon.keywordForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),hOe=je("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},b("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fOe=je("symbolIcon.moduleForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),pOe=je("symbolIcon.namespaceForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),mOe=je("symbolIcon.nullForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),gOe=je("symbolIcon.numberForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),bOe=je("symbolIcon.objectForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),vOe=je("symbolIcon.operatorForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_Oe=je("symbolIcon.packageForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yOe=je("symbolIcon.propertyForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),wOe=je("symbolIcon.referenceForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xOe=je("symbolIcon.snippetForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),COe=je("symbolIcon.stringForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),SOe=je("symbolIcon.structForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kOe=je("symbolIcon.textForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),EOe=je("symbolIcon.typeParameterForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),TOe=je("symbolIcon.unitForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),IOe=je("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))});function Iq(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:Tq,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));let n=Yme.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new rt(o.action.kind):rt.None;for(let a of n)if(a.group.kind.contains(s)){a.actions.push(o);break}}let r=[];for(let o of n)if(o.actions.length){r.push({kind:"header",group:o.group});for(let s of o.actions)r.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return r}var Tq,Yme,Lq=N(()=>{D0();Jn();Sd();Lx();He();Tq=Object.freeze({kind:rt.Empty,title:b("codeAction.widget.id.more","More Actions...")}),Yme=Object.freeze([{kind:rt.QuickFix,title:b("codeAction.widget.id.quickfix","Quick Fix")},{kind:rt.RefactorExtract,title:b("codeAction.widget.id.extract","Extract"),icon:pt.wrench},{kind:rt.RefactorInline,title:b("codeAction.widget.id.inline","Inline"),icon:pt.wrench},{kind:rt.RefactorRewrite,title:b("codeAction.widget.id.convert","Rewrite"),icon:pt.wrench},{kind:rt.RefactorMove,title:b("codeAction.widget.id.move","Move"),icon:pt.wrench},{kind:rt.SurroundWith,title:b("codeAction.widget.id.surround","Surround With"),icon:pt.symbolSnippet},{kind:rt.Source,title:b("codeAction.widget.id.source","Source Action"),icon:pt.symbolFile},Tq])});var Aq=N(()=>{});var Dq=N(()=>{Aq()});var Xme,Qme,NT,ip,Jl,RT=N(()=>{Ht();oF();Jn();ei();ke();Lr();Dq();BO();Ku();He();Wn();Xme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Qme=function(i,e){return function(t,n){e(t,n,i)}};(function(i){i.Hidden={type:0};class e{constructor(n,r,o,s){this.actions=n,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}i.Showing=e})(ip||(ip={}));Jl=NT=class extends ce{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new Je),this.onClick=this._onClick.event,this._state=ip.Hidden,this._domNode=Le("div.lightBulbWidget"),this._register(I_.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{let r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),this._register(nP(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();let{top:r,height:o}=Zi(this._domNode),s=this._editor.getOption(65),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(a+=s),this._onClick.fire({x:n.posx,y:r+o+a,actions:this.state.actions,trigger:this.state.trigger})})),this._register(At(this._domNode,"mouseenter",n=>{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(63)&&!this._editor.getOption(63).enabled&&this.hide()})),this._register(ci.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,r,o,s;this._preferredKbLabel=(r=(n=t.lookupKeybinding(Ex))===null||n===void 0?void 0:n.getLabel())!==null&&r!==void 0?r:void 0,this._quickFixKbLabel=(s=(o=t.lookupKeybinding(tp))===null||o===void 0?void 0:o.getLabel())!==null&&s!==void 0?s:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();let r=this._editor.getOptions();if(!r.get(63).enabled)return this.hide();let o=this._editor.getModel();if(!o)return this.hide();let{lineNumber:s,column:a}=o.validatePosition(n),l=o.getOptions().tabSize,c=r.get(49),d=o.getLineContent(s),u=Ym(d,l),h=c.spaceWidth*u>22,f=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1),m=s;if(!h){if(s>1&&!f(s-1))m-=1;else if(!f(s+1))m+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new ip.Showing(e,t,n,{position:{lineNumber:m,column:1},preference:NT._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==ip.Hidden&&(this.state=ip.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(..._t.asClassNameArray(pt.lightBulb)),this._domNode.classList.add(..._t.asClassNameArray(pt.lightbulbAutofix)),this._preferredKbLabel)){this.title=b("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(..._t.asClassNameArray(pt.lightbulbAutofix)),this._domNode.classList.add(..._t.asClassNameArray(pt.lightBulb)),this._quickFixKbLabel?this.title=b("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=b("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};Jl.ID="editor.contrib.lightbulbWidget";Jl._posPref=[0];Jl=NT=Xme([Qme(1,Kt)],Jl)});var Mq=N(()=>{});var Nq=N(()=>{Mq()});var Rq=N(()=>{});var Pq=N(()=>{Rq()});function OT(i,e,t){return Fq(this,void 0,void 0,function*(){try{return yield i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Jme(t)})}catch(n){return ft(n),!1}})}function Jme(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var Zme,Oq,Fq,PT,io,kd=N(()=>{dF();lk();qt();ei();ke();Pq();uF();ts();X3();Mne();ns();Zme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Oq=function(i,e){return function(t,n){e(t,n,i)}},Fq=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},io=PT=class{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new Je,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let r=new le,o=r.add(L_(e,Object.assign(Object.assign({},this._getRenderOptions(e,r)),t),n));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>r.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,r)=>Fq(this,void 0,void 0,function*(){var o,s,a;let l;n?l=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(l=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),l||(l=lf);let c=yield hF(this._languageService,r,l),d=document.createElement("span");if(d.innerHTML=(a=(s=PT._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(c))!==null&&a!==void 0?a:c,this._options.editor){let u=this._options.editor.getOption(49);A_(d,u)}else this._options.codeBlockFontFamily&&(d.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(d.style.fontSize=this._options.codeBlockFontSize),d}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>OT(this._openerService,n,e.isTrusted),disposables:t}}}};io._ttpTokenizer=xf("tokenizeToString",{createHTML(i){return i}});io=PT=Zme([Oq(1,en),Oq(2,tn)],io)});var ege,zq,Ax,Kn,tge,Dx,M0=N(()=>{dF();Lo();ei();Ts();ke();Nq();lt();et();kd();He();wt();ns();Ht();ege=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zq=function(i,e){return function(t,n){e(t,n,i)}},Kn=Ax=class{static get(e){return e.getContribution(Ax.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new Wi,this._messageListeners=new le,this._mouseOverMessage=!1,this._editor=e,this._visible=Ax.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){ln(d_(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=d_(e)?L_(e,{actionHandler:{callback:r=>OT(this._openerService,r,d_(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new Dx(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(ci.debounce(this._editor.onDidBlurEditorText,(r,o)=>o,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&aP(document.activeElement,this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(At(this._messageWidget.value.getDomNode(),bi.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(At(this._messageWidget.value.getDomNode(),bi.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(r=>{r.target.position&&(n?n.containsPosition(r.target.position)||this.closeMessage():n=new B(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Dx.fadeOut(this._messageWidget.value))}};Kn.ID="editor.contrib.messageController";Kn.MESSAGE_VISIBLE=new ht("messageVisible",!1,b("messageVisible","Whether the editor is currently showing an inline message"));Kn=Ax=ege([zq(1,it),zq(2,tn)],Kn);tge=Fi.bindToContribution(Kn.get);We(new tge({id:"leaveEditorMessage",precondition:Kn.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));Dx=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";let o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);let s=document.createElement("div");typeof r=="string"?(s.classList.add("message"),s.textContent=r):(r.classList.add("message"),s.appendChild(r)),this._domNode.appendChild(s);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Ue(Kn.ID,Kn,4)});var Bq=N(()=>{});var FT=N(()=>{Bq()});function ige(i){if(i.kind==="action")return i.label}function Uq(i){return i.replace(/\r\n|\r|\n/g," ")}var Hq,zT,jT,WT,BT,HT,UT,Mx,Nx,jq=N(()=>{Ht();vF();mF();Jn();ke();Tr();Lr();FT();He();wl();Wn();O_();ir();Hq=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zT=function(i,e){return function(t,n){e(t,n,i)}},jT="acceptSelectedCodeAction",WT="previewSelectedCodeAction",BT=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var r,o;n.text.textContent=(o=(r=e.group)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}},HT=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let n=document.createElement("span");n.className="title",e.append(n);let r=new P_(e,jv);return{container:e,icon:t,text:n,keybinding:r}}renderElement(e,t,n){var r,o,s;if(!((r=e.group)===null||r===void 0)&&r.icon?(n.icon.className=_t.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=ua(e.group.icon.color.id))):(n.icon.className=_t.asClassName(pt.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=Uq(e.label),n.keybinding.set(e.keybinding),dP(!!e.keybinding,n.keybinding.element);let a=(o=this._keybindingService.lookupKeybinding(jT))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(WT))===null||s===void 0?void 0:s.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:a&&l?this._supportsPreview?n.container.title=b({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):n.container.title=b({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):n.container.title=""}disposeTemplate(e){}};HT=Hq([zT(1,Kt)],HT);UT=class extends UIEvent{constructor(){super("acceptSelectedAction")}},Mx=class extends UIEvent{constructor(){super("previewSelectedAction")}};Nx=class extends ce{constructor(e,t,n,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");let a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new R_(e,this.domNode,a,[new HT(t,this._keybindingService),new BT],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:ige},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?Uq(l==null?void 0:l.label):"";return l.disabled&&(c=b({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>b({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(yF),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){let t=this._allMenuItems.filter(c=>c.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(r);let o=this._allMenuItems.map((c,d)=>{let u=document.getElementById(this._list.getElementID(d));if(u){u.style.width="auto";let h=u.getBoundingClientRect().width;return u.style.width="",h}return 0}),s=Math.max(...o,e),a=.7,l=Math.min(r,document.body.clientHeight*a);return this._list.layout(l,s),this.domNode.style.height=`${l}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){let t=this._list.getFocus();if(t.length===0)return;let n=t[0],r=this._list.element(n);if(!this.focusCondition(r))return;let o=e?new Mx:new UT;this._list.setSelection([n],o)}onListSelection(e){if(!e.elements.length)return;let t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Mx):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};Nx=Hq([zT(4,Gc),zT(5,Kt)],Nx)});var nge,VT,$u,Ed,Gu,N0,Wq=N(()=>{Ht();rg();ke();FT();He();jq();Ji();wt();wl();fl();Ut();ir();nge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},VT=function(i,e){return function(t,n){e(t,n,i)}};je("actionBar.toggledBackground",{dark:bl,light:bl,hcDark:bl,hcLight:bl},b("actionBar.toggledBackground","Background color for toggled action items in action bar."));$u={Visible:new ht("codeActionMenuVisible",!1,b("codeActionMenuVisible","Whether the action widget list is visible"))},Ed=Zn("actionWidgetService"),Gu=class extends ce{get isVisible(){return $u.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Wi)}show(e,t,n,r,o,s,a){let l=$u.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(Nx,e,t,n,r);this._contextViewService.showContextView({getAnchor:()=>o,render:d=>(l.set(!0),this._renderWidget(d,c,a!=null?a:[])),onHide:d=>{l.reset(),this._onWidgetClosed(d)}},s,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var r;let o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");let s=new le,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(At(l,bi.MOUSE_DOWN,m=>m.stopPropagation()));let c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(At(d,bi.POINTER_MOVE,()=>d.remove())),s.add(At(d,bi.MOUSE_DOWN,()=>d.remove()));let u=0;if(n.length){let m=this._createActionBar(".action-widget-action-bar",n);m&&(o.appendChild(m.getContainer().parentElement),s.add(m),u=m.getContainer().offsetWidth)}let h=(r=this._list.value)===null||r===void 0?void 0:r.layout(u);o.style.width=`${h}px`;let f=s.add(Cs(e));return s.add(f.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;let n=Le(e),r=new Ds(n);return r.push(t,{icon:!1,label:!0}),r}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};Gu=nge([VT(0,Gc),VT(1,it),VT(2,Ke)],Gu);tr(Ed,Gu,1);N0=100+1e3;Si(class extends es{constructor(){super({id:"hideCodeActionWidget",title:{value:b("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:$u.Visible,keybinding:{weight:N0,primary:9,secondary:[1033]}})}run(i){i.get(Ed).hide()}});Si(class extends es{constructor(){super({id:"selectPrevCodeAction",title:{value:b("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:$u.Visible,keybinding:{weight:N0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(Ed);e instanceof Gu&&e.focusPrevious()}});Si(class extends es{constructor(){super({id:"selectNextCodeAction",title:{value:b("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:$u.Visible,keybinding:{weight:N0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(Ed);e instanceof Gu&&e.focusNext()}});Si(class extends es{constructor(){super({id:jT,title:{value:b("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:$u.Visible,keybinding:{weight:N0,primary:3,secondary:[2137]}})}run(i){let e=i.get(Ed);e instanceof Gu&&e.acceptSelected()}});Si(class extends es{constructor(){super({id:WT,title:{value:b("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:$u.Visible,keybinding:{weight:N0,primary:2051}})}run(i){let e=i.get(Ed);e instanceof Gu&&e.acceptSelected(!0)}})});var KT,qT,Yu,rge,Rx,$T=N(()=>{jt();qt();ei();ke();Do();wt();$c();Sd();Ku();KT=new ht("supportedCodeAction",""),qT=class extends ce{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new la),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){let t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){let t=this._editor.getModel();t&&e.some(n=>c_(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:qn.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){let{lineNumber:r,column:o}=n.getPosition(),s=t.getLineContent(r);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(r)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return n}};(function(i){i.Empty={type:0};class e{constructor(n,r,o){this.trigger=n,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(Xo(s))return rge;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(Yu||(Yu={}));rge=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1}),Rx=class extends ce{constructor(e,t,n,r,o){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=o,this._codeActionOracle=this._register(new Wi),this._state=Yu.Empty,this._onDidChangeState=this._register(new Je),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=KT.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(Yu.Empty,!0))}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Yu.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(89)){let t=this._registry.all(e).flatMap(n=>{var r;return(r=n.providedCodeActionKinds)!==null&&r!==void 0?r:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new qT(this._editor,this._markerService,n=>{var r;if(!n){this.setState(Yu.Empty);return}let o=Jt(s=>L0(this._registry,e,n.selection,n.trigger,va.None,s));n.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(o,250)),this.setState(new Yu.Triggered(n.trigger,n.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:qn.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}});var oge,ec,Px,GT,Ua,Ox=N(()=>{Ht();qt();O3();ke();di();Pt();Ku();yq();Lq();RT();M0();He();Wq();Vi();kn();wt();Ut();F_();$c();Sd();$T();oge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ec=function(i,e){return function(t,n){e(t,n,i)}},Px=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ua=GT=class extends ce{static get(e){return e.getContribution(GT.ID)}constructor(e,t,n,r,o,s,a,l,c,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=d,this._activeCodeActions=this._register(new Wi),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new Rx(this._editor,o.codeActionProvider,t,n,s)),this._register(this._model.onDidChangeState(u=>this.update(u))),this._lightBulbWidget=new nf(()=>{let u=this._editor.getContribution(Jl.ID);return u&&this._register(u.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),u}),this._resolver=r.createInstance(A0),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,r){var o;if(!this._editor.hasModel())return;(o=Kn.get(this._editor))===null||o===void 0||o.closeMessage();let s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:r,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return Px(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(_q,e,E0.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:qn.QuickFix,filter:{}})}})}update(e){var t,n,r,o,s,a,l;return Px(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let c;try{c=yield e.actions}catch(d){ft(d);return}if(!this._disposed)if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(c,e.trigger,e.position),e.trigger.type===1){if(!((r=e.trigger.filter)===null||r===void 0)&&r.include){let u=this.tryGetValidActionToApply(e.trigger,c);if(u){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this._applyCodeAction(u,!1,!1)}finally{c.dispose()}return}if(e.trigger.context){let h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,c);if(h&&h.action.disabled){(s=Kn.get(this._editor))===null||s===void 0||s.showMessage(h.action.disabled,e.trigger.context.position),c.dispose();return}}}let d=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!c.allActions.length||!d&&!c.validActions.length)){(l=Kn.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=c,c.dispose();return}this._activeCodeActions.value=c,this.showCodeActionList(c,this.toCoords(e.position),{includeDisabledActions:d,fromLightbulb:!1})}else this._actionWidgetService.isVisible?c.dispose():this._activeCodeActions.value=c})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return Px(this,void 0,void 0,function*(){let r=this._editor.getDomNode();if(!r)return;let o=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;let s=Ie.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,c)=>Px(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus()}};this._actionWidgetService.show("codeActionWidget",!0,Iq(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),n=Zi(this._editor.getDomNode()),r=n.left+t.left,o=n.top+t.top+t.height;return{x:r,y:o}}_shouldShowHeaders(){var e;let t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];let r=e.documentation.map(o=>{var s;return{id:o.id,label:o.title,tooltip:(s=o.tooltip)!==null&&s!==void 0?s:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(o.id,...(a=o.arguments)!==null&&a!==void 0?a:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:b("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:b("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),r}};Ua.ID="editor.contrib.codeActionController";Ua=GT=oge([ec(1,og),ec(2,it),ec(3,Ke),ec(4,Se),ec(5,_l),ec(6,_i),ec(7,Mt),ec(8,Ed),ec(9,Ke)],Ua)});function R0(i){return fe.regex(KT.keys()[0],new RegExp("(\\s|^)"+dl(i.value)+"\\b"))}function Xu(i,e,t,n,r=qn.Default){if(i.hasModel()){let o=Ua.get(i);o==null||o.manualTriggerAtCurrentPosition(e,r,t,n)}}var YT,Fx,zx,Bx,Hx,Ux,jx,Wx,Vq=N(()=>{Ni();lt();ti();Ku();He();wt();Sd();Ox();$T();YT={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:b("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:b("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[b("args.schema.apply.first","Always apply the first returned code action."),b("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),b("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:b("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};Fx=class extends de{constructor(){super({id:tp,label:b("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:fe.and(F.writable,F.hasCodeActionsProvider),kbOpts:{kbExpr:F.textInputFocus,primary:2137,weight:100}})}run(e,t){return Xu(t,b("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,qn.QuickFix)}},zx=class extends Fi{constructor(){super({id:kx,precondition:fe.and(F.writable,F.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:YT}]}})}runEditorCommand(e,t,n){let r=Cd.fromUser(n,{kind:rt.Empty,apply:"ifSingle"});return Xu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?b("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):b("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?b("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):b("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}},Bx=class extends de{constructor(){super({id:Tx,label:b("refactor.label","Refactor..."),alias:"Refactor...",precondition:fe.and(F.writable,F.hasCodeActionsProvider),kbOpts:{kbExpr:F.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:fe.and(F.writable,R0(rt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:YT}]}})}run(e,t,n){let r=Cd.fromUser(n,{kind:rt.Refactor,apply:"never"});return Xu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?b("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):b("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?b("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):b("editor.action.refactor.noneMessage","No refactorings available"),{include:rt.Refactor.contains(r.kind)?r.kind:rt.None,onlyIncludePreferredActions:r.preferred},r.apply,qn.Refactor)}},Hx=class extends de{constructor(){super({id:Ix,label:b("source.label","Source Action..."),alias:"Source Action...",precondition:fe.and(F.writable,F.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:fe.and(F.writable,R0(rt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:YT}]}})}run(e,t,n){let r=Cd.fromUser(n,{kind:rt.Source,apply:"never"});return Xu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?b("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):b("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?b("editor.action.source.noneMessage.preferred","No preferred source actions available"):b("editor.action.source.noneMessage","No source actions available"),{include:rt.Source.contains(r.kind)?r.kind:rt.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,qn.SourceAction)}},Ux=class extends de{constructor(){super({id:T0,label:b("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:fe.and(F.writable,R0(rt.SourceOrganizeImports)),kbOpts:{kbExpr:F.textInputFocus,primary:1581,weight:100}})}run(e,t){return Xu(t,b("editor.action.organize.noneMessage","No organize imports action available"),{include:rt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",qn.OrganizeImports)}},jx=class extends de{constructor(){super({id:I0,label:b("fixAll.label","Fix All"),alias:"Fix All",precondition:fe.and(F.writable,R0(rt.SourceFixAll))})}run(e,t){return Xu(t,b("fixAll.noneMessage","No fix all action available"),{include:rt.SourceFixAll,includeSourceActions:!0},"ifSingle",qn.FixAll)}},Wx=class extends de{constructor(){super({id:Ex,label:b("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:fe.and(F.writable,R0(rt.QuickFix)),kbOpts:{kbExpr:F.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Xu(t,b("editor.action.autoFix.noneMessage","No auto fixes available"),{include:rt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",qn.AutoFix)}}});var XT=N(()=>{lt();tF();Vq();Ox();RT();He();Y3();ul();Ue(Ua.ID,Ua,3);Ue(Jl.ID,Jl,4);ee(Fx);ee(Bx);ee(Hx);ee(Ux);ee(Wx);ee(jx);We(new zx);er.as(af.Configuration).registerConfiguration(Object.assign(Object.assign({},k_),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:b("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}))});function QT(i,e,t){return qq(this,void 0,void 0,function*(){let n=i.ordered(e),r=new Map,o=new np,s=n.map((a,l)=>qq(this,void 0,void 0,function*(){r.set(a,l);try{let c=yield Promise.resolve(a.provideCodeLenses(e,t));c&&o.add(c,a)}catch(c){Xt(c)}}));return yield Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:a.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:r.get(a.provider)<r.get(l.provider)?-1:r.get(a.provider)>r.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),o})}var qq,np,ZT=N(()=>{ki();qt();ke();Bn();Ln();Qo();Vi();Pt();qq=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},np=class{constructor(){this.lenses=[],this._disposables=new le}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(let n of e.lenses)this.lenses.push({symbol:n,provider:t})}};Dt.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,n]=e;Bt(yt.isUri(t)),Bt(typeof n=="number"||!n);let{codeLensProvider:r}=i.get(Se),o=i.get(Di).getModel(t);if(!o)throw Eo();let s=[],a=new le;return QT(r,o,st.None).then(l=>{a.add(l);let c=[];for(let d of l.lenses)n==null||d.symbol.command?s.push(d.symbol):n-- >0&&d.provider.resolveCodeLens&&c.push(Promise.resolve(d.provider.resolveCodeLens(o,d.symbol,st.None)).then(u=>s.push(u||d.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})})});var sge,age,eI,Vx,JT,Kq=N(()=>{jt();H9();df();et();ZT();fl();Ut();wu();sge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},age=function(i,e){return function(t,n){e(t,n,i)}},eI=Zn("ICodeLensCache"),Vx=class{constructor(e,t){this.lineCount=e,this.data=t}},JT=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new aa(20,.75);let t="codelens/cache";tO(()=>e.remove(t,1));let n="codelens/cache2",r=e.get(n,1,"{}");this._deserialize(r),Ov(e.onWillSaveState)(o=>{o.reason===B_.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){let n=t.lenses.map(s=>{var a;return{range:s.symbol.range,command:s.symbol.command&&{id:"",title:(a=s.symbol.command)===null||a===void 0?void 0:a.title}}}),r=new np;r.add({lenses:n,dispose:()=>{}},this._fakeProvider);let o=new Vx(e.getLineCount(),r);this._cache.set(e.uri.toString(),o)}get(e){let t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){let e=Object.create(null);for(let[t,n]of this._cache){let r=new Set;for(let o of n.data.lenses)r.add(o.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{let t=JSON.parse(e);for(let n in t){let r=t[n],o=[];for(let a of r.lines)o.push({range:new B(a,1,a,11)});let s=new np;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(n,new Vx(r.lineCount,s))}}catch(t){}}};JT=sge([age(0,Xr)],JT);tr(eI,JT,1)});var $q=N(()=>{});var Gq=N(()=>{$q()});var tI,qx,rp,Yq,P0,Xq=N(()=>{Ht();Dne();Gq();et();jn();tI=class{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}},qx=class i{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${i._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();let n=[],r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(s&&(r=!0,s.command)){let a=sF(s.command.title.trim());s.command.id?(n.push(Le("a",{id:String(o),title:s.command.tooltip,role:"button"},...a)),this._commands.set(String(o),s.command)):n.push(Le("span",{title:s.command.tooltip},...a)),o+1<e.length&&n.push(Le("span",void 0,"\xA0|\xA0"))}}r?(du(this._domNode,...n),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):du(this._domNode,Le("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){let t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}};qx._idPool=0;rp=class{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){let t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let n=0,r=t.length;n<r;n++)this._addDecorationsCallbacks[n](t[n])}},Yq=mt.register({collapseOnReplaceEdit:!0,description:"codelens"}),P0=class{constructor(e,t,n,r,o,s){this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];let a,l=[];this._data.forEach((c,d)=>{c.symbol.command&&l.push(c.symbol),n.addDecoration({range:c.symbol.range,options:Yq},u=>this._decorationIds[d]=u),a?a=B.plusRange(a,c.symbol.range):a=B.lift(c.symbol.range)}),this._viewZone=new tI(a.startLineNumber-1,o,s),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new qx(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{let n=this._editor.getModel().getDecorationRange(e),r=this._data[t].symbol;return!!(n&&B.isEmpty(r.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,r)=>{t.addDecoration({range:n.symbol.range,options:Yq},o=>this._decorationIds[r]=o)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){let n=e.getDecorationRange(this._decorationIds[t]);n&&(this._data[t].symbol.range=n)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){let n=e[t];if(n){let{symbol:r}=this._data[t];r.command=n.command||r.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?void 0:t.getCommand(e)}getLineNumber(){let e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){let t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}});var lge,O0,cge,op,iI=N(()=>{jt();qt();ke();z_();lt();eg();ti();ZT();Kq();Xq();He();Vi();No();xl();Ms();Pt();lge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O0=function(i,e){return function(t,n){e(t,n,i)}},cge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},op=class{constructor(e,t,n,r,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=r,this._notificationService=o,this._codeLensCache=s,this._disposables=new le,this._localToDispose=new le,this._lenses=[],this._oldCodeLensModels=new le,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new ui(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(49)||a.hasChanged(18)||a.hasChanged(17))&&this._updateLensStyle(),a.hasChanged(16)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){let e=Math.max(1.3,this._editor.getOption(65)/this._editor.getOption(51)),t=this._editor.getOption(18);return(!t||t<5)&&(t=this._editor.getOption(51)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){let{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(17),r=this._editor.getOption(49),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",r.fontFeatureSettings),n&&(o.setProperty("--vscode-editorCodeLens-fontFamily",n),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",S_.fontFamily)),this._editor.changeViewZones(s=>{for(let a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();let e=this._editor.getModel();if(!e||!this._editor.getOption(16))return;let t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(gl(()=>{let r=this._codeLensCache.get(e);t===r&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(let r of this._languageFeaturesService.codeLensProvider.all(e))if(typeof r.onDidChange=="function"){let o=r.onDidChange(()=>n.schedule());this._localToDispose.add(o)}let n=new ui(()=>{var r;let o=Date.now();(r=this._getCodeLensModelPromise)===null||r===void 0||r.cancel(),this._getCodeLensModelPromise=Jt(s=>QT(this._languageFeaturesService.codeLensProvider,e,s)),this._getCodeLensModelPromise.then(s=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=s,this._codeLensCache.put(e,s);let a=this._provideCodeLensDebounce.update(e,Date.now()-o);n.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},ft)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(ni(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var r;this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{let a=[],l=-1;this._lenses.forEach(d=>{!d.isValid()||l===d.getLineNumber()?a.push(d):(d.update(s),l=d.getLineNumber())});let c=new rp;a.forEach(d=>{d.dispose(c,s),this._lenses.splice(this._lenses.indexOf(d),1)}),c.commit(o)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(r=this._resolveCodeLensesPromise)===null||r===void 0||r.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(r=>{r.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(ni(()=>{if(this._editor.getModel()){let r=_a.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),r.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(r=>{if(r.target.type!==9)return;let o=r.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(let s of this._lenses){let a=s.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),n.schedule()}_disposeAllLenses(e,t){let n=new rp;for(let r of this._lenses)r.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),n=[],r;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(r&&r[r.length-1].symbol.range.startLineNumber===l?r.push(a):(r=[a],n.push(r)))}if(!n.length&&!this._lenses.length)return;let o=_a.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{let c=new rp,d=0,u=0;for(;u<n.length&&d<this._lenses.length;){let h=n[u][0].symbol.range.startLineNumber,f=this._lenses[d].getLineNumber();f<h?(this._lenses[d].dispose(c,l),this._lenses.splice(d,1)):f===h?(this._lenses[d].updateCodeLensSymbols(n[u],c),u++,d++):(this._lenses.splice(d,0,new P0(n[u],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),d++,u++)}for(;d<this._lenses.length;)this._lenses[d].dispose(c,l),this._lenses.splice(d,1);for(;u<n.length;)this._lenses.push(new P0(n[u],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),u++;c.commit(a)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;let t=this._editor.getModel();if(!t)return;let n=[],r=[];if(this._lenses.forEach(a=>{let l=a.computeIfNecessary(t);l&&(n.push(l),r.push(a))}),n.length===0)return;let o=Date.now(),s=Jt(a=>{let l=n.map((c,d)=>{let u=new Array(c.length),h=c.map((f,m)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(g=>{u[m]=g},Xt):(u[m]=f.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!r[d].isDisposed()&&r[d].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then(()=>{let a=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{ft(a),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};op.ID="css.editor.codeLens";op=lge([O0(1,Se),O0(2,cn),O0(3,_i),O0(4,Ri),O0(5,eI)],op);Ue(op.ID,op,1);ee(class extends de{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:F.hasCodeLensProvider,label:b("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return cge(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(rr),r=e.get(_i),o=e.get(Ri),s=t.getSelection().positionLineNumber,a=t.getContribution(op.ID);if(!a)return;let l=a.getModel();if(!l)return;let c=[];for(let u of l.lenses)u.symbol.command&&u.symbol.range.startLineNumber===s&&c.push({label:u.symbol.command.title,command:u.symbol.command});if(c.length===0)return;let d=yield n.pick(c,{canPickMany:!1});if(d){if(l.isDisposed)return yield r.executeCommand(this.id);try{yield r.executeCommand(d.command.id,...d.command.arguments||[])}catch(u){o.error(u)}}})}})});var tc,nI=N(()=>{ya();di();et();An();tc=class i{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;let r=t.length,o=e.length;if(n+r>o)return!1;for(let s=0;s<r;s++){let a=e.charCodeAt(n+s),l=t.charCodeAt(s);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,r,o,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,u=o.getLineContent(a),h=o.getLineContent(c),f=u.lastIndexOf(t,l-1+t.length),m=h.indexOf(n,d-1-n.length);if(f!==-1&&m!==-1)if(a===c)u.substring(f+t.length,m).indexOf(n)>=0&&(f=-1,m=-1);else{let w=u.substring(f+t.length),_=h.substring(0,m);(w.indexOf(n)>=0||_.indexOf(n)>=0)&&(f=-1,m=-1)}let g;f!==-1&&m!==-1?(r&&f+t.length<u.length&&u.charCodeAt(f+t.length)===32&&(t=t+" "),r&&m>0&&h.charCodeAt(m-1)===32&&(n=" "+n,m-=1),g=i._createRemoveBlockCommentOperations(new B(a,f+t.length+1,c,m+1),t,n)):(g=i._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(let w of g)s.addTrackedEditOperation(w.range,w.text)}static _createRemoveBlockCommentOperations(e,t,n){let r=[];return B.isEmpty(e)?r.push(ii.delete(new B(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(ii.delete(new B(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(ii.delete(new B(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}static _createAddBlockCommentOperations(e,t,n,r){let o=[];return B.isEmpty(e)?o.push(ii.replace(new B(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(o.push(ii.insert(new Ie(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(ii.insert(new Ie(e.endLineNumber,e.endColumn),(r?" ":"")+n))),o}getEditOperations(e,t){let n=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);let o=e.getLanguageIdAtPosition(n,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){let n=t.getInverseEditOperations();if(n.length===2){let r=n[0],o=n[1];return new Qe(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{let r=n[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new Qe(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}}});var Kx,Qq=N(()=>{Ni();ya();di();et();An();nI();Kx=class i{constructor(e,t,n,r,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,r){e.tokenization.tokenizeIfCheap(t);let o=e.getLanguageIdAtPosition(t,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,d=n-t+1;c<d;c++)l[c]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return l}static _analyzeLines(e,t,n,r,o,s,a,l){let c=!0,d;e===0?d=!0:e===1?d=!1:d=!0;for(let u=0,h=r.length;u<h;u++){let f=r[u],m=o+u;if(m===o&&a){f.ignore=!0;continue}let g=n.getLineContent(m),w=Rm(g);if(w===-1){f.ignore=s,f.commentStrOffset=g.length;continue}if(c=!1,f.ignore=!1,f.commentStrOffset=w,d&&!tc._haystackHasNeedleAtOffset(g,f.commentStr,w)&&(e===0?d=!1:e===1||(f.ignore=!0)),d&&t){let _=w+f.commentStrLength;_<g.length&&g.charCodeAt(_)===32&&(f.commentStrLength+=1)}}if(e===0&&c){d=!1;for(let u=0,h=r.length;u<h;u++)r[u].ignore=!1}return{supported:!0,shouldRemoveComments:d,lines:r}}static _gatherPreflightData(e,t,n,r,o,s,a,l){let c=i._gatherPreflightCommentStrings(n,r,o,l);return c===null?{supported:!1}:i._analyzeLines(e,t,n,c,r,s,a,l)}_executeLineComments(e,t,n,r){let o;n.shouldRemoveComments?o=i._createRemoveLineCommentsOperations(n.lines,r.startLineNumber):(i._normalizeInsertionPoint(e,n.lines,r.startLineNumber,this._tabSize),o=this._createAddLineCommentsOperations(n.lines,r.startLineNumber));let s=new Ie(r.positionLineNumber,r.positionColumn);for(let a=0,l=o.length;a<l;a++)t.addEditOperation(o[a].range,o[a].text),B.isEmpty(o[a].range)&&B.getStartPosition(o[a].range).equals(s)&&e.getLineContent(s.lineNumber).length+1===s.column&&(this._deltaColumn=(o[a].text||"").length);this._selectionId=t.trackSelection(r)}_attemptRemoveBlockComment(e,t,n,r){let o=t.startLineNumber,s=t.endLineNumber,a=r.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn),l=e.getLineContent(o).lastIndexOf(n,a-1),c=e.getLineContent(s).indexOf(r,t.endColumn-1-n.length);return l!==-1&&c===-1&&(c=e.getLineContent(o).indexOf(r,l+n.length),s=o),l===-1&&c!==-1&&(l=e.getLineContent(s).lastIndexOf(n,c),o=s),t.isEmpty()&&(l===-1||c===-1)&&(l=e.getLineContent(o).indexOf(n),l!==-1&&(c=e.getLineContent(o).indexOf(r,l+n.length))),l!==-1&&e.getLineContent(o).charCodeAt(l+n.length)===32&&(n+=" "),c!==-1&&e.getLineContent(s).charCodeAt(c-1)===32&&(r=" "+r,c-=1),l!==-1&&c!==-1?tc._createRemoveBlockCommentOperations(new B(o,l+n.length+1,s,c+1),n,r):null}_executeBlockComment(e,t,n){e.tokenization.tokenizeIfCheap(n.startLineNumber);let r=e.getLanguageIdAtPosition(n.startLineNumber,1),o=this.languageConfigurationService.getLanguageConfiguration(r).comments;if(!o||!o.blockCommentStartToken||!o.blockCommentEndToken)return;let s=o.blockCommentStartToken,a=o.blockCommentEndToken,l=this._attemptRemoveBlockComment(e,n,s,a);if(!l){if(n.isEmpty()){let c=e.getLineContent(n.startLineNumber),d=Rm(c);d===-1&&(d=c.length),l=tc._createAddBlockCommentOperations(new B(n.startLineNumber,d+1,n.startLineNumber,c.length+1),s,a,this._insertSpace)}else l=tc._createAddBlockCommentOperations(new B(n.startLineNumber,e.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),s,a,this._insertSpace);l.length===1&&(this._deltaColumn=s.length+1)}this._selectionId=t.trackSelection(n);for(let c of l)t.addEditOperation(c.range,c.text)}getEditOperations(e,t){let n=this._selection;if(this._moveEndPositionDown=!1,n.startLineNumber===n.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new B(n.startLineNumber,e.getLineMaxColumn(n.startLineNumber),n.startLineNumber+1,1),n.startLineNumber===e.getLineCount()?"":`
`),this._selectionId=t.trackSelection(n);return}n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));let r=i._gatherPreflightData(this._type,this._insertSpace,e,n.startLineNumber,n.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return r.supported?this._executeLineComments(e,t,r,n):this._executeBlockComment(e,t,n)}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),new Qe(n.selectionStartLineNumber,n.selectionStartColumn+this._deltaColumn,n.positionLineNumber,n.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){let n=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];s.ignore||n.push(ii.delete(new B(t+r,s.commentStrOffset+1,t+r,s.commentStrOffset+s.commentStrLength+1)))}return n}_createAddLineCommentsOperations(e,t){let n=[],r=this._insertSpace?" ":"";for(let o=0,s=e.length;o<s;o++){let a=e[o];a.ignore||n.push(ii.insert(new Ie(t+o,a.commentStrOffset+1),a.commentStr+r))}return n}static nextVisibleColumn(e,t,n,r){return n?e+(t-e%t):e+r}static _normalizeInsertionPoint(e,t,n,r){let o=1073741824,s,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;let d=e.getLineContent(n+l),u=0;for(let h=0,f=t[l].commentStrOffset;u<o&&h<f;h++)u=i.nextVisibleColumn(u,r,d.charCodeAt(h)===9,1);u<o&&(o=u)}o=Math.floor(o/r)*r;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;let d=e.getLineContent(n+l),u=0;for(s=0,a=t[l].commentStrOffset;u<o&&s<a;s++)u=i.nextVisibleColumn(u,r,d.charCodeAt(s)===9,1);u>o?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}});var F0,rI,oI,sI,aI,lI=N(()=>{cl();lt();et();ti();Un();nI();Qq();He();Ji();F0=class extends de{constructor(e,t){super(t),this._type=e}run(e,t){let n=e.get(Ot);if(!t.hasModel())return;let r=t.getModel(),o=[],s=r.getOptions(),a=t.getOption(22),l=t.getSelections().map((d,u)=>({selection:d,index:u,ignoreFirstLine:!1}));l.sort((d,u)=>B.compareRangesUsingStarts(d.selection,u.selection));let c=l[0];for(let d=1;d<l.length;d++){let u=l[d];c.selection.endLineNumber===u.selection.startLineNumber&&(c.index<u.index?u.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=u))}for(let d of l)o.push(new Kx(n,d.selection,s.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},rI=class extends F0{constructor(){super(0,{id:"editor.action.commentLine",label:b("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"5_insert",title:b({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}},oI=class extends F0{constructor(){super(1,{id:"editor.action.addCommentLine",label:b("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2081),weight:100}})}},sI=class extends F0{constructor(){super(2,{id:"editor.action.removeCommentLine",label:b("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2099),weight:100}})}},aI=class extends de{constructor(){super({id:"editor.action.blockComment",label:b("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"5_insert",title:b({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){let n=e.get(Ot);if(!t.hasModel())return;let r=t.getOption(22),o=[],s=t.getSelections();for(let a of s)o.push(new tc(a,r.insertSpace,n));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}};ee(rI);ee(oI);ee(sI);ee(aI)});var dge,Qu,cI,sp,dI,uI=N(()=>{Ht();gF();Fc();ke();Tr();lt();ti();He();Ji();wt();wl();Wn();kn();U_();dge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Qu=function(i,e){return function(t,n){e(t,n,i)}},sp=cI=class{static get(e){return e.getContribution(cI.ID)}constructor(e,t,n,r,o,s,a,l){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=r,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new le,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){let d=this._contextViewService.getContextViewElement(),u=c.srcElement;u.shadowRoot&&lP(d)===u.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(23)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(23)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(let r of this._editor.getSelections())if(r.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(23)||!this._editor.hasModel())return;let t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?Me.SimpleEditorContext:Me.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){let n=[],r=this._menuService.createMenu(t,this._contextKeyService),o=r.getActions({arg:e.uri});r.dispose();for(let s of o){let[,a]=s,l=0;for(let c of a)if(c instanceof Pm){let d=this._getMenuActions(e,c.item.submenu);d.length>0&&(n.push(new Nm(c.id,c.label,d)),l++)}else n.push(c),l++;l&&n.push(new Ss)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let n=this._editor.getOption(59);this._editor.updateOptions({hover:{enabled:!1}});let r=t;if(!r){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();let s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=Zi(this._editor.getDomNode()),l=a.left+s.left,c=a.top+s.top+s.height;r={x:l,y:c}}let o=this._editor.getOption(125)&&!Am;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:o?this._editor.getDomNode():void 0,getAnchor:()=>r,getActions:()=>e,getActionViewItem:s=>{let a=this._keybindingFor(s);if(a)return new ng(s,s,{label:!0,keybinding:a.getLabel(),isMenu:!0});let l=s;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new ng(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||IF(this._workspaceContextService.getWorkspace()))return;let t=this._editor.getOption(71),n=0,r=c=>({id:`menu-action-${++n}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled=="undefined"?!0:c.enabled,checked:c.checked,run:c.run}),o=(c,d)=>new Nm(`menu-action-${++n}`,c,d,void 0),s=(c,d,u,h,f)=>{if(!d)return r({label:c,enabled:d,run:()=>{}});let m=w=>()=>{this._configurationService.updateValue(u,w)},g=[];for(let w of f)g.push(r({label:w.label,checked:h===w.value,run:m(w.value)}));return o(c,g)},a=[];a.push(r({label:b("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new Ss),a.push(r({label:b("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(b("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:b("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:b("context.minimap.size.fill","Fill"),value:"fill"},{label:b("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(b("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:b("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:b("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(125)&&!Am;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};sp.ID="editor.contrib.contextmenu";sp=cI=dge([Qu(1,rs),Qu(2,Gc),Qu(3,it),Qu(4,Kt),Qu(5,ks),Qu(6,Mt),Qu(7,Cl)],sp);dI=class extends de{constructor(){super({id:"editor.action.showContextMenu",label:b("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=sp.get(t))===null||n===void 0||n.showContextMenu()}};Ue(sp.ID,sp,2);ee(dI)});var z0,B0,Zu,hI,fI,pI=N(()=>{ke();lt();ti();He();z0=class{constructor(e){this.selections=e}equals(e){let t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let r=0;r<t;r++)if(!this.selections[r].equalsSelection(e.selections[r]))return!1;return!0}},B0=class{constructor(e,t,n){this.cursorState=e,this.scrollTop=t,this.scrollLeft=n}},Zu=class i extends ce{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;let n=new z0(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new B0(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new B0(new z0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new B0(new z0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}};Zu.ID="editor.contrib.cursorUndoRedoController";hI=class extends de{constructor(){super({id:"cursorUndo",label:b("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var r;(r=Zu.get(t))===null||r===void 0||r.cursorUndo()}},fI=class extends de{constructor(){super({id:"cursorRedo",label:b("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var r;(r=Zu.get(t))===null||r===void 0||r.cursorRedo()}};Ue(Zu.ID,Zu,0);ee(hI);ee(fI)});var Zq=N(()=>{});var Jq=N(()=>{Zq()});var $x,eK=N(()=>{et();An();$x=class{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){let n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new B(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new Qe(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new Qe(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new Qe(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new Qe(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new Qe(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,t){return this.targetSelection}}});function ap(i){return Er?i.altKey:i.ctrlKey}var Ju,mI=N(()=>{ke();Tr();Jq();lt();di();et();An();jn();eK();Ju=class i extends ce{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(34)||this._editor.getOption(21)||(ap(e)&&(this._modifierPressed=!0),this._mouseDown&&ap(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(34)||this._editor.getOption(21)||(ap(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===i.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(this._dragSelection===null){let r=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(r.length===1)this._dragSelection=r[0];else return}ap(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new Ie(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){let r=this._editor.getSelection();if(r){let{selectionStartLineNumber:o,selectionStartColumn:s}=r;n=[new Qe(o,s,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(r=>r.containsPosition(t)?new Qe(t.lineNumber,t.column,t.lineNumber,t.column):r);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(ap(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new $x(this._dragSelection,t,ap(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new B(e.lineNumber,e.column,e.lineNumber,e.column),options:i._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}};Ju.ID="editor.contrib.dragAndDrop";Ju.TRIGGER_KEY_VALUE=Er?6:5;Ju._DECORATION_OPTIONS=mt.register({description:"dnd-target",className:"dnd-target"});Ue(Ju.ID,Ju,2)});var Td,H0=N(()=>{Td=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let i;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?i=crypto.getRandomValues.bind(crypto):i=function(n){for(let r=0;r<n.length;r++)n[r]=Math.floor(Math.random()*256);return n};let e=new Uint8Array(16),t=[];for(let n=0;n<256;n++)t.push(n.toString(16).padStart(2,"0"));return function(){i(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let r=0,o="";return o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+="-",o+=t[e[r++]],o+=t[e[r++]],o+="-",o+=t[e[r++]],o+=t[e[r++]],o+="-",o+=t[e[r++]],o+=t[e[r++]],o+="-",o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o}}()});function U0(i){return{asString:()=>tK(this,void 0,void 0,function*(){return i}),asFile:()=>{},value:typeof i=="string"?i:void 0}}function iK(i,e,t){let n={id:Td(),name:i,uri:e,data:t};return{asString:()=>tK(this,void 0,void 0,function*(){return""}),asFile:()=>n,value:void 0}}function Gx(i){return i.toLowerCase()}function Yx(i,e){return nK(Gx(i),e.map(Gx))}function nK(i,e){if(i==="*/*")return e.length>0;if(e.includes(i))return!0;let t=i.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;let[n,r,o]=t;return o==="*"?e.some(s=>s.startsWith(r+"/")):!1}var tK,lp,eh,j0=N(()=>{mi();Jh();H0();tK=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};lp=class{constructor(){this._entries=new Map}get size(){let e=0;for(let t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){let t=[...this._entries.keys()];return kr.some(this,([n,r])=>r.asFile())&&t.push("files"),nK(Gx(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){let n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(let[e,t]of this._entries)for(let n of t)yield[e,n]}toKey(e){return Gx(e)}};eh=Object.freeze({create:i=>DP(i.map(e=>e.toString())).join(`\r
`),split:i=>i.split(`\r
`),parse:i=>eh.split(i).filter(e=>!e.startsWith("#"))})});function rK(i){return cp(this,void 0,void 0,function*(){let e=i.get(bn.uriList);if(!e)return[];let t=yield e.asString(),n=[];for(let r of eh.parse(t))try{n.push({uri:yt.parse(r),originalText:r})}catch(o){}return n})}var gI,W0,cp,bI,V0,Xx,Qx,Zx,Jx,e2,vI=N(()=>{mi();j0();ke();G3();Dm();Do();Ln();Pt();He();U_();gI=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},W0=function(i,e){return function(t,n){e(t,n,i)}},cp=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},bI=b("builtIn","Built-in"),V0=class{provideDocumentPasteEdits(e,t,n,r){return cp(this,void 0,void 0,function*(){let o=yield this.getEdit(n,r);return o?{insertText:o.insertText,label:o.label,detail:o.detail,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}:void 0})}provideDocumentOnDropEdits(e,t,n,r){return cp(this,void 0,void 0,function*(){let o=yield this.getEdit(n,r);return o?{insertText:o.insertText,label:o.label,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}:void 0})}},Xx=class extends V0{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[bn.text],this.pasteMimeTypes=[bn.text]}getEdit(e,t){return cp(this,void 0,void 0,function*(){let n=e.get(bn.text);if(!n||e.has(bn.uriList))return;let r=yield n.asString();return{handledMimeType:bn.text,label:b("text.label","Insert Plain Text"),detail:bI,insertText:r}})}},Qx=class extends V0{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[bn.uriList],this.pasteMimeTypes=[bn.uriList]}getEdit(e,t){return cp(this,void 0,void 0,function*(){let n=yield rK(e);if(!n.length||t.isCancellationRequested)return;let r=0,o=n.map(({uri:a,originalText:l})=>a.scheme===To.file?a.fsPath:(r++,l)).join(" "),s;return r>0?s=n.length>1?b("defaultDropProvider.uriList.uris","Insert Uris"):b("defaultDropProvider.uriList.uri","Insert Uri"):s=n.length>1?b("defaultDropProvider.uriList.paths","Insert Paths"):b("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:bn.uriList,insertText:o,label:s,detail:bI}})}},Zx=class extends V0{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[bn.uriList],this.pasteMimeTypes=[bn.uriList]}getEdit(e,t){return cp(this,void 0,void 0,function*(){let n=yield rK(e);if(!n.length||t.isCancellationRequested)return;let r=hr(n.map(({uri:o})=>{let s=this._workspaceContextService.getWorkspaceFolder(o);return s?eO(s.uri,o):void 0}));if(r.length)return{handledMimeType:bn.uriList,insertText:r.join(" "),label:n.length>1?b("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):b("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:bI}})}};Zx=gI([W0(0,Cl)],Zx);Jx=class extends ce{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new Xx)),this._register(e.documentOnDropEditProvider.register("*",new Qx)),this._register(e.documentOnDropEditProvider.register("*",new Zx(t)))}};Jx=gI([W0(0,Se),W0(1,Cl)],Jx);e2=class extends ce{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new Xx)),this._register(e.documentPasteEditProvider.register("*",new Qx)),this._register(e.documentPasteEditProvider.register("*",new Zx(t)))}};e2=gI([W0(0,Se),W0(1,Cl)],e2)});var yI,_I,uge,dp,wI=N(()=>{ul();yI={EDITORS:"CodeEditors",FILES:"CodeFiles"},_I=class{},uge={DragAndDropContribution:"workbench.contributions.dragAndDrop"};er.add(uge.DragAndDropContribution,new _I);dp=class i{constructor(){}static getInstance(){return i.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};dp.INSTANCE=new dp});function xI(i){let e=new lp;for(let t of i.items){let n=t.type;if(t.kind==="string"){let r=new Promise(o=>t.getAsString(o));e.append(n,U0(r))}else if(t.kind==="file"){let r=t.getAsFile();r&&e.append(n,fge(r))}}return e}function fge(i){let e=i.path?yt.parse(i.path):void 0;return iK(i.name,e,()=>hge(this,void 0,void 0,function*(){return new Uint8Array(yield i.arrayBuffer())}))}function t2(i,e=!1){let t=xI(i),n=t.get(D_.INTERNAL_URI_LIST);if(n)t.replace(bn.uriList,n);else if(e||!t.has(bn.uriList)){let r=[];for(let o of i.items){let s=o.getAsFile();if(s){let a=s.path;try{a?r.push(yt.file(a).toString()):r.push(yt.parse(s.name,!0).toString())}catch(l){}}}r.length&&t.replace(bn.uriList,U0(eh.create(r)))}for(let r of pge)t.delete(r);return t}var hge,pge,CI=N(()=>{Nne();j0();G3();Ln();wI();hge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};pge=Object.freeze([yI.EDITORS,yI.FILES,D_.RESOURCES,D_.INTERNAL_URI_LIST])});var i2,q0,SI=N(()=>{i2=class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){let t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}},q0=class{constructor(e){this.identifier=e}}});var kI,oK=N(()=>{fl();Ut();SI();kI=Zn("treeViewsDndService");tr(kI,i2,1)});var sK=N(()=>{});var aK=N(()=>{sK()});var mge,gge,bge,vge,n2,up,K0=N(()=>{Ht();jt();Jn();ke();Ni();Lr();aK();et();jn();Ut();mge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},gge=function(i,e){return function(t,n){e(t,n,i)}},bge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},vge=mt.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:Gv,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),n2=class i extends ce{constructor(e,t,n,r,o){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(r),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Le(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=Le("span.icon");this.domNode.append(t),t.classList.add(..._t.asClassNameArray(pt.loading),"codicon-modifier-spin");let n=()=>{let r=this.editor.getOption(65);this.domNode.style.height=`${r}px`,this.domNode.style.width=`${Math.ceil(.8*r)}px`};n(),this._register(this.editor.onDidChangeConfiguration(r=>{(r.hasChanged(51)||r.hasChanged(65))&&n()})),this._register(At(this.domNode,bi.CLICK,r=>{this.delegate.cancel()}))}getId(){return i.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};n2.baseId="editor.widget.inlineProgressWidget";up=class extends ce{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Wi),this._currentWidget=new Wi,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,n){return bge(this,void 0,void 0,function*(){let r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=gl(()=>{let o=B.fromPositions(e);this._currentDecorations.set([{range:o,options:vge}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(n2,this.id,this._editor,o,t,n))},this._showDelay);try{return yield n}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};up=mge([gge(2,Ke)],up)});function lK(i,e,t){var n,r;return{edits:[...e.map(o=>new E_(i,typeof t.insertText=="string"?{range:o,text:t.insertText,insertAsSnippet:!1}:{range:o,text:t.insertText.snippet,insertAsSnippet:!0})),...(r=(n=t.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&r!==void 0?r:[]]}}function r2(i){var e;function t(a,l){return"providerId"in a&&a.providerId===l.providerId||"mimeType"in a&&a.mimeType===l.handledMimeType}let n=new Map;for(let a of i)for(let l of(e=a.yieldTo)!==null&&e!==void 0?e:[])for(let c of i)if(c!==a&&t(l,c)){let d=n.get(a);d||(d=[],n.set(a,d)),d.push(c)}if(!n.size)return Array.from(i);let r=new Set,o=[];function s(a){if(!a.length)return[];let l=a[0];if(o.includes(l))return console.warn(`Yield to cycle detected for ${l.providerId}`),a;if(r.has(l))return s(a.slice(1));let c=[],d=n.get(l);return d&&(o.push(l),c=s(d),o.pop()),r.add(l),[...c,l,...s(a.slice(1))]}return s(Array.from(i))}var EI=N(()=>{tg()});var cK=N(()=>{});var dK=N(()=>{cK()});var hK,$0,uK,TI,o2,hp,II=N(()=>{Ht();zne();Fc();ei();ke();dK();tg();wt();wl();Ut();Wn();hK=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},$0=function(i,e){return function(t,n){e(t,n,i)}},uK=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},o2=TI=class extends ce{constructor(e,t,n,r,o,s,a,l,c,d){super(),this.typeId=e,this.editor=t,this.showCommand=r,this.range=o,this.edits=s,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=d,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(c),this.visibleContext.set(!0),this._register(ni(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(ni(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(u=>{o.containsPosition(u.position)||this.dispose()})),this._register(ci.runAndSubscribe(d.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;let t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=Le(".post-edit-widget"),this.button=this._register(new LF(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(At(this.domNode,bi.CLICK,()=>this.showSelector()))}getId(){return TI.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{let e=Zi(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>tf({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};o2.baseId="editor.widget.postEditWidget";o2=TI=hK([$0(7,rs),$0(8,it),$0(9,Kt)],o2);hp=class extends ce{constructor(e,t,n,r,o,s){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=r,this._instantiationService=o,this._bulkEditService=s,this._currentWidget=this._register(new Wi),this._register(ci.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,n,r){var o,s;return uK(this,void 0,void 0,function*(){let a=this._editor.getModel();if(!a||!e.length)return;let l=t.allEdits[t.activeEditIndex];if(!l)return;let c=[];(typeof l.insertText=="string"?l.insertText==="":l.insertText.snippet==="")?c=[]:c=e.map(w=>new E_(a.uri,typeof l.insertText=="string"?{range:w,text:l.insertText,insertAsSnippet:!1}:{range:w,text:l.insertText.snippet,insertAsSnippet:!0}));let u={edits:[...c,...(s=(o=l.additionalEdit)===null||o===void 0?void 0:o.edits)!==null&&s!==void 0?s:[]]},h=e[0],f=a.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]),m,g;try{m=yield this._bulkEditService.apply(u,{editor:this._editor,token:r}),g=a.getDecorationRange(f[0])}finally{a.deltaDecorations(f,[])}n&&m.isApplied&&t.allEdits.length>1&&this.show(g!=null?g:h,t,w=>uK(this,void 0,void 0,function*(){let _=this._editor.getModel();_&&(yield _.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:w,allEdits:t.allEdits},n,r))}))})}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(o2,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};hp=hK([$0(4,Ke),$0(5,Kc)],hp)});var _ge,s2,G0,LI,AI,DI,MI,th,fK=N(()=>{mi();jt();j0();ke();CI();et();Pt();SI();oK();yu();K0();He();kn();wt();wI();Ut();EI();II();_ge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},s2=function(i,e){return function(t,n){e(t,n,i)}},G0=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},AI="editor.experimental.dropIntoEditor.defaultProvider",DI="editor.changeDropType",MI=new ht("dropWidgetVisible",!1,b("dropWidgetVisible","Whether the drop widget is showing")),th=LI=class extends ce{static get(e){return e.getContribution(LI.ID)}constructor(e,t,n,r,o){super(),this._configService=n,this._languageFeaturesService=r,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=dp.getInstance(),this._dropProgressManager=this._register(t.createInstance(up,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(hp,"dropIntoEditor",e,MI,{id:DI,label:b("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(s=>this.onDropIntoEditor(e,s.position,s.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,n){var r;return G0(this,void 0,void 0,function*(){if(!n.dataTransfer||!e.hasModel())return;(r=this._currentOperation)===null||r===void 0||r.cancel(),e.focus(),e.setPosition(t);let o=Jt(s=>G0(this,void 0,void 0,function*(){let a=new ba(e,1,void 0,s);try{let l=yield this.extractDataTransferData(n);if(l.size===0||a.token.isCancellationRequested)return;let c=e.getModel();if(!c)return;let d=this._languageFeaturesService.documentOnDropEditProvider.ordered(c).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(f=>l.matches(f)):!0),u=yield this.getDropEdits(d,c,t,l,a);if(a.token.isCancellationRequested)return;if(u.length){let h=this.getInitialActiveEditIndex(c,u),f=e.getOption(35).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([B.fromPositions(t)],{activeEditIndex:h,allEdits:u},f,s)}}finally{a.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,b("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o),this._currentOperation=o})}getDropEdits(e,t,n,r,o){return G0(this,void 0,void 0,function*(){let s=yield Vc(Promise.all(e.map(l=>G0(this,void 0,void 0,function*(){try{let c=yield l.provideDocumentOnDropEdits(t,n,r,o.token);if(c)return Object.assign(Object.assign({},c),{providerId:l.id})}catch(c){console.error(c)}}))),o.token),a=hr(s!=null?s:[]);return r2(a)})}getInitialActiveEditIndex(e,t){let n=this._configService.getValue(AI,{resource:e.uri});for(let[r,o]of Object.entries(n)){let s=t.findIndex(a=>o===a.providerId&&a.handledMimeType&&Yx(r,[a.handledMimeType]));if(s>=0)return s}return 0}extractDataTransferData(e){return G0(this,void 0,void 0,function*(){if(!e.dataTransfer)return new lp;let t=t2(e.dataTransfer);if(this.treeItemsTransfer.hasData(q0.prototype)){let n=this.treeItemsTransfer.getData(q0.prototype);if(Array.isArray(n))for(let r of n){let o=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(r.identifier);if(o)for(let[s,a]of o)t.replace(s,a)}}return t})}};th.ID="editor.contrib.dropIntoEditorController";th=LI=_ge([s2(1,Ke),s2(2,Mt),s2(3,Se),s2(4,kI)],th)});var NI=N(()=>{lt();tF();j_();vI();He();Y3();ul();fK();Ue(th.ID,th,2);We(new class extends Fi{constructor(){super({id:DI,precondition:MI,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var n;(n=th.get(e))===null||n===void 0||n.changeDropType()}});Yc(Jx);er.as(af.Configuration).registerConfiguration(Object.assign(Object.assign({},k_),{properties:{[AI]:{type:"object",scope:5,description:b("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}))});var Wa,pK=N(()=>{et();qc();jn();ir();nr();Wa=class i{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){let e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){let t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){let t=e<this._decorations.length?this._decorations[e]:null;return t?this._editor.getModel().getDecorationRange(t):null}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(let n of t){let r=n.options;if(r===i._FIND_MATCH_DECORATION||r===i._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(n.id)}return 0}setCurrentFindMatch(e){let t=null,n=0;if(e)for(let r=0,o=this._decorations.length;r<o;r++){let s=this._editor.getModel().getDecorationRange(this._decorations[r]);if(e.equalsRange(s)){t=this._decorations[r],n=r+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(r=>{if(this._highlightedDecorationId!==null&&(r.changeDecorationOptions(this._highlightedDecorationId,i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,r.changeDecorationOptions(this._highlightedDecorationId,i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let o=this._editor.getModel().getDecorationRange(t);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){let s=o.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);o=new B(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=r.addDecoration(o,i._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let r=i._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){r=i._FIND_MATCH_NO_OVERVIEW_DECORATION;let a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/c)),u=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let f=1,m=e.length;f<m;f++){let g=e[f].range;h+d>=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(o.push({range:new B(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=g.startLineNumber,h=g.endLineNumber)}o.push({range:new B(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let a=0,l=e.length;a<l;a++)s[a]={range:e[a].range,options:r};this._decorations=n.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=n.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>n.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>n.addDecoration(a,i._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],r=this._editor.getModel().getDecorationRange(n);if(!(!r||r.endLineNumber>e.lineNumber)){if(r.endLineNumber<e.lineNumber)return r;if(!(r.endColumn>e.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;t<n;t++){let r=this._decorations[t],o=this._editor.getModel().getDecorationRange(r);if(!(!o||o.startLineNumber<e.lineNumber)){if(o.startLineNumber>e.lineNumber)return o;if(!(o.startColumn<e.column))return o}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}};Wa._CURRENT_FIND_MATCH_DECORATION=mt.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:Ei(v_),position:Yr.Center},minimap:{color:Ei(ik),position:ca.Inline}});Wa._FIND_MATCH_DECORATION=mt.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:Ei(v_),position:Yr.Center},minimap:{color:Ei(ik),position:ca.Inline}});Wa._FIND_MATCH_NO_OVERVIEW_DECORATION=mt.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});Wa._FIND_MATCH_ONLY_OVERVIEW_DECORATION=mt.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:Ei(v_),position:Yr.Center}});Wa._RANGE_HIGHLIGHT_DECORATION=mt.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});Wa._FIND_SCOPE_DECORATION=mt.register({description:"find-scope",className:"findScope",isWholeLine:!0})});var a2,mK=N(()=>{et();a2=class{constructor(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let n=[];for(let s=0;s<this._ranges.length;s++)n.push({range:this._ranges[s],text:this._replaceStrings[s]});n.sort((s,a)=>B.compareRangesUsingStarts(s.range,a.range));let r=[],o=n[0];for(let s=1;s<n.length;s++)o.range.endLineNumber===n[s].range.startLineNumber&&o.range.endColumn===n[s].range.startColumn?(o.range=o.range.plusRange(n[s].range),o.text=o.text+n[s].text):(r.push(o),o=n[s]);r.push(o);for(let s of r)t.addEditOperation(s.range,s.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}});function RI(i,e){if(i&&i[0]!==""){let t=gK(i,e,"-"),n=gK(i,e,"_");return t&&!n?bK(i,e,"-"):!t&&n?bK(i,e,"_"):i[0].toUpperCase()===i[0]?e.toUpperCase():i[0].toLowerCase()===i[0]?e.toLowerCase():yP(i[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):i[0][0].toUpperCase()!==i[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function gK(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function bK(i,e,t){let n=e.split(t),r=i[0].split(t),o="";return n.forEach((s,a)=>{o+=RI([r[a]],s)+t}),o.slice(0,-1)}var vK=N(()=>{Ni()});function _K(i){if(!i||i.length===0)return new pp(null);let e=[],t=new OI(i);for(let n=0,r=i.length;n<r;n++){let o=i.charCodeAt(n);if(o===92){if(n++,n>=r)break;let s=i.charCodeAt(n);switch(s){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(`
`,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(n++,n>=r)break;let s=i.charCodeAt(n);if(s===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(s===48||s===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(n+1<r){let l=i.charCodeAt(n+1);if(48<=l&&l<=57){n++,a=a*10+(l-48),t.emitUnchanged(n-2),t.emitMatchIndex(a,n+1,e),e.length=0;continue}}t.emitUnchanged(n-1),t.emitMatchIndex(a,n+1,e),e.length=0;continue}}}return t.finalize()}var l2,PI,pp,fp,OI,yK=N(()=>{vK();l2=class{constructor(e){this.staticValue=e,this.kind=0}},PI=class{constructor(e){this.pieces=e,this.kind=1}},pp=class i{static fromStaticValue(e){return new i([fp.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new l2(""):e.length===1&&e[0].staticValue!==null?this._state=new l2(e[0].staticValue):this._state=new PI(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?RI(e,this._state.staticValue):this._state.staticValue;let n="";for(let r=0,o=this._state.pieces.length;r<o;r++){let s=this._state.pieces[r];if(s.staticValue!==null){n+=s.staticValue;continue}let a=i._substitute(s.matchIndex,e);if(s.caseOps!==null&&s.caseOps.length>0){let l=[],c=s.caseOps.length,d=0;for(let u=0,h=a.length;u<h;u++){if(d>=c){l.push(a.slice(u));break}switch(s.caseOps[d]){case"U":l.push(a[u].toUpperCase());break;case"u":l.push(a[u].toUpperCase()),d++;break;case"L":l.push(a[u].toLowerCase());break;case"l":l.push(a[u].toLowerCase()),d++;break;default:l.push(a[u])}}a=l.join("")}n+=a}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e<t.length)return(t[e]||"")+n;n=String(e%10)+n,e=Math.floor(e/10)}return"$"+n}},fp=class i{static staticValue(e){return new i(e,-1,null)}static caseOps(e,t){return new i(null,e,t)}constructor(e,t,n){this.staticValue=e,this.matchIndex=t,!n||n.length===0?this.caseOps=null:this.caseOps=n.slice(0)}},OI=class{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,n){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=fp.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=fp.caseOps(e,n),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=fp.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new pp(this._result)}}});var qa,rWe,mp,Y0,X0,Q0,Z0,J0,eb,ri,Va,yge,c2,tb=N(()=>{mi();jt();ke();Zv();di();et();An();Sne();pK();mK();yK();wt();qa=new ht("findWidgetVisible",!1),rWe=qa.toNegated(),mp=new ht("findInputFocussed",!1),Y0=new ht("replaceInputFocussed",!1),X0={primary:545,mac:{primary:2593}},Q0={primary:565,mac:{primary:2613}},Z0={primary:560,mac:{primary:2608}},J0={primary:554,mac:{primary:2602}},eb={primary:558,mac:{primary:2606}},ri={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},Va=19999,yge=240,c2=class i{constructor(e,t){this._toDispose=new le,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new la,this._decorations=new Wa(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new ui(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,ji(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},yge)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t!="undefined"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new B(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let r=this._findMatches(n,!1,Va);this._decorations.set(r,n);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&r.length>0){let a=e_(r.map(l=>l.range),l=>B.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(40).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===1?(n===1?n=o.getLineCount():n--,r=o.getLineMaxColumn(n)):r--,new Ie(n,r)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()<Va){let d=this._decorations.matchBeforePosition(e);d&&d.isEmpty()&&d.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),d=this._decorations.matchBeforePosition(e)),d&&this._setCurrentFindMatch(d);return}if(this._cannotFind())return;let n=this._decorations.getFindScope(),r=i._getSearchRange(this._editor.getModel(),n);r.getEndPosition().isBefore(e)&&(e=r.getEndPosition()),e.isBefore(r.getStartPosition())&&(e=r.getEndPosition());let{lineNumber:o,column:s}=e,a=this._editor.getModel(),l=new Ie(o,s),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1);if(c&&c.range.isEmpty()&&c.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1)),!!c){if(!t&&!r.containsRange(c.range))return this._moveToPrevMatch(c.range.getStartPosition(),!0);this._setCurrentFindMatch(c.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,r=1):r++,new Ie(n,r)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()<Va){let n=this._decorations.matchAfterPosition(e);n&&n.isEmpty()&&n.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),n=this._decorations.matchAfterPosition(e)),n&&this._setCurrentFindMatch(n);return}let t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,n,r=!1){if(this._cannotFind())return null;let o=this._decorations.getFindScope(),s=i._getSearchRange(this._editor.getModel(),o);s.getEndPosition().isBefore(e)&&(e=s.getStartPosition()),e.isBefore(s.getStartPosition())&&(e=s.getStartPosition());let{lineNumber:a,column:l}=e,c=this._editor.getModel(),d=new Ie(a,l),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t);return n&&u&&u.range.isEmpty()&&u.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t)),u?!r&&!s.containsRange(u.range)?this._getNextMatch(u.range.getEndPosition(),t,n,!0):u:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(e){let t=this._decorations.getDecorationRangeAt(e);t&&this._setCurrentFindMatch(t)}moveToMatch(e){this._moveToMatch(e)}_getReplacePattern(){return this._state.isRegex?_K(this._state.replaceString):pp.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),!0,!1);if(n)if(t.equalsRange(n.range)){let r=e.buildReplaceString(n.matches,this._state.preserveCase),o=new hl(t,r);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new Ie(t.startLineNumber,t.startColumn+r.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}_findMatches(e,t,n){let r=(e||[null]).map(o=>i._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t,n)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Va?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new HO(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let u="mu";n.ignoreCase&&(u+="i"),n.global&&(u+="g"),n=new RegExp(n.source,u)}let r=this._editor.getModel(),o=r.getValue(1),s=r.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(n,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(n,a.buildReplaceString(null,c));let d=new Qv(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){let t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let s=0,a=n.length;s<a;s++)r[s]=t.buildReplaceString(n[s].matches,this._state.preserveCase);let o=new a2(this._editor.getSelection(),n.map(s=>s.range),r);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),n=this._findMatches(e,!1,1073741824).map(o=>new Qe(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)),r=this._editor.getSelection();for(let o=0,s=n.length;o<s;o++)if(n[o].equalsRange(r)){n=[r].concat(n.slice(0,o)).concat(n.slice(o+1));break}this._editor.setSelections(n)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}});var wK=N(()=>{});var xK=N(()=>{wK()});var ib,CK=N(()=>{Ht();xK();Bne();M_();jt();tb();ir();ib=class i extends yl{constructor(e,t,n){super(),this._hideSoon=this._register(new ui(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");let r={inputActiveOptionBorder:ua(g_),inputActiveOptionForeground:ua(b_),inputActiveOptionBackground:ua(bl)};this.caseSensitive=this._register(new DF(Object.assign({appendTitle:this._keybindingLabelFor(ri.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},r))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new MF(Object.assign({appendTitle:this._keybindingLabelFor(ri.ToggleWholeWordCommand),isChecked:this._state.wholeWord},r))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new NF(Object.assign({appendTitle:this._keybindingLabelFor(ri.ToggleRegexCommand),isChecked:this._state.isRegex},r))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(o=>{let s=!1;o.isRegex&&(this.regex.checked=this._state.isRegex,s=!0),o.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,s=!0),o.matchCase&&(this.caseSensitive.checked=this._state.matchCase,s=!0),!this._state.isRevealed&&s&&this._revealTemporarily()})),this._register(At(this._domNode,bi.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(At(this._domNode,"mouseover",o=>this._onMouseOver()))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};ib.ID="editor.contrib.findOptionsWidget"});function d2(i,e){return i===1?!0:i===2?!1:e}var u2,SK=N(()=>{ei();ke();et();tb();u2=class extends ce{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return d2(this._isRegexOverride,this._isRegex)}get wholeWord(){return d2(this._wholeWordOverride,this._wholeWord)}get matchCase(){return d2(this._matchCaseOverride,this._matchCase)}get preserveCase(){return d2(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new Je),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){let r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},o=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,o=!0),typeof n!="undefined"&&(B.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(r)}change(e,t,n=!0){var r;let o={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},s=!1,a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;typeof e.searchString!="undefined"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),typeof e.replaceString!="undefined"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),typeof e.isRevealed!="undefined"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),typeof e.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),typeof e.isRegex!="undefined"&&(this._isRegex=e.isRegex),typeof e.wholeWord!="undefined"&&(this._wholeWord=e.wholeWord),typeof e.matchCase!="undefined"&&(this._matchCase=e.matchCase),typeof e.preserveCase!="undefined"&&(this._preserveCase=e.preserveCase),typeof e.searchScope!="undefined"&&(!((r=e.searchScope)===null||r===void 0)&&r.every(u=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(f=>!B.equalsRange(f,u))})||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),typeof e.loop!="undefined"&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),typeof e.isSearching!="undefined"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),typeof e.filters!="undefined"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=typeof e.isRegexOverride!="undefined"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride!="undefined"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride!="undefined"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride!="undefined"?e.preserveCaseOverride:0,a!==this.isRegex&&(s=!0,o.isRegex=!0),l!==this.wholeWord&&(s=!0,o.wholeWord=!0),c!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=Va}}});var kK=N(()=>{});var EK=N(()=>{kK()});var wge,xge,FI,h2,TK=N(()=>{Ht();AF();Hne();M_();Jn();ei();Une();He();wge=b("defaultLabel","input"),xge=b("label.preserveCaseToggle","Preserve Case"),FI=class extends W_{constructor(e){super({icon:pt.preserveCase,title:xge+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},h2=class extends yl{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Je),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Je),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Je),this._onInput=this._register(new Je),this._onKeyUp=this._register(new Je),this._onPreserveCaseKeyDown=this._register(new Je),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||wge;let o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,c=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new RF(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new FI(Object.assign({appendTitle:o,isChecked:!1},r.toggleStyles))),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let f=d.indexOf(document.activeElement);if(f>=0){let m=-1;h.equals(17)?m=(f+1)%d.length:h.equals(15)&&(f===0?m=d.length-1:m=f-1),h.equals(9)?(d[f].blur(),this.inputBox.focus()):m>=0&&d[m].focus(),cu.stop(h,!0)}}});let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}});function MK(i,e){if(f2.includes(e))throw new Error("Cannot register the same widget multiple times");f2.push(e);let t=new le,n=new ht(zI,!1).bindTo(i),r=new ht(AK,!0).bindTo(i),o=new ht(DK,!0).bindTo(i),s=()=>{n.set(!0),ic=e},a=()=>{n.set(!1),ic===e&&(ic=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(ni(()=>{f2.splice(f2.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var IK,LK,g2,zI,AK,DK,ic,f2,p2,m2,BI=N(()=>{jne();TK();wt();U3();He();ke();IK=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},LK=function(i,e){return function(t,n){e(t,n,i)}},g2=new ht("suggestWidgetVisible",!1,b("suggestWidgetVisible","Whether suggestion are visible")),zI="historyNavigationWidgetFocus",AK="historyNavigationForwardsEnabled",DK="historyNavigationBackwardsEnabled",f2=[];p2=class extends PF{constructor(e,t,n,r){super(e,t,n);let o=this._register(r.createScoped(this.inputBox.element));this._register(MK(o,this.inputBox))}};p2=IK([LK(3,it)],p2);m2=class extends h2{constructor(e,t,n,r,o=!1){super(e,t,o,n);let s=this._register(r.createScoped(this.inputBox.element));this._register(MK(s,this.inputBox))}};m2=IK([LK(3,it)],m2);Ao.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:fe.and(fe.has(zI),fe.equals(DK,!0),fe.not("isComposing"),g2.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{ic==null||ic.showPreviousValue()}});Ao.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:fe.and(fe.has(zI),fe.equals(AK,!0),fe.not("isComposing"),g2.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{ic==null||ic.showNextValue()}})});function HI(i){var e,t;return((e=i.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=i.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}var NK=N(()=>{});function BK(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function HK(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionEnd<t.value.length){i.stopPropagation();return}}var Cge,Sge,RK,PK,kge,Ege,Tge,Ige,Lge,Age,Dge,Mge,Nge,Rge,Pge,Oge,Fge,zge,Bge,Hge,Uge,jge,OK,Ka,Wge,Vge,nb,qge,FK,zK,rb,ob,Id,UK=N(()=>{Ht();Lo();AF();gk();M_();jt();Jn();qt();ke();Tr();Ni();EK();et();tb();He();BI();NK();ir();kl();nr();Lr();rk();Bn();O_();Cge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Sge=Pi("find-selection",pt.selection,b("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),RK=Pi("find-collapsed",pt.chevronRight,b("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),PK=Pi("find-expanded",pt.chevronDown,b("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),kge=Pi("find-replace",pt.replace,b("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Ege=Pi("find-replace-all",pt.replaceAll,b("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Tge=Pi("find-previous-match",pt.arrowUp,b("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Ige=Pi("find-next-match",pt.arrowDown,b("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Lge=b("label.findDialog","Find / Replace"),Age=b("label.find","Find"),Dge=b("placeholder.find","Find"),Mge=b("label.previousMatchButton","Previous Match"),Nge=b("label.nextMatchButton","Next Match"),Rge=b("label.toggleSelectionFind","Find in Selection"),Pge=b("label.closeButton","Close"),Oge=b("label.replace","Replace"),Fge=b("placeholder.replace","Replace"),zge=b("label.replaceButton","Replace"),Bge=b("label.replaceAllButton","Replace All"),Hge=b("label.toggleReplaceButton","Toggle Replace"),Uge=b("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Va),jge=b("label.matchesLocation","{0} of {1}"),OK=b("label.noResults","No results"),Ka=419,Wge=275,Vge=Wge-54,nb=69,qge=33,FK="ctrlEnterReplaceAll.windows.donotask",zK=Er?256:2048,rb=class{constructor(e){this.afterLineNumber=e,this.heightInPx=qge,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};ob=class i extends yl{constructor(e,t,n,r,o,s,a,l,c){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=n,this._contextViewProvider=r,this._keybindingService=o,this._contextKeyService=s,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(FK,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Mo(500),this._register(ni(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(89)&&(this._codeEditor.getOption(89)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(142)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(40)){let u=this._codeEditor.getOption(40).loop;this._state.change({loop:u},!1);let h=this._codeEditor.getOption(40).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new rb(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Cge(this,void 0,void 0,function*(){if(this._isVisible){let d=yield this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}}))),this._findInputFocused=mp.bindTo(s),this._findFocusTracker=this._register(Cs(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=Y0.bindTo(s),this._replaceFocusTracker=this._register(Cs(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(40).addExtraSpaceOnTop&&(this._viewZone=new rb(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(89)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=$r(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,ft)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=nb+"px",this._state.matchesCount>=Va?this._matchesCount.title=Uge:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Va&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=rf(jge,n,t)}else e=OK;this._matchesCount.appendChild(document.createTextNode(e)),ln(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),nb=Math.max(nb,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===OK)return n===""?b("ariaSearchNoResultEmpty","{0} found",e):b("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){let r=b("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${r}`:r}return b("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(89);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(40).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(40).seedSearchStringFromSelection&&e){let n=this._codeEditor.getDomNode();if(n){let r=Zi(n),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=r.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&a<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);let l=oP(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());r.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(40).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(r=>{n.heightInPx=this._getHeight(),this._viewZoneId=r.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(40).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new rb(0));let n=this._viewZone;this._codeEditor.changeViewZones(r=>{if(this._viewZoneId!==void 0){let o=this._getHeight();if(o===n.heightInPx)return;let s=o-n.heightInPx;n.heightInPx=o,r.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(82).top,o<=0)return;n.heightInPx=o,this._viewZoneId=r.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!iP(this._domNode))return;let e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");let n=e.width,r=e.minimap.minimapWidth,o=!1,s=!1,a=!1;if(this._resized&&$r(this._domNode)>Ka){this._domNode.style.maxWidth=`${n-28-r-15}px`,this._replaceInput.width=$r(this._findInput.domNode);return}if(Ka+28+r>=n&&(s=!0),Ka+28+r-nb>=n&&(a=!0),Ka+28+r-nb>=n+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",s),!a&&!o&&(this._domNode.style.maxWidth=`${n-28-r-15}px`),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:a,reducedFindWidget:s}),this._resized){let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=$r(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){let e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));let n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!B.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(zK|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return BK(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return HK(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(zK|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Rc&&Pc&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(b("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(FK,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return BK(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return HK(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new p2(null,this._contextViewProvider,{width:Vge,label:Age,placeholder:Dge,appendCaseSensitiveLabel:this._keybindingLabelFor(ri.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ri.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ri.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>HI(this._keybindingService),inputBoxStyles:uk,toggleStyles:dk},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),Y9&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Id({label:Mge+this._keybindingLabelFor(ri.PreviousMatchFindAction),icon:Tge,onTrigger:()=>{Nc(this._codeEditor.getAction(ri.PreviousMatchFindAction)).run().then(void 0,ft)}})),this._nextBtn=this._register(new Id({label:Nge+this._keybindingLabelFor(ri.NextMatchFindAction),icon:Ige,onTrigger:()=>{Nc(this._codeEditor.getAction(ri.NextMatchFindAction)).run().then(void 0,ft)}}));let n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);let r=document.createElement("div");r.className="find-actions",n.appendChild(r),r.appendChild(this._matchesCount),r.appendChild(this._prevBtn.domNode),r.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new W_({icon:Sge,title:Rge+this._keybindingLabelFor(ri.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:ua(bl),inputActiveOptionBorder:ua(g_),inputActiveOptionForeground:ua(b_)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),r.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Id({label:Pge+this._keybindingLabelFor(ri.CloseFindWidgetCommand),icon:V_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),this._replaceInput=this._register(new m2(null,void 0,{label:Oge,placeholder:Fge,appendPreserveCaseLabel:this._keybindingLabelFor(ri.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>HI(this._keybindingService),inputBoxStyles:uk,toggleStyles:dk},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),l.preventDefault())})),this._replaceBtn=this._register(new Id({label:zge+this._keybindingLabelFor(ri.ReplaceOneAction),icon:kge,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new Id({label:Bge+this._keybindingLabelFor(ri.ReplaceAllAction),icon:Ege,onTrigger:()=>{this._controller.replaceAll()}}));let o=document.createElement("div");o.className="replace-part",o.appendChild(this._replaceInput.domNode);let s=document.createElement("div");s.className="replace-actions",o.appendChild(s),s.appendChild(this._replaceBtn.domNode),s.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Id({label:Hge,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=$r(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=Lge,this._domNode.role="dialog",this._domNode.style.width=`${Ka}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(o),this._resizeSash=new Sl(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=Ka;this._register(this._resizeSash.onDidStart(()=>{a=$r(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(c<Ka)return;let d=parseFloat(rP(this._domNode).maxWidth)||0;c>d||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=$r(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let l=$r(this._domNode);if(l<Ka)return;let c=Ka;if(!this._resized||l===Ka){let d=this._codeEditor.getLayoutInfo();c=d.width-28-d.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=$r(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){let e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}};ob.ID="editor.contrib.findWidget";Id=class extends yl{constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+_t.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,n=>{this._opts.onTrigger(),n.preventDefault()}),this.onkeydown(this._domNode,n=>{var r,o;if(n.equals(10)||n.equals(3)){this._opts.onTrigger(),n.preventDefault();return}(o=(r=this._opts).onKeyDown)===null||o===void 0||o.call(r,n)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(..._t.asClassNameArray(RK)),this._domNode.classList.add(..._t.asClassNameArray(PK))):(this._domNode.classList.remove(..._t.asClassNameArray(PK)),this._domNode.classList.add(..._t.asClassNameArray(RK)))}};bf((i,e)=>{let t=(g,w)=>{w&&e.addRule(`.monaco-editor ${g} { background-color: ${w}; }`)};t(".findMatch",i.getColor(SO)),t(".currentFindMatch",i.getColor(CO)),t(".findScope",i.getColor(kO));let n=i.getColor(vl);t(".find-widget",n);let r=i.getColor(p_);r&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${r}; }`);let o=i.getColor(m_);o&&e.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${o}; border-right: 1px solid ${o}; border-bottom: 1px solid ${o}; }`);let s=i.getColor(TO);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${_u(i.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);let a=i.getColor(EO);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);let l=i.getColor(IO);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${_u(i.type)?"dashed":"solid"} ${l}; }`);let c=i.getColor(is);c&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${c}; }`);let d=i.getColor(yO);d&&e.addRule(`.monaco-editor .find-widget { color: ${d}; }`);let u=i.getColor(dO);u&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${u}; }`);let h=i.getColor(wO);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{let g=i.getColor(vu);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}let f=i.getColor(FO);f&&e.addRule(`
.monaco-editor .find-widget .button:not(.disabled):hover,
.monaco-editor .find-widget .codicon-find-selection:hover {
background-color: ${f} !important;
}
`);let m=i.getColor(uO);m&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${m}; }`)})});function jI(i,e="single",t=!1){if(!i.hasModel())return null;let n=i.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){let r=i.getConfiguredWordAtPosition(n.getStartPosition());if(r&&t===!1)return r.word}else if(i.getModel().getValueLengthInRange(n)<Kge)return i.getModel().getValueInRange(n)}return null}var jK,$a,ih,UI,Kge,lr,WI,$ge,Gge,VI,qI,b2,KI,$I,GI,v2,YI,XI,Yge,Vs,_2=N(()=>{jt();ke();Ni();lt();zO();ti();qc();tb();CK();SK();UK();He();Ji();Zm();wt();wl();Wn();No();xl();wu();nr();jK=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},$a=function(i,e){return function(t,n){e(t,n,i)}},ih=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Kge=524288;lr=UI=class extends ce{get editor(){return this._editor}static get(e){return e.getContribution(UI.ID)}constructor(e,t,n,r){super(),this._editor=e,this._findWidgetVisible=qa.bindTo(t),this._contextKeyService=t,this._storageService=n,this._clipboardService=r,this._updateHistoryDelayer=new Mo(500),this._state=this._register(new u2),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(o=>this._onStateChanged(o))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let o=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),o&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(40).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!mp.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=dl(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return ih(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let n=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){let r=jI(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);r&&(this._state.isRegex?n.searchString=dl(r):n.searchString=r)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let r=jI(this._editor,e.seedSearchStringFromSelection);r&&(n.searchString=r)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){let r=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;r&&(n.searchString=r)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){let r=this._editor.getSelections();r.some(o=>!o.isEmpty())&&(n.searchScope=r)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new c2(this._editor,this._state))})}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return ih(this,void 0,void 0,function*(){return this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};lr.ID="editor.contrib.findController";lr=UI=jK([$a(1,it),$a(2,Xr),$a(3,As)],lr);WI=class extends lr{constructor(e,t,n,r,o,s,a,l){super(e,n,a,l),this._contextViewService=t,this._keybindingService=r,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){let n=Object.create(null,{_start:{get:()=>super._start}});return ih(this,void 0,void 0,function*(){this._widget||this._createFindWidget();let r=this._editor.getSelection(),o=!1;switch(this._editor.getOption(40).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!r&&r.startLineNumber!==r.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,yield n._start.call(this,e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new ob(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new ib(this._editor,this._state,this._keybindingService))}};WI=jK([$a(1,Gc),$a(2,it),$a(3,Kt),$a(4,vn),$a(5,Ri),$a(6,Xr),$a(7,As)],WI);$ge=W3(new j3({id:ri.StartFindAction,label:b("startFindAction","Find"),alias:"Find",precondition:fe.or(F.focus,fe.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"3_find",title:b({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));$ge.addImplementation(0,(i,e,t)=>{let n=lr.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(40).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(40).loop}):!1});Gge={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:b("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag.
The flag will not be saved for the future.
0: Do Nothing
1: True
2: False`)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:b("actions.find.wholeWordOverride",`Overrides "Match Whole Word" flag.
The flag will not be saved for the future.
0: Do Nothing
1: True
2: False`)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:b("actions.find.matchCaseOverride",`Overrides "Math Case" flag.
The flag will not be saved for the future.
0: Do Nothing
1: True
2: False`)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:b("actions.find.preserveCaseOverride",`Overrides "Preserve Case" flag.
The flag will not be saved for the future.
0: Do Nothing
1: True
2: False`)},findInSelection:{type:"boolean"}}}}]},VI=class extends de{constructor(){super({id:ri.StartFindWithArgs,label:b("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:Gge})}run(e,t,n){return ih(this,void 0,void 0,function*(){let r=lr.get(t);if(r){let o=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&t.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:t.getOption(40).loop},o),r.setGlobalBufferTerm(r.getState().searchString)}})}},qI=class extends de{constructor(){super({id:ri.StartFindWithSelection,label:b("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return ih(this,void 0,void 0,function*(){let n=lr.get(t);n&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),n.setGlobalBufferTerm(n.getState().searchString))})}},b2=class extends de{run(e,t){return ih(this,void 0,void 0,function*(){let n=lr.get(t);n&&!this._run(n)&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),this._run(n))})}},KI=class extends b2{constructor(){super({id:ri.NextMatchFindAction,label:b("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:F.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:fe.and(F.focus,mp),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},$I=class extends b2{constructor(){super({id:ri.PreviousMatchFindAction,label:b("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:F.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:fe.and(F.focus,mp),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},GI=class extends de{constructor(){super({id:ri.GoToMatchFindAction,label:b("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:qa}),this._highlightDecorations=[]}run(e,t,n){let r=lr.get(t);if(!r)return;let o=r.getState().matchesCount;if(o<1){e.get(Ri).notify({severity:wf.Warning,message:b("findMatchAction.noResults","No matches. Try searching for something else.")});return}let a=e.get(rr).createInputBox();a.placeholder=b("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);let l=d=>{let u=parseInt(d);if(isNaN(u))return;let h=r.getState().matchesCount;if(u>0&&u<=h)return u-1;if(u<0&&u>=-h)return h+u},c=d=>{let u=l(d);if(typeof u=="number"){a.validationMessage=void 0,r.goToMatch(u);let h=r.getState().currentMatch;h&&this.addDecorations(t,h)}else a.validationMessage=b("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(d=>{c(d)}),a.onDidAccept(()=>{let d=l(a.value);typeof d=="number"?(r.goToMatch(d),a.hide()):a.validationMessage=b("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount)}),a.onDidHide(()=>{this.clearDecorations(t),a.dispose()}),a.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Ei(y_),position:Yr.Full}}}])})}},v2=class extends de{run(e,t){return ih(this,void 0,void 0,function*(){let n=lr.get(t);if(!n)return;let r=jI(t,"single",!1);r&&n.setSearchString(r),this._run(n)||(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),this._run(n))})}},YI=class extends v2{constructor(){super({id:ri.NextSelectionMatchFindAction,label:b("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},XI=class extends v2{constructor(){super({id:ri.PreviousSelectionMatchFindAction,label:b("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},Yge=W3(new j3({id:ri.StartFindReplaceAction,label:b("startReplace","Replace"),alias:"Replace",precondition:fe.or(F.focus,fe.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"3_find",title:b({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Yge.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(89))return!1;let n=lr.get(e);if(!n)return!1;let r=e.getSelection(),o=n.isFindInputFocused(),s=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&e.getOption(40).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(40).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(40).loop})});Ue(lr.ID,WI,0);ee(VI);ee(qI);ee(KI);ee($I);ee(GI);ee(YI);ee(XI);Vs=Fi.bindToContribution(lr.get);We(new Vs({id:ri.CloseFindWidgetCommand,precondition:qa,handler:i=>i.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:fe.and(F.focus,fe.not("isComposing")),primary:9,secondary:[1033]}}));We(new Vs({id:ri.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:X0.primary,mac:X0.mac,win:X0.win,linux:X0.linux}}));We(new Vs({id:ri.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:Q0.primary,mac:Q0.mac,win:Q0.win,linux:Q0.linux}}));We(new Vs({id:ri.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:Z0.primary,mac:Z0.mac,win:Z0.win,linux:Z0.linux}}));We(new Vs({id:ri.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:J0.primary,mac:J0.mac,win:J0.win,linux:J0.linux}}));We(new Vs({id:ri.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:eb.primary,mac:eb.mac,win:eb.win,linux:eb.linux}}));We(new Vs({id:ri.ReplaceOneAction,precondition:qa,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:3094}}));We(new Vs({id:ri.ReplaceOneAction,precondition:qa,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:fe.and(F.focus,Y0),primary:3}}));We(new Vs({id:ri.ReplaceAllAction,precondition:qa,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:2563}}));We(new Vs({id:ri.ReplaceAllAction,precondition:qa,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:fe.and(F.focus,Y0),primary:void 0,mac:{primary:2051}}}));We(new Vs({id:ri.SelectAllMatchesAction,precondition:qa,handler:i=>i.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:515}}))});var WK=N(()=>{});var VK=N(()=>{WK()});var Xge,qK,Uo,KK,sb,cr,QI,ab=N(()=>{Xge={0:" ",1:"u",2:"r"},qK=65535,Uo=16777215,KK=4278190080,sb=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,n=e%32;return(this._states[t]&1<<n)!==0}set(e,t){let n=e/32|0,r=e%32,o=this._states[n];t?this._states[n]=o|1<<r:this._states[n]=o&~(1<<r)}},cr=class i{constructor(e,t,n){if(e.length!==t.length||e.length>qK)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new sb(e.length),this._userDefinedStates=new sb(e.length),this._recoveredStates=new sb(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(n,r)=>{let o=e[e.length-1];return this.getStartLineNumber(o)<=n&&this.getEndLineNumber(o)>=r};for(let n=0,r=this._startIndexes.length;n<r;n++){let o=this._startIndexes[n],s=this._endIndexes[n];if(o>Uo||s>Uo)throw new Error("startLineNumber or endLineNumber must not exceed "+Uo);for(;e.length>0&&!t(o,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=o+((a&255)<<24),this._endIndexes[n]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Uo}getEndLineNumber(e){return this._endIndexes[e]&Uo}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let r=0;r<this._types.length;r++)this._types[r]===e&&(this.setCollapsed(r,t),n=!0);return n}toRegion(e){return new QI(this,e)}getParentIndex(e){this.ensureParentIndices();let t=((this._startIndexes[e]&KK)>>>24)+((this._endIndexes[e]&KK)>>>16);return t===qK?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t<n;){let r=Math.floor((t+n)/2);e<this.getStartLineNumber(r)?n=r:t=r+1}return t-1}findRange(e){let t=this.findIndex(e);if(t>=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t<this.length;t++)e[t]=`[${Xge[this.getSource(t)]}${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&Uo,endLineNumber:this._endIndexes[e]&Uo,type:this._types?this._types[e]:void 0,isCollapsed:this.isCollapsed(e),source:this.getSource(e)}}static fromFoldRanges(e){let t=e.length,n=new Uint32Array(t),r=new Uint32Array(t),o=[],s=!1;for(let l=0;l<t;l++){let c=e[l];n[l]=c.startLineNumber,r[l]=c.endLineNumber,o.push(c.type),c.type&&(s=!0)}s||(o=void 0);let a=new i(n,r,o);for(let l=0;l<t;l++)e[l].isCollapsed&&a.setCollapsed(l,!0),a.setSource(l,e[l].source);return a}static sanitizeAndMerge(e,t,n){n=n!=null?n:Number.MAX_VALUE;let r=(g,w)=>Array.isArray(g)?_=>_<w?g[_]:void 0:_=>_<w?g.toFoldRange(_):void 0,o=r(e,e.length),s=r(t,t.length),a=0,l=0,c=o(0),d=s(0),u=[],h,f=0,m=[];for(;c||d;){let g;if(d&&(!c||c.startLineNumber>=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(d.source===1?g=d:(g=c,g.isCollapsed=d.isCollapsed&&c.endLineNumber===d.endLineNumber,g.source=0),c=o(++a)):(g=d,d.isCollapsed&&d.source===0&&(g.source=2)),d=s(++l);else{let w=l,_=d;for(;;){if(!_||_.startLineNumber>c.endLineNumber){g=c;break}if(_.source===1&&_.endLineNumber>c.endLineNumber)break;_=s(++w)}c=o(++a)}if(g){for(;h&&h.endLineNumber<g.startLineNumber;)h=u.pop();g.endLineNumber>g.startLineNumber&&g.startLineNumber>f&&g.endLineNumber<=n&&(!h||h.endLineNumber>=g.endLineNumber)&&(m.push(g),f=g.startLineNumber,h&&u.push(h),h=g)}}return m}},QI=class{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}});function w2(i,e,t){let n=[];for(let r of t){let o=i.getRegionAtLine(r);if(o){let s=!o.isCollapsed;if(n.push(o),e>1){let a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c<e);n.push(...a)}}}i.toggleCollapseState(n)}function nh(i,e,t=Number.MAX_VALUE,n){let r=[];if(n&&n.length>0)for(let o of n){let s=i.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&r.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&c<t);r.push(...a)}}else{let o=i.getRegionsInside(null,(s,a)=>s.isCollapsed!==e&&a<t);r.push(...o)}i.toggleCollapseState(r)}function ZI(i,e,t,n){let r=[];for(let o of n){let s=i.getAllRegionsAtLine(o,(a,l)=>a.isCollapsed!==e&&l<=t);r.push(...s)}i.toggleCollapseState(r)}function $K(i,e,t){let n=[];for(let r of t){let o=i.getAllRegionsAtLine(r,s=>s.isCollapsed!==e);o.length>0&&n.push(o[0])}i.toggleCollapseState(n)}function GK(i,e,t,n){let r=(s,a)=>a===e&&s.isCollapsed!==t&&!n.some(l=>s.containsLine(l)),o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function JI(i,e,t){let n=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&n.push(a[0])}let r=s=>n.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function x2(i,e,t){let n=i.textModel,r=i.regions,o=[];for(let s=r.length-1;s>=0;s--)if(t!==r.isCollapsed(s)){let a=r.getStartLineNumber(s);e.test(n.getLineContent(a))&&o.push(r.toRegion(s))}i.toggleCollapseState(o)}function C2(i,e,t){let n=i.regions,r=[];for(let o=n.length-1;o>=0;o--)t!==n.isCollapsed(o)&&e===n.getType(o)&&r.push(n.toRegion(o));i.toggleCollapseState(r)}function YK(i,e){let t=null,n=e.getRegionAtLine(i);if(n!==null&&(t=n.startLineNumber,i===t)){let r=n.parentIndex;r!==-1?t=e.regions.getStartLineNumber(r):t=null}return t}function XK(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let n=t.parentIndex,r=0;for(n!==-1&&(r=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber<i)return t.startLineNumber;t.regionIndex>0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function QK(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let n=t.parentIndex,r=0;if(n!==-1)r=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;r=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex<e.regions.length){if(t=e.regions.toRegion(t.regionIndex+1),t.startLineNumber>=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>i)return t.startLineNumber;t.regionIndex<e.regions.length?t=e.regions.toRegion(t.regionIndex+1):t=null}return null}var y2,eL=N(()=>{ei();ab();CF();y2=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new Je,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new cr(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,r)=>n.regionIndex-r.regionIndex);let t={};this._decorationProvider.changeDecorations(n=>{let r=0,o=-1,s=-1,a=l=>{for(;r<l;){let c=this._regions.getEndLineNumber(r),d=this._regions.isCollapsed(r);if(c<=o){let u=this.regions.getSource(r)!==0;n.changeDecorationOptions(this._editorDecorationIds[r],this._decorationProvider.getDecorationOption(d,c<=s,u))}d&&c>s&&(s=c),r++}};for(let l of e){let c=l.regionIndex,d=this._editorDecorationIds[c];if(d&&!t[d]){t[d]=!0,a(c);let u=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,u),o=Math.max(o,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){let t=new Array,n=r=>{for(let o of e)if(!(o.startLineNumber>r.endLineNumber||r.startLineNumber>o.endLineNumber))return!0;return!1};for(let r=0;r<this._regions.length;r++){let o=this._regions.toFoldRange(r);(o.source===0||!n(o))&&t.push(o)}this.updatePost(cr.fromFoldRanges(t))}update(e,t=[]){let n=this._currentFoldedOrManualRanges(t),r=cr.sanitizeAndMerge(e,n,this._textModel.getLineCount());this.updatePost(cr.fromFoldRanges(r))}updatePost(e){let t=[],n=-1;for(let r=0,o=e.length;r<o;r++){let s=e.getStartLineNumber(r),a=e.getEndLineNumber(r),l=e.isCollapsed(r),c=e.getSource(r)!==0,d={startLineNumber:s,startColumn:this._textModel.getLineMaxColumn(s),endLineNumber:a,endColumn:this._textModel.getLineMaxColumn(a)+1};t.push({range:d,options:this._decorationProvider.getDecorationOption(l,a<=n,c)}),l&&a>n&&(n=a)}this._decorationProvider.changeDecorations(r=>this._editorDecorationIds=r.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){let t=(r,o)=>{for(let s of e)if(r<s&&s<=o)return!0;return!1},n=[];for(let r=0,o=this._regions.length;r<o;r++){let s=this.regions.isCollapsed(r),a=this.regions.getSource(r);if(s||a!==0){let l=this._regions.toFoldRange(r),c=this._textModel.getDecorationRange(this._editorDecorationIds[r]);c&&(s&&t(c.startLineNumber,c.endLineNumber)&&(s=!1),n.push({startLineNumber:c.startLineNumber,endLineNumber:c.endLineNumber,type:l.type,isCollapsed:s,source:a}))}}return n}getMemento(){let e=this._currentFoldedOrManualRanges(),t=[],n=this._textModel.getLineCount();for(let r=0,o=e.length;r<o;r++){let s=e[r];if(s.startLineNumber>=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>n)continue;let a=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){var t,n;if(!Array.isArray(e))return;let r=[],o=this._textModel.getLineCount();for(let a of e){if(a.startLineNumber>=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>o)continue;let l=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);(!a.checksum||l===a.checksum)&&r.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(n=a.source)!==null&&n!==void 0?n:0})}let s=cr.sanitizeAndMerge(this._regions,r,o);this.updatePost(cr.fromFoldRanges(s))}_getLinesChecksum(e,t){return H_(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let r=this._regions.findRange(e),o=1;for(;r>=0;){let s=this._regions.toRegion(r);(!t||t(s,o))&&n.push(s),o++,r=s.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],r=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=r,l=this._regions.length;a<l;a++){let c=this._regions.toRegion(a);if(this._regions.getStartLineNumber(a)<o){for(;s.length>0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&n.push(c)}else break}}else for(let s=r,a=this._regions.length;s<a;s++){let l=this._regions.toRegion(s);if(this._regions.getStartLineNumber(s)<o)(!t||t(l))&&n.push(l);else break}return n}}});function Qge(i,e){return i>=e.startLineNumber&&i<=e.endLineNumber}function ZK(i,e){let t=e_(i,n=>e<n.startLineNumber)-1;return t>=0&&i[t].endLineNumber>=e?i[t]:null}var S2,JK=N(()=>{mi();ei();et();bne();S2=class{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new Je,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||rO(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],n=0,r=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;n<a.length;n++){if(!a.isCollapsed(n))continue;let l=a.getStartLineNumber(n)+1,c=a.getEndLineNumber(n);o<=l&&c<=s||(!e&&r<this._hiddenRanges.length&&this._hiddenRanges[r].startLineNumber===l&&this._hiddenRanges[r].endLineNumber===c?(t.push(this._hiddenRanges[r]),r++):(e=!0,t.push(new B(l,1,c,1))),o=l,s=c)}(this._hasLineChanges||e||r<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return ZK(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,r=null,o=s=>((!r||!Qge(s,r))&&(r=ZK(this._hiddenRanges,s)),r?r.startLineNumber-1:null);for(let s=0,a=e.length;s<a;s++){let l=e[s],c=o(l.startLineNumber);c&&(l=l.setStartPosition(c,n.getLineMaxColumn(c)),t=!0);let d=o(l.endLineNumber);d&&(l=l.setEndPosition(d,n.getLineMaxColumn(d)),t=!0),e[s]=l}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}});function t0e(i,e,t,n=e0e){let r=i.getOptions().tabSize,o=new tL(n),s;t&&(s=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=i.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=i.getLineCount();c>0;c--){let d=i.getLineContent(c),u=Ym(d,r),h=a[a.length-1];if(u===-1){e&&(h.endAbove=c);continue}let f;if(s&&(f=d.match(s)))if(f[1]){let m=a.length-1;for(;m>0&&a[m].indent!==-2;)m--;if(m>0){a.length=m+1,h=a[m],o.insertFirst(c,h.line,u),h.line=c,h.indent=u,h.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(h.indent>u){do a.pop(),h=a[a.length-1];while(h.indent>u);let m=h.endAbove-1;m-c>=1&&o.insertFirst(c,m,u)}h.indent===u?h.endAbove=c:a.push({indent:u,endAbove:c,line:c})}return o.toIndentRanges(i)}var Zge,Jge,rh,tL,e0e,iL=N(()=>{BO();ab();Zge=5e3,Jge="indent",rh=class{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=Jge}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(t0e(this.editorModel,n,r,this.foldingRangesLimit))}},tL=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>Uo||t>Uo)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let n=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)n[s]=this._startIndexes[o],r[s]=this._endIndexes[o];return new cr(n,r)}else{this._foldingRangesLimit.update(this._length,t);let n=0,r=this._indentOccurrences.length;for(let l=0;l<this._indentOccurrences.length;l++){let c=this._indentOccurrences[l];if(c){if(c+n>t){r=l;break}n+=c}}let o=e.getOptions().tabSize,s=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,c=0;l>=0;l--){let d=this._startIndexes[l],u=e.getLineContent(d),h=Ym(u,o);(h<r||h===r&&n++<t)&&(s[c]=d,a[c]=this._endIndexes[l],c++)}return new cr(s,a)}}},e0e={limit:Zge,update:()=>{}}});var i0e,lb,cb,e$,t$,nL,Hr,rL=N(()=>{Jn();qc();jn();He();ir();kl();nr();Lr();i0e=je("editor.foldBackground",{light:Nr(ek,.3),dark:Nr(ek,.3),hcDark:null,hcLight:null},b("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);je("editorGutter.foldingControlForeground",{dark:Um,light:Um,hcDark:Um,hcLight:Um},b("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));lb=Pi("folding-expanded",pt.chevronDown,b("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),cb=Pi("folding-collapsed",pt.chevronRight,b("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),e$=Pi("folding-manual-collapsed",cb,b("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),t$=Pi("folding-manual-expanded",lb,b("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),nL={color:Ei(i0e),position:ca.Inline},Hr=class i{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};Hr.COLLAPSED_VISUAL_DECORATION=mt.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(cb)});Hr.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=mt.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:nL,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(cb)});Hr.MANUALLY_COLLAPSED_VISUAL_DECORATION=mt.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(e$)});Hr.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=mt.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:nL,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(e$)});Hr.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=mt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});Hr.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=mt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:nL,isWholeLine:!0});Hr.EXPANDED_VISUAL_DECORATION=mt.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+_t.asClassName(lb)});Hr.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=mt.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(lb)});Hr.MANUALLY_EXPANDED_VISUAL_DECORATION=mt.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+_t.asClassName(t$)});Hr.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=mt.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(t$)});Hr.NO_CONTROLS_EXPANDED_RANGE_DECORATION=mt.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});Hr.HIDDEN_RANGE_DECORATION=mt.register({description:"folding-hidden-range-decoration",stickiness:1})});function o0e(i,e,t){let n=null,r=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,n0e,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(n)||(n=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&n.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},Xt));return Promise.all(r).then(o=>n)}function s0e(i,e){let t=i.sort((s,a)=>{let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),n=new oL(e),r,o=[];for(let s of t)if(!r)r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>r.start)if(s.end<=r.end)o.push(r),r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>r.end){do r=o.pop();while(r&&s.start>r.end);r&&o.push(r),r=s}n.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return n.toIndentRanges()}var n0e,r0e,oh,oL,sL=N(()=>{qt();ke();ab();n0e={},r0e="syntax",oh=class{constructor(e,t,n,r,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=r,this.fallbackRangeProvider=o,this.id=r0e,this.disposables=new le,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(n))}compute(e){return o0e(this.providers,this.editorModel,e).then(t=>{var n,r;return t?s0e(t,this.foldingRangesLimit):(r=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(e))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}};oL=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,r){if(e>Uo||t>Uo)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=r,this._types[o]=n,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let r=0;r<this._length;r++)t[r]=this._startIndexes[r],n[r]=this._endIndexes[r];return new cr(t,n,this._types)}else{this._foldingRangesLimit.update(this._length,e);let t=0,n=this._nestingLevelCounts.length;for(let a=0;a<this._nestingLevelCounts.length;a++){let l=this._nestingLevelCounts[a];if(l){if(l+t>e){n=a;break}t+=l}}let r=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a<this._length;a++){let c=this._nestingLevels[a];(c<n||c===n&&t++<e)&&(r[l]=this._startIndexes[a],o[l]=this._endIndexes[a],s[l]=this._types[a],l++)}return new cr(r,o,s)}}}});function i$(i){if(!Lm(i)){if(!Hv(i))return!1;let e=i;if(!Lm(e.levels)&&!M3(e.levels)||!Lm(e.direction)&&!Bv(e.direction)||!Lm(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(M3)))return!1}return!0}var l0e,db,c0e,gp,$n,ps,ub,Rn,aL,lL,cL,dL,uL,hL,fL,pL,mL,gL,bL,vL,sh,_L,yL,wL,xL,CL,hb=N(()=>{jt();ki();qt();cl();ke();Ni();Bn();VK();z_();lt();ti();fr();Un();eL();JK();iL();He();wt();rL();ab();sL();No();Ms();ll();Pt();ei();Vi();Ln();Qo();kn();l0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},db=function(i,e){return function(t,n){e(t,n,i)}},c0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},$n=new ht("foldingEnabled",!1),ps=gp=class extends ce{static get(e){return e.getContribution(gp.ID)}static getFoldingRangeProviders(e,t){var n,r;let o=e.foldingRangeProvider.ordered(t);return(r=(n=gp._foldingRangeSelector)===null||n===void 0?void 0:n.call(gp,o,t))!==null&&r!==void 0?r:o}constructor(e,t,n,r,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=s,this.localToDispose=this._register(new le),this.editor=e,this._foldingLimitReporter=new ub(e);let a=this.editor.getOptions();this._isEnabled=a.get(42),this._useFoldingProviders=a.get(43)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(47),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(45),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Hr(e),this.foldingDecorationProvider.showFoldingControls=a.get(108),this.foldingDecorationProvider.showFoldingHighlights=a.get(44),this.foldingEnabled=$n.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(42)&&(this._isEnabled=this.editor.getOptions().get(42),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(46)&&this.onModelChanged(),l.hasChanged(108)||l.hasChanged(44)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(108),this.foldingDecorationProvider.showFoldingHighlights=c.get(44),this.triggerFoldingModelChanged()}l.hasChanged(43)&&(this._useFoldingProviders=this.editor.getOptions().get(43)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(47)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(47)),l.hasChanged(45)&&(this._foldingImportsByDefault=this.editor.getOptions().get(45))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new y2(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new S2(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Mo(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new ui(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)===null||n===void 0||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;let t=new rh(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let n=gp.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new oh(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{let e=this.foldingModel;if(!e)return null;let t=new gn,n=this.getRangeProvider(e.textModel),r=this.foldingRegionPromise=Jt(o=>n.compute(o));return r.then(o=>{if(o&&r===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let d=o.setCollapsedAllOfType(vf.Imports.value,!0);d&&(s=_a.capture(this.editor),this._currentModelHasFoldedImports=d)}let a=this.editor.getSelections(),l=a?a.map(d=>d.startLineNumber):[];e.update(o,l),s==null||s.restore(this.editor);let c=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=c)}return e})}).then(void 0,e=>(ft(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){let e=this.getFoldingModel();e&&e.then(t=>{if(t){let n=this.editor.getSelections();if(n&&n.length>0){let r=[];for(let o of n){let s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&r.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}r.length&&(t.toggleCollapseState(r),this.reveal(n[0].getPosition()))}}}).then(void 0,ft)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;let t=e.target.range,n=!1;switch(e.target.type){case 4:{let r=e.target.detail,o=e.target.element.offsetLeft;if(r.offsetX-o<4)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let r=this.editor.getModel();if(r&&t.startColumn===r.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,r=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==n)return;if(r){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(n))return}let s=t.getRegionAtLine(n);if(s&&s.startLineNumber===n){let a=s.isCollapsed;if(r||a){let l=e.event.altKey,c=[];if(l){let d=h=>!h.containedBy(s)&&!s.containedBy(h),u=t.getRegionsInside(null,d);for(let h of u)h.isCollapsed&&c.push(h);c.length===0&&(c=u)}else{let d=e.event.middleButton||e.event.shiftKey;if(d)for(let u of t.getRegionsInside(s))u.isCollapsed===a&&c.push(u);(a||!d||c.length===0)&&c.push(s)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};ps.ID="editor.contrib.folding";ps=gp=l0e([db(1,it),db(2,Ot),db(3,Ri),db(4,cn),db(5,Se)],ps);ub=class{constructor(e){this.editor=e,this._onDidChange=new Je,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(46)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},Rn=class extends de{runEditorCommand(e,t,n){let r=e.get(Ot),o=ps.get(t);if(!o)return;let s=o.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(a=>{if(a){this.invoke(o,a,t,n,r);let l=t.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}};aL=class extends Rn{constructor(){super({id:"editor.unfold",label:b("unfoldAction.label","Unfold"),alias:"Unfold",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
* 'levels': Number of levels to unfold. If not set, defaults to 1.
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
`,constraint:i$,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=r&&r.levels||1,s=this.getLineNumbers(r,n);r&&r.direction==="up"?ZI(t,!1,o,s):nh(t,!1,o,s)}},lL=class extends Rn{constructor(){super({id:"editor.unfoldRecursively",label:b("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2142),weight:100}})}invoke(e,t,n,r){nh(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}},cL=class extends Rn{constructor(){super({id:"editor.fold",label:b("foldAction.label","Fold"),alias:"Fold",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
* 'levels': Number of levels to fold.
* 'direction': If 'up', folds given number of levels up otherwise folds down.
* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
`,constraint:i$,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=this.getLineNumbers(r,n),s=r&&r.levels,a=r&&r.direction;typeof s!="number"&&typeof a!="string"?$K(t,!0,o):a==="up"?ZI(t,!0,s||1,o):nh(t,!0,s||1,o)}},dL=class extends Rn{constructor(){super({id:"editor.toggleFold",label:b("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2090),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);w2(t,1,r)}},uL=class extends Rn{constructor(){super({id:"editor.foldRecursively",label:b("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2140),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);nh(t,!0,Number.MAX_VALUE,r)}},hL=class extends Rn{constructor(){super({id:"editor.foldAllBlockComments",label:b("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2138),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())C2(t,vf.Comment.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).comments;if(a&&a.blockCommentStartToken){let l=new RegExp("^\\s*"+dl(a.blockCommentStartToken));x2(t,l,!0)}}}},fL=class extends Rn{constructor(){super({id:"editor.foldAllMarkerRegions",label:b("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2077),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())C2(t,vf.Region.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);x2(t,l,!0)}}}},pL=class extends Rn{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:b("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2078),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())C2(t,vf.Region.value,!1);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);x2(t,l,!1)}}}},mL=class extends Rn{constructor(){super({id:"editor.foldAllExcept",label:b("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2136),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);JI(t,!0,r)}},gL=class extends Rn{constructor(){super({id:"editor.unfoldAllExcept",label:b("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2134),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);JI(t,!1,r)}},bL=class extends Rn{constructor(){super({id:"editor.foldAll",label:b("foldAllAction.label","Fold All"),alias:"Fold All",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2069),weight:100}})}invoke(e,t,n){nh(t,!0)}},vL=class extends Rn{constructor(){super({id:"editor.unfoldAll",label:b("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2088),weight:100}})}invoke(e,t,n){nh(t,!1)}},sh=class i extends Rn{getFoldingLevel(){return parseInt(this.id.substr(i.ID_PREFIX.length))}invoke(e,t,n){GK(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}};sh.ID_PREFIX="editor.foldLevel";sh.ID=i=>sh.ID_PREFIX+i;_L=class extends Rn{constructor(){super({id:"editor.gotoParentFold",label:b("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=YK(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},yL=class extends Rn{constructor(){super({id:"editor.gotoPreviousFold",label:b("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=XK(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},wL=class extends Rn{constructor(){super({id:"editor.gotoNextFold",label:b("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=QK(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},xL=class extends Rn{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:b("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2135),weight:100}})}invoke(e,t,n){var r;let o=[],s=n.getSelections();if(s){for(let a of s){let l=a.endLineNumber;a.endColumn===1&&--l,l>a.startLineNumber&&(o.push({startLineNumber:a.startLineNumber,endLineNumber:l,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:a.startLineNumber,startColumn:1,endLineNumber:a.startLineNumber,endColumn:1}))}if(o.length>0){o.sort((l,c)=>l.startLineNumber-c.startLineNumber);let a=cr.sanitizeAndMerge(t.regions,o,(r=n.getModel())===null||r===void 0?void 0:r.getLineCount());t.updatePost(cr.fromFoldRanges(a))}}}},CL=class extends Rn{constructor(){super({id:"editor.removeManualFoldingRanges",label:b("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2137),weight:100}})}invoke(e,t,n){let r=n.getSelections();if(r){let o=[];for(let s of r){let{startLineNumber:a,endLineNumber:l}=s;o.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(o),e.triggerFoldingModelChanged()}}};Ue(ps.ID,ps,0);ee(aL);ee(lL);ee(cL);ee(uL);ee(bL);ee(vL);ee(hL);ee(fL);ee(pL);ee(mL);ee(gL);ee(dL);ee(_L);ee(yL);ee(wL);ee(xL);ee(CL);for(let i=1;i<=7;i++)CP(new sh({id:sh.ID(i),label:b("foldLevelAction.label","Fold Level {0}",i),alias:`Fold Level ${i}`,precondition:$n,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2048|21+i),weight:100}}));Dt.registerCommand("_executeFoldingRangeProvider",function(i,...e){return c0e(this,void 0,void 0,function*(){let[t]=e;if(!(t instanceof yt))throw Eo();let n=i.get(Se),r=i.get(Di).getModel(t);if(!r)throw Eo();let o=i.get(Mt);if(!o.getValue("editor.folding",{resource:t}))return[];let s=i.get(Ot),a=o.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:t})},update:(f,m)=>{}},c=new rh(r,s,l),d=c;if(a!=="indentation"){let f=ps.getFoldingRangeProviders(n,r);f.length&&(d=new oh(r,f,()=>{},l,c))}let u=yield d.compute(st.None),h=[];try{if(u)for(let f=0;f<u.length;f++){let m=u.getType(f);h.push({start:u.getStartLineNumber(f),end:u.getEndLineNumber(f),kind:m?vf.fromValue(m):void 0})}return h}finally{d.dispose()}})})});var SL,kL,EL,TL=N(()=>{lt();Wne();He();SL=class extends de{constructor(){super({id:"editor.action.fontZoomIn",label:b("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){Sf.setZoomLevel(Sf.getZoomLevel()+1)}},kL=class extends de{constructor(){super({id:"editor.action.fontZoomOut",label:b("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){Sf.setZoomLevel(Sf.getZoomLevel()-1)}},EL=class extends de{constructor(){super({id:"editor.action.fontZoomReset",label:b("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){Sf.setZoomLevel(0)}};ee(SL);ee(kL);ee(EL)});var DL=Qi(ah=>{mi();ki();qt();cl();ke();lt();Ir();q3();et();ti();q_();Pt();qne();Vne();He();Vi();wt();Ut();$c();var n$=ah&&ah.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},k2=ah&&ah.__param||function(i,e){return function(t,n){e(t,n,i)}},AL=ah&&ah.__awaiter||function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},fb=class{constructor(e,t,n){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._disposables=new le,this._sessionDisposables=new le,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(r=>{r.hasChanged(55)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(55)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new fu;for(let r of t.autoFormatTriggerCharacters)n.add(r.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(r=>{let o=r.charCodeAt(r.length-1);n.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=new zi,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){r.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a<l;a++)if(s.changes[a].range.endLineNumber<=n.lineNumber){r.cancel(),o.dispose();return}});HF(this._workerService,this._languageFeaturesService,t,n,e,t.getFormattingOptions(),r.token).then(s=>{r.token.isCancellationRequested||Ki(s)&&(FF.execute(this._editor,s,!0),zF(s))}).finally(()=>{o.dispose()})}};fb.ID="editor.contrib.autoFormat";fb=n$([k2(1,Se),k2(2,El)],fb);var pb=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new le,this._callOnModel=new le,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(54)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(_k,this.editor,e,2,va.None,st.None).catch(ft))}};pb.ID="editor.contrib.formatOnPaste";pb=n$([k2(1,Se),k2(2,Ke)],pb);var IL=class extends de{constructor(){super({id:"editor.action.formatDocument",label:b("formatDocument.label","Format Document"),alias:"Format Document",precondition:fe.and(F.notInCompositeEditor,F.writable,F.hasDocumentFormattingProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return AL(this,void 0,void 0,function*(){if(t.hasModel()){let n=e.get(Ke);yield e.get(_l).showWhile(n.invokeFunction(BF,t,1,va.None,st.None),250)}})}},LL=class extends de{constructor(){super({id:"editor.action.formatSelection",label:b("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:fe.and(F.writable,F.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2084),weight:100},contextMenuOpts:{when:F.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return AL(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(Ke),r=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new B(a.startLineNumber,1,a.startLineNumber,r.getLineMaxColumn(a.startLineNumber)):a);yield e.get(_l).showWhile(n.invokeFunction(_k,t,o,1,va.None,st.None),250)})}};Ue(fb.ID,fb,2);Ue(pb.ID,pb,2);ee(IL);ee(LL);Dt.registerCommand("editor.action.format",i=>AL(void 0,void 0,void 0,function*(){let e=i.get(ai).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(_i);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}))});var bp,Ld,jo,nc=N(()=>{bp=class{constructor(e,t,n,r){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=r,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}},Ld=class{constructor(e,t,n,r,o,s){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=r,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}},jo=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}});var E2,T2,I2,L2=N(()=>{E2="editor.action.inlineSuggest.commit",T2="editor.action.inlineSuggest.showPrevious",I2="editor.action.inlineSuggest.showNext"});var yn,A2=N(()=>{xa();Ni();one();wt();ke();He();yn=class i extends ce{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=i.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=i.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=i.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=i.suppressSuggestions.bindTo(this.contextKeyService),this._register(pr(n=>{let r=this.model.read(n),o=r==null?void 0:r.state.read(n),s=!!(o!=null&&o.inlineCompletion)&&(o==null?void 0:o.ghostText)!==void 0&&!(o!=null&&o.ghostText.isEmpty());this.inlineCompletionVisible.set(s),o!=null&&o.ghostText&&(o!=null&&o.inlineCompletion)&&this.suppressSuggestions.set(o.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(pr(n=>{let r=this.model.read(n),o=!1,s=!0,a=r==null?void 0:r.ghostText.read(n);if(r!=null&&r.selectedSuggestItem&&a&&a.parts.length>0){let{column:l,lines:c}=a.parts[0],d=c[0],u=r.textModel.getLineIndentColumn(a.lineNumber);if(l<=u){let f=Rm(d);f===-1&&(f=d.length-1),o=f>0;let m=r.textModel.getOptions().tabSize;s=SP.visibleColumnFromColumn(d,f+1,m)<m}}this.inlineCompletionSuggestsIndentation.set(o),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(s)}))}};yn.inlineSuggestionVisible=new ht("inlineSuggestionVisible",!1,b("inlineSuggestionVisible","Whether an inline suggestion is visible"));yn.inlineSuggestionHasIndentation=new ht("inlineSuggestionHasIndentation",!1,b("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"));yn.inlineSuggestionHasIndentationLessThanTabSize=new ht("inlineSuggestionHasIndentationLessThanTabSize",!0,b("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"));yn.suppressSuggestions=new ht("inlineSuggestionSuppressSuggestions",void 0,b("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))});var r$=N(()=>{});var o$=N(()=>{r$()});function s$(i,e){let t=new ML(i),n=e.map(r=>{let o=B.lift(r.range);return{startOffset:t.getOffset(o.getStartPosition()),endOffset:t.getOffset(o.getEndPosition()),text:r.text}});n.sort((r,o)=>o.startOffset-r.startOffset);for(let r of n)i=i.substring(0,r.startOffset)+r.text+i.substring(r.endOffset);return i}function a$(){return d0e}function l$(i,e){let t=new le,n=i.createDecorationsCollection();return t.add(jF({debugName:()=>`Apply decorations from ${e.debugName}`},r=>{let o=e.read(r);n.set(o)})),t.add({dispose:()=>{n.clear()}}),t}function mb(i,e){return new Ie(i.lineNumber+e.lineNumber-1,e.lineNumber===1?i.column+e.column-1:e.column)}function gb(i){let e=1,t=1;for(let n of i)n===`
`?(e++,t=1):t++;return new Ie(e,t)}var ML,d0e,D2,vp=N(()=>{qt();ke();xa();di();et();ML=class{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)e.charAt(t)===`
`&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}},d0e=[];D2=class{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new Im(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new B(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}});function NL(i,e){return i===e?!0:!i||!e?!1:i instanceof Ad&&e instanceof Ad||i instanceof yp&&e instanceof yp?i.equals(e):!1}var Ad,_p,yp,M2=N(()=>{vp();Ad=class{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,n)=>t.equals(e.parts[n]))}renderForScreenReader(e){if(this.parts.length===0)return"";let t=this.parts[this.parts.length-1],n=e.substr(0,t.column-1);return s$(n,this.parts.map(o=>({range:{startLineNumber:1,endLineNumber:1,startColumn:o.column,endColumn:o.column},text:o.lines.join(`
`)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}},_p=class{constructor(e,t,n){this.column=e,this.lines=t,this.preview=n}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((t,n)=>t===e.lines[n])}},yp=class{constructor(e,t,n,r=0){this.lineNumber=e,this.columnRange=t,this.newLines=n,this.additionalReservedLineCount=r,this.parts=[new _p(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(`
`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,n)=>t===e.newLines[n])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}});function f0e(i,e,t,n,r){let o=n.get(32),s=n.get(115),a="none",l=n.get(92),c=n.get(50),d=n.get(49),u=n.get(65),h=new i_(1e4);h.appendString('<div class="suggest-preview-text">');for(let g=0,w=t.length;g<w;g++){let _=t[g],E=_.content;h.appendString('<div class="view-line'),h.appendString('" style="top:'),h.appendString(String(g*u)),h.appendString('px;width:1000000px;">');let A=$v(E),L=_P(E),O=YO.createEmpty(E,r);Y_(new G_(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,E,!1,A,L,0,O,_.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,s,a,l,c!==eF.OFF,null),h),h.appendString("</div>")}h.appendString("</div>"),A_(i,d);let f=h.build(),m=c$?c$.createHTML(f):f;i.innerHTML=m}var u0e,h0e,N2,RL,c$,d$=N(()=>{lk();ei();ke();xa();Ni();o$();uF();eg();di();et();zP();ts();qc();Tne();$F();GF();M2();vp();u0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},h0e=function(i,e){return function(t,n){e(t,n,i)}},N2=class extends ce{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=wa("isDisposed",!1),this.currentTextModel=Tl(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=Ro(r=>{if(this.isDisposed.read(r))return;let o=this.currentTextModel.read(r);if(o!==this.model.targetTextModel.read(r))return;let s=this.model.ghostText.read(r);if(!s)return;let a=s instanceof yp?s.columnRange:void 0,l=[],c=[];function d(g,w){if(c.length>0){let _=c[c.length-1];w&&_.decorations.push(new ag(_.content.length+1,_.content.length+1+g[0].length,w,0)),_.content+=g[0],g=g.slice(1)}for(let _ of g)c.push({content:_,decorations:w?[new ag(1,_.length+1,w,0)]:[]})}let u=o.getLineContent(s.lineNumber),h,f=0;for(let g of s.parts){let w=g.lines;h===void 0?(l.push({column:g.column,text:w[0],preview:g.preview}),w=w.slice(1)):d([u.substring(f,g.column-1)],void 0),w.length>0&&(d(w,"ghost-text"),h===void 0&&g.column<=u.length&&(h=g.column)),f=g.column-1}h!==void 0&&d([u.substring(f)],void 0);let m=h!==void 0?new D2(h,u.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:m,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o}}),this.decorations=Ro(r=>{let o=this.uiState.read(r);if(!o)return[];let s=[];o.replacedRange&&s.push({range:o.replacedRange.toRange(o.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),o.hiddenRange&&s.push({range:o.hiddenRange.toRange(o.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(let a of o.inlineTexts)s.push({range:B.fromPositions(new Ie(o.lineNumber,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:bu.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new RL(this.editor,this.languageService.languageIdCodec,Ro(r=>{let o=this.uiState.read(r);return o?{lineNumber:o.lineNumber,additionalLines:o.additionalLines,minReservedLineCount:o.additionalReservedLineCount,targetTextModel:o.targetTextModel}:void 0}))),this._register(ni(()=>{this.isDisposed.set(!0,void 0)})),this._register(l$(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};N2=u0e([h0e(2,en)],N2);RL=class extends ce{get viewZoneId(){return this._viewZoneId}constructor(e,t,n){super(),this.editor=e,this.languageIdCodec=t,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=VF("editorOptionChanged",ci.filter(this.editor.onDidChangeConfiguration,r=>r.hasChanged(32)||r.hasChanged(115)||r.hasChanged(97)||r.hasChanged(92)||r.hasChanged(50)||r.hasChanged(49)||r.hasChanged(65))),this._register(pr(r=>{let o=this.lines.read(r);this.editorOptionsChanged.read(r),o?this.updateLines(o.lineNumber,o.additionalLines,o.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,n){let r=this.editor.getModel();if(!r)return;let{tabSize:o}=r.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);let a=Math.max(t.length,n);if(a>0){let l=document.createElement("div");f0e(l,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};c$=xf("editorGhostText",{createHTML:i=>i})});var u$=N(()=>{});var h$=N(()=>{u$()});var f$=N(()=>{});var p$=N(()=>{f$()});var p0e,R2,bb,m$=N(()=>{rg();Kne();Fc();Jn();Lr();ei();ke();p$();He();p0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},R2=class extends ce{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new W9),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new le),this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new bb(()=>{var r;return(r=this.toggleMenuActionViewItem)===null||r===void 0?void 0:r.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Ds(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,actionViewItemProvider:(r,o)=>{var s;if(r.id===bb.ID)return this.toggleMenuActionViewItem=new xk(r,r.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:_t.asClassNameArray((s=n.moreIcon)!==null&&s!==void 0?s:pt.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){let a=n.actionViewItemProvider(r,o);if(a)return a}if(r instanceof Nm){let a=new xk(r,r.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:r.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();let n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(r=>{this.actionBar.push(r,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(r)})})}getKeybindingLabel(e){var t,n,r;let o=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return(r=o==null?void 0:o.getLabel())!==null&&r!==void 0?r:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}},bb=class i extends Zo{constructor(e,t){t=t||b("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return p0e(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};bb.ID="toolbar.toggle.more"});var m0e,vb,P2,g$=N(()=>{Ht();J9();m$();Fc();mi();ke();He();Ji();wt();wl();Wn();Bc();m0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},vb=function(i,e){return function(t,n){e(t,n,i)}},P2=class extends R2{constructor(e,t,n,r,o,s,a){super(e,o,Object.assign(Object.assign({getKeyBinding:c=>{var d;return(d=s.lookupKeybinding(c.id))!==null&&d!==void 0?d:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"})),this._options=t,this._menuService=n,this._contextKeyService=r,this._contextMenuService=o,this._sessionDisposables=this._store.add(new le);let l=t==null?void 0:t.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(c=>a.publicLog2("workbenchActionExecuted",{id:c.action.id,from:l})))}setActions(e,t=[],n){var r,o,s;this._sessionDisposables.clear();let a=e.slice(),l=t.slice(),c=[],d=0,u=[],h=!1;if(((r=this._options)===null||r===void 0?void 0:r.hiddenItemStrategy)!==-1)for(let f=0;f<a.length;f++){let m=a[f];!(m instanceof oa)&&!(m instanceof Pm)||m.hideActions&&(c.push(m.hideActions.toggle),m.hideActions.toggle.checked&&d++,m.hideActions.isHidden&&(h=!0,a[f]=void 0,((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==0&&(u[f]=m)))}if(((s=this._options)===null||s===void 0?void 0:s.maxNumberOfItems)!==void 0){let f=0;for(let m=0;m<a.length;m++){let g=a[m];g&&++f>=this._options.maxNumberOfItems&&(a[m]=void 0,u[m]=g)}}$3(a),$3(u),super.setActions(a,Ss.join(u,l)),c.length>0&&this._sessionDisposables.add(At(this.getElement(),"contextmenu",f=>{var m,g,w,_,E;let A=new Vv(f),L=this.getItemAction(A.target);if(!L)return;A.preventDefault(),A.stopPropagation();let O=!1;if(d===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){O=!0;for(let ae=0;ae<c.length;ae++)if(c[ae].checked){c[ae]=tf({id:L.id,label:L.label,checked:!0,enabled:!1,run(){}});break}}let U;if(!O&&(L instanceof oa||L instanceof Pm)){if(!L.hideActions)return;U=L.hideActions.hide}else U=tf({id:"label",label:b("hide","Hide"),enabled:!1,run(){}});let Q=Ss.join([U],c);!((g=this._options)===null||g===void 0)&&g.resetMenu&&!n&&(n=[this._options.resetMenu]),h&&n&&(Q.push(new Ss),Q.push(tf({id:"resetThisMenu",label:b("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>A,getActions:()=>Q,menuId:(w=this._options)===null||w===void 0?void 0:w.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(_=this._options)===null||_===void 0?void 0:_.menuOptions),skipTelemetry:typeof((E=this._options)===null||E===void 0?void 0:E.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};P2=m0e([vb(2,ks),vb(3,it),vb(4,rs),vb(5,Kt),vb(6,Ar)],P2)});var zL,qs,O2,F2,g0e,b0e,Ks,PL,OL,FL,z2=N(()=>{Ht();gF();vF();Fc();mi();jt();Jn();ke();xa();Tr();Lr();h$();di();fr();L2();He();J_();g$();Ji();Vi();wt();wl();Ut();Wn();Bc();kl();zL=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qs=function(i,e){return function(t,n){e(t,n,i)}},F2=class extends ce{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=Tl(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).showToolbar==="always"),this.sessionPosition=void 0,this.position=Ro(r=>{var o,s,a;let l=(o=this.model.read(r))===null||o===void 0?void 0:o.ghostText.read(r);if(!this.alwaysShowToolbar.read(r)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;let c=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);let d=new Ie(l.lineNumber,Math.min(c,(a=(s=this.sessionPosition)===null||s===void 0?void 0:s.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=d,d}),this._register(WF((r,o)=>{let s=this.model.read(r);if(!s||!this.alwaysShowToolbar.read(r))return;let a=o.add(this.instantiationService.createInstance(Ks,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(l=>{var c;return(c=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&c!==void 0?c:[]})));e.addContentWidget(a),o.add(ni(()=>e.removeContentWidget(a))),o.add(pr(l=>{this.position.read(l)&&s.lastTriggerKind.read(l)!==ma.Explicit&&s.triggerExplicitly()}))}))}};F2=zL([qs(2,Ke)],F2);g0e=Pi("inline-suggestion-hints-next",pt.chevronRight,b("parameterHintsNextIcon","Icon for show next parameter hint.")),b0e=Pi("inline-suggestion-hints-previous",pt.chevronLeft,b("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Ks=O2=class extends ce{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){let r=new Zo(e,t,n,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return o&&(s=b({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),r.tooltip=s,r}constructor(e,t,n,r,o,s,a,l,c,d,u){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=r,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=d,this._menuService=u,this.id=`InlineSuggestionHintsContentWidget${O2.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Kv("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Kv("div@toolBar")]),this.previousAction=this.createCommandAction(T2,b("previous","Previous"),_t.asClassName(b0e)),this.availableSuggestionCountAction=new Zo("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(I2,b("next","Next"),_t.asClassName(g0e)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Me.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new ui(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new ui(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(l.createInstance(FL,this.nodes.toolBar,Me.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,f)=>{if(h instanceof oa)return l.createInstance(OL,h,void 0);if(h===this.availableSuggestionCountAction){let m=new PL(void 0,h,{label:!0,icon:!1});return m.setClass("availableSuggestionCount"),m}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{O2._dropDownVisible=h})),this._register(pr(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(pr(h=>{let f=this._suggestionCount.read(h),m=this._currentSuggestionIdx.read(h);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${f}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),f!==void 0&&f>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(pr(h=>{let f=this._extraCommands.read(h);if(Es(this.lastCommands,f))return;this.lastCommands=f;let m=f.map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:w=>this._commandService.executeCommand(g.id)}));for(let[g,w]of this.inlineCompletionsActionsMenus.getActions())for(let _ of w)_ instanceof oa&&m.push(_);m.length>0&&m.unshift(new Ss),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Ks._dropDownVisible=!1;Ks.id=0;Ks=O2=zL([qs(6,_i),qs(7,Ke),qs(8,Kt),qs(9,it),qs(10,ks)],Ks);PL=class extends ng{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}},OL=class extends Z_{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=Kv("div.keybinding").root;new P_(t,jv,Object.assign({disableTitle:!0},bF)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},FL=class extends P2{constructor(e,t,n,r,o,s,a,l){super(e,Object.assign({resetMenu:t},n),r,o,s,a,l),this.menuId=t,this.options2=n,this.menuService=r,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,r,o,s,a;let l=[],c=[];Q_(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:c},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(o=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||o===void 0?void 0:o.shouldInlineSubmenu,(a=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),c.push(...this.additionalActions),l.unshift(...this.prependedPrimaryActions),this.setActions(l,c)}setPrependedPrimaryActions(e){Es(this.prependedPrimaryActions,e,(t,n)=>t===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Es(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};FL=zL([qs(3,ks),qs(4,it),qs(5,rs),qs(6,Kt),qs(7,Ar)],FL)});function b$(i,e){let t=new sO,n=new lO(t,c=>e.getLanguageConfiguration(c)),r=new aO(new BL([i]),n),o=cO(r,[],void 0,!0),s="",a=i.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=pf(d,c.openingBracket.length),c.child&&(l(c.child,d),d=pf(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=pf(d,c.closingBracket.length);else{let h=n.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);s+=h}else if(c.kind!==3){if(c.kind===0||c.kind===1)s+=a.substring(d,pf(d,c.length));else if(c.kind===4)for(let u of c.children)l(u,d),d=pf(d,u.length)}}return l(o,oO),s}var BL,v$=N(()=>{xne();vne();Cne();_ne();wne();BL=class{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}});function _$(i,e){let t=[...i];for(;t.length>0;){let n=t.shift();if(!e(n))break;t.unshift(...n.children)}}var B2,Dd,Pn,H2,_o,lh,HL,$s,_b,wp,Wo,ch=N(()=>{B2=class i{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,n=this.value.charCodeAt(e),r;if(r=i._table[n],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(i.isDigitCharacter(n)){r=8;do t+=1,n=this.value.charCodeAt(e+t);while(i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}if(i.isVariableCharacter(n)){r=9;do n=this.value.charCodeAt(e+ ++t);while(i.isVariableCharacter(n)||i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof i._table[n]=="undefined"&&!i.isDigitCharacter(n)&&!i.isVariableCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}};B2._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};Dd=class{constructor(){this._children=[]}appendChild(e){return e instanceof Pn&&this._children[this._children.length-1]instanceof Pn?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.slice(0);o.splice(r,1,...t),n._children=o,function s(a,l){for(let c of a)c.parent=l,s(c.children,c)}(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof wp)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},Pn=class i extends Dd{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},H2=class extends Dd{},_o=class i extends H2{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof lh?this._children[0]:void 0}clone(){let e=new i(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},lh=class i extends Dd{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Pn&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new i;return this.options.forEach(e.appendChild,e),e}},HL=class i extends Dd{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,n=!1,r=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(o=>o instanceof $s&&!!o.elseValue)&&(r=this._replace([])),r}_replace(e){let t="";for(let n of this._children)if(n instanceof $s){let r=e[n.index]||"";r=n.resolve(r),t+=r}else t+=n.toString();return t}toString(){return""}clone(){let e=new i;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},$s=class i extends Dd{constructor(e,t,n,r){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=r}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((n,r)=>r===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new i(this.index,this.shorthandName,this.ifValue,this.elseValue)}},_b=class i extends H2{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Pn(t)],!0):!1}clone(){let e=new i(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};wp=class i extends Dd{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof _o&&(e.push(n),t=!t||t.index<n.index?n:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){let{all:e}=this.placeholderInfo;return e}offset(e){let t=0,n=!1;return this.walk(r=>r===e?(n=!0,!1):(t+=r.len(),!0)),n?t:-1}fullLen(e){let t=0;return _$([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof _o&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof _b&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new i;return this._children=this.children.map(t=>t.clone()),e}walk(e){_$(this.children,e)}},Wo=class{constructor(){this._scanner=new B2,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){let r=new wp;return this.parseFragment(e,r),this.ensureFinalTabstop(r,n!=null?n:!1,t!=null?t:!1),r}parseFragment(e,t){let n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let r=new Map,o=[];t.walk(l=>(l instanceof _o&&(l.isFinalTabstop?r.set(0,void 0):!r.has(l.index)&&l.children.length>0?r.set(l.index,l.children):o.push(l)),!0));let s=(l,c)=>{let d=r.get(l.index);if(!d)return;let u=new _o(l.index);u.transform=l.transform;for(let h of d){let f=h.clone();u.appendChild(f),f instanceof _o&&r.has(f.index)&&!c.has(f.index)&&(c.add(f.index),s(f,c),c.delete(f.index))}t.replace(l,[u])},a=new Set;for(let l of o)s(l,a);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new _o(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.type!==5)return!1}this._token=this._scanner.next()}let n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Pn(t)),!0):!1}_parseTabstopOrVariableName(e){let t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new _o(Number(t)):new _b(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);let o=new _o(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Pn("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new lh;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseChoiceElement(e){let t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;n.push(r)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new Pn(n.join(""))),!0)}_parseComplexVariable(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);let o=new _b(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Pn("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseTransform(e){let t=new HL,n="",r="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,n+=o;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new Pn(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,r)}catch(o){return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let r=this._accept(8,!0);if(r)if(n){if(this._accept(4))return e.appendChild(new $s(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new $s(Number(r))),!0;else return this._backTo(t),!1;if(this._accept(6)){let o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new $s(Number(r),o)),!0)}else if(this._accept(11)){let o=this._until(4);if(o)return e.appendChild(new $s(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){let o=this._until(4);if(o)return e.appendChild(new $s(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){let o=this._until(1);if(o){let s=this._until(4);if(s)return e.appendChild(new $s(Number(r),void 0,o,s)),!0}}else{let o=this._until(4);if(o)return e.appendChild(new $s(Number(r),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Pn(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}});function w$(i,e,t,n,r=st.None,o){return UL(this,void 0,void 0,function*(){let s=v0e(e,t),a=i.all(t),l=new XF;for(let _ of a)_.groupId&&l.add(_.groupId,_);function c(_){if(!_.yieldsToGroupIds)return[];let E=[];for(let A of _.yieldsToGroupIds||[]){let L=l.get(A);for(let O of L)E.push(O)}return E}let d=new Map,u=new Set;function h(_,E){if(E=[...E,_],u.has(_))return E;u.add(_);try{let A=c(_);for(let L of A){let O=h(L,E);if(O)return O}}finally{u.delete(_)}}function f(_){let E=d.get(_);if(E)return E;let A=h(_,[]);A&&Xt(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${A.map(O=>O.toString?O.toString():""+O).join(" -> ")}`));let L=new f_;return d.set(_,L.p),(()=>UL(this,void 0,void 0,function*(){if(!A){let O=c(_);for(let U of O){let Q=yield f(U);if(Q&&Q.items.length>0)return}}try{return yield _.provideInlineCompletions(t,e,n,r)}catch(O){Xt(O);return}}))().then(O=>L.complete(O),O=>L.error(O)),L.p}let m=yield Promise.all(a.map(_=>UL(this,void 0,void 0,function*(){return{provider:_,completions:yield f(_)}}))),g=new Map,w=[];for(let _ of m){let E=_.completions;if(!E)continue;let A=new WL(E,_.provider);w.push(A);for(let L of E.items){let O=VL.from(L,A,s,t,o);g.set(O.hash(),O)}}return new jL(Array.from(g.values()),new Set(g.keys()),w)})}function v0e(i,e){let t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new B(i.lineNumber,t.startColumn,i.lineNumber,n):B.fromPositions(i,i.with(void 0,n))}function y$(i,e,t,n){let o=t.getLineContent(e.lineNumber).substring(0,e.column-1)+i,s=t.tokenization.tokenizeLineWithEdit(e,o.length-(e.column-1),i),a=s==null?void 0:s.sliceAndInflate(e.column-1,o.length,0);return a?b$(a,n):i}var UL,jL,WL,VL,x$=N(()=>{rne();jt();ki();$ne();qt();et();v$();vp();ch();UL=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};jL=class{constructor(e,t,n){this.completions=e,this.hashs=t,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(let e of this.providerResults)e.removeRef()}},WL=class{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}},VL=class i{static from(e,t,n,r,o){let s,a,l=e.range?B.lift(e.range):n;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=y$(s,l.getStartPosition(),r,o);let c=s.length-e.insertText.length;c!==0&&(l=new B(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+c))}a=void 0}else if("snippet"in e.insertText){let c=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=y$(e.insertText.snippet,l.getStartPosition(),r,o);let u=e.insertText.snippet.length-c;u!==0&&(l=new B(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+u))}let d=new Wo().parse(e.insertText.snippet);d.children.length===1&&d.children[0]instanceof Pn?(s=d.children[0].value,a=void 0):(s=d.toString(),a={snippet:e.insertText.snippet,range:l})}else wP(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||a$(),e,t)}constructor(e,t,n,r,o,s,a,l){this.filterText=e,this.command=t,this.range=n,this.insertText=r,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,`
`),r=e.replace(/\r\n|\r/g,`
`)}withRange(e){return new i(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}});function _0e(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}function y0e(i,e){if((Ga==null?void 0:Ga.originalValue)===i&&(Ga==null?void 0:Ga.newValue)===e)return Ga==null?void 0:Ga.changes;{let t=S$(i,e,!0);if(t){let n=C$(t);if(n>0){let r=S$(i,e,!1);r&&C$(r)<n&&(t=r)}}return Ga={originalValue:i,newValue:e,changes:t},t}}function C$(i){let e=0;for(let t of i)e+=t.originalLength;return e}function S$(i,e,t){if(i.length>5e3||e.length>5e3)return;function n(c){let d=0;for(let u=0,h=c.length;u<h;u++){let f=c.charCodeAt(u);f>d&&(d=f)}return d}let r=Math.max(n(i),n(e));function o(c){if(c<0)throw new Error("unexpected");return r+c+1}function s(c){let d=0,u=0,h=new Int32Array(c.length);for(let f=0,m=c.length;f<m;f++)if(t&&c[f]==="("){let g=u*100+d;h[f]=o(2*g),d++}else if(t&&c[f]===")"){d=Math.max(d-1,0);let g=u*100+d;h[f]=o(2*g+1),d===0&&u++}else h[f]=c.charCodeAt(f);return h}let a=s(i),l=s(e);return new QF({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}var dh,Ga,qL=N(()=>{Gne();Ni();et();M2();vp();dh=class i{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){let n=t?this.range.intersectRanges(t):this.range;if(!n)return this;let r=e.getValueInRange(n,1),o=zc(r,this.text),s=mb(this.range.getStartPosition(),gb(r.substring(0,o))),a=this.text.substring(o),l=B.fromPositions(s,this.range.getEndPosition());return new i(l,a)}augments(e){return this.text.startsWith(e.text)&&_0e(this.range,e.range)}computeGhostText(e,t,n,r=0){let o=this.removeCommonPrefix(e);if(o.range.endLineNumber!==o.range.startLineNumber)return;let s=e.getLineContent(o.range.startLineNumber),a=qi(s).length;if(o.range.startColumn-1<=a){let m=qi(o.text).length,g=s.substring(o.range.startColumn-1,a),[w,_]=[o.range.getStartPosition(),o.range.getEndPosition()],E=w.column+g.length<=_.column?w.delta(0,g.length):_,A=B.fromPositions(E,_),L=o.text.startsWith(g)?o.text.substring(g.length):o.text.substring(m);o=new i(A,L)}let c=e.getValueInRange(o.range),d=y0e(c,o.text);if(!d)return;let u=o.range.startLineNumber,h=new Array;if(t==="prefix"){let m=d.filter(g=>g.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==c.length)return}let f=o.text.length-r;for(let m of d){let g=o.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===o.range.startLineNumber&&g<n.column||m.originalLength>0)return;if(m.modifiedLength===0)continue;let w=m.modifiedStart+m.modifiedLength,_=Math.max(m.modifiedStart,Math.min(w,f)),E=o.text.substring(m.modifiedStart,_),A=o.text.substring(_,Math.max(m.modifiedStart,w));if(E.length>0){let L=hu(E);h.push(new _p(g,L,!1))}if(A.length>0){let L=hu(A);h.push(new _p(g,L,!0))}}return new Ad(u,h)}}});function C0e(i,e){return new Promise(t=>{let n,r=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(r),n&&n.dispose(),t()}))})}function S0e(i,e,t){return!i||!e?i===e:t(i,e)}function E$(i){return i.startLineNumber===i.endLineNumber?new Ie(1,1+i.endColumn-i.startColumn):new Ie(1+i.endLineNumber-i.startLineNumber,i.endColumn)}var w0e,k$,x0e,U2,KL,$L,GL,j2,T$=N(()=>{ki();ml();ke();xa();di();fr();Un();Pt();x$();qL();w0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},k$=function(i,e){return function(t,n){e(t,n,i)}},x0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},U2=class extends ce{constructor(e,t,n,r,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=r,this.languageConfigurationService=o,this._updateOperation=this._register(new Wi),this.inlineCompletions=sg("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=sg("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){var r,o;let s=new KL(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((r=this._updateOperation.value)===null||r===void 0)&&r.request.satisfies(s))return this._updateOperation.value.promise;if(!((o=a.get())===null||o===void 0)&&o.request.satisfies(s))return Promise.resolve(!0);let l=!!this._updateOperation.value;this._updateOperation.clear();let c=new zi,d=(()=>x0e(this,void 0,void 0,function*(){if((l||t.triggerKind===ma.Automatic)&&(yield C0e(this._debounceValue.get(this.textModel))),c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let f=new Date,m=yield w$(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,c.token,this.languageConfigurationService);if(c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let g=new Date;this._debounceValue.update(this.textModel,g.getTime()-f.getTime());let w=new GL(m,s,this.textModel,this.versionId);if(n){let _=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!m.has(_)&&w.prepend(n.inlineCompletion,_.range,!0)}return this._updateOperation.clear(),or(_=>{a.set(w,_)}),!0}))(),u=new $L(s,c,d);return this._updateOperation.value=u,d}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};U2=w0e([k$(3,Se),k$(4,Ot)],U2);KL=class{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&S0e(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,n)=>t.equals(n))&&(e.context.triggerKind===ma.Automatic||this.context.triggerKind===ma.Explicit)&&this.versionId===e.versionId}};$L=class{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}},GL=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,r){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=n,this.versionId=r,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=Ro(s=>{this.versionId.read(s);let a=!1;for(let l of this._inlineCompletions)a=a||l._updateRange(this.textModel);return a&&this._rangeVersionIdValue++,this._rangeVersionIdValue});let o=n.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new j2(s,o[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();let r=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new j2(e,r,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}},j2=class{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,n,r){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=r!=null?r:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new dh(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,n){let r=this._toFilterTextReplacement(n).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(n).getStartPosition())||t.lineNumber!==r.range.startLineNumber)return!1;let o=e.getValueInRange(r.range,1).toLowerCase(),s=r.text.toLowerCase(),a=Math.max(0,t.column-r.range.startColumn),l=s.substring(0,a),c=s.substring(a),d=o.substring(0,a),u=o.substring(a),h=e.getLineIndentColumn(r.range.startLineNumber);return r.range.startColumn<=h&&(d=d.trimStart(),d.length===0&&(u=u.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&!!VP(u,c)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new dh(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return E$(this._getUpdatedRange(e)).isBefore(E$(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){let t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}}});function I$(){return xp}function wb(i,e,t,n=rc.default,r={triggerKind:0},o=st.None){return yb(this,void 0,void 0,function*(){let s=new gn;t=t.clone();let a=e.getWordAtPosition(t),l=a?new B(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):B.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],u=new le,h=[],f=!1,m=(w,_,E)=>{var A,L,O;let U=!1;if(!_)return U;for(let Q of _.suggestions)if(!n.kindFilter.has(Q.kind)){if(!n.showDeprecated&&(!((A=Q==null?void 0:Q.tags)===null||A===void 0)&&A.includes(1)))continue;Q.range||(Q.range=c),Q.sortText||(Q.sortText=typeof Q.label=="string"?Q.label:Q.label.label),!f&&Q.insertTextRules&&Q.insertTextRules&4&&(f=Wo.guessNeedsClipboard(Q.insertText)),d.push(new YL(t,Q,_,w)),U=!0}return Fv(_)&&u.add(_),h.push({providerName:(L=w._debugDisplayName)!==null&&L!==void 0?L:"unknown_provider",elapsedProvider:(O=_.duration)!==null&&O!==void 0?O:-1,elapsedOverall:E.elapsed()}),U},g=(()=>yb(this,void 0,void 0,function*(){if(!xp||n.kindFilter.has(27))return;let w=n.providerItemsToReuse.get(xp);if(w){w.forEach(A=>d.push(A));return}if(n.providerFilter.size>0&&!n.providerFilter.has(xp))return;let _=new gn,E=yield xp.provideCompletionItems(e,t,r,o);m(xp,E,_)}))();for(let w of i.orderedGroups(e)){let _=!1;if(yield Promise.all(w.map(E=>yb(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(E)){let A=n.providerItemsToReuse.get(E);A.forEach(L=>d.push(L)),_=_||A.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(E)))try{let A=new gn,L=yield E.provideCompletionItems(e,t,r,o);_=m(E,L,A)||_}catch(A){Xt(A)}}))),_||o.isCancellationRequested)break}return yield g,o.isCancellationRequested?(u.dispose(),Promise.reject(new Pv)):new XL(d.sort(T0e(n.snippetSortOrder)),f,{entries:h,elapsed:s.elapsed()},u)})}function QL(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLow<e.sortTextLow)return-1;if(i.sortTextLow>e.sortTextLow)return 1}return i.textLabel<e.textLabel?-1:i.textLabel>e.textLabel?1:i.completion.kind-e.completion.kind}function k0e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return QL(i,e)}function E0e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return QL(i,e)}function T0e(i){return W2.get(i)}function L$(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}var yb,ct,Xa,YL,rc,xp,XL,W2,Ya,uh=N(()=>{ki();qt();ml();ke();ll();Bn();Ln();di();et();ra();ch();He();Ji();Vi();wt();Pt();BI();yb=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},ct={Visible:g2,HasFocusedSuggestion:new ht("suggestWidgetHasFocusedSuggestion",!1,b("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new ht("suggestWidgetDetailsVisible",!1,b("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new ht("suggestWidgetMultipleSuggestions",!1,b("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new ht("suggestionMakesTextEdit",!0,b("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new ht("acceptSuggestionOnEnter",!0,b("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new ht("suggestionHasInsertAndReplaceRange",!1,b("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new ht("suggestionInsertMode",void 0,{type:"string",description:b("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new ht("suggestionCanResolve",!1,b("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Xa=new Me("suggestWidgetStatusBar"),YL=class{constructor(e,t,n,r){var o;this.position=e,this.completion=t,this.container=n,this.provider=r,this.isInvalid=!1,this.score=pl.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(o=t.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,B.isIRange(t.range)?(this.editStart=new Ie(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new Ie(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new Ie(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||B.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new Ie(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new Ie(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new Ie(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||B.spansMultipleLines(t.range.insert)||B.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}resolve(e){return yb(this,void 0,void 0,function*(){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),n=new gn(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(r=>{Object.assign(this.completion,r),this._resolveDuration=n.elapsed(),t.dispose()},r=>{Xo(r)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})}return this._resolveCache})}},rc=class{constructor(e=2,t=new Set,n=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=r,this.showDeprecated=o}};rc.default=new rc;XL=class{constructor(e,t,n,r){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=r}};W2=new Map;W2.set(0,k0e);W2.set(2,E0e);W2.set(1,QL);Dt.registerCommand("_executeCompletionItemProvider",(i,...e)=>yb(void 0,void 0,void 0,function*(){let[t,n,r,o]=e;Bt(yt.isUri(t)),Bt(Ie.isIPosition(n)),Bt(typeof r=="string"||!r),Bt(typeof o=="number"||!o);let{completionProvider:s}=i.get(Se),a=yield i.get(Sn).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],d=a.object.textEditorModel.validatePosition(n),u=yield wb(s,a.object.textEditorModel,d,void 0,{triggerCharacter:r!=null?r:void 0,triggerKind:r?1:0});for(let h of u.items)c.length<(o!=null?o:0)&&c.push(h.resolve(st.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>u.disposable.dispose(),100)}}finally{a.dispose()}}));Ya=class{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}});var A$=N(()=>{});var D$=N(()=>{A$()});function ZL(i,e=Rc){return YP(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var M$=N(()=>{gne();Tr()});var I0e,L0e,cYe,xb,Cb,Sb,kb,Eb,oc,Tb,Ib,N$=N(()=>{M$();tP();Do();Ni();H0();Un();ch();He();U_();I0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},L0e=function(i,e){return function(t,n){e(t,n,i)}},cYe=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0}),xb=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let n=t.resolve(e);if(n!==void 0)return n}}},Cb=class{constructor(e,t,n,r){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=r}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,r=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){let o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(n=o.value,r=o.multiline)}if(n&&r&&e.snippet){let o=this._model.getLineContent(this._selection.startLineNumber),s=qi(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof Pn&&(a=qi(hu(c.value).pop())),!0));let l=zc(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,d,u)=>`${d}${a.substr(l)}${u}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}},Sb=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return ef(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let n=ef(this._model.uri.fsPath),r=n.lastIndexOf(".");return r<=0?n:n.slice(0,r)}else{if(t==="TM_DIRECTORY")return eP(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(uf(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}},kb=class{constructor(e,t,n,r){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=r}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let n=t.split(/\r\n|\n|\r/).filter(r=>!hP(r));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}},Eb=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){let{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),r=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(r){if(t==="LINE_COMMENT")return r.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return r.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return r.blockCommentEndToken||void 0}}};Eb=I0e([L0e(2,Ot)],Eb);oc=class i{constructor(){this._date=new Date}resolve(e){let{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return i.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return i.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return i.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return i.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){let n=this._date.getTimezoneOffset(),r=n>0?"-":"+",o=Math.trunc(Math.abs(n/60)),s=o<10?"0"+o:o,a=Math.abs(n)-o*60,l=a<10?"0"+a:a;return r+s+":"+l}}};oc.dayNames=[b("Sunday","Sunday"),b("Monday","Monday"),b("Tuesday","Tuesday"),b("Wednesday","Wednesday"),b("Thursday","Thursday"),b("Friday","Friday"),b("Saturday","Saturday")];oc.dayNamesShort=[b("SundayShort","Sun"),b("MondayShort","Mon"),b("TuesdayShort","Tue"),b("WednesdayShort","Wed"),b("ThursdayShort","Thu"),b("FridayShort","Fri"),b("SaturdayShort","Sat")];oc.monthNames=[b("January","January"),b("February","February"),b("March","March"),b("April","April"),b("May","May"),b("June","June"),b("July","July"),b("August","August"),b("September","September"),b("October","October"),b("November","November"),b("December","December")];oc.monthNamesShort=[b("JanuaryShort","Jan"),b("FebruaryShort","Feb"),b("MarchShort","Mar"),b("AprilShort","Apr"),b("MayShort","May"),b("JuneShort","Jun"),b("JulyShort","Jul"),b("AugustShort","Aug"),b("SeptemberShort","Sep"),b("OctoberShort","Oct"),b("NovemberShort","Nov"),b("DecemberShort","Dec")];Tb=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=TF(this._workspaceService.getWorkspace());if(!EF(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(fk(e))return ef(e.uri.path);let t=ef(e.configPath.path);return t.endsWith(pk)&&(t=t.substr(0,t.length-pk.length-1)),t}_resoveWorkspacePath(e){if(fk(e))return ZL(e.uri.fsPath);let t=ef(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?ZL(n):"/"}},Ib=class{resolve(e){let{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return Td()}}});var A0e,D0e,Gs,Lb,R$,Cp,JL=N(()=>{mi();ke();Ni();D$();ya();et();An();Un();jn();ey();U_();ch();N$();A0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},D0e=function(i,e){return function(t,n){e(t,n,i)}},Lb=class i{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=K3(t.placeholders,_o.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;let e=this._editor.getModel();this._editor.changeDecorations(t=>{for(let n of this._snippet.placeholders){let r=this._snippet.offset(n),o=this._snippet.fullLen(n),s=B.fromPositions(e.getPositionAt(this._offset+r),e.getPositionAt(this._offset+r+o)),a=n.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let r=[];for(let o of this._placeholderGroups[this._placeholderGroupsIdx])if(o.transform){let s=this._placeholderDecorations.get(o),a=this._editor.getModel().getDecorationRange(s),l=this._editor.getModel().getValueInRange(a),c=o.transform.resolve(l).split(/\r\n|\r|\n/);for(let d=1;d<c.length;d++)c[d]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+c[d]);r.push(ii.replace(a,c.join(this._editor.getModel().getEOL())))}r.length>0&&this._editor.executeEdits("snippet.placeholderTransform",r)}let t=!1;e===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):e===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);let n=this._editor.getModel().changeDecorations(r=>{let o=new Set,s=[];for(let a of this._placeholderGroups[this._placeholderGroupsIdx]){let l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);s.push(new Qe(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(a);for(let d of this._snippet.enclosingPlaceholders(a)){let u=this._placeholderDecorations.get(d);r.changeDecorationOptions(u,d.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(d)}}for(let[a,l]of this._placeholderDecorations)o.has(a)||r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):n!=null?n:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof _o){let n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){let[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){let e=new Map;for(let t of this._placeholderGroups){let n;for(let r of t){if(r.isFinalTabstop)break;n||(n=[],e.set(r.index,n));let o=this._placeholderDecorations.get(r),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(r.index);break}n.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;let e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;let t=this._placeholderDecorations.get(e);if(!t)return;let n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof lh,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(let r of this._placeholderGroups[this._placeholderGroupsIdx]){let o=e.shift();console.assert(o._offset!==-1),console.assert(!o._placeholderDecorations);let s=o._snippet.placeholderInfo.last.index;for(let l of o._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=r.index+(s+1)/this._nestingLevel:l.index=r.index+l.index/this._nestingLevel;this._snippet.replace(r,o._snippet.children);let a=this._placeholderDecorations.get(r);n.removeDecoration(a),this._placeholderDecorations.delete(r);for(let l of o._snippet.placeholders){let c=o._snippet.offset(l),d=o._snippet.fullLen(l),u=B.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+d)),h=n.addDecoration(u,i._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=K3(this._snippet.placeholders,_o.compareByIndex)})}};Lb._decor={active:mt.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:mt.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:mt.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:mt.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};R$={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},Cp=Gs=class{static adjustWhitespace(e,t,n,r,o){let s=e.getLineContent(t.lineNumber),a=qi(s,0,t.column-1),l;return r.walk(c=>{if(!(c instanceof Pn)||c.parent instanceof lh||o&&!o.has(c))return!0;let d=c.value.split(/\r\n|\r|\n/);if(n){let h=r.offset(c);if(h===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:r.toString();let f=l.charCodeAt(h-1);(f===10||f===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let f=1;f<d.length;f++)d[f]=e.normalizeIndentation(a+d[f])}let u=d.join(e.getEOL());return u!==c.value&&(c.parent.replace(c,[new Pn(u)]),l=void 0),!0}),a}static adjustSelection(e,t,n,r){if(n!==0||r!==0){let{positionLineNumber:o,positionColumn:s}=t,a=s-n,l=s+r,c=e.validateRange({startLineNumber:o,startColumn:a,endLineNumber:o,endColumn:l});t=Qe.createWithDirection(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn,t.getDirection())}return t}static createEditsAndSnippetsFromSelections(e,t,n,r,o,s,a,l,c){let d=[],u=[];if(!e.hasModel())return{edits:d,snippets:u};let h=e.getModel(),f=e.invokeWithinContext(L=>L.get(Cl)),m=e.invokeWithinContext(L=>new Sb(L.get(Il),h)),g=()=>a,w=h.getValueInRange(Gs.adjustSelection(h,e.getSelection(),n,0)),_=h.getValueInRange(Gs.adjustSelection(h,e.getSelection(),0,r)),E=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),A=e.getSelections().map((L,O)=>({selection:L,idx:O})).sort((L,O)=>B.compareRangesUsingStarts(L.selection,O.selection));for(let{selection:L,idx:O}of A){let U=Gs.adjustSelection(h,L,n,0),Q=Gs.adjustSelection(h,L,0,r);w!==h.getValueInRange(U)&&(U=L),_!==h.getValueInRange(Q)&&(Q=L);let ae=L.setStartPosition(U.startLineNumber,U.startColumn).setEndPosition(Q.endLineNumber,Q.endColumn),te=new Wo().parse(t,!0,o),Z=ae.getStartPosition(),ve=Gs.adjustWhitespace(h,Z,s||O>0&&E!==h.getLineFirstNonWhitespaceColumn(L.positionLineNumber),te);te.resolveVariables(new xb([m,new kb(g,O,A.length,e.getOption(77)==="spread"),new Cb(h,L,O,l),new Eb(h,L,c),new oc,new Tb(f),new Ib])),d[O]=ii.replace(ae,te.toString()),d[O].identifier={major:O,minor:0},d[O]._isTracked=!0,u[O]=new Lb(e,te,ve)}return{edits:d,snippets:u}}static createEditsAndSnippetsFromEdits(e,t,n,r,o,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),d=new Wo,u=new wp,h=new xb([e.invokeWithinContext(m=>new Sb(m.get(Il),c)),new kb(()=>o,0,e.getSelections().length,e.getOption(77)==="spread"),new Cb(c,e.getSelection(),0,s),new Eb(c,e.getSelection(),a),new oc,new Tb(e.invokeWithinContext(m=>m.get(Cl))),new Ib]);t=t.sort((m,g)=>B.compareRangesUsingStarts(m.range,g.range));let f=0;for(let m=0;m<t.length;m++){let{range:g,template:w}=t[m];if(m>0){let O=t[m-1].range,U=B.fromPositions(O.getEndPosition(),g.getStartPosition()),Q=new Pn(c.getValueInRange(U));u.appendChild(Q),f+=Q.value.length}let _=d.parseFragment(w,u);Gs.adjustWhitespace(c,g.getStartPosition(),!0,u,new Set(_)),u.resolveVariables(h);let E=u.toString(),A=E.slice(f);f=E.length;let L=ii.replace(g,A);L.identifier={major:m,minor:0},L._isTracked=!0,l.push(L)}return d.ensureFinalTabstop(u,n,!0),{edits:l,snippets:[new Lb(e,u,"")]}}constructor(e,t,n=R$,r){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=r,this._templateMerges=[],this._snippets=[]}dispose(){ji(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;let{edits:e,snippets:t}=typeof this._template=="string"?Gs.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):Gs.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{let r=n.filter(o=>!!o.identifier);for(let o=0;o<t.length;o++)t[o].initialize(r[o].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):r.map(o=>Qe.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=R$){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:n,snippets:r}=Gs.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,o=>{let s=o.filter(l=>!!l.identifier);for(let l=0;l<r.length;l++)r[l].initialize(s[l].textChange);let a=r[0].isTrivialSnippet;if(!a){for(let l of this._snippets)l.merge(r);console.assert(r.length===0)}return this._snippets[0].hasPlaceholder&&!a?this._move(void 0):s.map(l=>Qe.fromPositions(l.range.getEndPosition()))})}next(){let e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){let e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){let t=[];for(let n of this._snippets){let r=n.move(e);t.push(...r)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;let e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;let t=new Map;for(let n of this._snippets){let r=n.computePossibleSelections();if(t.size===0)for(let[o,s]of r){s.sort(B.compareRangesUsingStarts);for(let a of e)if(s[0].containsRange(a)){t.set(o,[]);break}}if(t.size===0)return!1;t.forEach((o,s)=>{o.push(...r.get(s))})}e.sort(B.compareRangesUsingStarts);for(let[n,r]of t){if(r.length!==e.length){t.delete(n);continue}r.sort(B.compareRangesUsingStarts);for(let o=0;o<r.length;o++)if(!r[o].containsRange(e[o])){t.delete(n);continue}}return t.size>0}};Cp=Gs=A0e([D0e(3,Ot)],Cp)});var M0e,V2,Sp,P$,on,q2,kp=N(()=>{ke();Bn();lt();di();ti();Un();Pt();uh();He();wt();Yv();JL();M0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},V2=function(i,e){return function(t,n){e(t,n,i)}},P$={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},on=Sp=class{static get(e){return e.getContribution(Sp.ID)}constructor(e,t,n,r,o){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=o,this._snippetListener=new le,this._modelVersionId=-1,this._inSnippet=Sp.InSnippetMode.bindTo(r),this._hasNextTabstop=Sp.HasNextTabstop.bindTo(r),this._hasPrevTabstop=Sp.HasPrevTabstop.bindTo(r)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t=="undefined"?P$:Object.assign(Object.assign({},P$),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(Bt(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new Cp(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((n=this._session)===null||n===void 0)&&n.hasChoice){let r={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(d,u)=>{if(!this._session||d!==this._editor.getModel()||!Ie.equals(this._editor.getPosition(),u))return;let{activeChoice:h}=this._session;if(!h||h.choice.options.length===0)return;let f=d.getValueInRange(h.range),m=!!h.choice.options.find(w=>w.value===f),g=[];for(let w=0;w<h.choice.options.length;w++){let _=h.choice.options[w];g.push({kind:13,label:_.value,insertText:_.value,sortText:"a".repeat(w+1),range:h.range,filterText:m?`${f}_${_.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:b("next","Go to next placeholder...")}})}return{suggestions:g}}},o=this._editor.getModel(),s,a=!1,l=()=>{s==null||s.dispose(),a=!1},c=()=>{a||(s=this._languageFeaturesService.completionProvider.register({language:o.getLanguageId(),pattern:o.uri.fsPath,scheme:o.uri.scheme,exclusive:!0},r),this._snippetListener.add(s),a=!0)};this._choiceCompletions={provider:r,enable:c,disable:l}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(r=>r.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:t}=this._session;if(!t||!this._choiceCompletions){(e=this._choiceCompletions)===null||e===void 0||e.disable(),this._currentChoice=void 0;return}this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{L$(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};on.ID="snippetController2";on.InSnippetMode=new ht("inSnippetMode",!1,b("inSnippetMode","Whether the editor in current in snippet mode"));on.HasNextTabstop=new ht("hasNextTabstop",!1,b("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));on.HasPrevTabstop=new ht("hasPrevTabstop",!1,b("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));on=Sp=M0e([V2(1,Hc),V2(2,Se),V2(3,it),V2(4,Ot)],on);Ue(on.ID,on,4);q2=Fi.bindToContribution(on.get);We(new q2({id:"jumpToNextSnippetPlaceholder",precondition:fe.and(on.InSnippetMode,on.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:100+30,kbExpr:F.editorTextFocus,primary:2}}));We(new q2({id:"jumpToPrevSnippetPlaceholder",precondition:fe.and(on.InSnippetMode,on.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:100+30,kbExpr:F.editorTextFocus,primary:1026}}));We(new q2({id:"leaveSnippet",precondition:on.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:100+30,kbExpr:F.editorTextFocus,primary:9,secondary:[1033]}}));We(new q2({id:"acceptSnippet",precondition:on.InSnippetMode,handler:i=>i.finish()}))});var N0e,eA,sc,no,K2,O$=N(()=>{mi();qt();ke();xa();Bn();ya();di();et();fr();Un();M2();T$();vp();kp();Vi();Ut();N0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eA=function(i,e){return function(t,n){e(t,n,i)}},sc=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(no||(no={}));K2=class extends ce{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,n,r,o,s,a,l,c,d,u,h){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=n,this.textModelVersionId=r,this._debounceValue=o,this._suggestPreviewEnabled=s,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=u,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(U2,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=wa("isActive",!1),this._forceUpdate=qF("forceUpdate"),this._selectedInlineCompletionId=wa("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([no.Redo,no.Undo,no.AcceptWord]),this._fetchInlineCompletions=UF("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:ma.Automatic}),handleChange:(m,g)=>(m.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(m.change)?g.preserveCurrentCompletion=!0:m.didChange(this._forceUpdate)&&(g.inlineCompletionTriggerKind=m.change),!0)},(m,g)=>{if(this._forceUpdate.read(m),!(this._enabled.read(m)&&this.selectedSuggestItem.read(m)||this._isActive.read(m))){this._source.cancelUpdate();return}this.textModelVersionId.read(m);let _=this.selectedInlineCompletion.get(),E=g.preserveCurrentCompletion||_!=null&&_.forwardStable?_:void 0,A=this._source.suggestWidgetInlineCompletions.get(),L=this.selectedSuggestItem.read(m);if(A&&!L){let Q=this._source.inlineCompletions.get();or(ae=>{Q&&A.request.versionId>Q.request.versionId&&this._source.inlineCompletions.set(A.clone(),ae),this._source.clearSuggestWidgetInlineCompletions(ae)})}let O=this.cursorPosition.read(m),U={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:L==null?void 0:L.toSelectedSuggestionInfo()};return this._source.fetch(O,U,E)}),this._filteredInlineCompletionItems=Ro(m=>{let g=this._source.inlineCompletions.read(m);if(!g)return[];let w=this.cursorPosition.read(m);return g.inlineCompletions.filter(E=>E.isVisible(this.textModel,w,m))}),this.selectedInlineCompletionIndex=Ro(m=>{let g=this._selectedInlineCompletionId.read(m),w=this._filteredInlineCompletionItems.read(m),_=this._selectedInlineCompletionId===void 0?-1:w.findIndex(E=>E.semanticId===g);return _===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):_}),this.selectedInlineCompletion=Ro(m=>{let g=this._filteredInlineCompletionItems.read(m),w=this.selectedInlineCompletionIndex.read(m);return g[w]}),this.lastTriggerKind=this._source.inlineCompletions.map(m=>m==null?void 0:m.request.context.triggerKind),this.inlineCompletionsCount=Ro(m=>{if(this.lastTriggerKind.read(m)===ma.Explicit)return this._filteredInlineCompletionItems.read(m).length}),this.state=wk({equalityComparer:(m,g)=>!m||!g?m===g:NL(m.ghostText,g.ghostText)&&m.inlineCompletion===g.inlineCompletion&&m.suggestItem===g.suggestItem},m=>{var g;let w=this.textModel,_=this.selectedSuggestItem.read(m);if(_){let E=_.toSingleTextEdit().removeCommonPrefix(w),A=this._computeAugmentedCompletion(E,m);if(!this._suggestPreviewEnabled.read(m)&&!A)return;let O=(g=A==null?void 0:A.edit)!==null&&g!==void 0?g:E,U=A?A.edit.text.length-E.text.length:0,Q=this._suggestPreviewMode.read(m),ae=this.cursorPosition.read(m),te=O.computeGhostText(w,Q,ae,U);return{ghostText:te!=null?te:new Ad(O.range.endLineNumber,[]),inlineCompletion:A==null?void 0:A.completion,suggestItem:_}}else{if(!this._isActive.read(m))return;let E=this.selectedInlineCompletion.read(m);if(!E)return;let A=E.toSingleTextEdit(m),L=this._inlineSuggestMode.read(m),O=this.cursorPosition.read(m),U=A.computeGhostText(w,L,O);return U?{ghostText:U,inlineCompletion:E,suggestItem:void 0}:void 0}}),this.ghostText=wk({equalityComparer:NL},m=>{let g=this.state.read(m);if(g)return g.ghostText}),this._register(KF(this._fetchInlineCompletions,!0));let f;this._register(pr(m=>{var g,w;let _=this.state.read(m),E=_==null?void 0:_.inlineCompletion;if((E==null?void 0:E.semanticId)!==(f==null?void 0:f.semanticId)&&(f=E,E)){let A=E.inlineCompletion,L=A.source;(w=(g=L.provider).handleItemDidShow)===null||w===void 0||w.call(g,L.inlineCompletions,A.sourceInlineCompletion,A.insertText)}}))}trigger(e){return sc(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return sc(this,void 0,void 0,function*(){yk(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,ma.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){yk(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_computeAugmentedCompletion(e,t){let n=this.textModel,r=this._source.suggestWidgetInlineCompletions.read(t),o=r?r.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter($9);return NP(o,a=>{let l=a.toSingleTextEdit(t);return l=l.removeCommonPrefix(n,B.fromPositions(l.range.getStartPosition(),e.range.getEndPosition())),l.augments(e)?{edit:l,completion:a}:void 0})}_deltaSelectedInlineCompletionIndex(e){return sc(this,void 0,void 0,function*(){yield this.triggerExplicitly();let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)})}next(){return sc(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return sc(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t;return sc(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Im;let n=this.state.get();if(!n||n.ghostText.isEmpty()||!n.inlineCompletion)return;let r=n.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),r.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[ii.replaceMove(r.range,""),...r.additionalTextEdits]),e.setPosition(r.snippetInfo.range.getStartPosition()),(t=on.get(e))===null||t===void 0||t.insert(r.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[ii.replaceMove(r.range,r.insertText),...r.additionalTextEdits]),r.command&&r.source.addRef(),or(o=>{this._source.clear(o),this._isActive.set(!1,o)}),r.command&&(yield this._commandService.executeCommand(r.command.id,...r.command.arguments||[]).then(void 0,Xt),r.source.removeRef())})}acceptNextWord(e){return sc(this,void 0,void 0,function*(){yield this._acceptNext(e,(t,n)=>{let r=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),o=this._languageConfigurationService.getLanguageConfiguration(r),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=n.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=n.length;let d=/\s+/g.exec(n);return d&&d.index!==void 0&&d.index+d[0].length<l&&(l=d.index+d[0].length),l})})}acceptNextLine(e){return sc(this,void 0,void 0,function*(){yield this._acceptNext(e,(t,n)=>{let r=n.match(/\n/);return r&&r.index!==void 0?r.index+1:n.length})})}_acceptNext(e,t){return sc(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Im;let n=this.state.get();if(!n||n.ghostText.isEmpty()||!n.inlineCompletion)return;let r=n.ghostText,o=n.inlineCompletion.toInlineCompletion(void 0);if(o.snippetInfo||o.filterText!==o.insertText){yield this.accept(e);return}let s=r.parts[0],a=new Ie(r.lineNumber,s.column),l=s.lines.join(`
`),c=t(a,l);if(c===l.length&&r.parts.length===1){this.accept(e);return}let d=l.substring(0,c);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[ii.replace(B.fromPositions(a),d)]);let u=gb(d);e.setPosition(mb(a,u))}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){let u=B.fromPositions(o.range.getStartPosition(),mb(a,gb(d))),h=e.getModel().getValueInRange(u,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,h.length)}})}handleSuggestAccepted(e){var t,n;let r=e.toSingleTextEdit().removeCommonPrefix(this.textModel),o=this._computeAugmentedCompletion(r,void 0);if(!o)return;let s=o.completion.inlineCompletion;(n=(t=s.source.provider).handlePartialAccept)===null||n===void 0||n.call(t,s.source.inlineCompletions,s.sourceInlineCompletion,r.text.length)}};K2=N0e([eA(9,Ke),eA(10,_i),eA(11,Ot)],K2)});var R0e,F$,Ab,Db,$2,tA,iA,Mb,Ep,nA=N(()=>{jt();ke();df();Fne();fr();kn();fl();Ut();wu();R0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},F$=function(i,e){return function(t,n){e(t,n,i)}},Db=class{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;let r=n[0].score[0];for(let o=0;o<n.length;o++){let{score:s,completion:a}=n[o];if(s[0]!==r)break;if(a.preselect)return o}return 0}},$2=class extends Db{constructor(){super("first")}memorize(e,t,n){}toJSON(){}fromJSON(){}},tA=class extends Db{constructor(){super("recentlyUsed"),this._cache=new aa(300,.66),this._seq=0}memorize(e,t,n){let r=`${e.getLanguageId()}/${n.textLabel}`;this._cache.set(r,{touch:this._seq++,type:n.completion.kind,insertText:n.completion.insertText})}select(e,t,n){if(n.length===0)return 0;let r=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(r))return super.select(e,t,n);let o=n[0].score[0],s=-1,a=-1,l=-1;for(let c=0;c<n.length&&n[c].score[0]===o;c++){let d=`${e.getLanguageId()}/${n[c].textLabel}`,u=this._cache.peek(d);if(u&&u.touch>l&&u.type===n[c].completion.kind&&u.insertText===n[c].completion.insertText&&(l=u.touch,a=c),n[c].completion.preselect&&s===-1)return s=c}return a!==-1?a:s!==-1?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(let[n,r]of e)r.touch=t,r.type=typeof r.type=="number"?r.type:Xm.fromString(r.type),this._cache.set(n,r);this._seq=this._cache.size}},iA=class extends Db{constructor(){super("recentlyUsedByPrefix"),this._trie=kF.forStrings(),this._seq=0}memorize(e,t,n){let{word:r}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${r}`;this._trie.set(o,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){let{word:r}=e.getWordUntilPosition(t);if(!r)return super.select(e,t,n);let o=`${e.getLanguageId()}/${r}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let a=0;a<n.length;a++){let{kind:l,insertText:c}=n[a].completion;if(l===s.type&&c===s.insertText)return a}return super.select(e,t,n)}toJSON(){let e=[];return this._trie.forEach((t,n)=>e.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(let[t,n]of e)n.type=typeof n.type=="number"?n.type:Xm.fromString(n.type),this._trie.set(t,n)}}},Mb=Ab=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new le,this._persistSoon=new ui(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===B_.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){var n;let r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==r){this._saveState();let o=Ab._strategyCtors.get(r)||$2;this._strategy=new o;try{let a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${Ab._storagePrefix}/${r}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch(s){}}return this._strategy}_saveState(){if(this._strategy){let t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${Ab._storagePrefix}/${this._strategy.name}`,n,t,1)}}};Mb._strategyCtors=new Map([["recentlyUsedByPrefix",iA],["recentlyUsed",tA],["first",$2]]);Mb._storagePrefix="suggest/memories";Mb=Ab=R0e([F$(0,Xr),F$(1,Mt)],Mb);Ep=Zn("ISuggestMemories");tr(Ep,Mb,1)});var P0e,O0e,rA,Tp,z$=N(()=>{wt();P0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O0e=function(i,e){return function(t,n){e(t,n,i)}},Tp=rA=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=rA.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(121)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){let e=this._editor.getOption(121)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){let t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}let n=this._editor.getModel(),r=this._editor.getSelection(),o=n.getWordAtPosition(r.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===r.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};Tp.AtEnd=new ht("atEndOfWord",!1);Tp=rA=P0e([O0e(1,it)],Tp)});var F0e,z0e,Nb,Md,B$=N(()=>{wt();F0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},z0e=function(i,e){return function(t,n){e(t,n,i)}},Md=Nb=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=Nb.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(Nb._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let r=n;for(let o=t.items.length;o>0&&(r=(r+t.items.length+(e?1:-1))%t.items.length,!(r===n||!t.items[r].completion.additionalTextEdits));o--);return r}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=Nb._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Md.OtherSuggestions=new ht("hasOtherSuggestions",!1);Md=Nb=F0e([z0e(1,it)],Md)});var G2,H$=N(()=>{mi();ke();q3();G2=class{constructor(e,t,n,r){this._disposables=new le,this._disposables.add(n.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(o=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(o=>{if(this._active&&!t.isFrozen()&&n.state!==0){let s=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&r(this._active.item)}}))}_onItem(e){if(!e||!Ki(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new fu;for(let n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}});var B0e,Nd,oA=N(()=>{j9();di();et();B0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Nd=class i{provideSelectionRanges(e,t){return B0e(this,void 0,void 0,function*(){let n=[];for(let r of t){let o=[];n.push(o);let s=new Map;yield new Promise(a=>i._bracketsRightYield(a,0,e,r,s)),yield new Promise(a=>i._bracketsLeftYield(a,0,e,r,s,o))}return n})}static _bracketsRightYield(e,t,n,r,o){let s=new Map,a=Date.now();for(;;){if(t>=i._maxRounds){e();break}if(!r){e();break}let l=n.bracketPairs.findNextBracket(r);if(!l){e();break}if(Date.now()-a>i._maxDuration){setTimeout(()=>i._bracketsRightYield(e,t+1,n,r,o));break}if(l.bracketInfo.isOpeningBracket){let d=l.bracketInfo.bracketText,u=s.has(d)?s.get(d):0;s.set(d,u+1)}else{let d=l.bracketInfo.getOpeningBrackets()[0].bracketText,u=s.has(d)?s.get(d):0;if(u-=1,s.set(d,Math.max(0,u)),u<0){let h=o.get(d);h||(h=new zv,o.set(d,h)),h.push(l.range)}}r=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,r,o,s){let a=new Map,l=Date.now();for(;;){if(t>=i._maxRounds&&o.size===0){e();break}if(!r){e();break}let c=n.bracketPairs.findPrevBracket(r);if(!c){e();break}if(Date.now()-l>i._maxDuration){setTimeout(()=>i._bracketsLeftYield(e,t+1,n,r,o,s));break}if(c.bracketInfo.isOpeningBracket){let u=c.bracketInfo.bracketText,h=a.has(u)?a.get(u):0;if(h-=1,a.set(u,Math.max(0,h)),h<0){let f=o.get(u);if(f){let m=f.shift();f.size===0&&o.delete(u);let g=B.fromPositions(c.range.getEndPosition(),m.getStartPosition()),w=B.fromPositions(c.range.getStartPosition(),m.getEndPosition());s.push({range:g}),s.push({range:w}),i._addBracketLeading(n,w,s)}}}else{let u=c.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(u)?a.get(u):0;a.set(u,h+1)}r=c.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;let r=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(r);o!==0&&o!==t.startColumn&&(n.push({range:B.fromPositions(new Ie(r,o),t.getEndPosition())}),n.push({range:B.fromPositions(new Ie(r,1),t.getEndPosition())}));let s=r-1;if(s>0){let a=e.getLineFirstNonWhitespaceColumn(s);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(n.push({range:B.fromPositions(new Ie(s,a),t.getEndPosition())}),n.push({range:B.fromPositions(new Ie(s,1),t.getEndPosition())}))}}};Nd._maxDuration=30;Nd._maxRounds=2});var H0e,Rd,sA=N(()=>{mi();et();oA();H0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Rd=class i{static create(e,t){return H0e(this,void 0,void 0,function*(){if(!t.getOption(116).localityBonus||!t.hasModel())return i.None;let n=t.getModel(),r=t.getPosition();if(!e.canComputeWordRanges(n.uri))return i.None;let[o]=yield new Nd().provideSelectionRanges(n,[r]);if(o.length===0)return i.None;let s=yield e.computeWordRanges(n.uri,o[0].range);if(!s)return i.None;let a=n.getWordUntilPosition(r);return delete s[a.word],new class extends i{distance(l,c){if(!r.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;let d=typeof c.label=="string"?c.label:c.label.label,u=s[d];if(AP(u))return 2<<20;let h=pu(u,B.fromPositions(l),B.compareRangesUsingStarts),f=h>=0?u[h]:u[Math.max(0,~h-1)],m=o.length;for(let g of o){if(!B.containsRange(g.range,f))break;m-=1}return m}}})}};Rd.None=new class extends Rd{distance(){return 0}}});var Rb,Ip,aA=N(()=>{mi();ml();Ni();Rb=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},Ip=class i{constructor(e,t,n,r,o,s,a=a_.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=i._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=r,this._options=o,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=a,s==="top"?this._snippetCompareFn=i._compareCompletionItemsSnippetsUp:s==="bottom"&&(this._snippetCompareFn=i._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();let e=new Set;for(let[t,n]of this.getItemsByProvider())n.length>0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;let e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext,r="",o="",s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?l_:$P;for(let c=0;c<s.length;c++){let d=s[c];if(d.isInvalid)continue;let u=this._itemsByProvider.get(d.provider);u?u.push(d):this._itemsByProvider.set(d.provider,[d]);let h=d.position.column-d.editStart.column,f=h+n-(d.position.column-this._column);if(r.length!==f&&(r=f===0?"":t.slice(-f),o=r.toLowerCase()),d.word=r,f===0)d.score=pl.Default;else{let m=0;for(;m<h;){let g=r.charCodeAt(m);if(g===32||g===9)m+=1;else break}if(m>=f)d.score=pl.Default;else if(typeof d.completion.filterText=="string"){let g=l(r,o,m,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;mP(d.completion.filterText,d.textLabel)===0?d.score=g:(d.score=KP(r,o,m,d.textLabel,d.labelLow,0),d.score[0]=g[0])}else{let g=l(r,o,m,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!g)continue;d.score=g}}d.idx=c,d.distance=this._wordDistance.distance(d.position,d.completion),a.push(d),e.push(d.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?LP(e.length-.85,e,(c,d)=>c-d):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]<t.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return i._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return i._compareCompletionItems(e,t)}}});function W0e(i,e,t){if(!e.getContextKeyValue(yn.inlineSuggestionVisible.key))return!0;let n=e.getContextKeyValue(yn.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(61).suppressSuggestions}function V0e(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let n=e.getContextKeyValue(yn.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(61).suppressSuggestions}var U0e,Pd,j0e,lA,ac,Y2,U$=N(()=>{jt();ki();qt();ei();ke();Ni();An();q_();sA();Zm();kn();wt();Yv();Bc();aA();uh();Pt();ml();Bn();A2();kp();One();U0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Pd=function(i,e){return function(t,n){e(t,n,i)}},j0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},ac=class{static shouldAutoTrigger(e){if(!e.hasModel())return!1;let t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);let r=t.getWordAtPosition(n);return!(!r||r.endColumn!==n.column&&r.startColumn+1!==n.column||!isNaN(Number(r.word)))}constructor(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=n}};Y2=lA=class{constructor(e,t,n,r,o,s,a,l,c){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=r,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._envService=c,this._toDispose=new le,this._triggerCharacterListener=new le,this._triggerQuickSuggest=new la,this._triggerState=void 0,this._completionDisposables=new le,this._onDidCancel=new Je,this._onDidTrigger=new Je,this._onDidSuggest=new Je,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Qe(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let d=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{d=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{d=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(u=>{d||this._onCursorChange(u)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!d&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){ji(this._triggerCharacterListener),ji([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(89)||!this._editor.hasModel()||!this._editor.getOption(119))return;let e=new Map;for(let n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(let r of n.triggerCharacters||[]){let o=e.get(r);o||(o=new Set,o.add(I$()),e.set(r,o)),o.add(n)}let t=n=>{var r;if(!V0e(this._editor,this._contextKeyService,this._configurationService)||ac.shouldAutoTrigger(this._editor))return;if(!n){let a=this._editor.getPosition();n=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let o="";vP(n.charCodeAt(n.length-1))?bP(n.charCodeAt(n.length-2))&&(o=n.substr(n.length-2)):o=n.charAt(n.length-1);let s=e.get(o);if(s){let a=new Map;if(this._completionModel)for(let[l,c]of this._completionModel.getItemsByProvider())s.has(l)||a.set(l,c);this.trigger({auto:!0,triggerKind:1,triggerCharacter:o,retrigger:!!this._completionModel,clipboardText:(r=this._completionModel)===null||r===void 0?void 0:r.clipboardText,completionOptions:{providerFilter:s,providerItemsToReuse:a}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;let t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;Ya.isAllOff(this._editor.getOption(87))||this._editor.getOption(116).snippetsPreventQuickSuggestions&&(!((e=on.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!ac.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=this._editor.getOption(87);if(!Ya.isAllOff(r)){if(!Ya.isAllOn(r)){t.tokenization.tokenizeIfCheap(n.lineNumber);let o=t.tokenization.getLineTokens(n.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(Ya.valueFor(r,s)!=="on")return}W0e(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(88)))}_refilterCompletionItems(){Bt(this._editor.hasModel()),Bt(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),n=new ac(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(n)}trigger(e){var t,n,r,o,s,a;if(!this._editor.hasModel())return;let l=this._editor.getModel(),c=new ac(l,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(t=e.shy)!==null&&t!==void 0?t:!1,position:this._editor.getPosition()}),this._context=c;let d={triggerKind:(n=e.triggerKind)!==null&&n!==void 0?n:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new zi;let u=this._editor.getOption(110),h=1;switch(u){case"top":h=0;break;case"bottom":h=2;break}let{itemKind:f,showDeprecated:m}=lA._createSuggestFilter(this._editor),g=new rc(h,(o=(r=e.completionOptions)===null||r===void 0?void 0:r.kindFilter)!==null&&o!==void 0?o:f,(s=e.completionOptions)===null||s===void 0?void 0:s.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,m),w=Rd.create(this._editorWorkerService,this._editor),_=wb(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),g,d,this._requestToken.token);Promise.all([_,w]).then(([E,A])=>j0e(this,void 0,void 0,function*(){var L;if((L=this._requestToken)===null||L===void 0||L.dispose(),!this._editor.hasModel())return;let O=e==null?void 0:e.clipboardText;if(!O&&E.needsClipboard&&(O=yield this._clipboardService.readText()),this._triggerState===void 0)return;let U=this._editor.getModel(),Q=new ac(U,this._editor.getPosition(),e),ae=Object.assign(Object.assign({},a_.default),{firstMatchCanBeWeak:!this._editor.getOption(116).matchOnWordStartOnly});if(this._completionModel=new Ip(E.items,this._context.column,{leadingLineContent:Q.leadingLineContent,characterCountDelta:Q.column-this._context.column},A,this._editor.getOption(116),this._editor.getOption(110),ae,O),this._completionDisposables.add(E.disposable),this._onNewContext(Q),this._reportDurationsTelemetry(E.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(let te of E.items)te.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${te.provider._debugDisplayName}`,te.completion)})).catch(ft)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){let t=new Set;e.getOption(110)==="none"&&t.add(27);let r=e.getOption(116);return r.showMethods||t.add(0),r.showFunctions||t.add(1),r.showConstructors||t.add(2),r.showFields||t.add(3),r.showVariables||t.add(4),r.showClasses||t.add(5),r.showStructs||t.add(6),r.showInterfaces||t.add(7),r.showModules||t.add(8),r.showProperties||t.add(9),r.showEvents||t.add(10),r.showOperators||t.add(11),r.showUnits||t.add(12),r.showValues||t.add(13),r.showConstants||t.add(14),r.showEnums||t.add(15),r.showEnumMembers||t.add(16),r.showKeywords||t.add(17),r.showWords||t.add(18),r.showColors||t.add(19),r.showFiles||t.add(20),r.showReferences||t.add(21),r.showColors||t.add(22),r.showFolders||t.add(23),r.showTypeParameters||t.add(24),r.showSnippets||t.add(27),r.showUsers||t.add(25),r.showIssues||t.add(26),{itemKind:t,showDeprecated:r.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(qi(e.leadingLineContent)!==qi(this._context.leadingLineContent)){this.cancel();return}if(e.column<this._context.column){e.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(e.leadingWord.word.length!==0&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){if(ac.shouldAutoTrigger(this._editor)&&this._context){let n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){let t=new Map,n=new Set;for(let[r,o]of this._completionModel.getItemsByProvider())o.length>0&&o[0].container.incomplete?n.add(r):t.set(r,o);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:t}})}else{let t=this._completionModel.lineContext,n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){let r=ac.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(r&&this._context.leadingWord.endColumn<e.leadingWord.startColumn){this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});return}if(this._context.triggerOptions.auto){this.cancel();return}else if(this._completionModel.lineContext=t,n=this._completionModel.items.length>0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};Y2=lA=U0e([Pd(1,El),Pd(2,As),Pd(3,Ar),Pd(4,Hc),Pd(5,it),Pd(6,Mt),Pd(7,Se),Pd(8,SF)],Y2)});var Pb,j$=N(()=>{ke();Pb=class i{constructor(e,t){this._disposables=new le,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;let n=e.getSelections(),r=n.length,o=!1;for(let a=0;a<r;a++)if(!n[a].isEmpty()){o=!0;break}if(!o){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];let s=e.getModel();for(let a=0;a<r;a++){let l=n[a];if(s.getValueLengthInRange(l)>i._maxSelectionLength)return;this._lastOvertyped[a]={value:s.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(t.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}};Pb._maxSelectionLength=51200});var W$=N(()=>{});var V$=N(()=>{W$()});var q0e,lc,Vo,Lp=N(()=>{J3();Ir();iz();Vi();wt();Ut();No();nr();X_();Un();Pt();q0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lc=function(i,e){return function(t,n){e(t,n,i)}},Vo=class extends tz{constructor(e,t,n,r,o,s,a,l,c,d,u,h,f){super(e,Object.assign(Object.assign({},r.getRawOptions()),{overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()}),n,o,s,a,l,c,d,u,h,f),this._parentEditor=r,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){ff(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Vo=q0e([lc(4,Ke),lc(5,ai),lc(6,_i),lc(7,it),lc(8,vn),lc(9,Ri),lc(10,kf),lc(11,Ot),lc(12,Se)],Vo)});var K0e,cA,dA,X2,K$=N(()=>{Ht();rg();ke();He();J_();Ji();wt();Ut();K0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},cA=function(i,e){return function(t,n){e(t,n,i)}},dA=class i extends Z_{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=b({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,i.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}},X2=class{constructor(e,t,n,r,o){this._menuId=t,this._menuService=r,this._contextKeyService=o,this._menuDisposables=new le,this.element=Te(e,Le(".suggest-status-bar"));let s=a=>a instanceof oa?n.createInstance(dA,a,void 0):void 0;this._leftActions=new Ds(this.element,{actionViewItemProvider:s}),this._rightActions=new Ds(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){let e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{let n=[],r=[];for(let[o,s]of e.getActions())o==="left"?n.push(...s):r.push(...s);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(r)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};X2=K0e([cA(2,Ke),cA(3,ks),cA(4,it)],X2)});var Od,Q2=N(()=>{Ht();gk();ei();ke();Od=class{constructor(){this._onDidWillResize=new Je,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Je,this.onDidResize=this._onDidResize.event,this._sashListener=new le,this._size=new Qt(0,0),this._minSize=new Qt(0,0),this._maxSize=new Qt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Sl(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Sl(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Sl(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:mk.North}),this._southSash=new Sl(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:mk.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(ci.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(ci.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(r=>{e&&(n=r.currentX-r.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(r=>{e&&(n=-(r.currentX-r.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(r=>{e&&(t=-(r.currentY-r.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(r=>{e&&(t=r.currentY-r.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(ci.any(this._eastSash.onDidReset,this._westSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(ci.any(this._northSash.onDidReset,this._southSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,r){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=r?3:0}layout(e=this.size.height,t=this.size.width){let{height:n,width:r}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(n,Math.min(o,e)),t=Math.max(r,Math.min(s,t));let a=new Qt(t,e);Qt.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}});function Ob(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}var $0e,G0e,Z2,J2,uA=N(()=>{Ht();N_();Jn();Lr();ei();Ts();ke();kd();Q2();He();Ut();$0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},G0e=function(i,e){return function(t,n){e(t,n,i)}};Z2=class{constructor(e,t){this._editor=e,this._onDidClose=new Je,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new Je,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new le,this._renderDisposeable=new le,this._borderWidth=1,this._size=new Qt(330,0),this.domNode=Le(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(io,{editor:e}),this._body=Le(".body"),this._scrollbar=new Cf(this._body,{alwaysConsumeMouseWheel:!0}),Te(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=Te(this._body,Le(".header")),this._close=Te(this._header,Le("span"+_t.asCSSSelector(pt.close))),this._close.title=b("details.close","Close"),this._type=Te(this._header,Le("p.type")),this._docs=Te(this._body,Le("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(49)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){let e=this._editor.getOptions(),t=e.get(49),n=t.getMassagedFontFamily(),r=e.get(117)||t.fontSize,o=e.get(118)||t.lineHeight,s=t.fontWeight,a=`${r}px`,l=`${o}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${o/r}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){let e=this._editor.getOption(118)||this._editor.getOption(49).lineHeight,t=this._borderWidth,n=t*2;return{lineHeight:e,borderWidth:t,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=b("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var n,r;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let a="";a+=`score: ${e.score[0]}
`,a+=`prefix: ${(n=e.word)!==null&&n!==void 0?n:"(no prefix)"}
`,a+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}
`,a+=`distance: ${e.distance} (localityBonus-setting)
`,a+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}
`,a+=`commit_chars: ${(r=e.completion.commitCharacters)===null||r===void 0?void 0:r.join("")}
`,s=new $i().appendCodeblock("empty",a),o=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!Ob(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),o){let a=o.length>1e5?`${o.substr(0,1e5)}\u2026`:o;this._type.textContent=a,this._type.title=a,ur(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else Kr(this._type),this._type.title="",Hn(this._type),this.domNode.classList.add("no-type");if(Kr(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),Kr(this._docs);let a=this._markdownRenderer.render(s);this._docs.appendChild(a.element),this._renderDisposeable.add(a),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){let n=new Qt(e,t);Qt.equals(n,this._size)||(this._size=n,sP(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Z2=$0e([G0e(1,Ke)],Z2);J2=class{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new le,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new Od,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,r,o=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,r=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(n&&r){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(s=r.width-a.dimension.width,l=!0),a.north&&(o=r.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:n.top+o,left:n.left+s})}a.done&&(n=void 0,r=void 0,o=0,s=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var n;let r=e.getBoundingClientRect();this._anchorBox=r,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(n=this._userSize)!==null&&n!==void 0?n:this.widget.size,t)}_placeAtAnchor(e,t,n){var r;let o=Oc(document.body),s=this.widget.getLayoutInfo(),a=new Qt(220,2*s.lineHeight),l=e.top,c=function(){let A=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),L=-s.borderWidth+e.left+e.width,O=new Qt(A,o.height-e.top-s.borderHeight-s.verticalPadding),U=O.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:L,fit:A-t.width,maxSizeTop:O,maxSizeBottom:U,minSize:a.with(Math.min(A,a.width))}}(),d=function(){let A=e.left-s.borderWidth-s.horizontalPadding,L=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),O=new Qt(A,o.height-e.top-s.borderHeight-s.verticalPadding),U=O.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:L,fit:A-t.width,maxSizeTop:O,maxSizeBottom:U,minSize:a.with(Math.min(A,a.width))}}(),u=function(){let A=e.left,L=-s.borderWidth+e.top+e.height,O=new Qt(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:L,left:A,fit:O.height-t.height,maxSizeBottom:O,maxSizeTop:O,minSize:a.with(O.width)}}(),h=[c,d,u],f=(r=h.find(A=>A.fit>=0))!==null&&r!==void 0?r:h.sort((A,L)=>L.fit-A.fit)[0],m=e.top+e.height-s.borderHeight,g,w=t.height,_=Math.max(f.maxSizeTop.height,f.maxSizeBottom.height);w>_&&(w=_);let E;n?w<=f.maxSizeTop.height?(g=!0,E=f.maxSizeTop):(g=!1,E=f.maxSizeBottom):w<=f.maxSizeBottom.height?(g=!1,E=f.maxSizeBottom):(g=!0,E=f.maxSizeTop),this._applyTopLeft({left:f.left,top:g?f.top:m-w}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!g,f===c,g,f!==c),this._resizable.minSize=f.minSize,this._resizable.maxSize=E,this._resizable.layout(w,Math.min(E.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}});var Ys,hA=N(()=>{(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(Ys||(Ys={}))});function Fb(i,e,t,n){let r=n===Ys.ROOT_FOLDER?["rootfolder-icon"]:n===Ys.FOLDER?["folder-icon"]:["file-icon"];if(t){let o;if(t.scheme===To.data)o=Bm.parseMetaData(t).get(Bm.META_DATA_LABEL);else{let s=t.path.match(Y0e);s?(o=eC(s[2].toLowerCase()),s[1]&&r.push(`${eC(s[1].toLowerCase())}-name-dir-icon`)):o=eC(t.authority.toLowerCase())}if(n===Ys.FOLDER)r.push(`${o}-name-folder-icon`);else{if(o){if(r.push(`${o}-name-file-icon`),r.push("name-file-icon"),o.length<=255){let a=o.split(".");for(let l=1;l<a.length;l++)r.push(`${a.slice(l).join(".")}-ext-file-icon`)}r.push("ext-file-icon")}let s=X0e(i,e,t);s&&r.push(`${eC(s)}-lang-file-icon`)}}return r}function X0e(i,e,t){if(!t)return null;let n=null;if(t.scheme===To.data){let o=Bm.parseMetaData(t).get(Bm.META_DATA_MIME);o&&(n=e.getLanguageIdByMimeType(o))}else{let r=i.getModel(t);r&&(n=r.getLanguageId())}return n&&n!==lf?n:e.guessLanguageIdByFilepathOrFirstLine(t)}function eC(i){return i.replace(/[\11\12\14\15\40]/g,"/")}var Y0e,$$=N(()=>{Dm();Do();X3();hA();Y0e=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/});function mA(i){return`suggest-aria-id:${i}`}function pA(i){return i.replace(/\r\n|\r|\n/g,"")}var Q0e,fA,Fd,Z0e,J0e,tC,G$=N(()=>{Ht();rz();Jn();Lr();ei();ml();ke();Ln();fr();$$();Qo();ts();He();hA();kl();nr();uA();Q0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fA=function(i,e){return function(t,n){e(t,n,i)}};Z0e=Pi("suggest-more-info",pt.chevronRight,b("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),J0e=new(Fd=class{extract(e,t){if(e.textLabel.match(Fd._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(Fd._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){let n=Fd._regexRelaxed.exec(e.completion.documentation);if(n&&(n.index===0||n.index+n[0].length===e.completion.documentation.length))return t[0]=n[0],!0}return!1}},Fd._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,Fd._regexStrict=new RegExp(`^${Fd._regexRelaxed.source}$`,"i"),Fd),tC=class{constructor(e,t,n,r){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=r,this._onDidToggleDetails=new Je,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){let t=new le,n=e;n.classList.add("show-file-icons");let r=Te(e,Le(".icon")),o=Te(r,Le("span.colorspan")),s=Te(e,Le(".contents")),a=Te(s,Le(".main")),l=Te(a,Le(".icon-label.codicon")),c=Te(a,Le("span.left")),d=Te(a,Le("span.right")),u=new iy(c,{supportHighlights:!0,supportIcons:!0});t.add(u);let h=Te(c,Le("span.signature-label")),f=Te(c,Le("span.qualifier-label")),m=Te(d,Le("span.details-label")),g=Te(d,Le("span.readMore"+_t.asCSSSelector(Z0e)));g.title=b("readMore","Read More");let w=()=>{let _=this._editor.getOptions(),E=_.get(49),A=E.getMassagedFontFamily(),L=E.fontFeatureSettings,O=_.get(117)||E.fontSize,U=_.get(118)||E.lineHeight,Q=E.fontWeight,ae=E.letterSpacing,te=`${O}px`,Z=`${U}px`,ve=`${ae}px`;n.style.fontSize=te,n.style.fontWeight=Q,n.style.letterSpacing=ve,a.style.fontFamily=A,a.style.fontFeatureSettings=L,a.style.lineHeight=Z,r.style.height=Z,r.style.width=Z,g.style.height=Z,g.style.width=Z};return w(),t.add(this._editor.onDidChangeConfiguration(_=>{(_.hasChanged(49)||_.hasChanged(117)||_.hasChanged(118))&&w()})),{root:n,left:c,right:d,icon:r,colorspan:o,iconLabel:u,iconContainer:l,parametersLabel:h,qualifierLabel:f,detailsLabel:m,readMore:g,disposables:t}}renderElement(e,t,n){let{completion:r}=e;n.root.id=mA(t),n.colorspan.style.backgroundColor="";let o={labelEscapeNewLines:!0,matches:gu(e.score)},s=[];if(r.kind===19&&J0e.extract(e,s))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=s[0];else if(r.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";let a=Fb(this._modelService,this._languageService,yt.from({scheme:"fake",path:e.textLabel}),Ys.FILE),l=Fb(this._modelService,this._languageService,yt.from({scheme:"fake",path:r.detail}),Ys.FILE);o.extraClasses=a.length>l.length?a:l}else r.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",o.extraClasses=[Fb(this._modelService,this._languageService,yt.from({scheme:"fake",path:e.textLabel}),Ys.FOLDER),Fb(this._modelService,this._languageService,yt.from({scheme:"fake",path:r.detail}),Ys.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",..._t.asClassNameArray(Xm.toIcon(r.kind))));r.tags&&r.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,o),typeof r.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=pA(r.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=pA(r.label.detail||""),n.detailsLabel.textContent=pA(r.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(116).showInlineDetails?ur(n.detailsLabel):Hn(n.detailsLabel),Ob(e)?(n.right.classList.add("can-expand-details"),ur(n.readMore),n.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},n.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),Hn(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};tC=Q0e([fA(1,Di),fA(2,en),fA(3,vn)],tC)});var ebe,iC,tbe,Ap,nC,ibe,gA,Dp,bA,Y$=N(()=>{Ht();D0();mF();jt();qt();ei();ke();Rne();Ni();V$();Lp();K$();Lx();He();wt();Ut();wu();ir();rk();nr();Q2();uh();uA();G$();O_();Lo();ebe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},iC=function(i,e){return function(t,n){e(t,n,i)}},tbe=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};je("editorSuggestWidget.background",{dark:vl,light:vl,hcDark:vl,hcLight:vl},b("editorSuggestWidgetBackground","Background color of the suggest widget."));je("editorSuggestWidget.border",{dark:vu,light:vu,hcDark:vu,hcLight:vu},b("editorSuggestWidgetBorder","Border color of the suggest widget."));nC=je("editorSuggestWidget.foreground",{dark:fa,light:fa,hcDark:fa,hcLight:fa},b("editorSuggestWidgetForeground","Foreground color of the suggest widget."));je("editorSuggestWidget.selectedForeground",{dark:qm,light:qm,hcDark:qm,hcLight:qm},b("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));je("editorSuggestWidget.selectedIconForeground",{dark:Km,light:Km,hcDark:Km,hcLight:Km},b("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));ibe=je("editorSuggestWidget.selectedBackground",{dark:$m,light:$m,hcDark:$m,hcLight:$m},b("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));je("editorSuggestWidget.highlightForeground",{dark:pa,light:pa,hcDark:pa,hcLight:pa},b("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));je("editorSuggestWidget.focusHighlightForeground",{dark:Vm,light:Vm,hcDark:Vm,hcLight:Vm},b("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));je("editorSuggestWidgetStatus.foreground",{dark:Nr(nC,.5),light:Nr(nC,.5),hcDark:Nr(nC,.5),hcLight:Nr(nC,.5)},b("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));gA=class{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Vo}`}restore(){var e;let t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{let n=JSON.parse(t);if(Qt.is(n))return Qt.lift(n)}catch(n){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}},Dp=Ap=class{constructor(e,t,n,r,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new Wi,this._pendingShowDetails=new Wi,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new la,this._disposables=new le,this._onDidSelect=new D3,this._onDidFocus=new D3,this._onDidHide=new Je,this._onDidShow=new Je,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new Je,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new Od,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new bA(this,e),this._persistedSize=new gA(t,e);class s{constructor(f,m,g=!1,w=!1){this.persistedSize=f,this.currentSize=m,this.persistHeight=g,this.persistWidth=w}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new s(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{var f,m,g,w;if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){let{itemHeight:_,defaultSize:E}=this.getLayoutInfo(),A=Math.round(_/2),{width:L,height:O}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-O)<=A)&&(O=(m=(f=a.persistedSize)===null||f===void 0?void 0:f.height)!==null&&m!==void 0?m:E.height),(!a.persistWidth||Math.abs(a.currentSize.width-L)<=A)&&(L=(w=(g=a.persistedSize)===null||g===void 0?void 0:g.width)!==null&&w!==void 0?w:E.width),this._persistedSize.store(new Qt(L,O))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=Te(this.element.domNode,Le(".message")),this._listElement=Te(this.element.domNode,Le(".tree"));let l=o.createInstance(Z2,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new J2(l,this.editor);let c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(116).showIcons);c();let d=o.createInstance(tC,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new R_("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>b("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let f=h.textLabel;if(typeof h.completion.label!="string"){let{detail:_,description:E}=h.completion.label;_&&E?f=b("label.full","{0} {1}, {2}",f,_,E):_?f=b("label.detail","{0} {1}",f,_):E&&(f=b("label.desc","{0}, {1}",f,E))}if(!h.isResolved||!this._isDetailsVisible())return f;let{documentation:m,detail:g}=h.completion,w=rf("{0}{1}",g||"",m?typeof m=="string"?m:m.value:"");return b("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",f,w)}}}),this._list.style(wF({listInactiveFocusBackground:ibe,listInactiveFocusOutline:ha})),this._status=o.createInstance(X2,this.element.domNode,Xa);let u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(116).showStatusBar);u(),this._disposables.add(r.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(r.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(116)&&(u(),c())})),this._ctxSuggestWidgetVisible=ct.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=ct.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=ct.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=ct.HasFocusedSuggestion.bindTo(n),this._disposables.add(Io(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element=="undefined"||typeof e.index=="undefined"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){let n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=_u(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);let n=e.elements[0],r=e.indexes[0];n!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=n,this._list.reveal(r),this._currentSuggestionDetails=Jt(o=>tbe(this,void 0,void 0,function*(){let s=gl(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=o.onCancellationRequested(()=>s.dispose()),l=yield n.resolve(o);return s.dispose(),a.dispose(),l})),this._currentSuggestionDetails.then(()=>{r>=this._list.length||n!==this._list.element(r)||(this._ignoreFocusEvents=!0,this._list.splice(r,1,[n]),this._list.setFocus([r]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:mA(r)}))}).catch(ft)),this._onDidFocus.fire({item:n,index:r,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:Hn(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ap.LOADING_MESSAGE,Hn(this._listElement,this._status.element),ur(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,uu(Ap.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ap.NO_SUGGESTIONS_MESSAGE,Hn(this._listElement,this._status.element),ur(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,uu(Ap.NO_SUGGESTIONS_MESSAGE);break;case 3:Hn(this._messageElement),ur(this._listElement,this._status.element),this._show();break;case 4:Hn(this._messageElement),ur(this._listElement,this._status.element),this._show();break;case 5:Hn(this._messageElement),ur(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=gl(()=>this._setState(1),t)))}showSuggestions(e,t,n,r,o){var s,a;if(this._contentWidget.setPosition(this.editor.getPosition()),(s=this._loadingTimeout)===null||s===void 0||s.dispose(),(a=this._currentSuggestionDetails)===null||a===void 0||a.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}let l=this._completionModel.items.length,c=l===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(l>1),c){this._setState(r?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=R3(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(Ob(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=R3(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();let t=this._persistedSize.restore(),n=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.height<n&&this._persistedSize.store(t.with(void 0,n))}isFrozen(){return this._state===4}_afterRender(e){if(e===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(e){var t,n,r;if(!this.editor.hasModel()||!this.editor.getDomNode())return;let o=Oc(document.body),s=this.getLayoutInfo();e||(e=s.defaultSize);let a=e.height,l=e.width;if(this._status.element.style.height=`${s.itemHeight}px`,this._state===2||this._state===1)a=s.itemHeight+s.borderHeight,l=s.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Qt(l,a),this._contentWidget.setPreference(2);else{let c=o.width-s.borderHeight-2*s.horizontalPadding;l>c&&(l=c);let d=this._completionModel?this._completionModel.stats.pLabelLen*s.typicalHalfwidthCharacterWidth:l,u=s.statusBarHeight+this._list.contentHeight+s.borderHeight,h=s.itemHeight+s.statusBarHeight,f=Zi(this.editor.getDomNode()),m=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),g=f.top+m.top+m.height,w=Math.min(o.height-g-s.verticalPadding,u),_=f.top+m.top-s.verticalPadding,E=Math.min(_,u),A=Math.min(Math.max(E,w)+s.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),a<h&&(a=h),a>A&&(a=A);let L=150;a>w||this._forceRenderingAbove&&_>L?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),A=E):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),A=w),this.element.preferredSize=new Qt(d,s.defaultSize.height),this.element.maxSize=new Qt(c,A),this.element.minSize=new Qt(220,h),this._cappedHeight=a===u?{wanted:(r=(n=this._cappedHeight)===null||n===void 0?void 0:n.wanted)!==null&&r!==void 0?r:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){let{width:n,height:r}=this.element.maxSize;e=Math.min(n,e),t=Math.min(r,t);let{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=`${t-o}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){let e=this.editor.getOption(49),t=fF(this.editor.getOption(118)||e.lineHeight,8,1e3),n=!this.editor.getOption(116).showStatusBar||this._state===2||this._state===1?0:t,r=this._details.widget.borderWidth,o=2*r;return{itemHeight:t,statusBarHeight:n,borderWidth:r,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Qt(430,n+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Dp.LOADING_MESSAGE=b("suggestWidget.loading","Loading...");Dp.NO_SUGGESTIONS_MESSAGE=b("suggestWidget.noSuggestions","No suggestions.");Dp=Ap=ebe([iC(1,Xr),iC(2,it),iC(3,vn),iC(4,Ke)],Dp);bA=class{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){let{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:r}=this._widget.getLayoutInfo();return new Qt(t+2*n+r,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}});var nbe,Mp,vA,rbe,_A,qo,yA,zb,yo,vr,rC=N(()=>{Lo();mi();jt();ki();qt();ei();nne();ke();Tr();ll();Bn();z_();lt();ya();di();et();ti();kp();ch();nA();z$();He();Vi();wt();Ut();Yv();uh();B$();H$();U$();j$();Y$();Bc();Do();CF();nbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Mp=function(i,e){return function(t,n){e(t,n,i)}},rbe=!1,_A=class{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){let r=e.getOffsetAt(t),o=e.getPositionAt(r+1);this._marker=e.deltaDecorations([],[{range:B.fromPositions(t,o),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){let t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}},qo=vA=class{static get(e){return e.getContribution(vA.ID)}constructor(e,t,n,r,o,s,a){this._memoryService=t,this._commandService=n,this._contextKeyService=r,this._instantiationService=o,this._logService=s,this._telemetryService=a,this._lineSuffix=new Wi,this._toDispose=new le,this._selectors=new yA(u=>u.priority),this._onWillInsertSuggestItem=new Je,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance(Y2,this.editor),this._selectors.register({priority:0,select:(u,h,f)=>this._memoryService.select(u,h,f)});let l=ct.InsertMode.bindTo(r);l.set(e.getOption(116).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>l.set(e.getOption(116).insertMode))),this.widget=this._toDispose.add(new h_(()=>{let u=this._instantiationService.createInstance(Dp,this.editor);this._toDispose.add(u),this._toDispose.add(u.onDidSelect(w=>this._insertSuggestion(w,0),this));let h=new G2(this.editor,u,this.model,w=>this._insertSuggestion(w,2));this._toDispose.add(h);let f=ct.MakesTextEdit.bindTo(this._contextKeyService),m=ct.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=ct.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(ni(()=>{f.reset(),m.reset(),g.reset()})),this._toDispose.add(u.onDidFocus(({item:w})=>{let _=this.editor.getPosition(),E=w.editStart.column,A=_.column,L=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!w.completion.additionalTextEdits&&!(w.completion.insertTextRules&4)&&A-E===w.completion.insertText.length&&(L=this.editor.getModel().getValueInRange({startLineNumber:_.lineNumber,startColumn:E,endLineNumber:_.lineNumber,endColumn:A})!==w.completion.insertText),f.set(L),m.set(!Ie.equals(w.editInsertEnd,w.editReplaceEnd)),g.set(!!w.provider.resolveCompletionItem||!!w.completion.documentation||w.completion.detail!==w.completion.label)})),this._toDispose.add(u.onDetailsKeyDown(w=>{if(w.toKeyCodeChord().equals(new N3(!0,!1,!1,!1,33))||Er&&w.toKeyCodeChord().equals(new N3(!1,!1,!1,!0,33))){w.stopPropagation();return}w.toKeyCodeChord().isModifierKey()||this.editor.focus()})),u})),this._overtypingCapturer=this._toDispose.add(new h_(()=>this._toDispose.add(new Pb(this.editor,this.model)))),this._alternatives=this._toDispose.add(new h_(()=>this._toDispose.add(new Md(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(Tp,e)),this._toDispose.add(this.model.onDidTrigger(u=>{this.widget.value.showTriggered(u.auto,u.shy?250:50),this._lineSuffix.value=new _A(this.editor.getModel(),u.position)})),this._toDispose.add(this.model.onDidSuggest(u=>{if(u.triggerOptions.shy)return;let h=-1;for(let m of this._selectors.itemsOrderedByPriorityDesc)if(h=m.select(this.editor.getModel(),this.editor.getPosition(),u.completionModel.items),h!==-1)break;h===-1&&(h=0);let f=!1;if(u.triggerOptions.auto){let m=this.editor.getOption(116);m.selectionMode==="never"||m.selectionMode==="always"?f=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?f=u.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(f=u.triggerOptions.triggerKind===1&&!u.triggerOptions.refilter)}this.widget.value.showSuggestions(u.completionModel,h,u.isFrozen,u.triggerOptions.auto,f)})),this._toDispose.add(this.model.onDidCancel(u=>{u.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{rbe||(this.model.cancel(),this.model.clear())}));let c=ct.AcceptSuggestionsOnEnter.bindTo(r),d=()=>{let u=this.editor.getOption(1);c.set(u==="on"||u==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>d())),d()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;let n=on.get(this.editor);if(!n)return;this._onWillInsertSuggestItem.fire({item:e.item});let r=this.editor.getModel(),o=r.getAlternativeVersionId(),{item:s}=e,a=[],l=new zi;t&1||this.editor.pushUndoStop();let c=this.getOverwriteInfo(s,!!(t&8));this._memoryService.memorize(r,this.editor.getPosition(),s);let d=s.isResolved,u=-1,h=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();let m=_a.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(g=>ii.replaceMove(B.lift(g.range),g.text))),m.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!d){let m=new gn,g,w=r.onDidChangeContent(L=>{if(L.isFlush){l.cancel(),w.dispose();return}for(let O of L.changes){let U=B.getEndPosition(O.range);(!g||Ie.isBefore(U,g))&&(g=U)}}),_=t;t|=2;let E=!1,A=this.editor.onWillType(()=>{A.dispose(),E=!0,_&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested)return;if(g&&s.completion.additionalTextEdits.some(O=>Ie.isBefore(g,B.getStartPosition(O.range))))return!1;E&&this.editor.pushUndoStop();let L=_a.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(O=>ii.replaceMove(B.lift(O.range),O.text))),L.restoreRelativeVerticalPositionOfCursor(this.editor),(E||!(_&2))&&this.editor.pushUndoStop(),!0}).then(L=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",m.elapsed(),L),h=L===!0?1:L===!1?0:-2}).finally(()=>{w.dispose(),A.dispose()}))}let{insertText:f}=s.completion;if(s.completion.insertTextRules&4||(f=Wo.escape(f)),this.model.cancel(),n.insert(f,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(s.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),s.completion.command)if(s.completion.command.id===zb.id)this.model.trigger({auto:!0,retrigger:!0});else{let m=new gn;a.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(g=>{s.completion.extensionId?Xt(g):ft(g)}).finally(()=>{u=m.elapsed()}))}t&4&&this._alternatives.value.set(e,m=>{for(l.cancel();r.canUndo();){o!==r.getAlternativeVersionId()&&r.undo(),this._insertSuggestion(m,3|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(s,r,d,u,h),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,n,r,o){var s,a,l;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(a=(s=e.extensionId)===null||s===void 0?void 0:s.value)!==null&&a!==void 0?a:"unknown",providerId:(l=e.provider._debugDisplayName)!==null&&l!==void 0?l:"unknown",kind:e.completion.kind,basenameHash:H_(Dr(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:ZP(t.uri),resolveInfo:e.provider.resolveCompletionItem?n?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:r,additionalEditsAsync:o})}getOverwriteInfo(e,t){Bt(this.editor.hasModel());let n=this.editor.getOption(116).insertMode==="replace";t&&(n=!n);let r=e.position.column-e.editStart.column,o=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,s=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:r+s,overwriteAfter:o+a}}_alertCompletionItem(e){if(Ki(e.completion.additionalTextEdits)){let t=b("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);ln(t)}}triggerSuggest(e,t,n){this.editor.hasModel()&&(this.model.trigger({auto:t!=null?t:!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;let t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},r=o=>{if(o.completion.insertTextRules&4||o.completion.additionalTextEdits)return!0;let s=this.editor.getPosition(),a=o.editStart.column,l=s.column;return l-a!==o.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:s.lineNumber,startColumn:a,endLineNumber:s.lineNumber,endColumn:l})!==o.completion.insertText};ci.once(this.model.onDidTrigger)(o=>{let s=[];ci.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{ji(s),n()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(ji(s),a.items.length===0){n();return}let l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!r(c)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,s)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){let n=this.widget.value.getFocusedItem(),r=0;e&&(r|=4),t&&(r|=8),this._insertSuggestion(n,r)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};qo.ID="editor.contrib.suggestController";qo=vA=nbe([Mp(1,Ep),Mp(2,_i),Mp(3,it),Mp(4,Ke),Mp(5,Hc),Mp(6,Ar)],qo);yA=class{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,n)=>this.prioritySelector(n)-this.prioritySelector(t)),{dispose:()=>{let t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}},zb=class i extends de{constructor(){super({id:i.id,label:b("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:fe.and(F.writable,F.hasCompletionItemProvider,ct.Visible.toNegated()),kbOpts:{kbExpr:F.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){let r=qo.get(t);if(!r)return;let o;n&&typeof n=="object"&&n.auto===!0&&(o=!0),r.triggerSuggest(void 0,o,void 0)}};zb.id="editor.action.triggerSuggest";Ue(qo.ID,qo,2);ee(zb);yo=100+90,vr=Fi.bindToContribution(qo.get);We(new vr({id:"acceptSelectedSuggestion",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:fe.and(ct.Visible,F.textInputFocus),weight:yo},{primary:3,kbExpr:fe.and(ct.Visible,F.textInputFocus,ct.AcceptSuggestionsOnEnter,ct.MakesTextEdit),weight:yo}],menuOpts:[{menuId:Xa,title:b("accept.insert","Insert"),group:"left",order:1,when:ct.HasInsertAndReplaceRange.toNegated()},{menuId:Xa,title:b("accept.insert","Insert"),group:"left",order:1,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("insert"))},{menuId:Xa,title:b("accept.replace","Replace"),group:"left",order:1,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("replace"))}]}));We(new vr({id:"acceptAlternativeSelectedSuggestion",precondition:fe.and(ct.Visible,F.textInputFocus,ct.HasFocusedSuggestion),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Xa,group:"left",order:2,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("insert")),title:b("accept.replace","Replace")},{menuId:Xa,group:"left",order:2,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("replace")),title:b("accept.insert","Insert")}]}));Dt.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");We(new vr({id:"hideSuggestWidget",precondition:ct.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:9,secondary:[1033]}}));We(new vr({id:"selectNextSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));We(new vr({id:"selectNextPageSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:12,secondary:[2060]}}));We(new vr({id:"selectLastSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));We(new vr({id:"selectPrevSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));We(new vr({id:"selectPrevPageSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:11,secondary:[2059]}}));We(new vr({id:"selectFirstSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));We(new vr({id:"focusSuggestion",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));We(new vr({id:"focusAndAcceptSuggestion",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));We(new vr({id:"toggleSuggestionDetails",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:Xa,group:"right",order:1,when:fe.and(ct.DetailsVisible,ct.CanResolve),title:b("detail.more","show less")},{menuId:Xa,group:"right",order:1,when:fe.and(ct.DetailsVisible.toNegated(),ct.CanResolve),title:b("detail.less","show more")}]}));We(new vr({id:"toggleExplainMode",precondition:ct.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));We(new vr({id:"toggleSuggestionFocus",precondition:ct.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:2570,mac:{primary:778}}}));We(new vr({id:"insertBestCompletion",precondition:fe.and(F.textInputFocus,fe.equals("config.editor.tabCompletion","on"),Tp.AtEnd,ct.Visible.toNegated(),Md.OtherSuggestions.toNegated(),on.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(Hv(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:yo,primary:2}}));We(new vr({id:"insertNextSuggestion",precondition:fe.and(F.textInputFocus,fe.equals("config.editor.tabCompletion","on"),Md.OtherSuggestions,ct.Visible.toNegated(),on.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:2}}));We(new vr({id:"insertPrevSuggestion",precondition:fe.and(F.textInputFocus,fe.equals("config.editor.tabCompletion","on"),Md.OtherSuggestions,ct.Visible.toNegated(),on.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:yo,kbExpr:F.textInputFocus,primary:1026}}));ee(class extends de{constructor(){super({id:"editor.action.resetSuggestSize",label:b("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(i,e){var t;(t=qo.get(e))===null||t===void 0||t.resetWidgetSize()}})});function obe(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}var oC,Bb,X$=N(()=>{ei();ke();di();et();fr();ch();JL();rC();xa();qL();mi();oC=class extends ce{get selectedItem(){return this._selectedItem}constructor(e,t,n,r){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=n,this.onWillAccept=r,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=wa("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(e.onKeyDown(s=>{s.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(s=>{s.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));let o=qo.get(this.editor);if(o){this._register(o.registerSelector({priority:100,select:(l,c,d)=>{var u;or(_=>this.checkModelVersion(_));let h=this.editor.getModel();if(!h)return-1;let f=(u=this.suggestControllerPreselector())===null||u===void 0?void 0:u.removeCommonPrefix(h);if(!f)return-1;let m=Ie.lift(c),g=d.map((_,E)=>{let L=Bb.fromSuggestion(o,h,m,_,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(h),O=f.augments(L);return{index:E,valid:O,prefixLength:L.text.length,suggestItem:_}}).filter(_=>_&&_.valid&&_.prefixLength>0),w=OP(g,RP(_=>_.prefixLength,PP));return w?w.index:-1}}));let s=!1,a=()=>{s||(s=!0,this._register(o.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(o.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(o.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(ci.once(o.model.onDidTrigger)(l=>{a()})),this._register(o.onWillInsertSuggestItem(l=>{let c=this.editor.getPosition(),d=this.editor.getModel();if(!c||!d)return;let u=Bb.fromSuggestion(o,d,c,l.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){let t=this.getSuggestItemInfo();(this._isActive!==e||!obe(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,or(n=>{this.checkModelVersion(n),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,n)}))}getSuggestItemInfo(){let e=qo.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;let t=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),r=this.editor.getModel();if(!(!t||!n||!r))return Bb.fromSuggestion(e,r,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){let e=qo.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){let e=qo.get(this.editor);e==null||e.forceRenderingAbove()}},Bb=class i{static fromSuggestion(e,t,n,r,o){let{insertText:s}=r.completion,a=!1;if(r.completion.insertTextRules&4){let c=new Wo().parse(s);c.children.length<100&&Cp.adjustWhitespace(t,n,!0,c),s=c.toString(),a=!0}let l=e.getOverwriteInfo(r,o);return new i(B.fromPositions(n.delta(0,-l.overwriteBefore),n.delta(0,Math.max(l.overwriteAfter,0))),s,r.completion.kind,a)}constructor(e,t,n,r){this.range=e,this.insertText=t,this.completionItemKind=n,this.isSnippetText=r}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new UO(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new dh(this.range,this.insertText)}}});var sbe,zd,wA,_r,sC=N(()=>{Lo();ei();ke();xa();s_();di();Ms();Pt();L2();d$();A2();z2();O$();X$();He();ere();Vi();kn();wt();Ut();Wn();sbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zd=function(i,e){return function(t,n){e(t,n,i)}},_r=wA=class extends ce{static get(e){return e.getContribution(wA.ID)}constructor(e,t,n,r,o,s,a,l,c){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=n,this.configurationService=r,this.commandService=o,this.debounceService=s,this.languageFeaturesService=a,this.audioCueService=l,this._keybindingService=c,this.model=sg("inlineCompletionModel",void 0),this.textModelVersionId=wa("textModelVersionId",-1),this.cursorPosition=wa("cursorPosition",new Ie(1,1)),this.suggestWidgetAdaptor=this._register(new oC(this.editor,()=>{var h,f;return(f=(h=this.model.get())===null||h===void 0?void 0:h.selectedInlineCompletion.get())===null||f===void 0?void 0:f.toSingleTextEdit(void 0)},h=>this.updateObservables(h,no.Other),h=>{or(f=>{var m;this.updateObservables(f,no.Other),(m=this.model.get())===null||m===void 0||m.handleSuggestAccepted(h)})})),this._enabled=Tl(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(N2,this.editor,{ghostText:this.model.map((h,f)=>h==null?void 0:h.ghostText.read(f)),minReservedLineCount:$_(0),targetTextModel:this.model.map(h=>h==null?void 0:h.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new yn(this.contextKeyService,this.model)),this._register(ci.runAndSubscribe(e.onDidChangeModel,()=>or(h=>{this.model.set(void 0,h),this.updateObservables(h,no.Other);let f=e.getModel();if(f){let m=t.createInstance(K2,f,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,Tl(e.onDidChangeConfiguration,()=>e.getOption(116).preview),Tl(e.onDidChangeConfiguration,()=>e.getOption(116).previewMode),Tl(e.onDidChangeConfiguration,()=>e.getOption(61).mode),this._enabled);this.model.set(m,h)}})));let d=h=>{var f;return h.isUndoing?no.Undo:h.isRedoing?no.Redo:!((f=this.model.get())===null||f===void 0)&&f.isAcceptingPartially?no.AcceptWord:no.Other};this._register(e.onDidChangeModelContent(h=>or(f=>this.updateObservables(f,d(h))))),this._register(e.onDidChangeCursorPosition(h=>or(f=>{var m;this.updateObservables(f,no.Other),(h.reason===3||h.source==="api")&&((m=this.model.get())===null||m===void 0||m.stop(f))}))),this._register(e.onDidType(()=>or(h=>{var f;this.updateObservables(h,no.Other),this._enabled.get()&&((f=this.model.get())===null||f===void 0||f.trigger(h))}))),this._register(this.commandService.onDidExecuteCommand(h=>{new Set([cf.Tab.id,cf.DeleteLeft.id,cf.DeleteRight.id,E2,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&or(m=>{var g;(g=this.model.get())===null||g===void 0||g.trigger(m)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(61).keepOnBlur||Ks.dropDownVisible||or(h=>{var f;(f=this.model.get())===null||f===void 0||f.stop(h)})})),this._register(pr(h=>{var f;let m=(f=this.model.read(h))===null||f===void 0?void 0:f.state.read(h);m!=null&&m.suggestItem?m.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(ni(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let u;this._register(pr(h=>{let f=this.model.read(h),m=f==null?void 0:f.state.read(h);if(!f||!m||!m.inlineCompletion){u=void 0;return}if(m.inlineCompletion.semanticId!==u){u=m.inlineCompletion.semanticId;let g=f.textModel.getLineContent(m.ghostText.lineNumber);this.audioCueService.playAudioCue(sz.inlineSuggestion).then(()=>{this.editor.getOption(7)&&this.provideScreenReaderUpdate(m.ghostText.renderForScreenReader(g))})}})),this._register(new F2(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(e){let t=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),n=this._keybindingService.lookupKeybinding("editor.action.accessibleView"),r;!t&&n&&this.editor.getOption(146)&&(r=b("showAccessibleViewHint","Inspect this in the accessible view ({0})",n.getAriaLabel())),r?ln(e+", "+r):ln(e)}updateObservables(e,t){var n,r;let o=this.editor.getModel();this.textModelVersionId.set((n=o==null?void 0:o.getVersionId())!==null&&n!==void 0?n:-1,e,t),this.cursorPosition.set((r=this.editor.getPosition())!==null&&r!==void 0?r:new Ie(1,1),e)}shouldShowHoverAt(e){var t;let n=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return n?n.parts.some(r=>e.containsPosition(new Ie(n.lineNumber,r.column))):!1}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};_r.ID="editor.contrib.inlineCompletionsController";_r=wA=sbe([zd(1,Ke),zd(2,it),zd(3,Mt),zd(4,_i),zd(5,cn),zd(6,Se),zd(7,oz),zd(8,Kt)],_r)});var Bd,Hb,Ub,aC,lC,cC,dC,jb,Wb,Q$=N(()=>{xa();lt();ti();L2();A2();sC();uh();He();Ji();kn();wt();Bd=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Hb=class i extends de{constructor(){super({id:i.ID,label:b("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:fe.and(F.writable,yn.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var n;return Bd(this,void 0,void 0,function*(){let r=_r.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.next()})}};Hb.ID=I2;Ub=class i extends de{constructor(){super({id:i.ID,label:b("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:fe.and(F.writable,yn.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var n;return Bd(this,void 0,void 0,function*(){let r=_r.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.previous()})}};Ub.ID=T2;aC=class extends de{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:b("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:F.writable})}run(e,t){var n;return Bd(this,void 0,void 0,function*(){let r=_r.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.triggerExplicitly()})}},lC=class extends de{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:b("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:fe.and(F.writable,yn.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065,kbExpr:fe.and(F.writable,yn.inlineSuggestionVisible)},menuOpts:[{menuId:Me.InlineSuggestionToolbar,title:b("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var n;return Bd(this,void 0,void 0,function*(){let r=_r.get(t);yield(n=r==null?void 0:r.model.get())===null||n===void 0?void 0:n.acceptNextWord(r.editor)})}},cC=class extends de{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:b("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:fe.and(F.writable,yn.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:Me.InlineSuggestionToolbar,title:b("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var n;return Bd(this,void 0,void 0,function*(){let r=_r.get(t);yield(n=r==null?void 0:r.model.get())===null||n===void 0?void 0:n.acceptNextLine(r.editor)})}},dC=class extends de{constructor(){super({id:E2,label:b("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:yn.inlineSuggestionVisible,menuOpts:[{menuId:Me.InlineSuggestionToolbar,title:b("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:fe.and(yn.inlineSuggestionVisible,F.tabMovesFocus.toNegated(),yn.inlineSuggestionHasIndentationLessThanTabSize,ct.Visible.toNegated(),F.hoverFocused.toNegated())}})}run(e,t){var n;return Bd(this,void 0,void 0,function*(){let r=_r.get(t);r&&((n=r.model.get())===null||n===void 0||n.accept(r.editor),r.editor.focus())})}},jb=class i extends de{constructor(){super({id:i.ID,label:b("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:yn.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return Bd(this,void 0,void 0,function*(){let n=_r.get(t);or(r=>{var o;(o=n==null?void 0:n.model.get())===null||o===void 0||o.stop(r)})})}};jb.ID="editor.action.inlineSuggest.hide";Wb=class i extends es{constructor(){super({id:i.ID,title:b("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Me.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:fe.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return Bd(this,void 0,void 0,function*(){let n=e.get(Mt),o=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",o)})}};Wb.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"});var abe,Vb,xA,uC,Z$=N(()=>{Ht();Ts();ke();xa();et();ts();nc();sC();z2();kd();He();X_();Ut();ns();Bc();abe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Vb=function(i,e){return function(t,n){e(t,n,i)}},xA=class{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},uC=class{constructor(e,t,n,r,o,s){this._editor=e,this._languageService=t,this._openerService=n,this.accessibilityService=r,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=_r.get(this._editor);if(!t)return null;let n=e.target;if(n.type===8){let r=n.detail;if(t.shouldShowHoverAtViewZone(r.viewZoneId))return new Ld(1e3,this,B.fromPositions(this._editor.getModel().validatePosition(r.positionBefore||r.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&t.shouldShowHoverAt(n.range)?new Ld(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range)?new Ld(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(61).showToolbar==="always")return[];let n=_r.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new xA(this,e.range,n)]:[]}renderHoverParts(e,t){let n=new le,r=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(7)&&this.renderScreenReaderText(e,r,n);let o=r.controller.model.get(),s=this._instantiationService.createInstance(Ks,this._editor,!1,$_(null),o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.selectedInlineCompletion.map(a=>{var l;return(l=a==null?void 0:a.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]}));return e.fragment.appendChild(s.getDomNode()),o.triggerExplicitly(),n.add(s),n}renderScreenReaderText(e,t,n){let r=Le,o=r("div.hover-row.markdown-hover"),s=Te(o,r("div.hover-contents",{"aria-live":"assertive"})),a=n.add(new io({editor:this._editor},this._languageService,this._openerService)),l=c=>{n.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));let d=b("inlineSuggestionFollows","Suggestion:"),u=n.add(a.render(new $i().appendText(d).appendCodeblock("text",c)));s.replaceChildren(u.element)};n.add(pr(c=>{var d;let u=(d=t.controller.model.read(c))===null||d===void 0?void 0:d.ghostText.read(c);if(u){let h=this._editor.getModel().getLineContent(u.lineNumber);l(u.renderForScreenReader(h))}else du(s)})),e.fragment.appendChild(o)}};uC=abe([Vb(1,en),Vb(2,tn),Vb(3,kf),Vb(4,Ke),Vb(5,Ar)],uC)});var CA=N(()=>{lt();nc();Q$();Z$();sC();Ji();Ue(_r.ID,_r,3);ee(aC);ee(Hb);ee(Ub);ee(lC);ee(cC);ee(dC);ee(jb);Si(Wb);jo.register(uC)});var J$=N(()=>{});var eG=N(()=>{J$()});var tG=N(()=>{});var iG=N(()=>{tG()});var nG,lbe,cbe,SA,kA,hC,fC,rG=N(()=>{Ht();gk();da();cF();ke();J3();iG();et();jn();nG=new vt(new Is(0,122,204)),lbe={showArrow:!0,showFrame:!0,className:"",frameColor:nG,arrowColor:nG,keepEditorSelection:!1},cbe="vs.editor.contrib.zoneWidget",SA=class{constructor(e,t,n,r,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=r,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}},kA=class{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}},hC=class i{constructor(e){this._editor=e,this._ruleName=i._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),P3(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){P3(this._ruleName),cP(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:B.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};hC._IdGenerator=new aF(".arrow-decoration-");fC=class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new le,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=nO(t),ff(this.options,lbe,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{let r=this._getWidth(n);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(r)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new hC(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){let n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;let r=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(r))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){let e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){let n=B.isIRange(e)?B.lift(e):B.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:mt.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){let e=this.editor.getOption(65),t=0;if(this.options.showArrow){let n=Math.round(e/3);t+=2*n}if(this.options.showFrame){let n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){let n=e.getStartPosition(),r=this.editor.getLayoutInfo(),o=this._getWidth(r);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(r)+"px";let s=document.createElement("div");s.style.overflow="hidden";let a=this.editor.getOption(65);if(!this.options.allowUnlimitedHeight){let h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new SA(s,n.lineNumber,n.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new kA(cbe+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){let h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}let d=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);let u=this.editor.getModel();if(u){let h=u.validateRange(new B(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===u.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Sl(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){let n=(t.currentY-e.startY)/this.editor.getOption(65),r=n<0?Math.ceil(n):Math.floor(n),o=e.heightInLines+r;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){let e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}});function aG(i){let e=i.get(ai).getFocusedCodeEditor();return e instanceof Vo?e.getParentEditor():e}var oG,sG,EA,On,qb,dbe,Np,lG,pC,mC,cG,dG,Ctt,Stt,ktt,Ett,Hd,Ttt,Itt,Ltt,Att,Dtt,hh=N(()=>{Ht();rg();Fc();Jn();Lr();da();ei();J3();eG();lt();Ir();Lp();rG();He();J_();wt();fl();Ut();ir();oG=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},sG=function(i,e){return function(t,n){e(t,n,i)}},EA=Zn("IPeekViewService");tr(EA,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){let t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());let n=()=>{let r=this._widgets.get(i);r&&r.widget===e&&(r.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(n)})}},1);(function(i){i.inPeekEditor=new ht("inReferenceSearchEditor",!0,b("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(On||(On={}));qb=class{constructor(e,t){e instanceof Vo&&On.inPeekEditor.bindTo(t)}dispose(){}};qb.ID="editor.contrib.referenceController";qb=oG([sG(1,it)],qb);Ue(qb.ID,qb,0);dbe={headerBackgroundColor:vt.white,primaryHeadingColor:vt.fromHex("#333333"),secondaryHeadingColor:vt.fromHex("#6c6c6cb3")},Np=class extends fC{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new Je,this.onDidClose=this._onDidClose.event,ff(this.options,dbe,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Le(".head"),this._bodyElement=Le(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=Le(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),Io(this._titleElement,"click",o=>this._onTitleClick(o))),Te(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Le("span.filename"),this._secondaryHeading=Le("span.dirname"),this._metaHeading=Le("span.meta"),Te(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);let n=Le(".peekview-actions");Te(this._headElement,n);let r=this._getActionBarOptions();this._actionbarWidget=new Ds(n,r),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Zo("peekview.close",b("label.close","Close"),_t.asClassName(pt.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:YF.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Kr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,ur(this._metaHeading)):Hn(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}let n=Math.ceil(this.editor.getOption(65)*1.2),r=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(r,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};Np=oG([sG(2,Ke)],Np);lG=je("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:vt.black,hcLight:vt.white},b("peekViewTitleBackground","Background color of the peek view title area.")),pC=je("peekViewTitleLabel.foreground",{dark:vt.white,light:vt.black,hcDark:vt.white,hcLight:fa},b("peekViewTitleForeground","Color of the peek view title.")),mC=je("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},b("peekViewTitleInfoForeground","Color of the peek view title info.")),cG=je("peekView.border",{dark:jm,light:jm,hcDark:is,hcLight:is},b("peekViewBorder","Color of the peek view borders and arrow.")),dG=je("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:vt.black,hcLight:vt.white},b("peekViewResultsBackground","Background color of the peek view result list.")),Ctt=je("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:vt.white,hcLight:fa},b("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),Stt=je("peekViewResult.fileForeground",{dark:vt.white,light:"#1E1E1E",hcDark:vt.white,hcLight:fa},b("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),ktt=je("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},b("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),Ett=je("peekViewResult.selectionForeground",{dark:vt.white,light:"#6C6C6C",hcDark:vt.white,hcLight:fa},b("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Hd=je("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:vt.black,hcLight:vt.white},b("peekViewEditorBackground","Background color of the peek view editor.")),Ttt=je("peekViewEditorGutter.background",{dark:Hd,light:Hd,hcDark:Hd,hcLight:Hd},b("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),Itt=je("peekViewEditorStickyScroll.background",{dark:Hd,light:Hd,hcDark:Hd,hcLight:Hd},b("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),Ltt=je("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},b("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),Att=je("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},b("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Dtt=je("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:ha,hcLight:ha},b("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))});var hbe,Ko,TA,cc,Ur,Rp=N(()=>{qt();ei();cF();ke();df();Do();Ni();et();He();hbe=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ko=class{constructor(e,t,n,r){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=r,this.id=lF.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;let t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?b({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,Dr(this.uri),this.range.startLineNumber,this.range.startColumn):b("aria.oneReference","in {0} on line {1} at column {2}",Dr(this.uri),this.range.startLineNumber,this.range.startColumn)}},TA=class{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){let n=this._modelReference.object.textEditorModel;if(!n)return;let{startLineNumber:r,startColumn:o,endLineNumber:s,endColumn:a}=e,l=n.getWordUntilPosition({lineNumber:r,column:o-t}),c=new B(r,l.startColumn,r,o),d=new B(s,a,s,1073741824),u=n.getValueInRange(c).replace(/^\s+/,""),h=n.getValueInRange(e),f=n.getValueInRange(d).replace(/\s+$/,"");return{value:u+h+f,highlight:{start:u.length,end:u.length+h.length}}}},cc=class{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new HP}dispose(){ji(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){let e=this.children.length;return e===1?b("aria.fileReferences.1","1 symbol in {0}, full path {1}",Dr(this.uri),this.uri.fsPath):b("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Dr(this.uri),this.uri.fsPath)}resolve(e){return hbe(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{let n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new TA(n))}catch(n){ft(n)}return this})}},Ur=class i{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Je,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;let[n]=e;e.sort(i._compareReferences);let r;for(let o of e)if((!r||!Z3.isEqual(r.uri,o.uri,!0))&&(r=new cc(this,o.uri),this.groups.push(r)),r.children.length===0||i._compareReferences(o,r.children[r.children.length-1])!==0){let s=new Ko(n===o,r,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),r.children.push(s)}}dispose(){ji(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new i(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?b("aria.result.0","No results found"):this.references.length===1?b("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?b("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):b("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.length,s=n.parent.groups.length;return s===1||t&&r+1<o||!t&&r>0?(t?r=(r+1)%o:r=(r+o-1)%o,n.children[r]):(r=n.parent.groups.indexOf(n),t?(r=(r+1)%s,n.parent.groups[r].children[0]):(r=(r+s-1)%s,n.parent.groups[r].children[n.parent.groups[r].children.length-1]))}nearestReference(e,t){let n=this.references.map((r,o)=>({idx:o,prefixLen:zc(r.uri.toString(),e.toString()),offsetDist:Math.abs(r.range.startLineNumber-t.lineNumber)*100+Math.abs(r.range.startColumn-t.column)})).sort((r,o)=>r.prefixLen>o.prefixLen?-1:r.prefixLen<o.prefixLen?1:r.offsetDist<o.offsetDist?-1:r.offsetDist>o.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(let n of this.references)if(n.uri.toString()===e.toString()&&B.containsPosition(n.range,t))return n}firstReference(){for(let e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return Z3.compare(e.uri,t.uri)||B.compareRangesUsingStarts(e.range,t.range)}}});var uG=N(()=>{});var hG=N(()=>{uG()});var wC,xC,IA,gC,bC,vC,_C,LA,Pp,AA,Op,yC,fG=N(()=>{Ht();ire();Jne();rz();ml();ke();Do();ra();He();Ut();Wn();ey();O_();Rp();wC=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xC=function(i,e){return function(t,n){e(t,n,i)}},gC=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Ur||e instanceof cc}getChildren(e){if(e instanceof Ur)return e.groups;if(e instanceof cc)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};gC=wC([xC(0,Sn)],gC);bC=class{getHeight(){return 23}getTemplateId(e){return e instanceof cc?Pp.id:Op.id}},vC=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Ko){let n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return Dr(e.uri)}};vC=wC([xC(0,Kt)],vC);_C=class{getId(e){return e instanceof Ko?e.id:e.uri}},LA=class extends ce{constructor(e,t){super(),this._labelService=t;let n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new iy(n,{supportHighlights:!0})),this.badge=new uz(Te(n,Le(".count")),{},_F),e.appendChild(n)}set(e,t){let n=uf(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});let r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(b("referencesCount","{0} references",r)):this.badge.setTitleFormat(b("referenceCount","{0} reference",r))}};LA=wC([xC(1,Il)],LA);Pp=IA=class{constructor(e){this._instantiationService=e,this.templateId=IA.id}renderTemplate(e){return this._instantiationService.createInstance(LA,e)}renderElement(e,t,n){n.set(e.element,gu(e.filterData))}disposeTemplate(e){e.dispose()}};Pp.id="FileReferencesRenderer";Pp=IA=wC([xC(0,Ke)],Pp);AA=class{constructor(e){this.label=new nz(e)}set(e,t){var n;let r=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!r||!r.value)this.label.set(`${Dr(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{let{value:o,highlight:s}=r;t&&!pl.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,gu(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}},Op=class i{constructor(){this.templateId=i.id}renderTemplate(e){return new AA(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}};Op.id="OneReferenceRenderer";yC=class{getWidgetAriaLabel(){return b("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}});var fbe,dc,pG,CC,SC,DA,kC,mG=N(()=>{Ht();tre();da();ei();ke();Dm();Do();hG();Lp();et();jn();Un();X3();ts();ra();fG();hh();He();Ut();Wn();ey();dz();nr();Ine();Rp();fbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},dc=function(i,e){return function(t,n){e(t,n,i)}},pG=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},CC=class i{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new le,this._callOnModelChange=new le,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();let e=this._editor.getModel();if(e){for(let t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));let t=[],n=[];for(let r=0,o=e.children.length;r<o;r++){let s=e.children[r];this._decorationIgnoreSet.has(s.id)||s.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:s.range,options:i.DecorationOptions}),n.push(r))}this._editor.changeDecorations(r=>{let o=r.deltaDecorations([],t);for(let s=0;s<o.length;s++)this._decorations.set(o[s],e.children[n[s]])})}_onDecorationChanged(){let e=[],t=this._editor.getModel();if(t){for(let[n,r]of this._decorations){let o=t.getDecorationRange(n);if(!o)continue;let s=!1;if(!B.equalsRange(o,r.range)){if(B.spansMultipleLines(o))s=!0;else{let a=r.range.endColumn-r.range.startColumn,l=o.endColumn-o.startColumn;a!==l&&(s=!0)}s?(this._decorationIgnoreSet.add(r.id),e.push(n)):r.range=o}}for(let n=0,r=e.length;n<r;n++)this._decorations.delete(e[n]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}};CC.DecorationOptions=mt.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});SC=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,n;try{let r=JSON.parse(e);t=r.ratio,n=r.heightInLines}catch(r){}return{ratio:t||.7,heightInLines:n||18}}},DA=class extends cz{},kC=class extends Np{constructor(e,t,n,r,o,s,a,l,c,d,u,h){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},s),this._defaultTreeKeyboardSupport=t,this.layoutData=n,this._textModelResolverService=o,this._instantiationService=s,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=c,this._keybindingService=d,this._languageService=u,this._languageConfigurationService=h,this._disposeOnNewModel=new le,this._callOnDispose=new le,this._onDidSelectReference=new Je,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Qt(0,0),this._applyTheme(r.getColorTheme()),this._callOnDispose.add(r.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),ji(this._preview),ji(this._previewNotAvailableMessage),ji(this._tree),ji(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){let t=e.getColor(cG)||vt.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(lG)||vt.transparent,primaryHeadingColor:e.getColor(pC),secondaryHeadingColor:e.getColor(mC)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=Te(e,Le("div.messages")),Hn(this._messageContainer),this._splitView=new az(e,{orientation:1}),this._previewContainer=Te(e,Le("div.preview.inline"));let t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Vo,this._previewContainer,t,{},this.editor),Hn(this._previewContainer),this._previewNotAvailableMessage=new sk(b("missingPreviewMessage","no preview available"),lf,sk.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=Te(e,Le("div.ref-tree.inline"));let n={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new yC,keyboardNavigationLabelProvider:this._instantiationService.createInstance(vC),identityProvider:new _C,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:dG}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(Io(this._treeContainer,"keydown",o=>{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(DA,"ReferencesWidget",this._treeContainer,new bC,[this._instantiationService.createInstance(Pp),this._instantiationService.createInstance(Op)],this._instantiationService.createInstance(gC),n),this._splitView.addView({onDidChange:ci.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},Tk.Distribute),this._splitView.addView({onDidChange:ci.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:o=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${o}px`,this._tree.layout(this._dim.height,o)}},Tk.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let r=(o,s)=>{o instanceof Ko&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?r(o.element,"side"):o.editorOptions.pinned?r(o.element,"goto"):r(o.element,"show")}),Hn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Qt(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=b("noResults","No results"),ur(this._messageContainer),Promise.resolve(void 0)):(Hn(this._messageContainer),this._decorationsManager=new CC(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{let{event:t,target:n}=e;if(t.detail!==2)return;let r=this._getFocusedReference();r&&this._onDidSelectReference.fire({element:{uri:r.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),ur(this._treeContainer),ur(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){let[e]=this._tree.getFocus();if(e instanceof Ko)return e;if(e instanceof cc&&e.children.length>0)return e.children[0]}revealReference(e){return pG(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return pG(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==To.inMemory?this.setTitle(QP(e.uri),this._uriLabel.getUriLabel(uf(e.uri))):this.setTitle(b("peekView.alternateTitle","References"));let n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));let r=yield n;if(!this._model){r.dispose();return}ji(this._previewModelReference);let o=r.object;if(o){let s=this._preview.getModel()===o.textEditorModel?0:1,a=B.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()})}};kC=fbe([dc(3,vn),dc(4,Sn),dc(5,Ke),dc(6,EA),dc(7,Il),dc(8,XO),dc(9,Kt),dc(10,en),dc(11,Ot)],kC)});function ph(i,e){let t=aG(i);if(!t)return;let n=Qa.get(t);n&&e(n)}var pbe,Fp,gG,EC,fh,Qa,MA=N(()=>{jt();qt();cl();ke();Ir();di();et();hh();He();Vi();kn();wt();Ut();U3();dz();No();wu();Rp();mG();pbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Fp=function(i,e){return function(t,n){e(t,n,i)}},gG=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},fh=new ht("referenceSearchVisible",!1,b("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")),Qa=EC=class{static get(e){return e.getContribution(EC.ID)}constructor(e,t,n,r,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=r,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new le,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=fh.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let r;if(this._widget&&(r=this._widget.position),this.closeWidget(),r&&e.containsPosition(r))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));let o="peekViewLayout",s=SC.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(kC,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(b("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{let{element:c,kind:d}=l;if(c)switch(d){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":n?this._gotoReference(c,!0):this.openReference(c,!1,!0);break}}));let a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(b("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let d=this._editor.getModel().uri,u=new Ie(e.startLineNumber,e.startColumn),h=this._model.nearestReference(d,u);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(85)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return gG(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;let t=this._widget.position;if(!t)return;let n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;let r=this._model.nextOrPreviousReference(n,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(r),yield this._gotoReference(r,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()})}revealReference(e){return gG(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;let r=B.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:r,selectionSource:"code.jump",pinned:t}},this._editor).then(o=>{var s;if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(r),this._widget.focusOnReferenceTree();else{let a=EC.get(o),l=this._model.clone();this.closeWidget(),o.focus(),a==null||a.toggleWidget(r,Jt(c=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},o=>{this._ignoreModelChangeEvent=!1,ft(o)})}openReference(e,t,n){t||this.closeWidget();let{uri:r,range:o}=e;this._editorService.openCodeEditor({resource:r,options:{selection:o,selectionSource:"code.jump",pinned:n}},this._editor,t)}};Qa.ID="editor.contrib.referencesController";Qa=EC=pbe([Fp(2,it),Fp(3,ai),Fp(4,Ri),Fp(5,Ke),Fp(6,Xr),Fp(7,Mt)],Qa);Ao.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:gi(2089,60),when:fe.or(fh,On.inPeekEditor),handler(i){ph(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Ao.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:fe.or(fh,On.inPeekEditor),handler(i){ph(i,e=>{e.goToNextOrPreviousReference(!0)})}});Ao.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:fe.or(fh,On.inPeekEditor),handler(i){ph(i,e=>{e.goToNextOrPreviousReference(!1)})}});Dt.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Dt.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Dt.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Dt.registerCommand("closeReferenceSearch",i=>ph(i,e=>e.closeWidget()));Ao.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:fe.and(On.inPeekEditor,fe.not("config.editor.stablePeek"))});Ao.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:fe.and(fh,fe.not("config.editor.stablePeek"))});Ao.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:fe.and(fh,Lk,Ak.negate(),Dk.negate()),handler(i){var e;let n=(e=i.get(ny).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Ko&&ph(i,r=>r.revealReference(n[0]))}});Ao.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:fe.and(fh,Lk,Ak.negate(),Dk.negate()),handler(i){var e;let n=(e=i.get(ny).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Ko&&ph(i,r=>r.openReference(n[0],!0,!0))}});Dt.registerCommand("openReference",i=>{var e;let n=(e=i.get(ny).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Ko&&ph(i,r=>r.openReference(n[0],!1,!0))})});var bG,Kb,PA,$b,NA,RA,vG=N(()=>{ei();ke();Do();lt();Ir();et();He();wt();fl();Ut();Wn();U3();No();bG=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Kb=function(i,e){return function(t,n){e(t,n,i)}},PA=new ht("hasSymbols",!1,b("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),$b=Zn("ISymbolNavigationService"),NA=class{constructor(e,t,n,r){this._editorService=t,this._notificationService=n,this._keybindingService=r,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=PA.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){let t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();let n=new RA(this._editorService),r=n.onDidChange(o=>{if(this._ignoreEditorChange)return;let s=this._editorService.getActiveCodeEditor();if(!s)return;let a=s.getModel(),l=s.getPosition();if(!a||!l)return;let c=!1,d=!1;for(let u of t.references)if(c_(u.uri,a.uri))c=!0,d=d||B.containsPosition(u.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=A3(n,r)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;let t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:B.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();let t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?b("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):b("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};NA=bG([Kb(0,it),Kb(1,ai),Kb(2,Ri),Kb(3,Kt)],NA);tr($b,NA,1);We(new class extends Fi{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:PA,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get($b).revealNext(e)}});Ao.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:PA,primary:9,handler(i){i.get($b).reset()}});RA=class{constructor(e){this._listener=new Map,this._disposables=new le,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),ji(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,A3(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};RA=bG([Kb(0,ai)],RA)});function Gb(i,e,t,n){return OA(this,void 0,void 0,function*(){let o=t.ordered(i).map(a=>Promise.resolve(n(a,i,e)).then(void 0,l=>{Xt(l)})),s=yield Promise.all(o);return hr(s.flat())})}function mh(i,e,t,n){return Gb(e,t,i,(r,o,s)=>r.provideDefinition(o,s,n))}function FA(i,e,t,n){return Gb(e,t,i,(r,o,s)=>r.provideDeclaration(o,s,n))}function zA(i,e,t,n){return Gb(e,t,i,(r,o,s)=>r.provideImplementation(o,s,n))}function BA(i,e,t,n){return Gb(e,t,i,(r,o,s)=>r.provideTypeDefinition(o,s,n))}function Yb(i,e,t,n,r){return Gb(e,t,i,(o,s,a)=>OA(this,void 0,void 0,function*(){let l=yield o.provideReferences(s,a,{includeDeclaration:!0},r);if(!n||!l||l.length!==2)return l;let c=yield o.provideReferences(s,a,{includeDeclaration:!1},r);return c&&c.length===1?c:l}))}function Xb(i){return OA(this,void 0,void 0,function*(){let e=yield i(),t=new Ur(e,""),n=t.references.map(r=>r.link);return t.dispose(),n})}var OA,TC=N(()=>{mi();ki();qt();lt();Pt();Rp();OA=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Gr("_executeDefinitionProvider",(i,e,t)=>{let n=i.get(Se),r=mh(n.definitionProvider,e,t,st.None);return Xb(()=>r)});Gr("_executeTypeDefinitionProvider",(i,e,t)=>{let n=i.get(Se),r=BA(n.typeDefinitionProvider,e,t,st.None);return Xb(()=>r)});Gr("_executeDeclarationProvider",(i,e,t)=>{let n=i.get(Se),r=FA(n.declarationProvider,e,t,st.None);return Xb(()=>r)});Gr("_executeReferenceProvider",(i,e,t)=>{let n=i.get(Se),r=Yb(n.referenceProvider,e,t,!1,st.None);return Xb(()=>r)});Gr("_executeImplementationProvider",(i,e,t)=>{let n=i.get(Se),r=zA(n.implementationProvider,e,t,st.None);return Xb(()=>r)})});var ms,Qb,Zb,Jb,IC,LC,AC,DC,MC,gh,gs,uc,NC,RC,PC,OC,HA,e1=N(()=>{Lo();jt();cl();Bn();Ln();yu();vk();lt();Ir();Lp();di();et();ti();fr();MA();Rp();vG();M0();hh();He();Ji();Vi();wt();Ut();No();$c();TC();Pt();Jh();lz();ms=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Jo.appendMenuItem(Me.EditorContext,{submenu:Me.EditorContextPeek,title:b("peek.submenu","Peek"),group:"navigation",order:100});gh=class i{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof i||Ie.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}},gs=class i extends sa{static all(){return i._allSymbolNavigationCommands.values()}static _patchConfig(e){let t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(let n of kr.wrap(t.menu))(n.id===Me.EditorContext||n.id===Me.EditorContextPeek)&&(n.when=fe.and(e.precondition,n.when));return t}constructor(e,t){super(i._patchConfig(t)),this.configuration=e,i._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,r){if(!t.hasModel())return Promise.resolve(void 0);let o=e.get(Ri),s=e.get(ai),a=e.get(_l),l=e.get($b),c=e.get(Se),d=e.get(Ke),u=t.getModel(),h=t.getPosition(),f=gh.is(n)?n:new gh(u,h),m=new ba(t,5),g=Vc(this._getLocationModel(c,f.model,f.position,m.token),m.token).then(w=>ms(this,void 0,void 0,function*(){var _;if(!w||m.token.isCancellationRequested)return;ln(w.ariaMessage);let E;if(w.referenceAt(u.uri,h)){let L=this._getAlternativeCommand(t);!i._activeAlternativeCommands.has(L)&&i._allSymbolNavigationCommands.has(L)&&(E=i._allSymbolNavigationCommands.get(L))}let A=w.references.length;if(A===0){if(!this.configuration.muteMessage){let L=u.getWordAtPosition(h);(_=Kn.get(t))===null||_===void 0||_.showMessage(this._getNoResultFoundMessage(L),h)}}else if(A===1&&E)i._activeAlternativeCommands.add(this.desc.id),d.invokeFunction(L=>E.runEditorCommand(L,t,n,r).finally(()=>{i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,w,r)}),w=>{o.error(w)}).finally(()=>{m.dispose()});return a.showWhile(g,250),g}_onResult(e,t,n,r,o){return ms(this,void 0,void 0,function*(){let s=this._getGoToPreference(n);if(!(n instanceof Vo)&&(this.configuration.openInPeek||s==="peek"&&r.references.length>1))this._openInPeek(n,r,o);else{let a=r.firstReference(),l=r.references.length>1&&s==="gotoAndPeek",c=yield this._openReference(n,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,r,o):r.dispose(),s==="goto"&&t.put(a)}})}_openReference(e,t,n,r,o){return ms(this,void 0,void 0,function*(){let s;if(jO(n)&&(s=n.targetSelectionRange),s||(s=n.range),!s)return;let a=yield t.openCodeEditor({resource:n.uri,options:{selection:B.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,r);if(a){if(o){let l=a.getModel(),c=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}})}_openInPeek(e,t,n){let r=Qa.get(e);r&&e.hasModel()?r.toggleWidget(n!=null?n:e.getSelection(),Jt(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}};gs._allSymbolNavigationCommands=new Map;gs._activeAlternativeCommands=new Set;uc=class extends gs{_getLocationModel(e,t,n,r){return ms(this,void 0,void 0,function*(){return new Ur(yield mh(e.definitionProvider,t,n,r),b("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?b("noResultWord","No definition found for '{0}'",e.word):b("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(57).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleDefinitions}};Si((Qb=class extends uc{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Qb.id,title:{value:b("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:b({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:fe.and(F.hasDefinitionProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:[{when:F.editorTextFocus,primary:70,weight:100},{when:fe.and(F.editorTextFocus,Ik),primary:2118,weight:100}],menu:[{id:Me.EditorContext,group:"navigation",order:1.1},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Dt.registerCommandAlias("editor.action.goToDeclaration",Qb.id)}},Qb.id="editor.action.revealDefinition",Qb));Si((Zb=class extends uc{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Zb.id,title:{value:b("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:fe.and(F.hasDefinitionProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:[{when:F.editorTextFocus,primary:gi(2089,70),weight:100},{when:fe.and(F.editorTextFocus,Ik),primary:gi(2089,2118),weight:100}]}),Dt.registerCommandAlias("editor.action.openDeclarationToTheSide",Zb.id)}},Zb.id="editor.action.revealDefinitionAside",Zb));Si((Jb=class extends uc{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Jb.id,title:{value:b("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:fe.and(F.hasDefinitionProvider,On.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:Me.EditorContextPeek,group:"peek",order:2}}),Dt.registerCommandAlias("editor.action.previewDeclaration",Jb.id)}},Jb.id="editor.action.peekDefinition",Jb));NC=class extends gs{_getLocationModel(e,t,n,r){return ms(this,void 0,void 0,function*(){return new Ur(yield FA(e.declarationProvider,t,n,r),b("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?b("decl.noResultWord","No declaration found for '{0}'",e.word):b("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(57).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(57).multipleDeclarations}};Si((IC=class extends NC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:IC.id,title:{value:b("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:b({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:fe.and(F.hasDeclarationProvider,F.isInWalkThroughSnippet.toNegated()),menu:[{id:Me.EditorContext,group:"navigation",order:1.3},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?b("decl.noResultWord","No declaration found for '{0}'",e.word):b("decl.generic.noResults","No declaration found")}},IC.id="editor.action.revealDeclaration",IC));Si(class extends NC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:b("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:fe.and(F.hasDeclarationProvider,On.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),menu:{id:Me.EditorContextPeek,group:"peek",order:3}})}});RC=class extends gs{_getLocationModel(e,t,n,r){return ms(this,void 0,void 0,function*(){return new Ur(yield BA(e.typeDefinitionProvider,t,n,r),b("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?b("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):b("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(57).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleTypeDefinitions}};Si((LC=class extends RC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:LC.ID,title:{value:b("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:b({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:fe.and(F.hasTypeDefinitionProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:0,weight:100},menu:[{id:Me.EditorContext,group:"navigation",order:1.4},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},LC.ID="editor.action.goToTypeDefinition",LC));Si((AC=class extends RC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:AC.ID,title:{value:b("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:fe.and(F.hasTypeDefinitionProvider,On.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),menu:{id:Me.EditorContextPeek,group:"peek",order:4}})}},AC.ID="editor.action.peekTypeDefinition",AC));PC=class extends gs{_getLocationModel(e,t,n,r){return ms(this,void 0,void 0,function*(){return new Ur(yield zA(e.implementationProvider,t,n,r),b("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?b("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):b("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(57).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(57).multipleImplementations}};Si((DC=class extends PC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:DC.ID,title:{value:b("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:b({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:fe.and(F.hasImplementationProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:2118,weight:100},menu:[{id:Me.EditorContext,group:"navigation",order:1.45},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},DC.ID="editor.action.goToImplementation",DC));Si((MC=class extends PC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:MC.ID,title:{value:b("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:fe.and(F.hasImplementationProvider,On.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:3142,weight:100},menu:{id:Me.EditorContextPeek,group:"peek",order:5}})}},MC.ID="editor.action.peekImplementation",MC));OC=class extends gs{_getNoResultFoundMessage(e){return e?b("references.no","No references found for '{0}'",e.word):b("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(57).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(57).multipleReferences}};Si(class extends OC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:b("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:b({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:fe.and(F.hasReferenceProvider,On.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:1094,weight:100},menu:[{id:Me.EditorContext,group:"navigation",order:1.45},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,r){return ms(this,void 0,void 0,function*(){return new Ur(yield Yb(e.referenceProvider,t,n,!0,r),b("ref.title","References"))})}});Si(class extends OC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:b("references.action.label","Peek References"),original:"Peek References"},precondition:fe.and(F.hasReferenceProvider,On.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),menu:{id:Me.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,r){return ms(this,void 0,void 0,function*(){return new Ur(yield Yb(e.referenceProvider,t,n,!1,r),b("ref.title","References"))})}});HA=class extends gs{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:b("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:fe.and(On.notInPeekEditor,F.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,r){return ms(this,void 0,void 0,function*(){return new Ur(this._references,b("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&b("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(57).multipleReferences}_getAlternativeCommand(){return""}};Dt.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:yt},{name:"position",description:"The position at which to start",constraint:Ie.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(i,e,t,n,r,o,s)=>ms(void 0,void 0,void 0,function*(){Bt(yt.isUri(e)),Bt(Ie.isIPosition(t)),Bt(Array.isArray(n)),Bt(typeof r=="undefined"||typeof r=="string"),Bt(typeof s=="undefined"||typeof s=="boolean");let a=i.get(ai),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(bk(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{let d=new class extends HA{_getNoResultFoundMessage(u){return o||super._getNoResultFoundMessage(u)}}({muteMessage:!o,openInPeek:!!s,openToSide:!1},n,r);c.get(Ke).invokeFunction(d.run.bind(d),l)})})});Dt.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:yt},{name:"position",description:"The position at which to start",constraint:Ie.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(i,e,t,n,r)=>ms(void 0,void 0,void 0,function*(){i.get(_i).executeCommand("editor.action.goToLocations",e,t,n,r,void 0,!0)})});Dt.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{Bt(yt.isUri(e)),Bt(Ie.isIPosition(t));let n=i.get(Se),r=i.get(ai);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(o=>{if(!bk(o)||!o.hasModel())return;let s=Qa.get(o);if(!s)return;let a=Jt(c=>Yb(n.referenceProvider,o.getModel(),Ie.lift(t),!1,c).then(d=>new Ur(d,b("ref.title","References")))),l=new B(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});Dt.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")});var _G=N(()=>{});var yG=N(()=>{_G()});function UA(i,e){return!!i[e]}function wG(i){return i==="altKey"?Er?new zp(57,"metaKey",6,"altKey"):new zp(5,"ctrlKey",6,"altKey"):Er?new zp(6,"altKey",57,"metaKey"):new zp(6,"altKey",5,"ctrlKey")}var t1,FC,zp,Za,i1=N(()=>{ei();ke();Tr();t1=class{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=UA(e.event,t.triggerModifier),this.hasSideBySideModifier=UA(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}},FC=class{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=UA(e,t.triggerModifier)}},zp=class{constructor(e,t,n,r){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=r}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}};Za=class extends ce{constructor(e,t){var n;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Je),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Je),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Je),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(n=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&n!==void 0?n:r=>r.target.position?r.target.position.lineNumber:0,this._opts=wG(this._editor.getOption(76)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(r=>{if(r.hasChanged(76)){let o=wG(this._editor.getOption(76));if(this._opts.equals(o))return;this._opts=o,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(r=>this._onEditorMouseMove(new t1(r,this._opts)))),this._register(this._editor.onMouseDown(r=>this._onEditorMouseDown(new t1(r,this._opts)))),this._register(this._editor.onMouseUp(r=>this._onEditorMouseUp(new t1(r,this._opts)))),this._register(this._editor.onKeyDown(r=>this._onEditorKeyDown(new FC(r,this._opts)))),this._register(this._editor.onKeyUp(r=>this._onEditorKeyUp(new FC(r,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(r=>this._onDidChangeCursorSelection(r))),this._register(this._editor.onDidChangeModel(r=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(r=>{(r.scrollTopChanged||r.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){let t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}});var mbe,jA,xG,n1,Ud,zC=N(()=>{jt();qt();Ts();ke();yG();yu();lt();et();ts();ra();i1();hh();He();wt();e1();TC();Pt();jn();mbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},jA=function(i,e){return function(t,n){e(t,n,i)}},xG=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ud=n1=class{constructor(e,t,n,r){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=r,this.toUnhook=new le,this.toUnhookForKeyboard=new le,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let o=new Za(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,a!=null?a:void 0)})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{ft(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(n1.ID)}startFindDefinitionFromCursor(e){return xG(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}let n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return xG(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();let n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;let r=new T_(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Jt(a=>this.findDefinition(e,a));let o;try{o=yield this.previousPromise}catch(a){ft(a);return}if(!o||!o.length||!r.validate(this.editor)){this.removeLinkDecorations();return}let s=o[0].originSelectionRange?B.lift(o[0].originSelectionRange):new B(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(o.length>1){let a=s;for(let{originSelectionRange:l}of o)l&&(a=B.plusRange(a,l));this.addDecoration(a,new $i().appendText(b("multipleResults","Click to show {0} definitions.",o.length)))}else{let a=o[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}let{object:{textEditorModel:c}}=l,{startLineNumber:d}=a.range;if(d<1||d>c.getLineCount()){l.dispose();return}let u=this.getPreviewValue(c,d,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(c.uri);this.addDecoration(s,u?new $i().appendCodeblock(h||"",u):void 0),l.dispose()})}})}getPreviewValue(e,t,n){let r=n.range;return r.endLineNumber-r.startLineNumber>=n1.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,r)}stripIndentationFromPreviewRange(e,t,n){let o=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<n.endLineNumber;a++){let l=e.getLineFirstNonWhitespaceColumn(a);o=Math.min(o,l)}return e.getValueInRange(n).replace(new RegExp(`^\\s{${o-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){let n=e.getLineFirstNonWhitespaceColumn(t),r=Math.min(e.getLineCount(),t+n1.MAX_SOURCE_PREVIEW_LINES),o=t+1;for(;o<r;o++){let s=e.getLineFirstNonWhitespaceColumn(o);if(n===s)break}return new B(t,1,o+1,1)}addDecoration(e,t){let n={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations.set([n])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){var n;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&e.target.type===6&&!(((n=e.target.detail.injectedText)===null||n===void 0?void 0:n.options)instanceof yf)&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){let n=this.editor.getModel();return n?mh(this.languageFeaturesService.definitionProvider,n,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(n=>{let r=!t&&this.editor.getOption(86)&&!this.isInPeekEditor(n);return new uc({openToSide:t,openInPeek:r,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){let t=e.get(it);return On.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};Ud.ID="editor.contrib.gotodefinitionatposition";Ud.MAX_SOURCE_PREVIEW_LINES=8;Ud=n1=mbe([jA(1,Sn),jA(2,en),jA(3,Se)],Ud);Ue(Ud.ID,Ud,2)});var CG,BC,HC,WA,qA,VA,SG=N(()=>{mi();ei();ke();j9();Ni();Ln();et();fl();Ut();F_();kn();CG=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},BC=function(i,e){return function(t,n){e(t,n,i)}},HC=class{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}},WA=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._dispoables=new le,this._markers=[],this._nextIdx=-1,yt.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);let r=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let c=F3(a.resource.toString(),l.resource.toString());return c===0&&(r==="position"?c=B.compareRangesUsingStarts(a,l)||Dn.compare(a.severity,l.severity):c=Dn.compare(a.severity,l.severity)||B.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:yt.isUri(e)?e:void 0,severities:Dn.Error|Dn.Warning|Dn.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(o)};s(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){let e=this._markers[this._nextIdx];return e&&new HC(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let r=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=pu(this._markers,{resource:e.uri},(s,a)=>F3(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;s<this._markers.length;s++){let a=B.lift(this._markers[s]);if(a.isEmpty()){let l=e.getWordAtPosition(a.getStartPosition());l&&(a=new B(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=s,r=!0;break}if(this._markers[s].resource.toString()!==e.uri.toString())break}r||(this._nextIdx=n?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,n){if(this._markers.length===0)return!1;let r=this._nextIdx;return this._nextIdx===-1?this._initIdx(t,n,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),r!==this._nextIdx}find(e,t){let n=this._markers.findIndex(r=>r.resource.toString()===e.toString());if(!(n<0)){for(;n<this._markers.length;n++)if(B.containsPosition(this._markers[n],t))return new HC(this._markers[n],n+1,this._markers.length)}}};WA=CG([BC(1,og),BC(2,Mt)],WA);qA=Zn("IMarkerNavigationService"),VA=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new zv}getMarkerList(e){for(let t of this._provider){let n=t.getMarkerList(e);if(n)return n}return new WA(e,this._markerService,this._configService)}};VA=CG([BC(0,og),BC(1,Mt)],VA);tr(qA,VA,1)});var kG=N(()=>{});var EG=N(()=>{kG()});var TG=N(()=>{});var IG=N(()=>{TG()});var UC,LG=N(()=>{IG();Jn();Lr();Ane();(function(i){function e(t){switch(t){case ig.Ignore:return"severity-ignore "+_t.asClassName(pt.info);case ig.Info:return _t.asClassName(pt.info);case ig.Warning:return _t.asClassName(pt.warning);case ig.Error:return _t.asClassName(pt.error);default:return""}}i.className=e})(UC||(UC={}))});var gbe,Bp,KA,$A,bh,AG,DG,MG,GA,bbe,jC,vbe,YA,_be,ybe,NG=N(()=>{Ht();N_();mi();da();ei();ke();Do();Ni();EG();et();hh();He();J_();Ji();wt();Ut();ey();F_();ns();LG();ir();nr();gbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Bp=function(i,e){return function(t,n){e(t,n,i)}},$A=class{constructor(e,t,n,r,o){this._openerService=r,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new le,this._editor=t;let s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(Io(this._relatedBlock,"click",a=>{a.preventDefault();let l=this._relatedDiagnostics.get(a.target);l&&n(l)})),this._scrollable=new pF(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){ji(this._disposables)}update(e){let{source:t,message:n,relatedInformation:r,code:o}=e,s=((t==null?void 0:t.length)||0)+2;o&&(typeof o=="string"?s+=o.length:s+=o.value.length);let a=hu(n);this._lines=a.length,this._longestLineLength=0;for(let h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);Kr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(let h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||o){let h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){let f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(o)if(typeof o=="string"){let f=document.createElement("span");f.innerText=`(${o})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=Le("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(o.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};let f=Te(this._codeLink,Le("span"));f.innerText=o.value,h.appendChild(this._codeLink)}}if(Kr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Ki(r)){let h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(65)*.66)}px`,this._lines+=1;for(let f of r){let m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,g.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(g,f);let w=document.createElement("span");w.innerText=f.message,m.appendChild(g),m.appendChild(w),this._lines+=1,h.appendChild(m)}}let c=this._editor.getOption(49),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Dn.Error:t=b("Error","Error");break;case Dn.Warning:t=b("Warning","Warning");break;case Dn.Info:t=b("Info","Info");break;case Dn.Hint:t=b("Hint","Hint");break}let n=b("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),r=this._editor.getModel();return r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1&&(n=`${r.getLineContent(e.startLineNumber)}, ${n}`),n}},bh=KA=class extends Np{constructor(e,t,n,r,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=n,this._menuService=r,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new le,this._onDidSelectRelatedInformation=new Je,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Dn.Warning,this._backgroundColor=vt.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(ybe);let t=GA,n=bbe;this._severity===Dn.Warning?(t=jC,n=vbe):this._severity===Dn.Info&&(t=YA,n=_be);let r=e.getColor(t),o=e.getColor(n);this.style({arrowColor:r,frameColor:r,headerBackgroundColor:o,primaryHeadingColor:e.getColor(pC),secondaryHeadingColor:e.getColor(mC)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(r=>this.editor.focus()));let t=[],n=this._menuService.createMenu(KA.TitleMenu,this._contextKeyService);Q_(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=Te(e,Le(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new $A(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let r=B.lift(e),o=this.editor.getPosition(),s=o&&r.containsPosition(o)?o:r.getStartPosition();super.show(s,this.computeRequiredHeight());let a=this.editor.getModel();if(a){let l=n>1?b("problems","{0} of {1} problems",t,n):b("change","{0} of {1} problem",t,n);this.setTitle(Dr(a.uri),l)}this._icon.className=`codicon ${UC.className(Dn.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};bh.TitleMenu=new Me("gotoErrorTitleMenu");bh=KA=gbe([Bp(1,vn),Bp(2,tn),Bp(3,ks),Bp(4,Ke),Bp(5,it),Bp(6,Il)],bh);AG=__(mO,gO),DG=__(bO,vO),MG=__(jm,_O),GA=je("editorMarkerNavigationError.background",{dark:AG,light:AG,hcDark:is,hcLight:is},b("editorMarkerNavigationError","Editor marker navigation widget error color.")),bbe=je("editorMarkerNavigationError.headerBackground",{dark:Nr(GA,.1),light:Nr(GA,.1),hcDark:null,hcLight:null},b("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),jC=je("editorMarkerNavigationWarning.background",{dark:DG,light:DG,hcDark:is,hcLight:is},b("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),vbe=je("editorMarkerNavigationWarning.headerBackground",{dark:Nr(jC,.1),light:Nr(jC,.1),hcDark:"#0C141F",hcLight:Nr(jC,.2)},b("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),YA=je("editorMarkerNavigationInfo.background",{dark:MG,light:MG,hcDark:is,hcLight:is},b("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),_be=je("editorMarkerNavigationInfo.headerBackground",{dark:Nr(YA,.1),light:Nr(YA,.1),hcDark:null,hcLight:null},b("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),ybe=je("editorMarkerNavigation.background",{dark:Wm,light:Wm,hcDark:Wm,hcLight:Wm},b("editorMarkerNavigationBackground","Editor marker navigation widget background."))});var wbe,WC,RG,r1,hc,Hp,vh,o1,XA,QA,PG,xbe,VC=N(()=>{Jn();ke();lt();Ir();di();et();ti();SG();He();Ji();wt();Ut();kl();NG();wbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},WC=function(i,e){return function(t,n){e(t,n,i)}},RG=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},hc=r1=class{static get(e){return e.getContribution(r1.ID)}constructor(e,t,n,r,o){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=r,this._instantiationService=o,this._sessionDispoables=new le,this._editor=e,this._widgetVisible=PG.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(bh,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var r,o,s;(!(!((r=this._model)===null||r===void 0)&&r.selected)||!B.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,n.position))&&((s=this._model)===null||s===void 0||s.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;let n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:B.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){let t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new Ie(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,r;return RG(this,void 0,void 0,function*(){if(this._editor.hasModel()){let o=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();let s=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&((n=r1.get(s))===null||n===void 0||n.close(),(r=r1.get(s))===null||r===void 0||r.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};hc.ID="editor.contrib.markerController";hc=r1=wbe([WC(1,qA),WC(2,it),WC(3,ai),WC(4,Ke)],hc);Hp=class extends de{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return RG(this,void 0,void 0,function*(){t.hasModel()&&((n=hc.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}},vh=class i extends Hp{constructor(){super(!0,!1,{id:i.ID,label:i.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:578,weight:100},menuOpts:{menuId:bh.TitleMenu,title:i.LABEL,icon:Pi("marker-navigation-next",pt.arrowDown,b("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}};vh.ID="editor.action.marker.next";vh.LABEL=b("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");o1=class i extends Hp{constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:1602,weight:100},menuOpts:{menuId:bh.TitleMenu,title:i.LABEL,icon:Pi("marker-navigation-previous",pt.arrowUp,b("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}};o1.ID="editor.action.marker.prev";o1.LABEL=b("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");XA=class extends Hp{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:b("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:66,weight:100},menuOpts:{menuId:Me.MenubarGoMenu,title:b({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}},QA=class extends Hp{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:b("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:1090,weight:100},menuOpts:{menuId:Me.MenubarGoMenu,title:b({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}};Ue(hc.ID,hc,4);ee(vh);ee(o1);ee(XA);ee(QA);PG=new ht("markersNavigationVisible",!1),xbe=Fi.bindToContribution(hc.get);We(new xbe({id:"closeMarkersNavigation",precondition:PG,handler:i=>i.close(),kbOpts:{weight:100+50,kbExpr:F.focus,primary:9,secondary:[1033]}}))});var OG=N(()=>{});var FG=N(()=>{OG()});function zG(i,e){return i&&e?b("acessibleViewHint","Inspect this in the accessible view with {0}.",e):i?b("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var qC,Up,KC,ZA=N(()=>{Ht();Z9();N_();ke();FG();He();qC=Le,Up=class extends ce{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new Cf(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},KC=class i extends ce{static render(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.actionContainer=Te(e,qC("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Te(this.actionContainer,qC("a.action")),this.action.setAttribute("role","button"),t.iconClass&&Te(this.action,qC(`span.icon.${t.iconClass}`));let r=Te(this.action,qC("span"));r.textContent=n?`${t.label} (${n})`:t.label,this._register(At(this.actionContainer,bi.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(At(this.actionContainer,bi.KEY_DOWN,o=>{let s=new Wv(o);(s.equals(3)||s.equals(10))&&(o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}});var Cbe,Sbe,JA,jp,e8=N(()=>{jt();qt();ei();ke();Cbe=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Sbe=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},JA=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}},jp=class extends ce{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Je),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new ui(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new ui(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new ui(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(59).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=iO(e=>this._computer.computeAsync(e)),Cbe(this,void 0,void 0,function*(){var e,t,n,r;try{try{for(var o=!0,s=Sbe(this._asyncIterable),a;a=yield s.next(),e=a.done,!e;o=!0){r=a.value,o=!1;let l=r;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!o&&!e&&(n=s.return)&&(yield n.call(s))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){ft(l)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;let e=this._state===0,t=this._state===4;this._onResult.fire(new JA(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}});var kbe,Ebe,$C,BG=N(()=>{Q2();ke();di();Ht();kbe=30,Ebe=24,$C=class extends ce{constructor(e,t=new Qt(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new Od),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Qt.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new Qt(n.dimension.width,n.dimension.height)),n.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?Ie.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){let t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:Zi(t).top+n.top-kbe}_availableVerticalSpaceBelow(e){let t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;let r=Zi(t),o=Oc(document.body),s=r.top+n.top+n.height;return o.height-s-Ebe}_findPositionPreference(e,t){var n,r;let o=Math.min((n=this._availableVerticalSpaceBelow(t))!==null&&n!==void 0?n:1/0,e),s=Math.min((r=this._availableVerticalSpaceAbove(t))!==null&&r!==void 0?r:1/0,e),a=Math.min(Math.max(s,o),e),l=Math.min(e,a),c;return this._editor.getOption(59).above?c=l<=s?1:2:c=l<=o?2:1,c===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),c}_resize(e){this._resizableNode.layout(e.height,e.width)}}});function jG(i,e,t,n,r,o){let s=t+r/2,a=n+o/2,l=Math.max(Math.abs(i-s)-r/2,0),c=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+c*c)}var o8,_h,GC,Ja,HG,s1,YC,i8,n8,UG,t8,Tbe,fc,a1,r8,s8=N(()=>{Ht();ZA();mi();ke();di();et();jn();fr();e8();nc();Ut();Wn();jt();ti();wt();BG();kn();X_();o8=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_h=function(i,e){return function(t,n){e(t,n,i)}},HG=Le,s1=GC=class extends ce{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(fc,this._editor)),this._participants=[];for(let r of jo.getAll())this._participants.push(this._instantiationService.createInstance(r,this._editor));this._participants.sort((r,o)=>r.hoverOrdinal-o.hoverOrdinal),this._computer=new r8(this._editor,this._participants),this._hoverOperation=this._register(new jp(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{if(!this._computer.anchor)return;let o=r.hasLoadingMessage?this._addLoadingMessage(r.value):r.value;this._withResult(new YC(this._computer.anchor,o,r.isComplete))})),this._register(Io(this._widget.getDomNode(),"keydown",r=>{r.equals(9)&&this.hide()})),this._register(_f.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;let t=[];for(let r of this._participants)if(r.suggestHoverAnchor){let o=r.suggestHoverAnchor(e);o&&t.push(o)}let n=e.target;if(n.type===6&&t.push(new bp(0,n.range,e.event.posx,e.event.posy)),n.type===7){let r=this._editor.getOption(49).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToText<r&&t.push(new bp(0,n.range,e.event.posx,e.event.posy))}return t.length===0?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort((r,o)=>o.priority-r.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,r){this._startShowingOrUpdateHover(new bp(0,e,void 0,void 0),t,n,r,null)}_startShowingOrUpdateHover(e,t,n,r,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):!1:this._editor.getOption(59).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,r,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,r,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=r,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(let t of this._participants)if(t.createLoadingMessage){let n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){let{showAtPosition:n,showAtSecondaryPosition:r,highlightRange:o}=GC.computeHoverRanges(this._editor,e.range,t),s=new le,a=s.add(new a1(this._keybindingService)),l=document.createDocumentFragment(),c=null,d={fragment:l,statusBar:a,setColorPicker:h=>c=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(let h of this._participants){let f=t.filter(m=>m.owner===h);f.length>0&&s.add(h.renderHoverParts(d,f))}let u=t.some(h=>h.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){let h=this._editor.createDecorationsCollection();h.set([{range:o,options:GC._DECORATION_OPTIONS}]),s.add(ni(()=>{h.clear()}))}this._widget.showAt(l,new n8(c,n,r,this._editor.getOption(59).above,this._computer.shouldFocus,this._computer.source,u,e.initialMousePosX,e.initialMousePosY,s))}else s.dispose()}static computeHoverRanges(e,t,n){let r=1;if(e.hasModel()){let c=e._getViewModel(),d=c.coordinatesConverter,u=d.convertModelRangeToViewRange(t),h=new Ie(u.startLineNumber,c.getLineMinColumn(u.startLineNumber));r=d.convertViewPositionToModelPosition(h).column}let o=t.startLineNumber,s=t.startColumn,a=n[0].range,l=null;for(let c of n)a=B.plusRange(a,c.range),c.range.startLineNumber===o&&c.range.endLineNumber===o&&(s=Math.max(Math.min(s,c.range.startColumn),r)),c.forceShowAtRange&&(l=c.range);return{showAtPosition:l?l.getStartPosition():new Ie(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new Ie(o,s),highlightRange:a}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};s1._DECORATION_OPTIONS=mt.register({description:"content-hover-highlight",className:"hoverHighlight"});s1=GC=o8([_h(1,Ke),_h(2,Kt)],s1);YC=class{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){let t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new i8(this,this.anchor,t,this.isComplete)}},i8=class extends YC{constructor(e,t,n,r){super(t,n,r),this.original=e}filter(e){return this.original.filter(e)}},n8=class{constructor(e,t,n,r,o,s,a,l,c,d){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=r,this.stoleFocus=o,this.source=s,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=c,this.disposables=d,this.closestMouseDistance=void 0}},UG=30,t8=10,Tbe=6,fc=Ja=class extends $C{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,n,r,o){let s=e.getOption(65)+8,a=150,l=new Qt(a,s);super(e,l),this._configurationService=n,this._accessibilityService=r,this._keybindingService=o,this._hover=this._register(new Up),this._minimumSize=l,this._hoverVisibleKey=F.hoverVisible.bindTo(t),this._hoverFocusedKey=F.hoverFocused.bindTo(t),Te(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(49)&&this._updateFont()}));let c=this._register(Cs(this._resizableNode.domNode));this._register(c.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(c.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Ja.ID}static _applyDimensions(e,t,n){let r=typeof t=="number"?`${t}px`:t,o=typeof n=="number"?`${n}px`:n;e.style.width=r,e.style.height=o}_setContentsDomNodeDimensions(e,t){let n=this._hover.contentsDomNode;return Ja._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){let n=this._hover.containerDomNode;return Ja._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){let r=typeof t=="number"?`${t}px`:t,o=typeof n=="number"?`${n}px`:n;e.style.maxWidth=r,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){Ja._applyMaxDimensions(this._hover.contentsDomNode,e,t),Ja._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){let e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){let e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");let t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,n-t8))}_updateResizableNodeMaxDimensions(){var e,t;let n=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,r=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new Qt(n,r),this._setHoverWidgetMaxDimensions(n,r)}_resize(e){var t,n;Ja._lastDimensions=new Qt(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(n=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||n===void 0||n.layout()}_findAvailableSpaceVertically(){var e;let t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){let e=this._findAvailableSpaceVertically();if(!e)return;let t=Tbe;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),this._hasHorizontalScrollbar()&&(t+=t8),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");let e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;let e=this._isHoverTextOverflowing(),t=typeof this._contentWidth=="undefined"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth<t?Oc(document.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX=="undefined"||typeof this._visibleData.initialMousePosY=="undefined")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;let n=Zi(this.getDomNode());typeof this._visibleData.closestMouseDistance=="undefined"&&(this._visibleData.closestMouseDistance=jG(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));let r=jG(e,t,n.left,n.top,n.width,n.height);return r>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,r),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){let{fontSize:e,lineHeight:t}=this._editor.getOption(49),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContent(e){let t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){let e=Math.max(this._editor.getLayoutInfo().height/4,250,Ja._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Ja._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var n,r,o,s;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);let a=Mm(this._hover.containerDomNode),l=t.showAtPosition;this._positionPreference=(n=this._findPositionPreference(a,l))!==null&&n!==void 0?n:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(r=t.colorPicker)===null||r===void 0||r.layout();let c=zG(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(s=(o=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||o===void 0?void 0:o.getAriaLabel())!==null&&s!==void 0?s:"");c&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+c)}hide(){if(!this._visibleData)return;let e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Qt(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){let e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;let n=this._hover.containerDomNode,r=this._hover.contentsDomNode,o=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions($r(n),Math.min(o,e)),this._setContentsDomNodeDimensions($r(r),Math.min(o,e-t8))}setMinimumDimensions(e){this._minimumSize=new Qt(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){let e=typeof this._contentWidth=="undefined"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Qt(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();let t=this._hover.containerDomNode,n=Mm(t),r=$r(t);if(this._resizableNode.layout(n,r),this._setHoverWidgetDimensions(r,n),n=Mm(t),r=$r(t),this._contentWidth=r,this._updateMinimumWidth(),this._resizableNode.layout(n,r),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(n)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){let o=Mm(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(o,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-UG})}scrollRight(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+UG})}pageUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};fc.ID="editor.contrib.resizableContentHoverWidget";fc._lastDimensions=new Qt(0,0);fc=Ja=o8([_h(1,it),_h(2,Mt),_h(3,kf),_h(4,Kt)],fc);a1=class extends ce{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=HG("div.hover-row.status-bar"),this.actionsElement=Te(this.hoverElement,HG("div.actions"))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(KC.render(this.actionsElement,e,n))}append(e){let t=Te(this.actionsElement,e);return this._hasContent=!0,t}};a1=o8([_h(0,Kt)],a1);r8=class i{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];let n=e.getModel(),r=t.range.startLineNumber;if(r>n.getLineCount())return[];let o=n.getLineMaxColumn(r);return e.getLineDecorations(r).filter(s=>{if(s.options.isWholeLine)return!0;let a=s.range.startLineNumber===r?s.range.startColumn:1,l=s.range.endLineNumber===r?s.range.endColumn:o;if(s.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){let t=this._anchor;if(!this._editor.hasModel()||!t)return Mr.EMPTY;let n=i._getLineDecorations(this._editor,t);return Mr.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(t,n,e):Mr.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];let e=i._getLineDecorations(this._editor,this._anchor),t=[];for(let n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return hr(t)}}});var WG,yh,a8,VG=N(()=>{Ht();mi();Ts();ke();kd();e8();ZA();WG=Le,yh=class i extends ce{constructor(e,t,n){super(),this._renderDisposeables=this._register(new le),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new Up),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new io({editor:this._editor},t,n)),this._computer=new a8(this._editor),this._hoverOperation=this._register(new jp(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{this._withResult(r.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(49)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();let n=document.createDocumentFragment();for(let r of t){let o=WG("div.hover-row.markdown-hover"),s=Te(o,WG("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(r.value));s.appendChild(a.element),n.appendChild(o)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));let t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),r=this._editor.getScrollTop(),o=this._editor.getOption(65),s=this._hover.containerDomNode.clientHeight,a=n-r-(s-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}};yh.ID="editor.contrib.modesGlyphHoverWidget";a8=class{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){let e=r=>({value:r}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(let r of t){if(!r.options.glyphMarginClassName)continue;let o=r.options.glyphMarginHoverMessage;!o||Wc(o)||n.push(...t_(o).map(e))}return n}}});function Lbe(i,e,t,n,r){return Ibe(this,void 0,void 0,function*(){try{let o=yield Promise.resolve(i.provideHover(t,n,r));if(o&&Dbe(o))return new l8(i,o,e)}catch(o){Xt(o)}})}function l1(i,e,t,n){let o=i.ordered(e).map((s,a)=>Lbe(s,a,e,t,n));return Mr.fromPromises(o).coalesce()}function Abe(i,e,t,n){return l1(i,e,t,n).map(r=>r.hover).toPromise()}function Dbe(i){let e=typeof i.range!="undefined",t=typeof i.contents!="undefined"&&i.contents&&i.contents.length>0;return e&&t}var Ibe,l8,c8=N(()=>{jt();ki();qt();lt();Pt();Ibe=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},l8=class{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}};Gr("_executeHoverProvider",(i,e,t)=>{let n=i.get(Se);return Abe(n.hoverProvider,e,t,st.None)})});function d8(i,e,t,n,r){e.sort((s,a)=>s.ordinal-a.ordinal);let o=new le;for(let s of e)for(let a of s.contents){if(Wc(a))continue;let l=qG("div.hover-row.markdown-hover"),c=Te(l,qG("div.hover-contents")),d=o.add(new io({editor:t},n,r));o.add(d.onDidRenderAsync(()=>{c.className="hover-contents code-hover-contents",i.onContentsChanged()}));let u=o.add(d.render(a));c.appendChild(u.element),i.fragment.appendChild(l)}return o}var Mbe,XC,qG,ro,Wp,QC=N(()=>{Ht();mi();jt();Ts();ke();kd();di();et();ts();c8();He();kn();ns();Pt();Mbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},XC=function(i,e){return function(t,n){e(t,n,i)}},qG=Le,ro=class{constructor(e,t,n,r,o){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=r,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Wp=class{constructor(e,t,n,r,o){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=r,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new ro(this,e.range,[new $i().appendText(b("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[],a=1e3,l=n.getLineLength(r),c=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._editor.getOption(115),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c}),h=!1;d>=0&&l>d&&e.range.startColumn>=d&&(h=!0,s.push(new ro(this,e.range,[{value:b("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof u=="number"&&l>=u&&s.push(new ro(this,e.range,[{value:b("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(let m of t){let g=m.range.startLineNumber===r?m.range.startColumn:1,w=m.range.endLineNumber===r?m.range.endColumn:o,_=m.options.hoverMessage;if(!_||Wc(_))continue;m.options.beforeContentClassName&&(f=!0);let E=new B(e.range.startLineNumber,g,e.range.startLineNumber,w);s.push(new ro(this,E,t_(_),f,a++))}return s}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return Mr.EMPTY;let r=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(r))return Mr.EMPTY;let o=new Ie(e.range.startLineNumber,e.range.startColumn);return l1(this._languageFeaturesService.hoverProvider,r,o,n).filter(s=>!Wc(s.hover.contents)).map(s=>{let a=s.hover.range?B.lift(s.hover.range):e.range;return new ro(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return d8(e,t,this._editor,this._languageService,this._openerService)}};Wp=Mbe([XC(1,en),XC(2,tn),XC(3,Mt),XC(4,Se)],Wp)});var Nbe,u8,bs,h8,KG,ZC,$G=N(()=>{Ht();mi();jt();qt();ke();Do();et();Pt();Yne();Ku();Ox();Sd();VC();He();F_();ns();$c();Nbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},u8=function(i,e){return function(t,n){e(t,n,i)}},bs=Le,h8=class{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},KG={type:1,filter:{include:rt.QuickFix},triggerAction:qn.QuickFixHover},ZC=class{constructor(e,t,n,r){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[];for(let a of t){let l=a.range.startLineNumber===r?a.range.startColumn:1,c=a.range.endLineNumber===r?a.range.endColumn:o,d=this._markerDecorationsService.getMarker(n.uri,a);if(!d)continue;let u=new B(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new h8(this,u,d))}return s}renderHoverParts(e,t){if(!t.length)return ce.None;let n=new le;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,n)));let r=t.length===1?t[0]:t.sort((o,s)=>Dn.compare(o.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,r,n),n}renderMarkerHover(e,t){let n=bs("div.hover-row"),r=Te(n,bs("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(r);let c=Te(r,bs("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,o||a)if(a&&typeof a!="string"){let d=bs("span");if(o){let m=Te(d,bs("span"));m.innerText=o}let u=Te(d,bs("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(At(u,"click",m=>{this._openerService.open(a.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));let h=Te(u,bs("span"));h.innerText=a.value;let f=Te(r,d);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{let d=Te(r,bs("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(Ki(l))for(let{message:d,resource:u,startLineNumber:h,startColumn:f}of l){let m=Te(r,bs("div"));m.style.marginTop="8px";let g=Te(m,bs("a"));g.innerText=`${Dr(u)}(${h}, ${f}): `,g.style.cursor="pointer",t.add(At(g,"click",_=>{_.stopPropagation(),_.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:f}}}).catch(ft)}));let w=Te(m,bs("span"));w.innerText=d,this._editor.applyFontInfo(w)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Dn.Error||t.marker.severity===Dn.Warning||t.marker.severity===Dn.Info)&&e.statusBar.addAction({label:b("view problem","View Problem"),commandId:vh.ID,run:()=>{var r;e.hide(),(r=hc.get(this._editor))===null||r===void 0||r.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(89)){let r=e.statusBar.append(bs("div"));this.recentMarkerCodeActionsInfo&&(hk.makeKey(this.recentMarkerCodeActionsInfo.marker)===hk.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(r.textContent=b("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ce.None:n.add(gl(()=>r.textContent=b("checkingForQuickFixes","Checking for quick fixes..."),200));r.textContent||(r.textContent=String.fromCharCode(160));let s=this.getCodeActions(t.marker);n.add(ni(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),r.textContent=b("noQuickFixes","No quick fixes available");return}r.style.display="none";let l=!1;n.add(ni(()=>{l||a.dispose()})),e.statusBar.addAction({label:b("quick fixes","Quick Fix..."),commandId:tp,run:c=>{l=!0;let d=Ua.get(this._editor),u=Zi(c);e.hide(),d==null||d.showCodeActions(KG,a,{x:u.left,y:u.top,width:u.width,height:u.height})}})},ft)}}getCodeActions(e){return Jt(t=>L0(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new B(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),KG,va.None,t))}};ZC=Nbe([u8(1,ZF),u8(2,tn),u8(3,Se)],ZC)});var GG=N(()=>{});var YG=N(()=>{GG()});var Rbe,JC,f8,eS,yr,p8,m8,g8,b8,v8,_8,y8,w8,x8,C8,tS=N(()=>{cl();ke();lt();et();ti();ts();zC();s8();VG();Ut();ns();ir();nr();nc();QC();$G();z2();Wn();He();YG();Rbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},JC=function(i,e){return function(t,n){e(t,n,i)}},eS=!1,yr=f8=class{static get(e){return e.getContribution(f8.ID)}constructor(e,t,n,r,o){this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=r,this._keybindingService=o,this._toUnhook=new le,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(s=>{s.hasChanged(59)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){let e=()=>this._hideWidgets(),t=this._editor.getOption(59);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;let n=e.target;if(n.type===9&&n.detail===fc.ID){this._hoverClicked=!0;return}n.type===12&&n.detail===yh.ID||(n.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,n;let r=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((n=this._contentWidget)===null||n===void 0)&&n.containsNode(r)||eS||this._hideWidgets()}_onEditorMouseMove(e){var t,n,r,o,s,a,l,c,d,u,h;let f=e.target;if(!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((n=this._contentWidget)===null||n===void 0)&&n.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&f.type===9&&f.detail===fc.ID||this._isHoverSticky&&(!((r=this._contentWidget)===null||r===void 0)&&r.containsNode((o=e.event.browserEvent.view)===null||o===void 0?void 0:o.document.activeElement))&&!(!((a=(s=e.event.browserEvent.view)===null||s===void 0?void 0:s.getSelection())===null||a===void 0)&&a.isCollapsed)||!this._isHoverSticky&&f.type===9&&f.detail===fc.ID&&(!((l=this._contentWidget)===null||l===void 0)&&l.isColorPickerVisible)||this._isHoverSticky&&f.type===12&&f.detail===yh.ID||this._isHoverSticky&&(!((c=this._contentWidget)===null||c===void 0)&&c.isVisibleFromKeyboard))return;let m=(d=f.element)===null||d===void 0?void 0:d.classList.contains("colorpicker-color-decoration"),g=this._editor.getOption(145);if(m&&(g==="click"&&!this._hoverActivatedByColorDecoratorClick||g==="hover"&&!this._isHoverEnabled&&!eS||g==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!m&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(u=this._glyphWidget)===null||u===void 0||u.hide();return}if(f.type===2&&f.position){(h=this._contentWidget)===null||h===void 0||h.hide(),this._glyphWidget||(this._glyphWidget=new yh(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(f.position.lineNumber);return}eS||this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;let n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),r=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!r&&this._hideWidgets()}_hideWidgets(){var e,t,n;eS||this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Ks.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(s1,this._editor)),this._contentWidget}showContentHover(e,t,n,r,o=!1){this._hoverActivatedByColorDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,r)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};yr.ID="editor.contrib.hover";yr=f8=Rbe([JC(1,Ke),JC(2,tn),JC(3,en),JC(4,Kt)],yr);p8=class extends de{constructor(){super({id:"editor.action.showHover",label:b({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;let r=yr.get(t);if(!r)return;let o=t.getPosition(),s=new B(o.lineNumber,o.column,o.lineNumber,o.column),a=t.getOption(2)===2||!!(n!=null&&n.focus);r.isHoverVisible?r.focus():r.showContentHover(s,1,1,a)}},m8=class extends de{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:b({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let n=yr.get(t);if(!n)return;let r=t.getPosition();if(!r)return;let o=new B(r.lineNumber,r.column,r.lineNumber,r.column),s=Ud.get(t);if(!s)return;s.startFindDefinitionFromCursor(r).then(()=>{n.showContentHover(o,1,1,!0)})}},g8=class extends de{constructor(){super({id:"editor.action.scrollUpHover",label:b({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:16,weight:100}})}run(e,t){let n=yr.get(t);n&&n.scrollUp()}},b8=class extends de{constructor(){super({id:"editor.action.scrollDownHover",label:b({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:18,weight:100}})}run(e,t){let n=yr.get(t);n&&n.scrollDown()}},v8=class extends de{constructor(){super({id:"editor.action.scrollLeftHover",label:b({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:15,weight:100}})}run(e,t){let n=yr.get(t);n&&n.scrollLeft()}},_8=class extends de{constructor(){super({id:"editor.action.scrollRightHover",label:b({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:17,weight:100}})}run(e,t){let n=yr.get(t);n&&n.scrollRight()}},y8=class extends de{constructor(){super({id:"editor.action.pageUpHover",label:b({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){let n=yr.get(t);n&&n.pageUp()}},w8=class extends de{constructor(){super({id:"editor.action.pageDownHover",label:b({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){let n=yr.get(t);n&&n.pageDown()}},x8=class extends de{constructor(){super({id:"editor.action.goToTopHover",label:b({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){let n=yr.get(t);n&&n.goToTop()}},C8=class extends de{constructor(){super({id:"editor.action.goToBottomHover",label:b({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){let n=yr.get(t);n&&n.goToBottom()}};Ue(yr.ID,yr,2);ee(p8);ee(m8);ee(g8);ee(b8);ee(v8);ee(_8);ee(y8);ee(w8);ee(x8);ee(C8);jo.register(Wp);jo.register(ZC);bf((i,e)=>{let t=i.getColor(LO);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))})});function wr(i,e){let t=0;for(let n=0;n<i.length;n++)i.charAt(n)===" "?t+=e:t++;return t}function wh(i,e,t){i=i<0?0:i;let n="";if(!t){let r=Math.floor(i/e);i=i%e;for(let o=0;o<r;o++)n+=" "}for(let r=0;r<i;r++)n+=" ";return n}var S8=N(()=>{});function QG(i,e,t,n,r){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return[];let o=e.getLanguageConfiguration(i.getLanguageId()).indentationRules;if(!o)return[];for(n=Math.min(n,i.getLineCount());t<=n&&o.unIndentedLinePattern;){let w=i.getLineContent(t);if(!o.unIndentedLinePattern.test(w))break;t++}if(t>n-1)return[];let{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=(w,_)=>(_=_||1,jc.shiftIndent(w,w.length+_,s,a,l)),d=(w,_)=>(_=_||1,jc.unshiftIndent(w,w.length+_,s,a,l)),u=[],h,f=i.getLineContent(t),m=f;if(r!=null){h=r;let w=qi(f);m=h+f.substring(w.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(m)&&(h=d(h),m=h+f.substring(w.length)),f!==m&&u.push(ii.replaceMove(new Qe(t,1,t,w.length+1),V3(h,a,l)))}else h=qi(f);let g=h;o.increaseIndentPattern&&o.increaseIndentPattern.test(m)?(g=c(g),h=c(h)):o.indentNextLinePattern&&o.indentNextLinePattern.test(m)&&(g=c(g)),t++;for(let w=t;w<=n;w++){let _=i.getLineContent(w),E=qi(_),A=g+_.substring(E.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(A)&&(g=d(g),h=d(h)),E!==g&&u.push(ii.replaceMove(new Qe(w,1,w,E.length+1),V3(g,a,l))),!(o.unIndentedLinePattern&&o.unIndentedLinePattern.test(_))&&(o.increaseIndentPattern&&o.increaseIndentPattern.test(A)?(h=c(h),g=h):o.indentNextLinePattern&&o.indentNextLinePattern.test(A)?g=c(g):g=h)}return u}function ZG(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let r="";for(let s=0;s<t;s++)r+=" ";let o=new RegExp(r,"gi");for(let s=1,a=i.getLineCount();s<=a;s++){let l=i.getLineFirstNonWhitespaceColumn(s);if(l===0&&(l=i.getLineMaxColumn(s)),l===1)continue;let c=new B(s,1,s,l),d=i.getValueInRange(c),u=n?d.replace(/\t/ig,r):d.replace(o," ");e.addEditOperation(c,u)}}var Pbe,Obe,iS,nS,c1,rS,oS,sS,aS,k8,E8,T8,d1,I8,L8,A8=N(()=>{ke();Ni();lt();Q3();ya();et();An();ti();Un();Qo();S8();He();xl();sne();BP();Pbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Obe=function(i,e){return function(t,n){e(t,n,i)}};iS=class i extends de{constructor(){super({id:i.ID,label:b("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:F.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new I8(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}};iS.ID="editor.action.indentationToSpaces";nS=class i extends de{constructor(){super({id:i.ID,label:b("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:F.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new L8(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}};nS.ID="editor.action.indentationToTabs";c1=class extends de{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let n=e.get(rr),r=e.get(Di),o=t.getModel();if(!o)return;let s=r.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),a=o.getOptions(),l=[1,2,3,4,5,6,7,8].map(d=>({id:d.toString(),label:d.toString(),description:d===s.tabSize&&d===a.tabSize?b("configuredTabSize","Configured Tab Size"):d===s.tabSize?b("defaultTabSize","Default Tab Size"):d===a.tabSize?b("currentTabSize","Current Tab Size"):void 0})),c=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(l,{placeHolder:b({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:l[c]}).then(d=>{if(d&&o&&!o.isDisposed()){let u=parseInt(d.label,10);this.displaySizeOnly?o.updateOptions({tabSize:u}):o.updateOptions({tabSize:u,indentSize:u,insertSpaces:this.insertSpaces})}})},50)}},rS=class i extends c1{constructor(){super(!1,!1,{id:i.ID,label:b("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}};rS.ID="editor.action.indentUsingTabs";oS=class i extends c1{constructor(){super(!0,!1,{id:i.ID,label:b("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}};oS.ID="editor.action.indentUsingSpaces";sS=class i extends c1{constructor(){super(!0,!0,{id:i.ID,label:b("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}};sS.ID="editor.action.changeTabDisplaySize";aS=class i extends de{constructor(){super({id:i.ID,label:b("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){let n=e.get(Di),r=t.getModel();if(!r)return;let o=n.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget);r.detectIndentation(o.insertSpaces,o.tabSize)}};aS.ID="editor.action.detectIndentation";k8=class extends de{constructor(){super({id:"editor.action.reindentlines",label:b("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:F.writable})}run(e,t){let n=e.get(Ot),r=t.getModel();if(!r)return;let o=QG(r,n,1,r.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}},E8=class extends de{constructor(){super({id:"editor.action.reindentselectedlines",label:b("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:F.writable})}run(e,t){let n=e.get(Ot),r=t.getModel();if(!r)return;let o=t.getSelections();if(o===null)return;let s=[];for(let a of o){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;let d=QG(r,n,l,c);s.push(...d)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}},T8=class{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,t){for(let r of this._edits)t.addEditOperation(B.lift(r.range),r.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}},d1=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new le,this.callOnModel=new le,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(11)<4||this.editor.getOption(54))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(t===null||t.length>1)return;let n=this.editor.getModel();if(!n||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let r=this.editor.getOption(11),{tabSize:o,indentSize:s,insertSpaces:a}=n.getOptions(),l=[],c={shiftIndent:f=>jc.shiftIndent(f,f.length+1,o,s,a),unshiftIndent:f=>jc.unshiftIndent(f,f.length+1,o,s,a)},d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(n,d)){d++;continue}break}if(d>e.endLineNumber)return;let u=n.getLineContent(d);if(!/\S/.test(u.substring(0,e.startColumn-1))){let f=mu(r,n,n.getLanguageId(),d,c,this._languageConfigurationService);if(f!==null){let m=qi(u),g=wr(f,o),w=wr(m,o);if(g!==w){let _=wh(g,o,a);l.push({range:new B(d,1,d,m.length+1),text:_}),u=_+u.substr(m.length)}else{let _=r_(n,d,this._languageConfigurationService);if(_===0||_===8)return}}}let h=d;for(;d<e.endLineNumber;){if(!/\S/.test(n.getLineContent(d+1))){d++;continue}break}if(d!==e.endLineNumber){let m=mu(r,{tokenization:{getLineTokens:g=>n.tokenization.getLineTokens(g),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(g,w)=>n.getLanguageIdAtPosition(g,w)},getLineContent:g=>g===h?u:n.getLineContent(g)},n.getLanguageId(),d+1,c,this._languageConfigurationService);if(m!==null){let g=wr(m,o),w=wr(qi(n.getLineContent(d+1)),o);if(g!==w){let _=g-w;for(let E=d+1;E<=e.endLineNumber;E++){let A=n.getLineContent(E),L=qi(A),U=wr(L,o)+_,Q=wh(U,o,a);Q!==L&&l.push({range:new B(E,1,E,L.length+1),text:Q})}}}}if(l.length>0){this.editor.pushUndoStop();let f=new T8(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",f),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);let n=e.getLineFirstNonWhitespaceColumn(t);if(n===0)return!0;let r=e.tokenization.getLineTokens(t);if(r.getCount()>0){let o=r.findTokenIndexAtOffset(n);if(o>=0&&r.getStandardTokenType(o)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};d1.ID="editor.contrib.autoIndentOnPaste";d1=Pbe([Obe(1,Ot)],d1);I8=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),ZG(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}},L8=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),ZG(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}};Ue(d1.ID,d1,2);ee(iS);ee(nS);ee(rS);ee(oS);ee(sS);ee(aS);ee(k8);ee(E8)});function JG(i){return yt.from({scheme:To.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}var lS,u1,D8,h1,M8=N(()=>{qt();ke();di();et();Dm();Ln();lS=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},u1=class{constructor(e,t){this.range=e,this.direction=t}},D8=class i{constructor(e,t,n){this.hint=e,this.anchor=t,this.provider=n,this._isResolved=!1}with(e){let t=new i(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return lS(this,void 0,void 0,function*(){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return yield this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(e){var t,n;return lS(this,void 0,void 0,function*(){try{let r=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=r==null?void 0:r.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(n=r==null?void 0:r.label)!==null&&n!==void 0?n:this.hint.label,this._isResolved=!0}catch(r){Xt(r),this._isResolved=!1}})}},h1=class i{static create(e,t,n,r){return lS(this,void 0,void 0,function*(){let o=[],s=e.ordered(t).reverse().map(a=>n.map(l=>lS(this,void 0,void 0,function*(){try{let c=yield a.provideInlayHints(t,l,r);c!=null&&c.hints.length&&o.push([c,a])}catch(c){Xt(c)}})));if(yield Promise.all(s.flat()),r.isCancellationRequested||t.isDisposed())throw new Pv;return new i(n,o,t)})}constructor(e,t,n){this._disposables=new le,this.ranges=e,this.provider=new Set;let r=[];for(let[o,s]of t){this._disposables.add(o),this.provider.add(s);for(let a of o.hints){let l=n.validatePosition(a.position),c="before",d=i._getRangeAtPosition(n,l),u;d.getStartPosition().isBefore(l)?(u=B.fromPositions(d.getStartPosition(),l),c="after"):(u=B.fromPositions(l,d.getEndPosition()),c="before"),r.push(new D8(a,new u1(u,c),s))}}this.items=r.sort((o,s)=>Ie.compare(o.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){let n=t.lineNumber,r=e.getWordAtPosition(t);if(r)return new B(n,r.startColumn,n,r.endColumn);e.tokenization.tokenizeIfCheap(n);let o=e.tokenization.getLineTokens(n),s=t.column-1,a=o.findTokenIndexAtOffset(s),l=o.getStartOffset(a),c=o.getEndOffset(a);return c-l===1&&(l===s&&a>1?(l=o.getStartOffset(a-1),c=o.getEndOffset(a-1)):c===s&&a<o.getCount()-1&&(l=o.getStartOffset(a+1),c=o.getEndOffset(a+1))),new B(n,l+1,n,c+1)}}});function eY(i,e,t,n){var r;return f1(this,void 0,void 0,function*(){let o=i.get(Sn),s=i.get(rs),a=i.get(_i),l=i.get(Ke),c=i.get(Ri);if(yield n.item.resolve(st.None),!n.part.location)return;let d=n.part.location,u=[],h=new Set(Jo.getMenuItems(Me.EditorContext).map(m=>xP(m)?m.command.id:Td()));for(let m of gs.all())h.has(m.desc.id)&&u.push(new Zo(m.desc.id,oa.label(m.desc,{renderShortTitle:!0}),void 0,!0,()=>f1(this,void 0,void 0,function*(){let g=yield o.createModelReference(d.uri);try{let w=new gh(g.object.textEditorModel,B.getStartPosition(d.range)),_=n.item.anchor.range;yield l.invokeFunction(m.runEditorCommand.bind(m),e,w,_)}finally{g.dispose()}})));if(n.part.command){let{command:m}=n.part;u.push(new Ss),u.push(new Zo(m.id,m.title,void 0,!0,()=>f1(this,void 0,void 0,function*(){var g;try{yield a.executeCommand(m.id,...(g=m.arguments)!==null&&g!==void 0?g:[])}catch(w){c.notify({severity:wf.Error,source:n.item.provider.displayName,message:w})}})))}let f=e.getOption(125);s.showContextMenu({domForShadowRoot:f&&(r=e.getDomNode())!==null&&r!==void 0?r:void 0,getAnchor:()=>{let m=Zi(t);return{x:m.left,y:m.top+m.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function cS(i,e,t,n){return f1(this,void 0,void 0,function*(){let o=yield i.get(Sn).createModelReference(n.uri);yield t.invokeWithinContext(s=>f1(this,void 0,void 0,function*(){let a=e.hasSideBySideModifier,l=s.get(it),c=On.inPeekEditor.getValue(l),d=!a&&t.getOption(86)&&!c;return new uc({openToSide:a,openInPeek:d,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new gh(o.object.textEditorModel,B.getStartPosition(n.range)),B.lift(n.range))})),o.dispose()})}var f1,N8=N(()=>{Ht();Fc();ki();H0();et();ra();e1();hh();Ji();Vi();wt();wl();Ut();No();f1=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})}});function zbe(i){let e="\xA0";return i.replace(/[ \t]/g,e)}var Fbe,Vp,qp,dS,R8,tY,Kp,P8,pc,F8=N(()=>{Ht();mi();jt();ki();qt();ke();df();Bn();Ln();JF();z_();eg();ya();et();fr();qc();jn();Ms();Pt();ra();i1();M8();N8();Vi();fl();Ut();No();ir();nr();Fbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Vp=function(i,e){return function(t,n){e(t,n,i)}},qp=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},R8=class i{constructor(){this._entries=new aa(50)}get(e){let t=i._key(e);return this._entries.get(t)}set(e,t){let n=i._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}},tY=Zn("IInlayHintsCache");tr(tY,R8,1);Kp=class{constructor(e,t){this.item=e,this.index=t}get part(){let e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}},P8=class{constructor(e,t){this.part=e,this.hasTriggerModifier=t}},pc=dS=class{static get(e){var t;return(t=e.getContribution(dS.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,n,r,o,s,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=r,this._commandService=o,this._notificationService=s,this._instaService=a,this._disposables=new le,this._sessionDisposables=new le,this._decorationsMetadata=new Map,this._ruleFactory=new ty(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(138)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();let e=this._editor.getOption(138);if(e.enabled==="off")return;let t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;let n=this._inlayHintsCache.get(t);n&&this._updateHintsDecorators([t.getFullModelRange()],n),this._sessionDisposables.add(ni(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let r,o=new Set,s=new ui(()=>qp(this,void 0,void 0,function*(){let a=Date.now();r==null||r.dispose(!0),r=new zi;let l=t.onWillDispose(()=>r==null?void 0:r.cancel());try{let c=r.token,d=yield h1.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),c);if(s.delay=this._debounceInfo.update(t,Date.now()-a),c.isCancellationRequested){d.dispose();return}for(let u of d.provider)typeof u.onDidChangeInlayHints=="function"&&!o.has(u)&&(o.add(u),this._sessionDisposables.add(u.onDidChangeInlayHints(()=>{s.isScheduled()||s.schedule()})));this._sessionDisposables.add(d),this._updateHintsDecorators(d.ranges,d.items),this._cacheHintsForFastRestore(t)}catch(c){ft(c)}finally{r.dispose(),l.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(s),this._sessionDisposables.add(ni(()=>r==null?void 0:r.dispose(!0))),s.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!s.isScheduled())&&s.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{let l=Math.max(s.delay,1250);s.schedule(l)})),e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(uP.getInstance().event(c=>{if(!this._editor.hasModel())return;let d=c.altKey&&c.ctrlKey&&!(c.shiftKey||c.metaKey)?l:a;if(d!==this._activeRenderMode){this._activeRenderMode=d;let u=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(u);this._updateHintsDecorators([u.getFullModelRange()],h),s.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>s.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){let e=new le,t=e.add(new Za(this._editor)),n=new le;return e.add(n),e.add(t.onMouseMoveOrRelevantKeyDown(r=>{let[o]=r,s=this._getInlayHintLabelPart(o),a=this._editor.getModel();if(!s||!a){n.clear();return}let l=new zi;n.add(ni(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new P8(s,o.hasTriggerModifier):void 0;let c=a.validatePosition(s.item.hint.position).lineNumber,d=new B(c,1,c,a.getLineMaxColumn(c)),u=this._getInlineHintsForRange(d);this._updateHintsDecorators([d],u),n.add(ni(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([d],u)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(r=>qp(this,void 0,void 0,function*(){let o=this._getInlayHintLabelPart(r);if(o){let s=o.part;s.location?this._instaService.invokeFunction(cS,r,this._editor,s.location):qO.is(s.command)&&(yield this._invokeCommand(s.command,o.item))}}))),e}_getInlineHintsForRange(e){let t=new Set;for(let n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&t.add(n.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>qp(this,void 0,void 0,function*(){if(t.event.detail!==2)return;let n=this._getInlayHintLabelPart(t);if(n&&(t.event.preventDefault(),yield n.item.resolve(st.None),Ki(n.item.hint.textEdits))){let r=n.item.hint.textEdits.map(o=>ii.replace(B.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",r),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>qp(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;let t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(eY,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;let n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(n instanceof yf&&(n==null?void 0:n.attachedData)instanceof Kp)return n.attachedData}_invokeCommand(e,t){var n;return qp(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(n=e.arguments)!==null&&n!==void 0?n:[])}catch(r){this._notificationService.notify({severity:wf.Error,source:t.provider.displayName,message:r})}})}_cacheHintsForFastRestore(e){let t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){let t=new Map;for(let[n,r]of this._decorationsMetadata){if(t.has(r.item))continue;let o=e.getDecorationRange(n);if(o){let s=new u1(o,r.item.anchor.direction),a=r.item.with({anchor:s});t.set(r.item,a)}}return Array.from(t.values())}_getHintsRanges(){let t=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),r=[];for(let o of n.sort(B.compareRangesUsingStarts)){let s=t.validateRange(new B(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));r.length===0||!B.areIntersectingOrTouching(r[r.length-1],s)?r.push(s):r[r.length-1]=B.plusRange(r[r.length-1],s)}return r}_updateHintsDecorators(e,t){var n,r;let o=[],s=(g,w,_,E,A)=>{let L={content:_,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:w.className,cursorStops:E,attachedData:A};o.push({item:g,classNameRef:w,decoration:{range:g.anchor.range,options:{description:"InlayHint",showIfCollapsed:g.anchor.range.isEmpty(),collapseOnReplaceEdit:!g.anchor.range.isEmpty(),stickiness:0,[g.anchor.direction]:this._activeRenderMode===0?L:void 0}}})},a=(g,w)=>{let _=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});s(g,_,"\u200A",w?bu.Right:bu.None)},{fontSize:l,fontFamily:c,padding:d,isUniform:u}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,c);for(let g of t){g.hint.paddingLeft&&a(g,!1);let w=typeof g.hint.label=="string"?[{label:g.hint.label}]:g.hint.label;for(let _=0;_<w.length;_++){let E=w[_],A=_===0,L=_===w.length-1,O={fontSize:`${l}px`,fontFamily:`var(${h}), ${S_.fontFamily}`,verticalAlign:u?"baseline":"middle",unicodeBidi:"isolate"};Ki(g.hint.textEdits)&&(O.cursor="default"),this._fillInColors(O,g.hint),(E.command||E.location)&&((n=this._activeInlayHintPart)===null||n===void 0?void 0:n.part.item)===g&&this._activeInlayHintPart.part.index===_&&(O.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(O.color=Ei(AO),O.cursor="pointer")),d&&(A&&L?(O.padding=`1px ${Math.max(1,l/4)|0}px`,O.borderRadius=`${l/4|0}px`):A?(O.padding=`1px 0 1px ${Math.max(1,l/4)|0}px`,O.borderRadius=`${l/4|0}px 0 0 ${l/4|0}px`):L?(O.padding=`1px ${Math.max(1,l/4)|0}px 1px 0`,O.borderRadius=`0 ${l/4|0}px ${l/4|0}px 0`):O.padding="1px 0 1px 0"),s(g,this._ruleFactory.createClassNameRef(O),zbe(E.label),L&&!g.hint.paddingRight?bu.Right:bu.None,new Kp(g,_))}if(g.hint.paddingRight&&a(g,!0),o.length>dS._MAX_DECORATORS)break}let f=[];for(let g of e)for(let{id:w}of(r=this._editor.getDecorationsInRange(g))!==null&&r!==void 0?r:[]){let _=this._decorationsMetadata.get(w);_&&(f.push(w),_.classNameRef.dispose(),this._decorationsMetadata.delete(w))}let m=_a.capture(this._editor);this._editor.changeDecorations(g=>{let w=g.deltaDecorations(f,o.map(_=>_.decoration));for(let _=0;_<w.length;_++){let E=o[_];this._decorationsMetadata.set(w[_],E)}}),m.restore(this._editor)}_fillInColors(e,t){t.kind===ok.Parameter?(e.backgroundColor=Ei(OO),e.color=Ei(PO)):t.kind===ok.Type?(e.backgroundColor=Ei(RO),e.color=Ei(NO)):(e.backgroundColor=Ei(MO),e.color=Ei(DO))}_getLayoutInfo(){let e=this._editor.getOption(138),t=e.padding,n=this._editor.getOption(51),r=this._editor.getOption(48),o=e.fontSize;(!o||o<5||o>n)&&(o=n);let s=e.fontFamily||r;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===r&&o===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(let e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};pc.ID="editor.contrib.InlayHints";pc._MAX_DECORATORS=1500;pc=dS=Fbe([Vp(1,Se),Vp(2,cn),Vp(3,tY),Vp(4,_i),Vp(5,Ri),Vp(6,Ke)],pc);Dt.registerCommand("_executeInlayHintProvider",(i,...e)=>qp(void 0,void 0,void 0,function*(){let[t,n]=e;Bt(yt.isUri(t)),Bt(B.isIRange(n));let{inlayHintsProvider:r}=i.get(Se),o=yield i.get(Sn).createModelReference(t);try{let s=yield h1.create(r,o.object.textEditorModel,[B.lift(n)],st.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{o.dispose()}}))});var Bbe,p1,iY,Hbe,uS,hS,nY=N(()=>{jt();Ts();di();jn();nc();ts();ra();c8();QC();F8();kn();ns();Pt();He();Tr();M8();mi();Bbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},p1=function(i,e){return function(t,n){e(t,n,i)}},iY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Hbe=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},uS=class extends Ld{constructor(e,t,n,r){super(10,t,e.item.anchor.range,n,r,!0),this.part=e}},hS=class extends Wp{constructor(e,t,n,r,o,s){super(e,t,n,r,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!pc.get(this._editor)||e.target.type!==6)return null;let r=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return r instanceof yf&&r.attachedData instanceof Kp?new uS(r.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n){return e instanceof uS?new Mr(r=>iY(this,void 0,void 0,function*(){var o,s,a,l;let{part:c}=e;if(yield c.item.resolve(n),n.isCancellationRequested)return;let d;typeof c.item.hint.tooltip=="string"?d=new $i().appendText(c.item.hint.tooltip):c.item.hint.tooltip&&(d=c.item.hint.tooltip),d&&r.emitOne(new ro(this,e.range,[d],!1,0)),Ki(c.item.hint.textEdits)&&r.emitOne(new ro(this,e.range,[new $i().appendText(b("hint.dbl","Double-click to insert"))],!1,10001));let u;if(typeof c.part.tooltip=="string"?u=new $i().appendText(c.part.tooltip):c.part.tooltip&&(u=c.part.tooltip),u&&r.emitOne(new ro(this,e.range,[u],!1,1)),c.part.location||c.part.command){let w,E=this._editor.getOption(76)==="altKey"?Er?b("links.navigate.kb.meta.mac","cmd + click"):b("links.navigate.kb.meta","ctrl + click"):Er?b("links.navigate.kb.alt.mac","option + click"):b("links.navigate.kb.alt","alt + click");c.part.location&&c.part.command?w=new $i().appendText(b("hint.defAndCommand","Go to Definition ({0}), right click for more",E)):c.part.location?w=new $i().appendText(b("hint.def","Go to Definition ({0})",E)):c.part.command&&(w=new $i(`[${b("hint.cmd","Execute Command")}](${JG(c.part.command)} "${c.part.command.title}") (${E})`,{isTrusted:!0})),w&&r.emitOne(new ro(this,e.range,[w],!1,1e4))}let h=yield this._resolveInlayHintLabelPartHover(c,n);try{for(var f=!0,m=Hbe(h),g;g=yield m.next(),o=g.done,!o;f=!0){l=g.value,f=!1;let w=l;r.emitOne(w)}}catch(w){s={error:w}}finally{try{!f&&!o&&(a=m.return)&&(yield a.call(m))}finally{if(s)throw s.error}}})):Mr.EMPTY}_resolveInlayHintLabelPartHover(e,t){return iY(this,void 0,void 0,function*(){if(!e.part.location)return Mr.EMPTY;let{uri:n,range:r}=e.part.location,o=yield this._resolverService.createModelReference(n);try{let s=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(s)?l1(this._languageFeaturesService.hoverProvider,s,new Ie(r.startLineNumber,r.startColumn),t).filter(a=>!Wc(a.hover.contents)).map(a=>new ro(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):Mr.EMPTY}finally{o.dispose()}})}};hS=Bbe([p1(1,en),p1(2,tn),p1(3,Mt),p1(4,Sn),p1(5,Se)],hS)});var z8=N(()=>{lt();nc();F8();nY();Ue(pc.ID,pc,1);jo.register(hS)});var fS,rY=N(()=>{An();fS=class{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Qe(r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn),r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn)):new Qe(r.endLineNumber,r.endColumn-this._text.length,r.endLineNumber,r.endColumn)}}});var oY=N(()=>{});var sY=N(()=>{oY()});var U8=Qi(m1=>{jt();qt();yu();lt();et();An();ti();jn();q_();He();rY();sY();var Ube=m1&&m1.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},jbe=m1&&m1.__param||function(i,e){return function(t,n){e(t,n,i)}},pS,jd=pS=class{static get(e){return e.getContribution(pS.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var n;(n=this.currentRequest)===null||n===void 0||n.cancel();let r=this.editor.getSelection(),o=this.editor.getModel();if(!o||!r)return;let s=r;if(s.startLineNumber!==s.endLineNumber)return;let a=new T_(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Jt(c=>this.editorWorkerService.navigateValueSet(l,s,t)),this.currentRequest.then(c=>{var d;if(!c||!c.range||!c.value||!a.validate(this.editor))return;let u=B.lift(c.range),h=c.range,f=c.value.length-(s.endColumn-s.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+c.value.length},f>1&&(s=new Qe(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+f-1));let m=new fS(u,s,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,m),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:pS.DECORATION}]),(d=this.decorationRemover)===null||d===void 0||d.cancel(),this.decorationRemover=hf(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(ft)}).catch(ft)):Promise.resolve(void 0)}};jd.ID="editor.contrib.inPlaceReplaceController";jd.DECORATION=mt.register({description:"in-place-replace",className:"valueSetReplacement"});jd=pS=Ube([jbe(1,El)],jd);var B8=class extends de{constructor(){super({id:"editor.action.inPlaceReplace.up",label:b("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:3159,weight:100}})}run(e,t){let n=jd.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}},H8=class extends de{constructor(){super({id:"editor.action.inPlaceReplace.down",label:b("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:3161,weight:100}})}run(e,t){let n=jd.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}};Ue(jd.ID,jd,4);ee(B8);ee(H8)});var j8,W8=N(()=>{lt();IP();ti();He();j8=class extends de{constructor(){super({id:"expandLineSelection",label:b("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:F.textInputFocus,primary:2090}})}run(e,t,n){if(n=n||{},!t.hasModel())return;let r=t._getViewModel();r.model.pushStackElement(),r.setCursorStates(n.source,3,Fm.expandLineSelection(r,r.getCursorStates())),r.revealPrimaryCursor(n.source,!0)}};ee(j8)});function Wbe(i,e){e.sort((s,a)=>s.lineNumber===a.lineNumber?s.column-a.column:s.lineNumber-a.lineNumber);for(let s=e.length-2;s>=0;s--)e[s].lineNumber===e[s+1].lineNumber&&e.splice(s,1);let t=[],n=0,r=0,o=e.length;for(let s=1,a=i.getLineCount();s<=a;s++){let l=i.getLineContent(s),c=l.length+1,d=0;if(r<o&&e[r].lineNumber===s&&(d=e[r].column,r++,d===c)||l.length===0)continue;let u=of(l),h=0;if(u===-1)h=1;else if(u!==l.length-1)h=u+2;else continue;h=Math.max(d,h),t[n++]=ii.delete(new B(s,h,s,c))}return t}var mS,aY=N(()=>{Ni();ya();et();mS=class{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let n=Wbe(e,this._cursors);for(let r=0,o=n.length;r<o;r++){let s=n[r];t.addEditOperation(s.range,s.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}});var g1,lY=N(()=>{et();An();g1=class{constructor(e,t,n){this._selection=e,this._isCopyingDown=t,this._noop=n||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let n=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._endLineNumberDelta=1,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));let r=[];for(let s=n.startLineNumber;s<=n.endLineNumber;s++)r.push(e.getLineContent(s));let o=r.join(`
`);o===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new B(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber+1,1),n.endLineNumber===e.getLineCount()?"":`
`):this._isCopyingDown?t.addEditOperation(new B(n.startLineNumber,1,n.startLineNumber,1),o+`
`):t.addEditOperation(new B(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),`
`+o),this._selectionId=t.trackSelection(n),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let r=n.startLineNumber,o=n.startColumn,s=n.endLineNumber,a=n.endColumn;this._startLineNumberDelta!==0&&(r=r+this._startLineNumberDelta,o=1),this._endLineNumberDelta!==0&&(s=s+this._endLineNumberDelta,a=1),n=Qe.createWithDirection(r,o,s,a,this._selectionDirection)}return n}}});var Vbe,qbe,gS,cY=N(()=>{Ni();Q3();et();An();dne();Un();S8();BP();hne();Vbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qbe=function(i,e){return function(t,n){e(t,n,i)}},gS=class{constructor(e,t,n,r){this._languageConfigurationService=r,this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let n=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===n){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let r=this._selection;r.startLineNumber<r.endLineNumber&&r.endColumn===1&&(this._moveEndPositionDown=!0,r=r.setEndPosition(r.endLineNumber-1,e.getLineMaxColumn(r.endLineNumber-1)));let{tabSize:o,indentSize:s,insertSpaces:a}=e.getOptions(),l=this.buildIndentConverter(o,s,a),c={tokenization:{getLineTokens:d=>e.tokenization.getLineTokens(d),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(d,u)=>e.getLanguageIdAtPosition(d,u)},getLineContent:null};if(r.startLineNumber===r.endLineNumber&&e.getLineMaxColumn(r.startLineNumber)===1){let d=r.startLineNumber,u=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new B(1,1,1,1),null):(t.addEditOperation(new B(d,1,d,1),e.getLineContent(u)),t.addEditOperation(new B(u,1,u,e.getLineMaxColumn(u)),null)),r=new Qe(u,1,u,1)}else{let d,u;if(this._isMovingDown){d=r.endLineNumber+1,u=e.getLineContent(d),t.addEditOperation(new B(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let h=u;if(this.shouldAutoIndent(e,r)){let f=this.matchEnterRule(e,l,o,d,r.startLineNumber-1);if(f!==null){let g=qi(e.getLineContent(d)),w=f+wr(g,o);h=wh(w,o,a)+this.trimStart(u)}else{c.getLineContent=w=>w===r.startLineNumber?e.getLineContent(d):e.getLineContent(w);let g=mu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber,l,this._languageConfigurationService);if(g!==null){let w=qi(e.getLineContent(d)),_=wr(g,o),E=wr(w,o);_!==E&&(h=wh(_,o,a)+this.trimStart(u))}}t.addEditOperation(new B(r.startLineNumber,1,r.startLineNumber,1),h+`
`);let m=this.matchEnterRuleMovingDown(e,l,o,r.startLineNumber,d,h);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,m);else{c.getLineContent=w=>w===r.startLineNumber?h:w>=r.startLineNumber+1&&w<=r.endLineNumber+1?e.getLineContent(w-1):e.getLineContent(w);let g=mu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber+1,l,this._languageConfigurationService);if(g!==null){let w=qi(e.getLineContent(r.startLineNumber)),_=wr(g,o),E=wr(w,o);if(_!==E){let A=_-E;this.getIndentEditsOfMovingBlock(e,t,r,o,a,A)}}}}else t.addEditOperation(new B(r.startLineNumber,1,r.startLineNumber,1),h+`
`)}else if(d=r.startLineNumber-1,u=e.getLineContent(d),t.addEditOperation(new B(d,1,d+1,1),null),t.addEditOperation(new B(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),`
`+u),this.shouldAutoIndent(e,r)){c.getLineContent=f=>f===d?e.getLineContent(r.startLineNumber):e.getLineContent(f);let h=this.matchEnterRule(e,l,o,r.startLineNumber,r.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,h);else{let f=mu(this._autoIndent,c,e.getLanguageIdAtPosition(r.startLineNumber,1),d,l,this._languageConfigurationService);if(f!==null){let m=qi(e.getLineContent(r.startLineNumber)),g=wr(f,o),w=wr(m,o);if(g!==w){let _=g-w;this.getIndentEditsOfMovingBlock(e,t,r,o,a,_)}}}}}this._selectionId=t.trackSelection(r)}buildIndentConverter(e,t,n){return{shiftIndent:r=>jc.shiftIndent(r,r.length+1,e,t,n),unshiftIndent:r=>jc.unshiftIndent(r,r.length+1,e,t,n)}}parseEnterResult(e,t,n,r,o){if(o){let s=o.indentation;o.indentAction===zm.None||o.indentAction===zm.Indent?s=o.indentation+o.appendText:o.indentAction===zm.IndentOutdent?s=o.indentation:o.indentAction===zm.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let a=e.getLineContent(r);if(this.trimStart(a).indexOf(this.trimStart(s))>=0){let l=qi(e.getLineContent(r)),c=qi(s),d=r_(e,r,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));let u=wr(c,n),h=wr(l,n);return u-h}}return null}matchEnterRuleMovingDown(e,t,n,r,o,s){if(of(s)>=0){let a=e.getLineMaxColumn(o),l=n_(this._autoIndent,e,new B(o,a,o,a),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,l)}else{let a=r-1;for(;a>=1;){let d=e.getLineContent(a);if(of(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=n_(this._autoIndent,e,new B(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}}matchEnterRule(e,t,n,r,o,s){let a=o;for(;a>=1;){let d;if(a===o&&s!==void 0?d=s:d=e.getLineContent(a),of(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=n_(this._autoIndent,e,new B(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let n=e.getLanguageIdAtPosition(t.startLineNumber,1),r=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(n!==r||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,n,r,o,s){for(let a=n.startLineNumber;a<=n.endLineNumber;a++){let l=e.getLineContent(a),c=qi(l),u=wr(c,r)+s,h=wh(u,r,o);h!==c&&(t.addEditOperation(new B(a,1,a,c.length+1),h),a===n.endLineNumber&&n.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber<n.endLineNumber&&(n=n.setEndPosition(n.endLineNumber,2)),n}};gS=Vbe([qbe(3,Ot)],gS)});function dY(i,e,t){let n=e.startLineNumber,r=e.endLineNumber;if(e.endColumn===1&&r--,n>=r)return null;let o=[];for(let a=n;a<=r;a++)o.push(i.getLineContent(a));let s=o.slice(0);return s.sort(xh.getCollator().compare),t===!0&&(s=s.reverse()),{startLineNumber:n,endLineNumber:r,before:o,after:s}}function Kbe(i,e,t){let n=dY(i,e,t);return n?ii.replace(new B(n.startLineNumber,1,n.endLineNumber,i.getLineMaxColumn(n.endLineNumber)),n.after.join(`
`)):null}var xh,uY=N(()=>{ya();et();xh=class i{static getCollator(){return i._COLLATOR||(i._COLLATOR=new Intl.Collator),i._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){let n=Kbe(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,n){if(e===null)return!1;let r=dY(e,t,n);if(!r)return!1;for(let o=0,s=r.before.length;o<s;o++)if(r.before[o]!==r.after[o])return!0;return!1}};xh._COLLATOR=null});var bS,V8,q8,K8,vS,$8,G8,_S,Y8,X8,Q8,yS,Z8,J8,e7,t7,i7,wS,n7,r7,o7,s7,Wd,a7,l7,mc,b1,Ch,v1,Sh,c7=N(()=>{cl();s_();lt();Zv();aY();pne();ya();di();et();An();ti();lY();cY();uY();He();Ji();Un();bS=class extends de{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let n=t.getSelections().map((s,a)=>({selection:s,index:a,ignore:!1}));n.sort((s,a)=>B.compareRangesUsingStarts(s.selection,a.selection));let r=n[0];for(let s=1;s<n.length;s++){let a=n[s];r.selection.endLineNumber===a.selection.startLineNumber&&(r.index<a.index?a.ignore=!0:(r.ignore=!0,r=a))}let o=[];for(let s of n)o.push(new g1(s.selection,this.down,s.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},V8=class extends bS{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:b("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}},q8=class extends bS{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:b("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}},K8=class extends de{constructor(){super({id:"editor.action.duplicateSelection",label:b("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:F.writable,menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,n){if(!t.hasModel())return;let r=[],o=t.getSelections(),s=t.getModel();for(let a of o)if(a.isEmpty())r.push(new g1(a,!0));else{let l=new Qe(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);r.push(new EP(l,s.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},vS=class extends de{constructor(e,t){super(t),this.down=e}run(e,t){let n=e.get(Ot),r=[],o=t.getSelections()||[],s=t.getOption(11);for(let a of o)r.push(new gS(a,this.down,s,n));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},$8=class extends vS{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:b("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}},G8=class extends vS{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:b("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}},_S=class extends de{constructor(e,t){super(t),this.descending=e}run(e,t){let n=t.getSelections()||[];for(let o of n)if(!xh.canRun(t.getModel(),o,this.descending))return;let r=[];for(let o=0,s=n.length;o<s;o++)r[o]=new xh(n[o],this.descending);t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},Y8=class extends _S{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:b("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:F.writable})}},X8=class extends _S{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:b("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:F.writable})}},Q8=class extends de{constructor(){super({id:"editor.action.removeDuplicateLines",label:b("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:F.writable})}run(e,t){if(!t.hasModel())return;let n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let r=[],o=[],s=0;for(let a of t.getSelections()){let l=new Set,c=[];for(let f=a.startLineNumber;f<=a.endLineNumber;f++){let m=n.getLineContent(f);l.has(m)||(c.push(m),l.add(m))}let d=new Qe(a.startLineNumber,1,a.endLineNumber,n.getLineMaxColumn(a.endLineNumber)),u=a.startLineNumber-s,h=new Qe(u,1,u+c.length-1,c[c.length-1].length);r.push(ii.replace(d,c.join(`
`))),o.push(h),s+=a.endLineNumber-a.startLineNumber+1-c.length}t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}},yS=class i extends de{constructor(){super({id:i.ID,label:b("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:gi(2089,2102),weight:100}})}run(e,t,n){let r=[];n.reason==="auto-save"&&(r=(t.getSelections()||[]).map(a=>new Ie(a.positionLineNumber,a.positionColumn)));let o=t.getSelection();if(o===null)return;let s=new mS(o,r);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}};yS.ID="editor.action.trimTrailingWhitespace";Z8=class extends de{constructor(){super({id:"editor.action.deleteLines",label:b("lines.delete","Delete Line"),alias:"Delete Line",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let n=this._getLinesToRemove(t),r=t.getModel();if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let o=0,s=[],a=[];for(let l=0,c=n.length;l<c;l++){let d=n[l],u=d.startLineNumber,h=d.endLineNumber,f=1,m=r.getLineMaxColumn(h);h<r.getLineCount()?(h+=1,m=1):u>1&&(u-=1,f=r.getLineMaxColumn(u)),s.push(ii.replace(new Qe(u,f,h,m),"")),a.push(new Qe(u-o,d.positionColumn,u-o,d.positionColumn)),o+=d.endLineNumber-d.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,a),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(o=>{let s=o.endLineNumber;return o.startLineNumber<o.endLineNumber&&o.endColumn===1&&(s-=1),{startLineNumber:o.startLineNumber,selectionStartColumn:o.selectionStartColumn,endLineNumber:s,positionColumn:o.positionColumn}});t.sort((o,s)=>o.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber);let n=[],r=t[0];for(let o=1;o<t.length;o++)r.endLineNumber+1>=t[o].startLineNumber?r.endLineNumber=t[o].endLineNumber:(n.push(r),r=t[o]);return n.push(r),n}},J8=class extends de{constructor(){super({id:"editor.action.indentLines",label:b("lines.indent","Indent Line"),alias:"Indent Line",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2142,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,o_.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}},e7=class extends de{constructor(){super({id:"editor.action.outdentLines",label:b("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2140,weight:100}})}run(e,t){cf.Outdent.runEditorCommand(e,t,null)}},t7=class extends de{constructor(){super({id:"editor.action.insertLineBefore",label:b("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:3075,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,o_.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}},i7=class extends de{constructor(){super({id:"editor.action.insertLineAfter",label:b("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2051,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,o_.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}},wS=class extends de{run(e,t){if(!t.hasModel())return;let n=t.getSelection(),r=this._getRangesToDelete(t),o=[];for(let l=0,c=r.length-1;l<c;l++){let d=r[l],u=r[l+1];B.intersectRanges(d,u)===null?o.push(d):r[l+1]=B.plusRange(d,u)}o.push(r[r.length-1]);let s=this._getEndCursorState(n,o),a=o.map(l=>ii.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,s),t.pushUndoStop()}},n7=class extends wS{constructor(){super({id:"deleteAllLeft",label:b("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null,r=[],o=0;return t.forEach(s=>{let a;if(s.endColumn===1&&o>0){let l=s.startLineNumber-o;a=new Qe(l,s.startColumn,l,s.startColumn)}else a=new Qe(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn);o+=s.endLineNumber-s.startLineNumber,s.intersectRanges(e)?n=a:r.push(a)}),n&&r.unshift(n),r}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let n=t,r=e.getModel();return r===null?[]:(n.sort(B.compareRangesUsingStarts),n=n.map(o=>{if(o.isEmpty())if(o.startColumn===1){let s=Math.max(1,o.startLineNumber-1),a=o.startLineNumber===1?1:r.getLineContent(s).length+1;return new B(s,a,o.startLineNumber,1)}else return new B(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new B(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),n)}},r7=class extends wS{constructor(){super({id:"deleteAllRight",label:b("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null,r=[];for(let o=0,s=t.length,a=0;o<s;o++){let l=t[o],c=new Qe(l.startLineNumber-a,l.startColumn,l.startLineNumber-a,l.startColumn);l.intersectRanges(e)?n=c:r.push(c)}return n&&r.unshift(n),r}_getRangesToDelete(e){let t=e.getModel();if(t===null)return[];let n=e.getSelections();if(n===null)return[];let r=n.map(o=>{if(o.isEmpty()){let s=t.getLineMaxColumn(o.startLineNumber);return o.startColumn===s?new B(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new B(o.startLineNumber,o.startColumn,o.startLineNumber,s)}return o});return r.sort(B.compareRangesUsingStarts),r}},o7=class extends de{constructor(){super({id:"editor.action.joinLines",label:b("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getSelection();if(r===null)return;n.sort(B.compareRangesUsingStarts);let o=[],s=n.reduce((h,f)=>h.isEmpty()?h.endLineNumber===f.startLineNumber?(r.equalsSelection(h)&&(r=f),f):f.startLineNumber>h.endLineNumber+1?(o.push(h),f):new Qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>h.endLineNumber?(o.push(h),f):new Qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn));o.push(s);let a=t.getModel();if(a===null)return;let l=[],c=[],d=r,u=0;for(let h=0,f=o.length;h<f;h++){let m=o[h],g=m.startLineNumber,w=1,_=0,E,A,L=a.getLineContent(m.endLineNumber).length-m.endColumn;if(m.isEmpty()||m.startLineNumber===m.endLineNumber){let Q=m.getStartPosition();Q.lineNumber<a.getLineCount()?(E=g+1,A=a.getLineMaxColumn(E)):(E=Q.lineNumber,A=a.getLineMaxColumn(Q.lineNumber))}else E=m.endLineNumber,A=a.getLineMaxColumn(E);let O=a.getLineContent(g);for(let Q=g+1;Q<=E;Q++){let ae=a.getLineContent(Q),te=a.getLineFirstNonWhitespaceColumn(Q);if(te>=1){let Z=!0;O===""&&(Z=!1),Z&&(O.charAt(O.length-1)===" "||O.charAt(O.length-1)===" ")&&(Z=!1,O=O.replace(/[\s\uFEFF\xA0]+$/g," "));let ve=ae.substr(te-1);O+=(Z?" ":"")+ve,Z?_=ve.length+1:_=ve.length}else _=0}let U=new B(g,w,E,A);if(!U.isEmpty()){let Q;m.isEmpty()?(l.push(ii.replace(U,O)),Q=new Qe(U.startLineNumber-u,O.length-_+1,g-u,O.length-_+1)):m.startLineNumber===m.endLineNumber?(l.push(ii.replace(U,O)),Q=new Qe(m.startLineNumber-u,m.startColumn,m.endLineNumber-u,m.endColumn)):(l.push(ii.replace(U,O)),Q=new Qe(m.startLineNumber-u,m.startColumn,m.startLineNumber-u,O.length-L)),B.intersectRanges(U,r)!==null?d=Q:c.push(Q)}u+=U.endLineNumber-U.startLineNumber}c.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}},s7=class extends de{constructor(){super({id:"editor.action.transpose",label:b("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:F.writable})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=[];for(let s=0,a=n.length;s<a;s++){let l=n[s];if(!l.isEmpty())continue;let c=l.getStartPosition(),d=r.getLineMaxColumn(c.lineNumber);if(c.column>=d){if(c.lineNumber===r.getLineCount())continue;let u=new B(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=r.getValueInRange(u).split("").reverse().join("");o.push(new hl(new Qe(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{let u=new B(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=r.getValueInRange(u).split("").reverse().join("");o.push(new Qv(u,h,new Qe(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},Wd=class extends de{run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=t.getOption(128),s=[];for(let a of n)if(a.isEmpty()){let l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;let d=new B(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),u=r.getValueInRange(d);s.push(ii.replace(d,this._modifyText(u,o)))}else{let l=r.getValueInRange(a);s.push(ii.replace(a,this._modifyText(l,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}},a7=class extends Wd{constructor(){super({id:"editor.action.transformToUppercase",label:b("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:F.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}},l7=class extends Wd{constructor(){super({id:"editor.action.transformToLowercase",label:b("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:F.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}},mc=class{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return this.get()!==null}},b1=class i extends Wd{constructor(){super({id:"editor.action.transformToTitlecase",label:b("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:F.writable})}_modifyText(e,t){let n=i.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,r=>r.toLocaleUpperCase()):e}};b1.titleBoundary=new mc("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");Ch=class i extends Wd{constructor(){super({id:"editor.action.transformToSnakecase",label:b("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:F.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get();return!n||!r?e:e.replace(n,"$1_$2").replace(r,"$1_$2$3").toLocaleLowerCase()}};Ch.caseBoundary=new mc("(\\p{Ll})(\\p{Lu})","gmu");Ch.singleLetters=new mc("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");v1=class i extends Wd{constructor(){super({id:"editor.action.transformToCamelcase",label:b("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:F.writable})}_modifyText(e,t){let n=i.wordBoundary.get();if(!n)return e;let r=e.split(n);return r.shift()+r.map(s=>s.substring(0,1).toLocaleUpperCase()+s.substring(1)).join("")}};v1.wordBoundary=new mc("[_\\s-]","gm");Sh=class i extends Wd{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:b("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:F.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get(),o=i.underscoreBoundary.get();return!n||!r||!o?e:e.replace(o,"$1-$3").replace(n,"$1-$2").replace(r,"$1-$2").toLocaleLowerCase()}};Sh.caseBoundary=new mc("(\\p{Ll})(\\p{Lu})","gmu");Sh.singleLetters=new mc("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");Sh.underscoreBoundary=new mc("(\\S)(_)(\\S)","gm");ee(V8);ee(q8);ee(K8);ee($8);ee(G8);ee(Y8);ee(X8);ee(Q8);ee(yS);ee(Z8);ee(J8);ee(e7);ee(t7);ee(i7);ee(n7);ee(r7);ee(o7);ee(s7);ee(a7);ee(l7);Ch.caseBoundary.isSupported()&&Ch.singleLetters.isSupported()&&ee(Ch);v1.wordBoundary.isSupported()&&ee(v1);b1.titleBoundary.isSupported()&&ee(b1);Sh.isSupported()&&ee(Sh)});var hY=N(()=>{});var fY=N(()=>{hY()});function mY(i,e,t,n){let r=i.ordered(e);return u_(r.map(o=>()=>d7(this,void 0,void 0,function*(){try{return yield o.provideLinkedEditingRanges(e,t,n)}catch(s){Xt(s);return}})),o=>!!o&&Ki(o==null?void 0:o.ranges))}var $be,xS,d7,CS,pY,Gbe,Vd,u7,Ybe,Ydt,f7=N(()=>{mi();jt();ki();da();qt();ei();ke();Ni();Ln();lt();Ir();di();et();ti();jn();Un();He();wt();Pt();ir();Ms();ll();fY();$be=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xS=function(i,e){return function(t,n){e(t,n,i)}},d7=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},pY=new ht("LinkedEditingInputVisible",!1),Gbe="linked-editing-decoration",Vd=CS=class extends ce{static get(e){return e.getContribution(CS.ID)}constructor(e,t,n,r,o){super(),this.languageConfigurationService=r,this._syncRangesToken=0,this._localToDispose=this._register(new le),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=pY.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new le),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(s=>{(s.hasChanged(68)||s.hasChanged(91))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){let t=this._editor.getModel(),n=t!==null&&(this._editor.getOption(68)||this._editor.getOption(91))&&this._providers.has(t);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||t===null))return;this._localToDispose.add(ci.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let r=new Mo(this._debounceInformation.get(t)),o=()=>{var l;this._rangeUpdateTriggerPromise=r.trigger(()=>this.updateRanges(),(l=this._debounceDuration)!==null&&l!==void 0?l:this._debounceInformation.get(t))},s=new Mo(0),a=l=>{this._rangeSyncTriggerPromise=s.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{o()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){let c=this._currentDecorations.getRange(0);if(c&&l.changes.every(d=>c.intersectRanges(d.range))){a(this._syncRangesToken);return}}o()})),this._localToDispose.add({dispose:()=>{r.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;let t=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();let r=t.getValueInRange(n);if(this._currentWordPattern){let s=r.match(this._currentWordPattern);if((s?s[0].length:0)!==r.length)return this.clearRanges()}let o=[];for(let s=1,a=this._currentDecorations.length;s<a;s++){let l=this._currentDecorations.getRange(s);if(l)if(l.startLineNumber!==l.endLineNumber)o.push({range:l,text:r});else{let c=t.getValueInRange(l),d=r,u=l.startColumn,h=l.endColumn,f=zc(c,d);u+=f,c=c.substr(f),d=d.substr(f);let m=gP(c,d);h-=m,c=c.substr(0,c.length-m),d=d.substr(0,d.length-m),(u!==h||d.length!==0)&&o.push({range:new B(l.startLineNumber,u,l.endLineNumber,h),text:d})}}if(o.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;let s=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(s)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(e=!1){return d7(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}let t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}let n=this._editor.getModel(),r=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===r){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){let s=this._currentDecorations.getRange(0);if(s&&s.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=r;let o=Jt(s=>d7(this,void 0,void 0,function*(){try{let a=new gn(!1),l=yield mY(this._providers,n,t,s);if(this._debounceInformation.update(n,a.elapsed()),o!==this._currentRequest||(this._currentRequest=null,r!==n.getVersionId()))return;let c=[];l!=null&&l.ranges&&(c=l.ranges),this._currentWordPattern=(l==null?void 0:l.wordPattern)||this._languageWordPattern;let d=!1;for(let h=0,f=c.length;h<f;h++)if(B.containsPosition(c[h],t)){if(d=!0,h!==0){let m=c[h];c.splice(h,1),c.unshift(m)}break}if(!d){this.clearRanges();return}let u=c.map(h=>({range:h,options:CS.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(a){Xo(a)||ft(a),(this._currentRequest===o||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=o,o})}};Vd.ID="editor.contrib.linkedEditing";Vd.DECORATION=mt.register({description:"linked-editing",stickiness:0,className:Gbe});Vd=CS=$be([xS(1,it),xS(2,Se),xS(3,Ot),xS(4,cn)],Vd);u7=class extends de{constructor(){super({id:"editor.action.linkedEditing",label:b("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:fe.and(F.writable,F.hasRenameProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let n=e.get(ai),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return yt.isUri(r)&&Ie.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ft):super.runCommand(e,t)}run(e,t){let n=Vd.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}},Ybe=Fi.bindToContribution(Vd.get);We(new Ybe({id:"cancelLinkedEditingInput",precondition:pY,handler:i=>i.clearRanges(),kbOpts:{kbExpr:F.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));Ydt=je("editor.linkedEditingBackground",{dark:vt.fromHex("#f00").transparent(.3),light:vt.fromHex("#f00").transparent(.3),hcDark:vt.fromHex("#f00").transparent(.3),hcLight:vt.white},b("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Gr("_executeLinkedEditingProvider",(i,e,t)=>{let{linkedEditingRangeProvider:n}=i.get(Se);return mY(n,e,t,st.None)});Ue(Vd.ID,Vd,1);ee(u7)});var gY=N(()=>{});var bY=N(()=>{gY()});function m7(i,e,t){let n=[],r=i.ordered(e).reverse().map((o,s)=>Promise.resolve(o.provideLinks(e,t)).then(a=>{a&&(n[s]=[a,o])},Xt));return Promise.all(r).then(()=>{let o=new SS(hr(n));return t.isCancellationRequested?(o.dispose(),new SS([])):o})}var vY,p7,SS,_Y=N(()=>{mi();ki();qt();ke();Bn();Ln();et();Qo();Vi();Pt();vY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},p7=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return vY(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}},SS=class i{constructor(e){this._disposables=new le;let t=[];for(let[n,r]of e){let o=n.links.map(s=>new p7(s,r));t=i._union(t,o),Fv(n)&&this._disposables.add(n)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let n=[],r,o,s,a;for(r=0,s=0,o=e.length,a=t.length;r<o&&s<a;){let l=e[r],c=t[s];if(B.areIntersectingOrTouching(l.range,c.range)){r++;continue}B.compareRangesUsingStarts(l.range,c.range)<0?(n.push(l),r++):(n.push(c),s++)}for(;r<o;r++)n.push(e[r]);for(;s<a;s++)n.push(t[s]);return n}};Dt.registerCommand("_executeLinkProvider",(i,...e)=>vY(void 0,void 0,void 0,function*(){let[t,n]=e;Bt(t instanceof yt),typeof n!="number"&&(n=0);let{linkProvider:r}=i.get(Se),o=i.get(Di).getModel(t);if(!o)return[];let s=yield m7(r,o,st.None);if(!s)return[];for(let l=0;l<Math.min(n,s.links.length);l++)yield s.links[l].resolve(st.None);let a=s.links.slice(0);return s.dispose(),a}))});function Zbe(i,e){let t=i.url&&/^command:/i.test(i.url.toString()),n=i.tooltip?i.tooltip:t?b("links.navigate.executeCmd","Execute command"):b("links.navigate.follow","Follow link"),r=e?Er?b("links.navigate.kb.meta.mac","cmd + click"):b("links.navigate.kb.meta","ctrl + click"):Er?b("links.navigate.kb.alt.mac","option + click"):b("links.navigate.kb.alt","alt + click");if(i.url){let o="";if(/^command:/i.test(i.url.toString())){let a=i.url.toString().match(/^command:([^?#]+)/);if(a){let l=a[1];o=b("tooltip.explanation","Execute command {0}",l)}}return new $i("",!0).appendLink(i.url.toString(!0).replace(/ /g,"%20"),n,o).appendMarkdown(` (${r})`)}else return new $i().appendText(`${n} (${r})`)}var Xbe,kS,Qbe,g7,$p,yY,ES,b7,v7=N(()=>{jt();ki();qt();Ts();ke();Dm();Tr();Do();ll();Ln();bY();lt();jn();Ms();Pt();i1();_Y();He();No();ns();Xbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},kS=function(i,e){return function(t,n){e(t,n,i)}},Qbe=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},$p=g7=class extends ce{static get(e){return e.getContribution(g7.ID)}constructor(e,t,n,r,o){super(),this.editor=e,this.openerService=t,this.notificationService=n,this.languageFeaturesService=r,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new ui(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let s=this._register(new Za(e));this._register(s.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(s.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(s.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(69)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}computeLinksNow(){return Qbe(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(69))return;let e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Jt(t=>m7(this.providers,e,t));try{let t=new gn(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){ft(t)}finally{this.computePromise=null}}})}updateDecorations(e){let t=this.editor.getOption(76)==="altKey",n=[],r=Object.keys(this.currentOccurrences);for(let s of r){let a=this.currentOccurrences[s];n.push(a.decorationId)}let o=[];if(e)for(let s of e)o.push(ES.decoration(s,t));this.editor.changeDecorations(s=>{let a=s.deltaDecorations(n,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l<c;l++){let d=new ES(e[l],a[l]);this.currentOccurrences[d.decorationId]=d}})}_onEditorMouseMove(e,t){let n=this.editor.getOption(76)==="altKey";if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();let r=this.getLinkOccurrence(e.target.position);r&&this.editor.changeDecorations(o=>{r.activate(o,n),this.activeLinkDecorationId=r.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e=this.editor.getOption(76)==="altKey";if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;let t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;let{link:r}=e;r.resolve(st.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){let s=this.editor.getModel().uri;if(s.scheme===To.file&&o.startsWith(`${To.file}:`)){let a=yt.parse(o);if(a.scheme===To.file){let l=XP(a),c=null;l.startsWith("/./")?c=`.${l.substr(1)}`:l.startsWith("//./")&&(c=`.${l.substr(2)}`),c&&(o=JP(s,c))}}}return this.openerService.open(o,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{let s=o instanceof Error?o.message:o;s==="invalid"?this.notificationService.warn(b("invalid.url","Failed to open this link because it is not well-formed: {0}",r.url.toString())):s==="missing"?this.notificationService.warn(b("missing.url","Failed to open this link because its target is missing.")):ft(o)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;let t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(let n of t){let r=this.currentOccurrences[n.id];if(r)return r}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};$p.ID="editor.linkDetector";$p=g7=Xbe([kS(1,tn),kS(2,Ri),kS(3,Se),kS(4,cn)],$p);yY={general:mt.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:mt.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},ES=class i{static decoration(e,t){return{range:e.range,options:i._getOptions(e,t,!1)}}static _getOptions(e,t,n){let r=Object.assign({},n?yY.active:yY.general);return r.hoverMessage=Zbe(e,t),r}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!1))}};b7=class extends de{constructor(){super({id:"editor.action.openLink",label:b("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let n=$p.get(t);if(!n||!t.hasModel())return;let r=t.getSelections();for(let o of r){let s=n.getLinkOccurrence(o.getEndPosition());s&&n.openLinkOccurrence(s,!1)}}};Ue($p.ID,$p,1);ee(b7)});var _1,_7=N(()=>{ke();lt();_1=class extends ce{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{let n=this._editor.getOption(115);n>=0&&t.target.type===6&&t.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};_1.ID="editor.contrib.longLinesHelper";Ue(_1.ID,_1,2)});var wY=N(()=>{});var xY=N(()=>{wY()});function CY(i){return i===Qm.Write?i1e:i===Qm.Text?n1e:s1e}function SY(i){return i?o1e:r1e}var TS,IS,Jbe,e1e,t1e,i1e,n1e,r1e,o1e,s1e,y7=N(()=>{xY();qc();jn();fr();He();ir();nr();TS=je("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},b("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);je("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},b("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);je("editor.wordHighlightTextBackground",{light:TS,dark:TS,hcDark:TS,hcLight:TS},b("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);IS=je("editor.wordHighlightBorder",{light:null,dark:null,hcDark:ha,hcLight:ha},b("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));je("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:ha,hcLight:ha},b("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));je("editor.wordHighlightTextBorder",{light:IS,dark:IS,hcDark:IS,hcLight:IS},b("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));Jbe=je("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},b("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),e1e=je("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},b("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),t1e=je("editorOverviewRuler.wordHighlightTextForeground",{dark:gf,light:gf,hcDark:gf,hcLight:gf},b("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),i1e=mt.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Ei(e1e),position:Yr.Center},minimap:{color:Ei(Gm),position:ca.Inline}}),n1e=mt.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Ei(t1e),position:Yr.Center},minimap:{color:Ei(Gm),position:ca.Inline}}),r1e=mt.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Ei(gf),position:Yr.Center},minimap:{color:Ei(Gm),position:ca.Inline}}),o1e=mt.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),s1e=mt.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Ei(Jbe),position:Yr.Center},minimap:{color:Ei(Gm),position:ca.Inline}});bf((i,e)=>{let t=i.getColor(xO);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)})});function Kd(i,e){let t=e.filter(n=>!i.find(r=>r.equals(n)));if(t.length>=1){let n=t.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),r=t.length===1?b("cursorAdded","Cursor added: {0}",n):b("cursorsAdded","Cursors added: {0}",n);uu(r)}}function EY(i,e,t){let n=kY(i,e[0],!t);for(let r=1,o=e.length;r<o;r++){let s=e[r];if(s.isEmpty())return!1;let a=kY(i,s,!t);if(n!==a)return!1}return!0}function kY(i,e,t){let n=i.getValueInRange(e);return t?n.toLowerCase():n}var a1e,l1e,w7,x7,C7,S7,k7,E7,Gp,LS,kh,qd,T7,I7,L7,A7,D7,M7,N7,y1,R7,P7,O7=N(()=>{Lo();jt();cl();ke();lt();IP();et();An();ti();_2();He();Ji();wt();Pt();y7();Ut();a1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},l1e=function(i,e){return function(t,n){e(t,n,i)}};x7=class extends de{constructor(){super({id:"editor.action.insertCursorAbove",label:b("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,Fm.addCursorUp(o,s,r)),o.revealTopMostCursor(n.source),Kd(s,o.getCursorStates())}},C7=class extends de{constructor(){super({id:"editor.action.insertCursorBelow",label:b("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,Fm.addCursorDown(o,s,r)),o.revealBottomMostCursor(n.source),Kd(s,o.getCursorStates())}},S7=class extends de{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:b("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let r=e.startLineNumber;r<e.endLineNumber;r++){let o=t.getLineMaxColumn(r);n.push(new Qe(r,o,r,o))}e.endColumn>1&&n.push(new Qe(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),a=[];r.forEach(l=>this.getCursorsForSelection(l,n,a)),a.length>0&&t.setSelections(a),Kd(s,o.getCursorStates())}},k7=class extends de{constructor(){super({id:"editor.action.addCursorsToBottom",label:b("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=t.getModel().getLineCount(),o=[];for(let l=n[0].startLineNumber;l<=r;l++)o.push(new Qe(l,n[0].startColumn,l,n[0].endColumn));let s=t._getViewModel(),a=s.getCursorStates();o.length>0&&t.setSelections(o),Kd(a,s.getCursorStates())}},E7=class extends de{constructor(){super({id:"editor.action.addCursorsToTop",label:b("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=[];for(let a=n[0].startLineNumber;a>=1;a--)r.push(new Qe(a,n[0].startColumn,a,n[0].endColumn));let o=t._getViewModel(),s=o.getCursorStates();r.length>0&&t.setSelections(r),Kd(s,o.getCursorStates())}},Gp=class{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}},LS=class i{static create(e,t){if(!e.hasModel())return null;let n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new i(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let r=!1,o,s,a=e.getSelections();a.length===1&&a[0].isEmpty()?(r=!0,o=!0,s=!0):(o=n.wholeWord,s=n.matchCase);let l=e.getSelection(),c,d=null;if(l.isEmpty()){let u=e.getConfiguredWordAtPosition(l.getStartPosition());if(!u)return null;c=u.word,d=new Qe(l.startLineNumber,u.startColumn,l.startLineNumber,u.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,`
`);return new i(e,t,r,c,o,s,d)}constructor(e,t,n,r,o,s,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=r,this.wholeWord=o,this.matchCase=s,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new Gp(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new Gp(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return n?new Qe(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new Gp(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new Gp(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return n?new Qe(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();let t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1,1073741824)}},kh=class i extends ce{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._sessionDispose=this._register(new le),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=LS.create(this._editor,e);if(!t)return;this._session=t;let n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(r=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(r=>{(r.matchCase||r.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){let e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;let n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new Qe(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){let t=this._editor.getSelections();if(t.length>1){let r=e.getState().matchCase;if(!EY(this._editor.getModel(),t,r)){let s=this._editor.getModel(),a=[];for(let l=0,c=t.length;l<c;l++)a[l]=this._expandEmptyToWord(s,t[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null,n=e.getState();if(n.isRevealed&&n.searchString.length>0&&n.isRegex){let r=this._editor.getModel();n.searchScope?t=r.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(128):null,!1,1073741824):t=r.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(128):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(n.searchScope)}if(t.length>0){let r=this._editor.getSelection();for(let o=0,s=t.length;o<s;o++){let a=t[o];if(a.range.intersectRanges(r)){t[o]=t[0],t[0]=a;break}}this._setSelections(t.map(o=>new Qe(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}};kh.ID="editor.contrib.multiCursorController";qd=class extends de{run(e,t){let n=kh.get(t);if(!n)return;let r=t._getViewModel();if(r){let o=r.getCursorStates(),s=lr.get(t);if(s)this._run(n,s);else{let a=e.get(Ke).createInstance(lr,t);this._run(n,a),a.dispose()}Kd(o,r.getCursorStates())}}},T7=class extends qd{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:b("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:2082,weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}},I7=class extends qd{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:b("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}},L7=class extends qd{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:b("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:gi(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}},A7=class extends qd{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:b("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}},D7=class extends qd{constructor(){super({id:"editor.action.selectHighlights",label:b("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:3114,weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}},M7=class extends qd{constructor(){super({id:"editor.action.changeAll",label:b("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:fe.and(F.writable,F.editorTextFocus),kbOpts:{kbExpr:F.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}},N7=class{constructor(e,t,n,r,o){this._model=e,this._searchText=t,this._matchCase=n,this._wordSeparators=r,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(B.compareRangesUsingStarts)),this._cachedFindMatches}},y1=w7=class extends ce{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(106),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new ui(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(r=>{this._isEnabled=e.getOption(106)})),this._register(e.onDidChangeCursorSelection(r=>{this._isEnabled&&(r.selection.isEmpty()?r.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(r=>{this._setState(null)})),this._register(e.onDidChangeModelContent(r=>{this._isEnabled&&this.updateSoon.schedule()}));let n=lr.get(e);n&&this._register(n.getState().onFindReplaceStateChange(r=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(w7._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,n){if(!t||!n.hasModel())return null;let r=n.getSelection();if(r.startLineNumber!==r.endLineNumber)return null;let o=kh.get(n);if(!o)return null;let s=lr.get(n);if(!s)return null;let a=o.getSession(s);if(!a){let d=n.getSelections();if(d.length>1){let h=s.getState().matchCase;if(!EY(n.getModel(),d,h))return null}a=LS.create(n,s)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;let l=s.getState(),c=l.matchCase;if(l.isRevealed){let d=l.searchString;c||(d=d.toLowerCase());let u=a.searchText;if(c||(u=u.toLowerCase()),d===u&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new N7(n.getModel(),a.searchText,a.matchCase,a.wholeWord?n.getOption(128):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;let t=this.editor.getModel();if(t.isTooLargeForTokenization())return;let n=this.state.findMatches(),r=this.editor.getSelections();r.sort(B.compareRangesUsingStarts);let o=[];for(let l=0,c=0,d=n.length,u=r.length;l<d;){let h=n[l];if(c>=u)o.push(h),l++;else{let f=B.compareRangesUsingStarts(h,r[c]);f<0?((r[c].isEmpty()||!B.areIntersecting(h,r[c]))&&o.push(h),l++):(f>0||l++,c++)}}let s=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(79),a=o.map(l=>({range:l,options:SY(s)}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};y1.ID="editor.contrib.selectionHighlighter";y1=w7=a1e([l1e(1,Se)],y1);R7=class extends de{constructor(){super({id:"editor.action.focusNextCursor",label:b("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:b("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.shift();s&&(o.push(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),Kd(o,r.getCursorStates()))}},P7=class extends de{constructor(){super({id:"editor.action.focusPreviousCursor",label:b("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:b("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.pop();s&&(o.unshift(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),Kd(o,r.getCursorStates()))}};Ue(kh.ID,kh,4);Ue(y1.ID,y1,1);ee(x7);ee(C7);ee(S7);ee(T7);ee(I7);ee(L7);ee(A7);ee(D7);ee(M7);ee(k7);ee(E7);ee(R7);ee(P7)});function F7(i,e,t,n,r){return TY(this,void 0,void 0,function*(){let o=i.ordered(e);for(let s of o)try{let a=yield s.provideSignatureHelp(e,t,r,n);if(a)return a}catch(a){Xt(a)}})}var TY,gc,AS=N(()=>{ki();qt();Bn();Ln();di();fr();Pt();ra();Vi();wt();TY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},gc={Visible:new ht("parameterHintsVisible",!1),MultipleSignatures:new ht("parameterHintsMultipleSignatures",!1)};Dt.registerCommand("_executeSignatureHelpProvider",(i,...e)=>TY(void 0,void 0,void 0,function*(){let[t,n,r]=e;Bt(yt.isUri(t)),Bt(Ie.isIPosition(n)),Bt(typeof r=="string"||!r);let o=i.get(Se),s=yield i.get(Sn).createModelReference(t);try{let a=yield F7(o.signatureHelpProvider,s.object.textEditorModel,Ie.lift(n),{triggerKind:Ls.Invoke,isRetrigger:!1,triggerCharacter:r},st.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}}))});function d1e(i,e){switch(e.triggerKind){case Ls.Invoke:return e;case Ls.ContentChange:return i;case Ls.TriggerCharacter:default:return e}}var c1e,$d,w1,IY=N(()=>{jt();qt();ei();ke();q3();fr();AS();c1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i.Default={type:0};class e{constructor(r,o){this.request=r,this.previouslyActiveHints=o,this.type=2}}i.Pending=e;class t{constructor(r){this.hints=r,this.type=1}}i.Active=t})($d||($d={}));w1=class i extends ce{constructor(e,t,n=i.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new Je),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=$d.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Wi),this.triggerChars=new fu,this.retriggerChars=new fu,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Mo(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(r=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(r=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(r=>this.onCursorChange(r))),this._register(this.editor.onDidChangeModelContent(r=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(r=>this.onDidType(r))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=$d.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let n=this.editor.getModel();if(!n||!this.providers.has(n))return;let r=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(r),t).catch(ft)}next(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,r=this.editor.getOption(84).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?0:t+1)}previous(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,r=this.editor.getOption(84).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new $d.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return c1e(this,void 0,void 0,function*(){let t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;let r=this._pendingTriggers.reduce(d1e);this._pendingTriggers=[];let o={triggerKind:r.triggerKind,triggerCharacter:r.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;let s=this.editor.getModel(),a=this.editor.getPosition();this.state=new $d.Pending(Jt(l=>F7(this.providers,s,a,o,l)),n);try{let l=yield this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new $d.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=$d.Default),ft(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();let e=this.editor.getModel();if(e)for(let t of this.providers.ordered(e)){for(let n of t.signatureHelpTriggerCharacters||[])if(n.length){let r=n.charCodeAt(0);this.triggerChars.add(r),this.retriggerChars.add(r)}for(let n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:Ls.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Ls.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Ls.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(84).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};w1.DEFAULT_DELAY=120});var LY=N(()=>{});var AY=N(()=>{LY()});var u1e,z7,B7,wo,h1e,f1e,x1,DY=N(()=>{Ht();Lo();N_();Jn();ei();ke();Ni();Bn();AY();ts();kd();AS();He();wt();ns();ir();kl();Lr();u1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},z7=function(i,e){return function(t,n){e(t,n,i)}},wo=Le,h1e=Pi("parameter-hints-next",pt.chevronDown,b("parameterHintsNextIcon","Icon for show next parameter hint.")),f1e=Pi("parameter-hints-previous",pt.chevronUp,b("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),x1=B7=class extends ce{constructor(e,t,n,r,o){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new le),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new io({editor:e},o,r)),this.keyVisible=gc.Visible.bindTo(n),this.keyMultipleSignatures=gc.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){let e=wo(".editor-widget.parameter-hints-widget"),t=Te(e,wo(".phwrapper"));t.tabIndex=-1;let n=Te(t,wo(".controls")),r=Te(n,wo(".button"+_t.asCSSSelector(f1e))),o=Te(n,wo(".overloads")),s=Te(n,wo(".button"+_t.asCSSSelector(h1e)));this._register(At(r,"click",h=>{cu.stop(h),this.previous()})),this._register(At(s,"click",h=>{cu.stop(h),this.next()}));let a=wo(".body"),l=new Cf(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());let c=Te(a,wo(".signature")),d=Te(a,wo(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:o,docs:d,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));let u=()=>{if(!this.domNodes)return;let h=this.editor.getOption(49);this.domNodes.element.style.fontSize=`${h.fontSize}px`,this.domNodes.element.style.lineHeight=`${h.lineHeight/h.fontSize}`};u(),this._register(ci.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(h=>h.hasChanged(49)).on(u,null)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;let n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let r=e.signatures[e.activeSignature];if(!r)return;let o=Te(this.domNodes.signature,wo(".code")),s=this.editor.getOption(49);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;let a=r.parameters.length>0,l=(t=r.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(o,r,l);else{let u=Te(o,wo("span"));u.textContent=r.label}let c=r.parameters[l];if(c!=null&&c.documentation){let u=wo("span.documentation");if(typeof c.documentation=="string")u.textContent=c.documentation;else{let h=this.renderMarkdownDocs(c.documentation);u.appendChild(h.element)}Te(this.domNodes.docs,wo("p",{},u))}if(r.documentation!==void 0)if(typeof r.documentation=="string")Te(this.domNodes.docs,wo("p",{},r.documentation));else{let u=this.renderMarkdownDocs(r.documentation);Te(this.domNodes.docs,u.element)}let d=this.hasDocs(r,c);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,c){let u="",h=r.parameters[l];Array.isArray(h.label)?u=r.label.substring(h.label[0],h.label[1]):u=h.label,h.documentation&&(u+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),r.documentation&&(u+=typeof r.documentation=="string"?`, ${r.documentation}`:`, ${r.documentation.value}`),this.announcedLabel!==u&&(ln(b("hint","{0}, hint",u)),this.announcedLabel=u)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){let t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var n;(n=this.domNodes)===null||n===void 0||n.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Nc(t.documentation).length>0||t&&typeof t.documentation=="object"&&Nc(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Nc(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Nc(e.documentation.value).length>0)}renderParameters(e,t,n){let[r,o]=this.getParameterLabelOffsets(t,n),s=document.createElement("span");s.textContent=t.label.substring(0,r);let a=document.createElement("span");a.textContent=t.label.substring(r,o),a.className="parameter active";let l=document.createElement("span");l.textContent=t.label.substring(o),Te(e,s,a,l)}getParameterLabelOffsets(e,t){let n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){let r=new RegExp(`(\\W|^)${dl(n.label)}(?=\\W|$)`,"g");r.test(e.label);let o=r.lastIndex-n.label.length;return o>=0?[o,r.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return B7.ID}updateMaxHeight(){if(!this.domNodes)return;let t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;let n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}};x1.ID="editor.widget.parameterHintsWidget";x1=B7=u1e([z7(2,it),z7(3,tn),z7(4,en)],x1);je("editorHoverWidget.highlightForeground",{dark:pa,light:pa,hcDark:pa,hcLight:pa},b("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."))});var p1e,MY,H7,Eh,U7,j7,W7,V7=N(()=>{O3();ke();lt();ti();fr();Pt();IY();AS();He();wt();Ut();DY();p1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},MY=function(i,e){return function(t,n){e(t,n,i)}},Eh=H7=class extends ce{static get(e){return e.getContribution(H7.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new w1(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(r=>{var o;r?(this.widget.value.show(),this.widget.value.render(r)):(o=this.widget.rawValue)===null||o===void 0||o.hide()})),this.widget=new nf(()=>this._register(t.createInstance(x1,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)===null||e===void 0||e.previous()}next(){var e;(e=this.widget.rawValue)===null||e===void 0||e.next()}trigger(e){this.model.trigger(e,0)}};Eh.ID="editor.controller.parameterHints";Eh=H7=p1e([MY(1,Ke),MY(2,Se)],Eh);U7=class extends de{constructor(){super({id:"editor.action.triggerParameterHints",label:b("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:F.hasSignatureHelpProvider,kbOpts:{kbExpr:F.editorTextFocus,primary:3082,weight:100}})}run(e,t){let n=Eh.get(t);n==null||n.trigger({triggerKind:Ls.Invoke})}};Ue(Eh.ID,Eh,2);ee(U7);j7=100+75,W7=Fi.bindToContribution(Eh.get);We(new W7({id:"closeParameterHints",precondition:gc.Visible,handler:i=>i.cancel(),kbOpts:{weight:j7,kbExpr:F.focus,primary:9,secondary:[1033]}}));We(new W7({id:"showPrevParameterHint",precondition:fe.and(gc.Visible,gc.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:j7,kbExpr:F.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));We(new W7({id:"showNextParameterHint",precondition:fe.and(gc.Visible,gc.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:j7,kbExpr:F.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))});var NY=N(()=>{});var RY=N(()=>{NY()});var m1e,q7,C1,DS,PY=N(()=>{ke();RY();di();He();wt();Wn();ir();nr();m1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},q7=function(i,e){return function(t,n){e(t,n,i)}},C1=new ht("renameInputVisible",!1,b("renameInputVisible","Whether the rename input widget is visible")),DS=class{constructor(e,t,n,r,o){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=r,this._disposables=new le,this.allowEditorOverflow=!0,this._visibleContextKey=C1.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(49)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",b("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,n,r,o;if(!this._input||!this._domNode)return;let s=e.getColor(p_),a=e.getColor(m_);this._domNode.style.backgroundColor=String((t=e.getColor(vl))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=s?` 0 0 8px 2px ${s}`:"",this._domNode.style.border=a?`1px solid ${a}`:"",this._domNode.style.color=String((n=e.getColor(fO))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((r=e.getColor(hO))!==null&&r!==void 0?r:"");let l=e.getColor(pO);this._input.style.borderWidth=l?"1px":"0px",this._input.style.borderStyle=l?"solid":"none",this._input.style.borderColor=(o=l==null?void 0:l.toString())!==null&&o!==void 0?o:"none"}_updateFont(){if(!this._input||!this._label)return;let e=this._editor.getOption(49);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;let[n,r]=this._acceptKeybindings;return this._label.innerText=b({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(e=this._keybindingService.lookupKeybinding(n))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(r))===null||t===void 0?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,n,r,o,s){this._domNode.classList.toggle("preview",o),this._position=new Ie(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",r.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);let a=new le;return new Promise(l=>{this._currentCancelInput=c=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(c),!0),this._currentAcceptInput=c=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:o&&c})},a.add(s.onCancellationRequested(()=>this.cancelInput(!0))),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!document.hasFocus()))),this._show()}).finally(()=>{a.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};DS=m1e([q7(2,vn),q7(3,Kt),q7(4,it)],DS)});function b1e(i,e,t,n){return Ih(this,void 0,void 0,function*(){let r=new S1(e,t,i),o=yield r.resolveRenameLocation(st.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:r.provideRenameEdits(n,st.None)})}var g1e,Th,Ih,K7,S1,Lh,$7,G7,Y7=N(()=>{Lo();jt();ki();qt();ke();Bn();Ln();yu();lt();tg();Ir();di();et();ti();nre();M0();He();Y3();wt();Ut();Yv();No();$c();ul();PY();Pt();g1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Th=function(i,e){return function(t,n){e(t,n,i)}},Ih=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},S1=class{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Ih(this,void 0,void 0,function*(){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){let r=this._providers[this._providerRenameIdx];if(!r.resolveRenameLocation)break;let o=yield r.resolveRenameLocation(this.model,this.position,e);if(o){if(o.rejectReason){t.push(o.rejectReason);continue}return o}}let n=this.model.getWordAtPosition(this.position);return n?{range:new B(this.position.lineNumber,n.startColumn,this.position.lineNumber,n.endColumn),text:n.word,rejectReason:t.length>0?t.join(`
`):void 0}:{range:B.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
`):void 0}})}provideRenameEdits(e,t){return Ih(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,n,r){return Ih(this,void 0,void 0,function*(){let o=this._providers[t];if(!o)return{edits:[],rejectReason:n.join(`
`)};let s=yield o.provideRenameEdits(this.model,this.position,e,r);if(s){if(s.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(s.rejectReason),r)}else return this._provideRenameEdits(e,t+1,n.concat(b("no result","No result.")),r);return s})}};Lh=K7=class{static get(e){return e.getContribution(K7.ID)}constructor(e,t,n,r,o,s,a,l){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=r,this._progressService=o,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new le,this._cts=new zi,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(DS,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return Ih(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new zi,!this.editor.hasModel())return;let n=this.editor.getPosition(),r=new S1(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!r.hasProvider())return;let o=new ba(this.editor,5,void 0,this._cts.token),s;try{let m=r.resolveRenameLocation(o.token);this._progressService.showWhile(m,250),s=yield m}catch(m){(e=Kn.get(this.editor))===null||e===void 0||e.showMessage(m||b("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),n);return}finally{o.dispose()}if(!s)return;if(s.rejectReason){(t=Kn.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,n);return}if(o.token.isCancellationRequested)return;let a=new ba(this.editor,5,s.range,this._cts.token),l=this.editor.getSelection(),c=0,d=s.text.length;!B.isEmpty(l)&&!B.spansMultipleLines(l)&&B.containsRange(s.range,l)&&(c=Math.max(0,l.startColumn-s.range.startColumn),d=Math.min(s.range.endColumn,l.endColumn)-s.range.startColumn);let u=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=yield this._renameInputField.getInput(s.range,s.text,c,d,u,a.token);if(typeof h=="boolean"){h&&this.editor.focus(),a.dispose();return}this.editor.focus();let f=Vc(r.provideRenameEdits(h.newName,a.token),a.token).then(m=>Ih(this,void 0,void 0,function*(){if(!(!m||!this.editor.hasModel())){if(m.rejectReason){this._notificationService.info(m.rejectReason);return}this.editor.setSelection(B.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m,{editor:this.editor,showPreview:h.wantsPreview,label:b("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,h.newName),code:"undoredo.rename",quotableLabel:b("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&ln(b("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,h.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(b("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),m=>{this._notificationService.error(b("rename.failed","Rename failed to compute edits")),this._logService.error(m)}).finally(()=>{a.dispose()});return this._progressService.showWhile(f,250),f})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};Lh.ID="editor.contrib.renameController";Lh=K7=g1e([Th(1,Ke),Th(2,Ri),Th(3,Kc),Th(4,_l),Th(5,Hc),Th(6,hz),Th(7,Se)],Lh);$7=class extends de{constructor(){super({id:"editor.action.rename",label:b("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:fe.and(F.writable,F.hasRenameProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let n=e.get(ai),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return yt.isUri(r)&&Ie.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ft):super.runCommand(e,t)}run(e,t){let n=Lh.get(t);return n?n.run():Promise.resolve()}};Ue(Lh.ID,Lh,4);ee($7);G7=Fi.bindToContribution(Lh.get);We(new G7({id:"acceptRenameInput",precondition:C1,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:fe.and(F.focus,fe.not("isComposing")),primary:3}}));We(new G7({id:"acceptRenameInputWithPreview",precondition:fe.and(C1,fe.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:fe.and(F.focus,fe.not("isComposing")),primary:1024+3}}));We(new G7({id:"cancelRenameInput",precondition:C1,handler:i=>i.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:F.focus,primary:9,secondary:[1033]}}));Gr("_executeDocumentRenameProvider",function(i,e,t,...n){let[r]=n;Bt(typeof r=="string");let{renameProvider:o}=i.get(Se);return b1e(o,e,t,r)});Gr("_executePrepareRename",function(i,e,t){return Ih(this,void 0,void 0,function*(){let{renameProvider:n}=i.get(Se),o=yield new S1(e,t,n).resolveRenameLocation(st.None);if(o!=null&&o.rejectReason)throw new Error(o.rejectReason);return o})});er.as(af.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:b("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})});function v1e(i){for(let e=0,t=i.length;e<t;e+=4){let n=i[e+0],r=i[e+1],o=i[e+2],s=i[e+3];i[e+0]=s,i[e+1]=o,i[e+2]=r,i[e+3]=n}}function _1e(i){let e=new Uint8Array(i.buffer,i.byteOffset,i.length*4);return Q9()||v1e(e),FP.wrap(e)}function X7(i){let e=new Uint32Array(y1e(i)),t=0;if(e[t++]=i.id,i.type==="full")e[t++]=1,e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length;else{e[t++]=2,e[t++]=i.deltas.length;for(let n of i.deltas)e[t++]=n.start,e[t++]=n.deleteCount,n.data?(e[t++]=n.data.length,e.set(n.data,t),t+=n.data.length):e[t++]=0}return _1e(e)}function y1e(i){let e=0;if(e+=1+1,i.type==="full")e+=1+i.data.length;else{e+=1,e+=(1+1+1)*i.deltas.length;for(let t of i.deltas)t.data&&(e+=t.data.length)}return e}var OY=N(()=>{une();Tr()});function k1(i){return i&&!!i.data}function J7(i){return i&&Array.isArray(i.edits)}function eD(i,e){return i.has(e)}function w1e(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function tD(i,e,t,n,r){return Gd(this,void 0,void 0,function*(){let o=w1e(i,e),s=yield Promise.all(o.map(a=>Gd(this,void 0,void 0,function*(){let l,c=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?n:null,r)}catch(d){c=d,l=null}return(!l||!k1(l)&&!J7(l))&&(l=null),new Q7(a,l,c)})));for(let a of s){if(a.error)throw a.error;if(a.tokens)return a}return s.length>0?s[0]:null})}function x1e(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}function FY(i,e){return i.has(e)}function zY(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function MS(i,e,t,n){return Gd(this,void 0,void 0,function*(){let r=zY(i,e),o=yield Promise.all(r.map(s=>Gd(this,void 0,void 0,function*(){let a;try{a=yield s.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){Xt(l),a=null}return(!a||!k1(a))&&(a=null),new Z7(s,a)})));for(let s of o)if(s.tokens)return s;return o.length>0?o[0]:null})}var Gd,Q7,Z7,iD=N(()=>{ki();qt();Ln();Qo();Vi();Bn();OY();et();Pt();Gd=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Q7=class{constructor(e,t,n){this.provider=e,this.tokens=t,this.error=n}};Z7=class{constructor(e,t){this.provider=e,this.tokens=t}};Dt.registerCommand("_provideDocumentSemanticTokensLegend",(i,...e)=>Gd(void 0,void 0,void 0,function*(){let[t]=e;Bt(t instanceof yt);let n=i.get(Di).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(Se),o=x1e(r,n);return o?o[0].getLegend():i.get(_i).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));Dt.registerCommand("_provideDocumentSemanticTokens",(i,...e)=>Gd(void 0,void 0,void 0,function*(){let[t]=e;Bt(t instanceof yt);let n=i.get(Di).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(Se);if(!eD(r,n))return i.get(_i).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());let o=yield tD(r,n,null,null,st.None);if(!o)return;let{provider:s,tokens:a}=o;if(!a||!k1(a))return;let l=X7({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l}));Dt.registerCommand("_provideDocumentRangeSemanticTokensLegend",(i,...e)=>Gd(void 0,void 0,void 0,function*(){let[t,n]=e;Bt(t instanceof yt);let r=i.get(Di).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(Se),s=zY(o,r);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!n||!B.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();let a=yield MS(o,r,B.lift(n),st.None);if(a)return a.provider.getLegend()}));Dt.registerCommand("_provideDocumentRangeSemanticTokens",(i,...e)=>Gd(void 0,void 0,void 0,function*(){let[t,n]=e;Bt(t instanceof yt),Bt(B.isIRange(n));let r=i.get(Di).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(Se),s=yield MS(o,r,B.lift(n),st.None);if(!(!s||!s.tokens))return X7({id:0,type:"full",data:s.tokens.data})}))});function T1(i,e,t){var n;let r=(n=t.getValue(E1,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))===null||n===void 0?void 0:n.enabled;return typeof r=="boolean"?r:e.getColorTheme().semanticHighlighting}var E1,nD=N(()=>{E1="editor.semanticHighlighting"});var BY,el,Yd,rD,I1,oD,sD=N(()=>{ke();qt();Qo();kn();jt();ki();nr();fz();iD();Ms();ll();Pt();pz();j_();nD();BY=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},el=function(i,e){return function(t,n){e(t,n,i)}},rD=class extends ce{constructor(e,t,n,r,o,s){super(),this._watchers=Object.create(null);let a=d=>{this._watchers[d.uri.toString()]=new I1(d,e,n,o,s)},l=(d,u)=>{u.dispose(),delete this._watchers[d.uri.toString()]},c=()=>{for(let d of t.getModels()){let u=this._watchers[d.uri.toString()];T1(d,n,r)?u||a(d):u&&l(d,u)}};this._register(t.onModelAdded(d=>{T1(d,n,r)&&a(d)})),this._register(t.onModelRemoved(d=>{let u=this._watchers[d.uri.toString()];u&&l(d,u)})),this._register(r.onDidChangeConfiguration(d=>{d.affectsConfiguration(E1)&&c()})),this._register(n.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};rD=BY([el(0,dg),el(1,Di),el(2,vn),el(3,Mt),el(4,cn),el(5,Se)],rD);I1=Yd=class extends ce{constructor(e,t,n,r,o){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentSemanticTokens",{min:Yd.REQUEST_MIN_DELAY,max:Yd.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new ui(()=>this._fetchDocumentSemanticTokensNow(),Yd.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let s=()=>{ji(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(let a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};s(),this._register(this._provider.onDidChange(()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),ji(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!eD(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new zi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=tD(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let o=[],s=this._model.onDidChangeContent(l=>{o.push(l)}),a=new gn(!1);r.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,o);else{let{provider:c,tokens:d}=l,u=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,d||null,u,o)}},l=>{l&&(Xo(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||ft(l),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,r,o){o=Math.min(o,n.length-r,e.length-t);for(let s=0;s<o;s++)n[r+s]=e[t+s]}_setDocumentSemanticTokens(e,t,n,r){let o=this._currentDocumentResponse,s=()=>{(r.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(J7(t)){if(!o){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:o.data};else{let a=0;for(let h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;let l=o.data,c=new Uint32Array(l.length+a),d=l.length,u=c.length;for(let h=t.edits.length-1;h>=0;h--){let f=t.edits[h];if(f.start>l.length){n.warnInvalidEditStart(o.resultId,t.resultId,h,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let m=d-(f.start+f.deleteCount);m>0&&(Yd._copy(l,d-m,c,u-m,m),u-=m),f.data&&(Yd._copy(f.data,0,c,u-f.data.length,f.data.length),u-=f.data.length),d=f.start}d>0&&Yd._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(k1(t)){this._currentDocumentResponse=new oD(e,t.resultId,t.data);let a=ry(t,n,this._model.getLanguageId());if(r.length>0)for(let l of r)for(let c of a)for(let d of l.changes)c.applyEdit(d.range,d.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}};I1.REQUEST_MIN_DELAY=300;I1.REQUEST_MAX_DELAY=2e3;I1=Yd=BY([el(1,dg),el(2,vn),el(3,cn),el(4,Se)],I1);oD=class{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};Yc(rD)});var C1e,L1,A1,aD=N(()=>{jt();ke();lt();iD();nD();fz();kn();nr();Ms();ll();Pt();pz();C1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},L1=function(i,e){return function(t,n){e(t,n,i)}},A1=class extends ce{constructor(e,t,n,r,o,s){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=r,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new ui(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];let a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(E1)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;t<n;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;let e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!T1(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!FY(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}let t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(n=>this._requestRange(e,n)))}_requestRange(e,t){let n=e.getVersionId(),r=Jt(s=>Promise.resolve(MS(this._provider,e,t,s))),o=new gn(!1);return r.then(s=>{if(this._debounceInformation.update(e,o.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==n)return;let{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,ry(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}};A1.ID="editor.contrib.viewportSemanticTokens";A1=C1e([L1(1,dg),L1(2,vn),L1(3,Mt),L1(4,cn),L1(5,Se)],A1);Ue(A1.ID,A1,1)});var NS,HY=N(()=>{Ni();et();NS=class{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){let n=[];for(let r of t){let o=[];n.push(o),this.selectSubwords&&this._addInWordRanges(o,e,r),this._addWordRanges(o,e,r),this._addWhitespaceLine(o,e,r),o.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){let r=t.getWordAtPosition(n);if(!r)return;let{word:o,startColumn:s}=r,a=n.column-s,l=a,c=a,d=0;for(;l>=0;l--){let u=o.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(z3(u)&&B3(d))break;d=u}for(l+=1;c<o.length;c++){let u=o.charCodeAt(c);if(B3(u)&&z3(d))break;if(u===95||u===45)break;d=u}l<c&&e.push({range:new B(n.lineNumber,s+l,n.lineNumber,s+c)})}_addWordRanges(e,t,n){let r=t.getWordAtPosition(n);r&&e.push({range:new B(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)})}_addWhitespaceLine(e,t,n){t.getLineLength(n.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new B(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}});function UY(i,e,t,n,r){return PS(this,void 0,void 0,function*(){let o=i.all(e).concat(new NS(n.selectSubwords));o.length===1&&o.unshift(new Nd);let s=[],a=[];for(let l of o)s.push(Promise.resolve(l.provideSelectionRanges(e,t,r)).then(c=>{if(Ki(c)&&c.length===t.length)for(let d=0;d<t.length;d++){a[d]||(a[d]=[]);for(let u of c[d])B.isIRange(u.range)&&B.containsPosition(u.range,t[d])&&a[d].push(B.lift(u.range))}},Xt));return yield Promise.all(s),a.map(l=>{if(l.length===0)return[];l.sort((h,f)=>Ie.isBefore(h.getStartPosition(),f.getStartPosition())?1:Ie.isBefore(f.getStartPosition(),h.getStartPosition())||Ie.isBefore(h.getEndPosition(),f.getEndPosition())?-1:Ie.isBefore(f.getEndPosition(),h.getEndPosition())?1:0);let c=[],d;for(let h of l)(!d||B.containsRange(h,d)&&!B.equalsRange(h,d))&&(c.push(h),d=h);if(!n.selectLeadingAndTrailingWhitespace)return c;let u=[c[0]];for(let h=1;h<c.length;h++){let f=c[h-1],m=c[h];if(m.startLineNumber!==f.startLineNumber||m.endLineNumber!==f.endLineNumber){let g=new B(f.startLineNumber,e.getLineFirstNonWhitespaceColumn(f.startLineNumber),f.endLineNumber,e.getLineLastNonWhitespaceColumn(f.endLineNumber));g.containsRange(f)&&!g.equalsRange(f)&&m.containsRange(g)&&!m.equalsRange(g)&&u.push(g);let w=new B(f.startLineNumber,1,f.endLineNumber,e.getLineMaxColumn(f.endLineNumber));w.containsRange(f)&&!w.equalsRange(g)&&m.containsRange(w)&&!m.equalsRange(w)&&u.push(w)}u.push(m)}return u})})}var S1e,k1e,PS,lD,cD,Yp,RS,dD,uD,hD=N(()=>{mi();ki();qt();lt();di();et();An();ti();oA();HY();He();Ji();Vi();Pt();ra();Bn();Ln();S1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},k1e=function(i,e){return function(t,n){e(t,n,i)}},PS=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},cD=class i{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let n=new i(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}},Yp=lD=class{static get(e){return e.getContribution(lD.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return PS(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||(yield UY(this._languageFeaturesService.selectionRangeProvider,n,t.map(o=>o.getPosition()),this._editor.getOption(111),st.None).then(o=>{var s;if(!(!Ki(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!Es(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<o.length;a++)o[a]=o[a].filter(l=>l.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),o[a].unshift(t[a]);this._state=o.map(a=>new cD(0,a)),(s=this._selectionListener)===null||s===void 0||s.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(o=>o.mov(e));let r=this._state.map(o=>Qe.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}})}};Yp.ID="editor.contrib.smartSelectController";Yp=lD=S1e([k1e(1,Se)],Yp);RS=class extends de{constructor(e,t){super(t),this._forward=e}run(e,t){return PS(this,void 0,void 0,function*(){let n=Yp.get(t);n&&(yield n.run(this._forward))})}},dD=class extends RS{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:b("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"1_basic",title:b({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};Dt.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");uD=class extends RS{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:b("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"1_basic",title:b({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};Ue(Yp.ID,Yp,4);ee(dD);ee(uD);Dt.registerCommand("_executeSelectionRangeProvider",function(i,...e){return PS(this,void 0,void 0,function*(){let[t,n]=e;Bt(yt.isUri(t));let r=i.get(Se).selectionRangeProvider,o=yield i.get(Sn).createModelReference(t);try{return UY(r,o.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},st.None)}finally{o.dispose()}})})});var jY,WY=N(()=>{He();jY=Object.freeze({View:{value:b("view","View"),original:"View"},Help:{value:b("help","Help"),original:"Help"},Test:{value:b("test","Test"),original:"Test"},File:{value:b("file","File"),original:"File"},Preferences:{value:b("preferences","Preferences"),original:"Preferences"},Developer:{value:b({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}})});var VY=N(()=>{});var qY=N(()=>{VY()});var E1e,D1,KY,$Y,OS,fD,pD,GY=N(()=>{Ht();lk();ke();Lr();qY();Qne();Lp();di();zP();$F();GF();hb();rL();eL();E1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},D1=class{constructor(e,t,n,r=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=n,this.showEndForLine=r}},KY=xf("stickyScrollViewLayer",{createHTML:i=>i}),$Y="data-sticky-line-index",OS=class extends ce{constructor(e){super(),this._editor=e,this._foldingIconStore=new le,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(65),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Vo),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);let t=()=>{this._linesDomNode.style.left=this._editor.getOption(113).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(113)&&t(),n.hasChanged(65)&&(this._lineHeight=this._editor.getOption(65))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&t(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getCurrentLines(){return this._lineNumbers}setState(e){if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;let n=[...e.startLineNumbers];e.showEndForLine!==null&&(n[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=n}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode()}_updateWidgetWidth(){let e=this._editor.getLayoutInfo(),n=this._editor.getOption(71).side==="left"?e.contentLeft-e.minimap.minimapCanvasOuterWidth:e.contentLeft;this._lineNumbersDomNode.style.width=`${n}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.minimap.minimapCanvasOuterWidth-e.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),Kr(this._lineNumbersDomNode),Kr(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(let t of this._stickyLines){let n=t.foldingIcon;n&&n.setVisible(e?!0:n.isCollapsed)}}_renderRootNode(){var e;return E1e(this,void 0,void 0,function*(){let t=yield(e=ps.get(this._editor))===null||e===void 0?void 0:e.getFoldingModel(),n=this._editor.getLayoutInfo();for(let[s,a]of this._lineNumbers.entries()){let l=this._renderChildNode(s,a,n,t);this._linesDomNode.appendChild(l.lineDomNode),this._lineNumbersDomNode.appendChild(l.lineNumberDomNode),this._stickyLines.push(l)}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));let r=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(r===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${r}px`,this._linesDomNodeScrollable.style.height=`${r}px`,this._rootDomNode.style.height=`${r}px`,this._editor.getOption(71).side==="left"?this._rootDomNode.style.marginLeft=n.minimap.minimapCanvasOuterWidth+"px":this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)})}_setFoldingHoverListeners(){this._editor.getOption(108)==="mouseover"&&(this._foldingIconStore.add(At(this._lineNumbersDomNode,bi.MOUSE_ENTER,t=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(At(this._lineNumbersDomNode,bi.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,n,r){let o=this._editor._getViewModel(),s=o.coordinatesConverter.convertModelPositionToViewPosition(new Ie(t,1)).lineNumber,a=o.getViewLineRenderingData(s),l=this._editor.getOption(71).side,c=this._editor.getOption(66),d;try{d=ag.filter(a.inlineDecorations,s,a.minColumn,a.maxColumn)}catch(te){d=[]}let u=new G_(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,d,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),h=new i_(2e3),f=Y_(u,h),m;KY?m=KY.createHTML(h.build()):m=h.build();let g=document.createElement("span");g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=m;let w=document.createElement("span");w.className="sticky-line-number",w.style.lineHeight=`${this._lineHeight}px`;let _=l==="left"?n.contentLeft-n.minimap.minimapCanvasOuterWidth:n.contentLeft;w.style.width=`${_}px`;let E=document.createElement("span");c.renderType===1||c.renderType===3&&t%10===0?E.innerText=t.toString():c.renderType===2&&(E.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),E.className="sticky-line-number-inner",E.style.lineHeight=`${this._lineHeight}px`,E.style.width=`${n.lineNumbersWidth}px`,E.style.float="left",l==="left"?E.style.paddingLeft=`${n.lineNumbersLeft-n.minimap.minimapCanvasOuterWidth}px`:l==="right"&&(E.style.paddingLeft=`${n.lineNumbersLeft}px`),w.appendChild(E);let A=this._renderFoldingIconForLine(w,r,e,t);this._editor.applyFontInfo(g),this._editor.applyFontInfo(E),g.setAttribute("role","listitem"),g.setAttribute($Y,String(e)),g.tabIndex=0,w.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,w.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;let L=e===this._lineNumbers.length-1,O="0",U="1";g.style.zIndex=L?O:U,w.style.zIndex=L?O:U;let Q=`${e*this._lineHeight+this._lastLineRelativePosition+(A!=null&&A.isCollapsed?1:0)}px`,ae=`${e*this._lineHeight}px`;return g.style.top=L?Q:ae,w.style.top=L?Q:ae,new fD(t,g,w,A,f.characterMapping)}_renderFoldingIconForLine(e,t,n,r){let o=this._editor.getOption(108);if(!t||o==="never")return;let s=t.regions,a=s.findRange(r),l=s.getStartLineNumber(a);if(!(r===l))return;let d=s.isCollapsed(a),u=new pD(d,this._lineHeight);return e.append(u.domNode),u.setVisible(this._isOnGlyphMargin?!0:d||o==="always"),this._foldingIconStore.add(At(u.domNode,bi.CLICK,()=>{w2(t,Number.MAX_VALUE,[r]),u.isCollapsed=!d;let h=(d?this._editor.getTopForLineNumber(l):this._editor.getTopForLineNumber(s.getEndLineNumber(a)))-this._lineHeight*n+1;this._editor.setScrollTop(h)})),u}_updateMinContentWidth(){this._minContentWidthInPx=0;for(let e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e<this._stickyLines.length&&this._stickyLines[e].lineDomNode.focus()}getEditorPositionFromNode(e){if(!e||e.children.length>0)return null;let t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;let n=ez(t.characterMapping,e,0);return new Ie(t.lineNumber,n)}getLineNumberFromChildDomNode(e){var t,n;return(n=(t=this._getRenderedStickyLineFromChildDomNode(e))===null||t===void 0?void 0:t.lineNumber)!==null&&n!==void 0?n:null}_getRenderedStickyLineFromChildDomNode(e){let t=this.getStickyLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getStickyLineIndexFromChildDomNode(e){for(;e&&e!==this._rootDomNode;){let t=e.getAttribute($Y);if(t)return parseInt(t,10);e=e.parentElement}return null}},fD=class{constructor(e,t,n,r,o){this.lineNumber=e,this.lineDomNode=t,this.lineNumberDomNode=n,this.foldingIcon=r,this.characterMapping=o}},pD=class{constructor(e,t){this.isCollapsed=e,this.dimension=t,this.domNode=document.createElement("div"),this.domNode.style.width=`${t}px`,this.domNode.style.height=`${t}px`,this.domNode.className=_t.asClassName(e?cb:lb)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}});var T1e,mD,I1e,Xd,Xp,M1,N1,Ah,gD,R1=N(()=>{mi();ki();qt();Jh();df();di();et();Ms();Ut();fl();Qo();ke();Pt();T1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mD=function(i,e){return function(t,n){e(t,n,i)}},I1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Xd=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let r=n;for(let o=0;t.children.get(r)!==void 0;o++)r=`${n}_${o}`;return r}static empty(e){return e.children.size===0}},Xp=class extends Xd{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}},M1=class extends Xd{constructor(e,t,n,r){super(),this.id=e,this.parent=t,this.label=n,this.order=r,this.children=new Map}},N1=class i extends Xd{static create(e,t,n){let r=new zi(n),o=new i(t.uri),s=e.ordered(t),a=s.map((c,d)=>{var u;let h=Xd.findId(`provider_${d}`,o),f=new M1(h,o,(u=c.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",d);return Promise.resolve(c.provideDocumentSymbols(t,r.token)).then(m=>{for(let g of m||[])i._makeOutlineElement(g,f);return f},m=>(Xt(m),f)).then(m=>{Xd.empty(m)?m.remove():o._groups.set(h,m)})}),l=e.onDidChange(()=>{let c=e.ordered(t);Es(c,s)||r.cancel()});return Promise.all(a).then(()=>r.token.isCancellationRequested&&!n.isCancellationRequested?i.create(e,t,n):o._compact()).finally(()=>{l.dispose()})}static _makeOutlineElement(e,t){let n=Xd.findId(e,t),r=new Xp(n,t,e);if(e.children)for(let o of e.children)i._makeOutlineElement(o,r);t.children.set(r.id,r)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(let[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=kr.first(this._groups.values());for(let[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){let e=[];for(let t of this.children.values())t instanceof Xp?e.push(t.symbol):e.push(...kr.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>B.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){let e=this.getTopLevelSymbols(),t=[];return i._flattenDocumentSymbols(t,e,""),t.sort((n,r)=>Ie.compare(B.getStartPosition(n.range),B.getStartPosition(r.range))||Ie.compare(B.getEndPosition(r.range),B.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(let r of t)e.push({kind:r.kind,tags:r.tags,name:r.name,detail:r.detail,containerName:r.containerName||n,range:r.range,selectionRange:r.selectionRange,children:void 0}),r.children&&i._flattenDocumentSymbols(e,r.children,r.name)}},Ah=Zn("IOutlineModelService"),gD=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new le,this._cache=new aa(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(r=>{this._cache.delete(r.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return I1e(this,void 0,void 0,function*(){let n=this._languageFeaturesService.documentSymbolProvider,r=n.ordered(e),o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!Es(o.provider,r)){let a=new zi;o={versionId:e.getVersionId(),provider:r,promiseCnt:0,source:a,promise:N1.create(n,e,a.token),model:void 0},this._cache.set(e.id,o);let l=Date.now();o.promise.then(c=>{o.model=c,this._debounceInformation.update(e,Date.now()-l)}).catch(c=>{this._cache.delete(e.id)})}if(o.model)return o.model;o.promiseCnt+=1;let s=t.onCancellationRequested(()=>{--o.promiseCnt===0&&(o.source.cancel(),this._cache.delete(e.id))});try{return yield o.promise}finally{s.dispose()}})}};gD=T1e([mD(0,Se),mD(1,cn),mD(2,Di)],gD);tr(Ah,gD,1)});var bc,Dh,P1,bD=N(()=>{bc=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},Dh=class{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}},P1=class{constructor(e,t,n,r){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=r}}});var HS,F1,YY,O1,Qd,FS,zS,vD,BS,_D,yD,XY=N(()=>{ke();Pt();R1();jt();hb();sL();iL();Un();qt();bD();Jh();HS=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},F1=function(i,e){return function(t,n){e(t,n,i)}},YY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(O1||(O1={}));(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(Qd||(Qd={}));FS=class extends ce{constructor(e,t,n,r){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=n,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Mo(300)),this._updateOperation=this._register(new le);let o=new vD(n),s=new yD(this._editor,n),a=new _D(this._editor,t);switch(r){case O1.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(s),this._modelProviders.push(a);break;case O1.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(a);break;case O1.INDENTATION_MODEL:this._modelProviders.push(a);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,n){return YY(this,void 0,void 0,function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>YY(this,void 0,void 0,function*(){for(let r of this._modelProviders){let{statusPromise:o,modelPromise:s}=r.computeStickyModel(e,t,n);this._modelPromise=s;let a=yield o;if(this._modelPromise!==s)return null;switch(a){case Qd.CANCELED:return this._updateOperation.clear(),null;case Qd.VALID:return r.stickyModel}}return null})).catch(r=>(ft(r),null))})}};FS=HS([F1(1,Ot),F1(2,Se)],FS);zS=class{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Qd.INVALID}computeStickyModel(e,t,n){if(n.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};let r=Jt(o=>this.createModelFromProvider(e,t,o));return{statusPromise:r.then(o=>this.isModelValid(o)?n.isCancellationRequested?Qd.CANCELED:(this._stickyModel=this.createStickyModel(e,t,n,o),Qd.VALID):this._invalid()).then(void 0,o=>(ft(o),Qd.CANCELED)),modelPromise:r}}isModelValid(e){return!0}isProviderValid(e){return!0}},vD=class extends zS{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,n){return N1.create(this._languageFeaturesService.documentSymbolProvider,e,n)}createStickyModel(e,t,n,r){var o;let{stickyOutlineElement:s,providerID:a}=this._stickyModelFromOutlineModel(r,(o=this._stickyModel)===null||o===void 0?void 0:o.outlineProviderId);return new P1(e.uri,t,s,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(kr.first(e.children.values())instanceof M1){let a=kr.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",c=-1,d;for(let[u,h]of e.children.entries()){let f=this._findSumOfRangesOfGroup(h);f>c&&(d=h,c=f,l=h.id)}t=l,n=d.children}}else n=e.children;let r=[],o=Array.from(n.values()).sort((a,l)=>{let c=new bc(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),d=new bc(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,d)});for(let a of o)r.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new Dh(void 0,r,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){let n=[];for(let o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(let s of o.children.values())n.push(this._stickyModelFromOutlineElement(s,o.symbol.selectionRange.startLineNumber));n.sort((o,s)=>this._comparator(o.range,s.range));let r=new bc(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new Dh(r,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(let n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof Xp?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};vD=HS([F1(0,Se)],vD);BS=class extends zS{constructor(e){super(),this._foldingLimitReporter=new ub(e)}createStickyModel(e,t,n,r){let o=this._fromFoldingRegions(r);return new P1(e.uri,t,o,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,n=[],r=new Dh(void 0,[],void 0);for(let o=0;o<t;o++){let s=e.getParentIndex(o),a;s!==-1?a=n[s]:a=r;let l=new Dh(new bc(e.getStartLineNumber(o),e.getEndLineNumber(o)+1),[],a);a.children.push(l),n.push(l)}return r}},_D=class extends BS{constructor(e,t){super(e),this._languageConfigurationService=t}createModelFromProvider(e,t,n){return new rh(e,this._languageConfigurationService,this._foldingLimitReporter).compute(n)}};_D=HS([F1(1,Ot)],_D);yD=class extends BS{constructor(e,t){super(e),this._languageFeaturesService=t}isProviderValid(e){return ps.getFoldingRangeProviders(this._languageFeaturesService,e).length>0}createModelFromProvider(e,t,n){let r=ps.getFoldingRangeProviders(this._languageFeaturesService,e);return new oh(e,r,()=>this.createModelFromProvider(e,t,n),this._foldingLimitReporter,void 0).compute(n)}};yD=HS([F1(1,Se)],yD)});var L1e,QY,ZY,wD,US,JY=N(()=>{ke();Pt();ki();jt();mi();ei();Un();XY();L1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},QY=function(i,e){return function(t,n){e(t,n,i)}},ZY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},wD=class{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}},US=class extends ce{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new Je),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new le),this._updateSoon=this._register(new ui(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(113)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(113),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new FS(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update())}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}update(){var e;return ZY(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new zi,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return ZY(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider){this._model=null;return}let t=this._editor.getModel(),n=t.getVersionId(),r=yield this._stickyModelProvider.update(t,n,e);e.isCancellationRequested||(this._model=r)})}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,r,o){if(t.children.length===0)return;let s=o,a=[];for(let d=0;d<t.children.length;d++){let u=t.children[d];u.range&&a.push(u.range.startLineNumber)}let l=this.updateIndex(pu(a,e.startLineNumber,(d,u)=>d-u)),c=this.updateIndex(pu(a,e.startLineNumber+r,(d,u)=>d-u));for(let d=l;d<=c;d++){let u=t.children[d];if(!u)return;if(u.range){let h=u.range.startLineNumber,f=u.range.endLineNumber;e.startLineNumber<=f+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,n.push(new wD(h,f-1,r+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,n,r+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,n,r,o)}}getCandidateStickyLinesIntersecting(e){var t,n;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let r=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,r,0,-1);let o=(n=this._editor._getViewModel())===null||n===void 0?void 0:n.getHiddenAreas();if(o)for(let s of o)r=r.filter(a=>!(a.startLineNumber>=s.startLineNumber&&a.endLineNumber<=s.endLineNumber+1));return r}};US=L1e([QY(1,Se),QY(2,Ot)],US)});var A1e,Qp,eX,xD,vs,CD=N(()=>{ke();Pt();GY();JY();Ut();wl();Ji();wt();ti();i1();et();TC();N8();di();ki();Un();Ms();Ht();bD();J9();A1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Qp=function(i,e){return function(t,n){e(t,n,i)}},eX=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},vs=xD=class extends ce{constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=r,this._contextKeyService=a,this._sessionStore=new le,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new OS(this._editor),this._stickyLineCandidateProvider=new US(this._editor,n,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new D1([],[],0),this._readConfiguration();let l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(d=>{(d.hasChanged(113)||d.hasChanged(71)||d.hasChanged(65)||d.hasChanged(108))&&this._readConfiguration()})),this._register(At(l,bi.CONTEXT_MENU,d=>eX(this,void 0,void 0,function*(){this._onContextMenu(d)}))),this._stickyScrollFocusedContextKey=F.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=F.stickyScrollVisible.bindTo(this._contextKeyService);let c=this._register(Cs(l));this._register(c.onDidBlur(d=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(c.onDidFocus(d=>{this.focus()})),this._registerMouseListeners(),this._register(At(l,bi.MOUSE_DOWN,d=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(xD.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new le,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){let e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(B.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){let e=this._register(new le),t=this._register(new Za(this._editor,{extractLineNumberFromMouseEvent:o=>{let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);return s?s.lineNumber:0}})),n=o=>{if(!this._editor.hasModel()||o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return null;let s=o.target.element;if(!s||s.innerText!==s.innerHTML)return null;let a=this._stickyScrollWidget.getEditorPositionFromNode(s);return a?{range:new B(a.lineNumber,a.column,a.lineNumber,a.column+s.innerText.length),textElement:s}:null},r=this._stickyScrollWidget.getDomNode();this._register(Io(r,bi.CLICK,o=>{if(o.ctrlKey||o.altKey||o.metaKey||!o.leftButton)return;if(o.shiftKey){let a=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(o.target);if(a===null)return;let l=new Ie(this._endLineNumbers[a],1);this._revealLineInCenterIfOutsideViewport(l);return}let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target);if(!s){let a=this._stickyScrollWidget.getLineNumberFromChildDomNode(o.target);if(a===null)return;s=new Ie(a,1)}this._revealPosition(s)})),this._register(Io(r,bi.MOUSE_MOVE,o=>{if(o.shiftKey){let s=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(o.target);if(s===null||this._showEndForLine!==null&&this._showEndForLine===s)return;this._showEndForLine=s,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(At(r,bi.MOUSE_LEAVE,o=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([o,s])=>{let a=n(o);if(!a||!o.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}let{range:l,textElement:c}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(c.style.textDecoration==="underline")return;let d=new zi;e.add(ni(()=>d.dispose(!0)));let u;mh(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new Ie(l.startLineNumber,l.startColumn+1),d.token).then(h=>{if(!d.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;let f=c;u!==f?(e.clear(),u=f,u.style.textDecoration="underline",e.add(ni(()=>{u.style.textDecoration="none"}))):u||(u=f,u.style.textDecoration="underline",e.add(ni(()=>{u.style.textDecoration="none"})))}else e.clear()})})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(o=>eX(this,void 0,void 0,function*(){if(o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return;let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);s&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:s.lineNumber,column:1})),this._instaService.invokeFunction(cS,o,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e){let t=new Vv(e);this._contextMenuService.showContextMenu({menuId:Me.StickyScrollContext,getAnchor:()=>t})}_readConfiguration(){let e=this._editor.getOption(113);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(66).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll()}))}_needsUpdate(e){let t=this._stickyScrollWidget.getCurrentLines();for(let n of t)for(let r of e.ranges)if(n>=r.fromLineNumber&&n<=r.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll()}_onDidResize(){let t=this._editor.getLayoutInfo().height/this._editor.getOption(65);this._maxStickyLines=Math.round(t*.25)}_renderStickyScroll(){let e=this._editor.getModel();if(!e||e.isTooLargeForTokenization()){this._stickyScrollWidget.setState(void 0);return}let t=this._stickyLineCandidateProvider.getVersionId();if(t===void 0||t===e.getVersionId())if(this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{let n=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(n)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}findScrollWidgetState(){let e=this._editor.getOption(65),t=Math.min(this._maxStickyLines,this._editor.getOption(113).maxLineCount),n=this._editor.getScrollTop(),r=0,o=[],s=[],a=this._editor.getVisibleRanges();if(a.length!==0){let l=new bc(a[0].startLineNumber,a[a.length-1].endLineNumber),c=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(let d of c){let u=d.startLineNumber,h=d.endLineNumber,f=d.nestingDepth;if(h-u>0){let m=(f-1)*e,g=f*e,w=this._editor.getBottomForLineNumber(u)-n,_=this._editor.getTopForLineNumber(h)-n,E=this._editor.getBottomForLineNumber(h)-n;if(m>_&&m<=E){o.push(u),s.push(h+1),r=E-g;break}else g>w&&g<=E&&(o.push(u),s.push(h+1));if(o.length===t)break}}}return this._endLineNumbers=s,new D1(o,s,r,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};vs.ID="store.contrib.stickyScrollController";vs=xD=A1e([Qp(1,rs),Qp(2,Se),Qp(3,Ke),Qp(4,Ot),Qp(5,cn),Qp(6,it)],vs)});var D1e,jS,GS,WS,VS,qS,KS,$S,tX=N(()=>{lt();He();WY();Ji();kn();wt();ti();CD();D1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jS=class extends es{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:b("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:b({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:jY.View,toggled:{condition:fe.equals("config.editor.stickyScroll.enabled",!0),title:b("stickyScroll","Sticky Scroll"),mnemonicTitle:b({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:Me.CommandPalette},{id:Me.MenubarAppearanceMenu,group:"4_editor",order:3},{id:Me.StickyScrollContext}]})}run(e){return D1e(this,void 0,void 0,function*(){let t=e.get(Mt),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)})}},GS=100,WS=class extends sa{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:b("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:b({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:fe.and(fe.has("config.editor.stickyScroll.enabled"),F.stickyScrollVisible),menu:[{id:Me.CommandPalette}]})}runEditorCommand(e,t){var n;(n=vs.get(t))===null||n===void 0||n.focus()}},VS=class extends sa{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:b("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:GS,primary:18}})}runEditorCommand(e,t){var n;(n=vs.get(t))===null||n===void 0||n.focusNext()}},qS=class extends sa{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:b("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:GS,primary:16}})}runEditorCommand(e,t){var n;(n=vs.get(t))===null||n===void 0||n.focusPrevious()}},KS=class extends sa{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:b("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:GS,primary:3}})}runEditorCommand(e,t){var n;(n=vs.get(t))===null||n===void 0||n.goToFocused()}},$S=class extends sa{constructor(){super({id:"editor.action.selectEditor",title:{value:b("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:GS,primary:9}})}runEditorCommand(e,t){var n;(n=vs.get(t))===null||n===void 0||n.selectEditor()}}});var SD=N(()=>{lt();tX();CD();Ji();Ue(vs.ID,vs,1);Si(jS);Si(WS);Si(qS);Si(VS);Si(KS);Si($S)});var ID,Nh,M1e,Mh,kD,ED,TD,YS,LD=N(()=>{ki();ml();Jh();ke();lt();Ir();et();Pt();aA();uh();nA();sA();Zm();Ut();ID=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Nh=function(i,e){return function(t,n){e(t,n,i)}},M1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},kD=class{constructor(e,t,n,r,o,s){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=r,this.command=o,this.completion=s}},ED=class extends U9{constructor(e,t,n,r,o,s){super(o.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=r,this._suggestMemoryService=s}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn<n.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){var e;let t=[],{items:n}=this.completionModel,r=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},n),o=kr.slice(n,r),s=kr.slice(n,0,r),a=5;for(let l of kr.concat(o,s)){if(l.score===pl.Default)continue;let c=new B(l.editStart.lineNumber,l.editStart.column,l.editInsertEnd.lineNumber,l.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),d=l.completion.insertTextRules&&l.completion.insertTextRules&4?{snippet:l.completion.insertText}:l.completion.insertText;t.push(new kD(c,d,(e=l.filterTextLow)!==null&&e!==void 0?e:l.labelLow,l.completion.additionalTextEdits,l.completion.command,l)),a-->=0&&l.resolve(st.None)}return t}};ED=ID([Nh(5,Ep)],ED);TD=class{constructor(e,t,n,r){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=n,this._suggestMemoryService=r}provideInlineCompletions(e,t,n,r){var o;return M1e(this,void 0,void 0,function*(){if(n.selectedSuggestionInfo)return;let s=this._getEditorOption(87,e);if(Ya.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(Ya.valueFor(s,l)!=="inline")return;let c=e.getWordAtPosition(t),d;if(c!=null&&c.word||(d=this._getTriggerCharacterInfo(e,t)),!(c!=null&&c.word)&&!d||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let u,h=e.getValueInRange(new B(t.lineNumber,1,t.lineNumber,t.column));if(!d&&(!((o=this._lastResult)===null||o===void 0)&&o.canBeReused(e,t.lineNumber,c))){let f=new Rb(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=f,this._lastResult.acquire(),u=this._lastResult}else{let f=yield wb(this._languageFeatureService.completionProvider,e,t,new rc(void 0,void 0,d==null?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},r),m;f.needsClipboard&&(m=yield this._clipboardService.readText());let g=new Ip(f.items,t.column,new Rb(h,0),Rd.None,this._getEditorOption(116,e),this._getEditorOption(110,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);u=new ED(e,t.lineNumber,c,g,f,this._suggestMemoryService)}return this._lastResult=u,u})}handleItemDidShow(e,t){t.completion.resolve(st.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var n;let r=e.getValueInRange(B.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(let s of this._languageFeatureService.completionProvider.all(e))!((n=s.triggerCharacters)===null||n===void 0)&&n.includes(r)&&o.add(s);if(o.size!==0)return{providers:o,ch:r}}};TD=ID([Nh(1,Se),Nh(2,As),Nh(3,Ep)],TD);YS=Mh=class{constructor(e,t,n,r){if(++Mh._counter===1){let o=r.createInstance(TD,(s,a)=>{var l;return((l=n.listCodeEditors().find(d=>d.getModel()===a))!==null&&l!==void 0?l:e).getOption(s)});Mh._disposable=t.inlineCompletionsProvider.register("*",o)}}dispose(){var e;--Mh._counter===0&&((e=Mh._disposable)===null||e===void 0||e.dispose(),Mh._disposable=void 0)}};YS._counter=0;YS=Mh=ID([Nh(1,Se),Nh(2,ai),Nh(3,Ke)],YS);Ue("suggest.inlineCompletionsProvider",YS,0)});var iX=N(()=>{});var nX=N(()=>{iX()});var rX=N(()=>{});var oX=N(()=>{rX()});var sX=N(()=>{});var aX=N(()=>{sX()});var N1e,R1e,XS,lX=N(()=>{Ht();Lne();Z9();oF();ei();ke();ns();aX();N1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},R1e=function(i,e){return function(t,n){e(t,n,i)}},XS=class extends ce{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},r){var o;super(),this._link=t,this._enabled=!0,this.el=Te(e,Le("a.monaco-link",{tabIndex:(o=t.tabIndex)!==null&&o!==void 0?o:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");let s=this._register(new x_(this.el,"click")),a=this._register(new x_(this.el,"keypress")),l=ci.chain(a.event).map(u=>new Wv(u)).filter(u=>u.keyCode===3).event,c=this._register(new x_(this.el,rF.Tap)).event;this._register(I_.addTarget(this.el));let d=ci.any(s.event,l,c);this._register(d(u=>{this.enabled&&(cu.stop(u,!0),n!=null&&n.opener?n.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};XS=N1e([R1e(3,tn)],XS)});var cX,dX,P1e,QS,AD,uX=N(()=>{oX();Ht();rg();Fc();ke();kd();Ut();lX();kl();Lr();cX=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},dX=function(i,e){return function(t,n){e(t,n,i)}},P1e=26,QS=class extends ce{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(AD))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,P1e)}};QS=cX([dX(1,Ke)],QS);AD=class extends ce{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(io,{}),this.element=Le("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){let t=Le("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Kr(this.element)}show(e){Kr(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let n=Te(this.element,Le("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(Le(`div${_t.asCSSSelector(e.icon)}`));let r=Te(this.element,Le("div.message-container"));if(r.setAttribute("aria-hidden","true"),r.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=Te(this.element,Le("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(XS,this.messageActionsContainer,Object.assign(Object.assign({},s),{tabIndex:-1}),{}));let o=Te(this.element,Le("div.action-container"));this.actionBar=this._register(new Ds(o)),this.actionBar.push(this._register(new Zo("banner.close","Close Banner",_t.asClassName(V_),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};AD=cX([dX(0,Ke)],AD)});function F1e(i,e){return{nonBasicASCII:e.nonBasicASCII===C_?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===C_?!i:e.includeComments,includeStrings:e.includeStrings===C_?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}function PD(i){return`U+${i.toString(16).padStart(4,"0")}`}function DD(i){let e=`\`${PD(i)}\``;return H3.isInvisibleCharacter(i)||(e+=` "${`${z1e(i)}`}"`),e}function z1e(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function hX(i,e){return Mk.computeUnicodeHighlightReason(i,e)}function B1e(i,e){return Gn(this,void 0,void 0,function*(){let t=i.getValue(ga.allowedCharacters),n;typeof t=="object"&&t?n=t:n={};for(let r of e)n[String.fromCodePoint(r)]=!0;yield i.updateValue(ga.allowedCharacters,n,2)})}function H1e(i,e){var t;return Gn(this,void 0,void 0,function*(){let n=(t=i.inspect(ga.allowedLocales).user)===null||t===void 0?void 0:t.value,r;typeof n=="object"&&n?r=Object.assign({},n):r={};for(let o of e)r[o]=!0;yield i.updateValue(ga.allowedLocales,r,2)})}function U1e(i){throw new Error(`Unexpected value: ${i}`)}var zD,Zp,Gn,O1e,Jp,MD,ND,RD,em,OD,FD,Zd,tm,im,z1,BD=N(()=>{jt();Jn();Ts();ke();Tr();Ni();nX();lt();eg();jn();rre();q_();ts();Zne();nc();QC();uX();He();kn();Ut();ns();xl();kl();ore();zD=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Zp=function(i,e){return function(t,n){e(t,n,i)}},Gn=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},O1e=Pi("extensions-warning-message",pt.warning,b("warningIcon","Icon shown with a warning message in the extensions editor.")),Jp=class extends ce{constructor(e,t,n,r){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=o=>{if(o&&o.hasMore){if(this._bannerClosed)return;let s=Math.max(o.ambiguousCharacterCount,o.nonBasicAsciiCharacterCount,o.invisibleCharacterCount),a;if(o.nonBasicAsciiCharacterCount>=s)a={message:b("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new im};else if(o.ambiguousCharacterCount>=s)a={message:b("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Zd};else if(o.invisibleCharacterCount>=s)a={message:b("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new tm};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:O1e,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(r.createInstance(QS,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(123),this._register(n.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(123)&&(this._options=e.getOption(123),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let e=F1e(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;let t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?X9:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new MD(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new ND(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Jp.ID="editor.contrib.unicodeHighlighter";Jp=zD([Zp(1,El),Zp(2,mz),Zp(3,Ke)],Jp);MD=class extends ce{constructor(e,t,n,r){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=r,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new ui(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let n=[];if(!t.hasMore)for(let r of t.ranges)n.push({range:r,options:em.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!Sk(t,e))return null;let n=t.getValueInRange(e.range);return{reason:hX(n,this._options),inComment:kk(t,e),inString:Ek(t,e)}}};MD=zD([Zp(3,El)],MD);ND=class extends ce{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new ui(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let r of e){let o=Mk.computeUnicodeHighlights(this._model,this._options,r);for(let s of o.ranges)n.ranges.push(s);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||o.hasMore}if(!n.hasMore)for(let r of n.ranges)t.push({range:r,options:em.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),n=t.getValueInRange(e.range);return Sk(t,e)?{reason:hX(n,this._options),inComment:kk(t,e),inString:Ek(t,e)}:null}},RD=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=this._editor.getContribution(Jp.ID);if(!r)return[];let o=[],s=new Set,a=300;for(let l of t){let c=r.getDecorationInfo(l);if(!c)continue;let u=n.getValueInRange(l.range).codePointAt(0),h=DD(u),f;switch(c.reason.kind){case 0:{$v(c.reason.confusableWith)?f=b("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,DD(c.reason.confusableWith.codePointAt(0))):f=b("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,DD(c.reason.confusableWith.codePointAt(0)));break}case 1:f=b("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=b("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(s.has(f))continue;s.add(f);let m={codePoint:u,reason:c.reason,inComment:c.inComment,inString:c.inString},g=b("unicodeHighlight.adjustSettings","Adjust settings"),w=`command:${z1.ID}?${encodeURIComponent(JSON.stringify(m))}`,_=new $i("",!0).appendMarkdown(f).appendText(" ").appendLink(w,g);o.push(new ro(this,l.range,[_],!1,a++))}return o}renderHoverParts(e,t){return d8(e,t,this._editor,this._languageService,this._openerService)}};RD=zD([Zp(1,en),Zp(2,tn)],RD);em=class{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let n=`${e}${t}`,r=this.map.get(n);return r||(r=mt.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,r)),r}};em.instance=new em;OD=class extends de{constructor(){super({id:Zd.ID,label:b("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,n){return Gn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Gn(this,void 0,void 0,function*(){yield e.updateValue(ga.includeComments,!1,2)})}},FD=class extends de{constructor(){super({id:Zd.ID,label:b("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,n){return Gn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Gn(this,void 0,void 0,function*(){yield e.updateValue(ga.includeStrings,!1,2)})}},Zd=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,n){return Gn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Gn(this,void 0,void 0,function*(){yield e.updateValue(ga.ambiguousCharacters,!1,2)})}};Zd.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";tm=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,n){return Gn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Gn(this,void 0,void 0,function*(){yield e.updateValue(ga.invisibleCharacters,!1,2)})}};tm.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";im=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,n){return Gn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Gn(this,void 0,void 0,function*(){yield e.updateValue(ga.nonBasicASCII,!1,2)})}};im.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";z1=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,n){return Gn(this,void 0,void 0,function*(){let{codePoint:r,reason:o,inString:s,inComment:a}=n,l=String.fromCodePoint(r),c=e.get(rr),d=e.get(Mt);function u(m){return H3.isInvisibleCharacter(m)?b("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",PD(m)):b("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${PD(m)} "${l}"`)}let h=[];if(o.kind===0)for(let m of o.notAmbiguousInLocales)h.push({label:b("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',m),run:()=>Gn(this,void 0,void 0,function*(){H1e(d,[m])})});if(h.push({label:u(r),run:()=>B1e(d,[r])}),a){let m=new OD;h.push({label:m.label,run:()=>Gn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(s){let m=new FD;h.push({label:m.label,run:()=>Gn(this,void 0,void 0,function*(){return m.runAction(d)})})}if(o.kind===0){let m=new Zd;h.push({label:m.label,run:()=>Gn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===1){let m=new tm;h.push({label:m.label,run:()=>Gn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===2){let m=new im;h.push({label:m.label,run:()=>Gn(this,void 0,void 0,function*(){return m.runAction(d)})})}else U1e(o);let f=yield c.pick(h,{title:b("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});f&&(yield f.run())})}};z1.ID="editor.action.unicodeHighlight.showExcludeOptions";ee(Zd);ee(tm);ee(im);ee(z1);Ue(Jp.ID,Jp,1);jo.register(RD)});function V1e(i,e,t){i.setModelProperty(e.uri,pX,t)}function q1e(i,e){return i.getModelProperty(e.uri,pX)}var j1e,fX,W1e,pX,B1,HD=N(()=>{ke();Do();lt();Ir();He();Nk();j1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fX=function(i,e){return function(t,n){e(t,n,i)}},W1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},pX="ignoreUnusualLineTerminators";B1=class extends ce{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(124),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(124)&&(this._config=this._editor.getOption(124),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(r=>{r.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return W1e(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||q1e(this._codeEditorService,e)===!0||this._editor.getOption(89))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=yield this._dialogService.confirm({title:b("unusualLineTerminators.title","Unusual Line Terminators"),message:b("unusualLineTerminators.message","Detected unusual line terminators"),detail:b("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Dr(e.uri)),primaryButton:b({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:b("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){V1e(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};B1.ID="editor.contrib.unusualLineTerminatorsDetector";B1=j1e([fX(1,Ef),fX(2,ai)],B1);Ue(B1.ID,B1,1)});function gX(i,e,t,n){let r=i.ordered(e);return u_(r.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,n)).then(void 0,Xt)),Ki)}function $1e(i,e,t,n){return i.has(e)?new jD(e,t,n,i):new WD(e,t,n)}var K1e,mX,UD,e4,ZS,jD,WD,VD,Rh,JS,qD,KD,$D,GD=N(()=>{Lo();mi();jt();ki();qt();ke();lt();et();ti();fr();He();wt();Pt();y7();Jh();K1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mX=function(i,e){return function(t,n){e(t,n,i)}},e4=new ht("hasWordHighlights",!1);ZS=class{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Jt(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let n=e.getWordAtPosition(t.getPosition());return n?new B(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){let r=t.startLineNumber,o=t.startColumn,s=t.endColumn,a=this._getCurrentWordRange(e,t),l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,d=n.length;!l&&c<d;c++){let u=n.getRange(c);u&&u.startLineNumber===r&&u.startColumn<=o&&u.endColumn>=s&&(l=!0)}return l}cancel(){this.result.cancel()}},jD=class extends ZS{constructor(e,t,n,r){super(e,t,n),this._providers=r}_compute(e,t,n,r){return gX(this._providers,e,t.getPosition(),r).then(o=>o||[])}},WD=class extends ZS{constructor(e,t,n){super(e,t,n),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,n,r){return hf(250,r).then(()=>{if(!t.isEmpty())return[];let o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,n,!1).map(a=>({range:a.range,kind:Qm.Text}))})}isValid(e,t,n){let r=t.isEmpty();return this._selectionIsEmpty!==r?!1:super.isValid(e,t,n)}};Gr("_executeDocumentHighlights",(i,e,t)=>{let n=i.get(Se);return gX(n.documentHighlightProvider,e,t,st.None)});VD=class{constructor(e,t,n,r){this.toUnhook=new le,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.linkedHighlighters=n,this._hasWordHighlights=e4.bindTo(r),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(79),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(o=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(o)})),this.toUnhook.add(e.onDidChangeModelContent(o=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(o=>{let s=this.editor.getOption(79);this.occurrencesHighlight!==s&&(this.occurrencesHighlight=s,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(B.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);ln(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);ln(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,n=e.endColumn,r=this._getWord();if(!r||r.startColumn>t||r.endColumn<n){this._stopAll();return}let o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),o)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let s=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=$1e(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(128)),this.workerRequest.result.then(a=>{s===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},ft)}}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(let t of this.workerRequestValue)t.range&&e.push({range:t.range,options:CY(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations());for(let t of this.linkedHighlighters())(t==null?void 0:t.editor.getModel())===this.editor.getModel()&&(t._stopAll(),t.decorations.set(e),t._hasWordHighlights.set(t.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}},Rh=UD=class extends ce{static get(e){return e.getContribution(UD.ID)}constructor(e,t,n){super(),this.wordHighlighter=null,this.linkedContributions=new Set;let r=()=>{e.hasModel()&&(this.wordHighlighter=new VD(e,n.documentHighlightProvider,()=>kr.map(this.linkedContributions,o=>o.wordHighlighter),t))};this._register(e.onDidChangeModel(o=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),r()})),r()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};Rh.ID="editor.contrib.wordHighlighter";Rh=UD=K1e([mX(1,it),mX(2,Se)],Rh);JS=class extends de{constructor(e,t){super(t),this._isNext=e}run(e,t){let n=Rh.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}},qD=class extends JS{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:b("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:e4,kbOpts:{kbExpr:F.editorTextFocus,primary:65,weight:100}})}},KD=class extends JS{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:b("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:e4,kbOpts:{kbExpr:F.editorTextFocus,primary:1089,weight:100}})}},$D=class extends de{constructor(){super({id:"editor.action.wordHighlight.trigger",label:b("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:e4.toNegated(),kbOpts:{kbExpr:F.editorTextFocus,primary:0,weight:100}})}run(e,t,n){let r=Rh.get(t);r&&r.restoreViewState(!0)}};Ue(Rh.ID,Rh,0);ee(qD);ee(KD);ee($D)});var Ph,tl,il,YD,XD,QD,ZD,JD,eM,tM,iM,nM,rM,oM,sM,aM,lM,cM,dM,Oh,H1,U1,uM,hM,fM,pM,mM,gM,bM,t4=N(()=>{lt();Zv();eg();ane();TP();cne();di();et();An();ti();Un();He();X_();wt();lz();Ph=class extends Fi{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;let r=Uc(t.getOption(128)),o=t.getModel(),a=t.getSelections().map(l=>{let c=new Ie(l.positionLineNumber,l.positionColumn),d=this._move(r,o,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>kP.fromModelSelection(l))),a.length===1){let l=new Ie(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,n){return n?new Qe(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Qe(t.lineNumber,t.column,t.lineNumber,t.column)}},tl=class extends Ph{_move(e,t,n,r){return sf.moveWordLeft(e,t,n,r)}},il=class extends Ph{_move(e,t,n,r){return sf.moveWordRight(e,t,n,r)}},YD=class extends tl{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},XD=class extends tl{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},QD=class extends tl{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(lg,cg))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}},ZD=class extends tl{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},JD=class extends tl{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},eM=class extends tl{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(lg,cg))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}},tM=class extends tl{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Jm.wordSeparators.defaultValue),t,n,r)}},iM=class extends tl{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Jm.wordSeparators.defaultValue),t,n,r)}},nM=class extends il{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},rM=class extends il{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(lg,cg))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}},oM=class extends il{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},sM=class extends il{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},aM=class extends il{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(lg,cg))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}},lM=class extends il{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},cM=class extends il{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Jm.wordSeparators.defaultValue),t,n,r)}},dM=class extends il{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Jm.wordSeparators.defaultValue),t,n,r)}},Oh=class extends Fi{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){let r=e.get(Ot);if(!t.hasModel())return;let o=Uc(t.getOption(128)),s=t.getModel(),a=t.getSelections(),l=t.getOption(6),c=t.getOption(10),d=r.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(f=>{let m=this._delete({wordSeparators:o,model:s,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(8),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new hl(m,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},H1=class extends Oh{_delete(e,t){let n=sf.deleteWordLeft(e,t);return n||new B(1,1,1,1)}},U1=class extends Oh{_delete(e,t){let n=sf.deleteWordRight(e,t);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new B(r,o,r,o)}},uM=class extends H1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:F.writable})}},hM=class extends H1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:F.writable})}},fM=class extends H1{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},pM=class extends U1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:F.writable})}},mM=class extends U1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:F.writable})}},gM=class extends U1{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},bM=class extends de{constructor(){super({id:"deleteInsideWord",precondition:F.writable,label:b("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;let r=Uc(t.getOption(128)),o=t.getModel(),a=t.getSelections().map(l=>{let c=sf.deleteInsideWord(r,o,l);return new hl(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};We(new YD);We(new XD);We(new QD);We(new ZD);We(new JD);We(new eM);We(new nM);We(new rM);We(new oM);We(new sM);We(new aM);We(new lM);We(new tM);We(new iM);We(new cM);We(new dM);We(new uM);We(new hM);We(new fM);We(new pM);We(new mM);We(new gM);ee(bM)});var vM,_M,i4,yM,wM,n4,xM,CM,SM=N(()=>{lt();TP();et();ti();t4();Vi();vM=class extends Oh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let n=Om.deleteWordPartLeft(e);return n||new B(1,1,1,1)}},_M=class extends Oh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=Om.deleteWordPartRight(e);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new B(r,o,r,o)}},i4=class extends Ph{_move(e,t,n,r){return Om.moveWordPartLeft(e,t,n)}},yM=class extends i4{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};Dt.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");wM=class extends i4{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};Dt.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");n4=class extends Ph{_move(e,t,n,r){return Om.moveWordPartRight(e,t,n)}},xM=class extends n4{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},CM=class extends n4{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};We(new vM);We(new _M);We(new yM);We(new wM);We(new xM);We(new CM)});var j1,kM=N(()=>{Ts();ke();lt();M0();He();j1=class extends ce{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=Kn.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(90);t||(this.editor.isSimpleWidget?t=new $i(b("editor.simple.readonly","Cannot edit in read-only input")):t=new $i(b("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};j1.ID="editor.contrib.readOnlyMessageController";Ue(j1.ID,j1,2)});var bX=N(()=>{});var vX=N(()=>{bX()});var IM=Qi(W1=>{vX();Ht();da();ke();lt();fr();yne();Ene();ts();gz();xu();var G1e=W1&&W1.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_X=W1&&W1.__param||function(i,e){return function(t,n){e(t,n,i)}},EM,nm=EM=class extends ce{static get(e){return e.getContribution(EM.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(r=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(r=>this.stop())),this._register(_f.onDidChange(r=>this.stop())),this._register(this._editor.onKeyUp(r=>r.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new r4(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};nm.ID="editor.contrib.inspectTokens";nm=EM=G1e([_X(1,oy),_X(2,en)],nm);var TM=class extends de{constructor(){super({id:"editor.action.inspectTokens",label:bz.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let n=nm.get(t);n==null||n.launch()}};function Y1e(i){let e="";for(let t=0,n=i.length;t<n;t++){let r=i.charCodeAt(t);switch(r){case 9:e+="\u2192";break;case 32:e+="\xB7";break;default:e+=String.fromCharCode(r)}}return e}function X1e(i,e){let t=_f.get(e);if(t)return t;let n=i.encodeLanguageId(e);return{getInitialState:()=>KO,tokenize:(r,o,s)=>$O(e,s),tokenizeEncoded:(r,o,s)=>GO(n,s)}}var r4=class i extends ce{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=X1e(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return i._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){n=l;break}}let r=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){r=l;break}let o=this._model.getLineContent(e.lineNumber),s="";if(n<t.tokens1.length){let l=t.tokens1[n].offset,c=n+1<t.tokens1.length?t.tokens1[n+1].offset:o.length;s=o.substring(l,c)}du(this._domNode,Le("h2.tm-token",void 0,Y1e(s),Le("span.tm-token-length",void 0,`${s.length} ${s.length===1?"char":"chars"}`))),Te(this._domNode,Le("hr.tokens-inspect-separator",{style:"clear:both"}));let a=(r<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(r<<1)+1]):null;Te(this._domNode,Le("table.tm-metadata-table",void 0,Le("tbody",void 0,Le("tr",void 0,Le("td.tm-metadata-key",void 0,"language"),Le("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"token type"),Le("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"font style"),Le("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"foreground"),Le("td.tm-metadata-value",void 0,`${a?vt.Format.CSS.formatHex(a.foreground):"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"background"),Le("td.tm-metadata-value",void 0,`${a?vt.Format.CSS.formatHex(a.background):"-?-"}`))))),Te(this._domNode,Le("hr.tokens-inspect-separator")),n<t.tokens1.length&&Te(this._domNode,Le("span.tm-token-type",void 0,t.tokens1[n].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=_f.getColorMap(),n=mf.getLanguageId(e),r=mf.getTokenType(e),o=mf.getFontStyle(e),s=mf.getForeground(e),a=mf.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(n),tokenType:r,fontStyle:o,foreground:t[s],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),n=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),r=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:n.tokens,tokens2:r.tokens,endState:n.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let n=1;n<e;n++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(n),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};r4._ID="editor.contrib.inspectTokensWidget";Ue(nm.ID,nm,4);ee(TM)});var Q1e,yX,V1,q1,wX=N(()=>{He();ul();ke();Wn();ug();xl();Q1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},yX=function(i,e){return function(t,n){e(t,n,i)}},q1=V1=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=er.as(Ca.Quickaccess)}provide(e){let t=new le;return t.add(e.onDidAccept(()=>{let[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{let r=this.registry.getQuickAccessProvider(n.substr(V1.PREFIX.length));r&&r.prefix&&r.prefix!==V1.PREFIX&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==V1.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let n=t.prefix||e.prefix,r=n||"\u2026";return{prefix:n,label:r,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:b("helpPickAriaLabel","{0}, {1}",r,t.description),description:t.description}})}};q1.PREFIX="?";q1=V1=Q1e([yX(0,rr),yX(1,Kt)],q1)});var LM=N(()=>{ul();ug();xu();wX();er.as(Ca.Quickaccess).registerQuickAccessProvider({ctor:q1,prefix:"",helpEntries:[{description:vz.helpQuickAccessActionLabel}]})});var rm,AM=N(()=>{H9();ke();vk();qc();zO();nr();Lo();rm=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;let r=new le;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=r.add(new Wi);return o.value=this.doProvide(e,t),r.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),r}doProvide(e,t){var n;let r=new le,o=this.activeTextEditorControl;if(o&&this.canProvideWithTextEditor(o)){let s={editor:o},a=K_(o);if(a){let l=(n=o.saveViewState())!==null&&n!==void 0?n:void 0;r.add(a.onDidChangeCursorPosition(()=>{var c;l=(c=o.saveViewState())!==null&&c!==void 0?c:void 0})),s.restoreViewState=()=>{l&&o===this.activeTextEditorControl&&o.restoreViewState(l)},r.add(Ov(t.onCancellationRequested)(()=>{var c;return(c=s.restoreViewState)===null||c===void 0?void 0:c.call(s)}))}r.add(ni(()=>this.clearDecorations(o))),r.add(this.provideWithTextEditor(s,e,t))}else r.add(this.provideWithoutTextEditor(e,t));return r}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let n=e.getModel();n&&"getLineContent"in n&&uu(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return OF(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{let r=[];this.rangeHighlightDecorationId&&(r.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),r.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let o=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Ei(y_),position:Yr.Full}}}],[s,a]=n.deltaDecorations(r,o);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}});var K1,xX=N(()=>{ke();vk();AM();He();K1=class i extends rm{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=b("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,ce.None}provideWithTextEditor(e,t,n){let r=e.editor,o=new le;o.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(r,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));let s=()=>{let l=this.parsePosition(r,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(r,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(r,l.lineNumber)){this.clearDecorations(r);return}let d=this.toRange(l.lineNumber,l.column);r.revealRangeInCenter(d,0),this.addDecorations(r,d)};s(),o.add(t.onDidChangeValue(()=>s()));let a=K_(r);return a&&a.getOptions().get(66).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(ni(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let n=t.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),r=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:r+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?b("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):b("gotoLineLabel","Go to line {0}.",t);let r=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?b("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,o):b("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",r.lineNumber,r.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;let r=this.getModel(e);if(!r)return!1;let o={lineNumber:t,column:n};return r.validatePosition(o).equals(o)}lineCount(e){var t,n;return(n=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&n!==void 0?n:0}};K1.PREFIX=":"});var Z1e,J1e,$1,G1,DM=N(()=>{xX();ul();ug();Ir();xu();ei();lt();ti();xl();Z1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},J1e=function(i,e){return function(t,n){e(t,n,i)}},$1=class extends K1{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=ci.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};$1=Z1e([J1e(0,ai)],$1);G1=class i extends de{constructor(){super({id:i.ID,label:Rk.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(rr).quickAccess.show($1.PREFIX)}};G1.ID="editor.action.gotoLine";ee(G1);er.as(Ca.Quickaccess).registerQuickAccessProvider({ctor:$1,prefix:$1.PREFIX,helpEntries:[{description:Rk.gotoLineActionLabel,commandId:G1.ID}]})});function s4(i,e,t=0,n=0){let r=e;return r.values&&r.values.length>1?eve(i,r.values,t,n):EX(i,e,t,n)}function eve(i,e,t,n){let r=0,o=[];for(let s of e){let[a,l]=EX(i,s,t,n);if(typeof a!="number")return kX;r+=a,o.push(...l)}return[r,tve(o)]}function EX(i,e,t,n){let r=l_(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return r?[r[0],gu(r)]:kX}function tve(i){let e=i.sort((r,o)=>r.start-o.start),t=[],n;for(let r of e)!n||!ive(n,r)?(n=r,t.push(r)):(n.start=Math.min(n.start,r.start),n.end=Math.max(n.end,r.end));return t}function ive(i,e){return!(i.end<e.start||e.end<i.start)}function CX(i){return i.startsWith('"')&&i.endsWith('"')}function o4(i){typeof i!="string"&&(i="");let e=i.toLowerCase(),{pathNormalized:t,normalized:n,normalizedLowercase:r}=SX(i),o=t.indexOf(qv)>=0,s=CX(i),a,l=i.split(TX);if(l.length>1)for(let c of l){let d=CX(c),{pathNormalized:u,normalized:h,normalizedLowercase:f}=SX(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:f,expectContiguousMatch:d}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:r,values:a,containsPathSeparator:o,expectContiguousMatch:s}}function SX(i){let e;Rc?e=i.replace(/\//g,qv):e=i.replace(/\\/g,qv);let t=pP(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function MM(i){return Array.isArray(i)?o4(i.map(e=>e.original).join(TX)):o4(i.original)}var kX,ovt,TX,IX=N(()=>{ml();tP();Tr();Ni();kX=[void 0,[]];ovt=Object.freeze({score:0});TX=" "});var nve,LX,Y1,om,Xs,NM,RM,AX=N(()=>{jt();ki();Jn();Lr();IX();ke();Ni();et();fr();R1();AM();He();Pt();mi();nve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},LX=function(i,e){return function(t,n){e(t,n,i)}},Y1=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Xs=om=class extends rm{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,b("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ce.None}provideWithTextEditor(e,t,n){let r=e.editor,o=this.getModel(r);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,n):this.doProvideWithoutEditorSymbols(e,o,t,n):ce.None}doProvideWithoutEditorSymbols(e,t,n,r){let o=new le;return this.provideLabelPick(n,b("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),Y1(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,o))||r.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,n,r))}),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return Y1(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let n=new f_,r=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(r.dispose(),n.complete(!0))}));return t.add(ni(()=>n.complete(!1))),n.p})}doProvideWithEditorSymbols(e,t,n,r){var o;let s=e.editor,a=new le;a.add(n.onDidAccept(u=>{let[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:u.inBackground}),u.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));let l=this.getDocumentSymbols(t,r),c,d=u=>Y1(this,void 0,void 0,function*(){c==null||c.dispose(!0),n.busy=!1,c=new zi(r),n.busy=!0;try{let h=o4(n.value.substr(om.PREFIX.length).trim()),f=yield this.doGetSymbolPicks(l,h,void 0,c.token);if(r.isCancellationRequested)return;if(f.length>0){if(n.items=f,u&&h.original.length===0){let m=MP(f,g=>!!(g.type!=="separator"&&g.range&&B.containsPosition(g.range.decoration,u)));m&&(n.activeItems=[m])}}else h.original.length>0?this.provideLabelPick(n,b("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,b("noSymbolResults","No editor symbols"))}finally{r.isCancellationRequested||(n.busy=!1)}});return a.add(n.onDidChangeValue(()=>d(void 0))),d((o=s.getSelection())===null||o===void 0?void 0:o.getPosition()),a.add(n.onDidChangeActive(()=>{let[u]=n.activeItems;u&&u.range&&(s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration))})),a}doGetSymbolPicks(e,t,n,r){var o,s;return Y1(this,void 0,void 0,function*(){let a=yield e;if(r.isCancellationRequested)return[];let l=t.original.indexOf(om.SCOPE_PREFIX)===0,c=l?1:0,d,u;t.values&&t.values.length>1?(d=MM(t.values[0]),u=MM(t.values.slice(1))):d=t;let h,f=(s=(o=this.options)===null||o===void 0?void 0:o.openSideBySideDirection)===null||s===void 0?void 0:s.call(o);f&&(h=[{iconClass:f==="right"?_t.asClassName(pt.splitHorizontal):_t.asClassName(pt.splitVertical),tooltip:f==="right"?b("openToSide","Open to the Side"):b("openToBottom","Open to the Bottom")}]);let m=[];for(let _=0;_<a.length;_++){let E=a[_],A=fP(E.name),L=`$(${VO.toIcon(E.kind).id}) ${A}`,O=L.length-A.length,U=E.containerName;n!=null&&n.extraContainerLabel&&(U?U=`${n.extraContainerLabel} \u2022 ${U}`:U=n.extraContainerLabel);let Q,ae,te,Z;if(t.original.length>c){let Pe=!1;if(d!==t&&([Q,ae]=s4(L,Object.assign(Object.assign({},t),{values:void 0}),c,O),typeof Q=="number"&&(Pe=!0)),typeof Q!="number"&&([Q,ae]=s4(L,d,c,O),typeof Q!="number"))continue;if(!Pe&&u){if(U&&u.original.length>0&&([te,Z]=s4(U,u)),typeof te!="number")continue;typeof Q=="number"&&(Q+=te)}}let ve=E.tags&&E.tags.indexOf(1)>=0;m.push({index:_,kind:E.kind,score:Q,label:L,ariaLabel:WO(E.name,E.kind),description:U,highlights:ve?void 0:{label:ae,description:Z},range:{selection:B.collapseToStart(E.selectionRange),decoration:E.range},strikethrough:ve,buttons:h})}let g=m.sort((_,E)=>l?this.compareByKindAndScore(_,E):this.compareByScore(_,E)),w=[];if(l){let L=function(){E&&typeof _=="number"&&A>0&&(E.label=rf(RM[_]||NM,A))},_,E,A=0;for(let O of g)_!==O.kind?(L(),_=O.kind,A=1,E={type:"separator"},w.push(E)):A++,w.push(O);L()}else g.length>0&&(w=[{label:b("symbols","symbols ({0})",m.length),type:"separator"},...g]);return w})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){let n=RM[e.kind]||NM,r=RM[t.kind]||NM,o=n.localeCompare(r);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return Y1(this,void 0,void 0,function*(){let n=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()})}};Xs.PREFIX="@";Xs.SCOPE_PREFIX=":";Xs.PREFIX_BY_CATEGORY=`${om.PREFIX}${om.SCOPE_PREFIX}`;Xs=om=nve([LX(0,Se),LX(1,Ah)],Xs);NM=b("property","properties ({0})"),RM={5:b("method","methods ({0})"),11:b("function","functions ({0})"),8:b("_constructor","constructors ({0})"),12:b("variable","variables ({0})"),4:b("class","classes ({0})"),22:b("struct","structs ({0})"),23:b("event","events ({0})"),24:b("operator","operators ({0})"),10:b("interface","interfaces ({0})"),2:b("namespace","namespaces ({0})"),3:b("package","packages ({0})"),25:b("typeParameter","type parameters ({0})"),1:b("modules","modules ({0})"),6:b("property","properties ({0})"),9:b("enum","enumerations ({0})"),21:b("enumMember","enumeration members ({0})"),14:b("string","strings ({0})"),0:b("file","files ({0})"),17:b("array","arrays ({0})"),15:b("number","numbers ({0})"),16:b("boolean","booleans ({0})"),18:b("object","objects ({0})"),19:b("key","keys ({0})"),7:b("field","fields ({0})"),13:b("constant","constants ({0})")}});var rve,PM,OM,X1,FM=N(()=>{D0();Lx();AX();ul();ug();Ir();xu();ei();lt();ti();xl();R1();Pt();rve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},PM=function(i,e){return function(t,n){e(t,n,i)}},OM=class extends Xs{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=ci.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};OM=rve([PM(0,ai),PM(1,Se),PM(2,Ah)],OM);X1=class i extends de{constructor(){super({id:i.ID,label:sy.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:F.hasDocumentSymbolProvider,kbOpts:{kbExpr:F.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(rr).quickAccess.show(Xs.PREFIX,{itemActivation:xF.NONE})}};X1.ID="editor.action.quickOutline";ee(X1);er.as(Ca.Quickaccess).registerQuickAccessProvider({ctor:OM,prefix:Xs.PREFIX,helpEntries:[{description:sy.quickOutlineActionLabel,prefix:Xs.PREFIX,commandId:X1.ID},{description:sy.quickOutlineByCategoryActionLabel,prefix:Xs.PREFIX_BY_CATEGORY}]})});function zM(i,e){return e&&(i.stack||i.stacktrace)?b("stackTrace.format","{0}: {1}",MX(i),DX(i.stack)||DX(i.stacktrace)):MX(i)}function DX(i){return Array.isArray(i)?i.join(`
`):i}function MX(i){return i.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof i.code=="string"&&typeof i.errno=="number"&&typeof i.syscall=="string"?b("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||b("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function BM(i=null,e=!1){if(!i)return b("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=hr(i),n=BM(t[0],e);return t.length>1?b("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(Bv(i))return i;if(i.detail){let t=i.detail;if(t.error)return zM(t.error,e);if(t.exception)return zM(t.exception,e)}return i.stack?zM(i,e):i.message?i.message:b("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var NX=N(()=>{mi();Bn();He()});function HM(i){let e=i;return Array.isArray(e.items)}function RX(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var Q1,sm,a4,PX=N(()=>{jt();ki();ke();Bn();Q1=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(sm||(sm={}));a4=class extends ce{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var r;let o=new le;e.canAcceptInBackground=!!(!((r=this.options)===null||r===void 0)&&r.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s,a=o.add(new Wi),l=()=>Q1(this,void 0,void 0,function*(){let c=a.value=new le;s==null||s.dispose(!0),e.busy=!1,s=new zi(t);let d=s.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,c,d,n),f=(g,w)=>{var _;let E,A;if(HM(g)?(E=g.items,A=g.active):E=g,E.length===0){if(w)return!1;(u.length>0||e.hideInput)&&(!((_=this.options)===null||_===void 0)&&_.noResultsPick)&&(G9(this.options.noResultsPick)?E=[this.options.noResultsPick(u)]:E=[this.options.noResultsPick])}return e.items=E,A&&(e.activeItems=[A]),!0},m=g=>Q1(this,void 0,void 0,function*(){let w=!1,_=!1;yield Promise.all([(()=>Q1(this,void 0,void 0,function*(){typeof g.mergeDelay=="number"&&(yield hf(g.mergeDelay),d.isCancellationRequested)||_||(w=f(g.picks,!0))}))(),(()=>Q1(this,void 0,void 0,function*(){e.busy=!0;try{let E=yield g.additionalPicks;if(d.isCancellationRequested)return;let A,L;HM(g.picks)?(A=g.picks.items,L=g.picks.active):A=g.picks;let O,U;if(HM(E)?(O=E.items,U=E.active):O=E,O.length>0||!w){let Q;if(!L&&!U){let ae=e.activeItems[0];ae&&A.indexOf(ae)!==-1&&(Q=ae)}f({items:[...A,...O],active:L||U||Q})}}finally{d.isCancellationRequested||(e.busy=!1),_=!0}}))()])});if(h!==null)if(RX(h))yield m(h);else if(!(h instanceof Promise))f(h);else{e.busy=!0;try{let g=yield h;if(d.isCancellationRequested)return;RX(g)?yield m(g):f(g)}finally{d.isCancellationRequested||(e.busy=!1)}}});return o.add(e.onDidChangeValue(()=>l())),l(),o.add(e.onDidAccept(c=>{let[d]=e.selectedItems;typeof(d==null?void 0:d.accept)=="function"&&(c.inBackground||e.hide(),d.accept(e.keyMods,c))})),o.add(e.onDidTriggerItemButton(({button:c,item:d})=>Q1(this,void 0,void 0,function*(){var u,h;if(typeof d.trigger=="function"){let f=(h=(u=d.buttons)===null||u===void 0?void 0:u.indexOf(c))!==null&&h!==void 0?h:-1;if(f>=0){let m=d.trigger(f,e.keyMods),g=typeof m=="number"?m:yield m;if(t.isCancellationRequested)return;switch(g){case sm.NO_ACTION:break;case sm.CLOSE_PICKER:e.hide();break;case sm.REFRESH_PICKER:l();break;case sm.REMOVE_ITEM:{let w=e.items.indexOf(d);if(w!==-1){let _=e.items.slice(),E=_.splice(w,1),A=e.activeItems.filter(O=>O!==E[0]),L=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,A&&(e.activeItems=A),e.keepScrollPosition=L}break}}}}}))),o}}});var OX,Fh,UM,Z1,fn,am,zh,FX=N(()=>{NX();qt();ml();ke();df();He();Vi();kn();Nk();Ut();Wn();PX();wu();Bc();OX=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Fh=function(i,e){return function(t,n){e(t,n,i)}},UM=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},am=Z1=class extends a4{constructor(e,t,n,r,o,s){super(Z1.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=r,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(zh)),this.options=e}_getPicks(e,t,n,r){var o,s,a,l;return UM(this,void 0,void 0,function*(){let c=yield this.getCommandPicks(n);if(n.isCancellationRequested)return[];let d=[];for(let g of c){let w=(o=Z1.WORD_FILTER(e,g.label))!==null&&o!==void 0?o:void 0,_=g.commandAlias&&(s=Z1.WORD_FILTER(e,g.commandAlias))!==null&&s!==void 0?s:void 0;w||_?(g.highlights={label:w,detail:this.options.showAlias?_:void 0},d.push(g)):e===g.commandId&&d.push(g)}let u=new Map;for(let g of d){let w=u.get(g.label);w?(g.description=g.commandId,w.description=w.commandId):u.set(g.label,g)}d.sort((g,w)=>{let _=this.commandsHistory.peek(g.commandId),E=this.commandsHistory.peek(w.commandId);if(_&&E)return _>E?-1:1;if(_)return-1;if(E)return 1;if(this.options.suggestedCommandIds){let A=this.options.suggestedCommandIds.has(g.commandId),L=this.options.suggestedCommandIds.has(w.commandId);if(A&&L)return 0;if(A)return-1;if(L)return 1}return g.label.localeCompare(w.label)});let h=[],f=!1,m=!!this.options.suggestedCommandIds;for(let g=0;g<d.length;g++){let w=d[g];g===0&&this.commandsHistory.peek(w.commandId)&&(h.push({type:"separator",label:b("recentlyUsed","recently used")}),f=!0),m&&!this.commandsHistory.peek(w.commandId)&&(!((a=this.options.suggestedCommandIds)===null||a===void 0)&&a.has(w.commandId))&&(h.push({type:"separator",label:b("commonlyUsed","commonly used")}),f=!0,m=!1),f&&!this.commandsHistory.peek(w.commandId)&&!(!((l=this.options.suggestedCommandIds)===null||l===void 0)&&l.has(w.commandId))&&(h.push({type:"separator",label:b("morecCommands","other commands")}),f=!1),h.push(this.toCommandPick(w,r))}return this.hasAdditionalCommandPicks(e,n)?{picks:h,additionalPicks:(()=>UM(this,void 0,void 0,function*(){let g=yield this.getAdditionalCommandPicks(c,d,e,n);return n.isCancellationRequested?[]:g.map(w=>this.toCommandPick(w,r))}))()}:h})}toCommandPick(e,t){if(e.type==="separator")return e;let n=this.keybindingService.lookupKeybinding(e.commandId),r=n?b("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:r,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:()=>UM(this,void 0,void 0,function*(){var o,s;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(o=t==null?void 0:t.from)!==null&&o!==void 0?o:"quick open"});try{!((s=e.args)===null||s===void 0)&&s.length?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(a){Xo(a)||this.dialogService.error(b("canNotRun","Command '{0}' resulted in an error",e.label),BM(a))}})})}};am.PREFIX=">";am.WORD_FILTER=UP(jP,qP,WP);am=Z1=OX([Fh(1,Ke),Fh(2,Kt),Fh(3,_i),Fh(4,Ar),Fh(5,Ef)],am);zh=fn=class extends ce{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e)))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=fn.getConfiguredCommandHistoryLength(this.configurationService),fn.cache&&fn.cache.limit!==this.configuredCommandsHistoryLength&&(fn.cache.limit=this.configuredCommandsHistoryLength,fn.saveState(this.storageService)))}load(){let e=this.storageService.get(fn.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch(r){}let n=fn.cache=new aa(this.configuredCommandsHistoryLength,1);if(t){let r;t.usesLRU?r=t.entries:r=t.entries.sort((o,s)=>o.value-s.value),r.forEach(o=>n.set(o.key,o.value))}fn.counter=this.storageService.getNumber(fn.PREF_KEY_COUNTER,0,fn.counter)}push(e){fn.cache&&(fn.cache.set(e,fn.counter++),fn.saveState(this.storageService))}peek(e){var t;return(t=fn.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!fn.cache)return;let t={usesLRU:!0,entries:[]};fn.cache.forEach((n,r)=>t.entries.push({key:r,value:n})),e.store(fn.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(fn.PREF_KEY_COUNTER,fn.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,n;let o=(n=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||n===void 0?void 0:n.history;return typeof o=="number"?o:fn.DEFAULT_COMMANDS_HISTORY_LENGTH}};zh.DEFAULT_COMMANDS_HISTORY_LENGTH=50;zh.PREF_KEY_CACHE="commandPalette.mru.cache";zh.PREF_KEY_COUNTER="commandPalette.mru.counter";zh.counter=1;zh=fn=OX([Fh(0,Xr),Fh(1,Mt)],zh)});var l4,zX=N(()=>{mne();FX();l4=class extends am{constructor(e,t,n,r,o,s){super(e,t,n,r,o,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:GP(n.label)||n.id});return t}}});var ove,lm,BX,J1,ev,jM=N(()=>{ul();ug();xu();Ir();zX();Ut();Wn();Vi();Bc();Nk();lt();ti();xl();ove=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lm=function(i,e){return function(t,n){e(t,n,i)}},BX=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},J1=class extends l4{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,n,r,o,s){super({showAlias:!1},e,n,r,o,s),this.codeEditorService=t}getCommandPicks(){return BX(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return BX(this,void 0,void 0,function*(){return[]})}};J1=ove([lm(0,Ke),lm(1,ai),lm(2,Kt),lm(3,_i),lm(4,Ar),lm(5,Ef)],J1);ev=class i extends de{constructor(){super({id:i.ID,label:Pk.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(rr).quickAccess.show(J1.PREFIX)}};ev.ID="editor.action.quickCommand";ee(ev);er.as(Ca.Quickaccess).registerQuickAccessProvider({ctor:J1,prefix:J1.PREFIX,helpEntries:[{description:Pk.quickCommandHelp,commandId:ev.ID}]})});var sve,cm,WM,VM=N(()=>{lt();Ir();MA();kn();wt();Ut();No();wu();sve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},cm=function(i,e){return function(t,n){e(t,n,i)}},WM=class extends Qa{constructor(e,t,n,r,o,s,a){super(!0,e,t,n,r,o,s,a)}};WM=sve([cm(1,it),cm(2,ai),cm(3,Ri),cm(4,Ke),cm(5,Xr),cm(6,Mt)],WM);Ue(Qa.ID,WM,4)});function mve(){return import("./jsonMode-ILQOKGQC.js")}var ave,lve,cve,dve,HX,uve,tv,hve,fve,pve,UX,qM=N(()=>{Rs();Rs();ave=Object.defineProperty,lve=Object.getOwnPropertyDescriptor,cve=Object.getOwnPropertyNames,dve=Object.prototype.hasOwnProperty,HX=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of cve(e))!dve.call(i,r)&&r!==t&&ave(i,r,{get:()=>e[r],enumerable:!(n=lve(e,r))||n.enumerable});return i},uve=(i,e,t)=>(HX(i,e,"default"),t&&HX(t,e,"default")),tv={};uve(tv,Ns);hve=class{constructor(i,e,t){Cn(this,"_onDidChange",new tv.Emitter);Cn(this,"_diagnosticsOptions");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(i){this._diagnosticsOptions=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},fve={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},pve={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},UX=new hve("json",fve,pve);tv.languages.json={jsonDefaults:UX};tv.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});tv.languages.onLanguage("json",()=>{mve().then(i=>i.setupMode(UX))})});function ie(i){let e=i.id;WX[e]=i,iv.languages.register(i);let t=VX.getOrCreate(e);iv.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),iv.languages.onLanguageEncountered(e,async()=>{let n=await t.load();iv.languages.setLanguageConfiguration(e,n.conf)})}var gve,bve,vve,_ve,jX,yve,iv,WX,KM,VX,Ge=N(()=>{Rs();gve=Object.defineProperty,bve=Object.getOwnPropertyDescriptor,vve=Object.getOwnPropertyNames,_ve=Object.prototype.hasOwnProperty,jX=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of vve(e))!_ve.call(i,r)&&r!==t&&gve(i,r,{get:()=>e[r],enumerable:!(n=bve(e,r))||n.enumerable});return i},yve=(i,e,t)=>(jX(i,e,"default"),t&&jX(t,e,"default")),iv={};yve(iv,Ns);WX={},KM={},VX=class{constructor(i){Cn(this,"_languageId");Cn(this,"_loadingTriggered");Cn(this,"_lazyLoadPromise");Cn(this,"_lazyLoadPromiseResolve");Cn(this,"_lazyLoadPromiseReject");this._languageId=i,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(i){return KM[i]||(KM[i]=new VX(i)),KM[i]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,WX[this._languageId].loader().then(i=>this._lazyLoadPromiseResolve(i),i=>this._lazyLoadPromiseReject(i))),this._lazyLoadPromise}}});var $M=N(()=>{Ge();ie({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>import("./elixir-I7MUXEB2.js")})});var GM=N(()=>{Ge();ie({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>import("./markdown-GNMXFE7H.js")})});var YM=N(()=>{Ge();ie({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>import("./javascript-6A7FQGGU.js")})});var XM=N(()=>{Ge();ie({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>import("./sql-5LBGPTDB.js")})});var QM=N(()=>{Ge();ie({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>import("./css-MRJBVA6L.js")})});var ZM=N(()=>{Ge();ie({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>import("./html-CMHOMJOM.js")})});var JM=N(()=>{Ge();ie({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>import("./xml-5NTT7CCO.js")})});var eN=N(()=>{Ge();ie({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>import("./dockerfile-QFITLKOJ.js")})});var tQ=Qi(()=>{});var d4=Qi((c4,iQ)=>{(function(i,e){typeof c4=="object"?iQ.exports=c4=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})(c4,function(){var i=i||function(e,t){var n;if(typeof window!="undefined"&&window.crypto&&(n=window.crypto),typeof self!="undefined"&&self.crypto&&(n=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window!="undefined"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global!="undefined"&&global.crypto&&(n=global.crypto),!n&&typeof lu=="function")try{n=tQ()}catch(_){}var r=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(_){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(_){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function _(){}return function(E){var A;return _.prototype=E,A=new _,_.prototype=null,A}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(_){var E=o(this);return _&&E.mixIn(_),(!E.hasOwnProperty("init")||this.init===E.init)&&(E.init=function(){E.$super.init.apply(this,arguments)}),E.init.prototype=E,E.$super=this,E},create:function(){var _=this.extend();return _.init.apply(_,arguments),_},init:function(){},mixIn:function(_){for(var E in _)_.hasOwnProperty(E)&&(this[E]=_[E]);_.hasOwnProperty("toString")&&(this.toString=_.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(_,E){_=this.words=_||[],E!=t?this.sigBytes=E:this.sigBytes=_.length*4},toString:function(_){return(_||u).stringify(this)},concat:function(_){var E=this.words,A=_.words,L=this.sigBytes,O=_.sigBytes;if(this.clamp(),L%4)for(var U=0;U<O;U++){var Q=A[U>>>2]>>>24-U%4*8&255;E[L+U>>>2]|=Q<<24-(L+U)%4*8}else for(var ae=0;ae<O;ae+=4)E[L+ae>>>2]=A[ae>>>2];return this.sigBytes+=O,this},clamp:function(){var _=this.words,E=this.sigBytes;_[E>>>2]&=4294967295<<32-E%4*8,_.length=e.ceil(E/4)},clone:function(){var _=l.clone.call(this);return _.words=this.words.slice(0),_},random:function(_){for(var E=[],A=0;A<_;A+=4)E.push(r());return new c.init(E,_)}}),d=s.enc={},u=d.Hex={stringify:function(_){for(var E=_.words,A=_.sigBytes,L=[],O=0;O<A;O++){var U=E[O>>>2]>>>24-O%4*8&255;L.push((U>>>4).toString(16)),L.push((U&15).toString(16))}return L.join("")},parse:function(_){for(var E=_.length,A=[],L=0;L<E;L+=2)A[L>>>3]|=parseInt(_.substr(L,2),16)<<24-L%8*4;return new c.init(A,E/2)}},h=d.Latin1={stringify:function(_){for(var E=_.words,A=_.sigBytes,L=[],O=0;O<A;O++){var U=E[O>>>2]>>>24-O%4*8&255;L.push(String.fromCharCode(U))}return L.join("")},parse:function(_){for(var E=_.length,A=[],L=0;L<E;L++)A[L>>>2]|=(_.charCodeAt(L)&255)<<24-L%4*8;return new c.init(A,E)}},f=d.Utf8={stringify:function(_){try{return decodeURIComponent(escape(h.stringify(_)))}catch(E){throw new Error("Malformed UTF-8 data")}},parse:function(_){return h.parse(unescape(encodeURIComponent(_)))}},m=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(_){typeof _=="string"&&(_=f.parse(_)),this._data.concat(_),this._nDataBytes+=_.sigBytes},_process:function(_){var E,A=this._data,L=A.words,O=A.sigBytes,U=this.blockSize,Q=U*4,ae=O/Q;_?ae=e.ceil(ae):ae=e.max((ae|0)-this._minBufferSize,0);var te=ae*U,Z=e.min(te*4,O);if(te){for(var ve=0;ve<te;ve+=U)this._doProcessBlock(L,ve);E=L.splice(0,te),A.sigBytes-=Z}return new c.init(E,Z)},clone:function(){var _=l.clone.call(this);return _._data=this._data.clone(),_},_minBufferSize:0}),g=a.Hasher=m.extend({cfg:l.extend(),init:function(_){this.cfg=this.cfg.extend(_),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(_){return this._append(_),this._process(),this},finalize:function(_){_&&this._append(_);var E=this._doFinalize();return E},blockSize:512/32,_createHelper:function(_){return function(E,A){return new _.init(A).finalize(E)}},_createHmacHelper:function(_){return function(E,A){return new w.HMAC.init(_,A).finalize(E)}}}),w=s.algo={};return s}(Math);return i})});var rQ=Qi((u4,nQ)=>{(function(i,e){typeof u4=="object"?nQ.exports=u4=e(d4()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(u4,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[];(function(){for(var f=0;f<64;f++)a[f]=e.abs(e.sin(f+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(f,m){for(var g=0;g<16;g++){var w=m+g,_=f[w];f[w]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var E=this._hash.words,A=f[m+0],L=f[m+1],O=f[m+2],U=f[m+3],Q=f[m+4],ae=f[m+5],te=f[m+6],Z=f[m+7],ve=f[m+8],Pe=f[m+9],Ee=f[m+10],Oe=f[m+11],Xe=f[m+12],dt=f[m+13],be=f[m+14],we=f[m+15],Y=E[0],R=E[1],re=E[2],me=E[3];Y=c(Y,R,re,me,A,7,a[0]),me=c(me,Y,R,re,L,12,a[1]),re=c(re,me,Y,R,O,17,a[2]),R=c(R,re,me,Y,U,22,a[3]),Y=c(Y,R,re,me,Q,7,a[4]),me=c(me,Y,R,re,ae,12,a[5]),re=c(re,me,Y,R,te,17,a[6]),R=c(R,re,me,Y,Z,22,a[7]),Y=c(Y,R,re,me,ve,7,a[8]),me=c(me,Y,R,re,Pe,12,a[9]),re=c(re,me,Y,R,Ee,17,a[10]),R=c(R,re,me,Y,Oe,22,a[11]),Y=c(Y,R,re,me,Xe,7,a[12]),me=c(me,Y,R,re,dt,12,a[13]),re=c(re,me,Y,R,be,17,a[14]),R=c(R,re,me,Y,we,22,a[15]),Y=d(Y,R,re,me,L,5,a[16]),me=d(me,Y,R,re,te,9,a[17]),re=d(re,me,Y,R,Oe,14,a[18]),R=d(R,re,me,Y,A,20,a[19]),Y=d(Y,R,re,me,ae,5,a[20]),me=d(me,Y,R,re,Ee,9,a[21]),re=d(re,me,Y,R,we,14,a[22]),R=d(R,re,me,Y,Q,20,a[23]),Y=d(Y,R,re,me,Pe,5,a[24]),me=d(me,Y,R,re,be,9,a[25]),re=d(re,me,Y,R,U,14,a[26]),R=d(R,re,me,Y,ve,20,a[27]),Y=d(Y,R,re,me,dt,5,a[28]),me=d(me,Y,R,re,O,9,a[29]),re=d(re,me,Y,R,Z,14,a[30]),R=d(R,re,me,Y,Xe,20,a[31]),Y=u(Y,R,re,me,ae,4,a[32]),me=u(me,Y,R,re,ve,11,a[33]),re=u(re,me,Y,R,Oe,16,a[34]),R=u(R,re,me,Y,be,23,a[35]),Y=u(Y,R,re,me,L,4,a[36]),me=u(me,Y,R,re,Q,11,a[37]),re=u(re,me,Y,R,Z,16,a[38]),R=u(R,re,me,Y,Ee,23,a[39]),Y=u(Y,R,re,me,dt,4,a[40]),me=u(me,Y,R,re,A,11,a[41]),re=u(re,me,Y,R,U,16,a[42]),R=u(R,re,me,Y,te,23,a[43]),Y=u(Y,R,re,me,Pe,4,a[44]),me=u(me,Y,R,re,Xe,11,a[45]),re=u(re,me,Y,R,we,16,a[46]),R=u(R,re,me,Y,O,23,a[47]),Y=h(Y,R,re,me,A,6,a[48]),me=h(me,Y,R,re,Z,10,a[49]),re=h(re,me,Y,R,be,15,a[50]),R=h(R,re,me,Y,ae,21,a[51]),Y=h(Y,R,re,me,Xe,6,a[52]),me=h(me,Y,R,re,U,10,a[53]),re=h(re,me,Y,R,Ee,15,a[54]),R=h(R,re,me,Y,L,21,a[55]),Y=h(Y,R,re,me,ve,6,a[56]),me=h(me,Y,R,re,we,10,a[57]),re=h(re,me,Y,R,te,15,a[58]),R=h(R,re,me,Y,dt,21,a[59]),Y=h(Y,R,re,me,Q,6,a[60]),me=h(me,Y,R,re,Oe,10,a[61]),re=h(re,me,Y,R,O,15,a[62]),R=h(R,re,me,Y,Pe,21,a[63]),E[0]=E[0]+Y|0,E[1]=E[1]+R|0,E[2]=E[2]+re|0,E[3]=E[3]+me|0},_doFinalize:function(){var f=this._data,m=f.words,g=this._nDataBytes*8,w=f.sigBytes*8;m[w>>>5]|=128<<24-w%32;var _=e.floor(g/4294967296),E=g;m[(w+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,m[(w+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,f.sigBytes=(m.length+1)*4,this._process();for(var A=this._hash,L=A.words,O=0;O<4;O++){var U=L[O];L[O]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360}return A},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});function c(f,m,g,w,_,E,A){var L=f+(m&g|~m&w)+_+A;return(L<<E|L>>>32-E)+m}function d(f,m,g,w,_,E,A){var L=f+(m&w|g&~w)+_+A;return(L<<E|L>>>32-E)+m}function u(f,m,g,w,_,E,A){var L=f+(m^g^w)+_+A;return(L<<E|L>>>32-E)+m}function h(f,m,g,w,_,E,A){var L=f+(g^(m|~w))+_+A;return(L<<E|L>>>32-E)+m}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),i.MD5})});var sQ=Qi((h4,oQ)=>{(function(i,e){typeof h4=="object"?oQ.exports=h4=e(d4()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(h4,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[],l=[];(function(){function u(g){for(var w=e.sqrt(g),_=2;_<=w;_++)if(!(g%_))return!1;return!0}function h(g){return(g-(g|0))*4294967296|0}for(var f=2,m=0;m<64;)u(f)&&(m<8&&(a[m]=h(e.pow(f,1/2))),l[m]=h(e.pow(f,1/3)),m++),f++})();var c=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(u,h){for(var f=this._hash.words,m=f[0],g=f[1],w=f[2],_=f[3],E=f[4],A=f[5],L=f[6],O=f[7],U=0;U<64;U++){if(U<16)c[U]=u[h+U]|0;else{var Q=c[U-15],ae=(Q<<25|Q>>>7)^(Q<<14|Q>>>18)^Q>>>3,te=c[U-2],Z=(te<<15|te>>>17)^(te<<13|te>>>19)^te>>>10;c[U]=ae+c[U-7]+Z+c[U-16]}var ve=E&A^~E&L,Pe=m&g^m&w^g&w,Ee=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),Oe=(E<<26|E>>>6)^(E<<21|E>>>11)^(E<<7|E>>>25),Xe=O+Oe+ve+l[U]+c[U],dt=Ee+Pe;O=L,L=A,A=E,E=_+Xe|0,_=w,w=g,g=m,m=Xe+dt|0}f[0]=f[0]+m|0,f[1]=f[1]+g|0,f[2]=f[2]+w|0,f[3]=f[3]+_|0,f[4]=f[4]+E|0,f[5]=f[5]+A|0,f[6]=f[6]+L|0,f[7]=f[7]+O|0},_doFinalize:function(){var u=this._data,h=u.words,f=this._nDataBytes*8,m=u.sigBytes*8;return h[m>>>5]|=128<<24-m%32,h[(m+64>>>9<<4)+14]=e.floor(f/4294967296),h[(m+64>>>9<<4)+15]=f,u.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var u=o.clone.call(this);return u._hash=this._hash.clone(),u}});t.SHA256=o._createHelper(d),t.HmacSHA256=o._createHmacHelper(d)}(Math),i.SHA256})});var lQ=Qi((f4,aQ)=>{(function(i,e){typeof f4=="object"?aQ.exports=f4=e(d4()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(f4,function(i){return function(){var e=i,t=e.lib,n=t.WordArray,r=e.enc,o=r.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var u=[],h=0;h<c;h+=3)for(var f=l[h>>>2]>>>24-h%4*8&255,m=l[h+1>>>2]>>>24-(h+1)%4*8&255,g=l[h+2>>>2]>>>24-(h+2)%4*8&255,w=f<<16|m<<8|g,_=0;_<4&&h+_*.75<c;_++)u.push(d.charAt(w>>>6*(3-_)&63));var E=d.charAt(64);if(E)for(;u.length%4;)u.push(E);return u.join("")},parse:function(a){var l=a.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var u=0;u<c.length;u++)d[c.charCodeAt(u)]=u}var h=c.charAt(64);if(h){var f=a.indexOf(h);f!==-1&&(l=f)}return s(a,l,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(a,l,c){for(var d=[],u=0,h=0;h<l;h++)if(h%4){var f=c[a.charCodeAt(h-1)]<<h%4*2,m=c[a.charCodeAt(h)]>>>6-h%4*2,g=f|m;d[u>>>2]|=g<<24-u%4*8,u++}return n.create(d,u)}}(),i.enc.Base64})});var UQ=Qi(E4=>{"use strict";Object.defineProperty(E4,"__esModule",{value:!0});E4.default=void 0;var Oi=(Rs(),Qh(Ns)),Zve=(Q3(),Qh(fne));function Jve(i,e){return n_e(i)||i_e(i,e)||t_e(i,e)||e_e()}function e_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t_e(i,e){if(i){if(typeof i=="string")return NQ(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return NQ(i,e)}}function NQ(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=i[t];return n}function i_e(i,e){var t=i==null?null:typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var n=[],r=!0,o=!1,s,a;try{for(t=t.call(i);!(r=(s=t.next()).done)&&(n.push(s.value),!(e&&n.length===e));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&t.return!=null&&t.return()}finally{if(o)throw a}}return n}}function n_e(i){if(Array.isArray(i))return i}function vN(i){"@babel/helpers - typeof";return vN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vN(i)}function FQ(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function RQ(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function zQ(i,e,t){return e&&RQ(i.prototype,e),t&&RQ(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}var r_e={Bottom:4},o_e={readOnly:65,cursorWidth:20,fontInfo:32},s_e=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function a_e(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||s_e.test(i))}function k4(i,e){if(!(this instanceof k4))return new k4(i,e);this.line=i,this.ch=e}function l_e(i,e,t){i.dispatch(e,t)}function hv(i){return function(){}}var PQ,OQ;String.prototype.normalize?(PQ=function(e){return e.normalize("NFD").toLowerCase()},OQ=function(e){return e.normalize("NFD")}):(PQ=function(e){return e.toLowerCase()},OQ=function(e){return e});var BQ=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};BQ.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if(typeof e=="string")var n=t==e;else var n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},o=this.string.substr(this.pos,e.length);if(r(o)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};function _s(i){return new k4(i.lineNumber-1,i.column-1)}function Yn(i){return new Oi.Position(i.line+1,i.ch+1)}var c_e=function(){function i(e,t,n,r){FQ(this,i),this.cm=e,this.id=t,this.lineNumber=n+1,this.column=r+1,e.marks[this.id]=this}return zQ(i,[{key:"clear",value:function(){delete this.cm.marks[this.id]}},{key:"find",value:function(){return _s(this)}}]),i}();function HQ(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=!0,n=Oi.KeyCode[i.keyCode];i.key&&(n=i.key,t=!1);var r=n,o=e;switch(i.keyCode){case Oi.KeyCode.Shift:case Oi.KeyCode.Meta:case Oi.KeyCode.Alt:case Oi.KeyCode.Ctrl:return r;case Oi.KeyCode.Escape:o=!0,r="Esc";break;case Oi.KeyCode.Space:o=!0;break}return n.startsWith("Key")||n.startsWith("KEY_")?r=n[n.length-1].toLowerCase():n.startsWith("Digit")?r=n.slice(5,6):n.startsWith("Numpad")?r=n.slice(6,7):n.endsWith("Arrow")?(o=!0,r=n.substring(0,n.length-5)):(n.startsWith("US_")||n.startsWith("Bracket")||!r)&&(r=i.browserEvent.key),!o&&!i.altKey&&!i.ctrlKey&&!i.metaKey?r=i.key||i.browserEvent.key:(i.altKey&&(r="Alt-".concat(r)),i.ctrlKey&&(r="Ctrl-".concat(r)),i.metaKey&&(r="Meta-".concat(r)),i.shiftKey&&(r="Shift-".concat(r))),r.length===1&&t&&(r="'".concat(r,"'")),r}var an=function(){function i(e){FQ(this,i),d_e.call(this),this.editor=e,this.state={keyMap:"vim"},this.marks={},this.$uid=0,this.disposables=[],this.listeners={},this.curOp={},this.attached=!1,this.statusBar=null,this.options={},this.addLocalListeners(),this.ctxInsert=this.editor.createContextKey("insertMode",!0)}return zQ(i,[{key:"attach",value:function(){i.keyMap.vim.attach(this)}},{key:"addLocalListeners",value:function(){this.disposables.push(this.editor.onDidChangeCursorPosition(this.handleCursorChange),this.editor.onDidChangeModelContent(this.handleChange),this.editor.onKeyDown(this.handleKeyDown))}},{key:"handleReplaceMode",value:function(t,n){var r=!1,o=t,s=this.editor.getPosition(),a=new Oi.Range(s.lineNumber,s.column,s.lineNumber,s.column+1),l=!0;if(t.startsWith("'"))o=t[1];else if(o==="Enter")o=`
`;else if(o==="Backspace"){var c=this.replaceStack.pop();if(!c)return;r=!0,o=c,a=new Oi.Range(s.lineNumber,s.column,s.lineNumber,s.column-1)}else return;n.preventDefault(),n.stopPropagation(),this.replaceStack||(this.replaceStack=[]),r||this.replaceStack.push(this.editor.getModel().getValueInRange(a)),this.editor.executeEdits("vim",[{text:o,range:a,forceMoveMarkers:l}]),r&&this.editor.setPosition(a.getStartPosition())}},{key:"setOption",value:function(t,n){this.state[t]=n,t==="theme"&&Oi.editor.setTheme(n)}},{key:"getConfiguration",value:function(){var t=this.editor,n=o_e;return typeof t.getConfiguration=="function"?t.getConfiguration():("EditorOption"in Oi.editor&&(n=Oi.editor.EditorOption),{readOnly:t.getOption(n.readOnly),viewInfo:{cursorWidth:t.getOption(n.cursorWidth)},fontInfo:t.getOption(n.fontInfo)})}},{key:"getOption",value:function(t){return t==="readOnly"?this.getConfiguration().readOnly:t==="firstLineNumber"?this.firstLine()+1:t==="indentWithTabs"?!this.editor.getModel().getOptions().insertSpaces:typeof this.editor.getConfiguration=="function"?this.editor.getRawConfiguration()[t]:this.editor.getRawOptions()[t]}},{key:"dispatch",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=this.listeners[t];s&&s.forEach(function(a){return a.apply(void 0,r)})}},{key:"on",value:function(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}},{key:"off",value:function(t,n){var r=this.listeners[t];r&&(this.listeners[t]=r.filter(function(o){return o!==n}))}},{key:"firstLine",value:function(){return 0}},{key:"lastLine",value:function(){return this.lineCount()-1}},{key:"lineCount",value:function(){return this.editor.getModel().getLineCount()}},{key:"defaultTextHeight",value:function(){return 1}},{key:"getLine",value:function(t){if(t<0)return"";var n=this.editor.getModel(),r=n.getLineCount();return t+1>r&&(t=r-1),this.editor.getModel().getLineContent(t+1)}},{key:"getAnchorForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var n=t.getDirection();return n===Oi.SelectionDirection.LTR?t.getStartPosition():t.getEndPosition()}},{key:"getHeadForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var n=t.getDirection();return n===Oi.SelectionDirection.LTR?t.getEndPosition():t.getStartPosition()}},{key:"getCursor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!t)return _s(this.editor.getPosition());var n=this.editor.getSelection(),r;return n.isEmpty()?r=n.getPosition():t==="anchor"?r=this.getAnchorForSelection(n):r=this.getHeadForSelection(n),_s(r)}},{key:"getRange",value:function(t,n){var r=Yn(t),o=Yn(n);return this.editor.getModel().getValueInRange(Oi.Range.fromPositions(r,o))}},{key:"getSelection",value:function(){var t=[],n=this.editor;return n.getSelections().map(function(r){t.push(n.getModel().getValueInRange(r))}),t.join(`
`)}},{key:"replaceRange",value:function(t,n,r){var o=Yn(n),s=r?Yn(r):o;this.editor.executeEdits("vim",[{text:t,range:Oi.Range.fromPositions(o,s)}]),this.pushUndoStop()}},{key:"pushUndoStop",value:function(){this.editor.pushUndoStop()}},{key:"setCursor",value:function(t,n){var r=t;vN(t)!=="object"&&(r={},r.line=t,r.ch=n);var o=this.editor.getModel().validatePosition(Yn(r));this.editor.setPosition(Yn(r)),this.editor.revealPosition(o)}},{key:"somethingSelected",value:function(){return!this.editor.getSelection().isEmpty()}},{key:"operation",value:function(t,n){return t()}},{key:"listSelections",value:function(){var t=this,n=this.editor.getSelections();return!n.length||this.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:n.map(function(r){var o=r.getPosition(),s=r.getStartPosition(),a=r.getEndPosition();return{anchor:t.clipPos(_s(t.getAnchorForSelection(r))),head:t.clipPos(_s(t.getHeadForSelection(r)))}})}},{key:"focus",value:function(){this.editor.focus()}},{key:"setSelections",value:function(t,n){var r=!!this.editor.getSelections().length,o=t.map(function(l,c){var d=l.anchor,u=l.head;return r?Oi.Selection.fromPositions(Yn(d),Yn(u)):Oi.Selection.fromPositions(Yn(u),Yn(d))});if(n&&o[n]&&o.push(o.splice(n,1)[0]),!!o.length){var s=o[0],a;s.getDirection()===Oi.SelectionDirection.LTR?a=s.getEndPosition():a=s.getStartPosition(),this.editor.setSelections(o),this.editor.revealPosition(a)}}},{key:"setSelection",value:function(t,n){var r=Oi.Range.fromPositions(Yn(t),Yn(n));this.editor.setSelection(r)}},{key:"getSelections",value:function(){var t=this.editor;return t.getSelections().map(function(n){return t.getModel().getValueInRange(n)})}},{key:"replaceSelections",value:function(t){var n=this.editor;n.getSelections().forEach(function(r,o){n.executeEdits("vim",[{range:r,text:t[o],forceMoveMarkers:!1}])})}},{key:"toggleOverwrite",value:function(t){t?(this.enterVimMode(),this.replaceMode=!0):(this.leaveVimMode(),this.replaceMode=!1,this.replaceStack=[])}},{key:"charCoords",value:function(t,n){return{top:t.line,left:t.ch}}},{key:"coordsChar",value:function(t,n){}},{key:"clipPos",value:function(t){var n=this.editor.getModel().validatePosition(Yn(t));return _s(n)}},{key:"setBookmark",value:function(t,n){var r=new c_e(this,this.$uid++,t.line,t.ch);return(!n||!n.insertLeft)&&(r.$insertRight=!0),this.marks[r.id]=r,r}},{key:"getScrollInfo",value:function(){var t=this.editor,n=t.getVisibleRanges(),r=Jve(n,1),o=r[0];return{left:0,top:o.startLineNumber-1,height:t.getModel().getLineCount(),clientHeight:o.endLineNumber-o.startLineNumber+1}}},{key:"triggerEditorAction",value:function(t){this.editor.trigger("vim",t)}},{key:"dispose",value:function(){this.dispatch("dispose"),this.removeOverlay(),i.keyMap.vim&&i.keyMap.vim.detach(this),this.disposables.forEach(function(t){return t.dispose()})}},{key:"getInputField",value:function(){}},{key:"getWrapperElement",value:function(){}},{key:"enterVimMode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.ctxInsert.set(!1);var n=this.getConfiguration();this.initialCursorWidth=n.viewInfo.cursorWidth||0,this.editor.updateOptions({cursorWidth:n.fontInfo.typicalFullwidthCharacterWidth,cursorBlinking:"solid"})}},{key:"leaveVimMode",value:function(){this.ctxInsert.set(!0),this.editor.updateOptions({cursorWidth:this.initialCursorWidth||0,cursorBlinking:"blink"})}},{key:"virtualSelectionMode",value:function(){return this.inVirtualSelectionMode}},{key:"markText",value:function(){return{clear:function(){},find:function(){}}}},{key:"getUserVisibleLines",value:function(){var t=this.editor.getVisibleRanges();if(!t.length)return{top:0,bottom:0};var n={top:1/0,bottom:0};return t.reduce(function(r,o){return o.startLineNumber<r.top&&(r.top=o.startLineNumber),o.endLineNumber>r.bottom&&(r.bottom=o.endLineNumber),r},n),n.top-=1,n.bottom-=1,n}},{key:"findPosV",value:function(t,n,r){var o=this.editor,s=n,a=r,l=Yn(t);if(r==="page"){var c=o.getLayoutInfo().height,d=this.getConfiguration().fontInfo.lineHeight;s=s*Math.floor(c/d),a="line"}return a==="line"&&(l.lineNumber+=s),_s(l)}},{key:"findMatchingBracket",value:function(t){var n=Yn(t),r=this.editor.getModel(),o;if(r.bracketPairs)o=r.bracketPairs.matchBracket(n);else{var s;o=(s=r.matchBracket)===null||s===void 0?void 0:s.call(r,n)}return!o||o.length!==2?{to:null}:{to:_s(o[1].getStartPosition())}}},{key:"findFirstNonWhiteSpaceCharacter",value:function(t){return this.editor.getModel().getLineFirstNonWhitespaceColumn(t+1)-1}},{key:"scrollTo",value:function(t,n){!t&&!n||t||(n<0&&(n=this.editor.getPosition().lineNumber-n),this.editor.setScrollTop(this.editor.getTopForLineNumber(n+1)))}},{key:"moveCurrentLineTo",value:function(t){var n,r=this.editor,o=r.getPosition(),s=Oi.Range.fromPositions(o,o);switch(t){case"top":r.revealRangeAtTop(s);return;case"center":r.revealRangeInCenter(s);return;case"bottom":(n=r._revealRange)===null||n===void 0||n.call(r,s,r_e.Bottom);return}}},{key:"getSearchCursor",value:function(t,n){var r=!1,o=!1;t instanceof RegExp&&!t.global&&(r=!t.ignoreCase,t=t.source,o=!0),n.ch==null&&(n.ch=Number.MAX_VALUE);var s=Yn(n),a=this,l=this.editor,c=null,d=l.getModel(),u=d.findMatches(t,!1,o,r)||[];return{getMatches:function(){return u},findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},jumpTo:function(f){if(!u||!u.length)return!1;var m=u[f];return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(g){return g.range}).filter(function(g){return!g.equalsRange(c)})),c},find:function(f){if(!u||!u.length)return!1;var m;if(f){var g=c?c.getStartPosition():s;if(m=d.findPreviousMatch(t,g,o,r),!m||!m.range.getStartPosition().isBeforeOrEqual(g))return!1}else{var w=c?d.getPositionAt(d.getOffsetAt(c.getStartPosition())+1):s;if(m=d.findNextMatch(t,w,o,r),!m||!w.isBeforeOrEqual(m.range.getStartPosition()))return!1}return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(_){return _.range}).filter(function(_){return!_.equalsRange(c)})),c},from:function(){return c&&_s(c.getStartPosition())},to:function(){return c&&_s(c.getEndPosition())},replace:function(f){c&&(l.executeEdits("vim",[{range:c,text:f,forceMoveMarkers:!0}]),c.setEndPosition(l.getPosition()),l.setPosition(c.getStartPosition()))}}}},{key:"highlightRanges",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"findMatch",r="decoration".concat(n);return this[r]=this.editor.deltaDecorations(this[r]||[],t.map(function(o){return{range:o,options:{stickiness:Oi.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:n,showIfCollapsed:!0}}})),this[r]}},{key:"addOverlay",value:function(t,n,r){var o=t.query,s=!1,a=!1;o&&o instanceof RegExp&&!o.global&&(a=!0,s=!o.ignoreCase,o=o.source);var l=this.editor.getModel().findNextMatch(o,this.editor.getPosition(),a,s);!l||!l.range||this.highlightRanges([l.range])}},{key:"removeOverlay",value:function(){var t=this;["currentFindMatch","findMatch"].forEach(function(n){t.editor.deltaDecorations(t["decoration".concat(n)]||[],[])})}},{key:"scrollIntoView",value:function(t){t&&this.editor.revealPosition(Yn(t))}},{key:"moveH",value:function(t,n){if(n==="char"){var r=this.editor.getPosition();this.editor.setPosition(new Oi.Position(r.lineNumber,r.column+t))}}},{key:"scanForBracket",value:function(t,n,r,o){for(var s=o.bracketRegex,a=Yn(t),l=this.editor.getModel(),c=(n===-1?l.findPreviousMatch:l.findNextMatch).bind(l),d=[],u=0;;){if(u>10)return;var h=c(s.source,a,!0,!0,null,!0),f=h.matches[0];if(h===void 0)return;var m=i.matchingBrackets[f];if(m&&m.charAt(1)===">"==n>0)d.push(f);else if(d.length===0){var g=h.range.getStartPosition();return{pos:_s(g)}}else d.pop();a=l.getPositionAt(l.getOffsetAt(h.range.getStartPosition())+n),u+=1}}},{key:"indexFromPos",value:function(t){return this.editor.getModel().getOffsetAt(Yn(t))}},{key:"posFromIndex",value:function(t){return _s(this.editor.getModel().getPositionAt(t))}},{key:"indentLine",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this.editor,o;r._getViewModel?o=r._getViewModel().cursorConfig:o=r._getCursors().context.config;var s=new Oi.Position(t+1,1),a=Oi.Selection.fromPositions(s,s);r.executeCommand("vim",new Zve.ShiftCommand(a,{isUnshift:!n,tabSize:o.tabSize,indentSize:o.indentSize,insertSpaces:o.insertSpaces,useTabStops:o.useTabStops,autoIndent:o.autoIndent}))}},{key:"setStatusBar",value:function(t){this.statusBar=t}},{key:"openDialog",value:function(t,n,r){if(this.statusBar)return this.statusBar.setSec(t,n,r)}},{key:"openNotification",value:function(t){this.statusBar&&this.statusBar.showNotification(t)}},{key:"smartIndent",value:function(){this.editor.getAction("editor.action.formatSelection").run()}},{key:"moveCursorTo",value:function(t){var n=this.editor.getPosition();t==="start"?n.column=1:t==="end"&&(n.column=this.editor.getModel().getLineMaxColumn(n.lineNumber)),this.editor.setPosition(n)}},{key:"execCommand",value:function(t){switch(t){case"goLineLeft":this.moveCursorTo("start");break;case"goLineRight":this.moveCursorTo("end");break;case"indentAuto":this.smartIndent();break}}}]),i}();an.Pos=k4;an.signal=l_e;an.on=hv("on");an.off=hv("off");an.addClass=hv("addClass");an.rmClass=hv("rmClass");an.defineOption=hv("defineOption");an.keyMap={default:function(e){return function(t){return!0}}};an.matchingBrackets={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};an.isWordChar=a_e;an.keyName=HQ;an.StringStream=BQ;an.e_stop=function(i){return i.stopPropagation?i.stopPropagation():i.cancelBubble=!0,an.e_preventDefault(i),!1};an.e_preventDefault=function(i){return i.preventDefault?(i.preventDefault(),i.browserEvent&&i.browserEvent.preventDefault()):i.returnValue=!1,!1};an.commands={redo:function(e){e.editor.getModel().redo()},undo:function(e){e.editor.getModel().undo()},newlineAndIndent:function(e){e.triggerEditorAction("editor.action.insertLineAfter")}};an.lookupKey=function i(e,t,n){typeof t=="string"&&(t=an.keyMap[t]);var r=typeof t=="function"?t(e):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&n(r))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return i(e,t.fallthrough,n);for(var o=0;o<t.fallthrough.length;o++){var s=i(e,t.fallthrough[o],n);if(s)return s}}};an.defineExtension=function(i,e){an.prototype[i]=e};var d_e=function(){var e=this;this.handleKeyDown=function(t){if(!(t.browserEvent.defaultPrevented&t.keyCode!==Oi.KeyCode.Escape)&&e.attached){var n=HQ(t);if(e.replaceMode&&e.handleReplaceMode(n,t),!!n){var r=e.state.keyMap;if(an.keyMap[r]&&an.keyMap[r].call){var o=an.keyMap[r].call(n,e);if(o){t.preventDefault(),t.stopPropagation();try{o()}catch(s){console.error(s)}}}}}},this.handleCursorChange=function(t){var n=t.position,r=t.source,o=e.editor,s=o.getSelection();if(!e.ctxInsert.get()&&t.source==="mouse"&&s.isEmpty()){var a=o.getModel().getLineMaxColumn(n.lineNumber);if(t.position.column===a){o.setPosition(new Oi.Position(t.position.lineNumber,a-1));return}}e.dispatch("cursorActivity",e,t)},this.handleChange=function(t){var n=t.changes,r={text:n.reduce(function(s,a){return s.push(a.text),s},[]),origin:"+input"},o=e.curOp=e.curOp||{};o.changeHandlers||(o.changeHandlers=e.listeners.change&&e.listeners.change.slice()),!e.virtualSelectionMode()&&(o.lastChange?o.lastChange.next=o.lastChange=r:o.lastChange=o.change=r,e.dispatch("change",e,r))}},u_e=an;E4.default=u_e});var qQ=Qi(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.default=pm.Vim=void 0;var ut=h_e(UQ());function h_e(i){return i&&i.__esModule?i:{default:i}}function T4(i){"@babel/helpers - typeof";return T4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T4(i)}var Ve=ut.default.Pos;function f_e(i,e){var t=i.state.vim;if(!t||t.insertMode)return e.head;var n=t.sel.head;if(!n)return e.head;if(!(t.visualBlock&&e.head.line!=n.line))return e.from()==e.anchor&&!e.empty()&&e.head.line==n.line&&e.head.ch!=n.ch?new Ve(e.head.line,e.head.ch-1):e.head}var xr=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],jQ=xr.length,WQ=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}],VQ=function(){function e(S){S.setOption("disableInput",!0),S.setOption("showCursorWhenSelecting",!1),ut.default.signal(S,"vim-mode-change",{mode:"normal"}),S.on("cursorActivity",P9),we(S),S.enterVimMode()}function t(S){S.setOption("disableInput",!1),S.off("cursorActivity",P9),S.state.vim=null,Rv&&clearTimeout(Rv),S.leaveVimMode()}function n(S,p){S.attached=!1,this==ut.default.keyMap.vim&&(S.options.$customCursor=null),(!p||p.attach!=r)&&t(S)}function r(S,p){this==ut.default.keyMap.vim&&(S.attached=!0,S.curOp&&(S.curOp.selectionChanged=!0),S.options.$customCursor=f_e),(!p||p.attach!=r)&&e(S)}ut.default.defineOption("vimMode",!1,function(S,p,y){p&&S.getOption("keyMap")!="vim"?S.setOption("keyMap","vim"):!p&&y!=ut.default.Init&&/^vim/.test(S.getOption("keyMap"))&&S.setOption("keyMap","default")});function o(S,p){if(p){if(this[S])return this[S];var y=l(S);if(!y)return!1;var C=me.findKey(p,y);return typeof C=="function"&&ut.default.signal(p,"vim-keypress",y),C}}var s={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},a={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function l(S){if(S.charAt(0)=="'")return S.charAt(1);if(S==="AltGraph")return!1;var p=S.split(/-(?!$)/),y=p[p.length-1];if(p.length==1&&p[0].length==1)return!1;if(p.length==2&&p[0]=="Shift"&&y.length==1)return!1;for(var C=!1,k=0;k<p.length;k++){var I=p[k];I in s?p[k]=s[I]:C=!0,I in a&&(p[k]=a[I])}return C?(Q(y)&&(p[p.length-1]=y.toLowerCase()),"<"+p.join("-")+">"):!1}var c=/[\d]/,d=[ut.default.isWordChar,function(S){return S&&!ut.default.isWordChar(S)&&!/\s/.test(S)}],u=[function(S){return/\S/.test(S)}];function h(S,p){for(var y=[],C=S;C<S+p;C++)y.push(String.fromCharCode(C));return y}var f=h(65,26),m=h(97,26),g=h(48,10),w=[].concat(f,m,g,["<",">"]),_=[].concat(f,m,g,["-",'"',".",":","_","/"]),E;try{E=new RegExp("^[\\p{Lu}]$","u")}catch(S){E=/^[A-Z]$/}function A(S,p){return p>=S.firstLine()&&p<=S.lastLine()}function L(S){return/^[a-z]$/.test(S)}function O(S){return"()[]{}".indexOf(S)!=-1}function U(S){return c.test(S)}function Q(S){return E.test(S)}function ae(S){return/^\s*$/.test(S)}function te(S){return".?!".indexOf(S)!=-1}function Z(S,p){for(var y=0;y<p.length;y++)if(p[y]==S)return!0;return!1}var ve={};function Pe(S,p,y,C,k){if(p===void 0&&!k)throw Error("defaultValue is required unless callback is provided");if(y||(y="string"),ve[S]={type:y,defaultValue:p,callback:k},C)for(var I=0;I<C.length;I++)ve[C[I]]=ve[S];p&&Ee(S,p)}function Ee(S,p,y,C){var k=ve[S];C=C||{};var I=C.scope;if(!k)return new Error("Unknown option: "+S);if(k.type=="boolean"){if(p&&p!==!0)return new Error("Invalid argument: "+S+"="+p);p!==!1&&(p=!0)}k.callback?(I!=="local"&&k.callback(p,void 0),I!=="global"&&y&&k.callback(p,y)):(I!=="local"&&(k.value=k.type=="boolean"?!!p:p),I!=="global"&&y&&(y.state.vim.options[S]={value:p}))}function Oe(S,p,y){var C=ve[S];y=y||{};var k=y.scope;if(!C)return new Error("Unknown option: "+S);if(C.callback){var I=p&&C.callback(void 0,p);return k!=="global"&&I!==void 0?I:k!=="local"?C.callback():void 0}else{var I=k!=="global"&&p&&p.state.vim.options[S];return(I||k!=="local"&&C||{}).value}}Pe("filetype",void 0,"string",["ft"],function(S,p){if(p!==void 0)if(S===void 0){var y=p.getOption("mode");return y=="null"?"":y}else{var y=S==""?"null":S;p.setOption("mode",y)}});var Xe=function(){var p=100,y=-1,C=0,k=0,I=new Array(p);function M(V,X,oe){var Ce=y%p,xe=I[Ce];function ye(tt){var Ye=++y%p,zt=I[Ye];zt&&zt.clear(),I[Ye]=V.setBookmark(tt)}if(xe){var Ze=xe.find();Ze&&!ge(Ze,X)&&ye(X)}else ye(X);ye(oe),C=y,k=y-p+1,k<0&&(k=0)}function H(V,X){y+=X,y>C?y=C:y<k&&(y=k);var oe=I[(p+y)%p];if(oe&&!oe.find()){var Ce=X>0?1:-1,xe,ye=V.getCursor();do if(y+=Ce,oe=I[(p+y)%p],oe&&(xe=oe.find())&&!ge(ye,xe))break;while(y<C&&y>k)}return oe}function W(V,X){var oe=y,Ce=H(V,X);return y=oe,Ce&&Ce.find()}return{cachedCursor:void 0,add:M,find:W,move:H}},dt=function(p){return p?{changes:p.changes,expectCursorActivityForChange:p.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function be(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=dt()}be.prototype={exitMacroRecordMode:function(){var p=Y.macroModeState;p.onRecordingDone&&p.onRecordingDone(),p.onRecordingDone=void 0,p.isRecording=!1},enterMacroRecordMode:function(p,y){var C=Y.registerController.getRegister(y);C&&(C.clear(),this.latestRegister=y,p.openDialog&&(this.onRecordingDone=p.openDialog(document.createTextNode("(recording)["+y+"]"),null,{bottom:!0})),this.isRecording=!0)}};function we(S){return S.state.vim||(S.state.vim={inputState:new G,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),S.state.vim}var Y;function R(){Y={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Xe(),macroModeState:new be,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Li({}),searchHistoryController:new Et,exCommandHistoryController:new Et};for(var S in ve){var p=ve[S];p.value=p.defaultValue}}var re,me={buildKeyMap:function(){},getRegisterController:function(){return Y.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return Y},maybeInitVimState_:we,suppressErrorLogging:!1,InsertModeKey:L3,map:function(p,y,C){na.map(p,y,C)},unmap:function(p,y){return na.unmap(p,y)},noremap:function(p,y,C){function k(xe){return xe?[xe]:["normal","insert","visual"]}for(var I=k(C),M=xr.length,H=jQ,W=M-H;W<M&&I.length;W++){var V=xr[W];if(V.keys==y&&(!C||!V.context||V.context===C)&&V.type.substr(0,2)!=="ex"&&V.type.substr(0,3)!=="key"){var X={};for(var oe in V)X[oe]=V[oe];X.keys=p,C&&!X.context&&(X.context=C),this._mapCommand(X);var Ce=k(V.context);I=I.filter(function(xe){return Ce.indexOf(xe)===-1})}}},mapclear:function(p){var y=xr.length,C=jQ,k=xr.slice(0,y-C);if(xr=xr.slice(y-C),p)for(var I=k.length-1;I>=0;I--){var M=k[I];if(p!==M.context)if(M.context)this._mapCommand(M);else{var H=["normal","insert","visual"];for(var W in H)if(H[W]!==p){var V={};for(var X in M)V[X]=M[X];V.context=H[W],this._mapCommand(V)}}}},setOption:Ee,getOption:Oe,defineOption:Pe,defineEx:function(p,y,C){if(!y)y=p;else if(p.indexOf(y)!==0)throw new Error('(Vim.defineEx) "'+y+'" is not a prefix of "'+p+'", command not registered');M9[p]=C,na.commandMap_[y]={name:p,shortName:y,type:"api"}},handleKey:function(p,y,C){var k=this.findKey(p,y,C);if(typeof k=="function")return k()},findKey:function(p,y,C){var k=we(p);function I(){var oe=Y.macroModeState;if(oe.isRecording){if(y=="q")return oe.exitMacroRecordMode(),Tt(p),!0;C!="mapping"&&Jie(oe,y)}}function M(){if(y=="<Esc>"){if(k.visualMode)ea(p);else if(k.insertMode)km(p);else return;return Tt(p),!0}}function H(oe){for(var Ce;oe;)Ce=/<\w+-.+?>|<\w+>|./.exec(oe),y=Ce[0],oe=oe.substring(Ce.index+y.length),me.handleKey(p,y,"mapping")}function W(){if(M())return!0;for(var oe=k.inputState.keyBuffer=k.inputState.keyBuffer+y,Ce=y.length==1,xe=Ii.matchCommand(oe,xr,k.inputState,"insert");oe.length>1&&xe.type!="full";){var oe=k.inputState.keyBuffer=oe.slice(1),ye=Ii.matchCommand(oe,xr,k.inputState,"insert");ye.type!="none"&&(xe=ye)}if(xe.type=="none")return Tt(p),!1;if(xe.type=="partial")return re&&window.clearTimeout(re),re=window.setTimeout(function(){k.insertMode&&k.inputState.keyBuffer&&Tt(p)},Oe("insertModeEscKeysTimeout")),!Ce;if(re&&window.clearTimeout(re),Ce){for(var Ze=p.listSelections(),tt=0;tt<Ze.length;tt++){var Ye=Ze[tt].head;p.replaceRange("",pn(Ye,0,-(oe.length-1)),Ye,"+input")}Y.macroModeState.lastInsertModeChanges.changes.pop()}return Tt(p),xe.command}function V(){if(I()||M())return!0;var oe=k.inputState.keyBuffer=k.inputState.keyBuffer+y;if(/^[1-9]\d*$/.test(oe))return!0;var Ze=/^(\d*)(.*)$/.exec(oe);if(!Ze)return Tt(p),!1;var Ce=k.visualMode?"visual":"normal",xe=Ze[2]||Ze[1];k.inputState.operatorShortcut&&k.inputState.operatorShortcut.slice(-1)==xe&&(xe=k.inputState.operatorShortcut);var ye=Ii.matchCommand(xe,xr,k.inputState,Ce);if(ye.type=="none")return Tt(p),!1;if(ye.type=="partial")return!0;k.inputState.keyBuffer="";var Ze=/^(\d*)(.*)$/.exec(oe);return Ze[1]&&Ze[1]!="0"&&k.inputState.pushRepeatDigit(Ze[1]),ye.command}var X;return k.insertMode?X=W():X=V(),X===!1?!k.insertMode&&y.length===1?function(){return!0}:void 0:X===!0?function(){return!0}:function(){return p.operation(function(){p.curOp.isVimOp=!0;try{X.type=="keyToKey"?H(X.toKeys):Ii.processCommand(p,k,X)}catch(oe){throw p.state.vim=void 0,we(p),me.suppressErrorLogging||console.log(oe),oe}return!0})}},handleEx:function(p,y){na.processCommand(p,y)},defineMotion:ko,defineAction:ou,defineOperator:Lc,mapCommand:Qie,_mapCommand:N9,defineRegister:li,exitVisualMode:ea,exitInsertMode:km};function G(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}G.prototype.pushRepeatDigit=function(S){this.operator?this.motionRepeat=this.motionRepeat.concat(S):this.prefixRepeat=this.prefixRepeat.concat(S)},G.prototype.getRepeat=function(){var S=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(S=1,this.prefixRepeat.length>0&&(S*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(S*=parseInt(this.motionRepeat.join(""),10))),S};function Tt(S,p){S.state.vim.inputState=new G,ut.default.signal(S,"vim-command-done",p)}function Ft(S,p,y){this.clear(),this.keyBuffer=[S||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!p,this.blockwise=!!y}Ft.prototype={setText:function(p,y,C){this.keyBuffer=[p||""],this.linewise=!!y,this.blockwise=!!C},pushText:function(p,y){y&&(this.linewise||this.keyBuffer.push(`
`),this.linewise=!0),this.keyBuffer.push(p)},pushInsertModeChanges:function(p){this.insertModeChanges.push(dt(p))},pushSearchQuery:function(p){this.searchQueries.push(p)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}};function li(S,p){var y=Y.registerController.registers;if(!S||S.length!=1)throw Error("Register name must be 1 character");if(y[S])throw Error("Register already defined "+S);y[S]=p,_.push(S)}function Li(S){this.registers=S,this.unnamedRegister=S['"']=new Ft,S["."]=new Ft,S[":"]=new Ft,S["/"]=new Ft}Li.prototype={pushText:function(p,y,C,k,I){if(p!=="_"){k&&C.charAt(C.length-1)!==`
`&&(C+=`
`);var M=this.isValidRegister(p)?this.getRegister(p):null;if(!M){switch(y){case"yank":this.registers[0]=new Ft(C,k,I);break;case"delete":case"change":C.indexOf(`
`)==-1?this.registers["-"]=new Ft(C,k):(this.shiftNumericRegisters_(),this.registers[1]=new Ft(C,k));break}this.unnamedRegister.setText(C,k,I);return}var H=Q(p);H?M.pushText(C,k):M.setText(C,k,I),this.unnamedRegister.setText(M.toString(),k)}},getRegister:function(p){return this.isValidRegister(p)?(p=p.toLowerCase(),this.registers[p]||(this.registers[p]=new Ft),this.registers[p]):this.unnamedRegister},isValidRegister:function(p){return p&&Z(p,_)},shiftNumericRegisters_:function(){for(var p=9;p>=2;p--)this.registers[p]=this.getRegister(""+(p-1))}};function Et(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}Et.prototype={nextMatch:function(p,y){var C=this.historyBuffer,k=y?-1:1;this.initialPrefix===null&&(this.initialPrefix=p);for(var I=this.iterator+k;y?I>=0:I<C.length;I+=k)for(var M=C[I],H=0;H<=M.length;H++)if(this.initialPrefix==M.substring(0,H))return this.iterator=I,M;if(I>=C.length)return this.iterator=C.length,this.initialPrefix;if(I<0)return p},pushInput:function(p){var y=this.historyBuffer.indexOf(p);y>-1&&this.historyBuffer.splice(y,1),p.length&&this.historyBuffer.push(p)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ii={matchCommand:function(p,y,C,k){var I=x3(p,y,k,C);if(!I.full&&!I.partial)return{type:"none"};if(!I.full&&I.partial)return{type:"partial"};for(var M,H=0;H<I.full.length;H++){var W=I.full[H];M||(M=W)}if(M.keys.slice(-11)=="<character>"){var V=S3(p);if(!V)return{type:"none"};C.selectedCharacter=V}return{type:"full",command:M}},processCommand:function(p,y,C){switch(y.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(p,y,C);break;case"operator":this.processOperator(p,y,C);break;case"operatorMotion":this.processOperatorMotion(p,y,C);break;case"action":this.processAction(p,y,C);break;case"search":this.processSearch(p,y,C);break;case"ex":case"keyToEx":this.processEx(p,y,C);break;default:break}},processMotion:function(p,y,C){y.inputState.motion=C.motion,y.inputState.motionArgs=Yo(C.motionArgs),this.evalInput(p,y)},processOperator:function(p,y,C){var k=y.inputState;if(k.operator)if(k.operator==C.operator){k.motion="expandToLine",k.motionArgs={linewise:!0},this.evalInput(p,y);return}else Tt(p);k.operator=C.operator,k.operatorArgs=Yo(C.operatorArgs),C.keys.length>1&&(k.operatorShortcut=C.keys),C.exitVisualBlock&&(y.visualBlock=!1,Yh(p)),y.visualMode&&this.evalInput(p,y)},processOperatorMotion:function(p,y,C){var k=y.visualMode,I=Yo(C.operatorMotionArgs);I&&k&&I.visualLine&&(y.visualLine=!0),this.processOperator(p,y,C),k||this.processMotion(p,y,C)},processAction:function(p,y,C){var k=y.inputState,I=k.getRepeat(),M=!!I,H=Yo(C.actionArgs)||{};k.selectedCharacter&&(H.selectedCharacter=k.selectedCharacter),C.operator&&this.processOperator(p,y,C),C.motion&&this.processMotion(p,y,C),(C.motion||C.operator)&&this.evalInput(p,y),H.repeat=I||1,H.repeatIsExplicit=M,H.registerName=k.registerName,Tt(p),y.lastMotion=null,C.isEdit&&this.recordLastEdit(y,k,C),sl[C.action](p,H,y)},processSearch:function(p,y,C){if(!p.getSearchCursor)return;var k=C.searchArgs.forward,I=C.searchArgs.wholeWordOnly;ia(p).setReversed(!k);var M=k?"/":"?",H=ia(p).getQuery(),W=p.getScrollInfo();function V(Ye,zt,It){Y.searchHistoryController.pushInput(Ye),Y.searchHistoryController.reset();try{Sm(p,Ye,zt,It)}catch(Lt){Hi(p,"Invalid regex: "+Ye),Tt(p);return}Ii.processMotion(p,y,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function X(Ye){p.scrollTo(W.left,W.top),V(Ye,!0,!0);var zt=Y.macroModeState;zt.isRecording&&tne(zt,Ye)}function oe(Ye,zt,It){var Lt=ut.default.keyName(Ye),Ui,so;Lt=="Up"||Lt=="Down"?(Ui=Lt=="Up",so=Ye.target?Ye.target.selectionEnd:0,zt=Y.searchHistoryController.nextMatch(zt,Ui)||"",It(zt),so&&Ye.target&&(Ye.target.selectionEnd=Ye.target.selectionStart=Math.min(so,Ye.target.value.length))):Lt!="Left"&&Lt!="Right"&&Lt!="Ctrl"&&Lt!="Alt"&&Lt!="Shift"&&Y.searchHistoryController.reset();var mn;try{mn=Sm(p,zt,!0,!0)}catch(Wr){}mn?p.scrollIntoView(I9(p,!k,mn),30):(T3(p),p.scrollTo(W.left,W.top))}function Ce(Ye,zt,It){var Lt=ut.default.keyName(Ye);Lt=="Esc"||Lt=="Ctrl-C"||Lt=="Ctrl-["||Lt=="Backspace"&&zt==""?(Y.searchHistoryController.pushInput(zt),Y.searchHistoryController.reset(),Sm(p,H),T3(p),p.scrollTo(W.left,W.top),ut.default.e_stop(Ye),Tt(p),It(),p.focus()):Lt=="Up"||Lt=="Down"?ut.default.e_stop(Ye):Lt=="Ctrl-U"&&(ut.default.e_stop(Ye),It(""))}switch(C.searchArgs.querySrc){case"prompt":var xe=Y.macroModeState;if(xe.isPlaying){var tt=xe.replaySearchQueries.shift();V(tt,!0,!1)}else Nv(p,{onClose:X,prefix:M,desc:"(JavaScript regexp)",onKeyUp:oe,onKeyDown:Ce});break;case"wordUnderCursor":var ye=Mv(p,!1,!0,!1,!0),Ze=!0;if(ye||(ye=Mv(p,!1,!0,!1,!1),Ze=!1),!ye)return;var tt=p.getLine(ye.start.line).substring(ye.start.ch,ye.end.ch);Ze&&I?tt="\\b"+tt+"\\b":tt=ws(tt),Y.jumpList.cachedCursor=p.getCursor(),p.setCursor(ye.start),V(tt,!0,!1);break}},processEx:function(p,y,C){function k(M){Y.exCommandHistoryController.pushInput(M),Y.exCommandHistoryController.reset(),na.processCommand(p,M)}function I(M,H,W){var V=ut.default.keyName(M),X,oe;(V=="Esc"||V=="Ctrl-C"||V=="Ctrl-["||V=="Backspace"&&H=="")&&(Y.exCommandHistoryController.pushInput(H),Y.exCommandHistoryController.reset(),ut.default.e_stop(M),Tt(p),W(),p.focus()),V=="Up"||V=="Down"?(ut.default.e_stop(M),X=V=="Up",oe=M.target?M.target.selectionEnd:0,H=Y.exCommandHistoryController.nextMatch(H,X)||"",W(H),oe&&M.target&&(M.target.selectionEnd=M.target.selectionStart=Math.min(oe,M.target.value.length))):V=="Ctrl-U"?(ut.default.e_stop(M),W("")):V!="Left"&&V!="Right"&&V!="Ctrl"&&V!="Alt"&&V!="Shift"&&Y.exCommandHistoryController.reset()}C.type=="keyToEx"?na.processCommand(p,C.exArgs.input):y.visualMode?Nv(p,{onClose:k,prefix:":",value:"'<,'>",onKeyDown:I,selectValueOnOpen:!1}):Nv(p,{onClose:k,prefix:":",onKeyDown:I})},evalInput:function(p,y){var C=y.inputState,k=C.motion,I=C.motionArgs||{},M=C.operator,H=C.operatorArgs||{},W=C.registerName,V=y.sel,X=Xi(y.visualMode?zn(p,V.head):p.getCursor("head")),oe=Xi(y.visualMode?zn(p,V.anchor):p.getCursor("anchor")),Ce=Xi(X),xe=Xi(oe),ye,Ze,tt;if(M&&this.recordLastEdit(y,C),C.repeatOverride!==void 0?tt=C.repeatOverride:tt=C.getRepeat(),tt>0&&I.explicitRepeat?I.repeatIsExplicit=!0:(I.noRepeat||!I.explicitRepeat&&tt===0)&&(tt=1,I.repeatIsExplicit=!1),C.selectedCharacter&&(I.selectedCharacter=H.selectedCharacter=C.selectedCharacter),I.repeat=tt,Tt(p),k){var Ye=pi[k](p,X,I,y,C);if(y.lastMotion=pi[k],!Ye)return;if(I.toJumplist){var zt=Y.jumpList,It=zt.cachedCursor;It?(b9(p,It,Ye),delete zt.cachedCursor):b9(p,X,Ye)}Ye instanceof Array?(Ze=Ye[0],ye=Ye[1]):ye=Ye,ye||(ye=Xi(X)),y.visualMode?(y.visualBlock&&ye.ch===1/0||(ye=zn(p,ye)),Ze&&(Ze=zn(p,Ze)),Ze=Ze||xe,V.anchor=Ze,V.head=ye,Yh(p),al(p,y,"<",De(Ze,ye)?Ze:ye),al(p,y,">",De(Ze,ye)?ye:Ze)):M||(ye=zn(p,ye),p.setCursor(ye.line,ye.ch))}if(M){if(H.lastSel){Ze=xe;var Lt=H.lastSel,Ui=Math.abs(Lt.head.line-Lt.anchor.line),so=Math.abs(Lt.head.ch-Lt.anchor.ch);Lt.visualLine?ye=new Ve(xe.line+Ui,xe.ch):Lt.visualBlock?ye=new Ve(xe.line+Ui,xe.ch+so):Lt.head.line==Lt.anchor.line?ye=new Ve(xe.line,xe.ch+so):ye=new Ve(xe.line+Ui,xe.ch),y.visualMode=!0,y.visualLine=Lt.visualLine,y.visualBlock=Lt.visualBlock,V=y.sel={anchor:Ze,head:ye},Yh(p)}else y.visualMode&&(H.lastSel={anchor:Xi(V.anchor),head:Xi(V.head),visualBlock:y.visualBlock,visualLine:y.visualLine});var mn,Wr,Ai,si,dr;if(y.visualMode){if(mn=bt(V.head,V.anchor),Wr=Vt(V.head,V.anchor),Ai=y.visualLine||H.linewise,si=y.visualBlock?"block":Ai?"line":"char",dr=k3(p,{anchor:mn,head:Wr},si),Ai){var ao=dr.ranges;if(si=="block")for(var Vr=0;Vr<ao.length;Vr++)ao[Vr].head.ch=Ci(p,ao[Vr].head.line);else si=="line"&&(ao[0].head=new Ve(ao[0].head.line+1,0))}}else{if(mn=Xi(Ze||xe),Wr=Xi(ye||Ce),De(Wr,mn)){var Mc=mn;mn=Wr,Wr=Mc}Ai=I.linewise||H.linewise,Ai?Iie(p,mn,Wr):I.forward&&Tie(p,mn,Wr),si="char";var Em=!I.inclusive||Ai;dr=k3(p,{anchor:mn,head:Wr},si,Em)}p.setSelections(dr.ranges,dr.primary),y.lastMotion=null,H.repeat=tt,H.registerName=W,H.linewise=Ai;var Tm=Ic[M](p,H,dr.ranges,xe,ye);y.visualMode&&ea(p,Tm!=null),Tm&&p.setCursor(Tm)}},recordLastEdit:function(p,y,C){var k=Y.macroModeState;k.isPlaying||(p.lastEditInputState=y,p.lastEditActionCommand=C,k.lastInsertModeChanges.changes=[],k.lastInsertModeChanges.expectCursorActivityForChange=!1,k.lastInsertModeChanges.visualBlock=p.visualBlock?p.sel.head.line-p.sel.anchor.line:0)}},pi={moveToTopLine:function(p,y,C){var k=I3(p).top+C.repeat-1;return new Ve(k,ta(p.getLine(k)))},moveToMiddleLine:function(p){var y=I3(p),C=Math.floor((y.top+y.bottom)*.5);return new Ve(C,ta(p.getLine(C)))},moveToBottomLine:function(p,y,C){var k=I3(p).bottom-C.repeat+1;return new Ve(k,ta(p.getLine(k)))},expandToLine:function(p,y,C){var k=y;return new Ve(k.line+C.repeat-1,1/0)},findNext:function(p,y,C){var k=ia(p),I=k.getQuery();if(I){var M=!C.forward;return M=k.isReversed()?!M:M,T9(p,I),I9(p,M,I,C.repeat)}},findAndSelectNextInclusive:function(p,y,C,k,I){var M=ia(p),H=M.getQuery();if(H){var W=!C.forward;W=M.isReversed()?!W:W;var V=Gie(p,W,H,C.repeat,k);if(V){if(I.operator)return V;var X=V[0],oe=new Ve(V[1].line,V[1].ch-1);if(k.visualMode){(k.visualLine||k.visualBlock)&&(k.visualLine=!1,k.visualBlock=!1,ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:""}));var Ce=k.sel.anchor;if(Ce)return M.isReversed()?C.forward?[Ce,X]:[Ce,oe]:C.forward?[Ce,oe]:[Ce,X]}else k.visualMode=!0,k.visualLine=!1,k.visualBlock=!1,ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:""});return W?[oe,X]:[X,oe]}}},goToMark:function(p,y,C,k){var I=L9(p,k,C.selectedCharacter);return I?C.linewise?{line:I.line,ch:ta(p.getLine(I.line))}:I:null},moveToOtherHighlightedEnd:function(p,y,C,k){if(k.visualBlock&&C.sameLine){var I=k.sel;return[zn(p,new Ve(I.anchor.line,I.head.ch)),zn(p,new Ve(I.head.line,I.anchor.ch))]}else return[k.sel.head,k.sel.anchor]},jumpToMark:function(p,y,C,k){for(var I=y,M=0;M<C.repeat;M++){var H=I;for(var W in k.marks)if(L(W)){var V=k.marks[W].find(),X=C.forward?De(V,H):De(H,V);if(!X&&!(C.linewise&&V.line==H.line)){var oe=ge(H,I),Ce=C.forward?xi(H,V,I):xi(I,V,H);(oe||Ce)&&(I=V)}}}return C.linewise&&(I=new Ve(I.line,ta(p.getLine(I.line)))),I},moveByCharacters:function(p,y,C){var k=y,I=C.repeat,M=C.forward?k.ch+I:k.ch-I;return new Ve(k.line,M)},moveByLines:function(p,y,C,k){var I=y,M=I.ch;switch(k.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:M=k.lastHPos;break;default:k.lastHPos=M}var H=C.repeat+(C.repeatOffset||0),W=C.forward?I.line+H:I.line-H,V=p.firstLine(),X=p.lastLine(),oe=p.findPosV(I,C.forward?H:-H,"line",k.lastHSPos),Ce=C.forward?oe.line>W:oe.line<W;return Ce&&(W=oe.line,M=oe.ch),W<V&&I.line==V?this.moveToStartOfLine(p,y,C,k):W>X&&I.line==X?y9(p,y,C,k,!0):(C.toFirstChar&&(M=ta(p.getLine(W)),k.lastHPos=M),k.lastHSPos=p.charCoords(new Ve(W,M),"div").left,new Ve(W,M))},moveByDisplayLines:function(p,y,C,k){var I=y;switch(k.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:k.lastHSPos=p.charCoords(I,"div").left}var M=C.repeat,H=p.findPosV(I,C.forward?M:-M,"line",k.lastHSPos);if(H.hitSide)if(C.forward)var W=p.charCoords(H,"div"),V={top:W.top+8,left:k.lastHSPos},H=p.coordsChar(V,"div");else{var X=p.charCoords(new Ve(p.firstLine(),0),"div");X.left=k.lastHSPos,H=p.coordsChar(X,"div")}return k.lastHPos=H.ch,H},moveByPage:function(p,y,C){var k=y,I=C.repeat;return p.findPosV(k,C.forward?I:-I,"page")},moveByParagraph:function(p,y,C){var k=C.forward?1:-1;return w9(p,y,C.repeat,k)},moveBySentence:function(p,y,C){var k=C.forward?1:-1;return Oie(p,y,C.repeat,k)},moveByScroll:function(p,y,C,k){var I=p.getScrollInfo(),W=null,M=C.repeat;M||(M=I.clientHeight/(2*p.defaultTextHeight()));var H=p.charCoords(y,"local");C.repeat=M;var W=pi.moveByDisplayLines(p,y,C,k);if(!W)return null;var V=p.charCoords(W,"local");return p.scrollTo(null,I.top+V.top-H.top),W},moveByWords:function(p,y,C){return Nie(p,y,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(p,y,C){var k=C.repeat,I=E3(p,k,C.forward,C.selectedCharacter),M=C.forward?-1:1;return v9(M,C),I?(I.ch+=M,I):null},moveToCharacter:function(p,y,C){var k=C.repeat;return v9(0,C),E3(p,k,C.forward,C.selectedCharacter)||y},moveToSymbol:function(p,y,C){var k=C.repeat;return Die(p,k,C.forward,C.selectedCharacter)||y},moveToColumn:function(p,y,C,k){var I=C.repeat;return k.lastHPos=I-1,k.lastHSPos=p.charCoords(y,"div").left,Rie(p,I)},moveToEol:function(p,y,C,k){return y9(p,y,C,k,!1)},moveToFirstNonWhiteSpaceCharacter:function(p,y){var C=y;return new Ve(C.line,ta(p.getLine(C.line)))},moveToMatchedSymbol:function(p,y){var C=y,k=C.line,I=C.ch,M=p.getLine(k);if(I<M.length){var H=I==="<"||I===">"?/[(){}[\]<>]/:/[(){}[\]]/,W=p.findMatchingBracket(new Ve(k,I),{bracketRegex:H});return W.to}else return C},moveToStartOfLine:function(p,y){return new Ve(y.line,0)},moveToLineOrEdgeOfDocument:function(p,y,C){var k=C.forward?p.lastLine():p.firstLine();return C.repeatIsExplicit&&(k=C.repeat-p.getOption("firstLineNumber")),new Ve(k,ta(p.getLine(k)))},moveToStartOfDisplayLine:function(p){return p.execCommand("goLineLeft"),p.getCursor()},moveToEndOfDisplayLine:function(p){p.execCommand("goLineRight");var y=p.getCursor();return y.sticky=="before"&&y.ch--,y},textObjectManipulation:function(p,y,C,k){var I={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},M={"'":!0,'"':!0,"`":!0},H=C.selectedCharacter;H=="b"?H="(":H=="B"&&(H="{");var W=!C.textObjectInner,V;if(I[H])V=Fie(p,y,H,W);else if(M[H])V=zie(p,y,H,W);else if(H==="W")V=Mv(p,W,!0,!0);else if(H==="w")V=Mv(p,W,!0,!1);else if(H==="p")if(V=w9(p,y,C.repeat,0,W),C.linewise=!0,k.visualMode)k.visualLine||(k.visualLine=!0);else{var X=k.inputState.operatorArgs;X&&(X.linewise=!0),V.end.line--}else if(H==="t")V=Lie(p,y,W);else return null;return p.state.vim.visualMode?kie(p,V.start,V.end):[V.start,V.end]},repeatLastCharacterSearch:function(p,y,C){var k=Y.lastCharacterSearch,I=C.repeat,M=C.forward===k.forward,H=(k.increment?1:0)*(M?-1:1);p.moveH(-H,"char"),C.inclusive=!!M;var W=E3(p,I,M,k.selectedCharacter);return W?(W.ch+=H,W):(p.moveH(H,"char"),y)}};function ko(S,p){pi[S]=p}function oo(S,p){for(var y=[],C=0;C<p;C++)y.push(S);return y}var Ic={change:function(p,y,C){var k,I,M=p.state.vim,H=C[0].anchor,W=C[0].head;if(M.visualMode)if(y.fullLine)W.ch=Number.MAX_VALUE,W.line--,p.setSelection(H,W),I=p.getSelection(),p.replaceSelections(""),k=H;else{I=p.getSelection();var xe=oo("",C.length);p.replaceSelections(xe),k=bt(C[0].head,C[0].anchor)}else{I=p.getRange(H,W);var V=M.lastEditInputState||{};if(V.motion=="moveByWords"&&!ae(I)){var X=/\s+$/.exec(I);X&&V.motionArgs&&V.motionArgs.forward&&(W=pn(W,0,-X[0].length),I=I.slice(0,-X[0].length))}var oe=new Ve(H.line-1,Number.MAX_VALUE),Ce=p.firstLine()==p.lastLine();W.line>p.lastLine()&&y.linewise&&!Ce?p.replaceRange("",oe,W):p.replaceRange("",H,W),y.linewise&&(Ce||(p.setCursor(oe),ut.default.commands.newlineAndIndent(p)),H.ch=Number.MAX_VALUE),k=H}Y.registerController.pushText(y.registerName,"change",I,y.linewise,C.length>1),sl.enterInsertMode(p,{head:k},p.state.vim)},delete:function(p,y,C){p.pushUndoStop();var k,I,M=p.state.vim;if(M.visualBlock){I=p.getSelection();var V=oo("",C.length);p.replaceSelections(V),k=bt(C[0].head,C[0].anchor)}else{var H=C[0].anchor,W=C[0].head;y.linewise&&W.line!=p.firstLine()&&H.line==p.lastLine()&&H.line==W.line-1&&(H.line==p.firstLine()?H.ch=0:H=new Ve(H.line-1,Ci(p,H.line-1))),I=p.getRange(H,W),p.replaceRange("",H,W),k=H,y.linewise&&(k=pi.moveToFirstNonWhiteSpaceCharacter(p,H))}return Y.registerController.pushText(y.registerName,"delete",I,y.linewise,M.visualBlock),zn(p,k)},indent:function(p,y,C){var k=p.state.vim,I=C[0].anchor.line,M=k.visualBlock?C[C.length-1].anchor.line:C[0].head.line,H=k.visualMode?y.repeat:1;y.linewise&&M--,p.pushUndoStop();for(var W=I;W<=M;W++)for(var V=0;V<H;V++)p.indentLine(W,y.indentRight);return p.pushUndoStop(),pi.moveToFirstNonWhiteSpaceCharacter(p,C[0].anchor)},indentAuto:function(p,y,C){return p.execCommand("indentAuto"),pi.moveToFirstNonWhiteSpaceCharacter(p,C[0].anchor)},changeCase:function(p,y,C,k,I){for(var M=p.getSelections(),H=[],W=y.toLower,V=0;V<M.length;V++){var X=M[V],oe="";if(W===!0)oe=X.toLowerCase();else if(W===!1)oe=X.toUpperCase();else for(var Ce=0;Ce<X.length;Ce++){var xe=X.charAt(Ce);oe+=Q(xe)?xe.toLowerCase():xe.toUpperCase()}H.push(oe)}return p.replaceSelections(H),y.shouldMoveCursor?I:!p.state.vim.visualMode&&y.linewise&&C[0].anchor.line+1==C[0].head.line?pi.moveToFirstNonWhiteSpaceCharacter(p,k):y.linewise?k:bt(C[0].anchor,C[0].head)},yank:function(p,y,C,k){var I=p.state.vim,M=p.getSelection(),H=I.visualMode?bt(I.sel.anchor,I.sel.head,C[0].head,C[0].anchor):k;return Y.registerController.pushText(y.registerName,"yank",M,y.linewise,I.visualBlock),H}};function Lc(S,p){Ic[S]=p}var sl={jumpListWalk:function(p,y,C){if(!C.visualMode){var k=y.repeat,I=y.forward,M=Y.jumpList,H=M.move(p,I?k:-k),W=H?H.find():void 0;W=W||p.getCursor(),p.setCursor(W)}},scroll:function(p,y,C){if(!C.visualMode){var k=y.repeat||1,I=p.defaultTextHeight(),M=p.getScrollInfo().top,H=I*k,W=y.forward?M+H:M-H,V=Xi(p.getCursor()),X=p.charCoords(V,"local");if(y.forward)W>X.top?(V.line+=(W-X.top)/I,V.line=Math.ceil(V.line),p.setCursor(V),X=p.charCoords(V,"local"),p.scrollTo(null,X.top)):p.scrollTo(null,W);else{var oe=W+p.getScrollInfo().clientHeight;oe<X.bottom?(V.line-=(X.bottom-oe)/I,V.line=Math.floor(V.line),p.setCursor(V),X=p.charCoords(V,"local"),p.scrollTo(null,X.bottom-p.getScrollInfo().clientHeight)):p.scrollTo(null,W)}}},scrollToCursor:function(p,y){var C=p.getCursor().line,k=p.charCoords(new Ve(C,0),"local"),I=p.getScrollInfo().clientHeight,M=k.top,H=k.bottom-M;switch(y.position){case"center":M=M-I/2+H;break;case"bottom":M=M-I+H;break}p.moveCurrentLineTo(M)},replayMacro:function(p,y,C){var k=y.selectedCharacter,I=y.repeat,M=Y.macroModeState;for(k=="@"?k=M.latestRegister:M.latestRegister=k;I--;)Zie(p,C,M,k)},enterMacroRecordMode:function(p,y){var C=Y.macroModeState,k=y.selectedCharacter;Y.registerController.isValidRegister(k)&&C.enterMacroRecordMode(p,k)},toggleOverwrite:function(p){p.state.overwrite?(p.toggleOverwrite(!1),p.setOption("keyMap","vim-insert"),ut.default.signal(p,"vim-mode-change",{mode:"insert"})):(p.toggleOverwrite(!0),p.setOption("keyMap","vim-replace"),ut.default.signal(p,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(p,y,C){if(!p.getOption("readOnly")){C.insertMode=!0,C.insertModeRepeat=y&&y.repeat||1;var k=y?y.insertAt:null,I=C.sel,M=y.head||p.getCursor("head"),H=p.listSelections().length;if(k=="eol")M=new Ve(M.line,Ci(p,M.line));else if(k=="bol")M=new Ve(M.line,0);else if(k=="charAfter")M=pn(M,0,1);else if(k=="firstNonBlank")M=pi.moveToFirstNonWhiteSpaceCharacter(p,M);else if(k=="startOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(M=new Ve(Math.min(I.head.line,I.anchor.line),Math.min(I.head.ch,I.anchor.ch)),H=Math.abs(I.head.line-I.anchor.line)+1):I.head.line<I.anchor.line?M=I.head:M=new Ve(I.anchor.line,0)}else if(k=="endOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(M=new Ve(Math.min(I.head.line,I.anchor.line),Math.max(I.head.ch,I.anchor.ch)+1),H=Math.abs(I.head.line-I.anchor.line)+1):I.head.line>=I.anchor.line?M=pn(I.head,0,1):M=new Ve(I.anchor.line,0)}else if(k=="inplace"){if(C.visualMode)return}else k=="lastEdit"&&(M=A9(p)||M);p.setOption("disableInput",!1),y&&y.replace?(p.toggleOverwrite(!0),p.setOption("keyMap","vim-replace"),ut.default.signal(p,"vim-mode-change",{mode:"replace"})):(p.toggleOverwrite(!1),p.setOption("keyMap","vim-insert"),ut.default.signal(p,"vim-mode-change",{mode:"insert"})),Y.macroModeState.isPlaying||(p.on("change",R9),ut.default.on(p.getInputField(),"keydown",O9)),C.visualMode&&ea(p),Sr(p,M,H)}},toggleVisualMode:function(p,y,C){var k=y.repeat,I=p.getCursor(),M;C.visualMode?C.visualLine^y.linewise||C.visualBlock^y.blockwise?(C.visualLine=!!y.linewise,C.visualBlock=!!y.blockwise,ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Yh(p)):ea(p):(C.visualMode=!0,C.visualLine=!!y.linewise,C.visualBlock=!!y.blockwise,M=zn(p,new Ve(I.line,I.ch+k-1)),C.sel={anchor:I,head:M},ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Yh(p),al(p,C,"<",bt(I,M)),al(p,C,">",Vt(I,M)))},reselectLastSelection:function(p,y,C){var k=C.lastSelection;if(C.visualMode&&g9(p,C),k){var I=k.anchorMark.find(),M=k.headMark.find();if(!I||!M)return;C.sel={anchor:I,head:M},C.visualMode=!0,C.visualLine=k.visualLine,C.visualBlock=k.visualBlock,Yh(p),al(p,C,"<",bt(I,M)),al(p,C,">",Vt(I,M)),ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(p,y,C){var k,I;if(C.visualMode){if(k=p.getCursor("anchor"),I=p.getCursor("head"),De(I,k)){var M=I;I=k,k=M}I.ch=Ci(p,I.line)-1}else{var H=Math.max(y.repeat,2);k=p.getCursor(),I=zn(p,new Ve(k.line+H-1,1/0))}for(var W=0,V=k.line;V<I.line;V++){W=Ci(p,k.line);var M=new Ve(k.line+1,Ci(p,k.line+1)),X=p.getRange(k,M);X=y.keepSpaces?X.replace(/\n\r?/g,""):X.replace(/\n\s*/g," "),p.replaceRange(X,k,M)}var oe=new Ve(k.line,W);C.visualMode&&ea(p,!1),p.setCursor(oe)},newLineAndEnterInsertMode:function(p,y,C){if(!p.getOption("readOnly")){C.insertMode=!0;var k=Xi(p.getCursor());if(k.line===p.firstLine()&&!y.after)p.replaceRange(`
`,new Ve(p.firstLine(),0)),p.setCursor(p.firstLine(),0);else{k.line=y.after?k.line:k.line-1,k.ch=Ci(p,k.line),p.setCursor(k);var I=ut.default.commands.newlineAndIndentContinueComment||ut.default.commands.newlineAndIndent;I(p)}this.enterInsertMode(p,{repeat:y.repeat},C)}},paste:function(p,y,C){var k=Xi(p.getCursor()),I=Y.registerController.getRegister(y.registerName),M=I.toString();if(M){if(y.matchIndent){var H=p.getOption("tabSize"),W=function(Mc){var Em=Mc.split(" ").length-1,Tm=Mc.split(" ").length-1;return Em*H+Tm*1},V=p.getLine(p.getCursor().line),X=W(V.match(/^\s*/)[0]),oe=M.replace(/\n$/,""),Ce=M!==oe,xe=W(M.match(/^\s*/)[0]),M=oe.replace(/^\s*/gm,function(Vr){var Mc=X+(W(Vr)-xe);if(Mc<0)return"";if(p.getOption("indentWithTabs")){var Em=Math.floor(Mc/H);return Array(Em+1).join(" ")}else return Array(Mc+1).join(" ")});M+=Ce?`
`:""}if(y.repeat>1)var M=Array(y.repeat+1).join(M);var ye=I.linewise,Ze=I.blockwise;if(Ze){M=M.split(`
`),ye&&M.pop();for(var tt=0;tt<M.length;tt++)M[tt]=M[tt]==""?" ":M[tt];k.ch+=y.after?1:0,k.ch=Math.min(Ci(p,k.line),k.ch)}else ye?C.visualMode?M=C.visualLine?M.slice(0,-1):`
`+M.slice(0,M.length-1)+`
`:y.after?(M=`
`+M.slice(0,M.length-1),k.ch=Ci(p,k.line)):k.ch=0:k.ch+=y.after?1:0;var Ye,zt;if(C.visualMode){C.lastPastedText=M;var It,Lt=xs(p,C),Ui=Lt[0],so=Lt[1],mn=p.getSelection(),Wr=p.listSelections(),Ai=new Array(Wr.length).join("1").split("1");C.lastSelection&&(It=C.lastSelection.headMark.find()),Y.registerController.unnamedRegister.setText(mn),Ze?(p.replaceSelections(Ai),so=new Ve(Ui.line+M.length-1,Ui.ch),p.setCursor(Ui),Ac(p,so),p.replaceSelections(M),Ye=Ui):C.visualBlock?(p.replaceSelections(Ai),p.setCursor(Ui),p.replaceRange(M,Ui,Ui),Ye=Ui):(p.replaceRange(M,Ui,so),Ye=p.posFromIndex(p.indexFromPos(Ui)+M.length-1)),It&&(C.lastSelection.headMark=p.setBookmark(It)),ye&&(Ye.ch=0)}else if(Ze){p.setCursor(k);for(var tt=0;tt<M.length;tt++){var si=k.line+tt;si>p.lastLine()&&p.replaceRange(`
`,new Ve(si,0));var dr=Ci(p,si);dr<k.ch&&su(p,si,k.ch)}p.setCursor(k),Ac(p,new Ve(k.line+M.length-1,k.ch)),p.replaceSelections(M),Ye=k}else p.replaceRange(M,k),ye&&y.after?Ye=new Ve(k.line+1,ta(p.getLine(k.line+1))):ye&&!y.after?Ye=new Ve(k.line,ta(p.getLine(k.line))):!ye&&y.after?(zt=p.indexFromPos(k),Ye=p.posFromIndex(zt+M.length-1)):(zt=p.indexFromPos(k),Ye=p.posFromIndex(zt+M.length));C.visualMode&&ea(p,!1),p.setCursor(Ye)}},undo:function(p,y){p.operation(function(){Dv(p,ut.default.commands.undo,y.repeat)(),p.setCursor(p.getCursor("anchor"))})},redo:function(p,y){Dv(p,ut.default.commands.redo,y.repeat)()},setRegister:function(p,y,C){C.inputState.registerName=y.selectedCharacter},setMark:function(p,y,C){var k=y.selectedCharacter;al(p,C,k,p.getCursor())},replace:function(p,y,C){var k=y.selectedCharacter,I=p.getCursor(),M,H,W=p.listSelections();if(C.visualMode)I=p.getCursor("start"),H=p.getCursor("end");else{var V=p.getLine(I.line);M=I.ch+y.repeat,M>V.length&&(M=V.length),H=new Ve(I.line,M)}if(k==`
`)C.visualMode||p.replaceRange("",I,H),(ut.default.commands.newlineAndIndentContinueComment||ut.default.commands.newlineAndIndent)(p);else{var X=p.getRange(I,H);if(X=X.replace(/[^\n]/g,k),C.visualBlock){var oe=new Array(p.getOption("tabSize")+1).join(" ");X=p.getSelection(),X=X.replace(/\t/g,oe).replace(/[^\n]/g,k).split(`
`),p.replaceSelections(X)}else p.replaceRange(X,I,H);C.visualMode?(I=De(W[0].anchor,W[0].head)?W[0].anchor:W[0].head,p.setCursor(I),ea(p,!1)):p.setCursor(pn(H,0,-1))}},incrementNumberToken:function(p,y){for(var C=p.getCursor(),k=p.getLine(C.line),I=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,M,H,W,V;(M=I.exec(k))!==null&&(H=M.index,W=H+M[0].length,!(C.ch<W)););if(!(!y.backtrack&&W<=C.ch)){if(M){var X=M[2]||M[4],oe=M[3]||M[5],Ce=y.increase?1:-1,xe={"0b":2,0:8,"":10,"0x":16}[X.toLowerCase()],ye=parseInt(M[1]+oe,xe)+Ce*y.repeat;V=ye.toString(xe);var Ze=X?new Array(oe.length-V.length+1+M[1].length).join("0"):"";V.charAt(0)==="-"?V="-"+X+Ze+V.substr(1):V=X+Ze+V;var tt=new Ve(C.line,H),Ye=new Ve(C.line,W);p.replaceRange(V,tt,Ye)}else return;p.setCursor(new Ve(C.line,H+V.length-1))}},repeatLastEdit:function(p,y,C){var k=C.lastEditInputState;if(k){var I=y.repeat;I&&y.repeatIsExplicit?C.lastEditInputState.repeatOverride=I:I=C.lastEditInputState.repeatOverride||I,F9(p,C,I,!1)}},indent:function(p,y){p.indentLine(p.getCursor().line,y.indentRight)},exitInsertMode:km};function ou(S,p){sl[S]=p}function zn(S,p){var y=S.state.vim,C=y.insertMode||y.visualMode,k=Math.min(Math.max(S.firstLine(),p.line),S.lastLine()),I=Ci(S,k)-1+!!C,M=Math.min(Math.max(0,p.ch),I);return new Ve(k,M)}function Yo(S){var p={};for(var y in S)S.hasOwnProperty(y)&&(p[y]=S[y]);return p}function pn(S,p,y){return T4(p)==="object"&&(y=p.ch,p=p.line),new Ve(S.line+p,S.ch+y)}function x3(S,p,y,C){for(var k,I=[],M=[],H=0;H<p.length;H++){var W=p[H];y=="insert"&&W.context!="insert"||W.context&&W.context!=y||C.operator&&W.type=="action"||!(k=C3(S,W.keys))||(k=="partial"&&I.push(W),k=="full"&&M.push(W))}return{partial:I.length&&I,full:M.length&&M}}function C3(S,p){if(p.slice(-11)=="<character>"){var y=p.length-11,C=S.slice(0,y),k=p.slice(0,y);return C==k&&S.length>y?"full":k.indexOf(C)==0?"partial":!1}else return S==p?"full":p.indexOf(S)==0?"partial":!1}function S3(S){var p=/^.*(<[^>]+>)$/.exec(S),y=p?p[1]:S.slice(-1);if(y.length>1)switch(y){case"<CR>":y=`
`;break;case"<Space>":y=" ";break;default:y="";break}return y}function Dv(S,p,y){return function(){for(var C=0;C<y;C++)p(S)}}function Xi(S){return new Ve(S.line,S.ch)}function ge(S,p){return S.ch==p.ch&&S.line==p.line}function De(S,p){return S.line<p.line||S.line==p.line&&S.ch<p.ch}function bt(S,p){return arguments.length>2&&(p=bt.apply(void 0,Array.prototype.slice.call(arguments,1))),De(S,p)?S:p}function Vt(S,p){return arguments.length>2&&(p=Vt.apply(void 0,Array.prototype.slice.call(arguments,1))),De(S,p)?p:S}function xi(S,p,y){var C=De(S,p),k=De(p,y);return C&&k}function Ci(S,p){return S.getLine(p).length}function ys(S){return S.trim?S.trim():S.replace(/^\s+|\s+$/g,"")}function ws(S){return S.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function su(S,p,y){var C=Ci(S,p),k=new Array(y-C+1).join(" ");S.setCursor(new Ve(p,C)),S.replaceRange(k,S.getCursor())}function Ac(S,p){var y=[],C=S.listSelections(),k=Xi(S.clipPos(p)),I=!ge(p,k),M=S.getCursor("head"),H=Dc(C,M),W=ge(C[H].head,C[H].anchor),V=C.length-1,X=V-H>H?V:0,oe=C[X].anchor,Ce=Math.min(oe.line,k.line),xe=Math.max(oe.line,k.line),ye=oe.ch,Ze=k.ch,tt=C[X].head.ch-ye,Ye=Ze-ye;tt>0&&Ye<=0?(ye++,I||Ze--):tt<0&&Ye>=0?(ye--,W||Ze++):tt<0&&Ye==-1&&(ye--,Ze++);for(var zt=Ce;zt<=xe;zt++){var It={anchor:new Ve(zt,ye),head:new Ve(zt,Ze)};y.push(It)}return S.setSelections(y),p.ch=Ze,oe.ch=ye,oe}function Sr(S,p,y){for(var C=[],k=0;k<y;k++){var I=pn(p,k,0);C.push({anchor:I,head:I})}S.setSelections(C,0)}function Dc(S,p,y){for(var C=0;C<S.length;C++){var k=y!="head"&&ge(S[C].anchor,p),I=y!="anchor"&&ge(S[C].head,p);if(k||I)return C}return-1}function xs(S,p){var y=p.lastSelection,C=function(){var M=S.listSelections(),H=M[0],W=M[M.length-1],V=De(H.anchor,H.head)?H.anchor:H.head,X=De(W.anchor,W.head)?W.head:W.anchor;return[V,X]},k=function(){var M=S.getCursor(),H=S.getCursor(),W=y.visualBlock;if(W){var V=W.width,X=W.height;H=new Ve(M.line+X,M.ch+V);for(var oe=[],Ce=M.line;Ce<H.line;Ce++){var xe=new Ve(Ce,M.ch),ye=new Ve(Ce,H.ch),Ze={anchor:xe,head:ye};oe.push(Ze)}S.setSelections(oe)}else{var tt=y.anchorMark.find(),Ye=y.headMark.find(),zt=Ye.line-tt.line,It=Ye.ch-tt.ch;H={line:H.line+zt,ch:zt?H.ch:It+H.ch},y.visualLine&&(M=new Ve(M.line,0),H=new Ve(H.line,Ci(S,H.line))),S.setSelection(M,H)}return[M,H]};return p.visualMode?C():k()}function g9(S,p){var y=p.sel.anchor,C=p.sel.head;p.lastPastedText&&(C=S.posFromIndex(S.indexFromPos(y)+p.lastPastedText.length),p.lastPastedText=null),p.lastSelection={anchorMark:S.setBookmark(y),headMark:S.setBookmark(C),anchor:Xi(y),head:Xi(C),visualMode:p.visualMode,visualLine:p.visualLine,visualBlock:p.visualBlock}}function kie(S,p,y){var C=S.state.vim.sel,k=C.head,I=C.anchor,M;return De(y,p)&&(M=y,y=p,p=M),De(k,I)?(k=bt(p,k),I=Vt(I,y)):(I=bt(p,I),k=Vt(k,y),k=pn(k,0,-1),k.ch==-1&&k.line!=S.firstLine()&&(k=new Ve(k.line-1,Ci(S,k.line-1)))),[I,k]}function Yh(S,p,k){var C=S.state.vim;p=p||C.sel;var k=k||C.visualLine?"line":C.visualBlock?"block":"char",I=k3(S,p,k);S.setSelections(I.ranges,I.primary)}function k3(S,p,y,C){var k=Xi(p.head),I=Xi(p.anchor);if(y=="char"){var M=!C&&!De(p.head,p.anchor)?1:0,H=De(p.head,p.anchor)?1:0;return k=pn(p.head,0,M),I=pn(p.anchor,0,H),{ranges:[{anchor:I,head:k}],primary:0}}else if(y=="line"){if(De(p.head,p.anchor))k.ch=0,I.ch=Ci(S,I.line);else{I.ch=0;var W=S.lastLine();k.line>W&&(k.line=W),k.ch=Ci(S,k.line)}return{ranges:[{anchor:I,head:k}],primary:0}}else if(y=="block"){var V=Math.min(I.line,k.line),X=I.ch,oe=Math.max(I.line,k.line),Ce=k.ch;X<Ce?Ce+=1:X+=1;for(var xe=oe-V+1,ye=k.line==V?0:xe-1,Ze=[],tt=0;tt<xe;tt++)Ze.push({anchor:new Ve(V+tt,X),head:new Ve(V+tt,Ce)});return{ranges:Ze,primary:ye}}}function Eie(S){var p=S.getCursor("head");return S.getSelection().length==1&&(p=bt(p,S.getCursor("anchor"))),p}function ea(S,p){var y=S.state.vim;p!==!1&&S.setCursor(zn(S,y.sel.head)),g9(S,y),y.visualMode=!1,y.visualLine=!1,y.visualBlock=!1,y.insertMode||ut.default.signal(S,"vim-mode-change",{mode:"normal"})}function Tie(S,p,y){var C=S.getRange(p,y);if(/\n\s*$/.test(C)){var k=C.split(`
`);k.pop();for(var I,I=k.pop();k.length>0&&I&&ae(I);I=k.pop())y.line--,y.ch=0;I?(y.line--,y.ch=Ci(S,y.line)):y.ch=0}}function Iie(S,p,y){p.ch=0,y.ch=0,y.line++}function ta(S){if(!S)return 0;var p=S.search(/\S/);return p==-1?S.length:p}function Mv(S,p,y,C,k){for(var I=Eie(S),M=S.getLine(I.line),H=I.ch,W=k?d[0]:u[0];!W(M.charAt(H));)if(H++,H>=M.length)return null;C?W=u[0]:(W=d[0],W(M.charAt(H))||(W=d[1]));for(var V=H,X=H;W(M.charAt(V))&&V<M.length;)V++;for(;W(M.charAt(X))&&X>=0;)X--;if(X++,p){for(var oe=V;/\s/.test(M.charAt(V))&&V<M.length;)V++;if(oe==V){for(var Ce=X;/\s/.test(M.charAt(X-1))&&X>0;)X--;X||(X=Ce)}}return{start:new Ve(I.line,X),end:new Ve(I.line,V)}}function Lie(S,p,y){var C=p;if(!ut.default.findMatchingTag||!ut.default.findEnclosingTag)return{start:C,end:C};var k=ut.default.findMatchingTag(S,p)||ut.default.findEnclosingTag(S,p);return!k||!k.open||!k.close?{start:C,end:C}:y?{start:k.open.from,end:k.close.to}:{start:k.open.to,end:k.close.from}}function b9(S,p,y){ge(p,y)||Y.jumpList.add(S,p,y)}function v9(S,p){Y.lastCharacterSearch.increment=S,Y.lastCharacterSearch.forward=p.forward,Y.lastCharacterSearch.selectedCharacter=p.selectedCharacter}var Aie={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},_9={bracket:{isComplete:function(p){if(p.nextCh===p.symb){if(p.depth++,p.depth>=1)return!0}else p.nextCh===p.reverseSymb&&p.depth--;return!1}},section:{init:function(p){p.curMoveThrough=!0,p.symb=(p.forward?"]":"[")===p.symb?"{":"}"},isComplete:function(p){return p.index===0&&p.nextCh===p.symb}},comment:{isComplete:function(p){var y=p.lastCh==="*"&&p.nextCh==="/";return p.lastCh=p.nextCh,y}},method:{init:function(p){p.symb=p.symb==="m"?"{":"}",p.reverseSymb=p.symb==="{"?"}":"{"},isComplete:function(p){return p.nextCh===p.symb}},preprocess:{init:function(p){p.index=0},isComplete:function(p){if(p.nextCh==="#"){var y=p.lineText.match(/^#(\w+)/)[1];if(y==="endif"){if(p.forward&&p.depth===0)return!0;p.depth++}else if(y==="if"){if(!p.forward&&p.depth===0)return!0;p.depth--}if(y==="else"&&p.depth===0)return!0}return!1}}};function Die(S,p,y,C){var k=Xi(S.getCursor()),I=y?1:-1,M=y?S.lineCount():-1,H=k.ch,W=k.line,V=S.getLine(W),X={lineText:V,nextCh:V.charAt(H),lastCh:null,index:H,symb:C,reverseSymb:(y?{")":"(","}":"{"}:{"(":")","{":"}"})[C],forward:y,depth:0,curMoveThrough:!1},oe=Aie[C];if(!oe)return k;var Ce=_9[oe].init,xe=_9[oe].isComplete;for(Ce&&Ce(X);W!==M&&p;){if(X.index+=I,X.nextCh=X.lineText.charAt(X.index),!X.nextCh){if(W+=I,X.lineText=S.getLine(W)||"",I>0)X.index=0;else{var ye=X.lineText.length;X.index=ye>0?ye-1:0}X.nextCh=X.lineText.charAt(X.index)}xe(X)&&(k.line=W,k.ch=X.index,p--)}return X.nextCh||X.curMoveThrough?new Ve(W,X.index):k}function Mie(S,p,y,C,k){var I=p.line,M=p.ch,H=S.getLine(I),W=y?1:-1,V=C?u:d;if(k&&H==""){if(I+=W,H=S.getLine(I),!A(S,I))return null;M=y?0:H.length}for(;;){if(k&&H=="")return{from:0,to:0,line:I};for(var X=W>0?H.length:-1,oe=X,Ce=X;M!=X;){for(var xe=!1,ye=0;ye<V.length&&!xe;++ye)if(V[ye](H.charAt(M))){for(oe=M;M!=X&&V[ye](H.charAt(M));)M+=W;if(Ce=M,xe=oe!=Ce,oe==p.ch&&I==p.line&&Ce==oe+W)continue;return{from:Math.min(oe,Ce+1),to:Math.max(oe,Ce),line:I}}xe||(M+=W)}if(I+=W,!A(S,I))return null;H=S.getLine(I),M=W>0?0:H.length}}function Nie(S,p,y,C,k,I){var M=Xi(p),H=[];(C&&!k||!C&&k)&&y++;for(var W=!(C&&k),V=0;V<y;V++){var X=Mie(S,p,C,I,W);if(!X){var oe=Ci(S,S.lastLine());H.push(C?{line:S.lastLine(),from:oe,to:oe}:{line:0,from:0,to:0});break}H.push(X),p=new Ve(X.line,C?X.to-1:X.from)}var Ce=H.length!=y,xe=H[0],ye=H.pop();return C&&!k?(!Ce&&(xe.from!=M.ch||xe.line!=M.line)&&(ye=H.pop()),new Ve(ye.line,ye.from)):C&&k?new Ve(ye.line,ye.to-1):!C&&k?(!Ce&&(xe.to!=M.ch||xe.line!=M.line)&&(ye=H.pop()),new Ve(ye.line,ye.to)):new Ve(ye.line,ye.from)}function y9(S,p,y,C,k){var I=p,M=new Ve(I.line+y.repeat-1,1/0),H=S.clipPos(M);return H.ch--,k||(C.lastHPos=1/0,C.lastHSPos=S.charCoords(H,"div").left),M}function E3(S,p,y,C){for(var k=S.getCursor(),I=k.ch,M,H=0;H<p;H++){var W=S.getLine(k.line);if(M=Pie(I,W,C,y,!0),M==-1)return null;I=M}return new Ve(S.getCursor().line,M)}function Rie(S,p){var y=S.getCursor().line;return zn(S,new Ve(y,p-1))}function al(S,p,y,C){Z(y,w)&&(p.marks[y]&&p.marks[y].clear(),p.marks[y]=S.setBookmark(C))}function Pie(S,p,y,C,k){var I;return C?(I=p.indexOf(y,S+1),I!=-1&&!k&&(I-=1)):(I=p.lastIndexOf(y,S-1),I!=-1&&!k&&(I+=1)),I}function w9(S,p,y,C,k){var I=p.line,M=S.firstLine(),H=S.lastLine(),W,V,X=I;function oe(tt){return!S.getLine(tt)}function Ce(tt,Ye,zt){return zt?oe(tt)!=oe(tt+Ye):!oe(tt)&&oe(tt+Ye)}if(C){for(;M<=X&&X<=H&&y>0;)Ce(X,C)&&y--,X+=C;return new Ve(X,0)}var xe=S.state.vim;if(xe.visualLine&&Ce(I,1,!0)){var ye=xe.sel.anchor;Ce(ye.line,-1,!0)&&(!k||ye.line!=I)&&(I+=1)}var Ze=oe(I);for(X=I;X<=H&&y;X++)Ce(X,1,!0)&&(!k||oe(X)!=Ze)&&y--;for(V=new Ve(X,0),X>H&&!Ze?Ze=!0:k=!1,X=I;X>M&&!((!k||oe(X)==Ze||X==I)&&Ce(X,-1,!0));X--);return W=new Ve(X,0),{start:W,end:V}}function Oie(S,p,y,C){function k(W,V){if(V.pos+V.dir<0||V.pos+V.dir>=V.line.length){if(V.ln+=V.dir,!A(W,V.ln)){V.line=null,V.ln=null,V.pos=null;return}V.line=W.getLine(V.ln),V.pos=V.dir>0?0:V.line.length-1}else V.pos+=V.dir}function I(W,V,X,oe){var tt=W.getLine(V),Ce=tt==="",xe={line:tt,ln:V,pos:X,dir:oe},ye={ln:xe.ln,pos:xe.pos},Ze=xe.line==="";for(k(W,xe);xe.line!==null;){if(ye.ln=xe.ln,ye.pos=xe.pos,xe.line===""&&!Ze)return{ln:xe.ln,pos:xe.pos};if(Ce&&xe.line!==""&&!ae(xe.line[xe.pos]))return{ln:xe.ln,pos:xe.pos};te(xe.line[xe.pos])&&!Ce&&(xe.pos===xe.line.length-1||ae(xe.line[xe.pos+1]))&&(Ce=!0),k(W,xe)}var tt=W.getLine(ye.ln);ye.pos=0;for(var Ye=tt.length-1;Ye>=0;--Ye)if(!ae(tt[Ye])){ye.pos=Ye;break}return ye}function M(W,V,X,oe){var Ze=W.getLine(V),Ce={line:Ze,ln:V,pos:X,dir:oe},xe={ln:Ce.ln,pos:null},ye=Ce.line==="";for(k(W,Ce);Ce.line!==null;){if(Ce.line===""&&!ye)return xe.pos!==null?xe:{ln:Ce.ln,pos:Ce.pos};if(te(Ce.line[Ce.pos])&&xe.pos!==null&&!(Ce.ln===xe.ln&&Ce.pos+1===xe.pos))return xe;Ce.line!==""&&!ae(Ce.line[Ce.pos])&&(ye=!1,xe={ln:Ce.ln,pos:Ce.pos}),k(W,Ce)}var Ze=W.getLine(xe.ln);xe.pos=0;for(var tt=0;tt<Ze.length;++tt)if(!ae(Ze[tt])){xe.pos=tt;break}return xe}for(var H={ln:p.line,pos:p.ch};y>0;)C<0?H=M(S,H.ln,H.pos,C):H=I(S,H.ln,H.pos,C),y--;return new Ve(H.ln,H.pos)}function Fie(S,p,y,C){var k=p,I,M,H={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[y],W={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[y],V=S.getLine(k.line).charAt(k.ch),X=V===W?1:0;if(I=S.scanForBracket(new Ve(k.line,k.ch+X),-1,void 0,{bracketRegex:H}),M=S.scanForBracket(new Ve(k.line,k.ch+X),1,void 0,{bracketRegex:H}),!I||!M)return{start:k,end:k};if(I=I.pos,M=M.pos,I.line==M.line&&I.ch>M.ch||I.line>M.line){var oe=I;I=M,M=oe}return C?M.ch+=1:I.ch+=1,{start:I,end:M}}function zie(S,p,y,C){var k=Xi(p),I=S.getLine(k.line),M=I.split(""),H,W,V,X,oe=M.indexOf(y);if(k.ch<oe?k.ch=oe:oe<k.ch&&M[k.ch]==y&&(W=k.ch,--k.ch),M[k.ch]==y&&!W)H=k.ch+1;else for(V=k.ch;V>-1&&!H;V--)M[V]==y&&(H=V+1);if(H&&!W)for(V=H,X=M.length;V<X&&!W;V++)M[V]==y&&(W=V);return!H||!W?{start:k,end:k}:(C&&(--H,++W),{start:new Ve(k.line,H),end:new Ve(k.line,W)})}Pe("pcre",!0,"boolean");function x9(){}x9.prototype={getQuery:function(){return Y.query},setQuery:function(p){Y.query=p},getOverlay:function(){return this.searchOverlay},setOverlay:function(p){this.searchOverlay=p},isReversed:function(){return Y.isReversed},setReversed:function(p){Y.isReversed=p},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(p){this.annotate=p}};function ia(S){var p=S.state.vim;return p.searchState_||(p.searchState_=new x9)}function Bie(S){return C9(S,"/")}function Hie(S){return S9(S,"/")}function C9(S,p){var y=S9(S,p)||[];if(!y.length)return[];var C=[];if(y[0]===0){for(var k=0;k<y.length;k++)typeof y[k]=="number"&&C.push(S.substring(y[k]+1,y[k+1]));return C}}function S9(S,p){p||(p="/");for(var y=!1,C=[],k=0;k<S.length;k++){var I=S.charAt(k);!y&&I==p&&C.push(k),y=!y&&I=="\\"}return C}function Uie(S){for(var p="|(){",y="}",C=!1,k=[],I=-1;I<S.length;I++){var M=S.charAt(I)||"",H=S.charAt(I+1)||"",W=H&&p.indexOf(H)!=-1;C?((M!=="\\"||!W)&&k.push(M),C=!1):M==="\\"?(C=!0,H&&y.indexOf(H)!=-1&&(W=!0),(!W||H==="\\")&&k.push(M)):(k.push(M),W&&H!=="\\"&&k.push("\\"))}return k.join("")}var k9={"\\n":`
`,"\\r":"\r","\\t":" "};function jie(S){for(var p=!1,y=[],C=-1;C<S.length;C++){var k=S.charAt(C)||"",I=S.charAt(C+1)||"";k9[k+I]?(y.push(k9[k+I]),C++):p?(y.push(k),p=!1):k==="\\"?(p=!0,U(I)||I==="$"?y.push("$"):I!=="/"&&I!=="\\"&&y.push("\\")):(k==="$"&&y.push("$"),y.push(k),I==="/"&&y.push("\\"))}return y.join("")}var E9={"\\/":"/","\\\\":"\\","\\n":`
`,"\\r":"\r","\\t":" ","\\&":"&"};function Wie(S){for(var p=new ut.default.StringStream(S),y=[];!p.eol();){for(;p.peek()&&p.peek()!="\\";)y.push(p.next());var C=!1;for(var k in E9)if(p.match(k,!0)){C=!0,y.push(E9[k]);break}C||y.push(p.next())}return y.join("")}function Vie(S,p,y){var C=Y.registerController.getRegister("/");if(C.setText(S),S instanceof RegExp)return S;var k=Hie(S),I,M;if(!k.length)I=S;else{I=S.substring(0,k[0]);var H=S.substring(k[0]);M=H.indexOf("i")!=-1}if(!I)return null;Oe("pcre")||(I=Uie(I)),y&&(p=/^[^A-Z]*$/.test(I));var W=new RegExp(I,p||M?"im":"m");return W}function au(S){typeof S=="string"&&(S=document.createElement(S));for(var p,y=1;y<arguments.length;y++)if(p=arguments[y])if(T4(p)!=="object"&&(p=document.createTextNode(p)),p.nodeType)S.appendChild(p);else for(var C in p)Object.prototype.hasOwnProperty.call(p,C)&&(C[0]==="$"?S.style[C.slice(1)]=p[C]:S.setAttribute(C,p[C]));return S}function Hi(S,p){var y=au("pre",{$color:"red",class:"cm-vim-message"},p);S.openNotification?S.openNotification(y,{bottom:!0,duration:5e3}):alert(y.innerText)}function qie(S,p){return au(document.createDocumentFragment(),au("span",{$fontFamily:"monospace",$whiteSpace:"pre"},S,au("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false"})),p&&au("span",{$color:"#888"},p))}function Nv(S,p){var y=qie(p.prefix,p.desc);if(S.openDialog)S.openDialog(y,p.onClose,{onKeyDown:p.onKeyDown,onKeyUp:p.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:p.value});else{var C="";typeof p.prefix!="string"&&p.prefix&&(C+=p.prefix.textContent),p.desc&&(C+=" "+p.desc),p.onClose(prompt(C,""))}}function Kie(S,p){if(S instanceof RegExp&&p instanceof RegExp){for(var y=["global","multiline","ignoreCase","source"],C=0;C<y.length;C++){var k=y[C];if(S[k]!==p[k])return!1}return!0}return!1}function Sm(S,p,y,C){if(p){var k=ia(S),I=Vie(p,!!y,!!C);if(I)return T9(S,I),Kie(I,k.getQuery())||k.setQuery(I),I}}function $ie(S){if(S.source.charAt(0)=="^")var p=!0;return{token:function(C){if(p&&!C.sol()){C.skipToEnd();return}var k=C.match(S,!1);if(k)return k[0].length==0?(C.next(),"searching"):!C.sol()&&(C.backUp(1),!S.exec(C.next()+k[0]))?(C.next(),null):(C.match(S),"searching");for(;!C.eol()&&(C.next(),!C.match(S,!1)););},query:S}}var Rv=0;function T9(S,p){clearTimeout(Rv),Rv=setTimeout(function(){if(S.state.vim){var y=ia(S),C=y.getOverlay();(!C||p!=C.query)&&(C&&S.removeOverlay(C),C=$ie(p),S.addOverlay(C),S.showMatchesOnScrollbar&&(y.getScrollbarAnnotate()&&y.getScrollbarAnnotate().clear(),y.setScrollbarAnnotate(S.showMatchesOnScrollbar(p))),y.setOverlay(C))}},50)}function I9(S,p,y,C){return C===void 0&&(C=1),S.operation(function(){for(var k=S.getCursor(),I=S.getSearchCursor(y,k),M=0;M<C;M++){var H=I.find(p);if(M==0&&H&&ge(I.from(),k)){var W=p?I.from():I.to();H=I.find(p),H&&!H[0]&&ge(I.from(),W)&&S.getLine(W.line).length==W.ch&&(H=I.find(p))}if(!H&&(I=S.getSearchCursor(y,p?new Ve(S.lastLine()):new Ve(S.firstLine(),0)),!I.find(p)))return}return I.from()})}function Gie(S,p,y,C,k){return C===void 0&&(C=1),S.operation(function(){var I=S.getCursor(),M=S.getSearchCursor(y,I),H=M.find(!p);!k.visualMode&&H&&ge(M.from(),I)&&M.find(!p);for(var W=0;W<C;W++)if(H=M.find(p),!H&&(M=S.getSearchCursor(y,p?new Ve(S.lastLine()):new Ve(S.firstLine(),0)),!M.find(p)))return;return[M.from(),M.to()]})}function T3(S){var p=ia(S);S.removeOverlay(ia(S).getOverlay()),p.setOverlay(null),p.getScrollbarAnnotate()&&(p.getScrollbarAnnotate().clear(),p.setScrollbarAnnotate(null))}function Yie(S,p,y){return typeof S!="number"&&(S=S.line),p instanceof Array?Z(S,p):typeof y=="number"?S>=p&&S<=y:S==p}function I3(S){var p=S.getScrollInfo(),y=6,C=10,k=S.coordsChar({left:0,top:y+p.top},"local"),I=p.clientHeight-C+p.top,M=S.coordsChar({left:0,top:I},"local");return{top:k.line,bottom:M.line}}function L9(S,p,y){if(y=="'"||y=="`")return Y.jumpList.find(S,-1)||new Ve(0,0);if(y==".")return A9(S);var C=p.marks[y];return C&&C.find()}function A9(S){for(var p=S.doc.history.done,y=p.length;y--;)if(p[y].changes)return Xi(p[y].changes[0].to)}var D9=function(){this.buildCommandMap_()};D9.prototype={processCommand:function(p,y,C){var k=this;p.operation(function(){p.curOp.isVimOp=!0,k._processCommand(p,y,C)})},_processCommand:function(p,y,C){var k=p.state.vim,I=Y.registerController.getRegister(":"),M=I.toString();k.visualMode&&ea(p);var H=new ut.default.StringStream(y);I.setText(y);var W=C||{};W.input=y;try{this.parseInput_(p,H,W)}catch(Ce){throw Hi(p,Ce.toString()),Ce}var V,X;if(!W.commandName)W.line!==void 0&&(X="move");else if(V=this.matchCommand_(W.commandName),V){if(X=V.name,V.excludeFromCommandHistory&&I.setText(M),this.parseCommandArgs_(H,W,V),V.type=="exToKey"){for(var oe=0;oe<V.toKeys.length;oe++)me.handleKey(p,V.toKeys[oe],"mapping");return}else if(V.type=="exToEx"){this.processCommand(p,V.toInput);return}}if(!X){Hi(p,'Not an editor command ":'+y+'"');return}try{M9[X](p,W),(!V||!V.possiblyAsync)&&W.callback&&W.callback()}catch(Ce){throw Hi(p,Ce.toString()),Ce}},parseInput_:function(p,y,C){y.eatWhile(":"),y.eat("%")?(C.line=p.firstLine(),C.lineEnd=p.lastLine()):(C.line=this.parseLineSpec_(p,y),C.line!==void 0&&y.eat(",")&&(C.lineEnd=this.parseLineSpec_(p,y)));var k=y.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return k?C.commandName=k[1]:C.commandName=y.match(/.*/)[0],C},parseLineSpec_:function(p,y){var C=y.match(/^(\d+)/);if(C)return parseInt(C[1],10)-1;switch(y.next()){case".":return this.parseLineSpecOffset_(y,p.getCursor().line);case"$":return this.parseLineSpecOffset_(y,p.lastLine());case"'":var k=y.next(),I=L9(p,p.state.vim,k);if(!I)throw new Error("Mark not set");return this.parseLineSpecOffset_(y,I.line);case"-":case"+":return y.backUp(1),this.parseLineSpecOffset_(y,p.getCursor().line);default:y.backUp(1);return}},parseLineSpecOffset_:function(p,y){var C=p.match(/^([+-])?(\d+)/);if(C){var k=parseInt(C[2],10);C[1]=="-"?y-=k:y+=k}return y},parseCommandArgs_:function(p,y,C){if(!p.eol()){y.argString=p.match(/.*/)[0];var k=C.argDelimiter||/\s+/,I=ys(y.argString).split(k);I.length&&I[0]&&(y.args=I)}},matchCommand_:function(p){for(var y=p.length;y>0;y--){var C=p.substring(0,y);if(this.commandMap_[C]){var k=this.commandMap_[C];if(k.name.indexOf(p)===0)return k}}return null},buildCommandMap_:function(){this.commandMap_={};for(var p=0;p<WQ.length;p++){var y=WQ[p],C=y.shortName||y.name;this.commandMap_[C]=y}},map:function(p,y,C){if(p!=":"&&p.charAt(0)==":"){if(C)throw Error("Mode not supported for ex mappings");var k=p.substring(1);y!=":"&&y.charAt(0)==":"?this.commandMap_[k]={name:k,type:"exToEx",toInput:y.substring(1),user:!0}:this.commandMap_[k]={name:k,type:"exToKey",toKeys:y,user:!0}}else if(y!=":"&&y.charAt(0)==":"){var I={keys:p,type:"keyToEx",exArgs:{input:y.substring(1)}};C&&(I.context=C),xr.unshift(I)}else{var I={keys:p,type:"keyToKey",toKeys:y};C&&(I.context=C),xr.unshift(I)}},unmap:function(p,y){if(p!=":"&&p.charAt(0)==":"){if(y)throw Error("Mode not supported for ex mappings");var C=p.substring(1);if(this.commandMap_[C]&&this.commandMap_[C].user)return delete this.commandMap_[C],!0}else for(var k=p,I=0;I<xr.length;I++)if(k==xr[I].keys&&xr[I].context===y)return xr.splice(I,1),!0}};var M9={colorscheme:function(p,y){if(!y.args||y.args.length<1){Hi(p,p.getOption("theme"));return}p.setOption("theme",y.args[0])},map:function(p,y,C){var k=y.args;if(!k||k.length<2){p&&Hi(p,"Invalid mapping: "+y.input);return}na.map(k[0],k[1],C)},imap:function(p,y){this.map(p,y,"insert")},nmap:function(p,y){this.map(p,y,"normal")},vmap:function(p,y){this.map(p,y,"visual")},unmap:function(p,y,C){var k=y.args;(!k||k.length<1||!na.unmap(k[0],C))&&p&&Hi(p,"No such mapping: "+y.input)},move:function(p,y){Ii.processCommand(p,p.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:y.line+1})},set:function(p,y){var C=y.args,k=y.setCfg||{};if(!C||C.length<1){p&&Hi(p,"Invalid mapping: "+y.input);return}var I=C[0].split("="),M=I[0],H=I[1],W=!1;if(M.charAt(M.length-1)=="?"){if(H)throw Error("Trailing characters: "+y.argString);M=M.substring(0,M.length-1),W=!0}H===void 0&&M.substring(0,2)=="no"&&(M=M.substring(2),H=!1);var V=ve[M]&&ve[M].type=="boolean";if(V&&H==null&&(H=!0),!V&&H===void 0||W){var X=Oe(M,p,k);X instanceof Error?Hi(p,X.message):X===!0||X===!1?Hi(p," "+(X?"":"no")+M):Hi(p," "+M+"="+X)}else{var oe=Ee(M,H,p,k);oe instanceof Error&&Hi(p,oe.message)}},setlocal:function(p,y){y.setCfg={scope:"local"},this.set(p,y)},setglobal:function(p,y){y.setCfg={scope:"global"},this.set(p,y)},registers:function(p,y){var C=y.args,k=Y.registerController.registers,I=`----------Registers----------
`;if(C){var M;C=C.join("");for(var W=0;W<C.length;W++)if(M=C.charAt(W),!!Y.registerController.isValidRegister(M)){var V=k[M]||new Ft;I+='"'+M+" "+V.toString()+`
`}}else for(var M in k){var H=k[M].toString();H.length&&(I+='"'+M+" "+H+`
`)}Hi(p,I)},sort:function(p,y){var C,k,I,M,H;function W(){if(y.argString){var Ai=new ut.default.StringStream(y.argString);if(Ai.eat("!")&&(C=!0),Ai.eol())return;if(!Ai.eatSpace())return"Invalid arguments";var si=Ai.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!si&&!Ai.eol())return"Invalid arguments";if(si[1]){k=si[1].indexOf("i")!=-1,I=si[1].indexOf("u")!=-1;var dr=si[1].indexOf("d")!=-1||si[1].indexOf("n")!=-1&&1,ao=si[1].indexOf("x")!=-1&&1,Vr=si[1].indexOf("o")!=-1&&1;if(dr+ao+Vr>1)return"Invalid arguments";M=dr&&"decimal"||ao&&"hex"||Vr&&"octal"}si[2]&&(H=new RegExp(si[2].substr(1,si[2].length-2),k?"i":""))}}var V=W();if(V){Hi(p,V+": "+y.argString);return}var X=y.line||p.firstLine(),oe=y.lineEnd||y.line||p.lastLine();if(X==oe)return;var Ce=new Ve(X,0),xe=new Ve(oe,Ci(p,oe)),ye=p.getRange(Ce,xe).split(`
`),Ze=H||(M=="decimal"?/(-?)([\d]+)/:M=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:M=="octal"?/([0-7]+)/:null),tt=M=="decimal"?10:M=="hex"?16:M=="octal"?8:null,Ye=[],zt=[];if(M||H)for(var It=0;It<ye.length;It++){var Lt=H?ye[It].match(H):null;Lt&&Lt[0]!=""?Ye.push(Lt):!H&&Ze.exec(ye[It])?Ye.push(ye[It]):zt.push(ye[It])}else zt=ye;function Ui(Ai,si){if(C){var dr;dr=Ai,Ai=si,si=dr}k&&(Ai=Ai.toLowerCase(),si=si.toLowerCase());var ao=M&&Ze.exec(Ai),Vr=M&&Ze.exec(si);return ao?(ao=parseInt((ao[1]+ao[2]).toLowerCase(),tt),Vr=parseInt((Vr[1]+Vr[2]).toLowerCase(),tt),ao-Vr):Ai<si?-1:1}function so(Ai,si){if(C){var dr;dr=Ai,Ai=si,si=dr}return k&&(Ai[0]=Ai[0].toLowerCase(),si[0]=si[0].toLowerCase()),Ai[0]<si[0]?-1:1}if(Ye.sort(H?so:Ui),H)for(var It=0;It<Ye.length;It++)Ye[It]=Ye[It].input;else M||zt.sort(Ui);if(ye=C?Ye.concat(zt):zt.concat(Ye),I){var mn=ye,Wr;ye=[];for(var It=0;It<mn.length;It++)mn[It]!=Wr&&ye.push(mn[It]),Wr=mn[It]}p.replaceRange(ye.join(`
`),Ce,xe)},vglobal:function(p,y){this.global(p,y)},global:function(p,y){var C=y.argString;if(!C){Hi(p,"Regular Expression missing from global");return}var k=y.commandName[0]==="v",I=y.line!==void 0?y.line:p.firstLine(),M=y.lineEnd||y.line||p.lastLine(),H=Bie(C),W=C,V;if(H.length&&(W=H[0],V=H.slice(1,H.length).join("/")),W)try{Sm(p,W,!0,!0)}catch(Ye){Hi(p,"Invalid regex: "+W);return}for(var X=ia(p).getQuery(),oe=[],Ce=I;Ce<=M;Ce++){var xe=p.getLineHandle(Ce),ye=X.test(xe.text);ye!==k&&oe.push(V?xe:xe.text)}if(!V){Hi(p,oe.join(`
`));return}var Ze=0,tt=function Ye(){if(Ze<oe.length){var zt=oe[Ze++],It=p.getLineNumber(zt);if(It==null){Ye();return}var Lt=It+1+V;na.processCommand(p,Lt,{callback:Ye})}};tt()},substitute:function(p,y){if(!p.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var C=y.argString,k=C?C9(C,C[0]):[],I,M="",H,W,V,X=!1,oe=!1;if(k.length)I=k[0],Oe("pcre")&&I!==""&&(I=new RegExp(I).source),M=k[1],M!==void 0&&(Oe("pcre")?M=Wie(M.replace(/([^\\])&/g,"$1$$&")):M=jie(M),Y.lastSubstituteReplacePart=M),H=k[2]?k[2].split(" "):[];else if(C&&C.length){Hi(p,"Substitutions should be of the form :s/pattern/replace/");return}if(H&&(W=H[0],V=parseInt(H[1]),W&&(W.indexOf("c")!=-1&&(X=!0),W.indexOf("g")!=-1&&(oe=!0),Oe("pcre")?I=I+"/"+W:I=I.replace(/\//g,"\\/")+"/"+W)),I)try{Sm(p,I,!0,!0)}catch(zt){Hi(p,"Invalid regex: "+I);return}if(M=M||Y.lastSubstituteReplacePart,M===void 0){Hi(p,"No previous substitute regular expression");return}var Ce=ia(p),xe=Ce.getQuery(),ye=y.line!==void 0?y.line:p.getCursor().line,Ze=y.lineEnd||ye;ye==p.firstLine()&&Ze==p.lastLine()&&(Ze=1/0),V&&(ye=Ze,Ze=ye+V-1);var tt=zn(p,new Ve(ye,0)),Ye=p.getSearchCursor(xe,tt);p.pushUndoStop(),Xie(p,X,oe,ye,Ze,Ye,xe,M,y.callback)},redo:ut.default.commands.redo,undo:ut.default.commands.undo,write:function(p){ut.default.commands.save?ut.default.commands.save(p):p.save&&p.save()},nohlsearch:function(p){T3(p)},yank:function(p){var y=Xi(p.getCursor()),C=y.line,k=p.getLine(C);Y.registerController.pushText("0","yank",k,!0,!0)},delmarks:function(p,y){if(!y.argString||!ys(y.argString)){Hi(p,"Argument required");return}for(var C=p.state.vim,k=new ut.default.StringStream(ys(y.argString));!k.eol();){k.eatSpace();var I=k.pos;if(!k.match(/[a-zA-Z]/,!1)){Hi(p,"Invalid argument: "+y.argString.substring(I));return}var M=k.next();if(k.match("-",!0)){if(!k.match(/[a-zA-Z]/,!1)){Hi(p,"Invalid argument: "+y.argString.substring(I));return}var H=M,W=k.next();if(L(H)&&L(W)||Q(H)&&Q(W)){var V=H.charCodeAt(0),X=W.charCodeAt(0);if(V>=X){Hi(p,"Invalid argument: "+y.argString.substring(I));return}for(var oe=0;oe<=X-V;oe++){var Ce=String.fromCharCode(V+oe);delete C.marks[Ce]}}else{Hi(p,"Invalid argument: "+H+"-");return}}else delete C.marks[M]}}},na=new D9;function Xie(S,p,y,C,k,I,M,H,W){S.state.vim.exMode=!0;var V=!1,X,oe,Ce;function xe(){S.operation(function(){for(;!V;)ye(),tt();Ye()})}function ye(){var It=S.getRange(I.from(),I.to()),Lt=It.replace(M,H),Ui=I.to().line;I.replace(Lt),oe=I.to().line,k+=oe-Ui,Ce=oe<Ui}function Ze(){var It=X&&Xi(I.to()),Lt=I.findNext();return Lt&&!Lt[0]&&It&&ge(I.from(),It)&&(Lt=I.findNext()),Lt}function tt(){for(;Ze()&&Yie(I.from(),C,k);)if(!(!y&&I.from().line==oe&&!Ce)){S.scrollIntoView(I.from(),30),S.setSelection(I.from(),I.to()),X=I.from(),V=!1;return}V=!0}function Ye(It){if(It&&It(),S.focus(),X){S.setCursor(X);var Lt=S.state.vim;Lt.exMode=!1,Lt.lastHPos=Lt.lastHSPos=X.ch}W&&W()}function zt(It,Lt,Ui){ut.default.e_stop(It);var so=ut.default.keyName(It);switch(so){case"Y":ye(),tt();break;case"N":tt();break;case"A":var mn=W;W=void 0,S.operation(xe),W=mn;break;case"L":ye();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":Ye(Ui);break}return V&&Ye(Ui),!0}if(tt(),V){Hi(S,"No matches for "+M.source);return}if(!p){xe(),W&&W();return}Nv(S,{prefix:au("span","replace with ",au("strong",H)," (y/n/a/q/l)"),onKeyDown:zt})}ut.default.keyMap.vim={attach:r,detach:n,call:o};function km(S){var p=S.state.vim,y=Y.macroModeState,C=Y.registerController.getRegister("."),k=y.isPlaying,I=y.lastInsertModeChanges;k||(S.off("change",R9),ut.default.off(S.getInputField(),"keydown",O9)),!k&&p.insertModeRepeat>1&&(F9(S,p,p.insertModeRepeat-1,!0),p.lastEditInputState.repeatOverride=p.insertModeRepeat),delete p.insertModeRepeat,p.insertMode=!1,S.setCursor(S.getCursor().line,S.getCursor().ch-1),S.setOption("keyMap","vim"),S.setOption("disableInput",!0),S.toggleOverwrite(!1),C.setText(I.changes.join("")),ut.default.signal(S,"vim-mode-change",{mode:"normal"}),y.isRecording&&ene(y),S.enterVimMode()}function N9(S){xr.unshift(S)}function Qie(S,p,y,C,k){var I={keys:S,type:p};I[p]=y,I[p+"Args"]=C;for(var M in k)I[M]=k[M];N9(I)}Pe("insertModeEscKeysTimeout",200,"number"),ut.default.keyMap["vim-insert"]={fallthrough:["default"],attach:r,detach:n,call:o},ut.default.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:r,detach:n,call:o};function Zie(S,p,y,C){var k=Y.registerController.getRegister(C);if(C==":"){k.keyBuffer[0]&&na.processCommand(S,k.keyBuffer[0]),y.isPlaying=!1;return}var I=k.keyBuffer,M=0;y.isPlaying=!0,y.replaySearchQueries=k.searchQueries.slice(0);for(var H=0;H<I.length;H++)for(var W=I[H],V,X;W;)if(V=/<\w+-.+?>|<\w+>|./.exec(W),X=V[0],W=W.substring(V.index+X.length),me.handleKey(S,X,"macro"),p.insertMode){var oe=k.insertModeChanges[M++].changes;Y.macroModeState.lastInsertModeChanges.changes=oe,z9(S,oe,1),km(S)}y.isPlaying=!1}function Jie(S,p){if(!S.isPlaying){var y=S.latestRegister,C=Y.registerController.getRegister(y);C&&C.pushText(p)}}function ene(S){if(!S.isPlaying){var p=S.latestRegister,y=Y.registerController.getRegister(p);y&&y.pushInsertModeChanges&&y.pushInsertModeChanges(S.lastInsertModeChanges)}}function tne(S,p){if(!S.isPlaying){var y=S.latestRegister,C=Y.registerController.getRegister(y);C&&C.pushSearchQuery&&C.pushSearchQuery(p)}}function R9(S,p){var y=Y.macroModeState,C=y.lastInsertModeChanges;if(!y.isPlaying)for(;p;){if(C.expectCursorActivityForChange=!0,C.ignoreCount>1)C.ignoreCount--;else if(p.origin=="+input"||p.origin=="paste"||p.origin===void 0){var k=S.listSelections().length;k>1&&(C.ignoreCount=k);var I=p.text.join(`
`);C.maybeReset&&(C.changes=[],C.maybeReset=!1),I&&(S.state.overwrite&&!/\n/.test(I)?C.changes.push([I]):C.changes.push(I))}p=p.next}}function P9(S){var p=S.state.vim;if(p.insertMode){var y=Y.macroModeState;if(y.isPlaying)return;var C=y.lastInsertModeChanges;C.expectCursorActivityForChange?C.expectCursorActivityForChange=!1:C.maybeReset=!0}else S.curOp.isVimOp||ine(S,p)}function ine(S,p){var y=S.getCursor("anchor"),C=S.getCursor("head");if(p.visualMode&&!S.somethingSelected()?ea(S,!1):!p.visualMode&&!p.insertMode&&S.somethingSelected()&&(p.visualMode=!0,p.visualLine=!1,ut.default.signal(S,"vim-mode-change",{mode:"visual"})),p.visualMode){var k=De(C,y)?0:-1,I=De(C,y)?-1:0;C=pn(C,0,k),y=pn(y,0,I),p.sel={anchor:y,head:C},al(S,p,"<",bt(C,y)),al(S,p,">",Vt(C,y))}else p.insertMode||(p.lastHPos=S.getCursor().ch)}function L3(S){this.keyName=S}function O9(S){var p=Y.macroModeState,y=p.lastInsertModeChanges,C=ut.default.keyName(S);if(!C)return;function k(){return y.maybeReset&&(y.changes=[],y.maybeReset=!1),y.changes.push(new L3(C)),!0}(C.indexOf("Delete")!=-1||C.indexOf("Backspace")!=-1)&&ut.default.lookupKey(C,"vim-insert",k)}function F9(S,p,y,C){var k=Y.macroModeState;k.isPlaying=!0;var I=!!p.lastEditActionCommand,M=p.inputState;function H(){I?Ii.processAction(S,p,p.lastEditActionCommand):Ii.evalInput(S,p)}function W(X){if(k.lastInsertModeChanges.changes.length>0){X=p.lastEditActionCommand?X:1;var oe=k.lastInsertModeChanges;z9(S,oe.changes,X)}}if(p.inputState=p.lastEditInputState,I&&p.lastEditActionCommand.interlaceInsertRepeat)for(var V=0;V<y;V++)H(),W(1);else C||H(),W(y);p.inputState=M,p.insertMode&&!C&&km(S),k.isPlaying=!1}function z9(S,p,y){function C(oe){return typeof oe=="string"?ut.default.commands[oe](S):oe(S),!0}var k=S.getCursor("head"),I=Y.macroModeState.lastInsertModeChanges.visualBlock;I&&(Sr(S,k,I+1),y=S.listSelections().length,S.setCursor(k));for(var M=0;M<y;M++){I&&S.setCursor(pn(k,M,0));for(var H=0;H<p.length;H++){var W=p[H];if(W instanceof L3)ut.default.lookupKey(W.keyName,"vim-insert",C);else if(typeof W=="string")window.cm=S,S.replaceSelections(W);else{var V=S.getCursor(),X=pn(V,0,W[0].length);S.replaceRange(W[0],V,X),S.setCursor(X)}}}I&&S.setCursor(pn(k,0,1))}return R(),me};pm.Vim=VQ;ut.default.Vim=VQ();var p_e=ut.default;pm.default=p_e});var $Q=Qi(I4=>{"use strict";Object.defineProperty(I4,"__esModule",{value:!0});I4.default=void 0;function m_e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function KQ(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function g_e(i,e,t){return e&&KQ(i.prototype,e),t&&KQ(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}var b_e=function(){function i(e,t){var n=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;m_e(this,i),this.closeInput=function(){n.removeInputListeners(),n.input=null,n.setSec(""),n.editor&&n.editor.focus()},this.clear=function(){n.setInnerHtml_(n.node,"")},this.inputKeyUp=function(o){var s=n.input.options;s&&s.onKeyUp&&s.onKeyUp(o,o.target.value,n.closeInput)},this.inputKeyInput=function(o){var s=n.input.options;s&&s.onKeyInput&&s.onKeyUp(o,o.target.value,n.closeInput)},this.inputBlur=function(){var o=n.input.options;o.closeOnBlur&&n.closeInput()},this.inputKeyDown=function(o){var s=n.input,a=s.options,l=s.callback;a&&a.onKeyDown&&a.onKeyDown(o,o.target.value,n.closeInput)||((o.keyCode===27||a&&a.closeOnEnter!==!1&&o.keyCode==13)&&(n.input.node.blur(),o.stopPropagation(),n.closeInput()),o.keyCode===13&&l&&(o.stopPropagation(),o.preventDefault(),l(o.target.value)))},this.node=e,this.modeInfoNode=document.createElement("span"),this.secInfoNode=document.createElement("span"),this.notifNode=document.createElement("span"),this.notifNode.className="vim-notification",this.keyInfoNode=document.createElement("span"),this.keyInfoNode.setAttribute("style","float: right"),this.node.appendChild(this.modeInfoNode),this.node.appendChild(this.secInfoNode),this.node.appendChild(this.notifNode),this.node.appendChild(this.keyInfoNode),this.toggleVisibility(!1),this.editor=t,this.sanitizer=r}return g_e(i,[{key:"setMode",value:function(t){if(t.mode==="visual"){t.subMode==="linewise"?this.setText("--VISUAL LINE--"):t.subMode==="blockwise"?this.setText("--VISUAL BLOCK--"):this.setText("--VISUAL--");return}this.setText("--".concat(t.mode.toUpperCase(),"--"))}},{key:"setKeyBuffer",value:function(t){this.keyInfoNode.textContent=t}},{key:"setSec",value:function(t,n,r){if(this.notifNode.textContent="",t===void 0)return this.closeInput;this.setInnerHtml_(this.secInfoNode,t);var o=this.secInfoNode.querySelector("input");return o&&(o.focus(),this.input={callback:n,options:r,node:o},r&&(r.selectValueOnOpen&&o.select(),r.value&&(o.value=r.value)),this.addInputListeners()),this.closeInput}},{key:"setText",value:function(t){this.modeInfoNode.textContent=t}},{key:"toggleVisibility",value:function(t){t?this.node.style.display="block":this.node.style.display="none",this.input&&this.removeInputListeners(),clearInterval(this.notifTimeout)}},{key:"addInputListeners",value:function(){var t=this.input.node;t.addEventListener("keyup",this.inputKeyUp),t.addEventListener("keydown",this.inputKeyDown),t.addEventListener("input",this.inputKeyInput),t.addEventListener("blur",this.inputBlur)}},{key:"removeInputListeners",value:function(){if(!(!this.input||!this.input.node)){var t=this.input.node;t.removeEventListener("keyup",this.inputKeyUp),t.removeEventListener("keydown",this.inputKeyDown),t.removeEventListener("input",this.inputKeyInput),t.removeEventListener("blur",this.inputBlur)}}},{key:"showNotification",value:function(t){var n=this,r=document.createElement("span");this.setInnerHtml_(r,t),this.notifNode.textContent=r.textContent,this.notifTimeout=setTimeout(function(){n.notifNode.textContent=""},5e3)}},{key:"setInnerHtml_",value:function(t,n){for(;t.childNodes.length;)t.removeChild(t.childNodes[0]);n&&(this.sanitizer?t.appendChild(this.sanitizer(n)):t.appendChild(n))}}]),i}();I4.default=b_e});var QQ=Qi(fv=>{"use strict";Object.defineProperty(fv,"__esModule",{value:!0});Object.defineProperty(fv,"StatusBar",{enumerable:!0,get:function(){return YQ.default}});Object.defineProperty(fv,"VimMode",{enumerable:!0,get:function(){return GQ.default}});fv.initVimMode=v_e;var GQ=XQ(qQ()),YQ=XQ($Q());function XQ(i){return i&&i.__esModule?i:{default:i}}function v_e(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:YQ.default,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,r=new GQ.default(i);if(!e)return r.attach(),r;var o=new t(e,i,n),s="";return r.on("vim-mode-change",function(a){o.setMode(a)}),r.on("vim-keypress",function(a){a===":"?s="":s+=a,o.setKeyBuffer(s)}),r.on("vim-command-done",function(){s="",o.setKeyBuffer(s)}),r.on("dispose",function(){o.toggleVisibility(!1),o.closeInput(),o.clear()}),o.toggleVisibility(!0),r.setStatusBar(o),r.attach(),r}});var ZQ=N(()=>{Ge();ie({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>import("./abap-VAQQMSMV.js")})});var JQ=N(()=>{Ge();ie({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>import("./apex-UGORXUMY.js")})});var eZ=N(()=>{Ge();ie({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>import("./azcli-5IGBGNJX.js")})});var tZ=N(()=>{Ge();ie({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>import("./bat-I2Q2VM2E.js")})});var iZ=N(()=>{Ge();ie({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>import("./bicep-6DU2S5EQ.js")})});var nZ=N(()=>{Ge();ie({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>import("./cameligo-FQU2BD2Q.js")})});var rZ=N(()=>{Ge();ie({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>import("./clojure-X5EURZF4.js")})});var oZ=N(()=>{Ge();ie({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>import("./coffee-V3VYUJVN.js")})});var sZ=N(()=>{Ge();ie({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>import("./cpp-EIUZ67SI.js")});ie({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>import("./cpp-EIUZ67SI.js")})});var aZ=N(()=>{Ge();ie({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>import("./csharp-6XMKEPGL.js")})});var lZ=N(()=>{Ge();ie({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>import("./csp-RUXEOTA7.js")})});var cZ=N(()=>{Ge();ie({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>import("./cypher-LB5ELPID.js")})});var dZ=N(()=>{Ge();ie({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>import("./dart-6KXBVQQ5.js")})});var uZ=N(()=>{Ge();ie({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>import("./ecl-M4POWDBD.js")})});var hZ=N(()=>{Ge();ie({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>import("./flow9-CCUIXH3M.js")})});var fZ=N(()=>{Ge();ie({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>import("./fsharp-VVLVFTJD.js")})});var pZ=N(()=>{Ge();ie({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAutoInterpolationDollar)});ie({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAngleInterpolationDollar)});ie({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagBracketInterpolationDollar)});ie({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAngleInterpolationBracket)});ie({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagBracketInterpolationBracket)});ie({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAutoInterpolationDollar)});ie({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAutoInterpolationBracket)})});var mZ=N(()=>{Ge();ie({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>import("./go-BSHCOGOM.js")})});var gZ=N(()=>{Ge();ie({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>import("./graphql-QJYQP674.js")})});var bZ=N(()=>{Ge();ie({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>import("./handlebars-VNAHN657.js")})});var vZ=N(()=>{Ge();ie({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>import("./hcl-B2FOVQI3.js")})});var _Z=N(()=>{Ge();ie({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>import("./ini-K4OMSQGU.js")})});var yZ=N(()=>{Ge();ie({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>import("./java-M2SLT6P5.js")})});var wZ=N(()=>{Ge();ie({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>import("./julia-UMW37XS3.js")})});var xZ=N(()=>{Ge();ie({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>import("./kotlin-DTS7EPKW.js")})});var CZ=N(()=>{Ge();ie({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>import("./less-64EWHB2U.js")})});var SZ=N(()=>{Ge();ie({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>import("./lexon-VSTQQJS4.js")})});var kZ=N(()=>{Ge();ie({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>import("./lua-DEBQHPWC.js")})});var EZ=N(()=>{Ge();ie({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>import("./liquid-PZUYRUGD.js")})});var TZ=N(()=>{Ge();ie({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>import("./m3-BVWXEQNO.js")})});var IZ=N(()=>{Ge();ie({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>import("./mdx-VP3GSOCD.js")})});var LZ=N(()=>{Ge();ie({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>import("./mips-PLBQC4OD.js")})});var AZ=N(()=>{Ge();ie({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>import("./msdax-T7T2KNYQ.js")})});var DZ=N(()=>{Ge();ie({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>import("./mysql-6SINHLS3.js")})});var MZ=N(()=>{Ge();ie({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>import("./objective-c-HU5BK7KT.js")})});var NZ=N(()=>{Ge();ie({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>import("./pascal-35QHNCUU.js")})});var RZ=N(()=>{Ge();ie({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>import("./pascaligo-XJIGVHMA.js")})});var PZ=N(()=>{Ge();ie({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>import("./perl-EJ4CU5Y5.js")})});var OZ=N(()=>{Ge();ie({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>import("./pgsql-O5YVZFG3.js")})});var FZ=N(()=>{Ge();ie({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>import("./php-7OX4N2D2.js")})});var zZ=N(()=>{Ge();ie({id:"pla",extensions:[".pla"],loader:()=>import("./pla-XIRH422Y.js")})});var BZ=N(()=>{Ge();ie({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>import("./postiats-FSD57ZTG.js")})});var HZ=N(()=>{Ge();ie({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>import("./powerquery-WN3FBQ3N.js")})});var UZ=N(()=>{Ge();ie({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>import("./powershell-6POP5WYL.js")})});var jZ=N(()=>{Ge();ie({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>import("./protobuf-R3NYANEY.js")})});var WZ=N(()=>{Ge();ie({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>import("./pug-UMENAZU6.js")})});var VZ=N(()=>{Ge();ie({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>import("./python-CAXMRMZU.js")})});var qZ=N(()=>{Ge();ie({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>import("./qsharp-JPLZF5CJ.js")})});var KZ=N(()=>{Ge();ie({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>import("./r-V566F5LS.js")})});var $Z=N(()=>{Ge();ie({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>import("./razor-VXRRUWJU.js")})});var GZ=N(()=>{Ge();ie({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>import("./redis-C25WFMNL.js")})});var YZ=N(()=>{Ge();ie({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>import("./redshift-LE5NUCLH.js")})});var XZ=N(()=>{Ge();ie({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>import("./restructuredtext-XX5QEZJT.js")})});var QZ=N(()=>{Ge();ie({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>import("./ruby-XQPDAWDE.js")})});var ZZ=N(()=>{Ge();ie({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>import("./rust-TOYK7AZY.js")})});var JZ=N(()=>{Ge();ie({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>import("./sb-J2JR5LHW.js")})});var eJ=N(()=>{Ge();ie({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>import("./scala-YUYNXHOB.js")})});var tJ=N(()=>{Ge();ie({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>import("./scheme-3ZBC5PHA.js")})});var iJ=N(()=>{Ge();ie({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>import("./scss-TEOGYYZ6.js")})});var nJ=N(()=>{Ge();ie({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>import("./shell-BD6IL5P2.js")})});var rJ=N(()=>{Ge();ie({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>import("./solidity-7YGHHWAJ.js")})});var oJ=N(()=>{Ge();ie({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>import("./sophia-UUA6XVAK.js")})});var sJ=N(()=>{Ge();ie({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>import("./sparql-CQTB3JIZ.js")})});var aJ=N(()=>{Ge();ie({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>import("./st-EUKBJWA4.js")})});var lJ=N(()=>{Ge();ie({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>import("./swift-DJAXPCZZ.js")})});var cJ=N(()=>{Ge();ie({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>import("./systemverilog-VL3WHTSC.js")});ie({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>import("./systemverilog-VL3WHTSC.js")})});var dJ=N(()=>{Ge();ie({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>import("./tcl-HX43DWKO.js")})});var uJ=N(()=>{Ge();ie({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>import("./twig-33VJJYP3.js")})});var hJ=N(()=>{Ge();ie({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>import("./typescript-YY3TBR77.js")})});var fJ=N(()=>{Ge();ie({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>import("./vb-7EFP77QG.js")})});var pJ=N(()=>{Ge();ie({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>import("./wgsl-LFVBXOME.js")})});var mJ=N(()=>{Ge();ie({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>import("./yaml-THK2ACKN.js")})});var gJ=N(()=>{Rs();ZQ();JQ();eZ();tZ();iZ();nZ();rZ();oZ();sZ();aZ();lZ();QM();cZ();dZ();eN();uZ();$M();hZ();fZ();pZ();mZ();gZ();bZ();vZ();ZM();_Z();yZ();YM();wZ();xZ();CZ();SZ();kZ();EZ();TZ();GM();IZ();LZ();AZ();DZ();MZ();NZ();RZ();PZ();OZ();FZ();zZ();BZ();HZ();UZ();jZ();WZ();VZ();qZ();KZ();$Z();GZ();YZ();XZ();QZ();ZZ();JZ();eJ();tJ();iJ();nJ();rJ();oJ();sJ();XM();aJ();lJ();cJ();dJ();uJ();hJ();fJ();pJ();JM();mJ();});function xN(){return import("./cssMode-3KIDE53D.js")}var __e,y_e,w_e,x_e,bJ,C_e,mm,_N,yN,wN,vJ,_J,yJ,wJ=N(()=>{Rs();Rs();__e=Object.defineProperty,y_e=Object.getOwnPropertyDescriptor,w_e=Object.getOwnPropertyNames,x_e=Object.prototype.hasOwnProperty,bJ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of w_e(e))!x_e.call(i,r)&&r!==t&&__e(i,r,{get:()=>e[r],enumerable:!(n=y_e(e,r))||n.enumerable});return i},C_e=(i,e,t)=>(bJ(i,e,"default"),t&&bJ(t,e,"default")),mm={};C_e(mm,Ns);_N=class{constructor(i,e,t){Cn(this,"_onDidChange",new mm.Emitter);Cn(this,"_options");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(i){this._options=i||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(i){this.setOptions(i)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},yN={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},wN={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},vJ=new _N("css",yN,wN),_J=new _N("scss",yN,wN),yJ=new _N("less",yN,wN);mm.languages.css={cssDefaults:vJ,lessDefaults:yJ,scssDefaults:_J};mm.languages.onLanguage("less",()=>{xN().then(i=>i.setupMode(yJ))});mm.languages.onLanguage("scss",()=>{xN().then(i=>i.setupMode(_J))});mm.languages.onLanguage("css",()=>{xN().then(i=>i.setupMode(vJ))})});function D4(i){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:i===pv,documentFormattingEdits:i===pv,documentRangeFormattingEdits:i===pv}}function R_e(){return import("./htmlMode-EEO2WQ3S.js")}function M4(i,e=A4,t=D4(i)){let n=new L_e(i,e,t),r,o=L4.languages.onLanguage(i,async()=>{r=(await R_e()).setupMode(n)});return{defaults:n,dispose(){o.dispose(),r==null||r.dispose(),r=void 0}}}var S_e,k_e,E_e,T_e,xJ,I_e,L4,L_e,A_e,A4,pv,CJ,SJ,kJ,D_e,EJ,M_e,TJ,N_e,IJ=N(()=>{Rs();Rs();S_e=Object.defineProperty,k_e=Object.getOwnPropertyDescriptor,E_e=Object.getOwnPropertyNames,T_e=Object.prototype.hasOwnProperty,xJ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E_e(e))!T_e.call(i,r)&&r!==t&&S_e(i,r,{get:()=>e[r],enumerable:!(n=k_e(e,r))||n.enumerable});return i},I_e=(i,e,t)=>(xJ(i,e,"default"),t&&xJ(t,e,"default")),L4={};I_e(L4,Ns);L_e=class{constructor(i,e,t){Cn(this,"_onDidChange",new L4.Emitter);Cn(this,"_options");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(i){this._options=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},A_e={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},A4={format:A_e,suggest:{},data:{useDefaultDataProvider:!0}};pv="html",CJ="handlebars",SJ="razor",kJ=M4(pv,A4,D4(pv)),D_e=kJ.defaults,EJ=M4(CJ,A4,D4(CJ)),M_e=EJ.defaults,TJ=M4(SJ,A4,D4(SJ)),N_e=TJ.defaults;L4.languages.html={htmlDefaults:D_e,razorDefaults:N_e,handlebarDefaults:M_e,htmlLanguageService:kJ,handlebarLanguageService:EJ,razorLanguageService:TJ,registerHTMLLanguageService:M4}});var P_e,CN,O_e,Uh,SN,kN=N(()=>{da();are();Qo();Un();ke();Pt();j_();P_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},CN=function(i,e){return function(t,n){e(t,n,i)}},O_e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Uh=class{constructor(e,t){this._editorWorkerClient=new yz(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return O_e(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){let r=t.range,o=t.color,s=o.alpha,a=new vt(new Is(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?vt.Format.CSS.formatRGB(a):vt.Format.CSS.formatRGBA(a),c=s?vt.Format.CSS.formatHSL(a):vt.Format.CSS.formatHSLA(a),d=s?vt.Format.CSS.formatHex(a):vt.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:r,text:l}}),u.push({label:c,textEdit:{range:r,text:c}}),u.push({label:d,textEdit:{range:r,text:d}}),u}},SN=class extends ce{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new Uh(e,t)))}};SN=P_e([CN(0,Di),CN(1,Ot),CN(2,Se)],SN);Yc(SN)});function N4(i,e,t,n=!0){return mv(this,void 0,void 0,function*(){return AN(new EN,i,e,t,n)})}function LN(i,e,t,n){return Promise.resolve(t.provideColorPresentations(i,e,n))}function AN(i,e,t,n,r){return mv(this,void 0,void 0,function*(){let o=!1,s,a=[],l=e.ordered(t);for(let c=l.length-1;c>=0;c--){let d=l[c];if(d instanceof Uh)s=d;else try{(yield i.compute(d,t,n,a))&&(o=!0)}catch(u){Xt(u)}}return o?a:s&&r?(yield i.compute(s,t,n,a),a):[]})}function LJ(i,e){let{colorProvider:t}=i.get(Se),n=i.get(Di).getModel(e);if(!n)throw Eo();let r=i.get(Mt).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:r}}var mv,EN,TN,IN,DN=N(()=>{ki();qt();Ln();et();Qo();Vi();Pt();kN();kn();mv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};EN=class{constructor(){}compute(e,t,n,r){return mv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({colorInfo:s,provider:e});return Array.isArray(o)})}},TN=class{constructor(){}compute(e,t,n,r){return mv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)})}},IN=class{constructor(e){this.colorInfo=e}compute(e,t,n,r){return mv(this,void 0,void 0,function*(){let o=yield e.provideColorPresentations(t,this.colorInfo,st.None);return Array.isArray(o)&&r.push(...o),Array.isArray(o)})}};Dt.registerCommand("_executeDocumentColorProvider",function(i,...e){let[t]=e;if(!(t instanceof yt))throw Eo();let{model:n,colorProviderRegistry:r,isDefaultColorDecoratorsEnabled:o}=LJ(i,t);return AN(new TN,r,n,st.None,o)});Dt.registerCommand("_executeColorPresentationProvider",function(i,...e){let[t,n]=e,{uri:r,range:o}=n;if(!(r instanceof yt)||!Array.isArray(t)||t.length!==4||!B.isIRange(o))throw Eo();let{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=LJ(i,r),[c,d,u,h]=t;return AN(new IN({range:o,color:{red:c,green:d,blue:u,alpha:h}}),a,s,st.None,l)})});var F_e,MN,AJ,NN,PN,_c,RN,ON=N(()=>{jt();da();qt();ei();ke();ll();Ni();JF();lt();et();jn();Ms();Pt();DN();kn();F_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},MN=function(i,e){return function(t,n){e(t,n,i)}},AJ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},PN=Object.create({}),_c=NN=class extends ce{constructor(e,t,n,r){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new le),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new ty(this._editor),this._decoratorLimitReporter=new RN,this._colorDecorationClassRefs=this._register(new le),this._debounceInformation=r.for(n.colorProvider,"Document Colors",{min:NN.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{let s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144);let a=s!==this._isColorDecoratorsEnabled||o.hasChanged(20),l=o.hasChanged(144);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144),this.updateColors()}isEnabled(){let e=this._editor.getModel();if(!e)return!1;let t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){let r=n.colorDecorators;if(r&&r.enable!==void 0&&!r.enable)return r.enable}return this._editor.getOption(19)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;let e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new la,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return AJ(this,void 0,void 0,function*(){this._computePromise=Jt(e=>AJ(this,void 0,void 0,function*(){let t=this._editor.getModel();if(!t)return[];let n=new gn(!1),r=yield N4(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),r}));try{let e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){ft(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){let t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:mt.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((r,o)=>this._colorDatas.set(r,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[],n=this._editor.getOption(20);for(let o=0;o<e.length&&t.length<n;o++){let{red:s,green:a,blue:l,alpha:c}=e[o].colorInfo.color,d=new Is(Math.round(s*255),Math.round(a*255),Math.round(l*255),c),u=`rgba(${d.r}, ${d.g}, ${d.b}, ${d.a})`,h=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:u}));t.push({range:{startLineNumber:e[o].colorInfo.range.startLineNumber,startColumn:e[o].colorInfo.range.startColumn,endLineNumber:e[o].colorInfo.range.endLineNumber,endColumn:e[o].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:Gv,inlineClassName:`${h.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:PN}}})}let r=n<e.length?n:!1;this._decoratorLimitReporter.update(e.length,r),this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){let t=this._editor.getModel();if(!t)return null;let n=t.getDecorationsInRange(B.fromPositions(e,e)).filter(r=>this._colorDatas.has(r.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};_c.ID="editor.contrib.colorDetector";_c.RECOMPUTE_TIME=1e3;_c=NN=F_e([MN(1,Mt),MN(2,Se),MN(3,cn)],_c);RN=class{constructor(){this._onDidChange=new Je,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}};Ue(_c.ID,_c,1)});var R4,DJ=N(()=>{ei();R4=class{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new Je,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Je,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Je,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let r=0;r<this.colorPresentations.length;r++)if(t.toLowerCase()===this.colorPresentations[r].label){n=r;break}if(n===-1){let r=t.split("(")[0].toLowerCase();for(let o=0;o<this.colorPresentations.length;o++)if(this.colorPresentations[o].label.toLowerCase().startsWith(r)){n=o;break}}n!==-1&&n!==this.presentationIndex&&(this.presentationIndex=n,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}});var MJ=N(()=>{});var P4=N(()=>{MJ()});var So,FN,zN,BN,HN,O4,UN,jN,WN,F4,NJ=N(()=>{K9();Ht();Pne();M_();Jn();da();ei();ke();Lr();P4();He();ir();kl();So=Le,FN=class extends ce{constructor(e,t,n,r=!1){super(),this.model=t,this.showingStandaloneColorPicker=r,this._closeButton=null,this._domNode=So(".colorpicker-header"),Te(e,this._domNode),this._pickedColorNode=Te(this._domNode,So(".picked-color")),Te(this._pickedColorNode,So("span.codicon.codicon-color-mode")),this._pickedColorPresentation=Te(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");let o=b("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=Te(this._domNode,So(".original-color")),this._originalColorNode.style.backgroundColor=vt.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=n.getColorTheme().getColor(tk)||vt.white,this._register(n.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(tk)||vt.white})),this._register(At(this._pickedColorNode,bi.CLICK,()=>this.model.selectNextColorPresentation())),this._register(At(this._originalColorNode,bi.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=vt.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new zN(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=vt.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}},zN=class extends ce{constructor(e){super(),this._onClicked=this._register(new Je),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),Te(e,this._button);let t=document.createElement("div");t.classList.add("close-button-inner-div"),Te(this._button,t),Te(t,So(".button"+_t.asCSSSelector(Pi("color-picker-close",pt.close,b("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}},BN=class extends ce{constructor(e,t,n,r=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=So(".colorpicker-body"),Te(e,this._domNode),this._saturationBox=new HN(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new UN(this._domNode,this.model,r),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new jN(this._domNode,this.model,r),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),r&&(this._insertButton=this._register(new WN(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){let n=this.model.color.hsva;this.model.color=new vt(new Hm(n.h,e,t,n.a))}onDidOpacityChange(e){let t=this.model.color.hsva;this.model.color=new vt(new Hm(t.h,t.s,t.v,e))}onDidHueChange(e){let t=this.model.color.hsva,n=(1-e)*360;this.model.color=new vt(new Hm(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}},HN=class extends ce{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Je,this.onColorFlushed=this._onColorFlushed.event,this._domNode=So(".saturation-wrap"),Te(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",Te(this._domNode,this._canvas),this.selection=So(".saturation-selection"),Te(this._domNode,this.selection),this.layout(),this._register(At(this._domNode,bi.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new ck);let t=Zi(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangePosition(r.pageX-t.left,r.pageY-t.top),()=>null);let n=At(document,bi.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){let n=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,r),this._onDidChange.fire({s:n,v:r})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();let e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){let e=this.model.color.hsva,t=new vt(new Hm(e.h,1,1,1)),n=this._canvas.getContext("2d"),r=n.createLinearGradient(0,0,this._canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");let o=n.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=vt.Format.CSS.format(t),n.fill(),n.fillStyle=r,n.fill(),n.fillStyle=o,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();let t=e.hsva;this.paintSelection(t.s,t.v)}},O4=class extends ce{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Je,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=Te(e,So(".standalone-strip")),this.overlay=Te(this.domNode,So(".standalone-overlay"))):(this.domNode=Te(e,So(".strip")),this.overlay=Te(this.domNode,So(".overlay"))),this.slider=Te(this.domNode,So(".slider")),this.slider.style.top="0px",this._register(At(this.domNode,bi.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;let e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){let t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._register(new ck),n=Zi(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-n.top),()=>null);let r=At(document,bi.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){let t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}},UN=class extends O4{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);let{r:t,g:n,b:r}=e.rgba,o=new vt(new Is(t,n,r,1)),s=new vt(new Is(t,n,r,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}},jN=class extends O4{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}},WN=class extends ce{constructor(e){super(),this._onClicked=this._register(new Je),this.onClicked=this._onClicked.event,this._button=Te(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}},F4=class extends yl{constructor(e,t,n,r,o=!1){super(),this.model=t,this.pixelRatio=n,this._register(V9.onDidChange(()=>this.layout()));let s=So(".colorpicker-widget");e.appendChild(s),this.header=this._register(new FN(s,this.model,r,o)),this.body=this._register(new BN(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}});function OJ(i,e,t,n){return gm(this,void 0,void 0,function*(){let r=e.getValueInRange(t.range),{red:o,green:s,blue:a,alpha:l}=t.color,c=new Is(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),d=new vt(c),u=yield LN(e,t,n,st.None),h=new R4(d,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(d,r),i instanceof gv?new VN(i,B.lift(t.range),h,n):new qN(i,B.lift(t.range),h,n)})}function FJ(i,e,t,n,r){if(n.length===0||!e.hasModel())return ce.None;if(r.setMinimumDimensions){let h=e.getOption(65)+8;r.setMinimumDimensions(new Qt(302,h))}let o=new le,s=n[0],a=e.getModel(),l=s.model,c=o.add(new F4(r.fragment,l,e.getOption(140),t,i instanceof bm));r.setColorPicker(c);let d=!1,u=new B(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(i instanceof bm){let h=n[0].model.color;i.color=h,z4(a,l,h,u,s),o.add(l.onColorFlushed(f=>{i.color=f}))}else o.add(l.onColorFlushed(h=>gm(this,void 0,void 0,function*(){yield z4(a,l,h,u,s),d=!0,u=zJ(e,u,l,r)})));return o.add(l.onDidChangeColor(h=>{z4(a,l,h,u,s)})),o.add(e.onDidChangeModelContent(h=>{d?d=!1:(r.hide(),e.focus())})),o}function zJ(i,e,t,n){let r,o;if(t.presentation.textEdit){r=[t.presentation.textEdit],o=new B(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);let s=i.getModel()._setTrackedRange(null,o,3);i.pushUndoStop(),i.executeEdits("colorpicker",r),o=i.getModel()._getTrackedRange(s)||o}else r=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],o=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),i.pushUndoStop(),i.executeEdits("colorpicker",r);return t.presentation.additionalTextEdits&&(r=[...t.presentation.additionalTextEdits],i.executeEdits("colorpicker",r),n&&n.hide()),i.pushUndoStop(),o}function z4(i,e,t,n,r){return gm(this,void 0,void 0,function*(){let o=yield LN(i,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},r.provider,st.None);e.colorPresentations=o||[]})}var RJ,PJ,gm,VN,gv,qN,bm,KN=N(()=>{jt();ki();da();ke();et();DN();ON();DJ();NJ();nr();Ht();RJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},PJ=function(i,e){return function(t,n){e(t,n,i)}},gm=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},VN=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},gv=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return Mr.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return gm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];let r=_c.get(this._editor);if(!r)return[];for(let o of t){if(!r.isColorDecoration(o))continue;let s=r.getColorData(o.range.getStartPosition());if(s)return[yield OJ(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]})}renderHoverParts(e,t){return FJ(this,this._editor,this._themeService,t,e)}};gv=RJ([PJ(1,vn)],gv);qN=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r}},bm=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return gm(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!_c.get(this._editor))return null;let o=yield N4(n,this._editor.getModel(),st.None),s=null,a=null;for(let u of o){let h=u.colorInfo;B.containsRange(h.range,e.range)&&(s=h,a=u.provider)}let l=s!=null?s:e,c=a!=null?a:t,d=!!s;return{colorHover:yield OJ(this,this._editor.getModel(),l,c),foundInEditor:d}})}updateEditorModel(e){return gm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=e.model,n=new B(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield z4(this._editor.getModel(),t,this._color,n,e),n=zJ(this._editor,n,t))})}renderHoverParts(e,t){return FJ(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};bm=RJ([PJ(1,vn)],bm)});var bv,BJ=N(()=>{ke();lt();et();ON();KN();tS();nc();bv=class extends ce{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){let t=this._editor.getOption(145);if(t!=="click"&&t!=="clickAndHover")return;let n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==PN||!n.range)return;let r=this._editor.getContribution(yr.ID);if(r&&!r.isColorPickerVisible){let o=new B(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);r.showContentHover(o,1,0,!1,!0)}}};bv.ID="editor.contrib.colorContribution";Ue(bv.ID,bv,2);jo.register(gv)});var jJ,Zs,HJ,$N,GN,yc,UJ,z_e,B4,YN,WJ=N(()=>{ke();KN();Ut();s8();Wn();ei();Pt();lt();ti();wt();Qo();Un();kN();Ht();P4();jJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Zs=function(i,e){return function(t,n){e(t,n,i)}},HJ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},yc=$N=class extends ce{constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._modelService=n,this._keybindingService=r,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=F.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=F.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new B4(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution($N.ID)}};yc.ID="editor.contrib.standaloneColorPickerController";yc=$N=jJ([Zs(1,it),Zs(2,Di),Zs(3,Kt),Zs(4,Ke),Zs(5,Se),Zs(6,Ot)],yc);Ue(yc.ID,yc,1);UJ=8,z_e=22,B4=GN=class extends ce{constructor(e,t,n,r,o,s,a,l){var c;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new Je),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=r.createInstance(bm,this._editor),this._position=(c=this._editor._getViewModel())===null||c===void 0?void 0:c.getPrimaryCursorState().modelState.position;let d=this._editor.getSelection(),u=d?{startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(Cs(this._body));this._register(h.onDidBlur(f=>{this.hide()})),this._register(h.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var m;let g=(m=f.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(u),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return GN.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;let e=this._editor.getOption(59).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}_start(e){return HJ(this,void 0,void 0,function*(){let t=yield this._computeAsync(e);t&&this._onResult.fire(new YN(t.result,t.foundInEditor))})}_computeAsync(e){return HJ(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;let t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new Uh(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){let n=document.createDocumentFragment(),r=this._register(new a1(this._keybindingService)),o,s={fragment:n,statusBar:r,setColorPicker:g=>o=g,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(s,[e])),o===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(n),o.layout();let a=o.body,l=a.saturationBox.domNode.clientWidth,c=a.domNode.clientWidth-l-z_e-UJ,d=o.body.enterButton;d==null||d.onClicked(()=>{this.updateEditor(),this.hide()});let u=o.header,h=u.pickedColorNode;h.style.width=l+UJ+"px";let f=u.originalColorNode;f.style.width=c+"px";let m=o.header.closeButton;m==null||m.onClicked(()=>{this.hide()}),t&&(d&&(d.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};B4.ID="editor.contrib.standaloneColorPickerWidget";B4=GN=jJ([Zs(3,Ke),Zs(4,Di),Zs(5,Kt),Zs(6,Se),Zs(7,Ot)],B4);YN=class{constructor(e,t){this.value=e,this.foundInEditor=t}}});var XN,QN,ZN,VJ=N(()=>{lt();He();WJ();ti();Ji();P4();XN=class extends sa{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:b("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:b({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:Me.CommandPalette}]})}runEditorCommand(e,t){var n;(n=yc.get(t))===null||n===void 0||n.showOrFocus()}},QN=class extends de{constructor(){super({id:"editor.action.hideColorPicker",label:b({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:F.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=yc.get(t))===null||n===void 0||n.hide()}},ZN=class extends de{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:b({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:F.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=yc.get(t))===null||n===void 0||n.insertColor()}};ee(QN);ee(ZN);Si(XN)});function qJ(i,e){var t;return!!(!((t=i.pasteMimeTypes)===null||t===void 0)&&t.some(n=>e.matches(n)))}var B_e,vm,wc,eR,tR,iR,JN,tu,KJ=N(()=>{Ht();mi();jt();j0();ke();G3();Tr();H0();JO();CI();tg();et();Pt();EI();yu();K0();He();Zm();wt();Ut();$c();xl();II();B_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},vm=function(i,e){return function(t,n){e(t,n,i)}},wc=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},tR="editor.changePasteType",iR=new ht("pasteWidgetVisible",!1,b("pasteWidgetVisible","Whether the paste widget is showing")),JN="application/vnd.code.copyMetadata",tu=eR=class extends ce{static get(e){return e.getContribution(eR.ID)}constructor(e,t,n,r,o,s,a){super(),this._bulkEditService=n,this._clipboardService=r,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;let l=e.getContainerDomNode();this._register(At(l,"copy",c=>this.handleCopy(c))),this._register(At(l,"cut",c=>this.handleCopy(c))),this._register(At(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new up("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(hp,"pasteIntoEditor",e,iR,{id:tR,label:b("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},document.execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(83).enabled&&!this._editor.getOption(89)}handleCopy(e){var t,n;if(!this._editor.hasTextFocus()||(Uv&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;let r=this._editor.getModel(),o=this._editor.getSelections();if(!r||!(o!=null&&o.length))return;let s=this._editor.getOption(36),a=o,l=o.length===1&&o[0].isEmpty();if(l){if(!s)return;a=[new B(a[0].startLineNumber,1,a[0].startLineNumber,1+r.getLineLength(a[0].startLineNumber))]}let c=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(o,s,Rc),u={multicursorText:Array.isArray(c)?c:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(_=>!!_.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}let f=xI(e.clipboardData),m=h.flatMap(_=>{var E;return(E=_.copyMimeTypes)!==null&&E!==void 0?E:[]}),g=Td();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:m,defaultPastePayload:u});let w=Jt(_=>wc(this,void 0,void 0,function*(){let E=hr(yield Promise.all(h.map(A=>wc(this,void 0,void 0,function*(){try{return yield A.prepareDocumentPaste(r,a,f,_)}catch(L){console.error(L);return}}))));E.reverse();for(let A of E)for(let[L,O]of A)f.replace(L,O);return f}));(n=this._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:w}}handlePaste(e){var t,n;return wc(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;let r=this._editor.getModel(),o=this._editor.getSelections();if(!(o!=null&&o.length)||!r||!this.isPasteAsEnabled())return;let s=this.fetchCopyMetadata(e),a=t2(e.clipboardData);a.delete(JN);let l=[...e.clipboardData.types,...(n=s==null?void 0:s.providerCopyMimeTypes)!==null&&n!==void 0?n:[],bn.uriList],c=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(d=>{var u;return(u=d.pasteMimeTypes)===null||u===void 0?void 0:u.some(h=>Yx(h,l))});c.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,c,o,a,s):this.doPasteInline(c,o,a,s))})}doPasteInline(e,t,n,r){let o=Jt(s=>wc(this,void 0,void 0,function*(){let a=this._editor;if(!a.hasModel())return;let l=a.getModel(),c=new ba(a,3,void 0,s);try{if(yield this.mergeInDataFromCopy(n,r,c.token),c.token.isCancellationRequested)return;let d=e.filter(h=>qJ(h,n));if(!d.length||d.length===1&&d[0].id==="text"){yield this.applyDefaultPasteHandler(n,r,c.token);return}let u=yield this.getPasteEdits(d,n,l,t,c.token);if(c.token.isCancellationRequested)return;if(u.length===1&&u[0].providerId==="text"){yield this.applyDefaultPasteHandler(n,r,c.token);return}if(u.length){let h=a.getOption(83).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:u},h,c.token)}yield this.applyDefaultPasteHandler(n,r,c.token)}finally{c.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),b("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),o),this._currentPasteOperation=o}showPasteAsPick(e,t,n,r,o){let s=Jt(a=>wc(this,void 0,void 0,function*(){let l=this._editor;if(!l.hasModel())return;let c=l.getModel(),d=new ba(l,3,void 0,a);try{if(yield this.mergeInDataFromCopy(r,o,d.token),d.token.isCancellationRequested)return;let u=t.filter(g=>qJ(g,r));e&&(u=u.filter(g=>g.id===e));let h=yield this.getPasteEdits(u,r,c,n,d.token);if(d.token.isCancellationRequested||!h.length)return;let f;if(e)f=h.at(0);else{let g=yield this._quickInputService.pick(h.map(w=>({label:w.label,description:w.providerId,detail:w.detail,edit:w})),{placeHolder:b("pasteAsPickerPlaceholder","Select Paste Action")});f=g==null?void 0:g.edit}if(!f)return;let m=lK(c.uri,n,f);yield this._bulkEditService.apply(m,{editor:this._editor})}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:b("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,t){e.setData(JN,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;let n=e.clipboardData.getData(JN);if(n)try{return JSON.parse(n)}catch(s){return}let[r,o]=ZO.getTextData(e.clipboardData);if(o)return{defaultPastePayload:{mode:o.mode,multicursorText:(t=o.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!o.isFromEmptySelection}}}mergeInDataFromCopy(e,t,n){var r;return wc(this,void 0,void 0,function*(){if(t!=null&&t.id&&((r=this._currentCopyOperation)===null||r===void 0?void 0:r.handle)===t.id){let o=yield this._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(let[s,a]of o)e.replace(s,a)}if(!e.has(bn.uriList)){let o=yield this._clipboardService.readResources();if(n.isCancellationRequested)return;o.length&&e.append(bn.uriList,U0(eh.create(o)))}})}getPasteEdits(e,t,n,r,o){return wc(this,void 0,void 0,function*(){let s=yield Vc(Promise.all(e.map(l=>wc(this,void 0,void 0,function*(){var c;try{let d=yield(c=l.provideDocumentPasteEdits)===null||c===void 0?void 0:c.call(l,n,r,t,o);if(d)return Object.assign(Object.assign({},d),{providerId:l.id})}catch(d){console.error(d)}}))),o),a=hr(s!=null?s:[]);return r2(a),a})}applyDefaultPasteHandler(e,t,n){var r,o,s;return wc(this,void 0,void 0,function*(){let a=(r=e.get(bn.text))!==null&&r!==void 0?r:e.get("text");if(!a)return;let l=yield a.asString();if(n.isCancellationRequested)return;let c={text:l,pasteOnNewLine:(o=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&o!==void 0?o:!1,multicursorText:(s=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&s!==void 0?s:null,mode:null};this._editor.trigger("keyboard","paste",c)})}};tu.ID="editor.contrib.copyPasteActionController";tu=eR=B_e([vm(1,Ke),vm(2,Kc),vm(3,As),vm(4,Se),vm(5,rr),vm(6,nF)],tu)});var $J=N(()=>{lt();j_();KJ();vI();He();Ue(tu.ID,tu,0);Yc(e2);We(new class extends Fi{constructor(){super({id:tR,precondition:iR,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var n;return(n=tu.get(e))===null||n===void 0?void 0:n.changePasteType()}});ee(class extends de{constructor(){super({id:"editor.action.pasteAs",label:b("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:b("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(i,e,t){var n;let r=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(n=tu.get(e))===null||n===void 0?void 0:n.pasteAs(r)}})});var GJ=Qi(nR=>{ki();Bn();Ln();ra();R1();Vi();var H_e=nR&&nR.__awaiter||function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Dt.registerCommand("_executeDocumentSymbolProvider",function(i,...e){return H_e(this,void 0,void 0,function*(){let[t]=e;Bt(yt.isUri(t));let n=i.get(Ah),o=yield i.get(Sn).createModelReference(t);try{return(yield n.getOrCreate(o.object.textEditorModel,st.None)).getTopLevelSymbols()}finally{o.dispose()}})})});var rR,YJ=N(()=>{ll();lt();He();rR=class extends de{constructor(){super({id:"editor.action.forceRetokenize",label:b("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getModel();n.tokenization.resetTokenization();let r=new gn;n.tokenization.forceTokenization(n.getLineCount()),r.stop(),console.log(`tokenization took ${r.elapsed()}`)}};ee(rR)});var H4,XJ=N(()=>{Lo();Xne();He();Ji();wt();H4=class i extends es{constructor(){super({id:i.ID,title:{value:b({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(e){let t=e.get(it).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",r=!Ck.getTabFocusMode(t);Ck.setTabFocusMode(r,t),r?ln(b("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):ln(b("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};H4.ID="editor.action.toggleTabFocusMode";Si(H4)});var Ikt,Lkt,zkt,QJ=N(()=>{s_();iz();lre();sre();gT();wT();ST();ET();AT();XT();iI();BJ();VJ();lI();uI();pI();mI();$J();NI();_2();hb();TL();Ikt=qr(DL()),Lkt=qr(GJ());CA();K0();e1();zC();VC();tS();A8();z8();zkt=qr(U8());W8();c7();f7();v7();_7();O7();V7();Y7();sD();aD();hD();kp();SD();rC();LD();YJ();XJ();BD();HD();GD();t4();SM();kM();xu();D0()});var ZJ=N(()=>{});var JJ=N(()=>{ZJ()});var vv,U4,eee=N(()=>{JJ();Ht();ke();lt();Tr();vv=class extends ce{constructor(e){super(),this.editor=e,this.widget=null,Am&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(89);!this.widget&&e?this.widget=new U4(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};vv.ID="editor.contrib.iPadShowKeyboard";U4=class i extends ce{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(At(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(At(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};U4.ID="editor.contrib.ShowKeyboardWidget";Ue(vv.ID,vv,3)});var oR,tee=N(()=>{lt();gz();xu();rk();cre();oR=class extends de{constructor(){super({id:"editor.action.toggleHighContrast",label:_z.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let n=e.get(oy),r=n.getColorTheme();_u(r.type)?(n.setTheme(this._originalThemeName||(nk(r.type)?xz:wz)),this._originalThemeName=null):(n.setTheme(nk(r.type)?Cz:Sz),this._originalThemeName=r.themeName)}};ee(oR)});var kEt,iee=N(()=>{QJ();eee();kEt=qr(IM());LM();DM();FM();jM();VM();tee();Rs()});var _v={};Xh(_v,{CancellationTokenSource:()=>dre,Emitter:()=>ure,KeyCode:()=>hre,KeyMod:()=>fre,MarkerSeverity:()=>vre,MarkerTag:()=>_re,Position:()=>pre,Range:()=>mre,Selection:()=>gre,SelectionDirection:()=>bre,Token:()=>wre,Uri:()=>yre,editor:()=>Cu,languages:()=>Sa});var yv=N(()=>{gJ();wJ();IJ();qM();xre();iee()});var aee=Qi((HEt,see)=>{var oee="Expected a function",nee=NaN,U_e="[object Symbol]",j_e=/^\s+|\s+$/g,W_e=/^[-+]0x[0-9a-f]+$/i,V_e=/^0b[01]+$/i,q_e=/^0o[0-7]+$/i,K_e=parseInt,$_e=typeof global=="object"&&global&&global.Object===Object&&global,G_e=typeof self=="object"&&self&&self.Object===Object&&self,Y_e=$_e||G_e||Function("return this")(),X_e=Object.prototype,Q_e=X_e.toString,Z_e=Math.max,J_e=Math.min,sR=function(){return Y_e.Date.now()};function eye(i,e,t){var n,r,o,s,a,l,c=0,d=!1,u=!1,h=!0;if(typeof i!="function")throw new TypeError(oee);e=ree(e)||0,j4(t)&&(d=!!t.leading,u="maxWait"in t,o=u?Z_e(ree(t.maxWait)||0,e):o,h="trailing"in t?!!t.trailing:h);function f(U){var Q=n,ae=r;return n=r=void 0,c=U,s=i.apply(ae,Q),s}function m(U){return c=U,a=setTimeout(_,e),d?f(U):s}function g(U){var Q=U-l,ae=U-c,te=e-Q;return u?J_e(te,o-ae):te}function w(U){var Q=U-l,ae=U-c;return l===void 0||Q>=e||Q<0||u&&ae>=o}function _(){var U=sR();if(w(U))return E(U);a=setTimeout(_,g(U))}function E(U){return a=void 0,h&&n?f(U):(n=r=void 0,s)}function A(){a!==void 0&&clearTimeout(a),c=0,n=l=r=a=void 0}function L(){return a===void 0?s:E(sR())}function O(){var U=sR(),Q=w(U);if(n=arguments,r=this,l=U,Q){if(a===void 0)return m(l);if(u)return a=setTimeout(_,e),f(l)}return a===void 0&&(a=setTimeout(_,e)),s}return O.cancel=A,O.flush=L,O}function tye(i,e,t){var n=!0,r=!0;if(typeof i!="function")throw new TypeError(oee);return j4(t)&&(n="leading"in t?!!t.leading:n,r="trailing"in t?!!t.trailing:r),eye(i,e,{leading:n,maxWait:e,trailing:r})}function j4(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function iye(i){return!!i&&typeof i=="object"}function nye(i){return typeof i=="symbol"||iye(i)&&Q_e.call(i)==U_e}function ree(i){if(typeof i=="number")return i;if(nye(i))return nee;if(j4(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=j4(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(j_e,"");var t=V_e.test(i);return t||q_e.test(i)?K_e(i.slice(2),t?2:8):W_e.test(i)?nee:+i}see.exports=tye});var Aee=Qi((UEt,Lee)=>{var rye=1/0,oye="[object Symbol]",sye=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,aye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mee="\\ud800-\\udfff",lye="\\u0300-\\u036f\\ufe20-\\ufe23",cye="\\u20d0-\\u20f0",gee="\\u2700-\\u27bf",bee="a-z\\xdf-\\xf6\\xf8-\\xff",dye="\\xac\\xb1\\xd7\\xf7",uye="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hye="\\u2000-\\u206f",fye=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",vee="A-Z\\xc0-\\xd6\\xd8-\\xde",pye="\\ufe0e\\ufe0f",_ee=dye+uye+hye+fye,aR="['\u2019]",lee="["+_ee+"]",yee="["+lye+cye+"]",wee="\\d+",mye="["+gee+"]",xee="["+bee+"]",Cee="[^"+mee+_ee+wee+gee+bee+vee+"]",gye="\\ud83c[\\udffb-\\udfff]",bye="(?:"+yee+"|"+gye+")",vye="[^"+mee+"]",See="(?:\\ud83c[\\udde6-\\uddff]){2}",kee="[\\ud800-\\udbff][\\udc00-\\udfff]",_m="["+vee+"]",_ye="\\u200d",cee="(?:"+xee+"|"+Cee+")",yye="(?:"+_m+"|"+Cee+")",dee="(?:"+aR+"(?:d|ll|m|re|s|t|ve))?",uee="(?:"+aR+"(?:D|LL|M|RE|S|T|VE))?",Eee=bye+"?",Tee="["+pye+"]?",wye="(?:"+_ye+"(?:"+[vye,See,kee].join("|")+")"+Tee+Eee+")*",xye=Tee+Eee+wye,Cye="(?:"+[mye,See,kee].join("|")+")"+xye,Sye=RegExp(aR,"g"),kye=RegExp(yee,"g"),Eye=RegExp([_m+"?"+xee+"+"+dee+"(?="+[lee,_m,"$"].join("|")+")",yye+"+"+uee+"(?="+[lee,_m+cee,"$"].join("|")+")",_m+"?"+cee+"+"+dee,_m+"+"+uee,wee,Cye].join("|"),"g"),Tye=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Iye={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},Lye=typeof global=="object"&&global&&global.Object===Object&&global,Aye=typeof self=="object"&&self&&self.Object===Object&&self,Dye=Lye||Aye||Function("return this")();function Mye(i,e,t,n){var r=-1,o=i?i.length:0;for(n&&o&&(t=i[++r]);++r<o;)t=e(t,i[r],r,i);return t}function Nye(i){return i.match(sye)||[]}function Rye(i){return function(e){return i==null?void 0:i[e]}}var Pye=Rye(Iye);function Oye(i){return Tye.test(i)}function Fye(i){return i.match(Eye)||[]}var zye=Object.prototype,Bye=zye.toString,hee=Dye.Symbol,fee=hee?hee.prototype:void 0,pee=fee?fee.toString:void 0;function Hye(i){if(typeof i=="string")return i;if(Wye(i))return pee?pee.call(i):"";var e=i+"";return e=="0"&&1/i==-rye?"-0":e}function Uye(i){return function(e){return Mye(Kye(Vye(e).replace(Sye,"")),i,"")}}function jye(i){return!!i&&typeof i=="object"}function Wye(i){return typeof i=="symbol"||jye(i)&&Bye.call(i)==oye}function Iee(i){return i==null?"":Hye(i)}function Vye(i){return i=Iee(i),i&&i.replace(aye,Pye).replace(kye,"")}var qye=Uye(function(i,e,t){return i+(t?"-":"")+e.toLowerCase()});function Kye(i,e,t){return i=Iee(i),e=t?void 0:e,e===void 0?Oye(i)?Fye(i):Nye(i):i.match(e)||[]}Lee.exports=qye});var lR=Qi(qe=>{"use strict";var fi=qe&&qe.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(qe,"__esModule",{value:!0});qe.DeleteLines=qe.SearchReplace=qe.Search=qe.InvertSelection=qe.GotoLine=qe.RotateCursorOnScreen=qe.InsertTabs=qe.RevealToBottomAction=qe.RevealToCenterAction=qe.RevealToTopAction=qe.RevealEditorAction=qe.YankRotate=qe.YankSelectionToRing=qe.Yank=qe.RedoAction=qe.UndoAction=qe.KeyBoardQuit=qe.MoveCursorTop=qe.MoveCursorBottom=qe.MoveCursorWordLeft=qe.MoveCursorWordRight=qe.MoveCursorToLineStart=qe.MoveCursorToLineEnd=qe.MoveCursorRight=qe.MoveCursorLeft=qe.MoveCursorDown=qe.MoveCursorUp=qe.SetMark=qe.InsertLineAfter=qe.InsertLineBelow=qe.KillLines=qe.KillSelection=qe.BaseAction=qe.SOURCE=void 0;var xn=(yv(),Qh(_v));qe.SOURCE="extension.emacs";function $ye(i,e,t,n,r){r===void 0&&(r=1);for(var o="cursor".concat(n==="word"?"Word":"").concat(t).concat(e?"Select":""),s=0;s<r;s++)i.trigger(qe.SOURCE,o,null)}var Xn=function(){function i(){this.description=""}return i}();qe.BaseAction=Xn;var Dee=function(i){fi(e,i);function e(t){var n=i.call(this)||this;return n.trigger=t,n}return e.prototype.run=function(t){t.trigger(qe.SOURCE,this.trigger,{})},e}(Xn),Gye=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelections();s.length&&s.forEach(function(a){var l=t.getModel().getValueInRange(a);n.state.addToRing(l),t.executeEdits(qe.SOURCE,[{range:a,text:""}])})},e}(Xn);qe.KillSelection=Gye;var Yye=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.selectionMode=!1;var s=t.getModel(),a=n.getCursorAnchor(),l;if(r===1){var c=s.getLineLength(a.lineNumber),d=a.column===c+1;if(!c||d){o?n.state.growRingTop(s.getEOL()):n.state.addToRing(s.getEOL()),t.trigger(qe.SOURCE,"deleteAllRight",null);return}else l=new xn.Position(a.lineNumber,s.getLineLength(a.lineNumber)+1)}else{var u=s.getLineCount(),h=a.lineNumber+r>u?u:a.lineNumber+r;l=new xn.Position(h,s.getLineLength(h)+1)}var f=xn.Range.fromPositions(a,l);o?n.state.growRingTop(s.getValueInRange(f)):n.state.addToRing(s.getValueInRange(f)),t.executeEdits(qe.SOURCE,[{range:f,text:""}]),t.setSelection(xn.Selection.fromPositions(a,a))},e}(Xn);qe.KillLines=Yye;var Xye=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getPosition();t.trigger(qe.SOURCE,"editor.action.insertLineAfter",null),t.setPosition(s)},e}(Xn);qe.InsertLineBelow=Xye;var Qye=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){for(var s="",a=0;a<r;a++)s+=t.getModel().getEOL();n.selectionMode=!1;var l=n.getCursorAnchor();t.executeEdits(qe.SOURCE,[{range:xn.Range.fromPositions(l),text:s,forceMoveMarkers:!0}])},e}(Xn);qe.InsertLineAfter=Qye;var Zye=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=n.selectionMode,a=t.getSelection(),l=a.isEmpty();if(!l){var c=a.getDirection();c===xn.SelectionDirection.LTR?t.setSelection(xn.Selection.fromPositions(a.getEndPosition(),a.getEndPosition())):t.setSelection(xn.Selection.fromPositions(a.getStartPosition(),a.getStartPosition()))}l&&n.selectionMode?n.selectionMode=!1:n.selectionMode=!0},e}(Xn);qe.SetMark=Zye;var iu=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="char",t}return e.prototype.run=function(t,n,r,o){$ye(t,n.selectionMode,this.direction,this.unit,r)},e}(Xn),Jye=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Up",t}return e}(iu);qe.MoveCursorUp=Jye;var ewe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Down",t}return e}(iu);qe.MoveCursorDown=ewe;var Mee=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Left",t}return e}(iu);qe.MoveCursorLeft=Mee;var Nee=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Right",t}return e}(iu);qe.MoveCursorRight=Nee;var twe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="End",t}return e}(iu);qe.MoveCursorToLineEnd=twe;var iwe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Home",t}return e}(iu);qe.MoveCursorToLineStart=iwe;var nwe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="word",t}return e}(Nee);qe.MoveCursorWordRight=nwe;var rwe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="word",t}return e}(Mee);qe.MoveCursorWordLeft=rwe;var owe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Bottom",t}return e}(iu);qe.MoveCursorBottom=owe;var swe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Top",t}return e}(iu);qe.MoveCursorTop=swe;var awe=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.selectionMode=!1,n.clearState(),t.setPosition(t.getPosition())},e}(Xn);qe.KeyBoardQuit=awe;var Ree=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){for(var s=0;s<r;s++)t.trigger(qe.SOURCE,this.action,null)},e}(Xn),lwe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.action="undo",t}return e}(Ree);qe.UndoAction=lwe;var cwe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.action="redo",t}return e}(Ree);qe.RedoAction=cwe;var dwe=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=n.state.getFromRing(r);if(s){var a=t.getPosition();t.executeEdits(qe.SOURCE,[{range:xn.Range.fromPositions(a,a),text:s,forceMoveMarkers:!0}])}},e}(Xn);qe.Yank=dwe;var uwe=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelection();if(!s.isEmpty()){n.state.addToRing(t.getModel().getValueInRange(s)),n.selectionMode=!1;var a=n.getCursorAnchor();t.setSelection(xn.Selection.fromPositions(a,a))}},e}(Xn);qe.YankSelectionToRing=uwe;var hwe=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=n.state.popFromRing();if(s){var a=n.getCursorAnchor();t.executeEdits(qe.SOURCE,[{range:xn.Range.fromPositions(a),text:s,forceMoveMarkers:!0}])}},e}(Xn);qe.YankRotate=hwe;var W4=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelection();this.revealFunction==="up"?t.trigger(qe.SOURCE,"scrollPageUp",null):t[this.revealFunction](s)},e}(Xn);qe.RevealEditorAction=W4;var fwe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="revealRangeAtTop",t}return e}(W4);qe.RevealToTopAction=fwe;var pwe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="revealRangeInCenter",t}return e}(W4);qe.RevealToCenterAction=pwe;var mwe=function(i){fi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="up",t}return e}(W4);qe.RevealToBottomAction=mwe;var gwe=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){for(var s=t.getModel(),a=s.getOptions(),l=a.tabSize,c=a.insertSpaces,d="",u=0;u<r;u++){for(var h="",f=0;f<l;f++)h+=" ";d+=c?h:" "}t.executeEdits(qe.SOURCE,[{range:t.getSelection(),text:d,forceMoveMarkers:!0}])},e}(Xn);qe.InsertTabs=gwe;var bwe=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getVisibleRanges();if(s.length){for(var a=[],l=1,c=0;c<s.length;c++)for(var d=s[c],u=d.startLineNumber;u<=d.endLineNumber;u++)a.push(u);var h=t.getPosition(),f=Math.ceil(a.length/2),m;h.lineNumber===a[f]?m=new xn.Position(a[0],1):h.lineNumber===a[0]?m=new xn.Position(a[a.length-1],1):m=new xn.Position(a[f],1),t.setPosition(m)}},e}(Xn);qe.RotateCursorOnScreen=bwe;var vwe=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.getBasicInput("Goto Line: ").then(function(s){var a=parseInt(s)||0,l=t.getModel(),c=l.getLineCount();t.focus(),a?a>c&&(a=c):a=1;var d=new xn.Position(a,1),u;if(!n.selectionMode)u=xn.Selection.fromPositions(d);else{var h=t.getSelection();h.getDirection()===xn.SelectionDirection.LTR?u=xn.Selection.fromPositions(h.getStartPosition(),d):u=xn.Selection.fromPositions(h.getEndPosition(),d)}t.setSelection(u),t.revealRangeInCenter(u)}).catch(function(){t.focus()})},e}(Xn);qe.GotoLine=vwe;var _we=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelection();if(!s.isEmpty()){var a;s.getDirection()===xn.SelectionDirection.LTR?a=xn.Selection.fromPositions(s.getEndPosition(),s.getStartPosition()):a=xn.Selection.fromPositions(s.getStartPosition(),s.getEndPosition()),t.setSelection(a)}},e}(Xn);qe.InvertSelection=_we;var ywe=function(i){fi(e,i);function e(){return i.call(this,"editor.actions.findWithArgs")||this}return e}(Dee);qe.Search=ywe;var wwe=function(i){fi(e,i);function e(){return i.call(this,"editor.action.startFindReplaceAction")||this}return e}(Dee);qe.SearchReplace=wwe;var xwe=function(i){fi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.selectionMode=!1;for(var s=0;s<r;s++)t.trigger(qe.SOURCE,"editor.action.deleteLines",null)},e}(Xn);qe.DeleteLines=xwe});var q4=Qi(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.getAllMappings=Qn.unregisterKey=Qn.registerGlobalCommand=Qn.executeCommand=Qn.COMMANDS=Qn.prefixPreservingKeys=void 0;var wi=lR();Qn.prefixPreservingKeys={"M-g":!0,"C-x":!0,"C-q":!0,"C-u":!0};var Pee=new wi.SetMark,V4=new wi.UndoAction,Cwe=new wi.MoveCursorDown,Swe=new wi.MoveCursorUp,kwe=new wi.MoveCursorRight,Ewe=new wi.MoveCursorLeft;Qn.COMMANDS={"M-/":{description:"",action:"editor.action.triggerSuggest"},"C-'":{description:"",action:"editor.action.triggerSuggest"},"M-;":{description:"",action:"editor.action.commentLine"},"C-t":{description:"",action:"editor.action.transposeLetters"},"C-x C-p":{description:"",action:"editor.action.selectAll"},Tab:{description:"",action:"editor.action.formatDocument"},"C-Backspace":{description:"",action:"deleteWordLeft"},"C-d":{description:"",action:"deleteRight"},"M-Backspace":{description:"",action:"deleteWordLeft"},"M-Delete":{description:"",action:"deleteWordLeft"},"C-x C-u":{description:"",action:"editor.action.transformToUppercase"},"C-x C-l":{description:"",action:"editor.action.transformToLowercase"},"C-v":{description:"",action:"cursorPageDown"},PageDown:{description:"",action:"cursorPageDown"},"M-v":{description:"",action:"cursorPageUp"},PageUp:{description:"",action:"cursorPageUp"},"M-g n":{description:"",action:"editor.action.marker.next"},"M-g p":{description:"",action:"editor.action.marker.prev"},"M-C-n":{description:"",action:"editor.action.addSelectionToNextFindMatch"},"C-h":{description:"",action:"deleteLeft"},"M-d":{description:"",action:"deleteWordRight"},"S-C-":{description:"",action:"editor.action.triggerParameterHints"},"C-SPC":Pee,"S-C-2":Pee,"C-/":V4,"S-C--":V4,"C-z":V4,"C-x u":V4,"C-n":Cwe,"C-p":Swe,"C-f":kwe,"C-b":Ewe,"S-C-Backspace":new wi.DeleteLines,"M-f":new wi.MoveCursorWordRight,"M-b":new wi.MoveCursorWordLeft,"C-k":new wi.KillLines,"C-m":new wi.InsertLineAfter,"C-w":new wi.KillSelection,"C-o":new wi.InsertLineBelow,"C-g":new wi.KeyBoardQuit,"C-e":new wi.MoveCursorToLineEnd,"C-a":new wi.MoveCursorToLineStart,"C-y":new wi.Yank,"M-w":new wi.YankSelectionToRing,"M-y":new wi.YankRotate,"C-l":new wi.RevealToCenterAction,"C-q Tab":new wi.InsertTabs,"M-r":new wi.RotateCursorOnScreen,"M-g g":new wi.GotoLine,"M-g M-g":new wi.GotoLine,"C-x C-x":new wi.InvertSelection,"S-M-.":new wi.MoveCursorBottom,"S-M-,":new wi.MoveCursorTop,"C-s":new wi.Search,"C-r":new wi.Search,"S-M-5":new wi.SearchReplace};function Twe(i,e,t,n){var r=i.getEditor(),o=parseInt(t)||1;if(e.run){e.run(r,i,o,n);return}if(typeof e.action=="string")for(var s=0;s<o;s++)r.trigger(wi.SOURCE,e.action,null);else if(Array.isArray(e.action))for(var s=0;s<o;s++)e.action.forEach(function(l){r.trigger(wi.SOURCE,l,null)})}Qn.executeCommand=Twe;function Iwe(i,e){Qn.COMMANDS[i]=e}Qn.registerGlobalCommand=Iwe;function Lwe(i){Qn.COMMANDS[i]&&delete Qn.COMMANDS[i]}Qn.unregisterKey=Lwe;function Awe(){var i={};return Object.keys(Qn.COMMANDS).forEach(function(e){i[e]=Qn.COMMANDS[e].description}),i}Qn.getAllMappings=Awe});var zee=Qi(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.Emitter=jr.Event=jr.monacoToEmacsKey=jr.modifierKeys=void 0;var Dwe=(yv(),Qh(_v));jr.modifierKeys={Alt:"M",Control:"C",Ctrl:"C",Meta:"CMD",Shift:"S"};var Oee={Enter:"Return",Space:"SPC",Backslash:"\\",Slash:"/",Backquote:"`",BracketRight:"]",BracketLeft:"[",Comma:",",Period:".",Equal:"=",Minus:"-",Quote:"'",Semicolon:";"},Mwe=["Key","Numpad"],Fee="Arrow";function Nwe(i){var e=Dwe.KeyCode[i.keyCode];if(jr.modifierKeys[e])return"";var t=Mwe.some(function(n){return e.startsWith(n)})?e[e.length-1]:e;return e.endsWith(Fee)?t=e.substring(0,e.length-Fee.length):Oee[e]&&(t=Oee[t]),t.length===1&&(t=t.toLowerCase()),i.altKey&&(t="".concat(jr.modifierKeys.Alt,"-").concat(t)),i.ctrlKey&&(t="".concat(jr.modifierKeys.Ctrl,"-").concat(t)),i.metaKey&&(t="".concat(jr.modifierKeys.Meta,"-").concat(t)),i.shiftKey&&(t="".concat(jr.modifierKeys.Shift,"-").concat(t)),t}jr.monacoToEmacsKey=Nwe;var Rwe;(function(i){var e={dispose:function(){}};i.None=function(){return e}})(Rwe=jr.Event||(jr.Event={}));var Pwe=function(){function i(){this._listeners=[]}return Object.defineProperty(i.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t){e._listeners.push(t);var n={dispose:function(){if(!e._disposed){var r=e._listeners.indexOf(t);r<0||e._listeners.splice(r,1)}}};return n}),this._event},enumerable:!1,configurable:!0}),i.prototype.fire=function(e){this._listeners.length&&this._listeners.forEach(function(t){return t(e)})},i.prototype.dispose=function(){this._disposed||(this._listeners=void 0,this._disposed=!0)},i}();jr.Emitter=Pwe});var Bee=Qi(K4=>{"use strict";Object.defineProperty(K4,"__esModule",{value:!0});K4.BasicInputWidget=void 0;var Owe=(yv(),Qh(_v)),$o="ext-emacs-basic-input";function Fwe(){return`
.`.concat($o,` {
color: #d4d4d4;
transition: top 200ms linear;
visibility: hidden;
width: 200px;
display: flex;
align-items: center;
padding: 5px;
}
.`).concat($o,".").concat($o,`-visible {
visibility: visible;
}
.`).concat($o,` input {
color: rgb(97, 97, 97);
background-color: transparent;
display: inline-block;
box-sizing: border-box;
height: 100%;
line-height: inherit;
border: none;
font-family: inherit;
font-size: inherit;
resize: none;
padding-top: 2px;
padding-bottom: 2px;
margin-left: 5px;
max-width: 50px;
}
.`).concat($o,` input:focus {
outline: none;
}
.vs .`).concat($o,` {
color: rgb(97, 97, 97);
background-color: #efeff2;
box-shadow: 0 2px 8px #a8a8a8;
}
.vs-dark .`).concat($o,` {
background-color: #2d2d30;
box-shadow: 0 2px 8px #000000;
}
.vs-dark .`).concat($o,` input {
color: rgb(204, 204, 204);
}
.hc-black .`).concat($o,` {
border: 2px solid #6fc3df;
background-color: #0c141f;
color: #ffffff;
}
.hc-black .`).concat($o,` input {
color: #ffffff;
}
`)}var zwe=function(){function i(){var e=this;this._pendingPromise=null,this.onKeyDown=function(n){(n.altKey||n.ctrlKey||n.metaKey)&&(n.preventDefault(),n.stopPropagation()),n.which===13?e._pendingPromise&&(n.preventDefault(),e._pendingPromise.resolve(n.target.value),e._pendingPromise=null):n.which===27&&e._pendingPromise&&(e._pendingPromise.reject(),e._pendingPromise=null)},this.onBlur=function(){e._pendingPromise&&(e._pendingPromise.reject(),e._pendingPromise=null)},this._dom=document.createElement("div"),this._messageDom=document.createElement("div");var t=document.createElement("div");this._dom.setAttribute("class",$o),this._dom.setAttribute("aria-hidden","true"),this._input=document.createElement("input"),this._dom.appendChild(this._messageDom),t.appendChild(this._input),this._dom.appendChild(t),this.addListeners(),this._style=document.createElement("style"),this._style.type="text/css",this._style.textContent=Fwe(),(document.head||document.body).appendChild(this._style)}return i.prototype.getDomNode=function(){return this._dom},i.prototype.getId=function(){return"extension.emacs.basicinput"},i.prototype.getPosition=function(){return{preference:Owe.editor.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}},i.prototype.addListeners=function(){this._input.addEventListener("keydown",this.onKeyDown),this._input.addEventListener("blur",this.onBlur)},i.prototype.showWidgetAndFocus=function(e){this._dom.classList.add("".concat($o,"-visible")),this._dom.setAttribute("aria-hidden","false"),this._messageDom.textContent=e,this._input.focus()},i.prototype.cleanup=function(){this._dom.classList.remove("".concat($o,"-visible")),this._dom.setAttribute("aria-hidden","true"),this._messageDom.textContent="",this._input.placeholder="",this._input.value=""},i.prototype.getInput=function(e){var t=this;return this._pendingPromise&&(this._pendingPromise.reject(),this._pendingPromise=null),new Promise(function(n,r){t._pendingPromise={resolve:function(o){n(o),t.cleanup()},reject:function(){r(),t.cleanup()}},t.showWidgetAndFocus(e)})},i.prototype.dispose=function(){this.cleanup(),this._input.removeEventListener("keydown",this.onKeyDown),this._input.removeEventListener("blur",this.onBlur),(document.head||document.body).removeChild(this._style)},i}();K4.BasicInputWidget=zwe});var Uee=Qi(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.State=xc.EAT_UP_KEY=void 0;var Hee=q4();xc.EAT_UP_KEY="==-==";var Bwe=function(){function i(){this._inargumentMode=!1,this._killRing=[]}return i.prototype.updateAndGetKey=function(e){return e==="C-g"&&(this._inargumentMode||this._prefixKey)?(this.resetState(),xc.EAT_UP_KEY):this.updateCuMode(e)?xc.EAT_UP_KEY:this._prefixKey?"".concat(this._prefixKey," ").concat(e):Hee.prefixPreservingKeys[e]?(this._prefixKey=e,xc.EAT_UP_KEY):e},i.prototype.setLastCommandKey=function(e){this._lastCommandKey=e},i.prototype.isLastCommandKey=function(e){return this._lastCommandKey==e},i.prototype.resetState=function(e){e===void 0&&(e=!1),this._inargumentMode=e,this._prefixKey=null,e?this._lastInputBuffer=this._inputBuffer:this._lastInputBuffer=null,this._inputBuffer=null},i.prototype.updateCuMode=function(e){if(this._inargumentMode){if(typeof e=="string"&&/^\d$/.test(e))return this._inputBuffer=(this._inputBuffer||"")+e,!0;if(Hee.prefixPreservingKeys[e])return this.resetState(!0),!1}else if(!this._prefixKey&&e==="C-u")return this._inargumentMode=!0,this._inputBuffer=null,this._lastInputBuffer=null,!0},i.prototype.updateStateOnExecution=function(e){e===void 0&&(e=!1),this.resetState(e)},i.prototype.getInputBuffer=function(){return this._lastInputBuffer||this._inputBuffer},i.prototype.addToRing=function(e){this._killRing.push(e),this._killRing.length>50&&this._killRing.shift()},i.prototype.growRingTop=function(e){this._killRing.length||this.addToRing(e),this._killRing[this._killRing.length-1]+=e},i.prototype.getFromRing=function(e){return this._killRing[this._killRing.length-(e?Math.min(e,1):1)]||""},i.prototype.popFromRing=function(){return this._killRing.length>1?this._killRing.pop():this.getFromRing()},i.prototype.getReadableState=function(){var e="";return this._inargumentMode&&(e+="C-u",this._inputBuffer?e+=" ".concat(this._inputBuffer):this._lastInputBuffer&&(e+=" ".concat(this._lastInputBuffer))),this._prefixKey&&(e+=" ".concat(this._prefixKey)),e},i}();xc.State=Bwe});var Kee=Qi(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.getConfiguration=ym.EmacsExtension=void 0;var jh=(yv(),Qh(_v)),Hwe=aee(),$4=Aee(),jee=q4(),cR=zee(),Uwe=Bee(),Wee=Uee(),Vee=jh.editor,dR=Vee.TextEditorCursorBlinkingStyle,uR=Vee.TextEditorCursorStyle,jwe=function(){function i(e){this._disposables=[],this._inSelectionMode=!1,this._changeDisposable=null,this._state=new Wee.State,this._onDidMarkChange=new cR.Emitter,this.onDidMarkChange=this._onDidMarkChange.event,this._onDidChangeKey=new cR.Emitter,this.onDidChangeKey=this._onDidChangeKey.event,this._editor=e;var t=qee(e);this._intialCursorType=t.cursorStyle,this._intialCursorBlinking=t.cursorBlinking,this._basicInputWidget=new Uwe.BasicInputWidget}return i.prototype.start=function(){this._disposables.length||(this.addListeners(),this._editor.updateOptions({cursorStyle:$4(uR[uR.Block]),cursorBlinking:$4(dR[dR.Blink])}),this._editor.addOverlayWidget(this._basicInputWidget))},Object.defineProperty(i.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),i.prototype.getEditor=function(){return this._editor},i.prototype.addListeners=function(){this._disposables.push(this._editor.onKeyDown(this.onKeyDown.bind(this))),this._throttledScroll=Hwe(this.onEditorScroll.bind(this),500),this._disposables.push(this._editor.onDidScrollChange(this._throttledScroll))},i.prototype.cancelKey=function(e){e.preventDefault(),e.stopPropagation()},i.prototype.onKeyDown=function(e){if(!e.browserEvent.defaultPrevented){var t=(0,cR.monacoToEmacsKey)(e);if(t){if(t=this._state.updateAndGetKey(t),this._onDidChangeKey.fire(this._state.getReadableState()),t===Wee.EAT_UP_KEY){this._onDidChangeKey.fire(this._state.getReadableState()),this.cancelKey(e);return}var n=jee.COMMANDS[t];if(!n){this._onDidChangeKey.fire(this._state.getReadableState()),this._state.setLastCommandKey(t);return}this.cancelKey(e);var r=this._state.isLastCommandKey(t);(0,jee.executeCommand)(this,n,this._state.getInputBuffer(),r),this._state.setLastCommandKey(t),this._state.updateStateOnExecution()}}},i.prototype.onEditorScroll=function(){var e=this._editor.getLayoutInfo().height,t=this._editor.getScrolledVisiblePosition(this._editor.getPosition());if(!(t.top>=0&&t.top<=e)){var n=this._editor.getVisibleRanges();if(n.length){var r,o=this._editor.getSelection();t.top<0?r=new jh.Position(n[0].getStartPosition().lineNumber,1):t.top>e&&(r=new jh.Position(n[n.length-1].getEndPosition().lineNumber,1)),this._inSelectionMode?this._editor.setSelection(jh.Selection.fromPositions(o.getStartPosition(),r)):this._editor.setPosition(r)}}},i.prototype.onContentChange=function(){this.selectionMode=!1},i.prototype.clearState=function(){this._state.updateStateOnExecution()},Object.defineProperty(i.prototype,"selectionMode",{get:function(){return this._inSelectionMode},set:function(e){e!==this._inSelectionMode&&(this._inSelectionMode=e,e?this._changeDisposable=this._editor.onDidChangeModelContent(this.onContentChange.bind(this)):this._changeDisposable&&(this._changeDisposable.dispose(),this._changeDisposable=null),this._onDidMarkChange.fire(e))},enumerable:!1,configurable:!0}),i.prototype.getCursorAnchor=function(){var e=this._editor.getSelection(),t=e.getDirection();return t===jh.SelectionDirection.LTR?e.getEndPosition():e.getStartPosition()},i.prototype.getBasicInput=function(e){return this._basicInputWidget.getInput(e)},i.prototype.dispose=function(){this._disposables.forEach(function(e){return e.dispose()}),this._disposables=void 0,this._changeDisposable&&(this._changeDisposable.dispose(),this._changeDisposable=null),this._editor.updateOptions({cursorStyle:this._intialCursorType,cursorBlinking:this._intialCursorBlinking}),this._editor.removeOverlayWidget(this._basicInputWidget),this._basicInputWidget.dispose(),this._throttledScroll.cancel(),this._state=null},i}();ym.EmacsExtension=jwe;function qee(i){var e=i.getOption(jh.editor.EditorOption.cursorStyle),t=i.getOption(jh.editor.EditorOption.cursorBlinking);return{cursorStyle:$4(uR[e]),cursorBlinking:$4(dR[t])}}ym.getConfiguration=qee});var Gee=Qi(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.Actions=Go.EmacsExtension=Go.unregisterKey=Go.getAllMappings=Go.registerGlobalCommand=void 0;var $ee=Kee();Object.defineProperty(Go,"EmacsExtension",{enumerable:!0,get:function(){return $ee.EmacsExtension}});var hR=q4();Object.defineProperty(Go,"registerGlobalCommand",{enumerable:!0,get:function(){return hR.registerGlobalCommand}});Object.defineProperty(Go,"getAllMappings",{enumerable:!0,get:function(){return hR.getAllMappings}});Object.defineProperty(Go,"unregisterKey",{enumerable:!0,get:function(){return hR.unregisterKey}});var Wwe=lR();Go.Actions=Wwe;Go.default=$ee.EmacsExtension});var hie=Qi((uie,p9)=>{(function(i){if(typeof uie=="object"&&typeof p9!="undefined")p9.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=i()}})(function(){var i,e,t;return function(){function n(r,o,s){function a(d,u){if(!o[d]){if(!r[d]){var h=typeof lu=="function"&&lu;if(!u&&h)return h(d,!0);if(l)return l(d,!0);var f=new Error("Cannot find module '"+d+"'");throw f.code="MODULE_NOT_FOUND",f}var m=o[d]={exports:{}};r[d][0].call(m.exports,function(g){var w=r[d][1][g];return a(w||g)},m,m.exports,n,r,o,s)}return o[d].exports}for(var l=typeof lu=="function"&&lu,c=0;c<s.length;c++)a(s[c]);return a}return n}()({1:[function(n,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var s=function(){function f(m,g){for(var w=0;w<g.length;w++){var _=g[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}return function(m,g,w){return g&&f(m.prototype,g),w&&f(m,w),m}}();function a(f,m,g){return m in f?Object.defineProperty(f,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):f[m]=g,f}function l(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}var c={width:"100%",height:"100%"},d=function(m){return Number(m)===Number(m)},u="classList"in document.documentElement?function(f,m){f.classList.add(m)}:function(f,m){var g=f.getAttribute("class")||"";f.setAttribute("class",g+" "+m)},h=function(){s(f,null,[{key:"create",value:function(g,w){return new f(g,w)}},{key:"mergeStyle",value:function(g,w){for(var _ in w)g.style[_]!==w[_]&&(g.style[_]=w[_])}},{key:"getMaxBrowserHeight",value:function(){var g=document.createElement("div"),w=document.createElement("div");f.mergeStyle(g,{position:"absolute",height:"1px",opacity:0}),f.mergeStyle(w,{height:"1e7px"}),g.appendChild(w),document.body.appendChild(g);var _=w.offsetHeight;return document.body.removeChild(g),_}}]);function f(m,g){var w=this;l(this,f),this._config={},this._lastRepaint=null,this._maxElementHeight=f.getMaxBrowserHeight(),this.refresh(m,g);var _=this._config,E=function A(){var L=w._getScrollPosition(),O=w._lastRepaint;if(w._renderAnimationFrame=window.requestAnimationFrame(A),L!==O){var U=O?L-O:0;if(!O||U<0||U>w._averageHeight){var Q=w._renderChunk();w._lastRepaint=L,Q!==!1&&typeof _.afterRender=="function"&&_.afterRender()}}};E()}return s(f,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(g,w){var _;if(Object.assign(this._config,c,w),!g||g.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=g;var E=this._config,A=this._scroller||E.scroller||document.createElement(E.scrollerTagName||"tr");if(typeof E.useFragment!="boolean"&&(this._config.useFragment=!0),!E.generate)throw new Error("Missing required `generate` function");if(!d(E.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(E.itemHeight)&&!d(E.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());d(E.itemHeight)?this._itemHeights=Array(E.total).fill(E.itemHeight):this._itemHeights=E.itemHeight,Object.keys(c).filter(function(dt){return dt in E}).forEach(function(dt){var be=E[dt],we=d(be);if(be&&typeof be!="string"&&typeof be!="number"){var Y="Invalid optional `"+dt+"`, expected string or number";throw new Error(Y)}else we&&(E[dt]=be+"px")});var L=!!E.horizontal,O=E[L?"width":"height"];if(O){var U=d(O),Q=U?!1:O.slice(-1)==="%",ae=U?O:parseInt(O.replace(/px|%/,""),10),te=window[L?"innerWidth":"innerHeight"];Q?this._containerSize=te*ae/100:this._containerSize=d(O)?O:ae}var Z=E.scrollContainer,ve=E.itemHeight*E.total,Pe=this._maxElementHeight;ve>Pe&&console.warn(["HyperList: The maximum element height",Pe+"px has","been exceeded; please reduce your item height."].join(" "));var Ee={width:""+E.width,height:Z?ve+"px":""+E.height,overflow:Z?"none":"auto",position:"relative"};f.mergeStyle(g,Ee),Z&&f.mergeStyle(E.scrollContainer,{overflow:"auto"});var Oe=(_={opacity:"0",position:"absolute"},a(_,L?"height":"width","1px"),a(_,L?"width":"height",ve+"px"),_);f.mergeStyle(A,Oe),this._scroller||g.appendChild(A);var Xe=this._computeScrollPadding();this._scrollPaddingBottom=Xe.bottom,this._scrollPaddingTop=Xe.top,this._scroller=A,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(E.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof E.afterRender=="function"&&E.afterRender()}},{key:"_getRow",value:function(g){var w=this._config,_=w.generate(g),E=_.height;if(E!==void 0&&d(E)?(_=_.element,E!==this._itemHeights[g]&&(this._itemHeights[g]=E,this._computePositions(g),this._scrollHeight=this._computeScrollHeight(g))):E=this._itemHeights[g],!_||_.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+g);u(_,w.rowClassName||"vrow");var A=this._itemPositions[g]+this._scrollPaddingTop;return f.mergeStyle(_,a({position:"absolute"},w.horizontal?"left":"top",A+"px")),_}},{key:"_getScrollPosition",value:function(){var g=this._config;return typeof g.overrideScrollPosition=="function"?g.overrideScrollPosition():this._element[g.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(g){var w=this._config,_=this._element,E=this._getScrollPosition(),A=w.total,L=w.reverse?this._getReverseFrom(E):this._getFrom(E)-1;if((L<0||L-this._screenItemsLen<0)&&(L=0),!g&&this._lastFrom===L)return!1;this._lastFrom=L;var O=L+this._cachedItemsLen;(O>A||O+this._cachedItemsLen>A)&&(O=A);var U=w.useFragment?document.createDocumentFragment():[],Q=this._scroller;U[w.useFragment?"appendChild":"push"](Q);for(var ae=L;ae<O;ae++){var te=this._getRow(ae);U[w.useFragment?"appendChild":"push"](te)}if(w.applyPatch)return w.applyPatch(_,U);_.innerHTML="",_.appendChild(U)}},{key:"_computePositions",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,w=this._config,_=w.total,E=w.reverse;g<1&&!E&&(g=1);for(var A=g;A<_;A++)E?A===0?this._itemPositions[0]=this._scrollHeight-this._itemHeights[0]:this._itemPositions[A]=this._itemPositions[A-1]-this._itemHeights[A]:this._itemPositions[A]=this._itemHeights[A-1]+this._itemPositions[A-1]}},{key:"_computeScrollHeight",value:function(){var g,w=this,_=this._config,E=!!_.horizontal,A=_.total,L=this._itemHeights.reduce(function(ve,Pe){return ve+Pe},0)+this._scrollPaddingBottom+this._scrollPaddingTop;f.mergeStyle(this._scroller,(g={opacity:0,position:"absolute",top:"0px"},a(g,E?"height":"width","1px"),a(g,E?"width":"height",L+"px"),g));var O=this._itemHeights.slice(0).sort(function(ve,Pe){return ve-Pe}),U=Math.floor(A/2),Q=A%2===0?(O[U]+O[U-1])/2:O[U],ae=E?"clientWidth":"clientHeight",te=_.scrollContainer?_.scrollContainer:this._element,Z=te[ae]?te[ae]:this._containerSize;return this._screenItemsLen=Math.ceil(Z/Q),this._containerSize=Z,this._cachedItemsLen=Math.max(this._cachedItemsLen||0,this._screenItemsLen*3),this._averageHeight=Q,_.reverse&&window.requestAnimationFrame(function(){E?w._element.scrollLeft=L:w._element.scrollTop=L}),L}},{key:"_computeScrollPadding",value:function(){var g=this._config,w=!!g.horizontal,_=g.reverse,E=window.getComputedStyle(this._element),A=function(O){var U=E.getPropertyValue("padding-"+O);return parseInt(U,10)||0};return w&&_?{bottom:A("left"),top:A("right")}:w?{bottom:A("right"),top:A("left")}:_?{bottom:A("top"),top:A("bottom")}:{bottom:A("bottom"),top:A("top")}}},{key:"_getFrom",value:function(g){for(var w=0;this._itemPositions[w]<g;)w++;return w}},{key:"_getReverseFrom",value:function(g){for(var w=this._config.total-1;w>0&&this._itemPositions[w]<g+this._containerSize;)w--;return w}}]),f}();o.default=h,r.exports=o.default},{}]},{},[1])(1)})});var _ie=Qi((vie,y3)=>{(function(i,e){"use strict";function t(){n.width=i.innerWidth,n.height=5*c.barThickness;var u=n.getContext("2d");u.shadowBlur=c.shadowBlur,u.shadowColor=c.shadowColor;var h,f=u.createLinearGradient(0,0,n.width,0);for(h in c.barColors)f.addColorStop(h,c.barColors[h]);u.lineWidth=c.barThickness,u.beginPath(),u.moveTo(0,c.barThickness/2),u.lineTo(Math.ceil(r*n.width),c.barThickness/2),u.strokeStyle=f,u.stroke()}var n,r,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},d={config:function(u){for(var h in u)c.hasOwnProperty(h)&&(c[h]=u[h])},show:function(u){var h,f;o||(u?l=l||setTimeout(()=>d.show(),u):(o=!0,a!==null&&i.cancelAnimationFrame(a),n||((f=(n=e.createElement("canvas")).style).position="fixed",f.top=f.left=f.right=f.margin=f.padding=0,f.zIndex=100001,f.display="none",c.className&&n.classList.add(c.className),e.body.appendChild(n),h="resize",u=t,(f=i).addEventListener?f.addEventListener(h,u,!1):f.attachEvent?f.attachEvent("on"+h,u):f["on"+h]=u),n.style.opacity=1,n.style.display="block",d.progress(0),c.autoRun&&function m(){s=i.requestAnimationFrame(m),d.progress("+"+.05*Math.pow(1-Math.sqrt(r),2))}()))},progress:function(u){return u===void 0||(typeof u=="string"&&(u=(0<=u.indexOf("+")||0<=u.indexOf("-")?r:0)+parseFloat(u)),r=1<u?1:u,t()),r},hide:function(){clearTimeout(l),l=null,o&&(o=!1,s!=null&&(i.cancelAnimationFrame(s),s=null),function u(){return 1<=d.progress("+.1")&&(n.style.opacity-=.05,n.style.opacity<=.05)?(n.style.display="none",void(a=null)):void(a=i.requestAnimationFrame(u))}())}};typeof y3=="object"&&typeof y3.exports=="object"?y3.exports=d:typeof define=="function"&&define.amd?define(function(){return d}):this.topbar=d}).call(vie,window,document)});(function(){var i=e();function e(){if(typeof window.CustomEvent=="function")return window.CustomEvent;function r(o,s){s=s||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(o,s.bubbles,s.cancelable,s.detail),a}return r.prototype=window.Event.prototype,r}function t(r,o){var s=document.createElement("input");return s.type="hidden",s.name=r,s.value=o,s}function n(r,o){var s=r.getAttribute("data-to"),a=t("_method",r.getAttribute("data-method")),l=t("_csrf_token",r.getAttribute("data-csrf")),c=document.createElement("form"),d=document.createElement("input"),u=r.getAttribute("target");c.method=r.getAttribute("data-method")==="get"?"get":"post",c.action=s,c.style.display="none",u?c.target=u:o&&(c.target="_blank"),c.appendChild(l),c.appendChild(a),document.body.appendChild(c),d.type="submit",c.appendChild(d),d.click()}window.addEventListener("click",function(r){var o=r.target;if(!r.defaultPrevented)for(;o&&o.getAttribute;){var s=new i("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!o.dispatchEvent(s))return r.preventDefault(),r.stopImmediatePropagation(),!1;if(o.getAttribute("data-method"))return n(o,r.metaKey||r.shiftKey),r.preventDefault(),!1;o=o.parentNode}},!1),window.addEventListener("phoenix.link.click",function(r){var o=r.target.getAttribute("data-confirm");o&&!window.confirm(o)&&r.preventDefault()},!1)})();var fg=i=>typeof i=="function"?i:function(){return i},Cre=typeof self!="undefined"?self:null,hg=typeof window!="undefined"?window:null,pg=Cre||hg||pg,Sre="2.0.0",ka={connecting:0,open:1,closing:2,closed:3},kre=1e4,Ere=1e3,Po={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Ll={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Fk={longpoll:"longpoll",websocket:"websocket"},Tre={complete:4},ay=class{constructor(i,e,t,n){this.channel=i,this.event=e,this.payload=t||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(i){this.timeout=i,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(i,e){return this.hasReceived(i)&&e(this.receivedResp.response),this.recHooks.push({status:i,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:i,response:e,_ref:t}){this.recHooks.filter(n=>n.status===i).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,i=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=i,this.matchReceive(i)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(i){return this.receivedResp&&this.receivedResp.status===i}trigger(i,e){this.channel.trigger(this.refEvent,{status:i,response:e})}},kz=class{constructor(i,e){this.callback=i,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Ire=class{constructor(i,e,t){this.state=Po.closed,this.topic=i,this.params=fg(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ay(this,Ll.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new kz(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Po.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Po.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Po.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Po.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new ay(this,Ll.leave,fg({}),this.timeout).send(),this.state=Po.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Ll.reply,(n,r)=>{this.trigger(this.replyEventName(r),n)})}join(i=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=i,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(i){this.on(Ll.close,i)}onError(i){return this.on(Ll.error,e=>i(e))}on(i,e){let t=this.bindingRef++;return this.bindings.push({event:i,ref:t,callback:e}),t}off(i,e){this.bindings=this.bindings.filter(t=>!(t.event===i&&(typeof e=="undefined"||e===t.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(i,e,t=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${i}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new ay(this,i,function(){return e},t);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Po.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Ll.close,"leave")},t=new ay(this,Ll.leave,fg({}),i);return t.receive("ok",()=>e()).receive("timeout",()=>e()),t.send(),this.canPush()||t.trigger("ok",{}),t}onMessage(i,e,t){return e}isMember(i,e,t,n){return this.topic!==i?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:e,payload:t,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Po.joining,this.joinPush.resend(i))}trigger(i,e,t,n){let r=this.onMessage(i,e,t,n);if(e&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===i);for(let s=0;s<o.length;s++)o[s].callback(r,t,n||this.joinRef())}replyEventName(i){return`chan_reply_${i}`}isClosed(){return this.state===Po.closed}isErrored(){return this.state===Po.errored}isJoined(){return this.state===Po.joined}isJoining(){return this.state===Po.joining}isLeaving(){return this.state===Po.leaving}},cy=class{static request(i,e,t,n,r,o,s){if(pg.XDomainRequest){let a=new pg.XDomainRequest;return this.xdomainRequest(a,i,e,n,r,o,s)}else{let a=new pg.XMLHttpRequest;return this.xhrRequest(a,i,e,t,n,r,o,s)}}static xdomainRequest(i,e,t,n,r,o,s){return i.timeout=r,i.open(e,t),i.onload=()=>{let a=this.parseJSON(i.responseText);s&&s(a)},o&&(i.ontimeout=o),i.onprogress=()=>{},i.send(n),i}static xhrRequest(i,e,t,n,r,o,s,a){return i.open(e,t,!0),i.timeout=o,i.setRequestHeader("Content-Type",n),i.onerror=()=>a&&a(null),i.onreadystatechange=()=>{if(i.readyState===Tre.complete&&a){let l=this.parseJSON(i.responseText);a(l)}},s&&(i.ontimeout=s),i.send(r),i}static parseJSON(i){if(!i||i==="")return null;try{return JSON.parse(i)}catch(e){return console&&console.log("failed to parse JSON response",i),null}}static serialize(i,e){let t=[];for(var n in i){if(!Object.prototype.hasOwnProperty.call(i,n))continue;let r=e?`${e}[${n}]`:n,o=i[n];typeof o=="object"?t.push(this.serialize(o,r)):t.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}return t.join("&")}static appendParams(i,e){if(Object.keys(e).length===0)return i;let t=i.match(/\?/)?"&":"?";return`${i}${t}${this.serialize(e)}`}},Lre=i=>{let e="",t=new Uint8Array(i),n=t.byteLength;for(let r=0;r<n;r++)e+=String.fromCharCode(t[r]);return btoa(e)},Ok=class{constructor(i){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(i),this.readyState=ka.connecting,this.poll()}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Fk.websocket),"$1/"+Fk.longpoll)}endpointURL(){return cy.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,e,t){this.close(i,e,t),this.readyState=ka.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ka.open||this.readyState===ka.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),i=>{if(i){var{status:e,token:t,messages:n}=i;this.token=t}else e=0;switch(e){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ka.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(i){typeof i!="string"&&(i=Lre(i)),this.currentBatch?this.currentBatch.push(i):this.awaitingBatchAck?this.batchBuffer.push(i):(this.currentBatch=[i],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(i){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",i.join(`
`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(i,e,t){for(let r of this.reqs)r.abort();this.readyState=ka.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:i,reason:e,wasClean:t});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(i,e,t,n,r){let o,s=()=>{this.reqs.delete(o),n()};o=cy.request(i,this.endpointURL(),e,t,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&r(a)}),this.reqs.add(o)}};var ly={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(i,e){if(i.payload.constructor===ArrayBuffer)return e(this.binaryEncode(i));{let t=[i.join_ref,i.ref,i.topic,i.event,i.payload];return e(JSON.stringify(t))}},decode(i,e){if(i.constructor===ArrayBuffer)return e(this.binaryDecode(i));{let[t,n,r,o,s]=JSON.parse(i);return e({join_ref:t,ref:n,topic:r,event:o,payload:s})}},binaryEncode(i){let{join_ref:e,ref:t,event:n,topic:r,payload:o}=i,s=this.META_LENGTH+e.length+t.length+r.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,n.length),Array.from(e,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(t,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(r,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(n,u=>l.setUint8(c++,u.charCodeAt(0)));var d=new Uint8Array(a.byteLength+o.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(o),a.byteLength),d.buffer},binaryDecode(i){let e=new DataView(i),t=e.getUint8(0),n=new TextDecoder;switch(t){case this.KINDS.push:return this.decodePush(i,e,n);case this.KINDS.reply:return this.decodeReply(i,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(i,e,n)}},decodePush(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=t.decode(i.slice(s,s+n));s=s+n;let l=t.decode(i.slice(s,s+r));s=s+r;let c=t.decode(i.slice(s,s+o));s=s+o;let d=i.slice(s,i.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:d}},decodeReply(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=t.decode(i.slice(a,a+n));a=a+n;let c=t.decode(i.slice(a,a+r));a=a+r;let d=t.decode(i.slice(a,a+o));a=a+o;let u=t.decode(i.slice(a,a+s));a=a+s;let h=i.slice(a,i.byteLength),f={status:u,response:h};return{join_ref:l,ref:c,topic:d,event:Ll.reply,payload:f}},decodeBroadcast(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=this.HEADER_LENGTH+2,s=t.decode(i.slice(o,o+n));o=o+n;let a=t.decode(i.slice(o,o+r));o=o+r;let l=i.slice(o,i.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},dy=class{constructor(i,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||kre,this.transport=e.transport||pg.WebSocket||Ok,this.establishedConnections=0,this.defaultEncoder=ly.encode.bind(ly),this.defaultDecoder=ly.decode.bind(ly),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==Ok?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let t=null;hg&&hg.addEventListener&&(hg.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),t=this.connectClock)}),hg.addEventListener("pageshow",n=>{t===this.connectClock&&(t=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=n=>e.rejoinAfterMs?e.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>e.reconnectAfterMs?e.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=e.logger||null,this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=fg(e.params||{}),this.endPoint=`${i}/${Fk.websocket}`,this.vsn=e.vsn||Sre,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new kz(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return Ok}replaceTransport(i){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=i}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let i=cy.appendParams(cy.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return i.charAt(0)!=="/"?i:i.charAt(1)==="/"?`${this.protocol()}:${i}`:`${this.protocol()}://${location.host}${i}`}disconnect(i,e,t){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(i,e,t)}connect(i){i&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=fg(i)),!this.conn&&(this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e))}log(i,e,t){this.logger(i,e,t)}hasLogger(){return this.logger!==null}onOpen(i){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,i]),e}onClose(i){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,i]),e}onError(i){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,i]),e}onMessage(i){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,i]),e}ping(i){if(!this.isConnected())return!1;let e=this.makeRef(),t=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(r=>{r.ref===e&&(this.off([n]),i(Date.now()-t))});return!0}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,i])=>i())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Ere,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(i,e,t){if(!this.conn)return i&&i();this.waitForBufferDone(()=>{this.conn&&(e?this.conn.close(e,t||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),i&&i()})})}waitForBufferDone(i,e=1){if(e===5||!this.conn||!this.conn.bufferedAmount){i();return}setTimeout(()=>{this.waitForBufferDone(i,e+1)},150*e)}waitForSocketClosed(i,e=1){if(e===5||!this.conn||this.conn.readyState===ka.closed){i();return}setTimeout(()=>{this.waitForSocketClosed(i,e+1)},150*e)}onConnClose(i){let e=i&&i.code;this.hasLogger()&&this.log("transport","close",i),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,t])=>t(i))}onConnError(i){this.hasLogger()&&this.log("transport",i);let e=this.transport,t=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(i,e,t)}),(e===this.transport||t>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(i=>{i.isErrored()||i.isLeaving()||i.isClosed()||i.trigger(Ll.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case ka.connecting:return"connecting";case ka.open:return"open";case ka.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(i){this.off(i.stateChangeRefs),this.channels=this.channels.filter(e=>e.joinRef()!==i.joinRef())}off(i){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([t])=>i.indexOf(t)===-1)}channel(i,e={}){let t=new Ire(i,e,this);return this.channels.push(t),t}push(i){if(this.hasLogger()){let{topic:e,event:t,payload:n,ref:r,join_ref:o}=i;this.log("push",`${e} ${t} (${o}, ${r})`,n)}this.isConnected()?this.encode(i,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(i,e=>this.conn.send(e)))}makeRef(){let i=this.ref+1;return i===this.ref?this.ref=0:this.ref=i,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(i=>i()),this.sendBuffer=[])}onConnMessage(i){this.decode(i.data,e=>{let{topic:t,event:n,payload:r,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${t} ${n} ${o&&"("+o+")"||""}`,r);for(let a=0;a<this.channels.length;a++){let l=this.channels[a];l.isMember(t,n,r,s)&&l.trigger(n,r,o,s)}for(let a=0;a<this.stateChangeCallbacks.message.length;a++){let[,l]=this.stateChangeCallbacks.message[a];l(e)}})}leaveOpenTopic(i){let e=this.channels.find(t=>t.topic===i&&(t.isJoined()||t.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${i}"`),e.leave())}};var Yz="consecutive-reloads",Are=10,Dre=5e3,Mre=1e4,Nre=3e4,Xz=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],Fo="data-phx-component",zk="data-phx-link",Rre="track-static",Pre="data-phx-link-state",ss="data-phx-ref",Su="data-phx-ref-src",Qz="track-uploads",Zc="data-phx-upload-ref",Zk="data-phx-preflighted-refs",Ore="data-phx-done-refs",Ez="drop-target",Gk="data-phx-active-refs",xy="phx:live-file:updated",Yk="data-phx-skip",Tz="data-phx-prune",Iz="page-loading",Lz="phx-connected",mg="phx-loading",Bk="phx-no-feedback",uy="phx-error",Az="phx-client-error",Hk="phx-server-error",Tf="data-phx-parent-id",Jk="data-phx-main",Sg="data-phx-root-id",Zz="viewport-top",Jz="viewport-bottom",Fre="trigger-action",Sy="feedback-for",Xk="phx-has-focused",zre=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],eB=["checkbox","radio"],ky="phx-has-submitted",Jc="data-phx-session",Lf=`[${Jc}]`,Dz="data-phx-sticky",xg="data-phx-static",Uk="data-phx-readonly",hy="data-phx-disabled",Qk="disable-with",fy="data-phx-disable-with-restore",gg="hook",Bre="debounce",Hre="throttle",Ey="update",jk="stream",bg="data-phx-stream",Ure="key",Ea="phxPrivate",Mz="auto-recover",py="phx:live-socket:debug",Wk="phx:live-socket:profiling",Vk="phx:live-socket:latency-sim",jre="progress",Nz="mounted",Wre=1,Vre=200,qre="phx-",Kre=3e4,vg="debounce-trigger",my="throttled",Rz="debounce-prev-key",$re={debounce:300,throttle:300},gy="d",Ta="s",Oo="c",Pz="e",Oz="r",Fz="t",Gre="p",zz="stream",Yre=class{constructor(i,e,t){this.liveSocket=t,this.entry=i,this.offset=0,this.chunkSize=e,this.chunkTimer=null,this.errored=!1,this.uploadChannel=t.channel(`lvu:${i.ref}`,{token:i.metadata()})}error(i){this.errored||(this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(i))}upload(){this.uploadChannel.onError(i=>this.error(i)),this.uploadChannel.join().receive("ok",i=>this.readNextChunk()).receive("error",i=>this.error(i))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let i=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);i.onload=t=>{if(t.target.error===null)this.offset+=t.target.result.byteLength,this.pushChunk(t.target.result);else return Rr("Read error: "+t.target.error)},i.readAsArrayBuffer(e)}pushChunk(i){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",i).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},Rr=(i,e)=>console.error&&console.error(i,e),Al=i=>{let e=typeof i;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(i)};function Xre(){let i=new Set,e=document.querySelectorAll("*[id]");for(let t=0,n=e.length;t<n;t++)i.has(e[t].id)?console.error(`Multiple IDs detected: ${e[t].id}. Ensure unique element ids.`):i.add(e[t].id)}var Qre=(i,e,t,n)=>{i.liveSocket.isDebugEnabled()&&console.log(`${i.id} ${e}: ${t} - `,n)},qk=i=>typeof i=="function"?i:function(){return i},Cy=i=>JSON.parse(JSON.stringify(i)),Cg=(i,e,t)=>{do{if(i.matches(`[${e}]`)&&!i.disabled)return i;i=i.parentElement||i.parentNode}while(i!==null&&i.nodeType===1&&!(t&&t.isSameNode(i)||i.matches(Lf)));return null},_g=i=>i!==null&&typeof i=="object"&&!(i instanceof Array),Zre=(i,e)=>JSON.stringify(i)===JSON.stringify(e),Bz=i=>{for(let e in i)return!1;return!0},Qc=(i,e)=>i&&e(i),Jre=function(i,e,t,n){i.forEach(r=>{new Yre(r,t.config.chunk_size,n).upload()})},tB={canPushState(){return typeof history.pushState!="undefined"},dropLocal(i,e,t){return i.removeItem(this.localKey(e,t))},updateLocal(i,e,t,n,r){let o=this.getLocal(i,e,t),s=this.localKey(e,t),a=o===null?n:r(o);return i.setItem(s,JSON.stringify(a)),a},getLocal(i,e,t){return JSON.parse(i.getItem(this.localKey(e,t)))},updateCurrentState(i){this.canPushState()&&history.replaceState(i(history.state||{}),"",window.location.href)},pushState(i,e,t){if(this.canPushState()){if(t!==window.location.href){if(e.type=="redirect"&&e.scroll){let r=history.state||{};r.scroll=e.scroll,history.replaceState(r,"",window.location.href)}delete e.scroll,history[i+"State"](e,"",t||null);let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)}}else this.redirect(t)},setCookie(i,e){document.cookie=`${i}=${e}`},getCookie(i){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${i}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(i,e){e&&tB.setCookie("__phoenix_flash__",e+"; max-age=60000; path=/"),window.location=i},localKey(i,e){return`${i}-${e}`},getHashTargetEl(i){let e=i.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},Ia=tB,os={byId(i){return document.getElementById(i)||Rr(`no id found for ${i}`)},removeClass(i,e){i.classList.remove(e),i.classList.length===0&&i.removeAttribute("class")},all(i,e,t){if(!i)return[];let n=Array.from(i.querySelectorAll(e));return t?n.forEach(t):n},childNodeLength(i){let e=document.createElement("template");return e.innerHTML=i,e.content.childElementCount},isUploadInput(i){return i.type==="file"&&i.getAttribute(Zc)!==null},isAutoUpload(i){return i.hasAttribute("data-phx-auto-upload")},findUploadInputs(i){return this.all(i,`input[type="file"][${Zc}]`)},findComponentNodeList(i,e){return this.filterWithinSameLiveView(this.all(i,`[${Fo}="${e}"]`),i)},isPhxDestroyed(i){return!!(i.id&&os.private(i,"destroyed"))},wantsNewTab(i){let e=i.ctrlKey||i.shiftKey||i.metaKey||i.button&&i.button===1,t=i.target instanceof HTMLAnchorElement&&i.target.hasAttribute("download"),n=i.target.hasAttribute("target")&&i.target.getAttribute("target").toLowerCase()==="_blank";return e||n||t},isUnloadableFormSubmit(i){return i.target&&i.target.getAttribute("method")==="dialog"||i.submitter&&i.submitter.getAttribute("formmethod")==="dialog"?!1:!i.defaultPrevented&&!this.wantsNewTab(i)},isNewPageClick(i,e){let t=i.target instanceof HTMLAnchorElement?i.target.getAttribute("href"):null,n;if(i.defaultPrevented||t===null||this.wantsNewTab(i)||t.startsWith("mailto:")||t.startsWith("tel:")||i.target.isContentEditable)return!1;try{n=new URL(t)}catch(r){try{n=new URL(t,e)}catch(o){return!0}}return n.host===e.host&&n.protocol===e.protocol&&n.pathname===e.pathname&&n.search===e.search?n.hash===""&&!n.href.endsWith("#"):n.protocol.startsWith("http")},markPhxChildDestroyed(i){this.isPhxChild(i)&&i.setAttribute(Jc,""),this.putPrivate(i,"destroyed",!0)},findPhxChildrenInFragment(i,e){let t=document.createElement("template");return t.innerHTML=i,this.findPhxChildren(t.content,e)},isIgnored(i,e){return(i.getAttribute(e)||i.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(i,e,t){return i.getAttribute&&t.indexOf(i.getAttribute(e))>=0},findPhxSticky(i){return this.all(i,`[${Dz}]`)},findPhxChildren(i,e){return this.all(i,`${Lf}[${Tf}="${e}"]`)},findParentCIDs(i,e){let t=new Set(e),n=e.reduce((r,o)=>{let s=`[${Fo}="${o}"] [${Fo}]`;return this.filterWithinSameLiveView(this.all(i,s),i).map(a=>parseInt(a.getAttribute(Fo))).forEach(a=>r.delete(a)),r},t);return n.size===0?new Set(e):n},filterWithinSameLiveView(i,e){return e.querySelector(Lf)?i.filter(t=>this.withinSameLiveView(t,e)):i},withinSameLiveView(i,e){for(;i=i.parentNode;){if(i.isSameNode(e))return!0;if(i.getAttribute(Jc)!==null)return!1}},private(i,e){return i[Ea]&&i[Ea][e]},deletePrivate(i,e){i[Ea]&&delete i[Ea][e]},putPrivate(i,e,t){i[Ea]||(i[Ea]={}),i[Ea][e]=t},updatePrivate(i,e,t,n){let r=this.private(i,e);r===void 0?this.putPrivate(i,e,n(t)):this.putPrivate(i,e,n(r))},copyPrivates(i,e){e[Ea]&&(i[Ea]=e[Ea])},putTitle(i){let e=document.querySelector("title");if(e){let{prefix:t,suffix:n}=e.dataset;document.title=`${t||""}${i}${n||""}`}else document.title=i},debounce(i,e,t,n,r,o,s,a){let l=i.getAttribute(t),c=i.getAttribute(r);l===""&&(l=n),c===""&&(c=o);let d=l||c;switch(d){case null:return a();case"blur":this.once(i,"debounce-blur")&&i.addEventListener("blur",()=>a());return;default:let u=parseInt(d),h=()=>c?this.deletePrivate(i,my):a(),f=this.incCycle(i,vg,h);if(isNaN(u))return Rr(`invalid throttle/debounce value: ${d}`);if(c){let g=!1;if(e.type==="keydown"){let w=this.private(i,Rz);this.putPrivate(i,Rz,e.key),g=w!==e.key}if(!g&&this.private(i,my))return!1;a(),this.putPrivate(i,my,!0),setTimeout(()=>{s()&&this.triggerCycle(i,vg)},u)}else setTimeout(()=>{s()&&this.triggerCycle(i,vg,f)},u);let m=i.form;m&&this.once(m,"bind-debounce")&&m.addEventListener("submit",()=>{Array.from(new FormData(m).entries(),([g])=>{let w=m.querySelector(`[name="${g}"]`);this.incCycle(w,vg),this.deletePrivate(w,my)})}),this.once(i,"bind-debounce")&&i.addEventListener("blur",()=>this.triggerCycle(i,vg))}},triggerCycle(i,e,t){let[n,r]=this.private(i,e);t||(t=n),t===n&&(this.incCycle(i,e),r())},once(i,e){return this.private(i,e)===!0?!1:(this.putPrivate(i,e,!0),!0)},incCycle(i,e,t=function(){}){let[n]=this.private(i,e)||[0,t];return n++,this.putPrivate(i,e,[n,t]),n},maybeAddPrivateHooks(i,e,t){i.hasAttribute&&(i.hasAttribute(e)||i.hasAttribute(t))&&i.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},maybeHideFeedback(i,e,t){if(!(this.private(e,Xk)||this.private(e,ky))){let n=[e.name];e.name.endsWith("[]")&&n.push(e.name.slice(0,-2));let r=n.map(o=>`[${t}="${o}"]`).join(", ");os.all(i,r,o=>o.classList.add(Bk))}},resetForm(i,e){Array.from(i.elements).forEach(t=>{let n=`[${e}="${t.id}"],
[${e}="${t.name}"],
[${e}="${t.name.replace(/\[\]$/,"")}"]`;this.deletePrivate(t,Xk),this.deletePrivate(t,ky),this.all(document,n,r=>{r.classList.add(Bk)})})},showError(i,e){(i.id||i.name)&&this.all(i.form,`[${e}="${i.id}"], [${e}="${i.name}"]`,t=>{this.removeClass(t,Bk)})},isPhxChild(i){return i.getAttribute&&i.getAttribute(Tf)},isPhxSticky(i){return i.getAttribute&&i.getAttribute(Dz)!==null},firstPhxChild(i){return this.isPhxChild(i)?i:this.all(i,`[${Tf}]`)[0]},dispatchEvent(i,e,t={}){let r={bubbles:t.bubbles===void 0?!0:!!t.bubbles,cancelable:!0,detail:t.detail||{}},o=e==="click"?new MouseEvent("click",r):new CustomEvent(e,r);i.dispatchEvent(o)},cloneNode(i,e){if(typeof e=="undefined")return i.cloneNode(!0);{let t=i.cloneNode(!1);return t.innerHTML=e,t}},mergeAttrs(i,e,t={}){let n=t.exclude||[],r=t.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;n.indexOf(l)<0&&i.setAttribute(l,e.getAttribute(l))}let s=i.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;r?l.startsWith("data-")&&!e.hasAttribute(l)&&i.removeAttribute(l):e.hasAttribute(l)||i.removeAttribute(l)}},mergeFocusedInput(i,e){i instanceof HTMLSelectElement||os.mergeAttrs(i,e,{exclude:["value"]}),e.readOnly?i.setAttribute("readonly",!0):i.removeAttribute("readonly")},hasSelectionRange(i){return i.setSelectionRange&&(i.type==="text"||i.type==="textarea")},restoreFocus(i,e,t){if(!os.isTextualInput(i))return;let n=i.matches(":focus");i.readOnly&&i.blur(),n||i.focus(),this.hasSelectionRange(i)&&i.setSelectionRange(e,t)},isFormInput(i){return/^(?:input|select|textarea)$/i.test(i.tagName)&&i.type!=="button"},syncAttrsToProps(i){i instanceof HTMLInputElement&&eB.indexOf(i.type.toLocaleLowerCase())>=0&&(i.checked=i.getAttribute("checked")!==null)},isTextualInput(i){return zre.indexOf(i.type)>=0},isNowTriggerFormExternal(i,e){return i.getAttribute&&i.getAttribute(e)!==null},syncPendingRef(i,e,t){let n=i.getAttribute(ss);if(n===null)return!0;let r=i.getAttribute(Su);return os.isFormInput(i)||i.getAttribute(t)!==null?(os.isUploadInput(i)&&os.mergeAttrs(i,e,{isIgnored:!0}),os.putPrivate(i,ss,e),!1):(Xz.forEach(o=>{i.classList.contains(o)&&e.classList.add(o)}),e.setAttribute(ss,n),e.setAttribute(Su,r),!0)},cleanChildNodes(i,e){if(os.isPhxUpdate(i,e,["append","prepend"])){let t=[];i.childNodes.forEach(n=>{n.id||(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()===""||Rr(`only HTML element tags with an id are allowed inside containers with phx-update.
removing illegal node: "${(n.outerHTML||n.nodeValue).trim()}"
`),t.push(n))}),t.forEach(n=>n.remove())}},replaceRootContainer(i,e,t){let n=new Set(["id",Jc,xg,Jk,Sg]);if(i.tagName.toLowerCase()===e.toLowerCase())return Array.from(i.attributes).filter(r=>!n.has(r.name.toLowerCase())).forEach(r=>i.removeAttribute(r.name)),Object.keys(t).filter(r=>!n.has(r.toLowerCase())).forEach(r=>i.setAttribute(r,t[r])),i;{let r=document.createElement(e);return Object.keys(t).forEach(o=>r.setAttribute(o,t[o])),n.forEach(o=>r.setAttribute(o,i.getAttribute(o))),r.innerHTML=i.innerHTML,i.replaceWith(r),r}},getSticky(i,e,t){let n=(os.private(i,"sticky")||[]).find(([r])=>e===r);if(n){let[r,o,s]=n;return s}else return typeof t=="function"?t():t},deleteSticky(i,e){this.updatePrivate(i,"sticky",[],t=>t.filter(([n,r])=>n!==e))},putSticky(i,e,t){let n=t(i);this.updatePrivate(i,"sticky",[],r=>{let o=r.findIndex(([s])=>e===s);return o>=0?r[o]=[e,t,n]:r.push([e,t,n]),r})},applyStickyOperations(i){let e=os.private(i,"sticky");e&&e.forEach(([t,n,r])=>this.putSticky(i,t,n))}},pe=os,Kk=class{static isActive(i,e){let t=e._phxRef===void 0,r=i.getAttribute(Gk).split(",").indexOf(mr.genFileRef(e))>=0;return e.size>0&&(t||r)}static isPreflighted(i,e){return i.getAttribute(Zk).split(",").indexOf(mr.genFileRef(e))>=0&&this.isActive(i,e)}constructor(i,e,t){this.ref=mr.genFileRef(e),this.fileEl=i,this.file=e,this.view=t,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(xy,this._onElUpdated)}metadata(){return this.meta}progress(i){this._progress=Math.floor(i),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{mr.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}cancel(){this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(i="failed"){this.fileEl.removeEventListener(xy,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:i}),pe.isAutoUpload(this.fileEl)||mr.clearFiles(this.fileEl)}onDone(i){this._onDone=()=>{this.fileEl.removeEventListener(xy,this._onElUpdated),i()}}onElUpdated(){this.fileEl.getAttribute(Gk).split(",").indexOf(this.ref)===-1&&this.cancel()}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(i){if(this.meta.uploader){let e=i[this.meta.uploader]||Rr(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:Jre}}zipPostFlight(i){this.meta=i.entries[this.ref],this.meta||Rr(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:i})}},eoe=0,mr=class{static genFileRef(i){let e=i._phxRef;return e!==void 0?e:(i._phxRef=(eoe++).toString(),i._phxRef)}static getEntryDataURL(i,e,t){let n=this.activeFiles(i).find(r=>this.genFileRef(r)===e);t(URL.createObjectURL(n))}static hasUploadsInProgress(i){let e=0;return pe.findUploadInputs(i).forEach(t=>{t.getAttribute(Zk)!==t.getAttribute(Ore)&&e++}),e>0}static serializeUploads(i){let e=this.activeFiles(i),t={};return e.forEach(n=>{let r={path:i.name},o=i.getAttribute(Zc);t[o]=t[o]||[],r.ref=this.genFileRef(n),r.last_modified=n.lastModified,r.name=n.name||r.ref,r.relative_path=n.webkitRelativePath,r.type=n.type,r.size=n.size,typeof n.meta=="function"&&(r.meta=n.meta()),t[o].push(r)}),t}static clearFiles(i){i.value=null,i.removeAttribute(Zc),pe.putPrivate(i,"files",[])}static untrackFile(i,e){pe.putPrivate(i,"files",pe.private(i,"files").filter(t=>!Object.is(t,e)))}static trackFiles(i,e,t){if(i.getAttribute("multiple")!==null){let n=e.filter(r=>!this.activeFiles(i).find(o=>Object.is(o,r)));pe.putPrivate(i,"files",this.activeFiles(i).concat(n)),i.value=null}else t&&t.files.length>0&&(i.files=t.files),pe.putPrivate(i,"files",e)}static activeFileInputs(i){let e=pe.findUploadInputs(i);return Array.from(e).filter(t=>t.files&&this.activeFiles(t).length>0)}static activeFiles(i){return(pe.private(i,"files")||[]).filter(e=>Kk.isActive(i,e))}static inputsAwaitingPreflight(i){let e=pe.findUploadInputs(i);return Array.from(e).filter(t=>this.filesAwaitingPreflight(t).length>0)}static filesAwaitingPreflight(i){return this.activeFiles(i).filter(e=>!Kk.isPreflighted(i,e))}constructor(i,e,t){this.view=e,this.onComplete=t,this._entries=Array.from(mr.filesAwaitingPreflight(i)||[]).map(n=>new Kk(i,n,e)),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(i,e,t){this._entries=this._entries.map(r=>(r.zipPostFlight(i),r.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}),r));let n=this._entries.reduce((r,o)=>{if(!o.meta)return r;let{name:s,callback:a}=o.uploader(t.uploaders);return r[s]=r[s]||{callback:a,entries:[]},r[s].entries.push(o),r},{});for(let r in n){let{callback:o,entries:s}=n[r];o(s,e,i,t)}}},toe={focusMain(){let i=document.querySelector("main h1, main, h1");if(i){let e=i.tabIndex;i.tabIndex=-1,i.focus(),i.tabIndex=e}},anyOf(i,e){return e.find(t=>i instanceof t)},isFocusable(i,e){return i instanceof HTMLAnchorElement&&i.rel!=="ignore"||i instanceof HTMLAreaElement&&i.href!==void 0||!i.disabled&&this.anyOf(i,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||i instanceof HTMLIFrameElement||i.tabIndex>0||!e&&i.tabIndex===0&&i.getAttribute("tabindex")!==null&&i.getAttribute("aria-hidden")!=="true"},attemptFocus(i,e){if(this.isFocusable(i,e))try{i.focus()}catch(t){}return!!document.activeElement&&document.activeElement.isSameNode(i)},focusFirstInteractive(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(i){let e=i.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},If=toe,iB={LiveFileUpload:{activeRefs(){return this.el.getAttribute(Gk)},preflightedRefs(){return this.el.getAttribute(Zk)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let i=this.preflightedRefs();this.preflightedWas!==i&&(this.preflightedWas=i,i===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(xy))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Zc)),mr.getEntryDataURL(this.inputEl,this.ref,i=>{this.url=i,this.el.src=i})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>If.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>If.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&If.focusFirst(this.el)}}},Hz=()=>document.documentElement.scrollTop||document.body.scrollTop,eE=()=>window.innerHeight||document.documentElement.clientHeight,ioe=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=eE()},noe=i=>{let e=i.getBoundingClientRect();return e.right>=0&&e.left>=0&&e.bottom<=eE()},Uz=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=eE()};iB.InfiniteScroll={mounted(){let i=Hz(),e=!1,t=500,n=null,r=this.throttle(t,(a,l)=>{n=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{n=null})}),o=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,Uz(l)||l.scrollIntoView({block:"start"})})}),s=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,Uz(l)||l.scrollIntoView({block:"end"})})});this.onScroll=a=>{let l=Hz();if(n)return i=l,n();let c=this.el.getBoundingClientRect(),d=this.el.getAttribute(this.liveSocket.binding("viewport-top")),u=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),h=this.el.lastElementChild,f=this.el.firstElementChild,m=l<i,g=l>i;m&&d&&!e&&c.top>=0?(e=!0,r(d,f)):g&&e&&c.top<=0&&(e=!1),d&&m&&ioe(f)?o(d,f):u&&g&&noe(h)&&s(u,h),i=l},window.addEventListener("scroll",this.onScroll)},destroyed(){window.removeEventListener("scroll",this.onScroll)},throttle(i,e){let t=0,n;return(...r)=>{let o=Date.now(),s=i-(o-t);s<=0||s>i?(n&&(clearTimeout(n),n=null),t=o,e(...r)):n||(n=setTimeout(()=>{t=Date.now(),n=null,e(...r)},s))}}};var roe=iB,ooe=class{constructor(i,e,t){let n=new Set,r=new Set([...e.children].map(s=>s.id)),o=[];Array.from(i.children).forEach(s=>{if(s.id&&(n.add(s.id),r.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=t,this.elementsToModify=o,this.elementIdsToAdd=[...r].filter(s=>!n.has(s))}perform(){let i=pe.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?Qc(document.getElementById(e.previousElementId),t=>{Qc(document.getElementById(e.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==t.id||t.insertAdjacentElement("afterend",n)})}):Qc(document.getElementById(e.elementId),t=>{t.previousElementSibling==null||i.insertAdjacentElement("afterbegin",t)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{Qc(document.getElementById(e),t=>i.insertAdjacentElement("afterbegin",t))})}},jz=11;function soe(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===jz||i.nodeType===jz)){for(var l=t.length-1;l>=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var by,aoe="http://www.w3.org/1999/xhtml",co=typeof document=="undefined"?void 0:document,loe=!!co&&"content"in co.createElement("template"),coe=!!co&&co.createRange&&"createContextualFragment"in co.createRange();function doe(i){var e=co.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function uoe(i){by||(by=co.createRange(),by.selectNode(co.body));var e=by.createContextualFragment(i);return e.childNodes[0]}function hoe(i){var e=co.createElement("body");return e.innerHTML=i,e.childNodes[0]}function foe(i){return i=i.trim(),loe?doe(i):coe?uoe(i):hoe(i)}function vy(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function poe(i,e){return!e||e===aoe?co.createElement(i):co.createElementNS(e,i)}function moe(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function $k(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var Wz={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}$k(i,e,"selected")},INPUT:function(i,e){$k(i,e,"checked"),$k(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},yg=1,Vz=11,qz=3,Kz=8;function Xc(){}function goe(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function boe(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=co.createElement("html"),n.innerHTML=o}else n=foe(n);else n.nodeType===Vz&&(n=n.firstElementChild);var s=r.getNodeKey||goe,a=r.onBeforeNodeAdded||Xc,l=r.onNodeAdded||Xc,c=r.onBeforeElUpdated||Xc,d=r.onElUpdated||Xc,u=r.onBeforeNodeDiscarded||Xc,h=r.onNodeDiscarded||Xc,f=r.onBeforeElChildrenUpdated||Xc,m=r.skipFromChildren||Xc,g=r.addChild||function(be,we){return be.appendChild(we)},w=r.childrenOnly===!0,_=Object.create(null),E=[];function A(be){E.push(be)}function L(be,we){if(be.nodeType===yg)for(var Y=be.firstChild;Y;){var R=void 0;we&&(R=s(Y))?A(R):(h(Y),Y.firstChild&&L(Y,we)),Y=Y.nextSibling}}function O(be,we,Y){u(be)!==!1&&(we&&we.removeChild(be),h(be),L(be,Y))}function U(be){if(be.nodeType===yg||be.nodeType===Vz)for(var we=be.firstChild;we;){var Y=s(we);Y&&(_[Y]=we),U(we),we=we.nextSibling}}U(t);function Q(be){l(be);for(var we=be.firstChild;we;){var Y=we.nextSibling,R=s(we);if(R){var re=_[R];re&&vy(we,re)?(we.parentNode.replaceChild(re,we),te(re,we)):Q(we)}else Q(we);we=Y}}function ae(be,we,Y){for(;we;){var R=we.nextSibling;(Y=s(we))?A(Y):O(we,be,!0),we=R}}function te(be,we,Y){var R=s(we);R&&delete _[R],!(!Y&&(c(be,we)===!1||(i(be,we),d(be),f(be,we)===!1)))&&(be.nodeName!=="TEXTAREA"?Z(be,we):Wz.TEXTAREA(be,we))}function Z(be,we){var Y=m(be,we),R=we.firstChild,re=be.firstChild,me,G,Tt,Ft,li;e:for(;R;){for(Ft=R.nextSibling,me=s(R);!Y&&re;){if(Tt=re.nextSibling,R.isSameNode&&R.isSameNode(re)){R=Ft,re=Tt;continue e}G=s(re);var Li=re.nodeType,Et=void 0;if(Li===R.nodeType&&(Li===yg?(me?me!==G&&((li=_[me])?Tt===li?Et=!1:(be.insertBefore(li,re),G?A(G):O(re,be,!0),re=li):Et=!1):G&&(Et=!1),Et=Et!==!1&&vy(re,R),Et&&te(re,R)):(Li===qz||Li==Kz)&&(Et=!0,re.nodeValue!==R.nodeValue&&(re.nodeValue=R.nodeValue))),Et){R=Ft,re=Tt;continue e}G?A(G):O(re,be,!0),re=Tt}if(me&&(li=_[me])&&vy(li,R))Y||g(be,li),te(li,R);else{var Ii=a(R);Ii!==!1&&(Ii&&(R=Ii),R.actualize&&(R=R.actualize(be.ownerDocument||co)),g(be,R),Q(R))}R=Ft,re=Tt}ae(be,re,G);var pi=Wz[be.nodeName];pi&&pi(be,we)}var ve=t,Pe=ve.nodeType,Ee=n.nodeType;if(!w){if(Pe===yg)Ee===yg?vy(t,n)||(h(t),ve=moe(t,poe(n.nodeName,n.namespaceURI))):ve=n;else if(Pe===qz||Pe===Kz){if(Ee===Pe)return ve.nodeValue!==n.nodeValue&&(ve.nodeValue=n.nodeValue),ve;ve=n}}if(ve===n)h(t);else{if(n.isSameNode&&n.isSameNode(ve))return;if(te(ve,n,w),E)for(var Oe=0,Xe=E.length;Oe<Xe;Oe++){var dt=_[E[Oe]];dt&&O(dt,dt.parentNode,!1)}}return!w&&ve!==t&&t.parentNode&&(ve.actualize&&(ve=ve.actualize(t.ownerDocument||co)),t.parentNode.replaceChild(ve,t)),ve}}var voe=boe(soe),$z=voe,_y=class{static patchEl(i,e,t){$z(i,e,{childrenOnly:!1,onBeforeElUpdated:(n,r)=>{if(t&&t.isSameNode(n)&&pe.isFormInput(n))return pe.mergeFocusedInput(n,r),!1}})}constructor(i,e,t,n,r,o){this.view=i,this.liveSocket=i.liveSocket,this.container=e,this.id=t,this.rootID=i.root.id,this.html=n,this.streams=r,this.streamInserts={},this.targetCID=o,this.cidPatch=Al(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(i,e){this.callbacks[`before${i}`].push(e)}after(i,e){this.callbacks[`after${i}`].push(e)}trackBefore(i,...e){this.callbacks[`before${i}`].forEach(t=>t(...e))}trackAfter(i,...e){this.callbacks[`after${i}`].forEach(t=>t(...e))}markPrunableContentForRemoval(){let i=this.liveSocket.binding(Ey);pe.all(this.container,`[${i}=${jk}]`,e=>e.innerHTML=""),pe.all(this.container,`[${i}=append] > *, [${i}=prepend] > *`,e=>{e.setAttribute(Tz,"")})}perform(){let{view:i,liveSocket:e,container:t,html:n}=this,r=this.isCIDPatch()?this.targetCIDContainer(n):t;if(this.isCIDPatch()&&!r)return;let o=e.getActiveElement(),{selectionStart:s,selectionEnd:a}=o&&pe.hasSelectionRange(o)?o:{},l=e.binding(Ey),c=e.binding(Sy),d=e.binding(Qk),u=e.binding(Zz),h=e.binding(Jz),f=e.binding(Fre),m=[],g=[],w=[],_=[],E=null,A=e.time("premorph container prep",()=>this.buildDiffHTML(t,n,l,r));return this.trackBefore("added",t),this.trackBefore("updated",t,t),e.time("morphdom",()=>{this.streams.forEach(([L,O,U,Q])=>{Object.entries(O).forEach(([ae,[te,Z]])=>{this.streamInserts[ae]={ref:L,streamAt:te,limit:Z}}),Q!==void 0&&pe.all(t,`[${bg}="${L}"]`,ae=>{O[ae.id]||this.removeStreamChildElement(ae)}),U.forEach(ae=>{let te=t.querySelector(`[id="${ae}"]`);te&&this.removeStreamChildElement(te)})}),$z(r,A,{childrenOnly:r.getAttribute(Fo)===null,getNodeKey:L=>pe.isPhxDestroyed(L)?null:L.id,skipFromChildren:L=>L.getAttribute(l)===jk,addChild:(L,O)=>{let{ref:U,streamAt:Q,limit:ae}=this.getStreamInsert(O);if(U===void 0)return L.appendChild(O);if(pe.putSticky(O,bg,ve=>ve.setAttribute(bg,U)),Q===0)L.insertAdjacentElement("afterbegin",O);else if(Q===-1)L.appendChild(O);else if(Q>0){let ve=Array.from(L.children)[Q];L.insertBefore(O,ve)}let te=ae!==null&&Array.from(L.children),Z=[];ae&&ae<0&&te.length>ae*-1?Z=te.slice(0,te.length+ae):ae&&ae>=0&&te.length>ae&&(Z=te.slice(ae)),Z.forEach(ve=>{this.streamInserts[ve.id]||this.removeStreamChildElement(ve)})},onBeforeNodeAdded:L=>(pe.maybeAddPrivateHooks(L,u,h),this.trackBefore("added",L),L),onNodeAdded:L=>{L.getAttribute&&this.maybeReOrderStream(L),L instanceof HTMLImageElement&&L.srcset?L.srcset=L.srcset:L instanceof HTMLVideoElement&&L.autoplay&&L.play(),pe.isNowTriggerFormExternal(L,f)&&(E=L),L.getAttribute&&L.getAttribute("name")&&pe.isFormInput(L)&&g.push(L),(pe.isPhxChild(L)&&i.ownsElement(L)||pe.isPhxSticky(L)&&i.ownsElement(L.parentNode))&&this.trackAfter("phxChildAdded",L),m.push(L)},onNodeDiscarded:L=>this.onNodeDiscarded(L),onBeforeNodeDiscarded:L=>L.getAttribute&&L.getAttribute(Tz)!==null?!0:!(L.parentElement!==null&&L.id&&pe.isPhxUpdate(L.parentElement,l,[jk,"append","prepend"])||this.maybePendingRemove(L)||this.skipCIDSibling(L)),onElUpdated:L=>{pe.isNowTriggerFormExternal(L,f)&&(E=L),w.push(L),this.maybeReOrderStream(L)},onBeforeElUpdated:(L,O)=>{if(pe.maybeAddPrivateHooks(O,u,h),pe.cleanChildNodes(O,l),this.skipCIDSibling(O)||pe.isPhxSticky(L))return!1;if(pe.isIgnored(L,l)||L.form&&L.form.isSameNode(E))return this.trackBefore("updated",L,O),pe.mergeAttrs(L,O,{isIgnored:!0}),w.push(L),pe.applyStickyOperations(L),!1;if(L.type==="number"&&L.validity&&L.validity.badInput)return!1;if(!pe.syncPendingRef(L,O,d))return pe.isUploadInput(L)&&(this.trackBefore("updated",L,O),w.push(L)),pe.applyStickyOperations(L),!1;if(pe.isPhxChild(O)){let Q=L.getAttribute(Jc);return pe.mergeAttrs(L,O,{exclude:[xg]}),Q!==""&&L.setAttribute(Jc,Q),L.setAttribute(Sg,this.rootID),pe.applyStickyOperations(L),!1}return pe.copyPrivates(O,L),o&&L.isSameNode(o)&&pe.isFormInput(L)&&L.type!=="hidden"?(this.trackBefore("updated",L,O),pe.mergeFocusedInput(L,O),pe.syncAttrsToProps(L),w.push(L),pe.applyStickyOperations(L),g.push(L),!1):(pe.isPhxUpdate(O,l,["append","prepend"])&&_.push(new ooe(L,O,O.getAttribute(l))),pe.syncAttrsToProps(O),pe.applyStickyOperations(O),O.getAttribute("name")&&pe.isFormInput(O)&&g.push(O),this.trackBefore("updated",L,O),!0)}})}),e.isDebugEnabled()&&Xre(),_.length>0&&e.time("post-morph append/prepend restoration",()=>{_.forEach(L=>L.perform())}),g.forEach(L=>{pe.maybeHideFeedback(r,L,c)}),e.silenceEvents(()=>pe.restoreFocus(o,s,a)),pe.dispatchEvent(document,"phx:update"),m.forEach(L=>this.trackAfter("added",L)),w.forEach(L=>this.trackAfter("updated",L)),this.transitionPendingRemoves(),E&&(e.unload(),Object.getPrototypeOf(E).submit.call(E)),!0}onNodeDiscarded(i){(pe.isPhxChild(i)||pe.isPhxSticky(i))&&this.liveSocket.destroyViewByEl(i),this.trackAfter("discarded",i)}maybePendingRemove(i){return i.getAttribute&&i.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(i),!0):!1}removeStreamChildElement(i){this.maybePendingRemove(i)||(i.remove(),this.onNodeDiscarded(i))}getStreamInsert(i){return(i.id?this.streamInserts[i.id]:{})||{}}maybeReOrderStream(i){let{ref:e,streamAt:t,limit:n}=this.getStreamInsert(i);if(t!==void 0){if(pe.putSticky(i,bg,r=>r.setAttribute(bg,e)),t===0)i.parentElement.insertBefore(i,i.parentElement.firstElementChild);else if(t>0){let r=Array.from(i.parentElement.children),o=r.indexOf(i);if(t>=r.length-1)i.parentElement.appendChild(i);else{let s=r[t];o>t?i.parentElement.insertBefore(i,s):i.parentElement.insertBefore(i,s.nextElementSibling)}}}}transitionPendingRemoves(){let{pendingRemoves:i,liveSocket:e}=this;i.length>0&&(e.transitionRemoves(i),e.requestDOMUpdate(()=>{i.forEach(t=>{let n=pe.firstPhxChild(t);n&&e.destroyViewByEl(n),t.remove()}),this.trackAfter("transitionsDiscarded",i)}))}isCIDPatch(){return this.cidPatch}skipCIDSibling(i){return i.nodeType===Node.ELEMENT_NODE&&i.getAttribute(Yk)!==null}targetCIDContainer(i){if(!this.isCIDPatch())return;let[e,...t]=pe.findComponentNodeList(this.container,this.targetCID);return t.length===0&&pe.childNodeLength(i)===1?e:e&&e.parentNode}buildDiffHTML(i,e,t,n){let r=this.isCIDPatch(),o=r&&n.getAttribute(Fo)===this.targetCID.toString();if(!r||o)return e;{let s=null,a=document.createElement("template");s=pe.cloneNode(n);let[l,...c]=pe.findComponentNodeList(s,this.targetCID);return a.innerHTML=e,c.forEach(d=>d.remove()),Array.from(s.childNodes).forEach(d=>{d.id&&d.nodeType===Node.ELEMENT_NODE&&d.getAttribute(Fo)!==this.targetCID.toString()&&(d.setAttribute(Yk,""),d.innerHTML="")}),Array.from(a.content.childNodes).forEach(d=>s.insertBefore(d,l)),l.remove(),s.outerHTML}}indexOf(i,e){return Array.from(i.children).indexOf(e)}},Gz=class{static extract(i){let{[Oz]:e,[Pz]:t,[Fz]:n}=i;return delete i[Oz],delete i[Pz],delete i[Fz],{diff:i,title:n,reply:e||null,events:t||[]}}constructor(i,e){this.viewId=i,this.rendered={},this.mergeDiff(e)}parentViewId(){return this.viewId}toString(i){let[e,t]=this.recursiveToString(this.rendered,this.rendered[Oo],i);return[e,t]}recursiveToString(i,e=i[Oo],t){t=t?new Set(t):null;let n={buffer:"",components:e,onlyCids:t,streams:new Set};return this.toOutputBuffer(i,null,n),[n.buffer,n.streams]}componentCIDs(i){return Object.keys(i[Oo]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(i){return i[Oo]?Object.keys(i).length===1:!1}getComponent(i,e){return i[Oo][e]}mergeDiff(i){let e=i[Oo],t={};if(delete i[Oo],this.rendered=this.mutableMerge(this.rendered,i),this.rendered[Oo]=this.rendered[Oo]||{},e){let n=this.rendered[Oo];for(let r in e)e[r]=this.cachedFindComponent(r,e[r],n,e,t);for(let r in e)n[r]=e[r];i[Oo]=e}}cachedFindComponent(i,e,t,n,r){if(r[i])return r[i];{let o,s,a=e[Ta];if(Al(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],t,n,r):l=t[-a],s=l[Ta],o=this.cloneMerge(l,e),o[Ta]=s}else o=e[Ta]!==void 0?e:this.cloneMerge(t[i]||{},e);return r[i]=o,o}}mutableMerge(i,e){return e[Ta]!==void 0?e:(this.doMutableMerge(i,e),i)}doMutableMerge(i,e){for(let t in e){let n=e[t],r=i[t];_g(n)&&n[Ta]===void 0&&_g(r)?this.doMutableMerge(r,n):i[t]=n}}cloneMerge(i,e){let t=ue(ue({},i),e);for(let n in t){let r=e[n],o=i[n];_g(r)&&r[Ta]===void 0&&_g(o)&&(t[n]=this.cloneMerge(o,r))}return t}componentToString(i){let[e,t]=this.recursiveCIDToString(this.rendered[Oo],i,null,!1);return[e,t]}pruneCIDs(i){i.forEach(e=>delete this.rendered[Oo][e])}get(){return this.rendered}isNewFingerprint(i={}){return!!i[Ta]}templateStatic(i,e){return typeof i=="number"?e[i]:i}toOutputBuffer(i,e,t){if(i[gy])return this.comprehensionToBuffer(i,e,t);let{[Ta]:n}=i;n=this.templateStatic(n,e),t.buffer+=n[0];for(let r=1;r<n.length;r++)this.dynamicToBuffer(i[r-1],e,t),t.buffer+=n[r]}comprehensionToBuffer(i,e,t){let{[gy]:n,[Ta]:r,[zz]:o}=i,[s,a,l,c]=o||[null,{},[],null];r=this.templateStatic(r,e);let d=e||i[Gre];for(let u=0;u<n.length;u++){let h=n[u];t.buffer+=r[0];for(let f=1;f<r.length;f++)this.dynamicToBuffer(h[f-1],d,t),t.buffer+=r[f]}o!==void 0&&(i[gy].length>0||l.length>0||c)&&(delete i[zz],i[gy]=[],t.streams.add(o))}dynamicToBuffer(i,e,t){if(typeof i=="number"){let[n,r]=this.recursiveCIDToString(t.components,i,t.onlyCids);t.buffer+=n,t.streams=new Set([...t.streams,...r])}else _g(i)?this.toOutputBuffer(i,e,t):t.buffer+=i}recursiveCIDToString(i,e,t,n=!0){let r=i[e]||Rr(`no component for CID ${e}`,i),o=document.createElement("template"),[s,a]=this.recursiveToString(r,i,t);o.innerHTML=s;let l=o.content,c=t&&!t.has(e),[d,u]=Array.from(l.childNodes).reduce(([h,f],m,g)=>m.nodeType===Node.ELEMENT_NODE?m.getAttribute(Fo)?[h,!0]:(m.setAttribute(Fo,e),m.id||(m.id=`${this.parentViewId()}-${e}-${g}`),c&&(m.setAttribute(Yk,""),m.innerHTML=""),[!0,f]):m.nodeType===Node.COMMENT_NODE?(n||m.remove(),[h,f]):m.nodeValue.trim()!==""?(Rr(`only HTML element tags are allowed at the root of components.
got: "${m.nodeValue.trim()}"
within:
`,o.innerHTML.trim()),m.replaceWith(this.createSpan(m.nodeValue,e)),[!0,f]):(m.remove(),[h,f]),[!1,!1]);return!d&&!u?(Rr(`expected at least one HTML element tag inside a component, but the component is empty:
`,o.innerHTML.trim()),[this.createSpan("",e).outerHTML,a]):!d&&u?(Rr("expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.",o.innerHTML.trim()),[o.innerHTML,a]):[o.innerHTML,a]}createSpan(i,e){let t=document.createElement("span");return t.innerText=i,t.setAttribute(Fo,e),t}},_oe=1,wg=class{static makeID(){return _oe++}static elementID(i){return i.phxHookId}constructor(i,e,t){this.__view=i,this.liveSocket=i.liveSocket,this.__callbacks=t,this.__listeners=new Set,this.__isDisconnected=!1,this.el=e,this.el.phxHookId=this.constructor.makeID();for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(i,e={},t=function(){}){return this.__view.pushHookEvent(this.el,null,i,e,t)}pushEventTo(i,e,t={},n=function(){}){return this.__view.withinTargets(i,(r,o)=>r.pushHookEvent(this.el,o,e,t,n))}handleEvent(i,e){let t=(n,r)=>r?i:e(n.detail);return window.addEventListener(`phx:${i}`,t),this.__listeners.add(t),t}removeHandleEvent(i){let e=i(null,!0);window.removeEventListener(`phx:${e}`,i),this.__listeners.delete(i)}upload(i,e){return this.__view.dispatchUploads(null,i,e)}uploadTo(i,e,t){return this.__view.withinTargets(i,(n,r)=>{n.dispatchUploads(r,e,t)})}__cleanup__(){this.__listeners.forEach(i=>this.removeHandleEvent(i))}},yy=null,yoe={exec(i,e,t,n,r){let[o,s]=r||[null,{callback:r&&r.callback}];(e.charAt(0)==="["?JSON.parse(e):[[o,s]]).forEach(([l,c])=>{l===o&&s.data&&(c.data=Object.assign(c.data||{},s.data),c.callback=c.callback||s.callback),this.filterToEls(n,c).forEach(d=>{this[`exec_${l}`](i,e,t,n,d,c)})})},isVisible(i){return!!(i.offsetWidth||i.offsetHeight||i.getClientRects().length>0)},exec_exec(i,e,t,n,r,[o,s]){(s?pe.all(document,s):[n]).forEach(l=>{let c=l.getAttribute(o);if(!c)throw new Error(`expected ${o} to contain JS command on "${s}"`);t.liveSocket.execJS(l,c,i)})},exec_dispatch(i,e,t,n,r,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=n,pe.dispatchEvent(r,s,{detail:a,bubbles:l})},exec_push(i,e,t,n,r,o){if(!t.isConnected())return;let{event:s,data:a,target:l,page_loading:c,loading:d,value:u,dispatcher:h,callback:f}=o,m={loading:d,value:u,target:l,page_loading:!!c},g=i==="change"&&h?h:n,w=l||g.getAttribute(t.binding("target"))||g;t.withinTargets(w,(_,E)=>{if(i==="change"){let{newCid:A,_target:L}=o;L=L||(pe.isFormInput(n)?n.name:void 0),L&&(m._target=L),_.pushInput(n,E,A,s||e,m,f)}else if(i==="submit"){let{submitter:A}=o;_.submitForm(n,E,s||e,A,m,f)}else _.pushEvent(i,n,E,s||e,a,m,f)})},exec_navigate(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.pushHistoryPatch(o,s?"replace":"push",n)},exec_focus(i,e,t,n,r){window.requestAnimationFrame(()=>If.attemptFocus(r))},exec_focus_first(i,e,t,n,r){window.requestAnimationFrame(()=>If.focusFirstInteractive(r)||If.focusFirst(r))},exec_push_focus(i,e,t,n,r){window.requestAnimationFrame(()=>yy=r||n)},exec_pop_focus(i,e,t,n,r){window.requestAnimationFrame(()=>{yy&&yy.focus(),yy=null})},exec_add_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,o,[],s,a,t)},exec_remove_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,[],o,s,a,t)},exec_transition(i,e,t,n,r,{time:o,transition:s}){this.addOrRemoveClasses(r,[],[],s,o,t)},exec_toggle(i,e,t,n,r,{display:o,ins:s,outs:a,time:l}){this.toggle(i,t,r,o,s,a,l)},exec_show(i,e,t,n,r,{display:o,transition:s,time:a}){this.show(i,t,r,o,s,a)},exec_hide(i,e,t,n,r,{display:o,transition:s,time:a}){this.hide(i,t,r,o,s,a)},exec_set_attr(i,e,t,n,r,{attr:[o,s]}){this.setOrRemoveAttrs(r,[[o,s]],[])},exec_remove_attr(i,e,t,n,r,{attr:o}){this.setOrRemoveAttrs(r,[],[o])},show(i,e,t,n,r,o){this.isVisible(t)||this.toggle(i,e,t,n,r,null,o)},hide(i,e,t,n,r,o){this.isVisible(t)&&this.toggle(i,e,t,n,null,r,o)},toggle(i,e,t,n,r,o,s){let[a,l,c]=r||[[],[],[]],[d,u,h]=o||[[],[],[]];if(a.length>0||d.length>0)if(this.isVisible(t)){let f=()=>{this.addOrRemoveClasses(t,u,a.concat(l).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,d,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,h,u))})};t.dispatchEvent(new Event("phx:hide-start")),e.transition(s,f,()=>{this.addOrRemoveClasses(t,[],d.concat(h)),pe.putSticky(t,"toggle",m=>m.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))})}else{if(i==="remove")return;let f=()=>{this.addOrRemoveClasses(t,l,d.concat(u).concat(h));let m=n||this.defaultDisplay(t);pe.putSticky(t,"toggle",g=>g.style.display=m),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,l))})};t.dispatchEvent(new Event("phx:show-start")),e.transition(s,f,()=>{this.addOrRemoveClasses(t,[],a.concat(c)),t.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(t)?window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:hide-start")),pe.putSticky(t,"toggle",f=>f.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:show-start"));let f=n||this.defaultDisplay(t);pe.putSticky(t,"toggle",m=>m.style.display=f),t.dispatchEvent(new Event("phx:show-end"))})},addOrRemoveClasses(i,e,t,n,r,o){let[s,a,l]=n||[[],[],[]];if(s.length>0){let c=()=>{this.addOrRemoveClasses(i,a,[].concat(s).concat(l)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,s,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,l,a))})},d=()=>this.addOrRemoveClasses(i,e.concat(l),t.concat(s).concat(a));return o.transition(r,c,d)}window.requestAnimationFrame(()=>{let[c,d]=pe.getSticky(i,"classes",[[],[]]),u=e.filter(g=>c.indexOf(g)<0&&!i.classList.contains(g)),h=t.filter(g=>d.indexOf(g)<0&&i.classList.contains(g)),f=c.filter(g=>t.indexOf(g)<0).concat(u),m=d.filter(g=>e.indexOf(g)<0).concat(h);pe.putSticky(i,"classes",g=>(g.classList.remove(...m),g.classList.add(...f),[f,m]))})},setOrRemoveAttrs(i,e,t){let[n,r]=pe.getSticky(i,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(t),s=n.filter(([l,c])=>!o.includes(l)).concat(e),a=r.filter(l=>!o.includes(l)).concat(t);pe.putSticky(i,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,d])=>l.setAttribute(c,d)),[s,a]))},hasAllClasses(i,e){return e.every(t=>i.classList.contains(t))},isToggledOut(i,e){return!this.isVisible(i)||this.hasAllClasses(i,e)},filterToEls(i,{to:e}){return e?pe.all(document,e):[i]},defaultDisplay(i){return{tr:"table-row",td:"table-cell"}[i.tagName.toLowerCase()]||"block"}},Ps=yoe,wy=(i,e,t=[])=>{let l=e,{submitter:n}=l,r=lo(l,["submitter"]),o=new FormData(i);n&&n.hasAttribute("name")&&n.form&&n.form===i&&o.append(n.name,n.value);let s=[];o.forEach((c,d,u)=>{c instanceof File&&s.push(d)}),s.forEach(c=>o.delete(c));let a=new URLSearchParams;for(let[c,d]of o.entries())(t.length===0||t.indexOf(c)>=0)&&a.append(c,d);for(let c in r)a.append(c,r[c]);return a.toString()},nB=class{constructor(i,e,t,n,r){this.isDead=!1,this.liveSocket=e,this.flash=n,this.parent=t,this.root=t?t.root:this,this.el=i,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(o){o&&o()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let o=this.href&&this.expandURL(this.href);return{redirect:this.redirect?o:void 0,url:this.redirect?void 0:o||void 0,params:this.connectParams(r),session:this.getSession(),static:this.getStatic(),flash:this.flash}})}setHref(i){this.href=i}setRedirect(i){this.redirect=!0,this.href=i}isMain(){return this.el.hasAttribute(Jk)}connectParams(i){let e=this.liveSocket.params(this.el),t=pe.all(document,`[${this.binding(Rre)}]`).map(n=>n.src||n.href).filter(n=>typeof n=="string");return t.length>0&&(e._track_static=t),e._mounts=this.joinCount,e._live_referer=i,e}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(Jc)}getStatic(){let i=this.el.getAttribute(xg);return i===""?null:i}destroy(i=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let e=()=>{i();for(let t in this.viewHooks)this.destroyHook(this.viewHooks[t])};pe.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",e).receive("error",e).receive("timeout",e)}setContainerClasses(...i){this.el.classList.remove(Lz,mg,uy,Az,Hk),this.el.classList.add(...i)}showLoader(i){if(clearTimeout(this.loaderTimer),i)this.loaderTimer=setTimeout(()=>this.showLoader(),i);else{for(let e in this.viewHooks)this.viewHooks[e].__disconnected();this.setContainerClasses(mg)}}execAll(i){pe.all(this.el,`[${i}]`,e=>this.liveSocket.execJS(e,e.getAttribute(i)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(Lz),this.execAll(this.binding("connected"))}triggerReconnected(){for(let i in this.viewHooks)this.viewHooks[i].__reconnected()}log(i,e){this.liveSocket.log(this,i,e)}transition(i,e,t=function(){}){this.liveSocket.transition(i,e,t)}withinTargets(i,e){if(i instanceof HTMLElement||i instanceof SVGElement)return this.liveSocket.owner(i,t=>e(t,i));if(Al(i))pe.findComponentNodeList(this.el,i).length===0?Rr(`no component found matching phx-target of ${i}`):e(this,parseInt(i));else{let t=Array.from(document.querySelectorAll(i));t.length===0&&Rr(`nothing found matching the phx-target selector "${i}"`),t.forEach(n=>this.liveSocket.owner(n,r=>e(r,n)))}}applyDiff(i,e,t){this.log(i,()=>["",Cy(e)]);let{diff:n,reply:r,events:o,title:s}=Gz.extract(e);t({diff:n,reply:r,events:o}),s&&window.requestAnimationFrame(()=>pe.putTitle(s))}onJoin(i){let{rendered:e,container:t}=i;if(t){let[n,r]=t;this.el=pe.replaceRootContainer(this.el,n,r)}this.childJoins=0,this.joinPending=!0,this.flash=null,Ia.dropLocal(this.liveSocket.localStorage,window.location.pathname,Yz),this.applyDiff("mount",e,({diff:n,events:r})=>{this.rendered=new Gz(this.id,n);let[o,s]=this.renderContainer(null,"join");this.dropPendingRefs();let a=this.formsForRecovery(o);this.joinCount++,a.length>0?a.forEach(([l,c,d],u)=>{this.pushFormRecovery(l,d,h=>{u===a.length-1&&this.onJoinComplete(h,o,s,r)})}):this.onJoinComplete(i,o,s,r)})}dropPendingRefs(){pe.all(document,`[${Su}="${this.id}"][${ss}]`,i=>{i.removeAttribute(ss),i.removeAttribute(Su)})}onJoinComplete({live_patch:i},e,t,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(i,e,t,n);pe.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(xg);return a&&o.setAttribute(xg,a),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(i,e,t,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)])}attachTrueDocEl(){this.el=pe.byId(this.id),this.el.setAttribute(Sg,this.root.id)}execNewMounted(){let i=this.binding(Zz),e=this.binding(Jz);pe.all(this.el,`[${i}], [${e}]`,t=>{pe.maybeAddPrivateHooks(t,i,e),this.maybeAddNewHook(t)}),pe.all(this.el,`[${this.binding(gg)}], [data-phx-${gg}]`,t=>{this.maybeAddNewHook(t)}),pe.all(this.el,`[${this.binding(Nz)}]`,t=>this.maybeMounted(t))}applyJoinPatch(i,e,t,n){this.attachTrueDocEl();let r=new _y(this,this.el,this.id,e,t,null);if(r.markPrunableContentForRemoval(),this.performPatch(r,!1),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),i){let{kind:o,to:s}=i;this.liveSocket.historyPatch(s,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(i,e){this.liveSocket.triggerDOM("onBeforeElUpdated",[i,e]);let t=this.getHook(i),n=t&&pe.isIgnored(i,this.binding(Ey));if(t&&!i.isEqualNode(e)&&!(n&&Zre(i.dataset,e.dataset)))return t.__beforeUpdate(),t}maybeMounted(i){let e=i.getAttribute(this.binding(Nz)),t=e&&pe.private(i,"mounted");e&&!t&&(this.liveSocket.execJS(i,e),pe.putPrivate(i,"mounted",!0))}maybeAddNewHook(i,e){let t=this.addHook(i);t&&t.__mounted()}performPatch(i,e){let t=[],n=!1,r=new Set;return i.after("added",o=>{this.liveSocket.triggerDOM("onNodeAdded",[o]),this.maybeAddNewHook(o),o.getAttribute&&this.maybeMounted(o)}),i.after("phxChildAdded",o=>{pe.isPhxSticky(o)?this.liveSocket.joinRootViews():n=!0}),i.before("updated",(o,s)=>{this.triggerBeforeUpdateHook(o,s)&&r.add(o.id)}),i.after("updated",o=>{r.has(o.id)&&this.getHook(o).__updated()}),i.after("discarded",o=>{o.nodeType===Node.ELEMENT_NODE&&t.push(o)}),i.after("transitionsDiscarded",o=>this.afterElementsRemoved(o,e)),i.perform(),this.afterElementsRemoved(t,e),n}afterElementsRemoved(i,e){let t=[];i.forEach(n=>{let r=pe.all(n,`[${Fo}]`),o=pe.all(n,`[${this.binding(gg)}]`);r.concat(n).forEach(s=>{let a=this.componentID(s);Al(a)&&t.indexOf(a)===-1&&t.push(a)}),o.concat(n).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(t)}joinNewChildren(){pe.findPhxChildren(this.el,this.id).forEach(i=>this.joinChild(i))}getChildById(i){return this.root.children[this.id][i]}getDescendentByEl(i){return i.id===this.id?this:this.children[i.getAttribute(Tf)][i.id]}destroyDescendent(i){for(let e in this.root.children)for(let t in this.root.children[e])if(t===i)return this.root.children[e][t].destroy()}joinChild(i){if(!this.getChildById(i.id)){let t=new nB(i,this.liveSocket,this);return this.root.children[this.id][t.id]=t,t.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(i){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.joinCallback(()=>{this.pendingJoinOps.forEach(([i,e])=>{i.isDestroyed()||e()}),this.pendingJoinOps=[]})}update(i,e){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:i,events:e});this.rendered.mergeDiff(i);let t=!1;this.rendered.isComponentOnlyDiff(i)?this.liveSocket.time("component patch complete",()=>{pe.findParentCIDs(this.el,this.rendered.componentCIDs(i)).forEach(r=>{this.componentPatch(this.rendered.getComponent(i,r),r)&&(t=!0)})}):Bz(i)||this.liveSocket.time("full patch complete",()=>{let[n,r]=this.renderContainer(i,"update"),o=new _y(this,this.el,this.id,n,r,null);t=this.performPatch(o,!0)}),this.liveSocket.dispatchEvents(e),t&&this.joinNewChildren()}renderContainer(i,e){return this.liveSocket.time(`toString diff (${e})`,()=>{let t=this.el.tagName,n=i?this.rendered.componentCIDs(i).concat(this.pruningCIDs):null,[r,o]=this.rendered.toString(n);return[`<${t}>${r}</${t}>`,o]})}componentPatch(i,e){if(Bz(i))return!1;let[t,n]=this.rendered.componentToString(e),r=new _y(this,this.el,this.id,t,n,e);return this.performPatch(r,!0)}getHook(i){return this.viewHooks[wg.elementID(i)]}addHook(i){if(wg.elementID(i)||!i.getAttribute)return;let e=i.getAttribute(`data-phx-${gg}`)||i.getAttribute(this.binding(gg));if(e&&!this.ownsElement(i))return;let t=this.liveSocket.getHookCallbacks(e);if(t){i.id||Rr(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,i);let n=new wg(this,i,t);return this.viewHooks[wg.elementID(n.el)]=n,n}else e!==null&&Rr(`unknown hook found for "${e}"`,i)}destroyHook(i){i.__destroyed(),i.__cleanup__(),delete this.viewHooks[wg.elementID(i.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:i,events:e})=>this.update(i,e)),this.pendingDiffs=[],this.eachChild(i=>i.applyPendingUpdates())}eachChild(i){let e=this.root.children[this.id]||{};for(let t in e)i(this.getChildById(t))}onChannel(i,e){this.liveSocket.onChannel(this.channel,i,t=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>e(t)]):this.liveSocket.requestDOMUpdate(()=>e(t))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",i=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",i,({diff:e,events:t})=>this.update(e,t))})}),this.onChannel("redirect",({to:i,flash:e})=>this.onRedirect({to:i,flash:e})),this.onChannel("live_patch",i=>this.onLivePatch(i)),this.onChannel("live_redirect",i=>this.onLiveRedirect(i)),this.channel.onError(i=>this.onError(i)),this.channel.onClose(i=>this.onClose(i))}destroyAllChildren(){this.eachChild(i=>i.destroy())}onLiveRedirect(i){let{to:e,kind:t,flash:n}=i,r=this.expandURL(e);this.liveSocket.historyRedirect(r,t,n)}onLivePatch(i){let{to:e,kind:t}=i;this.href=this.expandURL(e),this.liveSocket.historyPatch(e,t)}expandURL(i){return i.startsWith("/")?`${window.location.protocol}//${window.location.host}${i}`:i}onRedirect({to:i,flash:e}){this.liveSocket.redirect(i,e)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(i){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=e=>{e=e||function(){},i?i(this.joinCount,e):e()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",e=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(e))}).receive("error",e=>!this.isDestroyed()&&this.onJoinError(e)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(i){if(i.reason==="reload"){this.log("error",()=>[`failed mount with ${i.status}. Falling back to page request`,i]),this.isMain()&&this.onRedirect({to:this.href});return}else if(i.reason==="unauthorized"||i.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",i]),this.isMain()&&this.onRedirect({to:this.href});return}if((i.redirect||i.live_redirect)&&(this.joinPending=!1,this.channel.leave()),i.redirect)return this.onRedirect(i.redirect);if(i.live_redirect)return this.onLiveRedirect(i.live_redirect);this.displayError([mg,uy,Hk]),this.log("error",()=>["unable to join",i]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(i){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&i!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(Vre)}}onError(i){this.onClose(i),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",i]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([mg,uy,Hk]):this.displayError([mg,uy,Az]))}displayError(i){this.isMain()&&pe.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...i),this.execAll(this.binding("disconnected"))}pushWithReply(i,e,t,n=function(){}){if(!this.isConnected())return;let[r,[o],s]=i?i():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(Iz))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof t.cid!="number"&&delete t.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(e,t,Kre).receive("ok",l=>{let c=d=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),a(),n(l,d)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:d,reply:u,events:h})=>{r!==null&&this.undoRefs(r),this.update(d,h),c(u)})}):(r!==null&&this.undoRefs(r),c(null))}))}undoRefs(i){this.isConnected()&&pe.all(document,`[${Su}="${this.id}"][${ss}="${i}"]`,e=>{let t=e.getAttribute(hy);e.removeAttribute(ss),e.removeAttribute(Su),e.getAttribute(Uk)!==null&&(e.readOnly=!1,e.removeAttribute(Uk)),t!==null&&(e.disabled=t==="true",e.removeAttribute(hy)),Xz.forEach(o=>pe.removeClass(e,o));let n=e.getAttribute(fy);n!==null&&(e.innerText=n,e.removeAttribute(fy));let r=pe.private(e,ss);if(r){let o=this.triggerBeforeUpdateHook(e,r);_y.patchEl(e,r,this.liveSocket.getActiveElement()),o&&o.__updated(),pe.deletePrivate(e,ss)}})}putRef(i,e,t={}){let n=this.ref++,r=this.binding(Qk);return t.loading&&(i=i.concat(pe.all(document,t.loading))),i.forEach(o=>{o.classList.add(`phx-${e}-loading`),o.setAttribute(ss,n),o.setAttribute(Su,this.el.id);let s=o.getAttribute(r);s!==null&&(o.getAttribute(fy)||o.setAttribute(fy,o.innerText),s!==""&&(o.innerText=s),o.setAttribute("disabled",""))}),[n,i,t]}componentID(i){let e=i.getAttribute&&i.getAttribute(Fo);return e?parseInt(e):null}targetComponentID(i,e,t={}){if(Al(e))return e;let n=i.getAttribute(this.binding("target"));return Al(n)?parseInt(n):e&&(n!==null||t.target)?this.closestComponentID(e):null}closestComponentID(i){return Al(i)?i:i?Qc(i.closest(`[${Fo}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(i,e,t,n,r){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",t,n]),!1;let[o,s,a]=this.putRef([i],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:t,value:n,cid:this.closestComponentID(e)},(l,c)=>r(c,o)),o}extractMeta(i,e,t){let n=this.binding("value-");for(let r=0;r<i.attributes.length;r++){e||(e={});let o=i.attributes[r].name;o.startsWith(n)&&(e[o.replace(n,"")]=i.getAttribute(o))}if(i.value!==void 0&&!(i instanceof HTMLFormElement)&&(e||(e={}),e.value=i.value,i.tagName==="INPUT"&&eB.indexOf(i.type)>=0&&!i.checked&&delete e.value),t){e||(e={});for(let r in t)e[r]=t[r]}return e}pushEvent(i,e,t,n,r,o={},s){this.pushWithReply(()=>this.putRef([e],i,o),"event",{type:i,event:n,value:this.extractMeta(e,r,o.value),cid:this.targetComponentID(e,t,o)},(a,l)=>s&&s(l))}pushFileProgress(i,e,t,n=function(){}){this.liveSocket.withinOwners(i.form,(r,o)=>{r.pushWithReply(null,"progress",{event:i.getAttribute(r.binding(jre)),ref:i.getAttribute(Zc),entry_ref:e,progress:t,cid:r.targetComponentID(i.form,o)},n)})}pushInput(i,e,t,n,r,o){let s,a=Al(t)?t:this.targetComponentID(i.form,e),l=()=>this.putRef([i,i.form],"change",r),c,d=this.extractMeta(i.form);i.getAttribute(this.binding("change"))?c=wy(i.form,ue({_target:r._target},d),[i.name]):c=wy(i.form,ue({_target:r._target},d)),pe.isUploadInput(i)&&i.files&&i.files.length>0&&mr.trackFiles(i,Array.from(i.files)),s=mr.serializeUploads(i);let u={type:"form",event:n,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",u,h=>{if(pe.showError(i,this.liveSocket.binding(Sy)),pe.isUploadInput(i)&&pe.isAutoUpload(i)){if(mr.filesAwaitingPreflight(i).length>0){let[f,m]=l();this.uploadFiles(i.form,e,f,a,g=>{o&&o(h),this.triggerAwaitingSubmit(i.form)})}}else o&&o(h)})}triggerAwaitingSubmit(i){let e=this.getScheduledSubmit(i);if(e){let[t,n,r,o]=e;this.cancelSubmit(i),o()}}getScheduledSubmit(i){return this.formSubmits.find(([e,t,n,r])=>e.isSameNode(i))}scheduleSubmit(i,e,t,n){if(this.getScheduledSubmit(i))return!0;this.formSubmits.push([i,e,t,n])}cancelSubmit(i){this.formSubmits=this.formSubmits.filter(([e,t,n])=>e.isSameNode(i)?(this.undoRefs(t),!1):!0)}disableForm(i,e={}){let t=d=>!(Cg(d,`${this.binding(Ey)}=ignore`,d.form)||Cg(d,"data-phx-update=ignore",d.form)),n=d=>d.hasAttribute(this.binding(Qk)),r=d=>d.tagName=="BUTTON",o=d=>["INPUT","TEXTAREA","SELECT"].includes(d.tagName),s=Array.from(i.elements),a=s.filter(n),l=s.filter(r).filter(t),c=s.filter(o).filter(t);return l.forEach(d=>{d.setAttribute(hy,d.disabled),d.disabled=!0}),c.forEach(d=>{d.setAttribute(Uk,d.readOnly),d.readOnly=!0,d.files&&(d.setAttribute(hy,d.disabled),d.disabled=!0)}),i.setAttribute(this.binding(Iz),""),this.putRef([i].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(i,e,t,n,r,o){let s=()=>this.disableForm(i,r),a=this.targetComponentID(i,e);if(mr.hasUploadsInProgress(i)){let[l,c]=s(),d=()=>this.pushFormSubmit(i,n,e,t,r,o);return this.scheduleSubmit(i,l,r,d)}else if(mr.inputsAwaitingPreflight(i).length>0){let[l,c]=s(),d=()=>[l,c,r];this.uploadFiles(i,e,l,a,u=>{let h=this.extractMeta(i),f=wy(i,ue({submitter:n},h));this.pushWithReply(d,"event",{type:"form",event:t,value:f,cid:a},o)})}else if(!(i.hasAttribute(ss)&&i.classList.contains("phx-submit-loading"))){let l=this.extractMeta(i),c=wy(i,ue({submitter:n},l));this.pushWithReply(s,"event",{type:"form",event:t,value:c,cid:a},o)}}uploadFiles(i,e,t,n,r){let o=this.joinCount,s=mr.activeFileInputs(i),a=s.length;s.forEach(l=>{let c=new mr(l,this,()=>{a--,a===0&&r()});this.uploaders[l]=c;let d=c.entries().map(h=>h.toPreflightPayload()),u={ref:l.getAttribute(Zc),entries:d,cid:this.targetComponentID(l.form,e)};this.log("upload",()=>["sending preflight request",u]),this.pushWithReply(null,"allow_upload",u,h=>{if(this.log("upload",()=>["got preflight response",h]),h.error){this.undoRefs(t);let[f,m]=h.error;this.log("upload",()=>[`error for entry ${f}`,m])}else{let f=m=>{this.channel.onError(()=>{this.joinCount===o&&m()})};c.initAdapterUpload(h,f,this.liveSocket)}})})}dispatchUploads(i,e,t){let n=this.targetCtxElement(i)||this.el,r=pe.findUploadInputs(n).filter(o=>o.name===e);r.length===0?Rr(`no live file inputs found matching the name "${e}"`):r.length>1?Rr(`duplicate live file inputs found matching the name "${e}"`):pe.dispatchEvent(r[0],Qz,{detail:{files:t}})}targetCtxElement(i){if(Al(i)){let[e]=pe.findComponentNodeList(this.el,i);return e}else return i||null}pushFormRecovery(i,e,t){this.liveSocket.withinOwners(i,(n,r)=>{let o=this.binding("change"),s=Array.from(i.elements).filter(c=>pe.isFormInput(c)&&c.name&&!c.hasAttribute(o));if(s.length===0)return;s.forEach(c=>c.hasAttribute(Zc)&&mr.clearFiles(c));let a=s.find(c=>c.type!=="hidden")||s[0],l=i.getAttribute(this.binding(Mz))||i.getAttribute(this.binding("change"));Ps.exec("change",l,n,a,["push",{_target:a.name,newCid:e,callback:t}])})}pushLinkPatch(i,e,t){let n=this.liveSocket.setPendingLink(i),r=e?()=>this.putRef([e],"click"):null,o=()=>this.liveSocket.redirect(window.location.href),s=i.startsWith("/")?`${location.protocol}//${location.host}${i}`:i,a=this.pushWithReply(r,"live_patch",{url:s},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(i,null,t,n):(this.liveSocket.commitPendingLink(n)&&(this.href=i),this.applyPendingUpdates(),t&&t(n))})});a?a.receive("timeout",o):o()}formsForRecovery(i){if(this.joinCount===0)return[];let e=this.binding("change"),t=document.createElement("template");return t.innerHTML=i,pe.all(this.el,`form[${e}]`).filter(n=>n.id&&this.ownsElement(n)).filter(n=>n.elements.length>0).filter(n=>n.getAttribute(this.binding(Mz))!=="ignore").map(n=>{let r=n.getAttribute(e).replaceAll(/([\[\]"])/g,"\\$1"),o=t.content.querySelector(`form[id="${n.id}"][${e}="${r}"]`);return o?[n,o,this.targetComponentID(o)]:[n,n,this.targetComponentID(n)]}).filter(([n,r,o])=>r)}maybePushComponentsDestroyed(i){let e=i.filter(t=>pe.findComponentNodeList(this.el,t).length===0);e.length>0&&(this.pruningCIDs.push(...e),this.pushWithReply(null,"cids_will_destroy",{cids:e},()=>{this.pruningCIDs=this.pruningCIDs.filter(n=>e.indexOf(n)!==-1);let t=e.filter(n=>pe.findComponentNodeList(this.el,n).length===0);t.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:t},n=>{this.rendered.pruneCIDs(n.cids)})}))}ownsElement(i){let e=i.closest(Lf);return i.getAttribute(Tf)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(i,e,t,n,r={}){pe.putPrivate(i,ky,!0);let o=this.liveSocket.binding(Sy),s=Array.from(i.elements);s.forEach(a=>pe.putPrivate(a,ky,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(i,e,t,n,r,()=>{s.forEach(a=>pe.showError(a,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(i){return this.liveSocket.binding(i)}},rB=class{constructor(i,e,t={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(`
a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:
import {Socket} from "phoenix"
import {LiveSocket} from "phoenix_live_view"
let liveSocket = new LiveSocket("/live", Socket, {...})
`);this.socket=new e(i,t),this.bindingPrefix=t.bindingPrefix||qre,this.opts=t,this.params=qk(t.params||{}),this.viewLogger=t.viewLogger,this.metadataCallbacks=t.metadata||{},this.defaults=Object.assign(Cy($re),t.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=Cy(window.location),this.hooks=t.hooks||{},this.uploaders=t.uploaders||{},this.loaderTimeout=t.loaderTimeout||Wre,this.reloadWithJitterTimer=null,this.maxReloads=t.maxReloads||Are,this.reloadJitterMin=t.reloadJitterMin||Dre,this.reloadJitterMax=t.reloadJitterMax||Mre,this.failsafeJitter=t.failsafeJitter||Nre,this.localStorage=t.localStorage||window.localStorage,this.sessionStorage=t.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:qk(),onBeforeElUpdated:qk()},t.dom||{}),this.transitions=new woe,window.addEventListener("pagehide",n=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(Wk)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(py)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(py)==="false"}enableDebug(){this.sessionStorage.setItem(py,"true")}enableProfiling(){this.sessionStorage.setItem(Wk,"true")}disableDebug(){this.sessionStorage.setItem(py,"false")}disableProfiling(){this.sessionStorage.removeItem(Wk)}enableLatencySim(i){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(Vk,i)}disableLatencySim(){this.sessionStorage.removeItem(Vk)}getLatencySim(){let i=this.sessionStorage.getItem(Vk);return i?parseInt(i):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let i=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?i():document.addEventListener("DOMContentLoaded",()=>i())}disconnect(i){clearTimeout(this.reloadWithJitterTimer),this.socket.disconnect(i)}replaceTransport(i){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(i),this.connect()}execJS(i,e,t=null){this.owner(i,n=>Ps.exec(t,e,n,i))}execJSHookPush(i,e,t,n){this.withinOwners(i,r=>{Ps.exec("hook",e,r,i,["push",{data:t,callback:n}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(i,e){this.domCallbacks[i](...e)}time(i,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(i);let t=e();return console.timeEnd(i),t}log(i,e,t){if(this.viewLogger){let[n,r]=t();this.viewLogger(i,e,n,r)}else if(this.isDebugEnabled()){let[n,r]=t();Qre(i,e,n,r)}}requestDOMUpdate(i){this.transitions.after(i)}transition(i,e,t=function(){}){this.transitions.addTransition(i,e,t)}onChannel(i,e,t){i.on(e,n=>{let r=this.getLatencySim();r?setTimeout(()=>t(n),r):t(n)})}wrapPush(i,e,t){let n=this.getLatencySim(),r=i.joinCount;if(!n)return this.isConnected()&&e.timeout?t().receive("timeout",()=>{i.joinCount===r&&!i.isDestroyed()&&this.reloadWithJitter(i,()=>{this.log(i,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):t();let o={receives:[],receive(s,a){this.receives.push([s,a])}};return setTimeout(()=>{i.isDestroyed()||o.receives.reduce((s,[a,l])=>s.receive(a,l),t())},n),o}reloadWithJitter(i,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let t=this.reloadJitterMin,n=this.reloadJitterMax,r=Math.floor(Math.random()*(n-t+1))+t,o=Ia.updateLocal(this.localStorage,window.location.pathname,Yz,0,s=>s+1);o>this.maxReloads&&(r=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{i.isDestroyed()||i.isConnected()||(i.destroy(),e?e():this.log(i,"join",()=>[`encountered ${o} consecutive reloads`]),o>this.maxReloads&&this.log(i,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},r)}getHookCallbacks(i){return i&&i.startsWith("Phoenix.")?roe[i.split(".")[1]]:this.hooks[i]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(i){return`${this.getBindingPrefix()}${i}`}channel(i,e){return this.socket.channel(i,e)}joinDeadView(){let i=document.body;if(i&&!this.isPhxView(i)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(i);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>e.execNewMounted())}}joinRootViews(){let i=!1;return pe.all(document,`${Lf}:not([${Tf}])`,e=>{if(!this.getRootById(e.id)){let t=this.newRootView(e);t.setHref(this.getHref()),t.join(),e.hasAttribute(Jk)&&(this.main=t)}i=!0}),i}redirect(i,e){this.unload(),Ia.redirect(i,e)}replaceMain(i,e,t=null,n=this.setPendingLink(i)){let r=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=pe.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,r),this.main.setRedirect(i),this.transitionRemoves(),this.main.join((s,a)=>{s===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{pe.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,t&&requestAnimationFrame(()=>t(n)),a()})})}transitionRemoves(i){let e=this.binding("remove");i=i||pe.all(document,`[${e}]`),i.forEach(t=>{this.execJS(t,t.getAttribute(e),"remove")})}isPhxView(i){return i.getAttribute&&i.getAttribute(Jc)!==null}newRootView(i,e,t){let n=new nB(i,this,null,e,t);return this.roots[n.id]=n,n}owner(i,e){let t=Qc(i.closest(Lf),n=>this.getViewByEl(n))||this.main;t&&e(t)}withinOwners(i,e){this.owner(i,t=>e(t,i))}getViewByEl(i){let e=i.getAttribute(Sg);return Qc(this.getRootById(e),t=>t.getDescendentByEl(i))}getRootById(i){return this.roots[i]}destroyAllViews(){for(let i in this.roots)this.roots[i].destroy(),delete this.roots[i];this.main=null}destroyViewByEl(i){let e=this.getRootById(i.getAttribute(Sg));e&&e.id===i.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(i.id)}setActiveElement(i){if(this.activeElement===i)return;this.activeElement=i;let e=()=>{i===this.activeElement&&(this.activeElement=null),i.removeEventListener("mouseup",this),i.removeEventListener("touchend",this)};i.addEventListener("mouseup",e),i.addEventListener("touchend",e)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(i){this.prevActive&&i.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:i}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),i||this.bindNav(),this.bindClicks(),i||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,t,n,r,o,s)=>{let a=r.getAttribute(this.binding(Ure)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=ue({key:e.key},this.eventMeta(t,e,r));Ps.exec(t,o,n,r,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,t,n,r,o,s)=>{if(!s){let a=ue({key:e.key},this.eventMeta(t,e,r));Ps.exec(t,o,n,r,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,t,n,r,o,s,a)=>{if(a==="window"){let l=this.eventMeta(t,e,r);Ps.exec(t,s,n,r,["push",{data:l}])}}),window.addEventListener("dragover",e=>e.preventDefault()),window.addEventListener("drop",e=>{e.preventDefault();let t=Qc(Cg(e.target,this.binding(Ez)),o=>o.getAttribute(this.binding(Ez))),n=t&&document.getElementById(t),r=Array.from(e.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(mr.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(Qz,e=>{let t=e.target;if(!pe.isUploadInput(t))return;let n=Array.from(e.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);mr.trackFiles(t,n),t.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(i,e,t){let n=this.metadataCallbacks[i];return n?n(e,t):{}}setPendingLink(i){return this.linkRef++,this.pendingLink=i,this.linkRef}commitPendingLink(i){return this.linkRef!==i?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(i,e){for(let t in i){let n=i[t];this.on(n,r=>{let o=this.binding(t),s=this.binding(`window-${t}`),a=r.target.getAttribute&&r.target.getAttribute(o);a?this.debounce(r.target,r,n,()=>{this.withinOwners(r.target,l=>{e(r,t,l,r.target,a,null)})}):pe.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,r,n,()=>{this.withinOwners(l,d=>{e(r,t,d,l,c,"window")})})})})}}bindClicks(){window.addEventListener("click",i=>this.clickStartedAtTarget=i.target),this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}bindClick(i,e,t){let n=this.binding(e);window.addEventListener(i,r=>{let o=null;if(t)o=r.target.matches(`[${n}]`)?r.target:r.target.querySelector(`[${n}]`);else{let a=this.clickStartedAtTarget||r.target;o=Cg(a,n),this.dispatchClickAway(r,a),this.clickStartedAtTarget=null}let s=o&&o.getAttribute(n);if(!s){!t&&pe.isNewPageClick(r,window.location)&&this.unload();return}o.getAttribute("href")==="#"&&r.preventDefault(),!o.hasAttribute(ss)&&this.debounce(o,r,"click",()=>{this.withinOwners(o,a=>{Ps.exec("click",s,a,o,["push",{data:this.eventMeta("click",r,o)}])})})},t)}dispatchClickAway(i,e){let t=this.binding("click-away");pe.all(document,`[${t}]`,n=>{n.isSameNode(e)||n.contains(e)||this.withinOwners(i.target,r=>{let o=n.getAttribute(t);Ps.isVisible(n)&&Ps.exec("click",o,r,n,["push",{data:this.eventMeta("click",i,i.target)}])})})}bindNav(){if(!Ia.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let i=null;window.addEventListener("scroll",e=>{clearTimeout(i),i=setTimeout(()=>{Ia.updateCurrentState(t=>Object.assign(t,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:t,id:n,root:r,scroll:o}=e.state||{},s=window.location.href;pe.dispatchEvent(window,"phx:navigate",{detail:{href:s,patch:t==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&t==="patch"&&n===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{r&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let t=Cg(e.target,zk),n=t&&t.getAttribute(zk);if(!n||!this.isConnected()||!this.main||pe.wantsNewTab(e))return;let r=t.href,o=t.getAttribute(Pre);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==r&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(r,o,t);else if(n==="redirect")this.historyRedirect(r,o);else throw new Error(`expected ${zk} to be "patch" or "redirect", got: ${n}`);let s=t.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(t,s,"click"))})},!1)}maybeScroll(i){typeof i=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,i)})}dispatchEvent(i,e={}){pe.dispatchEvent(window,`phx:${i}`,{detail:e})}dispatchEvents(i){i.forEach(([e,t])=>this.dispatchEvent(e,t))}withPageLoading(i,e){pe.dispatchEvent(window,"phx:page-loading-start",{detail:i});let t=()=>pe.dispatchEvent(window,"phx:page-loading-stop",{detail:i});return e?e(t):t}pushHistoryPatch(i,e,t){if(!this.isConnected())return Ia.redirect(i);this.withPageLoading({to:i,kind:"patch"},n=>{this.main.pushLinkPatch(i,t,r=>{this.historyPatch(i,e,r),n()})})}historyPatch(i,e,t=this.setPendingLink(i)){this.commitPendingLink(t)&&(Ia.pushState(e,{type:"patch",id:this.main.id},i),pe.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:i,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(i,e,t){if(!this.isConnected())return Ia.redirect(i,t);if(/^\/$|^\/[^\/]+.*$/.test(i)){let{protocol:r,host:o}=window.location;i=`${r}//${o}${i}`}let n=window.scrollY;this.withPageLoading({to:i,kind:"redirect"},r=>{this.replaceMain(i,t,o=>{o===this.linkRef&&(Ia.pushState(e,{type:"redirect",id:this.main.id,scroll:n},i),pe.dispatchEvent(window,"phx:navigate",{detail:{href:i,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),r()})})}replaceRootHistory(){Ia.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(i){let{pathname:e,search:t}=this.currentLocation;return e+t===i.pathname+i.search?!1:(this.currentLocation=Cy(i),!0)}bindForms(){let i=0,e=!1;this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit")),r=t.target.getAttribute(this.binding("change"));!e&&r&&!n&&(e=!0,t.preventDefault(),this.withinOwners(t.target,o=>{o.disableForm(t.target),window.requestAnimationFrame(()=>{pe.isUnloadableFormSubmit(t)&&this.unload(),t.target.submit()})}))},!0),this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit"));if(!n){pe.isUnloadableFormSubmit(t)&&this.unload();return}t.preventDefault(),t.target.disabled=!0,this.withinOwners(t.target,r=>{Ps.exec("submit",n,r,t.target,["push",{submitter:t.submitter}])})},!1);for(let t of["change","input"])this.on(t,n=>{let r=this.binding("change"),o=n.target,s=o.getAttribute(r),a=o.form&&o.form.getAttribute(r),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,d=i;i++;let{at:u,type:h}=pe.private(o,"prev-iteration")||{};u===d-1&&t==="change"&&h==="input"||(pe.putPrivate(o,"prev-iteration",{at:d,type:t}),this.debounce(o,n,t,()=>{this.withinOwners(c,f=>{pe.putPrivate(o,Xk,!0),pe.isTextualInput(o)||this.setActiveElement(o),Ps.exec("change",l,f,o,["push",{_target:n.target.name,dispatcher:c}])})}))},!1);this.on("reset",t=>{let n=t.target;pe.resetForm(n,this.binding(Sy));let r=Array.from(n.elements).find(o=>o.type==="reset");window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(i,e,t,n){if(t==="blur"||t==="focusout")return n();let r=this.binding(Bre),o=this.binding(Hre),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(i,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(i);pe.debounce(i,e,r,s,o,a,c,()=>{n()})})}silenceEvents(i){this.silenced=!0,i(),this.silenced=!1}on(i,e){window.addEventListener(i,t=>{this.silenced||e(t)})}},woe=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(i=>{clearTimeout(i),this.transitions.delete(i)}),this.flushPendingOps()}after(i){this.size()===0?i():this.pushPendingOp(i)}addTransition(i,e,t){e();let n=setTimeout(()=>{this.transitions.delete(n),t(),this.flushPendingOps()},i);this.transitions.add(n)}pushPendingOp(i){this.pendingOps.push(i)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let i=this.pendingOps.shift();i&&(i(),this.flushPendingOps())}};var oB="livebook:";function ku(i){try{let e=localStorage.getItem(oB+i);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function Af(i,e){try{let t=JSON.stringify(e);localStorage.setItem(oB+i,t)}catch(t){console.error(`Failed to write to local storage, reason: ${t.message}`)}}var sB="app_auth_token:";function aB(i,e){Af(sB+i,e)}function lB(){let i=window.location.pathname;if(i.startsWith("/apps/")){let e=i.split("/")[2],t=ku(sB+e);if(t)return t}return null}var xoe={mounted(){this.handleEvent("persist_app_auth",({slug:i,token:e})=>{aB(i,e),this.pushEvent("app_auth_persisted")})}},cB=xoe;function Ct(i,e,t=null){if(!i.hasAttribute(e))throw new Error(`Missing attribute '${e}' on element <${i.tagName}:${i.id}>`);let n=i.getAttribute(e);return t?t(n):n}function Ti(i,e,t,n=null){if(i.hasAttribute(e)){let r=i.getAttribute(e);return n?n(r):r}else return t}function Dl(i){if(i==="true")return!0;if(i==="false")return!1;throw new Error(`Invalid boolean attribute ${i}, should be either "true" or "false"`)}function uo(i){let e=parseInt(i,10);if(Number.isNaN(e))throw new Error(`Invalid integer value ${i}`);return e}function dB(i,e,t){let r=new ArrayBuffer(44+i.byteLength),o=new DataView(r),s=i.byteLength/4,a=4,l=e*a,c=t*l,d=s*l,u=0;function h(_){o.setUint32(u,_,!1),u+=4}function f(_){o.setUint32(u,_,!0),u+=4}function m(_){o.setUint16(u,_,!0),u+=2}function g(_){o.setFloat32(u,_,!0),u+=4}h(1380533830),f(36+d),h(1463899717),h(1718449184),f(16),m(3),m(e),f(t),f(c),m(l),m(a*8),h(1684108385),f(d);let w=new Float32Array(i);for(let _=0;_<w.length;_++)g(w[_]);return r}var kg=4;function uB(i,e){let n=new TextEncoder().encode(JSON.stringify(i)),r=new ArrayBuffer(kg+n.byteLength+e.byteLength);return new DataView(r).setUint32(0,n.byteLength),new Uint8Array(r,kg,n.byteLength).set(n),new Uint8Array(r,kg+n.byteLength).set(new Uint8Array(e)),r}function hB(i){let t=new DataView(i).getUint32(0),n=new Uint8Array(i,kg,t),r=i.slice(kg+t),o=new TextDecoder;return[JSON.parse(o.decode(n)),r]}var tE=["bg-yellow-100","border-yellow-300"],Coe={mounted(){this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.audioEl=this.el.querySelector("[data-preview]"),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.recordButton=this.el.querySelector("[data-btn-record]"),this.stopButton=this.el.querySelector("[data-btn-stop]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.mediaRecorder=null,this.audioEl.src=this.props.audioUrl,this.uploadButton.addEventListener("click",i=>{this.inputEl.click()}),this.inputEl.addEventListener("change",i=>{let[e]=i.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",i=>{i.stopPropagation(),i.preventDefault();let[e]=i.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...tE)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...tE)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...tE)}),this.recordButton.addEventListener("click",i=>{this.startRecording()}),this.stopButton.addEventListener("click",i=>{this.stopRecording()}),this.cancelButton.addEventListener("click",i=>{this.stopRecording(!1)})},updated(){this.props=this.getProps(),this.audioEl.src=this.props.audioUrl},getProps(){return{id:Ct(this.el,"data-id"),phxTarget:Ct(this.el,"data-phx-target",uo),samplingRate:Ct(this.el,"data-sampling-rate",uo),endianness:Ct(this.el,"data-endianness"),format:Ct(this.el,"data-format"),audioUrl:Ti(this.el,"data-audio-url",null)}},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(i=>{this.mediaRecorder=new MediaRecorder(i),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(i=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),i&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(n=>{this.loadEncodedAudio(n)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(i){let e=new FileReader;e.onload=t=>{this.loadEncodedAudio(t.target.result)},e.readAsArrayBuffer(i)},loadEncodedAudio(i){this.pushEventTo(this.props.phxTarget,"decoding",{}),new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(i,t=>{let n=Soe(t);this.pushAudio(n)})},pushAudio(i){let e={num_channels:i.numChannels,sampling_rate:i.samplingRate},t=this.encodeAudio(i),n=new Blob([t]);n.meta=()=>e,this.uploadTo(this.props.phxTarget,"file",[n])},encodeAudio(i){if(this.props.format==="pcm_f32")return koe(i.data,this.props.endianness);if(this.props.format==="wav")return dB(i.data,i.numChannels,i.samplingRate)}};function Soe(i){let e=i.numberOfChannels,t=i.sampleRate,n=i.length,r=4*e*n,o=new ArrayBuffer(r),s=new Float32Array(o);for(let a=0;a<e;a++){let l=i.getChannelData(a);for(let c=0;c<l.length;c++)s[e*c+a]=l[c]}return{data:s.buffer,numChannels:e,samplingRate:t}}function koe(i,e){if(Eoe()===e)return i;for(let t=0;t<i.byteLength/4;t++){let n=i[t],r=i[t+1],o=i[t+2],s=i[t+3];i[t]=s,i[t+1]=o,i[t+2]=r,i[t+3]=n}return i}function Eoe(){let i=new ArrayBuffer(2),e=new Uint16Array(i),t=new Uint8Array(i);return e[0]=1,t[0]===1?"little":"big"}var fB=Coe;var pB=11;function Toe(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===pB||i.nodeType===pB)){for(var l=t.length-1;l>=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var Ty,Ioe="http://www.w3.org/1999/xhtml",ho=typeof document=="undefined"?void 0:document,Loe=!!ho&&"content"in ho.createElement("template"),Aoe=!!ho&&ho.createRange&&"createContextualFragment"in ho.createRange();function Doe(i){var e=ho.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function Moe(i){Ty||(Ty=ho.createRange(),Ty.selectNode(ho.body));var e=Ty.createContextualFragment(i);return e.childNodes[0]}function Noe(i){var e=ho.createElement("body");return e.innerHTML=i,e.childNodes[0]}function Roe(i){return i=i.trim(),Loe?Doe(i):Aoe?Moe(i):Noe(i)}function Iy(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function Poe(i,e){return!e||e===Ioe?ho.createElement(i):ho.createElementNS(e,i)}function Ooe(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function iE(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var mB={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}iE(i,e,"selected")},INPUT:function(i,e){iE(i,e,"checked"),iE(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},Eg=1,gB=11,bB=3,vB=8;function ed(){}function Foe(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function zoe(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=ho.createElement("html"),n.innerHTML=o}else n=Roe(n);else n.nodeType===gB&&(n=n.firstElementChild);var s=r.getNodeKey||Foe,a=r.onBeforeNodeAdded||ed,l=r.onNodeAdded||ed,c=r.onBeforeElUpdated||ed,d=r.onElUpdated||ed,u=r.onBeforeNodeDiscarded||ed,h=r.onNodeDiscarded||ed,f=r.onBeforeElChildrenUpdated||ed,m=r.skipFromChildren||ed,g=r.addChild||function(be,we){return be.appendChild(we)},w=r.childrenOnly===!0,_=Object.create(null),E=[];function A(be){E.push(be)}function L(be,we){if(be.nodeType===Eg)for(var Y=be.firstChild;Y;){var R=void 0;we&&(R=s(Y))?A(R):(h(Y),Y.firstChild&&L(Y,we)),Y=Y.nextSibling}}function O(be,we,Y){u(be)!==!1&&(we&&we.removeChild(be),h(be),L(be,Y))}function U(be){if(be.nodeType===Eg||be.nodeType===gB)for(var we=be.firstChild;we;){var Y=s(we);Y&&(_[Y]=we),U(we),we=we.nextSibling}}U(t);function Q(be){l(be);for(var we=be.firstChild;we;){var Y=we.nextSibling,R=s(we);if(R){var re=_[R];re&&Iy(we,re)?(we.parentNode.replaceChild(re,we),te(re,we)):Q(we)}else Q(we);we=Y}}function ae(be,we,Y){for(;we;){var R=we.nextSibling;(Y=s(we))?A(Y):O(we,be,!0),we=R}}function te(be,we,Y){var R=s(we);R&&delete _[R],!(!Y&&(c(be,we)===!1||(i(be,we),d(be),f(be,we)===!1)))&&(be.nodeName!=="TEXTAREA"?Z(be,we):mB.TEXTAREA(be,we))}function Z(be,we){var Y=m(be,we),R=we.firstChild,re=be.firstChild,me,G,Tt,Ft,li;e:for(;R;){for(Ft=R.nextSibling,me=s(R);!Y&&re;){if(Tt=re.nextSibling,R.isSameNode&&R.isSameNode(re)){R=Ft,re=Tt;continue e}G=s(re);var Li=re.nodeType,Et=void 0;if(Li===R.nodeType&&(Li===Eg?(me?me!==G&&((li=_[me])?Tt===li?Et=!1:(be.insertBefore(li,re),G?A(G):O(re,be,!0),re=li):Et=!1):G&&(Et=!1),Et=Et!==!1&&Iy(re,R),Et&&te(re,R)):(Li===bB||Li==vB)&&(Et=!0,re.nodeValue!==R.nodeValue&&(re.nodeValue=R.nodeValue))),Et){R=Ft,re=Tt;continue e}G?A(G):O(re,be,!0),re=Tt}if(me&&(li=_[me])&&Iy(li,R))Y||g(be,li),te(li,R);else{var Ii=a(R);Ii!==!1&&(Ii&&(R=Ii),R.actualize&&(R=R.actualize(be.ownerDocument||ho)),g(be,R),Q(R))}R=Ft,re=Tt}ae(be,re,G);var pi=mB[be.nodeName];pi&&pi(be,we)}var ve=t,Pe=ve.nodeType,Ee=n.nodeType;if(!w){if(Pe===Eg)Ee===Eg?Iy(t,n)||(h(t),ve=Ooe(t,Poe(n.nodeName,n.namespaceURI))):ve=n;else if(Pe===bB||Pe===vB){if(Ee===Pe)return ve.nodeValue!==n.nodeValue&&(ve.nodeValue=n.nodeValue),ve;ve=n}}if(ve===n)h(t);else{if(n.isSameNode&&n.isSameNode(ve))return;if(te(ve,n,w),E)for(var Oe=0,Xe=E.length;Oe<Xe;Oe++){var dt=_[E[Oe]];dt&&O(dt,dt.parentNode,!1)}}return!w&&ve!==t&&t.parentNode&&(ve.actualize&&(ve=ve.actualize(t.ownerDocument||ho)),t.parentNode.replaceChild(ve,t)),ve}}var Boe=zoe(Toe),_B=Boe;function nE(i){if(i)throw i}var Dy=qr(IB(),1);function Tg(i){if(typeof i!="object"||i===null)return!1;let e=Object.getPrototypeOf(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)}function LB(){let i=[],e={run:t,use:n};return e;function t(...r){let o=-1,s=r.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...r);function a(l,...c){let d=i[++o],u=-1;if(l){s(l);return}for(;++u<r.length;)(c[u]===null||c[u]===void 0)&&(c[u]=r[u]);r=c,d?Hoe(d,a)(...c):s(null,...c)}}function n(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return i.push(r),e}}function Hoe(i,e){let t;return n;function n(...s){let a=i.length>s.length,l;a&&s.push(r);try{l=i.apply(this,s)}catch(c){let d=c;if(a&&t)throw d;return r(d)}a||(l instanceof Promise?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){t||(t=!0,e(s,...a))}function o(s){r(null,s)}}function oE(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?AB(i.position):"start"in i||"end"in i?AB(i):"line"in i||"column"in i?rE(i):""}function rE(i){return DB(i&&i.line)+":"+DB(i&&i.column)}function AB(i){return rE(i&&i.start)+"-"+rE(i&&i.end)}function DB(i){return i&&typeof i=="number"?i:1}var Mn=class extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let r="",o={},s=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o=ue({},t)),typeof e=="string"?r=e:!o.cause&&e&&(s=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof n=="string"){let l=n.indexOf(":");l===-1?o.ruleId=n:(o.source=n.slice(0,l),o.ruleId=n.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=oE(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};Mn.prototype.file="";Mn.prototype.name="";Mn.prototype.reason="";Mn.prototype.message="";Mn.prototype.stack="";Mn.prototype.column=void 0;Mn.prototype.line=void 0;Mn.prototype.ancestors=void 0;Mn.prototype.cause=void 0;Mn.prototype.fatal=void 0;Mn.prototype.place=void 0;Mn.prototype.ruleId=void 0;Mn.prototype.source=void 0;var Os={basename:Uoe,dirname:joe,extname:Woe,join:Voe,sep:"/"};function Uoe(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Ig(i);let t=0,n=-1,r=i.length,o;if(e===void 0||e.length===0||e.length>i.length){for(;r--;)if(i.codePointAt(r)===47){if(o){t=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":i.slice(t,n)}if(e===i)return"";let s=-1,a=e.length-1;for(;r--;)if(i.codePointAt(r)===47){if(o){t=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(i.codePointAt(r)===e.codePointAt(a--)?a<0&&(n=r):(a=-1,n=s));return t===n?n=s:n<0&&(n=i.length),i.slice(t,n)}function joe(i){if(Ig(i),i.length===0)return".";let e=-1,t=i.length,n;for(;--t;)if(i.codePointAt(t)===47){if(n){e=t;break}}else n||(n=!0);return e<0?i.codePointAt(0)===47?"/":".":e===1&&i.codePointAt(0)===47?"//":i.slice(0,e)}function Woe(i){Ig(i);let e=i.length,t=-1,n=0,r=-1,o=0,s;for(;e--;){let a=i.codePointAt(e);if(a===47){if(s){n=e+1;break}continue}t<0&&(s=!0,t=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||t<0||o===0||o===1&&r===t-1&&r===n+1?"":i.slice(r,t)}function Voe(...i){let e=-1,t;for(;++e<i.length;)Ig(i[e]),i[e]&&(t=t===void 0?i[e]:t+"/"+i[e]);return t===void 0?".":qoe(t)}function qoe(i){Ig(i);let e=i.codePointAt(0)===47,t=Koe(i,!e);return t.length===0&&!e&&(t="."),t.length>0&&i.codePointAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function Koe(i,e){let t="",n=0,r=-1,o=0,s=-1,a,l;for(;++s<=i.length;){if(s<i.length)a=i.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(r===s-1||o===1))if(r!==s-1&&o===2){if(t.length<2||n!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",n=0):(t=t.slice(0,l),n=t.length-1-t.lastIndexOf("/")),r=s,o=0;continue}}else if(t.length>0){t="",n=0,r=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+i.slice(r+1,s):t=i.slice(r+1,s),n=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function Ig(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}var MB={cwd:$oe};function $oe(){return"/"}function Df(i){return!!(i!==null&&typeof i=="object"&&"href"in i&&i.href&&"protocol"in i&&i.protocol&&i.auth===void 0)}function NB(i){if(typeof i=="string")i=new URL(i);else if(!Df(i)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(i.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Goe(i)}function Goe(i){if(i.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=i.pathname,t=-1;for(;++t<e.length;)if(e.codePointAt(t)===37&&e.codePointAt(t+1)===50){let n=e.codePointAt(t+2);if(n===70||n===102){let r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(e)}var sE=["history","path","basename","stem","extname","dirname"],td=class{constructor(e){let t;e?Df(e)?t={path:e}:typeof e=="string"||Yoe(e)?t={value:e}:t=e:t={},this.cwd=MB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<sE.length;){let o=sE[n];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let r;for(r in t)sE.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?Os.basename(this.path):void 0}set basename(e){lE(e,"basename"),aE(e,"basename"),this.path=Os.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Os.dirname(this.path):void 0}set dirname(e){RB(this.basename,"dirname"),this.path=Os.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Os.extname(this.path):void 0}set extname(e){if(aE(e,"extname"),RB(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Os.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Df(e)&&(e=NB(e)),lE(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Os.basename(this.path,this.extname):void 0}set stem(e){lE(e,"stem"),aE(e,"stem"),this.path=Os.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Mn(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function aE(i,e){if(i&&i.includes(Os.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Os.sep+"`")}function lE(i,e){if(!i)throw new Error("`"+e+"` cannot be empty")}function RB(i,e){if(!i)throw new Error("Setting `"+e+"` requires `path` to be set too")}function Yoe(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}var PB=function(i){let n=this.constructor.prototype,r=n[i],o=function(){return r.apply(o,arguments)};Object.setPrototypeOf(o,n);let s=Object.getOwnPropertyNames(r);for(let a of s){let l=Object.getOwnPropertyDescriptor(r,a);l&&Object.defineProperty(o,a,l)}return o};var Xoe={}.hasOwnProperty,hE=class i extends PB{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=LB()}copy(){let e=new i,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data((0,Dy.default)(!0,{},this.namespace)),e}data(e,t){return typeof e=="string"?arguments.length===2?(uE("data",this.frozen),this.namespace[e]=t,this):Xoe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(uE("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let t=Ay(e),n=this.parser||this.Parser;return cE("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),cE("process",this.parser||this.Parser),dE("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(o,s){let a=Ay(e),l=n.parse(a);n.run(l,a,function(d,u,h){if(d||!u||!h)return c(d);let f=u,m=n.stringify(f,h);Zoe(m)?h.value=m:h.result=m,c(d,h)});function c(d,u){d||!u?s(d):o?o(u):t(void 0,u)}}}processSync(e){let t=!1,n;return this.freeze(),cE("processSync",this.parser||this.Parser),dE("processSync",this.compiler||this.Compiler),this.process(e,r),FB("processSync","process",t),n;function r(o,s){t=!0,nE(o),n=s}}run(e,t,n){OB(e),this.freeze();let r=this.transformers;return!n&&typeof t=="function"&&(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(s,a){let l=Ay(t);r.run(e,l,c);function c(d,u,h){let f=u||e;d?a(d):s?s(f):n(void 0,f,h)}}}runSync(e,t){let n=!1,r;return this.run(e,t,o),FB("runSync","run",n),r;function o(s,a){nE(s),r=a,n=!0}}stringify(e,t){this.freeze();let n=Ay(t),r=this.compiler||this.Compiler;return dE("stringify",r),OB(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(uE("use",this.frozen),e!=null)if(typeof e=="function")l(e,t);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){let[d,...u]=c;l(d,u)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(r.settings=(0,Dy.default)(!0,r.settings,c.settings))}function a(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){let u=c[d];o(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,d){let u=-1,h=-1;for(;++u<n.length;)if(n[u][0]===c){h=u;break}if(h===-1)n.push([c,...d]);else if(d.length>0){let[f,...m]=d,g=n[h][1];Tg(g)&&Tg(f)&&(f=(0,Dy.default)(!0,g,f)),n[h]=[c,f,...m]}}}},My=new hE().freeze();function cE(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `parser`")}function dE(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `compiler`")}function uE(i,e){if(e)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function OB(i){if(!Tg(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function FB(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function Ay(i){return Qoe(i)?i:new td(i)}function Qoe(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function Zoe(i){return typeof i=="string"||Joe(i)}function Joe(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}var ese={};function fE(i,e){let t=e||ese,n=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,r=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return BB(i,n,r)}function BB(i,e,t){if(tse(i)){if("value"in i)return i.type==="html"&&!t?"":i.value;if(e&&"alt"in i&&i.alt)return i.alt;if("children"in i)return zB(i.children,e,t)}return Array.isArray(i)?zB(i,e,t):""}function zB(i,e,t){let n=[],r=-1;for(;++r<i.length;)n[r]=BB(i[r],e,t);return n.join("")}function tse(i){return!!(i&&typeof i=="object")}function gr(i,e,t,n){let r=i.length,o=0,s;if(e<0?e=-e>r?0:r+e:e=e>r?r:e,t=t>0?t:0,n.length<1e4)s=Array.from(n),s.unshift(e,t),i.splice(...s);else for(t&&i.splice(e,t);o<n.length;)s=n.slice(o,o+1e4),s.unshift(e,0),i.splice(...s),o+=1e4,e+=1e4}function Qr(i,e){return i.length>0?(gr(i,i.length,0,e),i):e}var HB={}.hasOwnProperty;function UB(i){let e={},t=-1;for(;++t<i.length;)ise(e,i[t]);return e}function ise(i,e){let t;for(t in e){let r=(HB.call(i,t)?i[t]:void 0)||(i[t]={}),o=e[t],s;if(o)for(s in o){HB.call(r,s)||(r[s]=[]);let a=o[s];nse(r[s],Array.isArray(a)?a:a?[a]:[])}}}function nse(i,e){let t=-1,n=[];for(;++t<e.length;)(e[t].add==="after"?i:n).push(e[t]);gr(i,0,0,n)}function Ny(i,e){let t=Number.parseInt(i,e);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCharCode(t)}function Ml(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var rse=id(new RegExp("\\p{P}","u")),zo=id(/[A-Za-z]/),Zr=id(/[\dA-Za-z]/),jB=id(/[#-'*+\--9=?A-Z^-~]/);function Lg(i){return i!==null&&(i<32||i===127)}var Ag=id(/\d/),WB=id(/[\dA-Fa-f]/),pE=id(/[!-/:-@[-`{-~]/);function at(i){return i!==null&&i<-2}function En(i){return i!==null&&(i<0||i===32)}function Wt(i){return i===-2||i===-1||i===32}function VB(i){return pE(i)||rse(i)}var qB=id(/\s/);function id(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function $t(i,e,t,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Wt(l)?(i.enter(t),a(l)):e(l)}function a(l){return Wt(l)&&o++<r?(i.consume(l),a):(i.exit(t),e(l))}}var KB={tokenize:ose};function ose(i){let e=i.attempt(this.parser.constructs.contentInitial,n,r),t;return e;function n(a){if(a===null){i.consume(a);return}return i.enter("lineEnding"),i.consume(a),i.exit("lineEnding"),$t(i,e,"linePrefix")}function r(a){return i.enter("paragraph"),o(a)}function o(a){let l=i.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=l),t=l,s(a)}function s(a){if(a===null){i.exit("chunkText"),i.exit("paragraph"),i.consume(a);return}return at(a)?(i.consume(a),i.exit("chunkText"),o):(i.consume(a),s)}}var GB={tokenize:sse},$B={tokenize:ase};function sse(i){let e=this,t=[],n=0,r,o,s;return a;function a(A){if(n<t.length){let L=t[n];return e.containerState=L[1],i.attempt(L[0].continuation,l,c)(A)}return c(A)}function l(A){if(n++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,r&&E();let L=e.events.length,O=L,U;for(;O--;)if(e.events[O][0]==="exit"&&e.events[O][1].type==="chunkFlow"){U=e.events[O][1].end;break}_(n);let Q=L;for(;Q<e.events.length;)e.events[Q][1].end=Object.assign({},U),Q++;return gr(e.events,O+1,0,e.events.slice(L)),e.events.length=Q,c(A)}return a(A)}function c(A){if(n===t.length){if(!r)return h(A);if(r.currentConstruct&&r.currentConstruct.concrete)return m(A);e.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return e.containerState={},i.check($B,d,u)(A)}function d(A){return r&&E(),_(n),h(A)}function u(A){return e.parser.lazy[e.now().line]=n!==t.length,s=e.now().offset,m(A)}function h(A){return e.containerState={},i.attempt($B,f,m)(A)}function f(A){return n++,t.push([e.currentConstruct,e.containerState]),h(A)}function m(A){if(A===null){r&&E(),_(0),i.consume(A);return}return r=r||e.parser.flow(e.now()),i.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:r}),g(A)}function g(A){if(A===null){w(i.exit("chunkFlow"),!0),_(0),i.consume(A);return}return at(A)?(i.consume(A),w(i.exit("chunkFlow")),n=0,e.interrupt=void 0,a):(i.consume(A),g)}function w(A,L){let O=e.sliceStream(A);if(L&&O.push(null),A.previous=o,o&&(o.next=A),o=A,r.defineSkip(A.start),r.write(O),e.parser.lazy[A.start.line]){let U=r.events.length;for(;U--;)if(r.events[U][1].start.offset<s&&(!r.events[U][1].end||r.events[U][1].end.offset>s))return;let Q=e.events.length,ae=Q,te,Z;for(;ae--;)if(e.events[ae][0]==="exit"&&e.events[ae][1].type==="chunkFlow"){if(te){Z=e.events[ae][1].end;break}te=!0}for(_(n),U=Q;U<e.events.length;)e.events[U][1].end=Object.assign({},Z),U++;gr(e.events,ae+1,0,e.events.slice(Q)),e.events.length=U}}function _(A){let L=t.length;for(;L-- >A;){let O=t[L];e.containerState=O[1],O[0].exit.call(e,i)}t.length=A}function E(){r.write([null]),o=void 0,r=void 0,e.containerState._closeFlow=void 0}}function ase(i,e,t){return $t(i,i.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function mE(i){if(i===null||En(i)||qB(i))return 1;if(VB(i))return 2}function Mf(i,e,t){let n=[],r=-1;for(;++r<i.length;){let o=i[r].resolveAll;o&&!n.includes(o)&&(e=o(e,t),n.push(o))}return e}var Dg={name:"attention",tokenize:cse,resolveAll:lse};function lse(i,e){let t=-1,n,r,o,s,a,l,c,d;for(;++t<i.length;)if(i[t][0]==="enter"&&i[t][1].type==="attentionSequence"&&i[t][1]._close){for(n=t;n--;)if(i[n][0]==="exit"&&i[n][1].type==="attentionSequence"&&i[n][1]._open&&e.sliceSerialize(i[n][1]).charCodeAt(0)===e.sliceSerialize(i[t][1]).charCodeAt(0)){if((i[n][1]._close||i[t][1]._open)&&(i[t][1].end.offset-i[t][1].start.offset)%3&&!((i[n][1].end.offset-i[n][1].start.offset+i[t][1].end.offset-i[t][1].start.offset)%3))continue;l=i[n][1].end.offset-i[n][1].start.offset>1&&i[t][1].end.offset-i[t][1].start.offset>1?2:1;let u=Object.assign({},i[n][1].end),h=Object.assign({},i[t][1].start);YB(u,-l),YB(h,l),s={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},i[n][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},i[t][1].start),end:h},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},i[n][1].end),end:Object.assign({},i[t][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},i[n][1].end=Object.assign({},s.start),i[t][1].start=Object.assign({},a.end),c=[],i[n][1].end.offset-i[n][1].start.offset&&(c=Qr(c,[["enter",i[n][1],e],["exit",i[n][1],e]])),c=Qr(c,[["enter",r,e],["enter",s,e],["exit",s,e],["enter",o,e]]),c=Qr(c,Mf(e.parser.constructs.insideSpan.null,i.slice(n+1,t),e)),c=Qr(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",r,e]]),i[t][1].end.offset-i[t][1].start.offset?(d=2,c=Qr(c,[["enter",i[t][1],e],["exit",i[t][1],e]])):d=0,gr(i,n-1,t-n+3,c),t=n+c.length-d-2;break}}for(t=-1;++t<i.length;)i[t][1].type==="attentionSequence"&&(i[t][1].type="data");return i}function cse(i,e){let t=this.parser.constructs.attentionMarkers.null,n=this.previous,r=mE(n),o;return s;function s(l){return o=l,i.enter("attentionSequence"),a(l)}function a(l){if(l===o)return i.consume(l),a;let c=i.exit("attentionSequence"),d=mE(l),u=!d||d===2&&r||t.includes(l),h=!r||r===2&&d||t.includes(n);return c._open=!!(o===42?u:u&&(r||!h)),c._close=!!(o===42?h:h&&(d||!u)),e(l)}}function YB(i,e){i.column+=e,i.offset+=e,i._bufferIndex+=e}var gE={name:"autolink",tokenize:dse};function dse(i,e,t){let n=0;return r;function r(f){return i.enter("autolink"),i.enter("autolinkMarker"),i.consume(f),i.exit("autolinkMarker"),i.enter("autolinkProtocol"),o}function o(f){return zo(f)?(i.consume(f),s):c(f)}function s(f){return f===43||f===45||f===46||Zr(f)?(n=1,a(f)):c(f)}function a(f){return f===58?(i.consume(f),n=0,l):(f===43||f===45||f===46||Zr(f))&&n++<32?(i.consume(f),a):(n=0,c(f))}function l(f){return f===62?(i.exit("autolinkProtocol"),i.enter("autolinkMarker"),i.consume(f),i.exit("autolinkMarker"),i.exit("autolink"),e):f===null||f===32||f===60||Lg(f)?t(f):(i.consume(f),l)}function c(f){return f===64?(i.consume(f),d):jB(f)?(i.consume(f),c):t(f)}function d(f){return Zr(f)?u(f):t(f)}function u(f){return f===46?(i.consume(f),n=0,d):f===62?(i.exit("autolinkProtocol").type="autolinkEmail",i.enter("autolinkMarker"),i.consume(f),i.exit("autolinkMarker"),i.exit("autolink"),e):h(f)}function h(f){if((f===45||Zr(f))&&n++<63){let m=f===45?h:u;return i.consume(f),m}return t(f)}}var nd={tokenize:use,partial:!0};function use(i,e,t){return n;function n(o){return Wt(o)?$t(i,r,"linePrefix")(o):r(o)}function r(o){return o===null||at(o)?e(o):t(o)}}var Ry={name:"blockQuote",tokenize:hse,continuation:{tokenize:fse},exit:pse};function hse(i,e,t){let n=this;return r;function r(s){if(s===62){let a=n.containerState;return a.open||(i.enter("blockQuote",{_container:!0}),a.open=!0),i.enter("blockQuotePrefix"),i.enter("blockQuoteMarker"),i.consume(s),i.exit("blockQuoteMarker"),o}return t(s)}function o(s){return Wt(s)?(i.enter("blockQuotePrefixWhitespace"),i.consume(s),i.exit("blockQuotePrefixWhitespace"),i.exit("blockQuotePrefix"),e):(i.exit("blockQuotePrefix"),e(s))}}function fse(i,e,t){let n=this;return r;function r(s){return Wt(s)?$t(i,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return i.attempt(Ry,e,t)(s)}}function pse(i){i.exit("blockQuote")}var Py={name:"characterEscape",tokenize:mse};function mse(i,e,t){return n;function n(o){return i.enter("characterEscape"),i.enter("escapeMarker"),i.consume(o),i.exit("escapeMarker"),r}function r(o){return pE(o)?(i.enter("characterEscapeValue"),i.consume(o),i.exit("characterEscapeValue"),i.exit("characterEscape"),e):t(o)}}var Oy={name:"characterReference",tokenize:gse};function gse(i,e,t){let n=this,r=0,o,s;return a;function a(u){return i.enter("characterReference"),i.enter("characterReferenceMarker"),i.consume(u),i.exit("characterReferenceMarker"),l}function l(u){return u===35?(i.enter("characterReferenceMarkerNumeric"),i.consume(u),i.exit("characterReferenceMarkerNumeric"),c):(i.enter("characterReferenceValue"),o=31,s=Zr,d(u))}function c(u){return u===88||u===120?(i.enter("characterReferenceMarkerHexadecimal"),i.consume(u),i.exit("characterReferenceMarkerHexadecimal"),i.enter("characterReferenceValue"),o=6,s=WB,d):(i.enter("characterReferenceValue"),o=7,s=Ag,d(u))}function d(u){if(u===59&&r){let h=i.exit("characterReferenceValue");return s===Zr&&!Zh(n.sliceSerialize(h))?t(u):(i.enter("characterReferenceMarker"),i.consume(u),i.exit("characterReferenceMarker"),i.exit("characterReference"),e)}return s(u)&&r++<o?(i.consume(u),d):t(u)}}var XB={tokenize:vse,partial:!0},Fy={name:"codeFenced",tokenize:bse,concrete:!0};function bse(i,e,t){let n=this,r={tokenize:O,partial:!0},o=0,s=0,a;return l;function l(U){return c(U)}function c(U){let Q=n.events[n.events.length-1];return o=Q&&Q[1].type==="linePrefix"?Q[2].sliceSerialize(Q[1],!0).length:0,a=U,i.enter("codeFenced"),i.enter("codeFencedFence"),i.enter("codeFencedFenceSequence"),d(U)}function d(U){return U===a?(s++,i.consume(U),d):s<3?t(U):(i.exit("codeFencedFenceSequence"),Wt(U)?$t(i,u,"whitespace")(U):u(U))}function u(U){return U===null||at(U)?(i.exit("codeFencedFence"),n.interrupt?e(U):i.check(XB,g,L)(U)):(i.enter("codeFencedFenceInfo"),i.enter("chunkString",{contentType:"string"}),h(U))}function h(U){return U===null||at(U)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),u(U)):Wt(U)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),$t(i,f,"whitespace")(U)):U===96&&U===a?t(U):(i.consume(U),h)}function f(U){return U===null||at(U)?u(U):(i.enter("codeFencedFenceMeta"),i.enter("chunkString",{contentType:"string"}),m(U))}function m(U){return U===null||at(U)?(i.exit("chunkString"),i.exit("codeFencedFenceMeta"),u(U)):U===96&&U===a?t(U):(i.consume(U),m)}function g(U){return i.attempt(r,L,w)(U)}function w(U){return i.enter("lineEnding"),i.consume(U),i.exit("lineEnding"),_}function _(U){return o>0&&Wt(U)?$t(i,E,"linePrefix",o+1)(U):E(U)}function E(U){return U===null||at(U)?i.check(XB,g,L)(U):(i.enter("codeFlowValue"),A(U))}function A(U){return U===null||at(U)?(i.exit("codeFlowValue"),E(U)):(i.consume(U),A)}function L(U){return i.exit("codeFenced"),e(U)}function O(U,Q,ae){let te=0;return Z;function Z(Xe){return U.enter("lineEnding"),U.consume(Xe),U.exit("lineEnding"),ve}function ve(Xe){return U.enter("codeFencedFence"),Wt(Xe)?$t(U,Pe,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Xe):Pe(Xe)}function Pe(Xe){return Xe===a?(U.enter("codeFencedFenceSequence"),Ee(Xe)):ae(Xe)}function Ee(Xe){return Xe===a?(te++,U.consume(Xe),Ee):te>=s?(U.exit("codeFencedFenceSequence"),Wt(Xe)?$t(U,Oe,"whitespace")(Xe):Oe(Xe)):ae(Xe)}function Oe(Xe){return Xe===null||at(Xe)?(U.exit("codeFencedFence"),Q(Xe)):ae(Xe)}}}function vse(i,e,t){let n=this;return r;function r(s){return s===null?t(s):(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o)}function o(s){return n.parser.lazy[n.now().line]?t(s):e(s)}}var Mg={name:"codeIndented",tokenize:yse},_se={tokenize:wse,partial:!0};function yse(i,e,t){let n=this;return r;function r(c){return i.enter("codeIndented"),$t(i,o,"linePrefix",4+1)(c)}function o(c){let d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):t(c)}function s(c){return c===null?l(c):at(c)?i.attempt(_se,s,l)(c):(i.enter("codeFlowValue"),a(c))}function a(c){return c===null||at(c)?(i.exit("codeFlowValue"),s(c)):(i.consume(c),a)}function l(c){return i.exit("codeIndented"),e(c)}}function wse(i,e,t){let n=this;return r;function r(s){return n.parser.lazy[n.now().line]?t(s):at(s)?(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),r):$t(i,o,"linePrefix",4+1)(s)}function o(s){let a=n.events[n.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):at(s)?r(s):t(s)}}var bE={name:"codeText",tokenize:Sse,resolve:xse,previous:Cse};function xse(i){let e=i.length-4,t=3,n,r;if((i[t][1].type==="lineEnding"||i[t][1].type==="space")&&(i[e][1].type==="lineEnding"||i[e][1].type==="space")){for(n=t;++n<e;)if(i[n][1].type==="codeTextData"){i[t][1].type="codeTextPadding",i[e][1].type="codeTextPadding",t+=2,e-=2;break}}for(n=t-1,e++;++n<=e;)r===void 0?n!==e&&i[n][1].type!=="lineEnding"&&(r=n):(n===e||i[n][1].type==="lineEnding")&&(i[r][1].type="codeTextData",n!==r+2&&(i[r][1].end=i[n-1][1].end,i.splice(r+2,n-r-2),e-=n-r-2,n=r+2),r=void 0);return i}function Cse(i){return i!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Sse(i,e,t){let n=this,r=0,o,s;return a;function a(h){return i.enter("codeText"),i.enter("codeTextSequence"),l(h)}function l(h){return h===96?(i.consume(h),r++,l):(i.exit("codeTextSequence"),c(h))}function c(h){return h===null?t(h):h===32?(i.enter("space"),i.consume(h),i.exit("space"),c):h===96?(s=i.enter("codeTextSequence"),o=0,u(h)):at(h)?(i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),c):(i.enter("codeTextData"),d(h))}function d(h){return h===null||h===32||h===96||at(h)?(i.exit("codeTextData"),c(h)):(i.consume(h),d)}function u(h){return h===96?(i.consume(h),o++,u):o===r?(i.exit("codeTextSequence"),i.exit("codeText"),e(h)):(s.type="codeTextData",d(h))}}function zy(i){let e={},t=-1,n,r,o,s,a,l,c;for(;++t<i.length;){for(;t in e;)t=e[t];if(n=i[t],t&&n[1].type==="chunkFlow"&&i[t-1][1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(e,kse(i,t)),t=e[t],c=!0);else if(n[1]._container){for(o=t,r=void 0;o--&&(s=i[o],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(r&&(i[r][1].type="lineEndingBlank"),s[1].type="lineEnding",r=o);r&&(n[1].end=Object.assign({},i[r][1].start),a=i.slice(r,t),a.unshift(n),gr(i,r,t-r+1,a))}}return!c}function kse(i,e){let t=i[e][1],n=i[e][2],r=e-1,o=[],s=t._tokenizer||n.parser[t.contentType](t.start),a=s.events,l=[],c={},d,u,h=-1,f=t,m=0,g=0,w=[g];for(;f;){for(;i[++r][1]!==f;);o.push(r),f._tokenizer||(d=n.sliceStream(f),f.next||d.push(null),u&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=t;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(g=h+1,w.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):w.pop(),h=w.length;h--;){let _=a.slice(w[h],w[h+1]),E=o.pop();l.unshift([E,E+_.length-1]),gr(i,E,2,_)}for(h=-1;++h<l.length;)c[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return c}var vE={tokenize:Ise,resolve:Tse},Ese={tokenize:Lse,partial:!0};function Tse(i){return zy(i),i}function Ise(i,e){let t;return n;function n(a){return i.enter("content"),t=i.enter("chunkContent",{contentType:"content"}),r(a)}function r(a){return a===null?o(a):at(a)?i.check(Ese,s,o)(a):(i.consume(a),r)}function o(a){return i.exit("chunkContent"),i.exit("content"),e(a)}function s(a){return i.consume(a),i.exit("chunkContent"),t.next=i.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,r}}function Lse(i,e,t){let n=this;return r;function r(s){return i.exit("chunkContent"),i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),$t(i,o,"linePrefix")}function o(s){if(s===null||at(s))return t(s);let a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):i.interrupt(n.parser.constructs.flow,t,e)(s)}}function By(i,e,t,n,r,o,s,a,l){let c=l||Number.POSITIVE_INFINITY,d=0;return u;function u(_){return _===60?(i.enter(n),i.enter(r),i.enter(o),i.consume(_),i.exit(o),h):_===null||_===32||_===41||Lg(_)?t(_):(i.enter(n),i.enter(s),i.enter(a),i.enter("chunkString",{contentType:"string"}),g(_))}function h(_){return _===62?(i.enter(o),i.consume(_),i.exit(o),i.exit(r),i.exit(n),e):(i.enter(a),i.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===62?(i.exit("chunkString"),i.exit(a),h(_)):_===null||_===60||at(_)?t(_):(i.consume(_),_===92?m:f)}function m(_){return _===60||_===62||_===92?(i.consume(_),f):f(_)}function g(_){return!d&&(_===null||_===41||En(_))?(i.exit("chunkString"),i.exit(a),i.exit(s),i.exit(n),e(_)):d<c&&_===40?(i.consume(_),d++,g):_===41?(i.consume(_),d--,g):_===null||_===32||_===40||Lg(_)?t(_):(i.consume(_),_===92?w:g)}function w(_){return _===40||_===41||_===92?(i.consume(_),g):g(_)}}function Hy(i,e,t,n,r,o){let s=this,a=0,l;return c;function c(f){return i.enter(n),i.enter(r),i.consume(f),i.exit(r),i.enter(o),d}function d(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?t(f):f===93?(i.exit(o),i.enter(r),i.consume(f),i.exit(r),i.exit(n),e):at(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),d):(i.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===null||f===91||f===93||at(f)||a++>999?(i.exit("chunkString"),d(f)):(i.consume(f),l||(l=!Wt(f)),f===92?h:u)}function h(f){return f===91||f===92||f===93?(i.consume(f),a++,u):u(f)}}function Uy(i,e,t,n,r,o){let s;return a;function a(h){return h===34||h===39||h===40?(i.enter(n),i.enter(r),i.consume(h),i.exit(r),s=h===40?41:h,l):t(h)}function l(h){return h===s?(i.enter(r),i.consume(h),i.exit(r),i.exit(n),e):(i.enter(o),c(h))}function c(h){return h===s?(i.exit(o),l(s)):h===null?t(h):at(h)?(i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),$t(i,c,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===s||h===null||at(h)?(i.exit("chunkString"),c(h)):(i.consume(h),h===92?u:d)}function u(h){return h===s||h===92?(i.consume(h),d):d(h)}}function Eu(i,e){let t;return n;function n(r){return at(r)?(i.enter("lineEnding"),i.consume(r),i.exit("lineEnding"),t=!0,n):Wt(r)?$t(i,n,t?"linePrefix":"lineSuffix")(r):e(r)}}var _E={name:"definition",tokenize:Dse},Ase={tokenize:Mse,partial:!0};function Dse(i,e,t){let n=this,r;return o;function o(f){return i.enter("definition"),s(f)}function s(f){return Hy.call(n,i,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return r=Ml(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(i.enter("definitionMarker"),i.consume(f),i.exit("definitionMarker"),l):t(f)}function l(f){return En(f)?Eu(i,c)(f):c(f)}function c(f){return By(i,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return i.attempt(Ase,u,u)(f)}function u(f){return Wt(f)?$t(i,h,"whitespace")(f):h(f)}function h(f){return f===null||at(f)?(i.exit("definition"),n.parser.defined.push(r),e(f)):t(f)}}function Mse(i,e,t){return n;function n(a){return En(a)?Eu(i,r)(a):t(a)}function r(a){return Uy(i,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Wt(a)?$t(i,s,"whitespace")(a):s(a)}function s(a){return a===null||at(a)?e(a):t(a)}}var yE={name:"hardBreakEscape",tokenize:Nse};function Nse(i,e,t){return n;function n(o){return i.enter("hardBreakEscape"),i.consume(o),r}function r(o){return at(o)?(i.exit("hardBreakEscape"),e(o)):t(o)}}var wE={name:"headingAtx",tokenize:Pse,resolve:Rse};function Rse(i,e){let t=i.length-2,n=3,r,o;return i[n][1].type==="whitespace"&&(n+=2),t-2>n&&i[t][1].type==="whitespace"&&(t-=2),i[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&i[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(r={type:"atxHeadingText",start:i[n][1].start,end:i[t][1].end},o={type:"chunkText",start:i[n][1].start,end:i[t][1].end,contentType:"text"},gr(i,n,t-n+1,[["enter",r,e],["enter",o,e],["exit",o,e],["exit",r,e]])),i}function Pse(i,e,t){let n=0;return r;function r(d){return i.enter("atxHeading"),o(d)}function o(d){return i.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&n++<6?(i.consume(d),s):d===null||En(d)?(i.exit("atxHeadingSequence"),a(d)):t(d)}function a(d){return d===35?(i.enter("atxHeadingSequence"),l(d)):d===null||at(d)?(i.exit("atxHeading"),e(d)):Wt(d)?$t(i,a,"whitespace")(d):(i.enter("atxHeadingText"),c(d))}function l(d){return d===35?(i.consume(d),l):(i.exit("atxHeadingSequence"),a(d))}function c(d){return d===null||d===35||En(d)?(i.exit("atxHeadingText"),a(d)):(i.consume(d),c)}}var QB=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],xE=["pre","script","style","textarea"];var CE={name:"htmlFlow",tokenize:Bse,resolveTo:zse,concrete:!0},Ose={tokenize:Use,partial:!0},Fse={tokenize:Hse,partial:!0};function zse(i){let e=i.length;for(;e--&&!(i[e][0]==="enter"&&i[e][1].type==="htmlFlow"););return e>1&&i[e-2][1].type==="linePrefix"&&(i[e][1].start=i[e-2][1].start,i[e+1][1].start=i[e-2][1].start,i.splice(e-2,2)),i}function Bse(i,e,t){let n=this,r,o,s,a,l;return c;function c(G){return d(G)}function d(G){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(G),u}function u(G){return G===33?(i.consume(G),h):G===47?(i.consume(G),o=!0,g):G===63?(i.consume(G),r=3,n.interrupt?e:R):zo(G)?(i.consume(G),s=String.fromCharCode(G),w):t(G)}function h(G){return G===45?(i.consume(G),r=2,f):G===91?(i.consume(G),r=5,a=0,m):zo(G)?(i.consume(G),r=4,n.interrupt?e:R):t(G)}function f(G){return G===45?(i.consume(G),n.interrupt?e:R):t(G)}function m(G){let Tt="CDATA[";return G===Tt.charCodeAt(a++)?(i.consume(G),a===Tt.length?n.interrupt?e:Pe:m):t(G)}function g(G){return zo(G)?(i.consume(G),s=String.fromCharCode(G),w):t(G)}function w(G){if(G===null||G===47||G===62||En(G)){let Tt=G===47,Ft=s.toLowerCase();return!Tt&&!o&&xE.includes(Ft)?(r=1,n.interrupt?e(G):Pe(G)):QB.includes(s.toLowerCase())?(r=6,Tt?(i.consume(G),_):n.interrupt?e(G):Pe(G)):(r=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(G):o?E(G):A(G))}return G===45||Zr(G)?(i.consume(G),s+=String.fromCharCode(G),w):t(G)}function _(G){return G===62?(i.consume(G),n.interrupt?e:Pe):t(G)}function E(G){return Wt(G)?(i.consume(G),E):Z(G)}function A(G){return G===47?(i.consume(G),Z):G===58||G===95||zo(G)?(i.consume(G),L):Wt(G)?(i.consume(G),A):Z(G)}function L(G){return G===45||G===46||G===58||G===95||Zr(G)?(i.consume(G),L):O(G)}function O(G){return G===61?(i.consume(G),U):Wt(G)?(i.consume(G),O):A(G)}function U(G){return G===null||G===60||G===61||G===62||G===96?t(G):G===34||G===39?(i.consume(G),l=G,Q):Wt(G)?(i.consume(G),U):ae(G)}function Q(G){return G===l?(i.consume(G),l=null,te):G===null||at(G)?t(G):(i.consume(G),Q)}function ae(G){return G===null||G===34||G===39||G===47||G===60||G===61||G===62||G===96||En(G)?O(G):(i.consume(G),ae)}function te(G){return G===47||G===62||Wt(G)?A(G):t(G)}function Z(G){return G===62?(i.consume(G),ve):t(G)}function ve(G){return G===null||at(G)?Pe(G):Wt(G)?(i.consume(G),ve):t(G)}function Pe(G){return G===45&&r===2?(i.consume(G),dt):G===60&&r===1?(i.consume(G),be):G===62&&r===4?(i.consume(G),re):G===63&&r===3?(i.consume(G),R):G===93&&r===5?(i.consume(G),Y):at(G)&&(r===6||r===7)?(i.exit("htmlFlowData"),i.check(Ose,me,Ee)(G)):G===null||at(G)?(i.exit("htmlFlowData"),Ee(G)):(i.consume(G),Pe)}function Ee(G){return i.check(Fse,Oe,me)(G)}function Oe(G){return i.enter("lineEnding"),i.consume(G),i.exit("lineEnding"),Xe}function Xe(G){return G===null||at(G)?Ee(G):(i.enter("htmlFlowData"),Pe(G))}function dt(G){return G===45?(i.consume(G),R):Pe(G)}function be(G){return G===47?(i.consume(G),s="",we):Pe(G)}function we(G){if(G===62){let Tt=s.toLowerCase();return xE.includes(Tt)?(i.consume(G),re):Pe(G)}return zo(G)&&s.length<8?(i.consume(G),s+=String.fromCharCode(G),we):Pe(G)}function Y(G){return G===93?(i.consume(G),R):Pe(G)}function R(G){return G===62?(i.consume(G),re):G===45&&r===2?(i.consume(G),R):Pe(G)}function re(G){return G===null||at(G)?(i.exit("htmlFlowData"),me(G)):(i.consume(G),re)}function me(G){return i.exit("htmlFlow"),e(G)}}function Hse(i,e,t){let n=this;return r;function r(s){return at(s)?(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o):t(s)}function o(s){return n.parser.lazy[n.now().line]?t(s):e(s)}}function Use(i,e,t){return n;function n(r){return i.enter("lineEnding"),i.consume(r),i.exit("lineEnding"),i.attempt(nd,e,t)}}var SE={name:"htmlText",tokenize:jse};function jse(i,e,t){let n=this,r,o,s;return a;function a(R){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(R),l}function l(R){return R===33?(i.consume(R),c):R===47?(i.consume(R),O):R===63?(i.consume(R),A):zo(R)?(i.consume(R),ae):t(R)}function c(R){return R===45?(i.consume(R),d):R===91?(i.consume(R),o=0,m):zo(R)?(i.consume(R),E):t(R)}function d(R){return R===45?(i.consume(R),f):t(R)}function u(R){return R===null?t(R):R===45?(i.consume(R),h):at(R)?(s=u,be(R)):(i.consume(R),u)}function h(R){return R===45?(i.consume(R),f):u(R)}function f(R){return R===62?dt(R):R===45?h(R):u(R)}function m(R){let re="CDATA[";return R===re.charCodeAt(o++)?(i.consume(R),o===re.length?g:m):t(R)}function g(R){return R===null?t(R):R===93?(i.consume(R),w):at(R)?(s=g,be(R)):(i.consume(R),g)}function w(R){return R===93?(i.consume(R),_):g(R)}function _(R){return R===62?dt(R):R===93?(i.consume(R),_):g(R)}function E(R){return R===null||R===62?dt(R):at(R)?(s=E,be(R)):(i.consume(R),E)}function A(R){return R===null?t(R):R===63?(i.consume(R),L):at(R)?(s=A,be(R)):(i.consume(R),A)}function L(R){return R===62?dt(R):A(R)}function O(R){return zo(R)?(i.consume(R),U):t(R)}function U(R){return R===45||Zr(R)?(i.consume(R),U):Q(R)}function Q(R){return at(R)?(s=Q,be(R)):Wt(R)?(i.consume(R),Q):dt(R)}function ae(R){return R===45||Zr(R)?(i.consume(R),ae):R===47||R===62||En(R)?te(R):t(R)}function te(R){return R===47?(i.consume(R),dt):R===58||R===95||zo(R)?(i.consume(R),Z):at(R)?(s=te,be(R)):Wt(R)?(i.consume(R),te):dt(R)}function Z(R){return R===45||R===46||R===58||R===95||Zr(R)?(i.consume(R),Z):ve(R)}function ve(R){return R===61?(i.consume(R),Pe):at(R)?(s=ve,be(R)):Wt(R)?(i.consume(R),ve):te(R)}function Pe(R){return R===null||R===60||R===61||R===62||R===96?t(R):R===34||R===39?(i.consume(R),r=R,Ee):at(R)?(s=Pe,be(R)):Wt(R)?(i.consume(R),Pe):(i.consume(R),Oe)}function Ee(R){return R===r?(i.consume(R),r=void 0,Xe):R===null?t(R):at(R)?(s=Ee,be(R)):(i.consume(R),Ee)}function Oe(R){return R===null||R===34||R===39||R===60||R===61||R===96?t(R):R===47||R===62||En(R)?te(R):(i.consume(R),Oe)}function Xe(R){return R===47||R===62||En(R)?te(R):t(R)}function dt(R){return R===62?(i.consume(R),i.exit("htmlTextData"),i.exit("htmlText"),e):t(R)}function be(R){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(R),i.exit("lineEnding"),we}function we(R){return Wt(R)?$t(i,Y,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):Y(R)}function Y(R){return i.enter("htmlTextData"),s(R)}}var Tu={name:"labelEnd",tokenize:Gse,resolveTo:$se,resolveAll:Kse},Wse={tokenize:Yse},Vse={tokenize:Xse},qse={tokenize:Qse};function Kse(i){let e=-1;for(;++e<i.length;){let t=i[e][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(i.splice(e+1,t.type==="labelImage"?4:2),t.type="data",e++)}return i}function $se(i,e){let t=i.length,n=0,r,o,s,a;for(;t--;)if(r=i[t][1],o){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;i[t][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(s){if(i[t][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(o=t,r.type!=="labelLink")){n=2;break}}else r.type==="labelEnd"&&(s=t);let l={type:i[o][1].type==="labelLink"?"link":"image",start:Object.assign({},i[o][1].start),end:Object.assign({},i[i.length-1][1].end)},c={type:"label",start:Object.assign({},i[o][1].start),end:Object.assign({},i[s][1].end)},d={type:"labelText",start:Object.assign({},i[o+n+2][1].end),end:Object.assign({},i[s-2][1].start)};return a=[["enter",l,e],["enter",c,e]],a=Qr(a,i.slice(o+1,o+n+3)),a=Qr(a,[["enter",d,e]]),a=Qr(a,Mf(e.parser.constructs.insideSpan.null,i.slice(o+n+4,s-3),e)),a=Qr(a,[["exit",d,e],i[s-2],i[s-1],["exit",c,e]]),a=Qr(a,i.slice(s+1)),a=Qr(a,[["exit",l,e]]),gr(i,o,i.length,a),i}function Gse(i,e,t){let n=this,r=n.events.length,o,s;for(;r--;)if((n.events[r][1].type==="labelImage"||n.events[r][1].type==="labelLink")&&!n.events[r][1]._balanced){o=n.events[r][1];break}return a;function a(h){return o?o._inactive?u(h):(s=n.parser.defined.includes(Ml(n.sliceSerialize({start:o.end,end:n.now()}))),i.enter("labelEnd"),i.enter("labelMarker"),i.consume(h),i.exit("labelMarker"),i.exit("labelEnd"),l):t(h)}function l(h){return h===40?i.attempt(Wse,d,s?d:u)(h):h===91?i.attempt(Vse,d,s?c:u)(h):s?d(h):u(h)}function c(h){return i.attempt(qse,d,u)(h)}function d(h){return e(h)}function u(h){return o._balanced=!0,t(h)}}function Yse(i,e,t){return n;function n(u){return i.enter("resource"),i.enter("resourceMarker"),i.consume(u),i.exit("resourceMarker"),r}function r(u){return En(u)?Eu(i,o)(u):o(u)}function o(u){return u===41?d(u):By(i,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function s(u){return En(u)?Eu(i,l)(u):d(u)}function a(u){return t(u)}function l(u){return u===34||u===39||u===40?Uy(i,c,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):d(u)}function c(u){return En(u)?Eu(i,d)(u):d(u)}function d(u){return u===41?(i.enter("resourceMarker"),i.consume(u),i.exit("resourceMarker"),i.exit("resource"),e):t(u)}}function Xse(i,e,t){let n=this;return r;function r(a){return Hy.call(n,i,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return n.parser.defined.includes(Ml(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(a):t(a)}function s(a){return t(a)}}function Qse(i,e,t){return n;function n(o){return i.enter("reference"),i.enter("referenceMarker"),i.consume(o),i.exit("referenceMarker"),r}function r(o){return o===93?(i.enter("referenceMarker"),i.consume(o),i.exit("referenceMarker"),i.exit("reference"),e):t(o)}}var kE={name:"labelStartImage",tokenize:Zse,resolveAll:Tu.resolveAll};function Zse(i,e,t){let n=this;return r;function r(a){return i.enter("labelImage"),i.enter("labelImageMarker"),i.consume(a),i.exit("labelImageMarker"),o}function o(a){return a===91?(i.enter("labelMarker"),i.consume(a),i.exit("labelMarker"),i.exit("labelImage"),s):t(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(a):e(a)}}var EE={name:"labelStartLink",tokenize:Jse,resolveAll:Tu.resolveAll};function Jse(i,e,t){let n=this;return r;function r(s){return i.enter("labelLink"),i.enter("labelMarker"),i.consume(s),i.exit("labelMarker"),i.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(s):e(s)}}var Ng={name:"lineEnding",tokenize:eae};function eae(i,e){return t;function t(n){return i.enter("lineEnding"),i.consume(n),i.exit("lineEnding"),$t(i,e,"linePrefix")}}var Iu={name:"thematicBreak",tokenize:tae};function tae(i,e,t){let n=0,r;return o;function o(c){return i.enter("thematicBreak"),s(c)}function s(c){return r=c,a(c)}function a(c){return c===r?(i.enter("thematicBreakSequence"),l(c)):n>=3&&(c===null||at(c))?(i.exit("thematicBreak"),e(c)):t(c)}function l(c){return c===r?(i.consume(c),n++,l):(i.exit("thematicBreakSequence"),Wt(c)?$t(i,a,"whitespace")(c):a(c))}}var Pr={name:"list",tokenize:rae,continuation:{tokenize:oae},exit:aae},iae={tokenize:lae,partial:!0},nae={tokenize:sae,partial:!0};function rae(i,e,t){let n=this,r=n.events[n.events.length-1],o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(f){let m=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Ag(f)){if(n.containerState.type||(n.containerState.type=m,i.enter(m,{_container:!0})),m==="listUnordered")return i.enter("listItemPrefix"),f===42||f===45?i.check(Iu,t,c)(f):c(f);if(!n.interrupt||f===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),l(f)}return t(f)}function l(f){return Ag(f)&&++s<10?(i.consume(f),l):(!n.interrupt||s<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(i.exit("listItemValue"),c(f)):t(f)}function c(f){return i.enter("listItemMarker"),i.consume(f),i.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,i.check(nd,n.interrupt?t:d,i.attempt(iae,h,u))}function d(f){return n.containerState.initialBlankLine=!0,o++,h(f)}function u(f){return Wt(f)?(i.enter("listItemPrefixWhitespace"),i.consume(f),i.exit("listItemPrefixWhitespace"),h):t(f)}function h(f){return n.containerState.size=o+n.sliceSerialize(i.exit("listItemPrefix"),!0).length,e(f)}}function oae(i,e,t){let n=this;return n.containerState._closeFlow=void 0,i.check(nd,r,o);function r(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,$t(i,e,"listItemIndent",n.containerState.size+1)(a)}function o(a){return n.containerState.furtherBlankLines||!Wt(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i.attempt(nae,e,s)(a))}function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,$t(i,i.attempt(Pr,e,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function sae(i,e,t){let n=this;return $t(i,r,"listItemIndent",n.containerState.size+1);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?e(o):t(o)}}function aae(i){i.exit(this.containerState.type)}function lae(i,e,t){let n=this;return $t(i,r,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function r(o){let s=n.events[n.events.length-1];return!Wt(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):t(o)}}var jy={name:"setextUnderline",tokenize:dae,resolveTo:cae};function cae(i,e){let t=i.length,n,r,o;for(;t--;)if(i[t][0]==="enter"){if(i[t][1].type==="content"){n=t;break}i[t][1].type==="paragraph"&&(r=t)}else i[t][1].type==="content"&&i.splice(t,1),!o&&i[t][1].type==="definition"&&(o=t);let s={type:"setextHeading",start:Object.assign({},i[r][1].start),end:Object.assign({},i[i.length-1][1].end)};return i[r][1].type="setextHeadingText",o?(i.splice(r,0,["enter",s,e]),i.splice(o+1,0,["exit",i[n][1],e]),i[n][1].end=Object.assign({},i[o][1].end)):i[n][1]=s,i.push(["exit",s,e]),i}function dae(i,e,t){let n=this,r;return o;function o(c){let d=n.events.length,u;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){u=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||u)?(i.enter("setextHeadingLine"),r=c,s(c)):t(c)}function s(c){return i.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===r?(i.consume(c),a):(i.exit("setextHeadingLineSequence"),Wt(c)?$t(i,l,"lineSuffix")(c):l(c))}function l(c){return c===null||at(c)?(i.exit("setextHeadingLine"),e(c)):t(c)}}var ZB={tokenize:uae};function uae(i){let e=this,t=i.attempt(nd,n,i.attempt(this.parser.constructs.flowInitial,r,$t(i,i.attempt(this.parser.constructs.flow,r,i.attempt(vE,r)),"linePrefix")));return t;function n(o){if(o===null){i.consume(o);return}return i.enter("lineEndingBlank"),i.consume(o),i.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function r(o){if(o===null){i.consume(o);return}return i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),e.currentConstruct=void 0,t}}var JB={resolveAll:nH()},eH=iH("string"),tH=iH("text");function iH(i){return{tokenize:e,resolveAll:nH(i==="text"?hae:void 0)};function e(t){let n=this,r=this.parser.constructs[i],o=t.attempt(r,s,a);return s;function s(d){return c(d)?o(d):a(d)}function a(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),l}function l(d){return c(d)?(t.exit("data"),o(d)):(t.consume(d),l)}function c(d){if(d===null)return!0;let u=r[d],h=-1;if(u)for(;++h<u.length;){let f=u[h];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function nH(i){return e;function e(t,n){let r=-1,o;for(;++r<=t.length;)o===void 0?t[r]&&t[r][1].type==="data"&&(o=r,r++):(!t[r]||t[r][1].type!=="data")&&(r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),r=o+2),o=void 0);return i?i(t,n):t}}function hae(i,e){let t=0;for(;++t<=i.length;)if((t===i.length||i[t][1].type==="lineEnding")&&i[t-1][1].type==="data"){let n=i[t-1][1],r=e.sliceStream(n),o=r.length,s=-1,a=0,l;for(;o--;){let c=r[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)l=!0,a++;else if(c!==-1){o++;break}}if(a){let c={type:t===i.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-a,offset:n.end.offset-a,_index:n.start._index+o,_bufferIndex:o?s:n.start._bufferIndex+s},end:Object.assign({},n.end)};n.end=Object.assign({},c.start),n.start.offset===n.end.offset?Object.assign(n,c):(i.splice(t,0,["enter",c,e],["exit",c,e]),t+=2)}t++}return i}function rH(i,e,t){let n=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),r={},o=[],s=[],a=[],l=!0,c={consume:L,enter:O,exit:U,attempt:te(Q),check:te(ae),interrupt:te(ae,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:i,sliceStream:g,sliceSerialize:m,now:w,defineSkip:_,write:f},u=e.tokenize.call(d,c),h;return e.resolveAll&&o.push(e),d;function f(Ee){return s=Qr(s,Ee),E(),s[s.length-1]!==null?[]:(Z(e,0),d.events=Mf(o,d.events,d),d.events)}function m(Ee,Oe){return pae(g(Ee),Oe)}function g(Ee){return fae(s,Ee)}function w(){let{line:Ee,column:Oe,offset:Xe,_index:dt,_bufferIndex:be}=n;return{line:Ee,column:Oe,offset:Xe,_index:dt,_bufferIndex:be}}function _(Ee){r[Ee.line]=Ee.column,Pe()}function E(){let Ee;for(;n._index<s.length;){let Oe=s[n._index];if(typeof Oe=="string")for(Ee=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===Ee&&n._bufferIndex<Oe.length;)A(Oe.charCodeAt(n._bufferIndex));else A(Oe)}}function A(Ee){l=void 0,h=Ee,u=u(Ee)}function L(Ee){at(Ee)?(n.line++,n.column=1,n.offset+=Ee===-3?2:1,Pe()):Ee!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),d.previous=Ee,l=!0}function O(Ee,Oe){let Xe=Oe||{};return Xe.type=Ee,Xe.start=w(),d.events.push(["enter",Xe,d]),a.push(Xe),Xe}function U(Ee){let Oe=a.pop();return Oe.end=w(),d.events.push(["exit",Oe,d]),Oe}function Q(Ee,Oe){Z(Ee,Oe.from)}function ae(Ee,Oe){Oe.restore()}function te(Ee,Oe){return Xe;function Xe(dt,be,we){let Y,R,re,me;return Array.isArray(dt)?Tt(dt):"tokenize"in dt?Tt([dt]):G(dt);function G(Et){return Ii;function Ii(pi){let ko=pi!==null&&Et[pi],oo=pi!==null&&Et.null,Ic=[...Array.isArray(ko)?ko:ko?[ko]:[],...Array.isArray(oo)?oo:oo?[oo]:[]];return Tt(Ic)(pi)}}function Tt(Et){return Y=Et,R=0,Et.length===0?we:Ft(Et[R])}function Ft(Et){return Ii;function Ii(pi){return me=ve(),re=Et,Et.partial||(d.currentConstruct=Et),Et.name&&d.parser.constructs.disable.null.includes(Et.name)?Li(pi):Et.tokenize.call(Oe?Object.assign(Object.create(d),Oe):d,c,li,Li)(pi)}}function li(Et){return l=!0,Ee(re,me),be}function Li(Et){return l=!0,me.restore(),++R<Y.length?Ft(Y[R]):we}}}function Z(Ee,Oe){Ee.resolveAll&&!o.includes(Ee)&&o.push(Ee),Ee.resolve&&gr(d.events,Oe,d.events.length-Oe,Ee.resolve(d.events.slice(Oe),d)),Ee.resolveTo&&(d.events=Ee.resolveTo(d.events,d))}function ve(){let Ee=w(),Oe=d.previous,Xe=d.currentConstruct,dt=d.events.length,be=Array.from(a);return{restore:we,from:dt};function we(){n=Ee,d.previous=Oe,d.currentConstruct=Xe,d.events.length=dt,a=be,Pe()}}function Pe(){n.line in r&&n.column<2&&(n.column=r[n.line],n.offset+=r[n.line]-1)}}function fae(i,e){let t=e.start._index,n=e.start._bufferIndex,r=e.end._index,o=e.end._bufferIndex,s;if(t===r)s=[i[t].slice(n,o)];else{if(s=i.slice(t,r),n>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(n):s.shift()}o>0&&s.push(i[r].slice(0,o))}return s}function pae(i,e){let t=-1,n=[],r;for(;++t<i.length;){let o=i[t],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
`;break}case-3:{s=`\r
`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&r)continue;s=" ";break}default:s=String.fromCharCode(o)}r=o===-2,n.push(s)}return n.join("")}var TE={};Xh(TE,{attentionMarkers:()=>xae,contentInitial:()=>gae,disable:()=>Cae,document:()=>mae,flow:()=>vae,flowInitial:()=>bae,insideSpan:()=>wae,string:()=>_ae,text:()=>yae});var mae={42:Pr,43:Pr,45:Pr,48:Pr,49:Pr,50:Pr,51:Pr,52:Pr,53:Pr,54:Pr,55:Pr,56:Pr,57:Pr,62:Ry},gae={91:_E},bae={[-2]:Mg,[-1]:Mg,32:Mg},vae={35:wE,42:Iu,45:[jy,Iu],60:CE,61:jy,95:Iu,96:Fy,126:Fy},_ae={38:Oy,92:Py},yae={[-5]:Ng,[-4]:Ng,[-3]:Ng,33:kE,38:Oy,42:Dg,60:[gE,SE],91:EE,92:[yE,Py],93:Tu,95:Dg,96:bE},wae={null:[Dg,JB]},xae={null:[42,95]},Cae={null:[]};function IE(i){let t=UB([TE,...(i||{}).extensions||[]]),n={defined:[],lazy:{},constructs:t,content:r(KB),document:r(GB),flow:r(ZB),string:r(eH),text:r(tH)};return n;function r(o){return s;function s(a){return rH(n,o,a)}}}function LE(i){for(;!zy(i););return i}var oH=/[\0\t\n\r]/g;function AE(){let i=1,e="",t=!0,n;return r;function r(o,s,a){let l=[],c,d,u,h,f;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),u=0,e="",t&&(o.charCodeAt(0)===65279&&u++,t=void 0);u<o.length;){if(oH.lastIndex=u,c=oH.exec(o),h=c&&c.index!==void 0?c.index:o.length,f=o.charCodeAt(h),!c){e=o.slice(u);break}if(f===10&&u===h&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),u<h&&(l.push(o.slice(u,h)),i+=h-u),f){case 0:{l.push(65533),i++;break}case 9:{for(d=Math.ceil(i/4)*4,l.push(-2);i++<d;)l.push(-1);break}case 10:{l.push(-4),i=1;break}default:n=!0,i=1}u=h+1}return a&&(n&&l.push(-5),e&&l.push(e),l.push(null)),l}}var Sae=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sH(i){return i.replace(Sae,kae)}function kae(i,e,t){if(e)return e;if(t.charCodeAt(0)===35){let r=t.charCodeAt(1),o=r===120||r===88;return Ny(t.slice(o?2:1),o?16:10)}return Zh(t)||i}function Nf(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?aH(i.position):"start"in i||"end"in i?aH(i):"line"in i||"column"in i?DE(i):""}function DE(i){return lH(i&&i.line)+":"+lH(i&&i.column)}function aH(i){return DE(i&&i.start)+"-"+DE(i&&i.end)}function lH(i){return i&&typeof i=="number"?i:1}var dH={}.hasOwnProperty;function ME(i,e,t){return typeof e!="string"&&(t=e,e=void 0),Eae(t)(LE(IE(t).document().write(AE()(i,e,!0))))}function Eae(i){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Yo),autolinkProtocol:te,autolinkEmail:te,atxHeading:o(Lc),blockQuote:o(Ii),characterEscape:te,characterReference:te,codeFenced:o(pi),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(pi,s),codeText:o(ko,s),codeTextData:te,data:te,codeFlowValue:te,definition:o(oo),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Ic),hardBreakEscape:o(sl),hardBreakTrailing:o(sl),htmlFlow:o(ou,s),htmlFlowData:te,htmlText:o(ou,s),htmlTextData:te,image:o(zn),label:s,link:o(Yo),listItem:o(x3),listItemValue:h,listOrdered:o(pn,u),listUnordered:o(pn),paragraph:o(C3),reference:G,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Lc),strong:o(S3),thematicBreak:o(Xi)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:Et,autolinkProtocol:Li,blockQuote:l(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:Ft,characterReferenceMarkerNumeric:Ft,characterReferenceValue:li,codeFenced:l(w),codeFencedFence:g,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:Z,codeIndented:l(_),codeText:l(Xe),codeTextData:Z,data:Z,definition:l(),definitionDestinationString:L,definitionLabelString:E,definitionTitleString:A,emphasis:l(),hardBreakEscape:l(Pe),hardBreakTrailing:l(Pe),htmlFlow:l(Ee),htmlFlowData:Z,htmlText:l(Oe),htmlTextData:Z,image:l(be),label:Y,labelText:we,lineEnding:ve,link:l(dt),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Tt,resourceDestinationString:R,resourceTitleString:re,resource:me,setextHeading:l(ae),setextHeadingLineSequence:Q,setextHeadingText:U,strong:l(),thematicBreak:l()}};uH(e,(i||{}).mdastExtensions||[]);let t={};return n;function n(ge){let De={type:"root",children:[]},bt={stack:[De],tokenStack:[],config:e,enter:a,exit:c,buffer:s,resume:d,data:t},Vt=[],xi=-1;for(;++xi<ge.length;)if(ge[xi][1].type==="listOrdered"||ge[xi][1].type==="listUnordered")if(ge[xi][0]==="enter")Vt.push(xi);else{let Ci=Vt.pop();xi=r(ge,Ci,xi)}for(xi=-1;++xi<ge.length;){let Ci=e[ge[xi][0]];dH.call(Ci,ge[xi][1].type)&&Ci[ge[xi][1].type].call(Object.assign({sliceSerialize:ge[xi][2].sliceSerialize},bt),ge[xi][1])}if(bt.tokenStack.length>0){let Ci=bt.tokenStack[bt.tokenStack.length-1];(Ci[1]||cH).call(bt,void 0,Ci[0])}for(De.position={start:rd(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:rd(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},xi=-1;++xi<e.transforms.length;)De=e.transforms[xi](De)||De;return De}function r(ge,De,bt){let Vt=De-1,xi=-1,Ci=!1,ys,ws,su,Ac;for(;++Vt<=bt;){let Sr=ge[Vt];switch(Sr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Sr[0]==="enter"?xi++:xi--,Ac=void 0;break}case"lineEndingBlank":{Sr[0]==="enter"&&(ys&&!Ac&&!xi&&!su&&(su=Vt),Ac=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ac=void 0}if(!xi&&Sr[0]==="enter"&&Sr[1].type==="listItemPrefix"||xi===-1&&Sr[0]==="exit"&&(Sr[1].type==="listUnordered"||Sr[1].type==="listOrdered")){if(ys){let Dc=Vt;for(ws=void 0;Dc--;){let xs=ge[Dc];if(xs[1].type==="lineEnding"||xs[1].type==="lineEndingBlank"){if(xs[0]==="exit")continue;ws&&(ge[ws][1].type="lineEndingBlank",Ci=!0),xs[1].type="lineEnding",ws=Dc}else if(!(xs[1].type==="linePrefix"||xs[1].type==="blockQuotePrefix"||xs[1].type==="blockQuotePrefixWhitespace"||xs[1].type==="blockQuoteMarker"||xs[1].type==="listItemIndent"))break}su&&(!ws||su<ws)&&(ys._spread=!0),ys.end=Object.assign({},ws?ge[ws][1].start:Sr[1].end),ge.splice(ws||Vt,0,["exit",ys,Sr[2]]),Vt++,bt++}if(Sr[1].type==="listItemPrefix"){let Dc={type:"listItem",_spread:!1,start:Object.assign({},Sr[1].start),end:void 0};ys=Dc,ge.splice(Vt,0,["enter",Dc,Sr[2]]),Vt++,bt++,su=void 0,Ac=!0}}}return ge[De][1]._spread=Ci,bt}function o(ge,De){return bt;function bt(Vt){a.call(this,ge(Vt),Vt),De&&De.call(this,Vt)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(ge,De,bt){this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([De,bt]),ge.position={start:rd(De.start),end:void 0}}function l(ge){return De;function De(bt){ge&&ge.call(this,bt),c.call(this,bt)}}function c(ge,De){let bt=this.stack.pop(),Vt=this.tokenStack.pop();if(Vt)Vt[0].type!==ge.type&&(De?De.call(this,ge,Vt[0]):(Vt[1]||cH).call(this,ge,Vt[0]));else throw new Error("Cannot close `"+ge.type+"` ("+Nf({start:ge.start,end:ge.end})+"): it\u2019s not open");bt.position.end=rd(ge.end)}function d(){return fE(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function h(ge){if(this.data.expectingFirstListItemValue){let De=this.stack[this.stack.length-2];De.start=Number.parseInt(this.sliceSerialize(ge),10),this.data.expectingFirstListItemValue=void 0}}function f(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.lang=ge}function m(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.meta=ge}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge.replace(/(\r?\n|\r)$/g,"")}function E(ge){let De=this.resume(),bt=this.stack[this.stack.length-1];bt.label=De,bt.identifier=Ml(this.sliceSerialize(ge)).toLowerCase()}function A(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.title=ge}function L(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.url=ge}function O(ge){let De=this.stack[this.stack.length-1];if(!De.depth){let bt=this.sliceSerialize(ge).length;De.depth=bt}}function U(){this.data.setextHeadingSlurpLineEnding=!0}function Q(ge){let De=this.stack[this.stack.length-1];De.depth=this.sliceSerialize(ge).codePointAt(0)===61?1:2}function ae(){this.data.setextHeadingSlurpLineEnding=void 0}function te(ge){let bt=this.stack[this.stack.length-1].children,Vt=bt[bt.length-1];(!Vt||Vt.type!=="text")&&(Vt=Dv(),Vt.position={start:rd(ge.start),end:void 0},bt.push(Vt)),this.stack.push(Vt)}function Z(ge){let De=this.stack.pop();De.value+=this.sliceSerialize(ge),De.position.end=rd(ge.end)}function ve(ge){let De=this.stack[this.stack.length-1];if(this.data.atHardBreak){let bt=De.children[De.children.length-1];bt.position.end=rd(ge.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(De.type)&&(te.call(this,ge),Z.call(this,ge))}function Pe(){this.data.atHardBreak=!0}function Ee(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge}function Oe(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge}function Xe(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge}function dt(){let ge=this.stack[this.stack.length-1];if(this.data.inReference){let De=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=De,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function be(){let ge=this.stack[this.stack.length-1];if(this.data.inReference){let De=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=De,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function we(ge){let De=this.sliceSerialize(ge),bt=this.stack[this.stack.length-2];bt.label=sH(De),bt.identifier=Ml(De).toLowerCase()}function Y(){let ge=this.stack[this.stack.length-1],De=this.resume(),bt=this.stack[this.stack.length-1];if(this.data.inReference=!0,bt.type==="link"){let Vt=ge.children;bt.children=Vt}else bt.alt=De}function R(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.url=ge}function re(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.title=ge}function me(){this.data.inReference=void 0}function G(){this.data.referenceType="collapsed"}function Tt(ge){let De=this.resume(),bt=this.stack[this.stack.length-1];bt.label=De,bt.identifier=Ml(this.sliceSerialize(ge)).toLowerCase(),this.data.referenceType="full"}function Ft(ge){this.data.characterReferenceType=ge.type}function li(ge){let De=this.sliceSerialize(ge),bt=this.data.characterReferenceType,Vt;bt?(Vt=Ny(De,bt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Vt=Zh(De);let xi=this.stack.pop();xi.value+=Vt,xi.position.end=rd(ge.end)}function Li(ge){Z.call(this,ge);let De=this.stack[this.stack.length-1];De.url=this.sliceSerialize(ge)}function Et(ge){Z.call(this,ge);let De=this.stack[this.stack.length-1];De.url="mailto:"+this.sliceSerialize(ge)}function Ii(){return{type:"blockquote",children:[]}}function pi(){return{type:"code",lang:null,meta:null,value:""}}function ko(){return{type:"inlineCode",value:""}}function oo(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ic(){return{type:"emphasis",children:[]}}function Lc(){return{type:"heading",depth:0,children:[]}}function sl(){return{type:"break"}}function ou(){return{type:"html",value:""}}function zn(){return{type:"image",title:null,url:"",alt:null}}function Yo(){return{type:"link",title:null,url:"",children:[]}}function pn(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[]}}function x3(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[]}}function C3(){return{type:"paragraph",children:[]}}function S3(){return{type:"strong",children:[]}}function Dv(){return{type:"text",value:""}}function Xi(){return{type:"thematicBreak"}}}function rd(i){return{line:i.line,column:i.column,offset:i.offset}}function uH(i,e){let t=-1;for(;++t<e.length;){let n=e[t];Array.isArray(n)?uH(i,n):Tae(i,n)}}function Tae(i,e){let t;for(t in e)if(dH.call(e,t))switch(t){case"canContainEols":{let n=e[t];n&&i[t].push(...n);break}case"transforms":{let n=e[t];n&&i[t].push(...n);break}case"enter":case"exit":{let n=e[t];n&&Object.assign(i[t],n);break}}}function cH(i,e){throw i?new Error("Cannot close `"+i.type+"` ("+Nf({start:i.start,end:i.end})+"): a different token (`"+e.type+"`, "+Nf({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Nf({start:e.start,end:e.end})+") is still open")}function Wy(i){let e=this;e.parser=t;function t(n){return ME(n,xt(ue(ue({},e.data("settings")),i),{extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]}))}}function Rf(i,e){let t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let n=0,r=t.indexOf(e);for(;r!==-1;)n++,r=t.indexOf(e,r+e.length);return n}var Iae=od(new RegExp("\\p{P}","u")),OEe=od(/[A-Za-z]/),FEe=od(/[\dA-Za-z]/),zEe=od(/[#-'*+\--9=?A-Z^-~]/);var BEe=od(/\d/),HEe=od(/[\dA-Fa-f]/),Lae=od(/[!-/:-@[-`{-~]/);function hH(i){return Lae(i)||Iae(i)}var fH=od(/\s/);function od(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function NE(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var La=function(i){if(i==null)return Nae;if(typeof i=="function")return Vy(i);if(typeof i=="object")return Array.isArray(i)?Aae(i):Dae(i);if(typeof i=="string")return Mae(i);throw new Error("Expected function, string, or object as test")};function Aae(i){let e=[],t=-1;for(;++t<i.length;)e[t]=La(i[t]);return Vy(n);function n(...r){let o=-1;for(;++o<e.length;)if(e[o].apply(this,r))return!0;return!1}}function Dae(i){let e=i;return Vy(t);function t(n){let r=n,o;for(o in i)if(r[o]!==e[o])return!1;return!0}}function Mae(i){return Vy(e);function e(t){return t&&t.type===i}}function Vy(i){return e;function e(t,n,r){return!!(Rae(t)&&i.call(this,t,typeof n=="number"?n:void 0,r||void 0))}}function Nae(){return!0}function Rae(i){return i!==null&&typeof i=="object"&&"type"in i}var pH=[],qy=!0,Lu=!1,Pf="skip";function Au(i,e,t,n){let r;typeof e=="function"&&typeof t!="function"?(n=t,t=e):r=e;let o=La(r),s=n?-1:1;a(i,void 0,[])();function a(l,c,d){let u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){let f=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=pH,m,g,w;if((!e||o(l,c,d[d.length-1]||void 0))&&(f=Pae(t(l,d)),f[0]===Lu))return f;if("children"in l&&l.children){let _=l;if(_.children&&f[0]!==Pf)for(g=(n?_.children.length:-1)+s,w=d.concat(_);g>-1&&g<_.children.length;){let E=_.children[g];if(m=a(E,g,w)(),m[0]===Lu)return m;g=typeof m[1]=="number"?m[1]:g+s}}return f}}}function Pae(i){return Array.isArray(i)?i:typeof i=="number"?[qy,i]:i==null?pH:[i]}function RE(i,e,t){let r=La((t||{}).ignore||[]),o=Oae(e),s=-1;for(;++s<o.length;)Au(i,"text",a);function a(c,d){let u=-1,h;for(;++u<d.length;){let f=d[u],m=h?h.children:void 0;if(r(f,m?m.indexOf(f):void 0,h))return;h=f}if(h)return l(c,d)}function l(c,d){let u=d[d.length-1],h=o[s][0],f=o[s][1],m=0,w=u.children.indexOf(c),_=!1,E=[];h.lastIndex=0;let A=h.exec(c.value);for(;A;){let L=A.index,O={index:A.index,input:A.input,stack:[...d,c]},U=f(...A,O);if(typeof U=="string"&&(U=U.length>0?{type:"text",value:U}:void 0),U===!1?h.lastIndex=L+1:(m!==L&&E.push({type:"text",value:c.value.slice(m,L)}),Array.isArray(U)?E.push(...U):U&&E.push(U),m=L+A[0].length,_=!0),!h.global)break;A=h.exec(c.value)}return _?(m<c.value.length&&E.push({type:"text",value:c.value.slice(m)}),u.children.splice(w,1,...E)):E=[c],w+E.length}}function Oae(i){let e=[];if(!Array.isArray(i))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!i[0]||Array.isArray(i[0])?i:[i],n=-1;for(;++n<t.length;){let r=t[n];e.push([Fae(r[0]),zae(r[1])])}return e}function Fae(i){return typeof i=="string"?new RegExp(NE(i),"g"):i}function zae(i){return typeof i=="function"?i:function(){return i}}var PE="phrasing",OE=["autolink","link","image","label"];function zE(){return{transforms:[Vae],enter:{literalAutolink:Bae,literalAutolinkEmail:FE,literalAutolinkHttp:FE,literalAutolinkWww:FE},exit:{literalAutolink:Wae,literalAutolinkEmail:jae,literalAutolinkHttp:Hae,literalAutolinkWww:Uae}}}function BE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:PE,notInConstruct:OE},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:PE,notInConstruct:OE},{character:":",before:"[ps]",after:"\\/",inConstruct:PE,notInConstruct:OE}]}}function Bae(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function FE(i){this.config.enter.autolinkProtocol.call(this,i)}function Hae(i){this.config.exit.autolinkProtocol.call(this,i)}function Uae(i){this.config.exit.data.call(this,i);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(i)}function jae(i){this.config.exit.autolinkEmail.call(this,i)}function Wae(i){this.exit(i)}function Vae(i){RE(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qae],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Kae]],{ignore:["link","linkReference"]})}function qae(i,e,t,n,r){let o="";if(!mH(r)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!$ae(t)))return!1;let s=Gae(t+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function Kae(i,e,t,n){return!mH(n,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+t,children:[{type:"text",value:e+"@"+t}]}}function $ae(i){let e=i.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function Gae(i){let e=/[!"&'),.:;<>?\]}]+$/.exec(i);if(!e)return[i,void 0];i=i.slice(0,e.index);let t=e[0],n=t.indexOf(")"),r=Rf(i,"("),o=Rf(i,")");for(;n!==-1&&r>o;)i+=t.slice(0,n+1),t=t.slice(n+1),n=t.indexOf(")"),o++;return[i,t]}function mH(i,e){let t=i.input.charCodeAt(i.index-1);return(i.index===0||fH(t)||hH(t))&&(!e||t!==47)}function HE(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}gH.peek=nle;function UE(){return{enter:{gfmFootnoteDefinition:Yae,gfmFootnoteDefinitionLabelString:Xae,gfmFootnoteCall:Jae,gfmFootnoteCallString:ele},exit:{gfmFootnoteDefinition:Zae,gfmFootnoteDefinitionLabelString:Qae,gfmFootnoteCall:ile,gfmFootnoteCallString:tle}}}function jE(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:rle,footnoteReference:gH}}}function Yae(i){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},i)}function Xae(){this.buffer()}function Qae(i){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=HE(this.sliceSerialize(i)).toLowerCase()}function Zae(i){this.exit(i)}function Jae(i){this.enter({type:"footnoteReference",identifier:"",label:""},i)}function ele(){this.buffer()}function tle(i){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=HE(this.sliceSerialize(i)).toLowerCase()}function ile(i){this.exit(i)}function gH(i,e,t,n){let r=t.createTracker(n),o=r.move("[^"),s=t.enter("footnoteReference"),a=t.enter("reference");return o+=r.move(t.safe(t.associationId(i),xt(ue({},r.current()),{before:o,after:"]"}))),a(),s(),o+=r.move("]"),o}function nle(){return"["}function rle(i,e,t,n){let r=t.createTracker(n),o=r.move("[^"),s=t.enter("footnoteDefinition"),a=t.enter("label");return o+=r.move(t.safe(t.associationId(i),xt(ue({},r.current()),{before:o,after:"]"}))),a(),o+=r.move("]:"+(i.children&&i.children.length>0?" ":"")),r.shift(4),o+=r.move(t.indentLines(t.containerFlow(i,r.current()),ole)),s(),o}function ole(i,e,t){return e===0?i:(t?"":" ")+i}var sle=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];bH.peek=cle;function WE(){return{canContainEols:["delete"],enter:{strikethrough:ale},exit:{strikethrough:lle}}}function VE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:sle}],handlers:{delete:bH}}}function ale(i){this.enter({type:"delete",children:[]},i)}function lle(i){this.exit(i)}function bH(i,e,t,n){let r=t.createTracker(n),o=t.enter("strikethrough"),s=r.move("~~");return s+=t.containerPhrasing(i,xt(ue({},r.current()),{before:s,after:"~"})),s+=r.move("~~"),o(),s}function cle(){return"~"}function _H(i,e={}){let t=(e.align||[]).concat(),n=e.stringLength||ule,r=[],o=[],s=[],a=[],l=0,c=-1;for(;++c<i.length;){let m=[],g=[],w=-1;for(i[c].length>l&&(l=i[c].length);++w<i[c].length;){let _=dle(i[c][w]);if(e.alignDelimiters!==!1){let E=n(_);g[w]=E,(a[w]===void 0||E>a[w])&&(a[w]=E)}m.push(_)}o[c]=m,s[c]=g}let d=-1;if(typeof t=="object"&&"length"in t)for(;++d<l;)r[d]=vH(t[d]);else{let m=vH(t);for(;++d<l;)r[d]=m}d=-1;let u=[],h=[];for(;++d<l;){let m=r[d],g="",w="";m===99?(g=":",w=":"):m===108?g=":":m===114&&(w=":");let _=e.alignDelimiters===!1?1:Math.max(1,a[d]-g.length-w.length),E=g+"-".repeat(_)+w;e.alignDelimiters!==!1&&(_=g.length+_+w.length,_>a[d]&&(a[d]=_),h[d]=_),u[d]=E}o.splice(1,0,u),s.splice(1,0,h),c=-1;let f=[];for(;++c<o.length;){let m=o[c],g=s[c];d=-1;let w=[];for(;++d<l;){let _=m[d]||"",E="",A="";if(e.alignDelimiters!==!1){let L=a[d]-(g[d]||0),O=r[d];O===114?E=" ".repeat(L):O===99?L%2?(E=" ".repeat(L/2+.5),A=" ".repeat(L/2-.5)):(E=" ".repeat(L/2),A=E):A=" ".repeat(L)}e.delimiterStart!==!1&&!d&&w.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&_==="")&&(e.delimiterStart!==!1||d)&&w.push(" "),e.alignDelimiters!==!1&&w.push(E),w.push(_),e.alignDelimiters!==!1&&w.push(A),e.padding!==!1&&w.push(" "),(e.delimiterEnd!==!1||d!==l-1)&&w.push("|")}f.push(e.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return f.join(`
`)}function dle(i){return i==null?"":String(i)}function ule(i){return i.length}function vH(i){let e=typeof i=="string"?i.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}var yH={}.hasOwnProperty;function Of(i,e){let t=e||{};function n(r,...o){let s=n.invalid,a=n.handlers;if(r&&yH.call(r,i)){let l=String(r[i]);s=yH.call(a,l)?a[l]:n.unknown}if(s)return s.call(this,r,...o)}return n.handlers=t.handlers||{},n.invalid=t.invalid,n.unknown=t.unknown,n}function wH(i,e,t,n){let r=t.enter("blockquote"),o=t.createTracker(n);o.move("> "),o.shift(2);let s=t.indentLines(t.containerFlow(i,o.current()),hle);return r(),s}function hle(i,e,t){return">"+(t?"":" ")+i}function CH(i,e){return xH(i,e.inConstruct,!0)&&!xH(i,e.notInConstruct,!1)}function xH(i,e,t){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return t;let n=-1;for(;++n<e.length;)if(i.includes(e[n]))return!0;return!1}function qE(i,e,t,n){let r=-1;for(;++r<t.unsafe.length;)if(t.unsafe[r].character===`
`&&CH(t.stack,t.unsafe[r]))return/[ \t]/.test(n.before)?"":" ";return`\\
`}function Ky(i,e){let t=String(i),n=t.indexOf(e),r=n,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===r?++o>s&&(s=o):o=1,r=n+e.length,n=t.indexOf(e,r);return s}function SH(i,e){return!!(e.options.fences===!1&&i.value&&!i.lang&&/[^ \r\n]/.test(i.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(i.value))}function kH(i){let e=i.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function EH(i,e,t,n){let r=kH(t),o=i.value||"",s=r==="`"?"GraveAccent":"Tilde";if(SH(i,t)){let u=t.enter("codeIndented"),h=t.indentLines(o,fle);return u(),h}let a=t.createTracker(n),l=r.repeat(Math.max(Ky(o,r)+1,3)),c=t.enter("codeFenced"),d=a.move(l);if(i.lang){let u=t.enter(`codeFencedLang${s}`);d+=a.move(t.safe(i.lang,ue({before:d,after:" ",encode:["`"]},a.current()))),u()}if(i.lang&&i.meta){let u=t.enter(`codeFencedMeta${s}`);d+=a.move(" "),d+=a.move(t.safe(i.meta,ue({before:d,after:`
`,encode:["`"]},a.current()))),u()}return d+=a.move(`
`),o&&(d+=a.move(o+`
`)),d+=a.move(l),c(),d}function fle(i,e,t){return(t?"":" ")+i}function Ff(i){let e=i.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function TH(i,e,t,n){let r=Ff(t),o=r==='"'?"Quote":"Apostrophe",s=t.enter("definition"),a=t.enter("label"),l=t.createTracker(n),c=l.move("[");return c+=l.move(t.safe(t.associationId(i),ue({before:c,after:"]"},l.current()))),c+=l.move("]: "),a(),!i.url||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,ue({before:c,after:">"},l.current()))),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,ue({before:c,after:i.title?" ":`
`},l.current())))),a(),i.title&&(a=t.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(t.safe(i.title,ue({before:c,after:r},l.current()))),c+=l.move(r),a()),s(),c}function IH(i){let e=i.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}KE.peek=ple;function KE(i,e,t,n){let r=IH(t),o=t.enter("emphasis"),s=t.createTracker(n),a=s.move(r);return a+=s.move(t.containerPhrasing(i,ue({before:a,after:r},s.current()))),a+=s.move(r),o(),a}function ple(i,e,t){return t.options.emphasis||"*"}function Or(i,e,t,n){let r,o,s;typeof e=="function"&&typeof t!="function"?(o=void 0,s=e,r=t):(o=e,s=t,r=n),Au(i,o,a,r);function a(l,c){let d=c[c.length-1],u=d?d.children.indexOf(l):void 0;return s(l,u,d)}}var mle={};function Rg(i,e){let t=e||mle,n=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,r=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return AH(i,n,r)}function AH(i,e,t){if(gle(i)){if("value"in i)return i.type==="html"&&!t?"":i.value;if(e&&"alt"in i&&i.alt)return i.alt;if("children"in i)return LH(i.children,e,t)}return Array.isArray(i)?LH(i,e,t):""}function LH(i,e,t){let n=[],r=-1;for(;++r<i.length;)n[r]=AH(i[r],e,t);return n.join("")}function gle(i){return!!(i&&typeof i=="object")}function DH(i,e){let t=!1;return Or(i,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return t=!0,Lu}),!!((!i.depth||i.depth<3)&&Rg(i)&&(e.options.setext||t))}function MH(i,e,t,n){let r=Math.max(Math.min(6,i.depth||1),1),o=t.createTracker(n);if(DH(i,t)){let d=t.enter("headingSetext"),u=t.enter("phrasing"),h=t.containerPhrasing(i,xt(ue({},o.current()),{before:`
`,after:`
`}));return u(),d(),h+`
`+(r===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
`))+1))}let s="#".repeat(r),a=t.enter("headingAtx"),l=t.enter("phrasing");o.move(s+" ");let c=t.containerPhrasing(i,ue({before:"# ",after:`
`},o.current()));return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,t.options.closeAtx&&(c+=" "+s),l(),a(),c}$E.peek=ble;function $E(i){return i.value||""}function ble(){return"<"}GE.peek=vle;function GE(i,e,t,n){let r=Ff(t),o=r==='"'?"Quote":"Apostrophe",s=t.enter("image"),a=t.enter("label"),l=t.createTracker(n),c=l.move("![");return c+=l.move(t.safe(i.alt,ue({before:c,after:"]"},l.current()))),c+=l.move("]("),a(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,ue({before:c,after:">"},l.current()))),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,ue({before:c,after:i.title?" ":")"},l.current())))),a(),i.title&&(a=t.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(t.safe(i.title,ue({before:c,after:r},l.current()))),c+=l.move(r),a()),c+=l.move(")"),s(),c}function vle(){return"!"}YE.peek=_le;function YE(i,e,t,n){let r=i.referenceType,o=t.enter("imageReference"),s=t.enter("label"),a=t.createTracker(n),l=a.move("!["),c=t.safe(i.alt,ue({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let d=t.stack;t.stack=[],s=t.enter("reference");let u=t.safe(t.associationId(i),ue({before:l,after:"]"},a.current()));return s(),t.stack=d,o(),r==="full"||!c||c!==u?l+=a.move(u+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function _le(){return"!"}XE.peek=yle;function XE(i,e,t){let n=i.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(n);)r+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<t.unsafe.length;){let s=t.unsafe[o],a=t.compilePattern(s),l;if(s.atBreak)for(;l=a.exec(n);){let c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return r+n+r}function yle(){return"`"}function QE(i,e){let t=Rg(i);return!!(!e.options.resourceLink&&i.url&&!i.title&&i.children&&i.children.length===1&&i.children[0].type==="text"&&(t===i.url||"mailto:"+t===i.url)&&/^[a-z][a-z+.-]+:/i.test(i.url)&&!/[\0- <>\u007F]/.test(i.url))}ZE.peek=wle;function ZE(i,e,t,n){let r=Ff(t),o=r==='"'?"Quote":"Apostrophe",s=t.createTracker(n),a,l;if(QE(i,t)){let d=t.stack;t.stack=[],a=t.enter("autolink");let u=s.move("<");return u+=s.move(t.containerPhrasing(i,ue({before:u,after:">"},s.current()))),u+=s.move(">"),a(),t.stack=d,u}a=t.enter("link"),l=t.enter("label");let c=s.move("[");return c+=s.move(t.containerPhrasing(i,ue({before:c,after:"]("},s.current()))),c+=s.move("]("),l(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(l=t.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(t.safe(i.url,ue({before:c,after:">"},s.current()))),c+=s.move(">")):(l=t.enter("destinationRaw"),c+=s.move(t.safe(i.url,ue({before:c,after:i.title?" ":")"},s.current())))),l(),i.title&&(l=t.enter(`title${o}`),c+=s.move(" "+r),c+=s.move(t.safe(i.title,ue({before:c,after:r},s.current()))),c+=s.move(r),l()),c+=s.move(")"),a(),c}function wle(i,e,t){return QE(i,t)?"<":"["}JE.peek=xle;function JE(i,e,t,n){let r=i.referenceType,o=t.enter("linkReference"),s=t.enter("label"),a=t.createTracker(n),l=a.move("["),c=t.containerPhrasing(i,ue({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let d=t.stack;t.stack=[],s=t.enter("reference");let u=t.safe(t.associationId(i),ue({before:l,after:"]"},a.current()));return s(),t.stack=d,o(),r==="full"||!c||c!==u?l+=a.move(u+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function xle(){return"["}function zf(i){let e=i.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function NH(i){let e=zf(i),t=i.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function RH(i){let e=i.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function $y(i){let e=i.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function PH(i,e,t,n){let r=t.enter("list"),o=t.bulletCurrent,s=i.ordered?RH(t):zf(t),a=i.ordered?s==="."?")":".":NH(t),l=e&&t.bulletLastUsed?s===t.bulletLastUsed:!1;if(!i.ordered){let d=i.children?i.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),$y(t)===s&&d){let u=-1;for(;++u<i.children.length;){let h=i.children[u];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),t.bulletCurrent=s;let c=t.containerFlow(i,n);return t.bulletLastUsed=s,t.bulletCurrent=o,r(),c}function OH(i){let e=i.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function FH(i,e,t,n){let r=OH(t),o=t.bulletCurrent||zf(t);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(i))+o);let s=o.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||i.spread))&&(s=Math.ceil(s/4)*4);let a=t.createTracker(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=t.enter("listItem"),c=t.indentLines(t.containerFlow(i,a.current()),d);return l(),c;function d(u,h,f){return h?(f?"":" ".repeat(s))+u:(f?o:o+" ".repeat(s-o.length))+u}}function zH(i,e,t,n){let r=t.enter("paragraph"),o=t.enter("phrasing"),s=t.containerPhrasing(i,n);return o(),r(),s}var e5=La(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function BH(i,e,t,n){return(i.children.some(function(s){return e5(s)})?t.containerPhrasing:t.containerFlow).call(t,i,n)}function HH(i){let e=i.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}t5.peek=Cle;function t5(i,e,t,n){let r=HH(t),o=t.enter("strong"),s=t.createTracker(n),a=s.move(r+r);return a+=s.move(t.containerPhrasing(i,ue({before:a,after:r},s.current()))),a+=s.move(r+r),o(),a}function Cle(i,e,t){return t.options.strong||"*"}function UH(i,e,t,n){return t.safe(i.value,n)}function jH(i){let e=i.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function WH(i,e,t){let n=($y(t)+(t.options.ruleSpaces?" ":"")).repeat(jH(t));return t.options.ruleSpaces?n.slice(0,-1):n}var Pg={blockquote:wH,break:qE,code:EH,definition:TH,emphasis:KE,hardBreak:qE,heading:MH,html:$E,image:GE,imageReference:YE,inlineCode:XE,link:ZE,linkReference:JE,list:PH,listItem:FH,paragraph:zH,root:BH,strong:t5,text:UH,thematicBreak:WH};function n5(){return{enter:{table:Sle,tableData:VH,tableHeader:VH,tableRow:Ele},exit:{codeText:Tle,table:kle,tableData:i5,tableHeader:i5,tableRow:i5}}}function Sle(i){let e=i._align;this.enter({type:"table",align:e.map(function(t){return t==="none"?null:t}),children:[]},i),this.data.inTable=!0}function kle(i){this.exit(i),this.data.inTable=void 0}function Ele(i){this.enter({type:"tableRow",children:[]},i)}function i5(i){this.exit(i)}function VH(i){this.enter({type:"tableCell",children:[]},i)}function Tle(i){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Ile));let t=this.stack[this.stack.length-1];t.type,t.value=e,this.exit(i)}function Ile(i,e){return e==="|"?e:i}function r5(i){let e=i||{},t=e.tableCellPadding,n=e.tablePipeAlign,r=e.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:l,tableRow:a}};function s(f,m,g,w){return c(d(f,g,w),f.align)}function a(f,m,g,w){let _=u(f,g,w),E=c([_]);return E.slice(0,E.indexOf(`
`))}function l(f,m,g,w){let _=g.enter("tableCell"),E=g.enter("phrasing"),A=g.containerPhrasing(f,xt(ue({},w),{before:o,after:o}));return E(),_(),A}function c(f,m){return _H(f,{align:m,alignDelimiters:n,padding:t,stringLength:r})}function d(f,m,g){let w=f.children,_=-1,E=[],A=m.enter("table");for(;++_<w.length;)E[_]=u(w[_],m,g);return A(),E}function u(f,m,g){let w=f.children,_=-1,E=[],A=m.enter("tableRow");for(;++_<w.length;)E[_]=l(w[_],f,m,g);return A(),E}function h(f,m,g){let w=Pg.inlineCode(f,m,g);return g.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function o5(){return{exit:{taskListCheckValueChecked:qH,taskListCheckValueUnchecked:qH,paragraph:Lle}}}function s5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ale}}}function qH(i){let e=this.stack[this.stack.length-2];e.type,e.checked=i.type==="taskListCheckValueChecked"}function Lle(i){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let n=t.children[0];if(n&&n.type==="text"){let r=e.children,o=-1,s;for(;++o<r.length;){let a=r[o];if(a.type==="paragraph"){s=a;break}}s===t&&(n.value=n.value.slice(1),n.value.length===0?t.children.shift():t.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,t.position.start=Object.assign({},n.position.start)))}}this.exit(i)}function Ale(i,e,t,n){let r=i.children[0],o=typeof i.checked=="boolean"&&r&&r.type==="paragraph",s="["+(i.checked?"x":" ")+"] ",a=t.createTracker(n);o&&a.move(s);let l=Pg.listItem(i,e,t,ue(ue({},n),a.current()));return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+s}}function a5(){return[zE(),UE(),WE(),n5(),o5()]}function l5(i){return{extensions:[BE(),jE(),VE(),r5(i),s5()]}}function KH(i,e,t,n){let r=i.length,o=0,s;if(e<0?e=-e>r?0:r+e:e=e>r?r:e,t=t>0?t:0,n.length<1e4)s=Array.from(n),s.unshift(e,t),i.splice(...s);else for(t&&i.splice(e,t);o<n.length;)s=n.slice(o,o+1e4),s.unshift(e,0),i.splice(...s),o+=1e4,e+=1e4}var $H={}.hasOwnProperty;function GH(i){let e={},t=-1;for(;++t<i.length;)Dle(e,i[t]);return e}function Dle(i,e){let t;for(t in e){let r=($H.call(i,t)?i[t]:void 0)||(i[t]={}),o=e[t],s;if(o)for(s in o){$H.call(r,s)||(r[s]=[]);let a=o[s];Mle(r[s],Array.isArray(a)?a:a?[a]:[])}}}function Mle(i,e){let t=-1,n=[];for(;++t<e.length;)(e[t].add==="after"?i:n).push(e[t]);KH(i,0,0,n)}var Nle=sd(new RegExp("\\p{P}","u")),Bf=sd(/[A-Za-z]/),Gy=sd(/[\dA-Za-z]/),OTe=sd(/[#-'*+\--9=?A-Z^-~]/);function YH(i){return i!==null&&(i<32||i===127)}var FTe=sd(/\d/),zTe=sd(/[\dA-Fa-f]/),Rle=sd(/[!-/:-@[-`{-~]/);function Du(i){return i!==null&&(i<0||i===32)}function c5(i){return Rle(i)||Nle(i)}var Hf=sd(/\s/);function sd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}var Ple={tokenize:Hle,partial:!0},XH={tokenize:Ule,partial:!0},QH={tokenize:jle,partial:!0},ZH={tokenize:Wle,partial:!0},Ole={tokenize:Vle,partial:!0},JH={tokenize:zle,previous:tU},eU={tokenize:Ble,previous:iU},Nl={tokenize:Fle,previous:nU},Aa={};function u5(){return{text:Aa}}var Mu=48;for(;Mu<123;)Aa[Mu]=Nl,Mu++,Mu===58?Mu=65:Mu===91&&(Mu=97);Aa[43]=Nl;Aa[45]=Nl;Aa[46]=Nl;Aa[95]=Nl;Aa[72]=[Nl,eU];Aa[104]=[Nl,eU];Aa[87]=[Nl,JH];Aa[119]=[Nl,JH];function Fle(i,e,t){let n=this,r,o;return s;function s(u){return!d5(u)||!nU.call(n,n.previous)||h5(n.events)?t(u):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(u))}function a(u){return d5(u)?(i.consume(u),a):u===64?(i.consume(u),l):t(u)}function l(u){return u===46?i.check(Ole,d,c)(u):u===45||u===95||Gy(u)?(o=!0,i.consume(u),l):d(u)}function c(u){return i.consume(u),r=!0,l}function d(u){return o&&r&&Bf(n.previous)?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),e(u)):t(u)}}function zle(i,e,t){let n=this;return r;function r(s){return s!==87&&s!==119||!tU.call(n,n.previous)||h5(n.events)?t(s):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(Ple,i.attempt(XH,i.attempt(QH,o),t),t)(s))}function o(s){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),e(s)}}function Ble(i,e,t){let n=this,r="",o=!1;return s;function s(u){return(u===72||u===104)&&iU.call(n,n.previous)&&!h5(n.events)?(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),r+=String.fromCodePoint(u),i.consume(u),a):t(u)}function a(u){if(Bf(u)&&r.length<5)return r+=String.fromCodePoint(u),i.consume(u),a;if(u===58){let h=r.toLowerCase();if(h==="http"||h==="https")return i.consume(u),l}return t(u)}function l(u){return u===47?(i.consume(u),o?c:(o=!0,l)):t(u)}function c(u){return u===null||YH(u)||Du(u)||Hf(u)||c5(u)?t(u):i.attempt(XH,i.attempt(QH,d),t)(u)}function d(u){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),e(u)}}function Hle(i,e,t){let n=0;return r;function r(s){return(s===87||s===119)&&n<3?(n++,i.consume(s),r):s===46&&n===3?(i.consume(s),o):t(s)}function o(s){return s===null?t(s):e(s)}}function Ule(i,e,t){let n,r,o;return s;function s(c){return c===46||c===95?i.check(ZH,l,a)(c):c===null||Du(c)||Hf(c)||c!==45&&c5(c)?l(c):(o=!0,i.consume(c),s)}function a(c){return c===95?n=!0:(r=n,n=void 0),i.consume(c),s}function l(c){return r||n||!o?t(c):e(c)}}function jle(i,e){let t=0,n=0;return r;function r(s){return s===40?(t++,i.consume(s),r):s===41&&n<t?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?i.check(ZH,e,o)(s):s===null||Du(s)||Hf(s)?e(s):(i.consume(s),r)}function o(s){return s===41&&n++,i.consume(s),r}}function Wle(i,e,t){return n;function n(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(i.consume(a),n):a===38?(i.consume(a),o):a===93?(i.consume(a),r):a===60||a===null||Du(a)||Hf(a)?e(a):t(a)}function r(a){return a===null||a===40||a===91||Du(a)||Hf(a)?e(a):n(a)}function o(a){return Bf(a)?s(a):t(a)}function s(a){return a===59?(i.consume(a),n):Bf(a)?(i.consume(a),s):t(a)}}function Vle(i,e,t){return n;function n(o){return i.consume(o),r}function r(o){return Gy(o)?t(o):e(o)}}function tU(i){return i===null||i===40||i===42||i===95||i===91||i===93||i===126||Du(i)}function iU(i){return!Bf(i)}function nU(i){return!(i===47||d5(i))}function d5(i){return i===43||i===45||i===46||i===95||Gy(i)}function h5(i){let e=i.length,t=!1;for(;e--;){let n=i[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){t=!0;break}if(n._gfmAutolinkLiteralWalkedInto){t=!1;break}}return i.length>0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var VTe=ad(new RegExp("\\p{P}","u")),qTe=ad(/[A-Za-z]/),KTe=ad(/[\dA-Za-z]/),$Te=ad(/[#-'*+\--9=?A-Z^-~]/);var GTe=ad(/\d/),YTe=ad(/[\dA-Fa-f]/),XTe=ad(/[!-/:-@[-`{-~]/);function rU(i){return i!==null&&i<-2}function Og(i){return i!==null&&(i<0||i===32)}function Fg(i){return i===-2||i===-1||i===32}var QTe=ad(/\s/);function ad(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function zg(i,e,t,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Fg(l)?(i.enter(t),a(l)):e(l)}function a(l){return Fg(l)&&o++<r?(i.consume(l),a):(i.exit(t),e(l))}}var f5={tokenize:qle,partial:!0};function qle(i,e,t){return n;function n(o){return Fg(o)?zg(i,r,"linePrefix")(o):r(o)}function r(o){return o===null||rU(o)?e(o):t(o)}}function Yy(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Kle={tokenize:Jle,partial:!0};function p5(){return{document:{91:{tokenize:Xle,continuation:{tokenize:Qle},exit:Zle}},text:{91:{tokenize:Yle},93:{add:"after",tokenize:$le,resolveTo:Gle}}}}function $le(i,e,t){let n=this,r=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;r--;){let l=n.events[r][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return t(l);let c=Yy(n.sliceSerialize({start:s.end,end:n.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function Gle(i,e){let t=i.length,n;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){n=i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},i[t+3][1].start),end:Object.assign({},i[i.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},i[t+3][1].end),end:Object.assign({},i[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},i[i.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[i[t+1],i[t+2],["enter",r,e],i[t+3],i[t+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],i[i.length-2],i[i.length-1],["exit",r,e]];return i.splice(t,i.length-t+1,...l),i}function Yle(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(u){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?t(u):(i.enter("gfmFootnoteCallMarker"),i.consume(u),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(u){if(o>999||u===93&&!s||u===null||u===91||Og(u))return t(u);if(u===93){i.exit("chunkString");let h=i.exit("gfmFootnoteCallString");return r.includes(Yy(n.sliceSerialize(h)))?(i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e):t(u)}return Og(u)||(s=!0),o++,i.consume(u),u===92?d:c}function d(u){return u===91||u===92||u===93?(i.consume(u),o++,c):c(u)}}function Xle(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(m){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),i.enter("chunkString").contentType="string",d):t(m)}function d(m){if(s>999||m===93&&!a||m===null||m===91||Og(m))return t(m);if(m===93){i.exit("chunkString");let g=i.exit("gfmFootnoteDefinitionLabelString");return o=Yy(n.sliceSerialize(g)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),h}return Og(m)||(a=!0),s++,i.consume(m),m===92?u:d}function u(m){return m===91||m===92||m===93?(i.consume(m),s++,d):d(m)}function h(m){return m===58?(i.enter("definitionMarker"),i.consume(m),i.exit("definitionMarker"),r.includes(o)||r.push(o),zg(i,f,"gfmFootnoteDefinitionWhitespace")):t(m)}function f(m){return e(m)}}function Qle(i,e,t){return i.check(f5,e,i.attempt(Kle,e,t))}function Zle(i){i.exit("gfmFootnoteDefinition")}function Jle(i,e,t){let n=this;return zg(i,r,"gfmFootnoteDefinitionIndent",4+1);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):t(o)}}function Xy(i,e,t,n){let r=i.length,o=0,s;if(e<0?e=-e>r?0:r+e:e=e>r?r:e,t=t>0?t:0,n.length<1e4)s=Array.from(n),s.unshift(e,t),i.splice(...s);else for(t&&i.splice(e,t);o<n.length;)s=n.slice(o,o+1e4),s.unshift(e,0),i.splice(...s),o+=1e4,e+=1e4}var ece=ld(new RegExp("\\p{P}","u")),mIe=ld(/[A-Za-z]/),gIe=ld(/[\dA-Za-z]/),bIe=ld(/[#-'*+\--9=?A-Z^-~]/);var vIe=ld(/\d/),_Ie=ld(/[\dA-Fa-f]/),tce=ld(/[!-/:-@[-`{-~]/);function oU(i){return i!==null&&(i<0||i===32)}function sU(i){return tce(i)||ece(i)}var aU=ld(/\s/);function ld(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function m5(i){if(i===null||oU(i)||aU(i))return 1;if(sU(i))return 2}function lU(i,e,t){let n=[],r=-1;for(;++r<i.length;){let o=i[r].resolveAll;o&&!n.includes(o)&&(e=o(e,t),n.push(o))}return e}function g5(i){let t=(i||{}).singleTilde,n={tokenize:o,resolveAll:r};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";let d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},u={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},h=[["enter",d,a],["enter",s[c][1],a],["exit",s[c][1],a],["enter",u,a]],f=a.parser.constructs.insideSpan.null;f&&Xy(h,h.length,0,lU(f,s.slice(c+1,l),a)),Xy(h,h.length,0,[["exit",u,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",d,a]]),Xy(s,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function o(s,a,l){let c=this.previous,d=this.events,u=0;return h;function h(m){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(s.enter("strikethroughSequenceTemporary"),f(m))}function f(m){let g=m5(c);if(m===126)return u>1?l(m):(s.consume(m),u++,f);if(u<2&&!t)return l(m);let w=s.exit("strikethroughSequenceTemporary"),_=m5(m);return w._open=!_||_===2&&!!g,w._close=!g||g===2&&!!_,a(m)}}}var AIe=cd(new RegExp("\\p{P}","u")),DIe=cd(/[A-Za-z]/),MIe=cd(/[\dA-Za-z]/),NIe=cd(/[#-'*+\--9=?A-Z^-~]/);var RIe=cd(/\d/),PIe=cd(/[\dA-Fa-f]/),OIe=cd(/[!-/:-@[-`{-~]/);function Bg(i){return i!==null&&i<-2}function b5(i){return i!==null&&(i<0||i===32)}function Rl(i){return i===-2||i===-1||i===32}var FIe=cd(/\s/);function cd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function Uf(i,e,t,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Rl(l)?(i.enter(t),a(l)):e(l)}function a(l){return Rl(l)&&o++<r?(i.consume(l),a):(i.exit(t),e(l))}}var Qy=class{constructor(){this.map=[]}add(e,t,n){ice(this,e,t,n)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}};function ice(i,e,t,n){let r=0;if(!(t===0&&n.length===0)){for(;r<i.map.length;){if(i.map[r][0]===e){i.map[r][1]+=t,i.map[r][2].push(...n);return}r+=1}i.map.push([e,t,n])}}function cU(i,e){let t=!1,n=[];for(;e<i.length;){let r=i[e];if(t){if(r[0]==="enter")r[1].type==="tableContent"&&n.push(i[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(i[e-1][1].type==="tableDelimiterMarker"){let o=n.length-1;n[o]=n[o]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(t=!0);e+=1}return n}function v5(){return{flow:{null:{tokenize:nce,resolveAll:rce}}}}function nce(i,e,t){let n=this,r=0,o=0,s;return a;function a(Z){let ve=n.events.length-1;for(;ve>-1;){let Oe=n.events[ve][1].type;if(Oe==="lineEnding"||Oe==="linePrefix")ve--;else break}let Pe=ve>-1?n.events[ve][1].type:null,Ee=Pe==="tableHead"||Pe==="tableRow"?U:l;return Ee===U&&n.parser.lazy[n.now().line]?t(Z):Ee(Z)}function l(Z){return i.enter("tableHead"),i.enter("tableRow"),c(Z)}function c(Z){return Z===124||(s=!0,o+=1),d(Z)}function d(Z){return Z===null?t(Z):Bg(Z)?o>1?(o=0,n.interrupt=!0,i.exit("tableRow"),i.enter("lineEnding"),i.consume(Z),i.exit("lineEnding"),f):t(Z):Rl(Z)?Uf(i,d,"whitespace")(Z):(o+=1,s&&(s=!1,r+=1),Z===124?(i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),s=!0,d):(i.enter("data"),u(Z)))}function u(Z){return Z===null||Z===124||b5(Z)?(i.exit("data"),d(Z)):(i.consume(Z),Z===92?h:u)}function h(Z){return Z===92||Z===124?(i.consume(Z),u):u(Z)}function f(Z){return n.interrupt=!1,n.parser.lazy[n.now().line]?t(Z):(i.enter("tableDelimiterRow"),s=!1,Rl(Z)?Uf(i,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):m(Z))}function m(Z){return Z===45||Z===58?w(Z):Z===124?(s=!0,i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),g):O(Z)}function g(Z){return Rl(Z)?Uf(i,w,"whitespace")(Z):w(Z)}function w(Z){return Z===58?(o+=1,s=!0,i.enter("tableDelimiterMarker"),i.consume(Z),i.exit("tableDelimiterMarker"),_):Z===45?(o+=1,_(Z)):Z===null||Bg(Z)?L(Z):O(Z)}function _(Z){return Z===45?(i.enter("tableDelimiterFiller"),E(Z)):O(Z)}function E(Z){return Z===45?(i.consume(Z),E):Z===58?(s=!0,i.exit("tableDelimiterFiller"),i.enter("tableDelimiterMarker"),i.consume(Z),i.exit("tableDelimiterMarker"),A):(i.exit("tableDelimiterFiller"),A(Z))}function A(Z){return Rl(Z)?Uf(i,L,"whitespace")(Z):L(Z)}function L(Z){return Z===124?m(Z):Z===null||Bg(Z)?!s||r!==o?O(Z):(i.exit("tableDelimiterRow"),i.exit("tableHead"),e(Z)):O(Z)}function O(Z){return t(Z)}function U(Z){return i.enter("tableRow"),Q(Z)}function Q(Z){return Z===124?(i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),Q):Z===null||Bg(Z)?(i.exit("tableRow"),e(Z)):Rl(Z)?Uf(i,Q,"whitespace")(Z):(i.enter("data"),ae(Z))}function ae(Z){return Z===null||Z===124||b5(Z)?(i.exit("data"),Q(Z)):(i.consume(Z),Z===92?te:ae)}function te(Z){return Z===92||Z===124?(i.consume(Z),ae):ae(Z)}}function rce(i,e){let t=-1,n=!0,r=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,d,u,h=new Qy;for(;++t<i.length;){let f=i[t],m=f[1];f[0]==="enter"?m.type==="tableHead"?(a=!1,l!==0&&(dU(h,e,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",c,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,u=void 0,o=[0,0,0,0],s=[0,t+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",d,e]])),r=m.type==="tableDelimiterRow"?2:d?3:1):r&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],u=Zy(h,e,o,r,void 0,u),o=[0,0,0,0]),s[2]=t)):m.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(s[0]=s[1],u=Zy(h,e,o,r,void 0,u)),o=s,s=[o[1],t,0,0])):m.type==="tableHead"?(a=!0,l=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=t,o[1]!==0?(s[0]=s[1],u=Zy(h,e,o,r,t,u)):s[1]!==0&&(u=Zy(h,e,s,r,t,u)),r=0):r&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=t)}for(l!==0&&dU(h,e,l,c,d),h.consume(e.events),t=-1;++t<e.events.length;){let f=e.events[t];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=cU(e.events,t))}return i}function Zy(i,e,t,n,r,o){let s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},jf(e.events,t[0])),i.add(t[0],0,[["exit",o,e]]));let l=jf(e.events,t[1]);if(o={type:s,start:Object.assign({},l),end:Object.assign({},l)},i.add(t[1],0,[["enter",o,e]]),t[2]!==0){let c=jf(e.events,t[2]),d=jf(e.events,t[3]),u={type:a,start:Object.assign({},c),end:Object.assign({},d)};if(i.add(t[2],0,[["enter",u,e]]),n!==2){let h=e.events[t[2]],f=e.events[t[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){let m=t[2]+1,g=t[3]-t[2]-1;i.add(m,g,[])}}i.add(t[3]+1,0,[["exit",u,e]])}return r!==void 0&&(o.end=Object.assign({},jf(e.events,r)),i.add(r,0,[["exit",o,e]]),o=void 0),o}function dU(i,e,t,n,r){let o=[],s=jf(e.events,t);r&&(r.end=Object.assign({},s),o.push(["exit",r,e])),n.end=Object.assign({},s),o.push(["exit",n,e]),i.add(t+1,0,o)}function jf(i,e){let t=i[e],n=t[0]==="enter"?"start":"end";return t[1][n]}var XIe=dd(new RegExp("\\p{P}","u")),QIe=dd(/[A-Za-z]/),ZIe=dd(/[\dA-Za-z]/),JIe=dd(/[#-'*+\--9=?A-Z^-~]/);var eLe=dd(/\d/),tLe=dd(/[\dA-Fa-f]/),iLe=dd(/[!-/:-@[-`{-~]/);function uU(i){return i!==null&&i<-2}function hU(i){return i!==null&&(i<0||i===32)}function Hg(i){return i===-2||i===-1||i===32}var nLe=dd(/\s/);function dd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function fU(i,e,t,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Hg(l)?(i.enter(t),a(l)):e(l)}function a(l){return Hg(l)&&o++<r?(i.consume(l),a):(i.exit(t),e(l))}}var oce={tokenize:sce};function _5(){return{text:{91:oce}}}function sce(i,e,t){let n=this;return r;function r(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(l):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),o)}function o(l){return hU(l)?(i.enter("taskListCheckValueUnchecked"),i.consume(l),i.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(i.enter("taskListCheckValueChecked"),i.consume(l),i.exit("taskListCheckValueChecked"),s):t(l)}function s(l){return l===93?(i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),a):t(l)}function a(l){return uU(l)?e(l):Hg(l)?i.check({tokenize:ace},e,t)(l):t(l)}}function ace(i,e,t){return fU(i,n,"whitespace");function n(r){return r===null?t(r):e(r)}}function pU(i){return GH([u5(),p5(),g5(i),v5(),_5()])}var lce={};function Jy(i){let e=this,t=i||lce,n=e.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(pU(t)),o.push(a5()),s.push(l5(t))}function y5(){return{enter:{mathFlow:i,mathFlowFenceMeta:e,mathText:o},exit:{mathFlow:r,mathFlowFence:n,mathFlowFenceMeta:t,mathFlowValue:a,mathText:s,mathTextData:a}};function i(l){let c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},l)}function e(){this.buffer()}function t(){let l=this.resume(),c=this.stack[this.stack.length-1];c.type,c.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function r(l){let c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(l),d.value=c;let u=d.data.hChildren[0];u.type,u.tagName,u.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function s(l){let c=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(l),d.value=c,d.data.hChildren.push({type:"text",value:c})}function a(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function w5(i){let e=(i||{}).singleDollarTextMath;return e==null&&(e=!0),n.peek=r,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
`,inConstruct:"mathFlowMeta"},{character:"$",after:e?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:n}};function t(o,s,a,l){let c=o.value||"",d=a.createTracker(l),u="$".repeat(Math.max(Ky(c,"$")+1,2)),h=a.enter("mathFlow"),f=d.move(u);if(o.meta){let m=a.enter("mathFlowMeta");f+=d.move(a.safe(o.meta,ue({after:`
`,before:f,encode:["$"]},d.current()))),m()}return f+=d.move(`
`),c&&(f+=d.move(c+`
`)),f+=d.move(u),h(),f}function n(o,s,a){let l=o.value||"",c=1;for(e||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;let d="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let u=-1;for(;++u<a.unsafe.length;){let h=a.unsafe[u];if(!h.atBreak)continue;let f=a.compilePattern(h),m;for(;m=f.exec(l);){let g=m.index;l.codePointAt(g)===10&&l.codePointAt(g-1)===13&&g--,l=l.slice(0,g)+" "+l.slice(m.index+1)}}return d+l+d}function r(){return"$"}}var PLe=ud(new RegExp("\\p{P}","u")),OLe=ud(/[A-Za-z]/),FLe=ud(/[\dA-Za-z]/),zLe=ud(/[#-'*+\--9=?A-Z^-~]/);var BLe=ud(/\d/),HLe=ud(/[\dA-Fa-f]/),ULe=ud(/[!-/:-@[-`{-~]/);function Pl(i){return i!==null&&i<-2}function x5(i){return i===-2||i===-1||i===32}var jLe=ud(/\s/);function ud(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function Ug(i,e,t,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return x5(l)?(i.enter(t),a(l)):e(l)}function a(l){return x5(l)&&o++<r?(i.consume(l),a):(i.exit(t),e(l))}}var gU={tokenize:cce,concrete:!0},mU={tokenize:dce,partial:!0};function cce(i,e,t){let n=this,r=n.events[n.events.length-1],o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(E){return i.enter("mathFlow"),i.enter("mathFlowFence"),i.enter("mathFlowFenceSequence"),l(E)}function l(E){return E===36?(i.consume(E),s++,l):s<2?t(E):(i.exit("mathFlowFenceSequence"),Ug(i,c,"whitespace")(E))}function c(E){return E===null||Pl(E)?u(E):(i.enter("mathFlowFenceMeta"),i.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||Pl(E)?(i.exit("chunkString"),i.exit("mathFlowFenceMeta"),u(E)):E===36?t(E):(i.consume(E),d)}function u(E){return i.exit("mathFlowFence"),n.interrupt?e(E):i.attempt(mU,h,w)(E)}function h(E){return i.attempt({tokenize:_,partial:!0},w,f)(E)}function f(E){return(o?Ug(i,m,"linePrefix",o+1):m)(E)}function m(E){return E===null?w(E):Pl(E)?i.attempt(mU,h,w)(E):(i.enter("mathFlowValue"),g(E))}function g(E){return E===null||Pl(E)?(i.exit("mathFlowValue"),m(E)):(i.consume(E),g)}function w(E){return i.exit("mathFlow"),e(E)}function _(E,A,L){let O=0;return Ug(E,U,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function U(te){return E.enter("mathFlowFence"),E.enter("mathFlowFenceSequence"),Q(te)}function Q(te){return te===36?(O++,E.consume(te),Q):O<s?L(te):(E.exit("mathFlowFenceSequence"),Ug(E,ae,"whitespace")(te))}function ae(te){return te===null||Pl(te)?(E.exit("mathFlowFence"),A(te)):L(te)}}}function dce(i,e,t){let n=this;return r;function r(s){return s===null?e(s):(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o)}function o(s){return n.parser.lazy[n.now().line]?t(s):e(s)}}function bU(i){let t=(i||{}).singleDollarTextMath;return t==null&&(t=!0),{tokenize:n,resolve:uce,previous:hce};function n(r,o,s){let a=this,l=0,c,d;return u;function u(w){return r.enter("mathText"),r.enter("mathTextSequence"),h(w)}function h(w){return w===36?(r.consume(w),l++,h):l<2&&!t?s(w):(r.exit("mathTextSequence"),f(w))}function f(w){return w===null?s(w):w===36?(d=r.enter("mathTextSequence"),c=0,g(w)):w===32?(r.enter("space"),r.consume(w),r.exit("space"),f):Pl(w)?(r.enter("lineEnding"),r.consume(w),r.exit("lineEnding"),f):(r.enter("mathTextData"),m(w))}function m(w){return w===null||w===32||w===36||Pl(w)?(r.exit("mathTextData"),f(w)):(r.consume(w),m)}function g(w){return w===36?(r.consume(w),c++,g):c===l?(r.exit("mathTextSequence"),r.exit("mathText"),o(w)):(d.type="mathTextData",m(w))}}}function uce(i){let e=i.length-4,t=3,n,r;if((i[t][1].type==="lineEnding"||i[t][1].type==="space")&&(i[e][1].type==="lineEnding"||i[e][1].type==="space")){for(n=t;++n<e;)if(i[n][1].type==="mathTextData"){i[e][1].type="mathTextPadding",i[t][1].type="mathTextPadding",t+=2,e-=2;break}}for(n=t-1,e++;++n<=e;)r===void 0?n!==e&&i[n][1].type!=="lineEnding"&&(r=n):(n===e||i[n][1].type==="lineEnding")&&(i[r][1].type="mathTextData",n!==r+2&&(i[r][1].end=i[n-1][1].end,i.splice(r+2,n-r-2),e-=n-r-2,n=r+2),r=void 0);return i}function hce(i){return i!==36||this.events[this.events.length-1][1].type==="characterEscape"}function C5(i){return{flow:{36:gU},text:{36:bU(i)}}}var Bo=class i{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new i(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}},Ra=class i{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new i(t,Bo.range(this,e))}},Be=class i{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,r,o,s=t&&t.loc;if(s&&s.start<=s.end){var a=s.lexer.input;r=s.start,o=s.end,r===a.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=a.slice(r,o).replace(/[^]/g,"$&\u0332"),c;r>15?c="\u2026"+a.slice(r-15,r):c=a.slice(0,r);var d;o+15<a.length?d=a.slice(o,o+15)+"\u2026":d=a.slice(o),n+=c+l+d}var u=new Error(n);return u.name="ParseError",u.__proto__=i.prototype,u.position=r,r!=null&&o!=null&&(u.length=o-r),u.rawMessage=e,u}};Be.prototype.__proto__=Error.prototype;var fce=function(e,t){return e.indexOf(t)!==-1},pce=function(e,t){return e===void 0?t:e},mce=/([A-Z])/g,gce=function(e){return e.replace(mce,"-$1").toLowerCase()},bce={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},vce=/[&><"']/g;function _ce(i){return String(i).replace(vce,e=>bce[e])}var YU=function i(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?i(e.body[0]):e:e.type==="font"?i(e.body):e},yce=function(e){var t=YU(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},wce=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},xce=function(e){var t=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(e);return t!=null?t[1]:"_relative"},Rt={contains:fce,deflt:pce,escape:_ce,hyphenate:gce,getBaseElem:YU,isCharacterBox:yce,protocolFromUrl:xce},uw={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:i=>"#"+i},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(i,e)=>(e.push(i),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:i=>Math.max(0,i),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:i=>Math.max(0,i),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:i=>Math.max(0,i),cli:"-e, --max-expand <n>",cliProcessor:i=>i==="Infinity"?1/0:parseInt(i)},globalGroup:{type:"boolean",cli:!1}};function Cce(i){if(i.default)return i.default;var e=i.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var Kg=class{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in uw)if(uw.hasOwnProperty(t)){var n=uw[t];this[t]=e[t]!==void 0?n.processor?n.processor(e[t]):e[t]:Cce(n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r=="function"&&(r=r(e,t,n)),!(!r||r==="ignore")){if(r===!0||r==="error")throw new Be("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),n);r==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r=="function")try{r=r(e,t,n)}catch(o){r="error"}return!r||r==="ignore"?!1:r===!0||r==="error"?!0:r==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]")),!1)}isTrusted(e){e.url&&!e.protocol&&(e.protocol=Rt.protocolFromUrl(e.url));var t=typeof this.trust=="function"?this.trust(e):this.trust;return!!t}},Da=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Ma[Sce[this.id]]}sub(){return Ma[kce[this.id]]}fracNum(){return Ma[Ece[this.id]]}fracDen(){return Ma[Tce[this.id]]}cramp(){return Ma[Ice[this.id]]}text(){return Ma[Lce[this.id]]}isTight(){return this.size>=2}},G5=0,fw=1,Vf=2,zl=3,$g=4,as=5,qf=6,Jr=7,Ma=[new Da(G5,0,!1),new Da(fw,0,!0),new Da(Vf,1,!1),new Da(zl,1,!0),new Da($g,2,!1),new Da(as,2,!0),new Da(qf,3,!1),new Da(Jr,3,!0)],Sce=[$g,as,$g,as,qf,Jr,qf,Jr],kce=[as,as,as,as,Jr,Jr,Jr,Jr],Ece=[Vf,zl,$g,as,qf,Jr,qf,Jr],Tce=[zl,zl,as,as,Jr,Jr,Jr,Jr],Ice=[fw,fw,zl,zl,as,as,Jr,Jr],Lce=[G5,fw,Vf,zl,Vf,zl,Vf,zl],kt={DISPLAY:Ma[G5],TEXT:Ma[Vf],SCRIPT:Ma[$g],SCRIPTSCRIPT:Ma[qf]},O5=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ace(i){for(var e=0;e<O5.length;e++)for(var t=O5[e],n=0;n<t.blocks.length;n++){var r=t.blocks[n];if(i>=r[0]&&i<=r[1])return t.name}return null}var hw=[];O5.forEach(i=>i.blocks.forEach(e=>hw.push(...e)));function XU(i){for(var e=0;e<hw.length;e+=2)if(i>=hw[e]&&i<=hw[e+1])return!0;return!1}var Wf=80,Dce=function(e,t){return"M95,"+(622+e+t)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+e/2.075+" -"+e+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+e)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Mce=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+e/2.084+" -"+e+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+e)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Nce=function(e,t){return"M983 "+(10+e+t)+`
l`+e/3.13+" -"+e+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Rce=function(e,t){return"M424,"+(2398+e+t)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+e)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+`
h400000v`+(40+e)+"h-400000z"},Pce=function(e,t){return"M473,"+(2713+e+t)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Oce=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},Fce=function(e,t,n){var r=n-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+`
H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},zce=function(e,t,n){t=1e3*t;var r="";switch(e){case"sqrtMain":r=Dce(t,Wf);break;case"sqrtSize1":r=Mce(t,Wf);break;case"sqrtSize2":r=Nce(t,Wf);break;case"sqrtSize3":r=Rce(t,Wf);break;case"sqrtSize4":r=Pce(t,Wf);break;case"sqrtTall":r=Fce(t,Wf,n)}return r},Bce=function(e,t){switch(e){case"\u239C":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"\u239F":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23A2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23A5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23AA":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23D0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},vU={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Hce=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z
M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z
M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},Pu=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Rt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){var e=t=>t.toText();return this.children.map(e).join("")}},Na={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ew={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},_U={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Uce(i,e){Na[i]=e}function Y5(i,e,t){if(!Na[e])throw new Error("Font metrics not found for font: "+e+".");var n=i.charCodeAt(0),r=Na[e][n];if(!r&&i[0]in _U&&(n=_U[i[0]].charCodeAt(0),r=Na[e][n]),!r&&t==="text"&&XU(n)&&(r=Na[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var S5={};function jce(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!S5[e]){var t=S5[e]={cssEmPerMu:ew.quad[e]/18};for(var n in ew)ew.hasOwnProperty(n)&&(t[n]=ew[n][e])}return S5[e]}var Wce=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],yU=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],wU=function(e,t){return t.size<2?e:Wce[e-1][t.size-1]},pw=class i{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||i.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=yU[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new i(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:wU(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:yU[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=wU(i.BASESIZE,e);return this.size===t&&this.textSize===i.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=jce(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};pw.BASESIZE=6;var F5={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Vce={ex:!0,em:!0,mu:!0},QU=function(e){return typeof e!="string"&&(e=e.unit),e in F5||e in Vce||e==="ex"},hn=function(e,t){var n;if(e.unit in F5)n=F5[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var r;if(t.style.isTight()?r=t.havingStyle(t.style.text()):r=t,e.unit==="ex")n=r.fontMetrics().xHeight;else if(e.unit==="em")n=r.fontMetrics().quad;else throw new Be("Invalid unit: '"+e.unit+"'");r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},$e=function(e){return+e.toFixed(4)+"em"},pd=function(e){return e.filter(t=>t).join(" ")},ZU=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},JU=function(e){var t=document.createElement(e);t.className=pd(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)t.appendChild(this.children[o].toNode());return t},ej=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Rt.escape(pd(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Rt.hyphenate(r)+":"+this.style[r]+";");n&&(t+=' style="'+Rt.escape(n)+'"');for(var o in this.attributes)this.attributes.hasOwnProperty(o)&&(t+=" "+o+'="'+Rt.escape(this.attributes[o])+'"');t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t},Ou=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ZU.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Rt.contains(this.classes,e)}toNode(){return JU.call(this,"span")}toMarkup(){return ej.call(this,"span")}},Gg=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ZU.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Rt.contains(this.classes,e)}toNode(){return JU.call(this,"a")}toMarkup(){return ej.call(this,"a")}},z5=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Rt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=Rt.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+Rt.escape(t)+'"'),e+="'/>",e}},qce={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},mo=class{constructor(e,t,n,r,o,s,a,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=o||0,this.width=s||0,this.classes=a||[],this.style=l||{},this.maxFontSize=0;var c=Ace(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=qce[this.text])}hasClass(e){return Rt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=$e(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=pd(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(t=t||document.createElement("span"),t.style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Rt.escape(pd(this.classes)),t+='"');var n="";this.italic>0&&(n+="margin-right:"+this.italic+"em;");for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Rt.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+Rt.escape(n)+'"');var o=Rt.escape(this.text);return e?(t+=">",t+=o,t+="</span>",t):o}},zs=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}},Pa=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",vU[this.pathName]),t}toMarkup(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+vU[this.pathName]+"'/>"}},Yg=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>",e}};function xU(i){if(i instanceof mo)return i;throw new Error("Expected symbolNode but got "+String(i)+".")}function Kce(i){if(i instanceof Ou)return i;throw new Error("Expected span<HtmlDomNode> but got "+String(i)+".")}var $ce={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Gce={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Gi={math:{},text:{}};function x(i,e,t,n,r,o){Gi[i][r]={font:e,group:t,replace:n},o&&n&&(Gi[i][n]=Gi[i][r])}var T="math",Ae="text",D="main",q="ams",nn="accent-token",ot="bin",eo="close",Kf="inner",St="mathord",Nn="op-token",Ho="open",ww="punct",K="rel",jl="spacing",J="textord";x(T,D,K,"\u2261","\\equiv",!0);x(T,D,K,"\u227A","\\prec",!0);x(T,D,K,"\u227B","\\succ",!0);x(T,D,K,"\u223C","\\sim",!0);x(T,D,K,"\u22A5","\\perp");x(T,D,K,"\u2AAF","\\preceq",!0);x(T,D,K,"\u2AB0","\\succeq",!0);x(T,D,K,"\u2243","\\simeq",!0);x(T,D,K,"\u2223","\\mid",!0);x(T,D,K,"\u226A","\\ll",!0);x(T,D,K,"\u226B","\\gg",!0);x(T,D,K,"\u224D","\\asymp",!0);x(T,D,K,"\u2225","\\parallel");x(T,D,K,"\u22C8","\\bowtie",!0);x(T,D,K,"\u2323","\\smile",!0);x(T,D,K,"\u2291","\\sqsubseteq",!0);x(T,D,K,"\u2292","\\sqsupseteq",!0);x(T,D,K,"\u2250","\\doteq",!0);x(T,D,K,"\u2322","\\frown",!0);x(T,D,K,"\u220B","\\ni",!0);x(T,D,K,"\u221D","\\propto",!0);x(T,D,K,"\u22A2","\\vdash",!0);x(T,D,K,"\u22A3","\\dashv",!0);x(T,D,K,"\u220B","\\owns");x(T,D,ww,".","\\ldotp");x(T,D,ww,"\u22C5","\\cdotp");x(T,D,J,"#","\\#");x(Ae,D,J,"#","\\#");x(T,D,J,"&","\\&");x(Ae,D,J,"&","\\&");x(T,D,J,"\u2135","\\aleph",!0);x(T,D,J,"\u2200","\\forall",!0);x(T,D,J,"\u210F","\\hbar",!0);x(T,D,J,"\u2203","\\exists",!0);x(T,D,J,"\u2207","\\nabla",!0);x(T,D,J,"\u266D","\\flat",!0);x(T,D,J,"\u2113","\\ell",!0);x(T,D,J,"\u266E","\\natural",!0);x(T,D,J,"\u2663","\\clubsuit",!0);x(T,D,J,"\u2118","\\wp",!0);x(T,D,J,"\u266F","\\sharp",!0);x(T,D,J,"\u2662","\\diamondsuit",!0);x(T,D,J,"\u211C","\\Re",!0);x(T,D,J,"\u2661","\\heartsuit",!0);x(T,D,J,"\u2111","\\Im",!0);x(T,D,J,"\u2660","\\spadesuit",!0);x(T,D,J,"\xA7","\\S",!0);x(Ae,D,J,"\xA7","\\S");x(T,D,J,"\xB6","\\P",!0);x(Ae,D,J,"\xB6","\\P");x(T,D,J,"\u2020","\\dag");x(Ae,D,J,"\u2020","\\dag");x(Ae,D,J,"\u2020","\\textdagger");x(T,D,J,"\u2021","\\ddag");x(Ae,D,J,"\u2021","\\ddag");x(Ae,D,J,"\u2021","\\textdaggerdbl");x(T,D,eo,"\u23B1","\\rmoustache",!0);x(T,D,Ho,"\u23B0","\\lmoustache",!0);x(T,D,eo,"\u27EF","\\rgroup",!0);x(T,D,Ho,"\u27EE","\\lgroup",!0);x(T,D,ot,"\u2213","\\mp",!0);x(T,D,ot,"\u2296","\\ominus",!0);x(T,D,ot,"\u228E","\\uplus",!0);x(T,D,ot,"\u2293","\\sqcap",!0);x(T,D,ot,"\u2217","\\ast");x(T,D,ot,"\u2294","\\sqcup",!0);x(T,D,ot,"\u25EF","\\bigcirc",!0);x(T,D,ot,"\u2219","\\bullet",!0);x(T,D,ot,"\u2021","\\ddagger");x(T,D,ot,"\u2240","\\wr",!0);x(T,D,ot,"\u2A3F","\\amalg");x(T,D,ot,"&","\\And");x(T,D,K,"\u27F5","\\longleftarrow",!0);x(T,D,K,"\u21D0","\\Leftarrow",!0);x(T,D,K,"\u27F8","\\Longleftarrow",!0);x(T,D,K,"\u27F6","\\longrightarrow",!0);x(T,D,K,"\u21D2","\\Rightarrow",!0);x(T,D,K,"\u27F9","\\Longrightarrow",!0);x(T,D,K,"\u2194","\\leftrightarrow",!0);x(T,D,K,"\u27F7","\\longleftrightarrow",!0);x(T,D,K,"\u21D4","\\Leftrightarrow",!0);x(T,D,K,"\u27FA","\\Longleftrightarrow",!0);x(T,D,K,"\u21A6","\\mapsto",!0);x(T,D,K,"\u27FC","\\longmapsto",!0);x(T,D,K,"\u2197","\\nearrow",!0);x(T,D,K,"\u21A9","\\hookleftarrow",!0);x(T,D,K,"\u21AA","\\hookrightarrow",!0);x(T,D,K,"\u2198","\\searrow",!0);x(T,D,K,"\u21BC","\\leftharpoonup",!0);x(T,D,K,"\u21C0","\\rightharpoonup",!0);x(T,D,K,"\u2199","\\swarrow",!0);x(T,D,K,"\u21BD","\\leftharpoondown",!0);x(T,D,K,"\u21C1","\\rightharpoondown",!0);x(T,D,K,"\u2196","\\nwarrow",!0);x(T,D,K,"\u21CC","\\rightleftharpoons",!0);x(T,q,K,"\u226E","\\nless",!0);x(T,q,K,"\uE010","\\@nleqslant");x(T,q,K,"\uE011","\\@nleqq");x(T,q,K,"\u2A87","\\lneq",!0);x(T,q,K,"\u2268","\\lneqq",!0);x(T,q,K,"\uE00C","\\@lvertneqq");x(T,q,K,"\u22E6","\\lnsim",!0);x(T,q,K,"\u2A89","\\lnapprox",!0);x(T,q,K,"\u2280","\\nprec",!0);x(T,q,K,"\u22E0","\\npreceq",!0);x(T,q,K,"\u22E8","\\precnsim",!0);x(T,q,K,"\u2AB9","\\precnapprox",!0);x(T,q,K,"\u2241","\\nsim",!0);x(T,q,K,"\uE006","\\@nshortmid");x(T,q,K,"\u2224","\\nmid",!0);x(T,q,K,"\u22AC","\\nvdash",!0);x(T,q,K,"\u22AD","\\nvDash",!0);x(T,q,K,"\u22EA","\\ntriangleleft");x(T,q,K,"\u22EC","\\ntrianglelefteq",!0);x(T,q,K,"\u228A","\\subsetneq",!0);x(T,q,K,"\uE01A","\\@varsubsetneq");x(T,q,K,"\u2ACB","\\subsetneqq",!0);x(T,q,K,"\uE017","\\@varsubsetneqq");x(T,q,K,"\u226F","\\ngtr",!0);x(T,q,K,"\uE00F","\\@ngeqslant");x(T,q,K,"\uE00E","\\@ngeqq");x(T,q,K,"\u2A88","\\gneq",!0);x(T,q,K,"\u2269","\\gneqq",!0);x(T,q,K,"\uE00D","\\@gvertneqq");x(T,q,K,"\u22E7","\\gnsim",!0);x(T,q,K,"\u2A8A","\\gnapprox",!0);x(T,q,K,"\u2281","\\nsucc",!0);x(T,q,K,"\u22E1","\\nsucceq",!0);x(T,q,K,"\u22E9","\\succnsim",!0);x(T,q,K,"\u2ABA","\\succnapprox",!0);x(T,q,K,"\u2246","\\ncong",!0);x(T,q,K,"\uE007","\\@nshortparallel");x(T,q,K,"\u2226","\\nparallel",!0);x(T,q,K,"\u22AF","\\nVDash",!0);x(T,q,K,"\u22EB","\\ntriangleright");x(T,q,K,"\u22ED","\\ntrianglerighteq",!0);x(T,q,K,"\uE018","\\@nsupseteqq");x(T,q,K,"\u228B","\\supsetneq",!0);x(T,q,K,"\uE01B","\\@varsupsetneq");x(T,q,K,"\u2ACC","\\supsetneqq",!0);x(T,q,K,"\uE019","\\@varsupsetneqq");x(T,q,K,"\u22AE","\\nVdash",!0);x(T,q,K,"\u2AB5","\\precneqq",!0);x(T,q,K,"\u2AB6","\\succneqq",!0);x(T,q,K,"\uE016","\\@nsubseteqq");x(T,q,ot,"\u22B4","\\unlhd");x(T,q,ot,"\u22B5","\\unrhd");x(T,q,K,"\u219A","\\nleftarrow",!0);x(T,q,K,"\u219B","\\nrightarrow",!0);x(T,q,K,"\u21CD","\\nLeftarrow",!0);x(T,q,K,"\u21CF","\\nRightarrow",!0);x(T,q,K,"\u21AE","\\nleftrightarrow",!0);x(T,q,K,"\u21CE","\\nLeftrightarrow",!0);x(T,q,K,"\u25B3","\\vartriangle");x(T,q,J,"\u210F","\\hslash");x(T,q,J,"\u25BD","\\triangledown");x(T,q,J,"\u25CA","\\lozenge");x(T,q,J,"\u24C8","\\circledS");x(T,q,J,"\xAE","\\circledR");x(Ae,q,J,"\xAE","\\circledR");x(T,q,J,"\u2221","\\measuredangle",!0);x(T,q,J,"\u2204","\\nexists");x(T,q,J,"\u2127","\\mho");x(T,q,J,"\u2132","\\Finv",!0);x(T,q,J,"\u2141","\\Game",!0);x(T,q,J,"\u2035","\\backprime");x(T,q,J,"\u25B2","\\blacktriangle");x(T,q,J,"\u25BC","\\blacktriangledown");x(T,q,J,"\u25A0","\\blacksquare");x(T,q,J,"\u29EB","\\blacklozenge");x(T,q,J,"\u2605","\\bigstar");x(T,q,J,"\u2222","\\sphericalangle",!0);x(T,q,J,"\u2201","\\complement",!0);x(T,q,J,"\xF0","\\eth",!0);x(Ae,D,J,"\xF0","\xF0");x(T,q,J,"\u2571","\\diagup");x(T,q,J,"\u2572","\\diagdown");x(T,q,J,"\u25A1","\\square");x(T,q,J,"\u25A1","\\Box");x(T,q,J,"\u25CA","\\Diamond");x(T,q,J,"\xA5","\\yen",!0);x(Ae,q,J,"\xA5","\\yen",!0);x(T,q,J,"\u2713","\\checkmark",!0);x(Ae,q,J,"\u2713","\\checkmark");x(T,q,J,"\u2136","\\beth",!0);x(T,q,J,"\u2138","\\daleth",!0);x(T,q,J,"\u2137","\\gimel",!0);x(T,q,J,"\u03DD","\\digamma",!0);x(T,q,J,"\u03F0","\\varkappa");x(T,q,Ho,"\u250C","\\@ulcorner",!0);x(T,q,eo,"\u2510","\\@urcorner",!0);x(T,q,Ho,"\u2514","\\@llcorner",!0);x(T,q,eo,"\u2518","\\@lrcorner",!0);x(T,q,K,"\u2266","\\leqq",!0);x(T,q,K,"\u2A7D","\\leqslant",!0);x(T,q,K,"\u2A95","\\eqslantless",!0);x(T,q,K,"\u2272","\\lesssim",!0);x(T,q,K,"\u2A85","\\lessapprox",!0);x(T,q,K,"\u224A","\\approxeq",!0);x(T,q,ot,"\u22D6","\\lessdot");x(T,q,K,"\u22D8","\\lll",!0);x(T,q,K,"\u2276","\\lessgtr",!0);x(T,q,K,"\u22DA","\\lesseqgtr",!0);x(T,q,K,"\u2A8B","\\lesseqqgtr",!0);x(T,q,K,"\u2251","\\doteqdot");x(T,q,K,"\u2253","\\risingdotseq",!0);x(T,q,K,"\u2252","\\fallingdotseq",!0);x(T,q,K,"\u223D","\\backsim",!0);x(T,q,K,"\u22CD","\\backsimeq",!0);x(T,q,K,"\u2AC5","\\subseteqq",!0);x(T,q,K,"\u22D0","\\Subset",!0);x(T,q,K,"\u228F","\\sqsubset",!0);x(T,q,K,"\u227C","\\preccurlyeq",!0);x(T,q,K,"\u22DE","\\curlyeqprec",!0);x(T,q,K,"\u227E","\\precsim",!0);x(T,q,K,"\u2AB7","\\precapprox",!0);x(T,q,K,"\u22B2","\\vartriangleleft");x(T,q,K,"\u22B4","\\trianglelefteq");x(T,q,K,"\u22A8","\\vDash",!0);x(T,q,K,"\u22AA","\\Vvdash",!0);x(T,q,K,"\u2323","\\smallsmile");x(T,q,K,"\u2322","\\smallfrown");x(T,q,K,"\u224F","\\bumpeq",!0);x(T,q,K,"\u224E","\\Bumpeq",!0);x(T,q,K,"\u2267","\\geqq",!0);x(T,q,K,"\u2A7E","\\geqslant",!0);x(T,q,K,"\u2A96","\\eqslantgtr",!0);x(T,q,K,"\u2273","\\gtrsim",!0);x(T,q,K,"\u2A86","\\gtrapprox",!0);x(T,q,ot,"\u22D7","\\gtrdot");x(T,q,K,"\u22D9","\\ggg",!0);x(T,q,K,"\u2277","\\gtrless",!0);x(T,q,K,"\u22DB","\\gtreqless",!0);x(T,q,K,"\u2A8C","\\gtreqqless",!0);x(T,q,K,"\u2256","\\eqcirc",!0);x(T,q,K,"\u2257","\\circeq",!0);x(T,q,K,"\u225C","\\triangleq",!0);x(T,q,K,"\u223C","\\thicksim");x(T,q,K,"\u2248","\\thickapprox");x(T,q,K,"\u2AC6","\\supseteqq",!0);x(T,q,K,"\u22D1","\\Supset",!0);x(T,q,K,"\u2290","\\sqsupset",!0);x(T,q,K,"\u227D","\\succcurlyeq",!0);x(T,q,K,"\u22DF","\\curlyeqsucc",!0);x(T,q,K,"\u227F","\\succsim",!0);x(T,q,K,"\u2AB8","\\succapprox",!0);x(T,q,K,"\u22B3","\\vartriangleright");x(T,q,K,"\u22B5","\\trianglerighteq");x(T,q,K,"\u22A9","\\Vdash",!0);x(T,q,K,"\u2223","\\shortmid");x(T,q,K,"\u2225","\\shortparallel");x(T,q,K,"\u226C","\\between",!0);x(T,q,K,"\u22D4","\\pitchfork",!0);x(T,q,K,"\u221D","\\varpropto");x(T,q,K,"\u25C0","\\blacktriangleleft");x(T,q,K,"\u2234","\\therefore",!0);x(T,q,K,"\u220D","\\backepsilon");x(T,q,K,"\u25B6","\\blacktriangleright");x(T,q,K,"\u2235","\\because",!0);x(T,q,K,"\u22D8","\\llless");x(T,q,K,"\u22D9","\\gggtr");x(T,q,ot,"\u22B2","\\lhd");x(T,q,ot,"\u22B3","\\rhd");x(T,q,K,"\u2242","\\eqsim",!0);x(T,D,K,"\u22C8","\\Join");x(T,q,K,"\u2251","\\Doteq",!0);x(T,q,ot,"\u2214","\\dotplus",!0);x(T,q,ot,"\u2216","\\smallsetminus");x(T,q,ot,"\u22D2","\\Cap",!0);x(T,q,ot,"\u22D3","\\Cup",!0);x(T,q,ot,"\u2A5E","\\doublebarwedge",!0);x(T,q,ot,"\u229F","\\boxminus",!0);x(T,q,ot,"\u229E","\\boxplus",!0);x(T,q,ot,"\u22C7","\\divideontimes",!0);x(T,q,ot,"\u22C9","\\ltimes",!0);x(T,q,ot,"\u22CA","\\rtimes",!0);x(T,q,ot,"\u22CB","\\leftthreetimes",!0);x(T,q,ot,"\u22CC","\\rightthreetimes",!0);x(T,q,ot,"\u22CF","\\curlywedge",!0);x(T,q,ot,"\u22CE","\\curlyvee",!0);x(T,q,ot,"\u229D","\\circleddash",!0);x(T,q,ot,"\u229B","\\circledast",!0);x(T,q,ot,"\u22C5","\\centerdot");x(T,q,ot,"\u22BA","\\intercal",!0);x(T,q,ot,"\u22D2","\\doublecap");x(T,q,ot,"\u22D3","\\doublecup");x(T,q,ot,"\u22A0","\\boxtimes",!0);x(T,q,K,"\u21E2","\\dashrightarrow",!0);x(T,q,K,"\u21E0","\\dashleftarrow",!0);x(T,q,K,"\u21C7","\\leftleftarrows",!0);x(T,q,K,"\u21C6","\\leftrightarrows",!0);x(T,q,K,"\u21DA","\\Lleftarrow",!0);x(T,q,K,"\u219E","\\twoheadleftarrow",!0);x(T,q,K,"\u21A2","\\leftarrowtail",!0);x(T,q,K,"\u21AB","\\looparrowleft",!0);x(T,q,K,"\u21CB","\\leftrightharpoons",!0);x(T,q,K,"\u21B6","\\curvearrowleft",!0);x(T,q,K,"\u21BA","\\circlearrowleft",!0);x(T,q,K,"\u21B0","\\Lsh",!0);x(T,q,K,"\u21C8","\\upuparrows",!0);x(T,q,K,"\u21BF","\\upharpoonleft",!0);x(T,q,K,"\u21C3","\\downharpoonleft",!0);x(T,D,K,"\u22B6","\\origof",!0);x(T,D,K,"\u22B7","\\imageof",!0);x(T,q,K,"\u22B8","\\multimap",!0);x(T,q,K,"\u21AD","\\leftrightsquigarrow",!0);x(T,q,K,"\u21C9","\\rightrightarrows",!0);x(T,q,K,"\u21C4","\\rightleftarrows",!0);x(T,q,K,"\u21A0","\\twoheadrightarrow",!0);x(T,q,K,"\u21A3","\\rightarrowtail",!0);x(T,q,K,"\u21AC","\\looparrowright",!0);x(T,q,K,"\u21B7","\\curvearrowright",!0);x(T,q,K,"\u21BB","\\circlearrowright",!0);x(T,q,K,"\u21B1","\\Rsh",!0);x(T,q,K,"\u21CA","\\downdownarrows",!0);x(T,q,K,"\u21BE","\\upharpoonright",!0);x(T,q,K,"\u21C2","\\downharpoonright",!0);x(T,q,K,"\u21DD","\\rightsquigarrow",!0);x(T,q,K,"\u21DD","\\leadsto");x(T,q,K,"\u21DB","\\Rrightarrow",!0);x(T,q,K,"\u21BE","\\restriction");x(T,D,J,"\u2018","`");x(T,D,J,"$","\\$");x(Ae,D,J,"$","\\$");x(Ae,D,J,"$","\\textdollar");x(T,D,J,"%","\\%");x(Ae,D,J,"%","\\%");x(T,D,J,"_","\\_");x(Ae,D,J,"_","\\_");x(Ae,D,J,"_","\\textunderscore");x(T,D,J,"\u2220","\\angle",!0);x(T,D,J,"\u221E","\\infty",!0);x(T,D,J,"\u2032","\\prime");x(T,D,J,"\u25B3","\\triangle");x(T,D,J,"\u0393","\\Gamma",!0);x(T,D,J,"\u0394","\\Delta",!0);x(T,D,J,"\u0398","\\Theta",!0);x(T,D,J,"\u039B","\\Lambda",!0);x(T,D,J,"\u039E","\\Xi",!0);x(T,D,J,"\u03A0","\\Pi",!0);x(T,D,J,"\u03A3","\\Sigma",!0);x(T,D,J,"\u03A5","\\Upsilon",!0);x(T,D,J,"\u03A6","\\Phi",!0);x(T,D,J,"\u03A8","\\Psi",!0);x(T,D,J,"\u03A9","\\Omega",!0);x(T,D,J,"A","\u0391");x(T,D,J,"B","\u0392");x(T,D,J,"E","\u0395");x(T,D,J,"Z","\u0396");x(T,D,J,"H","\u0397");x(T,D,J,"I","\u0399");x(T,D,J,"K","\u039A");x(T,D,J,"M","\u039C");x(T,D,J,"N","\u039D");x(T,D,J,"O","\u039F");x(T,D,J,"P","\u03A1");x(T,D,J,"T","\u03A4");x(T,D,J,"X","\u03A7");x(T,D,J,"\xAC","\\neg",!0);x(T,D,J,"\xAC","\\lnot");x(T,D,J,"\u22A4","\\top");x(T,D,J,"\u22A5","\\bot");x(T,D,J,"\u2205","\\emptyset");x(T,q,J,"\u2205","\\varnothing");x(T,D,St,"\u03B1","\\alpha",!0);x(T,D,St,"\u03B2","\\beta",!0);x(T,D,St,"\u03B3","\\gamma",!0);x(T,D,St,"\u03B4","\\delta",!0);x(T,D,St,"\u03F5","\\epsilon",!0);x(T,D,St,"\u03B6","\\zeta",!0);x(T,D,St,"\u03B7","\\eta",!0);x(T,D,St,"\u03B8","\\theta",!0);x(T,D,St,"\u03B9","\\iota",!0);x(T,D,St,"\u03BA","\\kappa",!0);x(T,D,St,"\u03BB","\\lambda",!0);x(T,D,St,"\u03BC","\\mu",!0);x(T,D,St,"\u03BD","\\nu",!0);x(T,D,St,"\u03BE","\\xi",!0);x(T,D,St,"\u03BF","\\omicron",!0);x(T,D,St,"\u03C0","\\pi",!0);x(T,D,St,"\u03C1","\\rho",!0);x(T,D,St,"\u03C3","\\sigma",!0);x(T,D,St,"\u03C4","\\tau",!0);x(T,D,St,"\u03C5","\\upsilon",!0);x(T,D,St,"\u03D5","\\phi",!0);x(T,D,St,"\u03C7","\\chi",!0);x(T,D,St,"\u03C8","\\psi",!0);x(T,D,St,"\u03C9","\\omega",!0);x(T,D,St,"\u03B5","\\varepsilon",!0);x(T,D,St,"\u03D1","\\vartheta",!0);x(T,D,St,"\u03D6","\\varpi",!0);x(T,D,St,"\u03F1","\\varrho",!0);x(T,D,St,"\u03C2","\\varsigma",!0);x(T,D,St,"\u03C6","\\varphi",!0);x(T,D,ot,"\u2217","*",!0);x(T,D,ot,"+","+");x(T,D,ot,"\u2212","-",!0);x(T,D,ot,"\u22C5","\\cdot",!0);x(T,D,ot,"\u2218","\\circ",!0);x(T,D,ot,"\xF7","\\div",!0);x(T,D,ot,"\xB1","\\pm",!0);x(T,D,ot,"\xD7","\\times",!0);x(T,D,ot,"\u2229","\\cap",!0);x(T,D,ot,"\u222A","\\cup",!0);x(T,D,ot,"\u2216","\\setminus",!0);x(T,D,ot,"\u2227","\\land");x(T,D,ot,"\u2228","\\lor");x(T,D,ot,"\u2227","\\wedge",!0);x(T,D,ot,"\u2228","\\vee",!0);x(T,D,J,"\u221A","\\surd");x(T,D,Ho,"\u27E8","\\langle",!0);x(T,D,Ho,"\u2223","\\lvert");x(T,D,Ho,"\u2225","\\lVert");x(T,D,eo,"?","?");x(T,D,eo,"!","!");x(T,D,eo,"\u27E9","\\rangle",!0);x(T,D,eo,"\u2223","\\rvert");x(T,D,eo,"\u2225","\\rVert");x(T,D,K,"=","=");x(T,D,K,":",":");x(T,D,K,"\u2248","\\approx",!0);x(T,D,K,"\u2245","\\cong",!0);x(T,D,K,"\u2265","\\ge");x(T,D,K,"\u2265","\\geq",!0);x(T,D,K,"\u2190","\\gets");x(T,D,K,">","\\gt",!0);x(T,D,K,"\u2208","\\in",!0);x(T,D,K,"\uE020","\\@not");x(T,D,K,"\u2282","\\subset",!0);x(T,D,K,"\u2283","\\supset",!0);x(T,D,K,"\u2286","\\subseteq",!0);x(T,D,K,"\u2287","\\supseteq",!0);x(T,q,K,"\u2288","\\nsubseteq",!0);x(T,q,K,"\u2289","\\nsupseteq",!0);x(T,D,K,"\u22A8","\\models");x(T,D,K,"\u2190","\\leftarrow",!0);x(T,D,K,"\u2264","\\le");x(T,D,K,"\u2264","\\leq",!0);x(T,D,K,"<","\\lt",!0);x(T,D,K,"\u2192","\\rightarrow",!0);x(T,D,K,"\u2192","\\to");x(T,q,K,"\u2271","\\ngeq",!0);x(T,q,K,"\u2270","\\nleq",!0);x(T,D,jl,"\xA0","\\ ");x(T,D,jl,"\xA0","\\space");x(T,D,jl,"\xA0","\\nobreakspace");x(Ae,D,jl,"\xA0","\\ ");x(Ae,D,jl,"\xA0"," ");x(Ae,D,jl,"\xA0","\\space");x(Ae,D,jl,"\xA0","\\nobreakspace");x(T,D,jl,null,"\\nobreak");x(T,D,jl,null,"\\allowbreak");x(T,D,ww,",",",");x(T,D,ww,";",";");x(T,q,ot,"\u22BC","\\barwedge",!0);x(T,q,ot,"\u22BB","\\veebar",!0);x(T,D,ot,"\u2299","\\odot",!0);x(T,D,ot,"\u2295","\\oplus",!0);x(T,D,ot,"\u2297","\\otimes",!0);x(T,D,J,"\u2202","\\partial",!0);x(T,D,ot,"\u2298","\\oslash",!0);x(T,q,ot,"\u229A","\\circledcirc",!0);x(T,q,ot,"\u22A1","\\boxdot",!0);x(T,D,ot,"\u25B3","\\bigtriangleup");x(T,D,ot,"\u25BD","\\bigtriangledown");x(T,D,ot,"\u2020","\\dagger");x(T,D,ot,"\u22C4","\\diamond");x(T,D,ot,"\u22C6","\\star");x(T,D,ot,"\u25C3","\\triangleleft");x(T,D,ot,"\u25B9","\\triangleright");x(T,D,Ho,"{","\\{");x(Ae,D,J,"{","\\{");x(Ae,D,J,"{","\\textbraceleft");x(T,D,eo,"}","\\}");x(Ae,D,J,"}","\\}");x(Ae,D,J,"}","\\textbraceright");x(T,D,Ho,"{","\\lbrace");x(T,D,eo,"}","\\rbrace");x(T,D,Ho,"[","\\lbrack",!0);x(Ae,D,J,"[","\\lbrack",!0);x(T,D,eo,"]","\\rbrack",!0);x(Ae,D,J,"]","\\rbrack",!0);x(T,D,Ho,"(","\\lparen",!0);x(T,D,eo,")","\\rparen",!0);x(Ae,D,J,"<","\\textless",!0);x(Ae,D,J,">","\\textgreater",!0);x(T,D,Ho,"\u230A","\\lfloor",!0);x(T,D,eo,"\u230B","\\rfloor",!0);x(T,D,Ho,"\u2308","\\lceil",!0);x(T,D,eo,"\u2309","\\rceil",!0);x(T,D,J,"\\","\\backslash");x(T,D,J,"\u2223","|");x(T,D,J,"\u2223","\\vert");x(Ae,D,J,"|","\\textbar",!0);x(T,D,J,"\u2225","\\|");x(T,D,J,"\u2225","\\Vert");x(Ae,D,J,"\u2225","\\textbardbl");x(Ae,D,J,"~","\\textasciitilde");x(Ae,D,J,"\\","\\textbackslash");x(Ae,D,J,"^","\\textasciicircum");x(T,D,K,"\u2191","\\uparrow",!0);x(T,D,K,"\u21D1","\\Uparrow",!0);x(T,D,K,"\u2193","\\downarrow",!0);x(T,D,K,"\u21D3","\\Downarrow",!0);x(T,D,K,"\u2195","\\updownarrow",!0);x(T,D,K,"\u21D5","\\Updownarrow",!0);x(T,D,Nn,"\u2210","\\coprod");x(T,D,Nn,"\u22C1","\\bigvee");x(T,D,Nn,"\u22C0","\\bigwedge");x(T,D,Nn,"\u2A04","\\biguplus");x(T,D,Nn,"\u22C2","\\bigcap");x(T,D,Nn,"\u22C3","\\bigcup");x(T,D,Nn,"\u222B","\\int");x(T,D,Nn,"\u222B","\\intop");x(T,D,Nn,"\u222C","\\iint");x(T,D,Nn,"\u222D","\\iiint");x(T,D,Nn,"\u220F","\\prod");x(T,D,Nn,"\u2211","\\sum");x(T,D,Nn,"\u2A02","\\bigotimes");x(T,D,Nn,"\u2A01","\\bigoplus");x(T,D,Nn,"\u2A00","\\bigodot");x(T,D,Nn,"\u222E","\\oint");x(T,D,Nn,"\u222F","\\oiint");x(T,D,Nn,"\u2230","\\oiiint");x(T,D,Nn,"\u2A06","\\bigsqcup");x(T,D,Nn,"\u222B","\\smallint");x(Ae,D,Kf,"\u2026","\\textellipsis");x(T,D,Kf,"\u2026","\\mathellipsis");x(Ae,D,Kf,"\u2026","\\ldots",!0);x(T,D,Kf,"\u2026","\\ldots",!0);x(T,D,Kf,"\u22EF","\\@cdots",!0);x(T,D,Kf,"\u22F1","\\ddots",!0);x(T,D,J,"\u22EE","\\varvdots");x(T,D,nn,"\u02CA","\\acute");x(T,D,nn,"\u02CB","\\grave");x(T,D,nn,"\xA8","\\ddot");x(T,D,nn,"~","\\tilde");x(T,D,nn,"\u02C9","\\bar");x(T,D,nn,"\u02D8","\\breve");x(T,D,nn,"\u02C7","\\check");x(T,D,nn,"^","\\hat");x(T,D,nn,"\u20D7","\\vec");x(T,D,nn,"\u02D9","\\dot");x(T,D,nn,"\u02DA","\\mathring");x(T,D,St,"\uE131","\\@imath");x(T,D,St,"\uE237","\\@jmath");x(T,D,J,"\u0131","\u0131");x(T,D,J,"\u0237","\u0237");x(Ae,D,J,"\u0131","\\i",!0);x(Ae,D,J,"\u0237","\\j",!0);x(Ae,D,J,"\xDF","\\ss",!0);x(Ae,D,J,"\xE6","\\ae",!0);x(Ae,D,J,"\u0153","\\oe",!0);x(Ae,D,J,"\xF8","\\o",!0);x(Ae,D,J,"\xC6","\\AE",!0);x(Ae,D,J,"\u0152","\\OE",!0);x(Ae,D,J,"\xD8","\\O",!0);x(Ae,D,nn,"\u02CA","\\'");x(Ae,D,nn,"\u02CB","\\`");x(Ae,D,nn,"\u02C6","\\^");x(Ae,D,nn,"\u02DC","\\~");x(Ae,D,nn,"\u02C9","\\=");x(Ae,D,nn,"\u02D8","\\u");x(Ae,D,nn,"\u02D9","\\.");x(Ae,D,nn,"\xB8","\\c");x(Ae,D,nn,"\u02DA","\\r");x(Ae,D,nn,"\u02C7","\\v");x(Ae,D,nn,"\xA8",'\\"');x(Ae,D,nn,"\u02DD","\\H");x(Ae,D,nn,"\u25EF","\\textcircled");var tj={"--":!0,"---":!0,"``":!0,"''":!0};x(Ae,D,J,"\u2013","--",!0);x(Ae,D,J,"\u2013","\\textendash");x(Ae,D,J,"\u2014","---",!0);x(Ae,D,J,"\u2014","\\textemdash");x(Ae,D,J,"\u2018","`",!0);x(Ae,D,J,"\u2018","\\textquoteleft");x(Ae,D,J,"\u2019","'",!0);x(Ae,D,J,"\u2019","\\textquoteright");x(Ae,D,J,"\u201C","``",!0);x(Ae,D,J,"\u201C","\\textquotedblleft");x(Ae,D,J,"\u201D","''",!0);x(Ae,D,J,"\u201D","\\textquotedblright");x(T,D,J,"\xB0","\\degree",!0);x(Ae,D,J,"\xB0","\\degree");x(Ae,D,J,"\xB0","\\textdegree",!0);x(T,D,J,"\xA3","\\pounds");x(T,D,J,"\xA3","\\mathsterling",!0);x(Ae,D,J,"\xA3","\\pounds");x(Ae,D,J,"\xA3","\\textsterling",!0);x(T,q,J,"\u2720","\\maltese");x(Ae,q,J,"\u2720","\\maltese");var CU='0123456789/@."';for(tw=0;tw<CU.length;tw++)k5=CU.charAt(tw),x(T,D,J,k5,k5);var k5,tw,SU='0123456789!@*()-=+";:?/.,';for(iw=0;iw<SU.length;iw++)E5=SU.charAt(iw),x(Ae,D,J,E5,E5);var E5,iw,mw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(nw=0;nw<mw.length;nw++)jg=mw.charAt(nw),x(T,D,St,jg,jg),x(Ae,D,J,jg,jg);var jg,nw;x(T,q,J,"C","\u2102");x(Ae,q,J,"C","\u2102");x(T,q,J,"H","\u210D");x(Ae,q,J,"H","\u210D");x(T,q,J,"N","\u2115");x(Ae,q,J,"N","\u2115");x(T,q,J,"P","\u2119");x(Ae,q,J,"P","\u2119");x(T,q,J,"Q","\u211A");x(Ae,q,J,"Q","\u211A");x(T,q,J,"R","\u211D");x(Ae,q,J,"R","\u211D");x(T,q,J,"Z","\u2124");x(Ae,q,J,"Z","\u2124");x(T,D,St,"h","\u210E");x(Ae,D,St,"h","\u210E");var Nt="";for(Fr=0;Fr<mw.length;Fr++)dn=mw.charAt(Fr),Nt=String.fromCharCode(55349,56320+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Nt=String.fromCharCode(55349,56372+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Nt=String.fromCharCode(55349,56424+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Nt=String.fromCharCode(55349,56580+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Nt=String.fromCharCode(55349,56684+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Nt=String.fromCharCode(55349,56736+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Nt=String.fromCharCode(55349,56788+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Nt=String.fromCharCode(55349,56840+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Nt=String.fromCharCode(55349,56944+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Fr<26&&(Nt=String.fromCharCode(55349,56632+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt),Nt=String.fromCharCode(55349,56476+Fr),x(T,D,St,dn,Nt),x(Ae,D,J,dn,Nt));var dn,Fr;Nt=String.fromCharCode(55349,56668);x(T,D,St,"k",Nt);x(Ae,D,J,"k",Nt);for(hd=0;hd<10;hd++)Ol=hd.toString(),Nt=String.fromCharCode(55349,57294+hd),x(T,D,St,Ol,Nt),x(Ae,D,J,Ol,Nt),Nt=String.fromCharCode(55349,57314+hd),x(T,D,St,Ol,Nt),x(Ae,D,J,Ol,Nt),Nt=String.fromCharCode(55349,57324+hd),x(T,D,St,Ol,Nt),x(Ae,D,J,Ol,Nt),Nt=String.fromCharCode(55349,57334+hd),x(T,D,St,Ol,Nt),x(Ae,D,J,Ol,Nt);var Ol,hd,B5="\xD0\xDE\xFE";for(rw=0;rw<B5.length;rw++)Wg=B5.charAt(rw),x(T,D,St,Wg,Wg),x(Ae,D,J,Wg,Wg);var Wg,rw,ow=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],kU=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Yce=function(e,t){var n=e.charCodeAt(0),r=e.charCodeAt(1),o=(n-55296)*1024+(r-56320)+65536,s=t==="math"?0:1;if(119808<=o&&o<120484){var a=Math.floor((o-119808)/26);return[ow[a][2],ow[a][s]]}else if(120782<=o&&o<=120831){var l=Math.floor((o-120782)/10);return[kU[l][2],kU[l][s]]}else{if(o===120485||o===120486)return[ow[0][2],ow[0][s]];if(120486<o&&o<120782)return["",""];throw new Be("Unsupported character: "+e)}},xw=function(e,t,n){return Gi[n][e]&&Gi[n][e].replace&&(e=Gi[n][e].replace),{value:e,metrics:Y5(e,t,n)}},Fs=function(e,t,n,r,o){var s=xw(e,t,n),a=s.metrics;e=s.value;var l;if(a){var c=a.italic;(n==="text"||r&&r.font==="mathit")&&(c=0),l=new mo(e,a.height,a.depth,c,a.skew,a.width,o)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+e+"' in style '"+t+"' and mode '"+n+"'")),l=new mo(e,0,0,0,0,0,o);if(r){l.maxFontSize=r.sizeMultiplier,r.style.isTight()&&l.classes.push("mtight");var d=r.getColor();d&&(l.style.color=d)}return l},Xce=function(e,t,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&xw(e,"Main-Bold",t).metrics?Fs(e,"Main-Bold",t,n,r.concat(["mathbf"])):e==="\\"||Gi[t][e].font==="main"?Fs(e,"Main-Regular",t,n,r):Fs(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},Qce=function(e,t,n,r,o){return o!=="textord"&&xw(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Zce=function(e,t,n){var r=e.mode,o=e.text,s=["mord"],a=r==="math"||r==="text"&&t.font,l=a?t.font:t.fontFamily,c="",d="";if(o.charCodeAt(0)===55349&&([c,d]=Yce(o,r)),c.length>0)return Fs(o,c,r,t,s.concat(d));if(l){var u,h;if(l==="boldsymbol"){var f=Qce(o,r,t,s,n);u=f.fontName,h=[f.fontClass]}else a?(u=rj[l].fontName,h=[l]):(u=sw(l,t.fontWeight,t.fontShape),h=[l,t.fontWeight,t.fontShape]);if(xw(o,u,r).metrics)return Fs(o,u,r,t,s.concat(h));if(tj.hasOwnProperty(o)&&u.slice(0,10)==="Typewriter"){for(var m=[],g=0;g<o.length;g++)m.push(Fs(o[g],u,r,t,s.concat(h)));return nj(m)}}if(n==="mathord")return Fs(o,"Math-Italic",r,t,s.concat(["mathnormal"]));if(n==="textord"){var w=Gi[r][o]&&Gi[r][o].font;if(w==="ams"){var _=sw("amsrm",t.fontWeight,t.fontShape);return Fs(o,_,r,t,s.concat("amsrm",t.fontWeight,t.fontShape))}else if(w==="main"||!w){var E=sw("textrm",t.fontWeight,t.fontShape);return Fs(o,E,r,t,s.concat(t.fontWeight,t.fontShape))}else{var A=sw(w,t.fontWeight,t.fontShape);return Fs(o,A,r,t,s.concat(A,t.fontWeight,t.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},Jce=(i,e)=>{if(pd(i.classes)!==pd(e.classes)||i.skew!==e.skew||i.maxFontSize!==e.maxFontSize)return!1;if(i.classes.length===1){var t=i.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n in i.style)if(i.style.hasOwnProperty(n)&&i.style[n]!==e.style[n])return!1;for(var r in e.style)if(e.style.hasOwnProperty(r)&&i.style[r]!==e.style[r])return!1;return!0},ede=i=>{for(var e=0;e<i.length-1;e++){var t=i[e],n=i[e+1];t instanceof mo&&n instanceof mo&&Jce(t,n)&&(t.text+=n.text,t.height=Math.max(t.height,n.height),t.depth=Math.max(t.depth,n.depth),t.italic=n.italic,i.splice(e+1,1),e--)}return i},X5=function(e){for(var t=0,n=0,r=0,o=0;o<e.children.length;o++){var s=e.children[o];s.height>t&&(t=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>r&&(r=s.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},fo=function(e,t,n,r){var o=new Ou(e,t,n,r);return X5(o),o},ij=(i,e,t,n)=>new Ou(i,e,t,n),tde=function(e,t,n){var r=fo([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=$e(r.height),r.maxFontSize=1,r},ide=function(e,t,n,r){var o=new Gg(e,t,n,r);return X5(o),o},nj=function(e){var t=new Pu(e);return X5(t),t},nde=function(e,t){return e instanceof Pu?fo([],[e],t):e},rde=function(e){if(e.positionType==="individualShift"){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,o=r,s=1;s<t.length;s++){var a=-t[s].shift-o-t[s].elem.depth,l=a-(t[s-1].elem.height+t[s-1].elem.depth);o=o+a,n.push({type:"kern",size:l}),n.push(t[s])}return{children:n,depth:r}}var c;if(e.positionType==="top"){for(var d=e.positionData,u=0;u<e.children.length;u++){var h=e.children[u];d-=h.type==="kern"?h.size:h.elem.height+h.elem.depth}c=d}else if(e.positionType==="bottom")c=-e.positionData;else{var f=e.children[0];if(f.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")c=-f.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")c=-f.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:c}},ode=function(e,t){for(var{children:n,depth:r}=rde(e),o=0,s=0;s<n.length;s++){var a=n[s];if(a.type==="elem"){var l=a.elem;o=Math.max(o,l.maxFontSize,l.height)}}o+=2;var c=fo(["pstrut"],[]);c.style.height=$e(o);for(var d=[],u=r,h=r,f=r,m=0;m<n.length;m++){var g=n[m];if(g.type==="kern")f+=g.size;else{var w=g.elem,_=g.wrapperClasses||[],E=g.wrapperStyle||{},A=fo(_,[c,w],void 0,E);A.style.top=$e(-o-f-w.depth),g.marginLeft&&(A.style.marginLeft=g.marginLeft),g.marginRight&&(A.style.marginRight=g.marginRight),d.push(A),f+=w.height+w.depth}u=Math.min(u,f),h=Math.max(h,f)}var L=fo(["vlist"],d);L.style.height=$e(h);var O;if(u<0){var U=fo([],[]),Q=fo(["vlist"],[U]);Q.style.height=$e(-u);var ae=fo(["vlist-s"],[new mo("\u200B")]);O=[fo(["vlist-r"],[L,ae]),fo(["vlist-r"],[Q])]}else O=[fo(["vlist-r"],[L])];var te=fo(["vlist-t"],O);return O.length===2&&te.classes.push("vlist-t2"),te.height=h,te.depth=-u,te},sde=(i,e)=>{var t=fo(["mspace"],[],e),n=hn(i,e);return t.style.marginRight=$e(n),t},sw=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}var o;return t==="textbf"&&n==="textit"?o="BoldItalic":t==="textbf"?o="Bold":t==="textit"?o="Italic":o="Regular",r+"-"+o},rj={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},oj={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ade=function(e,t){var[n,r,o]=oj[e],s=new Pa(n),a=new zs([s],{width:$e(r),height:$e(o),style:"width:"+$e(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=ij(["overlay"],[a],t);return l.height=o,l.style.height=$e(o),l.style.width=$e(r),l},se={fontMap:rj,makeSymbol:Fs,mathsym:Xce,makeSpan:fo,makeSvgSpan:ij,makeLineSpan:tde,makeAnchor:ide,makeFragment:nj,wrapFragment:nde,makeVList:ode,makeOrd:Zce,makeGlue:sde,staticSvg:ade,svgData:oj,tryCombineChars:ede},un={number:3,unit:"mu"},Nu={number:4,unit:"mu"},Fl={number:5,unit:"mu"},lde={mord:{mop:un,mbin:Nu,mrel:Fl,minner:un},mop:{mord:un,mop:un,mrel:Fl,minner:un},mbin:{mord:Nu,mop:Nu,mopen:Nu,minner:Nu},mrel:{mord:Fl,mop:Fl,mopen:Fl,minner:Fl},mopen:{},mclose:{mop:un,mbin:Nu,mrel:Fl,minner:un},mpunct:{mord:un,mop:un,mrel:Fl,mopen:un,mclose:un,mpunct:un,minner:un},minner:{mord:un,mop:un,mbin:Nu,mrel:Fl,mopen:un,mpunct:un,minner:un}},cde={mord:{mop:un},mop:{mord:un,mop:un},mbin:{},mrel:{},mopen:{},mclose:{mop:un},mpunct:{},minner:{mop:un}},sj={},gw={},bw={};function nt(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:r},l=0;l<t.length;++l)sj[t[l]]=a;e&&(o&&(gw[e]=o),s&&(bw[e]=s))}function Fu(i){var{type:e,htmlBuilder:t,mathmlBuilder:n}=i;nt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:n})}var vw=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},Tn=function(e){return e.type==="ordgroup"?e.body:[e]},Hl=se.makeSpan,dde=["leftmost","mbin","mopen","mrel","mop","mpunct"],ude=["rightmost","mrel","mclose","mpunct"],hde={display:kt.DISPLAY,text:kt.TEXT,script:kt.SCRIPT,scriptscript:kt.SCRIPTSCRIPT},fde={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Vn=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var o=[],s=0;s<e.length;s++){var a=vi(e[s],t);if(a instanceof Pu){var l=a.children;o.push(...l)}else o.push(a)}if(se.tryCombineChars(o),!n)return o;var c=t;if(e.length===1){var d=e[0];d.type==="sizing"?c=t.havingSize(d.size):d.type==="styling"&&(c=t.havingStyle(hde[d.style]))}var u=Hl([r[0]||"leftmost"],[],t),h=Hl([r[1]||"rightmost"],[],t),f=n==="root";return EU(o,(m,g)=>{var w=g.classes[0],_=m.classes[0];w==="mbin"&&Rt.contains(ude,_)?g.classes[0]="mord":_==="mbin"&&Rt.contains(dde,w)&&(m.classes[0]="mord")},{node:u},h,f),EU(o,(m,g)=>{var w=H5(g),_=H5(m),E=w&&_?m.hasClass("mtight")?cde[w][_]:lde[w][_]:null;if(E)return se.makeGlue(E,c)},{node:u},h,f),o},EU=function i(e,t,n,r,o){r&&e.push(r);for(var s=0;s<e.length;s++){var a=e[s],l=aj(a);if(l){i(l.children,t,n,null,o);continue}var c=!a.hasClass("mspace");if(c){var d=t(a,n.node);d&&(n.insertAfter?n.insertAfter(d):(e.unshift(d),s++))}c?n.node=a:o&&a.hasClass("newline")&&(n.node=Hl(["leftmost"])),n.insertAfter=(u=>h=>{e.splice(u+1,0,h),s++})(s)}r&&e.pop()},aj=function(e){return e instanceof Pu||e instanceof Gg||e instanceof Ou&&e.hasClass("enclosing")?e:null},pde=function i(e,t){var n=aj(e);if(n){var r=n.children;if(r.length){if(t==="right")return i(r[r.length-1],"right");if(t==="left")return i(r[0],"left")}}return e},H5=function(e,t){return e?(t&&(e=pde(e,t)),fde[e.classes[0]]||null):null},Xg=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Hl(t.concat(n))},vi=function(e,t,n){if(!e)return Hl();if(gw[e.type]){var r=gw[e.type](e,t);if(n&&t.size!==n.size){r=Hl(t.sizingClasses(n),[r],t);var o=t.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}else throw new Be("Got group of unknown type: '"+e.type+"'")};function aw(i,e){var t=Hl(["base"],i,e),n=Hl(["strut"]);return n.style.height=$e(t.height+t.depth),t.depth&&(n.style.verticalAlign=$e(-t.depth)),t.children.unshift(n),t}function U5(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var n=Vn(i,e,"root"),r;n.length===2&&n[1].hasClass("tag")&&(r=n.pop());for(var o=[],s=[],a=0;a<n.length;a++)if(s.push(n[a]),n[a].hasClass("mbin")||n[a].hasClass("mrel")||n[a].hasClass("allowbreak")){for(var l=!1;a<n.length-1&&n[a+1].hasClass("mspace")&&!n[a+1].hasClass("newline");)a++,s.push(n[a]),n[a].hasClass("nobreak")&&(l=!0);l||(o.push(aw(s,e)),s=[])}else n[a].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(aw(s,e)),s=[]),o.push(n[a]));s.length>0&&o.push(aw(s,e));var c;t?(c=aw(Vn(t,e,!0)),c.classes=["tag"],o.push(c)):r&&o.push(r);var d=Hl(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),c){var u=c.children[0];u.style.height=$e(d.height+d.depth),d.depth&&(u.style.verticalAlign=$e(-d.depth))}return d}function lj(i){return new Pu(i)}var po=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=pd(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Rt.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Rt.escape(pd(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}},Ru=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Rt.escape(this.toText())}toText(){return this.text}},j5=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",$e(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+$e(this.width)+'"/>'}toText(){return this.character?this.character:" "}},Ne={MathNode:po,TextNode:Ru,SpaceNode:j5,newDocumentFragment:lj},ls=function(e,t,n){return Gi[t][e]&&Gi[t][e].replace&&e.charCodeAt(0)!==55349&&!(tj.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Gi[t][e].replace),new Ne.TextNode(e)},Q5=function(e){return e.length===1?e[0]:new Ne.MathNode("mrow",e)},Z5=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var o=e.text;if(Rt.contains(["\\imath","\\jmath"],o))return null;Gi[r][o]&&Gi[r][o].replace&&(o=Gi[r][o].replace);var s=se.fontMap[n].fontName;return Y5(o,s,r)?se.fontMap[n].variant:null},go=function(e,t,n){if(e.length===1){var r=Bi(e[0],t);return n&&r instanceof po&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o=[],s,a=0;a<e.length;a++){var l=Bi(e[a],t);if(l instanceof po&&s instanceof po){if(l.type==="mtext"&&s.type==="mtext"&&l.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...l.children);continue}else if(l.type==="mn"&&s.type==="mn"){s.children.push(...l.children);continue}else if(l.type==="mi"&&l.children.length===1&&s.type==="mn"){var c=l.children[0];if(c instanceof Ru&&c.text==="."){s.children.push(...l.children);continue}}else if(s.type==="mi"&&s.children.length===1){var d=s.children[0];if(d instanceof Ru&&d.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var u=l.children[0];u instanceof Ru&&u.text.length>0&&(u.text=u.text.slice(0,1)+"\u0338"+u.text.slice(1),o.pop())}}}o.push(l),s=l}return o},md=function(e,t,n){return Q5(go(e,t,n))},Bi=function(e,t){if(!e)return new Ne.MathNode("mrow");if(bw[e.type]){var n=bw[e.type](e,t);return n}else throw new Be("Got group of unknown type: '"+e.type+"'")};function TU(i,e,t,n,r){var o=go(i,t),s;o.length===1&&o[0]instanceof po&&Rt.contains(["mrow","mtable"],o[0].type)?s=o[0]:s=new Ne.MathNode("mrow",o);var a=new Ne.MathNode("annotation",[new Ne.TextNode(e)]);a.setAttribute("encoding","application/x-tex");var l=new Ne.MathNode("semantics",[s,a]),c=new Ne.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var d=r?"katex":"katex-mathml";return se.makeSpan([d],[c])}var cj=function(e){return new pw({style:e.displayMode?kt.DISPLAY:kt.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},dj=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=se.makeSpan(n,[e])}return e},mde=function(e,t,n){var r=cj(n),o;if(n.output==="mathml")return TU(e,t,r,n.displayMode,!0);if(n.output==="html"){var s=U5(e,r);o=se.makeSpan(["katex"],[s])}else{var a=TU(e,t,r,n.displayMode,!1),l=U5(e,r);o=se.makeSpan(["katex"],[a,l])}return dj(o,n)},gde=function(e,t,n){var r=cj(n),o=U5(e,r),s=se.makeSpan(["katex"],[o]);return dj(s,n)},bde={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},vde=function(e){var t=new Ne.MathNode("mo",[new Ne.TextNode(bde[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},_de={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},yde=function(e){return e.type==="ordgroup"?e.body.length:1},wde=function(e,t){function n(){var a=4e5,l=e.label.slice(1);if(Rt.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,d=yde(c.base),u,h,f;if(d>5)l==="widehat"||l==="widecheck"?(u=420,a=2364,f=.42,h=l+"4"):(u=312,a=2340,f=.34,h="tilde4");else{var m=[1,1,2,2,3,3][d];l==="widehat"||l==="widecheck"?(a=[0,1062,2364,2364,2364][m],u=[0,239,300,360,420][m],f=[0,.24,.3,.3,.36,.42][m],h=l+m):(a=[0,600,1033,2339,2340][m],u=[0,260,286,306,312][m],f=[0,.26,.286,.3,.306,.34][m],h="tilde"+m)}var g=new Pa(h),w=new zs([g],{width:"100%",height:$e(f),viewBox:"0 0 "+a+" "+u,preserveAspectRatio:"none"});return{span:se.makeSvgSpan([],[w],t),minWidth:0,height:f}}else{var _=[],E=_de[l],[A,L,O]=E,U=O/1e3,Q=A.length,ae,te;if(Q===1){var Z=E[3];ae=["hide-tail"],te=[Z]}else if(Q===2)ae=["halfarrow-left","halfarrow-right"],te=["xMinYMin","xMaxYMin"];else if(Q===3)ae=["brace-left","brace-center","brace-right"],te=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+Q+" children.");for(var ve=0;ve<Q;ve++){var Pe=new Pa(A[ve]),Ee=new zs([Pe],{width:"400em",height:$e(U),viewBox:"0 0 "+a+" "+O,preserveAspectRatio:te[ve]+" slice"}),Oe=se.makeSvgSpan([ae[ve]],[Ee],t);if(Q===1)return{span:Oe,minWidth:L,height:U};Oe.style.height=$e(U),_.push(Oe)}return{span:se.makeSpan(["stretchy"],_,t),minWidth:L,height:U}}}var{span:r,minWidth:o,height:s}=n();return r.height=s,r.style.height=$e(s),o>0&&(r.style.minWidth=$e(o)),r},xde=function(e,t,n,r,o){var s,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(s=se.makeSpan(["stretchy",t],[],o),t==="fbox"){var l=o.color&&o.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new Yg({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&c.push(new Yg({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new zs(c,{width:"100%",height:$e(a)});s=se.makeSvgSpan([],[d],o)}return s.height=a,s.style.height=$e(a),s},Ul={encloseSpan:xde,mathMLnode:vde,svgSpan:wde};function Zt(i,e){if(!i||i.type!==e)throw new Error("Expected node of type "+e+", but got "+(i?"node of type "+i.type:String(i)));return i}function J5(i){var e=Cw(i);if(!e)throw new Error("Expected node of symbol group type, but got "+(i?"node of type "+i.type:String(i)));return e}function Cw(i){return i&&(i.type==="atom"||Gce.hasOwnProperty(i.type))?i:null}var e6=(i,e)=>{var t,n,r;i&&i.type==="supsub"?(n=Zt(i.base,"accent"),t=n.base,i.base=t,r=Kce(vi(i,e)),i.base=n):(n=Zt(i,"accent"),t=n.base);var o=vi(t,e.havingCrampedStyle()),s=n.isShifty&&Rt.isCharacterBox(t),a=0;if(s){var l=Rt.getBaseElem(t),c=vi(l,e.havingCrampedStyle());a=xU(c).skew}var d=n.label==="\\c",u=d?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight),h;if(n.isStretchy)h=Ul.svgSpan(n,e),h=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+$e(2*a)+")",marginLeft:$e(2*a)}:void 0}]},e);else{var f,m;n.label==="\\vec"?(f=se.staticSvg("vec",e),m=se.svgData.vec[1]):(f=se.makeOrd({mode:n.mode,text:n.label},e,"textord"),f=xU(f),f.italic=0,m=f.width,d&&(u+=f.depth)),h=se.makeSpan(["accent-body"],[f]);var g=n.label==="\\textcircled";g&&(h.classes.push("accent-full"),u=o.height);var w=a;g||(w-=m/2),h.style.left=$e(w),n.label==="\\textcircled"&&(h.style.top=".2em"),h=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-u},{type:"elem",elem:h}]},e)}var _=se.makeSpan(["mord","accent"],[h],e);return r?(r.children[0]=_,r.height=Math.max(_.height,r.height),r.classes[0]="mord",r):_},uj=(i,e)=>{var t=i.isStretchy?Ul.mathMLnode(i.label):new Ne.MathNode("mo",[ls(i.label,i.mode)]),n=new Ne.MathNode("mover",[Bi(i.base,e),t]);return n.setAttribute("accent","true"),n},Cde=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));nt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(i,e)=>{var t=vw(e[0]),n=!Cde.test(i.funcName),r=!n||i.funcName==="\\widehat"||i.funcName==="\\widetilde"||i.funcName==="\\widecheck";return{type:"accent",mode:i.parser.mode,label:i.funcName,isStretchy:n,isShifty:r,base:t}},htmlBuilder:e6,mathmlBuilder:uj});nt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(i,e)=>{var t=e[0],n=i.parser.mode;return n==="math"&&(i.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+i.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:i.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:e6,mathmlBuilder:uj});nt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"accentUnder",mode:t.mode,label:n,base:r}},htmlBuilder:(i,e)=>{var t=vi(i.base,e),n=Ul.svgSpan(i,e),r=i.label==="\\utilde"?.12:0,o=se.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:t}]},e);return se.makeSpan(["mord","accentunder"],[o],e)},mathmlBuilder:(i,e)=>{var t=Ul.mathMLnode(i.label),n=new Ne.MathNode("munder",[Bi(i.base,e),t]);return n.setAttribute("accentunder","true"),n}});var lw=i=>{var e=new Ne.MathNode("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};nt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n,funcName:r}=i;return{type:"xArrow",mode:n.mode,label:r,body:e[0],below:t[0]}},htmlBuilder(i,e){var t=e.style,n=e.havingStyle(t.sup()),r=se.wrapFragment(vi(i.body,n,e),e),o=i.label.slice(0,2)==="\\x"?"x":"cd";r.classes.push(o+"-arrow-pad");var s;i.below&&(n=e.havingStyle(t.sub()),s=se.wrapFragment(vi(i.below,n,e),e),s.classes.push(o+"-arrow-pad"));var a=Ul.svgSpan(i,e),l=-e.fontMetrics().axisHeight+.5*a.height,c=-e.fontMetrics().axisHeight-.5*a.height-.111;(r.depth>.25||i.label==="\\xleftequilibrium")&&(c-=r.depth);var d;if(s){var u=-e.fontMetrics().axisHeight+s.height+.5*a.height+.111;d=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:u}]},e)}else d=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:a,shift:l}]},e);return d.children[0].children[0].children[1].classes.push("svg-align"),se.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(i,e){var t=Ul.mathMLnode(i.label);t.setAttribute("minsize",i.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(i.body){var r=lw(Bi(i.body,e));if(i.below){var o=lw(Bi(i.below,e));n=new Ne.MathNode("munderover",[t,o,r])}else n=new Ne.MathNode("mover",[t,r])}else if(i.below){var s=lw(Bi(i.below,e));n=new Ne.MathNode("munder",[t,s])}else n=lw(),n=new Ne.MathNode("mover",[t,n]);return n}});var Sde=se.makeSpan;function hj(i,e){var t=Vn(i.body,e,!0);return Sde([i.mclass],t,e)}function fj(i,e){var t,n=go(i.body,e);return i.mclass==="minner"?t=new Ne.MathNode("mpadded",n):i.mclass==="mord"?i.isCharacterBox?(t=n[0],t.type="mi"):t=new Ne.MathNode("mi",n):(i.isCharacterBox?(t=n[0],t.type="mo"):t=new Ne.MathNode("mo",n),i.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):i.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):i.mclass==="mopen"||i.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):i.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}nt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:Tn(r),isCharacterBox:Rt.isCharacterBox(r)}},htmlBuilder:hj,mathmlBuilder:fj});var Sw=i=>{var e=i.type==="ordgroup"&&i.body.length?i.body[0]:i;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};nt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:Sw(e[0]),body:Tn(e[1]),isCharacterBox:Rt.isCharacterBox(e[1])}}});nt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(i,e){var{parser:t,funcName:n}=i,r=e[1],o=e[0],s;n!=="\\stackrel"?s=Sw(r):s="mrel";var a={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Tn(r)},l={type:"supsub",mode:o.mode,base:a,sup:n==="\\underset"?null:o,sub:n==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:s,body:[l],isCharacterBox:Rt.isCharacterBox(l)}},htmlBuilder:hj,mathmlBuilder:fj});nt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:Sw(e[0]),body:Tn(e[0])}},htmlBuilder(i,e){var t=Vn(i.body,e,!0),n=se.makeSpan([i.mclass],t,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(i,e){var t=go(i.body,e),n=new Ne.MathNode("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var kde={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},IU=()=>({type:"styling",body:[],mode:"math",style:"display"}),LU=i=>i.type==="textord"&&i.text==="@",Ede=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function Tde(i,e,t){var n=kde[i];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var r=t.callFunction("\\\\cdleft",[e[0]],[]),o={type:"atom",text:n,mode:"math",family:"rel"},s=t.callFunction("\\Big",[o],[]),a=t.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[r,s,a]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Ide(i){var e=[];for(i.gullet.beginGroup(),i.gullet.macros.set("\\cr","\\\\\\relax"),i.gullet.beginGroup();;){e.push(i.parseExpression(!1,"\\\\")),i.gullet.endGroup(),i.gullet.beginGroup();var t=i.fetch().text;if(t==="&"||t==="\\\\")i.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new Be("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var n=[],r=[n],o=0;o<e.length;o++){for(var s=e[o],a=IU(),l=0;l<s.length;l++)if(!LU(s[l]))a.body.push(s[l]);else{n.push(a),l+=1;var c=J5(s[l]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(c)>-1))if("<>AV".indexOf(c)>-1)for(var u=0;u<2;u++){for(var h=!0,f=l+1;f<s.length;f++){if(Ede(s[f],c)){h=!1,l=f;break}if(LU(s[f]))throw new Be("Missing a "+c+" character to complete a CD arrow.",s[f]);d[u].body.push(s[f])}if(h)throw new Be("Missing a "+c+" character to complete a CD arrow.",s[l])}else throw new Be('Expected one of "<>AV=|." after @',s[l]);var m=Tde(c,d,i),g={type:"styling",body:[m],mode:"math",style:"display"};n.push(g),a=IU()}o%2===0?n.push(a):n.shift(),n=[],r.push(n)}i.gullet.endGroup(),i.gullet.endGroup();var w=new Array(r[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:r,arraystretch:1,addJot:!0,rowGaps:[null],cols:w,colSeparationType:"CD",hLinesBeforeRow:new Array(r.length+1).fill([])}}nt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:e[0]}},htmlBuilder(i,e){var t=e.havingStyle(e.style.sup()),n=se.wrapFragment(vi(i.label,t,e),e);return n.classes.push("cd-label-"+i.side),n.style.bottom=$e(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(i,e){var t=new Ne.MathNode("mrow",[Bi(i.label,e)]);return t=new Ne.MathNode("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ne.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});nt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(i,e){var{parser:t}=i;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(i,e){var t=se.wrapFragment(vi(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new Ne.MathNode("mrow",[Bi(i.fragment,e)])}});nt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,n=Zt(e[0],"ordgroup"),r=n.body,o="",s=0;s<r.length;s++){var a=Zt(r[s],"textord");o+=a.text}var l=parseInt(o),c;if(isNaN(l))throw new Be("\\@char has non-numeric argument "+o);if(l<0||l>=1114111)throw new Be("\\@char with invalid code point "+o);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:c}}});var pj=(i,e)=>{var t=Vn(i.body,e.withColor(i.color),!1);return se.makeFragment(t)},mj=(i,e)=>{var t=go(i.body,e.withColor(i.color)),n=new Ne.MathNode("mstyle",t);return n.setAttribute("mathcolor",i.color),n};nt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,n=Zt(e[0],"color-token").color,r=e[1];return{type:"color",mode:t.mode,color:n,body:Tn(r)}},htmlBuilder:pj,mathmlBuilder:mj});nt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:n}=i,r=Zt(e[0],"color-token").color;t.gullet.macros.set("\\current@color",r);var o=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:r,body:o}},htmlBuilder:pj,mathmlBuilder:mj});nt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(i,e,t){var{parser:n}=i,r=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:r&&Zt(r,"size").value}},htmlBuilder(i,e){var t=se.makeSpan(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=$e(hn(i.size,e)))),t},mathmlBuilder(i,e){var t=new Ne.MathNode("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",$e(hn(i.size,e)))),t}});var W5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},gj=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Be("Expected a control sequence",i);return e},Lde=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},bj=(i,e,t,n)=>{var r=i.gullet.macros.get(t.text);r==null&&(t.noexpand=!0,r={tokens:[t],numArgs:0,unexpandable:!i.gullet.isExpandable(t.text)}),i.gullet.macros.set(e,r,n)};nt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e,funcName:t}=i;e.consumeSpaces();var n=e.fetch();if(W5[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=W5[n.text]),Zt(e.parseFunction(),"internal");throw new Be("Invalid token after macro prefix",n)}});nt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=e.gullet.popToken(),r=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new Be("Expected a control sequence",n);for(var o=0,s,a=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),a[o].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Be('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new Be('Argument number "'+n.text+'" out of order');o++,a.push([])}else{if(n.text==="EOF")throw new Be("Expected a macro definition");a[o].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(t==="\\edef"||t==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(r,{tokens:l,numArgs:o,delimiters:a},t===W5[t]),{type:"internal",mode:e.mode}}});nt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=gj(e.gullet.popToken());e.gullet.consumeSpaces();var r=Lde(e);return bj(e,n,r,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});nt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=gj(e.gullet.popToken()),r=e.gullet.popToken(),o=e.gullet.popToken();return bj(e,n,o,t==="\\\\globalfuture"),e.gullet.pushToken(o),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var Vg=function(e,t,n){var r=Gi.math[e]&&Gi.math[e].replace,o=Y5(r||e,t,n);if(!o)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return o},t6=function(e,t,n,r){var o=n.havingBaseStyle(t),s=se.makeSpan(r.concat(o.sizingClasses(n)),[e],n),a=o.sizeMultiplier/n.sizeMultiplier;return s.height*=a,s.depth*=a,s.maxFontSize=o.sizeMultiplier,s},vj=function(e,t,n){var r=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=$e(o),e.height-=o,e.depth+=o},Ade=function(e,t,n,r,o,s){var a=se.makeSymbol(e,"Main-Regular",o,r),l=t6(a,t,r,s);return n&&vj(l,r,t),l},Dde=function(e,t,n,r){return se.makeSymbol(e,"Size"+t+"-Regular",n,r)},_j=function(e,t,n,r,o,s){var a=Dde(e,t,o,r),l=t6(se.makeSpan(["delimsizing","size"+t],[a],r),kt.TEXT,r,s);return n&&vj(l,r,kt.TEXT),l},T5=function(e,t,n){var r;t==="Size1-Regular"?r="delim-size1":r="delim-size4";var o=se.makeSpan(["delimsizinginner",r],[se.makeSpan([],[se.makeSymbol(e,t,n)])]);return{type:"elem",elem:o}},I5=function(e,t,n){var r=Na["Size4-Regular"][e.charCodeAt(0)]?Na["Size4-Regular"][e.charCodeAt(0)][4]:Na["Size1-Regular"][e.charCodeAt(0)][4],o=new Pa("inner",Bce(e,Math.round(1e3*t))),s=new zs([o],{width:$e(r),height:$e(t),style:"width:"+$e(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=se.makeSvgSpan([],[s],n);return a.height=t,a.style.height=$e(t),a.style.width=$e(r),{type:"elem",elem:a}},V5=.008,cw={type:"kern",size:-1*V5},Mde=["|","\\lvert","\\rvert","\\vert"],Nde=["\\|","\\lVert","\\rVert","\\Vert"],yj=function(e,t,n,r,o,s){var a,l,c,d,u="",h=0;a=c=d=e,l=null;var f="Size1-Regular";e==="\\uparrow"?c=d="\u23D0":e==="\\Uparrow"?c=d="\u2016":e==="\\downarrow"?a=c="\u23D0":e==="\\Downarrow"?a=c="\u2016":e==="\\updownarrow"?(a="\\uparrow",c="\u23D0",d="\\downarrow"):e==="\\Updownarrow"?(a="\\Uparrow",c="\u2016",d="\\Downarrow"):Rt.contains(Mde,e)?(c="\u2223",u="vert",h=333):Rt.contains(Nde,e)?(c="\u2225",u="doublevert",h=556):e==="["||e==="\\lbrack"?(a="\u23A1",c="\u23A2",d="\u23A3",f="Size4-Regular",u="lbrack",h=667):e==="]"||e==="\\rbrack"?(a="\u23A4",c="\u23A5",d="\u23A6",f="Size4-Regular",u="rbrack",h=667):e==="\\lfloor"||e==="\u230A"?(c=a="\u23A2",d="\u23A3",f="Size4-Regular",u="lfloor",h=667):e==="\\lceil"||e==="\u2308"?(a="\u23A1",c=d="\u23A2",f="Size4-Regular",u="lceil",h=667):e==="\\rfloor"||e==="\u230B"?(c=a="\u23A5",d="\u23A6",f="Size4-Regular",u="rfloor",h=667):e==="\\rceil"||e==="\u2309"?(a="\u23A4",c=d="\u23A5",f="Size4-Regular",u="rceil",h=667):e==="("||e==="\\lparen"?(a="\u239B",c="\u239C",d="\u239D",f="Size4-Regular",u="lparen",h=875):e===")"||e==="\\rparen"?(a="\u239E",c="\u239F",d="\u23A0",f="Size4-Regular",u="rparen",h=875):e==="\\{"||e==="\\lbrace"?(a="\u23A7",l="\u23A8",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(a="\u23AB",l="\u23AC",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(a="\u23A7",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(a="\u23AB",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(a="\u23A7",d="\u23AD",c="\u23AA",f="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(a="\u23AB",d="\u23A9",c="\u23AA",f="Size4-Regular");var m=Vg(a,f,o),g=m.height+m.depth,w=Vg(c,f,o),_=w.height+w.depth,E=Vg(d,f,o),A=E.height+E.depth,L=0,O=1;if(l!==null){var U=Vg(l,f,o);L=U.height+U.depth,O=2}var Q=g+A+L,ae=Math.max(0,Math.ceil((t-Q)/(O*_))),te=Q+ae*O*_,Z=r.fontMetrics().axisHeight;n&&(Z*=r.sizeMultiplier);var ve=te/2-Z,Pe=[];if(u.length>0){var Ee=te-g-A,Oe=Math.round(te*1e3),Xe=Hce(u,Math.round(Ee*1e3)),dt=new Pa(u,Xe),be=(h/1e3).toFixed(3)+"em",we=(Oe/1e3).toFixed(3)+"em",Y=new zs([dt],{width:be,height:we,viewBox:"0 0 "+h+" "+Oe}),R=se.makeSvgSpan([],[Y],r);R.height=Oe/1e3,R.style.width=be,R.style.height=we,Pe.push({type:"elem",elem:R})}else{if(Pe.push(T5(d,f,o)),Pe.push(cw),l===null){var re=te-g-A+2*V5;Pe.push(I5(c,re,r))}else{var me=(te-g-A-L)/2+2*V5;Pe.push(I5(c,me,r)),Pe.push(cw),Pe.push(T5(l,f,o)),Pe.push(cw),Pe.push(I5(c,me,r))}Pe.push(cw),Pe.push(T5(a,f,o))}var G=r.havingBaseStyle(kt.TEXT),Tt=se.makeVList({positionType:"bottom",positionData:ve,children:Pe},G);return t6(se.makeSpan(["delimsizing","mult"],[Tt],G),kt.TEXT,r,s)},L5=80,A5=.08,D5=function(e,t,n,r,o){var s=zce(e,r,n),a=new Pa(e,s),l=new zs([a],{width:"400em",height:$e(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return se.makeSvgSpan(["hide-tail"],[l],o)},Rde=function(e,t){var n=t.havingBaseSizing(),r=Sj("\\surd",e*n.sizeMultiplier,Cj,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),a,l=0,c=0,d=0,u;return r.type==="small"?(d=1e3+1e3*s+L5,e<1?o=1:e<1.4&&(o=.7),l=(1+s+A5)/o,c=(1+s)/o,a=D5("sqrtMain",l,d,s,t),a.style.minWidth="0.853em",u=.833/o):r.type==="large"?(d=(1e3+L5)*qg[r.size],c=(qg[r.size]+s)/o,l=(qg[r.size]+s+A5)/o,a=D5("sqrtSize"+r.size,l,d,s,t),a.style.minWidth="1.02em",u=1/o):(l=e+s+A5,c=e+s,d=Math.floor(1e3*e+s)+L5,a=D5("sqrtTall",l,d,s,t),a.style.minWidth="0.742em",u=1.056),a.height=c,a.style.height=$e(l),{span:a,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},wj=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Pde=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],xj=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],qg=[0,1.2,1.8,2.4,3],Ode=function(e,t,n,r,o){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Rt.contains(wj,e)||Rt.contains(xj,e))return _j(e,t,!1,n,r,o);if(Rt.contains(Pde,e))return yj(e,qg[t],!1,n,r,o);throw new Be("Illegal delimiter: '"+e+"'")},Fde=[{type:"small",style:kt.SCRIPTSCRIPT},{type:"small",style:kt.SCRIPT},{type:"small",style:kt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],zde=[{type:"small",style:kt.SCRIPTSCRIPT},{type:"small",style:kt.SCRIPT},{type:"small",style:kt.TEXT},{type:"stack"}],Cj=[{type:"small",style:kt.SCRIPTSCRIPT},{type:"small",style:kt.SCRIPT},{type:"small",style:kt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Bde=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Sj=function(e,t,n,r){for(var o=Math.min(2,3-r.style.size),s=o;s<n.length&&n[s].type!=="stack";s++){var a=Vg(e,Bde(n[s]),"math"),l=a.height+a.depth;if(n[s].type==="small"){var c=r.havingBaseStyle(n[s].style);l*=c.sizeMultiplier}if(l>t)return n[s]}return n[n.length-1]},kj=function(e,t,n,r,o,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var a;Rt.contains(xj,e)?a=Fde:Rt.contains(wj,e)?a=Cj:a=zde;var l=Sj(e,t,a,r);return l.type==="small"?Ade(e,l.style,n,r,o,s):l.type==="large"?_j(e,l.size,n,r,o,s):yj(e,t,n,r,o,s)},Hde=function(e,t,n,r,o,s){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,l=901,c=5/r.fontMetrics().ptPerEm,d=Math.max(t-a,n+a),u=Math.max(d/500*l,2*d-c);return kj(e,u,!0,r,o,s)},Bl={sqrtImage:Rde,sizedDelim:Ode,sizeToMaxHeight:qg,customSizedDelim:kj,leftRightDelim:Hde},AU={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Ude=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function kw(i,e){var t=Cw(i);if(t&&Rt.contains(Ude,t.text))return t;throw t?new Be("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new Be("Invalid delimiter type '"+i.type+"'",i)}nt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(i,e)=>{var t=kw(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:AU[i.funcName].size,mclass:AU[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?se.makeSpan([i.mclass]):Bl.sizedDelim(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(ls(i.delim,i.mode));var t=new Ne.MathNode("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=$e(Bl.sizeToMaxHeight[i.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function DU(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}nt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=i.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new Be("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:kw(e[0],i).text,color:t}}});nt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=kw(e[0],i),n=i.parser;++n.leftrightDepth;var r=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=Zt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:r,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(i,e)=>{DU(i);for(var t=Vn(i.body,e,!0,["mopen","mclose"]),n=0,r=0,o=!1,s=0;s<t.length;s++)t[s].isMiddle?o=!0:(n=Math.max(t[s].height,n),r=Math.max(t[s].depth,r));n*=e.sizeMultiplier,r*=e.sizeMultiplier;var a;if(i.left==="."?a=Xg(e,["mopen"]):a=Bl.leftRightDelim(i.left,n,r,e,i.mode,["mopen"]),t.unshift(a),o)for(var l=1;l<t.length;l++){var c=t[l],d=c.isMiddle;d&&(t[l]=Bl.leftRightDelim(d.delim,n,r,d.options,i.mode,[]))}var u;if(i.right===".")u=Xg(e,["mclose"]);else{var h=i.rightColor?e.withColor(i.rightColor):e;u=Bl.leftRightDelim(i.right,n,r,h,i.mode,["mclose"])}return t.push(u),se.makeSpan(["minner"],t,e)},mathmlBuilder:(i,e)=>{DU(i);var t=go(i.body,e);if(i.left!=="."){var n=new Ne.MathNode("mo",[ls(i.left,i.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(i.right!=="."){var r=new Ne.MathNode("mo",[ls(i.right,i.mode)]);r.setAttribute("fence","true"),i.rightColor&&r.setAttribute("mathcolor",i.rightColor),t.push(r)}return Q5(t)}});nt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=kw(e[0],i);if(!i.parser.leftrightDepth)throw new Be("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;if(i.delim===".")t=Xg(e,[]);else{t=Bl.sizedDelim(i.delim,1,e,i.mode,[]);var n={delim:i.delim,options:e};t.isMiddle=n}return t},mathmlBuilder:(i,e)=>{var t=i.delim==="\\vert"||i.delim==="|"?ls("|","text"):ls(i.delim,i.mode),n=new Ne.MathNode("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var i6=(i,e)=>{var t=se.wrapFragment(vi(i.body,e),e),n=i.label.slice(1),r=e.sizeMultiplier,o,s=0,a=Rt.isCharacterBox(i.body);if(n==="sout")o=se.makeSpan(["stretchy","sout"]),o.height=e.fontMetrics().defaultRuleThickness/r,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=hn({number:.6,unit:"pt"},e),c=hn({number:.35,unit:"ex"},e),d=e.havingBaseSizing();r=r/d.sizeMultiplier;var u=t.height+t.depth+l+c;t.style.paddingLeft=$e(u/2+l);var h=Math.floor(1e3*u*r),f=Oce(h),m=new zs([new Pa("phase",f)],{width:"400em",height:$e(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});o=se.makeSvgSpan(["hide-tail"],[m],e),o.style.height=$e(u),s=t.depth+l+c}else{/cancel/.test(n)?a||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var g=0,w=0,_=0;/box/.test(n)?(_=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:_),w=g):n==="angl"?(_=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*_,w=Math.max(0,.25-t.depth)):(g=a?.2:0,w=g),o=Ul.encloseSpan(t,n,g,w,e),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=$e(_)):n==="angl"&&_!==.049&&(o.style.borderTopWidth=$e(_),o.style.borderRightWidth=$e(_)),s=t.depth+w,i.backgroundColor&&(o.style.backgroundColor=i.backgroundColor,i.borderColor&&(o.style.borderColor=i.borderColor))}var E;if(i.backgroundColor)E=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:s},{type:"elem",elem:t,shift:0}]},e);else{var A=/cancel|phase/.test(n)?["svg-align"]:[];E=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:s,wrapperClasses:A}]},e)}return/cancel/.test(n)&&(E.height=t.height,E.depth=t.depth),/cancel/.test(n)&&!a?se.makeSpan(["mord","cancel-lap"],[E],e):se.makeSpan(["mord"],[E],e)},n6=(i,e)=>{var t=0,n=new Ne.MathNode(i.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Bi(i.body,e)]);switch(i.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),i.label==="\\fcolorbox"){var r=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+r+"em solid "+String(i.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&n.setAttribute("mathbackground",i.backgroundColor),n};nt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=Zt(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:r,backgroundColor:o,body:s}},htmlBuilder:i6,mathmlBuilder:n6});nt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=Zt(e[0],"color-token").color,s=Zt(e[1],"color-token").color,a=e[2];return{type:"enclose",mode:n.mode,label:r,backgroundColor:s,borderColor:o,body:a}},htmlBuilder:i6,mathmlBuilder:n6});nt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});nt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"enclose",mode:t.mode,label:n,body:r}},htmlBuilder:i6,mathmlBuilder:n6});nt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var Ej={};function Oa(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:r},l=0;l<t.length;++l)Ej[t[l]]=a;o&&(gw[e]=o),s&&(bw[e]=s)}var Tj={};function P(i,e){Tj[i]=e}function MU(i){var e=[];i.consumeSpaces();var t=i.fetch().text;for(t==="\\relax"&&(i.consume(),i.consumeSpaces(),t=i.fetch().text);t==="\\hline"||t==="\\hdashline";)i.consume(),e.push(t==="\\hdashline"),i.consumeSpaces(),t=i.fetch().text;return e}var Ew=i=>{var e=i.parser.settings;if(!e.displayMode)throw new Be("{"+i.envName+"} can be used only in display mode.")};function r6(i){if(i.indexOf("ed")===-1)return i.indexOf("*")===-1}function gd(i,e,t){var{hskipBeforeAndAfter:n,addJot:r,cols:o,arraystretch:s,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=e;if(i.gullet.beginGroup(),c||i.gullet.macros.set("\\cr","\\\\\\relax"),!s){var f=i.gullet.expandMacroAsText("\\arraystretch");if(f==null)s=1;else if(s=parseFloat(f),!s||s<0)throw new Be("Invalid \\arraystretch: "+f)}i.gullet.beginGroup();var m=[],g=[m],w=[],_=[],E=l!=null?[]:void 0;function A(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function L(){E&&(i.gullet.macros.get("\\df@tag")?(E.push(i.subparse([new Ra("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):E.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(A(),_.push(MU(i));;){var O=i.parseExpression(!1,c?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup(),O={type:"ordgroup",mode:i.mode,body:O},t&&(O={type:"styling",mode:i.mode,style:t,body:[O]}),m.push(O);var U=i.fetch().text;if(U==="&"){if(u&&m.length===u){if(c||a)throw new Be("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(U==="\\end"){L(),m.length===1&&O.type==="styling"&&O.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),_.length<g.length+1&&_.push([]);break}else if(U==="\\\\"){i.consume();var Q=void 0;i.gullet.future().text!==" "&&(Q=i.parseSizeGroup(!0)),w.push(Q?Q.value:null),L(),_.push(MU(i)),m=[],g.push(m),A()}else throw new Be("Expected & or \\\\ or \\cr or \\end",i.nextToken)}return i.gullet.endGroup(),i.gullet.endGroup(),{type:"array",mode:i.mode,addJot:r,arraystretch:s,body:g,cols:o,rowGaps:w,hskipBeforeAndAfter:n,hLinesBeforeRow:_,colSeparationType:a,tags:E,leqno:h}}function o6(i){return i.slice(0,1)==="d"?"display":"text"}var Fa=function(e,t){var n,r,o=e.body.length,s=e.hLinesBeforeRow,a=0,l=new Array(o),c=[],d=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,h=5*u;if(e.colSeparationType&&e.colSeparationType==="small"){var f=t.havingStyle(kt.SCRIPT).sizeMultiplier;h=.2778*(f/t.sizeMultiplier)}var m=e.colSeparationType==="CD"?hn({number:3,unit:"ex"},t):12*u,g=3*u,w=e.arraystretch*m,_=.7*w,E=.3*w,A=0;function L(Yo){for(var pn=0;pn<Yo.length;++pn)pn>0&&(A+=.25),c.push({pos:A,isDashed:Yo[pn]})}for(L(s[0]),n=0;n<e.body.length;++n){var O=e.body[n],U=_,Q=E;a<O.length&&(a=O.length);var ae=new Array(O.length);for(r=0;r<O.length;++r){var te=vi(O[r],t);Q<te.depth&&(Q=te.depth),U<te.height&&(U=te.height),ae[r]=te}var Z=e.rowGaps[n],ve=0;Z&&(ve=hn(Z,t),ve>0&&(ve+=E,Q<ve&&(Q=ve),ve=0)),e.addJot&&(Q+=g),ae.height=U,ae.depth=Q,A+=U,ae.pos=A,A+=Q+ve,l[n]=ae,L(s[n+1])}var Pe=A/2+t.fontMetrics().axisHeight,Ee=e.cols||[],Oe=[],Xe,dt,be=[];if(e.tags&&e.tags.some(Yo=>Yo))for(n=0;n<o;++n){var we=l[n],Y=we.pos-Pe,R=e.tags[n],re=void 0;R===!0?re=se.makeSpan(["eqn-num"],[],t):R===!1?re=se.makeSpan([],[],t):re=se.makeSpan([],Vn(R,t,!0),t),re.depth=we.depth,re.height=we.height,be.push({type:"elem",elem:re,shift:Y})}for(r=0,dt=0;r<a||dt<Ee.length;++r,++dt){for(var me=Ee[dt]||{},G=!0;me.type==="separator";){if(G||(Xe=se.makeSpan(["arraycolsep"],[]),Xe.style.width=$e(t.fontMetrics().doubleRuleSep),Oe.push(Xe)),me.separator==="|"||me.separator===":"){var Tt=me.separator==="|"?"solid":"dashed",Ft=se.makeSpan(["vertical-separator"],[],t);Ft.style.height=$e(A),Ft.style.borderRightWidth=$e(d),Ft.style.borderRightStyle=Tt,Ft.style.margin="0 "+$e(-d/2);var li=A-Pe;li&&(Ft.style.verticalAlign=$e(-li)),Oe.push(Ft)}else throw new Be("Invalid separator type: "+me.separator);dt++,me=Ee[dt]||{},G=!1}if(!(r>=a)){var Li=void 0;(r>0||e.hskipBeforeAndAfter)&&(Li=Rt.deflt(me.pregap,h),Li!==0&&(Xe=se.makeSpan(["arraycolsep"],[]),Xe.style.width=$e(Li),Oe.push(Xe)));var Et=[];for(n=0;n<o;++n){var Ii=l[n],pi=Ii[r];if(pi){var ko=Ii.pos-Pe;pi.depth=Ii.depth,pi.height=Ii.height,Et.push({type:"elem",elem:pi,shift:ko})}}Et=se.makeVList({positionType:"individualShift",children:Et},t),Et=se.makeSpan(["col-align-"+(me.align||"c")],[Et]),Oe.push(Et),(r<a-1||e.hskipBeforeAndAfter)&&(Li=Rt.deflt(me.postgap,h),Li!==0&&(Xe=se.makeSpan(["arraycolsep"],[]),Xe.style.width=$e(Li),Oe.push(Xe)))}}if(l=se.makeSpan(["mtable"],Oe),c.length>0){for(var oo=se.makeLineSpan("hline",t,d),Ic=se.makeLineSpan("hdashline",t,d),Lc=[{type:"elem",elem:l,shift:0}];c.length>0;){var sl=c.pop(),ou=sl.pos-Pe;sl.isDashed?Lc.push({type:"elem",elem:Ic,shift:ou}):Lc.push({type:"elem",elem:oo,shift:ou})}l=se.makeVList({positionType:"individualShift",children:Lc},t)}if(be.length===0)return se.makeSpan(["mord"],[l],t);var zn=se.makeVList({positionType:"individualShift",children:be},t);return zn=se.makeSpan(["tag"],[zn],t),se.makeFragment([l,zn])},jde={c:"center ",l:"left ",r:"right "},za=function(e,t){for(var n=[],r=new Ne.MathNode("mtd",[],["mtr-glue"]),o=new Ne.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var a=e.body[s],l=[],c=0;c<a.length;c++)l.push(new Ne.MathNode("mtd",[Bi(a[c],t)]));e.tags&&e.tags[s]&&(l.unshift(r),l.push(r),e.leqno?l.unshift(o):l.push(o)),n.push(new Ne.MathNode("mtr",l))}var d=new Ne.MathNode("mtable",n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);d.setAttribute("rowspacing",$e(u));var h="",f="";if(e.cols&&e.cols.length>0){var m=e.cols,g="",w=!1,_=0,E=m.length;m[0].type==="separator"&&(h+="top ",_=1),m[m.length-1].type==="separator"&&(h+="bottom ",E-=1);for(var A=_;A<E;A++)m[A].type==="align"?(f+=jde[m[A].align],w&&(g+="none "),w=!0):m[A].type==="separator"&&w&&(g+=m[A].separator==="|"?"solid ":"dashed ",w=!1);d.setAttribute("columnalign",f.trim()),/[sd]/.test(g)&&d.setAttribute("columnlines",g.trim())}if(e.colSeparationType==="align"){for(var L=e.cols||[],O="",U=1;U<L.length;U++)O+=U%2?"0em ":"1em ";d.setAttribute("columnspacing",O.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var Q="",ae=e.hLinesBeforeRow;h+=ae[0].length>0?"left ":"",h+=ae[ae.length-1].length>0?"right ":"";for(var te=1;te<ae.length-1;te++)Q+=ae[te].length===0?"none ":ae[te][0]?"dashed ":"solid ";return/[sd]/.test(Q)&&d.setAttribute("rowlines",Q.trim()),h!==""&&(d=new Ne.MathNode("menclose",[d]),d.setAttribute("notation",h.trim())),e.arraystretch&&e.arraystretch<1&&(d=new Ne.MathNode("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},Ij=function(e,t){e.envName.indexOf("ed")===-1&&Ew(e);var n=[],r=e.envName.indexOf("at")>-1?"alignat":"align",o=e.envName==="split",s=gd(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:r6(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),a,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var d="",u=0;u<t[0].body.length;u++){var h=Zt(t[0].body[u],"textord");d+=h.text}a=Number(d),l=a*2}var f=!l;s.body.forEach(function(_){for(var E=1;E<_.length;E+=2){var A=Zt(_[E],"styling"),L=Zt(A.body[0],"ordgroup");L.body.unshift(c)}if(f)l<_.length&&(l=_.length);else{var O=_.length/2;if(a<O)throw new Be("Too many math in a row: "+("expected "+a+", but got "+O),_[0])}});for(var m=0;m<l;++m){var g="r",w=0;m%2===1?g="l":m>0&&f&&(w=1),n[m]={type:"align",align:g,pregap:w,postgap:0}}return s.colSeparationType=f?"align":"alignat",s};Oa({type:"array",names:["array","darray"],props:{numArgs:1},handler(i,e){var t=Cw(e[0]),n=t?[e[0]]:Zt(e[0],"ordgroup").body,r=n.map(function(s){var a=J5(s),l=a.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Be("Unknown column alignment: "+l,s)}),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return gd(i.parser,o,o6(i.envName))},htmlBuilder:Fa,mathmlBuilder:za});Oa({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(i){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[i.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(i.envName.charAt(i.envName.length-1)==="*"){var r=i.parser;if(r.consumeSpaces(),r.fetch().text==="["){if(r.consume(),r.consumeSpaces(),t=r.fetch().text,"lcr".indexOf(t)===-1)throw new Be("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),n.cols=[{type:"align",align:t}]}}var o=gd(i.parser,n,o6(i.envName)),s=Math.max(0,...o.body.map(a=>a.length));return o.cols=new Array(s).fill({type:"align",align:t}),e?{type:"leftright",mode:i.mode,body:[o],left:e[0],right:e[1],rightColor:void 0}:o},htmlBuilder:Fa,mathmlBuilder:za});Oa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(i){var e={arraystretch:.5},t=gd(i.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:Fa,mathmlBuilder:za});Oa({type:"array",names:["subarray"],props:{numArgs:1},handler(i,e){var t=Cw(e[0]),n=t?[e[0]]:Zt(e[0],"ordgroup").body,r=n.map(function(s){var a=J5(s),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Be("Unknown column alignment: "+l,s)});if(r.length>1)throw new Be("{subarray} can contain only one column");var o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=gd(i.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new Be("{subarray} can contain only one column");return o},htmlBuilder:Fa,mathmlBuilder:za});Oa({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(i){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=gd(i.parser,e,o6(i.envName));return{type:"leftright",mode:i.mode,body:[t],left:i.envName.indexOf("r")>-1?".":"\\{",right:i.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Fa,mathmlBuilder:za});Oa({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Ij,htmlBuilder:Fa,mathmlBuilder:za});Oa({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){Rt.contains(["gather","gather*"],i.envName)&&Ew(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:r6(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return gd(i.parser,e,"display")},htmlBuilder:Fa,mathmlBuilder:za});Oa({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Ij,htmlBuilder:Fa,mathmlBuilder:za});Oa({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){Ew(i);var e={autoTag:r6(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return gd(i.parser,e,"display")},htmlBuilder:Fa,mathmlBuilder:za});Oa({type:"array",names:["CD"],props:{numArgs:0},handler(i){return Ew(i),Ide(i.parser)},htmlBuilder:Fa,mathmlBuilder:za});P("\\nonumber","\\gdef\\@eqnsw{0}");P("\\notag","\\nonumber");nt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new Be(i.funcName+" valid only within array environment")}});var NU=Ej;nt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];if(r.type!=="ordgroup")throw new Be("Invalid environment name",r);for(var o="",s=0;s<r.body.length;++s)o+=Zt(r.body[s],"textord").text;if(n==="\\begin"){if(!NU.hasOwnProperty(o))throw new Be("No such environment: "+o,r);var a=NU[o],{args:l,optArgs:c}=t.parseArguments("\\begin{"+o+"}",a),d={mode:t.mode,envName:o,parser:t},u=a.handler(d,l,c);t.expect("\\end",!1);var h=t.nextToken,f=Zt(t.parseFunction(),"environment");if(f.name!==o)throw new Be("Mismatch: \\begin{"+o+"} matched by \\end{"+f.name+"}",h);return u}return{type:"environment",mode:t.mode,name:o,nameGroup:r}}});var Lj=(i,e)=>{var t=i.font,n=e.withFont(t);return vi(i.body,n)},Aj=(i,e)=>{var t=i.font,n=e.withFont(t);return Bi(i.body,n)},RU={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};nt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=vw(e[0]),o=n;return o in RU&&(o=RU[o]),{type:"font",mode:t.mode,font:o.slice(1),body:r}},htmlBuilder:Lj,mathmlBuilder:Aj});nt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(i,e)=>{var{parser:t}=i,n=e[0],r=Rt.isCharacterBox(n);return{type:"mclass",mode:t.mode,mclass:Sw(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:r}}});nt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,breakOnTokenText:r}=i,{mode:o}=t,s=t.parseExpression(!0,r),a="math"+n.slice(1);return{type:"font",mode:o,font:a,body:{type:"ordgroup",mode:t.mode,body:s}}},htmlBuilder:Lj,mathmlBuilder:Aj});var Dj=(i,e)=>{var t=e;return i==="display"?t=t.id>=kt.SCRIPT.id?t.text():kt.DISPLAY:i==="text"&&t.size===kt.DISPLAY.size?t=kt.TEXT:i==="script"?t=kt.SCRIPT:i==="scriptscript"&&(t=kt.SCRIPTSCRIPT),t},s6=(i,e)=>{var t=Dj(i.size,e.style),n=t.fracNum(),r=t.fracDen(),o;o=e.havingStyle(n);var s=vi(i.numer,o,e);if(i.continued){var a=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height<a?a:s.height,s.depth=s.depth<l?l:s.depth}o=e.havingStyle(r);var c=vi(i.denom,o,e),d,u,h;i.hasBarLine?(i.barSize?(u=hn(i.barSize,e),d=se.makeLineSpan("frac-line",e,u)):d=se.makeLineSpan("frac-line",e),u=d.height,h=d.height):(d=null,u=0,h=e.fontMetrics().defaultRuleThickness);var f,m,g;t.size===kt.DISPLAY.size||i.size==="display"?(f=e.fontMetrics().num1,u>0?m=3*h:m=7*h,g=e.fontMetrics().denom1):(u>0?(f=e.fontMetrics().num2,m=h):(f=e.fontMetrics().num3,m=3*h),g=e.fontMetrics().denom2);var w;if(d){var E=e.fontMetrics().axisHeight;f-s.depth-(E+.5*u)<m&&(f+=m-(f-s.depth-(E+.5*u))),E-.5*u-(c.height-g)<m&&(g+=m-(E-.5*u-(c.height-g)));var A=-(E-.5*u);w=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:d,shift:A},{type:"elem",elem:s,shift:-f}]},e)}else{var _=f-s.depth-(c.height-g);_<m&&(f+=.5*(m-_),g+=.5*(m-_)),w=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:s,shift:-f}]},e)}o=e.havingStyle(t),w.height*=o.sizeMultiplier/e.sizeMultiplier,w.depth*=o.sizeMultiplier/e.sizeMultiplier;var L;t.size===kt.DISPLAY.size?L=e.fontMetrics().delim1:t.size===kt.SCRIPTSCRIPT.size?L=e.havingStyle(kt.SCRIPT).fontMetrics().delim2:L=e.fontMetrics().delim2;var O,U;return i.leftDelim==null?O=Xg(e,["mopen"]):O=Bl.customSizedDelim(i.leftDelim,L,!0,e.havingStyle(t),i.mode,["mopen"]),i.continued?U=se.makeSpan([]):i.rightDelim==null?U=Xg(e,["mclose"]):U=Bl.customSizedDelim(i.rightDelim,L,!0,e.havingStyle(t),i.mode,["mclose"]),se.makeSpan(["mord"].concat(o.sizingClasses(e)),[O,se.makeSpan(["mfrac"],[w]),U],e)},a6=(i,e)=>{var t=new Ne.MathNode("mfrac",[Bi(i.numer,e),Bi(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var n=hn(i.barSize,e);t.setAttribute("linethickness",$e(n))}var r=Dj(i.size,e.style);if(r.size!==e.style.size){t=new Ne.MathNode("mstyle",[t]);var o=r.size===kt.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",o),t.setAttribute("scriptlevel","0")}if(i.leftDelim!=null||i.rightDelim!=null){var s=[];if(i.leftDelim!=null){var a=new Ne.MathNode("mo",[new Ne.TextNode(i.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),i.rightDelim!=null){var l=new Ne.MathNode("mo",[new Ne.TextNode(i.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return Q5(s)}return t};nt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=e[1],s,a=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,a="(",l=")";break;case"\\\\bracefrac":s=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:r,denom:o,hasBarLine:s,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:s6,mathmlBuilder:a6});nt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});nt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(i){var{parser:e,funcName:t,token:n}=i,r;switch(t){case"\\over":r="\\frac";break;case"\\choose":r="\\binom";break;case"\\atop":r="\\\\atopfrac";break;case"\\brace":r="\\\\bracefrac";break;case"\\brack":r="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:r,token:n}}});var PU=["display","text","script","scriptscript"],OU=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};nt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(i,e){var{parser:t}=i,n=e[4],r=e[5],o=vw(e[0]),s=o.type==="atom"&&o.family==="open"?OU(o.text):null,a=vw(e[1]),l=a.type==="atom"&&a.family==="close"?OU(a.text):null,c=Zt(e[2],"size"),d,u=null;c.isBlank?d=!0:(u=c.value,d=u.number>0);var h="auto",f=e[3];if(f.type==="ordgroup"){if(f.body.length>0){var m=Zt(f.body[0],"textord");h=PU[Number(m.text)]}}else f=Zt(f,"textord"),h=PU[Number(f.text)];return{type:"genfrac",mode:t.mode,numer:n,denom:r,continued:!1,hasBarLine:d,barSize:u,leftDelim:s,rightDelim:l,size:h}},htmlBuilder:s6,mathmlBuilder:a6});nt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(i,e){var{parser:t,funcName:n,token:r}=i;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:Zt(e[0],"size").value,token:r}}});nt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=wce(Zt(e[1],"infix").size),s=e[2],a=o.number>0;return{type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:a,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:s6,mathmlBuilder:a6});var Mj=(i,e)=>{var t=e.style,n,r;i.type==="supsub"?(n=i.sup?vi(i.sup,e.havingStyle(t.sup()),e):vi(i.sub,e.havingStyle(t.sub()),e),r=Zt(i.base,"horizBrace")):r=Zt(i,"horizBrace");var o=vi(r.base,e.havingBaseStyle(kt.DISPLAY)),s=Ul.svgSpan(r,e),a;if(r.isOver?(a=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e),a.children[0].children[0].children[1].classes.push("svg-align")):(a=se.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e),a.children[0].children[0].children[0].classes.push("svg-align")),n){var l=se.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e);r.isOver?a=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):a=se.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return se.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e)},Wde=(i,e)=>{var t=Ul.mathMLnode(i.label);return new Ne.MathNode(i.isOver?"mover":"munder",[Bi(i.base,e),t])};nt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"horizBrace",mode:t.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:Mj,mathmlBuilder:Wde});nt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[1],r=Zt(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:t.mode,href:r,body:Tn(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=Vn(i.body,e,!1);return se.makeAnchor(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=md(i.body,e);return t instanceof po||(t=new po("mrow",[t])),t.setAttribute("href",i.href),t}});nt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=Zt(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var r=[],o=0;o<n.length;o++){var s=n[o];s==="~"&&(s="\\textasciitilde"),r.push({type:"textord",mode:"text",text:s})}var a={type:"text",mode:t.mode,font:"\\texttt",body:r};return{type:"href",mode:t.mode,href:n,body:Tn(a)}}});nt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(i,e){var{parser:t}=i;return{type:"hbox",mode:t.mode,body:Tn(e[0])}},htmlBuilder(i,e){var t=Vn(i.body,e,!1);return se.makeFragment(t)},mathmlBuilder(i,e){return new Ne.MathNode("mrow",go(i.body,e))}});nt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,token:r}=i,o=Zt(e[0],"raw").string,s=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var a,l={};switch(n){case"\\htmlClass":l.class=o,a={command:"\\htmlClass",class:o};break;case"\\htmlId":l.id=o,a={command:"\\htmlId",id:o};break;case"\\htmlStyle":l.style=o,a={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var c=o.split(","),d=0;d<c.length;d++){var u=c[d].split("=");if(u.length!==2)throw new Be("Error parsing key-value for \\htmlData");l["data-"+u[0].trim()]=u[1].trim()}a={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return t.settings.isTrusted(a)?{type:"html",mode:t.mode,attributes:l,body:Tn(s)}:t.formatUnsupportedCmd(n)},htmlBuilder:(i,e)=>{var t=Vn(i.body,e,!1),n=["enclosing"];i.attributes.class&&n.push(...i.attributes.class.trim().split(/\s+/));var r=se.makeSpan(n,t,e);for(var o in i.attributes)o!=="class"&&i.attributes.hasOwnProperty(o)&&r.setAttribute(o,i.attributes[o]);return r},mathmlBuilder:(i,e)=>md(i.body,e)});nt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"htmlmathml",mode:t.mode,html:Tn(e[0]),mathml:Tn(e[1])}},htmlBuilder:(i,e)=>{var t=Vn(i.html,e,!1);return se.makeFragment(t)},mathmlBuilder:(i,e)=>md(i.mathml,e)});var M5=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Be("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!QU(n))throw new Be("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};nt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(i,e,t)=>{var{parser:n}=i,r={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(t[0])for(var l=Zt(t[0],"raw").string,c=l.split(","),d=0;d<c.length;d++){var u=c[d].split("=");if(u.length===2){var h=u[1].trim();switch(u[0].trim()){case"alt":a=h;break;case"width":r=M5(h);break;case"height":o=M5(h);break;case"totalheight":s=M5(h);break;default:throw new Be("Invalid key: '"+u[0]+"' in \\includegraphics.")}}}var f=Zt(e[0],"url").url;return a===""&&(a=f,a=a.replace(/^.*[\\/]/,""),a=a.substring(0,a.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:n.mode,alt:a,width:r,height:o,totalheight:s,src:f}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(i,e)=>{var t=hn(i.height,e),n=0;i.totalheight.number>0&&(n=hn(i.totalheight,e)-t);var r=0;i.width.number>0&&(r=hn(i.width,e));var o={height:$e(t+n)};r>0&&(o.width=$e(r)),n>0&&(o.verticalAlign=$e(-n));var s=new z5(i.src,i.alt,o);return s.height=t,s.depth=n,s},mathmlBuilder:(i,e)=>{var t=new Ne.MathNode("mglyph",[]);t.setAttribute("alt",i.alt);var n=hn(i.height,e),r=0;if(i.totalheight.number>0&&(r=hn(i.totalheight,e)-n,t.setAttribute("valign",$e(-r))),t.setAttribute("height",$e(n+r)),i.width.number>0){var o=hn(i.width,e);t.setAttribute("width",$e(o))}return t.setAttribute("src",i.src),t}});nt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=Zt(e[0],"size");if(t.settings.strict){var o=n[1]==="m",s=r.value.unit==="mu";o?(s||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+r.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:r.value}},htmlBuilder(i,e){return se.makeGlue(i.dimension,e)},mathmlBuilder(i,e){var t=hn(i.dimension,e);return new Ne.SpaceNode(t)}});nt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:r}},htmlBuilder:(i,e)=>{var t;i.alignment==="clap"?(t=se.makeSpan([],[vi(i.body,e)]),t=se.makeSpan(["inner"],[t],e)):t=se.makeSpan(["inner"],[vi(i.body,e)]);var n=se.makeSpan(["fix"],[]),r=se.makeSpan([i.alignment],[t,n],e),o=se.makeSpan(["strut"]);return o.style.height=$e(r.height+r.depth),r.depth&&(o.style.verticalAlign=$e(-r.depth)),r.children.unshift(o),r=se.makeSpan(["thinbox"],[r],e),se.makeSpan(["mord","vbox"],[r],e)},mathmlBuilder:(i,e)=>{var t=new Ne.MathNode("mpadded",[Bi(i.body,e)]);if(i.alignment!=="rlap"){var n=i.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});nt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){var{funcName:t,parser:n}=i,r=n.mode;n.switchMode("math");var o=t==="\\("?"\\)":"$",s=n.parseExpression(!1,o);return n.expect(o),n.switchMode(r),{type:"styling",mode:n.mode,style:"text",body:s}}});nt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new Be("Mismatched "+i.funcName)}});var FU=(i,e)=>{switch(e.style.size){case kt.DISPLAY.size:return i.display;case kt.TEXT.size:return i.text;case kt.SCRIPT.size:return i.script;case kt.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};nt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:Tn(e[0]),text:Tn(e[1]),script:Tn(e[2]),scriptscript:Tn(e[3])}},htmlBuilder:(i,e)=>{var t=FU(i,e),n=Vn(t,e,!1);return se.makeFragment(n)},mathmlBuilder:(i,e)=>{var t=FU(i,e);return md(t,e)}});var Nj=(i,e,t,n,r,o,s)=>{i=se.makeSpan([],[i]);var a=t&&Rt.isCharacterBox(t),l,c;if(e){var d=vi(e,n.havingStyle(r.sup()),n);c={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var u=vi(t,n.havingStyle(r.sub()),n);l={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-u.height)}}var h;if(c&&l){var f=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+i.depth+s;h=se.makeVList({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:$e(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:$e(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var m=i.height-s;h=se.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:$e(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i}]},n)}else if(c){var g=i.depth+s;h=se.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:$e(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return i;var w=[h];if(l&&o!==0&&!a){var _=se.makeSpan(["mspace"],[],n);_.style.marginRight=$e(o),w.unshift(_)}return se.makeSpan(["mop","op-limits"],w,n)},Rj=["\\smallint"],$f=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=Zt(i.base,"op"),r=!0):o=Zt(i,"op");var s=e.style,a=!1;s.size===kt.DISPLAY.size&&o.symbol&&!Rt.contains(Rj,o.name)&&(a=!0);var l;if(o.symbol){var c=a?"Size2-Regular":"Size1-Regular",d="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(d=o.name.slice(1),o.name=d==="oiint"?"\\iint":"\\iiint"),l=se.makeSymbol(o.name,c,"math",e,["mop","op-symbol",a?"large-op":"small-op"]),d.length>0){var u=l.italic,h=se.staticSvg(d+"Size"+(a?"2":"1"),e);l=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:a?.08:0}]},e),o.name="\\"+d,l.classes.unshift("mop"),l.italic=u}}else if(o.body){var f=Vn(o.body,e,!0);f.length===1&&f[0]instanceof mo?(l=f[0],l.classes[0]="mop"):l=se.makeSpan(["mop"],f,e)}else{for(var m=[],g=1;g<o.name.length;g++)m.push(se.mathsym(o.name[g],o.mode,e));l=se.makeSpan(["mop"],m,e)}var w=0,_=0;return(l instanceof mo||o.name==="\\oiint"||o.name==="\\oiiint")&&!o.suppressBaseShift&&(w=(l.height-l.depth)/2-e.fontMetrics().axisHeight,_=l.italic),r?Nj(l,t,n,e,s,_,w):(w&&(l.style.position="relative",l.style.top=$e(w)),l)},Qg=(i,e)=>{var t;if(i.symbol)t=new po("mo",[ls(i.name,i.mode)]),Rt.contains(Rj,i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new po("mo",go(i.body,e));else{t=new po("mi",[new Ru(i.name.slice(1))]);var n=new po("mo",[ls("\u2061","text")]);i.parentIsSupSub?t=new po("mrow",[t,n]):t=lj([t,n])}return t},Vde={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};nt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=n;return r.length===1&&(r=Vde[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:$f,mathmlBuilder:Qg});nt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Tn(n)}},htmlBuilder:$f,mathmlBuilder:Qg});var qde={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};nt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:$f,mathmlBuilder:Qg});nt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:$f,mathmlBuilder:Qg});nt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i,n=t;return n.length===1&&(n=qde[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:$f,mathmlBuilder:Qg});var Pj=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=Zt(i.base,"operatorname"),r=!0):o=Zt(i,"operatorname");var s;if(o.body.length>0){for(var a=o.body.map(u=>{var h=u.text;return typeof h=="string"?{type:"textord",mode:u.mode,text:h}:u}),l=Vn(a,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof mo&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=se.makeSpan(["mop"],l,e)}else s=se.makeSpan(["mop"],[],e);return r?Nj(s,t,n,e,e.style,0,0):s},Kde=(i,e)=>{for(var t=go(i.body,e.withFont("mathrm")),n=!0,r=0;r<t.length;r++){var o=t[r];if(!(o instanceof Ne.SpaceNode))if(o instanceof Ne.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=o.children[0];o.children.length===1&&s instanceof Ne.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var a=t.map(d=>d.toText()).join("");t=[new Ne.TextNode(a)]}var l=new Ne.MathNode("mi",t);l.setAttribute("mathvariant","normal");var c=new Ne.MathNode("mo",[ls("\u2061","text")]);return i.parentIsSupSub?new Ne.MathNode("mrow",[l,c]):Ne.newDocumentFragment([l,c])};nt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"operatorname",mode:t.mode,body:Tn(r),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Pj,mathmlBuilder:Kde});P("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Fu({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?se.makeFragment(Vn(i.body,e,!1)):se.makeSpan(["mord"],Vn(i.body,e,!0),e)},mathmlBuilder(i,e){return md(i.body,e,!0)}});nt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(i,e){var{parser:t}=i,n=e[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(i,e){var t=vi(i.body,e.havingCrampedStyle()),n=se.makeLineSpan("overline-line",e),r=e.fontMetrics().defaultRuleThickness,o=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*r},{type:"elem",elem:n},{type:"kern",size:r}]},e);return se.makeSpan(["mord","overline"],[o],e)},mathmlBuilder(i,e){var t=new Ne.MathNode("mo",[new Ne.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new Ne.MathNode("mover",[Bi(i.body,e),t]);return n.setAttribute("accent","true"),n}});nt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"phantom",mode:t.mode,body:Tn(n)}},htmlBuilder:(i,e)=>{var t=Vn(i.body,e.withPhantom(),!1);return se.makeFragment(t)},mathmlBuilder:(i,e)=>{var t=go(i.body,e);return new Ne.MathNode("mphantom",t)}});nt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"hphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=se.makeSpan([],[vi(i.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var n=0;n<t.children.length;n++)t.children[n].height=0,t.children[n].depth=0;return t=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e),se.makeSpan(["mord"],[t],e)},mathmlBuilder:(i,e)=>{var t=go(Tn(i.body),e),n=new Ne.MathNode("mphantom",t),r=new Ne.MathNode("mpadded",[n]);return r.setAttribute("height","0px"),r.setAttribute("depth","0px"),r}});nt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=se.makeSpan(["inner"],[vi(i.body,e.withPhantom())]),n=se.makeSpan(["fix"],[]);return se.makeSpan(["mord","rlap"],[t,n],e)},mathmlBuilder:(i,e)=>{var t=go(Tn(i.body),e),n=new Ne.MathNode("mphantom",t),r=new Ne.MathNode("mpadded",[n]);return r.setAttribute("width","0px"),r}});nt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,n=Zt(e[0],"size").value,r=e[1];return{type:"raisebox",mode:t.mode,dy:n,body:r}},htmlBuilder(i,e){var t=vi(i.body,e),n=hn(i.dy,e);return se.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){var t=new Ne.MathNode("mpadded",[Bi(i.body,e)]),n=i.dy.number+i.dy.unit;return t.setAttribute("voffset",n),t}});nt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});nt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(i,e,t){var{parser:n}=i,r=t[0],o=Zt(e[0],"size"),s=Zt(e[1],"size");return{type:"rule",mode:n.mode,shift:r&&Zt(r,"size").value,width:o.value,height:s.value}},htmlBuilder(i,e){var t=se.makeSpan(["mord","rule"],[],e),n=hn(i.width,e),r=hn(i.height,e),o=i.shift?hn(i.shift,e):0;return t.style.borderRightWidth=$e(n),t.style.borderTopWidth=$e(r),t.style.bottom=$e(o),t.width=n,t.height=r+o,t.depth=-o,t.maxFontSize=r*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=hn(i.width,e),n=hn(i.height,e),r=i.shift?hn(i.shift,e):0,o=e.color&&e.getColor()||"black",s=new Ne.MathNode("mspace");s.setAttribute("mathbackground",o),s.setAttribute("width",$e(t)),s.setAttribute("height",$e(n));var a=new Ne.MathNode("mpadded",[s]);return r>=0?a.setAttribute("height",$e(r)):(a.setAttribute("height",$e(r)),a.setAttribute("depth",$e(-r))),a.setAttribute("voffset",$e(r)),a}});function Oj(i,e,t){for(var n=Vn(i,e,!1),r=e.sizeMultiplier/t.sizeMultiplier,o=0;o<n.length;o++){var s=n[o].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[o].classes,e.sizingClasses(t)):n[o].classes[s+1]==="reset-size"+e.size&&(n[o].classes[s+1]="reset-size"+t.size),n[o].height*=r,n[o].depth*=r}return se.makeFragment(n)}var zU=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],$de=(i,e)=>{var t=e.havingSize(i.size);return Oj(i.body,t,e)};nt({type:"sizing",names:zU,props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{breakOnTokenText:t,funcName:n,parser:r}=i,o=r.parseExpression(!1,t);return{type:"sizing",mode:r.mode,size:zU.indexOf(n)+1,body:o}},htmlBuilder:$de,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),n=go(i.body,t),r=new Ne.MathNode("mstyle",n);return r.setAttribute("mathsize",$e(t.sizeMultiplier)),r}});nt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(i,e,t)=>{var{parser:n}=i,r=!1,o=!1,s=t[0]&&Zt(t[0],"ordgroup");if(s)for(var a="",l=0;l<s.body.length;++l){var c=s.body[l];if(a=c.text,a==="t")r=!0;else if(a==="b")o=!0;else{r=!1,o=!1;break}}else r=!0,o=!0;var d=e[0];return{type:"smash",mode:n.mode,body:d,smashHeight:r,smashDepth:o}},htmlBuilder:(i,e)=>{var t=se.makeSpan([],[vi(i.body,e)]);if(!i.smashHeight&&!i.smashDepth)return t;if(i.smashHeight&&(t.height=0,t.children))for(var n=0;n<t.children.length;n++)t.children[n].height=0;if(i.smashDepth&&(t.depth=0,t.children))for(var r=0;r<t.children.length;r++)t.children[r].depth=0;var o=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e);return se.makeSpan(["mord"],[o],e)},mathmlBuilder:(i,e)=>{var t=new Ne.MathNode("mpadded",[Bi(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});nt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n}=i,r=t[0],o=e[0];return{type:"sqrt",mode:n.mode,body:o,index:r}},htmlBuilder(i,e){var t=vi(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=se.wrapFragment(t,e);var n=e.fontMetrics(),r=n.defaultRuleThickness,o=r;e.style.id<kt.TEXT.id&&(o=e.fontMetrics().xHeight);var s=r+o/4,a=t.height+t.depth+s+r,{span:l,ruleWidth:c,advanceWidth:d}=Bl.sqrtImage(a,e),u=l.height-c;u>t.height+t.depth+s&&(s=(s+u-t.height-t.depth)/2);var h=l.height-t.height-s-c;t.style.paddingLeft=$e(d);var f=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+h)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(i.index){var m=e.havingStyle(kt.SCRIPTSCRIPT),g=vi(i.index,m,e),w=.6*(f.height-f.depth),_=se.makeVList({positionType:"shift",positionData:-w,children:[{type:"elem",elem:g}]},e),E=se.makeSpan(["root"],[_]);return se.makeSpan(["mord","sqrt"],[E,f],e)}else return se.makeSpan(["mord","sqrt"],[f],e)},mathmlBuilder(i,e){var{body:t,index:n}=i;return n?new Ne.MathNode("mroot",[Bi(t,e),Bi(n,e)]):new Ne.MathNode("msqrt",[Bi(t,e)])}});var BU={display:kt.DISPLAY,text:kt.TEXT,script:kt.SCRIPT,scriptscript:kt.SCRIPTSCRIPT};nt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i,e){var{breakOnTokenText:t,funcName:n,parser:r}=i,o=r.parseExpression(!0,t),s=n.slice(1,n.length-5);return{type:"styling",mode:r.mode,style:s,body:o}},htmlBuilder(i,e){var t=BU[i.style],n=e.havingStyle(t).withFont("");return Oj(i.body,n,e)},mathmlBuilder(i,e){var t=BU[i.style],n=e.havingStyle(t),r=go(i.body,n),o=new Ne.MathNode("mstyle",r),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=s[i.style];return o.setAttribute("scriptlevel",a[0]),o.setAttribute("displaystyle",a[1]),o}});var Gde=function(e,t){var n=e.base;if(n)if(n.type==="op"){var r=n.limits&&(t.style.size===kt.DISPLAY.size||n.alwaysHandleSupSub);return r?$f:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(t.style.size===kt.DISPLAY.size||n.limits);return o?Pj:null}else{if(n.type==="accent")return Rt.isCharacterBox(n.base)?e6:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?Mj:null}else return null}else return null};Fu({type:"supsub",htmlBuilder(i,e){var t=Gde(i,e);if(t)return t(i,e);var{base:n,sup:r,sub:o}=i,s=vi(n,e),a,l,c=e.fontMetrics(),d=0,u=0,h=n&&Rt.isCharacterBox(n);if(r){var f=e.havingStyle(e.style.sup());a=vi(r,f,e),h||(d=s.height-f.fontMetrics().supDrop*f.sizeMultiplier/e.sizeMultiplier)}if(o){var m=e.havingStyle(e.style.sub());l=vi(o,m,e),h||(u=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var g;e.style===kt.DISPLAY?g=c.sup1:e.style.cramped?g=c.sup3:g=c.sup2;var w=e.sizeMultiplier,_=$e(.5/c.ptPerEm/w),E=null;if(l){var A=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");(s instanceof mo||A)&&(E=$e(-s.italic))}var L;if(a&&l){d=Math.max(d,g,a.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var O=c.defaultRuleThickness,U=4*O;if(d-a.depth-(l.height-u)<U){u=U-(d-a.depth)+l.height;var Q=.8*c.xHeight-(d-a.depth);Q>0&&(d+=Q,u-=Q)}var ae=[{type:"elem",elem:l,shift:u,marginRight:_,marginLeft:E},{type:"elem",elem:a,shift:-d,marginRight:_}];L=se.makeVList({positionType:"individualShift",children:ae},e)}else if(l){u=Math.max(u,c.sub1,l.height-.8*c.xHeight);var te=[{type:"elem",elem:l,marginLeft:E,marginRight:_}];L=se.makeVList({positionType:"shift",positionData:u,children:te},e)}else if(a)d=Math.max(d,g,a.depth+.25*c.xHeight),L=se.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:_}]},e);else throw new Error("supsub must have either sup or sub.");var Z=H5(s,"right")||"mord";return se.makeSpan([Z],[s,se.makeSpan(["msupsub"],[L])],e)},mathmlBuilder(i,e){var t=!1,n,r;i.base&&i.base.type==="horizBrace"&&(r=!!i.sup,r===i.base.isOver&&(t=!0,n=i.base.isOver)),i.base&&(i.base.type==="op"||i.base.type==="operatorname")&&(i.base.parentIsSupSub=!0);var o=[Bi(i.base,e)];i.sub&&o.push(Bi(i.sub,e)),i.sup&&o.push(Bi(i.sup,e));var s;if(t)s=n?"mover":"munder";else if(i.sub)if(i.sup){var c=i.base;c&&c.type==="op"&&c.limits&&e.style===kt.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===kt.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===kt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===kt.DISPLAY)?s="munder":s="msub"}else{var a=i.base;a&&a.type==="op"&&a.limits&&(e.style===kt.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||e.style===kt.DISPLAY)?s="mover":s="msup"}return new Ne.MathNode(s,o)}});Fu({type:"atom",htmlBuilder(i,e){return se.mathsym(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new Ne.MathNode("mo",[ls(i.text,i.mode)]);if(i.family==="bin"){var n=Z5(i,e);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else i.family==="punct"?t.setAttribute("separator","true"):(i.family==="open"||i.family==="close")&&t.setAttribute("stretchy","false");return t}});var Fj={mi:"italic",mn:"normal",mtext:"normal"};Fu({type:"mathord",htmlBuilder(i,e){return se.makeOrd(i,e,"mathord")},mathmlBuilder(i,e){var t=new Ne.MathNode("mi",[ls(i.text,i.mode,e)]),n=Z5(i,e)||"italic";return n!==Fj[t.type]&&t.setAttribute("mathvariant",n),t}});Fu({type:"textord",htmlBuilder(i,e){return se.makeOrd(i,e,"textord")},mathmlBuilder(i,e){var t=ls(i.text,i.mode,e),n=Z5(i,e)||"normal",r;return i.mode==="text"?r=new Ne.MathNode("mtext",[t]):/[0-9]/.test(i.text)?r=new Ne.MathNode("mn",[t]):i.text==="\\prime"?r=new Ne.MathNode("mo",[t]):r=new Ne.MathNode("mi",[t]),n!==Fj[r.type]&&r.setAttribute("mathvariant",n),r}});var N5={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},R5={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Fu({type:"spacing",htmlBuilder(i,e){if(R5.hasOwnProperty(i.text)){var t=R5[i.text].className||"";if(i.mode==="text"){var n=se.makeOrd(i,e,"textord");return n.classes.push(t),n}else return se.makeSpan(["mspace",t],[se.mathsym(i.text,i.mode,e)],e)}else{if(N5.hasOwnProperty(i.text))return se.makeSpan(["mspace",N5[i.text]],[],e);throw new Be('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(R5.hasOwnProperty(i.text))t=new Ne.MathNode("mtext",[new Ne.TextNode("\xA0")]);else{if(N5.hasOwnProperty(i.text))return new Ne.MathNode("mspace");throw new Be('Unknown type of space "'+i.text+'"')}return t}});var HU=()=>{var i=new Ne.MathNode("mtd",[]);return i.setAttribute("width","50%"),i};Fu({type:"tag",mathmlBuilder(i,e){var t=new Ne.MathNode("mtable",[new Ne.MathNode("mtr",[HU(),new Ne.MathNode("mtd",[md(i.body,e)]),HU(),new Ne.MathNode("mtd",[md(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var UU={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},jU={"\\textbf":"textbf","\\textmd":"textmd"},Yde={"\\textit":"textit","\\textup":"textup"},WU=(i,e)=>{var t=i.font;return t?UU[t]?e.withTextFontFamily(UU[t]):jU[t]?e.withTextFontWeight(jU[t]):e.withTextFontShape(Yde[t]):e};nt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"text",mode:t.mode,body:Tn(r),font:n}},htmlBuilder(i,e){var t=WU(i,e),n=Vn(i.body,t,!0);return se.makeSpan(["mord","text"],n,t)},mathmlBuilder(i,e){var t=WU(i,e);return md(i.body,t)}});nt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=vi(i.body,e),n=se.makeLineSpan("underline-line",e),r=e.fontMetrics().defaultRuleThickness,o=se.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:r},{type:"elem",elem:n},{type:"kern",size:3*r},{type:"elem",elem:t}]},e);return se.makeSpan(["mord","underline"],[o],e)},mathmlBuilder(i,e){var t=new Ne.MathNode("mo",[new Ne.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new Ne.MathNode("munder",[Bi(i.body,e),t]);return n.setAttribute("accentunder","true"),n}});nt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=vi(i.body,e),n=e.fontMetrics().axisHeight,r=.5*(t.height-n-(t.depth+n));return se.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){return new Ne.MathNode("mpadded",[Bi(i.body,e)],["vcenter"])}});nt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new Be("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=VU(i),n=[],r=e.havingStyle(e.style.text()),o=0;o<t.length;o++){var s=t[o];s==="~"&&(s="\\textasciitilde"),n.push(se.makeSymbol(s,"Typewriter-Regular",i.mode,r,["mord","texttt"]))}return se.makeSpan(["mord","text"].concat(r.sizingClasses(e)),se.tryCombineChars(n),r)},mathmlBuilder(i,e){var t=new Ne.TextNode(VU(i)),n=new Ne.MathNode("mtext",[t]);return n.setAttribute("mathvariant","monospace"),n}});var VU=i=>i.body.replace(/ /g,i.star?"\u2423":"\xA0"),fd=sj,zj=`[ \r
]`,Xde="\\\\[a-zA-Z@]+",Qde="\\\\[^\uD800-\uDFFF]",Zde="("+Xde+")"+zj+"*",Jde=`\\\\(
|[ \r ]+
?)[ \r ]*`,q5="[\u0300-\u036F]",eue=new RegExp(q5+"+$"),tue="("+zj+"+)|"+(Jde+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(q5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(q5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Zde)+("|"+Qde+")"),_w=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(tue,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Ra("EOF",new Bo(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new Be("Unexpected character: '"+e[t]+"'",new Ra(e[t],new Bo(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[r]===14){var o=e.indexOf(`
`,this.tokenRegex.lastIndex);return o===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Ra(r,new Bo(this,t,this.tokenRegex.lastIndex))}},K5=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Be("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},iue=Tj;P("\\noexpand",function(i){var e=i.popToken();return i.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});P("\\expandafter",function(i){var e=i.popToken();return i.expandOnce(!0),{tokens:[e],numArgs:0}});P("\\@firstoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[0],numArgs:0}});P("\\@secondoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[1],numArgs:0}});P("\\@ifnextchar",function(i){var e=i.consumeArgs(3);i.consumeSpaces();var t=i.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});P("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");P("\\TextOrMath",function(i){var e=i.consumeArgs(2);return i.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var qU={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};P("\\char",function(i){var e=i.popToken(),t,n="";if(e.text==="'")t=8,e=i.popToken();else if(e.text==='"')t=16,e=i.popToken();else if(e.text==="`")if(e=i.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new Be("\\char` missing argument");n=e.text.charCodeAt(0)}else t=10;if(t){if(n=qU[e.text],n==null||n>=t)throw new Be("Invalid base-"+t+" digit "+e.text);for(var r;(r=qU[i.future().text])!=null&&r<t;)n*=t,n+=r,i.popToken()}return"\\@char{"+n+"}"});var l6=(i,e,t)=>{var n=i.consumeArg().tokens;if(n.length!==1)throw new Be("\\newcommand's first argument must be a macro name");var r=n[0].text,o=i.isDefined(r);if(o&&!e)throw new Be("\\newcommand{"+r+"} attempting to redefine "+(r+"; use \\renewcommand"));if(!o&&!t)throw new Be("\\renewcommand{"+r+"} when command "+r+" does not yet exist; use \\newcommand");var s=0;if(n=i.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var a="",l=i.expandNextToken();l.text!=="]"&&l.text!=="EOF";)a+=l.text,l=i.expandNextToken();if(!a.match(/^\s*[0-9]+\s*$/))throw new Be("Invalid number of arguments: "+a);s=parseInt(a),n=i.consumeArg().tokens}return i.macros.set(r,{tokens:n,numArgs:s}),""};P("\\newcommand",i=>l6(i,!1,!0));P("\\renewcommand",i=>l6(i,!0,!1));P("\\providecommand",i=>l6(i,!0,!0));P("\\message",i=>{var e=i.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});P("\\errmessage",i=>{var e=i.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});P("\\show",i=>{var e=i.popToken(),t=e.text;return console.log(e,i.macros.get(t),fd[t],Gi.math[t],Gi.text[t]),""});P("\\bgroup","{");P("\\egroup","}");P("~","\\nobreakspace");P("\\lq","`");P("\\rq","'");P("\\aa","\\r a");P("\\AA","\\r A");P("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");P("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");P("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");P("\u212C","\\mathscr{B}");P("\u2130","\\mathscr{E}");P("\u2131","\\mathscr{F}");P("\u210B","\\mathscr{H}");P("\u2110","\\mathscr{I}");P("\u2112","\\mathscr{L}");P("\u2133","\\mathscr{M}");P("\u211B","\\mathscr{R}");P("\u212D","\\mathfrak{C}");P("\u210C","\\mathfrak{H}");P("\u2128","\\mathfrak{Z}");P("\\Bbbk","\\Bbb{k}");P("\xB7","\\cdotp");P("\\llap","\\mathllap{\\textrm{#1}}");P("\\rlap","\\mathrlap{\\textrm{#1}}");P("\\clap","\\mathclap{\\textrm{#1}}");P("\\mathstrut","\\vphantom{(}");P("\\underbar","\\underline{\\text{#1}}");P("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');P("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");P("\\ne","\\neq");P("\u2260","\\neq");P("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");P("\u2209","\\notin");P("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");P("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");P("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");P("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");P("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");P("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");P("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");P("\u27C2","\\perp");P("\u203C","\\mathclose{!\\mkern-0.8mu!}");P("\u220C","\\notni");P("\u231C","\\ulcorner");P("\u231D","\\urcorner");P("\u231E","\\llcorner");P("\u231F","\\lrcorner");P("\xA9","\\copyright");P("\xAE","\\textregistered");P("\uFE0F","\\textregistered");P("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');P("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');P("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');P("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');P("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");P("\u22EE","\\vdots");P("\\varGamma","\\mathit{\\Gamma}");P("\\varDelta","\\mathit{\\Delta}");P("\\varTheta","\\mathit{\\Theta}");P("\\varLambda","\\mathit{\\Lambda}");P("\\varXi","\\mathit{\\Xi}");P("\\varPi","\\mathit{\\Pi}");P("\\varSigma","\\mathit{\\Sigma}");P("\\varUpsilon","\\mathit{\\Upsilon}");P("\\varPhi","\\mathit{\\Phi}");P("\\varPsi","\\mathit{\\Psi}");P("\\varOmega","\\mathit{\\Omega}");P("\\substack","\\begin{subarray}{c}#1\\end{subarray}");P("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");P("\\boxed","\\fbox{$\\displaystyle{#1}$}");P("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");P("\\implies","\\DOTSB\\;\\Longrightarrow\\;");P("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var KU={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};P("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in KU?e=KU[t]:(t.slice(0,4)==="\\not"||t in Gi.math&&Rt.contains(["bin","rel"],Gi.math[t].group))&&(e="\\dotsb"),e});var c6={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};P("\\dotso",function(i){var e=i.future().text;return e in c6?"\\ldots\\,":"\\ldots"});P("\\dotsc",function(i){var e=i.future().text;return e in c6&&e!==","?"\\ldots\\,":"\\ldots"});P("\\cdots",function(i){var e=i.future().text;return e in c6?"\\@cdots\\,":"\\@cdots"});P("\\dotsb","\\cdots");P("\\dotsm","\\cdots");P("\\dotsi","\\!\\cdots");P("\\dotsx","\\ldots\\,");P("\\DOTSI","\\relax");P("\\DOTSB","\\relax");P("\\DOTSX","\\relax");P("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");P("\\,","\\tmspace+{3mu}{.1667em}");P("\\thinspace","\\,");P("\\>","\\mskip{4mu}");P("\\:","\\tmspace+{4mu}{.2222em}");P("\\medspace","\\:");P("\\;","\\tmspace+{5mu}{.2777em}");P("\\thickspace","\\;");P("\\!","\\tmspace-{3mu}{.1667em}");P("\\negthinspace","\\!");P("\\negmedspace","\\tmspace-{4mu}{.2222em}");P("\\negthickspace","\\tmspace-{5mu}{.277em}");P("\\enspace","\\kern.5em ");P("\\enskip","\\hskip.5em\\relax");P("\\quad","\\hskip1em\\relax");P("\\qquad","\\hskip2em\\relax");P("\\tag","\\@ifstar\\tag@literal\\tag@paren");P("\\tag@paren","\\tag@literal{({#1})}");P("\\tag@literal",i=>{if(i.macros.get("\\df@tag"))throw new Be("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});P("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");P("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");P("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");P("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");P("\\newline","\\\\\\relax");P("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Bj=$e(Na["Main-Regular"]["T".charCodeAt(0)][1]-.7*Na["Main-Regular"]["A".charCodeAt(0)][1]);P("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Bj+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");P("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Bj+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");P("\\hspace","\\@ifstar\\@hspacer\\@hspace");P("\\@hspace","\\hskip #1\\relax");P("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");P("\\ordinarycolon",":");P("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");P("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');P("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');P("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');P("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');P("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');P("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');P("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');P("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');P("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');P("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');P("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');P("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');P("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');P("\u2237","\\dblcolon");P("\u2239","\\eqcolon");P("\u2254","\\coloneqq");P("\u2255","\\eqqcolon");P("\u2A74","\\Coloneqq");P("\\ratio","\\vcentcolon");P("\\coloncolon","\\dblcolon");P("\\colonequals","\\coloneqq");P("\\coloncolonequals","\\Coloneqq");P("\\equalscolon","\\eqqcolon");P("\\equalscoloncolon","\\Eqqcolon");P("\\colonminus","\\coloneq");P("\\coloncolonminus","\\Coloneq");P("\\minuscolon","\\eqcolon");P("\\minuscoloncolon","\\Eqcolon");P("\\coloncolonapprox","\\Colonapprox");P("\\coloncolonsim","\\Colonsim");P("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");P("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");P("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");P("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");P("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");P("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");P("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");P("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");P("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");P("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");P("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");P("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");P("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");P("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");P("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");P("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");P("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");P("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");P("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");P("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");P("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");P("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");P("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");P("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");P("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");P("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");P("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");P("\\imath","\\html@mathml{\\@imath}{\u0131}");P("\\jmath","\\html@mathml{\\@jmath}{\u0237}");P("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");P("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");P("\u27E6","\\llbracket");P("\u27E7","\\rrbracket");P("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");P("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");P("\u2983","\\lBrace");P("\u2984","\\rBrace");P("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");P("\u29B5","\\minuso");P("\\darr","\\downarrow");P("\\dArr","\\Downarrow");P("\\Darr","\\Downarrow");P("\\lang","\\langle");P("\\rang","\\rangle");P("\\uarr","\\uparrow");P("\\uArr","\\Uparrow");P("\\Uarr","\\Uparrow");P("\\N","\\mathbb{N}");P("\\R","\\mathbb{R}");P("\\Z","\\mathbb{Z}");P("\\alef","\\aleph");P("\\alefsym","\\aleph");P("\\Alpha","\\mathrm{A}");P("\\Beta","\\mathrm{B}");P("\\bull","\\bullet");P("\\Chi","\\mathrm{X}");P("\\clubs","\\clubsuit");P("\\cnums","\\mathbb{C}");P("\\Complex","\\mathbb{C}");P("\\Dagger","\\ddagger");P("\\diamonds","\\diamondsuit");P("\\empty","\\emptyset");P("\\Epsilon","\\mathrm{E}");P("\\Eta","\\mathrm{H}");P("\\exist","\\exists");P("\\harr","\\leftrightarrow");P("\\hArr","\\Leftrightarrow");P("\\Harr","\\Leftrightarrow");P("\\hearts","\\heartsuit");P("\\image","\\Im");P("\\infin","\\infty");P("\\Iota","\\mathrm{I}");P("\\isin","\\in");P("\\Kappa","\\mathrm{K}");P("\\larr","\\leftarrow");P("\\lArr","\\Leftarrow");P("\\Larr","\\Leftarrow");P("\\lrarr","\\leftrightarrow");P("\\lrArr","\\Leftrightarrow");P("\\Lrarr","\\Leftrightarrow");P("\\Mu","\\mathrm{M}");P("\\natnums","\\mathbb{N}");P("\\Nu","\\mathrm{N}");P("\\Omicron","\\mathrm{O}");P("\\plusmn","\\pm");P("\\rarr","\\rightarrow");P("\\rArr","\\Rightarrow");P("\\Rarr","\\Rightarrow");P("\\real","\\Re");P("\\reals","\\mathbb{R}");P("\\Reals","\\mathbb{R}");P("\\Rho","\\mathrm{P}");P("\\sdot","\\cdot");P("\\sect","\\S");P("\\spades","\\spadesuit");P("\\sub","\\subset");P("\\sube","\\subseteq");P("\\supe","\\supseteq");P("\\Tau","\\mathrm{T}");P("\\thetasym","\\vartheta");P("\\weierp","\\wp");P("\\Zeta","\\mathrm{Z}");P("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");P("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");P("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");P("\\bra","\\mathinner{\\langle{#1}|}");P("\\ket","\\mathinner{|{#1}\\rangle}");P("\\braket","\\mathinner{\\langle{#1}\\rangle}");P("\\Bra","\\left\\langle#1\\right|");P("\\Ket","\\left|#1\\right\\rangle");var Hj=i=>e=>{var t=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,o=e.consumeArg().tokens,s=e.macros.get("|"),a=e.macros.get("\\|");e.macros.beginGroup();var l=u=>h=>{i&&(h.macros.set("|",s),r.length&&h.macros.set("\\|",a));var f=u;if(!u&&r.length){var m=h.future();m.text==="|"&&(h.popToken(),f=!0)}return{tokens:f?r:n,numArgs:0}};e.macros.set("|",l(!1)),r.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,d=e.expandTokens([...o,...c,...t]);return e.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};P("\\bra@ket",Hj(!1));P("\\bra@set",Hj(!0));P("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");P("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");P("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");P("\\angln","{\\angl n}");P("\\blue","\\textcolor{##6495ed}{#1}");P("\\orange","\\textcolor{##ffa500}{#1}");P("\\pink","\\textcolor{##ff00af}{#1}");P("\\red","\\textcolor{##df0030}{#1}");P("\\green","\\textcolor{##28ae7b}{#1}");P("\\gray","\\textcolor{gray}{#1}");P("\\purple","\\textcolor{##9d38bd}{#1}");P("\\blueA","\\textcolor{##ccfaff}{#1}");P("\\blueB","\\textcolor{##80f6ff}{#1}");P("\\blueC","\\textcolor{##63d9ea}{#1}");P("\\blueD","\\textcolor{##11accd}{#1}");P("\\blueE","\\textcolor{##0c7f99}{#1}");P("\\tealA","\\textcolor{##94fff5}{#1}");P("\\tealB","\\textcolor{##26edd5}{#1}");P("\\tealC","\\textcolor{##01d1c1}{#1}");P("\\tealD","\\textcolor{##01a995}{#1}");P("\\tealE","\\textcolor{##208170}{#1}");P("\\greenA","\\textcolor{##b6ffb0}{#1}");P("\\greenB","\\textcolor{##8af281}{#1}");P("\\greenC","\\textcolor{##74cf70}{#1}");P("\\greenD","\\textcolor{##1fab54}{#1}");P("\\greenE","\\textcolor{##0d923f}{#1}");P("\\goldA","\\textcolor{##ffd0a9}{#1}");P("\\goldB","\\textcolor{##ffbb71}{#1}");P("\\goldC","\\textcolor{##ff9c39}{#1}");P("\\goldD","\\textcolor{##e07d10}{#1}");P("\\goldE","\\textcolor{##a75a05}{#1}");P("\\redA","\\textcolor{##fca9a9}{#1}");P("\\redB","\\textcolor{##ff8482}{#1}");P("\\redC","\\textcolor{##f9685d}{#1}");P("\\redD","\\textcolor{##e84d39}{#1}");P("\\redE","\\textcolor{##bc2612}{#1}");P("\\maroonA","\\textcolor{##ffbde0}{#1}");P("\\maroonB","\\textcolor{##ff92c6}{#1}");P("\\maroonC","\\textcolor{##ed5fa6}{#1}");P("\\maroonD","\\textcolor{##ca337c}{#1}");P("\\maroonE","\\textcolor{##9e034e}{#1}");P("\\purpleA","\\textcolor{##ddd7ff}{#1}");P("\\purpleB","\\textcolor{##c6b9fc}{#1}");P("\\purpleC","\\textcolor{##aa87ff}{#1}");P("\\purpleD","\\textcolor{##7854ab}{#1}");P("\\purpleE","\\textcolor{##543b78}{#1}");P("\\mintA","\\textcolor{##f5f9e8}{#1}");P("\\mintB","\\textcolor{##edf2df}{#1}");P("\\mintC","\\textcolor{##e0e5cc}{#1}");P("\\grayA","\\textcolor{##f6f7f7}{#1}");P("\\grayB","\\textcolor{##f0f1f2}{#1}");P("\\grayC","\\textcolor{##e3e5e6}{#1}");P("\\grayD","\\textcolor{##d6d8da}{#1}");P("\\grayE","\\textcolor{##babec2}{#1}");P("\\grayF","\\textcolor{##888d93}{#1}");P("\\grayG","\\textcolor{##626569}{#1}");P("\\grayH","\\textcolor{##3b3e40}{#1}");P("\\grayI","\\textcolor{##21242c}{#1}");P("\\kaBlue","\\textcolor{##314453}{#1}");P("\\kaGreen","\\textcolor{##71B307}{#1}");var Uj={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},$5=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new K5(iue,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new _w(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg(["]"])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new Ra("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),o,s=0,a=0;do{if(o=this.popToken(),t.push(o),o.text==="{")++s;else if(o.text==="}"){if(--s,s===-1)throw new Be("Extra }",o)}else if(o.text==="EOF")throw new Be("Unexpected end of input in a macro argument, expected '"+(e&&n?e[a]:"}")+"'",o);if(e&&n)if((s===0||s===1&&e[a]==="{")&&o.text===e[a]){if(++a,a===e.length){t.splice(-a,a);break}}else a=0}while(s!==0||n);return r.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:o}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Be("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var o=this.popToken();if(n[r]!==o.text)throw new Be("Use of the macro doesn't match its definition",o)}}for(var s=[],a=0;a<e;a++)s.push(this.consumeArg(t&&t[a+1]).tokens);return s}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]==="\\"&&!this.isDefined(n))throw new Be("Undefined control sequence: "+n);return this.pushToken(t),!1}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new Be("Too many expansions: infinite loop or need to increase maxExpand setting");var o=r.tokens,s=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){o=o.slice();for(var a=o.length-1;a>=0;--a){var l=o[a];if(l.text==="#"){if(a===0)throw new Be("Incomplete placeholder at end of macro body",l);if(l=o[--a],l.text==="#")o.splice(a+1,1);else if(/^[1-9]$/.test(l.text))o.splice(a,2,...s[+l.text-1]);else throw new Be("Not a valid argument number",l)}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Ra(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(n=>n.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t=="function"?t(this):t;if(typeof r=="string"){var o=0;if(r.indexOf("#")!==-1)for(var s=r.replace(/##/g,"");s.indexOf("#"+(o+1))!==-1;)++o;for(var a=new _w(r,this.settings),l=[],c=a.lex();c.text!=="EOF";)l.push(c),c=a.lex();l.reverse();var d={tokens:l,numArgs:o};return d}return r}isDefined(e){return this.macros.has(e)||fd.hasOwnProperty(e)||Gi.math.hasOwnProperty(e)||Gi.text.hasOwnProperty(e)||Uj.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:fd.hasOwnProperty(e)&&!fd[e].primitive}},$U=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,dw=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),P5={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},GU={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},yw=class i{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new $5(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new Be("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Ra("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var r=this.fetch();if(i.endOfExpression.indexOf(r.text)!==-1||t&&r.text===t||e&&fd[r.text]&&fd[r.text].infix)break;var o=this.parseAtom(t);if(o){if(o.type==="internal")continue}else break;n.push(o)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++)if(e[r].type==="infix"){if(t!==-1)throw new Be("only one infix operator per group",e[r].token);t=r,n=e[r].replaceWith}if(t!==-1&&n){var o,s,a=e.slice(0,t),l=e.slice(t+1);a.length===1&&a[0].type==="ordgroup"?o=a[0]:o={type:"ordgroup",mode:this.mode,body:a},l.length===1&&l[0].type==="ordgroup"?s=l[0]:s={type:"ordgroup",mode:this.mode,body:l};var c;return n==="\\\\abovefrac"?c=this.callFunction(n,[o,e[t],s],[]):c=this.callFunction(n,[o,s],[]),[c]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r=this.parseGroup(e);if(!r)throw new Be("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t},o={type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]};return o}parseAtom(e){var t=this.parseGroup("atom",e);if(this.mode==="text")return t;for(var n,r;;){this.consumeSpaces();var o=this.fetch();if(o.text==="\\limits"||o.text==="\\nolimits"){if(t&&t.type==="op"){var s=o.text==="\\limits";t.limits=s,t.alwaysHandleSupSub=!0}else if(t&&t.type==="operatorname")t.alwaysHandleSupSub&&(t.limits=o.text==="\\limits");else throw new Be("Limit controls must follow a math operator",o);this.consume()}else if(o.text==="^"){if(n)throw new Be("Double superscript",o);n=this.handleSupSubscript("superscript")}else if(o.text==="_"){if(r)throw new Be("Double subscript",o);r=this.handleSupSubscript("subscript")}else if(o.text==="'"){if(n)throw new Be("Double superscript",o);var a={type:"textord",mode:this.mode,text:"\\prime"},l=[a];for(this.consume();this.fetch().text==="'";)l.push(a),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(dw[o.text]){var c=dw[o.text],d=$U.test(o.text);for(this.consume();;){var u=this.fetch().text;if(!dw[u]||$U.test(u)!==d)break;this.consume(),c+=dw[u]}var h=new i(c,this.settings).parse();d?r={type:"ordgroup",mode:"math",body:h}:n={type:"ordgroup",mode:"math",body:h}}else break}return n||r?{type:"supsub",mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,o=fd[r];if(!o)return null;if(this.consume(),t&&t!=="atom"&&!o.allowedInArgument)throw new Be("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if(this.mode==="text"&&!o.allowedInText)throw new Be("Can't use function '"+r+"' in text mode",n);if(this.mode==="math"&&o.allowedInMath===!1)throw new Be("Can't use function '"+r+"' in math mode",n);var{args:s,optArgs:a}=this.parseArguments(r,o);return this.callFunction(r,s,a,n,e)}callFunction(e,t,n,r,o){var s={funcName:e,parser:this,token:r,breakOnTokenText:o},a=fd[e];if(a&&a.handler)return a.handler(s,t,n);throw new Be("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],o=[],s=0;s<n;s++){var a=t.argTypes&&t.argTypes[s],l=s<t.numOptionalArgs;(t.primitive&&a==null||t.type==="sqrt"&&s===1&&o[0]==null)&&(a="primitive");var c=this.parseGroupOfType("argument to '"+e+"'",a,l);if(l)o.push(c);else if(c!=null)r.push(c);else throw new Be("Null argument, please report this as a bug")}return{args:r,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":{var r=this.parseArgumentGroup(n,"text");return r!=null?{type:"styling",mode:r.mode,body:[r],style:"text"}:null}case"raw":{var o=this.parseStringGroup("raw",n);return o!=null?{type:"raw",mode:"text",string:o.text}:null}case"primitive":{if(n)throw new Be("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new Be("Expected group as "+e,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Be("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r="",o;(o=this.fetch()).text!=="EOF";)r+=o.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,o="",s;(s=this.fetch()).text!=="EOF"&&e.test(o+s.text);)r=s,o+=r.text,this.consume();if(o==="")throw new Be("Invalid "+t+": '"+n.text+"'",n);return n.range(r,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(t==null)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new Be("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):t=this.parseStringGroup("size",e),!t)return null;!e&&t.text.length===0&&(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new Be("Invalid size: '"+t.text+"'",t);var o={number:+(r[1]+r[2]),unit:r[3]};if(!QU(o))throw new Be("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:n.loc,body:o};return t&&this.switchMode(r),s}parseGroup(e,t){var n=this.fetch(),r=n.text,o;if(r==="{"||r==="\\begingroup"){this.consume();var s=r==="{"?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,s),l=this.fetch();this.expect(s),this.gullet.endGroup(),o={type:"ordgroup",mode:this.mode,loc:Bo.range(n,l),body:a,semisimple:r==="\\begingroup"||void 0}}else if(o=this.parseFunction(t,e)||this.parseSymbol(),o==null&&r[0]==="\\"&&!Uj.hasOwnProperty(r)){if(this.settings.throwOnError)throw new Be("Undefined control sequence: "+r,n);o=this.formatUnsupportedCmd(r),this.consume()}return o}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],o=r.text;o==="-"&&e[n+1].text==="-"&&(n+1<t&&e[n+2].text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:Bo.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Bo.range(r,e[n+1]),text:"--"}),t-=1)),(o==="'"||o==="`")&&e[n+1].text===o&&(e.splice(n,2,{type:"textord",mode:"text",loc:Bo.range(r,e[n+1]),text:o+o}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)==="*";if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new Be(`\\verb assertion failed --
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}GU.hasOwnProperty(t[0])&&!Gi[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=GU[t[0]]+t.slice(1));var o=eue.exec(t);o&&(t=t.substring(0,o.index),t==="i"?t="\u0131":t==="j"&&(t="\u0237"));var s;if(Gi[this.mode][t]){this.settings.strict&&this.mode==="math"&&B5.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a=Gi[this.mode][t].group,l=Bo.range(e),c;if($ce.hasOwnProperty(a)){var d=a;c={type:"atom",mode:this.mode,family:d,loc:l,text:t}}else c={type:a,mode:this.mode,loc:l,text:t};s=c}else if(t.charCodeAt(0)>=128)this.settings.strict&&(XU(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Bo.range(e),text:t};else return null;if(this.consume(),o)for(var u=0;u<o[0].length;u++){var h=o[0][u];if(!P5[h])throw new Be("Unknown accent ' "+h+"'",e);var f=P5[h][this.mode]||P5[h].text;if(!f)throw new Be("Accent "+h+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:Bo.range(e),label:f,isStretchy:!1,isShifty:!0,base:s}}return s}};yw.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var d6=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new yw(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new Be("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new Ra("\\df@tag")])}]}return r},jj=function(e,t,n){t.textContent="";var r=u6(e,n).toNode();t.appendChild(r)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),jj=function(){throw new Be("KaTeX doesn't work in quirks mode.")});var nue=function(e,t){var n=u6(e,t).toMarkup();return n},rue=function(e,t){var n=new Kg(t);return d6(e,n)},Wj=function(e,t,n){if(n.throwOnError||!(e instanceof Be))throw e;var r=se.makeSpan(["katex-error"],[new mo(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},u6=function(e,t){var n=new Kg(t);try{var r=d6(e,n);return mde(r,e,n)}catch(o){return Wj(o,e,n)}},oue=function(e,t){var n=new Kg(t);try{var r=d6(e,n);return gde(r,e,n)}catch(o){return Wj(o,e,n)}},Gf={version:"0.16.9",render:jj,renderToString:nue,ParseError:Be,SETTINGS_SCHEMA:uw,__parse:rue,__renderToDomTree:u6,__renderToHTMLTree:oue,__setFontMetrics:Uce,__defineSymbol:x,__defineFunction:nt,__defineMacro:P,__domTree:{Span:Ou,Anchor:Gg,SymbolNode:mo,SvgNode:zs,PathNode:Pa,LineNode:Yg}};var sue={};function Tw(i){let e=this,t=i||sue,n=e.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(C5(t)),o.push(y5()),s.push(w5(t))}function Vj(i,e){let t={type:"element",tagName:"blockquote",properties:{},children:i.wrap(i.all(e),!0)};return i.patch(e,t),i.applyData(e,t)}function qj(i,e){let t={type:"element",tagName:"br",properties:{},children:[]};return i.patch(e,t),[i.applyData(e,t),{type:"text",value:`
`}]}function Kj(i,e){let t=e.value?e.value+`
`:"",n={};e.lang&&(n.className=["language-"+e.lang]);let r={type:"element",tagName:"code",properties:n,children:[{type:"text",value:t}]};return e.meta&&(r.data={meta:e.meta}),i.patch(e,r),r=i.applyData(e,r),r={type:"element",tagName:"pre",properties:{},children:[r]},i.patch(e,r),r}function $j(i,e){let t={type:"element",tagName:"del",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function Gj(i,e){let t={type:"element",tagName:"em",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}var fAe=bd(new RegExp("\\p{P}","u")),pAe=bd(/[A-Za-z]/),h6=bd(/[\dA-Za-z]/),mAe=bd(/[#-'*+\--9=?A-Z^-~]/);var gAe=bd(/\d/),bAe=bd(/[\dA-Fa-f]/),vAe=bd(/[!-/:-@[-`{-~]/);var _Ae=bd(/\s/);function bd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function cs(i){let e=[],t=-1,n=0,r=0;for(;++t<i.length;){let o=i.charCodeAt(t),s="";if(o===37&&h6(i.charCodeAt(t+1))&&h6(i.charCodeAt(t+2)))r=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let a=i.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(i.slice(n,t),encodeURIComponent(s)),n=t+r+1,s=""),r&&(t+=r,r=0)}return e.join("")+i.slice(n)}function Yj(i,e){let t=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),r=cs(n.toLowerCase()),o=i.footnoteOrder.indexOf(n),s,a=i.footnoteCounts.get(n);a===void 0?(a=0,i.footnoteOrder.push(n),s=i.footnoteOrder.length):s=o+1,a+=1,i.footnoteCounts.set(n,a);let l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};i.patch(e,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return i.patch(e,c),i.applyData(e,c)}function Xj(i,e){let t={type:"element",tagName:"h"+e.depth,properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function Qj(i,e){if(i.options.allowDangerousHtml){let t={type:"raw",value:e.value};return i.patch(e,t),i.applyData(e,t)}}function Iw(i,e){let t=e.referenceType,n="]";if(t==="collapsed"?n+="[]":t==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];let r=i.all(e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift({type:"text",value:"["});let s=r[r.length-1];return s&&s.type==="text"?s.value+=n:r.push({type:"text",value:n}),r}function Zj(i,e){let t=String(e.identifier).toUpperCase(),n=i.definitionById.get(t);if(!n)return Iw(i,e);let r={src:cs(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);let o={type:"element",tagName:"img",properties:r,children:[]};return i.patch(e,o),i.applyData(e,o)}function Jj(i,e){let t={src:cs(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);let n={type:"element",tagName:"img",properties:t,children:[]};return i.patch(e,n),i.applyData(e,n)}function eW(i,e){let t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};i.patch(e,t);let n={type:"element",tagName:"code",properties:{},children:[t]};return i.patch(e,n),i.applyData(e,n)}function tW(i,e){let t=String(e.identifier).toUpperCase(),n=i.definitionById.get(t);if(!n)return Iw(i,e);let r={href:cs(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);let o={type:"element",tagName:"a",properties:r,children:i.all(e)};return i.patch(e,o),i.applyData(e,o)}function iW(i,e){let t={href:cs(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);let n={type:"element",tagName:"a",properties:t,children:i.all(e)};return i.patch(e,n),i.applyData(e,n)}function nW(i,e,t){let n=i.all(e),r=t?aue(t):rW(e),o={},s=[];if(typeof e.checked=="boolean"){let d=n[0],u;d&&d.type==="element"&&d.tagName==="p"?u=d:(u={type:"element",tagName:"p",properties:{},children:[]},n.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<n.length;){let d=n[a];(r||a!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
`}),d.type==="element"&&d.tagName==="p"&&!r?s.push(...d.children):s.push(d)}let l=n[n.length-1];l&&(r||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
`});let c={type:"element",tagName:"li",properties:o,children:s};return i.patch(e,c),i.applyData(e,c)}function aue(i){let e=!1;if(i.type==="list"){e=i.spread||!1;let t=i.children,n=-1;for(;!e&&++n<t.length;)e=rW(t[n])}return e}function rW(i){let e=i.spread;return e==null?i.children.length>1:e}function oW(i,e){let t={},n=i.all(e),r=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++r<n.length;){let s=n[r];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}let o={type:"element",tagName:e.ordered?"ol":"ul",properties:t,children:i.wrap(n,!0)};return i.patch(e,o),i.applyData(e,o)}function sW(i,e){let t={type:"element",tagName:"p",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function aW(i,e){let t={type:"root",children:i.wrap(i.all(e))};return i.patch(e,t),i.applyData(e,t)}function lW(i,e){let t={type:"element",tagName:"strong",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}var zu=cW("end"),ds=cW("start");function cW(i){return e;function e(t){let n=t&&t.position&&t.position[i]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Zg(i){let e=ds(i),t=zu(i);if(e&&t)return{start:e,end:t}}function dW(i,e){let t=i.all(e),n=t.shift(),r=[];if(n){let s={type:"element",tagName:"thead",properties:{},children:i.wrap([n],!0)};i.patch(e.children[0],s),r.push(s)}if(t.length>0){let s={type:"element",tagName:"tbody",properties:{},children:i.wrap(t,!0)},a=ds(e.children[1]),l=zu(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),r.push(s)}let o={type:"element",tagName:"table",properties:{},children:i.wrap(r,!0)};return i.patch(e,o),i.applyData(e,o)}function uW(i,e,t){let n=t?t.children:void 0,o=(n?n.indexOf(e):1)===0?"th":"td",s=t&&t.type==="table"?t.align:void 0,a=s?s.length:e.children.length,l=-1,c=[];for(;++l<a;){let u=e.children[l],h={},f=s?s[l]:void 0;f&&(h.align=f);let m={type:"element",tagName:o,properties:h,children:[]};u&&(m.children=i.all(u),i.patch(u,m),m=i.applyData(u,m)),c.push(m)}let d={type:"element",tagName:"tr",properties:{},children:i.wrap(c,!0)};return i.patch(e,d),i.applyData(e,d)}function hW(i,e){let t={type:"element",tagName:"td",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function pW(i){let e=String(i),t=/\r?\n|\r/g,n=t.exec(e),r=0,o=[];for(;n;)o.push(fW(e.slice(r,n.index),r>0,!0),n[0]),r=n.index+n[0].length,n=t.exec(e);return o.push(fW(e.slice(r),r>0,!1)),o.join("")}function fW(i,e,t){let n=0,r=i.length;if(e){let o=i.codePointAt(n);for(;o===9||o===32;)n++,o=i.codePointAt(n)}if(t){let o=i.codePointAt(r-1);for(;o===9||o===32;)r--,o=i.codePointAt(r-1)}return r>n?i.slice(n,r):""}function mW(i,e){let t={type:"text",value:pW(String(e.value))};return i.patch(e,t),i.applyData(e,t)}function gW(i,e){let t={type:"element",tagName:"hr",properties:{},children:[]};return i.patch(e,t),i.applyData(e,t)}var bW={blockquote:Vj,break:qj,code:Kj,delete:$j,emphasis:Gj,footnoteReference:Yj,heading:Xj,html:Qj,imageReference:Zj,image:Jj,inlineCode:eW,linkReference:tW,link:iW,listItem:nW,list:oW,paragraph:sW,root:aW,strong:lW,table:dW,tableCell:hW,tableRow:uW,text:mW,thematicBreak:gW,toml:Lw,yaml:Lw,definition:Lw,footnoteDefinition:Lw};function Lw(){}var vW=typeof self=="object"?self:globalThis,lue=(i,e)=>{let t=(r,o)=>(i.set(o,r),r),n=r=>{if(i.has(r))return i.get(r);let[o,s]=e[r];switch(o){case 0:case-1:return t(s,r);case 1:{let a=t([],r);for(let l of s)a.push(n(l));return a}case 2:{let a=t({},r);for(let[l,c]of s)a[n(l)]=n(c);return a}case 3:return t(new Date(s),r);case 4:{let{source:a,flags:l}=s;return t(new RegExp(a,l),r)}case 5:{let a=t(new Map,r);for(let[l,c]of s)a.set(n(l),n(c));return a}case 6:{let a=t(new Set,r);for(let l of s)a.add(n(l));return a}case 7:{let{name:a,message:l}=s;return t(new vW[a](l),r)}case 8:return t(BigInt(s),r);case"BigInt":return t(Object(BigInt(s)),r)}return t(new vW[o](s),r)};return n},g6=i=>lue(new Map,i)(0);var Yf="",{toString:cue}={},{keys:due}=Object,i0=i=>{let e=typeof i;if(e!=="object"||!i)return[0,e];let t=cue.call(i).slice(8,-1);switch(t){case"Array":return[1,Yf];case"Object":return[2,Yf];case"Date":return[3,Yf];case"RegExp":return[4,Yf];case"Map":return[5,Yf];case"Set":return[6,Yf]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},Rw=([i,e])=>i===0&&(e==="function"||e==="symbol"),uue=(i,e,t,n)=>{let r=(s,a)=>{let l=n.push(s)-1;return t.set(a,l),l},o=s=>{if(t.has(s))return t.get(s);let[a,l]=i0(s);switch(a){case 0:{let d=s;switch(l){case"bigint":a=8,d=s.toString();break;case"function":case"symbol":if(i)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return r([-1],s)}return r([a,d],s)}case 1:{if(l)return r([l,[...s]],s);let d=[],u=r([a,d],s);for(let h of s)d.push(o(h));return u}case 2:{if(l)switch(l){case"BigInt":return r([l,s.toString()],s);case"Boolean":case"Number":case"String":return r([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let d=[],u=r([a,d],s);for(let h of due(s))(i||!Rw(i0(s[h])))&&d.push([o(h),o(s[h])]);return u}case 3:return r([a,s.toISOString()],s);case 4:{let{source:d,flags:u}=s;return r([a,{source:d,flags:u}],s)}case 5:{let d=[],u=r([a,d],s);for(let[h,f]of s)(i||!(Rw(i0(h))||Rw(i0(f))))&&d.push([o(h),o(f)]);return u}case 6:{let d=[],u=r([a,d],s);for(let h of s)(i||!Rw(i0(h)))&&d.push(o(h));return u}}let{message:c}=s;return r([a,{name:l,message:c}],s)};return o},b6=(i,{json:e,lossy:t}={})=>{let n=[];return uue(!(e||t),!!e,new Map,n)(i),n};var Bs=typeof structuredClone=="function"?(i,e)=>e&&("json"in e||"lossy"in e)?g6(b6(i,e)):structuredClone(i):(i,e)=>g6(b6(i,e));function hue(i,e){let t=[{type:"text",value:"\u21A9"}];return e>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),t}function fue(i,e){return"Back to reference "+(i+1)+(e>1?"-"+e:"")}function _W(i){let e=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",t=i.options.footnoteBackContent||hue,n=i.options.footnoteBackLabel||fue,r=i.options.footnoteLabel||"Footnotes",o=i.options.footnoteLabelTagName||"h2",s=i.options.footnoteLabelProperties||{className:["sr-only"]},a=[],l=-1;for(;++l<i.footnoteOrder.length;){let c=i.footnoteById.get(i.footnoteOrder[l]);if(!c)continue;let d=i.all(c),u=String(c.identifier).toUpperCase(),h=cs(u.toLowerCase()),f=0,m=[],g=i.footnoteCounts.get(u);for(;g!==void 0&&++f<=g;){m.length>0&&m.push({type:"text",value:" "});let E=typeof t=="string"?t:t(l,f);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,f),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}let w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){let E=w.children[w.children.length-1];E&&E.type==="text"?E.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else d.push(...m);let _={type:"element",tagName:"li",properties:{id:e+"fn-"+h},children:i.wrap(d,!0)};i.patch(c,_),a.push(_)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:xt(ue({},Bs(s)),{id:"footnote-label"}),children:[{type:"text",value:r}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:i.wrap(a,!0)},{type:"text",value:`
`}]}}var v6={}.hasOwnProperty,pue={};function wW(i,e){let t=e||pue,n=new Map,r=new Map,o=new Map,s=ue(ue({},bW),t.handlers),a={all:c,applyData:gue,definitionById:n,footnoteById:r,footnoteCounts:o,footnoteOrder:[],handlers:s,one:l,options:t,patch:mue,wrap:vue};return Or(i,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){let u=d.type==="definition"?n:r,h=String(d.identifier).toUpperCase();u.has(h)||u.set(h,d)}}),a;function l(d,u){let h=d.type,f=a.handlers[h];if(v6.call(a.handlers,h)&&f)return f(a,d,u);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in d){let g=d,{children:w}=g,_=lo(g,["children"]),E=Bs(_);return E.children=a.all(d),E}return Bs(d)}return(a.options.unknownHandler||bue)(a,d,u)}function c(d){let u=[];if("children"in d){let h=d.children,f=-1;for(;++f<h.length;){let m=a.one(h[f],d);if(m){if(f&&h[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=yW(m.value)),!Array.isArray(m)&&m.type==="element")){let g=m.children[0];g&&g.type==="text"&&(g.value=yW(g.value))}Array.isArray(m)?u.push(...m):u.push(m)}}}return u}}function mue(i,e){i.position&&(e.position=Zg(i))}function gue(i,e){let t=e;if(i&&i.data){let n=i.data.hName,r=i.data.hChildren,o=i.data.hProperties;if(typeof n=="string")if(t.type==="element")t.tagName=n;else{let s="children"in t?t.children:[t];t={type:"element",tagName:n,properties:{},children:s}}t.type==="element"&&o&&Object.assign(t.properties,Bs(o)),"children"in t&&t.children&&r!==null&&r!==void 0&&(t.children=r)}return t}function bue(i,e){let t=e.data||{},n="value"in e&&!(v6.call(t,"hProperties")||v6.call(t,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:i.all(e)};return i.patch(e,n),i.applyData(e,n)}function vue(i,e){let t=[],n=-1;for(e&&t.push({type:"text",value:`
`});++n<i.length;)n&&t.push({type:"text",value:`
`}),t.push(i[n]);return e&&i.length>0&&t.push({type:"text",value:`
`}),t}function yW(i){let e=0,t=i.charCodeAt(e);for(;t===9||t===32;)e++,t=i.charCodeAt(e);return i.slice(e)}function Pw(i,e){let t=wW(i,e),n=t.one(i,void 0),r=_W(t),o=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return r&&("children"in o,o.children.push({type:"text",value:`
`},r)),o}function Ow(i,e){return i&&"run"in i?async function(t,n){let r=Pw(t,e);await i.run(r,n)}:function(t){return Pw(t,e||i)}}var Wl=class{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}};Wl.prototype.property={};Wl.prototype.normal={};Wl.prototype.space=null;function _6(i,e){let t={},n={},r=-1;for(;++r<i.length;)Object.assign(t,i[r].property),Object.assign(n,i[r].normal);return new Wl(t,n,e)}function Vl(i){return i.toLowerCase()}var zr=class{constructor(e,t){this.property=e,this.attribute=t}};zr.prototype.space=null;zr.prototype.boolean=!1;zr.prototype.booleanish=!1;zr.prototype.overloadedBoolean=!1;zr.prototype.number=!1;zr.prototype.commaSeparated=!1;zr.prototype.spaceSeparated=!1;zr.prototype.commaOrSpaceSeparated=!1;zr.prototype.mustUseProperty=!1;zr.prototype.defined=!1;var n0={};Xh(n0,{boolean:()=>Gt,booleanish:()=>_n,commaOrSpaceSeparated:()=>bo,commaSeparated:()=>vd,number:()=>Fe,overloadedBoolean:()=>y6,spaceSeparated:()=>Mi});var _ue=0,Gt=Bu(),_n=Bu(),y6=Bu(),Fe=Bu(),Mi=Bu(),vd=Bu(),bo=Bu();function Bu(){return 2**++_ue}var w6=Object.keys(n0),Hu=class extends zr{constructor(e,t,n,r){let o=-1;if(super(e,t),xW(this,"space",r),typeof n=="number")for(;++o<w6.length;){let s=w6[o];xW(this,w6[o],(n&n0[s])===n0[s])}}};Hu.prototype.defined=!0;function xW(i,e,t){t&&(i[e]=t)}var yue={}.hasOwnProperty;function us(i){let e={},t={},n;for(n in i.properties)if(yue.call(i.properties,n)){let r=i.properties[n],o=new Hu(n,i.transform(i.attributes||{},n),r,i.space);i.mustUseProperty&&i.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),e[n]=o,t[Vl(n)]=n,t[Vl(o.attribute)]=n}return new Wl(e,t,i.space)}var x6=us({space:"xlink",transform(i,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var C6=us({space:"xml",transform(i,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Fw(i,e){return e in i?i[e]:e}function zw(i,e){return Fw(i,e.toLowerCase())}var S6=us({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:zw,properties:{xmlns:null,xmlnsXLink:null}});var k6=us({transform(i,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:_n,ariaAutoComplete:null,ariaBusy:_n,ariaChecked:_n,ariaColCount:Fe,ariaColIndex:Fe,ariaColSpan:Fe,ariaControls:Mi,ariaCurrent:null,ariaDescribedBy:Mi,ariaDetails:null,ariaDisabled:_n,ariaDropEffect:Mi,ariaErrorMessage:null,ariaExpanded:_n,ariaFlowTo:Mi,ariaGrabbed:_n,ariaHasPopup:null,ariaHidden:_n,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Mi,ariaLevel:Fe,ariaLive:null,ariaModal:_n,ariaMultiLine:_n,ariaMultiSelectable:_n,ariaOrientation:null,ariaOwns:Mi,ariaPlaceholder:null,ariaPosInSet:Fe,ariaPressed:_n,ariaReadOnly:_n,ariaRelevant:null,ariaRequired:_n,ariaRoleDescription:Mi,ariaRowCount:Fe,ariaRowIndex:Fe,ariaRowSpan:Fe,ariaSelected:_n,ariaSetSize:Fe,ariaSort:null,ariaValueMax:Fe,ariaValueMin:Fe,ariaValueNow:Fe,ariaValueText:null,role:null}});var CW=us({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:zw,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vd,acceptCharset:Mi,accessKey:Mi,action:null,allow:null,allowFullScreen:Gt,allowPaymentRequest:Gt,allowUserMedia:Gt,alt:null,as:null,async:Gt,autoCapitalize:null,autoComplete:Mi,autoFocus:Gt,autoPlay:Gt,blocking:Mi,capture:Gt,charSet:null,checked:Gt,cite:null,className:Mi,cols:Fe,colSpan:null,content:null,contentEditable:_n,controls:Gt,controlsList:Mi,coords:Fe|vd,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Gt,defer:Gt,dir:null,dirName:null,disabled:Gt,download:y6,draggable:_n,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Gt,formTarget:null,headers:Mi,height:Fe,hidden:Gt,high:Fe,href:null,hrefLang:null,htmlFor:Mi,httpEquiv:Mi,id:null,imageSizes:null,imageSrcSet:null,inert:Gt,inputMode:null,integrity:null,is:null,isMap:Gt,itemId:null,itemProp:Mi,itemRef:Mi,itemScope:Gt,itemType:Mi,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Gt,low:Fe,manifest:null,max:null,maxLength:Fe,media:null,method:null,min:null,minLength:Fe,multiple:Gt,muted:Gt,name:null,nonce:null,noModule:Gt,noValidate:Gt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Gt,optimum:Fe,pattern:null,ping:Mi,placeholder:null,playsInline:Gt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Gt,referrerPolicy:null,rel:Mi,required:Gt,reversed:Gt,rows:Fe,rowSpan:Fe,sandbox:Mi,scope:null,scoped:Gt,seamless:Gt,selected:Gt,shape:null,size:Fe,sizes:null,slot:null,span:Fe,spellCheck:_n,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Fe,step:null,style:null,tabIndex:Fe,target:null,title:null,translate:null,type:null,typeMustMatch:Gt,useMap:null,value:_n,width:Fe,wrap:null,align:null,aLink:null,archive:Mi,axis:null,background:null,bgColor:null,border:Fe,borderColor:null,bottomMargin:Fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Gt,declare:Gt,event:null,face:null,frame:null,frameBorder:null,hSpace:Fe,leftMargin:Fe,link:null,longDesc:null,lowSrc:null,marginHeight:Fe,marginWidth:Fe,noResize:Gt,noHref:Gt,noShade:Gt,noWrap:Gt,object:null,profile:null,prompt:null,rev:null,rightMargin:Fe,rules:null,scheme:null,scrolling:_n,standby:null,summary:null,text:null,topMargin:Fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Gt,disableRemotePlayback:Gt,prefix:null,property:null,results:Fe,security:null,unselectable:null}});var SW=us({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Fw,properties:{about:bo,accentHeight:Fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Fe,amplitude:Fe,arabicForm:null,ascent:Fe,attributeName:null,attributeType:null,azimuth:Fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Fe,by:null,calcMode:null,capHeight:Fe,className:Mi,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Fe,diffuseConstant:Fe,direction:null,display:null,dur:null,divisor:Fe,dominantBaseline:null,download:Gt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Fe,enableBackground:null,end:null,event:null,exponent:Fe,externalResourcesRequired:null,fill:null,fillOpacity:Fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:vd,g2:vd,glyphName:vd,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Fe,horizOriginX:Fe,horizOriginY:Fe,id:null,ideographic:Fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Fe,k:Fe,k1:Fe,k2:Fe,k3:Fe,k4:Fe,kernelMatrix:bo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Fe,overlineThickness:Fe,paintOrder:null,panose1:null,path:null,pathLength:Fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Mi,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Fe,pointsAtY:Fe,pointsAtZ:Fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bo,rev:bo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bo,requiredFeatures:bo,requiredFonts:bo,requiredFormats:bo,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Fe,specularExponent:Fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Fe,strikethroughThickness:Fe,string:null,stroke:null,strokeDashArray:bo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Fe,strokeOpacity:Fe,strokeWidth:null,style:null,surfaceScale:Fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bo,tabIndex:Fe,tableValues:null,target:null,targetX:Fe,targetY:Fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Fe,underlineThickness:Fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Fe,values:null,vAlphabetic:Fe,vMathematical:Fe,vectorEffect:null,vHanging:Fe,vIdeographic:Fe,version:null,vertAdvY:Fe,vertOriginX:Fe,vertOriginY:Fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var wue=/^data[-\w.:]+$/i,kW=/-[a-z]/g,xue=/[A-Z]/g;function ql(i,e){let t=Vl(e),n=e,r=zr;if(t in i.normal)return i.property[i.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&wue.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(kW,Sue);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!kW.test(o)){let s=o.replace(xue,Cue);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=Hu}return new r(n,e)}function Cue(i){return"-"+i.toLowerCase()}function Sue(i){return i.charAt(1).toUpperCase()}var Kl=_6([C6,x6,S6,k6,CW],"html"),hs=_6([C6,x6,S6,k6,SW],"svg");function E6(i){let e=[],t=String(i||""),n=t.indexOf(","),r=0,o=!1;for(;!o;){n===-1&&(n=t.length,o=!0);let s=t.slice(r,n).trim();(s||!o)&&e.push(s),r=n+1,n=t.indexOf(",",r)}return e}function Bw(i,e){let t=e||{};return(i[i.length-1]===""?[...i,""]:i).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var EW=/[#.]/g;function T6(i,e){let t=i||"",n={},r=0,o,s;for(;r<t.length;){EW.lastIndex=r;let a=EW.exec(t),l=t.slice(r,a?a.index:t.length);l&&(o?o==="#"?n.id=l:Array.isArray(n.className)?n.className.push(l):n.className=[l]:s=l,r+=l.length),a&&(o=a[0],r++)}return{type:"element",tagName:s||e||"div",properties:n,children:[]}}function I6(i){let e=String(i||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Hw(i){return i.join(" ").trim()}var kue=new Set(["button","menu","reset","submit"]),L6={}.hasOwnProperty;function D6(i,e,t){let n=t&&Lue(t);function r(o,s,...a){let l=-1,c;if(o==null){c={type:"root",children:[]};let d=s;a.unshift(d)}else if(c=T6(o,e),c.tagName=c.tagName.toLowerCase(),n&&L6.call(n,c.tagName)&&(c.tagName=n[c.tagName]),Eue(s,c.tagName)){let d;for(d in s)L6.call(s,d)&&Tue(i,c.properties,d,s[d])}else a.unshift(s);for(;++l<a.length;)A6(c.children,a[l]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return r}function Eue(i,e){return i==null||typeof i!="object"||Array.isArray(i)?!1:e==="input"||!i.type||typeof i.type!="string"?!0:"children"in i&&Array.isArray(i.children)?!1:e==="button"?kue.has(i.type.toLowerCase()):!("value"in i)}function Tue(i,e,t,n){let r=ql(i,t),o=-1,s;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;s=n}else typeof n=="boolean"?s=n:typeof n=="string"?r.spaceSeparated?s=I6(n):r.commaSeparated?s=E6(n):r.commaOrSpaceSeparated?s=I6(E6(n).join(" ")):s=TW(r,r.property,n):Array.isArray(n)?s=n.concat():s=r.property==="style"?Iue(n):String(n);if(Array.isArray(s)){let a=[];for(;++o<s.length;){let l=TW(r,r.property,s[o]);a[o]=l}s=a}if(r.property==="className"&&Array.isArray(e.className)){let a=s;s=e.className.concat(a)}e[r.property]=s}}function A6(i,e){let t=-1;if(e!=null)if(typeof e=="string"||typeof e=="number")i.push({type:"text",value:String(e)});else if(Array.isArray(e))for(;++t<e.length;)A6(i,e[t]);else if(typeof e=="object"&&"type"in e)e.type==="root"?A6(i,e.children):i.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function TW(i,e,t){if(typeof t=="string"){if(i.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((i.boolean||i.overloadedBoolean)&&(t===""||Vl(t)===Vl(e)))return!0}return t}function Iue(i){let e=[],t;for(t in i)L6.call(i,t)&&e.push([t,i[t]].join(": "));return e.join("; ")}function Lue(i){let e={},t=-1;for(;++t<i.length;)e[i[t].toLowerCase()]=i[t];return e}var IW=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];var r0=D6(Kl,"div"),o0=D6(hs,"g",IW);var M6=/\r?\n|\r/g;function N6(i){let e=String(i),t=[];for(M6.lastIndex=0;M6.test(e);)t.push(M6.lastIndex);return t.push(e.length+1),{toPoint:n,toOffset:r};function n(o){let s=-1;if(typeof o=="number"&&o>-1&&o<t[t.length-1]){for(;++s<t.length;)if(t[s]>o)return{line:s+1,column:o-(s>0?t[s-1]:0)+1,offset:o}}}function r(o){let s=o&&o.line,a=o&&o.column;if(typeof s=="number"&&typeof a=="number"&&!Number.isNaN(s)&&!Number.isNaN(a)&&s-1 in t){let l=(t[s-2]||0)+a-1||0;if(l>-1&&l<t[t.length-1])return l}}}var vo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};var AW={}.hasOwnProperty,Aue=Object.prototype;function s0(i,e){let t=e||{};return R6({file:t.file||void 0,location:!1,schema:t.space==="svg"?hs:Kl,verbose:t.verbose||!1},i)}function R6(i,e){let t;switch(e.nodeName){case"#comment":{let n=e;return t={type:"comment",value:n.data},Uw(i,n,t),t}case"#document":case"#document-fragment":{let n=e,r="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(t={type:"root",children:DW(i,e.childNodes),data:{quirksMode:r}},i.file&&i.location){let o=String(i.file),s=N6(o),a=s.toPoint(0),l=s.toPoint(o.length);t.position={start:a,end:l}}return t}case"#documentType":{let n=e;return t={type:"doctype"},Uw(i,n,t),t}case"#text":{let n=e;return t={type:"text",value:n.value},Uw(i,n,t),t}default:return t=Due(i,e),t}}function DW(i,e){let t=-1,n=[];for(;++t<e.length;){let r=R6(i,e[t]);n.push(r)}return n}function Due(i,e){let t=i.schema;i.schema=e.namespaceURI===vo.svg?hs:Kl;let n=-1,r={};for(;++n<e.attrs.length;){let a=e.attrs[n],l=(a.prefix?a.prefix+":":"")+a.name;AW.call(Aue,l)||(r[l]=a.value)}let s=(i.schema.space==="svg"?o0:r0)(e.tagName,r,DW(i,e.childNodes));if(Uw(i,e,s),s.tagName==="template"){let a=e,l=a.sourceCodeLocation,c=l&&l.startTag&&Xf(l.startTag),d=l&&l.endTag&&Xf(l.endTag),u=R6(i,a.content);c&&d&&i.file&&(u.position={start:c.end,end:d.start}),s.content=u}return i.schema=t,s}function Uw(i,e,t){if("sourceCodeLocation"in e&&e.sourceCodeLocation&&i.file){let n=Mue(i,t,e.sourceCodeLocation);n&&(i.location=!0,t.position=n)}}function Mue(i,e,t){let n=Xf(t);if(e.type==="element"){let r=e.children[e.children.length-1];if(n&&!t.endTag&&r&&r.position&&r.position.end&&(n.end=Object.assign({},r.position.end)),i.verbose){let o={},s;if(t.attrs)for(s in t.attrs)AW.call(t.attrs,s)&&(o[ql(i.schema,s).property]=Xf(t.attrs[s]));t.startTag;let a=Xf(t.startTag),l=t.endTag?Xf(t.endTag):void 0,c={opening:a};l&&(c.closing=l),c.properties=o,e.data={position:c}}}return n}function Xf(i){let e=LW({line:i.startLine,column:i.startCol,offset:i.startOffset}),t=LW({line:i.endLine,column:i.endCol,offset:i.endOffset});return e||t?{start:e,end:t}:void 0}function LW(i){return i.line&&i.column?i:void 0}var Nue={},Rue={}.hasOwnProperty,MW=Of("type",{handlers:{root:Pue,element:Hue,text:zue,comment:Bue,doctype:Fue}});function P6(i,e){let n=(e||Nue).space;return MW(i,n==="svg"?hs:Kl)}function Pue(i,e){let t={nodeName:"#document",mode:(i.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return t.childNodes=O6(i.children,t,e),Qf(i,t),t}function Oue(i,e){let t={nodeName:"#document-fragment",childNodes:[]};return t.childNodes=O6(i.children,t,e),Qf(i,t),t}function Fue(i){let e={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Qf(i,e),e}function zue(i){let e={nodeName:"#text",value:i.value,parentNode:null};return Qf(i,e),e}function Bue(i){let e={nodeName:"#comment",data:i.value,parentNode:null};return Qf(i,e),e}function Hue(i,e){let t=e,n=t;i.type==="element"&&i.tagName.toLowerCase()==="svg"&&t.space==="html"&&(n=hs);let r=[],o;if(i.properties){for(o in i.properties)if(o!=="children"&&Rue.call(i.properties,o)){let l=Uue(n,o,i.properties[o]);l&&r.push(l)}}let s=n.space;let a={nodeName:i.tagName,tagName:i.tagName,attrs:r,namespaceURI:vo[s],childNodes:[],parentNode:null};return a.childNodes=O6(i.children,a,n),Qf(i,a),i.tagName==="template"&&i.content&&(a.content=Oue(i.content,n)),a}function Uue(i,e,t){let n=ql(i,e);if(t===!1||t===null||t===void 0||typeof t=="number"&&Number.isNaN(t)||!t&&n.boolean)return;Array.isArray(t)&&(t=n.commaSeparated?Bw(t):Hw(t));let r={name:n.attribute,value:t===!0?"":String(t)};if(n.space&&n.space!=="html"&&n.space!=="svg"){let o=r.name.indexOf(":");o<0?r.prefix="":(r.name=r.name.slice(o+1),r.prefix=n.attribute.slice(0,o)),r.namespace=vo[n.space]}return r}function O6(i,e,t){let n=-1,r=[];if(i)for(;++n<i.length;){let o=MW(i[n],t);o.parentNode=e,r.push(o)}return r}function Qf(i,e){let t=i.position;t&&t.start&&t.end&&(t.start.offset,t.end.offset,e.sourceCodeLocation={startLine:t.start.line,startCol:t.start.column,startOffset:t.start.offset,endLine:t.end.line,endCol:t.end.column,endOffset:t.end.offset})}var jw=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var jue=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Yi="\uFFFD",z;(function(i){i[i.EOF=-1]="EOF",i[i.NULL=0]="NULL",i[i.TABULATION=9]="TABULATION",i[i.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",i[i.LINE_FEED=10]="LINE_FEED",i[i.FORM_FEED=12]="FORM_FEED",i[i.SPACE=32]="SPACE",i[i.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",i[i.QUOTATION_MARK=34]="QUOTATION_MARK",i[i.NUMBER_SIGN=35]="NUMBER_SIGN",i[i.AMPERSAND=38]="AMPERSAND",i[i.APOSTROPHE=39]="APOSTROPHE",i[i.HYPHEN_MINUS=45]="HYPHEN_MINUS",i[i.SOLIDUS=47]="SOLIDUS",i[i.DIGIT_0=48]="DIGIT_0",i[i.DIGIT_9=57]="DIGIT_9",i[i.SEMICOLON=59]="SEMICOLON",i[i.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",i[i.EQUALS_SIGN=61]="EQUALS_SIGN",i[i.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",i[i.QUESTION_MARK=63]="QUESTION_MARK",i[i.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",i[i.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",i[i.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",i[i.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",i[i.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",i[i.GRAVE_ACCENT=96]="GRAVE_ACCENT",i[i.LATIN_SMALL_A=97]="LATIN_SMALL_A",i[i.LATIN_SMALL_F=102]="LATIN_SMALL_F",i[i.LATIN_SMALL_X=120]="LATIN_SMALL_X",i[i.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",i[i.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(z=z||(z={}));var to={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ww(i){return i>=55296&&i<=57343}function NW(i){return i>=56320&&i<=57343}function RW(i,e){return(i-55296)*1024+9216+e}function Vw(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159}function qw(i){return i>=64976&&i<=65007||jue.has(i)}var he;(function(i){i.controlCharacterInInputStream="control-character-in-input-stream",i.noncharacterInInputStream="noncharacter-in-input-stream",i.surrogateInInputStream="surrogate-in-input-stream",i.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",i.endTagWithAttributes="end-tag-with-attributes",i.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",i.unexpectedSolidusInTag="unexpected-solidus-in-tag",i.unexpectedNullCharacter="unexpected-null-character",i.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",i.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",i.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",i.missingEndTagName="missing-end-tag-name",i.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",i.unknownNamedCharacterReference="unknown-named-character-reference",i.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",i.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",i.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",i.eofBeforeTagName="eof-before-tag-name",i.eofInTag="eof-in-tag",i.missingAttributeValue="missing-attribute-value",i.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",i.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",i.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",i.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",i.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",i.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",i.missingDoctypePublicIdentifier="missing-doctype-public-identifier",i.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",i.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",i.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",i.cdataInHtmlContent="cdata-in-html-content",i.incorrectlyOpenedComment="incorrectly-opened-comment",i.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",i.eofInDoctype="eof-in-doctype",i.nestedComment="nested-comment",i.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",i.eofInComment="eof-in-comment",i.incorrectlyClosedComment="incorrectly-closed-comment",i.eofInCdata="eof-in-cdata",i.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",i.nullCharacterReference="null-character-reference",i.surrogateCharacterReference="surrogate-character-reference",i.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",i.controlCharacterReference="control-character-reference",i.noncharacterCharacterReference="noncharacter-character-reference",i.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",i.missingDoctypeName="missing-doctype-name",i.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",i.duplicateAttribute="duplicate-attribute",i.nonConformingDoctype="non-conforming-doctype",i.missingDoctype="missing-doctype",i.misplacedDoctype="misplaced-doctype",i.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",i.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",i.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",i.openElementsLeftAfterEof="open-elements-left-after-eof",i.abandonedHeadElementChild="abandoned-head-element-child",i.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",i.nestedNoscriptInHead="nested-noscript-in-head",i.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(he=he||(he={}));var Vue=65536,Kw=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Vue,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){let{line:t,col:n,offset:r}=this;return{code:e,startLine:t,endLine:t,startCol:n,endCol:n,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(NW(t))return this.pos++,this._addGap(),RW(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,z.EOF;return this._err(he.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==e.charCodeAt(n))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,z.EOF;let n=this.html.charCodeAt(t);return n===z.CARRIAGE_RETURN?z.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,z.EOF;let e=this.html.charCodeAt(this.pos);return e===z.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,z.LINE_FEED):e===z.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ww(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===z.LINE_FEED||e===z.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Vw(e)?this._err(he.controlCharacterInInputStream):qw(e)&&this._err(he.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}};var $l={};Xh($l,{TokenType:()=>oi,getTokenAttr:()=>a0});var oi;(function(i){i[i.CHARACTER=0]="CHARACTER",i[i.NULL_CHARACTER=1]="NULL_CHARACTER",i[i.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",i[i.START_TAG=3]="START_TAG",i[i.END_TAG=4]="END_TAG",i[i.COMMENT=5]="COMMENT",i[i.DOCTYPE=6]="DOCTYPE",i[i.EOF=7]="EOF",i[i.HIBERNATION=8]="HIBERNATION"})(oi=oi||(oi={}));function a0(i,e){for(let t=i.attrs.length-1;t>=0;t--)if(i.attrs[t].name===e)return i.attrs[t].value;return null}var Ba=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(i=>i.charCodeAt(0)));var PW=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(i=>i.charCodeAt(0)));var F6,que=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),z6=(F6=String.fromCodePoint)!==null&&F6!==void 0?F6:function(i){let e="";return i>65535&&(i-=65536,e+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),e+=String.fromCharCode(i),e};function B6(i){var e;return i>=55296&&i<=57343||i>1114111?65533:(e=que.get(i))!==null&&e!==void 0?e:i}var ar;(function(i){i[i.NUM=35]="NUM",i[i.SEMI=59]="SEMI",i[i.EQUALS=61]="EQUALS",i[i.ZERO=48]="ZERO",i[i.NINE=57]="NINE",i[i.LOWER_A=97]="LOWER_A",i[i.LOWER_F=102]="LOWER_F",i[i.LOWER_X=120]="LOWER_X",i[i.LOWER_Z=122]="LOWER_Z",i[i.UPPER_A=65]="UPPER_A",i[i.UPPER_F=70]="UPPER_F",i[i.UPPER_Z=90]="UPPER_Z"})(ar||(ar={}));var Kue=32,Hs;(function(i){i[i.VALUE_LENGTH=49152]="VALUE_LENGTH",i[i.BRANCH_LENGTH=16256]="BRANCH_LENGTH",i[i.JUMP_TABLE=127]="JUMP_TABLE"})(Hs||(Hs={}));function H6(i){return i>=ar.ZERO&&i<=ar.NINE}function $ue(i){return i>=ar.UPPER_A&&i<=ar.UPPER_F||i>=ar.LOWER_A&&i<=ar.LOWER_F}function Gue(i){return i>=ar.UPPER_A&&i<=ar.UPPER_Z||i>=ar.LOWER_A&&i<=ar.LOWER_Z||H6(i)}function Yue(i){return i===ar.EQUALS||Gue(i)}var sr;(function(i){i[i.EntityStart=0]="EntityStart",i[i.NumericStart=1]="NumericStart",i[i.NumericDecimal=2]="NumericDecimal",i[i.NumericHex=3]="NumericHex",i[i.NamedEntity=4]="NamedEntity"})(sr||(sr={}));var Uu;(function(i){i[i.Legacy=0]="Legacy",i[i.Strict=1]="Strict",i[i.Attribute=2]="Attribute"})(Uu||(Uu={}));var U6=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=sr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Uu.Strict}startEntity(e){this.decodeMode=e,this.state=sr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case sr.EntityStart:return e.charCodeAt(t)===ar.NUM?(this.state=sr.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=sr.NamedEntity,this.stateNamedEntity(e,t));case sr.NumericStart:return this.stateNumericStart(e,t);case sr.NumericDecimal:return this.stateNumericDecimal(e,t);case sr.NumericHex:return this.stateNumericHex(e,t);case sr.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Kue)===ar.LOWER_X?(this.state=sr.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=sr.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let o=n-t;this.result=this.result*Math.pow(r,o)+parseInt(e.substr(t,o),r),this.consumed+=o}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(H6(r)||$ue(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(H6(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===ar.SEMI)this.consumed+=1;else if(this.decodeMode===Uu.Strict)return 0;return this.emitCodePoint(B6(this.result),this.consumed),this.errors&&(e!==ar.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],o=(r&Hs.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let s=e.charCodeAt(t);if(this.treeIndex=j6(n,r,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===Uu.Attribute&&(o===0||Yue(s))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],o=(r&Hs.VALUE_LENGTH)>>14,o!==0){if(s===ar.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Uu.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Hs.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Hs.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case sr.NamedEntity:return this.result!==0&&(this.decodeMode!==Uu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case sr.NumericDecimal:return this.emitNumericEntity(0,2);case sr.NumericHex:return this.emitNumericEntity(0,3);case sr.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case sr.EntityStart:return 0}}};function OW(i){let e="",t=new U6(i,n=>e+=z6(n));return function(r,o){let s=0,a=0;for(;(a=r.indexOf("&",a))>=0;){e+=r.slice(s,a),t.startEntity(o);let c=t.write(r,a+1);if(c<0){s=a+t.end();break}s=a+c,a=c===0?s+1:s}let l=e+r.slice(s);return e="",l}}function j6(i,e,t,n){let r=(e&Hs.BRANCH_LENGTH)>>7,o=e&Hs.JUMP_TABLE;if(r===0)return o!==0&&n===o?t:-1;if(o){let l=n-o;return l<0||l>=r?-1:i[t+l]-1}let s=t,a=s+r-1;for(;s<=a;){let l=s+a>>>1,c=i[l];if(c<n)s=l+1;else if(c>n)a=l-1;else return i[l+r]}return-1}var zDe=OW(Ba),BDe=OW(PW);var Zf={};Xh(Zf,{ATTRS:()=>Us,DOCUMENT_MODE:()=>br,NS:()=>_e,SPECIAL_ELEMENTS:()=>W6,TAG_ID:()=>v,TAG_NAMES:()=>ne,getTagID:()=>_d,hasUnescapedText:()=>FW,isNumberedHeader:()=>l0});var _e;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.MATHML="http://www.w3.org/1998/Math/MathML",i.SVG="http://www.w3.org/2000/svg",i.XLINK="http://www.w3.org/1999/xlink",i.XML="http://www.w3.org/XML/1998/namespace",i.XMLNS="http://www.w3.org/2000/xmlns/"})(_e=_e||(_e={}));var Us;(function(i){i.TYPE="type",i.ACTION="action",i.ENCODING="encoding",i.PROMPT="prompt",i.NAME="name",i.COLOR="color",i.FACE="face",i.SIZE="size"})(Us=Us||(Us={}));var br;(function(i){i.NO_QUIRKS="no-quirks",i.QUIRKS="quirks",i.LIMITED_QUIRKS="limited-quirks"})(br=br||(br={}));var ne;(function(i){i.A="a",i.ADDRESS="address",i.ANNOTATION_XML="annotation-xml",i.APPLET="applet",i.AREA="area",i.ARTICLE="article",i.ASIDE="aside",i.B="b",i.BASE="base",i.BASEFONT="basefont",i.BGSOUND="bgsound",i.BIG="big",i.BLOCKQUOTE="blockquote",i.BODY="body",i.BR="br",i.BUTTON="button",i.CAPTION="caption",i.CENTER="center",i.CODE="code",i.COL="col",i.COLGROUP="colgroup",i.DD="dd",i.DESC="desc",i.DETAILS="details",i.DIALOG="dialog",i.DIR="dir",i.DIV="div",i.DL="dl",i.DT="dt",i.EM="em",i.EMBED="embed",i.FIELDSET="fieldset",i.FIGCAPTION="figcaption",i.FIGURE="figure",i.FONT="font",i.FOOTER="footer",i.FOREIGN_OBJECT="foreignObject",i.FORM="form",i.FRAME="frame",i.FRAMESET="frameset",i.H1="h1",i.H2="h2",i.H3="h3",i.H4="h4",i.H5="h5",i.H6="h6",i.HEAD="head",i.HEADER="header",i.HGROUP="hgroup",i.HR="hr",i.HTML="html",i.I="i",i.IMG="img",i.IMAGE="image",i.INPUT="input",i.IFRAME="iframe",i.KEYGEN="keygen",i.LABEL="label",i.LI="li",i.LINK="link",i.LISTING="listing",i.MAIN="main",i.MALIGNMARK="malignmark",i.MARQUEE="marquee",i.MATH="math",i.MENU="menu",i.META="meta",i.MGLYPH="mglyph",i.MI="mi",i.MO="mo",i.MN="mn",i.MS="ms",i.MTEXT="mtext",i.NAV="nav",i.NOBR="nobr",i.NOFRAMES="noframes",i.NOEMBED="noembed",i.NOSCRIPT="noscript",i.OBJECT="object",i.OL="ol",i.OPTGROUP="optgroup",i.OPTION="option",i.P="p",i.PARAM="param",i.PLAINTEXT="plaintext",i.PRE="pre",i.RB="rb",i.RP="rp",i.RT="rt",i.RTC="rtc",i.RUBY="ruby",i.S="s",i.SCRIPT="script",i.SECTION="section",i.SELECT="select",i.SOURCE="source",i.SMALL="small",i.SPAN="span",i.STRIKE="strike",i.STRONG="strong",i.STYLE="style",i.SUB="sub",i.SUMMARY="summary",i.SUP="sup",i.TABLE="table",i.TBODY="tbody",i.TEMPLATE="template",i.TEXTAREA="textarea",i.TFOOT="tfoot",i.TD="td",i.TH="th",i.THEAD="thead",i.TITLE="title",i.TR="tr",i.TRACK="track",i.TT="tt",i.U="u",i.UL="ul",i.SVG="svg",i.VAR="var",i.WBR="wbr",i.XMP="xmp"})(ne=ne||(ne={}));var v;(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.A=1]="A",i[i.ADDRESS=2]="ADDRESS",i[i.ANNOTATION_XML=3]="ANNOTATION_XML",i[i.APPLET=4]="APPLET",i[i.AREA=5]="AREA",i[i.ARTICLE=6]="ARTICLE",i[i.ASIDE=7]="ASIDE",i[i.B=8]="B",i[i.BASE=9]="BASE",i[i.BASEFONT=10]="BASEFONT",i[i.BGSOUND=11]="BGSOUND",i[i.BIG=12]="BIG",i[i.BLOCKQUOTE=13]="BLOCKQUOTE",i[i.BODY=14]="BODY",i[i.BR=15]="BR",i[i.BUTTON=16]="BUTTON",i[i.CAPTION=17]="CAPTION",i[i.CENTER=18]="CENTER",i[i.CODE=19]="CODE",i[i.COL=20]="COL",i[i.COLGROUP=21]="COLGROUP",i[i.DD=22]="DD",i[i.DESC=23]="DESC",i[i.DETAILS=24]="DETAILS",i[i.DIALOG=25]="DIALOG",i[i.DIR=26]="DIR",i[i.DIV=27]="DIV",i[i.DL=28]="DL",i[i.DT=29]="DT",i[i.EM=30]="EM",i[i.EMBED=31]="EMBED",i[i.FIELDSET=32]="FIELDSET",i[i.FIGCAPTION=33]="FIGCAPTION",i[i.FIGURE=34]="FIGURE",i[i.FONT=35]="FONT",i[i.FOOTER=36]="FOOTER",i[i.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",i[i.FORM=38]="FORM",i[i.FRAME=39]="FRAME",i[i.FRAMESET=40]="FRAMESET",i[i.H1=41]="H1",i[i.H2=42]="H2",i[i.H3=43]="H3",i[i.H4=44]="H4",i[i.H5=45]="H5",i[i.H6=46]="H6",i[i.HEAD=47]="HEAD",i[i.HEADER=48]="HEADER",i[i.HGROUP=49]="HGROUP",i[i.HR=50]="HR",i[i.HTML=51]="HTML",i[i.I=52]="I",i[i.IMG=53]="IMG",i[i.IMAGE=54]="IMAGE",i[i.INPUT=55]="INPUT",i[i.IFRAME=56]="IFRAME",i[i.KEYGEN=57]="KEYGEN",i[i.LABEL=58]="LABEL",i[i.LI=59]="LI",i[i.LINK=60]="LINK",i[i.LISTING=61]="LISTING",i[i.MAIN=62]="MAIN",i[i.MALIGNMARK=63]="MALIGNMARK",i[i.MARQUEE=64]="MARQUEE",i[i.MATH=65]="MATH",i[i.MENU=66]="MENU",i[i.META=67]="META",i[i.MGLYPH=68]="MGLYPH",i[i.MI=69]="MI",i[i.MO=70]="MO",i[i.MN=71]="MN",i[i.MS=72]="MS",i[i.MTEXT=73]="MTEXT",i[i.NAV=74]="NAV",i[i.NOBR=75]="NOBR",i[i.NOFRAMES=76]="NOFRAMES",i[i.NOEMBED=77]="NOEMBED",i[i.NOSCRIPT=78]="NOSCRIPT",i[i.OBJECT=79]="OBJECT",i[i.OL=80]="OL",i[i.OPTGROUP=81]="OPTGROUP",i[i.OPTION=82]="OPTION",i[i.P=83]="P",i[i.PARAM=84]="PARAM",i[i.PLAINTEXT=85]="PLAINTEXT",i[i.PRE=86]="PRE",i[i.RB=87]="RB",i[i.RP=88]="RP",i[i.RT=89]="RT",i[i.RTC=90]="RTC",i[i.RUBY=91]="RUBY",i[i.S=92]="S",i[i.SCRIPT=93]="SCRIPT",i[i.SECTION=94]="SECTION",i[i.SELECT=95]="SELECT",i[i.SOURCE=96]="SOURCE",i[i.SMALL=97]="SMALL",i[i.SPAN=98]="SPAN",i[i.STRIKE=99]="STRIKE",i[i.STRONG=100]="STRONG",i[i.STYLE=101]="STYLE",i[i.SUB=102]="SUB",i[i.SUMMARY=103]="SUMMARY",i[i.SUP=104]="SUP",i[i.TABLE=105]="TABLE",i[i.TBODY=106]="TBODY",i[i.TEMPLATE=107]="TEMPLATE",i[i.TEXTAREA=108]="TEXTAREA",i[i.TFOOT=109]="TFOOT",i[i.TD=110]="TD",i[i.TH=111]="TH",i[i.THEAD=112]="THEAD",i[i.TITLE=113]="TITLE",i[i.TR=114]="TR",i[i.TRACK=115]="TRACK",i[i.TT=116]="TT",i[i.U=117]="U",i[i.UL=118]="UL",i[i.SVG=119]="SVG",i[i.VAR=120]="VAR",i[i.WBR=121]="WBR",i[i.XMP=122]="XMP"})(v=v||(v={}));var Xue=new Map([[ne.A,v.A],[ne.ADDRESS,v.ADDRESS],[ne.ANNOTATION_XML,v.ANNOTATION_XML],[ne.APPLET,v.APPLET],[ne.AREA,v.AREA],[ne.ARTICLE,v.ARTICLE],[ne.ASIDE,v.ASIDE],[ne.B,v.B],[ne.BASE,v.BASE],[ne.BASEFONT,v.BASEFONT],[ne.BGSOUND,v.BGSOUND],[ne.BIG,v.BIG],[ne.BLOCKQUOTE,v.BLOCKQUOTE],[ne.BODY,v.BODY],[ne.BR,v.BR],[ne.BUTTON,v.BUTTON],[ne.CAPTION,v.CAPTION],[ne.CENTER,v.CENTER],[ne.CODE,v.CODE],[ne.COL,v.COL],[ne.COLGROUP,v.COLGROUP],[ne.DD,v.DD],[ne.DESC,v.DESC],[ne.DETAILS,v.DETAILS],[ne.DIALOG,v.DIALOG],[ne.DIR,v.DIR],[ne.DIV,v.DIV],[ne.DL,v.DL],[ne.DT,v.DT],[ne.EM,v.EM],[ne.EMBED,v.EMBED],[ne.FIELDSET,v.FIELDSET],[ne.FIGCAPTION,v.FIGCAPTION],[ne.FIGURE,v.FIGURE],[ne.FONT,v.FONT],[ne.FOOTER,v.FOOTER],[ne.FOREIGN_OBJECT,v.FOREIGN_OBJECT],[ne.FORM,v.FORM],[ne.FRAME,v.FRAME],[ne.FRAMESET,v.FRAMESET],[ne.H1,v.H1],[ne.H2,v.H2],[ne.H3,v.H3],[ne.H4,v.H4],[ne.H5,v.H5],[ne.H6,v.H6],[ne.HEAD,v.HEAD],[ne.HEADER,v.HEADER],[ne.HGROUP,v.HGROUP],[ne.HR,v.HR],[ne.HTML,v.HTML],[ne.I,v.I],[ne.IMG,v.IMG],[ne.IMAGE,v.IMAGE],[ne.INPUT,v.INPUT],[ne.IFRAME,v.IFRAME],[ne.KEYGEN,v.KEYGEN],[ne.LABEL,v.LABEL],[ne.LI,v.LI],[ne.LINK,v.LINK],[ne.LISTING,v.LISTING],[ne.MAIN,v.MAIN],[ne.MALIGNMARK,v.MALIGNMARK],[ne.MARQUEE,v.MARQUEE],[ne.MATH,v.MATH],[ne.MENU,v.MENU],[ne.META,v.META],[ne.MGLYPH,v.MGLYPH],[ne.MI,v.MI],[ne.MO,v.MO],[ne.MN,v.MN],[ne.MS,v.MS],[ne.MTEXT,v.MTEXT],[ne.NAV,v.NAV],[ne.NOBR,v.NOBR],[ne.NOFRAMES,v.NOFRAMES],[ne.NOEMBED,v.NOEMBED],[ne.NOSCRIPT,v.NOSCRIPT],[ne.OBJECT,v.OBJECT],[ne.OL,v.OL],[ne.OPTGROUP,v.OPTGROUP],[ne.OPTION,v.OPTION],[ne.P,v.P],[ne.PARAM,v.PARAM],[ne.PLAINTEXT,v.PLAINTEXT],[ne.PRE,v.PRE],[ne.RB,v.RB],[ne.RP,v.RP],[ne.RT,v.RT],[ne.RTC,v.RTC],[ne.RUBY,v.RUBY],[ne.S,v.S],[ne.SCRIPT,v.SCRIPT],[ne.SECTION,v.SECTION],[ne.SELECT,v.SELECT],[ne.SOURCE,v.SOURCE],[ne.SMALL,v.SMALL],[ne.SPAN,v.SPAN],[ne.STRIKE,v.STRIKE],[ne.STRONG,v.STRONG],[ne.STYLE,v.STYLE],[ne.SUB,v.SUB],[ne.SUMMARY,v.SUMMARY],[ne.SUP,v.SUP],[ne.TABLE,v.TABLE],[ne.TBODY,v.TBODY],[ne.TEMPLATE,v.TEMPLATE],[ne.TEXTAREA,v.TEXTAREA],[ne.TFOOT,v.TFOOT],[ne.TD,v.TD],[ne.TH,v.TH],[ne.THEAD,v.THEAD],[ne.TITLE,v.TITLE],[ne.TR,v.TR],[ne.TRACK,v.TRACK],[ne.TT,v.TT],[ne.U,v.U],[ne.UL,v.UL],[ne.SVG,v.SVG],[ne.VAR,v.VAR],[ne.WBR,v.WBR],[ne.XMP,v.XMP]]);function _d(i){var e;return(e=Xue.get(i))!==null&&e!==void 0?e:v.UNKNOWN}var Re=v,W6={[_e.HTML]:new Set([Re.ADDRESS,Re.APPLET,Re.AREA,Re.ARTICLE,Re.ASIDE,Re.BASE,Re.BASEFONT,Re.BGSOUND,Re.BLOCKQUOTE,Re.BODY,Re.BR,Re.BUTTON,Re.CAPTION,Re.CENTER,Re.COL,Re.COLGROUP,Re.DD,Re.DETAILS,Re.DIR,Re.DIV,Re.DL,Re.DT,Re.EMBED,Re.FIELDSET,Re.FIGCAPTION,Re.FIGURE,Re.FOOTER,Re.FORM,Re.FRAME,Re.FRAMESET,Re.H1,Re.H2,Re.H3,Re.H4,Re.H5,Re.H6,Re.HEAD,Re.HEADER,Re.HGROUP,Re.HR,Re.HTML,Re.IFRAME,Re.IMG,Re.INPUT,Re.LI,Re.LINK,Re.LISTING,Re.MAIN,Re.MARQUEE,Re.MENU,Re.META,Re.NAV,Re.NOEMBED,Re.NOFRAMES,Re.NOSCRIPT,Re.OBJECT,Re.OL,Re.P,Re.PARAM,Re.PLAINTEXT,Re.PRE,Re.SCRIPT,Re.SECTION,Re.SELECT,Re.SOURCE,Re.STYLE,Re.SUMMARY,Re.TABLE,Re.TBODY,Re.TD,Re.TEMPLATE,Re.TEXTAREA,Re.TFOOT,Re.TH,Re.THEAD,Re.TITLE,Re.TR,Re.TRACK,Re.UL,Re.WBR,Re.XMP]),[_e.MATHML]:new Set([Re.MI,Re.MO,Re.MN,Re.MS,Re.MTEXT,Re.ANNOTATION_XML]),[_e.SVG]:new Set([Re.TITLE,Re.FOREIGN_OBJECT,Re.DESC]),[_e.XLINK]:new Set,[_e.XML]:new Set,[_e.XMLNS]:new Set};function l0(i){return i===Re.H1||i===Re.H2||i===Re.H3||i===Re.H4||i===Re.H5||i===Re.H6}var Que=new Set([ne.STYLE,ne.SCRIPT,ne.XMP,ne.IFRAME,ne.NOEMBED,ne.NOFRAMES,ne.PLAINTEXT]);function FW(i,e){return Que.has(i)||e&&i===ne.NOSCRIPT}var Zue=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),j;(function(i){i[i.DATA=0]="DATA",i[i.RCDATA=1]="RCDATA",i[i.RAWTEXT=2]="RAWTEXT",i[i.SCRIPT_DATA=3]="SCRIPT_DATA",i[i.PLAINTEXT=4]="PLAINTEXT",i[i.TAG_OPEN=5]="TAG_OPEN",i[i.END_TAG_OPEN=6]="END_TAG_OPEN",i[i.TAG_NAME=7]="TAG_NAME",i[i.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",i[i.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",i[i.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",i[i.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",i[i.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",i[i.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",i[i.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",i[i.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",i[i.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",i[i.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",i[i.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",i[i.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",i[i.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",i[i.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",i[i.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",i[i.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",i[i.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",i[i.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",i[i.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",i[i.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",i[i.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",i[i.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",i[i.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",i[i.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",i[i.BOGUS_COMMENT=40]="BOGUS_COMMENT",i[i.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",i[i.COMMENT_START=42]="COMMENT_START",i[i.COMMENT_START_DASH=43]="COMMENT_START_DASH",i[i.COMMENT=44]="COMMENT",i[i.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",i[i.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",i[i.COMMENT_END_DASH=49]="COMMENT_END_DASH",i[i.COMMENT_END=50]="COMMENT_END",i[i.COMMENT_END_BANG=51]="COMMENT_END_BANG",i[i.DOCTYPE=52]="DOCTYPE",i[i.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",i[i.DOCTYPE_NAME=54]="DOCTYPE_NAME",i[i.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",i[i.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",i[i.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",i[i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",i[i.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",i[i.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",i[i.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",i[i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",i[i.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",i[i.CDATA_SECTION=68]="CDATA_SECTION",i[i.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",i[i.CDATA_SECTION_END=70]="CDATA_SECTION_END",i[i.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",i[i.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",i[i.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",i[i.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",i[i.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",i[i.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",i[i.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",i[i.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(j||(j={}));var rn={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function d0(i){return i>=z.DIGIT_0&&i<=z.DIGIT_9}function c0(i){return i>=z.LATIN_CAPITAL_A&&i<=z.LATIN_CAPITAL_Z}function Jue(i){return i>=z.LATIN_SMALL_A&&i<=z.LATIN_SMALL_Z}function yd(i){return Jue(i)||c0(i)}function V6(i){return yd(i)||d0(i)}function BW(i){return i>=z.LATIN_CAPITAL_A&&i<=z.LATIN_CAPITAL_F}function HW(i){return i>=z.LATIN_SMALL_A&&i<=z.LATIN_SMALL_F}function ehe(i){return d0(i)||BW(i)||HW(i)}function $w(i){return i+32}function UW(i){return i===z.SPACE||i===z.LINE_FEED||i===z.TABULATION||i===z.FORM_FEED}function the(i){return i===z.EQUALS_SIGN||V6(i)}function zW(i){return UW(i)||i===z.SOLIDUS||i===z.GREATER_THAN_SIGN}var u0=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=j.DATA,this.returnState=j.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Kw(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,n;(n=(t=this.handler).onParseError)===null||n===void 0||n.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n==null||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:oi.START_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:oi.END_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:oi.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:oi.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;let n=this.currentToken;if(a0(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){let r=(e=(t=n.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);r[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(he.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=_d(e.tagName),e.type===oi.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(he.endTagWithAttributes),e.selfClosing&&this._err(he.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case oi.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case oi.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case oi.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:oi.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=t;return}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=UW(e)?oi.WHITESPACE_CHARACTER:e===z.NULL?oi.NULL_CHARACTER:oi.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(oi.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,n=0,r=!1;for(let o=0,s=Ba[0];o>=0&&(o=j6(Ba,s,o+1,e),!(o<0));e=this._consume()){n+=1,s=Ba[o];let a=s&Hs.VALUE_LENGTH;if(a){let l=(a>>14)-1;if(e!==z.SEMICOLON&&this._isCharacterReferenceInAttribute()&&the(this.preprocessor.peek(1))?(t=[z.AMPERSAND],o+=l):(t=l===0?[Ba[o]&~Hs.VALUE_LENGTH]:l===1?[Ba[++o]]:[Ba[++o],Ba[++o]],n=0,r=e!==z.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(n),r&&!this.preprocessor.endOfChunkHit&&this._err(he.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case j.DATA:{this._stateData(e);break}case j.RCDATA:{this._stateRcdata(e);break}case j.RAWTEXT:{this._stateRawtext(e);break}case j.SCRIPT_DATA:{this._stateScriptData(e);break}case j.PLAINTEXT:{this._statePlaintext(e);break}case j.TAG_OPEN:{this._stateTagOpen(e);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case j.TAG_NAME:{this._stateTagName(e);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case j.BOGUS_COMMENT:{this._stateBogusComment(e);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case j.COMMENT_START:{this._stateCommentStart(e);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case j.COMMENT:{this._stateComment(e);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case j.COMMENT_END:{this._stateCommentEnd(e);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case j.DOCTYPE:{this._stateDoctype(e);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case j.CDATA_SECTION:{this._stateCdataSection(e);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference(e);break}case j.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(e);break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}case j.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(e);break}case j.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(e);break}case j.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(e);break}case j.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(e);break}case j.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case z.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case z.AMPERSAND:{this.returnState=j.DATA,this.state=j.CHARACTER_REFERENCE;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitCodePoint(e);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case z.AMPERSAND:{this.returnState=j.RCDATA,this.state=j.CHARACTER_REFERENCE;break}case z.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Yi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case z.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Yi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Yi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Yi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(yd(e))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(e);else switch(e){case z.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case z.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case z.QUESTION_MARK:{this._err(he.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(e);break}case z.EOF:{this._err(he.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(he.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(yd(e))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(e);else switch(e){case z.GREATER_THAN_SIGN:{this._err(he.missingEndTagName),this.state=j.DATA;break}case z.EOF:{this._err(he.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(he.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case z.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.tagName+=Yi;break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:t.tagName+=String.fromCodePoint(c0(e)?$w(e):e)}}_stateRcdataLessThanSign(e){e===z.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){yd(e)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case z.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case z.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===z.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){yd(e)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case z.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case z.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){yd(e)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===z.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===z.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Yi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Yi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case z.HYPHEN_MINUS:{this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Yi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===z.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:yd(e)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){yd(e)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(to.SCRIPT,!1)&&zW(this.preprocessor.peek(to.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<to.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Yi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Yi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case z.HYPHEN_MINUS:{this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Yi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===z.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(to.SCRIPT,!1)&&zW(this.preprocessor.peek(to.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<to.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.SOLIDUS:case z.GREATER_THAN_SIGN:case z.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case z.EQUALS_SIGN:{this._err(he.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:case z.SOLIDUS:case z.GREATER_THAN_SIGN:case z.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case z.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case z.QUOTATION_MARK:case z.APOSTROPHE:case z.LESS_THAN_SIGN:{this._err(he.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.name+=Yi;break}default:this.currentAttr.name+=String.fromCodePoint(c0(e)?$w(e):e)}}_stateAfterAttributeName(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case z.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case z.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case z.AMPERSAND:{this.returnState=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=j.CHARACTER_REFERENCE;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.value+=Yi;break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case z.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case z.AMPERSAND:{this.returnState=j.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=j.CHARACTER_REFERENCE;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.value+=Yi;break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case z.AMPERSAND:{this.returnState=j.ATTRIBUTE_VALUE_UNQUOTED,this.state=j.CHARACTER_REFERENCE;break}case z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.value+=Yi;break}case z.QUOTATION_MARK:case z.APOSTROPHE:case z.LESS_THAN_SIGN:case z.EQUALS_SIGN:case z.GRAVE_ACCENT:{this._err(he.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case z.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this._err(he.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case z.GREATER_THAN_SIGN:{let t=this.currentToken;t.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this._err(he.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(t);break}case z.EOF:{this.emitCurrentComment(t),this._emitEOFToken();break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.data+=Yi;break}default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(to.DASH_DASH,!0)?(this._createCommentToken(to.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(to.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(to.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(to.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(he.cdataInHtmlContent),this._createCommentToken(to.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(he.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptClosingOfEmptyComment),this.state=j.DATA;let t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=j.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(t);break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="-",this.state=j.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case z.LESS_THAN_SIGN:{t.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.data+=Yi;break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case z.EXCLAMATION_MARK:{t.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case z.LESS_THAN_SIGN:{t.data+="<";break}default:this.state=j.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===z.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===z.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==z.GREATER_THAN_SIGN&&e!==z.EOF&&this._err(he.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="-",this.state=j.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(t);break}case z.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case z.HYPHEN_MINUS:{t.data+="-";break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="--",this.state=j.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{t.data+="--!",this.state=j.COMMENT_END_DASH;break}case z.GREATER_THAN_SIGN:{this._err(he.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(t);break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="--!",this.state=j.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break}case z.EOF:{this._err(he.eofInDoctype),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(c0(e))this._createDoctypeToken(String.fromCharCode($w(e))),this.state=j.DOCTYPE_NAME;else switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.NULL:{this._err(he.unexpectedNullCharacter),this._createDoctypeToken(Yi),this.state=j.DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypeName),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=j.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.name+=Yi;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.name+=String.fromCodePoint(c0(e)?$w(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(to.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(to.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(he.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.QUOTATION_MARK:{this._err(he.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(he.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case z.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.publicId+=Yi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case z.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.publicId+=Yi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.QUOTATION_MARK:{this._err(he.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(he.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.QUOTATION_MARK:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.QUOTATION_MARK:{this._err(he.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(he.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case z.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.systemId+=Yi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case z.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.systemId+=Yi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.NULL:{this._err(he.unexpectedNullCharacter);break}case z.EOF:{this.emitCurrentDoctype(t),this._emitEOFToken();break}default:}}_stateCdataSection(e){switch(e){case z.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case z.EOF:{this._err(he.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===z.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case z.GREATER_THAN_SIGN:{this.state=j.DATA;break}case z.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===z.NUMBER_SIGN?this.state=j.NUMERIC_CHARACTER_REFERENCE:V6(e)?(this.state=j.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){let t=this._matchNamedCharacterReference(e);if(!this._ensureHibernation())if(t){for(let n=0;n<t.length;n++)this._flushCodePointConsumedAsCharacterReference(t[n]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this.state=j.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(e){V6(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===z.SEMICOLON&&this._err(he.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,e))}_stateNumericCharacterReference(e){this.charRefCode=0,e===z.LATIN_SMALL_X||e===z.LATIN_CAPITAL_X?this.state=j.HEXADEMICAL_CHARACTER_REFERENCE_START:d0(e)?(this.state=j.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(e)):(this._err(he.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(z.NUMBER_SIGN),this._reconsumeInState(this.returnState,e))}_stateHexademicalCharacterReferenceStart(e){ehe(e)?(this.state=j.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(e)):(this._err(he.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(z.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState)}_stateHexademicalCharacterReference(e){BW(e)?this.charRefCode=this.charRefCode*16+e-55:HW(e)?this.charRefCode=this.charRefCode*16+e-87:d0(e)?this.charRefCode=this.charRefCode*16+e-48:e===z.SEMICOLON?this.state=j.NUMERIC_CHARACTER_REFERENCE_END:(this._err(he.missingSemicolonAfterCharacterReference),this.state=j.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateDecimalCharacterReference(e){d0(e)?this.charRefCode=this.charRefCode*10+e-48:e===z.SEMICOLON?this.state=j.NUMERIC_CHARACTER_REFERENCE_END:(this._err(he.missingSemicolonAfterCharacterReference),this.state=j.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateNumericCharacterReferenceEnd(e){if(this.charRefCode===z.NULL)this._err(he.nullCharacterReference),this.charRefCode=z.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(he.characterReferenceOutsideUnicodeRange),this.charRefCode=z.REPLACEMENT_CHARACTER;else if(Ww(this.charRefCode))this._err(he.surrogateCharacterReference),this.charRefCode=z.REPLACEMENT_CHARACTER;else if(qw(this.charRefCode))this._err(he.noncharacterCharacterReference);else if(Vw(this.charRefCode)||this.charRefCode===z.CARRIAGE_RETURN){this._err(he.controlCharacterReference);let t=Zue.get(this.charRefCode);t!==void 0&&(this.charRefCode=t)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}};var WW=new Set([v.DD,v.DT,v.LI,v.OPTGROUP,v.OPTION,v.P,v.RB,v.RP,v.RT,v.RTC]),jW=new Set([...WW,v.CAPTION,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]),Gw=new Map([[v.APPLET,_e.HTML],[v.CAPTION,_e.HTML],[v.HTML,_e.HTML],[v.MARQUEE,_e.HTML],[v.OBJECT,_e.HTML],[v.TABLE,_e.HTML],[v.TD,_e.HTML],[v.TEMPLATE,_e.HTML],[v.TH,_e.HTML],[v.ANNOTATION_XML,_e.MATHML],[v.MI,_e.MATHML],[v.MN,_e.MATHML],[v.MO,_e.MATHML],[v.MS,_e.MATHML],[v.MTEXT,_e.MATHML],[v.DESC,_e.SVG],[v.FOREIGN_OBJECT,_e.SVG],[v.TITLE,_e.SVG]]),ihe=[v.H1,v.H2,v.H3,v.H4,v.H5,v.H6],nhe=[v.TR,v.TEMPLATE,v.HTML],rhe=[v.TBODY,v.TFOOT,v.THEAD,v.TEMPLATE,v.HTML],ohe=[v.TABLE,v.TEMPLATE,v.HTML],she=[v.TD,v.TH],Yw=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=v.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===v.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===_e.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==_e.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(t<0?0:t)}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n<0?0:n)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ihe,_e.HTML)}popUntilTableCellPopped(){this.popUntilPopped(she,_e.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(ohe,_e.HTML)}clearBackToTableBodyContext(){this.clearBackTo(rhe,_e.HTML)}clearBackToTableRowContext(){this.clearBackTo(nhe,_e.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===v.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===v.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===_e.HTML)return!0;if(Gw.get(n)===r)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e],n=this.treeAdapter.getNamespaceURI(this.items[e]);if(l0(t)&&n===_e.HTML)return!0;if(Gw.get(t)===n)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===_e.HTML)return!0;if((n===v.UL||n===v.OL)&&r===_e.HTML||Gw.get(n)===r)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===_e.HTML)return!0;if(n===v.BUTTON&&r===_e.HTML||Gw.get(n)===r)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===_e.HTML){if(n===e)return!0;if(n===v.TABLE||n===v.TEMPLATE||n===v.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===_e.HTML){if(t===v.TBODY||t===v.THEAD||t===v.TFOOT)return!0;if(t===v.TABLE||t===v.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===_e.HTML){if(n===e)return!0;if(n!==v.OPTION&&n!==v.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;WW.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;jW.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&jW.has(this.currentTagId);)this.pop()}};var fs;(function(i){i[i.Marker=0]="Marker",i[i.Element=1]="Element"})(fs=fs||(fs={}));var VW={type:fs.Marker},Xw=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,o=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a<this.entries.length;a++){let l=this.entries[a];if(l.type===fs.Marker)break;let{element:c}=l;if(this.treeAdapter.getTagName(c)===o&&this.treeAdapter.getNamespaceURI(c)===s){let d=this.treeAdapter.getAttrList(c);d.length===r&&n.push({idx:a,attrs:d})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;let r=new Map(t.map(s=>[s.name,s.value])),o=0;for(let s=0;s<n.length;s++){let a=n[s];a.attrs.every(l=>r.get(l.name)===l.value)&&(o+=1,o>=3&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(VW)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:fs.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:fs.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(VW);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){let t=this.entries.find(n=>n.type===fs.Marker||this.treeAdapter.getTagName(n.element)===e);return t&&t.type===fs.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===fs.Element&&t.element===e)}};function qW(i){return{nodeName:"#text",value:i,parentNode:null}}var Gl={createDocument(){return{nodeName:"#document",mode:br.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(i){return{nodeName:"#comment",data:i,parentNode:null}},appendChild(i,e){i.childNodes.push(e),e.parentNode=i},insertBefore(i,e,t){let n=i.childNodes.indexOf(t);i.childNodes.splice(n,0,e),e.parentNode=i},setTemplateContent(i,e){i.content=e},getTemplateContent(i){return i.content},setDocumentType(i,e,t,n){let r=i.childNodes.find(o=>o.nodeName==="#documentType");if(r)r.name=e,r.publicId=t,r.systemId=n;else{let o={nodeName:"#documentType",name:e,publicId:t,systemId:n,parentNode:null};Gl.appendChild(i,o)}},setDocumentMode(i,e){i.mode=e},getDocumentMode(i){return i.mode},detachNode(i){if(i.parentNode){let e=i.parentNode.childNodes.indexOf(i);i.parentNode.childNodes.splice(e,1),i.parentNode=null}},insertText(i,e){if(i.childNodes.length>0){let t=i.childNodes[i.childNodes.length-1];if(Gl.isTextNode(t)){t.value+=e;return}}Gl.appendChild(i,qW(e))},insertTextBefore(i,e,t){let n=i.childNodes[i.childNodes.indexOf(t)-1];n&&Gl.isTextNode(n)?n.value+=e:Gl.insertBefore(i,qW(e),t)},adoptAttributes(i,e){let t=new Set(i.attrs.map(n=>n.name));for(let n=0;n<e.length;n++)t.has(e[n].name)||i.attrs.push(e[n])},getFirstChild(i){return i.childNodes[0]},getChildNodes(i){return i.childNodes},getParentNode(i){return i.parentNode},getAttrList(i){return i.attrs},getTagName(i){return i.tagName},getNamespaceURI(i){return i.namespaceURI},getTextNodeContent(i){return i.value},getCommentNodeContent(i){return i.data},getDocumentTypeNodeName(i){return i.name},getDocumentTypeNodePublicId(i){return i.publicId},getDocumentTypeNodeSystemId(i){return i.systemId},isTextNode(i){return i.nodeName==="#text"},isCommentNode(i){return i.nodeName==="#comment"},isDocumentTypeNode(i){return i.nodeName==="#documentType"},isElementNode(i){return Object.prototype.hasOwnProperty.call(i,"tagName")},setNodeSourceCodeLocation(i,e){i.sourceCodeLocation=e},getNodeSourceCodeLocation(i){return i.sourceCodeLocation},updateNodeSourceCodeLocation(i,e){i.sourceCodeLocation=ue(ue({},i.sourceCodeLocation),e)}};var $W="html",ahe="about:legacy-compat",lhe="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",GW=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],che=[...GW,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],dhe=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),YW=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],uhe=[...YW,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function KW(i,e){return e.some(t=>i.startsWith(t))}function XW(i){return i.name===$W&&i.publicId===null&&(i.systemId===null||i.systemId===ahe)}function QW(i){if(i.name!==$W)return br.QUIRKS;let{systemId:e}=i;if(e&&e.toLowerCase()===lhe)return br.QUIRKS;let{publicId:t}=i;if(t!==null){if(t=t.toLowerCase(),dhe.has(t))return br.QUIRKS;let n=e===null?che:GW;if(KW(t,n))return br.QUIRKS;if(n=e===null?YW:uhe,KW(t,n))return br.LIMITED_QUIRKS}return br.NO_QUIRKS}var Jw={};Xh(Jw,{SVG_TAG_NAMES_ADJUSTMENT_MAP:()=>JW,adjustTokenMathMLAttrs:()=>Qw,adjustTokenSVGAttrs:()=>Zw,adjustTokenSVGTagName:()=>K6,adjustTokenXMLAttrs:()=>h0,causesExit:()=>q6,isIntegrationPoint:()=>$6});var ZW={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},fhe="definitionurl",phe="definitionURL",mhe=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(i=>[i.toLowerCase(),i])),ghe=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:_e.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:_e.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:_e.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:_e.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:_e.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:_e.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:_e.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:_e.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:_e.XML}],["xml:space",{prefix:"xml",name:"space",namespace:_e.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:_e.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:_e.XMLNS}]]),JW=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(i=>[i.toLowerCase(),i])),bhe=new Set([v.B,v.BIG,v.BLOCKQUOTE,v.BODY,v.BR,v.CENTER,v.CODE,v.DD,v.DIV,v.DL,v.DT,v.EM,v.EMBED,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HR,v.I,v.IMG,v.LI,v.LISTING,v.MENU,v.META,v.NOBR,v.OL,v.P,v.PRE,v.RUBY,v.S,v.SMALL,v.SPAN,v.STRONG,v.STRIKE,v.SUB,v.SUP,v.TABLE,v.TT,v.U,v.UL,v.VAR]);function q6(i){let e=i.tagID;return e===v.FONT&&i.attrs.some(({name:n})=>n===Us.COLOR||n===Us.SIZE||n===Us.FACE)||bhe.has(e)}function Qw(i){for(let e=0;e<i.attrs.length;e++)if(i.attrs[e].name===fhe){i.attrs[e].name=phe;break}}function Zw(i){for(let e=0;e<i.attrs.length;e++){let t=mhe.get(i.attrs[e].name);t!=null&&(i.attrs[e].name=t)}}function h0(i){for(let e=0;e<i.attrs.length;e++){let t=ghe.get(i.attrs[e].name);t&&(i.attrs[e].prefix=t.prefix,i.attrs[e].name=t.name,i.attrs[e].namespace=t.namespace)}}function K6(i){let e=JW.get(i.tagName);e!=null&&(i.tagName=e,i.tagID=_d(i.tagName))}function vhe(i,e){return e===_e.MATHML&&(i===v.MI||i===v.MO||i===v.MN||i===v.MS||i===v.MTEXT)}function _he(i,e,t){if(e===_e.MATHML&&i===v.ANNOTATION_XML){for(let n=0;n<t.length;n++)if(t[n].name===Us.ENCODING){let r=t[n].value.toLowerCase();return r===ZW.TEXT_HTML||r===ZW.APPLICATION_XML}}return e===_e.SVG&&(i===v.FOREIGN_OBJECT||i===v.DESC||i===v.TITLE)}function $6(i,e,t,n){return(!n||n===_e.HTML)&&_he(i,e,t)||(!n||n===_e.MATHML)&&vhe(i,e)}var yhe="hidden",whe=8,xhe=3,$;(function(i){i[i.INITIAL=0]="INITIAL",i[i.BEFORE_HTML=1]="BEFORE_HTML",i[i.BEFORE_HEAD=2]="BEFORE_HEAD",i[i.IN_HEAD=3]="IN_HEAD",i[i.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",i[i.AFTER_HEAD=5]="AFTER_HEAD",i[i.IN_BODY=6]="IN_BODY",i[i.TEXT=7]="TEXT",i[i.IN_TABLE=8]="IN_TABLE",i[i.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",i[i.IN_CAPTION=10]="IN_CAPTION",i[i.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",i[i.IN_TABLE_BODY=12]="IN_TABLE_BODY",i[i.IN_ROW=13]="IN_ROW",i[i.IN_CELL=14]="IN_CELL",i[i.IN_SELECT=15]="IN_SELECT",i[i.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",i[i.IN_TEMPLATE=17]="IN_TEMPLATE",i[i.AFTER_BODY=18]="AFTER_BODY",i[i.IN_FRAMESET=19]="IN_FRAMESET",i[i.AFTER_FRAMESET=20]="AFTER_FRAMESET",i[i.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",i[i.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})($||($={}));var Che={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},nV=new Set([v.TABLE,v.TBODY,v.TFOOT,v.THEAD,v.TR]),eV={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Gl,onParseError:null},Yl=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=ue(ue({},eV),e),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t!=null?t:this.treeAdapter.createDocument(),this.tokenizer=new u0(this.options,this),this.activeFormattingElements=new Xw(this.treeAdapter),this.fragmentContextID=n?_d(this.treeAdapter.getTagName(n)):v.UNKNOWN,this._setContextModes(n!=null?n:this.document,this.fragmentContextID),this.openElements=new Yw(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n=ue(ue({},eV),t);e!=null||(e=n.treeAdapter.createElement(ne.TEMPLATE,_e.HTML,[]));let r=n.treeAdapter.createElement("documentmock",_e.HTML,[]),o=new this(n,r,e);return o.fragmentContextID===v.TEMPLATE&&o.tmplInsertionModeStack.unshift($.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;let o=(r=e.location)!==null&&r!==void 0?r:Che,s={code:t,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:n?o.startLine:o.endLine,endCol:n?o.startCol:o.endCol,endOffset:n?o.startOffset:o.endOffset};this.onParseError(s)}onItemPush(e,t,n){var r,o;(o=(r=this.treeAdapter).onItemPush)===null||o===void 0||o.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)===null||r===void 0||r.call(n,e,this.openElements.current),t){let o,s;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,s=this.fragmentContextID):{current:o,currentTagId:s}=this.openElements,this._setContextModes(o,s)}}_setContextModes(e,t){let n=e===this.document||this.treeAdapter.getNamespaceURI(e)===_e.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,_e.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=rn.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===ne.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==_e.HTML))switch(this.fragmentContextID){case v.TITLE:case v.TEXTAREA:{this.tokenizer.state=rn.RCDATA;break}case v.STYLE:case v.XMP:case v.IFRAME:case v.NOEMBED:case v.NOFRAMES:case v.NOSCRIPT:{this.tokenizer.state=rn.RAWTEXT;break}case v.SCRIPT:{this.tokenizer.state=rn.SCRIPT_DATA;break}case v.PLAINTEXT:{this.tokenizer.state=rn.PLAINTEXT;break}default:}}_setDocumentType(e){let t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&xt(ue({},t),{startTag:t});this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,_e.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,_e.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(ne.HTML,_e.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,v.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),o=n?r.lastIndexOf(n):r.length,s=r[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){let{endLine:l,endCol:c,endOffset:d}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),o=t.type===oi.END_TAG&&r===t.tagName?{endTag:ue({},n),endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,o)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===v.SVG&&this.treeAdapter.getTagName(t)===ne.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===_e.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===v.MGLYPH||e.tagID===v.MALIGNMARK)&&!this._isIntegrationPoint(n,t,_e.HTML)}_processToken(e){switch(e.type){case oi.CHARACTER:{this.onCharacter(e);break}case oi.NULL_CHARACTER:{this.onNullCharacter(e);break}case oi.COMMENT:{this.onComment(e);break}case oi.DOCTYPE:{this.onDoctype(e);break}case oi.START_TAG:{this._processStartTag(e);break}case oi.END_TAG:{this.onEndTag(e);break}case oi.EOF:{this.onEof(e);break}case oi.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,t,n){let r=this.treeAdapter.getNamespaceURI(t),o=this.treeAdapter.getAttrList(t);return $6(e,r,o,n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(r=>r.type===fs.Marker||this.openElements.contains(r.element)),n=t<0?e-1:t-1;for(let r=n;r>=0;r--){let o=this.activeFormattingElements.entries[r];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(v.P),this.openElements.popUntilTagNamePopped(v.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case v.TR:{this.insertionMode=$.IN_ROW;return}case v.TBODY:case v.THEAD:case v.TFOOT:{this.insertionMode=$.IN_TABLE_BODY;return}case v.CAPTION:{this.insertionMode=$.IN_CAPTION;return}case v.COLGROUP:{this.insertionMode=$.IN_COLUMN_GROUP;return}case v.TABLE:{this.insertionMode=$.IN_TABLE;return}case v.BODY:{this.insertionMode=$.IN_BODY;return}case v.FRAMESET:{this.insertionMode=$.IN_FRAMESET;return}case v.SELECT:{this._resetInsertionModeForSelect(e);return}case v.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case v.HTML:{this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return}case v.TD:case v.TH:{if(e>0){this.insertionMode=$.IN_CELL;return}break}case v.HEAD:{if(e>0){this.insertionMode=$.IN_HEAD;return}break}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let n=this.openElements.tagIDs[t];if(n===v.TEMPLATE)break;if(n===v.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return nV.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case v.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(t)===_e.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break}case v.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){let n=this.treeAdapter.getNamespaceURI(e);return W6[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Jfe(this,e);return}switch(this.insertionMode){case $.INITIAL:{f0(this,e);break}case $.BEFORE_HTML:{m0(this,e);break}case $.BEFORE_HEAD:{g0(this,e);break}case $.IN_HEAD:{b0(this,e);break}case $.IN_HEAD_NO_SCRIPT:{v0(this,e);break}case $.AFTER_HEAD:{_0(this,e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:{oV(this,e);break}case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{G6(this,e);break}case $.IN_TABLE_TEXT:{uV(this,e);break}case $.IN_COLUMN_GROUP:{tx(this,e);break}case $.AFTER_BODY:{ix(this,e);break}case $.AFTER_AFTER_BODY:{ex(this,e);break}default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Zfe(this,e);return}switch(this.insertionMode){case $.INITIAL:{f0(this,e);break}case $.BEFORE_HTML:{m0(this,e);break}case $.BEFORE_HEAD:{g0(this,e);break}case $.IN_HEAD:{b0(this,e);break}case $.IN_HEAD_NO_SCRIPT:{v0(this,e);break}case $.AFTER_HEAD:{_0(this,e);break}case $.TEXT:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{G6(this,e);break}case $.IN_COLUMN_GROUP:{tx(this,e);break}case $.AFTER_BODY:{ix(this,e);break}case $.AFTER_AFTER_BODY:{ex(this,e);break}default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Y6(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{Y6(this,e);break}case $.IN_TABLE_TEXT:{p0(this,e);break}case $.AFTER_BODY:{Ahe(this,e);break}case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{Dhe(this,e);break}default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:{Mhe(this,e);break}case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:{this._err(e,he.misplacedDoctype);break}case $.IN_TABLE_TEXT:{p0(this,e);break}default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,he.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?epe(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{f0(this,e);break}case $.BEFORE_HTML:{Nhe(this,e);break}case $.BEFORE_HEAD:{Phe(this,e);break}case $.IN_HEAD:{js(this,e);break}case $.IN_HEAD_NO_SCRIPT:{zhe(this,e);break}case $.AFTER_HEAD:{Hhe(this,e);break}case $.IN_BODY:{Br(this,e);break}case $.IN_TABLE:{Jf(this,e);break}case $.IN_TABLE_TEXT:{p0(this,e);break}case $.IN_CAPTION:{Ofe(this,e);break}case $.IN_COLUMN_GROUP:{J6(this,e);break}case $.IN_TABLE_BODY:{ox(this,e);break}case $.IN_ROW:{sx(this,e);break}case $.IN_CELL:{Bfe(this,e);break}case $.IN_SELECT:{pV(this,e);break}case $.IN_SELECT_IN_TABLE:{Ufe(this,e);break}case $.IN_TEMPLATE:{Wfe(this,e);break}case $.AFTER_BODY:{qfe(this,e);break}case $.IN_FRAMESET:{Kfe(this,e);break}case $.AFTER_FRAMESET:{Gfe(this,e);break}case $.AFTER_AFTER_BODY:{Xfe(this,e);break}case $.AFTER_AFTER_FRAMESET:{Qfe(this,e);break}default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?tpe(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{f0(this,e);break}case $.BEFORE_HTML:{Rhe(this,e);break}case $.BEFORE_HEAD:{Ohe(this,e);break}case $.IN_HEAD:{Fhe(this,e);break}case $.IN_HEAD_NO_SCRIPT:{Bhe(this,e);break}case $.AFTER_HEAD:{Uhe(this,e);break}case $.IN_BODY:{rx(this,e);break}case $.TEXT:{Efe(this,e);break}case $.IN_TABLE:{y0(this,e);break}case $.IN_TABLE_TEXT:{p0(this,e);break}case $.IN_CAPTION:{Ffe(this,e);break}case $.IN_COLUMN_GROUP:{zfe(this,e);break}case $.IN_TABLE_BODY:{X6(this,e);break}case $.IN_ROW:{fV(this,e);break}case $.IN_CELL:{Hfe(this,e);break}case $.IN_SELECT:{mV(this,e);break}case $.IN_SELECT_IN_TABLE:{jfe(this,e);break}case $.IN_TEMPLATE:{Vfe(this,e);break}case $.AFTER_BODY:{bV(this,e);break}case $.IN_FRAMESET:{$fe(this,e);break}case $.AFTER_FRAMESET:{Yfe(this,e);break}case $.AFTER_AFTER_BODY:{ex(this,e);break}default:}}onEof(e){switch(this.insertionMode){case $.INITIAL:{f0(this,e);break}case $.BEFORE_HTML:{m0(this,e);break}case $.BEFORE_HEAD:{g0(this,e);break}case $.IN_HEAD:{b0(this,e);break}case $.IN_HEAD_NO_SCRIPT:{v0(this,e);break}case $.AFTER_HEAD:{_0(this,e);break}case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{cV(this,e);break}case $.TEXT:{Tfe(this,e);break}case $.IN_TABLE_TEXT:{p0(this,e);break}case $.IN_TEMPLATE:{gV(this,e);break}case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{Z6(this,e);break}default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===z.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{this._insertCharacters(e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{rV(this,e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{G6(this,e);break}case $.IN_TABLE_TEXT:{dV(this,e);break}default:}}};function She(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?i.openElements.contains(t.element)?i.openElements.hasInScope(e.tagID)||(t=null):(i.activeFormattingElements.removeEntry(t),t=null):lV(i,e),t}function khe(i,e){let t=null,n=i.openElements.stackTop;for(;n>=0;n--){let r=i.openElements.items[n];if(r===e.element)break;i._isSpecialElement(r,i.openElements.tagIDs[n])&&(t=r)}return t||(i.openElements.shortenToLength(n<0?0:n),i.activeFormattingElements.removeEntry(e)),t}function Ehe(i,e,t){let n=e,r=i.openElements.getCommonAncestor(e);for(let o=0,s=r;s!==t;o++,s=r){r=i.openElements.getCommonAncestor(s);let a=i.activeFormattingElements.getElementEntry(s),l=a&&o>=xhe;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(s)):(s=The(i,a),n===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(n),i.treeAdapter.appendChild(s,n),n=s)}return n}function The(i,e){let t=i.treeAdapter.getNamespaceURI(e.element),n=i.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return i.openElements.replace(e.element,n),e.element=n,n}function Ihe(i,e,t){let n=i.treeAdapter.getTagName(e),r=_d(n);if(i._isElementCausesFosterParenting(r))i._fosterParentElement(t);else{let o=i.treeAdapter.getNamespaceURI(e);r===v.TEMPLATE&&o===_e.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function Lhe(i,e,t){let n=i.treeAdapter.getNamespaceURI(t.element),{token:r}=t,o=i.treeAdapter.createElement(r.tagName,n,r.attrs);i._adoptNodes(e,o),i.treeAdapter.appendChild(e,o),i.activeFormattingElements.insertElementAfterBookmark(o,r),i.activeFormattingElements.removeEntry(t),i.openElements.remove(t.element),i.openElements.insertAfter(e,o,r.tagID)}function Q6(i,e){for(let t=0;t<whe;t++){let n=She(i,e);if(!n)break;let r=khe(i,n);if(!r)break;i.activeFormattingElements.bookmark=n;let o=Ehe(i,r,n.element),s=i.openElements.getCommonAncestor(n.element);i.treeAdapter.detachNode(o),s&&Ihe(i,s,o),Lhe(i,r,n)}}function Y6(i,e){i._appendCommentNode(e,i.openElements.currentTmplContentOrNode)}function Ahe(i,e){i._appendCommentNode(e,i.openElements.items[0])}function Dhe(i,e){i._appendCommentNode(e,i.document)}function Z6(i,e){if(i.stopped=!0,e.location){let t=i.fragmentContext?0:2;for(let n=i.openElements.stackTop;n>=t;n--)i._setEndLocation(i.openElements.items[n],e);if(!i.fragmentContext&&i.openElements.stackTop>=0){let n=i.openElements.items[0],r=i.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(i._setEndLocation(n,e),i.openElements.stackTop>=1)){let o=i.openElements.items[1],s=i.treeAdapter.getNodeSourceCodeLocation(o);s&&!s.endTag&&i._setEndLocation(o,e)}}}}function Mhe(i,e){i._setDocumentType(e);let t=e.forceQuirks?br.QUIRKS:QW(e);XW(e)||i._err(e,he.nonConformingDoctype),i.treeAdapter.setDocumentMode(i.document,t),i.insertionMode=$.BEFORE_HTML}function f0(i,e){i._err(e,he.missingDoctype,!0),i.treeAdapter.setDocumentMode(i.document,br.QUIRKS),i.insertionMode=$.BEFORE_HTML,i._processToken(e)}function Nhe(i,e){e.tagID===v.HTML?(i._insertElement(e,_e.HTML),i.insertionMode=$.BEFORE_HEAD):m0(i,e)}function Rhe(i,e){let t=e.tagID;(t===v.HTML||t===v.HEAD||t===v.BODY||t===v.BR)&&m0(i,e)}function m0(i,e){i._insertFakeRootElement(),i.insertionMode=$.BEFORE_HEAD,i._processToken(e)}function Phe(i,e){switch(e.tagID){case v.HTML:{Br(i,e);break}case v.HEAD:{i._insertElement(e,_e.HTML),i.headElement=i.openElements.current,i.insertionMode=$.IN_HEAD;break}default:g0(i,e)}}function Ohe(i,e){let t=e.tagID;t===v.HEAD||t===v.BODY||t===v.HTML||t===v.BR?g0(i,e):i._err(e,he.endTagWithoutMatchingOpenElement)}function g0(i,e){i._insertFakeElement(ne.HEAD,v.HEAD),i.headElement=i.openElements.current,i.insertionMode=$.IN_HEAD,i._processToken(e)}function js(i,e){switch(e.tagID){case v.HTML:{Br(i,e);break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:{i._appendElement(e,_e.HTML),e.ackSelfClosing=!0;break}case v.TITLE:{i._switchToTextParsing(e,rn.RCDATA);break}case v.NOSCRIPT:{i.options.scriptingEnabled?i._switchToTextParsing(e,rn.RAWTEXT):(i._insertElement(e,_e.HTML),i.insertionMode=$.IN_HEAD_NO_SCRIPT);break}case v.NOFRAMES:case v.STYLE:{i._switchToTextParsing(e,rn.RAWTEXT);break}case v.SCRIPT:{i._switchToTextParsing(e,rn.SCRIPT_DATA);break}case v.TEMPLATE:{i._insertTemplate(e),i.activeFormattingElements.insertMarker(),i.framesetOk=!1,i.insertionMode=$.IN_TEMPLATE,i.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break}case v.HEAD:{i._err(e,he.misplacedStartTagForHeadElement);break}default:b0(i,e)}}function Fhe(i,e){switch(e.tagID){case v.HEAD:{i.openElements.pop(),i.insertionMode=$.AFTER_HEAD;break}case v.BODY:case v.BR:case v.HTML:{b0(i,e);break}case v.TEMPLATE:{ju(i,e);break}default:i._err(e,he.endTagWithoutMatchingOpenElement)}}function ju(i,e){i.openElements.tmplCount>0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagId!==v.TEMPLATE&&i._err(e,he.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(v.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode()):i._err(e,he.endTagWithoutMatchingOpenElement)}function b0(i,e){i.openElements.pop(),i.insertionMode=$.AFTER_HEAD,i._processToken(e)}function zhe(i,e){switch(e.tagID){case v.HTML:{Br(i,e);break}case v.BASEFONT:case v.BGSOUND:case v.HEAD:case v.LINK:case v.META:case v.NOFRAMES:case v.STYLE:{js(i,e);break}case v.NOSCRIPT:{i._err(e,he.nestedNoscriptInHead);break}default:v0(i,e)}}function Bhe(i,e){switch(e.tagID){case v.NOSCRIPT:{i.openElements.pop(),i.insertionMode=$.IN_HEAD;break}case v.BR:{v0(i,e);break}default:i._err(e,he.endTagWithoutMatchingOpenElement)}}function v0(i,e){let t=e.type===oi.EOF?he.openElementsLeftAfterEof:he.disallowedContentInNoscriptInHead;i._err(e,t),i.openElements.pop(),i.insertionMode=$.IN_HEAD,i._processToken(e)}function Hhe(i,e){switch(e.tagID){case v.HTML:{Br(i,e);break}case v.BODY:{i._insertElement(e,_e.HTML),i.framesetOk=!1,i.insertionMode=$.IN_BODY;break}case v.FRAMESET:{i._insertElement(e,_e.HTML),i.insertionMode=$.IN_FRAMESET;break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{i._err(e,he.abandonedHeadElementChild),i.openElements.push(i.headElement,v.HEAD),js(i,e),i.openElements.remove(i.headElement);break}case v.HEAD:{i._err(e,he.misplacedStartTagForHeadElement);break}default:_0(i,e)}}function Uhe(i,e){switch(e.tagID){case v.BODY:case v.HTML:case v.BR:{_0(i,e);break}case v.TEMPLATE:{ju(i,e);break}default:i._err(e,he.endTagWithoutMatchingOpenElement)}}function _0(i,e){i._insertFakeElement(ne.BODY,v.BODY),i.insertionMode=$.IN_BODY,nx(i,e)}function nx(i,e){switch(e.type){case oi.CHARACTER:{oV(i,e);break}case oi.WHITESPACE_CHARACTER:{rV(i,e);break}case oi.COMMENT:{Y6(i,e);break}case oi.START_TAG:{Br(i,e);break}case oi.END_TAG:{rx(i,e);break}case oi.EOF:{cV(i,e);break}default:}}function rV(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function oV(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function jhe(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function Whe(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function Vhe(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_FRAMESET)}function qhe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML)}function Khe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),l0(i.openElements.currentTagId)&&i.openElements.pop(),i._insertElement(e,_e.HTML)}function $he(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function Ghe(i,e){let t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),t||(i.formElement=i.openElements.current))}function Yhe(i,e){i.framesetOk=!1;let t=e.tagID;for(let n=i.openElements.stackTop;n>=0;n--){let r=i.openElements.tagIDs[n];if(t===v.LI&&r===v.LI||(t===v.DD||t===v.DT)&&(r===v.DD||r===v.DT)){i.openElements.generateImpliedEndTagsWithExclusion(r),i.openElements.popUntilTagNamePopped(r);break}if(r!==v.ADDRESS&&r!==v.DIV&&r!==v.P&&i._isSpecialElement(i.openElements.items[n],r))break}i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML)}function Xhe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),i.tokenizer.state=rn.PLAINTEXT}function Qhe(i,e){i.openElements.hasInScope(v.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(v.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.framesetOk=!1}function Zhe(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(ne.A);t&&(Q6(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function Jhe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function efe(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(v.NOBR)&&(Q6(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,_e.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function tfe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function ife(i,e){i.treeAdapter.getDocumentMode(i.document)!==br.QUIRKS&&i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),i.framesetOk=!1,i.insertionMode=$.IN_TABLE}function sV(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,_e.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function aV(i){let e=a0(i,Us.TYPE);return e!=null&&e.toLowerCase()===yhe}function nfe(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,_e.HTML),aV(e)||(i.framesetOk=!1),e.ackSelfClosing=!0}function rfe(i,e){i._appendElement(e,_e.HTML),e.ackSelfClosing=!0}function ofe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._appendElement(e,_e.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function sfe(i,e){e.tagName=ne.IMG,e.tagID=v.IMG,sV(i,e)}function afe(i,e){i._insertElement(e,_e.HTML),i.skipNextNewLine=!0,i.tokenizer.state=rn.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=$.TEXT}function lfe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,rn.RAWTEXT)}function cfe(i,e){i.framesetOk=!1,i._switchToTextParsing(e,rn.RAWTEXT)}function tV(i,e){i._switchToTextParsing(e,rn.RAWTEXT)}function dfe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.framesetOk=!1,i.insertionMode=i.insertionMode===$.IN_TABLE||i.insertionMode===$.IN_CAPTION||i.insertionMode===$.IN_TABLE_BODY||i.insertionMode===$.IN_ROW||i.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function ufe(i,e){i.openElements.currentTagId===v.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML)}function hfe(i,e){i.openElements.hasInScope(v.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,_e.HTML)}function ffe(i,e){i.openElements.hasInScope(v.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(v.RTC),i._insertElement(e,_e.HTML)}function pfe(i,e){i._reconstructActiveFormattingElements(),Qw(e),h0(e),e.selfClosing?i._appendElement(e,_e.MATHML):i._insertElement(e,_e.MATHML),e.ackSelfClosing=!0}function mfe(i,e){i._reconstructActiveFormattingElements(),Zw(e),h0(e),e.selfClosing?i._appendElement(e,_e.SVG):i._insertElement(e,_e.SVG),e.ackSelfClosing=!0}function iV(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML)}function Br(i,e){switch(e.tagID){case v.I:case v.S:case v.B:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.SMALL:case v.STRIKE:case v.STRONG:{Jhe(i,e);break}case v.A:{Zhe(i,e);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{Khe(i,e);break}case v.P:case v.DL:case v.OL:case v.UL:case v.DIV:case v.DIR:case v.NAV:case v.MAIN:case v.MENU:case v.ASIDE:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.DETAILS:case v.ADDRESS:case v.ARTICLE:case v.SECTION:case v.SUMMARY:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{qhe(i,e);break}case v.LI:case v.DD:case v.DT:{Yhe(i,e);break}case v.BR:case v.IMG:case v.WBR:case v.AREA:case v.EMBED:case v.KEYGEN:{sV(i,e);break}case v.HR:{ofe(i,e);break}case v.RB:case v.RTC:{hfe(i,e);break}case v.RT:case v.RP:{ffe(i,e);break}case v.PRE:case v.LISTING:{$he(i,e);break}case v.XMP:{lfe(i,e);break}case v.SVG:{mfe(i,e);break}case v.HTML:{jhe(i,e);break}case v.BASE:case v.LINK:case v.META:case v.STYLE:case v.TITLE:case v.SCRIPT:case v.BGSOUND:case v.BASEFONT:case v.TEMPLATE:{js(i,e);break}case v.BODY:{Whe(i,e);break}case v.FORM:{Ghe(i,e);break}case v.NOBR:{efe(i,e);break}case v.MATH:{pfe(i,e);break}case v.TABLE:{ife(i,e);break}case v.INPUT:{nfe(i,e);break}case v.PARAM:case v.TRACK:case v.SOURCE:{rfe(i,e);break}case v.IMAGE:{sfe(i,e);break}case v.BUTTON:{Qhe(i,e);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{tfe(i,e);break}case v.IFRAME:{cfe(i,e);break}case v.SELECT:{dfe(i,e);break}case v.OPTION:case v.OPTGROUP:{ufe(i,e);break}case v.NOEMBED:{tV(i,e);break}case v.FRAMESET:{Vhe(i,e);break}case v.TEXTAREA:{afe(i,e);break}case v.NOSCRIPT:{i.options.scriptingEnabled?tV(i,e):iV(i,e);break}case v.PLAINTEXT:{Xhe(i,e);break}case v.COL:case v.TH:case v.TD:case v.TR:case v.HEAD:case v.FRAME:case v.TBODY:case v.TFOOT:case v.THEAD:case v.CAPTION:case v.COLGROUP:break;default:iV(i,e)}}function gfe(i,e){if(i.openElements.hasInScope(v.BODY)&&(i.insertionMode=$.AFTER_BODY,i.options.sourceCodeLocationInfo)){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i._setEndLocation(t,e)}}function bfe(i,e){i.openElements.hasInScope(v.BODY)&&(i.insertionMode=$.AFTER_BODY,bV(i,e))}function vfe(i,e){let t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function _fe(i){let e=i.openElements.tmplCount>0,{formElement:t}=i;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(v.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(v.FORM):t&&i.openElements.remove(t))}function yfe(i){i.openElements.hasInButtonScope(v.P)||i._insertFakeElement(ne.P,v.P),i._closePElement()}function wfe(i){i.openElements.hasInListItemScope(v.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(v.LI),i.openElements.popUntilTagNamePopped(v.LI))}function xfe(i,e){let t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function Cfe(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function Sfe(i,e){let t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function kfe(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(ne.BR,v.BR),i.openElements.pop(),i.framesetOk=!1}function lV(i,e){let t=e.tagName,n=e.tagID;for(let r=i.openElements.stackTop;r>0;r--){let o=i.openElements.items[r],s=i.openElements.tagIDs[r];if(n===s&&(n!==v.UNKNOWN||i.treeAdapter.getTagName(o)===t)){i.openElements.generateImpliedEndTagsWithExclusion(n),i.openElements.stackTop>=r&&i.openElements.shortenToLength(r);break}if(i._isSpecialElement(o,s))break}}function rx(i,e){switch(e.tagID){case v.A:case v.B:case v.I:case v.S:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.NOBR:case v.SMALL:case v.STRIKE:case v.STRONG:{Q6(i,e);break}case v.P:{yfe(i);break}case v.DL:case v.UL:case v.OL:case v.DIR:case v.DIV:case v.NAV:case v.PRE:case v.MAIN:case v.MENU:case v.ASIDE:case v.BUTTON:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.ADDRESS:case v.ARTICLE:case v.DETAILS:case v.SECTION:case v.SUMMARY:case v.LISTING:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{vfe(i,e);break}case v.LI:{wfe(i);break}case v.DD:case v.DT:{xfe(i,e);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{Cfe(i);break}case v.BR:{kfe(i);break}case v.BODY:{gfe(i,e);break}case v.HTML:{bfe(i,e);break}case v.FORM:{_fe(i);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{Sfe(i,e);break}case v.TEMPLATE:{ju(i,e);break}default:lV(i,e)}}function cV(i,e){i.tmplInsertionModeStack.length>0?gV(i,e):Z6(i,e)}function Efe(i,e){var t;e.tagID===v.SCRIPT&&((t=i.scriptHandler)===null||t===void 0||t.call(i,i.openElements.current)),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function Tfe(i,e){i._err(e,he.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i.onEof(e)}function G6(i,e){if(nV.has(i.openElements.currentTagId))switch(i.pendingCharacterTokens.length=0,i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=$.IN_TABLE_TEXT,e.type){case oi.CHARACTER:{uV(i,e);break}case oi.WHITESPACE_CHARACTER:{dV(i,e);break}}else w0(i,e)}function Ife(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_CAPTION}function Lfe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_COLUMN_GROUP}function Afe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(ne.COLGROUP,v.COLGROUP),i.insertionMode=$.IN_COLUMN_GROUP,J6(i,e)}function Dfe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_TABLE_BODY}function Mfe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(ne.TBODY,v.TBODY),i.insertionMode=$.IN_TABLE_BODY,ox(i,e)}function Nfe(i,e){i.openElements.hasInTableScope(v.TABLE)&&(i.openElements.popUntilTagNamePopped(v.TABLE),i._resetInsertionMode(),i._processStartTag(e))}function Rfe(i,e){aV(e)?i._appendElement(e,_e.HTML):w0(i,e),e.ackSelfClosing=!0}function Pfe(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,_e.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function Jf(i,e){switch(e.tagID){case v.TD:case v.TH:case v.TR:{Mfe(i,e);break}case v.STYLE:case v.SCRIPT:case v.TEMPLATE:{js(i,e);break}case v.COL:{Afe(i,e);break}case v.FORM:{Pfe(i,e);break}case v.TABLE:{Nfe(i,e);break}case v.TBODY:case v.TFOOT:case v.THEAD:{Dfe(i,e);break}case v.INPUT:{Rfe(i,e);break}case v.CAPTION:{Ife(i,e);break}case v.COLGROUP:{Lfe(i,e);break}default:w0(i,e)}}function y0(i,e){switch(e.tagID){case v.TABLE:{i.openElements.hasInTableScope(v.TABLE)&&(i.openElements.popUntilTagNamePopped(v.TABLE),i._resetInsertionMode());break}case v.TEMPLATE:{ju(i,e);break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:w0(i,e)}}function w0(i,e){let t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,nx(i,e),i.fosterParentingEnabled=t}function dV(i,e){i.pendingCharacterTokens.push(e)}function uV(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function p0(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t<i.pendingCharacterTokens.length;t++)w0(i,i.pendingCharacterTokens[t]);else for(;t<i.pendingCharacterTokens.length;t++)i._insertCharacters(i.pendingCharacterTokens[t]);i.insertionMode=i.originalInsertionMode,i._processToken(e)}var hV=new Set([v.CAPTION,v.COL,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]);function Ofe(i,e){let t=e.tagID;hV.has(t)?i.openElements.hasInTableScope(v.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(v.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=$.IN_TABLE,Jf(i,e)):Br(i,e)}function Ffe(i,e){let t=e.tagID;switch(t){case v.CAPTION:case v.TABLE:{i.openElements.hasInTableScope(v.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(v.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=$.IN_TABLE,t===v.TABLE&&y0(i,e));break}case v.BODY:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:rx(i,e)}}function J6(i,e){switch(e.tagID){case v.HTML:{Br(i,e);break}case v.COL:{i._appendElement(e,_e.HTML),e.ackSelfClosing=!0;break}case v.TEMPLATE:{js(i,e);break}default:tx(i,e)}}function zfe(i,e){switch(e.tagID){case v.COLGROUP:{i.openElements.currentTagId===v.COLGROUP&&(i.openElements.pop(),i.insertionMode=$.IN_TABLE);break}case v.TEMPLATE:{ju(i,e);break}case v.COL:break;default:tx(i,e)}}function tx(i,e){i.openElements.currentTagId===v.COLGROUP&&(i.openElements.pop(),i.insertionMode=$.IN_TABLE,i._processToken(e))}function ox(i,e){switch(e.tagID){case v.TR:{i.openElements.clearBackToTableBodyContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_ROW;break}case v.TH:case v.TD:{i.openElements.clearBackToTableBodyContext(),i._insertFakeElement(ne.TR,v.TR),i.insertionMode=$.IN_ROW,sx(i,e);break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE,Jf(i,e));break}default:Jf(i,e)}}function X6(i,e){let t=e.tagID;switch(e.tagID){case v.TBODY:case v.TFOOT:case v.THEAD:{i.openElements.hasInTableScope(t)&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE);break}case v.TABLE:{i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE,y0(i,e));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:case v.TR:break;default:y0(i,e)}}function sx(i,e){switch(e.tagID){case v.TH:case v.TD:{i.openElements.clearBackToTableRowContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_CELL,i.activeFormattingElements.insertMarker();break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{i.openElements.hasInTableScope(v.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY,ox(i,e));break}default:Jf(i,e)}}function fV(i,e){switch(e.tagID){case v.TR:{i.openElements.hasInTableScope(v.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY);break}case v.TABLE:{i.openElements.hasInTableScope(v.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY,X6(i,e));break}case v.TBODY:case v.TFOOT:case v.THEAD:{(i.openElements.hasInTableScope(e.tagID)||i.openElements.hasInTableScope(v.TR))&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY,X6(i,e));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:break;default:y0(i,e)}}function Bfe(i,e){let t=e.tagID;hV.has(t)?(i.openElements.hasInTableScope(v.TD)||i.openElements.hasInTableScope(v.TH))&&(i._closeTableCell(),sx(i,e)):Br(i,e)}function Hfe(i,e){let t=e.tagID;switch(t){case v.TD:case v.TH:{i.openElements.hasInTableScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=$.IN_ROW);break}case v.TABLE:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{i.openElements.hasInTableScope(t)&&(i._closeTableCell(),fV(i,e));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:break;default:rx(i,e)}}function pV(i,e){switch(e.tagID){case v.HTML:{Br(i,e);break}case v.OPTION:{i.openElements.currentTagId===v.OPTION&&i.openElements.pop(),i._insertElement(e,_e.HTML);break}case v.OPTGROUP:{i.openElements.currentTagId===v.OPTION&&i.openElements.pop(),i.openElements.currentTagId===v.OPTGROUP&&i.openElements.pop(),i._insertElement(e,_e.HTML);break}case v.INPUT:case v.KEYGEN:case v.TEXTAREA:case v.SELECT:{i.openElements.hasInSelectScope(v.SELECT)&&(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode(),e.tagID!==v.SELECT&&i._processStartTag(e));break}case v.SCRIPT:case v.TEMPLATE:{js(i,e);break}default:}}function mV(i,e){switch(e.tagID){case v.OPTGROUP:{i.openElements.stackTop>0&&i.openElements.currentTagId===v.OPTION&&i.openElements.tagIDs[i.openElements.stackTop-1]===v.OPTGROUP&&i.openElements.pop(),i.openElements.currentTagId===v.OPTGROUP&&i.openElements.pop();break}case v.OPTION:{i.openElements.currentTagId===v.OPTION&&i.openElements.pop();break}case v.SELECT:{i.openElements.hasInSelectScope(v.SELECT)&&(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode());break}case v.TEMPLATE:{ju(i,e);break}default:}}function Ufe(i,e){let t=e.tagID;t===v.CAPTION||t===v.TABLE||t===v.TBODY||t===v.TFOOT||t===v.THEAD||t===v.TR||t===v.TD||t===v.TH?(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode(),i._processStartTag(e)):pV(i,e)}function jfe(i,e){let t=e.tagID;t===v.CAPTION||t===v.TABLE||t===v.TBODY||t===v.TFOOT||t===v.THEAD||t===v.TR||t===v.TD||t===v.TH?i.openElements.hasInTableScope(t)&&(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode(),i.onEndTag(e)):mV(i,e)}function Wfe(i,e){switch(e.tagID){case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{js(i,e);break}case v.CAPTION:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{i.tmplInsertionModeStack[0]=$.IN_TABLE,i.insertionMode=$.IN_TABLE,Jf(i,e);break}case v.COL:{i.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,i.insertionMode=$.IN_COLUMN_GROUP,J6(i,e);break}case v.TR:{i.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,i.insertionMode=$.IN_TABLE_BODY,ox(i,e);break}case v.TD:case v.TH:{i.tmplInsertionModeStack[0]=$.IN_ROW,i.insertionMode=$.IN_ROW,sx(i,e);break}default:i.tmplInsertionModeStack[0]=$.IN_BODY,i.insertionMode=$.IN_BODY,Br(i,e)}}function Vfe(i,e){e.tagID===v.TEMPLATE&&ju(i,e)}function gV(i,e){i.openElements.tmplCount>0?(i.openElements.popUntilTagNamePopped(v.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode(),i.onEof(e)):Z6(i,e)}function qfe(i,e){e.tagID===v.HTML?Br(i,e):ix(i,e)}function bV(i,e){var t;if(e.tagID===v.HTML){if(i.fragmentContext||(i.insertionMode=$.AFTER_AFTER_BODY),i.options.sourceCodeLocationInfo&&i.openElements.tagIDs[0]===v.HTML){i._setEndLocation(i.openElements.items[0],e);let n=i.openElements.items[1];n&&!(!((t=i.treeAdapter.getNodeSourceCodeLocation(n))===null||t===void 0)&&t.endTag)&&i._setEndLocation(n,e)}}else ix(i,e)}function ix(i,e){i.insertionMode=$.IN_BODY,nx(i,e)}function Kfe(i,e){switch(e.tagID){case v.HTML:{Br(i,e);break}case v.FRAMESET:{i._insertElement(e,_e.HTML);break}case v.FRAME:{i._appendElement(e,_e.HTML),e.ackSelfClosing=!0;break}case v.NOFRAMES:{js(i,e);break}default:}}function $fe(i,e){e.tagID===v.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagId!==v.FRAMESET&&(i.insertionMode=$.AFTER_FRAMESET))}function Gfe(i,e){switch(e.tagID){case v.HTML:{Br(i,e);break}case v.NOFRAMES:{js(i,e);break}default:}}function Yfe(i,e){e.tagID===v.HTML&&(i.insertionMode=$.AFTER_AFTER_FRAMESET)}function Xfe(i,e){e.tagID===v.HTML?Br(i,e):ex(i,e)}function ex(i,e){i.insertionMode=$.IN_BODY,nx(i,e)}function Qfe(i,e){switch(e.tagID){case v.HTML:{Br(i,e);break}case v.NOFRAMES:{js(i,e);break}default:}}function Zfe(i,e){e.chars=Yi,i._insertCharacters(e)}function Jfe(i,e){i._insertCharacters(e),i.framesetOk=!1}function vV(i){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==_e.HTML&&!i._isIntegrationPoint(i.openElements.currentTagId,i.openElements.current);)i.openElements.pop()}function epe(i,e){if(q6(e))vV(i),i._startTagOutsideForeignContent(e);else{let t=i._getAdjustedCurrentElement(),n=i.treeAdapter.getNamespaceURI(t);n===_e.MATHML?Qw(e):n===_e.SVG&&(K6(e),Zw(e)),h0(e),e.selfClosing?i._appendElement(e,n):i._insertElement(e,n),e.ackSelfClosing=!0}}function tpe(i,e){if(e.tagID===v.P||e.tagID===v.BR){vV(i),i._endTagOutsideForeignContent(e);return}for(let t=i.openElements.stackTop;t>0;t--){let n=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(n)===_e.HTML){i._endTagOutsideForeignContent(e);break}let r=i.treeAdapter.getTagName(n);if(r.toLowerCase()===e.tagName){e.tagName=r,i.openElements.shortenToLength(t);break}}}var ipe=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),hMe=String.prototype.codePointAt!=null?(i,e)=>i.codePointAt(e):(i,e)=>(i.charCodeAt(e)&64512)===55296?(i.charCodeAt(e)-55296)*1024+i.charCodeAt(e+1)-56320+65536:i.charCodeAt(e);function eT(i,e){return function(n){let r,o=0,s="";for(;r=i.exec(n);)o!==r.index&&(s+=n.substring(o,r.index)),s+=e.get(r[0].charCodeAt(0)),o=r.index+1;return s+n.substring(o)}}var fMe=eT(/[&<>'"]/g,ipe),npe=eT(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),rpe=eT(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var vMe=new Set([ne.AREA,ne.BASE,ne.BASEFONT,ne.BGSOUND,ne.BR,ne.COL,ne.EMBED,ne.FRAME,ne.HR,ne.IMG,ne.INPUT,ne.KEYGEN,ne.LINK,ne.META,ne.PARAM,ne.SOURCE,ne.TRACK,ne.WBR]);function _V(i,e){return Yl.parse(i,e)}function yV(i,e,t){typeof i=="string"&&(t=e,e=i,i=null);let n=Yl.getFragmentParser(i,t);return n.tokenizer.write(e,!0),n.getFragment()}var ope=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),wV={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ax(i,e){let t=mpe(i),n=Of("type",{handlers:{root:spe,element:ape,text:lpe,comment:CV,doctype:cpe,raw:upe},unknown:hpe}),r={parser:t?new Yl(wV):Yl.getFragmentParser(void 0,wV),handle(a){n(a,r)},stitches:!1,options:e||{}};n(i,r),ep(r,ds());let o=t?r.parser.document:r.parser.getFragment(),s=s0(o,{file:r.options.file});return r.stitches&&Or(s,"comment",function(a,l,c){let d=a;if(d.value.stitch&&c&&l!==void 0){let u=c.children;return u[l]=d.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===i.type?s.children[0]:s}function xV(i,e){let t=-1;if(i)for(;++t<i.length;)e.handle(i[t])}function spe(i,e){xV(i.children,e)}function ape(i,e){fpe(i,e),xV(i.children,e),ppe(i,e)}function lpe(i,e){let t={type:$l.TokenType.CHARACTER,chars:i.value,location:x0(i)};ep(e,ds(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function cpe(i,e){let t={type:$l.TokenType.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:x0(i)};ep(e,ds(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function dpe(i,e){e.stitches=!0;let t=gpe(i);if("children"in i&&"children"in t){let n=ax({type:"root",children:i.children},e.options);t.children=n.children}CV({type:"comment",value:{stitch:t}},e)}function CV(i,e){let t=i.value,n={type:$l.TokenType.COMMENT,data:t,location:x0(i)};ep(e,ds(i)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function upe(i,e){if(e.parser.tokenizer.preprocessor.html="",e.parser.tokenizer.preprocessor.pos=-1,e.parser.tokenizer.preprocessor.lastGapPos=-2,e.parser.tokenizer.preprocessor.gapStack=[],e.parser.tokenizer.preprocessor.skipNextNewLine=!1,e.parser.tokenizer.preprocessor.lastChunkWritten=!1,e.parser.tokenizer.preprocessor.endOfChunkHit=!1,e.parser.tokenizer.preprocessor.isEol=!1,SV(e,ds(i)),e.parser.tokenizer.write(i.value,!1),e.parser.tokenizer._runParsingLoop(),e.parser.tokenizer.state===72||e.parser.tokenizer.state===78){e.parser.tokenizer.preprocessor.lastChunkWritten=!0;let t=e.parser.tokenizer._consume();e.parser.tokenizer._callState(t)}}function hpe(i,e){let t=i;if(e.options.passThrough&&e.options.passThrough.includes(t.type))dpe(t,e);else{let n="";throw ope.has(t.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+t.type+"` node"+n)}}function ep(i,e){SV(i,e);let t=i.parser.tokenizer.currentCharacterToken;t&&t.location&&(t.location.endLine=i.parser.tokenizer.preprocessor.line,t.location.endCol=i.parser.tokenizer.preprocessor.col+1,t.location.endOffset=i.parser.tokenizer.preprocessor.offset+1,i.parser.currentToken=t,i.parser._processToken(i.parser.currentToken)),i.parser.tokenizer.paused=!1,i.parser.tokenizer.inLoop=!1,i.parser.tokenizer.active=!1,i.parser.tokenizer.returnState=rn.DATA,i.parser.tokenizer.charRefCode=-1,i.parser.tokenizer.consumedAfterSnapshot=-1,i.parser.tokenizer.currentLocation=null,i.parser.tokenizer.currentCharacterToken=null,i.parser.tokenizer.currentToken=null,i.parser.tokenizer.currentAttr={name:"",value:""}}function SV(i,e){if(e&&e.offset!==void 0){let t={startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:-1,endCol:-1,endOffset:-1};i.parser.tokenizer.preprocessor.lineStartPos=-e.column+1,i.parser.tokenizer.preprocessor.droppedBufferSize=e.offset,i.parser.tokenizer.preprocessor.line=e.line,i.parser.tokenizer.currentLocation=t}}function fpe(i,e){if(e.parser.tokenizer.state===rn.PLAINTEXT)return;ep(e,ds(i));let t=e.parser.openElements.current,n="namespaceURI"in t?t.namespaceURI:vo.html;n===vo.html&&i.tagName==="svg"&&(n=vo.svg);let r=P6(xt(ue({},i),{children:[]}),{space:n===vo.svg?"svg":"html"}),o="attrs"in r?r.attrs:[],s={type:$l.TokenType.START_TAG,tagName:i.tagName,tagID:Zf.getTagID(i.tagName),selfClosing:!1,ackSelfClosing:!1,attrs:o,location:x0(i)};e.parser.currentToken=s,e.parser._processToken(e.parser.currentToken),e.parser.tokenizer.lastStartTagName=i.tagName}function ppe(i,e){if(!e.parser.tokenizer.inForeignNode&&jw.includes(i.tagName)||e.parser.tokenizer.state===rn.PLAINTEXT)return;ep(e,zu(i));let t={type:$l.TokenType.END_TAG,tagName:i.tagName,tagID:Zf.getTagID(i.tagName),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:x0(i)};e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken),t.tagName===e.parser.tokenizer.lastStartTagName&&(e.parser.tokenizer.state===rn.RCDATA||e.parser.tokenizer.state===rn.RAWTEXT||e.parser.tokenizer.state===rn.SCRIPT_DATA)&&(e.parser.tokenizer.state=rn.DATA)}function mpe(i){let e=i.type==="root"?i.children[0]:i;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName==="html"))}function x0(i){let e=ds(i)||{line:void 0,column:void 0,offset:void 0},t=zu(i)||{line:void 0,column:void 0,offset:void 0};return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:t.line,endCol:t.column,endOffset:t.offset}}function gpe(i){return"children"in i?Bs(xt(ue({},i),{children:[]})):Bs(i)}function lx(i){return function(e,t){return ax(e,xt(ue({},i),{file:t}))}}function tT(i,e){return EV(i,e||{})||{type:"root",children:[]}}function EV(i,e){let t=bpe(i,e);return t&&e.afterTransform&&e.afterTransform(i,t),t}function bpe(i,e){switch(i.nodeType){case 1:return wpe(i,e);case 3:return _pe(i);case 8:return ype(i);case 9:return kV(i,e);case 10:return vpe();case 11:return kV(i,e);default:return}}function kV(i,e){return{type:"root",children:TV(i,e)}}function vpe(){return{type:"doctype"}}function _pe(i){return{type:"text",value:i.nodeValue||""}}function ype(i){return{type:"comment",value:i.nodeValue||""}}function wpe(i,e){let t=i.namespaceURI,n=t===vo.svg?o0:r0,r=t===vo.html?i.tagName.toLowerCase():i.tagName,o=t===vo.html&&r==="template"?i.content:i,s=i.getAttributeNames(),a={},l=-1;for(;++l<s.length;)a[s[l]]=i.getAttribute(s[l])||"";return n(r,a,TV(o,e))}function TV(i,e){let t=i.childNodes,n=[],r=-1;for(;++r<t.length;){let o=EV(t[r],e);o!==void 0&&n.push(o)}return n}var xpe=new DOMParser;function IV(i,e){let t=e!=null&&e.fragment?Cpe(i):xpe.parseFromString(i,"text/html");return tT(t)}function Cpe(i){let e=document.createElement("template");return e.innerHTML=i,e.content}var cx=function(i,e,t){let n=La(t);if(!i||!i.type||!i.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=i.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<i.children.length;)if(n(i.children[e],e,i))return i.children[e]};var Xl=function(i){if(i==null)return Epe;if(typeof i=="string")return kpe(i);if(typeof i=="object")return Spe(i);if(typeof i=="function")return iT(i);throw new Error("Expected function, string, or array as `test`")};function Spe(i){let e=[],t=-1;for(;++t<i.length;)e[t]=Xl(i[t]);return iT(n);function n(...r){let o=-1;for(;++o<e.length;)if(e[o].apply(this,r))return!0;return!1}}function kpe(i){return iT(e);function e(t){return t.tagName===i}}function iT(i){return e;function e(t,n,r){return!!(Tpe(t)&&i.call(this,t,typeof n=="number"?n:void 0,r||void 0))}}function Epe(i){return!!(i&&typeof i=="object"&&"type"in i&&i.type==="element"&&"tagName"in i&&typeof i.tagName=="string")}function Tpe(i){return i!==null&&typeof i=="object"&&"type"in i&&"tagName"in i}var LV=/\n/g,AV=/[\t ]+/g,nT=Xl("br"),DV=Xl(Rpe),Ipe=Xl("p"),MV=Xl("tr"),Lpe=Xl(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Npe,Ppe]),NV=Xl(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function C0(i,e={}){let t="children"in i?i.children:[],n=NV(i),r=OV(i,{whitespace:e.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];(i.type==="text"||i.type==="comment")&&o.push(...PV(i,{whitespace:r,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<t.length;)o.push(...RV(t[s],i,{whitespace:r,breakBefore:s?void 0:n,breakAfter:s<t.length-1?nT(t[s+1]):n}));let a=[],l;for(s=-1;++s<o.length;){let c=o[s];typeof c=="number"?l!==void 0&&c>l&&(l=c):c&&(l!==void 0&&l>-1&&a.push(`
`.repeat(l)||" "),l=-1,a.push(c))}return a.join("")}function RV(i,e,t){return i.type==="element"?Ape(i,e,t):i.type==="text"?t.whitespace==="normal"?PV(i,t):Dpe(i):[]}function Ape(i,e,t){let n=OV(i,t),r=i.children||[],o=-1,s=[];if(Lpe(i))return s;let a,l;for(nT(i)||MV(i)&&cx(e,i,MV)?l=`
`:Ipe(i)?(a=2,l=2):NV(i)&&(a=1,l=1);++o<r.length;)s=s.concat(RV(r[o],i,{whitespace:n,breakBefore:o?void 0:a,breakAfter:o<r.length-1?nT(r[o+1]):l}));return DV(i)&&cx(e,i,DV)&&s.push(" "),a&&s.unshift(a),l&&s.push(l),s}function PV(i,e){let t=String(i.value),n=[],r=[],o=0;for(;o<=t.length;){LV.lastIndex=o;let l=LV.exec(t),c=l&&"index"in l?l.index:t.length;n.push(Mpe(t.slice(o,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?e.breakBefore:!0,c===t.length?e.breakAfter:!0)),o=c+1}let s=-1,a;for(;++s<n.length;)n[s].charCodeAt(n[s].length-1)===8203||s<n.length-1&&n[s+1].charCodeAt(0)===8203?(r.push(n[s]),a=void 0):n[s]?(typeof a=="number"&&r.push(a),r.push(n[s]),a=0):(s===0||s===n.length-1)&&r.push(0);return r}function Dpe(i){return[String(i.value)]}function Mpe(i,e,t){let n=[],r=0,o;for(;r<i.length;){AV.lastIndex=r;let s=AV.exec(i);o=s?s.index:i.length,!r&&!o&&s&&!e&&n.push(""),r!==o&&n.push(i.slice(r,o)),r=s?o+s[0].length:o}return r!==o&&!t&&n.push(""),n.join(" ")}function OV(i,e){if(i.type==="element"){let t=i.properties||{};switch(i.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap";default:}}return e.whitespace}function Npe(i){return!!(i.properties||{}).hidden}function Rpe(i){return i.tagName==="td"||i.tagName==="th"}function Ppe(i){return i.tagName==="dialog"&&!(i.properties||{}).open}var Ope={},Fpe=[];function dx(i){let e=i||Ope;return function(t,n){Au(t,"element",function(r,o){let s=Array.isArray(r.properties.className)?r.properties.className:Fpe,a=s.includes("language-math"),l=s.includes("math-display"),c=s.includes("math-inline"),d=l;if(!a&&!l&&!c)return;let u=o[o.length-1],h=r;if(r.tagName==="code"&&a&&u&&u.type==="element"&&u.tagName==="pre"&&(h=u,u=o[o.length-2],d=!0),!u)return;let f=C0(h,{whitespace:"pre"}),m;try{m=Gf.renderToString(f,xt(ue({},e),{displayMode:d,throwOnError:!0}))}catch(w){let _=w,E=_.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...o,r],cause:_,place:r.position,ruleId:E,source:"rehype-katex"}),E==="parseerror"?m=Gf.renderToString(f,xt(ue({},e),{displayMode:d,strict:"ignore",throwOnError:!1})):m=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(e.errorColor||"#cc0000"),title:String(w)},children:[{type:"text",value:f}]}]}typeof m=="string"&&(m=IV(m,{fragment:!0}).children);let g=u.children.indexOf(h);return u.children.splice(g,1,...m),Pf})}}var FV={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}};var zpe="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",Bpe=/-[a-z]/g,Hpe=/%c(?:([-+])(\d+))?/g,Upe=/%x/g,jpe={2:!0,1:!1,0:null},Wpe={};function rT(i,e){let t=e||Wpe,n=t.onerror,r=i instanceof td?i:new td(i),o=t.fragment?yV:_V,s=String(r),a=o(s,{sourceCodeLocationInfo:!0,onParseError:t.onerror?l:null,scriptingEnabled:!1});return s0(a,{file:r,space:t.space,verbose:t.verbose});function l(c){let d=c.code,u=Vpe(d),h=t[u],f=h==null?!0:h,m=typeof f=="number"?f:f?1:0;if(m){let w=FV[u];let _=new Mn(g(w.reason),{place:{start:{line:c.startLine,column:c.startCol,offset:c.startOffset},end:{line:c.endLine,column:c.endCol,offset:c.endOffset}},ruleId:d,source:"hast-util-from-html"});r.path&&(_.file=r.path,_.name=r.path+":"+_.name),_.fatal=jpe[m],_.note=g(w.description),_.url=w.url===!1?void 0:zpe+d,n(_)}function g(w){return w.replace(Hpe,_).replace(Upe,E);function _(A,L,O){let U=(O?Number.parseInt(O,10):0)*(L==="-"?-1:1),Q=s.charAt(c.startOffset+U);return Kpe(Q)}function E(){return $pe(s.charCodeAt(c.startOffset))}}}}function Vpe(i){return i.replace(Bpe,qpe)}function qpe(i){return i.charAt(1).toUpperCase()}function Kpe(i){return i==="`"?"` ` `":i}function $pe(i){return"0x"+i.toString(16).toUpperCase()}function ux(i){let e=this,o=ue(ue({},e.data("settings")),i),{emitParseErrors:t}=o,n=lo(o,["emitParseErrors"]);e.parser=r;function r(s,a){return rT(s,xt(ue({},n),{onerror:t?function(l){a.path&&(l.name=a.path+":"+l.name,l.file=a.path),a.messages.push(l)}:void 0}))}}var Wu=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ws={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Wu,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Wu],h2:[["id","footnote-label"],["className","sr-only"]],img:[...Wu,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Wu,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Wu],table:[...Wu],ul:[...Wu,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","disabled","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rel","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","target","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]};var wd={}.hasOwnProperty;function oT(i,e){let t={type:"root",children:[]},n={schema:e?ue(ue({},Ws),e):Ws,stack:[]},r=BV(n,i);return r&&(Array.isArray(r)?r.length===1?t=r[0]:t.children=r:t=r),t}function BV(i,e){if(e&&typeof e=="object"){let t=e;switch(typeof t.type=="string"?t.type:""){case"comment":return Gpe(i,t);case"doctype":return Ype(i,t);case"element":return Xpe(i,t);case"root":return Qpe(i,t);case"text":return Zpe(i,t);default:}}}function Gpe(i,e){if(i.schema.allowComments){let t=typeof e.value=="string"?e.value:"",n=t.indexOf("-->"),o={type:"comment",value:n<0?t:t.slice(0,n)};return S0(o,e),o}}function Ype(i,e){if(i.schema.allowDoctypes){let t={type:"doctype"};return S0(t,e),t}}function Xpe(i,e){let t=typeof e.tagName=="string"?e.tagName:"";i.stack.push(t);let n=HV(i,e.children),r=Jpe(i,e.properties);i.stack.pop();let o=!1;if(t.length>0&&t!=="*"&&(!i.schema.tagNames||i.schema.tagNames.includes(t))&&(o=!0,i.schema.ancestors&&wd.call(i.schema.ancestors,t))){let a=i.schema.ancestors[t],l=-1;for(o=!1;++l<a.length;)i.stack.includes(a[l])&&(o=!0)}if(!o)return i.schema.strip&&!i.schema.strip.includes(t)?n:void 0;let s={type:"element",tagName:t,properties:r,children:n};return S0(s,e),s}function Qpe(i,e){let n={type:"root",children:HV(i,e.children)};return S0(n,e),n}function Zpe(i,e){let n={type:"text",value:typeof e.value=="string"?e.value:""};return S0(n,e),n}function HV(i,e){let t=[];if(Array.isArray(e)){let n=e,r=-1;for(;++r<n.length;){let o=BV(i,n[r]);o&&(Array.isArray(o)?t.push(...o):t.push(o))}}return t}function Jpe(i,e){let t=i.stack[i.stack.length-1],n=i.schema.attributes,r=i.schema.required,o=n&&wd.call(n,t)?n[t]:void 0,s=n&&wd.call(n,"*")?n["*"]:void 0,a=e&&typeof e=="object"?e:{},l={},c;for(c in a)if(wd.call(a,c)){let d;if(o&&(d=zV(o,c)),!d&&s&&(d=zV(s,c)),d){let u=a[c],h=Array.isArray(u)?eme(i,d,c,u):UV(i,d,c,u);h!=null&&(l[c]=h)}}if(r&&wd.call(r,t)){let d=r[t];for(c in d)wd.call(d,c)&&!wd.call(l,c)&&(l[c]=d[c])}return l}function eme(i,e,t,n){let r=-1,o=[];for(;++r<n.length;){let s=UV(i,e,t,n[r]);(typeof s=="number"||typeof s=="string")&&o.push(s)}return o}function UV(i,e,t,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&tme(i,t,n)){if(typeof e=="object"&&e.length>1){let r=!1,o=0;for(;++o<e.length;){let s=e[o];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(n))){r=!0;break}}else if(s===n){r=!0;break}}if(!r)return}return i.schema.clobber&&i.schema.clobberPrefix&&i.schema.clobber.includes(t)?i.schema.clobberPrefix+n:n}}function tme(i,e,t){let n=i.schema.protocols&&wd.call(i.schema.protocols,e)?i.schema.protocols[e]:void 0;if(!n||n.length===0)return!0;let r=String(t),o=r.indexOf(":"),s=r.indexOf("?"),a=r.indexOf("#"),l=r.indexOf("/");if(o<0||l>-1&&o>l||s>-1&&o>s||a>-1&&o>a)return!0;let c=-1;for(;++c<n.length;){let d=n[c];if(o===d.length&&r.slice(0,d.length)===d)return!0}return!1}function S0(i,e){let t=Zg(e);e.data&&(i.data=Bs(e.data)),t&&(i.position=t)}function zV(i,e){let t,n=-1;for(;++n<i.length;){let r=i[n],o=typeof r=="string"?r:r[0];if(o===e)return r;o==="data*"&&(t=r)}if(e.length>4&&e.slice(0,4).toLowerCase()==="data")return t}function hx(i){return function(e){return oT(e,i)}}function jV(i,e){if(i=i.replace(e.subset?ime(e.subset):/["&'<>`]/g,n),e.subset||e.escapeOnly)return i;return i.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,t).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,n);function t(r,o,s){return e.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function n(r,o,s){return e.format(r.charCodeAt(0),s.charCodeAt(o+1),e)}}function ime(i){let e=[],t=-1;for(;++t<i.length;)e.push(i[t].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}function WV(i,e,t){let n="&#x"+i.toString(16).toUpperCase();return t&&e&&!/[\dA-Fa-f]/.test(String.fromCharCode(e))?n:n+";"}function VV(i,e,t){let n="&#"+String(i);return t&&e&&!/\d/.test(String.fromCharCode(e))?n:n+";"}var qV=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var fx={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var KV=["cent","copy","divide","gt","lt","not","para","times"];var $V={}.hasOwnProperty,sT={},px;for(px in fx)$V.call(fx,px)&&(sT[fx[px]]=px);function GV(i,e,t,n){let r=String.fromCharCode(i);if($V.call(sT,r)){let o=sT[r],s="&"+o;return t&&qV.includes(o)&&!KV.includes(o)&&(!n||e&&e!==61&&/[^\da-z]/i.test(String.fromCharCode(e)))?s:s+";"}return""}function YV(i,e,t){let n=WV(i,e,t.omitOptionalSemicolons),r;if((t.useNamedReferences||t.useShortestReferences)&&(r=GV(i,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!r)&&t.useShortestReferences){let o=VV(i,e,t.omitOptionalSemicolons);o.length<n.length&&(n=o)}return r&&(!t.useShortestReferences||r.length<n.length)?r:n}function Ql(i,e){return jV(i,Object.assign({format:YV},e))}function XV(i,e,t,n){return n.settings.bogusComments?"<?"+Ql(i.value,Object.assign({},n.settings.characterReferences,{subset:[">"]}))+">":"<!--"+i.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,r)+"-->";function r(o){return Ql(o,Object.assign({},n.settings.characterReferences,{subset:["<",">"]}))}}function QV(i,e,t,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}var nme=/[ \t\n\f\r]/g;function Vu(i){return typeof i=="object"?i.type==="text"?ZV(i.value):!1:ZV(i)}function ZV(i){return i.replace(nme,"")===""}var In=JV(1),aT=JV(-1),rme=[];function JV(i){return e;function e(t,n,r){let o=t?t.children:rme,s=(n||0)+i,a=o[s];if(!r)for(;a&&Vu(a);)s+=i,a=o[s];return a}}var ome={}.hasOwnProperty;function mx(i){return e;function e(t,n,r){return ome.call(i,t.tagName)&&i[t.tagName](t,n,r)}}var k0=mx({body:ame,caption:lT,colgroup:lT,dd:ume,dt:dme,head:lT,html:sme,li:cme,optgroup:hme,option:fme,p:lme,rp:eq,rt:eq,tbody:mme,td:tq,tfoot:gme,th:tq,thead:pme,tr:bme});function lT(i,e,t){let n=In(t,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Vu(n.value.charAt(0)))}function sme(i,e,t){let n=In(t,e);return!n||n.type!=="comment"}function ame(i,e,t){let n=In(t,e);return!n||n.type!=="comment"}function lme(i,e,t){let n=In(t,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function cme(i,e,t){let n=In(t,e);return!n||n.type==="element"&&n.tagName==="li"}function dme(i,e,t){let n=In(t,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function ume(i,e,t){let n=In(t,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function eq(i,e,t){let n=In(t,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function hme(i,e,t){let n=In(t,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function fme(i,e,t){let n=In(t,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function pme(i,e,t){let n=In(t,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function mme(i,e,t){let n=In(t,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function gme(i,e,t){return!In(t,e)}function bme(i,e,t){let n=In(t,e);return!n||n.type==="element"&&n.tagName==="tr"}function tq(i,e,t){let n=In(t,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}var iq=mx({body:yme,colgroup:wme,head:_me,html:vme,tbody:xme});function vme(i){let e=In(i,-1);return!e||e.type!=="comment"}function _me(i){let e=i.children,t=[],n=-1;for(;++n<e.length;){let r=e[n];if(r.type==="element"&&(r.tagName==="title"||r.tagName==="base")){if(t.includes(r.tagName))return!1;t.push(r.tagName)}}return e.length>0}function yme(i){let e=In(i,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Vu(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function wme(i,e,t){let n=aT(t,e),r=In(i,-1,!0);return t&&n&&n.type==="element"&&n.tagName==="colgroup"&&k0(n,t.children.indexOf(n),t)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function xme(i,e,t){let n=aT(t,e),r=In(i,-1);return t&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&k0(n,t.children.indexOf(n),t)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}var gx={name:[[`
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function nq(i,e,t,n){let r=n.schema,o=r.space==="svg"?!1:n.settings.omitOptionalTags,s=r.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(i.tagName.toLowerCase()),a=[],l;r.space==="html"&&i.tagName==="svg"&&(n.schema=hs);let c=Cme(n,i.properties),d=n.all(r.space==="html"&&i.tagName==="template"?i.content:i);return n.schema=r,d&&(s=!1),(c||!o||!iq(i,e,t))&&(a.push("<",i.tagName,c?" "+c:""),s&&(r.space==="svg"||n.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!n.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(d),!s&&(!o||!k0(i,e,t))&&a.push("</"+i.tagName+">"),a.join("")}function Cme(i,e){let t=[],n=-1,r;if(e){for(r in e)if(e[r]!==null&&e[r]!==void 0){let o=Sme(i,r,e[r]);o&&t.push(o)}}for(;++n<t.length;){let o=i.settings.tightAttributes?t[n].charAt(t[n].length-1):void 0;n!==t.length-1&&o!=='"'&&o!=="'"&&(t[n]+=" ")}return t.join("")}function Sme(i,e,t){let n=ql(i.schema,e),r=i.settings.allowParseErrors&&i.schema.space==="html"?0:1,o=i.settings.allowDangerousCharacters?0:1,s=i.quote,a;if(n.overloadedBoolean&&(t===n.attribute||t==="")?t=!0:(n.boolean||n.overloadedBoolean&&typeof t!="string")&&(t=!!t),t==null||t===!1||typeof t=="number"&&Number.isNaN(t))return"";let l=Ql(n.attribute,Object.assign({},i.settings.characterReferences,{subset:gx.name[r][o]}));return t===!0||(t=Array.isArray(t)?(n.commaSeparated?Bw:Hw)(t,{padLeft:!i.settings.tightCommaSeparatedLists}):String(t),i.settings.collapseEmptyAttributes&&!t)?l:(i.settings.preferUnquoted&&(a=Ql(t,Object.assign({},i.settings.characterReferences,{attribute:!0,subset:gx.unquoted[r][o]}))),a!==t&&(i.settings.quoteSmart&&Rf(t,s)>Rf(t,i.alternative)&&(s=i.alternative),a=s+Ql(t,Object.assign({},i.settings.characterReferences,{subset:(s==="'"?gx.single:gx.double)[r][o],attribute:!0}))+s),l+(a&&"="+a))}function bx(i,e,t,n){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?i.value:Ql(i.value,Object.assign({},n.settings.characterReferences,{subset:["<","&"]}))}function rq(i,e,t,n){return n.settings.allowDangerousHtml?i.value:bx(i,e,t,n)}function oq(i,e,t,n){return n.all(i)}var sq=Of("type",{invalid:kme,unknown:Eme,handlers:{comment:XV,doctype:QV,element:nq,raw:rq,root:oq,text:bx}});function kme(i){throw new Error("Expected node, not `"+i+"`")}function Eme(i){let e=i;throw new Error("Cannot compile unknown node `"+e.type+"`")}var Tme={},Ime={},Lme=[];function cT(i,e){let t=e||Tme,n=t.quote||'"',r=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:Ame,all:Dme,settings:{omitOptionalTags:t.omitOptionalTags||!1,allowParseErrors:t.allowParseErrors||!1,allowDangerousCharacters:t.allowDangerousCharacters||!1,quoteSmart:t.quoteSmart||!1,preferUnquoted:t.preferUnquoted||!1,tightAttributes:t.tightAttributes||!1,upperDoctype:t.upperDoctype||!1,tightDoctype:t.tightDoctype||!1,bogusComments:t.bogusComments||!1,tightCommaSeparatedLists:t.tightCommaSeparatedLists||!1,tightSelfClosing:t.tightSelfClosing||!1,collapseEmptyAttributes:t.collapseEmptyAttributes||!1,allowDangerousHtml:t.allowDangerousHtml||!1,voids:t.voids||jw,characterReferences:t.characterReferences||Ime,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?hs:Kl,quote:n,alternative:r}.one(Array.isArray(i)?{type:"root",children:i}:i,void 0,void 0)}function Ame(i,e,t){return sq(i,e,t,this)}function Dme(i){let e=[],t=i&&i.children||Lme,n=-1;for(;++n<t.length;)e[n]=this.one(t[n],n,i);return e.join("")}function vx(i){let e=this,t=ue(ue({},e.data("settings")),i);e.compiler=n;function n(r){return cT(r,t)}}var Mme={inline:["$","$"],display:["$$","$$"]};function Nme(i,e){e===void 0&&(e=Mme);for(var t=i.querySelectorAll(".katex-mathml + .katex-html"),n=0;n<t.length;n++){var r=t[n];r.remove?r.remove():r.parentNode&&r.parentNode.removeChild(r)}for(var o=i.querySelectorAll(".katex-mathml"),s=0;s<o.length;s++){var a=o[s],l=a.querySelector("annotation");l&&(a.replaceWith?a.replaceWith(l):a.parentNode&&a.parentNode.replaceChild(l,a),l.innerHTML=e.inline[0]+l.innerHTML+e.inline[1])}for(var c=i.querySelectorAll(".katex-display annotation"),d=0;d<c.length;d++){var u=c[d];u.innerHTML=e.display[0]+u.innerHTML.substr(e.inline[0].length,u.innerHTML.length-e.inline[0].length-e.inline[1].length)+e.display[1]}return i}function aq(i){var e=i instanceof Element?i:i.parentElement;return e&&e.closest(".katex")}document.addEventListener("copy",function(i){var e=window.getSelection();if(!(e.isCollapsed||!i.clipboardData)){var t=i.clipboardData,n=e.getRangeAt(0),r=aq(n.startContainer);r&&n.setStartBefore(r);var o=aq(n.endContainer);o&&n.setEndAfter(o);var s=n.cloneContents();if(s.querySelector(".katex-mathml")){var a=Array.prototype.map.call(s.childNodes,l=>l instanceof Text?l.textContent:l.outerHTML).join("");t.setData("text/html",a),t.setData("text/plain",Nme(s).textContent),i.preventDefault()}}});function dT(i,e){let n=(e||{}).force||!1;Or(i,r);function r(o){n?delete o.position:o.position=void 0}}s_();gT();wT();ST();ET();AT();XT();iI();lI();uI();pI();mI();NI();_2();hb();TL();var yyt=qr(DL());CA();K0();e1();zC();VC();tS();A8();z8();var Lyt=qr(U8());W8();c7();f7();v7();_7();O7();V7();Y7();sD();aD();hD();kp();SD();rC();LD();BD();HD();GD();t4();SM();kM();var Qyt=qr(IM());LM();DM();FM();jM();VM();Rs();qM();$M();GM();YM();XM();QM();ZM();JM();eN();Vi();var wve={autoFormatTriggerCharacters:[`
`],provideOnTypeFormattingEdits(i,e,t,n,r){return t===`
`?xve(i,e):[]}};function xve(i,e){let t=i.getLinesContent(),n=e.lineNumber-1,r=t[n],o=t[n-1],s=tN(o);if(Cve(t,n)){let a=e.lineNumber<t.length&&$X(r);return a?[Sve(e,s,a)]:[]}return[]}function Cve(i,e){let t=i[e-1],n=tN(t),r=qX(t);if(KX(r)==="do"||r.includes("fn")&&KX(r)==="->"){let o=i.slice(e+1).filter(s=>!$X(s)).find(s=>tN(s)===n);if(o){let[s]=qX(o);if(["after","else","catch","rescue","end"].includes(s))return!1}return!0}return!1}function Sve(i,e,t){return t?{range:new hi.Range(i.lineNumber+1,1,i.lineNumber+1,1),text:`${e}end
`}:{range:new hi.Range(i.lineNumber,i.column,i.lineNumber,i.column),text:`
${e}end`}}function tN(i){let[e]=i.match(/^\s*/);return e}function qX(i){return i.replace(/#.*/,"").match(/->|[\w:]+/g)||[]}function KX(i){return i[i.length-1]}function $X(i){return i.trim()===""}var GX=wve;var kve={keywords:["case","if","begin","end","when","of","fun","maybe","else","try","catch","receive","after"],attributes:["-module","-record","-export","-spec","-include","-include_lib","-export","-undef","-ifdef","-ifndef","-else","-endif","-if","-elif","-define"],operators:["=","==","=:=","/=","=/=",">","<","=<",">=","+","++","-","--","*","/","!","and","or","not","xor","andalso","orelse","bnot","div","rem","band","bor","bxor","bsl","bsr",":=","=>","->","?=","<-","||"],builtins:["error","exit"],brackets:[["(",")","delimiter.parenthesis"],["{","}","delimiter.curly"],["[","]","delimiter.square"]],symbols:/[=><~&|+\-*\/%@#]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/(-[a-z_]+)/,{cases:{"@attributes":"keyword","@default":"identifier"}}],[/(\?[a-zA-Z_0-9]+)/,"constant"],[/[A-Z_][a-z0-9_]*/,"identifier"],[/[a-z_][\w\-']*/,{cases:{"@builtins":"predefined.identifier","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/[()\[\]\{\}]/,"@brackets"],[/@symbols/,{cases:{"@operators":"predefined.operator","@default":"operator"}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/16#[0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/%.*$/,"comment"]]}},YX=kve;var Eve={comments:{lineComment:"%"},brackets:[["(",")"],["[","]"],["{","}"]],autoClosingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:'<<"',close:'">>',notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"'",close:"'"},{open:'"',close:'"'}],indentationRules:{increaseIndentPattern:/^((?!%).)*([{([]|->|after|begin|case|catch|fun|if|of|try|when|(\|\|.*))\s*$/,decreaseIndentPattern:/^\s*([)}]]|end|->\s*$)/,indentNextLinePattern:/^((?!%).)*(::|=>|:=|<-)\s*$/}},XX=Eve;var iN={background:"#282c34",default:"#c4cad6",lightRed:"#e06c75",blue:"#61afef",gray:"#8c92a3",green:"#98c379",purple:"#c678dd",red:"#be5046",teal:"#56b6c2",peach:"#d19a66"},nv={background:"#fafafa",default:"#304254",lightRed:"#e45649",blue:"#4078F2",gray:"#707177",green:"#50a14f",purple:"#a726a4",red:"#ca1243",teal:"#56b6c2",peach:"#986801"},QX=i=>[{token:"",foreground:i.default},{token:"variable",foreground:i.lightRed},{token:"constant",foreground:i.blue},{token:"constant.character.escape",foreground:i.blue},{token:"comment",foreground:i.gray},{token:"number",foreground:i.blue},{token:"regexp",foreground:i.lightRed},{token:"type",foreground:i.lightRed},{token:"string",foreground:i.green},{token:"keyword",foreground:i.purple},{token:"operator",foreground:i.peach},{token:"delimiter.bracket.embed",foreground:i.red},{token:"sigil",foreground:i.teal},{token:"function",foreground:i.blue},{token:"function.call",foreground:i.default},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"keyword.md",foreground:i.lightRed},{token:"keyword.table",foreground:i.lightRed},{token:"string.link.md",foreground:i.blue},{token:"variable.md",foreground:i.teal},{token:"string.md",foreground:i.default},{token:"variable.source.md",foreground:i.default},{token:"tag",foreground:i.lightRed},{token:"metatag",foreground:i.lightRed},{token:"attribute.name",foreground:i.peach},{token:"attribute.value",foreground:i.green},{token:"string.key",foreground:i.lightRed},{token:"keyword.json",foreground:i.blue},{token:"operator.sql",foreground:i.purple}],ZX={base:"vs-dark",inherit:!1,rules:QX(iN),colors:{"editor.background":iN.background,"editor.foreground":iN.default,"editorLineNumber.foreground":"#636d83","editorCursor.foreground":"#636d83","editor.selectionBackground":"#3e4451","editor.findMatchHighlightBackground":"#528bff3d","editorSuggestWidget.background":"#21252b","editorSuggestWidget.border":"#181a1f","editorSuggestWidget.selectedBackground":"#2c313a","input.background":"#1b1d23","input.border":"#181a1f","editorBracketMatch.border":"#282c34","editorBracketMatch.background":"#3e4451"}},JX={base:"vs",inherit:!1,rules:QX(nv),colors:{"editor.background":nv.background,"editor.foreground":nv.default,"editorLineNumber.foreground":"#9d9d9f","editorCursor.foreground":"#526fff","editor.selectionBackground":"#e5e5e6","editor.findMatchHighlightBackground":"#526fff33","editorSuggestWidget.highlightForeground":nv.default,"editorSuggestWidget.focusHighlightForeground":"#0431fa","editorSuggestWidget.selectedForeground":nv.default,"editorSuggestWidget.background":"#eaeaeb","editorSuggestWidget.border":"#dbdbdc","editorSuggestWidget.selectedBackground":"#ffffff","input.background":"#ffffff","input.border":"#dbdbdc","editorBracketMatch.border":"#fafafa","editorBracketMatch.background":"#e5e5e6"}};kne();var eQ="settings",rv={normal:14,large:16},Tve={default:"default",emacs:"emacs",vim:"vim"},dm={default:"default",light:"light"},Ive={editor_auto_completion:!0,editor_auto_signature:!0,editor_font_size:rv.normal,editor_theme:dm.default,editor_markdown_word_wrap:!0,editor_mode:Tve.default,custom_view_show_section:!0,custom_view_show_markdown:!0,custom_view_show_output:!0,custom_view_spotlight:!1},nN=class{constructor(){this._subscribers=[],this._settings=Ive,this._loadSettings()}get(){return this._settings}update(e){let t=this._settings;this._settings=ue(ue({},this._settings),e),this._subscribers.forEach(n=>n(this._settings,t)),this._storeSettings()}getAndSubscribe(e){return this._subscribers.push(e),e(this._settings),()=>{this.unsubscribe(e)}}unsubscribe(e){let t=this._subscribers.indexOf(e);t!==-1&&this._subscribers.splice(t,1)}_loadSettings(){let e=ku(eQ);e&&(Object.values(dm).includes(e.editor_theme)||delete e.editor_theme,this._settings=ue(ue({},this._settings),e))}_storeSettings(){Af(eQ,this._settings)}},sn=new nN;window.MonacoEnvironment={globalAPI:!0,getWorkerUrl(i,e){return e==="json"?"/assets/language/json/json.worker.js":"/assets/editor/editor.worker.js"}};if(w_.prototype.finish){let i=w_.prototype.finish;w_.prototype.finish=function(...e){let t=i.apply(this,e);if(t._getEOL)t._getEOL=function(n){return`
`};else throw new Error("failed to override line endings to LF");return t}}else throw new Error("failed to override line endings to LF");Sa.registerOnTypeFormattingEditProvider("elixir",GX);Sa.register({id:"erlang"});Sa.setMonarchTokensProvider("erlang",YX);Sa.setLanguageConfiguration("erlang",XX);Cu.defineTheme("default",ZX);Cu.defineTheme("light",JX);document.fonts.addEventListener("loadingdone",i=>{i.fontfaces.some(t=>t.family.includes("JetBrains Mono"))&&Cu.remeasureFonts()});var rN=null;sn.getAndSubscribe(i=>{rN&&rN.dispose(),rN=Sa.registerCompletionItemProvider("elixir",{triggerCharacters:i.editor_auto_completion?["."]:[],provideCompletionItems:(e,t,n,r)=>e.__getCompletionItems__?e.__getCompletionItems__(e,t):null})});Sa.registerHoverProvider("elixir",{provideHover:(i,e,t)=>i.__getHover__?i.__getHover__(i,e):null});Sa.registerSignatureHelpProvider("elixir",{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:(i,e,t,n)=>i.__getSignatureHelp__?i.__getSignatureHelp__(i,e):null});Sa.registerDocumentFormattingEditProvider("elixir",{provideDocumentFormattingEdits:(i,e,t)=>i.__getDocumentFormattingEdits__?i.__getDocumentFormattingEdits__(i):null});var hi=Ns;function um(i,e){if(!um.initialized){let t=sn.get();Cu.create(document.createElement("div"),{theme:t.editor_theme}),um.initialized=!0}return Cu.colorize(i,e).then(t=>t.replace(/<br\/>$/,""))}var cQ=qr(rQ()),dQ=qr(sQ()),oN=qr(lQ());function p4(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function Jd(i){return i.matches&&i.matches("input, textarea, [contenteditable]")}function sN(i){let e=i.getBoundingClientRect();return e.bottom>=0&&e.top<=window.innerHeight}function hm(i){return i.offsetParent===null}function aN(i){return!hm(i)&&sN(i)}function uQ(i,e,t){return Math.min(Math.max(i,e),t)}function hQ(i){let e=window.getComputedStyle(i),t=parseInt(e.lineHeight,10);if(Number.isNaN(t)){let n=i.cloneNode();n.innerHTML="<br>",i.appendChild(n);let r=n.clientHeight;n.innerHTML="<br><br>";let o=n.clientHeight;return i.removeChild(n),o-r}else return t}function fQ(i){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)}function eu(i){let{height:e}=i.getBoundingClientRect();e<window.innerHeight?i.scrollIntoView({behavior:"smooth",block:"center"}):i.scrollIntoView({behavior:"smooth",block:"start"})}function pQ(i){return Math.abs(i.scrollHeight-i.clientHeight-i.scrollTop)<1}function ov(i){i.scrollTop=i.scrollHeight}function mQ(i){return btoa(unescape(encodeURIComponent(i)))}function gQ(i){return decodeURIComponent(escape(atob(i)))}function m4(){return vQ(24)}function bQ(){return vQ(40)}function vQ(i){let e=new Uint8Array(i);crypto.getRandomValues(e);let t=String.fromCharCode(...e);return btoa(t)}function g4(i){return(0,cQ.default)(i).toString(oN.default)}function _Q(i){return(0,dQ.default)(i).toString(oN.default)}function b4(i){let e=document.querySelector('[rel="icon"]');e||(e=document.createElement("link"),e.rel="icon",document.head.appendChild(e)),e.href=`/${i}.svg`}function vc(i,e){let t=i.querySelector(e);if(!t)throw new Error(`expected a child matching ${e}, but none was found`);return t}function nl(i){i.preventDefault(),i.stopPropagation()}var Lve={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39"};function yQ(i){return(i||"").replace(/[&<>"']/g,e=>Lve[e])}function wQ(i){let e=atob(i),t=new Uint8Array(e.length),n=t.byteLength;for(let r=0;r<n;r++)t[r]=e.charCodeAt(r);return t.buffer}function v4(){return document.body.hasAttribute("data-within-iframe")?";SameSite=None;Secure":";SameSite=Lax"}var sv=class{constructor(e){this.size=e,this.cache=new Map}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}else return}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size===this.size){let n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(e,t)}};var Ave=0,Dve=()=>`mermaid-graph-${Ave++}`,xQ=!1,Mve="5.15.4",CQ=new sv(25);function SQ(i){let e=g4(i),t=CQ.get(e);return t?Promise.resolve(t):Nve().then(n=>(Rve(i),n.render(Dve(),i).then(({svg:r})=>(CQ.set(e,r),r)).catch(r=>`<div class="error-box whitespace-pre-wrap"><span class="font-semibold">Mermaid</span>
${r.message}</div>`)))}function Nve(){return import("./mermaid.core-KJGAOKCX.js").then(({default:i})=>(xQ||(i.initialize({startOnLoad:!1}),xQ=!0),i))}function Rve(i){let e=`https://cdnjs.cloudflare.com/ajax/libs/font-awesome/${Mve}/css/all.min.css`;if(i.includes("fa:")&&!document.querySelector(`link[href="${e}"]`)){let t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=e,document.head.appendChild(t)}}var lN=class{constructor(e,t,{baseUrl:n=null,emptyText:r="",allowedUriSchemes:o=[]}={}){this.container=e,this.content=t,this.baseUrl=n,this.emptyText=r,this.allowedUriSchemes=o,this._render()}setContent(e){this.content=e,this._render()}_render(){this._getHtml().then(e=>{let t=`<div>${e}</div>`;_B(this.container,t,{childrenOnly:!0})})}_getHtml(){return My().use(Wy).use(Jy).use(Tw).use(Bve).use(Ove,{highlight:um}).use(Ow,{allowDangerousHtml:!0}).use(lx).use(Fve,{baseUrl:this.baseUrl}).use(hx,Pve(this.allowedUriSchemes)).use(dx).use(Hve).use(Uve,{baseUrl:this.baseUrl}).use(vx).process(this.content).then(e=>String(e)).catch(e=>{console.error(`Failed to render markdown, reason: ${e.message}`)}).then(e=>e||`
<div class="text-gray-300">
${this.emptyText}
</div>
`)}},_4=lN;function Pve(i){return xt(ue({},Ws),{attributes:xt(ue({},Ws.attributes),{"*":[...Ws.attributes["*"]||[],"className","style"]}),protocols:xt(ue({},Ws.protocols),{href:[...Ws.protocols.href,...i]})})}function Ove(i){return e=>{let t=[];return Or(e,"code",n=>{if(n.lang){let r=function(s){n.type="html",n.value=`<pre><code>${s}</code></pre>`},o=i.highlight(n.value,n.lang);if(o&&typeof o.then=="function"){let s=Promise.resolve(o).then(r);t.push(s)}else r(o)}}),Promise.all(t).then(()=>null)}}function Fve(i){return e=>{i.baseUrl&&Or(e,"element",t=>{if(t.tagName==="a"&&t.properties){let n=t.properties.href;n&&!cN(n)&&!dN(n)&&!jve(n)&&(t.properties.href=kQ(i.baseUrl,n))}if(t.tagName==="img"&&t.properties){let n=t.properties.src;n&&!cN(n)&&!dN(n)&&(t.properties.src=kQ(i.baseUrl,n))}}),Or(e,"element",t=>{t.tagName==="a"&&t.properties&&t.properties.href&&(t.properties.href=t.properties.href.split("/").map(n=>n===".."?"__parent__":n).join("/"))})}}var zve=My().use(ux,{fragment:!0});function Bve(i){return e=>{Or(e,"code",(t,n,r)=>{t.lang==="mermaid"&&(t.type="html",t.value=`
<div class="mermaid">${yQ(t.value)}</div>
`)})}}function Hve(i){return e=>{let t=[];return Or(e,"element",n=>{if((n.properties&&Array.isArray(n.properties.className)?n.properties.className:[]).includes("mermaid")){let o=function(l){let c=zve.parse(l);dT(c,!0),n.children=c.children},s=C0(n,{whitespace:"pre"}),a=SQ(s).then(o);t.push(a)}}),Promise.all(t).then(()=>null)}}function Uve(i){return e=>{Or(e,"element",t=>{if(t.properties&&t.properties.href){let n=t.properties.href;dN(n)?(t.properties["data-phx-link"]=i.baseUrl&&n.startsWith(i.baseUrl)?"patch":"redirect",t.properties["data-phx-link-state"]="push"):cN(n)&&(t.properties.target="_blank",t.properties.rel="noreferrer noopener")}})}}function cN(i){return/^(?:[a-z]+:)?\/\//i.test(i)}function jve(i){return i.startsWith("#")}function dN(i){return i.startsWith("/")||i.startsWith(window.location.origin)}function kQ(i,e){return i.replace(/\/$/,"")+"/"+e}var y4=class{constructor(){this.subscribersByTopic={}}subscribe(e,t){return Array.isArray(this.subscribersByTopic[e])||(this.subscribersByTopic[e]=[]),this.subscribersByTopic[e].push(t),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){let n=this.subscribersByTopic[e].indexOf(t);n!==-1&&this.subscribersByTopic[e].splice(n,1)}broadcast(e,t){Array.isArray(this.subscribersByTopic[e])&&this.subscribersByTopic[e].forEach(n=>{n(t)})}},wn=new y4;var EQ=i=>typeof i=="object"&&i!=null&&i.nodeType===1,TQ=(i,e)=>(!e||i!=="hidden")&&i!=="visible"&&i!=="clip",uN=(i,e)=>{if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){let t=getComputedStyle(i,null);return TQ(t.overflowY,e)||TQ(t.overflowX,e)||(n=>{let r=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch(s){return null}})(n);return!!r&&(r.clientHeight<n.scrollHeight||r.clientWidth<n.scrollWidth)})(i)}return!1},w4=(i,e,t,n,r,o,s,a)=>o<i&&s>e||o>i&&s<e?0:o<=i&&a<=t||s>=e&&a>=t?o-i-n:s>e&&a<t||o<i&&a>t?s-e+r:0,Wve=i=>{let e=i.parentElement;return e==null?i.getRootNode().host||null:e},hN=(i,e)=>{var t,n,r,o;if(typeof document=="undefined")return[];let{scrollMode:s,block:a,inline:l,boundary:c,skipOverflowHiddenElements:d}=e,u=typeof c=="function"?c:Pe=>Pe!==c;if(!EQ(i))throw new TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,f=[],m=i;for(;EQ(m)&&u(m);){if(m=Wve(m),m===h){f.push(m);break}m!=null&&m===document.body&&uN(m)&&!uN(document.documentElement)||m!=null&&uN(m,d)&&f.push(m)}let g=(n=(t=window.visualViewport)==null?void 0:t.width)!=null?n:innerWidth,w=(o=(r=window.visualViewport)==null?void 0:r.height)!=null?o:innerHeight,{scrollX:_,scrollY:E}=window,{height:A,width:L,top:O,right:U,bottom:Q,left:ae}=i.getBoundingClientRect(),te=a==="start"||a==="nearest"?O:a==="end"?Q:O+A/2,Z=l==="center"?ae+L/2:l==="end"?U:ae,ve=[];for(let Pe=0;Pe<f.length;Pe++){let Ee=f[Pe],{height:Oe,width:Xe,top:dt,right:be,bottom:we,left:Y}=Ee.getBoundingClientRect();if(s==="if-needed"&&O>=0&&ae>=0&&Q<=w&&U<=g&&O>=dt&&Q<=we&&ae>=Y&&U<=be)return ve;let R=getComputedStyle(Ee),re=parseInt(R.borderLeftWidth,10),me=parseInt(R.borderTopWidth,10),G=parseInt(R.borderRightWidth,10),Tt=parseInt(R.borderBottomWidth,10),Ft=0,li=0,Li="offsetWidth"in Ee?Ee.offsetWidth-Ee.clientWidth-re-G:0,Et="offsetHeight"in Ee?Ee.offsetHeight-Ee.clientHeight-me-Tt:0,Ii="offsetWidth"in Ee?Ee.offsetWidth===0?0:Xe/Ee.offsetWidth:0,pi="offsetHeight"in Ee?Ee.offsetHeight===0?0:Oe/Ee.offsetHeight:0;if(h===Ee)Ft=a==="start"?te:a==="end"?te-w:a==="nearest"?w4(E,E+w,w,me,Tt,E+te,E+te+A,A):te-w/2,li=l==="start"?Z:l==="center"?Z-g/2:l==="end"?Z-g:w4(_,_+g,g,re,G,_+Z,_+Z+L,L),Ft=Math.max(0,Ft+E),li=Math.max(0,li+_);else{Ft=a==="start"?te-dt-me:a==="end"?te-we+Tt+Et:a==="nearest"?w4(dt,we,Oe,me,Tt+Et,te,te+A,A):te-(dt+Oe/2)+Et/2,li=l==="start"?Z-Y-re:l==="center"?Z-(Y+Xe/2)+Li/2:l==="end"?Z-be+G+Li:w4(Y,be,Xe,re,G+Li,Z,Z+L,L);let{scrollLeft:ko,scrollTop:oo}=Ee;Ft=Math.max(0,Math.min(oo+Ft/pi,Ee.scrollHeight-Oe/pi+Et)),li=Math.max(0,Math.min(ko+li/Ii,Ee.scrollWidth-Xe/Ii+Li)),te+=oo-Ft,Z+=ko-li}ve.push({el:Ee,top:Ft,left:li})}return ve};var Vve=i=>i===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(i)?i:{block:"start",inline:"nearest"};function IQ(i,e){if(!i.isConnected||!(r=>{let o=r;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(i))return;let t=(r=>{let o=window.getComputedStyle(r);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(i);if((r=>typeof r=="object"&&typeof r.behavior=="function")(e))return e.behavior(hN(i,e));let n=typeof e=="boolean"||e==null?void 0:e.behavior;for(let{el:r,top:o,left:s}of hN(i,Vve(e))){let a=o-t.top+t.bottom,l=s-t.left+t.right;r.scroll({top:a,left:l,behavior:n})}}function Bh(i){return["code","smart","setup"].includes(i)}function LQ(i){return["markdown","code","setup"].includes(i)}var qve={mounted(){this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.liveEditors={},this.updateInsertModeAvailability(),["code","smart"].includes(this.props.type)&&this.el.querySelector("[data-el-amplify-outputs-button]").addEventListener("click",e=>{this.el.toggleAttribute("data-js-amplified")}),this.props.type==="smart"&&this.el.querySelector("[data-el-toggle-source-button]").addEventListener("click",e=>{this.el.toggleAttribute("data-js-source-visible"),this.updateInsertModeAvailability(),this.maybeFocusCurrentEditor()}),this.el.addEventListener("lb:cell:editor_created",i=>{let{tag:e,liveEditor:t}=i.detail;this.handleCellEditorCreated(e,t)}),this.el.addEventListener("lb:cell:editor_removed",i=>{let{tag:e}=i.detail;this.handleCellEditorRemoved(e)}),this.el.addEventListener("mouseenter",i=>{this.el.setAttribute("data-js-hover","")}),this.el.addEventListener("mouseleave",i=>{this.el.removeAttribute("data-js-hover")}),this.unsubscribeFromNavigationEvents=wn.subscribe("navigation",i=>this.handleNavigationEvent(i)),this.unsubscribeFromCellsEvents=wn.subscribe("cells",i=>this.handleCellsEvent(i)),this.unsubscribeFromCellEvents=wn.subscribe(`cells:${this.props.cellId}`,i=>this.handleCellEvent(i)),this._handleViewportResize=this.handleViewportResize.bind(this),window.visualViewport.addEventListener("resize",this._handleViewportResize)},disconnected(){this.el.removeAttribute("id")},destroyed(){this.unsubscribeFromNavigationEvents(),this.unsubscribeFromCellsEvents(),this.unsubscribeFromCellEvents(),window.visualViewport.removeEventListener("resize",this._handleViewportResize)},updated(){let i=this.props;this.props=this.getProps(),this.props.evaluationDigest!==i.evaluationDigest&&this.updateChangeIndicator()},getProps(){return{cellId:Ct(this.el,"data-cell-id"),type:Ct(this.el,"data-type"),sessionPath:Ct(this.el,"data-session-path"),evaluationDigest:Ti(this.el,"data-evaluation-digest",null),smartCellJSViewRef:Ti(this.el,"data-smart-cell-js-view-ref",null),allowedUriSchemes:Ct(this.el,"data-allowed-uri-schemes")}},handleNavigationEvent(i){i.type==="element_focused"?this.handleElementFocused(i.focusableId,i.scroll):i.type==="insert_mode_changed"?this.handleInsertModeChanged(i.enabled):i.type==="location_report"&&this.handleLocationReport(i.client,i.report)},handleCellsEvent(i){i.type==="cell_moved"?this.handleCellMoved(i.cellId):i.type==="cell_upload"&&this.handleCellUpload(i.cellId,i.url)},handleCellEvent(i){i.type==="dispatch_queue_evaluation"&&this.handleDispatchQueueEvaluation(i.dispatch)},handleElementFocused(i,e){this.props.cellId===i?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),e&&eu(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleCellEditorCreated(i,e){if(this.liveEditors[i]=e,this.updateInsertModeAvailability(),this.props.type!=="markdown"&&setTimeout(()=>{e.isMounted()||e.mount()},0),e===this.currentEditor()&&this.maybeFocusCurrentEditor(!0),e.onBlur(()=>{this.isFocused&&this.insertMode&&this.currentEditor().focus()}),e.onCursorSelectionChange(t=>{this.broadcastSelection(t)}),i==="primary"){let t=e.getSource();if(this.el.toggleAttribute("data-js-empty",t===""),e.onChange(n=>{this.el.toggleAttribute("data-js-empty",n==="")}),this.props.type==="markdown"){let n=this.el.querySelector("[data-el-markdown-container]"),r=new _4(n,t,{baseUrl:this.props.sessionPath,emptyText:"Empty markdown cell",allowedUriSchemes:this.props.allowedUriSchemes.split(",")});e.onChange(o=>{r.setContent(o)})}Bh(this.props.type)&&(this.updateChangeIndicator(),e.onChange(n=>{this.updateChangeIndicator()}),this.handleEvent(`evaluation_finished:${this.props.cellId}`,({code_markers:n})=>{e.setCodeMarkers(n)}),this.handleEvent(`start_evaluation:${this.props.cellId}`,()=>{e.clearDoctests()}),this.handleEvent(`doctest_report:${this.props.cellId}`,n=>{e.updateDoctest(n)}),this.handleEvent("erase_outputs",()=>{e.setCodeMarkers([]),e.clearDoctests()}))}},handleCellEditorRemoved(i){delete this.liveEditors[i]},handleViewportResize(){this.isFocused&&this.scrollActiveElementIntoView()},currentEditor(){return this.liveEditors[this.currentEditorTag()]},currentEditorTag(){return this.props.type==="smart"?this.el.hasAttribute("data-js-source-visible")?"primary":"secondary":"primary"},updateInsertModeAvailability(){this.el.toggleAttribute("data-js-insert-mode-disabled",!this.currentEditor())},maybeFocusCurrentEditor(i=!1){this.isFocused&&this.insertMode&&(this.currentEditor().focus(),i&&eu(this.el),this.broadcastSelection())},updateChangeIndicator(){let i=this.el.querySelector("[data-el-cell-status]");if(i&&i.querySelector("[data-el-change-indicator]")&&this.props.evaluationDigest){let t=this.liveEditors.primary.getSource(),n=g4(t),r=this.props.evaluationDigest!==n;this.el.toggleAttribute("data-js-changed",r)}},handleInsertModeChanged(i){this.isFocused&&!this.insertMode&&i?(this.insertMode=i,this.currentEditor()&&(this.currentEditor().focus(),setTimeout(this.scrollActiveElementIntoView.bind(this),0),this.broadcastSelection())):this.insertMode&&!i&&(this.insertMode=i,this.currentEditor()&&this.currentEditor().blur())},handleCellMoved(i){this.isFocused&&i===this.props.cellId&&eu(this.el)},handleCellUpload(i,e){let t=this.liveEditors.primary;if(t&&this.props.cellId===i){let n=`![](${e})`;t.insert(n)}},handleDispatchQueueEvaluation(i){this.props.type==="smart"&&this.props.smartCellJSViewRef?wn.broadcast(`js_views:${this.props.smartCellJSViewRef}`,{type:"sync",callback:i}):i()},handleLocationReport(i,e){Object.entries(this.liveEditors).forEach(([t,n])=>{this.props.cellId===e.focusableId&&e.selection&&e.selection.tag===t?n.updateUserSelection(i,e.selection.editorSelection):n.removeUserSelection(i)})},broadcastSelection(i=null){i=i||this.currentEditor().editor.getSelection();let e=this.currentEditorTag();this.isFocused&&this.insertMode&&wn.broadcast("session",{type:"cursor_selection_changed",focusableId:this.props.cellId,selection:{tag:e,editorSelection:i}})},scrollActiveElementIntoView(){IQ(document.activeElement,{scrollMode:"if-needed",behavior:"smooth",block:"center"})}},AQ=qve;var Kve=function(e,t,n){for(var r=n,o=0,s=e.length;r<t.length;){var a=t[r];if(o<=0&&t.slice(r,r+s)===e)return r;a==="\\"?r++:a==="{"?o++:a==="}"&&o--,r++}return-1},$ve=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},Gve=/^\\begin{/,Yve=function(e,t){for(var n,r=[],o=new RegExp("("+t.map(c=>$ve(c.left)).join("|")+")");n=e.search(o),n!==-1;){n>0&&(r.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));var s=t.findIndex(c=>e.startsWith(c.left));if(n=Kve(t[s].right,e,t[s].left.length),n===-1)break;var a=e.slice(0,n+t[s].right.length),l=Gve.test(a)?a:e.slice(t[s].left.length,n);r.push({type:"math",data:l,rawData:a,display:t[s].display}),e=e.slice(n+t[s].right.length)}return e!==""&&r.push({type:"text",data:e}),r},Xve=function(e,t){var n=Yve(e,t.delimiters);if(n.length===1&&n[0].type==="text")return null;for(var r=document.createDocumentFragment(),o=0;o<n.length;o++)if(n[o].type==="text")r.appendChild(document.createTextNode(n[o].data));else{var s=document.createElement("span"),a=n[o].data;t.displayMode=n[o].display;try{t.preProcess&&(a=t.preProcess(a)),Gf.render(a,s,t)}catch(l){if(!(l instanceof Gf.ParseError))throw l;t.errorCallback("KaTeX auto-render: Failed to parse `"+n[o].data+"` with ",l),r.appendChild(document.createTextNode(n[o].rawData));continue}r.appendChild(s)}return r},Qve=function i(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(r.nodeType===3){for(var o=r.textContent,s=r.nextSibling,a=0;s&&s.nodeType===Node.TEXT_NODE;)o+=s.textContent,s=s.nextSibling,a++;var l=Xve(o,t);if(l){for(var c=0;c<a;c++)r.nextSibling.remove();n+=l.childNodes.length-1,e.replaceChild(l,r)}else n+=a}else r.nodeType===1&&function(){var d=" "+r.className+" ",u=t.ignoredTags.indexOf(r.nodeName.toLowerCase())===-1&&t.ignoredClasses.every(h=>d.indexOf(" "+h+" ")===-1);u&&i(r,t)}()}},DQ=function(e,t){if(!e)throw new Error("No element provided to render");var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},Qve(e,n)};var av=class{constructor(e,t){this.serverAdapter=e,this.revision=t,this.state=new x4(this),this._onDelta=null,this.serverAdapter.onDelta(n=>{this._handleServerDelta(n)}),this.serverAdapter.onAcknowledgement(()=>{this._handleServerAcknowledgement()})}setEditorAdapter(e){this.editorAdapter=e,this.editorAdapter.onDelta(t=>{this._handleClientDelta(t),this._emitDelta(t)})}onDelta(e){this._onDelta=e}_emitDelta(e){this._onDelta&&this._onDelta(e)}_handleClientDelta(e){this.state=this.state.onClientDelta(e)}_handleServerDelta(e){this.revision++,this.state=this.state.onServerDelta(e)}_handleServerAcknowledgement(){this.revision++,this.state=this.state.onServerAcknowledgement()}applyDelta(e){this.editorAdapter&&this.editorAdapter.applyDelta(e),this._emitDelta(e)}sendDelta(e){this.serverAdapter.sendDelta(e,this.revision+1)}reportCurrentRevision(){this.serverAdapter.reportRevision(this.revision)}},x4=class{constructor(e,t=5e3){this.client=e,this.reportRevisionTimeoutId=null,this.reportRevisionTimeout=t}onClientDelta(e){return this.reportRevisionTimeoutId!==null&&(clearTimeout(this.reportRevisionTimeoutId),this.reportRevisionTimeoutId=null),this.client.sendDelta(e),new C4(this.client,e)}onServerDelta(e){return this.client.applyDelta(e),this.reportRevisionTimeoutId===null&&(this.reportRevisionTimeoutId=setTimeout(()=>{this.client.reportCurrentRevision(),this.reportRevisionTimeoutId=null},this.reportRevisionTimeout)),this}onServerAcknowledgement(){throw new Error("Unexpected server acknowledgement.")}},C4=class i{constructor(e,t){this.client=e,this.awaitedDelta=t}onClientDelta(e){return new fN(this.client,this.awaitedDelta,e)}onServerDelta(e){let t=this.awaitedDelta.transform(e,"right");this.client.applyDelta(t);let n=e.transform(this.awaitedDelta,"left");return new i(this.client,n)}onServerAcknowledgement(){return new x4(this.client)}},fN=class i{constructor(e,t,n){this.client=e,this.awaitedDelta=t,this.buffer=n}onClientDelta(e){let t=this.buffer.compose(e);return new i(this.client,this.awaitedDelta,t)}onServerDelta(e){let t=this.awaitedDelta.transform(e,"right"),n=this.buffer.transform(t,"right");this.client.applyDelta(n);let r=e.transform(this.awaitedDelta,"left"),o=t.transform(this.buffer,"left");return new i(this.client,r,o)}onServerAcknowledgement(){return this.client.sendDelta(this.buffer),new C4(this.client,this.buffer)}};var Hh=class i{constructor(e=[]){this.ops=e}retain(e){return e<=0?this:this.append({retain:e})}insert(e){return e===""?this:this.append({insert:e})}delete(e){return e<=0?this:this.append({delete:e})}append(e){if(this.ops.length===0)return this.ops.push(e),this;let t=this.ops.pop();return xo(e)&&Co(t)?this.append(e).append(t):xo(e)&&xo(t)?(this.ops.push({insert:t.insert+e.insert}),this):Co(e)&&Co(t)?(this.ops.push({delete:t.delete+e.delete}),this):Qs(e)&&Qs(t)?(this.ops.push({retain:t.retain+e.retain}),this):(this.ops.push(t,e),this)}compose(e){let t=new fm(this.ops),n=new fm(e.ops),r=new i;for(;t.hasNext()||n.hasNext();)if(xo(n.peek()))r.append(n.next());else if(Co(t.peek()))r.append(t.next());else{let o=Math.min(t.peekLength(),n.peekLength()),s=t.next(o),a=n.next(o);Qs(a)?r.append(s):Co(a)&&Qs(s)&&r.append(a)}return r._trim()}transform(e,t){if(t!=="left"&&t!=="right")throw new Error(`Invalid priority "${t}", should be either "left" or "right"`);let n=new fm(this.ops),r=new fm(e.ops),o=new i;for(;n.hasNext()||r.hasNext();)if(xo(n.peek())&&(!xo(r.peek())||t==="left")){let s=pN(n.next());o.retain(s)}else if(xo(r.peek()))o.append(r.next());else{let s=Math.min(n.peekLength(),r.peekLength()),a=n.next(s),l=r.next(s);if(Co(a))continue;Co(l)?o.append(l):o.retain(s)}return o._trim()}_trim(){return this.ops.length>0&&Qs(this.ops[this.ops.length-1])&&this.ops.pop(),this}toCompressed(){return this.ops.map(e=>{if(xo(e))return e.insert;if(Qs(e))return e.retain;if(Co(e))return-e.delete;throw new Error(`Invalid operation ${e}`)})}static fromCompressed(e){return e.reduce((t,n)=>{if(typeof n=="string")return t.insert(n);if(typeof n=="number"&&n>=0)return t.retain(n);if(typeof n=="number"&&n<0)return t.delete(-n);throw new Error(`Invalid compressed operation ${n}`)},new this)}applyToString(e){let t="",n=0;return this.ops.forEach(r=>{Qs(r)&&(t+=e.slice(n,n+r.retain),n+=r.retain),xo(r)&&(t+=r.insert),Co(r)&&(n+=r.delete)}),t+=e.slice(n),t}},fm=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e=1/0){let t=this.ops[this.index];if(t){let n=this.offset,r=pN(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,Co(t))return{delete:e};if(Qs(t))return{retain:e};if(xo(t))return{insert:t.insert.substr(n,e)}}else return{retain:e}}peek(){return this.ops[this.index]||{retain:1/0}}peekLength(){return this.ops[this.index]?pN(this.ops[this.index])-this.offset:1/0}};function pN(i){if(xo(i))return i.insert.length;if(Qs(i))return i.retain;if(Co(i))return i.delete}function xo(i){return typeof i.insert=="string"}function Qs(i){return typeof i.retain=="number"}function Co(i){return typeof i.delete=="number"}var lv=class{constructor(e){this.editor=e,this._onDelta=null,this.isLastChangeRemote=!1,this.editor.onDidChangeModelContent(t=>{if(this.ignoreChange)return;this.isLastChangeRemote=!1;let n=this._deltaFromEditorChange(t);this._onDelta&&this._onDelta(n)})}onDelta(e){this._onDelta=e}applyDelta(e){e.ops.some(r=>Co(r)?!0:xo(r)?r.insert.match(/\s+/):!1)||!this.isLastChangeRemote?this.editor.getModel().pushStackElement():this.editor.getModel().popStackElement();let n=this._deltaToEditorOperations(e);this.ignoreChange=!0,this.editor.getModel().pushEditOperations(null,n,null),this.editor.getModel().pushStackElement(),this.ignoreChange=!1,this.isLastChangeRemote=!0}_deltaFromEditorChange(e){return e.changes.map(n=>{let{rangeOffset:r,rangeLength:o,text:s}=n,a=new Hh;return r&&a.retain(r),o&&a.delete(o),s&&a.insert(s),a}).reduce((n,r)=>n.compose(r))}_deltaToEditorOperations(e){let t=this.editor.getModel(),n=[],r=0;return e.ops.forEach(o=>{if(Qs(o)&&(r+=o.retain),xo(o)){let s=t.getPositionAt(r);n.push({forceMoveMarkers:!0,range:new hi.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:o.insert})}if(Co(o)){let s=t.getPositionAt(r),a=t.getPositionAt(r+o.delete);n.push({forceMoveMarkers:!1,range:new hi.Range(s.lineNumber,s.column,a.lineNumber,a.column),text:null}),r+=o.delete}}),n}};var cv=class{constructor(e,t,n){this.hook=e,this.cellId=t,this.tag=n,this._onDelta=null,this._onAcknowledgement=null,this.hook.handleEvent(`cell_delta:${this.cellId}:${this.tag}`,({delta:r})=>{this._onDelta&&this._onDelta(Hh.fromCompressed(r))}),this.hook.handleEvent(`cell_acknowledgement:${this.cellId}:${this.tag}`,()=>{this._onAcknowledgement&&this._onAcknowledgement()})}onDelta(e){this._onDelta=e}onAcknowledgement(e){this._onAcknowledgement=e}sendDelta(e,t){this.hook.pushEvent("apply_cell_delta",{cell_id:this.cellId,tag:this.tag,delta:e.toCompressed(),revision:t})}reportRevision(e){this.hook.pushEvent("report_cell_revision",{cell_id:this.cellId,tag:this.tag,revision:e})}};var dv=class{constructor(e,t,n,r){this._cursorWidget=new mN(e,t.getPosition(),n,r),this._selectionDecoration=new gN(e,t,n)}update(e){this._cursorWidget.update(e.getPosition()),this._selectionDecoration.update(e)}dispose(){this._cursorWidget.dispose(),this._selectionDecoration.dispose()}},mN=class{constructor(e,t,n,r){this._id=m4(),this._editor=e,this._position=t,this._isPositionValid=this._checkPositionValidity(t),this._buildDomNode(n,r),this._editor.addContentWidget(this),this._onDidChangeModelContentDisposable=this._editor.onDidChangeModelContent(o=>{this._isPositionValid||this.update(this._position)})}getId(){return this._id}getPosition(){return{position:this._position,preference:[hi.editor.ContentWidgetPositionPreference.EXACT]}}update(e){this._position=e,this._isPositionValid=this._checkPositionValidity(e),this._updateDomNode(),this._editor.layoutContentWidget(this)}getDomNode(){return this._domNode}dispose(){this._editor.removeContentWidget(this),this._onDidChangeModelContentDisposable.dispose()}_checkPositionValidity(e){let t=this._editor.getModel().validatePosition(e);return e.equals(t)}_buildDomNode(e,t){let n=this._editor.getOption(hi.editor.EditorOption.lineHeight),r=document.createElement("div");r.classList.add("monaco-cursor-widget-container");let o=document.createElement("div");o.classList.add("monaco-cursor-widget-cursor"),o.style.background=e,o.style.height=`${n}px`;let s=document.createElement("div");s.classList.add("monaco-cursor-widget-label"),s.style.height=`${n}px`,s.innerText=t,s.style.background=e,r.appendChild(o),r.appendChild(s),this._domNode=r,this._updateDomNode()}_updateDomNode(){let e=this._position.lineNumber===1;this._domNode.classList.toggle("inline",e)}},gN=class{constructor(e,t,n){this._editor=e,this._decorations=[],this._className=`user-selection-${n.replace("#","")}`,this._styleElement=document.createElement("style"),this._styleElement.innerHTML=`
.${this._className} {
background-color: ${n}30;
}
`,document.body.appendChild(this._styleElement),this.update(t)}update(e){let t=[{range:e,options:{className:this._className}}];this._decorations=this._editor.deltaDecorations(this._decorations,t)}dispose(){this._editor.deltaDecorations(this._decorations,[]),this._styleElement.remove()}};function MQ(i,e){let t=e;for(;!i.endsWith(t);)t=t.slice(0,-1);return t.length}var uv=class{constructor(e,t){this._editor=e,this._statusDecoration=new bN(e,t.line,t.status),t.status==="failed"&&(this._detailsWidget=new S4(e,t))}update(e){this._statusDecoration.update(e.status),e.status==="failed"&&(this._detailsWidget&&this._detailsWidget.dispose(),this._detailsWidget=new S4(this._editor,e))}dispose(){this._statusDecoration.dispose(),this._detailsWidget&&this._detailsWidget.dispose()}},bN=class{constructor(e,t,n){this._editor=e,this._lineNumber=t,this._decorations=[],this.update(n)}update(e){let t=[{range:new hi.Range(this._lineNumber,1,this._lineNumber,1),options:{isWholeLine:!0,linesDecorationsClassName:`doctest-status-decoration-${e}`}}];this._decorations=this._editor.deltaDecorations(this._decorations,t)}dispose(){this._editor.deltaDecorations(this._decorations,[])}},S4=class{constructor(e,t){this._editor=e;let{line:n,end_line:r,details:o,column:s}=t,a=o.join(`
`),l=o.length,c=this._editor.getOption(hi.editor.EditorOption.fontSize),d=this._editor.getOption(hi.editor.EditorOption.lineHeight),u=document.createElement("div");u.innerHTML=a,u.classList.add("doctest-details-widget","editor-theme-aware-ansi"),u.style.fontSize=`${c}px`,u.style.lineHeight=`${d}px`,this._overlayWidget={getId:()=>`livebook.doctest.overlay.${n}`,getDomNode:()=>u,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget),this._editor.changeViewZones(h=>{this._viewZone=h.addZone({afterLineNumber:r,heightInPx:l*d+12,domNode:document.createElement("div"),onDomNodeTop:f=>{u.style.top=`${f}px`;let m=this._editor.getDomNode().querySelector(".margin-view-overlays").offsetWidth;u.style.paddingLeft=`calc(${m}px + ${s}ch)`},onComputedHeight:f=>{u.style.height=`${f}px`}})})}dispose(){this._editor.removeOverlayWidget(this._overlayWidget),this._editor.changeViewZones(e=>{e.removeZone(this._viewZone)})}};var Xee=qr(QQ()),G4=qr(Gee());var fR=class{constructor(e,t,n,r,o,s,a,l,c,d,u){this.hook=e,this.container=t,this.cellId=n,this.source=o,this.language=a,this.intellisense=l,this.readOnly=c,this._onMount=[],this._onChange=[],this._onBlur=[],this._onCursorSelectionChange=[],this._remoteUserByClientId={},this._doctestByLine={},this._initializeWidgets=()=>{this.setCodeMarkers(d),u.forEach(f=>{this.updateDoctest(f)})};let h=new cv(e,n,r);this.editorClient=new av(h,s),this.editorClient.onDelta(f=>{this.source=f.applyToString(this.source),this._onChange.forEach(m=>m(this.source))})}isMounted(){return!!this.editor}mount(){if(this.isMounted())throw new Error("The editor is already mounted");this._mountEditor(),this.intellisense&&this._setupIntellisense(),this.editorClient.setEditorAdapter(new lv(this.editor)),this.editor.onDidFocusEditorWidget(()=>{this.editor.updateOptions({matchBrackets:"always"})}),this.editor.onDidBlurEditorWidget(()=>{this.editor.updateOptions({matchBrackets:"never"}),this._onBlur.forEach(e=>e())}),this.editor.onDidChangeCursorSelection(e=>{this._onCursorSelectionChange.forEach(t=>t(e.selection))}),this._onMount.forEach(e=>e())}_ensureMounted(){this.isMounted()||this.mount()}getSource(){return this.source}onMount(e){this._onMount.push(e)}onChange(e){this._onChange.push(e)}onCursorSelectionChange(e){this._onCursorSelectionChange.push(e)}onBlur(e){this._onBlur.push(e)}focus(){this._ensureMounted(),this.editor.focus()}blur(){this._ensureMounted(),this.editor.hasTextFocus()&&document.activeElement.blur()}insert(e){this._ensureMounted();let t=this.editor.getSelection();this.editor.getModel().pushEditOperations([],[{forceMoveMarkers:!0,range:t,text:e}])}dispose(){if(this.isMounted()){this.editor.dispose();let e=this.editor.getModel();e&&e.dispose()}}updateUserSelection(e,t){this._ensureMounted(),this._remoteUserByClientId[e.id]?this._remoteUserByClientId[e.id].update(t):this._remoteUserByClientId[e.id]=new dv(this.editor,t,e.hex_color,e.name)}removeUserSelection(e){this._ensureMounted(),this._remoteUserByClientId[e.id]&&(this._remoteUserByClientId[e.id].dispose(),delete this._remoteUserByClientId[e.id])}updateDoctest(e){this._ensureMounted(),this._doctestByLine[e.line]?this._doctestByLine[e.line].update(e):this._doctestByLine[e.line]=new uv(this.editor,e)}clearDoctests(){this._ensureMounted(),Object.values(this._doctestByLine).forEach(e=>e.dispose()),this._doctestByLine={}}setCodeMarkers(e){this._ensureMounted();let t="livebook.code-marker",n=e.map(r=>{let o=this.editor.getModel().getLineContent(r.line),[,s,a]=o.match(/^(\s*).*?(\s*)$/);return{startLineNumber:r.line,startColumn:s.length+1,endLineNumber:r.line,endColumn:o.length+1-a.length,message:r.description,severity:{error:hi.MarkerSeverity.Error,warning:hi.MarkerSeverity.Warning}[r.severity]}});hi.editor.setModelMarkers(this.editor.getModel(),t,n)}_mountEditor(){let e=sn.get();this.editor=hi.editor.create(this.container,{language:this.language,value:this.source,readOnly:this.readOnly,scrollbar:{vertical:"hidden",alwaysConsumeMouseWheel:!1},minimap:{enabled:!1},overviewRulerLanes:0,scrollBeyondLastLine:!1,guides:{indentation:!1},occurrencesHighlight:!1,renderLineHighlight:"none",theme:e.editor_theme,fontFamily:"JetBrains Mono, Droid Sans Mono, monospace",fontSize:e.editor_font_size,tabIndex:-1,tabSize:2,autoIndent:!0,formatOnType:!0,formatOnPaste:!0,quickSuggestions:this.intellisense&&e.editor_auto_completion,tabCompletion:"on",suggestSelection:"first",wordBasedSuggestions:!this.intellisense,parameterHints:this.intellisense&&e.editor_auto_signature,wordWrap:this.language==="markdown"&&e.editor_markdown_word_wrap?"on":"off"}),this._setScreenDependantEditorOptions(),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"enable-word-wrapping",label:"Enable word wrapping",precondition:"config.editor.wordWrap == off",keybindings:[hi.KeyMod.Alt|hi.KeyCode.KeyZ],run:r=>r.updateOptions({wordWrap:"on"})}),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"disable-word-wrapping",label:"Disable word wrapping",precondition:"config.editor.wordWrap == on",keybindings:[hi.KeyMod.Alt|hi.KeyCode.KeyZ],run:r=>r.updateOptions({wordWrap:"off"})}),new ResizeObserver(r=>{r.forEach(o=>{this.container.offsetHeight>0&&(this._setScreenDependantEditorOptions(),this.editor.layout())})}).observe(this.container),this.editor.onDidContentSizeChange(()=>{let r=this.editor.getContentHeight();this.container.style.height=`${r}px`});let n=this.editor.getContribution("editor.controller.quickInput").widget.domNode;n.remove(),this.editor._modelData.view._contentWidgets.overflowingContentWidgetsDomNode.domNode.appendChild(n),this._initializeWidgets(),this._setEditorMode(e.editor_mode)}_setScreenDependantEditorOptions(){window.screen.width<768?this.editor.updateOptions({folding:!1,lineDecorationsWidth:16,lineNumbersMinChars:Math.floor(Math.log10(this.editor.getModel().getLineCount()))+3}):this.editor.updateOptions({folding:!0,lineDecorationsWidth:10,lineNumbersMinChars:5})}_setupIntellisense(){let e=sn.get();this.handlerByRef={},this.editor.getModel().__getCompletionItems__=(n,r)=>{let s=n.getLineContent(r.lineNumber).slice(0,r.column-1);return this._asyncIntellisenseRequest("completion",{hint:s,editor_auto_completion:e.editor_auto_completion}).then(a=>({suggestions:Vwe(a.items,e).map(c=>{let d=MQ(s,c.insertText),u=new hi.Range(r.lineNumber,r.column-d,r.lineNumber,r.column);return xt(ue({},c),{range:u})})})).catch(()=>null)},this.editor.getModel().__getHover__=(n,r)=>{this.hoverContentProcessed=!1,this.hoverContentEl||(this.hoverContentEl=this.container.querySelector(".monaco-hover-content"),this.hoverContentEl?new MutationObserver(a=>{this.hoverContentProcessed||(DQ(this.hoverContentEl,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1}],throwOnError:!1}),this.hoverContentProcessed=!0)}).observe(this.hoverContentEl,{childList:!0}):console.warn("Could not find an element matching .monaco-hover-content"));let o=n.getLineContent(r.lineNumber),s=r.column;return this._asyncIntellisenseRequest("details",{line:o,column:s}).then(a=>{let l=a.contents.map(d=>({value:d,isTrusted:!0})),c=new hi.Range(r.lineNumber,a.range.from,r.lineNumber,a.range.to);return{contents:l,range:c}}).catch(()=>null)};let t={codeUntilLastStop:null,response:null};this.editor.getModel().__getSignatureHelp__=(n,r)=>{let o=n.getLinesContent(),s=r.lineNumber-1,a=o.slice(0,s),l=o[s].slice(0,r.column-1),c=[...a,l].join(`
`),d=c.replace(/[^(),\s]*?$/,"").replace(/([(),])\s*$/,"$1");return d===t.codeUntilLastStop?{value:Yee(t.response),dispose:()=>{}}:this._asyncIntellisenseRequest("signature",{hint:c}).then(u=>(t.response=u,t.codeUntilLastStop=d,{value:Yee(u),dispose:()=>{}})).catch(()=>null)},this.editor.getModel().__getDocumentFormattingEdits__=n=>{let r=n.getValue();return this._asyncIntellisenseRequest("format",{code:r}).then(o=>(this.setCodeMarkers(o.code_markers),o.code?[{range:n.getFullModelRange(),text:o.code}]:[])).catch(()=>null)},this.hook.handleEvent("intellisense_response",({ref:n,response:r})=>{let o=this.handlerByRef[n];o&&(o(r),delete this.handlerByRef[n])})}_asyncIntellisenseRequest(e,t){return new Promise((n,r)=>{this.hook.pushEvent("intellisense_request",ue({cell_id:this.cellId,type:e},t),({ref:o})=>{o?this.handlerByRef[o]=s=>{s?n(s):r(null)}:r(null)})})}_setEditorMode(e){e=="emacs"?(this.emacsMode=new G4.EmacsExtension(this.editor),this.emacsMode.start(),(0,G4.unregisterKey)("Tab")):e=="vim"&&(this.vimMode=(0,Xee.initVimMode)(this.editor),this.vimMode.on("vim-mode-change",({mode:t})=>{this.editor.getDomNode().setAttribute("data-vim-mode",t)}))}};function Vwe(i,e){return i.map(t=>qwe(t,e)).map((t,n)=>xt(ue({},t),{sortText:$we(n,i.length)}))}function qwe(i,e){return{label:i.label,kind:Kwe(i.kind),detail:i.detail,documentation:i.documentation&&{value:i.documentation,isTrusted:!0},insertText:i.insert_text,insertTextRules:hi.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:e.editor_auto_signature?{title:"Trigger Parameter Hint",id:"editor.action.triggerParameterHints"}:null}}function Kwe(i){switch(i){case"function":return hi.languages.CompletionItemKind.Function;case"module":return hi.languages.CompletionItemKind.Module;case"struct":return hi.languages.CompletionItemKind.Struct;case"interface":return hi.languages.CompletionItemKind.Interface;case"type":return hi.languages.CompletionItemKind.Class;case"variable":return hi.languages.CompletionItemKind.Variable;case"field":return hi.languages.CompletionItemKind.Field;case"keyword":return hi.languages.CompletionItemKind.Keyword;default:return null}}function $we(i,e){return String(i).padStart(e,"0")}function Yee(i){return{activeSignature:0,activeParameter:i.active_argument,signatures:i.signature_items.map(e=>({label:e.signature,parameters:e.arguments.map(t=>({label:t})),documentation:null}))}}var Qee=fR;var Gwe={mounted(){this.props=this.getProps(),this.handleEvent(`cell_editor_init:${this.props.cellId}:${this.props.tag}`,({source:i,revision:e,doctest_reports:t,code_markers:n})=>{let r=this.el.querySelector("[data-el-editor-container]"),o=document.createElement("div");r.appendChild(o),this.liveEditor=new Qee(this,o,this.props.cellId,this.props.tag,i,e,this.props.language,this.props.intellisense,this.props.readOnly,n,t),this.liveEditor.onMount(()=>{let s=r.querySelector("[data-el-skeleton]");s&&s.remove()}),this.el.dispatchEvent(new CustomEvent("lb:cell:editor_created",{detail:{tag:this.props.tag,liveEditor:this.liveEditor},bubbles:!0}))})},disconnected(){this.el.removeAttribute("id")},destroyed(){this.liveEditor&&(this.el.dispatchEvent(new CustomEvent("lb:cell:editor_removed",{detail:{tag:this.props.tag},bubbles:!0})),this.liveEditor.dispose())},getProps(){return{cellId:Ct(this.el,"data-cell-id"),tag:Ct(this.el,"data-tag"),language:Ti(this.el,"data-language",null),intellisense:Ct(this.el,"data-intellisense",Dl),readOnly:Ct(this.el,"data-read-only",Dl)}}},Zee=Gwe;var pR="data-js-dragging",Ywe={mounted(){this.el.addEventListener("dragenter",i=>{this.el.setAttribute(pR,"")}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.removeAttribute(pR)}),this.el.addEventListener("drop",i=>{this.el.removeAttribute(pR)})}},Jee=Ywe;var Xwe={mounted(){let i=sn.get(),e=this.el.querySelector('[name="editor_auto_completion"][value="true"]'),t=this.el.querySelector('[name="editor_auto_signature"][value="true"]'),n=this.el.querySelector('[name="editor_font_size"][value="true"]'),r=this.el.querySelector('[name="editor_light_theme"][value="true"]'),o=this.el.querySelector('[name="editor_markdown_word_wrap"][value="true"]'),s=this.el.querySelector('select[name="editor_mode"]');e.checked=i.editor_auto_completion,t.checked=i.editor_auto_signature,n.checked=i.editor_font_size===rv.large,r.checked=i.editor_theme===dm.light,o.checked=i.editor_markdown_word_wrap,s.value=i.editor_mode,e.addEventListener("change",a=>{sn.update({editor_auto_completion:a.target.checked})}),t.addEventListener("change",a=>{sn.update({editor_auto_signature:a.target.checked})}),n.addEventListener("change",a=>{sn.update({editor_font_size:a.target.checked?rv.large:rv.normal})}),r.addEventListener("change",a=>{sn.update({editor_theme:a.target.checked?dm.light:dm.default})}),o.addEventListener("change",a=>{sn.update({editor_markdown_word_wrap:a.target.checked})}),s.addEventListener("change",a=>{sn.update({editor_mode:a.target.value})})}},ete=Xwe;var e9=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Sc=(i,e,t)=>(e9(i,e,"read from private field"),t?t.call(i):e.get(i)),Cc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},wR=(i,e,t,n)=>(e9(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),Js=(i,e,t)=>(e9(i,e,"access private method"),t),Qwe="14.0";function Zwe(i,e,t){let n=`https://cdn.jsdelivr.net/npm/emojibase-data@${e}/${i}`;return typeof t=="function"?n=t(i,e):typeof t=="string"&&(n=`${t}/${i}`),n}async function t9(i,e={}){let h=e,{local:t=!1,version:n="latest",cdnUrl:r}=h,o=lo(h,["local","version","cdnUrl"]),s=Zwe(i,n,r),a=t?localStorage:sessionStorage,l=`emojibase/${n}/${i}`,c=a.getItem(l);if(c)return Promise.resolve(JSON.parse(c));let d=await fetch(s,ue({credentials:"omit",mode:"cors",redirect:"error"},o));if(!d.ok)throw new Error("Failed to load Emojibase dataset.");let u=await d.json();try{a.setItem(l,JSON.stringify(u))}catch(f){}return u}var Jwe={discord:"joypixels",slack:"iamcal"};async function tte(i,e,t){var n;return t9(`${i}/shortcodes/${(n=Jwe[e])!==null&&n!==void 0?n:e}.json`,t)}function Sv(i,e){if(e.length===0)return i;let t=new Set(i.shortcodes);return e.forEach(n=>{let r=n[i.hexcode];Array.isArray(r)?r.forEach(o=>t.add(o)):r&&t.add(r)}),i.shortcodes=[...t],i.skins&&i.skins.forEach(n=>{Sv(n,e)}),i}function exe(i,e=[]){let t=[];return i.forEach(n=>{if(n.skins){let r=n,{skins:o}=r,s=lo(r,["skins"]);t.push(Sv(s,e)),o.forEach(a=>{let l=ue({},a);s.tags&&(l.tags=[...s.tags]),t.push(Sv(l,e))})}else t.push(Sv(n,e))}),t}function txe(i,e){return e.length===0||i.forEach(t=>{Sv(t,e)}),i}async function dte(i,e={}){let l=e,{compact:t=!1,flat:n=!1,shortcodes:r=[]}=l,o=lo(l,["compact","flat","shortcodes"]),s=await t9(`${i}/${t?"compact":"data"}.json`,o),a=[];return r.length>0&&(a=await Promise.all(r.map(c=>{let d;if(c.includes("/")){let[u,h]=c.split("/");d=tte(u,h,o)}else d=tte(i,c,o);return d.catch(()=>({}))}))),n?exe(s,a):txe(s,a)}async function ute(i,e){return t9(`${i}/messages.json`,e)}function mR(i,e){let t=i.target.closest("[data-emoji]");if(t){let n=e.find(r=>r.emoji===t.dataset.emoji);if(n)return n}return null}function hte(i){var e;let t=(e=window.matchMedia)==null?void 0:e.call(window,"(prefers-reduced-motion: reduce)");return i.animate&&!(t!=null&&t.matches)}function ite(i,e){return i.toLowerCase().includes(e.toLowerCase())}function ixe(i,e){let t=null;return()=>{t||(t=window.setTimeout(()=>{i(),t=null},e))}}function nxe(i,e){let t=null;return(...n)=>{t&&window.clearTimeout(t),t=window.setTimeout(()=>{i(...n),t=null},e)}}function Wh(i,e,t,n){if(hte(n)&&i.animate)return i.animate(e,t).finished;let r=t.direction==="normal"?1:0,o=Object.entries(e).reduce((s,[a,l])=>xt(ue({},s),{[a]:l[r]}),{});return Object.assign(i.style,o),Promise.resolve()}function xR(i){var e;let t=document.createElement("template");return t.innerHTML=i,(e=t.content)==null?void 0:e.firstElementChild}async function rxe(i){let e=new TextEncoder().encode(i),t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}function Cr(...i){return i.reduce((e,t)=>xt(ue({},e),{[t]:i9(t)}),{})}function i9(i){return`picmo__${i}`}function Z4(i){for(;i.firstChild;)i.removeChild(i.firstChild);return i}function wm(i,...e){Z4(i).append(...e)}function fte(i){try{return window[i].length,!0}catch(e){return!1}}function oxe(){return fte("sessionStorage")}function sxe(){return fte("localStorage")}function Ev(i){var e;return{emoji:i.emoji,label:i.label,tags:i.tags,skins:(e=i.skins)==null?void 0:e.map(t=>Ev(t)),order:i.order,custom:!1,hexcode:i.hexcode,version:i.version}}function o3(i,e,t){var n;return t&&!t.some(r=>r.order===i.group)?!1:ite(i.label,e)||((n=i.tags)==null?void 0:n.some(r=>ite(r,e)))}var s3=class{constructor(e="en"){this.locale=e}},axe=[(i,e)=>(i.hexcode==="1F91D"&&e<14&&(i.skins=[]),i),(i,e)=>(i.skins&&(i.skins=i.skins.filter(t=>!t.version||t.version<=e)),i)];function lxe(i,e){return axe.some(t=>t(i,e)===null)?null:i}function a3(i,e){return i.filter(t=>lxe(t,e)!==null)}var gR={};function pte(i){return gR[i]||(gR[i]=new CR(i)),gR[i]}pte.deleteDatabase=i=>{};var CR=class extends s3{open(){return Promise.resolve()}delete(){return Promise.resolve()}close(){}isPopulated(){return Promise.resolve(!1)}getEmojiCount(){return Promise.resolve(this.emojis.length)}getEtags(){return Promise.resolve({foo:"bar"})}getHash(){return Promise.resolve("")}populate(e){return this.categories=e.groups,this.emojis=e.emojis,Promise.resolve()}getCategories(e){var t;let n=this.categories.filter(r=>r.key!=="component");if(e.showRecents&&n.unshift({key:"recents",order:-1}),(t=e.custom)!=null&&t.length&&n.push({key:"custom",order:10}),e.categories){let r=e.categories;n=n.filter(o=>r.includes(o.key)),n.sort((o,s)=>r.indexOf(o.key)-r.indexOf(s.key))}else n.sort((r,o)=>r.order-o.order);return Promise.resolve(n)}getEmojis(e,t){let n=this.emojis.filter(r=>r.group===e.order).filter(r=>r.version<=t).sort((r,o)=>r.order!=null&&o.order!=null?r.order-o.order:0).map(Ev);return Promise.resolve(a3(n,t))}searchEmojis(e,t,n,r){let o=this.emojis.filter(l=>o3(l,e,r)&&l.version<=n).map(Ev),s=t.filter(l=>o3(l,e,r)),a=[...a3(o,n),...s];return Promise.resolve(a)}setMeta(e){this.meta=e}};function cxe(i,e){let t=`https://cdn.jsdelivr.net/npm/emojibase-data@${i}/${e}`;return{emojisUrl:`${t}/data.json`,messagesUrl:`${t}/messages.json`}}async function nte(i){try{return(await fetch(i,{method:"HEAD"})).headers.get("etag")}catch(e){return null}}function dxe(i){let{emojisUrl:e,messagesUrl:t}=cxe("latest",i);try{return Promise.all([nte(e),nte(t)])}catch(n){return Promise.all([null,null])}}async function uxe(i,e,t){let n;try{n=await i.getEtags()}catch(s){n={}}let{storedEmojisEtag:r,storedMessagesEtag:o}=n;if(t!==o||e!==r){let[s,a]=await Promise.all([ute(i.locale),dte(i.locale)]);await i.populate({groups:s.groups,emojis:a,emojisEtag:e,messagesEtag:t})}}async function hxe(i,e){let t=await i.getHash();return e!==t}async function mte(i,e,t){let n=t||e(i);try{await n.open()}catch(r){console.warn("[picmo] IndexedDB not available, falling back to InMemoryStoreFactory"),n=pte(i)}return n}async function fxe(i,e,t){if(!oxe()&&typeof window<"u")throw new Error("Session storage is required to use CDN emoji data.");let n=await mte(i,e,t),[r,o]=await dxe(i);if(await n.isPopulated())r&&o&&await uxe(n,r,o);else{let[s,a]=await Promise.all([ute(i),dte(i)]);await n.populate({groups:s.groups,emojis:a,emojisEtag:r,messagesEtag:o})}return n}async function pxe(i,e,t,n,r){let o=await mte(i,e,r),s=await rxe(n);return(!await o.isPopulated()||await hxe(o,s))&&await o.populate({groups:t.groups,emojis:n,hash:s}),o}async function gte(i,e,t,n,r){return t&&n?pxe(i,e,t,n,r):fxe(i,e,r)}var Tv=class{constructor(){this.handleKeyDown=this.handleKeyDown.bind(this)}activate(e){this.rootElement=e,this.rootElement.addEventListener("keydown",this.handleKeyDown)}deactivate(){var e;(e=this.rootElement)==null||e.removeEventListener("keydown",this.handleKeyDown)}get focusableElements(){return this.rootElement.querySelectorAll('input, [tabindex="0"]')}get lastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}get firstFocusableElement(){return this.focusableElements[0]}checkFocus(e,t,n){e.target===t&&(n.focus(),e.preventDefault())}handleKeyDown(e){e.key==="Tab"&&this.checkFocus(e,e.shiftKey?this.firstFocusableElement:this.lastFocusableElement,e.shiftKey?this.lastFocusableElement:this.firstFocusableElement)}},{light:mxe,dark:h5t,auto:f5t}=Cr("light","dark","auto"),Yt=class{constructor({template:e,classes:t,parent:n}){this.isDestroyed=!1,this.appEvents={},this.uiEvents=[],this.uiElements={},this.ui={},this.template=e,this.classes=t,this.parent=n,this.keyBindingHandler=this.keyBindingHandler.bind(this)}initialize(){this.bindAppEvents()}setCustomEmojis(e){this.customEmojis=e}setEvents(e){this.events=e}setPickerId(e){this.pickerId=e}emit(e,...t){this.events.emit(e,...t)}setI18n(e){this.i18n=e}setRenderer(e){this.renderer=e}setEmojiData(e){this.emojiDataPromise=e,e.then(t=>{this.emojiData=t})}updateEmojiData(e){this.emojiData=e,this.emojiDataPromise=Promise.resolve(e)}setOptions(e){this.options=e}renderSync(e={}){return this.el=this.template.renderSync(ue({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId},e)),this.postRender(),this.el}async render(e={}){return await this.emojiDataPromise,this.el=await this.template.renderAsync(ue({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId},e)),this.postRender(),this.el}postRender(){this.bindUIElements(),this.bindKeyBindings(),this.bindUIEvents(),this.scheduleShowAnimation()}bindAppEvents(){Object.keys(this.appEvents).forEach(e=>{this.events.on(e,this.appEvents[e],this)}),this.events.on("data:ready",this.updateEmojiData,this)}unbindAppEvents(){Object.keys(this.appEvents).forEach(e=>{this.events.off(e,this.appEvents[e])}),this.events.off("data:ready",this.updateEmojiData)}keyBindingHandler(e){let t=this.keyBindings[e.key];t&&t.call(this,e)}bindKeyBindings(){this.keyBindings&&this.el.addEventListener("keydown",this.keyBindingHandler)}unbindKeyBindings(){this.keyBindings&&this.el.removeEventListener("keydown",this.keyBindingHandler)}bindUIElements(){this.ui=Object.keys(this.uiElements).reduce((e,t)=>xt(ue({},e),{[t]:this.el.querySelector(this.uiElements[t])}),{})}bindUIEvents(){this.uiEvents.forEach(e=>{e.handler=e.handler.bind(this),(e.target?this.ui[e.target]:this.el).addEventListener(e.event,e.handler,e.options)})}unbindUIEvents(){this.uiEvents.forEach(e=>{(e.target?this.ui[e.target]:this.el).removeEventListener(e.event,e.handler)})}destroy(){this.unbindAppEvents(),this.unbindUIEvents(),this.unbindKeyBindings(),this.el.remove(),this.isDestroyed=!0}scheduleShowAnimation(){if(this.parent){let e=new MutationObserver(t=>{let[n]=t;n.type==="childList"&&n.addedNodes[0]===this.el&&(hte(this.options)&&this.animateShow&&this.animateShow(),e.disconnect)});e.observe(this.parent,{childList:!0})}}static childEvent(e,t,n,r={}){return{target:e,event:t,handler:n,options:r}}static uiEvent(e,t,n={}){return{event:e,handler:t,options:n}}static byClass(e){return`.${e}`}},gxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"/></svg>',bxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"/></svg>',vxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240zM336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176zM259.9 369.4C288.8 369.4 316.2 375.2 340.6 385.5C352.9 390.7 366.7 381.3 361.4 369.1C344.8 330.9 305.6 303.1 259.9 303.1C214.3 303.1 175.1 330.8 158.4 369.1C153.1 381.3 166.1 390.6 179.3 385.4C203.7 375.1 231 369.4 259.9 369.4L259.9 369.4z"/></svg>',_xe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M448 64H192C85.96 64 0 149.1 0 256s85.96 192 192 192h256c106 0 192-85.96 192-192S554 64 448 64zM247.1 280h-32v32c0 13.2-10.78 24-23.98 24c-13.2 0-24.02-10.8-24.02-24v-32L136 279.1C122.8 279.1 111.1 269.2 111.1 256c0-13.2 10.85-24.01 24.05-24.01L167.1 232v-32c0-13.2 10.82-24 24.02-24c13.2 0 23.98 10.8 23.98 24v32h32c13.2 0 24.02 10.8 24.02 24C271.1 269.2 261.2 280 247.1 280zM431.1 344c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40s39.1 17.88 39.1 40S454.1 344 431.1 344zM495.1 248c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40c22.12 0 39.1 17.88 39.1 40S518.1 248 495.1 248z"/></svg>',yxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"/></svg>',wxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M512 32H120c-13.25 0-24 10.75-24 24L96.01 288c0 53 43 96 96 96h192C437 384 480 341 480 288h32c70.63 0 128-57.38 128-128S582.6 32 512 32zM512 224h-32V96h32c35.25 0 64 28.75 64 64S547.3 224 512 224zM560 416h-544C7.164 416 0 423.2 0 432C0 458.5 21.49 480 48 480h480c26.51 0 48-21.49 48-48C576 423.2 568.8 416 560 416z"/></svg>',xxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M482.3 192C516.5 192 576 221 576 256C576 292 516.5 320 482.3 320H365.7L265.2 495.9C259.5 505.8 248.9 512 237.4 512H181.2C170.6 512 162.9 501.8 165.8 491.6L214.9 320H112L68.8 377.6C65.78 381.6 61.04 384 56 384H14.03C6.284 384 0 377.7 0 369.1C0 368.7 .1818 367.4 .5398 366.1L32 256L.5398 145.9C.1818 144.6 0 143.3 0 142C0 134.3 6.284 128 14.03 128H56C61.04 128 65.78 130.4 68.8 134.4L112 192H214.9L165.8 20.4C162.9 10.17 170.6 0 181.2 0H237.4C248.9 0 259.5 6.153 265.2 16.12L365.7 192H482.3z"/></svg>',Cxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M9.375 233.4C3.375 239.4 0 247.5 0 256v128c0 8.5 3.375 16.62 9.375 22.62S23.5 416 32 416h32V224H32C23.5 224 15.38 227.4 9.375 233.4zM464 96H352V32c0-17.62-14.38-32-32-32S288 14.38 288 32v64H176C131.8 96 96 131.8 96 176V448c0 35.38 28.62 64 64 64h320c35.38 0 64-28.62 64-64V176C544 131.8 508.3 96 464 96zM256 416H192v-32h64V416zM224 296C201.9 296 184 278.1 184 256S201.9 216 224 216S264 233.9 264 256S246.1 296 224 296zM352 416H288v-32h64V416zM448 416h-64v-32h64V416zM416 296c-22.12 0-40-17.88-40-40S393.9 216 416 216S456 233.9 456 256S438.1 296 416 296zM630.6 233.4C624.6 227.4 616.5 224 608 224h-32v192h32c8.5 0 16.62-3.375 22.62-9.375S640 392.5 640 384V256C640 247.5 636.6 239.4 630.6 233.4z"/></svg>',Sxe=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<defs>
<radialGradient gradientUnits="userSpaceOnUse" cy="10%" id="gradient-0">
<stop offset="0" stop-color="hsl(50, 100%, 50%)" />
<stop offset="1" stop-color="hsl(50, 100%, 60%)" />
</radialGradient>
</defs>
<!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
<ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="172.586" cy="207.006" rx="39.974" ry="39.974"/>
<ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="334.523" cy="207.481" rx="39.974" ry="39.974"/>
<ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="313.325" cy="356.208" rx="91.497" ry="59.893"/>
<path fill="#55a7ff" d="M 159.427 274.06 L 102.158 363.286 L 124.366 417.011 L 160.476 423.338 L 196.937 414.736 L 218.502 375.214"></path>
<path fill="url(#gradient-0)" d="M256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0zM256 352C290.9 352 323.2 367.8 348.3 394.9C354.3 401.4 364.4 401.7 370.9 395.7C377.4 389.7 377.7 379.6 371.7 373.1C341.6 340.5 301 320 256 320C247.2 320 240 327.2 240 336C240 344.8 247.2 352 256 352H256zM208 369C208 349 179.6 308.6 166.4 291.3C163.2 286.9 156.8 286.9 153.6 291.3C140.6 308.6 112 349 112 369C112 395 133.5 416 160 416C186.5 416 208 395 208 369H208zM303.6 208C303.6 225.7 317.1 240 335.6 240C353.3 240 367.6 225.7 367.6 208C367.6 190.3 353.3 176 335.6 176C317.1 176 303.6 190.3 303.6 208zM207.6 208C207.6 190.3 193.3 176 175.6 176C157.1 176 143.6 190.3 143.6 208C143.6 225.7 157.1 240 175.6 240C193.3 240 207.6 225.7 207.6 208z" />
</svg>`,kxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"/></svg>',Exe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256.3 331.8C208.9 331.8 164.1 324.9 124.5 312.8C112.2 309 100.2 319.7 105.2 331.5C130.1 390.6 188.4 432 256.3 432C324.2 432 382.4 390.6 407.4 331.5C412.4 319.7 400.4 309 388.1 312.8C348.4 324.9 303.7 331.8 256.3 331.8H256.3zM176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176zM336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240z"/></svg>',Txe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"/></svg>',Ixe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M413.8 447.1L256 448l0 31.99C256 497.7 241.8 512 224.1 512c-17.67 0-32.1-14.32-32.1-31.99l0-31.99l-158.9-.0099c-28.5 0-43.69-34.49-24.69-56.4l68.98-79.59H62.22c-25.41 0-39.15-29.8-22.67-49.13l60.41-70.85H89.21c-21.28 0-32.87-22.5-19.28-37.31l134.8-146.5c10.4-11.3 28.22-11.3 38.62-.0033l134.9 146.5c13.62 14.81 2.001 37.31-19.28 37.31h-10.77l60.35 70.86c16.46 19.34 2.716 49.12-22.68 49.12h-15.2l68.98 79.59C458.7 413.7 443.1 447.1 413.8 447.1z"/></svg>',Lxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M224 256c70.7 0 128-57.31 128-128S294.7 0 224 0C153.3 0 96 57.31 96 128S153.3 256 224 256zM274.7 304H173.3c-95.73 0-173.3 77.6-173.3 173.3C0 496.5 15.52 512 34.66 512H413.3C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304zM479.1 320h-73.85C451.2 357.7 480 414.1 480 477.3C480 490.1 476.2 501.9 470 512h138C625.7 512 640 497.6 640 479.1C640 391.6 568.4 320 479.1 320zM432 256C493.9 256 544 205.9 544 144S493.9 32 432 32c-25.11 0-48.04 8.555-66.72 22.51C376.8 76.63 384 101.4 384 128c0 35.52-11.93 68.14-31.59 94.71C372.7 243.2 400.8 256 432 256z"/></svg>',Axe=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<defs>
<radialGradient id="radial" cy="85%">
<stop offset="20%" stop-color="var(--color-secondary)" />
<stop offset="100%" stop-color="var(--color-primary)" />
</radialGradient>
</defs>
<!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
<path fill="url('#radial')" d="M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z" />
</svg>`,Dxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>';function Mxe(i,e){let t=xR(e);return t.dataset.icon=i,t.classList.add(i9("icon")),t}var rte={clock:gxe,flag:bxe,frown:vxe,gamepad:_xe,lightbulb:yxe,mug:wxe,plane:xxe,robot:Cxe,sad:Sxe,search:kxe,smiley:Exe,symbols:Txe,tree:Ixe,users:Lxe,warning:Axe,xmark:Dxe},u3={recents:"clock","smileys-emotion":"smiley","people-body":"users","animals-nature":"tree","food-drink":"mug",activities:"gamepad","travel-places":"plane",objects:"lightbulb",symbols:"symbols",flags:"flag",custom:"robot"};function bte(i,e){if(!(i in rte))return console.warn(`Unknown icon: "${i}"`),document.createElement("div");let t=Mxe(i,rte[i]);return e&&t.classList.add(i9(`icon-${e}`)),t}var Nxe={mode:"sync"},Cv,J4,e3,SR,t3,kR,i3,ER,Fn=class{constructor(e,t={}){Cc(this,e3),Cc(this,t3),Cc(this,i3),Cc(this,Cv,void 0),Cc(this,J4,void 0),wR(this,Cv,e),wR(this,J4,t.mode||Nxe.mode)}renderSync(e={}){let t=xR(Sc(this,Cv).call(this,e));return Js(this,i3,ER).call(this,t,e),Js(this,t3,kR).call(this,t),Js(this,e3,SR).call(this,t,e),t}async renderAsync(e={}){let t=xR(Sc(this,Cv).call(this,e));return Js(this,i3,ER).call(this,t,e),Js(this,t3,kR).call(this,t),await Js(this,e3,SR).call(this,t,e),t}render(e){return Sc(this,J4)==="sync"?this.renderSync(e):this.renderAsync(e)}};Cv=new WeakMap,J4=new WeakMap,e3=new WeakSet,SR=async function(i,e){let t=i.querySelectorAll("[data-view]"),n=[];for(let r of t){let o=e[r.dataset.view];o?r.dataset.render!=="sync"?n.push(o.render().then(s=>(r.replaceWith(s),s))):r.replaceWith(o.renderSync()):r.remove()}return Promise.all(n)},t3=new WeakSet,kR=function(i){i.querySelectorAll("i[data-icon]").forEach(e=>{let{icon:t,size:n}=e.dataset;e.replaceWith(bte(t,n))})},i3=new WeakSet,ER=function(i,e){return i.querySelectorAll("[data-placeholder]").forEach(t=>{let n=t.dataset.placeholder;if(n&&e[n]){let r=e[n];t.replaceWith(...[r].flat())}else console.warn(`Missing placeholder element for key "${n}"`)}),i};var Rxe=Cr("imagePlaceholder","placeholder"),Pxe=new Fn(({classes:i})=>`
<div class="${i.placeholder} ${i.imagePlaceholder}"></div>
`),TR=class extends Yt{constructor({classNames:e}={}){super({template:Pxe,classes:Rxe}),this.classNames=e}load(e){let t=document.createElement("img");this.classNames&&(t.className=this.classNames),t.addEventListener("load",()=>{this.el.replaceWith(t)},{once:!0}),Promise.resolve(e).then(n=>t.src=n)}renderSync(){return super.renderSync(),this.classNames&&this.classNames.split(" ").forEach(e=>this.el.classList.add(e)),this.el}},Oxe=Cr("customEmoji"),IR=class{renderElement(e){return{content:e}}renderImage(e="",t){let n=new TR({classNames:e});return n.renderSync(),{content:n,resolver:()=>(n.load(t()),n.el)}}doRender(e,t,n){if(e.custom)return this.renderCustom(e,t,n);let{content:r,resolver:o}=this.render(e,n),s=r instanceof Element?r:r.el;return o&&o(),s}doEmit(e){return e.custom?this.emitCustom(e):this.emit(e)}emitCustom({url:e,label:t,emoji:n,data:r}){return{url:e,label:t,emoji:n,data:r}}renderCustom(e,t,n=""){let r=[Oxe.customEmoji,n].join(" ").trim(),{content:o,resolver:s}=this.renderImage(r,()=>e.url),a=o instanceof Element?o:o.el;return s&&s(),a}},Fxe=new Fn(({emoji:i})=>`<span>${i}</span>`),LR=class extends IR{render(e){return this.renderElement(Fxe.renderSync({emoji:e.emoji}))}emit({emoji:e,hexcode:t,label:n}){return{emoji:e,hexcode:t,label:n}}},zxe={"categories.activities":"Activities","categories.animals-nature":"Animals & Nature","categories.custom":"Custom","categories.flags":"Flags","categories.food-drink":"Food & Drink","categories.objects":"Objects","categories.people-body":"People & Body","categories.recents":"Recently Used","categories.smileys-emotion":"Smileys & Emotion","categories.symbols":"Symbols","categories.travel-places":"Travel & Places","error.load":"Failed to load emojis","recents.clear":"Clear recent emojis","recents.none":"You haven't selected any emojis yet.",retry:"Try again","search.clear":"Clear search","search.error":"Failed to search emojis","search.notFound":"No results found",search:"Search emojis..."},AR="PicMo";function vte(i){return new DR(i)}vte.deleteDatabase=i=>new Promise((e,t)=>{let n=indexedDB.deleteDatabase(`${AR}-${i}`);n.addEventListener("success",e),n.addEventListener("error",t)});var DR=class extends s3{async open(){let e=indexedDB.open(`${AR}-${this.locale}`);return new Promise((t,n)=>{e.addEventListener("success",r=>{var o;this.db=(o=r.target)==null?void 0:o.result,t()}),e.addEventListener("error",n),e.addEventListener("upgradeneeded",async r=>{var o;this.db=(o=r.target)==null?void 0:o.result,this.db.createObjectStore("category",{keyPath:"order"});let s=this.db.createObjectStore("emoji",{keyPath:"emoji"});s.createIndex("category","group"),s.createIndex("version","version"),this.db.createObjectStore("meta")})})}async delete(){this.close();let e=indexedDB.deleteDatabase(`${AR}-${this.locale}`);await this.waitForRequest(e)}close(){this.db.close()}async getEmojiCount(){let e=this.db.transaction("emoji","readonly").objectStore("emoji");return(await this.waitForRequest(e.count())).target.result}async getEtags(){let e=this.db.transaction("meta","readonly").objectStore("meta"),[t,n]=await Promise.all([this.waitForRequest(e.get("emojisEtag")),this.waitForRequest(e.get("messagesEtag"))]);return{storedEmojisEtag:t.target.result,storedMessagesEtag:n.target.result}}async setMeta(e){let t=this.db.transaction("meta","readwrite"),n=t.objectStore("meta");return new Promise(r=>{t.oncomplete=r,Object.keys(e).filter(Boolean).forEach(o=>{n.put(e[o],o)})})}async getHash(){let e=this.db.transaction("meta","readonly").objectStore("meta");return(await this.waitForRequest(e.get("hash"))).target.result}async isPopulated(){let e=this.db.transaction("category","readonly").objectStore("category");return(await this.waitForRequest(e.count())).target.result>0}async populate({groups:e,emojis:t,emojisEtag:n,messagesEtag:r,hash:o}){await this.removeAllObjects("category","emoji");let s=[this.addObjects("category",e),this.addObjects("emoji",t),this.setMeta({emojisEtag:n,messagesEtag:r,hash:o})];await Promise.all(s)}async getCategories(e){var t;let n=this.db.transaction("category","readonly").objectStore("category"),r=(await this.waitForRequest(n.getAll())).target.result.filter(o=>o.key!=="component");if(e.showRecents&&r.unshift({key:"recents",order:-1}),(t=e.custom)!=null&&t.length&&r.push({key:"custom",order:10}),e.categories){let o=e.categories;r=r.filter(s=>o.includes(s.key)),r.sort((s,a)=>o.indexOf(s.key)-o.indexOf(a.key))}else r.sort((o,s)=>o.order-s.order);return r}async getEmojis(e,t){let n=this.db.transaction("emoji","readonly").objectStore("emoji").index("category"),r=(await this.waitForRequest(n.getAll(e.order))).target.result.filter(o=>o.version<=t).sort((o,s)=>o.order!=null&&s.order!=null?o.order-s.order:0).map(Ev);return a3(r,t)}async searchEmojis(e,t,n,r){let o=[];return new Promise((s,a)=>{let l=this.db.transaction("emoji","readonly").objectStore("emoji").openCursor();l.addEventListener("success",c=>{var d;let u=(d=c.target)==null?void 0:d.result;if(!u)return s([...a3(o,n),...t.filter(f=>o3(f,e))]);let h=u.value;o3(h,e,r)&&h.version<=n&&o.push(Ev(h)),u.continue()}),l.addEventListener("error",c=>{a(c)})})}async waitForRequest(e){return new Promise((t,n)=>{e.onsuccess=t,e.onerror=n})}withTransaction(e,t="readwrite",n){return new Promise((r,o)=>{let s=this.db.transaction(e,t);s.oncomplete=r,s.onerror=o,n(s)})}async removeAllObjects(...e){let t=this.db.transaction(e,"readwrite"),n=e.map(r=>t.objectStore(r));await Promise.all(n.map(r=>this.waitForRequest(r.clear())))}async addObjects(e,t){return this.withTransaction(e,"readwrite",n=>{let r=n.objectStore(e);t.forEach(o=>{r.add(o)})})}};function Bxe(){let i={};return{getItem:e=>i[e],setItem:(e,t)=>i[e]=t,length:Object.keys(i).length,clear:()=>i={},key:e=>Object.keys(i)[e],removeItem:e=>delete i[e]}}var MR=class{},bR="PicMo:recents",NR=class extends MR{constructor(e){super(),this.storage=e}clear(){this.storage.removeItem(bR)}getRecents(e){var t;try{return JSON.parse((t=this.storage.getItem(bR))!=null?t:"[]").slice(0,e)}catch(n){return[]}}addOrUpdateRecent(e,t){let n=[e,...this.getRecents(t).filter(r=>r.hexcode!==e.hexcode)].slice(0,t);try{this.storage.setItem(bR,JSON.stringify(n))}catch(r){console.warn("storage is not available, recent emojis will not be saved")}}},RR=class extends NR{constructor(){super(sxe()?localStorage:Bxe())}},Hxe={dataStore:vte,theme:mxe,animate:!0,showCategoryTabs:!0,showPreview:!0,showRecents:!0,showSearch:!0,showVariants:!0,emojisPerRow:8,visibleRows:6,emojiVersion:"auto",i18n:zxe,locale:"en",maxRecents:50,custom:[]};function n9(i={}){return xt(ue(ue({},Hxe),i),{renderer:i.renderer||new LR,recentsProvider:i.recentsProvider||new RR})}var Vh,kv,l3,n3,PR,qh=class{constructor(){Cc(this,kv),Cc(this,n3),Cc(this,Vh,new Map)}on(e,t,n){Js(this,n3,PR).call(this,e,t,n)}once(e,t,n){Js(this,n3,PR).call(this,e,t,n,!0)}off(e,t){let n=Js(this,kv,l3).call(this,e);Sc(this,Vh).set(e,n.filter(r=>r.handler!==t))}emit(e,...t){Js(this,kv,l3).call(this,e).forEach(n=>{n.handler.apply(n.context,t),n.once&&this.off(e,n.handler)})}removeAll(){Sc(this,Vh).clear()}};Vh=new WeakMap,kv=new WeakSet,l3=function(i){return Sc(this,Vh).has(i)||Sc(this,Vh).set(i,[]),Sc(this,Vh).get(i)},n3=new WeakSet,PR=function(i,e,t,n=!1){Js(this,kv,l3).call(this,i).push({context:t,handler:e,once:n})};var Uxe={injectStyles:!0},OR=class extends qh{},FR=class extends qh{},zR=Cr("emojiCategory","categoryName","noRecents","recentEmojis"),Iv=class extends Yt{constructor({template:e,category:t,showVariants:n,lazyLoader:r}){super({template:e,classes:zR}),this.baseUIElements={categoryName:Yt.byClass(zR.categoryName)},this.category=t,this.showVariants=n,this.lazyLoader=r}setActive(e,t,n){this.emojiContainer.setActive(e,t,n)}},jxe=new Fn(({classes:i,emoji:e})=>`
<button
type="button"
class="${i.emojiButton}"
title="${e.label}"
data-emoji="${e.emoji}"
tabindex="-1">
<div data-placeholder="emojiContent"></div>
</button>
`),Wxe=Cr("emojiButton"),c3=class extends Yt{constructor({emoji:e,lazyLoader:t,category:n}){super({template:jxe,classes:Wxe}),this.emoji=e,this.lazyLoader=t,this.category=n}initialize(){this.uiEvents=[Yt.uiEvent("focus",this.handleFocus)],super.initialize()}handleFocus(){this.category&&this.events.emit("focus:change",this.category)}activateFocus(e){this.el.tabIndex=0,e&&this.el.focus()}deactivateFocus(){this.el.tabIndex=-1}renderSync(){return super.renderSync({emoji:this.emoji,emojiContent:this.renderer.doRender(this.emoji,this.lazyLoader)})}},BR=class{constructor(e,t,n=0,r=0,o=!1){this.events=new qh,this.keyHandlers={ArrowLeft:this.focusPrevious.bind(this),ArrowRight:this.focusNext.bind(this),ArrowUp:this.focusUp.bind(this),ArrowDown:this.focusDown.bind(this)},this.rowCount=Math.ceil(t/e),this.columnCount=e,this.focusedRow=n,this.focusedColumn=r,this.emojiCount=t,this.wrap=o,this.handleKeyDown=this.handleKeyDown.bind(this)}destroy(){this.events.removeAll()}on(e,t){this.events.on(e,t)}handleKeyDown(e){e.key in this.keyHandlers&&(e.preventDefault(),this.keyHandlers[e.key]())}setCell(e,t,n=!0){let r=this.getIndex();this.focusedRow=e,t!==void 0&&(this.focusedColumn=Math.min(this.columnCount,t)),(this.focusedRow>=this.rowCount||this.getIndex()>=this.emojiCount)&&(this.focusedRow=this.rowCount-1,this.focusedColumn=this.emojiCount%this.columnCount-1),this.events.emit("focus:change",{from:r,to:this.getIndex(),performFocus:n})}setFocusedIndex(e,t=!0){let n=Math.floor(e/this.columnCount),r=e%this.columnCount;this.setCell(n,r,t)}focusNext(){this.focusedColumn<this.columnCount-1&&this.getIndex()<this.emojiCount-1?this.setCell(this.focusedRow,this.focusedColumn+1):this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,0):this.wrap?this.setCell(0,0):this.events.emit("focus:overflow",0)}focusPrevious(){this.focusedColumn>0?this.setCell(this.focusedRow,this.focusedColumn-1):this.focusedRow>0?this.setCell(this.focusedRow-1,this.columnCount-1):this.wrap?this.setCell(this.rowCount-1,this.columnCount-1):this.events.emit("focus:underflow",this.columnCount-1)}focusUp(){this.focusedRow>0?this.setCell(this.focusedRow-1,this.focusedColumn):this.events.emit("focus:underflow",this.focusedColumn)}focusDown(){this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,this.focusedColumn):this.events.emit("focus:overflow",this.focusedColumn)}focusToIndex(e){this.setCell(Math.floor(e/this.columnCount),e%this.columnCount)}getIndex(){return this.focusedRow*this.columnCount+this.focusedColumn}getCell(){return{row:this.focusedRow,column:this.focusedColumn}}getRowCount(){return this.rowCount}},Vxe=new Fn(({classes:i})=>`
<div class="${i.emojiContainer}">
<div data-placeholder="emojis"></div>
</div>
`),qxe=Cr("emojiContainer"),Kh=class extends Yt{constructor({emojis:e,showVariants:t,preview:n=!0,lazyLoader:r,category:o,fullHeight:s=!1}){super({template:Vxe,classes:qxe}),this.fullHeight=!1,this.showVariants=t,this.lazyLoader=r,this.preview=n,this.emojis=e,this.category=o,this.fullHeight=s,this.setFocus=this.setFocus.bind(this),this.triggerNextCategory=this.triggerNextCategory.bind(this),this.triggerPreviousCategory=this.triggerPreviousCategory.bind(this)}initialize(){this.grid=new BR(this.options.emojisPerRow,this.emojiCount,0,0,!this.category),this.grid.on("focus:change",this.setFocus),this.grid.on("focus:overflow",this.triggerNextCategory),this.grid.on("focus:underflow",this.triggerPreviousCategory),this.uiEvents=[Yt.uiEvent("click",this.selectEmoji),Yt.uiEvent("keydown",this.grid.handleKeyDown)],this.preview&&this.uiEvents.push(Yt.uiEvent("mouseover",this.showPreview),Yt.uiEvent("mouseout",this.hidePreview),Yt.uiEvent("focus",this.showPreview,{capture:!0}),Yt.uiEvent("blur",this.hidePreview,{capture:!0})),super.initialize()}setFocusedView(e,t){if(e)if(typeof e=="string"){let n=this.emojis.findIndex(r=>r.emoji===e);this.grid.setFocusedIndex(n,!1),setTimeout(()=>{var r,o,s,a;let l=this.emojiViews[n].el;l.scrollIntoView();let c=(r=l.parentElement)==null?void 0:r.previousElementSibling,d=(s=(o=l.parentElement)==null?void 0:o.parentElement)==null?void 0:s.parentElement;d.scrollTop-=(a=c==null?void 0:c.offsetHeight)!=null?a:0})}else e.row==="first"||e.row===0?this.grid.setCell(0,e.offset,t):e.row==="last"&&this.grid.setCell(this.grid.getRowCount()-1,e.offset,t)}setActive(e,t,n){var r;e?this.setFocusedView(t,n):(r=this.emojiViews[this.grid.getIndex()])==null||r.deactivateFocus()}renderSync(){return this.emojiViews=this.emojis.map(e=>this.viewFactory.create(c3,{emoji:e,category:this.category,lazyLoader:this.lazyLoader,renderer:this.renderer})),this.emojiElements=this.emojiViews.map(e=>e.renderSync()),super.renderSync({emojis:this.emojiElements,i18n:this.i18n})}destroy(){super.destroy(),this.emojiViews.forEach(e=>e.destroy()),this.grid.destroy()}triggerPreviousCategory(e){this.events.emit("category:previous",e)}triggerNextCategory(e){this.category&&this.events.emit("category:next",e)}setFocus({from:e,to:t,performFocus:n}){var r,o;(r=this.emojiViews[e])==null||r.deactivateFocus(),(o=this.emojiViews[t])==null||o.activateFocus(n)}selectEmoji(e){e.stopPropagation();let t=mR(e,this.emojis);t&&this.events.emit("emoji:select",{emoji:t,showVariants:this.showVariants})}showPreview(e){let t=e.target.closest("button"),n=t==null?void 0:t.firstElementChild,r=mR(e,this.emojis);r&&this.events.emit("preview:show",r,n==null?void 0:n.cloneNode(!0))}hidePreview(e){mR(e,this.emojis)&&this.events.emit("preview:hide")}get emojiCount(){return this.emojis.length}},Kxe=new Fn(({classes:i,category:e,pickerId:t,icon:n,i18n:r})=>`
<section class="${i.emojiCategory}" role="tabpanel" aria-labelledby="${t}-category-${e.key}">
<h3 data-category="${e.key}" class="${i.categoryName}">
<i data-icon="${n}"></i>
${r.get(`categories.${e.key}`,e.message||e.key)}
</h3>
<div data-view="emojis" data-render="sync"></div>
</section>
`),HR=class extends Iv{constructor({category:e,showVariants:t,lazyLoader:n,emojiVersion:r}){super({category:e,showVariants:t,lazyLoader:n,template:Kxe}),this.showVariants=t,this.lazyLoader=n,this.emojiVersion=r}initialize(){this.uiElements=ue({},this.baseUIElements),super.initialize()}async render(){await this.emojiDataPromise;let e=await this.emojiData.getEmojis(this.category,this.emojiVersion);return this.emojiContainer=this.viewFactory.create(Kh,{emojis:e,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:e.length,icon:u3[this.category.key]})}},UR=class extends Kh{constructor({category:e,emojis:t,preview:n=!0,lazyLoader:r}){super({category:e,emojis:t,showVariants:!1,preview:n,lazyLoader:r})}async addOrUpdate(e){let t=this.el.querySelector(`[data-emoji="${e.emoji}"]`);t&&(this.el.removeChild(t),this.emojis=this.emojis.filter(r=>r!==e));let n=this.viewFactory.create(c3,{emoji:e});if(this.el.insertBefore(n.renderSync(),this.el.firstChild),this.emojis=[e,...this.emojis.filter(r=>r!==e)],this.emojis.length>this.options.maxRecents){this.emojis=this.emojis.slice(0,this.options.maxRecents);let r=this.el.childElementCount-this.options.maxRecents;for(let o=0;o<r;o++)this.el.lastElementChild&&this.el.removeChild(this.el.lastElementChild)}}},$xe=new Fn(({emojiCount:i,classes:e,category:t,pickerId:n,icon:r,i18n:o})=>`
<section class="${e.emojiCategory}" role="tabpanel" aria-labelledby="${n}-category-${t.key}">
<h3 data-category="${t.key}" class="${e.categoryName}">
<i data-icon="${r}"></i>
${o.get(`categories.${t.key}`,t.message||t.key)}
</h3>
<div data-empty="${i===0}" class="${e.recentEmojis}">
<div data-view="emojis" data-render="sync"></div>
</div>
<div class="${e.noRecents}">
${o.get("recents.none")}
</div>
</section>
`,{mode:"async"}),jR=class extends Iv{constructor({category:e,lazyLoader:t,provider:n}){super({category:e,showVariants:!1,lazyLoader:t,template:$xe}),this.provider=n}initialize(){this.uiElements=xt(ue({},this.baseUIElements),{recents:Yt.byClass(zR.recentEmojis)}),this.appEvents={"recent:add":this.addRecent},super.initialize()}async addRecent(e){await this.emojiContainer.addOrUpdate(e),this.ui.recents.dataset.empty="false"}async render(){var e;let t=(e=this.provider)==null?void 0:e.getRecents(this.options.maxRecents);return this.emojiContainer=this.viewFactory.create(UR,{emojis:t,showVariants:!1,lazyLoader:this.lazyLoader,category:this.category.key}),await super.render({category:this.category,emojis:this.emojiContainer,emojiCount:t.length,icon:u3[this.category.key]}),this.el}},Gxe=new Fn(({classes:i,category:e,pickerId:t,icon:n,i18n:r})=>`
<section class="${i.emojiCategory}" role="tabpanel" aria-labelledby="${t}-category-${e.key}">
<h3 data-category="${e.key}" class="${i.categoryName}">
<i data-icon="${n}"></i>
${r.get(`categories.${e.key}`,e.message||e.key)}
</h3>
<div data-view="emojis" data-render="sync"></div>
</section>
`),WR=class extends Iv{constructor({category:e,lazyLoader:t}){super({template:Gxe,showVariants:!1,lazyLoader:t,category:e})}initialize(){this.uiElements=ue({},this.baseUIElements),super.initialize()}async render(){return this.emojiContainer=this.viewFactory.create(Kh,{emojis:this.customEmojis,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:this.customEmojis.length,icon:u3[this.category.key]})}},d3=class{constructor(){this.elements=new Map}lazyLoad(e,t){return this.elements.set(e,t),e}observe(e){if(window.IntersectionObserver){let t=new IntersectionObserver(n=>{n.filter(r=>r.intersectionRatio>0).map(r=>r.target).forEach(r=>{let o=this.elements.get(r);o==null||o(),t.unobserve(r)})},{root:e});this.elements.forEach((n,r)=>{t.observe(r)})}else this.elements.forEach(t=>{t()})}},ote=Cr("emojiArea"),Yxe=new Fn(({classes:i})=>`
<div class="${i.emojiArea}">
<div data-placeholder="emojis"></div>
</div>
`,{mode:"async"}),Xxe={recents:jR,custom:WR};function Qxe(i){return Xxe[i.key]||HR}function Zxe(i){return!i||i==="button"?{row:"first",offset:0}:i}var VR=class extends Yt{constructor({categoryTabs:e,categories:t,emojiVersion:n}){super({template:Yxe,classes:ote}),this.selectedCategory=0,this.scrollListenerState="active",this.lazyLoader=new d3,this.categoryTabs=e,this.categories=t,this.emojiVersion=n,this.handleScroll=ixe(this.handleScroll.bind(this),100)}initialize(){this.appEvents={"category:select":this.handleCategorySelect,"category:previous":this.focusPreviousCategory,"category:next":this.focusNextCategory,"focus:change":this.updateFocusedCategory},this.uiElements={emojis:Yt.byClass(ote.emojiArea)},this.uiEvents=[Yt.uiEvent("scroll",this.handleScroll)],super.initialize()}get focusableEmoji(){return this.el.querySelector('[tabindex="0"]')}async render(){this.emojiCategories=this.categories.map(this.createCategory,this);let e={};return this.categories.forEach((t,n)=>{e[`emojis-${t.key}`]=this.emojiCategories[n]}),await super.render({emojis:await Promise.all(this.emojiCategories.map(t=>t.render()))}),this.lazyLoader.observe(this.el),this.el}destroy(){super.destroy(),this.emojiCategories.forEach(e=>{var t;(t=this.observer)==null||t.unobserve(e.el),e.destroy()})}handleCategorySelect(e,t){this.el.style.overflow="hidden",this.selectCategory(e,t),this.el.style.overflow="auto"}createCategory(e){let t=Qxe(e);return this.viewFactory.create(t,{category:e,showVariants:!0,lazyLoader:this.lazyLoader,emojiVersion:this.emojiVersion,provider:this.options.recentsProvider})}determineInitialCategory(){var e;return this.options.initialCategory&&this.categories.find(t=>t.key===this.options.initialCategory)?this.options.initialCategory:(e=this.categories.find(t=>t.key!=="recents"))==null?void 0:e.key}determineFocusTarget(e){let t=this.emojiCategories.find(n=>n.category.key===e);return this.options.initialEmoji&&(t!=null&&t.el.querySelector(`[data-emoji="${this.options.initialEmoji}"]`))?this.options.initialEmoji:"button"}reset(e=!0){this.events.emit("preview:hide");let t=this.determineInitialCategory();t&&(this.selectCategory(t,{focus:this.determineFocusTarget(t),performFocus:e,scroll:"jump"}),this.selectedCategory=this.getCategoryIndex(t))}getCategoryIndex(e){return this.categories.findIndex(t=>t.key===e)}focusPreviousCategory(e){this.selectedCategory>0&&this.focusCategory(this.selectedCategory-1,{row:"last",offset:e!=null?e:this.options.emojisPerRow})}focusNextCategory(e){this.selectedCategory<this.categories.length-1&&this.focusCategory(this.selectedCategory+1,{row:"first",offset:e!=null?e:0})}focusCategory(e,t){this.selectCategory(e,{focus:t,performFocus:!0})}async selectCategory(e,t={}){var n;this.scrollListenerState="suspend";let{focus:r,performFocus:o,scroll:s}=ue({performFocus:!1},t);this.emojiCategories[this.selectedCategory].setActive(!1);let a=this.selectedCategory=typeof e=="number"?e:this.getCategoryIndex(e);(n=this.categoryTabs)==null||n.setActiveTab(this.selectedCategory,{performFocus:o,scroll:r==="button"});let l=this.emojiCategories[a].el.offsetTop;this.emojiCategories[a].setActive(!0,Zxe(r),r!=="button"&&o),s&&(this.el.scrollTop=l),this.scrollListenerState="resume"}updateFocusedCategory(e){var t;this.categories[this.selectedCategory].key!==e&&(this.scrollListenerState="suspend",this.selectedCategory=this.getCategoryIndex(e),(t=this.categoryTabs)==null||t.setActiveTab(this.selectedCategory,{changeFocusable:!1,performFocus:!1}),this.scrollListenerState="resume")}handleScroll(){if(this.scrollListenerState==="suspend"||!this.categoryTabs)return;if(this.scrollListenerState==="resume"){this.scrollListenerState="active";return}let e=this.el.scrollTop,t=this.el.scrollHeight-this.el.offsetHeight,n=this.emojiCategories.findIndex((o,s)=>{var a;return e<((a=this.emojiCategories[s+1])==null?void 0:a.el.offsetTop)}),r={changeFocusable:!1,performFocus:!1,scroll:!1};e===0?this.categoryTabs.setActiveTab(0,r):Math.floor(e)===Math.floor(t)||n<0?this.categoryTabs.setActiveTab(this.categories.length-1,r):this.categoryTabs.setActiveTab(n,r)}},Jxe=new Fn(({classList:i,classes:e,icon:t,message:n})=>`
<div class="${i}" role="alert">
<div class="${e.iconContainer}"><i data-size="10x" data-icon="${t}"></i></div>
<h3 class="${e.title}">${n}</h3>
</div>
`),ste=Cr("error","iconContainer","title"),Lv=class extends Yt{constructor({message:e,icon:t="warning",template:n=Jxe,className:r}){super({template:n,classes:ste}),this.message=e,this.icon=t,this.className=r}renderSync(){let e=[ste.error,this.className].join(" ").trim();return super.renderSync({message:this.message,icon:this.icon,classList:e})}},e2e=new Fn(({classList:i,classes:e,icon:t,i18n:n,message:r})=>`
<div class="${i}" role="alert">
<div class="${e.icon}"><i data-size="10x" data-icon="${t}"></i></div>
<h3 class="${e.title}">${r}</h3>
<button type="button">${n.get("retry")}</button>
</div>
`),t2e=Cr("dataError"),qR=class extends Lv{constructor({message:e}){super({message:e,template:e2e,className:t2e.dataError})}initialize(){this.uiElements={retryButton:"button"},this.uiEvents=[Yt.childEvent("retryButton","click",this.onRetry)],super.initialize()}async onRetry(){this.emojiData?await this.emojiData.delete():await this.options.dataStore.deleteDatabase(this.options.locale),this.events.emit("reinitialize");let e=await gte(this.options.locale,this.options.dataStore,this.options.messages,this.options.emojiData,this.emojiData);this.viewFactory.setEmojiData(e),this.events.emit("data:ready",e)}},wv=Cr("preview","previewEmoji","previewName","tagList","tag"),i2e=new Fn(({classes:i,tag:e})=>`
<li class="${i.tag}">${e}</li>
`),n2e=new Fn(({classes:i})=>`
<div class="${i.preview}">
<div class="${i.previewEmoji}"></div>
<div class="${i.previewName}"></div>
<ul class="${i.tagList}"></ul>
</div>
`),KR=class extends Yt{constructor(){super({template:n2e,classes:wv})}initialize(){this.uiElements={emoji:Yt.byClass(wv.previewEmoji),name:Yt.byClass(wv.previewName),tagList:Yt.byClass(wv.tagList)},this.appEvents={"preview:show":this.showPreview,"preview:hide":this.hidePreview},super.initialize()}showPreview(e,t){if(wm(this.ui.emoji,t),this.ui.name.textContent=e.label,e.tags){this.ui.tagList.style.display="flex";let n=e.tags.map(r=>i2e.renderSync({tag:r,classes:wv}));wm(this.ui.tagList,...n)}}hidePreview(){Z4(this.ui.emoji),Z4(this.ui.name),Z4(this.ui.tagList)}},r2e=new Fn(({classes:i,i18n:e})=>`
<button title="${e.get("search.clear")}" class="${i.clearSearchButton}">
<i data-icon="xmark"></i>
</button>
`),o2e=new Fn(({classes:i,i18n:e})=>`
<div class="${i.searchContainer}">
<input class="${i.searchField}" placeholder="${e.get("search")}">
<span class="${i.searchAccessory}"></span>
</div>
`,{mode:"async"}),xv=Cr("searchContainer","searchField","clearButton","searchAccessory","clearSearchButton","notFound"),$R=class extends Yt{constructor({categories:e,emojiVersion:t}){super({template:o2e,classes:xv}),this.categories=e.filter(n=>n.key!=="recents"),this.emojiVersion=t,this.search=nxe(this.search.bind(this),100)}initialize(){this.uiElements={searchField:Yt.byClass(xv.searchField),searchAccessory:Yt.byClass(xv.searchAccessory)},this.uiEvents=[Yt.childEvent("searchField","keydown",this.onKeyDown),Yt.childEvent("searchField","input",this.onSearchInput)],super.initialize()}async render(){return await super.render(),this.searchIcon=bte("search"),this.notFoundMessage=this.viewFactory.create(Lv,{message:this.i18n.get("search.notFound"),className:xv.notFound,icon:"sad"}),this.notFoundMessage.renderSync(),this.errorMessage=this.viewFactory.create(Lv,{message:this.i18n.get("search.error")}),this.errorMessage.renderSync(),this.clearSearchButton=r2e.render({classes:xv,i18n:this.i18n}),this.clearSearchButton.addEventListener("click",e=>this.onClearSearch(e)),this.searchField=this.ui.searchField,this.showSearchIcon(),this.el}showSearchIcon(){this.showSearchAccessory(this.searchIcon)}showClearSearchButton(){this.showSearchAccessory(this.clearSearchButton)}showSearchAccessory(e){wm(this.ui.searchAccessory,e)}clear(){this.searchField.value="",this.showSearchIcon()}focus(){this.searchField.focus()}onClearSearch(e){var t;e.stopPropagation(),this.searchField.value="",(t=this.resultsContainer)==null||t.destroy(),this.resultsContainer=null,this.showSearchIcon(),this.events.emit("content:show"),this.searchField.focus()}handleResultsKeydown(e){this.resultsContainer&&e.key==="Escape"&&this.onClearSearch(e)}onKeyDown(e){var t;e.key==="Escape"&&this.searchField.value?this.onClearSearch(e):(e.key==="Enter"||e.key==="ArrowDown")&&this.resultsContainer&&(e.preventDefault(),(t=this.resultsContainer.el.querySelector('[tabindex="0"]'))==null||t.focus())}onSearchInput(e){this.searchField.value?(this.showClearSearchButton(),this.search()):this.onClearSearch(e)}async search(){var e;if(this.searchField.value)try{let t=await this.emojiData.searchEmojis(this.searchField.value,this.customEmojis,this.emojiVersion,this.categories);if(this.events.emit("preview:hide"),t.length){let n=new d3;this.resultsContainer=this.viewFactory.create(Kh,{emojis:t,fullHeight:!0,showVariants:!0,lazyLoader:n}),this.resultsContainer.renderSync(),(e=this.resultsContainer)!=null&&e.el&&(n.observe(this.resultsContainer.el),this.resultsContainer.setActive(!0,{row:0,offset:0},!1),this.resultsContainer.el.addEventListener("keydown",r=>this.handleResultsKeydown(r)),this.events.emit("content:show",this.resultsContainer))}else this.events.emit("content:show",this.notFoundMessage)}catch(t){this.events.emit("content:show",this.errorMessage)}}},s2e=new Fn(({classes:i})=>`
<div class="${i.variantOverlay}">
<div class="${i.variantPopup}">
<div data-view="emojis" data-render="sync"></div>
</div>
</div>
`),ate=Cr("variantOverlay","variantPopup"),vR={easing:"ease-in-out",duration:250,fill:"both"},lte={opacity:[0,1]},cte={opacity:[0,1],transform:["scale3d(0.8, 0.8, 0.8)","scale3d(1, 1, 1)"]},GR=class extends Yt{constructor({emoji:e,parent:t}){super({template:s2e,classes:ate,parent:t}),this.focusedEmojiIndex=0,this.focusTrap=new Tv,this.animateShow=()=>Promise.all([Wh(this.el,lte,vR,this.options),Wh(this.ui.popup,cte,vR,this.options)]),this.emoji=e}initialize(){this.uiElements={popup:Yt.byClass(ate.variantPopup)},this.uiEvents=[Yt.uiEvent("click",this.handleClick),Yt.uiEvent("keydown",this.handleKeydown)],super.initialize()}animateHide(){let e=xt(ue({},vR),{direction:"reverse"});return Promise.all([Wh(this.el,lte,e,this.options),Wh(this.ui.popup,cte,e,this.options)])}async hide(){await this.animateHide(),this.events.emit("variantPopup:hide")}handleKeydown(e){e.key==="Escape"&&(this.hide(),e.stopPropagation())}handleClick(e){this.ui.popup.contains(e.target)||this.hide()}getEmoji(e){return this.renderedEmojis[e]}setFocusedEmoji(e){let t=this.getEmoji(this.focusedEmojiIndex);t.tabIndex=-1,this.focusedEmojiIndex=e;let n=this.getEmoji(this.focusedEmojiIndex);n.tabIndex=0,n.focus()}destroy(){this.emojiContainer.destroy(),this.focusTrap.deactivate(),super.destroy()}renderSync(){let e=xt(ue({},this.emoji),{skins:null}),t=(this.emoji.skins||[]).map(r=>xt(ue({},r),{label:this.emoji.label,tags:this.emoji.tags})),n=[e,...t];return this.emojiContainer=this.viewFactory.create(Kh,{emojis:n,preview:!1}),super.renderSync({emojis:this.emojiContainer}),n.length<this.options.emojisPerRow&&this.el.style.setProperty("--emojis-per-row",n.length.toString()),this.el}activate(){this.emojiContainer.setActive(!0,{row:0,offset:0},!0),this.focusTrap.activate(this.el)}},a2e=new Fn(({classes:i,i18n:e,category:t,pickerId:n,icon:r})=>`
<li class="${i.categoryTab}">
<button
aria-selected="false"
role="tab"
class="${i.categoryButton}"
tabindex="-1"
title="${e.get(`categories.${t.key}`,t.message||t.key)}"
type="button"
data-category="${t.key}"
id="${n}-category-${t.key}"
>
<i data-icon="${r}"></i>
</li>
`),_R=Cr("categoryTab","categoryTabActive","categoryButton"),YR=class extends Yt{constructor({category:e,icon:t}){super({template:a2e,classes:_R}),this.isActive=!1,this.category=e,this.icon=t}initialize(){this.uiElements={button:Yt.byClass(_R.categoryButton)},this.uiEvents=[Yt.childEvent("button","click",this.selectCategory),Yt.childEvent("button","focus",this.selectCategory)],super.initialize()}renderSync(){return super.renderSync({category:this.category,icon:this.icon}),this.ui.button.ariaSelected="false",this.el}setActive(e,t={}){let{changeFocusable:n,performFocus:r,scroll:o}=ue({changeFocusable:!0,performFocus:!0,scroll:!0},t);this.el.classList.toggle(_R.categoryTabActive,e),n&&(this.ui.button.tabIndex=e?0:-1,this.ui.button.ariaSelected=e.toString()),e&&r&&(this.ui.button.focus(),o&&this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!1})),this.isActive=e}selectCategory(){this.isActive||this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!0})}},l2e=new Fn(({classes:i})=>`
<div class="${i.categoryButtonsContainer}">
<ul role="tablist" class="${i.categoryButtons}">
<div data-placeholder="tabs"></div>
</ul>
</div>
`),c2e=Cr("categoryButtons","categoryButtonsContainer"),XR=class extends Yt{constructor({categories:e}){super({template:l2e,classes:c2e}),this.activeCategoryIndex=0,this.categories=e}initialize(){this.keyBindings={ArrowLeft:this.stepSelectedTab(-1),ArrowRight:this.stepSelectedTab(1)},this.uiEvents=[Yt.uiEvent("scroll",this.checkOverflow)],super.initialize()}checkOverflow(){let e=Math.abs(this.el.scrollLeft-(this.el.scrollWidth-this.el.offsetWidth))>1,t=this.el.scrollLeft>0;this.el.className="categoryButtonsContainer",t&&e?this.el.classList.add("has-overflow-both"):t?this.el.classList.add("has-overflow-left"):e&&this.el.classList.add("has-overflow-right")}renderSync(){return this.tabViews=this.categories.map(e=>this.viewFactory.create(YR,{category:e,icon:u3[e.key]})),super.renderSync({tabs:this.tabViews.map(e=>e.renderSync())}),this.el}get currentCategory(){return this.categories[this.activeCategoryIndex]}get currentTabView(){return this.tabViews[this.activeCategoryIndex]}setActiveTab(e,t={}){this.checkOverflow();let n=this.currentTabView,r=this.tabViews[e];n.setActive(!1,t),r.setActive(!0,t),this.activeCategoryIndex=e}getTargetCategory(e){return e<0?this.categories.length-1:e>=this.categories.length?0:e}stepSelectedTab(e){return()=>{let t=this.activeCategoryIndex+e;this.setActiveTab(this.getTargetCategory(t),{changeFocusable:!0,performFocus:!0})}}},d2e=[{version:15,emoji:String.fromCodePoint(129768)},{version:14,emoji:String.fromCodePoint(128733)},{version:13,emoji:String.fromCodePoint(129729)},{version:12,emoji:String.fromCodePoint(129449)},{version:11,emoji:String.fromCodePoint(129463)},{version:5,emoji:String.fromCodePoint(129322)},{version:4,emoji:String.fromCodePoint(9877)},{version:3,emoji:String.fromCodePoint(129314)},{version:2,emoji:String.fromCodePoint(128488)},{version:1,emoji:String.fromCodePoint(128512)}];function u2e(){var i;let e=d2e.find(t=>h2e(t.emoji));return(i=e==null?void 0:e.version)!=null?i:1}function h2e(i){let e=document.createElement("canvas").getContext("2d");if(e)return e.textBaseline="top",e.font="32px Arial",e.fillText(i,0,0),e.getImageData(16,16,1,1).data[0]!==0}function yR(i,e){return Array.from({length:i},()=>e).join("")}function f2e({showHeader:i,classes:e}){return i?`
<header class="${e.header}">
<div data-view="search"></div>
<div data-view="categoryTabs" data-render="sync"></div>
</header>
`:""}function p2e(i){let{classes:e,theme:t,className:n=""}=i;return`
<div class="picmo__picker ${e.picker} ${t} ${n}">
${f2e(i)}
<div class="${e.content}">
<div data-view="emojiArea"></div>
</div>
<div data-view="preview"></div>
</div>
`}function m2e(i){let{emojiCount:e,classes:t,theme:n,className:r,categoryCount:o}=i,s=({showSearch:d,classes:u})=>d?`
<div class="${u.searchSkeleton}">
<div class="${u.searchInput} ${u.placeholder}"></div>
</div>
`:"",a=({showCategoryTabs:d,classes:u})=>d?`
<div class="${u.categoryTabsSkeleton}">
${yR(o,`<div class="${u.placeholder} ${u.categoryTab}"></div>`)}
</div>
`:"",l=({showHeader:d,classes:u})=>d?`
<header class="${u.headerSkeleton}">
${s(i)}
${a(i)}
</header>
`:"",c=({showPreview:d,classes:u})=>d?`
<div class="${u.previewSkeleton}">
<div class="${u.placeholder} ${u.previewEmoji}"></div>
<div class="${u.placeholder} ${u.previewName}"></div>
<ul class="${u.tagList}">
${yR(3,`<li class="${u.placeholder} ${u.tag}"></li>`)}
</ul>
</div>
`:"";return`
<div class="picmo__picker ${t.skeleton} ${t.picker} ${n} ${r}">
${l(i)}
<div class="${t.contentSkeleton}">
<div class="${t.placeholder} ${t.categoryName}"></div>
<div class="${t.emojiGrid}">
${yR(e,`<div class="${t.placeholder} ${t.emoji}"></div>`)}
</div>
</div>
${c(i)}
</div>
`}var g2e=new Fn(i=>i.isLoaded?p2e(i):m2e(i)),Y4=Cr("picker","skeleton","placeholder","searchSkeleton","searchInput","categoryTabsSkeleton","headerSkeleton","categoryTab","contentSkeleton","categoryName","emojiGrid","emoji","previewSkeleton","previewEmoji","previewName","tagList","tag","overlay","content","fullHeight","pluginContainer","header"),X4={emojisPerRow:"--emojis-per-row",visibleRows:"--row-count",emojiSize:"--emoji-size"},QR=class extends Yt{constructor(){super({template:g2e,classes:Y4}),this.pickerReady=!1,this.externalEvents=new FR,this.updaters={styleProperty:e=>t=>this.el.style.setProperty(X4[e],t.toString()),theme:e=>{let t=this.options.theme,n=this.el.closest(`.${t}`);this.el.classList.remove(t),n==null||n.classList.remove(t),this.el.classList.add(e),n==null||n.classList.add(e)},className:e=>{this.options.className&&this.el.classList.remove(this.options.className),this.el.classList.add(e)},emojisPerRow:this.updateStyleProperty.bind(this,"emojisPerRow"),emojiSize:this.updateStyleProperty.bind(this,"emojiSize"),visibleRows:this.updateStyleProperty.bind(this,"visibleRows")}}initialize(){this.uiElements={pickerContent:Yt.byClass(Y4.content),header:Yt.byClass(Y4.header)},this.uiEvents=[Yt.uiEvent("keydown",this.handleKeyDown)],this.appEvents={error:this.onError,reinitialize:this.reinitialize,"data:ready":this.onDataReady,"content:show":this.showContent,"variantPopup:hide":this.hideVariantPopup,"emoji:select":this.selectEmoji},super.initialize(),this.options.recentsProvider}destroy(){var e,t;super.destroy(),(e=this.search)==null||e.destroy(),this.emojiArea.destroy(),(t=this.categoryTabs)==null||t.destroy(),this.events.removeAll(),this.externalEvents.removeAll()}clearRecents(){this.options.recentsProvider.clear()}addEventListener(e,t){this.externalEvents.on(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t)}initializePickerView(){this.pickerReady&&(this.showContent(),this.emojiArea.reset(!1))}handleKeyDown(e){let t=e.ctrlKey||e.metaKey;e.key==="s"&&t&&this.search&&(e.preventDefault(),this.search.focus())}buildChildViews(){return this.options.showPreview&&(this.preview=this.viewFactory.create(KR)),this.options.showSearch&&(this.search=this.viewFactory.create($R,{categories:this.categories,emojiVersion:this.emojiVersion})),this.options.showCategoryTabs&&(this.categoryTabs=this.viewFactory.create(XR,{categories:this.categories})),this.currentView=this.emojiArea=this.viewFactory.create(VR,{categoryTabs:this.categoryTabs,categories:this.categories,emojiVersion:this.emojiVersion}),[this.preview,this.search,this.emojiArea,this.categoryTabs]}setStyleProperties(){this.options.showSearch||this.el.style.setProperty("--search-height-full","0px"),this.options.showCategoryTabs||(this.el.style.setProperty("--category-tabs-height","0px"),this.el.style.setProperty("--category-tabs-offset","0px")),this.options.showPreview||this.el.style.setProperty("--emoji-preview-height-full","0px"),Object.keys(X4).forEach(e=>{this.options[e]&&this.el.style.setProperty(X4[e],this.options[e].toString())})}updateStyleProperty(e,t){this.el.style.setProperty(X4[e],t.toString())}reinitialize(){this.renderSync()}onError(e){let t=this.viewFactory.createWithOptions({data:!1},qR,{message:this.i18n.get("error.load")}),n=this.el.offsetHeight||375;throw this.el.style.height=`${n}px`,wm(this.el,t.renderSync()),e}async onDataReady(e){let t=this.el;try{e?this.emojiData=e:await this.emojiDataPromise,this.options.emojiVersion==="auto"?this.emojiVersion=u2e()||parseFloat(Qwe):this.emojiVersion=this.options.emojiVersion,this.categories=await this.emojiData.getCategories(this.options);let[n,r,o,s]=this.buildChildViews();await super.render({isLoaded:!0,search:r,categoryTabs:s,emojiArea:o,preview:n,showHeader:!!(this.search||this.categoryTabs),theme:this.options.theme,className:this.options.className}),this.el.style.setProperty("--category-count",this.categories.length.toString()),this.pickerReady=!0,t.replaceWith(this.el),this.setStyleProperties(),this.initializePickerView(),this.setInitialFocus(),this.externalEvents.emit("data:ready")}catch(n){this.events.emit("error",n)}}renderSync(){var e;let t=((e=this.options.categories)==null?void 0:e.length)||10;if(this.options.showRecents&&(t+=1),super.renderSync({isLoaded:!1,theme:this.options.theme,className:this.options.className,showSearch:this.options.showSearch,showPreview:this.options.showPreview,showCategoryTabs:this.options.showCategoryTabs,showHeader:this.options.showSearch||this.options.showCategoryTabs,emojiCount:this.options.emojisPerRow*this.options.visibleRows,categoryCount:t}),this.el.style.setProperty("--category-count",t.toString()),!this.options.rootElement)throw new Error("Picker must be given a root element via the rootElement option");return wm(this.options.rootElement,this.el),this.setStyleProperties(),this.pickerReady&&this.initializePickerView(),this.el}getInitialFocusTarget(){if(typeof this.options.autoFocus<"u")switch(this.options.autoFocus){case"emojis":return this.emojiArea.focusableEmoji;case"search":return this.search;case"auto":return this.search||this.emojiArea.focusableEmoji;default:return null}if(this.options.autoFocusSearch===!0)return console.warn("options.autoFocusSearch is deprecated, please use options.focusTarget instead"),this.search}setInitialFocus(){var e;!this.pickerReady||(e=this.getInitialFocusTarget())==null||e.focus()}reset(e=!0){var t;this.pickerReady&&(this.emojiArea.reset(e),this.showContent(this.emojiArea)),(t=this.search)==null||t.clear(),this.hideVariantPopup()}showContent(e=this.emojiArea){var t,n;e!==this.currentView&&(this.currentView!==this.emojiArea&&((t=this.currentView)==null||t.destroy()),this.ui.pickerContent.classList.toggle(Y4.fullHeight,e!==this.emojiArea),wm(this.ui.pickerContent,e.el),this.currentView=e,e===this.emojiArea?(this.emojiArea.reset(),this.categoryTabs&&this.ui.header.appendChild(this.categoryTabs.el)):(n=this.categoryTabs)==null||n.el.remove())}hideVariantPopup(){var e;(e=this.variantPopup)==null||e.destroy()}isPickerClick(e){var t,n;let r=e.target,o=this.el.contains(r),s=(n=(t=this.variantPopup)==null?void 0:t.el)==null?void 0:n.contains(r);return o||s}async selectEmoji({emoji:e}){var t,n;(t=e.skins)!=null&&t.length&&this.options.showVariants&&!this.isVariantPopupOpen?this.showVariantPopup(e):(await((n=this.variantPopup)==null?void 0:n.animateHide()),this.events.emit("variantPopup:hide"),await this.emitEmoji(e))}get isVariantPopupOpen(){return this.variantPopup&&!this.variantPopup.isDestroyed}async showVariantPopup(e){let t=document.activeElement;this.events.once("variantPopup:hide",()=>{t==null||t.focus()}),this.variantPopup=this.viewFactory.create(GR,{emoji:e,parent:this.el}),this.el.appendChild(this.variantPopup.renderSync()),this.variantPopup.activate()}async emitEmoji(e){this.externalEvents.emit("emoji:select",await this.renderer.doEmit(e)),this.options.recentsProvider.addOrUpdateRecent(e,this.options.maxRecents),this.events.emit("recent:add",e)}updateOptions(e){Object.keys(e).forEach(t=>{this.updaters[t](e[t])}),Object.assign(this.options,e)}},ZR=class{constructor({events:e,i18n:t,renderer:n,emojiData:r,options:o,customEmojis:s=[],pickerId:a}){this.events=e,this.i18n=t,this.renderer=n,this.emojiData=r,this.options=o,this.customEmojis=s,this.pickerId=a}setEmojiData(e){this.emojiData=Promise.resolve(e)}createWithOptions(e={},t,...n){let r=new t(...n);return r.setPickerId(this.pickerId),r.setEvents(this.events),r.setI18n(this.i18n),r.setRenderer(this.renderer),e.data!==!1&&r.setEmojiData(this.emojiData),r.setOptions(this.options),r.setCustomEmojis(this.customEmojis),r.viewFactory=this,r.initialize(),r}create(e,...t){return this.createWithOptions({},e,...t)}},r3,JR=class{constructor(e={}){Cc(this,r3,void 0),wR(this,r3,new Map(Object.entries(e)))}get(e,t=e){return Sc(this,r3).get(e)||t}};r3=new WeakMap;function b2e(i,e){e===void 0&&(e={});var t=e.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=i:r.appendChild(document.createTextNode(i))}}function r9(){let i=!1;return function(e){Uxe.injectStyles&&!i&&(b2e(e),i=!0)}}var v2e=`.picmo__picker .picmo__icon{width:1.25em;height:1em;fill:currentColor}.picmo__icon-small{font-size:.8em}.picmo__icon-medium{font-size:1em}.picmo__icon-large{font-size:1.25em}.picmo__icon-2x{font-size:2em}.picmo__icon-3x{font-size:3em}.picmo__icon-4x{font-size:4em}.picmo__icon-5x{font-size:5em}.picmo__icon-8x{font-size:8em}.picmo__icon-10x{font-size:10em}.picmo__light,.picmo__auto{color-scheme:light;--accent-color: #4f46e5;--background-color: #f9fafb;--border-color: #cccccc;--category-name-background-color: #f9fafb;--category-name-button-color: #999999;--category-name-text-color: hsl(214, 30%, 50%);--category-tab-active-background-color: rgba(255, 255, 255, .6);--category-tab-active-color: var(--accent-color);--category-tab-color: #666;--category-tab-highlight-background-color: rgba(0, 0, 0, .15);--error-color-dark: hsl(0, 100%, 45%);--error-color: hsl(0, 100%, 40%);--focus-indicator-background-color: hsl(198, 65%, 85%);--focus-indicator-color: #333333;--hover-background-color: #c7d2fe;--placeholder-background-color: #cccccc;--search-background-color: #f9fafb;--search-focus-background-color: #ffffff;--search-icon-color: #999999;--search-placeholder-color: #71717a;--secondary-background-color: #e2e8f0;--secondary-text-color: #666666;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #000000;--variant-popup-background-color: #ffffff}.picmo__dark{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}@media (prefers-color-scheme: dark){.picmo__auto{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}}.picmo__picker .picmo__categoryButtonsContainer{overflow:auto;padding:2px 0}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-right{mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-left{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-both{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%)}.picmo__picker .picmo__categoryButtons{display:flex;flex-direction:row;gap:var(--tab-gap);margin:0;padding:0 .5em;align-items:center;height:var(--category-tabs-height);box-sizing:border-box;width:100%;justify-content:space-between;position:relative;list-style-type:none;justify-self:center;max-width:min(23.55rem,calc(var(--category-count, 1) * 2.5rem))}.picmo__picker .picmo__categoryButtons .picmo__categoryTab{display:flex;align-items:center;transition:all .1s;width:2em}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton{color:var(--category-tab-active-color);background:linear-gradient(rgba(255,255,255,.75) 0%,rgba(255,255,255,.75) 100%),linear-gradient(var(--category-tab-active-color) 0%,var(--category-tab-active-color) 100%);border:2px solid var(--category-tab-active-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton:hover{background-color:var(--category-tab-active-background-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton{border-radius:5px;background:transparent;border:2px solid transparent;color:var(--category-tab-color);cursor:pointer;padding:2px;vertical-align:middle;display:flex;align-items:center;justify-content:center;font-size:1.2rem;width:1.6em;height:1.6em;transition:all .1s}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:is(img){width:var(--category-tab-size);height:var(--category-tab-size)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:hover{background:var(--category-tab-highlight-background-color)}.picmo__dataError [data-icon]{opacity:.8}@keyframes appear{0%{opacity:0}to{opacity:.8}}@keyframes appear-grow{0%{opacity:0;transform:scale(.8)}to{opacity:.8;transform:scale(1)}}.picmo__picker .picmo__error{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--secondary-text-color)}.picmo__picker .picmo__error .picmo__iconContainer{opacity:.8;animation:appear-grow .25s cubic-bezier(.175,.885,.32,1.275);--color-primary: var(--error-color);--color-secondary: var(--error-color-dark)}.picmo__picker .picmo__error .picmo__title{animation:appear .25s;animation-delay:50ms;animation-fill-mode:both}.picmo__picker .picmo__error button{padding:8px 16px;cursor:pointer;background:var(--background-color);border:1px solid var(--text-color);border-radius:5px;color:var(--text-color)}.picmo__picker .picmo__error button:hover{background:var(--text-color);color:var(--background-color)}.picmo__emojiButton{background:transparent;border:none;border-radius:15px;cursor:pointer;display:flex;font-family:var(--emoji-font);font-size:var(--emoji-size);height:100%;justify-content:center;align-items:center;margin:0;overflow:hidden;padding:0;width:100%}.picmo__emojiButton:hover{background:var(--hover-background-color)}.picmo__emojiButton:focus{border-radius:0;background:var(--focus-indicator-background-color);outline:1px solid var(--focus-indicator-color)}.picmo__picker .picmo__emojiArea{height:var(--emoji-area-height);overflow-y:auto;position:relative}.picmo__picker .picmo__emojiCategory{position:relative}.picmo__picker .picmo__emojiCategory .picmo__categoryName{font-size:.9em;padding:.5rem;margin:0;background:var(--category-name-background-color);color:var(--category-name-text-color);top:0;z-index:1;display:grid;gap:4px;grid-template-columns:auto 1fr auto;align-items:center;line-height:1;box-sizing:border-box;height:var(--category-name-height);justify-content:flex-start;text-transform:uppercase}.picmo__picker .picmo__emojiCategory .picmo__categoryName button{background:transparent;border:none;display:flex;align-items:center;cursor:pointer;color:var(--category-name-button-color)}.picmo__picker .picmo__emojiCategory .picmo__categoryName button:hover{opacity:1}.picmo__picker .picmo__emojiCategory .picmo__noRecents{color:var(--secondary-text-color);grid-column:1 / span var(--emojis-per-row);font-size:.9em;text-align:center;display:flex;align-items:center;justify-content:center;min-height:calc(var(--emoji-size) * var(--emoji-size-multiplier))}.picmo__picker .picmo__emojiCategory .picmo__recentEmojis[data-empty=true]{display:none}:is(.picmo__picker .picmo__emojiCategory) .picmo__recentEmojis[data-empty=false]+div{display:none}.picmo__picker .picmo__emojiContainer{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center}.picmo__picker.picmo__picker{--border-radius: 5px;--emoji-area-height: calc( (var(--row-count) * var(--emoji-size) * var(--emoji-size-multiplier)) + var(--category-name-height) );--content-height: var(--emoji-area-height);--emojis-per-row: 8;--row-count: 6;--emoji-preview-margin: 4px;--emoji-preview-height: calc(var(--emoji-preview-size) + 1em + 1px);--emoji-preview-height-full: calc(var(--emoji-preview-height) + var(--emoji-preview-margin));--emoji-preview-size: 2.75em;--emoji-size: 2rem;--emoji-size-multiplier: 1.3;--content-margin: 8px;--category-tabs-height:calc(1.5em + 9px);--category-tabs-offset: 8px;--category-tab-size: 1.2rem;--category-name-height: 2rem;--category-name-padding-y: 6px;--search-height: 2em;--search-margin: .5em;--search-margin-bottom: 4px;--search-height-full: calc(var(--search-height) + var(--search-margin) + var(--search-margin-bottom));--overlay-background-color: rgba(0, 0, 0, .8);--emoji-font: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji";--ui-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;--ui-font-size: 16px;--picker-width: calc(var(--emojis-per-row) * var(--emoji-size) * var(--emoji-size-multiplier) + 2.75rem);--preview-background-color: var(--secondary-background-color);background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);font-size:var(--ui-font-size);overflow:hidden;position:relative;width:var(--picker-width);display:grid;gap:8px}.picmo__picker.picmo__picker>*{font-family:var(--ui-font)}.picmo__picker.picmo__skeleton{background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);width:var(--picker-width);color:var(--secondary-text-color)}.picmo__picker.picmo__skeleton *{box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__picker.picmo__skeleton .picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}.picmo__picker.picmo__skeleton .picmo__headerSkeleton{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;overflow:hidden;gap:8px;border-bottom:1px solid var(--border-color);width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton{padding:0 8px;height:var(--search-height)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton .picmo__searchInput{width:100%;height:28px;border-radius:3px}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton{height:var(--category-tabs-height);display:flex;flex-direction:row;align-items:center;justify-self:center;width:calc(2rem * var(--category-count, 1))}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton .picmo__categoryTab{width:25px;height:25px;padding:2px;border-radius:5px;margin:.25em}.picmo__picker.picmo__skeleton .picmo__contentSkeleton{height:var(--content-height);padding-right:8px;opacity:.7}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__categoryName{width:50%;height:1rem;margin:.5rem;box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center;width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid .picmo__emoji{width:var(--emoji-size);height:var(--emoji-size);border-radius:50%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton{height:var(--emoji-preview-height);border-top:1px solid var(--border-color);display:grid;align-items:center;padding:.5em;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags"}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewEmoji{grid-area:emoji;border-radius:50%;width:var(--emoji-preview-size);height:var(--emoji-preview-size)}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewName{grid-area:name;height:.8em;width:80%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList .picmo__tag{border-radius:3px;padding:2px 8px;margin-right:.25em;height:1em;width:20%}.picmo__overlay{background:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.picmo__content{position:relative;overflow:hidden;height:var(--content-height)}.picmo__content.picmo__fullHeight{height:calc(var(--content-height) + var(--category-tabs-height) + var(--category-tabs-offset));overflow-y:auto}.picmo__pluginContainer{margin:.5em;display:flex;flex-direction:row}.picmo__header{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:grid;gap:8px;border-bottom:1px solid var(--border-color)}@media (prefers-reduced-motion: reduce){.picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__placeholder:after{display:none}}.picmo__picker .picmo__preview{border-top:1px solid var(--border-color);display:grid;align-items:center;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags";height:var(--emoji-preview-height);box-sizing:border-box;padding:.5em;position:relative;background:var(--preview-background-color)}.picmo__picker .picmo__preview .picmo__previewEmoji{grid-area:emoji;font-size:var(--emoji-preview-size);font-family:var(--emoji-font);width:1.25em;display:flex;align-items:center;justify-content:center}.picmo__picker .picmo__preview .picmo__previewName{grid-area:name;color:var(--text-color);font-size:.8em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}.picmo__picker .picmo__preview .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0;font-size:.75em;overflow:hidden}.picmo__picker .picmo__preview .picmo__tag{border-radius:3px;background:var(--tag-background-color);color:var(--text-color);padding:2px 8px;margin-right:.25em;white-space:nowrap}.picmo__picker .picmo__preview .picmo__tag:last-child{margin-right:0}.picmo__picker .picmo__searchContainer{display:flex;height:var(--search-height);box-sizing:border-box;padding:0 8px;position:relative}.picmo__picker .picmo__searchContainer .picmo__searchField{background:var(--search-background-color);border-radius:3px;border:none;box-sizing:border-box;color:var(--text-color);font-size:.9em;outline:none;padding:.5em 2.25em .5em .5em;width:100%}.picmo__picker .picmo__searchContainer .picmo__searchField:focus{background:var(--search-focus-background-color)}.picmo__picker .picmo__searchContainer .picmo__searchField::placeholder{color:var(--search-placeholder-color)}.picmo__picker .picmo__searchContainer .picmo__searchAccessory{color:var(--search-icon-color);height:100%;position:absolute;right:1em;top:0;width:1.25rem;display:flex;align-items:center}.picmo__picker .picmo__searchContainer .picmo__searchAccessory svg{fill:var(--search-icon-color)}.picmo__picker .picmo__searchContainer .picmo__clearButton{border:0;color:var(--search-icon-color);background:transparent;cursor:pointer}.picmo__picker .picmo__searchContainer .picmo__clearSearchButton{cursor:pointer;border:none;background:transparent;color:var(--search-icon-color);font-size:1em;width:100%;height:100%;display:flex;align-items:center;padding:0}.picmo__picker .picmo__searchContainer .picmo__notFound [data-icon]{fill:#f3e265}.picmo__picker .picmo__variantOverlay{background:var(--overlay-background-color);border-radius:5px;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.picmo__picker .picmo__variantOverlay .picmo__variantPopup{background:var(--variant-popup-background-color);border-radius:5px;margin:.5em;padding:.5em;text-align:center;user-select:none;display:flex;align-items:center;justify-content:center}.picmo__customEmoji{width:1em;height:1em}@keyframes shine{to{transform:translate(100%)}}.picmo__picker .picmo__imagePlaceholder{width:2rem;height:2rem;border-radius:50%}.picmo__placeholder{background:#DDDBDD;position:relative}.picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}
`;function _2e(i){return gte(i.locale,i.dataStore,i.messages,i.emojiData)}var y2e=0,Q4;function w2e(){return`picmo-${Date.now()}-${y2e++}`}var x2e=r9();function _te(i){x2e(v2e);let e=n9(i),t=((e==null?void 0:e.custom)||[]).map(s=>xt(ue({},s),{custom:!0,tags:["custom",...s.tags||[]]})),n=new OR;Q4||(Q4=_2e(e));let r=new JR(e.i18n);Q4.then(s=>{n.emit("data:ready",s)}).catch(s=>{n.emit("error",s)});let o=new ZR({events:n,i18n:r,customEmojis:t,renderer:e.renderer,options:e,emojiData:Q4,pickerId:w2e()}).create(QR);return o.renderSync(),o}function $h(i){return i.split("-")[0]}function xm(i){return i.split("-")[1]}function g3(i){return["top","bottom"].includes($h(i))?"x":"y"}function Lte(i){return i==="y"?"height":"width"}function yte(i,e,t){let{reference:n,floating:r}=i,o=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2,a=g3(e),l=Lte(a),c=n[l]/2-r[l]/2,d=$h(e),u=a==="x",h;switch(d){case"top":h={x:o,y:n.y-r.height};break;case"bottom":h={x:o,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:s};break;case"left":h={x:n.x-r.width,y:s};break;default:h={x:n.x,y:n.y}}switch(xm(e)){case"start":h[a]-=c*(t&&u?-1:1);break;case"end":h[a]+=c*(t&&u?-1:1);break}return h}var C2e=async(i,e,t)=>{let{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:s}=t,a=await(s.isRTL==null?void 0:s.isRTL(e)),l=await s.getElementRects({reference:i,floating:e,strategy:r}),{x:c,y:d}=yte(l,n,a),u=n,h={},f=0;for(let m=0;m<o.length;m++){let{name:g,fn:w}=o[m],{x:_,y:E,data:A,reset:L}=await w({x:c,y:d,initialPlacement:n,placement:u,strategy:r,middlewareData:h,rects:l,platform:s,elements:{reference:i,floating:e}});if(c=_!=null?_:c,d=E!=null?E:d,h=xt(ue({},h),{[g]:ue(ue({},h[g]),A)}),L&&f<=50){f++,typeof L=="object"&&(L.placement&&(u=L.placement),L.rects&&(l=L.rects===!0?await s.getElementRects({reference:i,floating:e,strategy:r}):L.rects),{x:c,y:d}=yte(l,u,a)),m=-1;continue}}return{x:c,y:d,placement:u,strategy:r,middlewareData:h}};function S2e(i){return ue({top:0,right:0,bottom:0,left:0},i)}function k2e(i){return typeof i!="number"?S2e(i):{top:i,right:i,bottom:i,left:i}}function h3(i){return xt(ue({},i),{top:i.y,left:i.x,right:i.x+i.width,bottom:i.y+i.height})}async function l9(i,e){var t;e===void 0&&(e={});let{x:n,y:r,platform:o,rects:s,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=e,m=k2e(f),g=a[h?u==="floating"?"reference":"floating":u],w=h3(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(g)))==null||t?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),_=h3(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:u==="floating"?xt(ue({},s.floating),{x:n,y:r}):s.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),strategy:l}):s[u]);return{top:w.top-_.top+m.top,bottom:_.bottom-w.bottom+m.bottom,left:w.left-_.left+m.left,right:_.right-w.right+m.right}}var E2e=Math.min,T2e=Math.max;function wte(i,e,t){return T2e(i,E2e(e,t))}var I2e={left:"right",right:"left",bottom:"top",top:"bottom"};function f3(i){return i.replace(/left|right|bottom|top/g,e=>I2e[e])}function Ate(i,e,t){t===void 0&&(t=!1);let n=xm(i),r=g3(i),o=Lte(r),s=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=f3(s)),{main:s,cross:f3(s)}}var L2e={start:"end",end:"start"};function o9(i){return i.replace(/start|end/g,e=>L2e[e])}var A2e=["top","right","bottom","left"],D2e=A2e.reduce((i,e)=>i.concat(e,e+"-start",e+"-end"),[]);function M2e(i,e,t){return(i?[...t.filter(n=>xm(n)===i),...t.filter(n=>xm(n)!==i)]:t.filter(n=>$h(n)===n)).filter(n=>i?xm(n)===i||(e?o9(n)!==n:!1):!0)}var N2e=function(i){return i===void 0&&(i={}),{name:"autoPlacement",options:i,async fn(e){var t,n,r,o,s;let{x:a,y:l,rects:c,middlewareData:d,placement:u,platform:h,elements:f}=e,Oe=i,{alignment:m=null,allowedPlacements:g=D2e,autoAlignment:w=!0}=Oe,_=lo(Oe,["alignment","allowedPlacements","autoAlignment"]),E=M2e(m,w,g),A=await l9(e,_),L=(t=(n=d.autoPlacement)==null?void 0:n.index)!=null?t:0,O=E[L];if(O==null)return{};let{main:U,cross:Q}=Ate(O,c,await(h.isRTL==null?void 0:h.isRTL(f.floating)));if(u!==O)return{x:a,y:l,reset:{placement:E[0]}};let ae=[A[$h(O)],A[U],A[Q]],te=[...(r=(o=d.autoPlacement)==null?void 0:o.overflows)!=null?r:[],{placement:O,overflows:ae}],Z=E[L+1];if(Z)return{data:{index:L+1,overflows:te},reset:{placement:Z}};let ve=te.slice().sort((Xe,dt)=>Xe.overflows[0]-dt.overflows[0]),Pe=(s=ve.find(Xe=>{let{overflows:dt}=Xe;return dt.every(be=>be<=0)}))==null?void 0:s.placement,Ee=Pe!=null?Pe:ve[0].placement;return Ee!==u?{data:{index:L+1,overflows:te},reset:{placement:Ee}}:{}}}};function R2e(i){let e=f3(i);return[o9(i),e,o9(e)]}var P2e=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(e){var t;let{placement:n,middlewareData:r,rects:o,initialPlacement:s,platform:a,elements:l}=e,ae=i,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",flipAlignment:f=!0}=ae,m=lo(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),g=$h(n),w=u||(g===s||!f?[f3(s)]:R2e(s)),_=[s,...w],E=await l9(e,m),A=[],L=((t=r.flip)==null?void 0:t.overflows)||[];if(c&&A.push(E[g]),d){let{main:te,cross:Z}=Ate(n,o,await(a.isRTL==null?void 0:a.isRTL(l.floating)));A.push(E[te],E[Z])}if(L=[...L,{placement:n,overflows:A}],!A.every(te=>te<=0)){var O,U;let te=((O=(U=r.flip)==null?void 0:U.index)!=null?O:0)+1,Z=_[te];if(Z)return{data:{index:te,overflows:L},reset:{placement:Z}};let ve="bottom";switch(h){case"bestFit":{var Q;let Pe=(Q=L.map(Ee=>[Ee,Ee.overflows.filter(Oe=>Oe>0).reduce((Oe,Xe)=>Oe+Xe,0)]).sort((Ee,Oe)=>Ee[1]-Oe[1])[0])==null?void 0:Q[0].placement;Pe&&(ve=Pe);break}case"initialPlacement":ve=s;break}if(n!==ve)return{reset:{placement:ve}}}return{}}}};async function O2e(i,e){let{placement:t,platform:n,elements:r}=i,o=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=$h(t),a=xm(t),l=g3(t)==="x",c=["left","top"].includes(s)?-1:1,d=o&&l?-1:1,u=typeof e=="function"?e(i):e,{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:ue({mainAxis:0,crossAxis:0,alignmentAxis:null},u);return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),l?{x:f*d,y:h*c}:{x:h*c,y:f*d}}var xte=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){let{x:t,y:n}=e,r=await O2e(e,i);return{x:t+r.x,y:n+r.y,data:r}}}};function F2e(i){return i==="x"?"y":"x"}var Cte=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(e){let{x:t,y:n,placement:r}=e,w=i,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:_=>{let{x:E,y:A}=_;return{x:E,y:A}}}}=w,l=lo(w,["mainAxis","crossAxis","limiter"]),c={x:t,y:n},d=await l9(e,l),u=g3($h(r)),h=F2e(u),f=c[u],m=c[h];if(o){let _=u==="y"?"top":"left",E=u==="y"?"bottom":"right",A=f+d[_],L=f-d[E];f=wte(A,f,L)}if(s){let _=h==="y"?"top":"left",E=h==="y"?"bottom":"right",A=m+d[_],L=m-d[E];m=wte(A,m,L)}let g=a.fn(xt(ue({},e),{[u]:f,[h]:m}));return xt(ue({},g),{data:{x:g.x-t,y:g.y-n}})}}};function Dte(i){return i&&i.document&&i.location&&i.alert&&i.setInterval}function Tc(i){if(i==null)return window;if(!Dte(i)){let e=i.ownerDocument;return e&&e.defaultView||window}return i}function rl(i){return Tc(i).getComputedStyle(i)}function kc(i){return Dte(i)?"":i?(i.nodeName||"").toLowerCase():""}function Mte(){let i=navigator.userAgentData;return i!=null&&i.brands?i.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function ol(i){return i instanceof Tc(i).HTMLElement}function nu(i){return i instanceof Tc(i).Element}function z2e(i){return i instanceof Tc(i).Node}function Cm(i){if(typeof ShadowRoot>"u")return!1;let e=Tc(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function b3(i){let{overflow:e,overflowX:t,overflowY:n}=rl(i);return/auto|scroll|overlay|hidden/.test(e+n+t)}function B2e(i){return["table","td","th"].includes(kc(i))}function Nte(i){let e=/firefox/i.test(Mte()),t=rl(i);return t.transform!=="none"||t.perspective!=="none"||t.contain==="paint"||["transform","perspective"].includes(t.willChange)||e&&t.willChange==="filter"||e&&(t.filter?t.filter!=="none":!1)}function Rte(){return!/^((?!chrome|android).)*safari/i.test(Mte())}var Ste=Math.min,Av=Math.max,p3=Math.round;function Ec(i,e,t){var n,r,o,s;e===void 0&&(e=!1),t===void 0&&(t=!1);let a=i.getBoundingClientRect(),l=1,c=1;e&&ol(i)&&(l=i.offsetWidth>0&&p3(a.width)/i.offsetWidth||1,c=i.offsetHeight>0&&p3(a.height)/i.offsetHeight||1);let d=nu(i)?Tc(i):window,u=!Rte()&&t,h=(a.left+(u&&(n=(r=d.visualViewport)==null?void 0:r.offsetLeft)!=null?n:0))/l,f=(a.top+(u&&(o=(s=d.visualViewport)==null?void 0:s.offsetTop)!=null?o:0))/c,m=a.width/l,g=a.height/c;return{width:m,height:g,top:f,right:h+m,bottom:f+g,left:h,x:h,y:f}}function ru(i){return((z2e(i)?i.ownerDocument:i.document)||window.document).documentElement}function v3(i){return nu(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function Pte(i){return Ec(ru(i)).left+v3(i).scrollLeft}function H2e(i){let e=Ec(i);return p3(e.width)!==i.offsetWidth||p3(e.height)!==i.offsetHeight}function U2e(i,e,t){let n=ol(e),r=ru(e),o=Ec(i,n&&H2e(e),t==="fixed"),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(n||!n&&t!=="fixed")if((kc(e)!=="body"||b3(r))&&(s=v3(e)),ol(e)){let l=Ec(e,!0);a.x=l.x+e.clientLeft,a.y=l.y+e.clientTop}else r&&(a.x=Pte(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}function Ote(i){return kc(i)==="html"?i:i.assignedSlot||i.parentNode||(Cm(i)?i.host:null)||ru(i)}function kte(i){return!ol(i)||rl(i).position==="fixed"?null:j2e(i)}function j2e(i){let{offsetParent:e}=i,t=i,n=!1;for(;t&&t!==e;){let{assignedSlot:r}=t;if(r){let o=r.offsetParent;if(rl(r).display==="contents"){let s=r.hasAttribute("style"),a=r.style.display;r.style.display=rl(t).display,o=r.offsetParent,r.style.display=a,s||r.removeAttribute("style")}t=r,e!==o&&(e=o,n=!0)}else if(Cm(t)&&t.host&&n)break;t=Cm(t)&&t.host||t.parentNode}return e}function W2e(i){let e=Ote(i);for(Cm(e)&&(e=e.host);ol(e)&&!["html","body"].includes(kc(e));){if(Nte(e))return e;{let t=e.parentNode;e=Cm(t)?t.host:t}}return null}function s9(i){let e=Tc(i),t=kte(i);for(;t&&B2e(t)&&rl(t).position==="static";)t=kte(t);return t&&(kc(t)==="html"||kc(t)==="body"&&rl(t).position==="static"&&!Nte(t))?e:t||W2e(i)||e}function Ete(i){if(ol(i))return{width:i.offsetWidth,height:i.offsetHeight};let e=Ec(i);return{width:e.width,height:e.height}}function V2e(i){let{rect:e,offsetParent:t,strategy:n}=i,r=ol(t),o=ru(t);if(t===o)return e;let s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if((r||!r&&n!=="fixed")&&((kc(t)!=="body"||b3(o))&&(s=v3(t)),ol(t))){let l=Ec(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}return xt(ue({},e),{x:e.x-s.scrollLeft+a.x,y:e.y-s.scrollTop+a.y})}function q2e(i,e){let t=Tc(i),n=ru(i),r=t.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;let c=Rte();(c||!c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a,y:l}}function K2e(i){var e;let t=ru(i),n=v3(i),r=(e=i.ownerDocument)==null?void 0:e.body,o=Av(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Av(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+Pte(i),l=-n.scrollTop;return rl(r||t).direction==="rtl"&&(a+=Av(t.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Fte(i){let e=Ote(i);return["html","body","#document"].includes(kc(e))?i.ownerDocument.body:ol(e)&&b3(e)?e:Fte(e)}function m3(i,e){var t;e===void 0&&(e=[]);let n=Fte(i),r=n===((t=i.ownerDocument)==null?void 0:t.body),o=Tc(n),s=r?[o].concat(o.visualViewport||[],b3(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(m3(s))}function $2e(i,e){let t=e.getRootNode==null?void 0:e.getRootNode();if(i.contains(e))return!0;if(t&&Cm(t)){let n=e;do{if(n&&i===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function G2e(i,e){let t=Ec(i,!1,e==="fixed"),n=t.top+i.clientTop,r=t.left+i.clientLeft;return{top:n,left:r,x:r,y:n,right:r+i.clientWidth,bottom:n+i.clientHeight,width:i.clientWidth,height:i.clientHeight}}function Tte(i,e,t){return e==="viewport"?h3(q2e(i,t)):nu(e)?G2e(e,t):h3(K2e(ru(i)))}function Y2e(i){let e=m3(i),t=["absolute","fixed"].includes(rl(i).position)&&ol(i)?s9(i):i;return nu(t)?e.filter(n=>nu(n)&&$2e(n,t)&&kc(n)!=="body"):[]}function X2e(i){let{element:e,boundary:t,rootBoundary:n,strategy:r}=i,o=[...t==="clippingAncestors"?Y2e(e):[].concat(t),n],s=o[0],a=o.reduce((l,c)=>{let d=Tte(e,c,r);return l.top=Av(d.top,l.top),l.right=Ste(d.right,l.right),l.bottom=Ste(d.bottom,l.bottom),l.left=Av(d.left,l.left),l},Tte(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}var Q2e={getClippingRect:X2e,convertOffsetParentRelativeRectToViewportRelativeRect:V2e,isElement:nu,getDimensions:Ete,getOffsetParent:s9,getDocumentElement:ru,getElementRects:i=>{let{reference:e,floating:t,strategy:n}=i;return{reference:U2e(e,s9(t),n),floating:xt(ue({},Ete(t)),{x:0,y:0})}},getClientRects:i=>Array.from(i.getClientRects()),isRTL:i=>rl(i).direction==="rtl"};function Z2e(i,e,t,n){n===void 0&&(n={});let{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:a=!1}=n,l=r&&!a,c=o&&!a,d=l||c?[...nu(i)?m3(i):[],...m3(e)]:[];d.forEach(g=>{l&&g.addEventListener("scroll",t,{passive:!0}),c&&g.addEventListener("resize",t)});let u=null;if(s){let g=!0;u=new ResizeObserver(()=>{g||t(),g=!1}),nu(i)&&!a&&u.observe(i),u.observe(e)}let h,f=a?Ec(i):null;a&&m();function m(){let g=Ec(i);f&&(g.x!==f.x||g.y!==f.y||g.width!==f.width||g.height!==f.height)&&t(),f=g,h=requestAnimationFrame(m)}return t(),()=>{var g;d.forEach(w=>{l&&w.removeEventListener("scroll",t),c&&w.removeEventListener("resize",t)}),(g=u)==null||g.disconnect(),u=null,a&&cancelAnimationFrame(h)}}var J2e=(i,e,t)=>C2e(i,e,ue({platform:Q2e},t));async function eCe(i,e,t,n){if(!n)throw new Error("Must provide a positioning option");return await(typeof n=="string"?tCe(i,e,t,n):iCe(e,n))}async function tCe(i,e,t,n){if(!t)throw new Error("Reference element is required for relative positioning");let r;return n==="auto"?r={middleware:[N2e(),Cte(),xte({mainAxis:5,crossAxis:12})]}:r={placement:n,middleware:[P2e(),Cte(),xte(5)]},Z2e(t,e,async()=>{if((!t.isConnected||!t.offsetParent)&&nCe(i))return;let{x:o,y:s}=await J2e(t,e,r);Object.assign(e.style,{position:"absolute",left:`${o}px`,top:`${s}px`})})}function iCe(i,e){return i.style.position="fixed",Object.entries(e).forEach(([t,n])=>{i.style[t]=n}),()=>{}}function nCe(i){switch(i.options.onPositionLost){case"close":return i.close(),!0;case"destroy":return i.destroy(),!0;case"hold":return!0}}var rCe={hideOnClickOutside:!0,hideOnEmojiSelect:!0,hideOnEscape:!0,position:"auto",showCloseButton:!0,onPositionLost:"none"};function oCe(i={}){return ue(xt(ue({},rCe),{rootElement:document.body}),i)}var sCe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>',Ite=Cr("popupContainer","closeButton"),a9=class{constructor(e,t){this.isOpen=!1,this.externalEvents=new qh,this.options=ue(ue({},oCe(t)),n9(e)),this.popupEl=document.createElement("div"),this.popupEl.classList.add(Ite.popupContainer),this.popupEl.classList.add(this.options.theme),t.className&&this.popupEl.classList.add(t.className),this.options.showCloseButton&&(this.closeButton=document.createElement("button"),this.closeButton.type="button",this.closeButton.classList.add(Ite.closeButton),this.closeButton.innerHTML=sCe,this.closeButton.addEventListener("click",()=>{this.close()}),this.popupEl.appendChild(this.closeButton));let n=document.createElement("div");this.popupEl.appendChild(n),this.picker=_te(xt(ue({},this.options),{rootElement:n})),this.focusTrap=new Tv,this.picker.addEventListener("data:ready",()=>{this.focusTrap.activate(this.picker.el),this.picker.setInitialFocus()}),this.options.hideOnEmojiSelect&&this.picker.addEventListener("emoji:select",()=>{var r;this.close(),(r=this.triggerElement)==null||r.focus()}),this.options.hideOnClickOutside&&(this.onDocumentClick=this.onDocumentClick.bind(this),document.addEventListener("click",this.onDocumentClick)),this.options.hideOnEscape&&(this.handleKeydown=this.handleKeydown.bind(this),this.popupEl.addEventListener("keydown",this.handleKeydown)),this.referenceElement=this.options.referenceElement,this.triggerElement=this.options.triggerElement}addEventListener(e,t){this.externalEvents.on(e,t),this.picker.addEventListener(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t),this.picker.removeEventListener(e,t)}handleKeydown(e){var t;e.key==="Escape"&&(this.close(),(t=this.triggerElement)==null||t.focus())}async destroy(){this.isOpen&&await this.close(),document.removeEventListener("click",this.onDocumentClick),this.picker.destroy(),this.externalEvents.removeAll()}toggle(e){return this.isOpen?this.close():this.open(e)}async open({triggerElement:e,referenceElement:t}={}){this.isOpen||(e&&(this.triggerElement=e),t&&(this.referenceElement=t),await this.initiateOpenStateChange(!0),this.popupEl.style.opacity="0",this.options.rootElement.appendChild(this.popupEl),await this.setPosition(),this.picker.reset(!1),await this.animatePopup(!0),await this.animateCloseButton(!0),this.picker.setInitialFocus(),this.externalEvents.emit("picker:open"))}async close(){var e;!this.isOpen||(await this.initiateOpenStateChange(!1),await this.animateCloseButton(!1),await this.animatePopup(!1),this.popupEl.remove(),this.picker.reset(),(e=this.positionCleanup)==null||e.call(this),this.focusTrap.deactivate(),this.externalEvents.emit("picker:close"))}getRunningAnimations(){return this.picker.el.getAnimations().filter(e=>e.playState==="running")}async setPosition(){var e;(e=this.positionCleanup)==null||e.call(this),this.positionCleanup=await eCe(this,this.popupEl,this.referenceElement,this.options.position)}awaitPendingAnimations(){return Promise.all(this.getRunningAnimations().map(e=>e.finished))}onDocumentClick(e){var t;let n=e.target,r=(t=this.triggerElement)==null?void 0:t.contains(n);this.isOpen&&!this.picker.isPickerClick(e)&&!r&&this.close()}animatePopup(e){return Wh(this.popupEl,{opacity:[0,1],transform:["scale(0.9)","scale(1)"]},{duration:150,id:e?"show-picker":"hide-picker",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}animateCloseButton(e){if(this.closeButton)return Wh(this.closeButton,{opacity:[0,1]},{duration:25,id:e?"show-close":"hide-close",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}async initiateOpenStateChange(e){this.isOpen=e,await this.awaitPendingAnimations()}},aCe=`.picmo__popupContainer{display:flex;flex-direction:column;position:absolute}.picmo__popupContainer .picmo__closeButton{position:absolute;opacity:0;background:transparent;border:none;z-index:1;right:0;top:0;cursor:pointer;padding:4px;align-self:flex-end;transform:translate(50%,-50%);background:#999999;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:50%}.picmo__popupContainer .picmo__closeButton:hover{background:var(--accent-color)}.picmo__popupContainer .picmo__closeButton svg{fill:#fff;width:1.25rem;height:1.25rem}
`,lCe=r9();function zte(i,e){return lCe(aCe),new a9(ue({autoFocus:"auto"},i),e)}var cCe={mounted(){let i=this.el.querySelector("[data-emoji-button]"),e=this.el.querySelector("[data-emoji-preview]"),t=this.el.querySelector("[data-emoji-input]"),n=zte({showPreview:!1},{triggerElement:i,referenceElement:i,position:"bottom"});n.addEventListener("emoji:select",({emoji:r})=>{e.innerHTML=r,t.value=r}),i.addEventListener("click",r=>{n.toggle()})}},Bte=cCe;var dCe={mounted(){this.focus()},updated(){this.el!==document.activeElement&&this.focus()},focus(){Jd(document.activeElement)||(this.el.focus(),this.el.selectionStart=this.el.selectionEnd=this.el.value.length,this.el.scrollLeft=this.el.scrollWidth)}},Hte=dCe;var uCe={mounted(){this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.initializeHeadingEl(),this.unsubscribeFromNavigationEvents=wn.subscribe("navigation",i=>{this.handleNavigationEvent(i)})},updated(){this.props=this.getProps(),this.initializeHeadingEl()},destroyed(){this.unsubscribeFromNavigationEvents()},getProps(){return{focusableId:Ct(this.el,"data-focusable-id"),onValueChange:Ct(this.el,"data-on-value-change"),metadata:Ct(this.el,"data-metadata")}},initializeHeadingEl(){let i=this.el.querySelector("[data-el-heading]");i!==this.headingEl&&(this.headingEl=i,this.headingEl.addEventListener("paste",e=>{e.preventDefault();let t=e.clipboardData.getData("text/plain").replace(`
`," ");document.execCommand("insertText",!1,t)}),this.headingEl.addEventListener("keydown",e=>{e.key==="Enter"&&e.preventDefault()}),this.headingEl.addEventListener("blur",e=>{setTimeout(()=>{this.isFocused&&this.insertMode&&(this.headingEl.focus(),Ute(this.headingEl))},0)}))},handleNavigationEvent(i){i.type==="element_focused"?this.handleElementFocused(i.focusableId,i.scroll):i.type==="insert_mode_changed"&&this.handleInsertModeChanged(i.enabled)},handleElementFocused(i,e){this.props.focusableId===i?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),e&&eu(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleInsertModeChanged(i){this.isFocused&&!this.insertMode&&i?(this.insertMode=i,this.el.setAttribute("phx-update","ignore"),this.headingEl.setAttribute("contenteditable",""),this.headingEl.focus(),Ute(this.headingEl)):this.insertMode&&!i&&(this.insertMode=i,this.headingEl.removeAttribute("contenteditable"),this.el.removeAttribute("phx-update"),this.pushEvent(this.props.onValueChange,{value:this.headingEl.textContent.trim(),metadata:this.props.metadata}))}};function Ute(i){let e=document.createRange();e.selectNodeContents(i),e.collapse(!1);let t=window.getSelection();t.removeAllRanges(),t.addRange(e)}var jte=uCe;var hCe={mounted(){this.props=this.getProps(),this.sourceEl=vc(this.el,"[data-source]"),this.targetEl=vc(this.el,"[data-target]"),this.updateDOM()},updated(){this.props=this.getProps(),this.updateDOM()},getProps(){return{language:Ct(this.el,"data-language")}},updateDOM(){let i=this.sourceEl.innerText;um(i,this.props.language).then(e=>{this.targetEl.innerHTML=e,this.el.setAttribute("data-highlighted","")})}},Wte=hCe;var c9=["bg-yellow-100","border-yellow-300"],fCe={mounted(){this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.previewEl=this.el.querySelector("[data-preview]"),this.initialPreviewContentEl=this.previewEl.firstElementChild,this.cameraPreviewEl=this.el.querySelector("[data-camera-preview]"),this.cameraListEl=this.el.querySelector("[data-camera-list]"),this.cameraItemTemplateEl=this.cameraListEl.firstElementChild,this.cameraItemTemplateEl.remove(),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.openCameraButton=this.el.querySelector("[data-btn-open-camera]"),this.captureCameraButton=this.el.querySelector("[data-btn-capture-camera]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.cameraListPopulated=!1,this.cameraVideoEl=null,this.cameraStream=null,this.updateImagePreview(),this.uploadButton.addEventListener("click",i=>{this.inputEl.click()}),this.inputEl.addEventListener("change",i=>{let[e]=i.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",i=>{i.stopPropagation(),i.preventDefault();let[e]=i.dataTransfer.files;e&&this.loadFile(e),this.closeCameraView()}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...c9)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...c9)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...c9)}),this.openCameraButton.addEventListener("click",i=>{this.cameraListPopulated||(this.renderCameraList(),this.cameraListPopulated=!0)}),this.cameraListEl.addEventListener("click",i=>{let e=i.target.closest("[data-camera-id]");if(e){let t=e.dataset.cameraId;this.openCameraView(t)}}),this.captureCameraButton.addEventListener("click",i=>{let e=this.toCanvas(this.cameraVideoEl,this.cameraVideoEl.videoWidth,this.cameraVideoEl.videoHeight);this.pushImage(e),this.closeCameraView()}),this.cancelButton.addEventListener("click",i=>{this.closeCameraView()})},updated(){this.props=this.getProps(),this.updateImagePreview()},getProps(){return{id:Ct(this.el,"data-id"),phxTarget:Ct(this.el,"data-phx-target",uo),height:Ti(this.el,"data-height",null,uo),width:Ti(this.el,"data-width",null,uo),format:Ct(this.el,"data-format"),fit:Ct(this.el,"data-fit"),imageUrl:Ti(this.el,"data-image-url",null),valueHeight:Ti(this.el,"data-value-height",null,uo),valueWidth:Ti(this.el,"data-value-width",null,uo)}},updateImagePreview(){this.props.imageUrl?gCe(this.props.imageUrl,this.props.valueHeight,this.props.valueWidth,this.props.format).then(i=>{this.setPreview(i)}):this.setPreview(this.initialPreviewContentEl)},loadFile(i){let e=new FileReader;e.onload=t=>{let n=document.createElement("img");n.addEventListener("load",r=>{let o=this.toCanvas(n,n.width,n.height);this.pushImage(o)}),n.src=t.target.result},e.readAsDataURL(i)},openCameraView(i){this.cameraPreviewEl.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.captureCameraButton.classList.remove("hidden"),this.previewEl.classList.add("hidden"),this.openCameraButton.classList.add("hidden"),this.uploadButton.classList.add("hidden"),navigator.mediaDevices.getUserMedia(this.cameraConstraints(i)).then(e=>{this.cameraStream=e,this.cameraVideoEl=document.createElement("video"),this.cameraVideoEl.autoplay=!0,this.cameraVideoEl.playsinline=!0,this.cameraVideoEl.muted=!0,this.cameraVideoEl.srcObject=e,this.setCameraPreview(this.cameraVideoEl)}).catch(()=>{})},cameraConstraints(i){return i==="system_default"?{audio:!1,video:!0}:{audio:!1,video:{deviceId:i}}},renderCameraList(){navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then(i=>navigator.mediaDevices.enumerateDevices().then(e=>(this.stopMediaStream(i),e))).then(i=>{let e=i.filter(t=>t.kind==="videoinput").map(t=>({deviceId:t.deviceId,label:t.label}));[{deviceId:"system_default",label:"System Default"},...e].forEach(({deviceId:t,label:n})=>{let r=this.cameraItemTemplateEl.cloneNode(!0);r.querySelector("[data-camera-id]").setAttribute("data-camera-id",t),r.querySelector("[data-label]").innerHTML=n,this.cameraListEl.appendChild(r)})}).catch(i=>{console.error(i),this.openCameraButton.disabled=!0})},closeCameraView(){return this.cameraStream!==null&&(this.stopMediaStream(this.cameraStream),this.cameraStream=null),this.cameraVideoEl!==null&&(this.cameraVideoEl.remove(),this.cameraVideoEl=null),this.cameraPreviewEl.classList.add("hidden"),this.cancelButton.classList.add("hidden"),this.captureCameraButton.classList.add("hidden"),this.previewEl.classList.remove("hidden"),this.openCameraButton.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),!0},stopMediaStream(i){i.getTracks().forEach(e=>{e.stop()})},pushImage(i){pCe(i,this.props.format).then(e=>{let t={height:i.height,width:i.width},n=new Blob([e]);n.meta=()=>t,this.uploadTo(this.props.phxTarget,"file",[n])})},toCanvas(i,e,t){let{width:n,height:r}=this.props,o=document.createElement("canvas"),s=o.getContext("2d");if(n===null&&r===null||n===e&&r===t)o.width=e,o.height=t,o.getContext("2d").drawImage(i,0,0,e,t,0,0,e,t);else if(this.props.fit==="contain"){let a=n/e,l=r/t,c=Math.min(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=d,o.height=u,s.drawImage(i,0,0,e,t,0,0,d,u)}else if(this.props.fit==="crop"){let a=n/e,l=r/t,c=Math.max(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=n,o.height=r,s.drawImage(i,Math.round((d-n)/c/2),Math.round((u-r)/c/2),e-Math.round((d-n)/c),t-Math.round((u-r)/c),0,0,n,r)}else if(this.props.fit==="pad"){let a=n/e,l=r/t,c=Math.min(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=n,o.height=r,s.fillStyle="black",s.fillRect(0,0,o.width,o.height),s.drawImage(i,0,0,e,t,Math.round((n-d)/2),Math.round((r-u)/2),d,u)}else o.width=n,o.height=r,s.drawImage(i,0,0,e,t,0,0,n,r);return o},setPreview(i){i.style.maxHeight="300px",i.style.maxWidth="100%",this.previewEl.replaceChildren(i)},setCameraPreview(i){i.style.maxHeight="300px",i.style.maxWidth="100%",this.cameraPreviewEl.replaceChildren(i)}};function pCe(i,e){if(e==="png"||e==="jpeg")return new Promise((t,n)=>{i.toBlob(r=>{r.arrayBuffer().then(o=>{t(o)})},`image/${e}`)});if(e==="rgb"){let t=i.getContext("2d").getImageData(0,0,i.width,i.height),n=mCe(t);return Promise.resolve(n)}throw new Error(`Unexpected format: ${e}`)}function mCe(i){let e=i.width*i.height,t=new Uint8ClampedArray(e*3);for(let n=0;n<e;n++)t[n*3]=i.data[n*4],t[n*3+1]=i.data[n*4+1],t[n*3+2]=i.data[n*4+2];return t.buffer}function gCe(i,e,t,n){if(n==="png"||n==="jpeg"){let r=document.createElement("img");return r.src=i,Promise.resolve(r)}if(n==="rgb")return fetch(i).then(r=>r.arrayBuffer()).then(r=>{let o=document.createElement("canvas");o.height=e,o.width=t;let s=bCe(r,t,e);return o.getContext("2d").putImageData(s,0,0),o});throw new Error(`Unexpected format: ${n}`)}function bCe(i,e,t){let n=e*t,r=new Uint8Array(i),o=new Uint8ClampedArray(n*4);for(let s=0;s<n;s++)o[s*4]=r[s*3],o[s*4+1]=r[s*3+1],o[s*4+2]=r[s*3+2],o[s*4+3]=255;return new ImageData(o,e,t)}var Vte=fCe;var vCe={mounted(){this.updateSrc()},updated(){this.updateSrc()},updateSrc(){let i=this.el.src,e="data:image/x-pixel;base64,",t=i.slice(e.length);if(i.startsWith(e)){let n=wQ(t),r=new DataView(n),o=r.getUint32(0,!1),s=r.getUint32(4,!1),a=r.getUint8(8),l=n.slice(9),c=_Ce(l,s,o,a),d=document.createElement("canvas");d.height=o,d.width=s,d.getContext("2d").putImageData(c,0,0);let u=d.toDataURL("image/png");this.el.src=u}}};function _Ce(i,e,t,n){let r=e*t,o=new Uint8Array(i),s=new Uint8ClampedArray(r*4);for(let a=0;a<r;a++)n===1?(s[a*4]=o[a],s[a*4+1]=o[a],s[a*4+2]=o[a],s[a*4+3]=255):n===2?(s[a*4]=o[a*2],s[a*4+1]=o[a*2],s[a*4+2]=o[a*2],s[a*4+3]=o[a*2+1]):n===3?(s[a*4]=o[a*3],s[a*4+1]=o[a*3+1],s[a*4+2]=o[a*3+2],s[a*4+3]=255):n===4&&(s[a*4]=o[a*4],s[a*4+1]=o[a*4+1],s[a*4+2]=o[a*4+2],s[a*4+3]=o[a*4+3]);return new ImageData(s,e,t)}var qte=vCe;var yCe=document.querySelector("meta[name='csrf-token']").getAttribute("content"),d9=new dy(window.LIVEBOOK_BASE_URL_PATH+"/socket",{params:{_csrf_token:yCe}}),Gh=null;function Kte(i){return Gh||(d9.connect(),Gh=d9.channel("js_view",{session_token:i}),Gh.join()),Gh}function $te(){Gh&&(Gh.leave(),Gh=null,d9.disconnect())}function Gte(i,e){if(Array.isArray(e)&&e[1]&&e[1].constructor===ArrayBuffer){let[t,n]=e;return uB([i,t],n)}else return{root:[i,e]}}function u9(i){if(i.constructor===ArrayBuffer){let[[e,t],n]=hB(i);return[e,[t,n]]}else{let{root:[e,t]}=i;return[e,t]}}var Yte="wcqj5QWCo66osdAWDnEgPRFyL7nfe8oNqNggnw4vvW8=";function Xte(i,e,t){let n=wCe(e,t);return xCe(n).then(()=>{i.sandbox="allow-scripts allow-same-origin allow-downloads allow-forms allow-modals allow-popups allow-top-navigation",i.allow="accelerometer; ambient-light-sensor; camera; display-capture; encrypted-media; fullscreen; geolocation; gyroscope; microphone; midi; usb; xr-spatial-tracking; clipboard-read; clipboard-write",i.src=n})}function wCe(i,e){let t=window.location.protocol;return e?e.replace(/^https?:/,t):t==="https:"?"https://livebookusercontent.com/iframe/v5.html":`http://${window.location.hostname}:${i}/iframe/v5.html`}var h9=null;function xCe(i){return h9||(h9=fetch(i).then(e=>e.text()).then(e=>{if(_Q(e)!==Yte)throw new Error(`The iframe loaded from ${i} doesn't have the expected checksum ${Yte}`)})),h9}var CCe={mounted(){this.props=this.getProps(),this.id=m4(),this.childToken=bQ(),this.childReadyPromise=null,this.childReady=!1,this.initReceived=!1,this.syncCallbackQueue=[],this.pongCallbackQueue=[],this.initTimeout=setTimeout(()=>this.handleInitTimeout(),2e3),this.channel=Kte(this.props.sessionToken),this.iframeActions=this.createIframe(),this.childReadyPromise=new Promise((r,o)=>{this._handleWindowMessage=s=>{s.source===this.iframe.contentWindow&&this.handleChildMessage(s.data,r)},window.addEventListener("message",this._handleWindowMessage)}),this.hiddenInput=document.createElement("input"),this.hiddenInput.style.display="none",this.el.appendChild(this.hiddenInput),this.iframeActions.visibilityPromise.then(()=>{this.loadIframe()});let i=this.channel.on(`init:${this.props.ref}:${this.id}`,r=>{let[,o]=u9(r);this.handleServerInit(o)}),e=this.channel.on(`event:${this.props.ref}`,r=>{let[[o],s]=u9(r);this.handleServerEvent(o,s)}),t=this.channel.on(`error:${this.props.ref}`,({message:r,init:o})=>{this.handleServerError(r,o)}),n=this.channel.on(`pong:${this.props.ref}`,()=>{this.handleServerPong()});this.unsubscribeFromChannelEvents=()=>{this.channel.off(`init:${this.props.ref}:${this.id}`,i),this.channel.off(`event:${this.props.ref}`,e),this.channel.off(`error:${this.props.ref}`,t),this.channel.off(`pong:${this.props.ref}`,n)},this.unsubscribeFromJSViewEvents=wn.subscribe(`js_views:${this.props.ref}`,r=>this.handleJSViewEvent(r)),this.channel.push("connect",{connect_token:this.props.connectToken,ref:this.props.ref,id:this.id},3e4),this.unsubscribeFromCellEvents=wn.subscribe("navigation",r=>this.handleNavigationEvent(r))},updated(){this.props=this.getProps(this)},disconnected(){this.el.removeAttribute("id")},destroyed(){window.removeEventListener("message",this._handleWindowMessage),this.iframeActions.remove(),this.unsubscribeFromChannelEvents(),this.channel.push("disconnect",{ref:this.props.ref}),this.unsubscribeFromJSViewEvents(),this.unsubscribeFromCellEvents()},getProps(){return{ref:Ct(this.el,"data-ref"),assetsBasePath:Ct(this.el,"data-assets-base-path"),assetsCdnUrl:Ti(this.el,"data-assets-cdn-url",null),jsPath:Ct(this.el,"data-js-path"),sessionToken:Ct(this.el,"data-session-token"),connectToken:Ct(this.el,"data-connect-token"),iframePort:Ct(this.el,"data-iframe-local-port",uo),iframeUrl:Ti(this.el,"data-iframe-url",null),timeoutMessage:Ct(this.el,"data-timeout-message")}},createIframe(){this.iframePlaceholder=document.createElement("div"),this.el.appendChild(this.iframePlaceholder),this.iframe=document.createElement("iframe"),this.iframe.className="w-full h-0 absolute z-[1]";let i=document.querySelector("[data-el-notebook]"),e=i.querySelector("[data-el-notebook-content]"),t=new ResizeObserver(a=>{this.repositionIframe()});t.observe(e),t.observe(i);let n=wn.subscribe("js_views",a=>{a.type==="reposition"&&this.repositionIframe()});this.iframe.addEventListener("mouseenter",a=>{this.iframePlaceholder.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0}))}),this.iframe.addEventListener("mouseleave",a=>{this.iframePlaceholder.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!0}))});let r=null,o=new Promise((a,l)=>{aN(this.iframePlaceholder)?a():(r=new IntersectionObserver(c=>{aN(this.iframePlaceholder)&&(r.disconnect(),a())}),r.observe(this.iframePlaceholder))});return this.iframe.toggleAttribute("data-js-focused",!!this.el.closest("[data-js-focused]")),{visibilityPromise:o,remove:()=>{t.disconnect(),n(),r&&r.disconnect(),this.iframe.remove(),this.iframePlaceholder.remove()}}},repositionIframe(){let{iframe:i,iframePlaceholder:e}=this,t=document.querySelector("[data-el-notebook]");if(hm(e))i.classList.add("hidden");else{i.classList.remove("hidden");let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=r.top-n.top+t.scrollTop;i.style.top=`${o}px`;let s=r.left-n.left+t.scrollLeft;i.style.left=`${s}px`,i.style.height=`${r.height}px`,i.style.width=`${r.width}px`}},loadIframe(){let i=document.querySelector("[data-el-js-view-iframes]");Xte(this.iframe,this.props.iframePort,this.props.iframeUrl).then(()=>{i.appendChild(this.iframe)})},handleChildMessage(i,e){if(i.type==="ready"&&!this.childReady)this.getAssetsBaseUrl().then(t=>{this.postMessage({type:"readyReply",token:this.childToken,baseUrl:t,jsPath:this.props.jsPath}),this.childReady=!0,e()});else{if(i.token!==this.childToken)throw new Error("Token mismatch");if(i.type==="resize")this.iframePlaceholder.style.height=`${i.height}px`,this.iframe.style.height=`${i.height}px`;else if(i.type==="domEvent"){let t=this.replicateDomEvent(i.event);i.isTargetEditable?this.hiddenInput.dispatchEvent(t):this.el.dispatchEvent(t)}else if(i.type==="event"){let{event:t,payload:n}=i,r=Gte([t,this.props.ref],n);this.channel.push("event",r)}else i.type==="syncReply"?(this.pongCallbackQueue.push(this.syncCallbackQueue.shift()),this.channel.push("ping",{ref:this.props.ref})):i.type==="selectSecret"?this.pushEvent("select_secret",{js_view_ref:this.props.ref,preselect_name:i.preselectName,options:i.options}):i.type==="setSmartCellEditorIntellisenseNode"&&this.pushEvent("set_smart_cell_editor_intellisense_node",{js_view_ref:this.props.ref,node:i.node,cookie:i.cookie})}},getAssetsBaseUrl(){return _3().then(i=>!i&&this.props.assetsCdnUrl?this.props.assetsCdnUrl:window.location.origin+this.props.assetsBasePath)},postMessage(i){this.iframe.contentWindow.postMessage(i,"*")},replicateDomEvent(i){if(i.type==="focus")return new FocusEvent("focus");if(i.type==="mousedown")return new MouseEvent("mousedown",{bubbles:!0});if(i.type==="keydown")return new KeyboardEvent(i.type,i.props)},handleInitTimeout(){this.initTimeoutContainer=document.createElement("div"),this.initTimeoutContainer.classList.add("info-box"),this.el.prepend(this.initTimeoutContainer),this.initTimeoutContainer.textContent=this.props.timeoutMessage},clearInitTimeout(){clearTimeout(this.initTimeout),this.initTimeoutContainer&&this.initTimeoutContainer.remove()},handleServerInit(i){this.clearInitTimeout(),this.initReceived=!0,this.childReadyPromise.then(()=>{this.postMessage({type:"init",data:i})})},handleServerEvent(i,e){this.initReceived&&this.childReadyPromise.then(()=>{this.postMessage({type:"event",event:i,payload:e})})},handleServerError(i,e){e&&this.clearInitTimeout(),this.errorContainer||(this.errorContainer=document.createElement("div"),this.errorContainer.classList.add("error-box","mb-4"),this.el.prepend(this.errorContainer)),this.errorContainer.textContent=i},handleServerPong(){this.pongCallbackQueue.shift()()},handleJSViewEvent(i){i.type==="sync"?(this.syncCallbackQueue.push(i.callback),this.postMessage({type:"sync"})):i.type=="secretSelected"&&this.postMessage({type:"secretSelected",secretName:i.secretName})},handleNavigationEvent(i){if(i.type==="element_focused"){let e=this.el.closest("[data-focusable-id]"),t=e?e.dataset.focusableId:null;this.iframe.toggleAttribute("data-js-focused",t===i.focusableId)}}};function _3(){return _3.promise=_3.promise||fetch("/public/health").then(i=>i.status===200).catch(i=>!1),_3.promise}var Qte=CCe;var SCe={mounted(){this.props=this.getProps(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentKeyUp=this.handleDocumentKeyUp.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),window.addEventListener("keydown",this._handleDocumentKeyDown,!0),window.addEventListener("keyup",this._handleDocumentKeyUp,!0),window.addEventListener("focus",this._handleDocumentFocus,!0)},updated(){this.props=this.getProps()},destroyed(){window.removeEventListener("keydown",this._handleDocumentKeyDown,!0),window.removeEventListener("keyup",this._handleDocumentKeyUp,!0),window.removeEventListener("focus",this._handleDocumentFocus,!0)},getProps(){return{cellId:Ct(this.el,"data-cell-id"),defaultHandlers:Ct(this.el,"data-default-handlers"),isKeydownEnabled:Ct(this.el,"data-keydown-enabled",Dl),isKeyupEnabled:Ct(this.el,"data-keyup-enabled",Dl),target:Ct(this.el,"data-target")}},handleDocumentKeyDown(i){if(this.isKeyboardToggle(i)&&!Jd(document.activeElement)){nl(i),this.keyboardEnabled()?this.disableKeyboard():this.enableKeyboard();return}if(this.keyboardEnabled()){if(this.props.defaultHandlers!=="on"&&nl(i),i.repeat)return;if(this.props.isKeydownEnabled){let{key:e}=i;this.pushEventTo(this.props.target,"keydown",{key:e})}}},handleDocumentKeyUp(i){if(this.keyboardEnabled()&&(this.props.defaultHandlers!=="on"&&nl(i),this.props.isKeyupEnabled)){let{key:e}=i;this.pushEventTo(this.props.target,"keyup",{key:e})}},handleDocumentFocus(i){this.props.isKeydownEnabled&&Jd(i.target)&&this.disableKeyboard()},enableKeyboard(){this.keyboardEnabled()||this.pushEventTo(this.props.target,"enable_keyboard",{})},disableKeyboard(){this.keyboardEnabled()&&this.pushEventTo(this.props.target,"disable_keyboard",{})},keyboardEnabled(){return this.props.isKeydownEnabled||this.props.isKeyupEnabled},isKeyboardToggle(i){if(i.repeat)return!1;let{metaKey:e,ctrlKey:t,key:n}=i;return(p4()?e:t)&&n==="k"&&this.isCellFocused()?!this.keyboardEnabled()||["on","disable_only"].includes(this.props.defaultHandlers):!1},isCellFocused(){let i=this.el.closest("[data-el-session]");return i&&i.getAttribute("data-js-focused-id")===this.props.cellId}},Zte=SCe;var kCe={mounted(){this.props=this.getProps(),this.templateEl=vc(this.el,"[data-template]"),this.contentEl=vc(this.el,"[data-content]"),this.markdown=new _4(this.contentEl,this.templateEl.textContent,{baseUrl:this.props.basePath,allowedUriSchemes:this.props.allowedUriSchemes.split(",")})},updated(){this.props=this.getProps(),this.markdown.setContent(this.templateEl.textContent)},getProps(){return{basePath:Ct(this.el,"data-base-path"),allowedUriSchemes:Ct(this.el,"data-allowed-uri-schemes")}}},Jte=kCe;var ECe={mounted(){this.scroll()},updated(){this.scroll()},scroll(){ov(this.el)}},eie=ECe;var f9=class{constructor(e=2e3){this.resetTimeout=e,this.buffer=[],this.resetTimeoutId=null}push(e){this.buffer.push(e),this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=setTimeout(()=>{this.reset()},this.resetTimeout)}reset(){this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=null,this.buffer=[]}tryMatch(e){if(e.length>this.buffer.length)return!1;let t=this.buffer.slice(-e.length),n=e.every((r,o)=>r===t[o]);return n&&this.reset(),n}},tie=f9;var TCe={mounted(){this.props=this.getProps(),this.focusedId=null,this.insertMode=!1,this.view=null,this.viewOptions=null,this.keyBuffer=new tie,this.clientsMap={},this.lastLocationReportByClientId={},this.followedClientId=null,b4(this.faviconForEvaluationStatus(this.props.globalStatus)),this.updateSectionListHighlight(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),this._handleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("keydown",this._handleDocumentKeyDown,!0),document.addEventListener("mousedown",this._handleDocumentMouseDown),document.addEventListener("focus",this._handleDocumentFocus,!0),document.addEventListener("click",this._handleDocumentClick),this.getElement("sections-list").addEventListener("click",i=>{this.handleSectionsListClick(i),this.handleCellIndicatorsClick(i)}),this.getElement("clients-list").addEventListener("click",i=>this.handleClientsListClick(i)),this.getElement("sections-list-toggle").addEventListener("click",i=>this.toggleSectionsList()),this.getElement("clients-list-toggle").addEventListener("click",i=>this.toggleClientsList()),this.getElement("secrets-list-toggle").addEventListener("click",i=>this.toggleSecretsList()),this.getElement("runtime-info-toggle").addEventListener("click",i=>this.toggleRuntimeInfo()),this.getElement("app-info-toggle").addEventListener("click",i=>this.toggleAppInfo()),this.getElement("files-list-toggle").addEventListener("click",i=>this.toggleFilesList()),this.getElement("notebook").addEventListener("scroll",i=>this.updateSectionListHighlight()),this.getElement("notebook-indicators").addEventListener("click",i=>this.handleCellIndicatorsClick(i)),this.getElement("views").addEventListener("click",i=>{this.handleViewsClick(i)}),this.getElement("section-toggle-collapse-all-button").addEventListener("click",i=>this.toggleCollapseAllSections()),this.initializeDragAndDrop(),window.addEventListener("phx:page-loading-stop",()=>{this.initializeFocus()},{once:!0}),this.handleEvent("session_init",({clients:i})=>{i.forEach(e=>{this.clientsMap[e.id]=e})}),this.handleEvent("cell_inserted",({cell_id:i})=>{this.handleCellInserted(i)}),this.handleEvent("cell_deleted",({cell_id:i,sibling_cell_id:e})=>{this.handleCellDeleted(i,e)}),this.handleEvent("cell_restored",({cell_id:i})=>{this.handleCellRestored(i)}),this.handleEvent("cell_moved",({cell_id:i})=>{this.handleCellMoved(i)}),this.handleEvent("section_inserted",({section_id:i})=>{this.handleSectionInserted(i)}),this.handleEvent("section_deleted",({section_id:i})=>{this.handleSectionDeleted(i)}),this.handleEvent("section_moved",({section_id:i})=>{this.handleSectionMoved(i)}),this.handleEvent("cell_upload",({cell_id:i,url:e})=>{this.handleCellUpload(i,e)}),this.handleEvent("client_joined",({client:i})=>{this.handleClientJoined(i)}),this.handleEvent("client_left",({client_id:i})=>{this.handleClientLeft(i)}),this.handleEvent("clients_updated",({clients:i})=>{this.handleClientsUpdated(i)}),this.handleEvent("secret_selected",({select_secret_ref:i,secret_name:e})=>{this.handleSecretSelected(i,e)}),this.handleEvent("location_report",({client_id:i,focusable_id:e,selection:t})=>{let n={focusableId:e,selection:this.decodeSelection(t)};this.handleLocationReport(i,n)}),this.unsubscribeFromSessionEvents=wn.subscribe("session",i=>{this.handleSessionEvent(i)})},updated(){let i=this.props;this.props=this.getProps(),this.props.globalStatus!==i.globalStatus&&b4(this.faviconForEvaluationStatus(this.props.globalStatus))},disconnected(){this.el.removeAttribute("id"),this.keepChannel=!0},destroyed(){this.unsubscribeFromSessionEvents(),document.removeEventListener("keydown",this._handleDocumentKeyDown,!0),document.removeEventListener("mousedown",this._handleDocumentMouseDown),document.removeEventListener("focus",this._handleDocumentFocus,!0),document.removeEventListener("click",this._handleDocumentClick),b4("favicon"),this.keepChannel||$te()},getProps(){return{autofocusCellId:Ti(this.el,"data-autofocus-cell-id",null),globalStatus:Ti(this.el,"data-global-status",null)}},faviconForEvaluationStatus(i){return i==="evaluating"?"favicon-evaluating":i==="stale"?"favicon-stale":i==="errored"?"favicon-errored":"favicon"},handleDocumentKeyDown(i){if(i.repeat)return;let e=p4()?i.metaKey:i.ctrlKey,t=i.altKey,n=i.shiftKey,r=i.key,o=this.keyBuffer;if(!(Jd(i.target)&&i.target.closest("[data-el-outputs-container]"))){if(e&&n&&!t&&r==="Enter"){nl(i),this.queueFullCellsEvaluation(!0);return}else if(!e&&n&&!t&&r==="Enter"){nl(i),Bh(this.focusedCellType())&&this.queueFocusedCellEvaluation(),this.moveFocus(1);return}else if(e&&!t&&r==="Enter"){nl(i),Bh(this.focusedCellType())&&this.queueFocusedCellEvaluation();return}else if(e&&r==="s"){nl(i),this.saveNotebook();return}else if(e||t)return}this.insertMode?(o.reset(),r==="Escape"&&(this.escapesMonacoWidget(i)||this.escapeInsertMode())):Jd(i.target)?(o.reset(),r==="Escape"&&i.target.blur()):(o.push(i.key),o.tryMatch(["d","d"])?this.deleteFocusedCell():o.tryMatch(["e","a"])?this.queueFullCellsEvaluation(!1):o.tryMatch(["e","e"])?Bh(this.focusedCellType())&&this.queueFocusedCellEvaluation():o.tryMatch(["e","s"])?this.queueFocusedSectionEvaluation():o.tryMatch(["s","s"])?this.toggleSectionsList():o.tryMatch(["s","e"])?this.toggleSecretsList():o.tryMatch(["s","a"])?this.toggleAppInfo():o.tryMatch(["s","u"])?this.toggleClientsList():o.tryMatch(["s","f"])?this.toggleFilesList():o.tryMatch(["s","r"])?this.toggleRuntimeInfo():o.tryMatch(["s","b"])?this.showBin():o.tryMatch(["s","p"])?this.showPackageSearch():o.tryMatch(["e","x"])?this.cancelFocusedCellEvaluation():o.tryMatch(["0","0"])?this.reconnectRuntime():o.tryMatch(["Escape","Escape"])?this.setFocusedEl(null):o.tryMatch(["?"])?this.showShortcuts():o.tryMatch(["i"])||i.target.matches("body, [data-el-cell-body], [data-el-heading], [data-focusable-id]")&&this.focusedId&&r==="Enter"?(nl(i),this.isInsertModeAvailable()&&this.enterInsertMode()):o.tryMatch(["j"])?this.moveFocus(1):o.tryMatch(["k"])?this.moveFocus(-1):o.tryMatch(["J"])?this.moveFocusedCell(1):o.tryMatch(["K"])?this.moveFocusedCell(-1):o.tryMatch(["n"])?this.insertCellBelowFocused("code"):o.tryMatch(["N"])?this.insertCellAboveFocused("code"):o.tryMatch(["m"])?(!this.view||this.viewOptions.showMarkdown)&&this.insertCellBelowFocused("markdown"):o.tryMatch(["M"])?(!this.view||this.viewOptions.showMarkdown)&&this.insertCellAboveFocused("markdown"):o.tryMatch(["v","z"])?this.toggleView("code-zen"):o.tryMatch(["v","p"])?this.toggleView("presentation"):o.tryMatch(["v","c"])?this.toggleView("custom"):o.tryMatch(["c"])?(!this.view||this.viewOptions.showSection)&&this.toggleCollapseSection():o.tryMatch(["C"])&&(!this.view||this.viewOptions.showSection)&&this.toggleCollapseAllSections())},escapesMonacoWidget(i){if(i.target.closest(".monaco-inputbox"))return!0;let e=i.target.closest(".monaco-editor.focused");return e?!!(e.querySelector(".editor-widget.parameter-hints-widget.visible")||e.querySelector(".editor-widget.suggest-widget.visible")||e.querySelectorAll(".cursor").length>1||["insert","visual"].includes(e.dataset.vimMode)):!1},handleDocumentMouseDown(i){if(!i.target.closest("[data-el-notebook]")||i.target.closest(".doctest-details-widget")){this.insertMode&&this.setInsertMode(!1);return}if(i.target.closest("[data-el-insert-buttons] button"))return;let e=i.target.closest("[data-focusable-id]"),t=e?e.dataset.focusableId:null,n=this.editableElementClicked(i,e);t!==this.focusedId&&this.setFocusedEl(t,{scroll:!1,focusElement:!1}),!i.target.closest("[data-el-actions]")&&this.insertMode!==n&&this.setInsertMode(n)},editableElementClicked(i,e){if(e){let t=i.target.closest("[data-el-editor-container], [data-el-heading]");return t&&e.contains(t)}return!1},handleDocumentFocus(i){let e=i.target.closest&&i.target.closest("[data-focusable-id]");if(e){let t=e.dataset.focusableId;t!==this.focusedId&&this.setFocusedEl(t,{scroll:!1,focusElement:!1})}},handleDocumentClick(i){i.target.closest("[data-el-enable-insert-mode-button]")&&this.setInsertMode(!0),i.target.closest("[data-btn-package-search]")&&this.insertMode&&this.setInsertMode(!1);let e=i.target.closest("[data-el-queue-cell-evaluation-button]");if(e){let n=e.getAttribute("data-cell-id"),r=e.hasAttribute("data-disable-dependencies-cache");this.queueCellEvaluation(n,r)}let t=window.location.hash;if(t){let n=t.replace(/^#/,"");!document.getElementById(n).contains(i.target)&&!i.target.closest("a")&&history.pushState(null,document.title,window.location.pathname+window.location.search)}},handleSectionsListClick(i){let e=i.target.closest("[data-el-sections-list-item]");if(e){let t=e.getAttribute("data-section-id");this.getSectionById(t).scrollIntoView({behavior:"smooth",block:"start"})}},handleClientsListClick(i){let e=i.target.closest("[data-el-clients-list-item]");if(e){let t=e.getAttribute("data-client-id");i.target.closest("[data-el-client-link]")&&this.handleClientLinkClick(t),i.target.closest("[data-el-client-follow-toggle]")&&this.handleClientFollowToggleClick(t,e)}},handleClientLinkClick(i){this.mirrorClientFocus(i)},handleClientFollowToggleClick(i,e){let t=this.el.querySelector("[data-el-clients-list-item][data-js-followed]");t&&t.removeAttribute("data-js-followed"),i===this.followedClientId?this.followedClientId=null:(e.setAttribute("data-js-followed",""),this.followedClientId=i,this.mirrorClientFocus(i))},mirrorClientFocus(i){let e=this.lastLocationReportByClientId[i];e&&e.focusableId&&this.setFocusedEl(e.focusableId)},handleCellIndicatorsClick(i){let e=i.target.closest("[data-el-focus-cell-button]");if(e){let t=e.getAttribute("data-target");this.setFocusedEl(t)}},initializeFocus(){let i=window.location.hash;if(i){let e=i.replace(/^#/,""),t=document.getElementById(e);if(t){let n=t.closest("[data-focusable-id]");n?this.setFocusedEl(n.dataset.focusableId):t.scrollIntoView()}}else this.props.autofocusCellId&&(this.setFocusedEl(this.props.autofocusCellId,{scroll:!1}),this.setInsertMode(!0))},updateSectionListHighlight(){let i=this.el.querySelector("[data-el-sections-list-item][data-js-is-viewed]");i&&i.removeAttribute("data-js-is-viewed");let e=this.getSections().reverse().find(t=>{let{top:n}=t.getBoundingClientRect(),r=document.documentElement.scrollTop;return n<=r+window.innerHeight*.35});if(e){let t=e.getAttribute("data-section-id");this.el.querySelector(`[data-el-sections-list-item][data-section-id="${t}"]`).setAttribute("data-js-is-viewed","")}},initializeDragAndDrop(){let i=!1,e=null,t=null,n=(o=null)=>{if(!i){i=!0,e=o;let s=o?"internal":"external";this.el.setAttribute("data-js-dragging",s),s==="external"&&this.toggleFilesList(!0)}},r=()=>{i&&(i=!1,this.el.removeAttribute("data-js-dragging"))};this.el.addEventListener("dragstart",o=>{n(o.target)}),this.el.addEventListener("dragenter",o=>{n()}),this.el.addEventListener("dragleave",o=>{this.el.contains(o.relatedTarget)||r()}),this.el.addEventListener("dragover",o=>{o.stopPropagation(),o.preventDefault()}),this.el.addEventListener("drop",o=>{o.stopPropagation(),o.preventDefault();let s=o.target.closest("[data-el-insert-drop-area]"),a=o.target.closest("[data-el-files-drop-area]");if(s){let l=s.getAttribute("data-section-id")||null,c=s.getAttribute("data-cell-id")||null;if(o.dataTransfer.files.length>0)t=o.dataTransfer.files,this.pushEvent("handle_file_drop",{section_id:l,cell_id:c});else if(e&&e.matches("[data-el-file-entry]")){let d=e.getAttribute("data-name");this.pushEvent("insert_file",{file_entry_name:d,section_id:l,cell_id:c})}}else a&&o.dataTransfer.files.length>0&&(t=o.dataTransfer.files,this.pushEvent("handle_file_drop",{}));r()}),this.handleEvent("finish_file_drop",o=>{let s=document.querySelector('#add-file-entry-modal input[type="file"]');s&&(s.files=t,s.dispatchEvent(new Event("change",{bubbles:!0})))})},toggleSectionsList(i=null){this.toggleSidePanelContent("sections-list",i)},toggleClientsList(i=null){this.toggleSidePanelContent("clients-list",i)},toggleSecretsList(i=null){this.toggleSidePanelContent("secrets-list",i)},toggleAppInfo(i=null){this.toggleSidePanelContent("app-info",i)},toggleFilesList(i=null){this.toggleSidePanelContent("files-list",i)},toggleRuntimeInfo(i=null){this.toggleSidePanelContent("runtime-info",i)},toggleSidePanelContent(i,e=null){(e===null?this.el.getAttribute("data-js-side-panel-content")!==i:e)?this.el.setAttribute("data-js-side-panel-content",i):this.el.removeAttribute("data-js-side-panel-content")},showBin(){let i=this.el.querySelector("[data-btn-show-bin]");i&&i.click()},showPackageSearch(){this.setFocusedEl("setup");let i=this.el.querySelector("[data-btn-package-search]");i&&i.click()},saveNotebook(){this.pushEvent("save",{})},deleteFocusedCell(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("delete_cell",{cell_id:this.focusedId})},queueCellEvaluation(i,e){this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_cell_evaluation",{cell_id:i,disable_dependencies_cache:e})})},queueFocusedCellEvaluation(){this.focusedId&&this.isCell(this.focusedId)&&this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_cell_evaluation",{cell_id:this.focusedId})})},queueFullCellsEvaluation(i){let e=i&&this.focusedId&&this.isCell(this.focusedId)?[this.focusedId]:[];this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_full_evaluation",{forced_cell_ids:e})})},queueFocusedSectionEvaluation(){if(this.focusedId){let i=this.getSectionIdByFocusableId(this.focusedId);i&&this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_section_evaluation",{section_id:i})})}},dispatchQueueEvaluation(i){Bh(this.focusedCellType())?wn.broadcast(`cells:${this.focusedId}`,{type:"dispatch_queue_evaluation",dispatch:i}):i()},cancelFocusedCellEvaluation(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("cancel_cell_evaluation",{cell_id:this.focusedId})},reconnectRuntime(){this.pushEvent("reconnect_runtime",{})},showShortcuts(){let i=this.el.querySelector("[data-btn-show-shortcuts]");i&&i.click()},isInsertModeAvailable(){if(!this.focusedId)return!1;let i=this.getFocusableEl(this.focusedId);return!this.isCell(this.focusedId)||!i.hasAttribute("data-js-insert-mode-disabled")},enterInsertMode(){this.focusedId&&this.setInsertMode(!0)},escapeInsertMode(){this.setInsertMode(!1)},moveFocus(i){let e=this.nearbyFocusableId(this.focusedId,i);this.setFocusedEl(e)},moveFocusedCell(i){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("move_cell",{cell_id:this.focusedId,offset:i})},insertCellBelowFocused(i){if(this.focusedId)this.insertCellBelowFocusableId(this.focusedId,i);else{let e=this.getFocusableIds();e.length>0&&this.insertCellBelowFocusableId(e[e.length-1],i)}},insertCellAboveFocused(i){if(this.focusedId){let e=this.nearbyFocusableId(this.focusedId,-1);this.insertCellBelowFocusableId(e,i)}else{let e=this.getFocusableIds();e.length>0&&this.insertCellBelowFocusableId(e[0],i)}},insertCellBelowFocusableId(i,e){if(this.isCell(i))this.pushEvent("insert_cell_below",{type:e,cell_id:i});else if(this.isSection(i))this.pushEvent("insert_cell_below",{type:e,section_id:i});else if(this.isNotebook(i)){let t=this.getSectionIds();t.length>0&&this.pushEvent("insert_cell_below",{type:e,section_id:t[0]})}},setFocusedEl(i,{scroll:e=!0,focusElement:t=!0}={}){if(this.focusedId=i,i?this.el.setAttribute("data-js-focused-id",i):this.el.removeAttribute("data-js-focused-id"),i){if(!this.isSection(i)){let r=this.getSectionIdByFocusableId(i);r&&this.getSectionById(r).removeAttribute("data-js-collapsed")}let n=this.getFocusableEl(i);t&&(n.querySelector("[data-el-cell-body]")||n.querySelector("[data-el-heading]")||n).focus({preventScroll:!0})}wn.broadcast("navigation",{type:"element_focused",focusableId:i,scroll:e}),this.setInsertMode(!1)},setInsertMode(i){this.insertMode=i,i?this.el.setAttribute("data-js-insert-mode",""):(this.el.removeAttribute("data-js-insert-mode"),this.sendLocationReport({focusableId:this.focusedId,selection:null})),wn.broadcast("navigation",{type:"insert_mode_changed",enabled:i})},handleViewsClick(i){let e=i.target.closest("[data-el-view-toggle]");if(e){let t=e.getAttribute("data-el-view-toggle");this.toggleView(t)}},toggleView(i){i===this.view?(this.unsetView(),i==="custom"&&this.unsubscribeCustomViewFromSettings()):i==="code-zen"?this.setView(i,{showSection:!1,showMarkdown:!1,showOutput:!0,spotlight:!1}):i==="presentation"?this.setView(i,{showSection:!0,showMarkdown:!0,showOutput:!0,spotlight:!0}):i==="custom"&&(this.unsubscribeCustomViewFromSettings=sn.getAndSubscribe(t=>{this.setView(i,{showSection:t.custom_view_show_section,showMarkdown:t.custom_view_show_markdown,showOutput:t.custom_view_show_output,spotlight:t.custom_view_spotlight})}),this.pushEvent("open_custom_view_settings"));let e=this.focusedId||this.nearbyFocusableId(null,0);if(e){let t=this.ensureVisibleFocusableEl(e);t!==this.focused&&this.setFocusedEl(t,{scroll:!1}),t&&this.getFocusableEl(t).scrollIntoView({block:"center"})}},setView(i,e){this.view=i,this.viewOptions=e,this.el.setAttribute("data-js-view",i),this.el.toggleAttribute("data-js-hide-section",!e.showSection),this.el.toggleAttribute("data-js-hide-markdown",!e.showMarkdown),this.el.toggleAttribute("data-js-hide-output",!e.showOutput),this.el.toggleAttribute("data-js-spotlight",e.spotlight)},unsetView(){this.view=null,this.viewOptions=null,this.el.removeAttribute("data-js-view"),this.el.removeAttribute("data-js-hide-section"),this.el.removeAttribute("data-js-hide-markdown"),this.el.removeAttribute("data-js-hide-output"),this.el.removeAttribute("data-js-spotlight")},toggleCollapseSection(){if(this.focusedId){let i=this.getSectionIdByFocusableId(this.focusedId);if(i){let e=this.getSectionById(i);e.hasAttribute("data-js-collapsed")?e.removeAttribute("data-js-collapsed"):(e.setAttribute("data-js-collapsed",""),this.setFocusedEl(i,{scroll:!0}))}}},toggleCollapseAllSections(){let i=this.getSections().every(e=>e.hasAttribute("data-js-collapsed"));if(this.getSections().forEach(e=>{e.toggleAttribute("data-js-collapsed",!i)}),this.focusedId){let e=this.getSectionIdByFocusableId(this.focusedId);e&&this.setFocusedEl(e,{scroll:!0})}},handleCellInserted(i){this.setFocusedEl(i),LQ(this.focusedCellType())&&this.setInsertMode(!0)},handleCellDeleted(i,e){if(this.focusedId===i)if(this.view){let t=this.ensureVisibleFocusableEl(e);this.setFocusedEl(t)}else this.setFocusedEl(e)},handleCellRestored(i){this.setFocusedEl(i)},handleCellMoved(i){this.repositionJSViews(),this.focusedId===i&&wn.broadcast("cells",{type:"cell_moved",cellId:i})},handleSectionInserted(i){let t=this.getSectionById(i).querySelector("[data-el-section-headline]"),{focusableId:n}=t.dataset;this.setFocusedEl(n),this.setInsertMode(!0),fQ(document.activeElement)},handleSectionDeleted(i){this.focusedId&&!this.getFocusableEl(this.focusedId)&&this.setFocusedEl(null)},handleSectionMoved(i){this.repositionJSViews();let e=this.getSectionById(i);eu(e)},handleCellUpload(i,e){this.focusedId!==i&&this.setFocusedEl(i),this.insertMode||this.setInsertMode(!0),wn.broadcast("cells",{type:"cell_upload",cellId:i,url:e})},handleClientJoined(i){this.clientsMap[i.id]=i},handleClientLeft(i){let e=this.clientsMap[i];e&&(delete this.clientsMap[i],this.broadcastLocationReport(e,{focusableId:null,selection:null}),e.id===this.followedClientId&&(this.followedClientId=null))},handleClientsUpdated(i){i.forEach(e=>{this.clientsMap[e.id]=e})},handleSecretSelected(i,e){wn.broadcast(`js_views:${i}`,{type:"secretSelected",secretName:e})},handleLocationReport(i,e){let t=this.clientsMap[i];this.lastLocationReportByClientId[i]=e,t&&(this.broadcastLocationReport(t,e),t.id===this.followedClientId&&e.focusableId!==this.focusedId&&this.setFocusedEl(e.focusableId))},handleSessionEvent(i){i.type==="cursor_selection_changed"&&this.sendLocationReport({focusableId:i.focusableId,selection:i.selection})},repositionJSViews(){wn.broadcast("js_views",{type:"reposition"})},broadcastLocationReport(i,e){wn.broadcast("navigation",{type:"location_report",client:i,report:e})},sendLocationReport(i){Object.keys(this.clientsMap).length>1&&this.pushEvent("location_report",{focusable_id:i.focusableId,selection:this.encodeSelection(i.selection)})},encodeSelection(i){if(i===null)return null;let{tag:e,editorSelection:t}=i;return[e,t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn]},decodeSelection(i){if(i===null)return null;let[e,t,n,r,o]=i,s=new hi.Selection(t,n,r,o);return{tag:e,editorSelection:s}},focusedCellType(){return this.focusedId&&this.isCell(this.focusedId)?this.getFocusableEl(this.focusedId).getAttribute("data-type"):null},nearbyFocusableId(i,e){let t=this.getFocusableIds();if(t.length===0)return null;let n=t.indexOf(i);if(n===-1){let r=this.getFocusableEls().find(sN);return r?r.getAttribute("data-focusable-id"):t[0]}else{let r=uQ(n+e,0,t.length-1);return t[r]}},ensureVisibleFocusableEl(i){let e=this.getFocusableEl(i),t=Array.from(this.el.querySelectorAll("[data-focusable-id]")),n=t.indexOf(e),r=[...t.slice(n,-1),...t.slice(0,n).reverse()].find(o=>!hm(o));return r&&r.getAttribute("data-focusable-id")},isCell(i){return this.getFocusableEl(i).hasAttribute("data-el-cell")},isSection(i){return this.getFocusableEl(i).hasAttribute("data-el-section-headline")},isNotebook(i){return this.getFocusableEl(i).hasAttribute("data-el-notebook-headline")},getFocusableEl(i){return this.el.querySelector(`[data-focusable-id="${i}"]`)},getFocusableEls(){return Array.from(this.el.querySelectorAll("[data-focusable-id]")).filter(i=>!hm(i))},getFocusableIds(){return this.getFocusableEls().map(i=>i.getAttribute("data-focusable-id"))},getSectionIdByFocusableId(i){let t=this.getFocusableEl(i).closest("[data-el-section]");return t&&t.getAttribute("data-section-id")},getSectionIds(){return this.getSections().map(e=>e.getAttribute("data-section-id"))},getSections(){return Array.from(this.el.querySelectorAll("[data-el-section]"))},getSectionById(i){return this.el.querySelector(`[data-el-section][data-section-id="${i}"]`)},getElement(i){return this.el.querySelector(`[data-el-${i}]`)}},iie=TCe;var ICe={mounted(){this.autosize(),this.el.addEventListener("input",i=>{this.autosize()})},updated(){this.autosize()},autosize(){this.el.style.height="0px",this.el.style.height=`${this.el.scrollHeight+2}px`}},nie=ICe;var LCe=100,ACe={mounted(){this.props=this.getProps(),this.interval=setInterval(()=>this.updateDOM(),LCe)},updated(){this.props=this.getProps(),this.updateDOM()},destroyed(){clearInterval(this.interval)},getProps(){return{start:Ct(this.el,"data-start")}},updateDOM(){let e=(Date.now()-new Date(this.props.start))/1e3;this.el.innerHTML=`${e.toFixed(1)}s`}},rie=ACe;var oie="lb:user_data";function sie(i){let e=JSON.stringify(i),t=mQ(e);MCe(oie,t,15768e4)}function aie(){let i=DCe(oie);if(i){let e=gQ(i);return JSON.parse(e)}else return null}function DCe(i){let e=document.cookie.split("; ").find(t=>t.startsWith(`${i}=`));return e?e.replace(`${i}=`,""):null}function MCe(i,e,t){let n=`${i}=${e};max-age=${t};path=/${v4()}`;document.cookie=n}var NCe={mounted(){this.el.addEventListener("submit",i=>{let e=this.el.user_form_name.value,t=this.el.user_form_hex_color.value;sie({name:e,hex_color:t})})}},lie=NCe;var RCe={mounted(){this.props=this.getProps(),this.updateAttrs(),this.el.addEventListener("blur",i=>{let e=this.datetimeLocalToUtc(this.el.value);this.pushEventTo(this.props.phxTarget,"change",{html_value:e})})},updated(){this.props=this.getProps(),this.updateAttrs()},getProps(){return{utcValue:Ti(this.el,"data-utc-value",null),utcMin:Ti(this.el,"data-utc-min",null),utcMax:Ti(this.el,"data-utc-max",null),phxTarget:Ct(this.el,"data-phx-target")}},updateAttrs(){this.el.value=this.datetimeUtcToLocal(this.props.utcValue),this.el.min=this.datetimeUtcToLocal(this.props.utcMin),this.el.max=this.datetimeUtcToLocal(this.props.utcMax)},datetimeUtcToLocal(i){if(!i)return null;let e=new Date(i+"Z"),t=e.getFullYear().toString(),n=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0");return`${t}-${n}-${r}T${o}:${s}:${a}`},datetimeLocalToUtc(i){if(!i)return null;let e=new Date(i),t=e.getUTCFullYear().toString(),n=(e.getUTCMonth()+1).toString().padStart(2,"0"),r=e.getUTCDate().toString().padStart(2,"0"),o=e.getUTCHours().toString().padStart(2,"0"),s=e.getUTCMinutes().toString().padStart(2,"0"),a=e.getUTCSeconds().toString().padStart(2,"0");return`${t}-${n}-${r}T${o}:${s}:${a}`}},cie=RCe;var PCe={mounted(){this.props=this.getProps(),this.updateAttrs(),this.el.addEventListener("blur",i=>{let e=this.timeLocalToUtc(this.el.value);this.pushEventTo(this.props.phxTarget,"change",{html_value:e})})},updated(){this.props=this.getProps(),this.updateAttrs()},getProps(){return{utcValue:Ti(this.el,"data-utc-value",null),utcMin:Ti(this.el,"data-utc-min",null),utcMax:Ti(this.el,"data-utc-max",null),phxTarget:Ct(this.el,"data-phx-target")}},updateAttrs(){this.el.value=this.timeUtcToLocal(this.props.utcValue),this.el.min=this.timeUtcToLocal(this.props.utcMin),this.el.max=this.timeUtcToLocal(this.props.utcMax)},timeUtcToLocal(i){if(!i)return null;let e=new Date;e.setUTCHours(...i.split(":"));let t=e.getHours().toString().padStart(2,"0"),n=e.getMinutes().toString().padStart(2,"0"),r=e.getSeconds().toString().padStart(2,"0");return`${t}:${n}:${r}`},timeLocalToUtc(i){if(!i)return null;let e=new Date;e.setHours(...i.split(":"));let t=e.getUTCHours().toString().padStart(2,"0"),n=e.getUTCMinutes().toString().padStart(2,"0"),r=e.getUTCSeconds().toString().padStart(2,"0");return`${t}:${n}:${r}`}},die=PCe;var fie=qr(hie());var OCe={mounted(){this.props=this.getProps(),this.lineHeight=hQ(this.el),this.templateEl=vc(this.el,"[data-template]"),this.contentEl=vc(this.el,"[data-content]"),this.capLines();let i=this.hyperListConfig();this.virtualizedList=new fie.default(this.contentEl,i),this.props.follow&&ov(this.contentEl)},updated(){this.props=this.getProps(),this.capLines();let i=this.props.follow&&pQ(this.contentEl),e=this.hyperListConfig();this.virtualizedList.refresh(this.contentEl,e),i&&ov(this.contentEl)},getProps(){return{maxHeight:Ct(this.el,"data-max-height",uo),follow:Ti(this.el,"data-follow",!1,Dl),maxLines:Ti(this.el,"data-max-lines",null,uo),ignoreTrailingEmptyLine:Ti(this.el,"data-ignore-trailing-empty-line",!1,Dl)}},hyperListConfig(){let i=this.getLineElements(),e=i.length,t=Math.min(this.props.maxHeight,this.lineHeight*e);return{height:t,total:e,itemHeight:this.lineHeight,generate:n=>{let r=i[n].cloneNode(!0);return r.removeAttribute("id"),r},afterRender:()=>{this.contentEl.scrollWidth>this.contentEl.clientWidth?this.contentEl.style.height=`${t+12}px`:this.contentEl.style.height=`${t}px`}}},getLineElements(){let i=Array.from(this.templateEl.querySelectorAll("[data-line]"));if(i.length===0)return[];let e=i[i.length-1];return this.props.ignoreTrailingEmptyLine&&e.innerText===""?i.slice(0,-1):i},capLines(){if(this.props.maxLines){let e=Array.from(this.templateEl.querySelectorAll("[data-line]")).slice(0,-this.props.maxLines),[t,...n]=e;n.forEach(r=>r.remove()),t&&(t.innerHTML="...")}}},pie=OCe;var FCe={mounted(){let i=sn.get(),e=this.el.querySelector('[name="show_section"][value="true"]'),t=this.el.querySelector('[name="show_markdown"][value="true"]'),n=this.el.querySelector('[name="show_output"][value="true"]'),r=this.el.querySelector('[name="spotlight"][value="true"]');e.checked=i.custom_view_show_section,t.checked=i.custom_view_show_markdown,n.checked=i.custom_view_show_output,r.checked=i.custom_view_spotlight,e.addEventListener("change",o=>{sn.update({custom_view_show_section:o.target.checked})}),t.addEventListener("change",o=>{sn.update({custom_view_show_markdown:o.target.checked})}),n.addEventListener("change",o=>{sn.update({custom_view_show_output:o.target.checked})}),r.addEventListener("change",o=>{sn.update({custom_view_spotlight:o.target.checked})})}},mie=FCe;var gie={AppAuth:cB,AudioInput:fB,Cell:AQ,CellEditor:Zee,Dropzone:Jee,EditorSettings:ete,EmojiPicker:Bte,FocusOnUpdate:Hte,Headline:jte,Highlight:Wte,ImageInput:Vte,ImageOutput:qte,JSView:Qte,KeyboardControl:Zte,MarkdownRenderer:Jte,ScrollOnUpdate:eie,Session:iie,TextareaAutosize:nie,Timer:rie,UserForm:lie,UtcDateTimeInput:cie,UtcTimeInput:die,VirtualizedLines:pie,CustomViewSettings:mie};var bie={onBeforeElUpdated(i,e){for(let t of i.attributes)t.name.startsWith("data-js-")&&e.setAttribute(t.name,t.value),t.name==="data-keep-attribute"&&(i.hasAttribute(t.value)?e.setAttribute(t.value,i.getAttribute(t.value)):e.removeAttribute(t.value))},onNodeAdded(i){if(i.nodeType===Node.ELEMENT_NODE&&i.hasAttribute("autofocus")&&(i.focus(),i.setSelectionRange&&i.value)){let e=i.value.length;i.setSelectionRange(e,e)}}};var w3=qr(_ie());function yie(){w3.default.config({barColors:{0:"#b2c1ff"},shadowColor:"rgba(0, 0, 0, .3)"}),window.addEventListener("phx:page-loading-start",()=>{w3.default.show(500)}),window.addEventListener("phx:page-loading-stop",()=>{w3.default.hide()})}function wie(){window.addEventListener("lb:focus",i=>{requestAnimationFrame(()=>{i.target.focus()})}),window.addEventListener("lb:set_value",i=>{i.target.value=i.detail.value}),window.addEventListener("lb:check",i=>{i.target.checked=!0}),window.addEventListener("lb:uncheck",i=>{i.target.checked=!1}),window.addEventListener("lb:set_text",i=>{i.target.textContent=i.detail.value}),window.addEventListener("lb:clipcopy",i=>{"clipboard"in navigator?i.detail.content?navigator.clipboard.writeText(i.detail.content):i.target.tagName==="INPUT"?navigator.clipboard.writeText(i.target.value):navigator.clipboard.writeText(i.target.textContent):alert(`Sorry, your browser does not support clipboard copy.
This generally requires a secure origin \u2014 either HTTPS or localhost.`)}),window.addEventListener("phx:lb:exec_js",i=>{let e=i.detail.to||"body";document.querySelectorAll(e).forEach(t=>{window.liveSocket.execJS(t,i.detail.js)})}),window.addEventListener("lb:session_list:on_selection_change",()=>{let i=!!document.querySelector("[name='session_ids[]']:checked"),e=document.querySelector("#edit-sessions [name='disconnect']"),t=document.querySelector("#edit-sessions [name='close_all']");e.parentElement.classList.toggle("pointer-events-none",!i),e.parentElement.classList.toggle("opacity-50",!i),t.parentElement.classList.toggle("pointer-events-none",!i),t.parentElement.classList.toggle("opacity-50",!i)}),window.addEventListener("contextmenu",i=>{let e=i.target.closest("[data-contextmenu-trigger-click]");e&&(i.preventDefault(),e.dispatchEvent(new Event("mousedown",{bubbles:!0})),e.dispatchEvent(new Event("click",{bubbles:!0})))}),window.addEventListener("submit",i=>{i.target.hasAttribute("phx-nosubmit")&&(i.preventDefault(),i.stopPropagation())},{capture:!0})}function xie(){let i=/AppleWebKit/.test(navigator.userAgent),e="ontouchstart"in window||navigator.maxTouchPoints>0;if(i&&e){let t=document.querySelector("meta[name='viewport']");t&&(t.content+=", maximum-scale=1.0")}}var m9="confirm-opted-out-ids";function Cie(){return ku(m9)||[]}function Sie(){window.addEventListener("phx:add_confirm_opt_out_id",i=>{let e=ku(m9)||[],t=i.detail.opt_out_id;e.push(t),Af(m9,e)})}function zCe(){let i=document.querySelector("meta[name='csrf-token']").getAttribute("content"),e=new rB(window.LIVEBOOK_BASE_URL_PATH+"/live",dy,{params:t=>({_csrf_token:i,user_data:aie(),app_auth_token:lB(),confirm_opt_out_ids:Cie()}),hooks:gie,dom:bie});yie(),wie(),Sie(),xie(),sn.getAndSubscribe(t=>{document.body.setAttribute("data-editor-theme",t.editor_theme)}),e.connect(),window.liveSocket=e}if(BCe())zCe();else{let i=document.createElement("div");i.innerHTML=`
<div class="fixed top-0 bottom-0 left-0 right-0 z-[1000] px-4 py-8 bg-gray-900/95 flex justify-center items-center">
<div class="max-w-[600px] w-full flex flex-col">
<div class="text-xl text-gray-100 font-medium">
Action required
</div>
<div class="mt-3 text-sm text-gray-300">
It looks like Livebook does not have access to cookies. This usually happens when
it runs in an iframe. To make sure the app is fully functional open it in a new
tab directly. Alternatively you can relax security settings for this page to allow
third-party cookies.
</div>
<div class="mt-6">
<a id="open-app" class="button-base button-blue" target="_blank">
Open app
</a>
</div>
</div>
</div>
`,i.querySelector("#open-app").href=window.location,document.body.appendChild(i)}function BCe(){return document.cookie=`lb:probe_cookie=;path=/${v4()}`,document.cookie.split("; ").some(i=>i.startsWith("lb:probe_cookie="))}
/*! Bundled license information:
monaco-editor/esm/vs/language/json/monaco.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/_.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/elixir/elixir.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/css/css.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/html/html.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/abap/abap.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/apex/apex.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/azcli/azcli.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/bat/bat.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/bicep/bicep.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/cameligo/cameligo.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/clojure/clojure.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/coffee/coffee.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/csp/csp.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/cypher/cypher.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/dart/dart.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/ecl/ecl.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/flow9/flow9.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/fsharp/fsharp.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/freemarker2/freemarker2.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/go/go.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/handlebars/handlebars.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/hcl/hcl.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/ini/ini.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/java/java.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/julia/julia.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/less/less.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/lexon/lexon.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/lua/lua.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/liquid/liquid.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/m3/m3.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/mdx/mdx.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/mips/mips.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/msdax/msdax.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/mysql/mysql.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/objective-c/objective-c.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/pascal/pascal.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/perl/perl.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/php/php.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/pla/pla.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/postiats/postiats.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/powerquery/powerquery.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/powershell/powershell.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/protobuf/protobuf.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/pug/pug.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/python/python.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/qsharp/qsharp.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/r/r.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/razor/razor.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/redis/redis.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/redshift/redshift.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/ruby/ruby.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/rust/rust.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/sb/sb.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/scala/scala.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/scheme/scheme.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/scss/scss.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/shell/shell.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/solidity/solidity.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/sophia/sophia.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/sparql/sparql.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/st/st.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/swift/swift.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/tcl/tcl.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/twig/twig.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/vb/vb.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/wgsl/wgsl.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/basic-languages/monaco.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/language/css/monaco.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
monaco-editor/esm/vs/language/html/monaco.contribution.js:
(*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*)
topbar/topbar.min.js:
(**
* @license MIT
* topbar 2.0.0, 2023-02-04
* http://buunguyen.github.io/topbar
* Copyright (c) 2021 Buu Nguyen
*)
*/