smart-home-engine 1.41.0 → 1.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jsonMode-BRIqcXAV.js","assets/monaco-langs-DKJI_o9J.js","assets/monaco-langs-DyX1CsEw.css","assets/tsMode-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jsonMode-BRIqcXAV.js","assets/monaco-langs-DKJI_o9J.js","assets/monaco-langs-DyX1CsEw.css","assets/tsMode-CE5FSNgq.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var d7=Object.defineProperty;var w2=r=>{throw TypeError(r)};var u7=(r,e,t)=>e in r?d7(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Jn=(r,e,t)=>u7(r,typeof e!="symbol"?e+"":e,t),bb=(r,e,t)=>e.has(r)||w2("Cannot "+t);var It=(r,e,t)=>(bb(r,e,"read from private field"),t?t.call(r):e.get(r)),$n=(r,e,t)=>e.has(r)?w2("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),qn=(r,e,t,i)=>(bb(r,e,"write to private field"),i?i.call(r,t):e.set(r,t),t),Bs=(r,e,t)=>(bb(r,e,"access private method"),t);import{_ as UA,m as GA,l as Vi,A as nr,C as Xt,I as Is,D as U0,a as eo,g as KA,M as Mi,b as an,E as Na,c as ue,r as fs,d as da,e as B,f as h7,h as As,R as Un,S as on,i as Ro,j as ua,k as ts,n as Dn,o as zt,p as vi,K as no,q as Hi,s as Ai,t as uo,u as Ve,v as jn,O as _l,w as ro,P as $i,x as Cb,y as G0,z as ZA,B as Xl,F as Oa,G as ZC,H as yo,U as xs,J as np,L as qi,N as sc,Q as f7,T as Xo,V as YC,W as p7,X as YA,$ as Oi,Y as rs,Z as es,a0 as Hs,a1 as bn,a2 as Fr,a3 as Jg,a4 as Di,a5 as _x,a6 as g7,a7 as v7,a8 as co,a9 as x7,aa as Ha,ab as sr,ac as Gi,ad as XA,ae as Fs,af as m7,ag as _7,ah as er,ai as Mp,aj as so,ak as u1,al as qo,am as kd,an as yS,ao as h1,ap as mo,aq as sp,ar as _o,as as f1,at as p1,au as b7,av as K0,aw as Rp,ax as pc,ay as C7,az as Np,aA as y7,aB as wS,aC as w7,aD as E7,aE as E2,aF as Js,aG as Ql,aH as Uo,aI as kn,aJ as ql,aK as S7,aL as El,aM as Dr,aN as vo,aO as za,aP as ES,aQ as ho,aR as Ys,aS as Kx,aT as Sn,aU as QA,aV as k7,aW as SS,aX as g1,aY as kS,aZ as DS,a_ as ou,a$ as D7,b0 as AS,b1 as A7,b2 as BS,b3 as gc,b4 as vc,b5 as op,b6 as e0,b7 as pr,b8 as Z0,b9 as Zx,ba as yb,bb as Cs,bc as FS,bd as Y0,be as v1,bf as B7,bg as JA,bh as t0,bi as rp,bj as i0,bk as X0,bl as x1,bm as ss,bn as Dd,bo as Q0,bp as F7,bq as L7,br as LS,bs as I7,bt as Yx,bu as $r,bv as IS,bw as ap,bx as xc,by as Op,bz as Mn,bA as lp,bB as e6,bC as J0,bD as P7,bE as ru,bF as Ri,bG as S2,bH as bx,bI as t6,bJ as pa,bK as Pa,bL as Es,bM as cp,bN as na,bO as dp,bP as Os,bQ as n0,bR as yh,bS as XC,bT as i6,bU as n6,bV as s6,bW as PS,bX as lr,bY as us,bZ as ev,b_ as o6,b$ as Jl,c0 as m1,c1 as T7,c2 as hf,c3 as k2,c4 as tv,c5 as r6,c6 as ff,c7 as M7,c8 as Yr,c9 as _1,ca as R7,cb as or,cc as Wa,cd as iv,ce as s0,cf as a6,cg as Wr,ch as nv,ci as b1,cj as N7,ck as O7,cl as H7,cm as Hp,cn as Sl,co as xo,cp as z7,cq as TS,cr as W7,cs as j7,ct as D2,cu as V7,cv as sv,cw as oc,cx as QC,cy as ih,cz as rc,cA as $7,cB as bl,cC as sa,cD as Er,cE as A2,cF as Oo,cG as ov,cH as vd,cI as kl,cJ as q7,cK as ja,cL as o0,cM as C1,cN as l6,cO as U7,cP as G7,cQ as MS,cR as K7,cS as r0,cT as Z7,cU as qc,cV as a0,cW as B2,cX as Y7,cY as X7,cZ as Bl,c_ as Q7,c$ as RS,d0 as c6,d1 as d6,d2 as u6,d3 as h6,d4 as J7,d5 as eL,d6 as f6,d7 as p6,d8 as tL,d9 as NS,da as iL,db as nL,dc as js,dd as sL,de as OS,df as oL,dg as pf,dh as F2,di as rL,dj as aL,dk as lL,dl as cL,dm as dL,dn as uL,dp as up,dq as y1,dr as JC,ds as hL,dt as fL,du as L2,dv as ey,dw as pL,dx as I2,dy as wb,dz as gL,dA as g6,dB as vL,dC as v6,dD as ty,dE as xL,dF as mL,dG as _L,dH as x6,dI as m6,dJ as bL,dK as Xx,dL as _6,dM as w1,dN as CL,dO as yL,dP as xd,dQ as HS,dR as wL,dS as P2,dT as T2,dU as EL,dV as gf,dW as b6,dX as SL,dY as kL,dZ as DL,d_ as AL,d$ as C6,e0 as y6,e1 as w6,e2 as E6,e3 as BL,e4 as Cl,e5 as M2,e6 as FL,e7 as rv,e8 as LL,e9 as gg,ea as S6,eb as R2,ec as l0,ed as k6,ee as Qx,ef as IL,eg as D6,eh as PL,ei as A6,ej as TL,ek as ML,el as B6,em as F6,en as ac,eo as E1,ep as RL,eq as L6,er as Ar,es as au,et as I6,eu as NL,ev as OL,ew as P6,ex as T6,ey as HL,ez as M6,eA as R6,eB as c0,eC as zL,eD as WL,eE as jL,eF as VL,eG as sg,eH as N2,eI as $L,eJ as qL,eK as UL,eL as Jx,eM as ko,eN as GL,eO as iy,eP as wh,eQ as KL,eR as $l,eS as ZL,eT as YL,eU as N6,eV as XL,eW as Ig,eX as QL,eY as JL,eZ as eI,e_ as tI,e$ as O2,f0 as H2,f1 as z2,f2 as Eh,f3 as zS,f4 as O6,f5 as ny,f6 as Cx,f7 as H6,f8 as em,f9 as iI,fa as nI,fb as sI,fc as oI,fd as WS,fe as z6,ff as rI,fg as tm,fh as W6,fi as j6,fj as aI,fk as lI,fl as cI,fm as dI,fn as uI,fo as hI,fp as fI,fq as pI,fr as V6,fs as gI,ft as im,fu as $6,fv as vI,fw as q6,fx as xI,fy as U6,fz as G6,fA as mI,fB as W2,fC as K6,fD as j2,fE as _I,fF as Eb,fG as V2,fH as bI,fI as CI,fJ as yI,fK as dl,fL as md,fM as wI,fN as $2,fO as yx,fP as EI,fQ as Ul,fR as S1,fS as sy,fT as SI,fU as Z6,fV as Y6,fW as Ho,fX as q2,fY as Nv,fZ as jS,f_ as kI,f$ as DI,g0 as AI,g1 as BI,g2 as FI,g3 as LI,g4 as II,g5 as PI,g6 as U2,g7 as TI,g8 as MI,g9 as RI,ga as hp,gb as Pg,gc as X6,gd as NI,ge as VS,gf as wx,gg as Ov,gh as Sb,gi as OI,gj as HI,gk as Q6,gl as zI,gm as $S,gn as WI,go as jI,gp as J6,gq as k1,gr as VI,gs as nm,gt as qS,gu as US,gv as GS,gw as e5,gx as t5,gy as i5,gz as n5,gA as s5,gB as o5,gC as r5,gD as G2,gE as a5,gF as jh,gG as $I,gH as qI,gI as UI,gJ as GI,gK as l5,gL as KI,gM as ZI,gN as K2,gO as oy,gP as Xc,gQ as YI,gR as XI,gS as QI,gT as JI,gU as eP,gV as tP,gW as Z2,gX as KS,gY as ry,gZ as iP,g_ as ay,g$ as nP,h0 as sP,h1 as oP,h2 as rP,h3 as ZS,h4 as c5,h5 as Y2,h6 as X2,h7 as aP,h8 as lP,h9 as cP,ha as Q2,hb as kb,hc as dP,hd as uP,he as hP,hf as Db,hg as d5,hh as u5,hi as h5,hj as f5,hk as lc,hl as p5,hm as YS,hn as J2,ho as fP,hp as g5,hq as pP,hr as gP,hs as D1,ht as A1,hu as Sh,hv as B1,hw as av,hx as vP,hy as F1,hz as xP,hA as mP,hB as _P,hC as v5,hD as og,hE as bP,hF as CP,hG as yP,hH as wP,hI as lv,hJ as EP,hK as x5,hL as m5,hM as _5,hN as ly,hO as SP,hP as kP,hQ as DP,hR as AP,hS as BP,hT as cy,hU as FP,hV as LP,hW as IP,hX as PP,hY as TP,hZ as MP,h_ as RP,h$ as NP,i0 as b5,i1 as OP,i2 as HP,i3 as zP,i4 as e8,i5 as WP,i6 as jP,i7 as La,i8 as Mo,i9 as dy,ia as C5,ib as VP,ic as $P}from"./monaco-langs-DKJI_o9J.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}})();const y5=!1;var XS=Array.isArray,qP=Array.prototype.indexOf,sm=Array.prototype.includes,L1=Array.from,UP=Object.defineProperty,Lf=Object.getOwnPropertyDescriptor,GP=Object.getOwnPropertyDescriptors,KP=Object.prototype,ZP=Array.prototype,w5=Object.getPrototypeOf,t8=Object.isExtensible;const gl=()=>{};function YP(r){for(var e=0;e<r.length;e++)r[e]()}function E5(){var r,e,t=new Promise((i,n)=>{r=i,e=n});return{promise:t,resolve:r,reject:e}}function XP(r,e,t=!1){return r===void 0?t?e():e:r}function om(r,e){if(Array.isArray(r))return r;if(!(Symbol.iterator in r))return Array.from(r);const t=[];for(const i of r)if(t.push(i),t.length===e)break;return t}const Vo=2,fp=4,I1=8,S5=1<<24,Ta=16,Ra=32,_d=64,uy=128,aa=512,Do=1024,Lo=2048,Dl=4096,dr=8192,la=16384,zp=32768,hy=1<<25,pp=65536,rm=1<<17,QP=1<<18,Wp=1<<19,JP=1<<20,vl=1<<25,nh=65536,am=1<<21,If=1<<22,Qc=1<<23,lu=Symbol("$state"),eT=Symbol("legacy props"),tT=Symbol(""),Ex=Symbol("attributes"),fy=Symbol("class"),py=Symbol("style"),vg=Symbol("text"),Sx=Symbol("form reset"),P1=new class extends Error{constructor(){super(...arguments);Jn(this,"name","StaleReactionError");Jn(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var VA;const iT=!!((VA=globalThis.document)!=null&&VA.contentType)&&globalThis.document.contentType.includes("xml");function k5(r){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function nT(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function sT(r,e,t){throw new Error("https://svelte.dev/e/each_key_duplicate")}function oT(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function rT(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function aT(r){throw new Error("https://svelte.dev/e/effect_orphan")}function lT(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function cT(r){throw new Error("https://svelte.dev/e/props_invalid_value")}function dT(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function uT(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function hT(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fT(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const pT=1,gT=2,D5=4,vT=8,xT=16,mT=1,_T=4,bT=8,CT=16,yT=1,wT=2,So=Symbol("uninitialized"),A5="http://www.w3.org/1999/xhtml",ET="http://www.w3.org/2000/svg",ST="http://www.w3.org/1998/Math/MathML";function kT(){console.warn("https://svelte.dev/e/derived_inert")}function DT(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function AT(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function B5(r){return r===this.v}function BT(r,e){return r!=r?e==e:r!==e||r!==null&&typeof r=="object"||typeof r=="function"}function F5(r){return!BT(r,this.v)}let FT=!1,jo=null;function gp(r){jo=r}function ps(r,e=!1,t){jo={p:jo,i:!1,c:null,e:null,s:r,x:null,r:hs,l:null}}function gs(r){var e=jo,t=e.e;if(t!==null){e.e=null;for(var i of t)J5(i)}return r!==void 0&&(e.x=r),e.i=!0,jo=e.p,r??{}}function L5(){return!0}let Yd=[];function I5(){var r=Yd;Yd=[],YP(r)}function yl(r){if(Yd.length===0&&!Mg){var e=Yd;queueMicrotask(()=>{e===Yd&&I5()})}Yd.push(r)}function LT(){for(;Yd.length>0;)I5()}function P5(r){var e=hs;if(e===null)return cs.f|=Qc,r;if((e.f&zp)===0&&(e.f&fp)===0)throw r;Uc(r,e)}function Uc(r,e){for(;e!==null;){if((e.f&uy)!==0){if((e.f&zp)===0)throw r;try{e.b.error(r);return}catch(t){r=t}}e=e.parent}throw r}const IT=-7169;function po(r,e){r.f=r.f&IT|e}function QS(r){(r.f&aa)!==0||r.deps===null?po(r,Do):po(r,Dl)}function T5(r){if(r!==null)for(const e of r)(e.f&Vo)===0||(e.f&nh)===0||(e.f^=nh,T5(e.deps))}function M5(r,e,t){(r.f&Lo)!==0?e.add(r):(r.f&Dl)!==0&&t.add(r),T5(r.deps),po(r,Do)}let Hv=!1;function PT(r){var e=Hv;try{return Hv=!1,[r(),Hv]}finally{Hv=e}}let Ab=null,Vh=null,yn=null,Tg=null,No=null,gy=null,Mg=!1,Bb=!1,vf=null,kx=null;var i8=0;let TT=1;var Hf,jc,eu,zf,Wf,jf,zl,Vf,Cr,z0,Wl,ya,rl,$f,tu,Vs,vy,xg,xy,R5,N5,rf,MT,mg;const m_=class m_{constructor(){$n(this,Vs);Jn(this,"id",TT++);$n(this,Hf,!1);Jn(this,"linked",!0);$n(this,jc,null);$n(this,eu,null);Jn(this,"async_deriveds",new Map);Jn(this,"current",new Map);Jn(this,"previous",new Map);$n(this,zf,new Set);$n(this,Wf,new Set);$n(this,jf,0);$n(this,zl,new Map);$n(this,Vf,null);$n(this,Cr,[]);$n(this,z0,[]);$n(this,Wl,new Set);$n(this,ya,new Set);$n(this,rl,new Map);$n(this,$f,new Set);Jn(this,"is_fork",!1);$n(this,tu,!1);Vh===null?Ab=Vh=this:(qn(Vh,eu,this),qn(this,jc,Vh)),Vh=this}skip_effect(e){It(this,rl).has(e)||It(this,rl).set(e,{d:[],m:[]}),It(this,$f).delete(e)}unskip_effect(e,t=i=>this.schedule(i)){var i=It(this,rl).get(e);if(i){It(this,rl).delete(e);for(var n of i.d)po(n,Lo),t(n);for(n of i.m)po(n,Dl),t(n)}It(this,$f).add(e)}capture(e,t,i=!1){e.v!==So&&!this.previous.has(e)&&this.previous.set(e,e.v),(e.f&Qc)===0&&(this.current.set(e,[t,i]),No==null||No.set(e,t)),this.is_fork||(e.v=t)}activate(){yn=this}deactivate(){yn=null,No=null}flush(){try{Bb=!0,yn=this,Bs(this,Vs,xg).call(this)}finally{i8=0,gy=null,vf=null,kx=null,Bb=!1,yn=null,No=null,cu.clear()}}discard(){var e;for(const t of It(this,Wf))t(this);It(this,Wf).clear(),Bs(this,Vs,mg).call(this),(e=It(this,Vf))==null||e.resolve()}register_created_effect(e){It(this,z0).push(e)}increment(e,t){if(qn(this,jf,It(this,jf)+1),e){let i=It(this,zl).get(t)??0;It(this,zl).set(t,i+1)}}decrement(e,t){if(qn(this,jf,It(this,jf)-1),e){let i=It(this,zl).get(t)??0;i===1?It(this,zl).delete(t):It(this,zl).set(t,i-1)}It(this,tu)||(qn(this,tu,!0),yl(()=>{qn(this,tu,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(const i of e)It(this,Wl).add(i);for(const i of t)It(this,ya).add(i);e.clear(),t.clear()}oncommit(e){It(this,zf).add(e)}ondiscard(e){It(this,Wf).add(e)}settled(){return(It(this,Vf)??qn(this,Vf,E5())).promise}static ensure(){if(yn===null){const e=yn=new m_;!Bb&&!Mg&&yl(()=>{It(e,Hf)||e.flush()})}return yn}apply(){{No=null;return}}schedule(e){var n;if(gy=e,(n=e.b)!=null&&n.is_pending&&(e.f&(fp|I1|S5))!==0&&(e.f&zp)===0){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var i=t.f;if(vf!==null&&t===hs&&(cs===null||(cs.f&Vo)===0))return;if((i&(_d|Ra))!==0){if((i&Do)===0)return;t.f^=Do}}It(this,Cr).push(t)}};Hf=new WeakMap,jc=new WeakMap,eu=new WeakMap,zf=new WeakMap,Wf=new WeakMap,jf=new WeakMap,zl=new WeakMap,Vf=new WeakMap,Cr=new WeakMap,z0=new WeakMap,Wl=new WeakMap,ya=new WeakMap,rl=new WeakMap,$f=new WeakMap,tu=new WeakMap,Vs=new WeakSet,vy=function(){if(this.is_fork)return!0;for(const i of It(this,zl).keys()){for(var e=i,t=!1;e.parent!==null;){if(It(this,rl).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1},xg=function(){var d,u,f,x;qn(this,Hf,!0),i8++>1e3&&(Bs(this,Vs,mg).call(this),NT());for(const m of It(this,Wl))It(this,ya).delete(m),po(m,Lo),this.schedule(m);for(const m of It(this,ya))po(m,Dl),this.schedule(m);const e=It(this,Cr);qn(this,Cr,[]),this.apply();var t=vf=[],i=[],n=kx=[];for(const m of e)try{Bs(this,Vs,xy).call(this,m,t,i)}catch(C){throw z5(m),Bs(this,Vs,vy).call(this)||this.discard(),C}if(yn=null,n.length>0){var s=m_.ensure();for(const m of n)s.schedule(m)}if(vf=null,kx=null,Bs(this,Vs,vy).call(this)){Bs(this,Vs,rf).call(this,i),Bs(this,Vs,rf).call(this,t);for(const[m,C]of It(this,rl))H5(m,C);n.length>0&&Bs(d=yn,Vs,xg).call(d);return}const a=Bs(this,Vs,R5).call(this);if(a){Bs(this,Vs,rf).call(this,i),Bs(this,Vs,rf).call(this,t),Bs(u=a,Vs,N5).call(u,this);return}It(this,Wl).clear(),It(this,ya).clear();for(const m of It(this,zf))m(this);It(this,zf).clear(),Tg=this,n8(i),n8(t),Tg=null,(f=It(this,Vf))==null||f.resolve();var l=yn;if(It(this,jf)===0&&(It(this,Cr).length===0||l!==null)&&Bs(this,Vs,mg).call(this),It(this,Cr).length>0)if(l!==null){const m=l;It(m,Cr).push(...It(this,Cr).filter(C=>!It(m,Cr).includes(C)))}else l=this;l!==null&&Bs(x=l,Vs,xg).call(x)},xy=function(e,t,i){e.f^=Do;for(var n=e.first;n!==null;){var s=n.f,a=(s&(Ra|_d))!==0,l=a&&(s&Do)!==0,d=l||(s&dr)!==0||It(this,rl).has(n);if(!d&&n.fn!==null){a?n.f^=Do:(s&fp)!==0?t.push(n):uv(n)&&((s&Ta)!==0&&It(this,ya).add(n),xp(n));var u=n.first;if(u!==null){n=u;continue}}for(;n!==null;){var f=n.next;if(f!==null){n=f;break}n=n.parent}}},R5=function(){for(var e=It(this,jc);e!==null;){if(!e.is_fork){for(const[t,[,i]]of this.current)if(e.current.has(t)&&!i)return e}e=It(e,jc)}return null},N5=function(e){var i;for(const[n,s]of e.current)!this.previous.has(n)&&e.previous.has(n)&&this.previous.set(n,e.previous.get(n)),this.current.set(n,s);for(const[n,s]of e.async_deriveds){const a=this.async_deriveds.get(n);a&&s.promise.then(a.resolve).catch(a.reject)}this.transfer_effects(It(e,Wl),It(e,ya));const t=n=>{var s=n.reactions;if(s!==null)for(const d of s){var a=d.f;if((a&Vo)!==0)t(d);else{var l=d;a&(If|Ta)&&!this.async_deriveds.has(l)&&(It(this,ya).delete(l),po(l,Lo),this.schedule(l))}}};for(const n of this.current.keys())t(n);this.oncommit(()=>e.discard()),Bs(i=e,Vs,mg).call(i),yn=this,Bs(this,Vs,xg).call(this)},rf=function(e){for(var t=0;t<e.length;t+=1)M5(e[t],It(this,Wl),It(this,ya))},MT=function(){var f;for(let x=Ab;x!==null;x=It(x,eu)){var e=x.id<this.id,t=[];for(const[m,[C,_]]of this.current){if(x.current.has(m)){var i=x.current.get(m)[0];if(e&&C!==i)x.current.set(m,[C,_]);else continue}t.push(m)}if(e)for(const[m,C]of this.async_deriveds){const _=x.async_deriveds.get(m);_&&C.promise.then(_.resolve).catch(_.reject)}if(It(x,Hf)){var n=[...x.current.keys()].filter(m=>!x.current.get(m)[1]&&!this.current.has(m));if(n.length===0)e&&x.discard();else if(t.length>0){if(e)for(const m of It(this,$f))x.unskip_effect(m,C=>{var _;(C.f&(Ta|If))!==0?x.schedule(C):Bs(_=x,Vs,rf).call(_,[C])});x.activate();var s=new Set,a=new Map;for(var l of t)O5(l,n,s,a);a=new Map;var d=[...x.current].filter(([m,C])=>{const _=this.current.get(m);return _?_[0]!==C[0]||_[1]!==C[1]:!0}).map(([m])=>m);if(d.length>0)for(const m of It(this,z0))(m.f&(la|dr|rm))===0&&JS(m,d,a)&&((m.f&(If|Ta))!==0?(po(m,Lo),x.schedule(m)):It(x,Wl).add(m));if(It(x,Cr).length>0&&!It(x,tu)){x.apply();for(var u of It(x,Cr))Bs(f=x,Vs,xy).call(f,u,[],[]);qn(x,Cr,[])}x.deactivate()}}}},mg=function(){if(this.linked){var e=It(this,jc),t=It(this,eu);e===null?Ab=t:qn(e,eu,t),t===null?Vh=e:qn(t,jc,e),this.linked=!1}};let sh=m_;function RT(r){var e=Mg;Mg=!0;try{for(var t;;){if(LT(),yn===null)return t;yn.flush()}}finally{Mg=e}}function NT(){try{lT()}catch(r){Uc(r,gy)}}let _a=null;function n8(r){var e=r.length;if(e!==0){for(var t=0;t<e;){var i=r[t++];if((i.f&(la|dr))===0&&uv(i)&&(_a=new Set,xp(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&i3(i),(_a==null?void 0:_a.size)>0)){cu.clear();for(const n of _a){if((n.f&(la|dr))!==0)continue;const s=[n];let a=n.parent;for(;a!==null;)_a.has(a)&&(_a.delete(a),s.push(a)),a=a.parent;for(let l=s.length-1;l>=0;l--){const d=s[l];(d.f&(la|dr))===0&&xp(d)}}_a.clear()}}_a=null}}function O5(r,e,t,i){if(!t.has(r)&&(t.add(r),r.reactions!==null))for(const n of r.reactions){const s=n.f;(s&Vo)!==0?O5(n,e,t,i):(s&(If|Ta))!==0&&(s&Lo)===0&&JS(n,e,i)&&(po(n,Lo),e9(n))}}function JS(r,e,t){const i=t.get(r);if(i!==void 0)return i;if(r.deps!==null)for(const n of r.deps){if(sm.call(e,n))return!0;if((n.f&Vo)!==0&&JS(n,e,t))return t.set(n,!0),!0}return t.set(r,!1),!1}function e9(r){yn.schedule(r)}function H5(r,e){if(!((r.f&Ra)!==0&&(r.f&Do)!==0)){(r.f&Lo)!==0?e.d.push(r):(r.f&Dl)!==0&&e.m.push(r),po(r,Do);for(var t=r.first;t!==null;)H5(t,e),t=t.next}}function z5(r){po(r,Do);for(var e=r.first;e!==null;)z5(e),e=e.next}function OT(r){let e=0,t=oh(0),i;return()=>{n9()&&(o(t),dv(()=>(e===0&&(i=_c(()=>r(()=>Rg(t)))),e+=1,()=>{yl(()=>{e-=1,e===0&&(i==null||i(),i=void 0,Rg(t))})})))}}var HT=pp|Wp;function zT(r,e,t,i){new WT(r,e,t,i)}var Qr,CS,Jr,iu,yr,ea,rr,Nr,jl,nu,Vc,qf,W0,j0,Vl,__,go,jT,VT,$T,my,Dx,Ax,_y,by;class WT{constructor(e,t,i,n){$n(this,go);Jn(this,"parent");Jn(this,"is_pending",!1);Jn(this,"transform_error");$n(this,Qr);$n(this,CS,null);$n(this,Jr);$n(this,iu);$n(this,yr);$n(this,ea,null);$n(this,rr,null);$n(this,Nr,null);$n(this,jl,null);$n(this,nu,0);$n(this,Vc,0);$n(this,qf,!1);$n(this,W0,new Set);$n(this,j0,new Set);$n(this,Vl,null);$n(this,__,OT(()=>(qn(this,Vl,oh(It(this,nu))),()=>{qn(this,Vl,null)})));var s;qn(this,Qr,e),qn(this,Jr,t),qn(this,iu,a=>{var l=hs;l.b=this,l.f|=uy,i(a)}),this.parent=hs.b,this.transform_error=n??((s=this.parent)==null?void 0:s.transform_error)??(a=>a),qn(this,yr,N1(()=>{Bs(this,go,my).call(this)},HT))}defer_effect(e){M5(e,It(this,W0),It(this,j0))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!It(this,Jr).pending}update_pending_count(e,t){Bs(this,go,_y).call(this,e,t),qn(this,nu,It(this,nu)+e),!(!It(this,Vl)||It(this,qf))&&(qn(this,qf,!0),yl(()=>{qn(this,qf,!1),It(this,Vl)&&vp(It(this,Vl),It(this,nu))}))}get_effect_pending(){return It(this,__).call(this),o(It(this,Vl))}error(e){if(!It(this,Jr).onerror&&!It(this,Jr).failed)throw e;yn!=null&&yn.is_fork?(It(this,ea)&&yn.skip_effect(It(this,ea)),It(this,rr)&&yn.skip_effect(It(this,rr)),It(this,Nr)&&yn.skip_effect(It(this,Nr)),yn.oncommit(()=>{Bs(this,go,by).call(this,e)})):Bs(this,go,by).call(this,e)}}Qr=new WeakMap,CS=new WeakMap,Jr=new WeakMap,iu=new WeakMap,yr=new WeakMap,ea=new WeakMap,rr=new WeakMap,Nr=new WeakMap,jl=new WeakMap,nu=new WeakMap,Vc=new WeakMap,qf=new WeakMap,W0=new WeakMap,j0=new WeakMap,Vl=new WeakMap,__=new WeakMap,go=new WeakSet,jT=function(){try{qn(this,ea,ta(()=>It(this,iu).call(this,It(this,Qr))))}catch(e){this.error(e)}},VT=function(e){const t=It(this,Jr).failed;t&&qn(this,Nr,ta(()=>{t(It(this,Qr),()=>e,()=>()=>{})}))},$T=function(){const e=It(this,Jr).pending;e&&(this.is_pending=!0,qn(this,rr,ta(()=>e(It(this,Qr)))),yl(()=>{var t=qn(this,jl,document.createDocumentFragment()),i=tc();t.append(i),qn(this,ea,Bs(this,go,Ax).call(this,()=>ta(()=>It(this,iu).call(this,i)))),It(this,Vc)===0&&(It(this,Qr).before(t),qn(this,jl,null),du(It(this,rr),()=>{qn(this,rr,null)}),Bs(this,go,Dx).call(this,yn))}))},my=function(){try{if(this.is_pending=this.has_pending_snippet(),qn(this,Vc,0),qn(this,nu,0),qn(this,ea,ta(()=>{It(this,iu).call(this,It(this,Qr))})),It(this,Vc)>0){var e=qn(this,jl,document.createDocumentFragment());r9(It(this,ea),e);const t=It(this,Jr).pending;qn(this,rr,ta(()=>t(It(this,Qr))))}else Bs(this,go,Dx).call(this,yn)}catch(t){this.error(t)}},Dx=function(e){this.is_pending=!1,e.transfer_effects(It(this,W0),It(this,j0))},Ax=function(e){var t=hs,i=cs,n=jo;Al(It(this,yr)),ha(It(this,yr)),gp(It(this,yr).ctx);try{return sh.ensure(),e()}catch(s){return P5(s),null}finally{Al(t),ha(i),gp(n)}},_y=function(e,t){var i;if(!this.has_pending_snippet()){this.parent&&Bs(i=this.parent,go,_y).call(i,e,t);return}qn(this,Vc,It(this,Vc)+e),It(this,Vc)===0&&(Bs(this,go,Dx).call(this,t),It(this,rr)&&du(It(this,rr),()=>{qn(this,rr,null)}),It(this,jl)&&(It(this,Qr).before(It(this,jl)),qn(this,jl,null)))},by=function(e){It(this,ea)&&(Br(It(this,ea)),qn(this,ea,null)),It(this,rr)&&(Br(It(this,rr)),qn(this,rr,null)),It(this,Nr)&&(Br(It(this,Nr)),qn(this,Nr,null));var t=It(this,Jr).onerror;let i=It(this,Jr).failed;var n=!1,s=!1;const a=()=>{if(n){AT();return}n=!0,s&&fT(),It(this,Nr)!==null&&du(It(this,Nr),()=>{qn(this,Nr,null)}),Bs(this,go,Ax).call(this,()=>{Bs(this,go,my).call(this)})},l=d=>{try{s=!0,t==null||t(d,a),s=!1}catch(u){Uc(u,It(this,yr)&&It(this,yr).parent)}i&&qn(this,Nr,Bs(this,go,Ax).call(this,()=>{try{return ta(()=>{var u=hs;u.b=this,u.f|=uy,i(It(this,Qr),()=>d,()=>a)})}catch(u){return Uc(u,It(this,yr).parent),null}}))};yl(()=>{var d;try{d=this.transform_error(e)}catch(u){Uc(u,It(this,yr)&&It(this,yr).parent);return}d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(l,u=>Uc(u,It(this,yr)&&It(this,yr).parent)):l(d)})};function qT(r,e,t,i){const n=d0;var s=r.filter(m=>!m.settled);if(t.length===0&&s.length===0){i(e.map(n));return}var a=hs,l=UT(),d=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(m=>m.promise)):null;function u(m){if((a.f&la)===0){l();try{i(m)}catch(C){Uc(C,a)}lm()}}var f=W5();if(t.length===0){d.then(()=>u(e.map(n))).finally(f);return}function x(){Promise.all(t.map(m=>GT(m))).then(m=>u([...e.map(n),...m])).catch(m=>Uc(m,a)).finally(f)}d?d.then(()=>{l(),x(),lm()}):x()}function UT(){var r=hs,e=cs,t=jo,i=yn;return function(s=!0){Al(r),ha(e),gp(t),s&&(r.f&la)===0&&(i==null||i.activate(),i==null||i.apply())}}function lm(r=!0){Al(null),ha(null),gp(null),r&&(yn==null||yn.deactivate())}function W5(){var r=hs,e=r.b,t=yn,i=!!(e!=null&&e.is_rendered());return e==null||e.update_pending_count(1,t),t.increment(i,r),()=>{e==null||e.update_pending_count(-1,t),t.decrement(i,r)}}function d0(r){var e=Vo|Lo;return hs!==null&&(hs.f|=Wp),{ctx:jo,deps:null,effects:null,equals:B5,f:e,fn:r,reactions:null,rv:0,v:So,wv:0,parent:hs,ac:null}}const zv=Symbol("obsolete");function GT(r,e,t){let i=hs;i===null&&nT();var n=void 0,s=oh(So),a=!cs,l=new Set;return sM(()=>{var C,_;var d=hs,u=E5();n=u.promise;try{Promise.resolve(r()).then(u.resolve,E=>{E!==P1&&u.reject(E)}).finally(lm)}catch(E){u.reject(E),lm()}var f=yn;if(a){if((d.f&zp)!==0)var x=W5();if((C=i.b)!=null&&C.is_rendered())(_=f.async_deriveds.get(d))==null||_.reject(zv);else for(const E of l.values())E.reject(zv);l.add(u),f.async_deriveds.set(d,u)}const m=(E,S=void 0)=>{x==null||x(),l.delete(u),S!==zv&&(f.activate(),S?(s.f|=Qc,vp(s,S)):((s.f&Qc)!==0&&(s.f^=Qc),vp(s,E)),f.deactivate())};u.promise.then(m,E=>m(null,E||"unknown"))}),R1(()=>{for(const d of l)d.reject(zv)}),new Promise(d=>{function u(f){function x(){f===n?d(s):u(n)}f.then(x,x)}u(n)})}function ft(r){const e=d0(r);return o3(e),e}function t9(r){const e=d0(r);return e.equals=F5,e}function KT(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)Br(e[t])}}function i9(r){var e,t=hs,i=r.parent;if(!cc&&i!==null&&r.v!==So&&(i.f&(la|dr))!==0)return kT(),r.v;Al(i);try{r.f&=~nh,KT(r),e=c3(r)}finally{Al(t)}return e}function j5(r){var e=i9(r);if(!r.equals(e)&&(r.wv=a3(),(!(yn!=null&&yn.is_fork)||r.deps===null)&&(yn!==null?(yn.capture(r,e,!0),Tg==null||Tg.capture(r,e,!0)):r.v=e,r.deps===null))){po(r,Do);return}cc||(No!==null?(n9()||yn!=null&&yn.is_fork)&&No.set(r,e):QS(r))}function ZT(r){var e,t;if(r.effects!==null)for(const i of r.effects)(i.teardown||i.ac)&&((e=i.teardown)==null||e.call(i),(t=i.ac)==null||t.abort(P1),i.fn!==null&&(i.teardown=gl),i.ac=null,u0(i,0),o9(i))}function V5(r){if(r.effects!==null)for(const e of r.effects)e.teardown&&e.fn!==null&&xp(e)}let cm=new Set;const cu=new Map;let $5=!1;function oh(r,e){var t={f:0,v:r,reactions:null,equals:B5,rv:0,wv:0};return t}function A(r,e){const t=oh(r);return o3(t),t}function YT(r,e=!1,t=!0){const i=oh(r);return e||(i.equals=F5),i}function p(r,e,t=!1){cs!==null&&(!Ma||(cs.f&rm)!==0)&&L5()&&(cs.f&(Vo|Ta|If|rm))!==0&&(wl===null||!wl.has(r))&&hT();let i=t?wi(e):e;return vp(r,i,kx)}function vp(r,e,t=null){if(!r.equals(e)){cu.set(r,cc?e:r.v);var i=sh.ensure();if(i.capture(r,e),(r.f&Vo)!==0){const n=r;(r.f&Lo)!==0&&i9(n),No===null&&QS(n)}r.wv=a3(),q5(r,Lo,t),hs!==null&&(hs.f&Do)!==0&&(hs.f&(Ra|_d))===0&&(Xr===null?rM([r]):Xr.push(r)),!i.is_fork&&cm.size>0&&!$5&&XT()}return e}function XT(){$5=!1;for(const r of cm){(r.f&Do)!==0&&po(r,Dl);let e;try{e=uv(r)}catch{e=!0}e&&xp(r)}cm.clear()}function dm(r,e=1){var t=o(r),i=e===1?t++:t--;return p(r,t),i}function Rg(r){p(r,r.v+1)}function q5(r,e,t){var i=r.reactions;if(i!==null)for(var n=i.length,s=0;s<n;s++){var a=i[s],l=a.f,d=(l&Lo)===0;if(d&&po(a,e),(l&rm)!==0)cm.add(a);else if((l&Vo)!==0){var u=a;No==null||No.delete(u),(l&nh)===0&&(l&aa&&(hs===null||(hs.f&am)===0)&&(a.f|=nh),q5(u,Dl,t))}else if(d){var f=a;(l&Ta)!==0&&_a!==null&&_a.add(f),t!==null?t.push(f):e9(f)}}}function wi(r){if(typeof r!="object"||r===null||lu in r)return r;const e=w5(r);if(e!==KP&&e!==ZP)return r;var t=new Map,i=XS(r),n=A(0),s=uu,a=l=>{if(uu===s)return l();var d=cs,u=uu;ha(null),a8(s);var f=l();return ha(d),a8(u),f};return i&&t.set("length",A(r.length)),new Proxy(r,{defineProperty(l,d,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&dT();var f=t.get(d);return f===void 0?a(()=>{var x=A(u.value);return t.set(d,x),x}):p(f,u.value,!0),!0},deleteProperty(l,d){var u=t.get(d);if(u===void 0){if(d in l){const f=a(()=>A(So));t.set(d,f),Rg(n)}}else p(u,So),Rg(n);return!0},get(l,d,u){var C;if(d===lu)return r;var f=t.get(d),x=d in l;if(f===void 0&&(!x||(C=Lf(l,d))!=null&&C.writable)&&(f=a(()=>{var _=wi(x?l[d]:So),E=A(_);return E}),t.set(d,f)),f!==void 0){var m=o(f);return m===So?void 0:m}return Reflect.get(l,d,u)},getOwnPropertyDescriptor(l,d){var u=Reflect.getOwnPropertyDescriptor(l,d);if(u&&"value"in u){var f=t.get(d);f&&(u.value=o(f))}else if(u===void 0){var x=t.get(d),m=x==null?void 0:x.v;if(x!==void 0&&m!==So)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return u},has(l,d){var m;if(d===lu)return!0;var u=t.get(d),f=u!==void 0&&u.v!==So||Reflect.has(l,d);if(u!==void 0||hs!==null&&(!f||(m=Lf(l,d))!=null&&m.writable)){u===void 0&&(u=a(()=>{var C=f?wi(l[d]):So,_=A(C);return _}),t.set(d,u));var x=o(u);if(x===So)return!1}return f},set(l,d,u,f){var O;var x=t.get(d),m=d in l;if(i&&d==="length")for(var C=u;C<x.v;C+=1){var _=t.get(C+"");_!==void 0?p(_,So):C in l&&(_=a(()=>A(So)),t.set(C+"",_))}if(x===void 0)(!m||(O=Lf(l,d))!=null&&O.writable)&&(x=a(()=>A(void 0)),p(x,wi(u)),t.set(d,x));else{m=x.v!==So;var E=a(()=>wi(u));p(x,E)}var S=Reflect.getOwnPropertyDescriptor(l,d);if(S!=null&&S.set&&S.set.call(f,u),!m){if(i&&typeof d=="string"){var I=t.get("length"),M=Number(d);Number.isInteger(M)&&M>=I.v&&p(I,M+1)}Rg(n)}return!0},ownKeys(l){o(n);var d=Reflect.ownKeys(l).filter(x=>{var m=t.get(x);return m===void 0||m.v!==So});for(var[u,f]of t)f.v!==So&&!(u in l)&&d.push(u);return d},setPrototypeOf(){uT()}})}function s8(r){try{if(r!==null&&typeof r=="object"&&lu in r)return r[lu]}catch{}return r}function U5(r,e){return Object.is(s8(r),s8(e))}var ec,G5,K5,Z5,Y5;function QT(){if(ec===void 0){ec=window,G5=document,K5=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;Z5=Lf(e,"firstChild").get,Y5=Lf(e,"nextSibling").get,t8(r)&&(r[fy]=void 0,r[Ex]=null,r[py]=void 0,r.__e=void 0),t8(t)&&(t[vg]=void 0)}}function tc(r=""){return document.createTextNode(r)}function xl(r){return Z5.call(r)}function cv(r){return Y5.call(r)}function g(r,e){return xl(r)}function mt(r,e=!1){{var t=xl(r);return t instanceof Comment&&t.data===""?cv(t):t}}function h(r,e=1,t=!1){let i=r;for(;e--;)i=cv(i);return i}function JT(r){r.textContent=""}function X5(){return!1}function Q5(r,e,t){return e==null||e===A5?t?document.createElement(r,{is:t}):document.createElement(r):t?document.createElementNS(e,r,{is:t}):document.createElementNS(e,r)}let o8=!1;function eM(){o8||(o8=!0,document.addEventListener("reset",r=>{Promise.resolve().then(()=>{var e;if(!r.defaultPrevented)for(const t of r.target.elements)(e=t[Sx])==null||e.call(t)})},{capture:!0}))}function T1(r){var e=cs,t=hs;ha(null),Al(null);try{return r()}finally{ha(e),Al(t)}}function M1(r,e,t,i=t){r.addEventListener(e,()=>T1(t));const n=r[Sx];n?r[Sx]=()=>{n(),i(!0)}:r[Sx]=()=>i(!0),eM()}function tM(r){hs===null&&(cs===null&&aT(),rT()),cc&&oT()}function iM(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function mc(r,e){var t=hs;t!==null&&(t.f&dr)!==0&&(r|=dr);var i={ctx:jo,deps:null,nodes:null,f:r|Lo|aa,first:null,fn:e,last:null,next:null,parent:t,b:t&&t.b,prev:null,teardown:null,wv:0,ac:null};yn==null||yn.register_created_effect(i);var n=i;if((r&fp)!==0)vf!==null?vf.push(i):sh.ensure().schedule(i);else if(e!==null){try{xp(i)}catch(a){throw Br(i),a}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&(n.f&Wp)===0&&(n=n.first,(r&Ta)!==0&&(r&pp)!==0&&n!==null&&(n.f|=pp))}if(n!==null&&(n.parent=t,t!==null&&iM(n,t),cs!==null&&(cs.f&Vo)!==0&&(r&_d)===0)){var s=cs;(s.effects??(s.effects=[])).push(n)}return i}function n9(){return cs!==null&&!Ma}function R1(r){const e=mc(I1,null);return po(e,Do),e.teardown=r,e}function wn(r){tM();var e=hs.f,t=!cs&&(e&Ra)!==0&&jo!==null&&!jo.i;if(t){var i=jo;(i.e??(i.e=[])).push(r)}else return J5(r)}function J5(r){return mc(fp|JP,r)}function nM(r){sh.ensure();const e=mc(_d|Wp,r);return(t={})=>new Promise(i=>{t.outro?du(e,()=>{Br(e),i(void 0)}):(Br(e),i(void 0))})}function s9(r){return mc(fp,r)}function sM(r){return mc(If|Wp,r)}function dv(r,e=0){return mc(I1|e,r)}function P(r,e=[],t=[],i=[]){qT(i,e,t,n=>{mc(I1,()=>r(...n.map(o)))})}function N1(r,e=0){var t=mc(Ta|e,r);return t}function ta(r){return mc(Ra|Wp,r)}function e3(r){var e=r.teardown;if(e!==null){const t=cc,i=cs;r8(!0),ha(null);try{e.call(null)}finally{r8(t),ha(i)}}}function o9(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){const n=t.ac;n!==null&&T1(()=>{n.abort(P1)});var i=t.next;(t.f&_d)!==0?t.parent=null:Br(t,e),t=i}}function oM(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&Ra)===0&&Br(e),e=t}}function Br(r,e=!0){var t=!1;(e||(r.f&QP)!==0)&&r.nodes!==null&&r.nodes.end!==null&&(t3(r.nodes.start,r.nodes.end),t=!0),po(r,hy),o9(r,e&&!t),u0(r,0);var i=r.nodes&&r.nodes.t;if(i!==null)for(const s of i)s.stop();e3(r),r.f^=hy,r.f|=la;var n=r.parent;n!==null&&n.first!==null&&i3(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes=r.ac=r.b=null}function t3(r,e){for(;r!==null;){var t=r===e?null:cv(r);r.remove(),r=t}}function i3(r){var e=r.parent,t=r.prev,i=r.next;t!==null&&(t.next=i),i!==null&&(i.prev=t),e!==null&&(e.first===r&&(e.first=i),e.last===r&&(e.last=t))}function du(r,e,t=!0){var i=[];n3(r,i,!0);var n=()=>{t&&Br(r),e&&e()},s=i.length;if(s>0){var a=()=>--s||n();for(var l of i)l.out(a)}else n()}function n3(r,e,t){if((r.f&dr)===0){r.f^=dr;var i=r.nodes&&r.nodes.t;if(i!==null)for(const l of i)(l.is_global||t)&&e.push(l);for(var n=r.first;n!==null;){var s=n.next;if((n.f&_d)===0){var a=(n.f&pp)!==0||(n.f&Ra)!==0&&(r.f&Ta)!==0;n3(n,e,a?t:!1)}n=s}}}function um(r){s3(r,!0)}function s3(r,e){if((r.f&dr)!==0){r.f^=dr,(r.f&Do)===0&&(po(r,Lo),sh.ensure().schedule(r));for(var t=r.first;t!==null;){var i=t.next,n=(t.f&pp)!==0||(t.f&Ra)!==0;s3(t,n?e:!1),t=i}var s=r.nodes&&r.nodes.t;if(s!==null)for(const a of s)(a.is_global||e)&&a.in()}}function r9(r,e){if(r.nodes)for(var t=r.nodes.start,i=r.nodes.end;t!==null;){var n=t===i?null:cv(t);e.append(t),t=n}}let Bx=!1,cc=!1;function r8(r){cc=r}let cs=null,Ma=!1;function ha(r){cs=r}let hs=null;function Al(r){hs=r}let wl=null;function o3(r){cs!==null&&(wl??(wl=new Set)).add(r)}let wr=null,Mr=0,Xr=null;function rM(r){Xr=r}let r3=1,Xd=0,uu=Xd;function a8(r){uu=r}function a3(){return++r3}function uv(r){var e=r.f;if((e&Lo)!==0)return!0;if(e&Vo&&(r.f&=~nh),(e&Dl)!==0){for(var t=r.deps,i=t.length,n=0;n<i;n++){var s=t[n];if(uv(s)&&j5(s),s.wv>r.wv)return!0}(e&aa)!==0&&No===null&&po(r,Do)}return!1}function l3(r,e,t=!0){var i=r.reactions;if(i!==null&&!(wl!==null&&wl.has(r)))for(var n=0;n<i.length;n++){var s=i[n];(s.f&Vo)!==0?l3(s,e,!1):e===s&&(t?po(s,Lo):(s.f&Do)!==0&&po(s,Dl),e9(s))}}function c3(r){var E;var e=wr,t=Mr,i=Xr,n=cs,s=wl,a=jo,l=Ma,d=uu,u=r.f;wr=null,Mr=0,Xr=null,cs=(u&(Ra|_d))===0?r:null,wl=null,gp(r.ctx),Ma=!1,uu=++Xd,r.ac!==null&&(T1(()=>{r.ac.abort(P1)}),r.ac=null);try{r.f|=am;var f=r.fn,x=f();r.f|=zp;var m=r.deps,C=yn==null?void 0:yn.is_fork;if(wr!==null){var _;if(C||u0(r,Mr),m!==null&&Mr>0)for(m.length=Mr+wr.length,_=0;_<wr.length;_++)m[Mr+_]=wr[_];else r.deps=m=wr;if(n9()&&(r.f&aa)!==0)for(_=Mr;_<m.length;_++)((E=m[_]).reactions??(E.reactions=[])).push(r)}else!C&&m!==null&&Mr<m.length&&(u0(r,Mr),m.length=Mr);if(L5()&&Xr!==null&&!Ma&&m!==null&&(r.f&(Vo|Dl|Lo))===0)for(_=0;_<Xr.length;_++)l3(Xr[_],r);if(n!==null&&n!==r){if(Xd++,n.deps!==null)for(let S=0;S<t;S+=1)n.deps[S].rv=Xd;if(e!==null)for(const S of e)S.rv=Xd;Xr!==null&&(i===null?i=Xr:i.push(...Xr))}return(r.f&Qc)!==0&&(r.f^=Qc),x}catch(S){return P5(S)}finally{r.f^=am,wr=e,Mr=t,Xr=i,cs=n,wl=s,gp(a),Ma=l,uu=d}}function aM(r,e){let t=e.reactions;if(t!==null){var i=qP.call(t,r);if(i!==-1){var n=t.length-1;n===0?t=e.reactions=null:(t[i]=t[n],t.pop())}}if(t===null&&(e.f&Vo)!==0&&(wr===null||!sm.call(wr,e))){var s=e;(s.f&aa)!==0&&(s.f^=aa,s.f&=~nh),s.v!==So&&QS(s),ZT(s),u0(s,0)}}function u0(r,e){var t=r.deps;if(t!==null)for(var i=e;i<t.length;i++)aM(r,t[i])}function xp(r){var e=r.f;if((e&la)===0){po(r,Do);var t=hs,i=Bx;hs=r,Bx=!0;try{(e&(Ta|S5))!==0?oM(r):o9(r),e3(r);var n=c3(r);r.teardown=typeof n=="function"?n:null,r.wv=r3;var s;y5&&FT&&(r.f&Lo)!==0&&r.deps}finally{Bx=i,hs=t}}}async function ul(){await Promise.resolve(),RT()}function o(r){var e=r.f,t=(e&Vo)!==0;if(cs!==null&&!Ma){var i=hs!==null&&(hs.f&la)!==0;if(!i&&(wl===null||!wl.has(r))){var n=cs.deps;if((cs.f&am)!==0)r.rv<Xd&&(r.rv=Xd,wr===null&&n!==null&&n[Mr]===r?Mr++:wr===null?wr=[r]:wr.push(r));else{cs.deps??(cs.deps=[]),sm.call(cs.deps,r)||cs.deps.push(r);var s=r.reactions;s===null?r.reactions=[cs]:sm.call(s,cs)||s.push(cs)}}}if(cc&&cu.has(r))return cu.get(r);if(t){var a=r;if(cc){var l=a.v;return((a.f&Do)===0&&a.reactions!==null||u3(a))&&(l=i9(a)),cu.set(a,l),l}var d=(a.f&aa)===0&&!Ma&&cs!==null&&(Bx||(cs.f&aa)!==0),u=(a.f&zp)===0;uv(a)&&(d&&(a.f|=aa),j5(a)),d&&!u&&(V5(a),d3(a))}if(No!=null&&No.has(r))return No.get(r);if((r.f&Qc)!==0)throw r.v;return r.v}function d3(r){if(r.f|=aa,r.deps!==null)for(const e of r.deps)(e.reactions??(e.reactions=[])).push(r),(e.f&Vo)!==0&&(e.f&aa)===0&&(V5(e),d3(e))}function u3(r){if(r.v===So)return!0;if(r.deps===null)return!1;for(const e of r.deps)if(cu.has(e)||(e.f&Vo)!==0&&u3(e))return!0;return!1}function _c(r){var e=Ma;try{return Ma=!0,r()}finally{Ma=e}}const lM=["touchstart","touchmove"];function cM(r){return lM.includes(r)}const Qd=Symbol("events"),h3=new Set,Cy=new Set;function dM(r,e,t,i={}){function n(s){if(i.capture||yy.call(e,s),!s.cancelBubble)return T1(()=>t==null?void 0:t.call(this,s))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?yl(()=>{e.addEventListener(r,n,i)}):e.addEventListener(r,n,i),n}function Ms(r,e,t,i,n){var s={capture:i,passive:n},a=dM(r,e,t,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&R1(()=>{e.removeEventListener(r,a,s)})}function j(r,e,t){(e[Qd]??(e[Qd]={}))[r]=t}function ys(r){for(var e=0;e<r.length;e++)h3.add(r[e]);for(var t of Cy)t(r)}let l8=null;function yy(r){var E,S;var e=this,t=e.ownerDocument,i=r.type,n=((E=r.composedPath)==null?void 0:E.call(r))||[],s=n[0]||r.target;l8=r;var a=0,l=l8===r&&r[Qd];if(l){var d=n.indexOf(l);if(d!==-1&&(e===document||e===window)){r[Qd]=e;return}var u=n.indexOf(e);if(u===-1)return;d<=u&&(a=d)}if(s=n[a]||r.target,s!==e){UP(r,"currentTarget",{configurable:!0,get(){return s||t}});var f=cs,x=hs;ha(null),Al(null);try{for(var m,C=[];s!==null&&s!==e;){try{var _=(S=s[Qd])==null?void 0:S[i];_!=null&&(!s.disabled||r.target===s)&&_.call(s,r)}catch(I){m?C.push(I):m=I}if(r.cancelBubble)break;a++,s=a<n.length?n[a]:null}if(m){for(let I of C)queueMicrotask(()=>{throw I});throw m}}finally{r[Qd]=e,delete r.currentTarget,ha(f),Al(x)}}}var $A;const Fb=(($A=globalThis==null?void 0:globalThis.window)==null?void 0:$A.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:r=>r});function uM(r){return(Fb==null?void 0:Fb.createHTML(r))??r}function f3(r){var e=Q5("template");return e.innerHTML=uM(r.replaceAll("<!>","<!---->")),e.content}function rh(r,e){var t=hs;t.nodes===null&&(t.nodes={start:r,end:e,a:null,t:null})}function k(r,e){var t=(e&yT)!==0,i=(e&wT)!==0,n,s=!r.startsWith("<!>");return()=>{n===void 0&&(n=f3(s?r:"<!>"+r),t||(n=xl(n)));var a=i||K5?document.importNode(n,!0):n.cloneNode(!0);if(t){var l=xl(a),d=a.lastChild;rh(l,d)}else rh(a,a);return a}}function hM(r,e,t="svg"){var i=!r.startsWith("<!>"),n=`<${t}>${i?r:"<!>"+r}</${t}>`,s;return()=>{if(!s){var a=f3(n),l=xl(a);s=xl(l)}var d=s.cloneNode(!0);return rh(d,d),d}}function Ad(r,e){return hM(r,e,"svg")}function En(r=""){{var e=tc(r+"");return rh(e,e),e}}function ks(){var r=document.createDocumentFragment(),e=document.createComment(""),t=tc();return r.append(e,t),rh(e,t),r}function y(r,e){r!==null&&r.before(e)}function F(r,e){var t=e==null?"":typeof e=="object"?`${e}`:e;t!==(r[vg]??(r[vg]=r.nodeValue))&&(r[vg]=t,r.nodeValue=`${t}`)}function fM(r,e){return pM(r,e)}const Wv=new Map;function pM(r,{target:e,anchor:t,props:i={},events:n,context:s,intro:a=!0,transformError:l}){QT();var d=void 0,u=nM(()=>{var f=t??e.appendChild(tc());zT(f,{pending:()=>{}},C=>{ps({});var _=jo;s&&(_.c=s),n&&(i.$$events=n),d=r(C,i)||{},gs()},l);var x=new Set,m=C=>{for(var _=0;_<C.length;_++){var E=C[_];if(!x.has(E)){x.add(E);var S=cM(E);for(const O of[e,document]){var I=Wv.get(O);I===void 0&&(I=new Map,Wv.set(O,I));var M=I.get(E);M===void 0?(O.addEventListener(E,yy,{passive:S}),I.set(E,1)):I.set(E,M+1)}}}};return m(L1(h3)),Cy.add(m),()=>{var S;for(var C of x)for(const I of[e,document]){var _=Wv.get(I),E=_.get(C);--E==0?(I.removeEventListener(C,yy),_.delete(C),_.size===0&&Wv.delete(I)):_.set(C,E)}Cy.delete(m),f!==t&&((S=f.parentNode)==null||S.removeChild(f))}});return gM.set(d,u),d}let gM=new WeakMap;var wa,al,Or,su,V0,$0,b_;class p3{constructor(e,t=!0){Jn(this,"anchor");$n(this,wa,new Map);$n(this,al,new Map);$n(this,Or,new Map);$n(this,su,new Set);$n(this,V0,!0);$n(this,$0,e=>{if(It(this,wa).has(e)){var t=It(this,wa).get(e),i=It(this,al).get(t);if(i)um(i),It(this,su).delete(t);else{var n=It(this,Or).get(t);n&&(um(n.effect),It(this,al).set(t,n.effect),It(this,Or).delete(t),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),i=n.effect)}for(const[s,a]of It(this,wa)){if(It(this,wa).delete(s),s===e)break;const l=It(this,Or).get(a);l&&(Br(l.effect),It(this,Or).delete(a))}for(const[s,a]of It(this,al)){if(s===t||It(this,su).has(s))continue;const l=()=>{if(Array.from(It(this,wa).values()).includes(s)){var u=document.createDocumentFragment();r9(a,u),u.append(tc()),It(this,Or).set(s,{effect:a,fragment:u})}else Br(a);It(this,su).delete(s),It(this,al).delete(s)};It(this,V0)||!i?(It(this,su).add(s),du(a,l,!1)):l()}}});$n(this,b_,e=>{It(this,wa).delete(e);const t=Array.from(It(this,wa).values());for(const[i,n]of It(this,Or))t.includes(i)||(Br(n.effect),It(this,Or).delete(i))});this.anchor=e,qn(this,V0,t)}ensure(e,t){var i=yn,n=X5();if(t&&!It(this,al).has(e)&&!It(this,Or).has(e))if(n){var s=document.createDocumentFragment(),a=tc();s.append(a),It(this,Or).set(e,{effect:ta(()=>t(a)),fragment:s})}else It(this,al).set(e,ta(()=>t(this.anchor)));if(It(this,wa).set(i,e),n){for(const[l,d]of It(this,al))l===e?i.unskip_effect(d):i.skip_effect(d);for(const[l,d]of It(this,Or))l===e?i.unskip_effect(d.effect):i.skip_effect(d.effect);i.oncommit(It(this,$0)),i.ondiscard(It(this,b_))}else It(this,$0).call(this,i)}}wa=new WeakMap,al=new WeakMap,Or=new WeakMap,su=new WeakMap,V0=new WeakMap,$0=new WeakMap,b_=new WeakMap;function T(r,e,t=!1){var i=new p3(r),n=t?pp:0;function s(a,l){i.ensure(a,l)}N1(()=>{var a=!1;e((l,d=0)=>{a=!0,s(d,l)}),a||s(-1,null)},n)}const vM=Symbol("NaN");function g3(r,e,t){var i=new p3(r);N1(()=>{var n=e();n!==n&&(n=vM),i.ensure(n,t)})}function zi(r,e){return e}function xM(r,e,t){for(var i=[],n=e.length,s,a=e.length,l=0;l<n;l++){let x=e[l];du(x,()=>{if(s){if(s.pending.delete(x),s.done.add(x),s.pending.size===0){var m=r.outrogroups;wy(r,L1(s.done)),m.delete(s),m.size===0&&(r.outrogroups=null)}}else a-=1},!1)}if(a===0){var d=i.length===0&&t!==null;if(d){var u=t,f=u.parentNode;JT(f),f.append(u),r.items.clear()}wy(r,e,!d)}else s={pending:new Set(e),done:new Set},(r.outrogroups??(r.outrogroups=new Set)).add(s)}function wy(r,e,t=!0){var i;if(r.pending.size>0){i=new Set;for(const a of r.pending.values())for(const l of a)i.add(r.items.get(l).e)}for(var n=0;n<e.length;n++){var s=e[n];if(i!=null&&i.has(s)){s.f|=vl;const a=document.createDocumentFragment();r9(s,a)}else Br(e[n],t)}}var c8;function ci(r,e,t,i,n,s=null){var a=r,l=new Map,d=(e&D5)!==0;if(d){var u=r;a=u.appendChild(tc())}var f=null,x=t9(()=>{var O=t();return XS(O)?O:O==null?[]:L1(O)}),m,C=new Map,_=!0;function E(O){(M.effect.f&la)===0&&(M.pending.delete(O),M.fallback=f,mM(M,m,a,e,i),f!==null&&(m.length===0?(f.f&vl)===0?um(f):(f.f^=vl,_g(f,null,a)):du(f,()=>{f=null})))}function S(O){M.pending.delete(O)}var I=N1(()=>{m=o(x);for(var O=m.length,R=new Set,H=yn,K=X5(),G=0;G<O;G+=1){var oe=m[G],ve=i(oe,G),Me=_?null:l.get(ve);Me?(Me.v&&vp(Me.v,oe),Me.i&&vp(Me.i,G),K&&H.unskip_effect(Me.e)):(Me=_M(l,_?a:c8??(c8=tc()),oe,ve,G,n,e,t),_||(Me.e.f|=vl),l.set(ve,Me)),R.add(ve)}if(O===0&&s&&!f&&(_?f=ta(()=>s(a)):(f=ta(()=>s(c8??(c8=tc()))),f.f|=vl)),O>R.size&&sT(),!_)if(C.set(H,R),K){for(const[be,Se]of l)R.has(be)||H.skip_effect(Se.e);H.oncommit(E),H.ondiscard(S)}else E(H);o(x)}),M={effect:I,items:l,pending:C,outrogroups:null,fallback:f};_=!1}function rg(r){for(;r!==null&&(r.f&Ra)===0;)r=r.next;return r}function mM(r,e,t,i,n){var Me,be,Se,Ie,te,Ee,ne,De,_e;var s=(i&vT)!==0,a=e.length,l=r.items,d=rg(r.effect.first),u,f=null,x,m=[],C=[],_,E,S,I;if(s)for(I=0;I<a;I+=1)_=e[I],E=n(_,I),S=l.get(E).e,(S.f&vl)===0&&((be=(Me=S.nodes)==null?void 0:Me.a)==null||be.measure(),(x??(x=new Set)).add(S));for(I=0;I<a;I+=1){if(_=e[I],E=n(_,I),S=l.get(E).e,r.outrogroups!==null)for(const dt of r.outrogroups)dt.pending.delete(S),dt.done.delete(S);if((S.f&dr)!==0&&(um(S),s&&((Ie=(Se=S.nodes)==null?void 0:Se.a)==null||Ie.unfix(),(x??(x=new Set)).delete(S))),(S.f&vl)!==0)if(S.f^=vl,S===d)_g(S,null,t);else{var M=f?f.next:d;S===r.effect.last&&(r.effect.last=S.prev),S.prev&&(S.prev.next=S.next),S.next&&(S.next.prev=S.prev),Dc(r,f,S),Dc(r,S,M),_g(S,M,t),f=S,m=[],C=[],d=rg(f.next);continue}if(S!==d){if(u!==void 0&&u.has(S)){if(m.length<C.length){var O=C[0],R;f=O.prev;var H=m[0],K=m[m.length-1];for(R=0;R<m.length;R+=1)_g(m[R],O,t);for(R=0;R<C.length;R+=1)u.delete(C[R]);Dc(r,H.prev,K.next),Dc(r,f,H),Dc(r,K,O),d=O,f=K,I-=1,m=[],C=[]}else u.delete(S),_g(S,d,t),Dc(r,S.prev,S.next),Dc(r,S,f===null?r.effect.first:f.next),Dc(r,f,S),f=S;continue}for(m=[],C=[];d!==null&&d!==S;)(u??(u=new Set)).add(d),C.push(d),d=rg(d.next);if(d===null)continue}(S.f&vl)===0&&m.push(S),f=S,d=rg(S.next)}if(r.outrogroups!==null){for(const dt of r.outrogroups)dt.pending.size===0&&(wy(r,L1(dt.done)),(te=r.outrogroups)==null||te.delete(dt));r.outrogroups.size===0&&(r.outrogroups=null)}if(d!==null||u!==void 0){var G=[];if(u!==void 0)for(S of u)(S.f&dr)===0&&G.push(S);for(;d!==null;)(d.f&dr)===0&&d!==r.fallback&&G.push(d),d=rg(d.next);var oe=G.length;if(oe>0){var ve=(i&D5)!==0&&a===0?t:null;if(s){for(I=0;I<oe;I+=1)(ne=(Ee=G[I].nodes)==null?void 0:Ee.a)==null||ne.measure();for(I=0;I<oe;I+=1)(_e=(De=G[I].nodes)==null?void 0:De.a)==null||_e.fix()}xM(r,G,ve)}}s&&yl(()=>{var dt,ot;if(x!==void 0)for(S of x)(ot=(dt=S.nodes)==null?void 0:dt.a)==null||ot.apply()})}function _M(r,e,t,i,n,s,a,l){var d=(a&pT)!==0?(a&xT)===0?YT(t,!1,!1):oh(t):null,u=(a&gT)!==0?oh(n):null;return{v:d,i:u,e:ta(()=>(s(e,d??t,u??n,l),()=>{r.delete(i)}))}}function _g(r,e,t){if(r.nodes)for(var i=r.nodes.start,n=r.nodes.end,s=e&&(e.f&vl)===0?e.nodes.start:t;i!==null;){var a=cv(i);if(s.before(i),i===n)return;i=a}}function Dc(r,e,t){e===null?r.effect.first=t:e.next=t,t===null?r.effect.last=e:t.prev=e}function Gc(r,e,t=!1,i=!1,n=!1,s=!1){var a=r,l="";if(t)var d=r;P(()=>{var u=hs;if(l!==(l=e()??"")){if(t){u.nodes=null,d.innerHTML=l,l!==""&&rh(xl(d),d.lastChild);return}if(u.nodes!==null&&(t3(u.nodes.start,u.nodes.end),u.nodes=null),l!==""){var f=i?ET:n?ST:void 0,x=Q5(i?"svg":n?"math":"template",f);x.innerHTML=l;var m=i||n?x:x.content;if(rh(xl(m),m.lastChild),i||n)for(;xl(m);)a.before(xl(m));else a.before(m)}}})}function v3(r){var e,t,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=v3(r[e]))&&(i&&(i+=" "),i+=t)}else for(t in r)r[t]&&(i&&(i+=" "),i+=t);return i}function bM(){for(var r,e,t=0,i="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=v3(r))&&(i&&(i+=" "),i+=e);return i}function Pf(r){return typeof r=="object"?bM(r):r??""}const d8=[...`
|
|
3
3
|
\r\f \v\uFEFF`];function CM(r,e,t){var i=r==null?"":""+r;if(e&&(i=i?i+" "+e:e),t){for(var n of Object.keys(t))if(t[n])i=i?i+" "+n:n;else if(i.length)for(var s=n.length,a=0;(a=i.indexOf(n,a))>=0;){var l=a+s;(a===0||d8.includes(i[a-1]))&&(l===i.length||d8.includes(i[l]))?i=(a===0?"":i.substring(0,a))+i.substring(l+1):a=l}}return i===""?null:i}function u8(r,e=!1){var t=e?" !important;":";",i="";for(var n of Object.keys(r)){var s=r[n];s!=null&&s!==""&&(i+=" "+n+": "+s+t)}return i}function Lb(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function yM(r,e){if(e){var t="",i,n;if(Array.isArray(e)?(i=e[0],n=e[1]):i=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,a=0,l=!1,d=[];i&&d.push(...Object.keys(i).map(Lb)),n&&d.push(...Object.keys(n).map(Lb));var u=0,f=-1;const E=r.length;for(var x=0;x<E;x++){var m=r[x];if(l?m==="/"&&r[x-1]==="*"&&(l=!1):s?s===m&&(s=!1):m==="/"&&r[x+1]==="*"?l=!0:m==='"'||m==="'"?s=m:m==="("?a++:m===")"&&a--,!l&&s===!1&&a===0){if(m===":"&&f===-1)f=x;else if(m===";"||x===E-1){if(f!==-1){var C=Lb(r.substring(u,f).trim());if(!d.includes(C)){m!==";"&&x++;var _=r.substring(u,x).trim();t+=" "+_+";"}}u=x+1,f=-1}}}}return i&&(t+=u8(i)),n&&(t+=u8(n,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function jt(r,e,t,i,n,s){var a=r[fy];if(a!==t||a===void 0){var l=CM(t,i,s);l==null?r.removeAttribute("class"):e?r.className=l:r.setAttribute("class",l),r[fy]=t}else if(s&&n!==s)for(var d in s){var u=!!s[d];(n==null||u!==!!n[d])&&r.classList.toggle(d,u)}return s}function Ib(r,e={},t,i){for(var n in t){var s=t[n];e[n]!==s&&(t[n]==null?r.style.removeProperty(n):r.style.setProperty(n,s,i))}}function Fo(r,e,t,i){var n=r[py];if(n!==e){var s=yM(e,i);s==null?r.removeAttribute("style"):r.style.cssText=s,r[py]=e}else i&&(Array.isArray(i)?(Ib(r,t==null?void 0:t[0],i[0]),Ib(r,t==null?void 0:t[1],i[1],"important")):Ib(r,t,i));return i}function bd(r,e,t=!1){if(r.multiple){if(e==null)return;if(!XS(e))return DT();for(var i of r.options)i.selected=e.includes(Ng(i));return}for(i of r.options){var n=Ng(i);if(U5(n,e)){i.selected=!0;return}}(!t||e!==void 0)&&(r.selectedIndex=-1)}function ah(r){var e=new MutationObserver(()=>{bd(r,r.__value)});e.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),R1(()=>{e.disconnect()})}function Zs(r,e,t=e){var i=new WeakSet,n=!0;M1(r,"change",s=>{var a=s?"[selected]":":checked",l;if(r.multiple)l=[].map.call(r.querySelectorAll(a),Ng);else{var d=r.querySelector(a)??r.querySelector("option:not([disabled])");l=d&&Ng(d)}t(l),r.__value=l,yn!==null&&i.add(yn)}),s9(()=>{var s=e();if(r===document.activeElement){var a=yn;if(i.has(a))return}if(bd(r,s,n),n&&s===void 0){var l=r.querySelector(":checked");l!==null&&(s=Ng(l),t(s))}r.__value=s,n=!1}),ah(r)}function Ng(r){return"__value"in r?r.__value:r.value}const wM=Symbol("is custom element"),EM=Symbol("is html"),SM=iT?"progress":"PROGRESS";function Ia(r,e){var t=a9(r);t.value===(t.value=e??void 0)||r.value===e&&(e!==0||r.nodeName!==SM)||(r.value=e??"")}function Qo(r,e){var t=a9(r);t.checked!==(t.checked=e??void 0)&&(r.checked=e)}function _i(r,e,t,i){var n=a9(r);n[e]!==(n[e]=t)&&(e==="loading"&&(r[tT]=t),t==null?r.removeAttribute(e):typeof t!="string"&&kM(r).includes(e)?r[e]=t:r.setAttribute(e,t))}function a9(r){return r[Ex]??(r[Ex]={[wM]:r.nodeName.includes("-"),[EM]:r.namespaceURI===A5})}var h8=new Map;function kM(r){var e=r.getAttribute("is")||r.nodeName,t=h8.get(e);if(t)return t;h8.set(e,t=[]);for(var i,n=r,s=Element.prototype;s!==n;){i=GP(n);for(var a in i)i[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&t.push(a);n=w5(n)}return t}function ii(r,e,t=e){var i=new WeakSet;M1(r,"input",async n=>{var s=n?r.defaultValue:r.value;if(s=Tb(r)?Mb(s):s,t(s),yn!==null&&i.add(yn),await ul(),s!==(s=e())){var a=r.selectionStart,l=r.selectionEnd,d=r.value.length;if(r.value=s??"",l!==null){var u=r.value.length;a===l&&l===d&&u>d?(r.selectionStart=u,r.selectionEnd=u):(r.selectionStart=a,r.selectionEnd=Math.min(l,u))}}}),_c(e)==null&&r.value&&(t(Tb(r)?Mb(r.value):r.value),yn!==null&&i.add(yn)),dv(()=>{var n=e();if(r===document.activeElement){var s=yn;if(i.has(s))return}Tb(r)&&n===Mb(r.value)||r.type==="date"&&!n&&!r.value||n!==r.value&&(r.value=n??"")})}const Pb=new Set;function Og(r,e,t,i,n=i){var s=t.getAttribute("type")==="checkbox",a=r;if(e!==null)for(var l of e)a=a[l]??(a[l]=[]);a.push(t),M1(t,"change",()=>{var d=t.__value;s&&(d=DM(a,d,t.checked)),n(d)},()=>n(s?[]:null)),dv(()=>{var d=i();s?(d=d||[],t.checked=d.includes(t.__value)):t.checked=U5(t.__value,d)}),R1(()=>{var d=a.indexOf(t);d!==-1&&a.splice(d,1)}),Pb.has(a)||(Pb.add(a),yl(()=>{a.sort((d,u)=>d.compareDocumentPosition(u)===4?-1:1),Pb.delete(a)})),yl(()=>{})}function vs(r,e,t=e){M1(r,"change",i=>{var n=i?r.defaultChecked:r.checked;t(n)}),_c(e)==null&&t(r.checked),dv(()=>{var i=e();r.checked=!!i})}function DM(r,e,t){for(var i=new Set,n=0;n<r.length;n+=1)r[n].checked&&i.add(r[n].__value);return t||i.delete(e),Array.from(i)}function Tb(r){var e=r.type;return e==="number"||e==="range"}function Mb(r){return r===""?null:+r}var $c,Uf,q0,C_,x3;const y_=class y_{constructor(e){$n(this,C_);$n(this,$c,new WeakMap);$n(this,Uf);$n(this,q0);qn(this,q0,e)}observe(e,t){var i=It(this,$c).get(e)||new Set;return i.add(t),It(this,$c).set(e,i),Bs(this,C_,x3).call(this).observe(e,It(this,q0)),()=>{var n=It(this,$c).get(e);n.delete(t),n.size===0&&(It(this,$c).delete(e),It(this,Uf).unobserve(e))}}};$c=new WeakMap,Uf=new WeakMap,q0=new WeakMap,C_=new WeakSet,x3=function(){return It(this,Uf)??qn(this,Uf,new ResizeObserver(e=>{for(var t of e){y_.entries.set(t.target,t);for(var i of It(this,$c).get(t.target)||[])i(t)}}))},Jn(y_,"entries",new WeakMap);let Ey=y_;var AM=new Ey({box:"border-box"});function BM(r,e,t){var i=AM.observe(r,()=>t(r[e]));s9(()=>(_c(()=>t(r[e])),i))}function Rb(r,e){return r===e||(r==null?void 0:r[lu])===e}function ds(r={},e,t,i){var n=jo.r,s=hs;return s9(()=>{var a,l;return dv(()=>{a=l,l=[],_c(()=>{Rb(t(...l),r)||(e(r,...l),a&&Rb(t(...a),r)&&e(null,...a))})}),()=>{let d=s;for(;d!==n&&d.parent!==null&&d.parent.f&hy;)d=d.parent;const u=()=>{l&&Rb(t(...l),r)&&e(null,...l)},f=d.teardown;d.teardown=()=>{u(),f==null||f()}}}),r}function Gs(r,e,t,i){var R;var n=!0,s=(t&bT)!==0,a=(t&CT)!==0,l=i,d=!0,u=void 0,f=()=>a&&n?(u??(u=d0(i)),o(u)):(d&&(d=!1,l=a?_c(i):i),l);let x;if(s){var m=lu in r||eT in r;x=((R=Lf(r,e))==null?void 0:R.set)??(m&&e in r?H=>r[e]=H:void 0)}var C,_=!1;s?[C,_]=PT(()=>r[e]):C=r[e],C===void 0&&i!==void 0&&(C=f(),x&&(cT(),x(C)));var E;if(E=()=>{var H=r[e];return H===void 0?f():(d=!0,H)},(t&_T)===0)return E;if(x){var S=r.$$legacy;return(function(H,K){return arguments.length>0?((!K||S||_)&&x(K?E():H),H):E()})}var I=!1,M=((t&mT)!==0?d0:t9)(()=>(I=!1,E()));s&&o(M);var O=hs;return(function(H,K){if(arguments.length>0){const G=K?o(M):s?wi(H):H;return p(M,G),I=!0,l!==void 0&&(l=G),H}return cc&&I||(O.f&la)!==0?M.v:o(M)})}function zs(r){jo===null&&k5(),wn(()=>{const e=_c(r);if(typeof e=="function")return e})}function kh(r){jo===null&&k5(),zs(()=>()=>_c(r))}const FM="5";var qA;typeof window<"u"&&((qA=window.__svelte??(window.__svelte={})).v??(qA.v=new Set)).add(FM);/*!-----------------------------------------------------------------------------
|
|
4
4
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10,7 +10,7 @@ var d7=Object.defineProperty;var w2=r=>{throw TypeError(r)};var u7=(r,e,t)=>e in
|
|
|
10
10
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
11
11
|
* Released under the MIT license
|
|
12
12
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
13
|
-
*-----------------------------------------------------------------------------*/var WM=Object.defineProperty,jM=Object.getOwnPropertyDescriptor,VM=Object.getOwnPropertyNames,$M=Object.prototype.hasOwnProperty,qM=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of VM(e))!$M.call(r,n)&&n!==t&&WM(r,n,{get:()=>e[n],enumerable:!(i=jM(e,n))||i.enumerable});return r},UM=(r,e,t)=>(qM(r,e,"default"),t),GM="5.4.5",mp={};UM(mp,GA);var b3=(r=>(r[r.None=0]="None",r[r.CommonJS=1]="CommonJS",r[r.AMD=2]="AMD",r[r.UMD=3]="UMD",r[r.System=4]="System",r[r.ES2015=5]="ES2015",r[r.ESNext=99]="ESNext",r))(b3||{}),C3=(r=>(r[r.None=0]="None",r[r.Preserve=1]="Preserve",r[r.React=2]="React",r[r.ReactNative=3]="ReactNative",r[r.ReactJSX=4]="ReactJSX",r[r.ReactJSXDev=5]="ReactJSXDev",r))(C3||{}),y3=(r=>(r[r.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",r[r.LineFeed=1]="LineFeed",r))(y3||{}),w3=(r=>(r[r.ES3=0]="ES3",r[r.ES5=1]="ES5",r[r.ES2015=2]="ES2015",r[r.ES2016=3]="ES2016",r[r.ES2017=4]="ES2017",r[r.ES2018=5]="ES2018",r[r.ES2019=6]="ES2019",r[r.ES2020=7]="ES2020",r[r.ESNext=99]="ESNext",r[r.JSON=100]="JSON",r[r.Latest=99]="Latest",r))(w3||{}),E3=(r=>(r[r.Classic=1]="Classic",r[r.NodeJs=2]="NodeJs",r))(E3||{}),S3=class{constructor(r,e,t,i,n){this._onDidChange=new mp.Emitter,this._onDidExtraLibsChange=new mp.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(r),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(r,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===r)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:r,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(r){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),r&&r.length>0)for(const e of r){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(r){this._compilerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(r){this._diagnosticsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(r){this._workerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(r){this._inlayHintsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(r){}setEagerModelSync(r){this._eagerModelSync=r}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(r){this._modeConfiguration=r||Object.create(null),this._onDidChange.fire(void 0)}},KM=GM,k3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},D3=new S3({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},k3),A3=new S3({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},k3),ZM=()=>O1().then(r=>r.getTypeScriptWorker()),YM=()=>O1().then(r=>r.getJavaScriptWorker());mp.languages.typescript={ModuleKind:b3,JsxEmit:C3,NewLineKind:y3,ScriptTarget:w3,ModuleResolutionKind:E3,typescriptVersion:KM,typescriptDefaults:D3,javascriptDefaults:A3,getTypeScriptWorker:ZM,getJavaScriptWorker:YM};function O1(){return UA(()=>import("./tsMode-B-GlXT-q.js"),__vite__mapDeps([3,1,2]))}mp.languages.onLanguage("typescript",()=>O1().then(r=>r.setupTypeScript(D3)));mp.languages.onLanguage("javascript",()=>O1().then(r=>r.setupJavaScript(A3)));class XM extends nr{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Vi("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:an.map,toggled:Xt.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Xt.has("isInDiffEditor"),menu:{when:Xt.has("isInDiffEditor"),id:Mi.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(Is),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class B3 extends nr{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Vi("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:Xt.has("isInDiffEditor")})}run(e,...t){const i=e.get(Is),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class F3 extends nr{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Vi("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:Xt.has("isInDiffEditor")})}run(e,...t){const i=e.get(Is),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const fv=Vi("diffEditor","Diff Editor");class QM extends Na{constructor(){super({id:"diffEditor.switchSide",title:Vi("switchSide","Switch Side"),icon:an.arrowSwap,precondition:Xt.has("isInDiffEditor"),f1:!0,category:fv})}runEditorCommand(e,t,i){const n=jp(e);if(n instanceof U0){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class JM extends Na{constructor(){super({id:"diffEditor.exitCompareMove",title:Vi("exitCompareMove","Exit Compare Move"),icon:an.close,precondition:ue.comparingMovedCode,f1:!1,category:fv,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=jp(e);n instanceof U0&&n.exitCompareMove()}}class eR extends Na{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Vi("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:an.fold,precondition:Xt.has("isInDiffEditor"),f1:!0,category:fv})}runEditorCommand(e,t,...i){const n=jp(e);n instanceof U0&&n.collapseAllUnchangedRegions()}}class tR extends Na{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Vi("showAllUnchangedRegions","Show All Unchanged Regions"),icon:an.unfold,precondition:Xt.has("isInDiffEditor"),f1:!0,category:fv})}runEditorCommand(e,t,...i){const n=jp(e);n instanceof U0&&n.showAllUnchangedRegions()}}class Sy extends nr{constructor(){super({id:"diffEditor.revert",title:Vi("revert","Revert"),f1:!1,category:fv})}run(e,t){const i=iR(e,t.originalUri,t.modifiedUri);i instanceof U0&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const L3=Vi("accessibleDiffViewer","Accessible Diff Viewer"),w_=class w_ extends nr{constructor(){super({id:w_.id,title:Vi("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:L3,precondition:Xt.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=jp(e);t==null||t.accessibleDiffViewerNext()}};w_.id="editor.action.accessibleDiffViewer.next";let h0=w_;const E_=class E_ extends nr{constructor(){super({id:E_.id,title:Vi("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:L3,precondition:Xt.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=jp(e);t==null||t.accessibleDiffViewerPrev()}};E_.id="editor.action.accessibleDiffViewer.prev";let hm=E_;function iR(r,e,t){return r.get(eo).listDiffEditors().find(s=>{var d,u;const a=s.getModifiedEditor(),l=s.getOriginalEditor();return a&&((d=a.getModel())==null?void 0:d.uri.toString())===t.toString()&&l&&((u=l.getModel())==null?void 0:u.uri.toString())===e.toString()})||null}function jp(r){const t=r.get(eo).listDiffEditors(),i=KA();if(i)for(const n of t){const s=n.getContainerDomNode();if(nR(s,i))return n}return null}function nR(r,e){let t=e;for(;t;){if(t===r)return!0;t=t.parentElement}return!1}fs(XM);fs(B3);fs(F3);da.appendMenuItem(Mi.EditorTitle,{command:{id:new F3().desc.id,title:B("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Xt.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Xt.has("isInDiffEditor")},order:11,group:"1_diff",when:Xt.and(ue.diffEditorRenderSideBySideInlineBreakpointReached,Xt.has("isInDiffEditor"))});da.appendMenuItem(Mi.EditorTitle,{command:{id:new B3().desc.id,title:B("showMoves","Show Moved Code Blocks"),icon:an.move,toggled:h7.create("config.diffEditor.experimental.showMoves",!0),precondition:Xt.has("isInDiffEditor")},order:10,group:"1_diff",when:Xt.has("isInDiffEditor")});fs(Sy);for(const r of[{icon:an.arrowRight,key:ue.diffEditorInlineMode.toNegated()},{icon:an.discard,key:ue.diffEditorInlineMode}])da.appendMenuItem(Mi.DiffEditorHunkToolbar,{command:{id:new Sy().desc.id,title:B("revertHunk","Revert Block"),icon:r.icon},when:Xt.and(ue.diffEditorModifiedWritable,r.key),order:5,group:"primary"}),da.appendMenuItem(Mi.DiffEditorSelectionToolbar,{command:{id:new Sy().desc.id,title:B("revertSelection","Revert Selection"),icon:r.icon},when:Xt.and(ue.diffEditorModifiedWritable,r.key),order:5,group:"primary"});fs(QM);fs(JM);fs(eR);fs(tR);da.appendMenuItem(Mi.EditorTitle,{command:{id:h0.id,title:B("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Xt.has("isInDiffEditor")},order:10,group:"2_diff",when:Xt.and(ue.accessibleDiffViewerVisible.negate(),Xt.has("isInDiffEditor"))});As.registerCommandAlias("editor.action.diffReview.next",h0.id);fs(h0);As.registerCommandAlias("editor.action.diffReview.prev",hm.id);fs(hm);var sR=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},oR=function(r,e){return function(t,i){e(t,i,r)}},ky;const H1=new Un("selectionAnchorSet",!1);var gu;let Cd=(gu=class{static get(e){return e.getContribution(ky.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=H1.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(on.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Ro().appendText(B("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ua(B("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(on.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},ky=gu,gu.ID="editor.contrib.selectionAnchorController",gu);Cd=ky=sR([oR(1,ts)],Cd);class rR extends vi{constructor(){super({id:"editor.action.setSelectionAnchor",label:B("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:ue.editorTextFocus,primary:no(2089,2080),weight:100}})}async run(e,t){var i;(i=Cd.get(t))==null||i.setSelectionAnchor()}}class aR extends vi{constructor(){super({id:"editor.action.goToSelectionAnchor",label:B("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:H1})}async run(e,t){var i;(i=Cd.get(t))==null||i.goToSelectionAnchor()}}class lR extends vi{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:B("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:H1,kbOpts:{kbExpr:ue.editorTextFocus,primary:no(2089,2089),weight:100}})}async run(e,t){var i;(i=Cd.get(t))==null||i.selectFromAnchorToCursor()}}class cR extends vi{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:B("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:H1,kbOpts:{kbExpr:ue.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=Cd.get(t))==null||i.cancelSelectionAnchor()}}Dn(Cd.ID,Cd,4);zt(rR);zt(aR);zt(lR);zt(cR);const dR=Hi("editorOverviewRuler.bracketMatchForeground","#A0A0A0",B("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class uR extends vi{constructor(){super({id:"editor.action.jumpToBracket",label:B("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:ue.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=lh.get(t))==null||i.jumpToBracket()}}class hR extends vi{constructor(){super({id:"editor.action.selectToBracket",label:B("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Vi("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var s;let n=!0;i&&i.selectBrackets===!1&&(n=!1),(s=lh.get(t))==null||s.selectToBracket(n)}}class fR extends vi{constructor(){super({id:"editor.action.removeBrackets",label:B("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:ue.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=lh.get(t))==null||i.removeBrackets(this.id)}}class pR{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}const Rc=class Rc extends Ai{static get(e){return e.getContribution(Rc.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new uo(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),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(72)&&(this._matchBrackets=this._editor.getOption(72),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;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let a=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?a=s[1].getStartPosition():s[1].containsPosition(n)&&(a=s[0].getStartPosition());else{const l=e.bracketPairs.findEnclosingBrackets(n);if(l)a=l[1].getStartPosition();else{const d=e.bracketPairs.findNextBracket(n);d&&d.range&&(a=d.range.getStartPosition())}}return a?new on(a.lineNumber,a.column,a.lineNumber,a.column):new on(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let a=t.bracketPairs.matchBracket(s);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(s),!a)){const u=t.bracketPairs.findNextBracket(s);u&&u.range&&(a=t.bracketPairs.matchBracket(u.range.getStartPosition()))}let l=null,d=null;if(a){a.sort(Ve.compareRangesUsingStarts);const[u,f]=a;if(l=e?u.getStartPosition():u.getEndPosition(),d=e?f.getEndPosition():f.getStartPosition(),f.containsPosition(s)){const x=l;l=d,d=x}}l&&d&&i.push(new on(l.lineNumber,l.column,d.lineNumber,d.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let a=0;for(let x=0,m=e.length;x<m;x++){const C=e[x];C.isEmpty()&&(s[a++]=C.getStartPosition())}s.length>1&&s.sort($i.compare);const l=[];let d=0,u=0;const f=n.length;for(let x=0,m=s.length;x<m;x++){const C=s[x];for(;u<f&&n[u].position.isBefore(C);)u++;if(u<f&&n[u].position.equals(C))l[d++]=n[u];else{let _=t.bracketPairs.matchBracket(C,20),E=Rc._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!_&&this._matchBrackets==="always"&&(_=t.bracketPairs.findEnclosingBrackets(C,20),E=Rc._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),l[d++]=new pR(C,_,E)}}this._lastBracketsData=l,this._lastVersionId=i}};Rc.ID="editor.contrib.bracketMatchingController",Rc._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=jn.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ro(dR),position:_l.Center}}),Rc._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=jn.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});let lh=Rc;Dn(lh.ID,lh,1);zt(hR);zt(uR);zt(fR);da.appendMenuItem(Mi.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:B({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class gR{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const a=new Ve(i,n-1,i,n),l=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new Ve(i,s,i,s),l)}else{const a=new Ve(i,s,i,s+1),l=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new Ve(i,n,i,n),l)}}computeCursorState(e,t){return this._isMovingLeft?new on(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new on(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class I3 extends vi{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new gR(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class vR extends I3{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:B("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:ue.writable})}}class xR extends I3{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:B("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:ue.writable})}}zt(vR);zt(xR);class mR extends vi{constructor(){super({id:"editor.action.transposeLetters",label:B("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:ue.writable,kbOpts:{kbExpr:ue.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const a of s){if(!a.isEmpty())continue;const l=a.startLineNumber,d=a.startColumn,u=i.getLineMaxColumn(l);if(l===1&&(d===1||d===2&&u===2))continue;const f=d===u?a.getPosition():Cb.rightPosition(i,a.getPosition().lineNumber,a.getPosition().column),x=Cb.leftPosition(i,f),m=Cb.leftPosition(i,x),C=i.getValueInRange(Ve.fromPositions(m,x)),_=i.getValueInRange(Ve.fromPositions(x,f)),E=Ve.fromPositions(m,f);n.push(new G0(E,_+C))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}zt(mR);const z1=(function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?r=crypto.getRandomValues.bind(crypto):r=function(i){for(let n=0;n<i.length;n++)i[n]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){r(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,s="";return s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s}})();function l9(r){return{asString:async()=>r,asFile:()=>{},value:typeof r=="string"?r:void 0}}function _R(r,e,t){const i={id:z1(),name:r,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class P3{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return Xl.some(this,([i,n])=>n.asFile())&&t.push("files"),M3(fm(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))==null?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.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(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return fm(e)}}function fm(r){return r.toLowerCase()}function T3(r,e){return M3(fm(r),e.map(fm))}function M3(r,e){if(r==="*/*")return e.length>0;if(e.includes(r))return!0;const t=r.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(a=>a.startsWith(n+"/")):!1}const W1=Object.freeze({create:r=>ZA(r.map(e=>e.toString())).join(`\r
|
|
13
|
+
*-----------------------------------------------------------------------------*/var WM=Object.defineProperty,jM=Object.getOwnPropertyDescriptor,VM=Object.getOwnPropertyNames,$M=Object.prototype.hasOwnProperty,qM=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of VM(e))!$M.call(r,n)&&n!==t&&WM(r,n,{get:()=>e[n],enumerable:!(i=jM(e,n))||i.enumerable});return r},UM=(r,e,t)=>(qM(r,e,"default"),t),GM="5.4.5",mp={};UM(mp,GA);var b3=(r=>(r[r.None=0]="None",r[r.CommonJS=1]="CommonJS",r[r.AMD=2]="AMD",r[r.UMD=3]="UMD",r[r.System=4]="System",r[r.ES2015=5]="ES2015",r[r.ESNext=99]="ESNext",r))(b3||{}),C3=(r=>(r[r.None=0]="None",r[r.Preserve=1]="Preserve",r[r.React=2]="React",r[r.ReactNative=3]="ReactNative",r[r.ReactJSX=4]="ReactJSX",r[r.ReactJSXDev=5]="ReactJSXDev",r))(C3||{}),y3=(r=>(r[r.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",r[r.LineFeed=1]="LineFeed",r))(y3||{}),w3=(r=>(r[r.ES3=0]="ES3",r[r.ES5=1]="ES5",r[r.ES2015=2]="ES2015",r[r.ES2016=3]="ES2016",r[r.ES2017=4]="ES2017",r[r.ES2018=5]="ES2018",r[r.ES2019=6]="ES2019",r[r.ES2020=7]="ES2020",r[r.ESNext=99]="ESNext",r[r.JSON=100]="JSON",r[r.Latest=99]="Latest",r))(w3||{}),E3=(r=>(r[r.Classic=1]="Classic",r[r.NodeJs=2]="NodeJs",r))(E3||{}),S3=class{constructor(r,e,t,i,n){this._onDidChange=new mp.Emitter,this._onDidExtraLibsChange=new mp.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(r),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(r,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===r)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:r,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(r){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),r&&r.length>0)for(const e of r){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(r){this._compilerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(r){this._diagnosticsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(r){this._workerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(r){this._inlayHintsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(r){}setEagerModelSync(r){this._eagerModelSync=r}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(r){this._modeConfiguration=r||Object.create(null),this._onDidChange.fire(void 0)}},KM=GM,k3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},D3=new S3({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},k3),A3=new S3({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},k3),ZM=()=>O1().then(r=>r.getTypeScriptWorker()),YM=()=>O1().then(r=>r.getJavaScriptWorker());mp.languages.typescript={ModuleKind:b3,JsxEmit:C3,NewLineKind:y3,ScriptTarget:w3,ModuleResolutionKind:E3,typescriptVersion:KM,typescriptDefaults:D3,javascriptDefaults:A3,getTypeScriptWorker:ZM,getJavaScriptWorker:YM};function O1(){return UA(()=>import("./tsMode-CE5FSNgq.js"),__vite__mapDeps([3,1,2]))}mp.languages.onLanguage("typescript",()=>O1().then(r=>r.setupTypeScript(D3)));mp.languages.onLanguage("javascript",()=>O1().then(r=>r.setupJavaScript(A3)));class XM extends nr{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Vi("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:an.map,toggled:Xt.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Xt.has("isInDiffEditor"),menu:{when:Xt.has("isInDiffEditor"),id:Mi.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(Is),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class B3 extends nr{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Vi("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:Xt.has("isInDiffEditor")})}run(e,...t){const i=e.get(Is),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class F3 extends nr{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Vi("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:Xt.has("isInDiffEditor")})}run(e,...t){const i=e.get(Is),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const fv=Vi("diffEditor","Diff Editor");class QM extends Na{constructor(){super({id:"diffEditor.switchSide",title:Vi("switchSide","Switch Side"),icon:an.arrowSwap,precondition:Xt.has("isInDiffEditor"),f1:!0,category:fv})}runEditorCommand(e,t,i){const n=jp(e);if(n instanceof U0){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class JM extends Na{constructor(){super({id:"diffEditor.exitCompareMove",title:Vi("exitCompareMove","Exit Compare Move"),icon:an.close,precondition:ue.comparingMovedCode,f1:!1,category:fv,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=jp(e);n instanceof U0&&n.exitCompareMove()}}class eR extends Na{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Vi("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:an.fold,precondition:Xt.has("isInDiffEditor"),f1:!0,category:fv})}runEditorCommand(e,t,...i){const n=jp(e);n instanceof U0&&n.collapseAllUnchangedRegions()}}class tR extends Na{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Vi("showAllUnchangedRegions","Show All Unchanged Regions"),icon:an.unfold,precondition:Xt.has("isInDiffEditor"),f1:!0,category:fv})}runEditorCommand(e,t,...i){const n=jp(e);n instanceof U0&&n.showAllUnchangedRegions()}}class Sy extends nr{constructor(){super({id:"diffEditor.revert",title:Vi("revert","Revert"),f1:!1,category:fv})}run(e,t){const i=iR(e,t.originalUri,t.modifiedUri);i instanceof U0&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const L3=Vi("accessibleDiffViewer","Accessible Diff Viewer"),w_=class w_ extends nr{constructor(){super({id:w_.id,title:Vi("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:L3,precondition:Xt.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=jp(e);t==null||t.accessibleDiffViewerNext()}};w_.id="editor.action.accessibleDiffViewer.next";let h0=w_;const E_=class E_ extends nr{constructor(){super({id:E_.id,title:Vi("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:L3,precondition:Xt.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=jp(e);t==null||t.accessibleDiffViewerPrev()}};E_.id="editor.action.accessibleDiffViewer.prev";let hm=E_;function iR(r,e,t){return r.get(eo).listDiffEditors().find(s=>{var d,u;const a=s.getModifiedEditor(),l=s.getOriginalEditor();return a&&((d=a.getModel())==null?void 0:d.uri.toString())===t.toString()&&l&&((u=l.getModel())==null?void 0:u.uri.toString())===e.toString()})||null}function jp(r){const t=r.get(eo).listDiffEditors(),i=KA();if(i)for(const n of t){const s=n.getContainerDomNode();if(nR(s,i))return n}return null}function nR(r,e){let t=e;for(;t;){if(t===r)return!0;t=t.parentElement}return!1}fs(XM);fs(B3);fs(F3);da.appendMenuItem(Mi.EditorTitle,{command:{id:new F3().desc.id,title:B("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Xt.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Xt.has("isInDiffEditor")},order:11,group:"1_diff",when:Xt.and(ue.diffEditorRenderSideBySideInlineBreakpointReached,Xt.has("isInDiffEditor"))});da.appendMenuItem(Mi.EditorTitle,{command:{id:new B3().desc.id,title:B("showMoves","Show Moved Code Blocks"),icon:an.move,toggled:h7.create("config.diffEditor.experimental.showMoves",!0),precondition:Xt.has("isInDiffEditor")},order:10,group:"1_diff",when:Xt.has("isInDiffEditor")});fs(Sy);for(const r of[{icon:an.arrowRight,key:ue.diffEditorInlineMode.toNegated()},{icon:an.discard,key:ue.diffEditorInlineMode}])da.appendMenuItem(Mi.DiffEditorHunkToolbar,{command:{id:new Sy().desc.id,title:B("revertHunk","Revert Block"),icon:r.icon},when:Xt.and(ue.diffEditorModifiedWritable,r.key),order:5,group:"primary"}),da.appendMenuItem(Mi.DiffEditorSelectionToolbar,{command:{id:new Sy().desc.id,title:B("revertSelection","Revert Selection"),icon:r.icon},when:Xt.and(ue.diffEditorModifiedWritable,r.key),order:5,group:"primary"});fs(QM);fs(JM);fs(eR);fs(tR);da.appendMenuItem(Mi.EditorTitle,{command:{id:h0.id,title:B("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Xt.has("isInDiffEditor")},order:10,group:"2_diff",when:Xt.and(ue.accessibleDiffViewerVisible.negate(),Xt.has("isInDiffEditor"))});As.registerCommandAlias("editor.action.diffReview.next",h0.id);fs(h0);As.registerCommandAlias("editor.action.diffReview.prev",hm.id);fs(hm);var sR=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},oR=function(r,e){return function(t,i){e(t,i,r)}},ky;const H1=new Un("selectionAnchorSet",!1);var gu;let Cd=(gu=class{static get(e){return e.getContribution(ky.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=H1.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(on.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Ro().appendText(B("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ua(B("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(on.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},ky=gu,gu.ID="editor.contrib.selectionAnchorController",gu);Cd=ky=sR([oR(1,ts)],Cd);class rR extends vi{constructor(){super({id:"editor.action.setSelectionAnchor",label:B("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:ue.editorTextFocus,primary:no(2089,2080),weight:100}})}async run(e,t){var i;(i=Cd.get(t))==null||i.setSelectionAnchor()}}class aR extends vi{constructor(){super({id:"editor.action.goToSelectionAnchor",label:B("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:H1})}async run(e,t){var i;(i=Cd.get(t))==null||i.goToSelectionAnchor()}}class lR extends vi{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:B("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:H1,kbOpts:{kbExpr:ue.editorTextFocus,primary:no(2089,2089),weight:100}})}async run(e,t){var i;(i=Cd.get(t))==null||i.selectFromAnchorToCursor()}}class cR extends vi{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:B("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:H1,kbOpts:{kbExpr:ue.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=Cd.get(t))==null||i.cancelSelectionAnchor()}}Dn(Cd.ID,Cd,4);zt(rR);zt(aR);zt(lR);zt(cR);const dR=Hi("editorOverviewRuler.bracketMatchForeground","#A0A0A0",B("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class uR extends vi{constructor(){super({id:"editor.action.jumpToBracket",label:B("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:ue.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=lh.get(t))==null||i.jumpToBracket()}}class hR extends vi{constructor(){super({id:"editor.action.selectToBracket",label:B("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Vi("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var s;let n=!0;i&&i.selectBrackets===!1&&(n=!1),(s=lh.get(t))==null||s.selectToBracket(n)}}class fR extends vi{constructor(){super({id:"editor.action.removeBrackets",label:B("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:ue.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=lh.get(t))==null||i.removeBrackets(this.id)}}class pR{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}const Rc=class Rc extends Ai{static get(e){return e.getContribution(Rc.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new uo(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),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(72)&&(this._matchBrackets=this._editor.getOption(72),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;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let a=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?a=s[1].getStartPosition():s[1].containsPosition(n)&&(a=s[0].getStartPosition());else{const l=e.bracketPairs.findEnclosingBrackets(n);if(l)a=l[1].getStartPosition();else{const d=e.bracketPairs.findNextBracket(n);d&&d.range&&(a=d.range.getStartPosition())}}return a?new on(a.lineNumber,a.column,a.lineNumber,a.column):new on(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let a=t.bracketPairs.matchBracket(s);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(s),!a)){const u=t.bracketPairs.findNextBracket(s);u&&u.range&&(a=t.bracketPairs.matchBracket(u.range.getStartPosition()))}let l=null,d=null;if(a){a.sort(Ve.compareRangesUsingStarts);const[u,f]=a;if(l=e?u.getStartPosition():u.getEndPosition(),d=e?f.getEndPosition():f.getStartPosition(),f.containsPosition(s)){const x=l;l=d,d=x}}l&&d&&i.push(new on(l.lineNumber,l.column,d.lineNumber,d.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let a=0;for(let x=0,m=e.length;x<m;x++){const C=e[x];C.isEmpty()&&(s[a++]=C.getStartPosition())}s.length>1&&s.sort($i.compare);const l=[];let d=0,u=0;const f=n.length;for(let x=0,m=s.length;x<m;x++){const C=s[x];for(;u<f&&n[u].position.isBefore(C);)u++;if(u<f&&n[u].position.equals(C))l[d++]=n[u];else{let _=t.bracketPairs.matchBracket(C,20),E=Rc._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!_&&this._matchBrackets==="always"&&(_=t.bracketPairs.findEnclosingBrackets(C,20),E=Rc._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),l[d++]=new pR(C,_,E)}}this._lastBracketsData=l,this._lastVersionId=i}};Rc.ID="editor.contrib.bracketMatchingController",Rc._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=jn.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ro(dR),position:_l.Center}}),Rc._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=jn.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});let lh=Rc;Dn(lh.ID,lh,1);zt(hR);zt(uR);zt(fR);da.appendMenuItem(Mi.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:B({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class gR{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const a=new Ve(i,n-1,i,n),l=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new Ve(i,s,i,s),l)}else{const a=new Ve(i,s,i,s+1),l=e.getValueInRange(a);t.addEditOperation(a,null),t.addEditOperation(new Ve(i,n,i,n),l)}}computeCursorState(e,t){return this._isMovingLeft?new on(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new on(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class I3 extends vi{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new gR(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class vR extends I3{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:B("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:ue.writable})}}class xR extends I3{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:B("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:ue.writable})}}zt(vR);zt(xR);class mR extends vi{constructor(){super({id:"editor.action.transposeLetters",label:B("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:ue.writable,kbOpts:{kbExpr:ue.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const a of s){if(!a.isEmpty())continue;const l=a.startLineNumber,d=a.startColumn,u=i.getLineMaxColumn(l);if(l===1&&(d===1||d===2&&u===2))continue;const f=d===u?a.getPosition():Cb.rightPosition(i,a.getPosition().lineNumber,a.getPosition().column),x=Cb.leftPosition(i,f),m=Cb.leftPosition(i,x),C=i.getValueInRange(Ve.fromPositions(m,x)),_=i.getValueInRange(Ve.fromPositions(x,f)),E=Ve.fromPositions(m,f);n.push(new G0(E,_+C))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}zt(mR);const z1=(function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?r=crypto.getRandomValues.bind(crypto):r=function(i){for(let n=0;n<i.length;n++)i[n]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){r(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,s="";return s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s}})();function l9(r){return{asString:async()=>r,asFile:()=>{},value:typeof r=="string"?r:void 0}}function _R(r,e,t){const i={id:z1(),name:r,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class P3{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return Xl.some(this,([i,n])=>n.asFile())&&t.push("files"),M3(fm(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))==null?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.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(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return fm(e)}}function fm(r){return r.toLowerCase()}function T3(r,e){return M3(fm(r),e.map(fm))}function M3(r,e){if(r==="*/*")return e.length>0;if(e.includes(r))return!0;const t=r.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(a=>a.startsWith(n+"/")):!1}const W1=Object.freeze({create:r=>ZA(r.map(e=>e.toString())).join(`\r
|
|
14
14
|
`),split:r=>r.split(`\r
|
|
15
15
|
`),parse:r=>W1.split(r).filter(e=>!e.startsWith("#"))}),il=class il{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+il.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new il((this.value?[this.value,...e]:e).join(il.sep))}};il.sep=".",il.None=new il("@@none@@"),il.Empty=new il("");let Ls=il;const f8={EDITORS:"CodeEditors",FILES:"CodeFiles"};class bR{}const CR={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Oa.add(CR.DragAndDropContribution,new bR);const Zg=class Zg{constructor(){}static getInstance(){return Zg.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};Zg.INSTANCE=new Zg;let Dy=Zg;function R3(r){const e=new P3;for(const t of r.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,l9(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,yR(n))}}return e}function yR(r){const e=r.path?xs.parse(r.path):void 0;return _R(r.name,e,async()=>new Uint8Array(await r.arrayBuffer()))}const wR=Object.freeze([f8.EDITORS,f8.FILES,ZC.RESOURCES,ZC.INTERNAL_URI_LIST]);function N3(r,e=!1){const t=R3(r),i=t.get(ZC.INTERNAL_URI_LIST);if(i)t.replace(yo.uriList,i);else if(e||!t.has(yo.uriList)){const n=[];for(const s of r.items){const a=s.getAsFile();if(a){const l=a.path;try{l?n.push(xs.file(l).toString()):n.push(xs.parse(a.name,!0).toString())}catch{}}}n.length&&t.replace(yo.uriList,l9(W1.create(n)))}for(const n of wR)t.delete(n);return t}var c9=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},f0=function(r,e){return function(t,i){e(t,i,r)}};class d9{async provideDocumentPasteEdits(e,t,i,n,s){const a=await this.getEdit(i,s);if(a)return{edits:[{insertText:a.insertText,title:a.title,kind:a.kind,handledMimeType:a.handledMimeType,yieldTo:a.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,n){const s=await this.getEdit(i,n);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}}const Yg=class Yg extends d9{constructor(){super(...arguments),this.kind=Yg.kind,this.dropMimeTypes=[yo.text],this.pasteMimeTypes=[yo.text]}async getEdit(e,t){const i=e.get(yo.text);if(!i||e.has(yo.uriList))return;const n=await i.asString();return{handledMimeType:yo.text,title:B("text.label","Insert Plain Text"),insertText:n,kind:this.kind}}};Yg.id="text",Yg.kind=new Ls("text.plain");let ch=Yg;class O3 extends d9{constructor(){super(...arguments),this.kind=new Ls("uri.absolute"),this.dropMimeTypes=[yo.uriList],this.pasteMimeTypes=[yo.uriList]}async getEdit(e,t){const i=await H3(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map(({uri:l,originalText:d})=>l.scheme===Xo.file?l.fsPath:(n++,d)).join(" ");let a;return n>0?a=i.length>1?B("defaultDropProvider.uriList.uris","Insert Uris"):B("defaultDropProvider.uriList.uri","Insert Uri"):a=i.length>1?B("defaultDropProvider.uriList.paths","Insert Paths"):B("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:yo.uriList,insertText:s,title:a,kind:this.kind}}}let pm=class extends d9{constructor(e){super(),this._workspaceContextService=e,this.kind=new Ls("uri.relative"),this.dropMimeTypes=[yo.uriList],this.pasteMimeTypes=[yo.uriList]}async getEdit(e,t){const i=await H3(e);if(!i.length||t.isCancellationRequested)return;const n=sc(i.map(({uri:s})=>{const a=this._workspaceContextService.getWorkspaceFolder(s);return a?f7(a.uri,s):void 0}));if(n.length)return{handledMimeType:yo.uriList,insertText:n.join(" "),title:i.length>1?B("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):B("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}}};pm=c9([f0(0,np)],pm);class ER{constructor(){this.kind=new Ls("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:yo.text}]}async provideDocumentPasteEdits(e,t,i,n,s){var d;if(n.triggerKind!==YC.PasteAs&&!((d=n.only)!=null&&d.contains(this.kind)))return;const a=i.get("text/html"),l=await(a==null?void 0:a.asString());if(!(!l||s.isCancellationRequested))return{dispose(){},edits:[{insertText:l,yieldTo:this._yieldTo,title:B("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}}}async function H3(r){const e=r.get(yo.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const n of W1.parse(t))try{i.push({uri:xs.parse(n),originalText:n})}catch{}return i}let Ay=class extends Ai{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new ch)),this._register(e.documentDropEditProvider.register("*",new O3)),this._register(e.documentDropEditProvider.register("*",new pm(t)))}};Ay=c9([f0(0,qi),f0(1,np)],Ay);let By=class extends Ai{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new ch)),this._register(e.documentPasteEditProvider.register("*",new O3)),this._register(e.documentPasteEditProvider.register("*",new pm(t))),this._register(e.documentPasteEditProvider.register("*",new ER))}};By=c9([f0(0,qi),f0(1,np)],By);const Gr=class Gr{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};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=Gr._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(Gr.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(Gr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(Gr.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(Gr.isVariableCharacter(i)||Gr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof Gr._table[i]>"u"&&!Gr.isDigitCharacter(i)&&!Gr.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}};Gr._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};let Fy=Gr;class Vp{constructor(){this._children=[]}appendChild(e){return e instanceof cr&&this._children[this._children.length-1]instanceof cr?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,(function a(l,d){for(const u of l)u.parent=d,a(u.children,u)})(t,i)}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 pv)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}let cr=class z3 extends Vp{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new z3(this.value)}};class W3 extends Vp{}class jr extends W3{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 $p?this._children[0]:void 0}clone(){const e=new jr(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class $p extends Vp{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof cr&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new $p;return this.options.forEach(e.appendChild,e),e}}class u9 extends Vp{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof Ea&&!!s.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof Ea){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new u9;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}}class Ea extends Vp{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}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){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new Ea(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class p0 extends W3{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 cr(t)],!0):!1}clone(){const e=new p0(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function p8(r,e){const t=[...r];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class pv extends Vp{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof jr&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(n=>n===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return p8([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof jr&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof p0&&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(){const e=new pv;return this._children=this.children.map(t=>t.clone()),e}walk(e){p8(this.children,e)}}class dh{constructor(){this._scanner=new Fy,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,i){const n=new pv;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(d=>(d instanceof jr&&(d.isFinalTabstop?n.set(0,void 0):!n.has(d.index)&&d.children.length>0?n.set(d.index,d.children):s.push(d)),!0));const a=(d,u)=>{const f=n.get(d.index);if(!f)return;const x=new jr(d.index);x.transform=d.transform;for(const m of f){const C=m.clone();x.appendChild(C),C instanceof jr&&n.has(C.index)&&!u.has(C.index)&&(u.add(C.index),a(C,u),u.delete(C.index))}t.replace(d,[x])},l=new Set;for(const d of s)a(d,l);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new jr(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_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 cr(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new jr(Number(t)):new p0(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new jr(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new cr("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const a=new $p;for(;;){if(this._parseChoiceElement(a)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(a),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new cr(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new p0(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new cr("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new u9;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new cr(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new Ea(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Ea(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Ea(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new Ea(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new Ea(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const a=this._until(4);if(a)return e.appendChild(new Ea(Number(n),void 0,s,a)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new Ea(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new cr(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function j3(r,e,t){var i,n;return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:((i=t.additionalEdit)==null?void 0:i.edits)??[]}:{edits:[...e.map(s=>new p7(r,{range:s,text:typeof t.insertText=="string"?dh.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...((n=t.additionalEdit)==null?void 0:n.edits)??[]]}}function V3(r){function e(a,l){return"mimeType"in a?a.mimeType===l.handledMimeType:!!l.kind&&a.kind.contains(l.kind)}const t=new Map;for(const a of r)for(const l of a.yieldTo??[])for(const d of r)if(d!==a&&e(l,d)){let u=t.get(a);u||(u=[],t.set(a,u)),u.push(d)}if(!t.size)return Array.from(r);const i=new Set,n=[];function s(a){if(!a.length)return[];const l=a[0];if(n.includes(l))return console.warn("Yield to cycle detected",l),a;if(i.has(l))return s(a.slice(1));let d=[];const u=t.get(l);return u&&(n.push(l),d=s(u),n.pop()),i.add(l),[...d,l,...s(a.slice(1))]}return s(Array.from(r))}var SR=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},kR=function(r,e){return function(t,i){e(t,i,r)}};const DR=jn.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:YA,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),S_=class S_ extends Ai{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Oi(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=Oi("span.icon");this.domNode.append(t),t.classList.add(...rs.asClassNameArray(an.loading),"codicon-modifier-spin");const i=()=>{const n=this.editor.getOption(67);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};i(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(52)||n.hasChanged(67))&&i()})),this._register(es(this.domNode,Hs.CLICK,n=>{this.delegate.cancel()}))}getId(){return S_.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)}};S_.baseId="editor.widget.inlineProgressWidget";let Ly=S_,gm=class extends Ai{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new Fr),this._currentWidget=this._register(new Fr),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,n,s){const a=this._operationIdPool++;this._currentOperation=a,this.clear(),this._showPromise.value=Jg(()=>{const l=Ve.fromPositions(e);this._currentDecorations.set([{range:l,options:DR}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(Ly,this.id,this._editor,l,t,n))},s??this._showDelay);try{return await i}finally{this._currentOperation===a&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};gm=SR([kR(2,bn)],gm);var AR=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},g8=function(r,e){return function(t,i){e(t,i,r)}},Fx,ed;let ur=(ed=class{static get(e){return e.getContribution(Fx.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new Fr,this._messageListeners=new Di,this._mouseOverMessage=!1,this._editor=e,this._visible=Fx.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)==null||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){ua(_x(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=_x(e)?g7(e,{actionHandler:{callback:n=>{this.closeMessage(),v7(this._openerService,n,_x(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new v8(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(co.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&x7(KA(),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(es(this._messageWidget.value.getDomNode(),Hs.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(es(this._messageWidget.value.getDomNode(),Hs.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new Ve(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(v8.fadeOut(this._messageWidget.value))}},Fx=ed,ed.ID="editor.contrib.messageController",ed.MESSAGE_VISIBLE=new Un("messageVisible",!1,B("messageVisible","Whether the editor is currently showing an inline message")),ed);ur=Fx=AR([g8(1,ts),g8(2,Ha)],ur);const BR=sr.bindToContribution(ur.get);Gi(new BR({id:"leaveEditorMessage",precondition:ur.MESSAGE_VISIBLE,handler:r=>r.closeMessage(),kbOpts:{weight:130,primary:9}}));let v8=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const a=document.createElement("div");typeof n=="string"?(a.classList.add("message"),a.textContent=n):(n.classList.add("message"),a.appendChild(n)),this._domNode.appendChild(a);const l=document.createElement("div");l.classList.add("anchor","below"),this._domNode.appendChild(l),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)}};Dn(ur.ID,ur,4);function Nb(r,e){return e&&(r.stack||r.stacktrace)?B("stackTrace.format","{0}: {1}",m8(r),x8(r.stack)||x8(r.stacktrace)):m8(r)}function x8(r){return Array.isArray(r)?r.join(`
|
|
16
16
|
`):r}function m8(r){return r.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${r.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof r.code=="string"&&typeof r.errno=="number"&&typeof r.syscall=="string"?B("nodeExceptionMessage","A system error occurred ({0})",r.message):r.message||B("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function vm(r=null,e=!1){if(!r)return B("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(r)){const t=sc(r),i=vm(t[0],e);return t.length>1?B("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(XA(r))return r;if(r.detail){const t=r.detail;if(t.error)return Nb(t.error,e);if(t.exception)return Nb(t.exception,e)}return r.stack?Nb(r,e):r.message?r.message:B("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var $3=function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(s=(n<3?a(s):n>3?a(e,t,s):a(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tf=function(r,e){return function(t,i){e(t,i,r)}},Iy,vu;let Py=(vu=class extends Ai{constructor(e,t,i,n,s,a,l,d,u,f){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=a,this.onSelectNewEdit=l,this._contextMenuService=d,this._keybindingService=f,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(u),this.visibleContext.set(!0),this._register(Fs(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Fs((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(x=>{s.containsPosition(x.position)||this.dispose()})),this._register(co.runAndSubscribe(f.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var t;const e=(t=this._keybindingService.lookupKeybinding(this.showCommand.id))==null?void 0:t.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=Oi(".post-edit-widget"),this.button=this._register(new m7(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(es(this.domNode,Hs.CLICK,()=>this.showSelector()))}getId(){return Iy.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=er(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>_7({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}},Iy=vu,vu.baseId="editor.widget.postEditWidget",vu);Py=Iy=$3([Tf(7,Mp),Tf(8,ts),Tf(9,so)],Py);let xm=class extends Ai{constructor(e,t,i,n,s,a,l){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=a,this._notificationService=l,this._currentWidget=this._register(new Fr),this._register(co.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,n,s){const a=this._editor.getModel();if(!a||!e.length)return;const l=t.allEdits.at(t.activeEditIndex);if(!l)return;const d=async S=>{const I=this._editor.getModel();I&&(await I.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:S,allEdits:t.allEdits},i,n,s))},u=(S,I)=>{kd(S)||(this._notificationService.error(I),i&&this.show(e[0],t,d))};let f;try{f=await n(l,s)}catch(S){return u(S,B("resolveError",`Error resolving edit '{0}':
|
|
@@ -274,4 +274,4 @@ ${Ee.length===1?"There is an instance":"There are "+Ee.length+" instances"} of i
|
|
|
274
274
|
`)]),y(ht,se)};T(ie,ht=>{"error"in o(W)&&o(W).error&&!("ok"in o(W))?ht(me):"ok"in o(W)&&o(W).ok?ht(Ke,1):"ok"in o(W)&&ht(Xe,2)})}P(()=>ct=jt(ze,1,"deploy-box in-card svelte-ns6riw",null,ct,{"deploy-ok":"ok"in o(W)&&o(W).ok})),y(Ne,ze)};T(ae,Ne=>{o(K)[z()]&&Ne(ce)})}y(w,Q)};let s=A(!0),a=A(wi([])),l=A(""),d=A(wi([])),u=A(!0),f=A(!1),x=A(""),m=A(""),C=A(""),_=A(void 0),E=A("list"),S=A(null),I=A(null),M=A(wi({})),O=A(null),R=ft(()=>o(d).filter(w=>w.ok&&w.helperOutdated).length);wn(()=>{var w;(w=e.onupdates)==null||w.call(e,o(R))});let H=A(null),K=A(wi({}));async function G(w){var z;p(H,w,!0);try{const Q=await _F(w);p(K,{...o(K),[w]:Q},!0),Q.ok&&(p(d,(await Gl(!0)).hosts,!0),(z=e.onchanged)==null||z.call(e))}catch(Q){p(K,{...o(K),[w]:{error:Q.message??String(Q)}},!0)}finally{p(H,null)}}let oe=A(null),ve=A(""),Me=A(!1),be=A(!1),Se=A(wi({host:"",port:"",user:"",identityFile:"",hostname:""})),Ie=A(null),te=A(!1),Ee=A(wi(location.origin)),ne=A(null),De=A(null),_e=A(""),dt=A(!1),ot=A(""),nt=A(!1),it=null;const Lt=ft(()=>JSON.stringify({local:o(s),remotes:o(a)})!==o(l)),re=w=>o(d).find(z=>z.name===w)??null,de=ft(()=>o(d).find(w=>w.local)??null);function Ce(w){const z=w.services,Q=Array.isArray(z==null?void 0:z.hosts)?z.hosts:null;p(s,Q?Q.some(ae=>ae&&!ae.ssh):!0,!0),p(a,(Q??[]).filter(ae=>ae&&ae.ssh).map(ae=>({host:String(ae.ssh.host??""),port:typeof ae.ssh.port=="number"?ae.ssh.port:"",user:String(ae.ssh.user??""),identityFile:String(ae.ssh.identityFile??""),hostname:String(ae.hostname??"")})),!0),p(l,JSON.stringify({local:o(s),remotes:o(a)}),!0)}async function Ze(w=!1){p(u,!0),p(x,"");try{const[z,Q]=await Promise.all([ca(),Gl(w).catch(()=>({hosts:[]}))]);Ce(z),p(d,Q.hosts,!0)}catch(z){p(x,z.message??String(z),!0)}finally{p(u,!1)}Ge()}async function Ge(){try{const w=await MK();p(oe,w.publicKey,!0),p(ve,w.identityFile,!0)}catch{}try{p(C,(await Wc()).user??"",!0)}catch{}}zs(()=>Ze()),kh(()=>Be());function pt(w){p(m,w,!0),setTimeout(()=>{o(m)===w&&p(m,"")},3e3)}async function At(){var w;p(f,!0),p(x,"");try{const z=await ca(),Q={...z.services??{}},ae=[];o(s)&&ae.push({name:"local"});for(const ce of o(a)){if(!ce.host.trim())continue;const Ne={host:ce.host.trim()};ce.port!==""&&Number(ce.port)>0&&(Ne.port=Number(ce.port)),ce.user.trim()&&(Ne.user=ce.user.trim()),ce.identityFile.trim()&&(Ne.identityFile=ce.identityFile.trim()),ae.push({...ce.hostname.trim()?{hostname:ce.hostname.trim()}:{},ssh:Ne})}Q.hosts=ae,z.services=Q,await Pp(z),window.dispatchEvent(new CustomEvent("she:config-changed")),p(l,JSON.stringify({local:o(s),remotes:o(a)}),!0),p(S,null),pt("saved"),(w=e.onchanged)==null||w.call(e),p(d,(await Gl(!0)).hosts,!0)}catch(z){p(x,z.message??String(z),!0)}finally{p(f,!1)}}function Dt(){const w=JSON.parse(o(l));p(s,w.local,!0),p(a,w.remotes,!0),p(S,null)}async function pe(w){const z=w.host;p(O,z,!0);try{const Q=await hD({host:w.host.trim(),port:w.port,user:w.user.trim(),identityFile:w.identityFile.trim()});p(M,{...o(M),[z]:Q.ok?{ok:!0,msg:`helper v${Q.helper??"?"}`}:{ok:!1,msg:`${Q.code}: ${Q.error}`}},!0)}catch(Q){p(M,{...o(M),[z]:{ok:!1,msg:Q.message??String(Q)}},!0)}finally{p(O,null)}}async function Re(){p(O,"local");try{const w=await NK("local");p(M,{...o(M),local:w.ok?{ok:!0,msg:`helper v${w.helper??"?"}`}:{ok:!1,msg:`${w.code}: ${w.error}`}},!0)}catch(w){p(M,{...o(M),local:{ok:!1,msg:w.message??String(w)}},!0)}finally{p(O,null)}}async function Bt(w){var Q;const z=o(a)[w];await((Q=o(_))==null?void 0:Q.show(`Remove ${z.hostname||z.host} from the list? she stops managing it; nothing on the host is changed (use "Remove from host…" for that).`,{confirm:"Remove",danger:!0}))&&(p(a,o(a).filter((ae,ce)=>ce!==w),!0),o(S)===w&&p(S,null))}function J(){p(Se,{host:"",port:"",user:"",identityFile:"",hostname:""},!0),p(Ie,null),p(ot,""),p(E,"add")}async function qe(){if(!o(Se).host.trim()){p(Ie,{ok:!1,msg:"enter a host first"},!0);return}p(te,!0);try{const w=await hD({host:o(Se).host.trim(),port:o(Se).port,user:o(Se).user.trim(),identityFile:o(Se).identityFile.trim()});p(Ie,w.ok?{ok:!0,msg:`helper v${w.helper??"?"}`}:{ok:!1,msg:`${w.code}: ${w.error}`},!0)}catch(w){p(Ie,{ok:!1,msg:w.message??String(w)},!0)}finally{p(te,!1)}}function Pe(){o(Se).host.trim()&&(p(a,[...o(a),{...o(Se),host:o(Se).host.trim(),user:o(Se).user.trim(),identityFile:o(Se).identityFile.trim(),hostname:o(Se).hostname.trim()}],!0),p(E,"list"),pt("host added — Save to keep it"))}function Be(){it&&(clearInterval(it),it=null)}async function we(){p(dt,!0),p(ot,""),p(ne,null),p(De,null),p(_e,""),p(nt,!1),Be();try{p(ne,await OK(o(Ee).trim().replace(/\/+$/,"")),!0),p(De,"pending"),Ge(),it=setInterval(async()=>{var w;if(!o(ne))return Be();try{const z=await HK(o(ne).token);p(De,z.status,!0),z.status==="done"?(p(_e,z.host??"",!0),Be(),Ce(await ca()),p(d,(await Gl(!0)).hosts,!0),(w=e.onchanged)==null||w.call(e)):z.status==="expired"&&Be()}catch{}},3e3)}catch(w){p(ot,w.message??String(w),!0)}finally{p(dt,!1)}}async function Ue(w,z){try{await navigator.clipboard.writeText(w),z(!0),setTimeout(()=>z(!1),2e3)}catch{}}async function $e(){var w;if(!(o(oe)&&!await((w=o(_))==null?void 0:w.show("Regenerate the services SSH key? Every remote host then needs the new public key (re-run the setup command, or replace it in authorized_keys).",{confirm:"Regenerate",danger:!0})))){p(Me,!0);try{const z=await RK();p(oe,z.publicKey,!0),p(ve,z.identityFile,!0),pt("key generated")}catch(z){p(x,z.message??String(z),!0)}finally{p(Me,!1)}}}var Pt=Oce(),Mt=mt(Pt);ds(Ir(Mt,{}),w=>p(_,w,!0),()=>o(_));var Gt=h(Mt,2),ni=g(Gt);{var $t=w=>{var z=yce(),Q=mt(z),ae=g(Q),ce=h(Q,2),Ne=g(ce),W=h(g(Ne),4),ze=h(g(W),2),ct=h(ze,2),ie=g(ct),me=h(W,2);{var Ke=ai=>{var We=xce(),bt=g(We);P(()=>F(bt,o(ot))),y(ai,We)};T(me,ai=>{o(ot)&&ai(Ke)})}var Xe=h(me,2);{var ht=ai=>{var We=Cce(),bt=mt(We),Kt=g(bt),Tt=g(Kt),rt=h(Kt),yt=g(rt),ui=h(bt,2),li=g(ui),mi=h(li),si=g(mi),at=h(mi,2),je=g(at),Ye=h(ui,2),Je=g(Ye);{var Z=ee=>{var ge=mce();y(ee,ge)},Ae=ee=>{var ge=_ce();y(ee,ge)},gt=ee=>{var ge=bce(),et=mt(ge),tt=g(et),st=h(tt),vt=g(st),Ut=h(et,2);P(()=>{F(tt,`✓ ${o(_e)??""} registered as `),F(vt,o(ne).user)}),j("click",Ut,()=>p(E,"list")),y(ee,ge)},q=ee=>{var ge=En("command expired — create a new one.");y(ee,ge)};T(Je,ee=>{o(De)==="pending"?ee(Z):o(De)==="fetched"?ee(Ae,1):o(De)==="done"?ee(gt,2):o(De)==="expired"&&ee(q,3)})}P(ee=>{F(Tt,o(ne).command),F(yt,o(nt)?"Copied":"Copy"),F(li,`Valid until ${ee??""}, single use. To read it first: `),F(si,`curl -fsSL '${o(ne).scriptUrl??""}' -o she-setup.sh`),F(je,o(ne).sha256)},[()=>new Date(o(ne).expires).toLocaleTimeString()]),j("click",rt,()=>Ue(o(ne).command,ee=>p(nt,ee,!0))),y(ai,We)};T(Xe,ai=>{o(ne)&&ai(ht)})}var se=h(Ne,2),Le=h(g(se),4),$=g(Le),V=h(g($)),Y=h($,2),le=h(g(Y)),Oe=h(Y,2),fe=h(g(Oe)),U=h(Oe,2),xe=h(g(U)),Te=h(Le,2),St=g(Te),He=g(St),Qe=h(St,2);{var di=ai=>{var We=HA();let bt;var Kt=g(We);P(()=>{bt=jt(We,1,"test-mark svelte-ns6riw",null,bt,{ok:o(Ie).ok,err:!o(Ie).ok}),F(Kt,o(Ie).ok?`✓ ${o(Ie).msg}`:`✗ ${o(Ie).msg}`)}),y(ai,We)};T(Qe,ai=>{o(Ie)&&ai(di)})}var Si=h(Qe,4);P(ai=>{ct.disabled=o(dt),F(ie,o(dt)?"Preparing…":"Create setup command"),_i(fe,"placeholder",o(C)?`${o(C)} (default)`:"user she runs as"),St.disabled=o(te),F(He,o(te)?"Testing…":"Test connection"),Si.disabled=ai},[()=>!o(Se).host.trim()]),j("click",ae,()=>p(E,"list")),ii(ze,()=>o(Ee),ai=>p(Ee,ai)),j("click",ct,we),ii(V,()=>o(Se).host,ai=>o(Se).host=ai),ii(le,()=>o(Se).port,ai=>o(Se).port=ai),ii(fe,()=>o(Se).user,ai=>o(Se).user=ai),ii(xe,()=>o(Se).identityFile,ai=>o(Se).identityFile=ai),j("click",St,qe),j("click",Si,Pe),y(w,z)},Jt=w=>{var z=Nce(),Q=mt(z),ae=g(Q),ce=g(ae);let Ne;var W=h(ae,2),ze=h(W,2),ct=g(ze),ie=h(ze,4);{var me=Z=>{var Ae=wce(),gt=g(Ae);P(()=>F(gt,o(m))),y(Z,Ae)};T(ie,Z=>{o(m)&&Z(me)})}var Ke=h(ie,2);{var Xe=Z=>{var Ae=Ece(),gt=h(mt(Ae),2),q=h(gt,2),ee=g(q);P(()=>{gt.disabled=o(f),q.disabled=o(f),F(ee,o(f)?"Saving…":"Save")}),j("click",gt,Dt),j("click",q,At),y(Z,Ae)};T(Ke,Z=>{o(Lt)&&Z(Xe)})}var ht=h(Q,2);{var se=Z=>{var Ae=Sce(),gt=g(Ae);P(()=>F(gt,o(x))),y(Z,Ae)};T(ht,Z=>{o(x)&&Z(se)})}var Le=h(ht,2),$=g(Le);let V;var Y=g($),le=g(Y);let Oe;var fe=h(le,2),U=g(fe),xe=h(fe,6);{var Te=Z=>{i(Z,()=>"local",()=>o(de))};T(xe,Z=>{var Ae;o(s)&&((Ae=o(de))!=null&&Ae.ok)&&Z(Te)})}var St=h(xe,2);{var He=Z=>{var Ae=kce(),gt=mt(Ae),q=h(gt);t(q,()=>"local"),P(()=>gt.disabled=o(O)!==null),j("click",gt,Re),y(Z,Ae)};T(St,Z=>{o(s)&&Z(He)})}var Qe=h(St,2),di=g(Qe),Si=h(Y,2);{var ai=Z=>{n(Z,()=>"local")};T(Si,Z=>{o(s)&&Z(ai)})}var We=h(Si,2);{var bt=Z=>{var Ae=Ace(),gt=g(Ae),q=h(gt);{var ee=ge=>{var et=Dce();y(ge,et)};T(q,ge=>{o(de).code==="HELPER_MISSING"&&ge(ee)})}P(()=>F(gt,o(de).error)),y(Z,Ae)};T(We,Z=>{o(s)&&o(de)&&!o(de).ok&&Z(bt)})}var Kt=h($,2);ci(Kt,17,()=>o(a),zi,(Z,Ae,gt)=>{const q=ft(()=>re(o(Ae).host));var ee=Pce(),ge=g(ee),et=g(ge);let tt;var st=h(et,2),vt=g(st),Ut=h(st,2),qt=g(Ut),Rt=h(Ut,2);{var Vt=xt=>{var Et=Bce();P(()=>_i(Et,"title",o(Ae).identityFile)),y(xt,Et)};T(Rt,xt=>{o(Ae).identityFile&&xt(Vt)})}var Nt=h(Rt,4);{var _t=xt=>{i(xt,()=>o(Ae).host,()=>o(q))};T(Nt,xt=>{var Et;(Et=o(q))!=null&&Et.ok&&xt(_t)})}var pi=h(Nt,2),ke=h(pi);t(ke,()=>o(Ae).host);var ye=h(ke,2);let ut;var Ot=h(ye,2);let wt;var Ft=h(Ot,2),ti=h(ge,2);n(ti,()=>o(Ae).host);var Zt=h(ti,2);{var Wt=xt=>{var Et=Fce(),Yt=g(Et);P(()=>F(Yt,o(q).error)),y(xt,Et)};T(Zt,xt=>{o(q)&&!o(q).ok&&xt(Wt)})}var gi=h(Zt,2);{var bi=xt=>{var Et=Lce(),Yt=g(Et),kt=h(g(Yt)),Qt=h(Yt,2),xi=h(g(Qt)),Pi=h(Qt,2),yi=h(g(Pi)),Fi=h(Pi,2),Ui=h(g(Fi)),ln=h(Fi,2),Ni=h(g(ln));P(()=>_i(yi,"placeholder",o(C)?`${o(C)} (default)`:"user she runs as")),ii(kt,()=>o(Ae).host,Ti=>o(Ae).host=Ti),ii(xi,()=>o(Ae).port,Ti=>o(Ae).port=Ti),ii(yi,()=>o(Ae).user,Ti=>o(Ae).user=Ti),ii(Ui,()=>o(Ae).identityFile,Ti=>o(Ae).identityFile=Ti),ii(Ni,()=>o(Ae).hostname,Ti=>o(Ae).hostname=Ti),y(xt,Et)};T(gi,xt=>{o(S)===gt&&xt(bi)})}var hi=h(gi,2);{var Ci=xt=>{var Et=Ice(),Yt=g(Et);{let kt=ft(()=>o(Ae).hostname||o(Ae).host);dce(Yt,{get host(){return o(Ae).host},get label(){return o(kt)},onclose:()=>p(I,null),ondone:()=>{var Qt;p(I,null),Ze(!0),(Qt=e.onchanged)==null||Qt.call(e)}})}y(xt,Et)};T(hi,xt=>{o(I)===gt&&xt(Ci)})}P(xt=>{var Et,Yt;tt=jt(et,1,"dot svelte-ns6riw",null,tt,{ok:(Et=o(q))==null?void 0:Et.ok,err:o(q)&&!o(q).ok}),F(vt,o(Ae).hostname||((Yt=o(q))==null?void 0:Yt.hostname)||o(Ae).host),F(qt,`${(o(Ae).user||o(C)||"?")??""}@${o(Ae).host??""}${o(Ae).port?`:${o(Ae).port}`:""}`),pi.disabled=xt,ut=jt(ye,1,"ghost sm svelte-ns6riw",null,ut,{active:o(S)===gt}),wt=jt(Ot,1,"ghost sm svelte-ns6riw",null,wt,{active:o(I)===gt})},[()=>o(O)!==null||!o(Ae).host.trim()]),j("click",pi,()=>pe(o(Ae))),j("click",ye,()=>p(S,o(S)===gt?null:gt,!0)),j("click",Ot,()=>p(I,o(I)===gt?null:gt,!0)),j("click",Ft,()=>Bt(gt)),y(Z,ee)});var Tt=h(Kt,2);{var rt=Z=>{var Ae=Tce();y(Z,Ae)};T(Tt,Z=>{o(a).length===0&&!o(u)&&Z(rt)})}var yt=h(Tt,2),ui=g(yt),li=h(g(ui),6);{var mi=Z=>{var Ae=Mce(),gt=g(Ae);P(()=>F(gt,o(be)?"Copied":"Copy public key")),j("click",Ae,()=>Ue(o(oe),q=>p(be,q,!0))),y(Z,Ae)};T(li,Z=>{o(oe)&&Z(mi)})}var si=h(li,2),at=g(si),je=h(ui,2);{var Ye=Z=>{var Ae=Rce(),gt=mt(Ae),q=g(gt),ee=h(gt,2),ge=g(ee);P(()=>{F(q,o(oe)),F(ge,o(ve))}),y(Z,Ae)},Je=Z=>{var Ae=zA(),gt=g(Ae);P(()=>F(gt,`No services key yet (${(o(ve)||"data-dir/ssh/services_id_ed25519")??""}) — the setup command creates it.`)),y(Z,Ae)};T(je,Z=>{o(oe)?Z(Ye):Z(Je,-1)})}P(()=>{var Z,Ae;ae.disabled=o(u),Ne=jt(ce,1,"svelte-ns6riw",null,Ne,{spinning:o(u)}),F(ct,`${o(a).length+(o(s)?1:0)} host${o(a).length+(o(s)?1:0)===1?"":"s"}`),V=jt($,1,"card svelte-ns6riw",null,V,{off:!o(s)}),Oe=jt(le,1,"dot svelte-ns6riw",null,Oe,{ok:(Z=o(de))==null?void 0:Z.ok,err:o(s)&&o(de)&&!o(de).ok}),F(U,((Ae=o(de))==null?void 0:Ae.hostname)??"this host"),si.disabled=o(Me),F(at,o(Me)?"Generating…":o(oe)?"Regenerate":"Generate key")}),j("click",ae,()=>Ze(!0)),j("click",W,J),vs(di,()=>o(s),Z=>p(s,Z)),j("click",si,$e),y(w,z)};T(ni,w=>{o(E)==="add"?w($t):w(Jt,-1)})}y(r,Pt),gs()}ys(["click"]);var WA=k('<span class="tab-dot svelte-ymmv06"></span>'),zce=k('<div class="services-page svelte-ymmv06"><div class="sub-nav svelte-ymmv06"><button>Instances</button> <button>Installations <!></button> <button>Hosts <!></button></div> <div><!></div> <div><!></div> <div><!></div></div>');function Wce(r,e){ps(e,!0);const t="she-services-tab",i=localStorage.getItem(t);let n=A(wi(i==="hosts"||i==="catalog"?"hosts":i==="hostsconf"?"hostsconf":"instances"));wn(()=>{localStorage.setItem(t,o(n))});let s=A(0),a=A(0),l=A(0),d=A("none"),u=A(""),f=ft(()=>[o(a)>0?`${o(a)} adapter update${o(a)===1?"":"s"} available`:"",o(l)>0?`${o(l)} host${o(l)===1?"":"s"} with an outdated helper`:""].filter(Boolean).join(" · "));wn(()=>{var ne,De;o(f)?(ne=e.onstatus)==null||ne.call(e,"warn",o(f)):(De=e.onstatus)==null||De.call(e,o(d),o(u))});var x=zce(),m=g(x),C=g(m);let _;var E=h(C,2);let S;var I=h(g(E));{var M=ne=>{var De=WA();P(()=>_i(De,"title",`${o(a)??""} adapter update${o(a)===1?"":"s"} available`)),y(ne,De)};T(I,ne=>{o(a)>0&&ne(M)})}var O=h(E,2);let R;var H=h(g(O));{var K=ne=>{var De=WA();P(()=>_i(De,"title",`${o(l)??""} host${o(l)===1?"":"s"} running an outdated she-servicectl`)),y(ne,De)};T(H,ne=>{o(l)>0&&ne(K)})}var G=h(m,2);let oe;var ve=g(G);bae(ve,{onstatus:(ne,De)=>{p(d,ne,!0),p(u,De,!0)},get generation(){return o(s)}});var Me=h(G,2);let be;var Se=g(Me);oce(Se,{onchanged:()=>dm(s),onupdates:ne=>p(a,ne,!0)});var Ie=h(Me,2);let te;var Ee=g(Ie);Hce(Ee,{onchanged:()=>dm(s),onupdates:ne=>p(l,ne,!0)}),P(()=>{_=jt(C,1,"svelte-ymmv06",null,_,{active:o(n)==="instances"}),S=jt(E,1,"svelte-ymmv06",null,S,{active:o(n)==="hosts"}),R=jt(O,1,"svelte-ymmv06",null,R,{active:o(n)==="hostsconf"}),oe=jt(G,1,"tab-wrap svelte-ymmv06",null,oe,{hidden:o(n)!=="instances"}),be=jt(Me,1,"tab-wrap svelte-ymmv06",null,be,{hidden:o(n)!=="hosts"}),te=jt(Ie,1,"tab-wrap svelte-ymmv06",null,te,{hidden:o(n)!=="hostsconf"})}),j("click",C,()=>p(n,"instances")),j("click",E,()=>p(n,"hosts")),j("click",O,()=>p(n,"hostsconf")),y(r,x),gs()}ys(["click"]);const KC=(r,e=gl)=>{var t=$ce(),i=h(g(t));{var n=a=>{var l=jce();y(a,l)},s=a=>{var l=Vce();y(a,l)};T(i,a=>{e()?a(n):a(s,-1)})}y(r,t)};var jce=Ad('<path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2"></path>'),Vce=Ad('<path d="M5.5 7V5a2.5 2.5 0 0 1 5 0"></path>'),$ce=Ad('<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="7" width="10" height="7" rx="1.5"></rect><!></svg>'),qce=k('<span class="ok svelte-1az45ix"> </span>'),Uce=k('<span class="muted svelte-1az45ix"> </span>'),Gce=k('<div class="err-box svelte-1az45ix"> <button class="ghost sm svelte-1az45ix">×</button></div>'),Kce=k(`<div class="err-box svelte-1az45ix"><b>Secrets store locked:</b> <code class="svelte-1az45ix">SHE_SECRETS_KEY</code> in the daemon's environment or restore <code class="svelte-1az45ix"> </code>, then restart she. Starting over means deleting <code class="svelte-1az45ix"> </code>.</div>`),Zce=k('<button><span class="name svelte-1az45ix"> </span> <span class="count svelte-1az45ix"> </span></button>'),Yce=k('<div class="muted empty svelte-1az45ix">No secrets yet.</div>'),Xce=k("<!> <!>",1),Qce=k('<button type="button" class="lock is-secret svelte-1az45ix" disabled="" title="secret — write-only, never shown again"><!></button> <input placeholder="•••••• (type to replace)" autocomplete="off" spellcheck="false" class="svelte-1az45ix"/>',1),Jce=k('<textarea spellcheck="false" class="svelte-1az45ix"></textarea>'),ede=k('<input type="text" autocomplete="off" spellcheck="false" class="svelte-1az45ix"/>'),tde=k('<button type="button" class="lock svelte-1az45ix" title="plain — shown in clear; click to mark it secret (never shown again)"><!></button> <!>',1),ide=k('<tr><td class="mono svelte-1az45ix"> </td><td class="svelte-1az45ix"><form class="val svelte-1az45ix"><!> <button type="submit" class="sm svelte-1az45ix">Save</button></form></td><td class="muted svelte-1az45ix"> </td><td class="c-act svelte-1az45ix"><button class="ghost sm svelte-1az45ix" title="Delete">×</button></td></tr>'),nde=k('<textarea placeholder="value" spellcheck="false" class="svelte-1az45ix"></textarea>'),sde=k('<input type="password" placeholder="value" autocomplete="off" class="svelte-1az45ix"/>'),ode=k('<div class="fields-head svelte-1az45ix"><span class="title svelte-1az45ix"> </span> <span class="muted svelte-1az45ix"> </span> <span class="spacer svelte-1az45ix"></span> <label class="reveal check-label svelte-1az45ix"><input type="checkbox" class="svelte-1az45ix"/><span class="checkmark svelte-1az45ix"></span> show while typing</label> <button class="ghost sm danger svelte-1az45ix">Delete group</button></div> <table class="svelte-1az45ix"><colgroup><col class="c-name svelte-1az45ix"/><col class="c-value"/><col class="c-changed svelte-1az45ix"/><col class="c-act svelte-1az45ix"/></colgroup><thead><tr><th class="svelte-1az45ix">field</th><th class="svelte-1az45ix">value</th><th class="svelte-1az45ix">changed</th><th class="svelte-1az45ix"></th></tr></thead><tbody><!><tr class="new svelte-1az45ix"><td class="svelte-1az45ix"><input type="text" placeholder="new field" spellcheck="false" class="svelte-1az45ix"/></td><td class="svelte-1az45ix"><form class="val svelte-1az45ix"><button type="button"><!></button> <!> <button type="submit" class="sm svelte-1az45ix">Add</button></form></td><td class="muted svelte-1az45ix" colspan="2">the lock decides the kind: secret fields are write-only forever, plain fields (user names, hosts) stay readable here. Multi-line values: tick <i>show while typing</i> and paste.</td></tr></tbody></table> <div class="hint svelte-1az45ix"><code class="svelte-1az45ix"> </code> returns the string, <code class="svelte-1az45ix"> </code> the whole group as a frozen object, <code class="svelte-1az45ix">she.secrets.has(…)</code> checks without a warning. Scripts that read a secret at load time keep the old value until they are reloaded.</div>',1),rde=k('Create a group on the left, then add fields to it — e.g. group <code class="svelte-1az45ix">smtp</code> with <code class="svelte-1az45ix">host</code>, <code class="svelte-1az45ix">user</code>, <code class="svelte-1az45ix">password</code>.',1),ade=k('<div class="muted empty svelte-1az45ix"><!></div>'),lde=k(`<!> <div class="sec-shell svelte-1az45ix"><div class="bar svelte-1az45ix"><span class="muted svelte-1az45ix">Values are stored encrypted and never sent back to the browser — scripts read them with <code class="svelte-1az45ix">she.secrets.get('group/field')</code>.</span> <span class="spacer svelte-1az45ix"></span> <!> <!> <button class="ghost svelte-1az45ix" title="Reload">↺</button></div> <!> <!> <div class="body svelte-1az45ix"><div class="groups svelte-1az45ix"><div class="groups-head svelte-1az45ix">Groups</div> <!> <form class="add-group svelte-1az45ix"><input type="text" placeholder="new group" spellcheck="false" class="svelte-1az45ix"/> <button type="submit" class="ghost sm svelte-1az45ix">+</button></form></div> <div class="fields svelte-1az45ix"><!></div></div></div>`,1);function cde(r,e){ps(e,!0);let t=Gs(e,"active",3,!0),i=A(null),n=A(null),s=A(""),a=A(""),l=A(!1),d=A(""),u=A(""),f=A(""),x=A(!0),m=A(wi({})),C=A(!1),_=A(void 0),E=!1;const S=/^[A-Za-z0-9_.-]{1,64}$/,I=ft(()=>{var J;return((J=o(i))==null?void 0:J.groups.find(qe=>qe.name===o(n)))??null}),M=ft(()=>{var J,qe;return((J=o(i))==null?void 0:J.status)==="locked"||((qe=o(i))==null?void 0:qe.status)==="error"});async function O(){try{p(i,await sG(),!0),p(s,""),o(n)&&!o(i).groups.some(J=>J.name===o(n))&&p(n,null),!o(n)&&o(i).groups.length>0&&p(n,o(i).groups[0].name,!0)}catch(J){p(s,J.message??String(J),!0)}}wn(()=>{t()&&!E&&(E=!0,O())});function R(J){p(a,J,!0),setTimeout(()=>{o(a)===J&&p(a,"")},2500)}async function H(J,qe,Pe,Be=!0){if(Pe){p(l,!0);try{await oG(J,qe,Pe,Be),p(m,{...o(m),[`${J}/${qe}`]:""},!0),p(u,""),p(f,""),p(x,!0),R(`saved ${J}/${qe}`),await O(),p(n,J,!0)}catch(we){p(s,we.message??String(we),!0)}finally{p(l,!1)}}}async function K(){var qe;const J=o(d).trim();if(!S.test(J)){p(s,"group name: letters, digits, _ . - (max 64)");return}(qe=o(i))!=null&&qe.groups.some(Pe=>Pe.name===J)||p(i,o(i)?{...o(i),groups:[...o(i).groups,{name:J,changed:0,fields:[]}].sort((Pe,Be)=>Pe.name.localeCompare(Be.name))}:o(i),!0),p(n,J,!0),p(d,""),p(s,"")}async function G(J,qe){var Pe;if(await((Pe=o(_))==null?void 0:Pe.show(`Mark ${J}/${qe} as secret? Its value will never be shown again — not here, not through the API. Scripts keep reading it. This cannot be undone (delete and re-create to change your mind).`,{confirm:"Mark secret",danger:!0}))){p(l,!0);try{await rG(J,qe),p(m,{...o(m),[`${J}/${qe}`]:""},!0),R(`${J}/${qe} is secret now`),await O()}catch(Be){p(s,Be.message??String(Be),!0)}finally{p(l,!1)}}}async function oe(J,qe){var Pe;if(await((Pe=o(_))==null?void 0:Pe.show(`Delete secret ${J}/${qe}? Scripts reading it get undefined from now on.`,{confirm:"Delete",danger:!0}))){p(l,!0);try{await eD(J,qe),R(`deleted ${J}/${qe}`),await O()}catch(Be){p(s,Be.message??String(Be),!0)}finally{p(l,!1)}}}async function ve(J){var Pe,Be,we,Ue;const qe=((Pe=o(I))==null?void 0:Pe.fields.length)??0;if(qe===0){p(i,o(i)?{...o(i),groups:o(i).groups.filter($e=>$e.name!==J)}:o(i),!0),p(n,((we=(Be=o(i))==null?void 0:Be.groups[0])==null?void 0:we.name)??null,!0);return}if(await((Ue=o(_))==null?void 0:Ue.show(`Delete the group ${J} with its ${qe} secret${qe===1?"":"s"}?`,{confirm:"Delete group",danger:!0}))){p(l,!0);try{await eD(J),R(`deleted ${J}`),p(n,null),await O()}catch($e){p(s,$e.message??String($e),!0)}finally{p(l,!1)}}}function Me(J){return J?new Date(J).toLocaleString():"—"}var be=lde(),Se=mt(be);ds(Ir(Se,{}),J=>p(_,J,!0),()=>o(_));var Ie=h(Se,2),te=g(Ie),Ee=h(g(te),4);{var ne=J=>{var qe=qce(),Pe=g(qe);P(()=>F(Pe,o(a))),y(J,qe)};T(Ee,J=>{o(a)&&J(ne)})}var De=h(Ee,2);{var _e=J=>{var qe=Uce(),Pe=g(qe);P(()=>{_i(qe,"title",o(i).file),F(Pe,`key: ${(o(i).keySource==="env"?"SHE_SECRETS_KEY":o(i).keySource==="file"?o(i).keyFile:"none yet — generated on first save")??""}`)}),y(J,qe)};T(De,J=>{o(i)&&J(_e)})}var dt=h(De,2),ot=h(te,2);{var nt=J=>{var qe=Gce(),Pe=g(qe),Be=h(Pe);P(()=>F(Pe,`${o(s)??""} `)),j("click",Be,()=>p(s,"")),y(J,qe)};T(ot,J=>{o(s)&&J(nt)})}var it=h(ot,2);{var Lt=J=>{var qe=Kce(),Pe=h(g(qe)),Be=h(Pe,3),we=g(Be),Ue=h(Be,2),$e=g(Ue);P(()=>{F(Pe,` ${o(i).error??""}. Values cannot be read or changed until the key is back — set `),F(we,o(i).keyFile),F($e,o(i).file)}),y(J,qe)};T(it,J=>{o(M)&&o(i)&&J(Lt)})}var re=h(it,2),de=g(re),Ce=h(g(de),2);{var Ze=J=>{var qe=Xce(),Pe=mt(qe);ci(Pe,17,()=>o(i).groups,Ue=>Ue.name,(Ue,$e)=>{var Pt=Zce();let Mt;var Gt=g(Pt),ni=g(Gt),$t=h(Gt,2),Jt=g($t);P(()=>{Mt=jt(Pt,1,"group svelte-1az45ix",null,Mt,{active:o(n)===o($e).name}),F(ni,o($e).name),F(Jt,o($e).fields.length)}),j("click",Pt,()=>p(n,o($e).name,!0)),y(Ue,Pt)});var Be=h(Pe,2);{var we=Ue=>{var $e=Yce();y(Ue,$e)};T(Be,Ue=>{o(i).groups.length===0&&Ue(we)})}y(J,qe)};T(Ce,J=>{o(i)&&J(Ze)})}var Ge=h(Ce,2),pt=g(Ge),At=h(pt,2),Dt=h(de,2),pe=g(Dt);{var Re=J=>{var qe=ode(),Pe=mt(qe),Be=g(Pe),we=g(Be),Ue=h(Be,2),$e=g(Ue),Pt=h(Ue,4),Mt=g(Pt),Gt=h(Pt,2),ni=h(Pe,2),$t=h(g(ni),2),Jt=g($t);ci(Jt,17,()=>o(I).fields,Y=>Y.name,(Y,le)=>{const Oe=ft(()=>`${o(I).name}/${o(le).name}`),fe=ft(()=>o(m)[o(Oe)]??(o(le).secret?"":o(le).value??"")),U=ft(()=>o(le).secret?o(fe)!=="":o(fe)!==(o(le).value??""));var xe=ide(),Te=g(xe),St=g(Te),He=h(Te),Qe=g(He),di=g(Qe);{var Si=yt=>{var ui=Qce(),li=mt(ui),mi=g(li);KC(mi,()=>!0);var si=h(li,2);P(()=>{_i(si,"type",o(C)?"text":"password"),Ia(si,o(fe)),si.disabled=o(M)}),j("input",si,at=>p(m,{...o(m),[o(Oe)]:at.target.value},!0)),y(yt,ui)},ai=yt=>{var ui=tde(),li=mt(ui),mi=g(li);KC(mi,()=>!1);var si=h(li,2);{var at=Je=>{var Z=Jce();_i(Z,"rows",4),P(()=>{Ia(Z,o(fe)),Z.disabled=o(M)}),j("input",Z,Ae=>p(m,{...o(m),[o(Oe)]:Ae.target.value},!0)),y(Je,Z)},je=ft(()=>o(fe).includes(`
|
|
275
275
|
`)),Ye=Je=>{var Z=ede();P(()=>{Ia(Z,o(fe)),Z.disabled=o(M)}),j("input",Z,Ae=>p(m,{...o(m),[o(Oe)]:Ae.target.value},!0)),y(Je,Z)};T(si,Je=>{o(je)?Je(at):Je(Ye,-1)})}P(()=>li.disabled=o(l)||o(M)),j("click",li,()=>G(o(I).name,o(le).name)),y(yt,ui)};T(di,yt=>{o(le).secret?yt(Si):yt(ai,-1)})}var We=h(di,2),bt=h(He),Kt=g(bt),Tt=h(bt),rt=g(Tt);P(yt=>{_i(Te,"title",`she.secrets.get('${o(Oe)??""}')`),F(St,o(le).name),We.disabled=o(l)||o(M)||!o(U)||!o(fe),F(Kt,yt),rt.disabled=o(l)||o(M)},[()=>Me(o(le).changed)]),Ms("submit",Qe,yt=>{yt.preventDefault(),o(U)&&H(o(I).name,o(le).name,o(fe),o(le).secret)}),j("click",rt,()=>oe(o(I).name,o(le).name)),y(Y,xe)});var w=h(Jt),z=g(w),Q=g(z),ae=h(z),ce=g(ae),Ne=g(ce);let W;var ze=g(Ne);KC(ze,()=>o(x));var ct=h(Ne,2);{var ie=Y=>{var le=nde();P(Oe=>{_i(le,"rows",Oe),le.disabled=o(M)},[()=>o(f).includes(`
|
|
276
276
|
`)?4:1]),ii(le,()=>o(f),Oe=>p(f,Oe)),y(Y,le)},me=ft(()=>o(f).includes(`
|
|
277
|
-
`)||o(C)||!o(x)),Ke=Y=>{var le=sde();P(()=>le.disabled=o(M)),ii(le,()=>o(f),Oe=>p(f,Oe)),y(Y,le)};T(ct,Y=>{o(me)?Y(ie):Y(Ke,-1)})}var Xe=h(ct,2),ht=h(ni,2),se=g(ht),Le=g(se),$=h(se,2),V=g($);P((Y,le)=>{F(we,o(I).name),F($e,`changed ${Y??""}`),Gt.disabled=o(l)||o(M),Q.disabled=o(M),W=jt(Ne,1,"lock svelte-1az45ix",null,W,{"is-secret":o(x)}),Ne.disabled=o(M),_i(Ne,"title",o(x)?"secret — write-only once saved (click for a plain field, e.g. a user name)":"plain — shown in clear (click for a secret)"),Xe.disabled=le,F(Le,`she.secrets.get('${o(I).name??""}/<field>')`),F(V,`she.secrets.get('${o(I).name??""}')`)},[()=>Me(o(I).changed),()=>o(l)||o(M)||!o(u).trim()||!o(f)]),vs(Mt,()=>o(C),Y=>p(C,Y)),j("click",Gt,()=>ve(o(I).name)),ii(Q,()=>o(u),Y=>p(u,Y)),Ms("submit",ce,Y=>{Y.preventDefault(),S.test(o(u).trim())?H(o(I).name,o(u).trim(),o(f),o(x)):p(s,"field name: letters, digits, _ . - (max 64)")}),j("click",Ne,()=>p(x,!o(x))),y(J,qe)},Bt=J=>{var qe=ade(),Pe=g(qe);{var Be=Ue=>{var $e=rde();y(Ue,$e)},we=Ue=>{var $e=En("Select a group.");y(Ue,$e)};T(Pe,Ue=>{o(i).groups.length===0?Ue(Be):Ue(we,-1)})}y(J,qe)};T(pe,J=>{o(I)?J(Re):o(i)&&!o(M)&&J(Bt,1)})}P(J=>{pt.disabled=o(M),At.disabled=J},[()=>o(M)||!o(d).trim()]),j("click",dt,O),Ms("submit",Ge,J=>{J.preventDefault(),K()}),ii(pt,()=>o(d),J=>p(d,J)),y(r,be),gs()}ys(["click","input"]);var dde=k('<div class="safe-banner svelte-1n46o8q"><strong class="svelte-1n46o8q">⚠ SAFE MODE</strong> — no user script is running and the script directory is not watched. She was killed instead of stopped last time, which usually means a script blocked the event loop. Edit or delete it, then restart. <button class="safe-restart svelte-1n46o8q">Restart daemon</button></div>'),jA=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q"></span>'),ude=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="MQTT broker not connected"></span>'),hde=k('<span class="nav-dot nav-dot--warn nav-dot--blink svelte-1n46o8q" title="Waiting for retained MQTT state"></span>'),fde=k('<span class="nav-dot nav-dot--ok svelte-1n46o8q" title="MQTT connected"></span>'),pde=k('<span class="nav-dot nav-dot--none svelte-1n46o8q"></span>'),gde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><rect x="2" y="2" width="12" height="4" rx="1" class="svelte-1n46o8q"></rect><rect x="2" y="10" width="12" height="4" rx="1" class="svelte-1n46o8q"></rect><circle cx="4.5" cy="4" r="0.6" fill="currentColor" class="svelte-1n46o8q"></circle><circle cx="4.5" cy="12" r="0.6" fill="currentColor" class="svelte-1n46o8q"></circle></svg> Adapters <!></button>'),vde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><circle cx="8" cy="10" r="2" class="svelte-1n46o8q"></circle><path d="M5,7 A4,4 0,0,1 11,7" class="svelte-1n46o8q"></path><path d="M3,5 A6.5,6.5 0,0,1 13,5" class="svelte-1n46o8q"></path><line x1="8" y1="12" x2="8" y2="15" class="svelte-1n46o8q"></line></svg> Broker</button>'),xde=k('<span class="nav-dot nav-dot--ok svelte-1n46o8q" title="All Matter devices online"></span>'),mde=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q" title="Some Matter devices offline"></span>'),_de=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="No Matter devices online"></span>'),bde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M8,2 L8,7" class="svelte-1n46o8q"></path><path d="M6,5 L8,7.5 L10,5" class="svelte-1n46o8q"></path><path d="M2.5,14 L6,10" class="svelte-1n46o8q"></path><path d="M6.2,12.8 L6,10 L3.2,10.2" class="svelte-1n46o8q"></path><path d="M13.5,14 L10,10" class="svelte-1n46o8q"></path><path d="M9.8,12.8 L10,10 L12.8,10.2" class="svelte-1n46o8q"></path></svg> Matter <!></button>'),Cde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><ellipse cx="8" cy="4.5" rx="5" ry="1.8" class="svelte-1n46o8q"></ellipse><path d="M3,4.5 v7 a5,1.8 0,0,0 10,0 v-7" class="svelte-1n46o8q"></path><path d="M3,8 a5,1.8 0,0,0 10,0" class="svelte-1n46o8q"></path></svg> DB</button>'),yde=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="Errors in recent logs"></span>'),wde=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q" title="Warnings in recent logs"></span>'),Ede=k('<span class="update-dot svelte-1n46o8q" title="Update available"></span>'),Sde=k('<dt class="svelte-1n46o8q">Latest</dt><dd style="color: #f90" class="svelte-1n46o8q"> </dd>',1),kde=k('<dt class="svelte-1n46o8q">Latest</dt><dd class="svelte-1n46o8q">up to date</dd>',1),Dde=k('<button class="svelte-1n46o8q"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> </button>'),Ade=k('<div class="version-popup svelte-1n46o8q"><dl class="svelte-1n46o8q"><dt class="svelte-1n46o8q">Installed</dt><dd class="svelte-1n46o8q"></dd> <!></dl> <div class="version-actions svelte-1n46o8q"><!> <button class="check-btn svelte-1n46o8q" title="Check for updates now"><svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> </button></div></div>'),Bde=k('<dt class="svelte-1n46o8q">Uptime</dt><dd class="svelte-1n46o8q"> </dd>',1),Fde=k('<dt class="svelte-1n46o8q">Matter nodes</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">Matter endpoints</dt><dd class="svelte-1n46o8q"> </dd>',1),Lde=k('<dt class="svelte-1n46o8q">DB docs</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">DB views</dt><dd class="svelte-1n46o8q"> </dd>',1),Ide=k('<dl class="svelte-1n46o8q"><!> <dt class="svelte-1n46o8q">Scripts</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">MQTT topics</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">MQTT msg/s</dt><dd class="svelte-1n46o8q"> </dd> <!> <!> <dt class="svelte-1n46o8q">Handlers</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">Memory</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">CPU</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL util</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL lag mean</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL lag max</dt><dd class="svelte-1n46o8q"> </dd></dl>'),Pde=k('<span class="stats-empty svelte-1n46o8q">Loading…</span>'),Tde=k('<button class="svelte-1n46o8q"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M18.36 6.64a9 9 0 1 1-12.73 0" class="svelte-1n46o8q"></path><line x1="12" y1="2" x2="12" y2="12" class="svelte-1n46o8q"></line></svg> Restart daemon</button>'),Mde=k('<div class="stats-popup svelte-1n46o8q"><!> <div class="stats-actions svelte-1n46o8q"><!></div></div>'),Rde=k('<button class="nav-logout svelte-1n46o8q" title="Logout"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" class="svelte-1n46o8q"></path><polyline points="16 17 21 12 16 7" class="svelte-1n46o8q"></polyline><line x1="21" y1="12" x2="9" y2="12" class="svelte-1n46o8q"></line></svg></button>'),Nde=k("<div><!></div>"),Ode=k('<div class="shell svelte-1n46o8q"><!> <nav class="svelte-1n46o8q"><span class="brand svelte-1n46o8q">she</span> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="5,3 1,8 5,13" class="svelte-1n46o8q"></polyline><polyline points="11,3 15,8 11,13" class="svelte-1n46o8q"></polyline></svg> Scripts</button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="miter" class="svelte-1n46o8q"><rect x="0.75" y="0.75" width="14.5" height="14.5" rx="1" class="svelte-1n46o8q"></rect><path d="M2,11 V5 H5 V11" class="svelte-1n46o8q"></path><path d="M6,12 V5 H9 V8 H6" class="svelte-1n46o8q"></path><path d="M10,11 V5 H15 V11" class="svelte-1n46o8q"></path><line x1="12.5" y1="5" x2="12.5" y2="11" class="svelte-1n46o8q"></line></svg> Packages <!></button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" stroke="none" style="vertical-align: middle" class="svelte-1n46o8q"><path fill-rule="evenodd" d="M2,0 H14 A2,2 0 0,1 16,2 V14 A2,2 0 0,1 14,16 H0 V2 A2,2 0 0,1 2,0 Z M0,16 L0,12 A4,4 0 0,1 4,16 Z M0,10.5 A5.5,5.5 0 0,1 5.5,16 L9,16 A9,9 0 0,0 0,7 Z M0,5.5 A10.5,10.5 0 0,1 10.5,16 L13.5,16 A13.5,13.5 0 0,0 0,2.5 Z" class="svelte-1n46o8q"></path></svg> MQTT <!></button> <!> <!> <!> <!> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><circle cx="5" cy="11" r="3" class="svelte-1n46o8q"></circle><path d="M7.2 8.8 14 2M11 5l2 2M9 7l2 2" class="svelte-1n46o8q"></path></svg> Secrets</button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" class="svelte-1n46o8q"><line x1="2" y1="5" x2="14" y2="5" class="svelte-1n46o8q"></line><line x1="2" y1="8" x2="14" y2="8" class="svelte-1n46o8q"></line><line x1="2" y1="11" x2="9" y2="11" class="svelte-1n46o8q"></line></svg> Logs <!></button> <div class="nav-spacer svelte-1n46o8q"></div> <div class="nav-right svelte-1n46o8q"><a class="nav-icon svelte-1n46o8q" href="https://github.com/hobbyquaker/she" target="_blank" rel="noopener" title="GitHub"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="svelte-1n46o8q"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" class="svelte-1n46o8q"></path></svg></a> <div class="version-wrap svelte-1n46o8q"><button class="version svelte-1n46o8q"> <!></button> <!></div> <div class="stats-wrap svelte-1n46o8q"><button class="nav-icon svelte-1n46o8q" title="Daemon status"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><line x1="18" y1="20" x2="18" y2="10" class="svelte-1n46o8q"></line><line x1="12" y1="20" x2="12" y2="4" class="svelte-1n46o8q"></line><line x1="6" y1="20" x2="6" y2="14" class="svelte-1n46o8q"></line></svg></button> <!></div> <button title="Settings"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" class="svelte-1n46o8q"></path><circle cx="12" cy="12" r="3" class="svelte-1n46o8q"></circle></svg></button> <!></div></nav> <main class="svelte-1n46o8q"><!> <div><!></div> <div><!></div> <div><!></div> <div><!></div> <div><!></div> <!> <div><!></div> <div><!></div> <div><!></div> <div><!></div></main></div>'),Hde=k('<div class="login-error svelte-1n46o8q"> </div>'),zde=k('<div class="login-overlay svelte-1n46o8q"><form class="login-box svelte-1n46o8q"><div class="login-brand svelte-1n46o8q">she</div> <h2 class="svelte-1n46o8q">Sign in</h2> <div class="login-field svelte-1n46o8q"><label for="she-password" class="svelte-1n46o8q">Password</label> <input id="she-password" type="password" placeholder="Enter password" autocomplete="current-password" class="svelte-1n46o8q"/></div> <!> <button type="submit" class="login-btn svelte-1n46o8q"> </button></form></div>'),Wde=k('<div class="updating-overlay svelte-1n46o8q"><div class="updating-box svelte-1n46o8q"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> Restarting smart-home-engine…</div></div>'),jde=k('<div class="updating-overlay svelte-1n46o8q"><div class="updating-box svelte-1n46o8q"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> Updating smart-home-engine…</div></div>'),Vde=k("<!> <!> <!> <!>",1);function $de(r,e){ps(e,!0);const t=["scripts","mqtt","matter","security","adapters","secrets","db","logs","config","packages"];function i(){const pe=location.hash.slice(1),Re=pe==="services"?"adapters":pe;return t.includes(Re)?Re:"scripts"}let n=A(wi(i())),s=A(null),a=A(!1),l=A(!1),d=A(!1),u=A(!1),f=A("none"),x=A(""),m=A(!1),C=A(""),_=A(""),E=A(!1),S=A(!1);YU(()=>{p(m,!0)});async function I(){p(_,""),p(E,!0);try{await JU(o(C)),p(C,""),p(m,!1)}catch(pe){p(_,pe.message??"Login failed",!0)}finally{p(E,!1)}}async function M(){if(o(f)==="proxy"&&o(x)){window.location.href=o(x);return}await eG(),p(m,!0)}let O=A(null),R=A(!1),H=A(!1),K=A(!1),G=A(!1),oe=A(wi([])),ve=A(0),Me=A(!1),be=A(!1),Se=A("none"),Ie=A(""),te=A(wi([]));const Ee=ft(()=>o(te).filter(pe=>pe.online).length),ne=ft(()=>o(te).length===0?"none":o(Ee)===o(te).length?"all":o(Ee)>0?"some":"offline");let De=A(!1),_e=A(!1);async function dt(){if(!await o(O).show("Restart the she daemon? The page will reload after a moment.",{confirm:"Restart"}))return;p(R,!0);let pe;try{pe=(await Wc()).startedAt}catch{}try{await aF()}catch{}const Re=Date.now()+6e4;for(;Date.now()<Re;){await new Promise(Bt=>setTimeout(Bt,250));try{const Bt=await Wc();if(pe===void 0||Bt.startedAt!==pe){location.reload();return}}catch{}}location.reload()}async function ot(){p(d,!0);try{const pe=await lG();o(s)&&p(s,{...o(s),latestVersion:pe.latestVersion??void 0},!0)}catch{}finally{p(d,!1)}}async function nt(){var Bt,J;if(!await o(O).show(`Update to v${(Bt=o(s))==null?void 0:Bt.latestVersion}? The daemon will restart after the update completes.`,{confirm:"Update"}))return;p(l,!1),p(u,!0);const pe=(J=o(s))==null?void 0:J.startedAt;try{await aG()}catch{}const Re=Date.now()+18e4;for(;Date.now()<Re;){await new Promise(qe=>setTimeout(qe,1e3));try{const qe=await Wc();if(pe===void 0||qe.startedAt!==pe){location.reload();return}}catch{p(u,!1),p(R,!0)}}location.reload()}function it(pe){p(n,pe,!0),location.hash=pe}zs(async()=>{location.hash||(location.hash=o(n));const pe=()=>{p(n,i(),!0)};window.addEventListener("hashchange",pe);const Re=()=>{document.visibilityState==="visible"&&(QK(),Wc().then($e=>{p(s,$e,!0)}).catch(()=>{}),requestAnimationFrame(()=>{document.body.style.display="none",document.body.offsetHeight,document.body.style.display="",window.dispatchEvent(new Event("she:visible"))}))};document.addEventListener("visibilitychange",Re);try{const $e=await QU();p(f,$e.mode,!0),p(x,$e.proxyLogoutUrl??"",!0),o(f)==="password"&&(await fetch("/she/scripts")).status===401&&p(m,!0)}catch{}p(S,!0);async function Bt(){var $e,Pt,Mt,Gt;try{p(s,await Wc(),!0)}catch{}try{const[ni,$t]=await Promise.all([dF(),ca()]);p(oe,Array.isArray($t.pinnedPackages)?$t.pinnedPackages:[],!0),p(ve,Object.keys(ni).filter(z=>!o(oe).includes(z)).length,!0);const Jt=o(Me);p(Me,(($e=$t.broker)==null?void 0:$e.enabled)===!0),Jt&&!o(Me)&&o(n)==="security"&&it("scripts");const w=o(be);p(be,((Pt=$t.services)==null?void 0:Pt.enabled)===!0),w&&!o(be)&&o(n)==="adapters"&&it("scripts")}catch{}!((Mt=o(s))!=null&&Mt.matterEnabled)&&o(n)==="matter"&&it("scripts"),!((Gt=o(s))!=null&&Gt.dbEnabled)&&o(n)==="db"&&it("scripts")}Bt();const J=setInterval(Bt,5e3),qe=Wo("mqtt:status",$e=>{$e.connected===!1?(p(G,!0),p(H,!1),p(K,!1)):(p(G,!1),p(H,$e.ready===!1),p(K,$e.ready===!0))}),Pe=Wo("matter:deviceList",$e=>{Array.isArray($e.devices)&&p(te,$e.devices.map(Pt=>({nodeId:String(Pt.nodeId),online:!!Pt.online})),!0)}),Be=Wo("matter:deviceStatus",$e=>{if($e.nodeId===void 0)return;const Pt=String($e.nodeId),Mt=!!$e.online;p(te,o(te).map(Gt=>Gt.nodeId===Pt?{...Gt,online:Mt}:Gt),!0)}),we=bF();p(De,we.some($e=>$e.level==="error"),!0),p(_e,!o(De)&&we.some($e=>$e.level==="warn"),!0);const Ue=i2($e=>{$e.level==="error"?(p(De,!0),p(_e,!1)):$e.level==="warn"&&!o(De)&&p(_e,!0)});return()=>{window.removeEventListener("hashchange",pe),document.removeEventListener("visibilitychange",Re),clearInterval(J),qe(),Pe(),Be(),Ue()}});var Lt=Vde();Ms("click",G5,()=>{o(a)&&p(a,!1),o(l)&&p(l,!1)});var re=mt(Lt);{var de=pe=>{var Re=Ode(),Bt=g(Re);{var J=ye=>{var ut=dde(),Ot=h(g(ut),2);j("click",Ot,dt),y(ye,ut)};T(Bt,ye=>{var ut;(ut=o(s))!=null&&ut.safeMode&&ye(J)})}var qe=h(Bt,2),Pe=h(g(qe),2);let Be;var we=h(Pe,2);let Ue;var $e=h(g(we),2);{var Pt=ye=>{var ut=jA();P(()=>_i(ut,"title",`${o(ve)??""} package update${o(ve)===1?"":"s"} available`)),y(ye,ut)};T($e,ye=>{o(ve)>0&&ye(Pt)})}var Mt=h(we,2);let Gt;var ni=h(g(Mt),2);{var $t=ye=>{var ut=ude();y(ye,ut)},Jt=ye=>{var ut=hde();y(ye,ut)},w=ye=>{var ut=fde();y(ye,ut)};T(ni,ye=>{o(G)?ye($t):o(H)?ye(Jt,1):o(K)&&ye(w,2)})}var z=h(Mt,2);{var Q=ye=>{var ut=gde();let Ot;var wt=h(g(ut),2);{var Ft=Zt=>{var Wt=jA();P(()=>_i(Wt,"title",o(Ie))),y(Zt,Wt)},ti=Zt=>{var Wt=pde();y(Zt,Wt)};T(wt,Zt=>{o(Se)==="warn"?Zt(Ft):Zt(ti,-1)})}P(()=>Ot=jt(ut,1,"svelte-1n46o8q",null,Ot,{active:o(n)==="adapters"})),j("click",ut,()=>it("adapters")),y(ye,ut)};T(z,ye=>{o(be)&&ye(Q)})}var ae=h(z,2);{var ce=ye=>{var ut=vde();let Ot;P(()=>Ot=jt(ut,1,"svelte-1n46o8q",null,Ot,{active:o(n)==="security"})),j("click",ut,()=>it("security")),y(ye,ut)};T(ae,ye=>{o(Me)&&ye(ce)})}var Ne=h(ae,2);{var W=ye=>{var ut=bde();let Ot;var wt=h(g(ut),2);{var Ft=Wt=>{var gi=xde();y(Wt,gi)},ti=Wt=>{var gi=mde();y(Wt,gi)},Zt=Wt=>{var gi=_de();y(Wt,gi)};T(wt,Wt=>{o(ne)==="all"?Wt(Ft):o(ne)==="some"?Wt(ti,1):o(ne)==="offline"&&Wt(Zt,2)})}P(()=>Ot=jt(ut,1,"svelte-1n46o8q",null,Ot,{active:o(n)==="matter"})),j("click",ut,()=>it("matter")),y(ye,ut)};T(Ne,ye=>{var ut;(ut=o(s))!=null&&ut.matterEnabled&&ye(W)})}var ze=h(Ne,2);{var ct=ye=>{var ut=Cde();let Ot;P(()=>Ot=jt(ut,1,"svelte-1n46o8q",null,Ot,{active:o(n)==="db"})),j("click",ut,()=>it("db")),y(ye,ut)};T(ze,ye=>{var ut;(ut=o(s))!=null&&ut.dbEnabled&&ye(ct)})}var ie=h(ze,2);let me;var Ke=h(ie,2);let Xe;var ht=h(g(Ke),2);{var se=ye=>{var ut=yde();y(ye,ut)},Le=ye=>{var ut=wde();y(ye,ut)};T(ht,ye=>{o(De)?ye(se):o(_e)&&ye(Le,1)})}var $=h(Ke,4),V=h(g($),2),Y=g(V),le=g(Y);le.nodeValue="v1.39.1 ";var Oe=h(le);{var fe=ye=>{var ut=Ede();y(ye,ut)};T(Oe,ye=>{var ut,Ot;(ut=o(s))!=null&&ut.latestVersion&&!((Ot=o(s))!=null&&Ot.docker)&&ye(fe)})}var U=h(Y,2);{var xe=ye=>{var ut=Ade(),Ot=g(ut),wt=h(g(Ot));wt.textContent="v1.39.1";var Ft=h(wt,2);{var ti=Yt=>{var kt=Sde(),Qt=h(mt(kt)),xi=g(Qt);P(()=>F(xi,`v${o(s).latestVersion??""}`)),y(Yt,kt)},Zt=Yt=>{var kt=kde();y(Yt,kt)};T(Ft,Yt=>{var kt;(kt=o(s))!=null&&kt.latestVersion?Yt(ti):Yt(Zt,-1)})}var Wt=h(Ot,2),gi=g(Wt);{var bi=Yt=>{var kt=Dde(),Qt=h(g(kt));P(()=>F(Qt,` Update to v${o(s).latestVersion??""}`)),j("click",kt,nt),y(Yt,kt)};T(gi,Yt=>{var kt;(kt=o(s))!=null&&kt.latestVersion&&Yt(bi)})}var hi=h(gi,2),Ci=g(hi);let xt;var Et=h(Ci);P(()=>{hi.disabled=o(d),xt=jt(Ci,0,"svelte-1n46o8q",null,xt,{spinning:o(d)}),F(Et,` ${o(d)?"Checking…":"Check for updates"}`)}),j("click",ut,Yt=>Yt.stopPropagation()),j("click",hi,ot),y(ye,ut)};T(U,ye=>{var ut;o(l)&&!((ut=o(s))!=null&&ut.docker)&&ye(xe)})}var Te=h(V,2),St=g(Te),He=h(St,2);{var Qe=ye=>{var ut=Mde(),Ot=g(ut);{var wt=gi=>{var bi=Ide(),hi=g(bi);{var Ci=Li=>{const Ii=ft(()=>Math.floor((Date.now()-o(s).startedAt)/1e3)),nn=ft(()=>Math.floor(o(Ii)/86400)),Wi=ft(()=>Math.floor(o(Ii)%86400/3600)),Bi=ft(()=>Math.floor(o(Ii)%3600/60));var Xi=Bde(),en=h(mt(Xi)),Zi=g(en);P(()=>F(Zi,`${o(nn)>0?o(nn)+"d ":""}${o(Wi)>0||o(nn)>0?o(Wi)+"h ":""}${o(Bi)??""}m`)),y(Li,Xi)};T(hi,Li=>{o(s).startedAt&&Li(Ci)})}var xt=h(hi,3),Et=g(xt),Yt=h(xt,3),kt=g(Yt),Qt=h(Yt,3),xi=g(Qt),Pi=h(Qt,2);{var yi=Li=>{var Ii=Fde(),nn=h(mt(Ii)),Wi=g(nn),Bi=h(nn,3),Xi=g(Bi);P(()=>{F(Wi,o(s).matterNodes??0),F(Xi,o(s).matterEndpoints??0)}),y(Li,Ii)};T(Pi,Li=>{o(s).matterEnabled&&Li(yi)})}var Fi=h(Pi,2);{var Ui=Li=>{var Ii=Lde(),nn=h(mt(Ii)),Wi=g(nn),Bi=h(nn,3),Xi=g(Bi);P(()=>{F(Wi,o(s).dbDocs??"—"),F(Xi,o(s).dbViews??"—")}),y(Li,Ii)};T(Fi,Li=>{o(s).dbEnabled&&Li(Ui)})}var ln=h(Fi,3),Ni=g(ln),Ti=h(ln,3),un=g(Ti),Ki=h(Ti,3),tn=g(Ki),Yn=h(Ki,3),cn=g(Yn),Rn=h(Yn,3),Ps=g(Rn),ki=h(Rn,3),dn=g(ki);P(()=>{F(Et,o(s).scripts),F(kt,o(s).topics),F(xi,o(s).mqttMsgPerSec??"—"),F(Ni,o(s).handlers??"—"),F(un,o(s).memMb!=null?o(s).memMb+" MB":"—"),F(tn,o(s).cpuPercent!=null?o(s).cpuPercent+" %":"—"),F(cn,o(s).eluPercent!=null?o(s).eluPercent+" %":"—"),F(Ps,o(s).elMeanMs!=null?o(s).elMeanMs+" ms":"—"),F(dn,o(s).elMaxMs!=null?o(s).elMaxMs+" ms":"—")}),y(gi,bi)},Ft=gi=>{var bi=Pde();y(gi,bi)};T(Ot,gi=>{o(s)?gi(wt):gi(Ft,-1)})}var ti=h(Ot,2),Zt=g(ti);{var Wt=gi=>{var bi=Tde();j("click",bi,()=>{p(a,!1),dt()}),y(gi,bi)};T(Zt,gi=>{var bi;(bi=o(s))!=null&&bi.docker||gi(Wt)})}j("click",ut,gi=>gi.stopPropagation()),y(ye,ut)};T(He,ye=>{o(a)&&ye(Qe)})}var di=h(Te,2);let Si;var ai=h(di,2);{var We=ye=>{var ut=Rde();j("click",ut,M),y(ye,ut)};T(ai,ye=>{o(f)==="password"&&ye(We)})}var bt=h(qe,2),Kt=g(bt);ds(Ir(Kt,{}),ye=>p(O,ye,!0),()=>o(O));var Tt=h(Kt,2);let rt;var yt=g(Tt);{let ye=ft(()=>o(n)==="scripts");hQ(yt,{get active(){return o(ye)}})}var ui=h(Tt,2);let li;var mi=g(ui);Wie(mi,{});var si=h(ui,2);let at;var je=g(si);yie(je,{});var Ye=h(si,2);let Je;var Z=g(Ye);vte(Z,{});var Ae=h(Ye,2);let gt;var q=g(Ae);_oe(q,{});var ee=h(Ae,2);{var ge=ye=>{var ut=Nde();let Ot;var wt=g(ut);Wce(wt,{onstatus:(Ft,ti)=>{p(Se,Ft,!0),p(Ie,ti,!0)}}),P(()=>Ot=jt(ut,1,"page-wrap svelte-1n46o8q",null,Ot,{hidden:o(n)!=="adapters"})),y(ye,ut)};T(ee,ye=>{o(be)&&ye(ge)})}var et=h(ee,2);let tt;var st=g(et);{let ye=ft(()=>o(n)==="secrets");cde(st,{get active(){return o(ye)}})}var vt=h(et,2);let Ut;var qt=g(vt);xee(qt,{});var Rt=h(vt,2);let Vt;var Nt=g(Rt);oJ(Nt,{});var _t=h(Rt,2);let pi;var ke=g(_t);uJ(ke,{}),P(()=>{Be=jt(Pe,1,"svelte-1n46o8q",null,Be,{active:o(n)==="scripts"}),Ue=jt(we,1,"svelte-1n46o8q",null,Ue,{active:o(n)==="packages"}),Gt=jt(Mt,1,"svelte-1n46o8q",null,Gt,{active:o(n)==="mqtt"}),me=jt(ie,1,"svelte-1n46o8q",null,me,{active:o(n)==="secrets"}),Xe=jt(Ke,1,"svelte-1n46o8q",null,Xe,{active:o(n)==="logs"}),Si=jt(di,1,"nav-settings svelte-1n46o8q",null,Si,{active:o(n)==="config"}),rt=jt(Tt,1,"page-wrap svelte-1n46o8q",null,rt,{hidden:o(n)!=="scripts"}),li=jt(ui,1,"page-wrap svelte-1n46o8q",null,li,{hidden:o(n)!=="packages"}),at=jt(si,1,"page-wrap svelte-1n46o8q",null,at,{hidden:o(n)!=="mqtt"}),Je=jt(Ye,1,"page-wrap svelte-1n46o8q",null,Je,{hidden:o(n)!=="matter"}),gt=jt(Ae,1,"page-wrap svelte-1n46o8q",null,gt,{hidden:o(n)!=="security"}),tt=jt(et,1,"page-wrap svelte-1n46o8q",null,tt,{hidden:o(n)!=="secrets"}),Ut=jt(vt,1,"page-wrap svelte-1n46o8q",null,Ut,{hidden:o(n)!=="db"}),Vt=jt(Rt,1,"page-wrap svelte-1n46o8q",null,Vt,{hidden:o(n)!=="config"}),pi=jt(_t,1,"page-wrap svelte-1n46o8q",null,pi,{hidden:o(n)!=="logs"})}),j("click",Pe,()=>it("scripts")),j("click",we,()=>it("packages")),j("click",Mt,()=>it("mqtt")),j("click",ie,()=>it("secrets")),j("click",Ke,()=>{it("logs"),p(De,!1),p(_e,!1)}),j("click",Y,ye=>{ye.stopPropagation(),p(l,!o(l)),p(a,!1)}),j("click",St,ye=>{ye.stopPropagation(),p(a,!o(a)),p(l,!1)}),j("click",di,()=>it("config")),y(pe,Re)};T(re,pe=>{o(S)&&!o(m)&&pe(de)})}var Ce=h(re,2);{var Ze=pe=>{var Re=zde(),Bt=g(Re),J=h(g(Bt),4),qe=h(g(J),2),Pe=h(J,2);{var Be=$e=>{var Pt=Hde(),Mt=g(Pt);P(()=>F(Mt,o(_))),y($e,Pt)};T(Pe,$e=>{o(_)&&$e(Be)})}var we=h(Pe,2),Ue=g(we);P(()=>{qe.disabled=o(E),we.disabled=o(E)||!o(C),F(Ue,o(E)?"Signing in…":"Sign in")}),Ms("submit",Bt,$e=>{$e.preventDefault(),I()}),ii(qe,()=>o(C),$e=>p(C,$e)),y(pe,Re)};T(Ce,pe=>{o(m)&&pe(Ze)})}var Ge=h(Ce,2);{var pt=pe=>{var Re=Wde();y(pe,Re)};T(Ge,pe=>{o(R)&&pe(pt)})}var At=h(Ge,2);{var Dt=pe=>{var Re=jde();y(pe,Re)};T(At,pe=>{o(u)&&pe(Dt)})}y(r,Lt),gs()}ys(["click"]);fM($de,{target:document.getElementById("app")});export{D3 as t};
|
|
277
|
+
`)||o(C)||!o(x)),Ke=Y=>{var le=sde();P(()=>le.disabled=o(M)),ii(le,()=>o(f),Oe=>p(f,Oe)),y(Y,le)};T(ct,Y=>{o(me)?Y(ie):Y(Ke,-1)})}var Xe=h(ct,2),ht=h(ni,2),se=g(ht),Le=g(se),$=h(se,2),V=g($);P((Y,le)=>{F(we,o(I).name),F($e,`changed ${Y??""}`),Gt.disabled=o(l)||o(M),Q.disabled=o(M),W=jt(Ne,1,"lock svelte-1az45ix",null,W,{"is-secret":o(x)}),Ne.disabled=o(M),_i(Ne,"title",o(x)?"secret — write-only once saved (click for a plain field, e.g. a user name)":"plain — shown in clear (click for a secret)"),Xe.disabled=le,F(Le,`she.secrets.get('${o(I).name??""}/<field>')`),F(V,`she.secrets.get('${o(I).name??""}')`)},[()=>Me(o(I).changed),()=>o(l)||o(M)||!o(u).trim()||!o(f)]),vs(Mt,()=>o(C),Y=>p(C,Y)),j("click",Gt,()=>ve(o(I).name)),ii(Q,()=>o(u),Y=>p(u,Y)),Ms("submit",ce,Y=>{Y.preventDefault(),S.test(o(u).trim())?H(o(I).name,o(u).trim(),o(f),o(x)):p(s,"field name: letters, digits, _ . - (max 64)")}),j("click",Ne,()=>p(x,!o(x))),y(J,qe)},Bt=J=>{var qe=ade(),Pe=g(qe);{var Be=Ue=>{var $e=rde();y(Ue,$e)},we=Ue=>{var $e=En("Select a group.");y(Ue,$e)};T(Pe,Ue=>{o(i).groups.length===0?Ue(Be):Ue(we,-1)})}y(J,qe)};T(pe,J=>{o(I)?J(Re):o(i)&&!o(M)&&J(Bt,1)})}P(J=>{pt.disabled=o(M),At.disabled=J},[()=>o(M)||!o(d).trim()]),j("click",dt,O),Ms("submit",Ge,J=>{J.preventDefault(),K()}),ii(pt,()=>o(d),J=>p(d,J)),y(r,be),gs()}ys(["click","input"]);var dde=k('<div class="safe-banner svelte-1n46o8q"><strong class="svelte-1n46o8q">⚠ SAFE MODE</strong> — no user script is running and the script directory is not watched. She was killed instead of stopped last time, which usually means a script blocked the event loop. Edit or delete it, then restart. <button class="safe-restart svelte-1n46o8q">Restart daemon</button></div>'),jA=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q"></span>'),ude=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="MQTT broker not connected"></span>'),hde=k('<span class="nav-dot nav-dot--warn nav-dot--blink svelte-1n46o8q" title="Waiting for retained MQTT state"></span>'),fde=k('<span class="nav-dot nav-dot--ok svelte-1n46o8q" title="MQTT connected"></span>'),pde=k('<span class="nav-dot nav-dot--none svelte-1n46o8q"></span>'),gde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><rect x="2" y="2" width="12" height="4" rx="1" class="svelte-1n46o8q"></rect><rect x="2" y="10" width="12" height="4" rx="1" class="svelte-1n46o8q"></rect><circle cx="4.5" cy="4" r="0.6" fill="currentColor" class="svelte-1n46o8q"></circle><circle cx="4.5" cy="12" r="0.6" fill="currentColor" class="svelte-1n46o8q"></circle></svg> Adapters <!></button>'),vde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><circle cx="8" cy="10" r="2" class="svelte-1n46o8q"></circle><path d="M5,7 A4,4 0,0,1 11,7" class="svelte-1n46o8q"></path><path d="M3,5 A6.5,6.5 0,0,1 13,5" class="svelte-1n46o8q"></path><line x1="8" y1="12" x2="8" y2="15" class="svelte-1n46o8q"></line></svg> Broker</button>'),xde=k('<span class="nav-dot nav-dot--ok svelte-1n46o8q" title="All Matter devices online"></span>'),mde=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q" title="Some Matter devices offline"></span>'),_de=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="No Matter devices online"></span>'),bde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M8,2 L8,7" class="svelte-1n46o8q"></path><path d="M6,5 L8,7.5 L10,5" class="svelte-1n46o8q"></path><path d="M2.5,14 L6,10" class="svelte-1n46o8q"></path><path d="M6.2,12.8 L6,10 L3.2,10.2" class="svelte-1n46o8q"></path><path d="M13.5,14 L10,10" class="svelte-1n46o8q"></path><path d="M9.8,12.8 L10,10 L12.8,10.2" class="svelte-1n46o8q"></path></svg> Matter <!></button>'),Cde=k('<button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><ellipse cx="8" cy="4.5" rx="5" ry="1.8" class="svelte-1n46o8q"></ellipse><path d="M3,4.5 v7 a5,1.8 0,0,0 10,0 v-7" class="svelte-1n46o8q"></path><path d="M3,8 a5,1.8 0,0,0 10,0" class="svelte-1n46o8q"></path></svg> DB</button>'),yde=k('<span class="nav-dot nav-dot--err svelte-1n46o8q" title="Errors in recent logs"></span>'),wde=k('<span class="nav-dot nav-dot--warn svelte-1n46o8q" title="Warnings in recent logs"></span>'),Ede=k('<span class="update-dot svelte-1n46o8q" title="Update available"></span>'),Sde=k('<dt class="svelte-1n46o8q">Latest</dt><dd style="color: #f90" class="svelte-1n46o8q"> </dd>',1),kde=k('<dt class="svelte-1n46o8q">Latest</dt><dd class="svelte-1n46o8q">up to date</dd>',1),Dde=k('<button class="svelte-1n46o8q"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> </button>'),Ade=k('<div class="version-popup svelte-1n46o8q"><dl class="svelte-1n46o8q"><dt class="svelte-1n46o8q">Installed</dt><dd class="svelte-1n46o8q"></dd> <!></dl> <div class="version-actions svelte-1n46o8q"><!> <button class="check-btn svelte-1n46o8q" title="Check for updates now"><svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> </button></div></div>'),Bde=k('<dt class="svelte-1n46o8q">Uptime</dt><dd class="svelte-1n46o8q"> </dd>',1),Fde=k('<dt class="svelte-1n46o8q">Matter nodes</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">Matter endpoints</dt><dd class="svelte-1n46o8q"> </dd>',1),Lde=k('<dt class="svelte-1n46o8q">DB docs</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">DB views</dt><dd class="svelte-1n46o8q"> </dd>',1),Ide=k('<dl class="svelte-1n46o8q"><!> <dt class="svelte-1n46o8q">Scripts</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">MQTT topics</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">MQTT msg/s</dt><dd class="svelte-1n46o8q"> </dd> <!> <!> <dt class="svelte-1n46o8q">Handlers</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">Memory</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">CPU</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL util</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL lag mean</dt><dd class="svelte-1n46o8q"> </dd> <dt class="svelte-1n46o8q">EL lag max</dt><dd class="svelte-1n46o8q"> </dd></dl>'),Pde=k('<span class="stats-empty svelte-1n46o8q">Loading…</span>'),Tde=k('<button class="svelte-1n46o8q"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M18.36 6.64a9 9 0 1 1-12.73 0" class="svelte-1n46o8q"></path><line x1="12" y1="2" x2="12" y2="12" class="svelte-1n46o8q"></line></svg> Restart daemon</button>'),Mde=k('<div class="stats-popup svelte-1n46o8q"><!> <div class="stats-actions svelte-1n46o8q"><!></div></div>'),Rde=k('<button class="nav-logout svelte-1n46o8q" title="Logout"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" class="svelte-1n46o8q"></path><polyline points="16 17 21 12 16 7" class="svelte-1n46o8q"></polyline><line x1="21" y1="12" x2="9" y2="12" class="svelte-1n46o8q"></line></svg></button>'),Nde=k("<div><!></div>"),Ode=k('<div class="shell svelte-1n46o8q"><!> <nav class="svelte-1n46o8q"><span class="brand svelte-1n46o8q">she</span> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="5,3 1,8 5,13" class="svelte-1n46o8q"></polyline><polyline points="11,3 15,8 11,13" class="svelte-1n46o8q"></polyline></svg> Scripts</button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="miter" class="svelte-1n46o8q"><rect x="0.75" y="0.75" width="14.5" height="14.5" rx="1" class="svelte-1n46o8q"></rect><path d="M2,11 V5 H5 V11" class="svelte-1n46o8q"></path><path d="M6,12 V5 H9 V8 H6" class="svelte-1n46o8q"></path><path d="M10,11 V5 H15 V11" class="svelte-1n46o8q"></path><line x1="12.5" y1="5" x2="12.5" y2="11" class="svelte-1n46o8q"></line></svg> Packages <!></button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" stroke="none" style="vertical-align: middle" class="svelte-1n46o8q"><path fill-rule="evenodd" d="M2,0 H14 A2,2 0 0,1 16,2 V14 A2,2 0 0,1 14,16 H0 V2 A2,2 0 0,1 2,0 Z M0,16 L0,12 A4,4 0 0,1 4,16 Z M0,10.5 A5.5,5.5 0 0,1 5.5,16 L9,16 A9,9 0 0,0 0,7 Z M0,5.5 A10.5,10.5 0 0,1 10.5,16 L13.5,16 A13.5,13.5 0 0,0 0,2.5 Z" class="svelte-1n46o8q"></path></svg> MQTT <!></button> <!> <!> <!> <!> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><circle cx="5" cy="11" r="3" class="svelte-1n46o8q"></circle><path d="M7.2 8.8 14 2M11 5l2 2M9 7l2 2" class="svelte-1n46o8q"></path></svg> Secrets</button> <button><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" class="svelte-1n46o8q"><line x1="2" y1="5" x2="14" y2="5" class="svelte-1n46o8q"></line><line x1="2" y1="8" x2="14" y2="8" class="svelte-1n46o8q"></line><line x1="2" y1="11" x2="9" y2="11" class="svelte-1n46o8q"></line></svg> Logs <!></button> <div class="nav-spacer svelte-1n46o8q"></div> <div class="nav-right svelte-1n46o8q"><a class="nav-icon svelte-1n46o8q" href="https://github.com/hobbyquaker/she" target="_blank" rel="noopener" title="GitHub"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="svelte-1n46o8q"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" class="svelte-1n46o8q"></path></svg></a> <div class="version-wrap svelte-1n46o8q"><button class="version svelte-1n46o8q"> <!></button> <!></div> <div class="stats-wrap svelte-1n46o8q"><button class="nav-icon svelte-1n46o8q" title="Daemon status"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><line x1="18" y1="20" x2="18" y2="10" class="svelte-1n46o8q"></line><line x1="12" y1="20" x2="12" y2="4" class="svelte-1n46o8q"></line><line x1="6" y1="20" x2="6" y2="14" class="svelte-1n46o8q"></line></svg></button> <!></div> <button title="Settings"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" class="svelte-1n46o8q"></path><circle cx="12" cy="12" r="3" class="svelte-1n46o8q"></circle></svg></button> <!></div></nav> <main class="svelte-1n46o8q"><!> <div><!></div> <div><!></div> <div><!></div> <div><!></div> <div><!></div> <!> <div><!></div> <div><!></div> <div><!></div> <div><!></div></main></div>'),Hde=k('<div class="login-error svelte-1n46o8q"> </div>'),zde=k('<div class="login-overlay svelte-1n46o8q"><form class="login-box svelte-1n46o8q"><div class="login-brand svelte-1n46o8q">she</div> <h2 class="svelte-1n46o8q">Sign in</h2> <div class="login-field svelte-1n46o8q"><label for="she-password" class="svelte-1n46o8q">Password</label> <input id="she-password" type="password" placeholder="Enter password" autocomplete="current-password" class="svelte-1n46o8q"/></div> <!> <button type="submit" class="login-btn svelte-1n46o8q"> </button></form></div>'),Wde=k('<div class="updating-overlay svelte-1n46o8q"><div class="updating-box svelte-1n46o8q"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> Restarting smart-home-engine…</div></div>'),jde=k('<div class="updating-overlay svelte-1n46o8q"><div class="updating-box svelte-1n46o8q"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"><polyline points="4 4 4 10 10 10" class="svelte-1n46o8q"></polyline><path d="M4 10A9 9 0 1 0 6.5 5" class="svelte-1n46o8q"></path></svg> Updating smart-home-engine…</div></div>'),Vde=k("<!> <!> <!> <!>",1);function $de(r,e){ps(e,!0);const t=["scripts","mqtt","matter","security","adapters","secrets","db","logs","config","packages"];function i(){const pe=location.hash.slice(1),Re=pe==="services"?"adapters":pe;return t.includes(Re)?Re:"scripts"}let n=A(wi(i())),s=A(null),a=A(!1),l=A(!1),d=A(!1),u=A(!1),f=A("none"),x=A(""),m=A(!1),C=A(""),_=A(""),E=A(!1),S=A(!1);YU(()=>{p(m,!0)});async function I(){p(_,""),p(E,!0);try{await JU(o(C)),p(C,""),p(m,!1)}catch(pe){p(_,pe.message??"Login failed",!0)}finally{p(E,!1)}}async function M(){if(o(f)==="proxy"&&o(x)){window.location.href=o(x);return}await eG(),p(m,!0)}let O=A(null),R=A(!1),H=A(!1),K=A(!1),G=A(!1),oe=A(wi([])),ve=A(0),Me=A(!1),be=A(!1),Se=A("none"),Ie=A(""),te=A(wi([]));const Ee=ft(()=>o(te).filter(pe=>pe.online).length),ne=ft(()=>o(te).length===0?"none":o(Ee)===o(te).length?"all":o(Ee)>0?"some":"offline");let De=A(!1),_e=A(!1);async function dt(){if(!await o(O).show("Restart the she daemon? The page will reload after a moment.",{confirm:"Restart"}))return;p(R,!0);let pe;try{pe=(await Wc()).startedAt}catch{}try{await aF()}catch{}const Re=Date.now()+6e4;for(;Date.now()<Re;){await new Promise(Bt=>setTimeout(Bt,250));try{const Bt=await Wc();if(pe===void 0||Bt.startedAt!==pe){location.reload();return}}catch{}}location.reload()}async function ot(){p(d,!0);try{const pe=await lG();o(s)&&p(s,{...o(s),latestVersion:pe.latestVersion??void 0},!0)}catch{}finally{p(d,!1)}}async function nt(){var Bt,J;if(!await o(O).show(`Update to v${(Bt=o(s))==null?void 0:Bt.latestVersion}? The daemon will restart after the update completes.`,{confirm:"Update"}))return;p(l,!1),p(u,!0);const pe=(J=o(s))==null?void 0:J.startedAt;try{await aG()}catch{}const Re=Date.now()+18e4;for(;Date.now()<Re;){await new Promise(qe=>setTimeout(qe,1e3));try{const qe=await Wc();if(pe===void 0||qe.startedAt!==pe){location.reload();return}}catch{p(u,!1),p(R,!0)}}location.reload()}function it(pe){p(n,pe,!0),location.hash=pe}zs(async()=>{location.hash||(location.hash=o(n));const pe=()=>{p(n,i(),!0)};window.addEventListener("hashchange",pe);const Re=()=>{document.visibilityState==="visible"&&(QK(),Wc().then($e=>{p(s,$e,!0)}).catch(()=>{}),requestAnimationFrame(()=>{document.body.style.display="none",document.body.offsetHeight,document.body.style.display="",window.dispatchEvent(new Event("she:visible"))}))};document.addEventListener("visibilitychange",Re);try{const $e=await QU();p(f,$e.mode,!0),p(x,$e.proxyLogoutUrl??"",!0),o(f)==="password"&&(await fetch("/she/scripts")).status===401&&p(m,!0)}catch{}p(S,!0);async function Bt(){var $e,Pt,Mt,Gt;try{p(s,await Wc(),!0)}catch{}try{const[ni,$t]=await Promise.all([dF(),ca()]);p(oe,Array.isArray($t.pinnedPackages)?$t.pinnedPackages:[],!0),p(ve,Object.keys(ni).filter(z=>!o(oe).includes(z)).length,!0);const Jt=o(Me);p(Me,(($e=$t.broker)==null?void 0:$e.enabled)===!0),Jt&&!o(Me)&&o(n)==="security"&&it("scripts");const w=o(be);p(be,((Pt=$t.services)==null?void 0:Pt.enabled)===!0),w&&!o(be)&&o(n)==="adapters"&&it("scripts")}catch{}!((Mt=o(s))!=null&&Mt.matterEnabled)&&o(n)==="matter"&&it("scripts"),!((Gt=o(s))!=null&&Gt.dbEnabled)&&o(n)==="db"&&it("scripts")}Bt();const J=setInterval(Bt,5e3),qe=Wo("mqtt:status",$e=>{$e.connected===!1?(p(G,!0),p(H,!1),p(K,!1)):(p(G,!1),p(H,$e.ready===!1),p(K,$e.ready===!0))}),Pe=Wo("matter:deviceList",$e=>{Array.isArray($e.devices)&&p(te,$e.devices.map(Pt=>({nodeId:String(Pt.nodeId),online:!!Pt.online})),!0)}),Be=Wo("matter:deviceStatus",$e=>{if($e.nodeId===void 0)return;const Pt=String($e.nodeId),Mt=!!$e.online;p(te,o(te).map(Gt=>Gt.nodeId===Pt?{...Gt,online:Mt}:Gt),!0)}),we=bF();p(De,we.some($e=>$e.level==="error"),!0),p(_e,!o(De)&&we.some($e=>$e.level==="warn"),!0);const Ue=i2($e=>{$e.level==="error"?(p(De,!0),p(_e,!1)):$e.level==="warn"&&!o(De)&&p(_e,!0)});return()=>{window.removeEventListener("hashchange",pe),document.removeEventListener("visibilitychange",Re),clearInterval(J),qe(),Pe(),Be(),Ue()}});var Lt=Vde();Ms("click",G5,()=>{o(a)&&p(a,!1),o(l)&&p(l,!1)});var re=mt(Lt);{var de=pe=>{var Re=Ode(),Bt=g(Re);{var J=ye=>{var ut=dde(),Ot=h(g(ut),2);j("click",Ot,dt),y(ye,ut)};T(Bt,ye=>{var ut;(ut=o(s))!=null&&ut.safeMode&&ye(J)})}var qe=h(Bt,2),Pe=h(g(qe),2);let Be;var we=h(Pe,2);let Ue;var $e=h(g(we),2);{var Pt=ye=>{var ut=jA();P(()=>_i(ut,"title",`${o(ve)??""} package update${o(ve)===1?"":"s"} available`)),y(ye,ut)};T($e,ye=>{o(ve)>0&&ye(Pt)})}var Mt=h(we,2);let Gt;var ni=h(g(Mt),2);{var $t=ye=>{var ut=ude();y(ye,ut)},Jt=ye=>{var ut=hde();y(ye,ut)},w=ye=>{var ut=fde();y(ye,ut)};T(ni,ye=>{o(G)?ye($t):o(H)?ye(Jt,1):o(K)&&ye(w,2)})}var z=h(Mt,2);{var Q=ye=>{var ut=gde();let Ot;var wt=h(g(ut),2);{var Ft=Zt=>{var Wt=jA();P(()=>_i(Wt,"title",o(Ie))),y(Zt,Wt)},ti=Zt=>{var Wt=pde();y(Zt,Wt)};T(wt,Zt=>{o(Se)==="warn"?Zt(Ft):Zt(ti,-1)})}P(()=>Ot=jt(ut,1,"svelte-1n46o8q",null,Ot,{active:o(n)==="adapters"})),j("click",ut,()=>it("adapters")),y(ye,ut)};T(z,ye=>{o(be)&&ye(Q)})}var ae=h(z,2);{var ce=ye=>{var ut=vde();let Ot;P(()=>Ot=jt(ut,1,"svelte-1n46o8q",null,Ot,{active:o(n)==="security"})),j("click",ut,()=>it("security")),y(ye,ut)};T(ae,ye=>{o(Me)&&ye(ce)})}var Ne=h(ae,2);{var W=ye=>{var ut=bde();let Ot;var wt=h(g(ut),2);{var Ft=Wt=>{var gi=xde();y(Wt,gi)},ti=Wt=>{var gi=mde();y(Wt,gi)},Zt=Wt=>{var gi=_de();y(Wt,gi)};T(wt,Wt=>{o(ne)==="all"?Wt(Ft):o(ne)==="some"?Wt(ti,1):o(ne)==="offline"&&Wt(Zt,2)})}P(()=>Ot=jt(ut,1,"svelte-1n46o8q",null,Ot,{active:o(n)==="matter"})),j("click",ut,()=>it("matter")),y(ye,ut)};T(Ne,ye=>{var ut;(ut=o(s))!=null&&ut.matterEnabled&&ye(W)})}var ze=h(Ne,2);{var ct=ye=>{var ut=Cde();let Ot;P(()=>Ot=jt(ut,1,"svelte-1n46o8q",null,Ot,{active:o(n)==="db"})),j("click",ut,()=>it("db")),y(ye,ut)};T(ze,ye=>{var ut;(ut=o(s))!=null&&ut.dbEnabled&&ye(ct)})}var ie=h(ze,2);let me;var Ke=h(ie,2);let Xe;var ht=h(g(Ke),2);{var se=ye=>{var ut=yde();y(ye,ut)},Le=ye=>{var ut=wde();y(ye,ut)};T(ht,ye=>{o(De)?ye(se):o(_e)&&ye(Le,1)})}var $=h(Ke,4),V=h(g($),2),Y=g(V),le=g(Y);le.nodeValue="v1.41.1 ";var Oe=h(le);{var fe=ye=>{var ut=Ede();y(ye,ut)};T(Oe,ye=>{var ut,Ot;(ut=o(s))!=null&&ut.latestVersion&&!((Ot=o(s))!=null&&Ot.docker)&&ye(fe)})}var U=h(Y,2);{var xe=ye=>{var ut=Ade(),Ot=g(ut),wt=h(g(Ot));wt.textContent="v1.41.1";var Ft=h(wt,2);{var ti=Yt=>{var kt=Sde(),Qt=h(mt(kt)),xi=g(Qt);P(()=>F(xi,`v${o(s).latestVersion??""}`)),y(Yt,kt)},Zt=Yt=>{var kt=kde();y(Yt,kt)};T(Ft,Yt=>{var kt;(kt=o(s))!=null&&kt.latestVersion?Yt(ti):Yt(Zt,-1)})}var Wt=h(Ot,2),gi=g(Wt);{var bi=Yt=>{var kt=Dde(),Qt=h(g(kt));P(()=>F(Qt,` Update to v${o(s).latestVersion??""}`)),j("click",kt,nt),y(Yt,kt)};T(gi,Yt=>{var kt;(kt=o(s))!=null&&kt.latestVersion&&Yt(bi)})}var hi=h(gi,2),Ci=g(hi);let xt;var Et=h(Ci);P(()=>{hi.disabled=o(d),xt=jt(Ci,0,"svelte-1n46o8q",null,xt,{spinning:o(d)}),F(Et,` ${o(d)?"Checking…":"Check for updates"}`)}),j("click",ut,Yt=>Yt.stopPropagation()),j("click",hi,ot),y(ye,ut)};T(U,ye=>{var ut;o(l)&&!((ut=o(s))!=null&&ut.docker)&&ye(xe)})}var Te=h(V,2),St=g(Te),He=h(St,2);{var Qe=ye=>{var ut=Mde(),Ot=g(ut);{var wt=gi=>{var bi=Ide(),hi=g(bi);{var Ci=Li=>{const Ii=ft(()=>Math.floor((Date.now()-o(s).startedAt)/1e3)),nn=ft(()=>Math.floor(o(Ii)/86400)),Wi=ft(()=>Math.floor(o(Ii)%86400/3600)),Bi=ft(()=>Math.floor(o(Ii)%3600/60));var Xi=Bde(),en=h(mt(Xi)),Zi=g(en);P(()=>F(Zi,`${o(nn)>0?o(nn)+"d ":""}${o(Wi)>0||o(nn)>0?o(Wi)+"h ":""}${o(Bi)??""}m`)),y(Li,Xi)};T(hi,Li=>{o(s).startedAt&&Li(Ci)})}var xt=h(hi,3),Et=g(xt),Yt=h(xt,3),kt=g(Yt),Qt=h(Yt,3),xi=g(Qt),Pi=h(Qt,2);{var yi=Li=>{var Ii=Fde(),nn=h(mt(Ii)),Wi=g(nn),Bi=h(nn,3),Xi=g(Bi);P(()=>{F(Wi,o(s).matterNodes??0),F(Xi,o(s).matterEndpoints??0)}),y(Li,Ii)};T(Pi,Li=>{o(s).matterEnabled&&Li(yi)})}var Fi=h(Pi,2);{var Ui=Li=>{var Ii=Lde(),nn=h(mt(Ii)),Wi=g(nn),Bi=h(nn,3),Xi=g(Bi);P(()=>{F(Wi,o(s).dbDocs??"—"),F(Xi,o(s).dbViews??"—")}),y(Li,Ii)};T(Fi,Li=>{o(s).dbEnabled&&Li(Ui)})}var ln=h(Fi,3),Ni=g(ln),Ti=h(ln,3),un=g(Ti),Ki=h(Ti,3),tn=g(Ki),Yn=h(Ki,3),cn=g(Yn),Rn=h(Yn,3),Ps=g(Rn),ki=h(Rn,3),dn=g(ki);P(()=>{F(Et,o(s).scripts),F(kt,o(s).topics),F(xi,o(s).mqttMsgPerSec??"—"),F(Ni,o(s).handlers??"—"),F(un,o(s).memMb!=null?o(s).memMb+" MB":"—"),F(tn,o(s).cpuPercent!=null?o(s).cpuPercent+" %":"—"),F(cn,o(s).eluPercent!=null?o(s).eluPercent+" %":"—"),F(Ps,o(s).elMeanMs!=null?o(s).elMeanMs+" ms":"—"),F(dn,o(s).elMaxMs!=null?o(s).elMaxMs+" ms":"—")}),y(gi,bi)},Ft=gi=>{var bi=Pde();y(gi,bi)};T(Ot,gi=>{o(s)?gi(wt):gi(Ft,-1)})}var ti=h(Ot,2),Zt=g(ti);{var Wt=gi=>{var bi=Tde();j("click",bi,()=>{p(a,!1),dt()}),y(gi,bi)};T(Zt,gi=>{var bi;(bi=o(s))!=null&&bi.docker||gi(Wt)})}j("click",ut,gi=>gi.stopPropagation()),y(ye,ut)};T(He,ye=>{o(a)&&ye(Qe)})}var di=h(Te,2);let Si;var ai=h(di,2);{var We=ye=>{var ut=Rde();j("click",ut,M),y(ye,ut)};T(ai,ye=>{o(f)==="password"&&ye(We)})}var bt=h(qe,2),Kt=g(bt);ds(Ir(Kt,{}),ye=>p(O,ye,!0),()=>o(O));var Tt=h(Kt,2);let rt;var yt=g(Tt);{let ye=ft(()=>o(n)==="scripts");hQ(yt,{get active(){return o(ye)}})}var ui=h(Tt,2);let li;var mi=g(ui);Wie(mi,{});var si=h(ui,2);let at;var je=g(si);yie(je,{});var Ye=h(si,2);let Je;var Z=g(Ye);vte(Z,{});var Ae=h(Ye,2);let gt;var q=g(Ae);_oe(q,{});var ee=h(Ae,2);{var ge=ye=>{var ut=Nde();let Ot;var wt=g(ut);Wce(wt,{onstatus:(Ft,ti)=>{p(Se,Ft,!0),p(Ie,ti,!0)}}),P(()=>Ot=jt(ut,1,"page-wrap svelte-1n46o8q",null,Ot,{hidden:o(n)!=="adapters"})),y(ye,ut)};T(ee,ye=>{o(be)&&ye(ge)})}var et=h(ee,2);let tt;var st=g(et);{let ye=ft(()=>o(n)==="secrets");cde(st,{get active(){return o(ye)}})}var vt=h(et,2);let Ut;var qt=g(vt);xee(qt,{});var Rt=h(vt,2);let Vt;var Nt=g(Rt);oJ(Nt,{});var _t=h(Rt,2);let pi;var ke=g(_t);uJ(ke,{}),P(()=>{Be=jt(Pe,1,"svelte-1n46o8q",null,Be,{active:o(n)==="scripts"}),Ue=jt(we,1,"svelte-1n46o8q",null,Ue,{active:o(n)==="packages"}),Gt=jt(Mt,1,"svelte-1n46o8q",null,Gt,{active:o(n)==="mqtt"}),me=jt(ie,1,"svelte-1n46o8q",null,me,{active:o(n)==="secrets"}),Xe=jt(Ke,1,"svelte-1n46o8q",null,Xe,{active:o(n)==="logs"}),Si=jt(di,1,"nav-settings svelte-1n46o8q",null,Si,{active:o(n)==="config"}),rt=jt(Tt,1,"page-wrap svelte-1n46o8q",null,rt,{hidden:o(n)!=="scripts"}),li=jt(ui,1,"page-wrap svelte-1n46o8q",null,li,{hidden:o(n)!=="packages"}),at=jt(si,1,"page-wrap svelte-1n46o8q",null,at,{hidden:o(n)!=="mqtt"}),Je=jt(Ye,1,"page-wrap svelte-1n46o8q",null,Je,{hidden:o(n)!=="matter"}),gt=jt(Ae,1,"page-wrap svelte-1n46o8q",null,gt,{hidden:o(n)!=="security"}),tt=jt(et,1,"page-wrap svelte-1n46o8q",null,tt,{hidden:o(n)!=="secrets"}),Ut=jt(vt,1,"page-wrap svelte-1n46o8q",null,Ut,{hidden:o(n)!=="db"}),Vt=jt(Rt,1,"page-wrap svelte-1n46o8q",null,Vt,{hidden:o(n)!=="config"}),pi=jt(_t,1,"page-wrap svelte-1n46o8q",null,pi,{hidden:o(n)!=="logs"})}),j("click",Pe,()=>it("scripts")),j("click",we,()=>it("packages")),j("click",Mt,()=>it("mqtt")),j("click",ie,()=>it("secrets")),j("click",Ke,()=>{it("logs"),p(De,!1),p(_e,!1)}),j("click",Y,ye=>{ye.stopPropagation(),p(l,!o(l)),p(a,!1)}),j("click",St,ye=>{ye.stopPropagation(),p(a,!o(a)),p(l,!1)}),j("click",di,()=>it("config")),y(pe,Re)};T(re,pe=>{o(S)&&!o(m)&&pe(de)})}var Ce=h(re,2);{var Ze=pe=>{var Re=zde(),Bt=g(Re),J=h(g(Bt),4),qe=h(g(J),2),Pe=h(J,2);{var Be=$e=>{var Pt=Hde(),Mt=g(Pt);P(()=>F(Mt,o(_))),y($e,Pt)};T(Pe,$e=>{o(_)&&$e(Be)})}var we=h(Pe,2),Ue=g(we);P(()=>{qe.disabled=o(E),we.disabled=o(E)||!o(C),F(Ue,o(E)?"Signing in…":"Sign in")}),Ms("submit",Bt,$e=>{$e.preventDefault(),I()}),ii(qe,()=>o(C),$e=>p(C,$e)),y(pe,Re)};T(Ce,pe=>{o(m)&&pe(Ze)})}var Ge=h(Ce,2);{var pt=pe=>{var Re=Wde();y(pe,Re)};T(Ge,pe=>{o(R)&&pe(pt)})}var At=h(Ge,2);{var Dt=pe=>{var Re=jde();y(pe,Re)};T(At,pe=>{o(u)&&pe(Dt)})}y(r,Lt),gs()}ys(["click"]);fM($de,{target:document.getElementById("app")});export{D3 as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as O}from"./monaco-langs-DKJI_o9J.js";import{t as I}from"./index-
|
|
1
|
+
import{m as O}from"./monaco-langs-DKJI_o9J.js";import{t as I}from"./index-BSntxSQW.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
package/dist/web/index.html
CHANGED
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
}
|
|
173
173
|
})();
|
|
174
174
|
</script>
|
|
175
|
-
<script type="module" crossorigin src="/assets/index-
|
|
175
|
+
<script type="module" crossorigin src="/assets/index-BSntxSQW.js"></script>
|
|
176
176
|
<link rel="modulepreload" crossorigin href="/assets/monaco-langs-DKJI_o9J.js">
|
|
177
177
|
<link rel="stylesheet" crossorigin href="/assets/monaco-langs-DyX1CsEw.css">
|
|
178
178
|
<link rel="stylesheet" crossorigin href="/assets/index-CEoqAVCK.css">
|