@task-handoff/controlled-instance 0.0.3 → 0.0.4
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.
- package/LICENSE +202 -0
- package/NOTICE +4 -0
- package/dist/controlled-instance-cli.js +1 -1
- package/package.json +6 -11
- package/ui/assets/{abnfDiagram-VRR7QNED-B1aY5fdU.js → abnfDiagram-VRR7QNED-BFiN2Q76.js} +1 -1
- package/ui/assets/{arc-BAsx6xW3.js → arc-Dq--sBDV.js} +1 -1
- package/ui/assets/{architectureDiagram-ZJ3FMSHR-C9vSG1xS.js → architectureDiagram-ZJ3FMSHR-Db4PxmuE.js} +1 -1
- package/ui/assets/{blockDiagram-677ZJIJ3-ChEQhVtw.js → blockDiagram-677ZJIJ3-BFrzsRE9.js} +1 -1
- package/ui/assets/{c4Diagram-LMCZKHZV-CGMuj2PR.js → c4Diagram-LMCZKHZV-CUMWfjX6.js} +1 -1
- package/ui/assets/channel-D6D-Wcdm.js +1 -0
- package/ui/assets/{chunk-2Q5K7J3B-CtVZtvjD.js → chunk-2Q5K7J3B-CB1EgF5j.js} +1 -1
- package/ui/assets/{chunk-32BRIVSS-CuPWCANC.js → chunk-32BRIVSS-BpsgCkbk.js} +1 -1
- package/ui/assets/{chunk-5VM5RSS4-qmG4uE4i.js → chunk-5VM5RSS4-D2CmjJTK.js} +1 -1
- package/ui/assets/{chunk-EX3LRPZG-i8fs6DEr.js → chunk-EX3LRPZG-B6a-4QdQ.js} +1 -1
- package/ui/assets/{chunk-JWPE2WC7-DKlwLRl6.js → chunk-JWPE2WC7-CaAhbnco.js} +1 -1
- package/ui/assets/{chunk-MOJQB5TN-Dez3sv1m.js → chunk-MOJQB5TN-BVrVauq9.js} +1 -1
- package/ui/assets/{chunk-RYQCIY6F-IMNH7JZH.js → chunk-RYQCIY6F-floPzgi_.js} +1 -1
- package/ui/assets/{chunk-V7JOEXUC-COk4TkdO.js → chunk-V7JOEXUC-CsI-g__8.js} +1 -1
- package/ui/assets/{chunk-VR4S4FIN-DG8Mu-Wj.js → chunk-VR4S4FIN-D8Y1VI2b.js} +1 -1
- package/ui/assets/{chunk-XXDRQBXY-ZUEfVUHK.js → chunk-XXDRQBXY-Cekf3q84.js} +1 -1
- package/ui/assets/classDiagram-OUVF2IWQ-B5JBH9Fz.js +1 -0
- package/ui/assets/classDiagram-v2-EOCWNBFH-B5JBH9Fz.js +1 -0
- package/ui/assets/{cose-bilkent-JH36ORCC-oHQ-hDuX.js → cose-bilkent-JH36ORCC-RBmo63PX.js} +1 -1
- package/ui/assets/{cynefin-VYW2F7L2-CRaHCrP-.js → cynefin-VYW2F7L2-BN3xSlwd.js} +1 -1
- package/ui/assets/{cynefinDiagram-TSTJHNR4-GXutjTQ0.js → cynefinDiagram-TSTJHNR4-3l4UENpc.js} +1 -1
- package/ui/assets/{dagre-VKFMJZFB-cq_dnux1.js → dagre-VKFMJZFB-COl79Q4K.js} +1 -1
- package/ui/assets/{diagram-FQU43EPY-DiFt7aqL.js → diagram-FQU43EPY-CdXE7bBS.js} +1 -1
- package/ui/assets/{diagram-G47NLZAW-CB7nXnoE.js → diagram-G47NLZAW-DFA0Bju6.js} +1 -1
- package/ui/assets/{diagram-NH7WQ7WH-B2jkBh6x.js → diagram-NH7WQ7WH-Dy9tUKxS.js} +1 -1
- package/ui/assets/{diagram-OA4YK3LP-BG8UGq4L.js → diagram-OA4YK3LP-D1FLe4Ab.js} +1 -1
- package/ui/assets/{diagram-WEI45ONY-DV8GhCID.js → diagram-WEI45ONY-BUQTU_sh.js} +1 -1
- package/ui/assets/{ebnfDiagram-CCIWWBDH-D4LjG0gw.js → ebnfDiagram-CCIWWBDH-DE_ci1oj.js} +1 -1
- package/ui/assets/{erDiagram-Q63AITRT-evCm3Q_r.js → erDiagram-Q63AITRT-ChWjJ4b9.js} +1 -1
- package/ui/assets/{flowDiagram-23GEKE2U-DAZ8A5d_.js → flowDiagram-23GEKE2U-LF29m1FZ.js} +1 -1
- package/ui/assets/{ganttDiagram-NO4QXBWP-BKm70XuC.js → ganttDiagram-NO4QXBWP-C6b_JCSo.js} +1 -1
- package/ui/assets/{gitGraphDiagram-IHSO6WYX-Eygzyb15.js → gitGraphDiagram-IHSO6WYX-xE_MdkYR.js} +1 -1
- package/ui/assets/index-6FZ7v5dX.css +1 -0
- package/ui/assets/index-BIbw48nC.js +387 -0
- package/ui/assets/{infoDiagram-FWYZ7A6U-BvZTtoK3.js → infoDiagram-FWYZ7A6U-CEtNx7ws.js} +1 -1
- package/ui/assets/{ishikawaDiagram-FXEZZL3T-DdAC5a44.js → ishikawaDiagram-FXEZZL3T-DW7bDtHL.js} +1 -1
- package/ui/assets/{journeyDiagram-5HDEW3XC-BOPAUFKI.js → journeyDiagram-5HDEW3XC-DCxHm0_Y.js} +1 -1
- package/ui/assets/{kanban-definition-HUTT4EX6-B3qFIVk-.js → kanban-definition-HUTT4EX6-lVRMOBLe.js} +1 -1
- package/ui/assets/{linear-BFWixb6b.js → linear-BIwYlsDY.js} +1 -1
- package/ui/assets/{mermaid.core-3eX2qji0.js → mermaid.core-B01IBkDW.js} +4 -4
- package/ui/assets/{mindmap-definition-LN4V7U3C-DpKag0X-.js → mindmap-definition-LN4V7U3C-BErgcbhL.js} +1 -1
- package/ui/assets/{pegDiagram-2B236MQR-BrH1Ugpx.js → pegDiagram-2B236MQR-Cus1G4uH.js} +1 -1
- package/ui/assets/{pieDiagram-ENE6RG2P-j5qfE0yG.js → pieDiagram-ENE6RG2P-Cy8c84gb.js} +1 -1
- package/ui/assets/{quadrantDiagram-ABIIQ3AL-BIIr40F9.js → quadrantDiagram-ABIIQ3AL-DfxzIOIK.js} +1 -1
- package/ui/assets/{railroadDiagram-RFXS5EU6-CPgeziGt.js → railroadDiagram-RFXS5EU6-DPZcn8Wr.js} +1 -1
- package/ui/assets/{requirementDiagram-TGXJPOKE-Cn6_CXzo.js → requirementDiagram-TGXJPOKE-CaIpeFc_.js} +1 -1
- package/ui/assets/{sankeyDiagram-HTMAVEWB-CK0LEbiU.js → sankeyDiagram-HTMAVEWB-CrGNRaMm.js} +1 -1
- package/ui/assets/{sequenceDiagram-DBY2YBRQ-C1s6mGSC.js → sequenceDiagram-DBY2YBRQ-C18kcqQK.js} +1 -1
- package/ui/assets/{sizeCapture-X5ZJPWSS-DPhd0za2.js → sizeCapture-X5ZJPWSS-CerMxLH-.js} +1 -1
- package/ui/assets/{stateDiagram-2N3HPSRC-ZfCMCBh6.js → stateDiagram-2N3HPSRC-BohrrPCg.js} +1 -1
- package/ui/assets/stateDiagram-v2-6OUMAXLB-D8nDa8ho.js +1 -0
- package/ui/assets/{swimlanes-5IMT3BWC-DVn3lPGV.js → swimlanes-5IMT3BWC-DsNmdb0L.js} +2 -2
- package/ui/assets/swimlanesDiagram-G3AALYLV-BvmD64a2.js +8 -0
- package/ui/assets/{timeline-definition-FHXFAJF6-C5C2JV1N.js → timeline-definition-FHXFAJF6-BgshrCBA.js} +1 -1
- package/ui/assets/ui-vendor-CYGfnfwU.js +3 -0
- package/ui/assets/{vennDiagram-L72KCM5P-Ca00-_aE.js → vennDiagram-L72KCM5P-B6hkO7gb.js} +1 -1
- package/ui/assets/{wardleyDiagram-EHGQE667-C_ZCam0C.js → wardleyDiagram-EHGQE667-ChCeQ23d.js} +1 -1
- package/ui/assets/{xychartDiagram-FW5EYKEG-B3LFKl4D.js → xychartDiagram-FW5EYKEG-VLWto9yh.js} +1 -1
- package/ui/index.html +3 -3
- package/dist/receiver-ink.mjs +0 -1
- package/ui/assets/channel-BuWM3USs.js +0 -1
- package/ui/assets/classDiagram-OUVF2IWQ-B2VG9Hs4.js +0 -1
- package/ui/assets/classDiagram-v2-EOCWNBFH-B2VG9Hs4.js +0 -1
- package/ui/assets/index-C8yNGtsY.css +0 -1
- package/ui/assets/index-SSc24L5N.js +0 -387
- package/ui/assets/stateDiagram-v2-6OUMAXLB-BM5ulBgE.js +0 -1
- package/ui/assets/swimlanesDiagram-G3AALYLV-D_6ZAWMB.js +0 -8
- package/ui/assets/ui-vendor-5uLhTuQK.js +0 -3
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import{_ as Fd,a5 as qr,a4 as Ud,at as tm,ai as Pr,a9 as Yn,au as qd,a7 as Hd,al as Ce,$ as nm,af as Vd,O as be,a3 as mr,aD as cn,a2 as Gd,av as g,ap as Zd,aq as rm,ak as sm,Z as Ae,ag as I,U as ye,aF as D,an as Be,aa as wt,P as am,aj as Pt,p as im,a8 as xt,Y as T,q as om,o as lm,r as cm,S as um,az as Ln,N as dm,ab as Sn,a0 as Fn,ah as vi,M as hm,ay as Xn,L as pm,a1 as ya,c as fm,b as mm,C as gm,a as vm,d as bm,e as ym,m as wm,l as km,H as xm,n as Sm,W as V,F as rt,am as $t,R as k,ao as xs,as as Z,V as pe,aI as jt,j as _m,h as Em,f as Am,D as Tm,i as Cm,g as Rm,k as Om,J as Im,T as Nm,I as Mm,K as zm,aB as jd,aG as Vi,aC as Gi,y as Dm,s as $m,G as Pm,x as Bm,u as Lm,v as Fm,w as Um,z as qm,A as Hm,t as Vm,B as Gm,E as Zm,X as de,ad as Zi,ae as ll,ax as jm,aH as Ts,aE as On,aw as Km,ac as bi,a6 as Xs,aA as Wm,ar as Qm,Q as Jm}from"./ui-vendor-CYGfnfwU.js";import{D as Ym,L as Xm,o as eg}from"./xterm-C0x2rdqx.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();let Kd;const ji=e=>Kd=e,Wd=Symbol();function cl(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ua;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ua||(ua={}));function tg(){const e=Fd(!0),t=e.run(()=>Ce({}));let n=[],r=[];const s=Hd({install(a){ji(s),s._a=a,a.provide(Wd,s),a.config.globalProperties.$pinia=s,r.forEach(i=>n.push(i)),r=[]},use(a){return this._a?n.push(a):r.push(a),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const Qd=()=>{};function vc(e,t,n,r=Qd){e.add(t);const s=()=>{e.delete(t)&&r()};return!n&&nm()&&Vd(s),s}function ys(e,...t){e.forEach(n=>{n(...t)})}const ng=e=>e(),bc=Symbol(),Co=Symbol();function ul(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];cl(s)&&cl(r)&&e.hasOwnProperty(n)&&!qr(r)&&!Ud(r)?e[n]=ul(s,r):e[n]=r}return e}const rg=Symbol();function sg(e){return!cl(e)||!Object.prototype.hasOwnProperty.call(e,rg)}const{assign:Ir}=Object;function ag(e){return!!(qr(e)&&e.effect)}function ig(e,t,n,r){const{state:s,actions:a,getters:i}=t,o=n.state.value[e];let l;function c(){o||(n.state.value[e]=s?s():{});const d=qd(n.state.value[e]);return Ir(d,a,Object.keys(i||{}).reduce((f,m)=>(f[m]=Hd(be(()=>{ji(n);const p=n._s.get(e);return i[m].call(p,p)})),f),{}))}return l=Jd(e,c,t,n,r,!0),l}function Jd(e,t,n={},r,s,a){let i;const o=Ir({actions:{}},n),l={deep:!0};let c,d,f=new Set,m=new Set,p;const w=r.state.value[e];!a&&!w&&(r.state.value[e]={});let y;function x(N){let G;c=d=!1,typeof N=="function"?(N(r.state.value[e]),G={type:ua.patchFunction,storeId:e,events:p}):(ul(r.state.value[e],N),G={type:ua.patchObject,payload:N,storeId:e,events:p});const P=y=Symbol();Yn().then(()=>{y===P&&(c=!0)}),d=!0,ys(f,G,r.state.value[e])}const _=a?function(){const{state:G}=n,P=G?G():{};this.$patch(j=>{Ir(j,P)})}:Qd;function $(){i.stop(),f.clear(),m.clear(),r._s.delete(e)}const z=(N,G="")=>{if(bc in N)return N[Co]=G,N;const P=function(){ji(r);const j=Array.from(arguments),q=new Set,Y=new Set;function te(re){q.add(re)}function he(re){Y.add(re)}ys(m,{args:j,name:P[Co],store:S,after:te,onError:he});let Se;try{Se=N.apply(this&&this.$id===e?this:S,j)}catch(re){throw ys(Y,re),re}return Se instanceof Promise?Se.then(re=>(ys(q,re),re)).catch(re=>(ys(Y,re),Promise.reject(re))):(ys(q,Se),Se)};return P[bc]=!0,P[Co]=G,P},C={_p:r,$id:e,$onAction:vc.bind(null,m),$patch:x,$reset:_,$subscribe(N,G={}){const P=vc(f,N,G.detached,()=>j()),j=i.run(()=>cn(()=>r.state.value[e],q=>{(G.flush==="sync"?d:c)&&N({storeId:e,type:ua.direct,events:p},q)},Ir({},l,G)));return P},$dispose:$},S=Pr(C);r._s.set(e,S);const F=(r._a&&r._a.runWithContext||ng)(()=>r._e.run(()=>(i=Fd()).run(()=>t({action:z}))));for(const N in F){const G=F[N];if(qr(G)&&!ag(G)||Ud(G))a||(w&&sg(G)&&(qr(G)?G.value=w[N]:ul(G,w[N])),r.state.value[e][N]=G);else if(typeof G=="function"){const P=z(G,N);F[N]=P,o.actions[N]=G}}return Ir(S,F),Ir(tm(S),F),Object.defineProperty(S,"$state",{get:()=>r.state.value[e],set:N=>{x(G=>{Ir(G,N)})}}),r._p.forEach(N=>{Ir(S,i.run(()=>N({store:S,app:r._a,pinia:r,options:o})))}),w&&a&&n.hydrate&&n.hydrate(S.$state,w),c=!0,d=!0,S}function s0(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function a(i,o){const l=Gd();return i=i||(l?mr(Wd,null):null),i&&ji(i),i=Kd,i._s.has(e)||(s?Jd(e,t,r,i):ig(e,r,i)),i._s.get(e)}return a.$id=e,a}var Ma=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},og=class extends Ma{#n;#t;#r;constructor(){super(),this.#r=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#n!==e&&(this.#n=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#n=="boolean"?this.#n:globalThis.document?.visibilityState!=="hidden"}},a0=new og,lg={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},cg=class{#n=lg;#t=!1;setTimeoutProvider(e){this.#n=e}setTimeout(e,t){return this.#n.setTimeout(e,t)}clearTimeout(e){this.#n.clearTimeout(e)}setInterval(e,t){return this.#n.setInterval(e,t)}clearInterval(e){this.#n.clearInterval(e)}},as=new cg;function ug(e){setTimeout(e,0)}var dg=typeof window>"u"||"Deno"in globalThis;function Rn(){}function hg(e,t){return typeof e=="function"?e(t):e}function dl(e){return typeof e=="number"&&e>=0&&e!==1/0}function Yd(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Br(e,t){return typeof e=="function"?e(t):e}function yn(e,t){return typeof e=="function"?e(t):e}function yc(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:a,queryKey:i,stale:o}=e;if(i){if(r){if(t.queryHash!==i0(i,t.options))return!1}else if(!ka(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||a&&!a(t))}function wc(e,t){const{exact:n,status:r,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(wa(t.options.mutationKey)!==wa(a))return!1}else if(!ka(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function i0(e,t){return(t?.queryKeyHashFn||wa)(e)}function wa(e){return JSON.stringify(e,(t,n)=>pl(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function ka(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ka(e[n],t[n])):!1}var pg=Object.prototype.hasOwnProperty;function Xd(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=kc(e)&&kc(t);if(!r&&!(pl(e)&&pl(t)))return t;const a=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),o=i.length,l=r?new Array(o):{};let c=0;for(let d=0;d<o;d++){const f=r?d:i[d],m=e[f],p=t[f];if(m===p){l[f]=m,(r?d<a:pg.call(e,f))&&c++;continue}if(m===null||p===null||typeof m!="object"||typeof p!="object"){l[f]=p;continue}const w=Xd(m,p,n+1);l[f]=w,w===m&&c++}return a===o&&c===a?e:l}function hl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function kc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pl(e){if(!xc(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!xc(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function xc(e){return Object.prototype.toString.call(e)==="[object Object]"}function fg(e){return new Promise(t=>{as.setTimeout(t,e)})}function fl(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Xd(e,t):t}function mg(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function gg(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var o0=Symbol();function eh(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===o0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Sc(e,t){return typeof e=="function"?e(...t):!!e}function vg(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var xa=(()=>{let e=()=>dg;return{isServer(){return e()},setIsServer(t){e=t}}})();function ml(){let e,t;const n=new Promise((s,a)=>{e=s,t=a});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var bg=ug;function yg(){let e=[],t=0,n=o=>{o()},r=o=>{o()},s=bg;const a=o=>{t?e.push(o):s(()=>{n(o)})},i=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||i()}return l},batchCalls:o=>(...l)=>{a(()=>{o(...l)})},schedule:a,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var en=yg(),wg=class extends Ma{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#n}},_i=new wg;function kg(e){return Math.min(1e3*2**e,3e4)}function th(e){return(e??"online")==="online"?_i.isOnline():!0}var gl=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function nh(e){let t=!1,n=0,r;const s=ml(),a=()=>s.status!=="pending",i=y=>{if(!a()){const x=new gl(y);m(x),e.onCancel?.(x)}},o=()=>{t=!0},l=()=>{t=!1},c=()=>a0.isFocused()&&(e.networkMode==="always"||_i.isOnline())&&e.canRun(),d=()=>th(e.networkMode)&&e.canRun(),f=y=>{a()||(r?.(),s.resolve(y))},m=y=>{a()||(r?.(),s.reject(y))},p=()=>new Promise(y=>{r=x=>{(a()||c())&&y(x)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),w=()=>{if(a())return;let y;const x=n===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(_){y=Promise.reject(_)}Promise.resolve(y).then(f).catch(_=>{if(a())return;const $=e.retry??(xa.isServer()?0:3),z=e.retryDelay??kg,C=typeof z=="function"?z(n,_):z,S=$===!0||typeof $=="number"&&n<$||typeof $=="function"&&$(n,_);if(t||!S){m(_);return}n++,e.onFail?.(n,_),fg(C).then(()=>c()?void 0:p()).then(()=>{t?m(_):w()})})};return{promise:s,status:()=>s.status,cancel:i,continue:()=>(r?.(),s),cancelRetry:o,continueRetry:l,canStart:d,start:()=>(d()?w():p().then(w),s)}}var rh=class{#n;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dl(this.gcTime)&&(this.#n=as.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xa.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#n!==void 0&&(as.clearTimeout(this.#n),this.#n=void 0)}};function xg(e){return{onFetch:(t,n)=>{const r=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let d=!1;const f=w=>{vg(w,()=>t.signal,()=>d=!0)},m=eh(t.options,t.fetchOptions),p=async(w,y,x)=>{if(d)return Promise.reject(t.signal.reason);if(y==null&&w.pages.length)return Promise.resolve(w);const $=(()=>{const E={client:t.client,queryKey:t.queryKey,pageParam:y,direction:x?"backward":"forward",meta:t.options.meta};return f(E),E})(),z=await m($),{maxPages:C}=t.options,S=x?gg:mg;return{pages:S(w.pages,z,C),pageParams:S(w.pageParams,y,C)}};if(s&&a.length){const w=s==="backward",y=w?Sg:_c,x={pages:a,pageParams:i},_=y(r,x);o=await p(x,_,w)}else{const w=e??a.length;do{const y=l===0?i[0]??r.initialPageParam:_c(r,o);if(l>0&&y==null)break;o=await p(o,y),l++}while(l<w)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function _c(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Sg(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var _g=class extends rh{#n;#t;#r;#s;#e;#a;#i;#o;constructor(e){super(),this.#o=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#e=e.client,this.#s=this.#e.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ac(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#n}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},e?._type&&(this.#n=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ac(this.options);t.data!==void 0&&(this.setState(Ec(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,t){const n=fl(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Rn).catch(Rn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>yn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===o0||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Br(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Yd(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#o||this.#d()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#d(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(c=>c.options.queryFn);l&&this.setOptions(l.options)}const n=new AbortController,r=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const l=eh(this.options,t),d=(()=>{const f={client:this.#e,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#o=!1,this.options.persister?this.options.persister(l,d,this):l(d)},i=(()=>{const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#e,state:this.state,fetchFn:s};return r(l),l})();(this.#n==="infinite"?xg(this.options.pages):this.options.behavior)?.onFetch(i,this),this.#r=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#l({type:"fetch",meta:i.fetchOptions?.meta}),this.#a=nh({initialPromise:t?.initialPromise,fn:i.fetchFn,onCancel:l=>{l instanceof gl&&l.revert&&this.setState({...this.#r,fetchStatus:"idle"}),n.abort()},onFail:(l,c)=>{this.#l({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0});try{const l=await this.#a.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#s.config.onSuccess?.(l,this),this.#s.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof gl){if(l.silent)return this.#a.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#l({type:"error",error:l}),this.#s.config.onError?.(l,this),this.#s.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...sh(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Ec(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#r=e.manual?r:void 0,r;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),en.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function sh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:th(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ec(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ac(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Eg=class extends Ma{constructor(e,t){super(),this.options=t,this.#n=e,this.#o=null,this.#i=ml(),this.bindMethods(),this.setOptions(t)}#n;#t=void 0;#r=void 0;#s=void 0;#e;#a;#i;#o;#d;#l;#f;#h;#c;#p;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Tc(this.#t,this.options)?this.#u():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vl(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vl(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#k(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#n.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),t._defaulted&&!hl(this.options,t)&&this.#n.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Cc(this.#t,n,this.options,t)&&this.#u(),this.updateResult(),r&&(this.#t!==n||yn(this.options.enabled,this.#t)!==yn(t.enabled,this.#t)||Br(this.options.staleTime,this.#t)!==Br(t.staleTime,this.#t))&&this.#m();const s=this.#v();r&&(this.#t!==n||yn(this.options.enabled,this.#t)!==yn(t.enabled,this.#t)||s!==this.#p)&&this.#b(s)}getOptimisticResult(e){const t=this.#n.getQueryCache().build(this.#n,e),n=this.createResult(t,e);return Tg(this,n)&&(this.#s=n,this.#a=this.options,this.#e=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#g.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#n.defaultQueryOptions(e),n=this.#n.getQueryCache().build(this.#n,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#u({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#u(e){this.#x();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Rn)),t}#m(){this.#w();const e=Br(this.options.staleTime,this.#t);if(xa.isServer()||this.#s.isStale||!dl(e))return;const n=Yd(this.#s.dataUpdatedAt,e)+1;this.#h=as.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#b(e){this.#k(),this.#p=e,!(xa.isServer()||yn(this.options.enabled,this.#t)===!1||!dl(this.#p)||this.#p===0)&&(this.#c=as.setInterval(()=>{(this.options.refetchIntervalInBackground||a0.isFocused())&&this.#u()},this.#p))}#y(){this.#m(),this.#b(this.#v())}#w(){this.#h!==void 0&&(as.clearTimeout(this.#h),this.#h=void 0)}#k(){this.#c!==void 0&&(as.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,s=this.#s,a=this.#e,i=this.#a,l=e!==n?e.state:this.#r,{state:c}=e;let d={...c},f=!1,m;if(t._optimisticResults){const N=this.hasListeners(),G=!N&&Tc(e,t),P=N&&Cc(e,n,t,r);(G||P)&&(d={...d,...sh(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:w,status:y}=d;m=d.data;let x=!1;if(t.placeholderData!==void 0&&m===void 0&&y==="pending"){let N;s?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(N=s.data,x=!0):N=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,N!==void 0&&(y="success",m=fl(s?.data,N,t),f=!0)}if(t.select&&m!==void 0&&!x)if(s&&m===a?.data&&t.select===this.#d)m=this.#l;else try{this.#d=t.select,m=t.select(m),m=fl(s?.data,m,t),this.#l=m,this.#o=null}catch(N){this.#o=N}this.#o&&(p=this.#o,m=this.#l,w=Date.now(),y="error");const _=d.fetchStatus==="fetching",$=y==="pending",z=y==="error",C=$&&_,S=m!==void 0,F={status:y,fetchStatus:d.fetchStatus,isPending:$,isSuccess:y==="success",isError:z,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:w,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:_,isRefetching:_&&!$,isLoadingError:z&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:z&&S,isStale:l0(e,t),refetch:this.refetch,promise:this.#i,isEnabled:yn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const N=F.data!==void 0,G=F.status==="error"&&!N,P=Y=>{G?Y.reject(F.error):N&&Y.resolve(F.data)},j=()=>{const Y=this.#i=F.promise=ml();P(Y)},q=this.#i;switch(q.status){case"pending":e.queryHash===n.queryHash&&P(q);break;case"fulfilled":(G||F.data!==q.value)&&j();break;case"rejected":(!G||F.error!==q.reason)&&j();break}}return F}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#e=this.#t.state,this.#a=this.options,this.#e.data!==void 0&&(this.#f=this.#t),hl(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#g.size)return!0;const a=new Set(s??this.#g);return this.options.throwOnError&&a.add("error"),Object.keys(this.#s).some(i=>{const o=i;return this.#s[o]!==e[o]&&a.has(o)})};this.#S({listeners:n()})}#x(){const e=this.#n.getQueryCache().build(this.#n,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(e){en.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#n.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Ag(e,t){return yn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&yn(t.retryOnMount,e)===!1)}function Tc(e,t){return Ag(e,t)||e.state.data!==void 0&&vl(e,t,t.refetchOnMount)}function vl(e,t,n){if(yn(t.enabled,e)!==!1&&Br(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&l0(e,t)}return!1}function Cc(e,t,n,r){return(e!==t||yn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&l0(e,n)}function l0(e,t){return yn(t.enabled,e)!==!1&&e.isStaleByTime(Br(t.staleTime,e))}function Tg(e,t){return!hl(e.getCurrentResult(),t)}var Cg=class extends rh{#n;#t;#r;#s;constructor(e){super(),this.#n=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#t=[],this.state=e.state||Rg(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#e({type:"continue"})},n={client:this.#n,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=nh({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,i)=>{this.#e({type:"failed",failureCount:a,error:i})},onPause:()=>{this.#e({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const r=this.state.status==="pending",s=!this.#s.canStart();try{if(r)t();else{this.#e({type:"pending",variables:e,isPaused:s}),this.#r.config.onMutate&&await this.#r.config.onMutate(e,this,n);const i=await this.options.onMutate?.(e,n);i!==this.state.context&&this.#e({type:"pending",context:i,variables:e,isPaused:s})}const a=await this.#s.start();return await this.#r.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#r.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#e({type:"success",data:a}),a}catch(a){try{await this.#r.config.onError?.(a,e,this.state.context,this,n)}catch(i){Promise.reject(i)}try{await this.options.onError?.(a,e,this.state.context,n)}catch(i){Promise.reject(i)}try{await this.#r.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n)}catch(i){Promise.reject(i)}try{await this.options.onSettled?.(void 0,a,e,this.state.context,n)}catch(i){Promise.reject(i)}throw this.#e({type:"error",error:a}),a}finally{this.#r.runNext(this)}}#e(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),en.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function Rg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ah=class extends Ma{constructor(t={}){super(),this.config=t,this.#n=new Set,this.#t=new Map,this.#r=0}#n;#t;#r;build(t,n,r){const s=new Cg({client:t,mutationCache:this,mutationId:++this.#r,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){this.#n.add(t);const n=Ga(t);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(t):this.#t.set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#n.delete(t)){const n=Ga(t);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&this.#t.delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ga(t);if(typeof n=="string"){const s=this.#t.get(n)?.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){const n=Ga(t);return typeof n=="string"?this.#t.get(n)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){en.batch(()=>{this.#n.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#n.clear(),this.#t.clear()})}getAll(){return Array.from(this.#n)}find(t){const n={exact:!0,...t};return this.getAll().find(r=>wc(n,r))}findAll(t={}){return this.getAll().filter(n=>wc(t,n))}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return en.batch(()=>Promise.all(t.map(n=>n.continue().catch(Rn))))}};function Ga(e){return e.options.scope?.id}var ih=class extends Ma{constructor(t={}){super(),this.config=t,this.#n=new Map}#n;build(t,n,r){const s=n.queryKey,a=n.queryHash??i0(s,n);let i=this.get(a);return i||(i=new _g({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){this.#n.has(t.queryHash)||(this.#n.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=this.#n.get(t.queryHash);n&&(t.destroy(),n===t&&this.#n.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#n.get(t)}getAll(){return[...this.#n.values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>yc(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>yc(t,r)):n}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){en.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){en.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Og=class{#n;#t;#r;#s;#e;#a;#i;#o;constructor(t={}){this.#n=t.queryCache||new ih,this.#t=t.mutationCache||new ah,this.#r=t.defaultOptions||{},this.#s=new Map,this.#e=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=a0.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#n.onFocus())}),this.#o=_i.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#n.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#n.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const n=this.defaultQueryOptions({queryKey:t});return this.#n.get(n.queryHash)?.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=this.#n.build(this,n),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Br(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(t){return this.#n.findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.defaultQueryOptions({queryKey:t}),i=this.#n.get(s.queryHash)?.state.data,o=hg(n,i);if(o!==void 0)return this.#n.build(this,s).setData(o,{...r,manual:!0})}setQueriesData(t,n,r){return en.batch(()=>this.#n.findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t){const n=this.defaultQueryOptions({queryKey:t});return this.#n.get(n.queryHash)?.state}removeQueries(t){const n=this.#n;en.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=this.#n;return en.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},s=en.batch(()=>this.#n.findAll(t).map(a=>a.cancel(r)));return Promise.all(s).then(Rn).catch(Rn)}invalidateQueries(t,n={}){return en.batch(()=>(this.#n.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},s=en.batch(()=>this.#n.findAll(t).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,r);return r.throwOnError||(i=i.catch(Rn)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(s).then(Rn)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=this.#n.build(this,n);return r.isStaleByTime(Br(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Rn).catch(Rn)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Rn).catch(Rn)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return _i.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#n}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(t){this.#r=t}setQueryDefaults(t,n){this.#s.set(wa(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#s.values()],r={};return n.forEach(s=>{ka(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,n){this.#e.set(wa(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#e.values()],r={};return n.forEach(s=>{ka(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...this.#r.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=i0(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===o0&&(n.enabled=!1),n}defaultMutationOptions(t){return t?._defaulted?t:{...this.#r.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#n.clear(),this.#t.clear()}},Ig="VUE_QUERY_CLIENT";function oh(e){const t=e?`:${e}`:"";return`${Ig}${t}`}function Rc(e,t){Object.keys(e).forEach(n=>{e[n]=t[n]})}function bl(e,t,n="",r=0){if(t){const s=t(e,n,r);if(s===void 0&&qr(e)||s!==void 0)return s}if(Array.isArray(e))return e.map((s,a)=>bl(s,t,String(a),r+1));if(typeof e=="object"&&Mg(e)){const s=Object.entries(e).map(([a,i])=>[a,bl(i,t,a,r+1)]);return Object.fromEntries(s)}return e}function Ng(e,t){return bl(e,t)}function Qe(e,t=!1){return Ng(e,(n,r,s)=>{if(s===1&&r==="queryKey")return Qe(n,!0);if(t&&zg(n))return Qe(n(),t);if(qr(n))return Qe(g(n),t)})}function Mg(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function zg(e){return typeof e=="function"}function jr(e=""){if(!Gd())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=oh(e),n=mr(t);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}var Dg=class extends ih{find(e){return super.find(Qe(e))}findAll(e={}){return super.findAll(Qe(e))}},$g=class extends ah{find(e){return super.find(Qe(e))}findAll(e={}){return super.findAll(Qe(e))}},Pg=class extends Og{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new Dg,mutationCache:e.mutationCache||new $g};super(t),this.isRestoring=Ce(!1)}isFetching(e={}){return super.isFetching(Qe(e))}isMutating(e={}){return super.isMutating(Qe(e))}getQueryData(e){return super.getQueryData(Qe(e))}ensureQueryData(e){return super.ensureQueryData(Qe(e))}getQueriesData(e){return super.getQueriesData(Qe(e))}setQueryData(e,t,n={}){return super.setQueryData(Qe(e),t,Qe(n))}setQueriesData(e,t,n={}){return super.setQueriesData(Qe(e),t,Qe(n))}getQueryState(e){return super.getQueryState(Qe(e))}removeQueries(e={}){return super.removeQueries(Qe(e))}resetQueries(e={},t={}){return super.resetQueries(Qe(e),Qe(t))}cancelQueries(e={},t={}){return super.cancelQueries(Qe(e),Qe(t))}invalidateQueries(e={},t={}){const n=Qe(e),r=Qe(t);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const s={...n,type:n.refetchType??n.type??"active"};return Yn().then(()=>super.refetchQueries(s,r))}refetchQueries(e={},t={}){return super.refetchQueries(Qe(e),Qe(t))}fetchQuery(e){return super.fetchQuery(Qe(e))}prefetchQuery(e){return super.prefetchQuery(Qe(e))}fetchInfiniteQuery(e){return super.fetchInfiniteQuery(Qe(e))}prefetchInfiniteQuery(e){return super.prefetchInfiniteQuery(Qe(e))}setDefaultOptions(e){super.setDefaultOptions(Qe(e))}setQueryDefaults(e,t){super.setQueryDefaults(Qe(e),Qe(t))}getQueryDefaults(e){return super.getQueryDefaults(Qe(e))}setMutationDefaults(e,t){super.setMutationDefaults(Qe(e),Qe(t))}getMutationDefaults(e){return super.getMutationDefaults(Qe(e))}},Bg={install:(e,t={})=>{const n=oh(t.queryClientKey);let r;if("queryClient"in t&&t.queryClient)r=t.queryClient;else{const i="queryClientConfig"in t?t.queryClientConfig:void 0;r=new Pg(i)}xa.isServer()||r.mount();let s=()=>{};if(t.clientPersister){r.isRestoring&&(r.isRestoring.value=!0);const[i,o]=t.clientPersister(r);s=i,o.then(()=>{r.isRestoring&&(r.isRestoring.value=!1),t.clientPersisterOnSuccess?.(r)})}const a=()=>{r.unmount(),s()};if(e.onUnmount)e.onUnmount(a);else{const i=e.unmount;e.unmount=function(){a(),i()}}e.provide(n,r)}};function Lg(e,t,n){const r=jr(),s=be(()=>{let p=t;typeof p=="function"&&(p=p());const w=Qe(p);typeof w.enabled=="function"&&(w.enabled=w.enabled());const y=r.defaultQueryOptions(w);return y._optimisticResults=r.isRestoring?.value?"isRestoring":"optimistic",y}),a=new e(r,s.value),i=s.value.shallow?Zd(a.getCurrentResult()):Pr(a.getCurrentResult());let o=()=>{};r.isRestoring&&cn(r.isRestoring,p=>{p||(o(),o=a.subscribe(w=>{Rc(i,w)}))},{immediate:!0});const l=()=>{a.setOptions(s.value),Rc(i,a.getCurrentResult())};cn(s,l),Vd(()=>{o()});const c=(...p)=>(l(),i.refetch(...p)),d=()=>new Promise((p,w)=>{let y=()=>{};const x=()=>{if(s.value.enabled!==!1){a.setOptions(s.value);const _=a.getOptimisticResult(s.value);_.isStale?(y(),a.fetchOptimistic(s.value).then(p,$=>{Sc(s.value.throwOnError,[$,a.getCurrentQuery()])?w($):p(a.getCurrentResult())})):(y(),p(_))}};x(),y=cn(s,x)});cn(()=>i.error,p=>{if(i.isError&&!i.isFetching&&Sc(s.value.throwOnError,[p,a.getCurrentQuery()]))throw p});const f=s.value.shallow?rm(i):sm(i),m=qd(f);for(const p in i)typeof i[p]=="function"&&(m[p]=i[p]);return m.suspense=d,m.refetch=c,m}function er(e,t){return Lg(Eg,e)}function lh(){return typeof window>"u"?"":(window.__TASK_HANDOFF_PUBLIC_BASE__||"").replace(/\/$/,"")}function Pn(e){if(!e||/^[a-z][a-z\d+.-]*:/i.test(e))return e;const t=e.startsWith("/")?e:`/${e}`;return`${lh()}${t}`}function Ei(e){return Pn(e).replace(/^\//,"")}function Fg(){return Pn("/api")}function ch(e,t=""){const n=window.location.protocol==="https:"?"wss:":"ws:",r=new URL(Pn(e),window.location.origin);return r.protocol=n,t&&r.searchParams.set("token",t),r.toString()}class yl extends Error{response;request;options;constructor(t,n,r){const s=t.status||t.status===0?t.status:"",a=t.statusText??"",i=`${s} ${a}`.trim(),o=i?`status code ${i}`:"an unknown error";super(`Request failed with ${o}: ${n.method} ${n.url}`),this.name="HTTPError",this.response=t,this.request=n,this.options=r}}class uh extends Error{name="NonError";value;constructor(t){let n="Non-error value was thrown";try{typeof t=="string"?n=t:t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"&&(n=t.message)}catch{}super(n),this.value=t}}class Ro extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(t){const n=t?.cause?t.cause instanceof Error?t.cause:new uh(t.cause):void 0;super(t?.code?`Forced retry: ${t.code}`:"Forced retry",n?{cause:n}:void 0),this.customDelay=t?.delay,this.code=t?.code,this.customRequest=t?.request}}const Oc=(()=>{let e=!1,t=!1;const n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(n&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported BodyInit type")return!1;throw s}return e&&!t})(),Ug=typeof globalThis.AbortController=="function",dh=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",qg=typeof globalThis.ReadableStream=="function",Hg=typeof globalThis.FormData=="function",hh=["get","post","put","patch","head","delete"],Vg={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Oo=2147483647,Gg=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,ph=Symbol("stop");class fh{options;constructor(t){this.options=t}}const Zg=e=>new fh(e),jg={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Kg={next:!0},Wg={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Qg=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[n,r]of e)t+=Gg,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{const t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},mh=(e,t,n)=>{let r,s=0;return e.pipeThrough(new TransformStream({transform(a,i){if(i.enqueue(a),r){s+=r.byteLength;let o=t===0?0:s/t;o>=1&&(o=1-Number.EPSILON),n?.({percent:o,totalBytes:Math.max(t,s),transferredBytes:s},r)}r=a},flush(){r&&(s+=r.byteLength,n?.({percent:1,totalBytes:Math.max(t,s),transferredBytes:s},r))}}))},Jg=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const n=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(mh(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},Yg=(e,t,n)=>{if(!e.body)return e;const r=Qg(n??e.body);return new Request(e,{duplex:"half",body:mh(e.body,r,t)})},rs=e=>e!==null&&typeof e=="object",Za=(...e)=>{for(const t of e)if((!rs(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return c0({},...e)},gh=(e={},t={})=>{const n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,s=new globalThis.Headers(t);for(const[a,i]of s.entries())r&&i==="undefined"||i===void 0?n.delete(a):n.set(a,i);return n};function ja(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:c0(e[n]??[],t[n]??[])}const vh=(e={},t={})=>({beforeRequest:ja(e,t,"beforeRequest"),beforeRetry:ja(e,t,"beforeRetry"),afterResponse:ja(e,t,"afterResponse"),beforeError:ja(e,t,"beforeError")}),Xg=(e,t)=>{const n=new URLSearchParams;for(const r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(const[s,a]of r.entries())n.append(s,a);else if(Array.isArray(r))for(const s of r){if(!Array.isArray(s)||s.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(s[0]),String(s[1]))}else if(rs(r))for(const[s,a]of Object.entries(r))a!==void 0&&n.append(s,String(a));else{const s=new URLSearchParams(r);for(const[a,i]of s.entries())n.append(a,i)}return n},c0=(...e)=>{let t={},n={},r={},s;const a=[];for(const i of e)if(Array.isArray(i))Array.isArray(t)||(t=[]),t=[...t,...i];else if(rs(i)){for(let[o,l]of Object.entries(i)){if(o==="signal"&&l instanceof globalThis.AbortSignal){a.push(l);continue}if(o==="context"){if(l!=null&&(!rs(l)||Array.isArray(l)))throw new TypeError("The `context` option must be an object");t={...t,context:l==null?{}:{...t.context,...l}};continue}if(o==="searchParams"){l==null?s=void 0:s=s===void 0?l:Xg(s,l);continue}rs(l)&&o in t&&(l=c0(t[o],l)),t={...t,[o]:l}}rs(i.hooks)&&(r=vh(r,i.hooks),t.hooks=r),rs(i.headers)&&(n=gh(n,i.headers),t.headers=n)}return s!==void 0&&(t.searchParams=s),a.length>0&&(a.length===1?t.signal=a[0]:dh?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},e4=e=>hh.includes(e)?e.toUpperCase():e,t4=["get","put","head","delete","options","trace"],n4=[408,413,429,500,502,503,504],r4=[413,429,503],Ic={limit:2,methods:t4,statusCodes:n4,afterStatusCodes:r4,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},s4=(e={})=>{if(typeof e=="number")return{...Ic,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&=e.methods.map(n=>n.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0));return{...Ic,...t}};class wl extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}}async function a4(e,t,n,r){return new Promise((s,a)=>{const i=setTimeout(()=>{n&&n.abort(),a(new wl(e))},r.timeout);r.fetch(e,t).then(s).catch(a).then(()=>{clearTimeout(i)})})}async function i4(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",s,{once:!0}));function s(){clearTimeout(a),r(t.reason)}const a=setTimeout(()=>{t?.removeEventListener("abort",s),n()},e)})}const o4=(e,t)=>{const n={};for(const r in t)Object.hasOwn(t,r)&&!(r in Wg)&&!(r in jg)&&(!(r in e)||r in Kg)&&(n[r]=t[r]);return n},l4=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e=="object"?Object.keys(e).length>0:typeof e=="string"?e.trim().length>0:!!e;function c4(e){return e instanceof yl||e?.name===yl.name}function u4(e){return e instanceof wl||e?.name===wl.name}class Sa{static create(t,n){const r=new Sa(t,n),s=async()=>{if(typeof r.#e.timeout=="number"&&r.#e.timeout>Oo)throw new RangeError(`The \`timeout\` option cannot be greater than ${Oo}`);await Promise.resolve();let i=await r.#g();for(const o of r.#e.hooks.afterResponse){const l=r.#f(i.clone());let c;try{c=await o(r.request,r.#u(),l,{retryCount:r.#r})}catch(f){throw r.#c(l),r.#c(i),f}if(c instanceof fh)throw r.#c(l),r.#c(i),new Ro(c.options);const d=c instanceof globalThis.Response?c:i;l!==d&&r.#c(l),i!==d&&r.#c(i),i=d}if(r.#f(i),!i.ok&&(typeof r.#e.throwHttpErrors=="function"?r.#e.throwHttpErrors(i.status):r.#e.throwHttpErrors)){let o=new yl(i,r.request,r.#u());for(const l of r.#e.hooks.beforeError)o=await l(o,{retryCount:r.#r});throw o}if(r.#e.onDownloadProgress){if(typeof r.#e.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!qg)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const o=i.clone();return r.#c(i),Jg(o,r.#e.onDownloadProgress)}return i},a=r.#p(s).finally(()=>{const i=r.#a;r.#h(i?.body??void 0),r.#h(r.request.body??void 0)});for(const[i,o]of Object.entries(Vg))i==="bytes"&&typeof globalThis.Response?.prototype?.bytes!="function"||(a[i]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||o);const l=await a;if(i==="json"){if(l.status===204)return"";const c=await l.text();return c===""?"":n.parseJson?n.parseJson(c):JSON.parse(c)}return l[i]()});return a}static#n(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof URLSearchParams)?Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0)):t}request;#t;#r=0;#s;#e;#a;#i;#o;constructor(t,n={}){if(this.#s=t,this.#e={...n,headers:gh(this.#s.headers,n.headers),hooks:vh({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:e4(n.method??this.#s.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:s4(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}},typeof this.#s!="string"&&!(this.#s instanceof URL||this.#s instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#e.prefixUrl&&typeof this.#s=="string"){if(this.#s.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#e.prefixUrl.endsWith("/")||(this.#e.prefixUrl+="/"),this.#s=this.#e.prefixUrl+this.#s}Ug&&dh&&(this.#i=this.#e.signal??this.#s.signal,this.#t=new globalThis.AbortController,this.#e.signal=this.#i?AbortSignal.any([this.#i,this.#t.signal]):this.#t.signal),Oc&&(this.#e.duplex="half"),this.#e.json!==void 0&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));const r=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(this.#s instanceof globalThis.Request&&(Hg&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!r&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#s,this.#e),l4(this.#e.searchParams)){const a="?"+(typeof this.#e.searchParams=="string"?this.#e.searchParams.replace(/^\?/,""):new URLSearchParams(Sa.#n(this.#e.searchParams)).toString()),i=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,a);this.request=new globalThis.Request(i,this.#e)}if(this.#e.onUploadProgress){if(typeof this.#e.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Oc)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#v(this.request,this.#e.body??void 0)}}#d(){const t=this.#e.retry.delay(this.#r);let n=t;this.#e.retry.jitter===!0?n=Math.random()*t:typeof this.#e.retry.jitter=="function"&&(n=this.#e.retry.jitter(t),(!Number.isFinite(n)||n<0)&&(n=t));const r=this.#e.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,n)}async#l(t){if(this.#r++,this.#r>this.#e.retry.limit)throw t;const n=t instanceof Error?t:new uh(t);if(n instanceof Ro)return n.customDelay??this.#d();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw t;if(this.#e.retry.shouldRetry!==void 0){const r=await this.#e.retry.shouldRetry({error:n,retryCount:this.#r});if(r===!1)throw t;if(r===!0)return this.#d()}if(u4(t)&&!this.#e.retry.retryOnTimeout)throw t;if(c4(t)){if(!this.#e.retry.statusCodes.includes(t.response.status))throw t;const r=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Retry-After")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(r&&this.#e.retry.afterStatusCodes.includes(t.response.status)){let s=Number(r)*1e3;Number.isNaN(s)?s=Date.parse(r)-Date.now():s>=Date.parse("2024-01-01")&&(s-=Date.now());const a=this.#e.retry.maxRetryAfter??s;return s<a?s:a}if(t.response.status===413)throw t}return this.#d()}#f(t){return this.#e.parseJson&&(t.json=async()=>this.#e.parseJson(await t.text())),t}#h(t){t&&t.cancel().catch(()=>{})}#c(t){this.#h(t.body??void 0)}async#p(t){try{return await t()}catch(n){const r=Math.min(await this.#l(n),Oo);if(this.#r<1)throw n;if(await i4(r,this.#i?{signal:this.#i}:{}),n instanceof Ro&&n.customRequest){const s=this.#e.signal?new globalThis.Request(n.customRequest,{signal:this.#e.signal}):new globalThis.Request(n.customRequest);this.#m(s)}for(const s of this.#e.hooks.beforeRetry){const a=await s({request:this.request,options:this.#u(),error:n,retryCount:this.#r});if(a instanceof globalThis.Request){this.#m(a);break}if(a instanceof globalThis.Response)return a;if(a===ph)return}return this.#p(t)}}async#g(){this.#t?.signal.aborted&&(this.#t=new globalThis.AbortController,this.#e.signal=this.#i?AbortSignal.any([this.#i,this.#t.signal]):this.#t.signal,this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));for(const n of this.#e.hooks.beforeRequest){const r=await n(this.request,this.#u(),{retryCount:this.#r});if(r instanceof Response)return r;if(r instanceof globalThis.Request){this.#m(r);break}}const t=o4(this.request,this.#e);return this.#a=this.request,this.request=this.#a.clone(),this.#e.timeout===!1?this.#e.fetch(this.#a,t):a4(this.#a,t,this.#t,this.#e)}#u(){if(!this.#o){const{hooks:t,...n}=this.#e;this.#o=Object.freeze(n)}return this.#o}#m(t){this.#o=void 0,this.request=this.#v(t)}#v(t,n){return!this.#e.onUploadProgress||!t.body?t:Yg(t,this.#e.onUploadProgress,n??this.#e.body??void 0)}}const kl=e=>{const t=(n,r)=>Sa.create(n,Za(e,r));for(const n of hh)t[n]=(r,s)=>Sa.create(r,Za(e,s,{method:n}));return t.create=n=>kl(Za(n)),t.extend=n=>(typeof n=="function"&&(n=n(e??{})),kl(Za(e,n))),t.stop=ph,t.retry=Zg,t},d4=kl(),Io="task-handoff-web-token",hs=s0("auth",{state:()=>({token:localStorage.getItem(Io)||""}),actions:{setToken(e){this.token=e,e?localStorage.setItem(Io,e):localStorage.removeItem(Io)}}}),Ki=d4.create({prefixUrl:Fg(),timeout:3e4,hooks:{beforeRequest:[e=>{const t=hs().token;t&&e.headers.set("Authorization",`Bearer ${t}`)}]}});class yi extends Error{code;status;constructor(t,n="API_ERROR",r){super(t),this.name="ApiError",this.code=n,this.status=r}}async function Wi(e){try{return await e}catch(t){if(t&&typeof t=="object"&&"response"in t){const n=t.response;try{const r=await n.clone().json(),s=r.error?.message||`${n.status} ${n.statusText}`;throw new yi(s,r.error?.code,n.status)}catch(r){if(r instanceof yi)throw r}throw new yi(`${n.status} ${n.statusText}`,"HTTP_ERROR",n.status)}throw t}}async function Un(e){return(await Wi(Ki.get(e).json())).data}async function Mn(e,t){return(await Wi(Ki.post(e,{json:t??{}}).json())).data}async function bh(e,t){return(await Wi(Ki.patch(e,{json:t??{}}).json())).data}async function u0(e){return(await Wi(Ki.delete(e).json())).data}function yr(e=!0){const t=hs(),n=wh();return be(()=>!g(e)||!n.data.value?!1:!n.data.value.enabled||!!t.token)}function ps(e,t){return!(t instanceof yi&&t.status===401)&&e<3}function yh(){return er({queryKey:["status"],queryFn:()=>Un("status"),enabled:yr(),refetchInterval:1e4,retry:ps})}function wh(){return er({queryKey:["auth-status"],queryFn:()=>Un("auth/status")})}function h4(){return er({queryKey:["diagnostics"],queryFn:()=>Un("diagnostics"),enabled:yr(),refetchInterval:15e3,retry:ps})}function kh(){return er({queryKey:["app-catalog"],queryFn:()=>Un("apps/catalog"),enabled:yr(),retry:ps})}function xh(){return er({queryKey:["app-catalog-custom"],queryFn:()=>Un("apps/catalog/custom"),enabled:yr(),retry:!1})}function Os(e){return bh("apps/catalog/custom",{items:e})}function Vs(){return er({queryKey:["app-sessions"],queryFn:async()=>(await Un("apps/sessions")).snapshot.sessions,enabled:yr(),retry:ps})}function Sh(){return er({queryKey:["ai-sessions"],queryFn:async()=>(await Un("ai-sessions")).snapshot,enabled:yr(),retry:ps})}function Nc(e,t,n){return Mn(`ai-sessions/${e}/messages`,{message:t,mode:n})}function p4(e,t){return Mn(`ai-sessions/${e}/queue/${t}/steer`)}function f4(e,t){return Mn(`ai-sessions/${e}/queue/${t}/retry`)}function m4(e,t){return u0(`ai-sessions/${e}/queue/${t}`)}function g4(e,t){return Mn(`ai-sessions/${e}/approval`,{decision:t})}function v4(){return er({queryKey:["triggers"],queryFn:()=>Un("triggers"),enabled:yr(),retry:ps})}function b4(e){return Mn("triggers",e)}function y4(e){return Mn(`triggers/${e}/enable`)}function w4(e){return Mn(`triggers/${e}/disable`)}function k4(e,t){return Mn(`triggers/${e}/run`,{})}function x4(e){return u0(`triggers/${e}`)}function S4(e){return Mn(`ai-sessions/${e}/interrupt`)}function _4(e){return er({queryKey:["app-session-logs",e],queryFn:()=>Un(`apps/sessions/${e}/logs`),enabled:yr(!!e),refetchInterval:5e3,retry:ps})}function E4(e,t=!0){return er({queryKey:["app-session-automation",e],queryFn:()=>Un(`apps/sessions/${e}/automation`),enabled:yr(!!e&&t),refetchInterval:5e3,retry:!1})}function _h(e,t={}){return Mn("apps/sessions",{appId:e,...t})}function cs(e){return Mn(`apps/sessions/${e}/stop`)}function d0(e){return Mn(`apps/sessions/${e}/restart`)}function A4(e,t){return bh(`apps/sessions/${e}`,{title:t})}function Eh(e){return u0(`apps/sessions/${e}`)}function Ah(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Ah(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Th(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Ah(e))&&(r&&(r+=" "),r+=t);return r}const Mc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,zc=Th,h0=(e,t)=>n=>{var r;if(t?.variants==null)return zc(e,n?.class,n?.className);const{variants:s,defaultVariants:a}=t,i=Object.keys(s).map(c=>{const d=n?.[c],f=a?.[c];if(d===null)return null;const m=Mc(d)||Mc(f);return s[c][m]}),o=n&&Object.entries(n).reduce((c,d)=>{let[f,m]=d;return m===void 0||(c[f]=m),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:m,...p}=d;return Object.entries(p).every(w=>{let[y,x]=w;return Array.isArray(x)?x.includes({...a,...o}[y]):{...a,...o}[y]===x})?[...c,f,m]:c},[]);return zc(e,i,l,n?.class,n?.className)},T4=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},C4=(e,t)=>({classGroupId:e,validator:t}),Ch=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ai="-",Dc=[],R4="arbitrary..",O4=e=>{const t=N4(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return I4(i);const o=i.split(Ai),l=o[0]===""&&o.length>1?1:0;return Rh(o,l,t)},getConflictingClassGroupIds:(i,o)=>{if(o){const l=r[i],c=n[i];return l?c?T4(c,l):l:c||Dc}return n[i]||Dc}}},Rh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],a=n.nextPart.get(s);if(a){const c=Rh(e,t+1,a);if(c)return c}const i=n.validators;if(i===null)return;const o=t===0?e.join(Ai):e.slice(t).join(Ai),l=i.length;for(let c=0;c<l;c++){const d=i[c];if(d.validator(o))return d.classGroupId}},I4=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?R4+r:void 0})(),N4=e=>{const{theme:t,classGroups:n}=e;return M4(n,t)},M4=(e,t)=>{const n=Ch();for(const r in e){const s=e[r];p0(s,n,r,t)}return n},p0=(e,t,n,r)=>{const s=e.length;for(let a=0;a<s;a++){const i=e[a];z4(i,t,n,r)}},z4=(e,t,n,r)=>{if(typeof e=="string"){D4(e,t,n);return}if(typeof e=="function"){$4(e,t,n,r);return}P4(e,t,n,r)},D4=(e,t,n)=>{const r=e===""?t:Oh(t,e);r.classGroupId=n},$4=(e,t,n,r)=>{if(B4(e)){p0(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(C4(n,e))},P4=(e,t,n,r)=>{const s=Object.entries(e),a=s.length;for(let i=0;i<a;i++){const[o,l]=s[i];p0(l,Oh(t,o),n,r)}},Oh=(e,t)=>{let n=e;const r=t.split(Ai),s=r.length;for(let a=0;a<s;a++){const i=r[a];let o=n.nextPart.get(i);o||(o=Ch(),n.nextPart.set(i,o)),n=o}return n},B4=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,L4=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const s=(a,i)=>{n[a]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let i=n[a];if(i!==void 0)return i;if((i=r[a])!==void 0)return s(a,i),i},set(a,i){a in n?n[a]=i:s(a,i)}}},xl="!",$c=":",F4=[],Pc=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),U4=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const a=[];let i=0,o=0,l=0,c;const d=s.length;for(let y=0;y<d;y++){const x=s[y];if(i===0&&o===0){if(x===$c){a.push(s.slice(l,y)),l=y+1;continue}if(x==="/"){c=y;continue}}x==="["?i++:x==="]"?i--:x==="("?o++:x===")"&&o--}const f=a.length===0?s:s.slice(l);let m=f,p=!1;f.endsWith(xl)?(m=f.slice(0,-1),p=!0):f.startsWith(xl)&&(m=f.slice(1),p=!0);const w=c&&c>l?c-l:void 0;return Pc(a,p,m,w)};if(t){const s=t+$c,a=r;r=i=>i.startsWith(s)?a(i.slice(s.length)):Pc(F4,!1,i,void 0,!0)}if(n){const s=r;r=a=>n({className:a,parseClassName:s})}return r},q4=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let a=0;a<n.length;a++){const i=n[a],o=i[0]==="[",l=t.has(i);o||l?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(i)):s.push(i)}return s.length>0&&(s.sort(),r.push(...s)),r}},H4=e=>({cache:L4(e.cacheSize),parseClassName:U4(e),sortModifiers:q4(e),postfixLookupClassGroupIds:V4(e),...O4(e)}),V4=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},G4=/\s+/,Z4=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:i}=t,o=[],l=e.trim().split(G4);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:m,modifiers:p,hasImportantModifier:w,baseClassName:y,maybePostfixModifierPosition:x}=n(f);if(m){c=f+(c.length>0?" "+c:c);continue}let _=!!x,$;if(_){const F=y.substring(0,x);$=r(F);const N=$&&i[$]?r(y):void 0;N&&N!==$&&($=N,_=!1)}else $=r(y);if(!$){if(!_){c=f+(c.length>0?" "+c:c);continue}if($=r(y),!$){c=f+(c.length>0?" "+c:c);continue}_=!1}const z=p.length===0?"":p.length===1?p[0]:a(p).join(":"),C=w?z+xl:z,S=C+$;if(o.indexOf(S)>-1)continue;o.push(S);const E=s($,_);for(let F=0;F<E.length;++F){const N=E[F];o.push(C+N)}c=f+(c.length>0?" "+c:c)}return c},j4=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=Ih(n))&&(s&&(s+=" "),s+=r);return s},Ih=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ih(e[r]))&&(n&&(n+=" "),n+=t);return n},K4=(e,...t)=>{let n,r,s,a;const i=l=>{const c=t.reduce((d,f)=>f(d),e());return n=H4(c),r=n.cache.get,s=n.cache.set,a=o,o(l)},o=l=>{const c=r(l);if(c)return c;const d=Z4(l,n);return s(l,d),d};return a=i,(...l)=>a(j4(...l))},W4=[],Vt=e=>{const t=n=>n[e]||W4;return t.isThemeGetter=!0,t},Nh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Q4=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,J4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Y4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,X4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ev=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=e=>Q4.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),Zn=e=>!!e&&Number.isInteger(Number(e)),No=e=>e.endsWith("%")&&We(e.slice(0,-1)),ir=e=>J4.test(e),zh=()=>!0,nv=e=>Y4.test(e)&&!X4.test(e),f0=()=>!1,rv=e=>ev.test(e),sv=e=>tv.test(e),av=e=>!we(e)&&!ke(e),iv=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),ov=e=>Kr(e,Ph,f0),we=e=>Nh.test(e),es=e=>Kr(e,Bh,nv),Bc=e=>Kr(e,mv,We),lv=e=>Kr(e,Fh,zh),cv=e=>Kr(e,Lh,f0),Lc=e=>Kr(e,Dh,f0),uv=e=>Kr(e,$h,sv),Ka=e=>Kr(e,Uh,rv),ke=e=>Mh.test(e),ea=e=>fs(e,Bh),dv=e=>fs(e,Lh),Fc=e=>fs(e,Dh),hv=e=>fs(e,Ph),pv=e=>fs(e,$h),Wa=e=>fs(e,Uh,!0),fv=e=>fs(e,Fh,!0),Kr=(e,t,n)=>{const r=Nh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},fs=(e,t,n=!1)=>{const r=Mh.exec(e);return r?r[1]?t(r[1]):n:!1},Dh=e=>e==="position"||e==="percentage",$h=e=>e==="image"||e==="url",Ph=e=>e==="length"||e==="size"||e==="bg-size",Bh=e=>e==="length",mv=e=>e==="number",Lh=e=>e==="family-name",Fh=e=>e==="number"||e==="weight",Uh=e=>e==="shadow",gv=()=>{const e=Vt("color"),t=Vt("font"),n=Vt("text"),r=Vt("font-weight"),s=Vt("tracking"),a=Vt("leading"),i=Vt("breakpoint"),o=Vt("container"),l=Vt("spacing"),c=Vt("radius"),d=Vt("shadow"),f=Vt("inset-shadow"),m=Vt("text-shadow"),p=Vt("drop-shadow"),w=Vt("blur"),y=Vt("perspective"),x=Vt("aspect"),_=Vt("ease"),$=Vt("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...C(),ke,we],E=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],N=()=>[ke,we,l],G=()=>[Ar,"full","auto",...N()],P=()=>[Zn,"none","subgrid",ke,we],j=()=>["auto",{span:["full",Zn,ke,we]},Zn,ke,we],q=()=>[Zn,"auto",ke,we],Y=()=>["auto","min","max","fr",ke,we],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],Se=()=>["auto",...N()],re=()=>[Ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],ne=()=>[Ar,"screen","full","dvw","lvw","svw","min","max","fit",...N()],Re=()=>[Ar,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],se=()=>[e,ke,we],Le=()=>[...C(),Fc,Lc,{position:[ke,we]}],Ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],nt=()=>["auto","cover","contain",hv,ov,{size:[ke,we]}],Mt=()=>[No,ea,es],Xe=()=>["","none","full",c,ke,we],tt=()=>["",We,ea,es],O=()=>["solid","dashed","dotted","double"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[We,No,Fc,Lc],ue=()=>["","none",w,ke,we],Ee=()=>["none",We,ke,we],Fe=()=>["none",We,ke,we],ze=()=>[We,ke,we],_e=()=>[Ar,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ir],breakpoint:[ir],color:[zh],container:[ir],"drop-shadow":[ir],ease:["in","out","in-out"],font:[av],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ir],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ir],shadow:[ir],spacing:["px",We],text:[ir],"text-shadow":[ir],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ar,we,ke,x]}],container:["container"],"container-type":[{"@container":["","normal","size",ke,we]}],"container-named":[iv],columns:[{columns:[We,we,ke,o]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:G()}],"inset-x":[{"inset-x":G()}],"inset-y":[{"inset-y":G()}],start:[{"inset-s":G(),start:G()}],end:[{"inset-e":G(),end:G()}],"inset-bs":[{"inset-bs":G()}],"inset-be":[{"inset-be":G()}],top:[{top:G()}],right:[{right:G()}],bottom:[{bottom:G()}],left:[{left:G()}],visibility:["visible","invisible","collapse"],z:[{z:[Zn,"auto",ke,we]}],basis:[{basis:[Ar,"full","auto",o,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Ar,"auto","initial","none",we]}],grow:[{grow:["",We,ke,we]}],shrink:[{shrink:["",We,ke,we]}],order:[{order:[Zn,"first","last","none",ke,we]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:Se()}],mx:[{mx:Se()}],my:[{my:Se()}],ms:[{ms:Se()}],me:[{me:Se()}],mbs:[{mbs:Se()}],mbe:[{mbe:Se()}],mt:[{mt:Se()}],mr:[{mr:Se()}],mb:[{mb:Se()}],ml:[{ml:Se()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],"inline-size":[{inline:["auto",...ne()]}],"min-inline-size":[{"min-inline":["auto",...ne()]}],"max-inline-size":[{"max-inline":["none",...ne()]}],"block-size":[{block:["auto",...Re()]}],"min-block-size":[{"min-block":["auto",...Re()]}],"max-block-size":[{"max-block":["none",...Re()]}],w:[{w:[o,"screen",...re()]}],"min-w":[{"min-w":[o,"screen","none",...re()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[i]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",n,ea,es]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,fv,lv]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",No,we]}],"font-family":[{font:[dv,cv,t]}],"font-features":[{"font-features":[we]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ke,we]}],"line-clamp":[{"line-clamp":[We,"none",ke,Bc]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",ke,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:se()}],"text-color":[{text:se()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",ke,es]}],"text-decoration-color":[{decoration:se()}],"underline-offset":[{"underline-offset":[We,"auto",ke,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"tab-size":[{tab:[Zn,ke,we]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Le()}],"bg-repeat":[{bg:Ye()}],"bg-size":[{bg:nt()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Zn,ke,we],radial:["",ke,we],conic:[Zn,ke,we]},pv,uv]}],"bg-color":[{bg:se()}],"gradient-from-pos":[{from:Mt()}],"gradient-via-pos":[{via:Mt()}],"gradient-to-pos":[{to:Mt()}],"gradient-from":[{from:se()}],"gradient-via":[{via:se()}],"gradient-to":[{to:se()}],rounded:[{rounded:Xe()}],"rounded-s":[{"rounded-s":Xe()}],"rounded-e":[{"rounded-e":Xe()}],"rounded-t":[{"rounded-t":Xe()}],"rounded-r":[{"rounded-r":Xe()}],"rounded-b":[{"rounded-b":Xe()}],"rounded-l":[{"rounded-l":Xe()}],"rounded-ss":[{"rounded-ss":Xe()}],"rounded-se":[{"rounded-se":Xe()}],"rounded-ee":[{"rounded-ee":Xe()}],"rounded-es":[{"rounded-es":Xe()}],"rounded-tl":[{"rounded-tl":Xe()}],"rounded-tr":[{"rounded-tr":Xe()}],"rounded-br":[{"rounded-br":Xe()}],"rounded-bl":[{"rounded-bl":Xe()}],"border-w":[{border:tt()}],"border-w-x":[{"border-x":tt()}],"border-w-y":[{"border-y":tt()}],"border-w-s":[{"border-s":tt()}],"border-w-e":[{"border-e":tt()}],"border-w-bs":[{"border-bs":tt()}],"border-w-be":[{"border-be":tt()}],"border-w-t":[{"border-t":tt()}],"border-w-r":[{"border-r":tt()}],"border-w-b":[{"border-b":tt()}],"border-w-l":[{"border-l":tt()}],"divide-x":[{"divide-x":tt()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":tt()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:se()}],"border-color-x":[{"border-x":se()}],"border-color-y":[{"border-y":se()}],"border-color-s":[{"border-s":se()}],"border-color-e":[{"border-e":se()}],"border-color-bs":[{"border-bs":se()}],"border-color-be":[{"border-be":se()}],"border-color-t":[{"border-t":se()}],"border-color-r":[{"border-r":se()}],"border-color-b":[{"border-b":se()}],"border-color-l":[{"border-l":se()}],"divide-color":[{divide:se()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,ke,we]}],"outline-w":[{outline:["",We,ea,es]}],"outline-color":[{outline:se()}],shadow:[{shadow:["","none",d,Wa,Ka]}],"shadow-color":[{shadow:se()}],"inset-shadow":[{"inset-shadow":["none",f,Wa,Ka]}],"inset-shadow-color":[{"inset-shadow":se()}],"ring-w":[{ring:tt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:se()}],"ring-offset-w":[{"ring-offset":[We,es]}],"ring-offset-color":[{"ring-offset":se()}],"inset-ring-w":[{"inset-ring":tt()}],"inset-ring-color":[{"inset-ring":se()}],"text-shadow":[{"text-shadow":["none",m,Wa,Ka]}],"text-shadow-color":[{"text-shadow":se()}],opacity:[{opacity:[We,ke,we]}],"mix-blend":[{"mix-blend":[...oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":se()}],"mask-image-linear-to-color":[{"mask-linear-to":se()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":se()}],"mask-image-t-to-color":[{"mask-t-to":se()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":se()}],"mask-image-r-to-color":[{"mask-r-to":se()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":se()}],"mask-image-b-to-color":[{"mask-b-to":se()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":se()}],"mask-image-l-to-color":[{"mask-l-to":se()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":se()}],"mask-image-x-to-color":[{"mask-x-to":se()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":se()}],"mask-image-y-to-color":[{"mask-y-to":se()}],"mask-image-radial":[{"mask-radial":[ke,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":se()}],"mask-image-radial-to-color":[{"mask-radial-to":se()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":se()}],"mask-image-conic-to-color":[{"mask-conic-to":se()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Le()}],"mask-repeat":[{mask:Ye()}],"mask-size":[{mask:nt()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,we]}],filter:[{filter:["","none",ke,we]}],blur:[{blur:ue()}],brightness:[{brightness:[We,ke,we]}],contrast:[{contrast:[We,ke,we]}],"drop-shadow":[{"drop-shadow":["","none",p,Wa,Ka]}],"drop-shadow-color":[{"drop-shadow":se()}],grayscale:[{grayscale:["",We,ke,we]}],"hue-rotate":[{"hue-rotate":[We,ke,we]}],invert:[{invert:["",We,ke,we]}],saturate:[{saturate:[We,ke,we]}],sepia:[{sepia:["",We,ke,we]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,we]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[We,ke,we]}],"backdrop-contrast":[{"backdrop-contrast":[We,ke,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,ke,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,ke,we]}],"backdrop-invert":[{"backdrop-invert":["",We,ke,we]}],"backdrop-opacity":[{"backdrop-opacity":[We,ke,we]}],"backdrop-saturate":[{"backdrop-saturate":[We,ke,we]}],"backdrop-sepia":[{"backdrop-sepia":["",We,ke,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",ke,we]}],ease:[{ease:["linear","initial",_,ke,we]}],delay:[{delay:[We,ke,we]}],animate:[{animate:["none",$,ke,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,ke,we]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Fe()}],"scale-x":[{"scale-x":Fe()}],"scale-y":[{"scale-y":Fe()}],"scale-z":[{"scale-z":Fe()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[ke,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],zoom:[{zoom:[Zn,ke,we]}],accent:[{accent:se()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:se()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":se()}],"scrollbar-track-color":[{"scrollbar-track":se()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,we]}],fill:[{fill:["none",...se()]}],"stroke-w":[{stroke:[We,ea,es,Bc]}],stroke:[{stroke:["none",...se()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},vv=K4(gv);function ot(...e){return vv(Th(e))}const Je=Ae({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,r)=>(I(),ye(g(am),{as:e.as,"as-child":e.asChild,class:wt(g(ot)(g(bv)({variant:e.variant,size:e.size}),t.class))},{default:D(()=>[Be(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),bv=h0("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),Uc=Ae({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class");return(r,s)=>(I(),ye(g(im),xt(g(n),{class:g(ot)("flex touch-none select-none transition-colors",e.orientation==="vertical"&&"h-full w-2.5 p-px",e.orientation==="horizontal"&&"h-2.5 flex-col p-px",t.class)}),{default:D(()=>[T(g(om),{class:"relative flex-1 rounded-full bg-[var(--scrollbar-thumb)] transition-colors hover:bg-[var(--scrollbar-thumb-hover)]"})]),_:1},16,["class"]))}}),kn=Ae({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},style:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class","style");return(r,s)=>(I(),ye(g(lm),xt(g(n),{class:g(ot)("relative overflow-hidden",t.class),style:t.style}),{default:D(()=>[T(g(cm),{class:"h-full w-full rounded-[inherit]"},{default:D(()=>[Be(r.$slots,"default")]),_:3}),T(Uc),T(Uc,{orientation:"horizontal"}),T(g(um))]),_:3},16,["class","style"]))}}),qh=Ae({__name:"Toggle",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]},variant:{default:"default"},size:{default:"default"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,s=Pt(n,"class","size","variant"),a=Ln(s,r);return(i,o)=>(I(),ye(g(dm),xt(g(a),{class:g(ot)(g(Hh)({variant:e.variant,size:e.size}),n.class)}),{default:D(l=>[Be(i.$slots,"default",Sn(Fn(l)))]),_:3},16,["class"]))}}),Hh=h0("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Vh=Ae({__name:"ToggleGroup",props:{rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},type:{},modelValue:{},defaultValue:{},class:{type:[Boolean,null,String,Object,Array]},variant:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t;vi("toggleGroup",{variant:n.variant,size:n.size});const s=Pt(n,"class"),a=Ln(s,r);return(i,o)=>(I(),ye(g(hm),xt(g(a),{class:g(ot)("flex items-center justify-center gap-1",n.class)}),{default:D(l=>[Be(i.$slots,"default",Sn(Fn(l)))]),_:3},16,["class"]))}}),Ti=Ae({__name:"ToggleGroupItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},variant:{},size:{}},setup(e){const t=e,n=mr("toggleGroup"),r=Pt(t,"class","size","variant"),s=Xn(r);return(a,i)=>(I(),ye(g(pm),xt(g(s),{class:g(ot)(g(Hh)({variant:g(n)?.variant||e.variant,size:g(n)?.size||e.size}),t.class)}),{default:D(o=>[Be(a.$slots,"default",Sn(Fn(o)))]),_:3},16,["class"]))}});const qc=e=>e==="";const yv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Hc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const wv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const kv=e=>{const t=wv(e);return t.charAt(0).toUpperCase()+t.slice(1)};var ws={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const xv=Symbol("lucide-icons");function Sv(){return mr(xv,{})}const _v=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":r,strokeWidth:s,"stroke-width":a,size:i,color:o,...l},{slots:c})=>{const{size:d,color:f,strokeWidth:m=2,absoluteStrokeWidth:p=!1,class:w=""}=Sv(),y=be(()=>{const x=qc(n)||qc(r)||n===!0||r===!0||p===!0,_=s||a||m||ws["stroke-width"];return x?Number(_)*24/Number(i??d??ws.width):_});return ya("svg",{...ws,...l,width:i??d??ws.width,height:i??d??ws.height,stroke:o??f??ws.stroke,"stroke-width":y.value,class:yv("lucide",w,...e?[`lucide-${Hc(kv(e))}-icon`,`lucide-${Hc(e)}`]:["lucide-icon"])},[...t.map(x=>ya(...x)),...c.default?[c.default()]:[]])};const mt=(e,t)=>(n,{slots:r,attrs:s})=>ya(_v,{...s,...n,iconNode:t,name:e},r.default?{default:r.default}:void 0);const Ev=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Av=mt("activity",Ev);const Tv=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Cv=mt("arrow-up",Tv);const Rv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],Ov=mt("ban",Rv);const Iv=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Nv=mt("bot",Iv);const Mv=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Gh=mt("check",Mv);const zv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zh=mt("chevron-down",zv);const Dv=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],$v=mt("chevron-left",Dv);const Pv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bv=mt("chevron-right",Pv);const Lv=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Fv=mt("chevron-up",Lv);const Uv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],qv=mt("circle-alert",Uv);const Hv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Vv=mt("circle-check",Hv);const Gv=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Zv=mt("code-xml",Gv);const jv=[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],Kv=mt("corner-down-right",jv);const Wv=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],jh=mt("external-link",Wv);const Qv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Jv=mt("globe",Qv);const Yv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Xv=mt("info",Yv);const e2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],t2=mt("loader-circle",e2);const n2=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Vc=mt("monitor",n2);const r2=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],s2=mt("play",r2);const a2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Sl=mt("plus",a2);const i2=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Gc=mt("puzzle",i2);const o2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],Zc=mt("rows-3",o2);const l2=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],c2=mt("settings",l2);const u2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],d2=mt("sparkles",u2);const h2=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],p2=mt("square-terminal",h2);const f2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],m2=mt("square",f2);const g2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],v2=mt("triangle-alert",g2);const b2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],us=mt("x",b2),Kh=Ae({__name:"ContextMenu",props:{pressOpenDelay:{},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const s=Ln(e,t);return(a,i)=>(I(),ye(g(fm),Sn(Fn(g(s))),{default:D(()=>[Be(a.$slots,"default")]),_:3},16))}}),Wh=Ae({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideFlip:{type:Boolean},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,s=Pt(n,"class"),a=Ln(s,r);return(i,o)=>(I(),ye(g(mm),null,{default:D(()=>[T(g(gm),xt(g(a),{class:g(ot)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:D(()=>[Be(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),Ss=Ae({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},inset:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,s=Pt(n,"class"),a=Ln(s,r);return(i,o)=>(I(),ye(g(vm),xt(g(a),{class:g(ot)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e.inset&&"pl-8",n.class)}),{default:D(()=>[Be(i.$slots,"default")]),_:3},16,["class"]))}}),Mo=Ae({__name:"ContextMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class");return(r,s)=>(I(),ye(g(bm),xt(g(n),{class:g(ot)("-mx-1 my-1 h-px bg-border",t.class)}),null,16,["class"]))}}),Qh=Ae({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=Xn(e);return(r,s)=>(I(),ye(g(ym),Sn(Fn(g(n))),{default:D(()=>[Be(r.$slots,"default")]),_:3},16))}}),y2=Ae({__name:"HoverCard",props:{defaultOpen:{type:Boolean},open:{type:Boolean},openDelay:{},closeDelay:{}},emits:["update:open"],setup(e,{emit:t}){const s=Ln(e,t);return(a,i)=>(I(),ye(g(wm),Sn(Fn(g(s))),{default:D(()=>[Be(a.$slots,"default")]),_:3},16))}}),w2=Ae({__name:"HoverCardContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class"),r=Xn(n);return(s,a)=>(I(),ye(g(km),null,{default:D(()=>[T(g(xm),xt(g(r),{class:g(ot)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t.class)}),{default:D(()=>[Be(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),k2=Ae({__name:"HoverCardTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(I(),ye(g(Sm),Sn(Fn(t)),{default:D(()=>[Be(n.$slots,"default")]),_:3},16))}}),Jh="task-handoff-workspace-tabs",Yh="task-handoff-workspace-settings",x2={type:"ai-sessions",id:"ai-sessions",title:"AI Sessions"};function za(e){if(e.kind==="gui"){const t=g0(e);return t?{type:"shared-vnc",id:`shared-vnc:${t}`,sessionId:e.id,displaySessionId:t,title:S2(t)}:{type:"app-vnc",id:`vnc:${e.id}`,sessionId:e.id,title:e.title}}return e.kind==="web"?{type:"app-web",id:`web:${e.id}`,sessionId:e.id,title:e.title}:{type:"app-tty",id:`tty:${e.id}`,sessionId:e.id,title:e.title}}function m0(e,t){if(e&&e.type!=="ai-sessions")return e.type==="shared-vnc"?_2(t.filter(n=>n.status==="running"&&n.kind==="gui"&&!!n.vnc&&g0(n)===e.displaySessionId))||t.find(n=>n.id===e.sessionId):t.find(n=>n.id===e.sessionId)}function Ds(e){return new Set(e.map(t=>t.status==="running"?g0(t):void 0).filter(t=>!!t))}function g0(e){return e.display?.mode==="shared"?e.display.displaySessionId||"main":void 0}function S2(e){return e==="main"?"Shared Screen":`Shared ${e}`}function _2(e){return[...e].sort((t,n)=>(n.updatedAt||n.createdAt).localeCompare(t.updatedAt||t.createdAt))[0]}function jc(){try{const e=JSON.parse(localStorage.getItem(Jh)||"[]");return Array.isArray(e)?e:[]}catch{return[]}}function ta(e){localStorage.setItem(Jh,JSON.stringify(e))}function E2(){try{const e=JSON.parse(localStorage.getItem(Yh)||"{}");return{guiHidpi:typeof e.guiHidpi=="boolean"?e.guiHidpi:!0}}catch{return{guiHidpi:!0}}}function A2(e){localStorage.setItem(Yh,JSON.stringify(e))}const Gs=s0("workspace",{state:()=>({tabs:jc(),activeTabId:jc()[0]?.id||"",vncResizeMode:"scale",guiHidpi:E2().guiHidpi}),actions:{open(e){const t=this.tabs.find(n=>n.id===e.id);t?Object.assign(t,e):this.tabs.push(e),this.activeTabId=e.id,ta(this.tabs)},close(e){const t=this.tabs.findIndex(n=>n.id===e);t!==-1&&(this.tabs.splice(t,1),this.activeTabId===e&&(this.activeTabId=this.tabs[Math.max(0,t-1)]?.id||this.tabs[0]?.id||""),ta(this.tabs))},setActive(e){this.tabs.some(t=>t.id===e)&&(this.activeTabId=e)},setVncResizeMode(e){this.vncResizeMode=e},setGuiHidpi(e){this.guiHidpi=e,A2({guiHidpi:this.guiHidpi})},moveTab(e,t,n="before"){if(e===t)return;const r=this.tabs.findIndex(o=>o.id===e);if(r===-1||!this.tabs.some(o=>o.id===t))return;const[s]=this.tabs.splice(r,1),a=this.tabs.findIndex(o=>o.id===t),i=n==="after"?a+1:a;this.tabs.splice(i,0,s),ta(this.tabs)},syncSessionTitles(e){const t=new Map(e.map(r=>[r.id,r.title]));let n=!1;for(const r of this.tabs){if(r.type==="ai-sessions"||r.type==="shared-vnc")continue;const s=t.get(r.sessionId);if(!s)continue;const a=r.type==="logs"?`${s} logs`:s;r.title!==a&&(r.title=a,n=!0)}n&&ta(this.tabs)},pruneSession(e,t=new Set){const n=this.tabs.filter(r=>r.type==="ai-sessions"?!0:r.type==="shared-vnc"&&t.has(r.displaySessionId)||e.has(r.sessionId));n.length!==this.tabs.length&&(this.tabs=n,this.tabs.some(r=>r.id===this.activeTabId)||(this.activeTabId=this.tabs[0]?.id||""),ta(this.tabs))}}}),T2={class:"desktop-launcher","aria-label":"App launcher"},C2={class:"launcher-item"},R2=["title","disabled","onClick"],O2={class:"launcher-icon"},I2={class:"launcher-label"},N2={key:0,class:"launcher-running"},M2={class:"launcher-popover-content"},z2={class:"launcher-popover-head"},D2={class:"launcher-popover-meta"},$2=["disabled","onClick"],P2=["onClick"],B2={class:"launcher-session-title"},L2={class:"launcher-session-meta"},F2=["onClick"],U2={key:0,class:"launcher-session-empty"},q2={class:"launcher-icon"},H2={class:"launcher-icon"},V2={class:"launcher-icon"},G2={class:"launcher-icon"},Z2=Ae({__name:"LauncherView",emits:["open-settings"],setup(e){const t=jr(),n=kh(),r=Vs(),s=Gs(),a=Ce(""),i=[{label:"New 1280 x 720",width:1280,height:720,depth:24},{label:"New 1440 x 900",width:1440,height:900,depth:24},{label:"New 1920 x 1080",width:1920,height:1080,depth:24}],o=be(()=>{const E=["vscode-web","chromium","terminal-tty","codex","claude","terminal-gui"],F=n.data.value||[];return[...E.map(N=>F.find(G=>G.id===N)).filter(N=>!!N),...F.filter(N=>!E.includes(N.id))]});function l(E,F){return E==="vscode-web"||F==="web"?Zv:E==="chromium"?Jv:E==="terminal-tty"?p2:E==="codex"?Nv:E==="claude"?d2:E==="terminal-gui"||F==="gui"?Vc:Gc}function c(E){return(r.data.value||[]).filter(F=>F.appId===E&&F.status==="running")}function d(E){return[...c(E)].sort((F,N)=>(N.updatedAt||N.createdAt).localeCompare(F.updatedAt||F.createdAt))[0]}function f(E){return E.replace(/^app_/,"").slice(0,12)}async function m(E){const F=d(E.id);if(F){C(F);return}await p(E)}async function p(E,F={}){a.value=E.id;try{const N=await _h(E.id,w(E,F));C(N),await t.invalidateQueries({queryKey:["status"]})}finally{a.value=""}}function w(E,F){if(E.kind!=="gui")return F;const N=s.guiHidpi?y():1,G={...F.env||{}};G.TASK_HANDOFF_GUI_SCALE||(G.TASK_HANDOFF_GUI_SCALE=x(N));const P=_(F.display||E.display,N);return{...F,env:G,...P?{display:P}:{}}}function y(){const E=typeof window>"u"?1:window.devicePixelRatio||1;return Math.min(3,Math.max(1,E))}function x(E){return E.toFixed(2).replace(/\.?0+$/,"")}function _(E,F){return!E?.width||!E.height?E:{...E,width:Math.round(E.width*F),height:Math.round(E.height*F)}}async function $(E){const F=c(E.id);if(!F.length)return;await Promise.all(F.map(P=>cs(P.id)));const N=new Set(F.map(P=>P.id)),G=(r.data.value||[]).filter(P=>!N.has(P.id));s.pruneSession(new Set(G.map(P=>P.id)),Ds(G)),await t.invalidateQueries({queryKey:["status"]})}async function z(E){await cs(E.id);const F=(r.data.value||[]).filter(N=>N.id!==E.id);s.pruneSession(new Set(F.map(N=>N.id)),Ds(F)),await t.invalidateQueries({queryKey:["status"]})}function C(E){s.open(za(E))}function S(){s.open(x2)}return(E,F)=>(I(),V("aside",T2,[(I(!0),V(rt,null,$t(o.value,N=>(I(),ye(g(Kh),{key:N.id},{default:D(()=>[T(g(y2),{"open-delay":250,"close-delay":150},{default:D(()=>[T(g(Qh),{"as-child":""},{default:D(()=>[T(g(k2),{"as-child":""},{default:D(()=>[k("div",C2,[k("button",{type:"button",class:"launcher-button",title:N.name,disabled:a.value===N.id,onClick:G=>m(N)},[k("span",O2,[(I(),ye(xs(l(N.id,N.kind)),{size:22}))]),k("span",I2,Z(N.name),1),c(N.id).length?(I(),V("span",N2,Z(c(N.id).length),1)):pe("",!0)],8,R2)])]),_:2},1024)]),_:2},1024),T(g(w2),{class:"launcher-popover p-0",side:"right",align:"start","side-offset":8},{default:D(()=>[k("div",M2,[k("div",z2,[k("strong",null,Z(N.name),1),k("div",D2,[k("span",null,Z(c(N.id).length)+" running",1),k("button",{type:"button",class:"launcher-new-instance",title:"New instance","aria-label":"New instance",disabled:a.value===N.id,onClick:jt(G=>p(N),["stop"])},[T(g(Sl),{size:14,"stroke-width":2.2})],8,$2)])]),(I(!0),V(rt,null,$t(c(N.id),G=>(I(),V("div",{key:G.id,class:"launcher-session",role:"menuitem"},[k("button",{type:"button",class:"launcher-session-open",onClick:P=>C(G)},[k("span",B2,Z(G.title),1),k("span",L2,Z(G.kind)+" · "+Z(f(G.id)),1)],8,P2),k("button",{type:"button",class:"launcher-session-close",title:"Stop session","aria-label":"Stop session",onClick:jt(P=>z(G),["stop"])},[T(g(us),{size:14,"stroke-width":2.2})],8,F2)]))),128)),c(N.id).length?pe("",!0):(I(),V("div",U2,"No running sessions"))])]),_:2},1024)]),_:2},1024),T(g(Wh),{class:"launcher-context-menu"},{default:D(()=>[T(g(Ss),{class:"launcher-context-item",onSelect:G=>m(N)},{default:D(()=>[T(g(s2),{size:15}),F[3]||(F[3]=k("span",null,"Open",-1))]),_:1},8,["onSelect"]),T(g(Ss),{class:"launcher-context-item",onSelect:G=>p(N)},{default:D(()=>[T(g(Sl),{size:15}),F[4]||(F[4]=k("span",null,"New Instance",-1))]),_:1},8,["onSelect"]),N.kind==="gui"?(I(),V(rt,{key:0},[T(g(Mo)),T(g(Ss),{class:"launcher-context-item",onSelect:G=>p(N,{displayTarget:{mode:"shared",id:"main",autoCreate:!0}})},{default:D(()=>[T(g(Zc),{size:15}),F[5]||(F[5]=k("span",null,"Open Shared Screen",-1))]),_:1},8,["onSelect"]),T(g(Mo)),(I(),V(rt,null,$t(i,G=>T(g(Ss),{key:G.label,class:"launcher-context-item",onSelect:P=>p(N,{displayTarget:{mode:"isolated"},display:{width:G.width,height:G.height,depth:G.depth}})},{default:D(()=>[T(g(Vc),{size:15}),k("span",null,Z(G.label),1)]),_:2},1032,["onSelect"])),64))],64)):pe("",!0),c(N.id).length?(I(),V(rt,{key:1},[T(g(Mo)),T(g(Ss),{class:"launcher-context-item danger",onSelect:G=>$(N)},{default:D(()=>[T(g(us),{size:15}),F[6]||(F[6]=k("span",null,"Close All",-1))]),_:1},8,["onSelect"])],64)):pe("",!0)]),_:2},1024)]),_:2},1024))),128)),F[11]||(F[11]=k("div",{class:"launcher-spacer"},null,-1)),k("button",{type:"button",class:"launcher-button",title:"AI Sessions",onClick:S},[k("span",q2,[T(g(Av),{size:22})]),F[7]||(F[7]=k("span",{class:"launcher-label"},"AI",-1))]),k("button",{type:"button",class:"launcher-button",title:"Custom Apps",onClick:F[0]||(F[0]=N=>E.$emit("open-settings","apps"))},[k("span",H2,[T(g(Gc),{size:22})]),F[8]||(F[8]=k("span",{class:"launcher-label"},"Apps",-1))]),k("button",{type:"button",class:"launcher-button",title:"Sessions",onClick:F[1]||(F[1]=N=>E.$emit("open-settings","sessions"))},[k("span",V2,[T(g(Zc),{size:22})]),F[9]||(F[9]=k("span",{class:"launcher-label"},"Sessions",-1))]),k("button",{type:"button",class:"launcher-button",title:"Settings",onClick:F[2]||(F[2]=N=>E.$emit("open-settings","general"))},[k("span",G2,[T(g(c2),{size:22})]),F[10]||(F[10]=k("span",{class:"launcher-label"},"Settings",-1))])]))}}),Xh=Ae({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const s=Ln(e,t);return(a,i)=>(I(),ye(g(_m),Sn(Fn(g(s))),{default:D(()=>[Be(a.$slots,"default")]),_:3},16))}}),ep=Ae({__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},style:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,s=Pt(n,"class","style"),a=Ln(s,r);return(i,o)=>(I(),ye(g(Cm),null,{default:D(()=>[T(g(Em),{class:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),T(g(Am),xt(g(a),{style:n.style,class:g(ot)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-4 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:D(()=>[Be(i.$slots,"default"),T(g(Tm),{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},{default:D(()=>[T(g(us),{class:"w-4 h-4"}),o[0]||(o[0]=k("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["style","class"])]),_:3}))}}),tp=Ae({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class"),r=Xn(n);return(s,a)=>(I(),ye(g(Rm),xt(g(r),{class:g(ot)("text-sm text-muted-foreground",t.class)}),{default:D(()=>[Be(s.$slots,"default")]),_:3},16,["class"]))}}),np=Ae({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class"),r=Xn(n);return(s,a)=>(I(),ye(g(Om),xt(g(r),{class:g(ot)("text-lg font-semibold leading-none tracking-tight",t.class)}),{default:D(()=>[Be(s.$slots,"default")]),_:3},16,["class"]))}}),j2=Ae({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(e,{emit:t}){const s=Ln(e,t);return(a,i)=>(I(),ye(g(Im),Sn(Fn(g(s))),{default:D(()=>[Be(a.$slots,"default")]),_:3},16))}}),zo=Ae({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class");return(r,s)=>(I(),ye(g(Nm),xt({class:g(ot)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t.class)},g(n)),{default:D(()=>[Be(r.$slots,"default")]),_:3},16,["class"]))}}),K2=Ae({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class");return(r,s)=>(I(),ye(g(Mm),xt(g(n),{class:g(ot)("inline-flex items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t.class)}),{default:D(()=>[Be(r.$slots,"default")]),_:3},16,["class"]))}}),W2={class:"truncate"},Q2=Ae({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class"),r=Xn(n);return(s,a)=>(I(),ye(g(zm),xt(g(r),{class:g(ot)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t.class)}),{default:D(()=>[k("span",W2,[Be(s.$slots,"default")])]),_:3},16,["class"]))}}),J2={class:"panel"},Y2={key:0,class:"stats"},X2={key:1,class:"diagnostics-grid"},eb={class:"diagnostics-card"},tb={class:"diagnostics-card"},nb={class:"diagnostics-list"},rb={class:"diagnostics-card diagnostics-wide"},sb={class:"diagnostics-list storage-list"},rp=Ae({__name:"DashboardView",setup(e){const t=yh(),n=h4();function r(s){const a=new Date(s);return Number.isNaN(a.getTime())?s:a.toLocaleString()}return(s,a)=>(I(),V("section",J2,[a[10]||(a[10]=k("h1",null,"Dashboard",-1)),g(t).data.value?(I(),V("dl",Y2,[k("div",null,[a[0]||(a[0]=k("dt",null,"Running apps",-1)),k("dd",null,Z(g(t).data.value.runningAppCount),1)]),k("div",null,[a[1]||(a[1]=k("dt",null,"Version",-1)),k("dd",null,Z(g(t).data.value.version),1)]),k("div",null,[a[2]||(a[2]=k("dt",null,"Started",-1)),k("dd",null,Z(r(g(t).data.value.startedAt)),1)])])):pe("",!0),g(n).data.value?(I(),V("section",X2,[k("div",eb,[a[7]||(a[7]=k("h2",null,"Runtime",-1)),k("dl",null,[k("div",null,[a[3]||(a[3]=k("dt",null,"Platform",-1)),k("dd",null,Z(g(n).data.value.runtime.platform)+" / "+Z(g(n).data.value.runtime.arch),1)]),k("div",null,[a[4]||(a[4]=k("dt",null,"Linux runtime",-1)),k("dd",null,Z(g(n).data.value.runtime.linuxRuntime?"ready":"unsupported"),1)]),k("div",null,[a[5]||(a[5]=k("dt",null,"Node",-1)),k("dd",null,Z(g(n).data.value.runtime.node),1)]),k("div",null,[a[6]||(a[6]=k("dt",null,"noVNC",-1)),k("dd",null,Z(g(n).data.value.noVnc.available?g(n).data.value.noVnc.root:"missing"),1)])])]),k("div",tb,[a[8]||(a[8]=k("h2",null,"Commands",-1)),k("ul",nb,[(I(!0),V(rt,null,$t(g(n).data.value.commands,i=>(I(),V("li",{key:i.name},[k("span",{class:wt(i.available?"dot-ok":"dot-bad")},null,2),k("div",null,[k("strong",null,Z(i.name),1),k("small",null,Z(i.available?i.path:i.requiredFor.join(", ")),1)])]))),128))])]),k("div",rb,[a[9]||(a[9]=k("h2",null,"Storage",-1)),k("ul",sb,[(I(!0),V(rt,null,$t(g(n).data.value.storage,i=>(I(),V("li",{key:i.key},[k("span",{class:wt(i.writable?"dot-ok":"dot-bad")},null,2),k("div",null,[k("strong",null,Z(i.key),1),k("small",null,Z(i.writable?"writable":"not writable")+" · "+Z(i.path),1)])]))),128))])])])):pe("",!0)]))}}),Lr=Ae({__name:"Badge",props:{variant:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,r)=>(I(),V("div",{class:wt(g(ot)(g(ab)({variant:e.variant}),t.class))},[Be(n.$slots,"default")],2))}}),ab=h0("inline-flex gap-1 items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),hr=Ae({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,r)=>(I(),V("div",{class:wt(g(ot)("rounded-xl border bg-card text-card-foreground shadow",t.class))},[Be(n.$slots,"default")],2))}}),wn=Ae({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,r)=>(I(),V("div",{class:wt(g(ot)("p-6 pt-0",t.class))},[Be(n.$slots,"default")],2))}}),da=Ae({__name:"CardDescription",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,r)=>(I(),V("p",{class:wt(g(ot)("text-sm text-muted-foreground",t.class))},[Be(n.$slots,"default")],2))}}),v0=Ae({__name:"CardFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,r)=>(I(),V("div",{class:wt(g(ot)("flex items-center p-6 pt-0",t.class))},[Be(n.$slots,"default")],2))}}),ha=Ae({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,r)=>(I(),V("div",{class:wt(g(ot)("flex flex-col gap-y-1.5 p-6",t.class))},[Be(n.$slots,"default")],2))}}),pa=Ae({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,r)=>(I(),V("h3",{class:wt(g(ot)("font-semibold leading-none tracking-tight",t.class))},[Be(n.$slots,"default")],2))}}),yt=Ae({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=jd(n,"modelValue",t,{passive:!0,defaultValue:n.defaultValue});return(a,i)=>Vi((I(),V("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>qr(s)?s.value=o:null),class:wt(g(ot)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[Gi,g(s)]])}}),Ci=Ae({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const s=Ln(e,t);return(a,i)=>(I(),ye(g(Dm),Sn(Fn(g(s))),{default:D(()=>[Be(a.$slots,"default")]),_:3},16))}}),Ri=Ae({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,s=Pt(n,"class"),a=Ln(s,r);return(i,o)=>(I(),ye(g(Bm),null,{default:D(()=>[T(g($m),xt({...g(a),...i.$attrs},{class:g(ot)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:D(()=>[T(g(lb)),T(g(Pm),{class:wt(g(ot)("p-1",e.position==="popper"&&"h-(--reka-select-trigger-height) w-full min-w-(--reka-select-trigger-width)"))},{default:D(()=>[Be(i.$slots,"default")]),_:3},8,["class"]),T(g(ob))]),_:3},16,["class"])]),_:3}))}}),ib={class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},zr=Ae({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class"),r=Xn(n);return(s,a)=>(I(),ye(g(Um),xt(g(r),{class:g(ot)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}),{default:D(()=>[k("span",ib,[T(g(Lm),null,{default:D(()=>[T(g(Gh),{class:"h-4 w-4"})]),_:1})]),T(g(Fm),null,{default:D(()=>[Be(s.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),ob=Ae({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class"),r=Xn(n);return(s,a)=>(I(),ye(g(qm),xt(g(r),{class:g(ot)("flex cursor-default items-center justify-center py-1",t.class)}),{default:D(()=>[Be(s.$slots,"default",{},()=>[T(g(Zh))])]),_:3},16,["class"]))}}),lb=Ae({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class"),r=Xn(n);return(s,a)=>(I(),ye(g(Hm),xt(g(r),{class:g(ot)("flex cursor-default items-center justify-center py-1",t.class)}),{default:D(()=>[Be(s.$slots,"default",{},()=>[T(g(Fv))])]),_:3},16,["class"]))}}),Oi=Ae({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=Pt(t,"class"),r=Xn(n);return(s,a)=>(I(),ye(g(Gm),xt(g(r),{class:g(ot)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",t.class)}),{default:D(()=>[Be(s.$slots,"default"),T(g(Vm),{"as-child":""},{default:D(()=>[T(g(Zh),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),Ii=Ae({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(I(),ye(g(Zm),Sn(Fn(t)),{default:D(()=>[Be(n.$slots,"default")]),_:3},16))}}),Qn=Ae({__name:"Textarea",props:{class:{type:[Boolean,null,String,Object,Array]},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=jd(n,"modelValue",t,{passive:!0,defaultValue:n.defaultValue});return(a,i)=>Vi((I(),V("textarea",{"onUpdate:modelValue":i[0]||(i[0]=o=>qr(s)?s.value=o:null),class:wt(g(ot)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[Gi,g(s)]])}}),cb={class:"settings-pane"},ub={class:"section-head"},db={key:0},hb={class:"custom-app-form"},pb={key:0,class:"display-fields"},fb={class:"catalog-actions"},mb={key:0,class:"form-error"},gb={class:"form-error"},vb={class:"settings-list"},bb={class:"catalog-head"},yb={class:"item-title"},wb={class:"item-meta"},kb={class:"catalog-actions"},xb=Ae({__name:"CustomAppsSettings",setup(e){const t=jr(),n=xh(),r=Ce("[]"),s=Ce(""),a=Ce(""),i=Pr({id:"",name:"",description:"",kind:"tty",command:"",args:"",cwd:"",envJson:"{}",width:"",height:"",depth:""}),o=be(()=>{const z=n.error.value;return z?`Custom app catalog is invalid: ${z instanceof Error?z.message:String(z)}`:""});cn(()=>n.data.value?.items,z=>{r.value=JSON.stringify(z||[],null,2)},{immediate:!0});function l(z,C,S){const E=z.trim();if(!E)return C;try{return JSON.parse(E)}catch(F){throw new Error(`${S} is invalid JSON: ${F instanceof Error?F.message:String(F)}`)}}function c(z){const C=z.trim();if(!C)return;const S=Number(C);if(!Number.isInteger(S)||S<=0)throw new Error("Display values must be positive integers.");return S}function d(z){return(z.match(/"[^"]*"|'[^']*'|\S+/g)||[]).map(S=>S.replace(/^(['"])(.*)\1$/,"$2"))}function f(){const z=JSON.parse(r.value||"[]");if(!Array.isArray(z))throw new Error("Custom Apps JSON must be an array.");return z}function m(){const z=i.id.trim(),C=i.name.trim(),S=i.command.trim();if(!z||!C||!S)throw new Error("Custom app id, name, and command are required.");const E={id:z,name:C,kind:i.kind,command:S};i.description.trim()&&(E.description=i.description.trim());const F=d(i.args);F.length&&(E.args=F),i.cwd.trim()&&(E.cwd=i.cwd.trim());const N=l(i.envJson,{},"Custom app env");if(!N||typeof N!="object"||Array.isArray(N)||Object.values(N).some(G=>typeof G!="string"))throw new Error("Custom app env JSON must be an object with string values.");if(Object.keys(N).length&&(E.env=N),i.kind==="gui"){const G={width:c(i.width),height:c(i.height),depth:c(i.depth)},P=Object.fromEntries(Object.entries(G).filter(([,j])=>j!==void 0));Object.keys(P).length&&(E.display=P)}return E}function p(){a.value="",Object.assign(i,{id:"",name:"",description:"",kind:"tty",command:"",args:"",cwd:"",envJson:"{}",width:"",height:"",depth:""})}function w(z){a.value=z.id,Object.assign(i,{id:z.id,name:z.name,description:z.description||"",kind:z.kind==="gui"?"gui":"tty",command:z.command||"",args:(z.args||[]).map(C=>/\s/.test(C)?JSON.stringify(C):C).join(" "),cwd:z.cwd||"",envJson:JSON.stringify(z.env||{},null,2),width:z.display?.width===void 0?"":String(z.display.width),height:z.display?.height===void 0?"":String(z.display.height),depth:z.display?.depth===void 0?"":String(z.display.depth)})}async function y(){s.value="";try{const z=f(),C=m();if(!a.value&&z.some(E=>E.id===C.id))throw new Error("Custom app id already exists.");if(a.value&&C.id!==a.value&&z.some(E=>E.id===C.id))throw new Error("Custom app id already exists.");const S=a.value?z.map(E=>E.id===a.value?C:E):[...z,C];await Os(S),r.value=JSON.stringify(S,null,2),p(),await t.invalidateQueries({queryKey:["app-catalog"]}),await t.invalidateQueries({queryKey:["app-catalog-custom"]})}catch(z){s.value=z instanceof Error?z.message:String(z)}}async function x(z){s.value="";try{const C=f().filter(S=>S.id!==z);await Os(C),r.value=JSON.stringify(C,null,2),a.value===z&&p(),await t.invalidateQueries({queryKey:["app-catalog"]}),await t.invalidateQueries({queryKey:["app-catalog-custom"]})}catch(C){s.value=C instanceof Error?C.message:String(C)}}function _(){s.value="",r.value=JSON.stringify(n.data.value?.items||[],null,2)}async function $(){s.value="";try{await Os(f()),await t.invalidateQueries({queryKey:["app-catalog"]}),await t.invalidateQueries({queryKey:["app-catalog-custom"]})}catch(z){s.value=z instanceof Error?z.message:String(z)}}return(z,C)=>(I(),V("section",cb,[k("div",ub,[C[12]||(C[12]=k("h2",null,"Custom Apps",-1)),g(n).data.value?(I(),V("span",db,Z(g(n).data.value.path),1)):pe("",!0)]),T(g(hr),null,{default:D(()=>[T(g(wn),null,{default:D(()=>[k("div",hb,[T(g(yt),{modelValue:i.id,"onUpdate:modelValue":C[0]||(C[0]=S=>i.id=S),placeholder:"id"},null,8,["modelValue"]),T(g(yt),{modelValue:i.name,"onUpdate:modelValue":C[1]||(C[1]=S=>i.name=S),placeholder:"name"},null,8,["modelValue"]),T(g(Qn),{modelValue:i.description,"onUpdate:modelValue":C[2]||(C[2]=S=>i.description=S),class:"launch-json",spellcheck:"false",placeholder:"description"},null,8,["modelValue"]),T(g(Ci),{modelValue:i.kind,"onUpdate:modelValue":C[3]||(C[3]=S=>i.kind=S)},{default:D(()=>[T(g(Oi),{class:"native-select"},{default:D(()=>[T(g(Ii),{placeholder:"App kind"})]),_:1}),T(g(Ri),null,{default:D(()=>[T(g(zr),{value:"tty"},{default:D(()=>[...C[13]||(C[13]=[de("TTY",-1)])]),_:1}),T(g(zr),{value:"gui"},{default:D(()=>[...C[14]||(C[14]=[de("GUI",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"]),T(g(yt),{modelValue:i.command,"onUpdate:modelValue":C[4]||(C[4]=S=>i.command=S),placeholder:"/usr/bin/app"},null,8,["modelValue"]),T(g(yt),{modelValue:i.args,"onUpdate:modelValue":C[5]||(C[5]=S=>i.args=S),placeholder:'args, e.g. --new-window "https://example.com"'},null,8,["modelValue"]),T(g(yt),{modelValue:i.cwd,"onUpdate:modelValue":C[6]||(C[6]=S=>i.cwd=S),placeholder:"/workspace"},null,8,["modelValue"]),T(g(Qn),{modelValue:i.envJson,"onUpdate:modelValue":C[7]||(C[7]=S=>i.envJson=S),class:"launch-json",spellcheck:"false",placeholder:'env JSON, e.g. {"LANG":"C.UTF-8"}'},null,8,["modelValue"]),i.kind==="gui"?(I(),V("div",pb,[T(g(yt),{modelValue:i.width,"onUpdate:modelValue":C[8]||(C[8]=S=>i.width=S),inputmode:"numeric",placeholder:"width"},null,8,["modelValue"]),T(g(yt),{modelValue:i.height,"onUpdate:modelValue":C[9]||(C[9]=S=>i.height=S),inputmode:"numeric",placeholder:"height"},null,8,["modelValue"]),T(g(yt),{modelValue:i.depth,"onUpdate:modelValue":C[10]||(C[10]=S=>i.depth=S),inputmode:"numeric",placeholder:"depth"},null,8,["modelValue"])])):pe("",!0),k("div",fb,[T(g(Je),{size:"sm",onClick:y},{default:D(()=>[de(Z(a.value?"Update App":"Add App"),1)]),_:1}),a.value?(I(),ye(g(Je),{key:0,variant:"outline",size:"sm",onClick:p},{default:D(()=>[...C[15]||(C[15]=[de("Cancel",-1)])]),_:1})):pe("",!0)])])]),_:1}),T(g(wn),null,{default:D(()=>[T(g(Qn),{modelValue:r.value,"onUpdate:modelValue":C[11]||(C[11]=S=>r.value=S),class:"catalog-json",spellcheck:"false"},null,8,["modelValue"]),o.value?(I(),V("p",mb,Z(o.value),1)):pe("",!0)]),_:1}),T(g(v0),{class:"editor-actions"},{default:D(()=>[T(g(Je),{variant:"outline",size:"sm",onClick:_},{default:D(()=>[...C[16]||(C[16]=[de("Reset",-1)])]),_:1}),T(g(Je),{size:"sm",onClick:$},{default:D(()=>[...C[17]||(C[17]=[de("Save",-1)])]),_:1})]),_:1}),s.value?(I(),ye(g(wn),{key:0},{default:D(()=>[k("p",gb,Z(s.value),1)]),_:1})):pe("",!0)]),_:1}),k("div",vb,[(I(!0),V(rt,null,$t(g(n).data.value?.items||[],S=>(I(),ye(g(hr),{key:S.id},{default:D(()=>[T(g(wn),{class:"catalog-item"},{default:D(()=>[k("div",bb,[k("div",null,[k("div",yb,Z(S.name),1),k("div",wb,[T(g(Lr),{variant:"secondary"},{default:D(()=>[de(Z(S.kind),1)]),_:2},1024),k("span",null,Z(S.command),1)])]),k("div",kb,[T(g(Je),{variant:"outline",size:"sm",onClick:E=>w(S)},{default:D(()=>[...C[18]||(C[18]=[de("Edit",-1)])]),_:1},8,["onClick"]),T(g(Je),{variant:"outline",size:"sm",onClick:E=>x(S.id)},{default:D(()=>[...C[19]||(C[19]=[de("Remove",-1)])]),_:1},8,["onClick"])])])]),_:2},1024)]),_:2},1024))),128))])]))}}),Sb={class:"settings-pane"},_b={class:"section-head"},Eb={class:"section-actions"},Ab={class:"settings-list"},Tb={class:"session-actions"},Cb={key:0,class:"session-error"},Rb={class:"session-metadata"},Ob={key:0},Ib={key:1},Nb={key:2},Mb={key:0},zb={key:1},Db={key:3},$b={key:0},Pb=Ae({__name:"SessionsSettings",setup(e){const t=jr(),n=Vs(),r=Gs(),s=Ce(!1),a=be(()=>(n.data.value||[]).filter(c)),i=be(()=>s.value?n.data.value||[]:(n.data.value||[]).filter(y=>!c(y)));function o(y){const x=new Date(y);return Number.isNaN(x.getTime())?y:x.toLocaleString()}function l(y){return y.status==="running"&&(y.kind==="tty"||y.kind==="gui"&&!!y.vnc)}function c(y){return y.error?.code==="APP_SESSION_RESTORED_WITHOUT_PROCESS"}function d(y){if(!l(y)){f(y);return}r.open(za(y))}function f(y){r.open({type:"logs",id:`logs:${y.id}`,sessionId:y.id,title:`${y.title} logs`})}async function m(y){await cs(y),await t.invalidateQueries({queryKey:["status"]})}async function p(y){const x=await d0(y);d(x),await t.invalidateQueries({queryKey:["status"]})}async function w(y){await Eh(y);const x=(n.data.value||[]).filter(_=>_.id!==y);r.pruneSession(new Set(x.map(_=>_.id)),Ds(x)),await t.invalidateQueries({queryKey:["status"]})}return(y,x)=>(I(),V("section",Sb,[k("div",_b,[x[1]||(x[1]=k("h2",null,"Sessions",-1)),k("div",Eb,[k("span",null,Z(i.value.length)+" sessions",1),a.value.length?(I(),ye(g(Je),{key:0,variant:"outline",size:"sm",onClick:x[0]||(x[0]=_=>s.value=!s.value)},{default:D(()=>[de(Z(s.value?"Hide restored":`Show restored (${a.value.length})`),1)]),_:1})):pe("",!0)])]),k("div",Ab,[(I(!0),V(rt,null,$t(i.value,_=>(I(),ye(g(hr),{key:_.id},{default:D(()=>[T(g(ha),{class:"session-header"},{default:D(()=>[k("div",null,[T(g(pa),null,{default:D(()=>[de(Z(_.title),1)]),_:2},1024),T(g(da),null,{default:D(()=>[de(Z(_.appId)+" · "+Z(o(_.updatedAt)),1)]),_:2},1024)]),k("div",Tb,[T(g(Lr),{variant:_.status==="running"?"default":"secondary"},{default:D(()=>[de(Z(_.status),1)]),_:2},1032,["variant"]),T(g(Je),{variant:"outline",size:"sm",disabled:_.status!=="running",onClick:$=>m(_.id)},{default:D(()=>[...x[2]||(x[2]=[de("Stop",-1)])]),_:1},8,["disabled","onClick"]),T(g(Je),{variant:"outline",size:"sm",onClick:$=>p(_.id)},{default:D(()=>[...x[3]||(x[3]=[de("Restart",-1)])]),_:1},8,["onClick"]),T(g(Je),{variant:"outline",size:"sm",disabled:!l(_),onClick:$=>d(_)},{default:D(()=>[...x[4]||(x[4]=[de("Open",-1)])]),_:1},8,["disabled","onClick"]),T(g(Je),{variant:"outline",size:"sm",onClick:$=>f(_)},{default:D(()=>[...x[5]||(x[5]=[de("Logs",-1)])]),_:1},8,["onClick"]),T(g(Je),{variant:"outline",size:"sm",onClick:$=>w(_.id)},{default:D(()=>[...x[6]||(x[6]=[de("Delete",-1)])]),_:1},8,["onClick"])])]),_:2},1024),T(g(wn),null,{default:D(()=>[_.error?(I(),V("p",Cb,Z(_.error.code)+": "+Z(_.error.message),1)):pe("",!0),k("dl",Rb,[_.tty?.cwd||_.launch?.cwd?(I(),V("div",Ob,[x[7]||(x[7]=k("dt",null,"CWD",-1)),k("dd",null,Z(_.launch?.cwd||_.tty?.cwd),1)])):pe("",!0),_.display?(I(),V("div",Ib,[x[8]||(x[8]=k("dt",null,"Display",-1)),k("dd",null,Z(_.display.display)+" "+Z(_.display.width)+"x"+Z(_.display.height)+"x"+Z(_.display.depth),1)])):pe("",!0),_.vnc?(I(),V("div",Nb,[x[9]||(x[9]=k("dt",null,"Ports",-1)),k("dd",null,[de(Z(_.vnc.backend==="kasmvnc"?"kasmvnc":"vnc")+" "+Z(_.vnc.port),1),_.vnc.websockifyPort?(I(),V("span",Mb," · ws "+Z(_.vnc.websockifyPort),1)):pe("",!0),_.automation?(I(),V("span",zb," · cdp "+Z(_.automation.port),1)):pe("",!0)])])):pe("",!0),_.process?(I(),V("div",Db,[x[10]||(x[10]=k("dt",null,"Process",-1)),k("dd",null,[de(Z(_.process.command),1),_.process.pid?(I(),V("span",$b," · pid "+Z(_.process.pid),1)):pe("",!0)])])):pe("",!0)])]),_:2},1024)]),_:2},1024))),128))])]))}}),Bb={class:"modal-header"},Lb={class:"settings-content-inner"},Fb=Ae({__name:"SettingsModal",props:{section:{}},emits:["close"],setup(e){const t=e,n=Ce(t.section||"general"),r=[{id:"general",label:"General"},{id:"apps",label:"Apps"},{id:"sessions",label:"Sessions"}];function s(a){n.value=String(a)}return cn(()=>t.section,a=>{n.value=a||"general"}),(a,i)=>(I(),ye(g(Xh),{open:!0,"onUpdate:open":i[0]||(i[0]=o=>!o&&a.$emit("close"))},{default:D(()=>[T(g(ep),{class:"settings-modal gap-0 p-0",style:{width:"min(1280px, calc(100vw - 48px))","max-width":"calc(100vw - 48px)"}},{default:D(()=>[k("header",Bb,[T(g(np),null,{default:D(()=>[...i[1]||(i[1]=[de("Settings",-1)])]),_:1}),T(g(tp),{class:"sr-only"},{default:D(()=>[...i[2]||(i[2]=[de("Configure the controlled instance runtime, applications, and sessions.",-1)])]),_:1})]),T(g(j2),{"model-value":n.value,class:"settings-modal-body",orientation:"vertical","onUpdate:modelValue":s},{default:D(()=>[T(g(K2),{class:"settings-nav"},{default:D(()=>[(I(),V(rt,null,$t(r,o=>T(g(Q2),{key:o.id,value:o.id,class:wt({active:n.value===o.id}),onClick:l=>n.value=o.id},{default:D(()=>[de(Z(o.label),1)]),_:2},1032,["value","class","onClick"])),64))]),_:1}),T(g(kn),{class:"settings-content"},{default:D(()=>[k("main",Lb,[T(g(zo),{value:"general"},{default:D(()=>[T(rp)]),_:1}),T(g(zo),{value:"apps"},{default:D(()=>[T(xb)]),_:1}),T(g(zo),{value:"sessions"},{default:D(()=>[T(Pb)]),_:1})])]),_:1})]),_:1},8,["model-value"])]),_:1})]),_:1}))}}),Ub={class:"logs-panel"},qb={class:"logs-meta"},Hb={key:0,class:"logs-empty"},Vb={key:1,class:"logs-empty"},sp=Ae({__name:"SessionLogs",props:{session:{}},setup(e){const n=_4(e.session.id);function r(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(1)} MB`}return(s,a)=>(I(),V("div",Ub,[k("div",qb,Z(g(n).data.value?.logDir||e.session.paths.logDir),1),g(n).isLoading.value?(I(),V("div",Hb,"Loading logs...")):g(n).data.value?.files.length?(I(!0),V(rt,{key:2},$t(g(n).data.value?.files||[],i=>(I(),V("section",{key:i.name,class:"log-file"},[k("header",null,[k("strong",null,Z(i.name),1),k("span",null,[de(Z(r(i.size))+" · "+Z(i.updatedAt),1),i.truncated?(I(),V(rt,{key:0},[de(" · tail")],64)):pe("",!0)])]),T(g(kn),{class:"log-file-content"},{default:D(()=>[k("pre",null,Z(i.content||"(empty)"),1)]),_:2},1024)]))),128)):(I(),V("div",Vb,"No log files yet."))]))}}),Gb={class:"terminal-panel"},Zb={class:"terminal-canvas-shell"},jb={class:"terminal-status"},ap=Ae({__name:"TerminalSession",props:{session:{}},setup(e){const t=e,n=hs(),r=Ce(null),s=Ce("connecting");let a,i,o,l,c,d;const f=be(()=>ch(`/api/apps/sessions/${t.session.id}/tty`,n.token));function m(){!a||o?.readyState!==WebSocket.OPEN||o.send(JSON.stringify({type:"resize",cols:a.cols,rows:a.rows}))}function p(){try{i?.fit(),a&&a.rows>0&&a.refresh(0,a.rows-1),m()}catch{}}function w(){c!==void 0&&window.cancelAnimationFrame(c),d!==void 0&&window.clearTimeout(d);const $=()=>{c=void 0,p()};c=window.requestAnimationFrame($),d=window.setTimeout(()=>{d=void 0,p()},80)}function y(){const $=window.getComputedStyle(document.documentElement);return{background:$.getPropertyValue("--terminal-surface").trim(),foreground:$.getPropertyValue("--terminal-text").trim(),cursor:$.getPropertyValue("--text").trim(),selectionBackground:$.getPropertyValue("--terminal-selection").trim()}}function x(){c!==void 0&&(window.cancelAnimationFrame(c),c=void 0),d!==void 0&&(window.clearTimeout(d),d=void 0),l?.disconnect(),l=void 0,o?.close(),o=void 0,a?.dispose(),a=void 0,i=void 0}async function _(){x(),await Yn(),r.value&&(a=new Ym({cursorBlink:!0,convertEol:!0,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',fontSize:13,theme:y()}),i=new eg,a.loadAddon(i),a.loadAddon(new Xm),a.open(r.value),w(),o=new WebSocket(f.value),o.addEventListener("open",()=>{s.value="connected",w()}),o.addEventListener("message",$=>{const z=JSON.parse(String($.data||"{}"));z.type==="output"?a?.write(String(z.data||"")):z.type==="connected"?s.value="connected":z.type==="exit"?(s.value="exited",a?.writeln(`\r
|
|
2
|
+
[process exited]`)):z.type==="error"&&(s.value="error",a?.writeln(`\r
|
|
3
|
+
[error] ${z.message}`))}),o.addEventListener("close",()=>{s.value=s.value==="exited"?"exited":"disconnected"}),o.addEventListener("error",()=>{s.value="error"}),a.onData($=>{o?.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"input",data:$}))}),l=new ResizeObserver(p),l.observe(r.value),w())}return cn(()=>t.session.id,_,{immediate:!0}),Zi(x),($,z)=>(I(),V("div",Gb,[k("div",Zb,[k("div",{ref_key:"terminalEl",ref:r,class:"terminal-canvas"},null,512)]),k("div",jb,[k("span",null,Z(s.value)+" · "+Z(e.session.tty?.mode||"pty"),1)])]))}});function Kb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Do,Kc;function Wb(){if(Kc)return Do;Kc=1;function e(M){return M instanceof Map?M.clear=M.delete=M.set=function(){throw new Error("map is read-only")}:M instanceof Set&&(M.add=M.clear=M.delete=function(){throw new Error("set is read-only")}),Object.freeze(M),Object.getOwnPropertyNames(M).forEach(Q=>{const fe=M[Q],qe=typeof fe;(qe==="object"||qe==="function")&&!Object.isFrozen(fe)&&e(fe)}),M}class t{constructor(Q){Q.data===void 0&&(Q.data={}),this.data=Q.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(M){return M.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(M,...Q){const fe=Object.create(null);for(const qe in M)fe[qe]=M[qe];return Q.forEach(function(qe){for(const zt in qe)fe[zt]=qe[zt]}),fe}const s="</span>",a=M=>!!M.scope,i=(M,{prefix:Q})=>{if(M.startsWith("language:"))return M.replace("language:","language-");if(M.includes(".")){const fe=M.split(".");return[`${Q}${fe.shift()}`,...fe.map((qe,zt)=>`${qe}${"_".repeat(zt+1)}`)].join(" ")}return`${Q}${M}`};class o{constructor(Q,fe){this.buffer="",this.classPrefix=fe.classPrefix,Q.walk(this)}addText(Q){this.buffer+=n(Q)}openNode(Q){if(!a(Q))return;const fe=i(Q.scope,{prefix:this.classPrefix});this.span(fe)}closeNode(Q){a(Q)&&(this.buffer+=s)}value(){return this.buffer}span(Q){this.buffer+=`<span class="${Q}">`}}const l=(M={})=>{const Q={children:[]};return Object.assign(Q,M),Q};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Q){this.top.children.push(Q)}openNode(Q){const fe=l({scope:Q});this.add(fe),this.stack.push(fe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Q){return this.constructor._walk(Q,this.rootNode)}static _walk(Q,fe){return typeof fe=="string"?Q.addText(fe):fe.children&&(Q.openNode(fe),fe.children.forEach(qe=>this._walk(Q,qe)),Q.closeNode(fe)),Q}static _collapse(Q){typeof Q!="string"&&Q.children&&(Q.children.every(fe=>typeof fe=="string")?Q.children=[Q.children.join("")]:Q.children.forEach(fe=>{c._collapse(fe)}))}}class d extends c{constructor(Q){super(),this.options=Q}addText(Q){Q!==""&&this.add(Q)}startScope(Q){this.openNode(Q)}endScope(){this.closeNode()}__addSublanguage(Q,fe){const qe=Q.root;fe&&(qe.scope=`language:${fe}`),this.add(qe)}toHTML(){return new o(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function f(M){return M?typeof M=="string"?M:M.source:null}function m(M){return y("(?=",M,")")}function p(M){return y("(?:",M,")*")}function w(M){return y("(?:",M,")?")}function y(...M){return M.map(fe=>f(fe)).join("")}function x(M){const Q=M[M.length-1];return typeof Q=="object"&&Q.constructor===Object?(M.splice(M.length-1,1),Q):{}}function _(...M){return"("+(x(M).capture?"":"?:")+M.map(qe=>f(qe)).join("|")+")"}function $(M){return new RegExp(M.toString()+"|").exec("").length-1}function z(M,Q){const fe=M&&M.exec(Q);return fe&&fe.index===0}const C=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function S(M,{joinWith:Q}){let fe=0;return M.map(qe=>{fe+=1;const zt=fe;let Dt=f(qe),Te="";for(;Dt.length>0;){const xe=C.exec(Dt);if(!xe){Te+=Dt;break}Te+=Dt.substring(0,xe.index),Dt=Dt.substring(xe.index+xe[0].length),xe[0][0]==="\\"&&xe[1]?Te+="\\"+String(Number(xe[1])+zt):(Te+=xe[0],xe[0]==="("&&fe++)}return Te}).map(qe=>`(${qe})`).join(Q)}const E=/\b\B/,F="[a-zA-Z]\\w*",N="[a-zA-Z_]\\w*",G="\\b\\d+(\\.\\d+)?",P="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",j="\\b(0b[01]+)",q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Y=(M={})=>{const Q=/^#![ ]*\//;return M.binary&&(M.begin=y(Q,/.*\b/,M.binary,/\b.*/)),r({scope:"meta",begin:Q,end:/$/,relevance:0,"on:begin":(fe,qe)=>{fe.index!==0&&qe.ignoreMatch()}},M)},te={begin:"\\\\[\\s\\S]",relevance:0},he={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[te]},Se={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[te]},re={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ne=function(M,Q,fe={}){const qe=r({scope:"comment",begin:M,end:Q,contains:[]},fe);qe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const zt=_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return qe.contains.push({begin:y(/[ ]+/,"(",zt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),qe},Re=ne("//","$"),se=ne("/\\*","\\*/"),Le=ne("#","$"),Ye={scope:"number",begin:G,relevance:0},nt={scope:"number",begin:P,relevance:0},Mt={scope:"number",begin:j,relevance:0},Xe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[te,{begin:/\[/,end:/\]/,relevance:0,contains:[te]}]},tt={scope:"title",begin:F,relevance:0},O={scope:"title",begin:N,relevance:0},oe={begin:"\\.\\s*"+N,relevance:0};var ue=Object.freeze({__proto__:null,APOS_STRING_MODE:he,BACKSLASH_ESCAPE:te,BINARY_NUMBER_MODE:Mt,BINARY_NUMBER_RE:j,COMMENT:ne,C_BLOCK_COMMENT_MODE:se,C_LINE_COMMENT_MODE:Re,C_NUMBER_MODE:nt,C_NUMBER_RE:P,END_SAME_AS_BEGIN:function(M){return Object.assign(M,{"on:begin":(Q,fe)=>{fe.data._beginMatch=Q[1]},"on:end":(Q,fe)=>{fe.data._beginMatch!==Q[1]&&fe.ignoreMatch()}})},HASH_COMMENT_MODE:Le,IDENT_RE:F,MATCH_NOTHING_RE:E,METHOD_GUARD:oe,NUMBER_MODE:Ye,NUMBER_RE:G,PHRASAL_WORDS_MODE:re,QUOTE_STRING_MODE:Se,REGEXP_MODE:Xe,RE_STARTERS_RE:q,SHEBANG:Y,TITLE_MODE:tt,UNDERSCORE_IDENT_RE:N,UNDERSCORE_TITLE_MODE:O});function Ee(M,Q){M.input[M.index-1]==="."&&Q.ignoreMatch()}function Fe(M,Q){M.className!==void 0&&(M.scope=M.className,delete M.className)}function ze(M,Q){Q&&M.beginKeywords&&(M.begin="\\b("+M.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",M.__beforeBegin=Ee,M.keywords=M.keywords||M.beginKeywords,delete M.beginKeywords,M.relevance===void 0&&(M.relevance=0))}function _e(M,Q){Array.isArray(M.illegal)&&(M.illegal=_(...M.illegal))}function pt(M,Q){if(M.match){if(M.begin||M.end)throw new Error("begin & end are not supported with match");M.begin=M.match,delete M.match}}function je(M,Q){M.relevance===void 0&&(M.relevance=1)}const kt=(M,Q)=>{if(!M.beforeMatch)return;if(M.starts)throw new Error("beforeMatch cannot be used with starts");const fe=Object.assign({},M);Object.keys(M).forEach(qe=>{delete M[qe]}),M.keywords=fe.keywords,M.begin=y(fe.beforeMatch,m(fe.begin)),M.starts={relevance:0,contains:[Object.assign(fe,{endsParent:!0})]},M.relevance=0,delete fe.beforeMatch},pn=["of","and","for","in","not","or","if","then","parent","list","value"],qn="keyword";function sr(M,Q,fe=qn){const qe=Object.create(null);return typeof M=="string"?zt(fe,M.split(" ")):Array.isArray(M)?zt(fe,M):Object.keys(M).forEach(function(Dt){Object.assign(qe,sr(M[Dt],Q,Dt))}),qe;function zt(Dt,Te){Q&&(Te=Te.map(xe=>xe.toLowerCase())),Te.forEach(function(xe){const Pe=xe.split("|");qe[Pe[0]]=[Dt,Qs(Pe[0],Pe[1])]})}}function Qs(M,Q){return Q?Number(Q):Js(M)?0:1}function Js(M){return pn.includes(M.toLowerCase())}const Sr={},Tn=M=>{console.error(M)},Yr=(M,...Q)=>{console.log(`WARN: ${M}`,...Q)},Hn=(M,Q)=>{Sr[`${M}/${Q}`]||(console.log(`Deprecated as of ${M}. ${Q}`),Sr[`${M}/${Q}`]=!0)},H=new Error;function L(M,Q,{key:fe}){let qe=0;const zt=M[fe],Dt={},Te={};for(let xe=1;xe<=Q.length;xe++)Te[xe+qe]=zt[xe],Dt[xe+qe]=!0,qe+=$(Q[xe-1]);M[fe]=Te,M[fe]._emit=Dt,M[fe]._multi=!0}function U(M){if(Array.isArray(M.begin)){if(M.skip||M.excludeBegin||M.returnBegin)throw Tn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),H;if(typeof M.beginScope!="object"||M.beginScope===null)throw Tn("beginScope must be object"),H;L(M,M.begin,{key:"beginScope"}),M.begin=S(M.begin,{joinWith:""})}}function Ne(M){if(Array.isArray(M.end)){if(M.skip||M.excludeEnd||M.returnEnd)throw Tn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),H;if(typeof M.endScope!="object"||M.endScope===null)throw Tn("endScope must be object"),H;L(M,M.end,{key:"endScope"}),M.end=S(M.end,{joinWith:""})}}function lt(M){M.scope&&typeof M.scope=="object"&&M.scope!==null&&(M.beginScope=M.scope,delete M.scope)}function nn(M){lt(M),typeof M.beginScope=="string"&&(M.beginScope={_wrap:M.beginScope}),typeof M.endScope=="string"&&(M.endScope={_wrap:M.endScope}),U(M),Ne(M)}function Cn(M){function Q(Te,xe){return new RegExp(f(Te),"m"+(M.case_insensitive?"i":"")+(M.unicodeRegex?"u":"")+(xe?"g":""))}class fe{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(xe,Pe){Pe.position=this.position++,this.matchIndexes[this.matchAt]=Pe,this.regexes.push([Pe,xe]),this.matchAt+=$(xe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const xe=this.regexes.map(Pe=>Pe[1]);this.matcherRe=Q(S(xe,{joinWith:"|"}),!0),this.lastIndex=0}exec(xe){this.matcherRe.lastIndex=this.lastIndex;const Pe=this.matcherRe.exec(xe);if(!Pe)return null;const Qt=Pe.findIndex((Ys,xo)=>xo>0&&Ys!==void 0),Bt=this.matchIndexes[Qt];return Pe.splice(0,Qt),Object.assign(Pe,Bt)}}class qe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(xe){if(this.multiRegexes[xe])return this.multiRegexes[xe];const Pe=new fe;return this.rules.slice(xe).forEach(([Qt,Bt])=>Pe.addRule(Qt,Bt)),Pe.compile(),this.multiRegexes[xe]=Pe,Pe}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(xe,Pe){this.rules.push([xe,Pe]),Pe.type==="begin"&&this.count++}exec(xe){const Pe=this.getMatcher(this.regexIndex);Pe.lastIndex=this.lastIndex;let Qt=Pe.exec(xe);if(this.resumingScanAtSamePosition()&&!(Qt&&Qt.index===this.lastIndex)){const Bt=this.getMatcher(0);Bt.lastIndex=this.lastIndex+1,Qt=Bt.exec(xe)}return Qt&&(this.regexIndex+=Qt.position+1,this.regexIndex===this.count&&this.considerAll()),Qt}}function zt(Te){const xe=new qe;return Te.contains.forEach(Pe=>xe.addRule(Pe.begin,{rule:Pe,type:"begin"})),Te.terminatorEnd&&xe.addRule(Te.terminatorEnd,{type:"end"}),Te.illegal&&xe.addRule(Te.illegal,{type:"illegal"}),xe}function Dt(Te,xe){const Pe=Te;if(Te.isCompiled)return Pe;[Fe,pt,nn,kt].forEach(Bt=>Bt(Te,xe)),M.compilerExtensions.forEach(Bt=>Bt(Te,xe)),Te.__beforeBegin=null,[ze,_e,je].forEach(Bt=>Bt(Te,xe)),Te.isCompiled=!0;let Qt=null;return typeof Te.keywords=="object"&&Te.keywords.$pattern&&(Te.keywords=Object.assign({},Te.keywords),Qt=Te.keywords.$pattern,delete Te.keywords.$pattern),Qt=Qt||/\w+/,Te.keywords&&(Te.keywords=sr(Te.keywords,M.case_insensitive)),Pe.keywordPatternRe=Q(Qt,!0),xe&&(Te.begin||(Te.begin=/\B|\b/),Pe.beginRe=Q(Pe.begin),!Te.end&&!Te.endsWithParent&&(Te.end=/\B|\b/),Te.end&&(Pe.endRe=Q(Pe.end)),Pe.terminatorEnd=f(Pe.end)||"",Te.endsWithParent&&xe.terminatorEnd&&(Pe.terminatorEnd+=(Te.end?"|":"")+xe.terminatorEnd)),Te.illegal&&(Pe.illegalRe=Q(Te.illegal)),Te.contains||(Te.contains=[]),Te.contains=[].concat(...Te.contains.map(function(Bt){return wo(Bt==="self"?Te:Bt)})),Te.contains.forEach(function(Bt){Dt(Bt,Pe)}),Te.starts&&Dt(Te.starts,xe),Pe.matcher=zt(Pe),Pe}if(M.compilerExtensions||(M.compilerExtensions=[]),M.contains&&M.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return M.classNameAliases=r(M.classNameAliases||{}),Dt(M)}function Dn(M){return M?M.endsWithParent||Dn(M.starts):!1}function wo(M){return M.variants&&!M.cachedVariants&&(M.cachedVariants=M.variants.map(function(Q){return r(M,{variants:null},Q)})),M.cachedVariants?M.cachedVariants:Dn(M)?r(M,{starts:M.starts?r(M.starts):null}):Object.isFrozen(M)?r(M):M}var z1="11.11.1";class D1 extends Error{constructor(Q,fe){super(Q),this.name="HTMLInjectionError",this.html=fe}}const ko=n,ic=r,oc=Symbol("nomatch"),$1=7,lc=function(M){const Q=Object.create(null),fe=Object.create(null),qe=[];let zt=!0;const Dt="Could not find the language '{}', did you forget to load/include a language module?",Te={disableAutodetect:!0,name:"Plain text",contains:[]};let xe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function Pe(le){return xe.noHighlightRe.test(le)}function Qt(le){let Me=le.className+" ";Me+=le.parentNode?le.parentNode.className:"";const et=xe.languageDetectRe.exec(Me);if(et){const vt=_r(et[1]);return vt||(Yr(Dt.replace("{}",et[1])),Yr("Falling back to no-highlight mode for this block.",le)),vt?et[1]:"no-highlight"}return Me.split(/\s+/).find(vt=>Pe(vt)||_r(vt))}function Bt(le,Me,et){let vt="",Ht="";typeof Me=="object"?(vt=le,et=Me.ignoreIllegals,Ht=Me.language):(Hn("10.7.0","highlight(lang, code, ...args) has been deprecated."),Hn("10.7.0",`Please use highlight(code, options) instead.
|
|
4
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Ht=le,vt=Me),et===void 0&&(et=!0);const $n={code:vt,language:Ht};Ua("before:highlight",$n);const Er=$n.result?$n.result:Ys($n.language,$n.code,et);return Er.code=$n.code,Ua("after:highlight",Er),Er}function Ys(le,Me,et,vt){const Ht=Object.create(null);function $n(me,Ie){return me.keywords[Ie]}function Er(){if(!He.keywords){Yt.addText(bt);return}let me=0;He.keywordPatternRe.lastIndex=0;let Ie=He.keywordPatternRe.exec(bt),Ke="";for(;Ie;){Ke+=bt.substring(me,Ie.index);const dt=Gn.case_insensitive?Ie[0].toLowerCase():Ie[0],Xt=$n(He,dt);if(Xt){const[ar,X1]=Xt;if(Yt.addText(Ke),Ke="",Ht[dt]=(Ht[dt]||0)+1,Ht[dt]<=$1&&(Va+=X1),ar.startsWith("_"))Ke+=Ie[0];else{const em=Gn.classNameAliases[ar]||ar;Vn(Ie[0],em)}}else Ke+=Ie[0];me=He.keywordPatternRe.lastIndex,Ie=He.keywordPatternRe.exec(bt)}Ke+=bt.substring(me),Yt.addText(Ke)}function qa(){if(bt==="")return;let me=null;if(typeof He.subLanguage=="string"){if(!Q[He.subLanguage]){Yt.addText(bt);return}me=Ys(He.subLanguage,bt,!0,gc[He.subLanguage]),gc[He.subLanguage]=me._top}else me=So(bt,He.subLanguage.length?He.subLanguage:null);He.relevance>0&&(Va+=me.relevance),Yt.__addSublanguage(me._emitter,me.language)}function vn(){He.subLanguage!=null?qa():Er(),bt=""}function Vn(me,Ie){me!==""&&(Yt.startScope(Ie),Yt.addText(me),Yt.endScope())}function hc(me,Ie){let Ke=1;const dt=Ie.length-1;for(;Ke<=dt;){if(!me._emit[Ke]){Ke++;continue}const Xt=Gn.classNameAliases[me[Ke]]||me[Ke],ar=Ie[Ke];Xt?Vn(ar,Xt):(bt=ar,Er(),bt=""),Ke++}}function pc(me,Ie){return me.scope&&typeof me.scope=="string"&&Yt.openNode(Gn.classNameAliases[me.scope]||me.scope),me.beginScope&&(me.beginScope._wrap?(Vn(bt,Gn.classNameAliases[me.beginScope._wrap]||me.beginScope._wrap),bt=""):me.beginScope._multi&&(hc(me.beginScope,Ie),bt="")),He=Object.create(me,{parent:{value:He}}),He}function fc(me,Ie,Ke){let dt=z(me.endRe,Ke);if(dt){if(me["on:end"]){const Xt=new t(me);me["on:end"](Ie,Xt),Xt.isMatchIgnored&&(dt=!1)}if(dt){for(;me.endsParent&&me.parent;)me=me.parent;return me}}if(me.endsWithParent)return fc(me.parent,Ie,Ke)}function K1(me){return He.matcher.regexIndex===0?(bt+=me[0],1):(To=!0,0)}function W1(me){const Ie=me[0],Ke=me.rule,dt=new t(Ke),Xt=[Ke.__beforeBegin,Ke["on:begin"]];for(const ar of Xt)if(ar&&(ar(me,dt),dt.isMatchIgnored))return K1(Ie);return Ke.skip?bt+=Ie:(Ke.excludeBegin&&(bt+=Ie),vn(),!Ke.returnBegin&&!Ke.excludeBegin&&(bt=Ie)),pc(Ke,me),Ke.returnBegin?0:Ie.length}function Q1(me){const Ie=me[0],Ke=Me.substring(me.index),dt=fc(He,me,Ke);if(!dt)return oc;const Xt=He;He.endScope&&He.endScope._wrap?(vn(),Vn(Ie,He.endScope._wrap)):He.endScope&&He.endScope._multi?(vn(),hc(He.endScope,me)):Xt.skip?bt+=Ie:(Xt.returnEnd||Xt.excludeEnd||(bt+=Ie),vn(),Xt.excludeEnd&&(bt=Ie));do He.scope&&Yt.closeNode(),!He.skip&&!He.subLanguage&&(Va+=He.relevance),He=He.parent;while(He!==dt.parent);return dt.starts&&pc(dt.starts,me),Xt.returnEnd?0:Ie.length}function J1(){const me=[];for(let Ie=He;Ie!==Gn;Ie=Ie.parent)Ie.scope&&me.unshift(Ie.scope);me.forEach(Ie=>Yt.openNode(Ie))}let Ha={};function mc(me,Ie){const Ke=Ie&&Ie[0];if(bt+=me,Ke==null)return vn(),0;if(Ha.type==="begin"&&Ie.type==="end"&&Ha.index===Ie.index&&Ke===""){if(bt+=Me.slice(Ie.index,Ie.index+1),!zt){const dt=new Error(`0 width match regex (${le})`);throw dt.languageName=le,dt.badRule=Ha.rule,dt}return 1}if(Ha=Ie,Ie.type==="begin")return W1(Ie);if(Ie.type==="illegal"&&!et){const dt=new Error('Illegal lexeme "'+Ke+'" for mode "'+(He.scope||"<unnamed>")+'"');throw dt.mode=He,dt}else if(Ie.type==="end"){const dt=Q1(Ie);if(dt!==oc)return dt}if(Ie.type==="illegal"&&Ke==="")return bt+=`
|
|
5
|
+
`,1;if(Ao>1e5&&Ao>Ie.index*3)throw new Error("potential infinite loop, way more iterations than matches");return bt+=Ke,Ke.length}const Gn=_r(le);if(!Gn)throw Tn(Dt.replace("{}",le)),new Error('Unknown language: "'+le+'"');const Y1=Cn(Gn);let Eo="",He=vt||Y1;const gc={},Yt=new xe.__emitter(xe);J1();let bt="",Va=0,Xr=0,Ao=0,To=!1;try{if(Gn.__emitTokens)Gn.__emitTokens(Me,Yt);else{for(He.matcher.considerAll();;){Ao++,To?To=!1:He.matcher.considerAll(),He.matcher.lastIndex=Xr;const me=He.matcher.exec(Me);if(!me)break;const Ie=Me.substring(Xr,me.index),Ke=mc(Ie,me);Xr=me.index+Ke}mc(Me.substring(Xr))}return Yt.finalize(),Eo=Yt.toHTML(),{language:le,value:Eo,relevance:Va,illegal:!1,_emitter:Yt,_top:He}}catch(me){if(me.message&&me.message.includes("Illegal"))return{language:le,value:ko(Me),illegal:!0,relevance:0,_illegalBy:{message:me.message,index:Xr,context:Me.slice(Xr-100,Xr+100),mode:me.mode,resultSoFar:Eo},_emitter:Yt};if(zt)return{language:le,value:ko(Me),illegal:!1,relevance:0,errorRaised:me,_emitter:Yt,_top:He};throw me}}function xo(le){const Me={value:ko(le),illegal:!1,relevance:0,_top:Te,_emitter:new xe.__emitter(xe)};return Me._emitter.addText(le),Me}function So(le,Me){Me=Me||xe.languages||Object.keys(Q);const et=xo(le),vt=Me.filter(_r).filter(dc).map(vn=>Ys(vn,le,!1));vt.unshift(et);const Ht=vt.sort((vn,Vn)=>{if(vn.relevance!==Vn.relevance)return Vn.relevance-vn.relevance;if(vn.language&&Vn.language){if(_r(vn.language).supersetOf===Vn.language)return 1;if(_r(Vn.language).supersetOf===vn.language)return-1}return 0}),[$n,Er]=Ht,qa=$n;return qa.secondBest=Er,qa}function P1(le,Me,et){const vt=Me&&fe[Me]||et;le.classList.add("hljs"),le.classList.add(`language-${vt}`)}function _o(le){let Me=null;const et=Qt(le);if(Pe(et))return;if(Ua("before:highlightElement",{el:le,language:et}),le.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",le);return}if(le.children.length>0&&(xe.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(le)),xe.throwUnescapedHTML))throw new D1("One of your code blocks includes unescaped HTML.",le.innerHTML);Me=le;const vt=Me.textContent,Ht=et?Bt(vt,{language:et,ignoreIllegals:!0}):So(vt);le.innerHTML=Ht.value,le.dataset.highlighted="yes",P1(le,et,Ht.language),le.result={language:Ht.language,re:Ht.relevance,relevance:Ht.relevance},Ht.secondBest&&(le.secondBest={language:Ht.secondBest.language,relevance:Ht.secondBest.relevance}),Ua("after:highlightElement",{el:le,result:Ht,text:vt})}function B1(le){xe=ic(xe,le)}const L1=()=>{Fa(),Hn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function F1(){Fa(),Hn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let cc=!1;function Fa(){function le(){Fa()}if(document.readyState==="loading"){cc||window.addEventListener("DOMContentLoaded",le,!1),cc=!0;return}document.querySelectorAll(xe.cssSelector).forEach(_o)}function U1(le,Me){let et=null;try{et=Me(M)}catch(vt){if(Tn("Language definition for '{}' could not be registered.".replace("{}",le)),zt)Tn(vt);else throw vt;et=Te}et.name||(et.name=le),Q[le]=et,et.rawDefinition=Me.bind(null,M),et.aliases&&uc(et.aliases,{languageName:le})}function q1(le){delete Q[le];for(const Me of Object.keys(fe))fe[Me]===le&&delete fe[Me]}function H1(){return Object.keys(Q)}function _r(le){return le=(le||"").toLowerCase(),Q[le]||Q[fe[le]]}function uc(le,{languageName:Me}){typeof le=="string"&&(le=[le]),le.forEach(et=>{fe[et.toLowerCase()]=Me})}function dc(le){const Me=_r(le);return Me&&!Me.disableAutodetect}function V1(le){le["before:highlightBlock"]&&!le["before:highlightElement"]&&(le["before:highlightElement"]=Me=>{le["before:highlightBlock"](Object.assign({block:Me.el},Me))}),le["after:highlightBlock"]&&!le["after:highlightElement"]&&(le["after:highlightElement"]=Me=>{le["after:highlightBlock"](Object.assign({block:Me.el},Me))})}function G1(le){V1(le),qe.push(le)}function Z1(le){const Me=qe.indexOf(le);Me!==-1&&qe.splice(Me,1)}function Ua(le,Me){const et=le;qe.forEach(function(vt){vt[et]&&vt[et](Me)})}function j1(le){return Hn("10.7.0","highlightBlock will be removed entirely in v12.0"),Hn("10.7.0","Please use highlightElement now."),_o(le)}Object.assign(M,{highlight:Bt,highlightAuto:So,highlightAll:Fa,highlightElement:_o,highlightBlock:j1,configure:B1,initHighlighting:L1,initHighlightingOnLoad:F1,registerLanguage:U1,unregisterLanguage:q1,listLanguages:H1,getLanguage:_r,registerAliases:uc,autoDetection:dc,inherit:ic,addPlugin:G1,removePlugin:Z1}),M.debugMode=function(){zt=!1},M.safeMode=function(){zt=!0},M.versionString=z1,M.regex={concat:y,lookahead:m,either:_,optional:w,anyNumberOfTimes:p};for(const le in ue)typeof ue[le]=="object"&&e(ue[le]);return Object.assign(M,ue),M},bs=lc({});return bs.newInstance=()=>lc({}),Do=bs,bs.HighlightJS=bs,bs.default=bs,Do}var Qb=Wb();const _l=Kb(Qb);function Jb(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},o={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(o);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),w={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},y=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],x=["true","false"],_={match:/(\/[a-z._-]+)+/},$=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],z=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],S=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:y,literal:x,built_in:[...$,...z,"set","shopt",...C,...S]},contains:[p,e.SHEBANG(),w,f,a,i,_,o,l,c,d,n]}}function Yb(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",i="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},p=t.optional(s)+e.IDENT_RE+"\\s*\\(",w=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],y=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],x=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:y,keyword:w,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:x},S={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[S,f,o,n,e.C_BLOCK_COMMENT_MODE,d,c],F={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:E.concat([{begin:/\(/,end:/\)/,keywords:C,contains:E.concat(["self"]),relevance:0}]),relevance:0},N={className:"function",begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:p,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,o,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(F,N,S,E,[f,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Xb(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],i={keyword:s.concat(a),built_in:t,literal:r},o=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},f=e.inherit(d,{illegal:/\n/}),m={className:"subst",begin:/\{/,end:/\}/,keywords:i},p=e.inherit(m,{illegal:/\n/}),w={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},y={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},m]},x=e.inherit(y,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});m.contains=[y,w,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],p.contains=[x,w,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[c,y,w,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},$={begin:"<",end:">",contains:[{beginKeywords:"in out"},o]},z=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",C={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:i,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},_,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},o,$,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,$,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+z+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:i,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,$],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,relevance:0,contains:[_,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},C]}}const e3=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t3=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n3=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r3=[...t3,...n3],s3=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),a3=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),i3=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),o3=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function l3(e){const t=e.regex,n=e3(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",a=/@-?\w[\w]*(-\w+)*/,i="[a-zA-Z-][a-zA-Z0-9_-]*",o=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+i,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+a3.join("|")+")"},{begin:":(:)?("+i3.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+o3.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:s3.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r3.join("|")+")\\b"}]}}function c3(e){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"</"}}function u3(e){const a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,illegal:/["']/}]}]}}var _s="[0-9](_*[0-9])*",Qa=`\\.(${_s})`,Ja="[0-9a-fA-F](_*[0-9a-fA-F])*",Wc={className:"number",variants:[{begin:`(\\b(${_s})((${Qa})|\\.)?|(${Qa}))[eE][+-]?(${_s})[fFdD]?\\b`},{begin:`\\b(${_s})((${Qa})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Qa})[fFdD]?\\b`},{begin:`\\b(${_s})[fFdD]\\b`},{begin:`\\b0[xX]((${Ja})\\.?|(${Ja})?\\.(${Ja}))[pP][+-]?(${_s})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Ja})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function ip(e,t,n){return n===-1?"":e.replace(t,r=>ip(e,t,n-1))}function d3(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+ip("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},d={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Wc,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Wc,c]}}const Qc="[A-Za-z$_][0-9A-Za-z$_]*",h3=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],p3=["true","false","null","undefined","NaN","Infinity"],op=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],lp=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],cp=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],f3=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],m3=[].concat(cp,op,lp);function g3(e){const t=e.regex,n=(ne,{after:Re})=>{const se="</"+ne[0].slice(1);return ne.input.indexOf(se,Re)!==-1},r=Qc,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ne,Re)=>{const se=ne[0].length+ne.index,Le=ne.input[se];if(Le==="<"||Le===","){Re.ignoreMatch();return}Le===">"&&(n(ne,{after:se})||Re.ignoreMatch());let Ye;const nt=ne.input.substring(se);if(Ye=nt.match(/^\s*=/)){Re.ignoreMatch();return}if((Ye=nt.match(/^\s+extends\s+/))&&Ye.index===0){Re.ignoreMatch();return}}},o={$pattern:Qc,keyword:h3,literal:p3,built_in:m3,"variable.language":f3},l="[0-9](_?[0-9])*",c=`\\.(${l})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},w={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},y={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},$={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},z=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,w,y,x,{match:/\$\d+/},f];m.contains=z.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(z)});const C=[].concat($,m.contains),S=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(C)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S},F={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},N={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...op,...lp]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q(ne){return t.concat("(?!",ne.join("|"),")")}const Y={match:t.concat(/\b/,q([...cp,"super","import"].map(ne=>`${ne}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},te={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},he={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},Se="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",re={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(Se)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:N},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,w,y,x,$,{match:/\$\d+/},f,N,{scope:"attr",match:r+t.lookahead(":"),relevance:0},re,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[$,e.REGEXP_MODE,{className:"function",begin:Se,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},te,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},Y,j,F,he,{match:/\$[(.]/}]}}function v3(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Es="[0-9](_*[0-9])*",Ya=`\\.(${Es})`,Xa="[0-9a-fA-F](_*[0-9a-fA-F])*",b3={className:"number",variants:[{begin:`(\\b(${Es})((${Ya})|\\.)?|(${Ya}))[eE][+-]?(${Es})[fFdD]?\\b`},{begin:`\\b(${Es})((${Ya})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Ya})[fFdD]?\\b`},{begin:`\\b(${Es})[fFdD]\\b`},{begin:`\\b0[xX]((${Xa})\\.?|(${Xa})?\\.(${Xa}))[pP][+-]?(${Es})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Xa})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function y3(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},i={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,s]}]};s.contains.push(i);const o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(i,{className:"string"}),"self"]}]},c=b3,d=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),f={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},m=f;return m.variants[1].contains=[f],f.variants[1].contains=[m],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,d,n,r,o,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[f,e.C_LINE_COMMENT_MODE,d],relevance:0},e.C_LINE_COMMENT_MODE,d,o,l,i,e.C_NUMBER_MODE]},d]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},o,l]},i,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
6
|
+
`},c]}}function w3(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=e.inherit(c,{contains:[]}),m=e.inherit(d,{contains:[]});c.contains.push(m),d.contains.push(f);let p=[n,l];return[c,d,f,m].forEach(_=>{_.contains=_.contains.concat(p)}),p=p.concat(c,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,a,c,d,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},s,r,l,i,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function k3(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),i={scope:"variable",match:"\\$+"+r},o={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),d=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),f={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(te,he)=>{he.data._beginMatch=te[1]||te[2]},"on:end":(te,he)=>{he.data._beginMatch!==te[1]&&he.ignoreMatch()}},m=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
7
|
+
]`,w={scope:"string",variants:[d,c,f,m]},y={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},x=["false","null","true"],_=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],$=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:_,literal:(te=>{const he=[];return te.forEach(Se=>{he.push(Se),Se.toLowerCase()===Se?he.push(Se.toUpperCase()):he.push(Se.toLowerCase())}),he})(x),built_in:$},S=te=>te.map(he=>he.replace(/\|\d+$/,"")),E={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",S($).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},F=t.concat(r,"\\b(?!\\()"),N={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),F],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),F],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},G={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},P={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[G,i,N,e.C_BLOCK_COMMENT_MODE,w,y,E]},j={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",S(_).join("\\b|"),"|",S($).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[P]};P.contains.push(j);const q=[G,N,e.C_BLOCK_COMMENT_MODE,w,y,E],Y={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:x,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:x,keyword:["new","array"]},contains:["self",...q]},...q,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:C,contains:[Y,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},o,{scope:"variable.language",match:/\$this\b/},i,j,N,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},E,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,contains:["self",Y,i,N,e.C_BLOCK_COMMENT_MODE,w,y]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},w,y]}}function x3(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,d,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},m="[0-9](_?[0-9])*",p=`(\\b(${m}))?\\.(${m})|\\b(${m})\\.`,w=`\\b|${r.join("|")}`,y={className:"number",relevance:0,variants:[{begin:`(\\b(${m})|(${p}))[eE][+-]?(${m})[jJ]?(?=${w})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${w})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${w})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${w})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${w})`},{begin:`\\b(${m})[jJ](?=${w})`}]},x={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,y,f,e.HASH_COMMENT_MODE]}]};return c.contains=[f,y,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,y,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,x,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[y,_,f]}]}}function S3(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(r,/(::\w+)*/),i={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:i},f={className:"string",contains:[e.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,d]})]}]},m="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",w={className:"number",relevance:0,variants:[{begin:`\\b(${m})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},y={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:i}]},E=[f,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:i},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:i},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:n}],relevance:0},w,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);d.contains=E,y.contains=E;const P=[{begin:/^\s*=>/,starts:{end:"$",contains:E}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:i,contains:E}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(P).concat(c).concat(E)}}function _3(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",o=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:o,literal:l,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+i}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:d}},{className:"punctuation",begin:"->"},a]}}function E3(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],i=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],m=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=d,w=[...c,...l].filter(S=>!d.includes(S)),y={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},x={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function $(S){return t.concat(/\b/,t.either(...S.map(E=>E.replace(/\s+/,"\\s+"))),/\b/)}const z={scope:"keyword",match:$(m),relevance:0};function C(S,{exceptions:E,when:F}={}){const N=F;return E=E||[],S.map(G=>G.match(/\|\d+$/)||E.includes(G)?G:N(G)?`${G}|0`:G)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(w,{when:S=>S.length<3}),literal:a,type:o,built_in:f},contains:[{scope:"type",match:$(i)},z,_,y,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,x]}}function up(e){return e?typeof e=="string"?e:e.source:null}function na(e){return ft("(?=",e,")")}function ft(...e){return e.map(n=>up(n)).join("")}function A3(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function an(...e){return"("+(A3(e).capture?"":"?:")+e.map(r=>up(r)).join("|")+")"}const b0=e=>ft(/\b/,e,/\w$/.test(e)?/\b/:/\B/),T3=["Protocol","Type"].map(b0),Jc=["init","self"].map(b0),C3=["Any","Self"],$o=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Yc=["false","nil","true"],R3=["assignment","associativity","higherThan","left","lowerThan","none","right"],O3=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Xc=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],dp=an(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),hp=an(dp,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Po=ft(dp,hp,"*"),pp=an(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ni=an(pp,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),jn=ft(pp,Ni,"*"),ei=ft(/[A-Z]/,Ni,"*"),I3=["attached","autoclosure",ft(/convention\(/,an("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ft(/objc\(/,jn,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],N3=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function M3(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,an(...T3,...Jc)],className:{2:"keyword"}},a={match:ft(/\./,an(...$o)),relevance:0},i=$o.filter(je=>typeof je=="string").concat(["_|0"]),o=$o.filter(je=>typeof je!="string").concat(C3).map(b0),l={variants:[{className:"keyword",match:an(...o,...Jc)}]},c={$pattern:an(/\b\w+/,/#\w+/),keyword:i.concat(O3),literal:Yc},d=[s,a,l],f={match:ft(/\./,an(...Xc)),relevance:0},m={className:"built_in",match:ft(/\b/,an(...Xc),/(?=\()/)},p=[f,m],w={match:/->/,relevance:0},y={className:"operator",relevance:0,variants:[{match:Po},{match:`\\.(\\.|${hp})+`}]},x=[w,y],_="([0-9]_*)+",$="([0-9a-fA-F]_*)+",z={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${$})(\\.(${$}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},C=(je="")=>({className:"subst",variants:[{match:ft(/\\/,je,/[0\\tnr"']/)},{match:ft(/\\/,je,/u\{[0-9a-fA-F]{1,8}\}/)}]}),S=(je="")=>({className:"subst",match:ft(/\\/,je,/[\t ]*(?:[\r\n]|\r\n)/)}),E=(je="")=>({className:"subst",label:"interpol",begin:ft(/\\/,je,/\(/),end:/\)/}),F=(je="")=>({begin:ft(je,/"""/),end:ft(/"""/,je),contains:[C(je),S(je),E(je)]}),N=(je="")=>({begin:ft(je,/"/),end:ft(/"/,je),contains:[C(je),E(je)]}),G={className:"string",variants:[F(),F("#"),F("##"),F("###"),N(),N("#"),N("##"),N("###")]},P=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],j={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:P},q=je=>{const kt=ft(je,/\//),pn=ft(/\//,je);return{begin:kt,end:pn,contains:[...P,{scope:"comment",begin:`#(?!.*${pn})`,end:/$/}]}},Y={scope:"regexp",variants:[q("###"),q("##"),q("#"),j]},te={match:ft(/`/,jn,/`/)},he={className:"variable",match:/\$\d+/},Se={className:"variable",match:`\\$${Ni}+`},re=[te,he,Se],ne={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:N3,contains:[...x,z,G]}]}},Re={scope:"keyword",match:ft(/@/,an(...I3),na(an(/\(/,/\s+/)))},se={scope:"meta",match:ft(/@/,jn)},Le=[ne,Re,se],Ye={match:na(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ft(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ni,"+")},{className:"type",match:ei,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ft(/\s+&\s+/,na(ei)),relevance:0}]},nt={begin:/</,end:/>/,keywords:c,contains:[...r,...d,...Le,w,Ye]};Ye.contains.push(nt);const Mt={match:ft(jn,/\s*:/),keywords:"_|0",relevance:0},Xe={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",Mt,...r,Y,...d,...p,...x,z,G,...re,...Le,Ye]},tt={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,Ye]},O={begin:an(na(ft(jn,/\s*:/)),na(ft(jn,/\s+/,jn,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:jn}]},oe={begin:/\(/,end:/\)/,keywords:c,contains:[O,...r,...d,...x,z,G,...Le,Ye,Xe],endsParent:!0,illegal:/["']/},K={match:[/(func|macro)/,/\s+/,an(te.match,jn,Po)],className:{1:"keyword",3:"title.function"},contains:[tt,oe,t],illegal:[/\[/,/%/]},ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[tt,oe,t],illegal:/\[|%/},Ee={match:[/operator/,/\s+/,Po],className:{1:"keyword",3:"title"}},Fe={begin:[/precedencegroup/,/\s+/,ei],className:{1:"keyword",3:"title"},contains:[Ye],keywords:[...R3,...Yc],end:/}/},ze={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},_e={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},pt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,jn,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[tt,...d,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:ei},...d],relevance:0}]};for(const je of G.variants){const kt=je.contains.find(qn=>qn.label==="interpol");kt.keywords=c;const pn=[...d,...p,...x,z,G,...re];kt.contains=[...pn,{begin:/\(/,end:/\)/,contains:["self",...pn]}]}return{name:"Swift",keywords:c,contains:[...r,K,ue,ze,_e,pt,Ee,Fe,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},Y,...d,...p,...x,z,G,...re,...Le,Ye,Xe]}}const Mi="[A-Za-z$_][0-9A-Za-z$_]*",fp=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],mp=["true","false","null","undefined","NaN","Infinity"],gp=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],vp=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],bp=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],yp=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],wp=[].concat(bp,gp,vp);function z3(e){const t=e.regex,n=(ne,{after:Re})=>{const se="</"+ne[0].slice(1);return ne.input.indexOf(se,Re)!==-1},r=Mi,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ne,Re)=>{const se=ne[0].length+ne.index,Le=ne.input[se];if(Le==="<"||Le===","){Re.ignoreMatch();return}Le===">"&&(n(ne,{after:se})||Re.ignoreMatch());let Ye;const nt=ne.input.substring(se);if(Ye=nt.match(/^\s*=/)){Re.ignoreMatch();return}if((Ye=nt.match(/^\s+extends\s+/))&&Ye.index===0){Re.ignoreMatch();return}}},o={$pattern:Mi,keyword:fp,literal:mp,built_in:wp,"variable.language":yp},l="[0-9](_?[0-9])*",c=`\\.(${l})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},w={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},y={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},$={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},z=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,w,y,x,{match:/\$\d+/},f];m.contains=z.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(z)});const C=[].concat($,m.contains),S=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(C)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S},F={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},N={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...gp,...vp]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q(ne){return t.concat("(?!",ne.join("|"),")")}const Y={match:t.concat(/\b/,q([...bp,"super","import"].map(ne=>`${ne}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},te={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},he={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},Se="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",re={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(Se)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:N},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,w,y,x,$,{match:/\$\d+/},f,N,{scope:"attr",match:r+t.lookahead(":"),relevance:0},re,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[$,e.REGEXP_MODE,{className:"function",begin:Se,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},te,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},Y,j,F,he,{match:/\$[(.]/}]}}function D3(e){const t=e.regex,n=z3(e),r=Mi,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},i={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Mi,keyword:fp.concat(l),literal:mp,built_in:wp.concat(s),"variable.language":yp},d={className:"meta",begin:"@"+r},f=(y,x,_)=>{const $=y.contains.findIndex(z=>z.label===x);if($===-1)throw new Error("can not find mode to replace");y.contains.splice($,1,_)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(d);const m=n.contains.find(y=>y.scope==="attr"),p=Object.assign({},m,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,m,p]),n.contains=n.contains.concat([d,a,i,p]),f(n,"shebang",e.SHEBANG()),f(n,"use_strict",o);const w=n.contains.find(y=>y.label==="func.def");return w.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function $3(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(a,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,l,o,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,i,l,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function P3(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},i={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},o=e.inherit(i,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},w={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},y={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},x=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},w,y,a,i],_=[...x];return _.pop(),_.push(o),p.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:x}}function y0(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ms=y0();function kp(e){ms=e}var fa={exec:()=>null};function ut(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(s,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(un.caret,"$1"),n=n.replace(s,i),r},getRegex:()=>new RegExp(n,t)};return r}var un={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},B3=/^(?:[ \t]*(?:\n|$))+/,L3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,F3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Da=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,U3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,w0=/(?:[*+-]|\d{1,9}[.)])/,xp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Sp=ut(xp).replace(/bull/g,w0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),q3=ut(xp).replace(/bull/g,w0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),k0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,H3=/^[^\n]+/,x0=/(?!\s*\])(?:\\.|[^\[\]\\])+/,V3=ut(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",x0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),G3=ut(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,w0).getRegex(),Qi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",S0=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Z3=ut("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",S0).replace("tag",Qi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_p=ut(k0).replace("hr",Da).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qi).getRegex(),j3=ut(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_p).getRegex(),_0={blockquote:j3,code:L3,def:V3,fences:F3,heading:U3,hr:Da,html:Z3,lheading:Sp,list:G3,newline:B3,paragraph:_p,table:fa,text:H3},eu=ut("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Da).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qi).getRegex(),K3={..._0,lheading:q3,table:eu,paragraph:ut(k0).replace("hr",Da).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",eu).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qi).getRegex()},W3={..._0,html:ut(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",S0).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ut(k0).replace("hr",Da).replace("heading",` *#{1,6} *[^
|
|
8
|
+
]`).replace("lheading",Sp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Q3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,J3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ep=/^( {2,}|\\)\n(?!\s*$)/,Y3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ji=/[\p{P}\p{S}]/u,E0=/[\s\p{P}\p{S}]/u,Ap=/[^\s\p{P}\p{S}]/u,X3=ut(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,E0).getRegex(),Tp=/(?!~)[\p{P}\p{S}]/u,e5=/(?!~)[\s\p{P}\p{S}]/u,t5=/(?:[^\s\p{P}\p{S}]|~)/u,n5=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Cp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,r5=ut(Cp,"u").replace(/punct/g,Ji).getRegex(),s5=ut(Cp,"u").replace(/punct/g,Tp).getRegex(),Rp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",a5=ut(Rp,"gu").replace(/notPunctSpace/g,Ap).replace(/punctSpace/g,E0).replace(/punct/g,Ji).getRegex(),i5=ut(Rp,"gu").replace(/notPunctSpace/g,t5).replace(/punctSpace/g,e5).replace(/punct/g,Tp).getRegex(),o5=ut("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ap).replace(/punctSpace/g,E0).replace(/punct/g,Ji).getRegex(),l5=ut(/\\(punct)/,"gu").replace(/punct/g,Ji).getRegex(),c5=ut(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),u5=ut(S0).replace("(?:-->|$)","-->").getRegex(),d5=ut("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",u5).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,h5=ut(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",zi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Op=ut(/^!?\[(label)\]\[(ref)\]/).replace("label",zi).replace("ref",x0).getRegex(),Ip=ut(/^!?\[(ref)\](?:\[\])?/).replace("ref",x0).getRegex(),p5=ut("reflink|nolink(?!\\()","g").replace("reflink",Op).replace("nolink",Ip).getRegex(),A0={_backpedal:fa,anyPunctuation:l5,autolink:c5,blockSkip:n5,br:Ep,code:J3,del:fa,emStrongLDelim:r5,emStrongRDelimAst:a5,emStrongRDelimUnd:o5,escape:Q3,link:h5,nolink:Ip,punctuation:X3,reflink:Op,reflinkSearch:p5,tag:d5,text:Y3,url:fa},f5={...A0,link:ut(/^!?\[(label)\]\((.*?)\)/).replace("label",zi).getRegex(),reflink:ut(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zi).getRegex()},El={...A0,emStrongRDelimAst:i5,emStrongLDelim:s5,url:ut(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},m5={...El,br:ut(Ep).replace("{2,}","*").getRegex(),text:ut(El.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ti={normal:_0,gfm:K3,pedantic:W3},ra={normal:A0,gfm:El,breaks:m5,pedantic:f5},g5={"&":"&","<":"<",">":">",'"':""","'":"'"},tu=e=>g5[e];function Kn(e,t){if(t){if(un.escapeTest.test(e))return e.replace(un.escapeReplace,tu)}else if(un.escapeTestNoEncode.test(e))return e.replace(un.escapeReplaceNoEncode,tu);return e}function nu(e){try{e=encodeURI(e).replace(un.percentDecode,"%")}catch{return null}return e}function ru(e,t){const n=e.replace(un.findPipe,(a,i,o)=>{let l=!1,c=i;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(un.splitPipe);let s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(un.slashPipe,"|");return r}function sa(e,t,n){const r=e.length;if(r===0)return"";let s=0;for(;s<r&&e.charAt(r-s-1)===t;)s++;return e.slice(0,r-s)}function v5(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function su(e,t,n,r,s){const a=t.href,i=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:i,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function b5(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const s=r[1];return t.split(`
|
|
9
|
+
`).map(a=>{const i=a.match(n.other.beginningSpace);if(i===null)return a;const[o]=i;return o.length>=s.length?a.slice(s.length):a}).join(`
|
|
10
|
+
`)}var Di=class{options;rules;lexer;constructor(e){this.options=e||ms}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:sa(n,`
|
|
11
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=b5(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const r=sa(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:sa(t[0],`
|
|
12
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=sa(t[0],`
|
|
13
|
+
`).split(`
|
|
14
|
+
`),r="",s="";const a=[];for(;n.length>0;){let i=!1;const o=[];let l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))o.push(n[l]),i=!0;else if(!i)o.push(n[l]);else break;n=n.slice(l);const c=o.join(`
|
|
15
|
+
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
16
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
17
|
+
${c}`:c,s=s?`${s}
|
|
18
|
+
${d}`:d;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,n.length===0)break;const m=a.at(-1);if(m?.type==="code")break;if(m?.type==="blockquote"){const p=m,w=p.raw+`
|
|
19
|
+
`+n.join(`
|
|
20
|
+
`),y=this.blockquote(w);a[a.length-1]=y,r=r.substring(0,r.length-p.raw.length)+y.raw,s=s.substring(0,s.length-p.text.length)+y.text;break}else if(m?.type==="list"){const p=m,w=p.raw+`
|
|
21
|
+
`+n.join(`
|
|
22
|
+
`),y=this.list(w);a[a.length-1]=y,r=r.substring(0,r.length-m.raw.length)+y.raw,s=s.substring(0,s.length-p.raw.length)+y.raw,n=w.substring(a.at(-1).raw.length).split(`
|
|
23
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:a,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=this.rules.other.listItemRegex(n);let i=!1;for(;e;){let l=!1,c="",d="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let f=t[2].split(`
|
|
24
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),m=e.split(`
|
|
25
|
+
`,1)[0],p=!f.trim(),w=0;if(this.options.pedantic?(w=2,d=f.trimStart()):p?w=t[1].length+1:(w=t[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,d=f.slice(w),w+=t[1].length),p&&this.rules.other.blankLine.test(m)&&(c+=m+`
|
|
26
|
+
`,e=e.substring(m.length+1),l=!0),!l){const _=this.rules.other.nextBulletRegex(w),$=this.rules.other.hrRegex(w),z=this.rules.other.fencesBeginRegex(w),C=this.rules.other.headingBeginRegex(w),S=this.rules.other.htmlBeginRegex(w);for(;e;){const E=e.split(`
|
|
27
|
+
`,1)[0];let F;if(m=E,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),F=m):F=m.replace(this.rules.other.tabCharGlobal," "),z.test(m)||C.test(m)||S.test(m)||_.test(m)||$.test(m))break;if(F.search(this.rules.other.nonSpaceChar)>=w||!m.trim())d+=`
|
|
28
|
+
`+F.slice(w);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||z.test(f)||C.test(f)||$.test(f))break;d+=`
|
|
29
|
+
`+m}!p&&!m.trim()&&(p=!0),c+=E+`
|
|
30
|
+
`,e=e.substring(E.length+1),f=F.slice(w)}}s.loose||(i?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(x=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!y,checked:x,loose:!1,text:d,tokens:[]}),s.raw+=c}const o=s.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let l=0;l<s.items.length;l++)if(this.lexer.state.top=!1,s.items[l].tokens=this.lexer.blockTokens(s.items[l].text,[]),!s.loose){const c=s.items[l].tokens.filter(f=>f.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let l=0;l<s.items.length;l++)s.items[l].loose=!0;return s}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const n=ru(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
31
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const i of r)this.rules.other.tableAlignRight.test(i)?a.align.push("right"):this.rules.other.tableAlignCenter.test(i)?a.align.push("center"):this.rules.other.tableAlignLeft.test(i)?a.align.push("left"):a.align.push(null);for(let i=0;i<n.length;i++)a.header.push({text:n[i],tokens:this.lexer.inline(n[i]),header:!0,align:a.align[i]});for(const i of s)a.rows.push(ru(i,a.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:a.align[l]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
|
|
32
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const a=sa(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{const a=v5(t[2],"()");if(a===-2)return;if(a>-1){const o=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],s=a[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),su(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[r.toLowerCase()];if(!s){const a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return su(n,s,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const a=[...r[0]].length-1;let i,o,l=a,c=0;const d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+a);(r=d.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=[...i].length,r[3]||r[4]){l+=o;continue}else if((r[5]||r[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);const f=[...r[0]][0].length,m=e.slice(0,a+r.index+f+o);if(Math.min(a,o)%2){const w=m.slice(1,-1);return{type:"em",raw:m,text:w,tokens:this.lexer.inlineTokens(w)}}const p=m.slice(2,-2);return{type:"strong",raw:m,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},ur=class Al{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ms,this.options.tokenizer=this.options.tokenizer||new Di,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:un,block:ti.normal,inline:ra.normal};this.options.pedantic?(n.block=ti.pedantic,n.inline=ra.pedantic):this.options.gfm&&(n.block=ti.gfm,this.options.breaks?n.inline=ra.breaks:n.inline=ra.gfm),this.tokenizer.rules=n}static get rules(){return{block:ti,inline:ra}}static lex(t,n){return new Al(n).lex(t)}static lexInline(t,n){return new Al(n).inlineTokens(t)}lex(t){t=t.replace(un.carriageReturn,`
|
|
33
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.options.pedantic&&(t=t.replace(un.tabCharGlobal," ").replace(un.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(i=>(s=i.call({lexer:this},t,n))?(t=t.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);const i=n.at(-1);s.raw.length===1&&i!==void 0?i.raw+=`
|
|
34
|
+
`:n.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);const i=n.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=`
|
|
35
|
+
`+s.raw,i.text+=`
|
|
36
|
+
`+s.text,this.inlineQueue.at(-1).src=i.text):n.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);const i=n.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=`
|
|
37
|
+
`+s.raw,i.text+=`
|
|
38
|
+
`+s.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),n.push(s);continue}let a=t;if(this.options.extensions?.startBlock){let i=1/0;const o=t.slice(1);let l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},o),typeof l=="number"&&l>=0&&(i=Math.min(i,l))}),i<1/0&&i>=0&&(a=t.substring(0,i+1))}if(this.state.top&&(s=this.tokenizer.paragraph(a))){const i=n.at(-1);r&&i?.type==="paragraph"?(i.raw+=`
|
|
39
|
+
`+s.raw,i.text+=`
|
|
40
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):n.push(s),r=a.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);const i=n.at(-1);i?.type==="text"?(i.raw+=`
|
|
41
|
+
`+s.raw,i.text+=`
|
|
42
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):n.push(s);continue}if(t){const i="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,s=null;if(this.tokens.links){const o=Object.keys(this.tokens.links);if(o.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)o.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,s.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,i="";for(;t;){a||(i=""),a=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);const c=n.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,i)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(m=>{f=m.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(o=this.tokenizer.inlineText(l)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(i=o.raw.slice(-1)),a=!0;const c=n.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):n.push(o);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}},$s=class{options;parser;constructor(e){this.options=e||ms}space(e){return""}code({text:e,lang:t,escaped:n}){const r=(t||"").match(un.notSpaceStart)?.[0],s=e.replace(un.endingNewline,"")+`
|
|
43
|
+
`;return r?'<pre><code class="language-'+Kn(r)+'">'+(n?s:Kn(s,!0))+`</code></pre>
|
|
44
|
+
`:"<pre><code>"+(n?s:Kn(s,!0))+`</code></pre>
|
|
45
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
46
|
+
${this.parser.parse(e)}</blockquote>
|
|
47
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
48
|
+
`}hr(e){return`<hr>
|
|
49
|
+
`}list(e){const t=e.ordered,n=e.start;let r="";for(let i=0;i<e.items.length;i++){const o=e.items[i];r+=this.listitem(o)}const s=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+s+a+`>
|
|
50
|
+
`+r+"</"+s+`>
|
|
51
|
+
`}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+Kn(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
52
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
53
|
+
`}table(e){let t="",n="";for(let s=0;s<e.header.length;s++)n+=this.tablecell(e.header[s]);t+=this.tablerow({text:n});let r="";for(let s=0;s<e.rows.length;s++){const a=e.rows[s];n="";for(let i=0;i<a.length;i++)n+=this.tablecell(a[i]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
54
|
+
<thead>
|
|
55
|
+
`+t+`</thead>
|
|
56
|
+
`+r+`</table>
|
|
57
|
+
`}tablerow({text:e}){return`<tr>
|
|
58
|
+
${e}</tr>
|
|
59
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
60
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Kn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),s=nu(e);if(s===null)return r;e=s;let a='<a href="'+e+'"';return t&&(a+=' title="'+Kn(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const s=nu(e);if(s===null)return Kn(n);e=s;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Kn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Kn(e.text)}},T0=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},dr=class Tl{options;renderer;textRenderer;constructor(t){this.options=t||ms,this.options.renderer=this.options.renderer||new $s,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new T0}static parse(t,n){return new Tl(n).parse(t)}static parseInline(t,n){return new Tl(n).parseInline(t)}parse(t,n=!0){let r="";for(let s=0;s<t.length;s++){const a=t[s];if(this.options.extensions?.renderers?.[a.type]){const o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type)){r+=l||"";continue}}const i=a;switch(i.type){case"space":{r+=this.renderer.space(i);continue}case"hr":{r+=this.renderer.hr(i);continue}case"heading":{r+=this.renderer.heading(i);continue}case"code":{r+=this.renderer.code(i);continue}case"table":{r+=this.renderer.table(i);continue}case"blockquote":{r+=this.renderer.blockquote(i);continue}case"list":{r+=this.renderer.list(i);continue}case"html":{r+=this.renderer.html(i);continue}case"paragraph":{r+=this.renderer.paragraph(i);continue}case"text":{let o=i,l=this.renderer.text(o);for(;s+1<t.length&&t[s+1].type==="text";)o=t[++s],l+=`
|
|
61
|
+
`+this.renderer.text(o);n?r+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):r+=l;continue}default:{const o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}parseInline(t,n=this.renderer){let r="";for(let s=0;s<t.length;s++){const a=t[s];if(this.options.extensions?.renderers?.[a.type]){const o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=o||"";continue}}const i=a;switch(i.type){case"escape":{r+=n.text(i);break}case"html":{r+=n.html(i);break}case"link":{r+=n.link(i);break}case"image":{r+=n.image(i);break}case"strong":{r+=n.strong(i);break}case"em":{r+=n.em(i);break}case"codespan":{r+=n.codespan(i);break}case"br":{r+=n.br(i);break}case"del":{r+=n.del(i);break}case"text":{r+=n.text(i);break}default:{const o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},wi=class{options;block;constructor(e){this.options=e||ms}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ur.lex:ur.lexInline}provideParser(){return this.block?dr.parse:dr.parseInline}},y5=class{defaults=y0();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=dr;Renderer=$s;TextRenderer=T0;Lexer=ur;Tokenizer=Di;Hooks=wi;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const s=r;for(const a of s.header)n=n.concat(this.walkTokens(a.tokens,t));for(const a of s.rows)for(const i of a)n=n.concat(this.walkTokens(i.tokens,t));break}case"list":{const s=r;n=n.concat(this.walkTokens(s.items,t));break}default:{const s=r;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{const i=s[a].flat(1/0);n=n.concat(this.walkTokens(i,t))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const a=t.renderers[s.name];a?t.renderers[s.name]=function(...i){let o=s.renderer.apply(this,i);return o===!1&&(o=a.apply(this,i)),o}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[s.level];a?a.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),r.extensions=t),n.renderer){const s=this.defaults.renderer||new $s(this.defaults);for(const a in n.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const i=a,o=n.renderer[i],l=s[i];s[i]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d||""}}r.renderer=s}if(n.tokenizer){const s=this.defaults.tokenizer||new Di(this.defaults);for(const a in n.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const i=a,o=n.tokenizer[i],l=s[i];s[i]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}r.tokenizer=s}if(n.hooks){const s=this.defaults.hooks||new wi;for(const a in n.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const i=a,o=n.hooks[i],l=s[i];wi.passThroughHooks.has(a)?s[i]=c=>{if(this.defaults.async)return Promise.resolve(o.call(s,c)).then(f=>l.call(s,f));const d=o.call(s,c);return l.call(s,d)}:s[i]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}r.hooks=s}if(n.walkTokens){const s=this.defaults.walkTokens,a=n.walkTokens;r.walkTokens=function(i){let o=[];return o.push(a.call(this,i)),s&&(o=o.concat(s.call(this,i))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ur.lex(e,t??this.defaults)}parser(e,t){return dr.parse(e,t??this.defaults)}parseMarkdown(e){return(n,r)=>{const s={...r},a={...this.defaults,...s},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const o=a.hooks?a.hooks.provideLexer():e?ur.lex:ur.lexInline,l=a.hooks?a.hooks.provideParser():e?dr.parse:dr.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then(c=>o(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>l(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(i);try{a.hooks&&(n=a.hooks.preprocess(n));let c=o(n,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let d=l(c,a);return a.hooks&&(d=a.hooks.postprocess(d)),d}catch(c){return i(c)}}}onError(e,t){return n=>{if(n.message+=`
|
|
62
|
+
Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An error occurred:</p><pre>"+Kn(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},ds=new y5;function st(e,t){return ds.parse(e,t)}st.options=st.setOptions=function(e){return ds.setOptions(e),st.defaults=ds.defaults,kp(st.defaults),st};st.getDefaults=y0;st.defaults=ms;st.use=function(...e){return ds.use(...e),st.defaults=ds.defaults,kp(st.defaults),st};st.walkTokens=function(e,t){return ds.walkTokens(e,t)};st.parseInline=ds.parseInline;st.Parser=dr;st.parser=dr.parse;st.Renderer=$s;st.TextRenderer=T0;st.Lexer=ur;st.lexer=ur.lex;st.Tokenizer=Di;st.Hooks=wi;st.parse=st;st.options;st.setOptions;st.use;st.walkTokens;st.parseInline;dr.parse;ur.lex;class ae extends Error{constructor(t,n){var r="KaTeX parse error: "+t,s,a,i=n&&n.loc;if(i&&i.start<=i.end){var o=i.lexer.input;s=i.start,a=i.end,s===o.length?r+=" at end of input: ":r+=" at position "+(s+1)+": ";var l=o.slice(s,a).replace(/[^]/g,"$&̲"),c;s>15?c="…"+o.slice(s-15,s):c=o.slice(0,s);var d;a+15<o.length?d=o.slice(a,a+15)+"…":d=o.slice(a),r+=c+l+d}super(r),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,ae.prototype),this.position=s,s!=null&&a!=null&&(this.length=a-s),this.rawMessage=t}}var w5=/([A-Z])/g,k5=e=>e.replace(w5,"-$1").toLowerCase(),x5={"&":"&",">":">","<":"<",'"':""","'":"'"},S5=/[&><"']/g,tn=e=>String(e).replace(S5,t=>x5[t]),ki=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?ki(e.body[0]):e:e.type==="font"?ki(e.body):e,_5=new Set(["mathord","textord","atom"]),wr=e=>_5.has(ki(e).type),E5=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},Cl={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function A5(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function T5(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return A5(t)}function C5(e,t,n,r){var s=n[t];e[t]=s!==void 0?r.processor?r.processor(s):s:T5(r)}class C0{constructor(t){t===void 0&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n of Object.keys(Cl)){var r=Cl[n];r&&C5(this,n,t,r)}}reportNonstrict(t,n,r){var s=this.strict;if(typeof s=="function"&&(s=s(t,n,r)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new ae("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),r);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,r){var s=this.strict;if(typeof s=="function")try{s=s(t,n,r)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var n=E5(t.url);if(n==null)return!1;t.protocol=n}var r=typeof this.trust=="function"?this.trust(t):this.trust;return!!r}}class Tr{constructor(t,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=r}sup(){return Wn[R5[this.id]]}sub(){return Wn[O5[this.id]]}fracNum(){return Wn[I5[this.id]]}fracDen(){return Wn[N5[this.id]]}cramp(){return Wn[M5[this.id]]}text(){return Wn[z5[this.id]]}isTight(){return this.size>=2}}var R0=0,$i=1,Is=2,pr=3,_a=4,In=5,Ps=6,dn=7,Wn=[new Tr(R0,0,!1),new Tr($i,0,!0),new Tr(Is,1,!1),new Tr(pr,1,!0),new Tr(_a,2,!1),new Tr(In,2,!0),new Tr(Ps,3,!1),new Tr(dn,3,!0)],R5=[_a,In,_a,In,Ps,dn,Ps,dn],O5=[In,In,In,In,dn,dn,dn,dn],I5=[Is,pr,_a,In,Ps,dn,Ps,dn],N5=[pr,pr,In,In,dn,dn,dn,dn],M5=[$i,$i,pr,pr,In,In,dn,dn],z5=[R0,$i,Is,pr,Is,pr,Is,pr],Ue={DISPLAY:Wn[R0],TEXT:Wn[Is],SCRIPT:Wn[_a],SCRIPTSCRIPT:Wn[Ps]},Rl=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function D5(e){for(var t=0;t<Rl.length;t++)for(var n=Rl[t],r=0;r<n.blocks.length;r++){var s=n.blocks[r];if(e>=s[0]&&e<=s[1])return n.name}return null}var xi=[];Rl.forEach(e=>e.blocks.forEach(t=>xi.push(...t)));function Np(e){for(var t=0;t<xi.length;t+=2)if(e>=xi[t]&&e<=xi[t+1])return!0;return!1}var Zt=e=>e+" "+e,ks=80,$5=function(t,n){return"M95,"+(622+t+n)+`
|
|
63
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
64
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
65
|
+
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
66
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
67
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
68
|
+
l`+t/2.075+" -"+t+`
|
|
69
|
+
c5.3,-9.3,12,-14,20,-14
|
|
70
|
+
H400000v`+(40+t)+`H845.2724
|
|
71
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
72
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
73
|
+
M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},P5=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
|
|
74
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
75
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
76
|
+
l`+t/2.084+" -"+t+`
|
|
77
|
+
c4.7,-7.3,11,-11,19,-11
|
|
78
|
+
H40000v`+(40+t)+`H1012.3
|
|
79
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
80
|
+
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
81
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
82
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
83
|
+
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},B5=function(t,n){return"M983 "+(10+t+n)+`
|
|
84
|
+
l`+t/3.13+" -"+t+`
|
|
85
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
|
86
|
+
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
87
|
+
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
88
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
89
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
90
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
91
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
92
|
+
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},L5=function(t,n){return"M424,"+(2398+t+n)+`
|
|
93
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
94
|
+
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
95
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
96
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
97
|
+
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
|
98
|
+
v`+(40+t)+`H1014.6
|
|
99
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
100
|
+
c-2,6,-10,9,-24,9
|
|
101
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+`
|
|
102
|
+
h400000v`+(40+t)+"h-400000z"},F5=function(t,n){return"M473,"+(2713+t+n)+`
|
|
103
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
|
104
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
|
105
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
106
|
+
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
107
|
+
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
108
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
109
|
+
606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},U5=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},q5=function(t,n,r){var s=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
|
|
110
|
+
H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
111
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
112
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
113
|
+
219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},H5=function(t,n,r){n=1e3*n;var s="";switch(t){case"sqrtMain":s=$5(n,ks);break;case"sqrtSize1":s=P5(n,ks);break;case"sqrtSize2":s=B5(n,ks);break;case"sqrtSize3":s=L5(n,ks);break;case"sqrtSize4":s=F5(n,ks);break;case"sqrtTall":s=q5(n,ks,r)}return s},V5=function(t,n){switch(t){case"⎜":return Zt("M291 0 H417 V"+n+" H291z");case"∣":return Zt("M145 0 H188 V"+n+" H145z");case"∥":return Zt("M145 0 H188 V"+n+" H145z")+Zt("M367 0 H410 V"+n+" H367z");case"⎟":return Zt("M457 0 H583 V"+n+" H457z");case"⎢":return Zt("M319 0 H403 V"+n+" H319z");case"⎥":return Zt("M263 0 H347 V"+n+" H263z");case"⎪":return Zt("M384 0 H504 V"+n+" H384z");case"⏐":return Zt("M312 0 H355 V"+n+" H312z");case"‖":return Zt("M257 0 H300 V"+n+" H257z")+Zt("M478 0 H521 V"+n+" H478z");default:return""}},au={doubleleftarrow:`M262 157
|
|
114
|
+
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
115
|
+
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
116
|
+
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
117
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
118
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
119
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
120
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
121
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
122
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
123
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
124
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
125
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
126
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
127
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
128
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
129
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
130
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
131
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
132
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
133
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
134
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
135
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
136
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
137
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
138
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
139
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
140
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
141
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
142
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
143
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
144
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
145
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
146
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
147
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
148
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
149
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
150
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
151
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
152
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
153
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
154
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
155
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
156
|
+
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
157
|
+
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
158
|
+
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
159
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Zt("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Zt("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Zt("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Zt("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
160
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
161
|
+
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
162
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Zt("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
|
|
163
|
+
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
164
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
165
|
+
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
166
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
167
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
168
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
169
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
170
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
171
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
172
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
173
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
174
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
175
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
176
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
177
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
178
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
179
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
180
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
181
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
182
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
183
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
184
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
185
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
186
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
187
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
188
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
189
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
190
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
191
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
192
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
193
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
194
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
195
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
196
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
197
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
198
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
199
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
200
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
201
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
202
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
203
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
204
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
205
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
206
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
207
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
208
|
+
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
209
|
+
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
210
|
+
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
211
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Zt("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Zt("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Zt("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
212
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
213
|
+
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
214
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
215
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
216
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
217
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
218
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
219
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
220
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
221
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
222
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
223
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
224
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
225
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
226
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
227
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
228
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
229
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
230
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
231
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
232
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
233
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
234
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
235
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
236
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
237
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
238
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
239
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
240
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
241
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
242
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
243
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
244
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
245
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
246
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
247
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
248
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
249
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
250
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
251
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
252
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
253
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
254
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
255
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
256
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
257
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
258
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
259
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
260
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
261
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
262
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
263
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
264
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
265
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
266
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
267
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
268
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
269
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
270
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
271
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
272
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
273
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
274
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
275
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
276
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
277
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
278
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
279
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
280
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
281
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
282
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
283
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
284
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},G5=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84
|
|
285
|
+
H403z M403 1759 V0 H319 V1759 v`+n+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z
|
|
286
|
+
M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
|
287
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
288
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
|
289
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
290
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z
|
|
291
|
+
M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15
|
|
292
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
293
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z
|
|
294
|
+
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z
|
|
295
|
+
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z
|
|
296
|
+
M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z
|
|
297
|
+
M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
298
|
+
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
299
|
+
-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
300
|
+
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
301
|
+
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
302
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
303
|
+
l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
304
|
+
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
305
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
306
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+`
|
|
307
|
+
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
308
|
+
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
309
|
+
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
310
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
311
|
+
l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
312
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function Z5(e){return"toText"in e}class Zs{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){for(var t="",n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t}toText(){return this.children.map(t=>{if(Z5(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var Ol={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},j5={ex:!0,em:!0,mu:!0},Mp=function(t){return typeof t!="string"&&(t=t.unit),t in Ol||t in j5||t==="ex"},Tt=function(t,n){var r;if(t.unit in Ol)r=Ol[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var s;if(n.style.isTight()?s=n.havingStyle(n.style.text()):s=n,t.unit==="ex")r=s.fontMetrics().xHeight;else if(t.unit==="em")r=s.fontMetrics().quad;else throw new ae("Invalid unit: '"+t.unit+"'");s!==n&&(r*=s.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},ce=function(t){return+t.toFixed(4)+"em"},Hr=function(t){return t.filter(n=>n).join(" ")},O0=function(t){var n="";for(var r of Object.keys(t)){var s=t[r];s!==void 0&&(n+=k5(r)+":"+s+";")}return n},zp=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var s=n.getColor();s&&(this.style.color=s)}},Dp=function(t){var n=document.createElement(t);n.className=Hr(this.classes),Object.assign(n.style,this.style);for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n},K5=/[\s"'>/=\x00-\x1f]/,$p=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+tn(Hr(this.classes))+'"');var r=O0(this.style);r&&(n+=' style="'+tn(r)+'"');for(var s of Object.keys(this.attributes)){if(K5.test(s))throw new ae("Invalid attribute name '"+s+"'");n+=" "+s+'="'+tn(this.attributes[s])+'"'}n+=">";for(var a=0;a<this.children.length;a++)n+=this.children[a].toMarkup();return n+="</"+t+">",n};class js{constructor(t,n,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,zp.call(this,t,r,s),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return Dp.call(this,"span")}toMarkup(){return $p.call(this,"span")}}class Yi{constructor(t,n,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,zp.call(this,n,s),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return Dp.call(this,"a")}toMarkup(){return $p.call(this,"a")}}class W5{constructor(t,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t='<img src="'+tn(this.src)+'"'+(' alt="'+tn(this.alt)+'"'),n=O0(this.style);return n&&(t+=' style="'+tn(n)+'"'),t+="'/>",t}}var Q5={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class _n{constructor(t,n,r,s,a,i,o,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=n||0,this.depth=r||0,this.italic=s||0,this.skew=a||0,this.width=i||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var c=D5(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Q5[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),n=null;return this.italic>0&&(n=document.createElement("span"),n.style.marginRight=ce(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=Hr(this.classes)),Object.keys(this.style).length>0&&(n=n||document.createElement("span"),Object.assign(n.style,this.style)),n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="<span";this.classes.length&&(t=!0,n+=' class="',n+=tn(Hr(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+ce(this.italic)+";"),r+=O0(this.style),r&&(t=!0,n+=' style="'+tn(r)+'"');var s=tn(this.text);return t?(n+=">",n+=s,n+="</span>",n):s}}class gr{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var n of Object.keys(this.attributes))t+=" "+n+'="'+tn(this.attributes[n])+'"';t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</svg>",t}}class Vr{constructor(t,n){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=n}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",au[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+tn(this.alternate)+'"/>':'<path d="'+tn(au[this.pathName])+'"/>'}}class Il{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t="<line";for(var n of Object.keys(this.attributes))t+=" "+n+'="'+tn(this.attributes[n])+'"';return t+="/>",t}}function J5(e){if(e instanceof _n)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function Y5(e){if(e instanceof js)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var X5=e=>e instanceof js||e instanceof Yi||e instanceof Zs,Jn={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ni={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},iu={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function e6(e,t){Jn[e]=t}function I0(e,t,n){if(!Jn[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),s=Jn[t][r];if(!s&&e[0]in iu&&(r=iu[e[0]].charCodeAt(0),s=Jn[t][r]),!s&&n==="text"&&Np(r)&&(s=Jn[t][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Bo={};function t6(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Bo[t]){var n=Bo[t]={cssEmPerMu:ni.quad[t]/18};for(var r in ni)ni.hasOwnProperty(r)&&(n[r]=ni[r][t])}return Bo[t]}var St={math:{},text:{}};function u(e,t,n,r,s,a){St[e][s]={font:t,group:n,replace:r},a&&r&&(St[e][r]=St[e][s])}var h="math",X="text",v="main",A="ams",_t="accent-token",ve="bin",hn="close",Ks="inner",De="mathord",qt="op-token",En="open",$a="punct",R="rel",kr="spacing",B="textord";u(h,v,R,"≡","\\equiv",!0);u(h,v,R,"≺","\\prec",!0);u(h,v,R,"≻","\\succ",!0);u(h,v,R,"∼","\\sim",!0);u(h,v,R,"⊥","\\perp");u(h,v,R,"⪯","\\preceq",!0);u(h,v,R,"⪰","\\succeq",!0);u(h,v,R,"≃","\\simeq",!0);u(h,v,R,"∣","\\mid",!0);u(h,v,R,"≪","\\ll",!0);u(h,v,R,"≫","\\gg",!0);u(h,v,R,"≍","\\asymp",!0);u(h,v,R,"∥","\\parallel");u(h,v,R,"⋈","\\bowtie",!0);u(h,v,R,"⌣","\\smile",!0);u(h,v,R,"⊑","\\sqsubseteq",!0);u(h,v,R,"⊒","\\sqsupseteq",!0);u(h,v,R,"≐","\\doteq",!0);u(h,v,R,"⌢","\\frown",!0);u(h,v,R,"∋","\\ni",!0);u(h,v,R,"∝","\\propto",!0);u(h,v,R,"⊢","\\vdash",!0);u(h,v,R,"⊣","\\dashv",!0);u(h,v,R,"∋","\\owns");u(h,v,$a,".","\\ldotp");u(h,v,$a,"⋅","\\cdotp");u(h,v,$a,"⋅","·");u(X,v,B,"⋅","·");u(h,v,B,"#","\\#");u(X,v,B,"#","\\#");u(h,v,B,"&","\\&");u(X,v,B,"&","\\&");u(h,v,B,"ℵ","\\aleph",!0);u(h,v,B,"∀","\\forall",!0);u(h,v,B,"ℏ","\\hbar",!0);u(h,v,B,"∃","\\exists",!0);u(h,v,B,"∇","\\nabla",!0);u(h,v,B,"♭","\\flat",!0);u(h,v,B,"ℓ","\\ell",!0);u(h,v,B,"♮","\\natural",!0);u(h,v,B,"♣","\\clubsuit",!0);u(h,v,B,"℘","\\wp",!0);u(h,v,B,"♯","\\sharp",!0);u(h,v,B,"♢","\\diamondsuit",!0);u(h,v,B,"ℜ","\\Re",!0);u(h,v,B,"♡","\\heartsuit",!0);u(h,v,B,"ℑ","\\Im",!0);u(h,v,B,"♠","\\spadesuit",!0);u(h,v,B,"§","\\S",!0);u(X,v,B,"§","\\S");u(h,v,B,"¶","\\P",!0);u(X,v,B,"¶","\\P");u(h,v,B,"†","\\dag");u(X,v,B,"†","\\dag");u(X,v,B,"†","\\textdagger");u(h,v,B,"‡","\\ddag");u(X,v,B,"‡","\\ddag");u(X,v,B,"‡","\\textdaggerdbl");u(h,v,hn,"⎱","\\rmoustache",!0);u(h,v,En,"⎰","\\lmoustache",!0);u(h,v,hn,"⟯","\\rgroup",!0);u(h,v,En,"⟮","\\lgroup",!0);u(h,v,ve,"∓","\\mp",!0);u(h,v,ve,"⊖","\\ominus",!0);u(h,v,ve,"⊎","\\uplus",!0);u(h,v,ve,"⊓","\\sqcap",!0);u(h,v,ve,"∗","\\ast");u(h,v,ve,"⊔","\\sqcup",!0);u(h,v,ve,"◯","\\bigcirc",!0);u(h,v,ve,"∙","\\bullet",!0);u(h,v,ve,"‡","\\ddagger");u(h,v,ve,"≀","\\wr",!0);u(h,v,ve,"⨿","\\amalg");u(h,v,ve,"&","\\And");u(h,v,R,"⟵","\\longleftarrow",!0);u(h,v,R,"⇐","\\Leftarrow",!0);u(h,v,R,"⟸","\\Longleftarrow",!0);u(h,v,R,"⟶","\\longrightarrow",!0);u(h,v,R,"⇒","\\Rightarrow",!0);u(h,v,R,"⟹","\\Longrightarrow",!0);u(h,v,R,"↔","\\leftrightarrow",!0);u(h,v,R,"⟷","\\longleftrightarrow",!0);u(h,v,R,"⇔","\\Leftrightarrow",!0);u(h,v,R,"⟺","\\Longleftrightarrow",!0);u(h,v,R,"↦","\\mapsto",!0);u(h,v,R,"⟼","\\longmapsto",!0);u(h,v,R,"↗","\\nearrow",!0);u(h,v,R,"↩","\\hookleftarrow",!0);u(h,v,R,"↪","\\hookrightarrow",!0);u(h,v,R,"↘","\\searrow",!0);u(h,v,R,"↼","\\leftharpoonup",!0);u(h,v,R,"⇀","\\rightharpoonup",!0);u(h,v,R,"↙","\\swarrow",!0);u(h,v,R,"↽","\\leftharpoondown",!0);u(h,v,R,"⇁","\\rightharpoondown",!0);u(h,v,R,"↖","\\nwarrow",!0);u(h,v,R,"⇌","\\rightleftharpoons",!0);u(h,A,R,"≮","\\nless",!0);u(h,A,R,"","\\@nleqslant");u(h,A,R,"","\\@nleqq");u(h,A,R,"⪇","\\lneq",!0);u(h,A,R,"≨","\\lneqq",!0);u(h,A,R,"","\\@lvertneqq");u(h,A,R,"⋦","\\lnsim",!0);u(h,A,R,"⪉","\\lnapprox",!0);u(h,A,R,"⊀","\\nprec",!0);u(h,A,R,"⋠","\\npreceq",!0);u(h,A,R,"⋨","\\precnsim",!0);u(h,A,R,"⪹","\\precnapprox",!0);u(h,A,R,"≁","\\nsim",!0);u(h,A,R,"","\\@nshortmid");u(h,A,R,"∤","\\nmid",!0);u(h,A,R,"⊬","\\nvdash",!0);u(h,A,R,"⊭","\\nvDash",!0);u(h,A,R,"⋪","\\ntriangleleft");u(h,A,R,"⋬","\\ntrianglelefteq",!0);u(h,A,R,"⊊","\\subsetneq",!0);u(h,A,R,"","\\@varsubsetneq");u(h,A,R,"⫋","\\subsetneqq",!0);u(h,A,R,"","\\@varsubsetneqq");u(h,A,R,"≯","\\ngtr",!0);u(h,A,R,"","\\@ngeqslant");u(h,A,R,"","\\@ngeqq");u(h,A,R,"⪈","\\gneq",!0);u(h,A,R,"≩","\\gneqq",!0);u(h,A,R,"","\\@gvertneqq");u(h,A,R,"⋧","\\gnsim",!0);u(h,A,R,"⪊","\\gnapprox",!0);u(h,A,R,"⊁","\\nsucc",!0);u(h,A,R,"⋡","\\nsucceq",!0);u(h,A,R,"⋩","\\succnsim",!0);u(h,A,R,"⪺","\\succnapprox",!0);u(h,A,R,"≆","\\ncong",!0);u(h,A,R,"","\\@nshortparallel");u(h,A,R,"∦","\\nparallel",!0);u(h,A,R,"⊯","\\nVDash",!0);u(h,A,R,"⋫","\\ntriangleright");u(h,A,R,"⋭","\\ntrianglerighteq",!0);u(h,A,R,"","\\@nsupseteqq");u(h,A,R,"⊋","\\supsetneq",!0);u(h,A,R,"","\\@varsupsetneq");u(h,A,R,"⫌","\\supsetneqq",!0);u(h,A,R,"","\\@varsupsetneqq");u(h,A,R,"⊮","\\nVdash",!0);u(h,A,R,"⪵","\\precneqq",!0);u(h,A,R,"⪶","\\succneqq",!0);u(h,A,R,"","\\@nsubseteqq");u(h,A,ve,"⊴","\\unlhd");u(h,A,ve,"⊵","\\unrhd");u(h,A,R,"↚","\\nleftarrow",!0);u(h,A,R,"↛","\\nrightarrow",!0);u(h,A,R,"⇍","\\nLeftarrow",!0);u(h,A,R,"⇏","\\nRightarrow",!0);u(h,A,R,"↮","\\nleftrightarrow",!0);u(h,A,R,"⇎","\\nLeftrightarrow",!0);u(h,A,R,"△","\\vartriangle");u(h,A,B,"ℏ","\\hslash");u(h,A,B,"▽","\\triangledown");u(h,A,B,"◊","\\lozenge");u(h,A,B,"Ⓢ","\\circledS");u(h,A,B,"®","\\circledR");u(X,A,B,"®","\\circledR");u(h,A,B,"∡","\\measuredangle",!0);u(h,A,B,"∄","\\nexists");u(h,A,B,"℧","\\mho");u(h,A,B,"Ⅎ","\\Finv",!0);u(h,A,B,"⅁","\\Game",!0);u(h,A,B,"‵","\\backprime");u(h,A,B,"▲","\\blacktriangle");u(h,A,B,"▼","\\blacktriangledown");u(h,A,B,"■","\\blacksquare");u(h,A,B,"⧫","\\blacklozenge");u(h,A,B,"★","\\bigstar");u(h,A,B,"∢","\\sphericalangle",!0);u(h,A,B,"∁","\\complement",!0);u(h,A,B,"ð","\\eth",!0);u(X,v,B,"ð","ð");u(h,A,B,"╱","\\diagup");u(h,A,B,"╲","\\diagdown");u(h,A,B,"□","\\square");u(h,A,B,"□","\\Box");u(h,A,B,"◊","\\Diamond");u(h,A,B,"¥","\\yen",!0);u(X,A,B,"¥","\\yen",!0);u(h,A,B,"✓","\\checkmark",!0);u(X,A,B,"✓","\\checkmark");u(h,A,B,"ℶ","\\beth",!0);u(h,A,B,"ℸ","\\daleth",!0);u(h,A,B,"ℷ","\\gimel",!0);u(h,A,B,"ϝ","\\digamma",!0);u(h,A,B,"ϰ","\\varkappa");u(h,A,En,"┌","\\@ulcorner",!0);u(h,A,hn,"┐","\\@urcorner",!0);u(h,A,En,"└","\\@llcorner",!0);u(h,A,hn,"┘","\\@lrcorner",!0);u(h,A,R,"≦","\\leqq",!0);u(h,A,R,"⩽","\\leqslant",!0);u(h,A,R,"⪕","\\eqslantless",!0);u(h,A,R,"≲","\\lesssim",!0);u(h,A,R,"⪅","\\lessapprox",!0);u(h,A,R,"≊","\\approxeq",!0);u(h,A,ve,"⋖","\\lessdot");u(h,A,R,"⋘","\\lll",!0);u(h,A,R,"≶","\\lessgtr",!0);u(h,A,R,"⋚","\\lesseqgtr",!0);u(h,A,R,"⪋","\\lesseqqgtr",!0);u(h,A,R,"≑","\\doteqdot");u(h,A,R,"≓","\\risingdotseq",!0);u(h,A,R,"≒","\\fallingdotseq",!0);u(h,A,R,"∽","\\backsim",!0);u(h,A,R,"⋍","\\backsimeq",!0);u(h,A,R,"⫅","\\subseteqq",!0);u(h,A,R,"⋐","\\Subset",!0);u(h,A,R,"⊏","\\sqsubset",!0);u(h,A,R,"≼","\\preccurlyeq",!0);u(h,A,R,"⋞","\\curlyeqprec",!0);u(h,A,R,"≾","\\precsim",!0);u(h,A,R,"⪷","\\precapprox",!0);u(h,A,R,"⊲","\\vartriangleleft");u(h,A,R,"⊴","\\trianglelefteq");u(h,A,R,"⊨","\\vDash",!0);u(h,A,R,"⊪","\\Vvdash",!0);u(h,A,R,"⌣","\\smallsmile");u(h,A,R,"⌢","\\smallfrown");u(h,A,R,"≏","\\bumpeq",!0);u(h,A,R,"≎","\\Bumpeq",!0);u(h,A,R,"≧","\\geqq",!0);u(h,A,R,"⩾","\\geqslant",!0);u(h,A,R,"⪖","\\eqslantgtr",!0);u(h,A,R,"≳","\\gtrsim",!0);u(h,A,R,"⪆","\\gtrapprox",!0);u(h,A,ve,"⋗","\\gtrdot");u(h,A,R,"⋙","\\ggg",!0);u(h,A,R,"≷","\\gtrless",!0);u(h,A,R,"⋛","\\gtreqless",!0);u(h,A,R,"⪌","\\gtreqqless",!0);u(h,A,R,"≖","\\eqcirc",!0);u(h,A,R,"≗","\\circeq",!0);u(h,A,R,"≜","\\triangleq",!0);u(h,A,R,"∼","\\thicksim");u(h,A,R,"≈","\\thickapprox");u(h,A,R,"⫆","\\supseteqq",!0);u(h,A,R,"⋑","\\Supset",!0);u(h,A,R,"⊐","\\sqsupset",!0);u(h,A,R,"≽","\\succcurlyeq",!0);u(h,A,R,"⋟","\\curlyeqsucc",!0);u(h,A,R,"≿","\\succsim",!0);u(h,A,R,"⪸","\\succapprox",!0);u(h,A,R,"⊳","\\vartriangleright");u(h,A,R,"⊵","\\trianglerighteq");u(h,A,R,"⊩","\\Vdash",!0);u(h,A,R,"∣","\\shortmid");u(h,A,R,"∥","\\shortparallel");u(h,A,R,"≬","\\between",!0);u(h,A,R,"⋔","\\pitchfork",!0);u(h,A,R,"∝","\\varpropto");u(h,A,R,"◀","\\blacktriangleleft");u(h,A,R,"∴","\\therefore",!0);u(h,A,R,"∍","\\backepsilon");u(h,A,R,"▶","\\blacktriangleright");u(h,A,R,"∵","\\because",!0);u(h,A,R,"⋘","\\llless");u(h,A,R,"⋙","\\gggtr");u(h,A,ve,"⊲","\\lhd");u(h,A,ve,"⊳","\\rhd");u(h,A,R,"≂","\\eqsim",!0);u(h,v,R,"⋈","\\Join");u(h,A,R,"≑","\\Doteq",!0);u(h,A,ve,"∔","\\dotplus",!0);u(h,A,ve,"∖","\\smallsetminus");u(h,A,ve,"⋒","\\Cap",!0);u(h,A,ve,"⋓","\\Cup",!0);u(h,A,ve,"⩞","\\doublebarwedge",!0);u(h,A,ve,"⊟","\\boxminus",!0);u(h,A,ve,"⊞","\\boxplus",!0);u(h,A,ve,"⋇","\\divideontimes",!0);u(h,A,ve,"⋉","\\ltimes",!0);u(h,A,ve,"⋊","\\rtimes",!0);u(h,A,ve,"⋋","\\leftthreetimes",!0);u(h,A,ve,"⋌","\\rightthreetimes",!0);u(h,A,ve,"⋏","\\curlywedge",!0);u(h,A,ve,"⋎","\\curlyvee",!0);u(h,A,ve,"⊝","\\circleddash",!0);u(h,A,ve,"⊛","\\circledast",!0);u(h,A,ve,"⋅","\\centerdot");u(h,A,ve,"⊺","\\intercal",!0);u(h,A,ve,"⋒","\\doublecap");u(h,A,ve,"⋓","\\doublecup");u(h,A,ve,"⊠","\\boxtimes",!0);u(h,A,R,"⇢","\\dashrightarrow",!0);u(h,A,R,"⇠","\\dashleftarrow",!0);u(h,A,R,"⇇","\\leftleftarrows",!0);u(h,A,R,"⇆","\\leftrightarrows",!0);u(h,A,R,"⇚","\\Lleftarrow",!0);u(h,A,R,"↞","\\twoheadleftarrow",!0);u(h,A,R,"↢","\\leftarrowtail",!0);u(h,A,R,"↫","\\looparrowleft",!0);u(h,A,R,"⇋","\\leftrightharpoons",!0);u(h,A,R,"↶","\\curvearrowleft",!0);u(h,A,R,"↺","\\circlearrowleft",!0);u(h,A,R,"↰","\\Lsh",!0);u(h,A,R,"⇈","\\upuparrows",!0);u(h,A,R,"↿","\\upharpoonleft",!0);u(h,A,R,"⇃","\\downharpoonleft",!0);u(h,v,R,"⊶","\\origof",!0);u(h,v,R,"⊷","\\imageof",!0);u(h,A,R,"⊸","\\multimap",!0);u(h,A,R,"↭","\\leftrightsquigarrow",!0);u(h,A,R,"⇉","\\rightrightarrows",!0);u(h,A,R,"⇄","\\rightleftarrows",!0);u(h,A,R,"↠","\\twoheadrightarrow",!0);u(h,A,R,"↣","\\rightarrowtail",!0);u(h,A,R,"↬","\\looparrowright",!0);u(h,A,R,"↷","\\curvearrowright",!0);u(h,A,R,"↻","\\circlearrowright",!0);u(h,A,R,"↱","\\Rsh",!0);u(h,A,R,"⇊","\\downdownarrows",!0);u(h,A,R,"↾","\\upharpoonright",!0);u(h,A,R,"⇂","\\downharpoonright",!0);u(h,A,R,"⇝","\\rightsquigarrow",!0);u(h,A,R,"⇝","\\leadsto");u(h,A,R,"⇛","\\Rrightarrow",!0);u(h,A,R,"↾","\\restriction");u(h,v,B,"‘","`");u(h,v,B,"$","\\$");u(X,v,B,"$","\\$");u(X,v,B,"$","\\textdollar");u(h,v,B,"%","\\%");u(X,v,B,"%","\\%");u(h,v,B,"_","\\_");u(X,v,B,"_","\\_");u(X,v,B,"_","\\textunderscore");u(h,v,B,"∠","\\angle",!0);u(h,v,B,"∞","\\infty",!0);u(h,v,B,"′","\\prime");u(h,v,B,"△","\\triangle");u(h,v,B,"Γ","\\Gamma",!0);u(h,v,B,"Δ","\\Delta",!0);u(h,v,B,"Θ","\\Theta",!0);u(h,v,B,"Λ","\\Lambda",!0);u(h,v,B,"Ξ","\\Xi",!0);u(h,v,B,"Π","\\Pi",!0);u(h,v,B,"Σ","\\Sigma",!0);u(h,v,B,"Υ","\\Upsilon",!0);u(h,v,B,"Φ","\\Phi",!0);u(h,v,B,"Ψ","\\Psi",!0);u(h,v,B,"Ω","\\Omega",!0);u(h,v,B,"A","Α");u(h,v,B,"B","Β");u(h,v,B,"E","Ε");u(h,v,B,"Z","Ζ");u(h,v,B,"H","Η");u(h,v,B,"I","Ι");u(h,v,B,"K","Κ");u(h,v,B,"M","Μ");u(h,v,B,"N","Ν");u(h,v,B,"O","Ο");u(h,v,B,"P","Ρ");u(h,v,B,"T","Τ");u(h,v,B,"X","Χ");u(h,v,B,"¬","\\neg",!0);u(h,v,B,"¬","\\lnot");u(h,v,B,"⊤","\\top");u(h,v,B,"⊥","\\bot");u(h,v,B,"∅","\\emptyset");u(h,A,B,"∅","\\varnothing");u(h,v,De,"α","\\alpha",!0);u(h,v,De,"β","\\beta",!0);u(h,v,De,"γ","\\gamma",!0);u(h,v,De,"δ","\\delta",!0);u(h,v,De,"ϵ","\\epsilon",!0);u(h,v,De,"ζ","\\zeta",!0);u(h,v,De,"η","\\eta",!0);u(h,v,De,"θ","\\theta",!0);u(h,v,De,"ι","\\iota",!0);u(h,v,De,"κ","\\kappa",!0);u(h,v,De,"λ","\\lambda",!0);u(h,v,De,"μ","\\mu",!0);u(h,v,De,"ν","\\nu",!0);u(h,v,De,"ξ","\\xi",!0);u(h,v,De,"ο","\\omicron",!0);u(h,v,De,"π","\\pi",!0);u(h,v,De,"ρ","\\rho",!0);u(h,v,De,"σ","\\sigma",!0);u(h,v,De,"τ","\\tau",!0);u(h,v,De,"υ","\\upsilon",!0);u(h,v,De,"ϕ","\\phi",!0);u(h,v,De,"χ","\\chi",!0);u(h,v,De,"ψ","\\psi",!0);u(h,v,De,"ω","\\omega",!0);u(h,v,De,"ε","\\varepsilon",!0);u(h,v,De,"ϑ","\\vartheta",!0);u(h,v,De,"ϖ","\\varpi",!0);u(h,v,De,"ϱ","\\varrho",!0);u(h,v,De,"ς","\\varsigma",!0);u(h,v,De,"φ","\\varphi",!0);u(h,v,ve,"∗","*",!0);u(h,v,ve,"+","+");u(h,v,ve,"−","-",!0);u(h,v,ve,"⋅","\\cdot",!0);u(h,v,ve,"∘","\\circ",!0);u(h,v,ve,"÷","\\div",!0);u(h,v,ve,"±","\\pm",!0);u(h,v,ve,"×","\\times",!0);u(h,v,ve,"∩","\\cap",!0);u(h,v,ve,"∪","\\cup",!0);u(h,v,ve,"∖","\\setminus",!0);u(h,v,ve,"∧","\\land");u(h,v,ve,"∨","\\lor");u(h,v,ve,"∧","\\wedge",!0);u(h,v,ve,"∨","\\vee",!0);u(h,v,B,"√","\\surd");u(h,v,En,"⟨","\\langle",!0);u(h,v,En,"∣","\\lvert");u(h,v,En,"∥","\\lVert");u(h,v,hn,"?","?");u(h,v,hn,"!","!");u(h,v,hn,"⟩","\\rangle",!0);u(h,v,hn,"∣","\\rvert");u(h,v,hn,"∥","\\rVert");u(h,v,R,"=","=");u(h,v,R,":",":");u(h,v,R,"≈","\\approx",!0);u(h,v,R,"≅","\\cong",!0);u(h,v,R,"≥","\\ge");u(h,v,R,"≥","\\geq",!0);u(h,v,R,"←","\\gets");u(h,v,R,">","\\gt",!0);u(h,v,R,"∈","\\in",!0);u(h,v,R,"","\\@not");u(h,v,R,"⊂","\\subset",!0);u(h,v,R,"⊃","\\supset",!0);u(h,v,R,"⊆","\\subseteq",!0);u(h,v,R,"⊇","\\supseteq",!0);u(h,A,R,"⊈","\\nsubseteq",!0);u(h,A,R,"⊉","\\nsupseteq",!0);u(h,v,R,"⊨","\\models");u(h,v,R,"←","\\leftarrow",!0);u(h,v,R,"≤","\\le");u(h,v,R,"≤","\\leq",!0);u(h,v,R,"<","\\lt",!0);u(h,v,R,"→","\\rightarrow",!0);u(h,v,R,"→","\\to");u(h,A,R,"≱","\\ngeq",!0);u(h,A,R,"≰","\\nleq",!0);u(h,v,kr," ","\\ ");u(h,v,kr," ","\\space");u(h,v,kr," ","\\nobreakspace");u(X,v,kr," ","\\ ");u(X,v,kr," "," ");u(X,v,kr," ","\\space");u(X,v,kr," ","\\nobreakspace");u(h,v,kr,"","\\nobreak");u(h,v,kr,"","\\allowbreak");u(h,v,$a,",",",");u(h,v,$a,";",";");u(h,A,ve,"⊼","\\barwedge",!0);u(h,A,ve,"⊻","\\veebar",!0);u(h,v,ve,"⊙","\\odot",!0);u(h,v,ve,"⊕","\\oplus",!0);u(h,v,ve,"⊗","\\otimes",!0);u(h,v,B,"∂","\\partial",!0);u(h,v,ve,"⊘","\\oslash",!0);u(h,A,ve,"⊚","\\circledcirc",!0);u(h,A,ve,"⊡","\\boxdot",!0);u(h,v,ve,"△","\\bigtriangleup");u(h,v,ve,"▽","\\bigtriangledown");u(h,v,ve,"†","\\dagger");u(h,v,ve,"⋄","\\diamond");u(h,v,ve,"⋆","\\star");u(h,v,ve,"◃","\\triangleleft");u(h,v,ve,"▹","\\triangleright");u(h,v,En,"{","\\{");u(X,v,B,"{","\\{");u(X,v,B,"{","\\textbraceleft");u(h,v,hn,"}","\\}");u(X,v,B,"}","\\}");u(X,v,B,"}","\\textbraceright");u(h,v,En,"{","\\lbrace");u(h,v,hn,"}","\\rbrace");u(h,v,En,"[","\\lbrack",!0);u(X,v,B,"[","\\lbrack",!0);u(h,v,hn,"]","\\rbrack",!0);u(X,v,B,"]","\\rbrack",!0);u(h,v,En,"(","\\lparen",!0);u(h,v,hn,")","\\rparen",!0);u(X,v,B,"<","\\textless",!0);u(X,v,B,">","\\textgreater",!0);u(h,v,En,"⌊","\\lfloor",!0);u(h,v,hn,"⌋","\\rfloor",!0);u(h,v,En,"⌈","\\lceil",!0);u(h,v,hn,"⌉","\\rceil",!0);u(h,v,B,"\\","\\backslash");u(h,v,B,"∣","|");u(h,v,B,"∣","\\vert");u(X,v,B,"|","\\textbar",!0);u(h,v,B,"∥","\\|");u(h,v,B,"∥","\\Vert");u(X,v,B,"∥","\\textbardbl");u(X,v,B,"~","\\textasciitilde");u(X,v,B,"\\","\\textbackslash");u(X,v,B,"^","\\textasciicircum");u(h,v,R,"↑","\\uparrow",!0);u(h,v,R,"⇑","\\Uparrow",!0);u(h,v,R,"↓","\\downarrow",!0);u(h,v,R,"⇓","\\Downarrow",!0);u(h,v,R,"↕","\\updownarrow",!0);u(h,v,R,"⇕","\\Updownarrow",!0);u(h,v,qt,"∐","\\coprod");u(h,v,qt,"⋁","\\bigvee");u(h,v,qt,"⋀","\\bigwedge");u(h,v,qt,"⨄","\\biguplus");u(h,v,qt,"⋂","\\bigcap");u(h,v,qt,"⋃","\\bigcup");u(h,v,qt,"∫","\\int");u(h,v,qt,"∫","\\intop");u(h,v,qt,"∬","\\iint");u(h,v,qt,"∭","\\iiint");u(h,v,qt,"∏","\\prod");u(h,v,qt,"∑","\\sum");u(h,v,qt,"⨂","\\bigotimes");u(h,v,qt,"⨁","\\bigoplus");u(h,v,qt,"⨀","\\bigodot");u(h,v,qt,"∮","\\oint");u(h,v,qt,"∯","\\oiint");u(h,v,qt,"∰","\\oiiint");u(h,v,qt,"⨆","\\bigsqcup");u(h,v,qt,"∫","\\smallint");u(X,v,Ks,"…","\\textellipsis");u(h,v,Ks,"…","\\mathellipsis");u(X,v,Ks,"…","\\ldots",!0);u(h,v,Ks,"…","\\ldots",!0);u(h,v,Ks,"⋯","\\@cdots",!0);u(h,v,Ks,"⋱","\\ddots",!0);u(h,v,B,"⋮","\\varvdots");u(X,v,B,"⋮","\\varvdots");u(h,v,_t,"ˊ","\\acute");u(h,v,_t,"ˋ","\\grave");u(h,v,_t,"¨","\\ddot");u(h,v,_t,"~","\\tilde");u(h,v,_t,"ˉ","\\bar");u(h,v,_t,"˘","\\breve");u(h,v,_t,"ˇ","\\check");u(h,v,_t,"^","\\hat");u(h,v,_t,"⃗","\\vec");u(h,v,_t,"˙","\\dot");u(h,v,_t,"˚","\\mathring");u(h,v,De,"","\\@imath");u(h,v,De,"","\\@jmath");u(h,v,B,"ı","ı");u(h,v,B,"ȷ","ȷ");u(X,v,B,"ı","\\i",!0);u(X,v,B,"ȷ","\\j",!0);u(X,v,B,"ß","\\ss",!0);u(X,v,B,"æ","\\ae",!0);u(X,v,B,"œ","\\oe",!0);u(X,v,B,"ø","\\o",!0);u(X,v,B,"Æ","\\AE",!0);u(X,v,B,"Œ","\\OE",!0);u(X,v,B,"Ø","\\O",!0);u(X,v,_t,"ˊ","\\'");u(X,v,_t,"ˋ","\\`");u(X,v,_t,"ˆ","\\^");u(X,v,_t,"˜","\\~");u(X,v,_t,"ˉ","\\=");u(X,v,_t,"˘","\\u");u(X,v,_t,"˙","\\.");u(X,v,_t,"¸","\\c");u(X,v,_t,"˚","\\r");u(X,v,_t,"ˇ","\\v");u(X,v,_t,"¨",'\\"');u(X,v,_t,"˝","\\H");u(X,v,_t,"◯","\\textcircled");var Pp={"--":!0,"---":!0,"``":!0,"''":!0};u(X,v,B,"–","--",!0);u(X,v,B,"–","\\textendash");u(X,v,B,"—","---",!0);u(X,v,B,"—","\\textemdash");u(X,v,B,"‘","`",!0);u(X,v,B,"‘","\\textquoteleft");u(X,v,B,"’","'",!0);u(X,v,B,"’","\\textquoteright");u(X,v,B,"“","``",!0);u(X,v,B,"“","\\textquotedblleft");u(X,v,B,"”","''",!0);u(X,v,B,"”","\\textquotedblright");u(h,v,B,"°","\\degree",!0);u(X,v,B,"°","\\degree");u(X,v,B,"°","\\textdegree",!0);u(h,v,B,"£","\\pounds");u(h,v,B,"£","\\mathsterling",!0);u(X,v,B,"£","\\pounds");u(X,v,B,"£","\\textsterling",!0);u(h,A,B,"✠","\\maltese");u(X,A,B,"✠","\\maltese");var ou='0123456789/@."';for(var Lo=0;Lo<ou.length;Lo++){var lu=ou.charAt(Lo);u(h,v,B,lu,lu)}var cu='0123456789!@*()-=+";:?/.,';for(var Fo=0;Fo<cu.length;Fo++){var uu=cu.charAt(Fo);u(X,v,B,uu,uu)}var Pi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Uo=0;Uo<Pi.length;Uo++){var ri=Pi.charAt(Uo);u(h,v,De,ri,ri),u(X,v,B,ri,ri)}u(h,A,B,"C","ℂ");u(X,A,B,"C","ℂ");u(h,A,B,"H","ℍ");u(X,A,B,"H","ℍ");u(h,A,B,"N","ℕ");u(X,A,B,"N","ℕ");u(h,A,B,"P","ℙ");u(X,A,B,"P","ℙ");u(h,A,B,"Q","ℚ");u(X,A,B,"Q","ℚ");u(h,A,B,"R","ℝ");u(X,A,B,"R","ℝ");u(h,A,B,"Z","ℤ");u(X,A,B,"Z","ℤ");u(h,v,De,"h","ℎ");u(X,v,De,"h","ℎ");var $e;for(var rn=0;rn<Pi.length;rn++){var It=Pi.charAt(rn);$e=String.fromCharCode(55349,56320+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),$e=String.fromCharCode(55349,56372+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),$e=String.fromCharCode(55349,56424+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),$e=String.fromCharCode(55349,56580+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),$e=String.fromCharCode(55349,56684+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),$e=String.fromCharCode(55349,56736+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),$e=String.fromCharCode(55349,56788+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),$e=String.fromCharCode(55349,56840+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),$e=String.fromCharCode(55349,56944+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),rn<26&&($e=String.fromCharCode(55349,56632+rn),u(h,v,De,It,$e),u(X,v,B,It,$e),$e=String.fromCharCode(55349,56476+rn),u(h,v,De,It,$e),u(X,v,B,It,$e))}$e="𝕜";u(h,v,De,"k",$e);u(X,v,B,"k",$e);for(var ts=0;ts<10;ts++){var Cr=ts.toString();$e=String.fromCharCode(55349,57294+ts),u(h,v,De,Cr,$e),u(X,v,B,Cr,$e),$e=String.fromCharCode(55349,57314+ts),u(h,v,De,Cr,$e),u(X,v,B,Cr,$e),$e=String.fromCharCode(55349,57324+ts),u(h,v,De,Cr,$e),u(X,v,B,Cr,$e),$e=String.fromCharCode(55349,57334+ts),u(h,v,De,Cr,$e),u(X,v,B,Cr,$e)}var Nl="ÐÞþ";for(var qo=0;qo<Nl.length;qo++){var si=Nl.charAt(qo);u(h,v,De,si,si),u(X,v,B,si,si)}var Ml={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},du={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},hu={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},n6={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},ss={mathClass:"",textClass:"",font:""},pu={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},fu={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},mu={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},zl={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Dl={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},gu={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},$l={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},vu=[Ml,Ml,du,du,hu,hu,n6,ss,ss,ss,pu,pu,fu,fu,mu,mu,zl,zl,Dl,Dl,gu,gu,ss,ss,$l,$l],r6=[Ml,ss,zl,Dl,$l],s6=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return vu[s]}else if(120782<=r&&r<=120831){var a=Math.floor((r-120782)/10);return r6[a]}else{if(r===120485||r===120486)return vu[0];if(120486<r&&r<120782)return ss;throw new ae("Unsupported character: "+e)}},Xi=function(t,n,r){if(St[r][t]){var s=St[r][t].replace;s&&(t=s)}return{value:t,metrics:I0(t,n,r)}},ln=function(t,n,r,s,a){var i=Xi(t,n,r),o=i.metrics;t=i.value;var l;if(o){var c=o.italic;(r==="text"||s&&s.font==="mathit")&&(c=0),l=new _n(t,o.height,o.depth,c,o.skew,o.width,a)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+r+"'")),l=new _n(t,0,0,0,0,0,a);if(s){l.maxFontSize=s.sizeMultiplier,s.style.isTight()&&l.classes.push("mtight");var d=s.getColor();d&&(l.style.color=d)}return l},N0=function(t,n,r,s){return s===void 0&&(s=[]),r.font==="boldsymbol"&&Xi(t,"Main-Bold",n).metrics?ln(t,"Main-Bold",n,r,s.concat(["mathbf"])):t==="\\"||St[n][t].font==="main"?ln(t,"Main-Regular",n,r,s):ln(t,"AMS-Regular",n,r,s.concat(["amsrm"]))},a6=function(t,n,r){return r!=="textord"&&Xi(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},eo=function(t,n){var r=t.type==="mathord"?"mathord":"textord",s=t.mode,a=t.text,i=["mord"],{font:o,fontFamily:l,fontWeight:c,fontShape:d}=n,f=s==="math"||s==="text"&&!!o,m=f?o:l,p="",w="";if(a.charCodeAt(0)===55349){var y=s6(a);p=y.font,w=y[s+"Class"]}if(p)return ln(a,p,s,n,i.concat(w));if(m){var x,_;if(m==="boldsymbol"){var $=a6(a,s,r);x=$.fontName,_=[$.fontClass]}else f?(x=Pl[o].fontName,_=[o]):(x=ai(l,c,d),_=[l,c,d]);if(Xi(a,x,s).metrics)return ln(a,x,s,n,i.concat(_));if(Pp.hasOwnProperty(a)&&x.slice(0,10)==="Typewriter"){for(var z=[],C=0;C<a.length;C++)z.push(ln(a[C],x,s,n,i.concat(_)));return xr(z)}}if(r==="mathord")return ln(a,"Math-Italic",s,n,i.concat(["mathnormal"]));if(r==="textord"){var S=St[s][a]&&St[s][a].font;if(S==="ams"){var E=ai("amsrm",c,d);return ln(a,E,s,n,i.concat("amsrm",c,d))}else if(S==="main"||!S){var F=ai("textrm",c,d);return ln(a,F,s,n,i.concat(c,d))}else{var N=ai(S,c,d);return ln(a,N,s,n,i.concat(N,c,d))}}else throw new Error("unexpected type: "+r+" in makeOrd")},i6=(e,t)=>{if(Hr(e.classes)!==Hr(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var s of Object.keys(t.style))if(e.style[s]!==t.style[s])return!1;return!0},Bp=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof _n&&r instanceof _n&&i6(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},M0=function(t){for(var n=0,r=0,s=0,a=0;a<t.children.length;a++){var i=t.children[a];i.height>n&&(n=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>s&&(s=i.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=s},ee=function(t,n,r,s){var a=new js(t,n,r,s);return M0(a),a},Gr=(e,t,n,r)=>new js(e,t,n,r),Bs=function(t,n,r){var s=ee([t],[],n);return s.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),s.style.borderBottomWidth=ce(s.height),s.maxFontSize=1,s},o6=function(t,n,r,s){var a=new Yi(t,n,r,s);return M0(a),a},xr=function(t){var n=new Zs(t);return M0(n),n},Ls=function(t,n){return t instanceof Zs?ee([],[t],n):t},l6=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],s=-n[0].shift-n[0].elem.depth,a=s,i=1;i<n.length;i++){var o=-n[i].shift-a-n[i].elem.depth,l=o-(n[i-1].elem.height+n[i-1].elem.depth);a=a+o,r.push({type:"kern",size:l}),r.push(n[i])}return{children:r,depth:s}}var c;if(t.positionType==="top"){for(var d=t.positionData,f=0;f<t.children.length;f++){var m=t.children[f];d-=m.type==="kern"?m.size:m.elem.height+m.elem.depth}c=d}else if(t.positionType==="bottom")c=-t.positionData;else{var p=t.children[0];if(p.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")c=-p.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")c=-p.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:c}},at=function(t,n){for(var{children:r,depth:s}=l6(t),a=0,i=0;i<r.length;i++){var o=r[i];if(o.type==="elem"){var l=o.elem;a=Math.max(a,l.maxFontSize,l.height)}}a+=2;var c=ee(["pstrut"],[]);c.style.height=ce(a);for(var d=[],f=s,m=s,p=s,w=0;w<r.length;w++){var y=r[w];if(y.type==="kern")p+=y.size;else{var x=y.elem,_=y.wrapperClasses||[],$=y.wrapperStyle||{},z=ee(_,[c,x],void 0,$);z.style.top=ce(-a-p-x.depth),y.marginLeft&&(z.style.marginLeft=y.marginLeft),y.marginRight&&(z.style.marginRight=y.marginRight),d.push(z),p+=x.height+x.depth}f=Math.min(f,p),m=Math.max(m,p)}var C=ee(["vlist"],d);C.style.height=ce(m);var S;if(f<0){var E=ee([],[]),F=ee(["vlist"],[E]);F.style.height=ce(-f);var N=ee(["vlist-s"],[new _n("")]);S=[ee(["vlist-r"],[C,N]),ee(["vlist-r"],[F])]}else S=[ee(["vlist-r"],[C])];var G=ee(["vlist-t"],S);return S.length===2&&G.classes.push("vlist-t2"),G.height=m,G.depth=-f,G},Lp=(e,t)=>{var n=ee(["mspace"],[],t),r=Tt(e,t);return n.style.marginRight=ce(r),n},ai=(e,t,n)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return t==="textbf"&&n==="textit"?s="BoldItalic":t==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",r+"-"+s},Pl={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Fp={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Up=function(t,n){var[r,s,a]=Fp[t],i=new Vr(r),o=new gr([i],{width:ce(s),height:ce(a),style:"width:"+ce(s),viewBox:"0 0 "+1e3*s+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Gr(["overlay"],[o],n);return l.height=a,l.style.height=ce(a),l.style.width=ce(s),l},At={number:3,unit:"mu"},ns={number:4,unit:"mu"},or={number:5,unit:"mu"},c6={mord:{mop:At,mbin:ns,mrel:or,minner:At},mop:{mord:At,mop:At,mrel:or,minner:At},mbin:{mord:ns,mop:ns,mopen:ns,minner:ns},mrel:{mord:or,mop:or,mopen:or,minner:or},mopen:{},mclose:{mop:At,mbin:ns,mrel:or,minner:At},mpunct:{mord:At,mop:At,mrel:or,mopen:At,mclose:At,mpunct:At,minner:At},minner:{mord:At,mop:At,mbin:ns,mrel:or,mopen:At,mpunct:At,minner:At}},u6={mord:{mop:At},mop:{mord:At,mop:At},mbin:{},mrel:{},mopen:{},mclose:{mop:At},mpunct:{},minner:{mop:At}},qp={},Ea={},Aa={};function ge(e){for(var{type:t,names:n,htmlBuilder:r,mathmlBuilder:s}=e,a=0;a<n.length;++a)qp[n[a]]=e;t&&(r&&(Ea[t]=r),s&&(Aa[t]=s))}function gs(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;n&&(Ea[t]=n),r&&(Aa[t]=r)}var Bi=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Lt=function(t){return t.type==="ordgroup"?t.body:[t]},d6=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),h6=new Set(["rightmost","mrel","mclose","mpunct"]),p6={display:Ue.DISPLAY,text:Ue.TEXT,script:Ue.SCRIPT,scriptscript:Ue.SCRIPTSCRIPT},f6={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Kt=function(t,n,r,s){s===void 0&&(s=[null,null]);for(var a=[],i=0;i<t.length;i++){var o=it(t[i],n);if(o instanceof Zs){var l=o.children;a.push(...l)}else a.push(o)}if(Bp(a),!r)return a;var c=n;if(t.length===1){var d=t[0];d.type==="sizing"?c=n.havingSize(d.size):d.type==="styling"&&(c=n.havingStyle(p6[d.style]))}var f=ee([s[0]||"leftmost"],[],n),m=ee([s[1]||"rightmost"],[],n),p=r==="root";return Bl(a,(w,y)=>{var x=y.classes[0],_=w.classes[0];x==="mbin"&&h6.has(_)?y.classes[0]="mord":_==="mbin"&&d6.has(x)&&(w.classes[0]="mord")},{node:f},m,p),Bl(a,(w,y)=>{var x,_,$=Fl(y),z=Fl(w),C=$&&z?w.hasClass("mtight")?(x=u6[$])==null?void 0:x[z]:(_=c6[$])==null?void 0:_[z]:null;if(C)return Lp(C,c)},{node:f},m,p),a},Bl=function(t,n,r,s,a){s&&t.push(s);for(var i=0;i<t.length;i++){var o=t[i],l=Hp(o);if(l){Bl(l.children,n,r,null,a);continue}var c=!o.hasClass("mspace");if(c){var d=n(o,r.node);d&&(r.insertAfter?r.insertAfter(d):(t.unshift(d),i++))}c?r.node=o:a&&o.hasClass("newline")&&(r.node=ee(["leftmost"])),r.insertAfter=(f=>m=>{t.splice(f+1,0,m),i++})(i)}s&&t.pop()},Hp=function(t){return t instanceof Zs||t instanceof Yi||t instanceof js&&t.hasClass("enclosing")?t:null},Ll=function(t,n){var r=Hp(t);if(r){var s=r.children;if(s.length){if(n==="right")return Ll(s[s.length-1],"right");if(n==="left")return Ll(s[0],"left")}}return t},Fl=function(t,n){if(!t)return null;n&&(t=Ll(t,n));var r=t.classes[0];return f6[r]||null},Ta=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return ee(n.concat(r))},it=function(t,n,r){if(!t)return ee();if(Ea[t.type]){var s=Ea[t.type](t,n);if(r&&n.size!==r.size){s=ee(n.sizingClasses(r),[s],n);var a=n.sizeMultiplier/r.sizeMultiplier;s.height*=a,s.depth*=a}return s}else throw new ae("Got group of unknown type: '"+t.type+"'")};function ii(e,t){var n=ee(["base"],e,t),r=ee(["strut"]);return r.style.height=ce(n.height+n.depth),n.depth&&(r.style.verticalAlign=ce(-n.depth)),n.children.unshift(r),n}function Ul(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var r=Kt(e,t,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var a=[],i=[],o=0;o<r.length;o++)if(i.push(r[o]),r[o].hasClass("mbin")||r[o].hasClass("mrel")||r[o].hasClass("allowbreak")){for(var l=!1;o<r.length-1&&r[o+1].hasClass("mspace")&&!r[o+1].hasClass("newline");)o++,i.push(r[o]),r[o].hasClass("nobreak")&&(l=!0);l||(a.push(ii(i,t)),i=[])}else r[o].hasClass("newline")&&(i.pop(),i.length>0&&(a.push(ii(i,t)),i=[]),a.push(r[o]));i.length>0&&a.push(ii(i,t));var c;n?(c=ii(Kt(n,t,!0),t),c.classes=["tag"],a.push(c)):s&&a.push(s);var d=ee(["katex-html"],a);if(d.setAttribute("aria-hidden","true"),c){var f=c.children[0];f.style.height=ce(d.height+d.depth),d.depth&&(f.style.verticalAlign=ce(-d.depth))}return d}function Vp(e){return new Zs(e)}class ie{constructor(t,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=Hr(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Ft&&this.children[r+1]instanceof Ft){for(var s=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Ft;)s+=this.children[++r].toText();t.appendChild(new Ft(s).toNode())}else t.appendChild(this.children[r].toNode());return t}toMarkup(){var t="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="',t+=tn(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+tn(Hr(this.classes))+'"'),t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class Ft{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return tn(this.toText())}toText(){return this.text}}class Gp{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character=" ":t>=-.05556&&t<=-.05555?this.character=" ":t>=-.1667&&t<=-.1666?this.character=" ":t>=-.2223&&t<=-.2222?this.character=" ":t>=-.2778&&t<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",ce(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ce(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var m6=new Set(["\\imath","\\jmath"]),g6=new Set(["mrow","mtable"]),Nn=function(t,n,r){return St[n][t]&&St[n][t].replace&&t.charCodeAt(0)!==55349&&!(Pp.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=St[n][t].replace),new Ft(t)},z0=function(t){return t.length===1?t[0]:new ie("mrow",t)},v6={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},D0=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode,s=v6[n];if(s)return typeof s=="function"?s(e):s;var a=e.text;if(m6.has(a))return null;if(St[r][a]){var i=St[r][a].replace;i&&(a=i)}var o=Pl[n].fontName;return I0(a,o,r)?Pl[n].variant:null};function Ho(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof Ft&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof Ft&&n.text===","}else return!1}var An=function(t,n,r){if(t.length===1){var s=gt(t[0],n);return r&&s instanceof ie&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var a=[],i,o=0;o<t.length;o++){var l=gt(t[o],n);if(l instanceof ie&&i instanceof ie){if(l.type==="mtext"&&i.type==="mtext"&&l.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...l.children);continue}else if(l.type==="mn"&&i.type==="mn"){i.children.push(...l.children);continue}else if(Ho(l)&&i.type==="mn"){i.children.push(...l.children);continue}else if(l.type==="mn"&&Ho(i))l.children=[...i.children,...l.children],a.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(i.type==="mn"||Ho(i))){var c=l.children[0];c instanceof ie&&c.type==="mn"&&(c.children=[...i.children,...c.children],a.pop())}else if(i.type==="mi"&&i.children.length===1){var d=i.children[0];if(d instanceof Ft&&d.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof Ft&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),a.pop())}}}a.push(l),i=l}return a},Zr=function(t,n,r){return z0(An(t,n,r))},gt=function(t,n){if(!t)return new ie("mrow");if(Aa[t.type])return Aa[t.type](t,n);throw new ae("Got group of unknown type: '"+t.type+"'")};function bu(e,t,n,r,s){var a=An(e,n),i;a.length===1&&a[0]instanceof ie&&g6.has(a[0].type)?i=a[0]:i=new ie("mrow",a);var o=new ie("annotation",[new Ft(t)]);o.setAttribute("encoding","application/x-tex");var l=new ie("semantics",[i,o]),c=new ie("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var d=s?"katex":"katex-mathml";return ee([d],[c])}var b6=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],yu=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],wu=function(t,n){return n.size<2?t:b6[t-1][n.size-1]};class cr{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||cr.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=yu[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new cr(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:wu(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:yu[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=wu(cr.BASESIZE,t);return this.size===n&&this.textSize===cr.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==cr.BASESIZE?["sizing","reset-size"+this.size,"size"+cr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=t6(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}cr.BASESIZE=6;var Zp=function(t){return new cr({style:t.displayMode?Ue.DISPLAY:Ue.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},jp=function(t,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),t=ee(r,[t])}return t},y6=function(t,n,r){var s=Zp(r),a;if(r.output==="mathml")return bu(t,n,s,r.displayMode,!0);if(r.output==="html"){var i=Ul(t,s);a=ee(["katex"],[i])}else{var o=bu(t,n,s,r.displayMode,!1),l=Ul(t,s);a=ee(["katex"],[o,l])}return jp(a,r)},w6=function(t,n,r){var s=Zp(r),a=Ul(t,s),i=ee(["katex"],[a]);return jp(i,r)},k6={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},to=function(t){var n=new ie("mo",[new Ft(k6[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},x6={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},S6=new Set(["widehat","widecheck","widetilde","utilde"]),no=function(t,n){function r(){var o=4e5,l=t.label.slice(1);if(S6.has(l)&&"base"in t){var c=t.base.type==="ordgroup"?t.base.body.length:1,d,f,m;if(c>5)l==="widehat"||l==="widecheck"?(d=420,o=2364,m=.42,f=l+"4"):(d=312,o=2340,m=.34,f="tilde4");else{var p=[1,1,2,2,3,3][c];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][p],d=[0,239,300,360,420][p],m=[0,.24,.3,.3,.36,.42][p],f=l+p):(o=[0,600,1033,2339,2340][p],d=[0,260,286,306,312][p],m=[0,.26,.286,.3,.306,.34][p],f="tilde"+p)}var w=new Vr(f),y=new gr([w],{width:"100%",height:ce(m),viewBox:"0 0 "+o+" "+d,preserveAspectRatio:"none"});return{span:Gr([],[y],n),minWidth:0,height:m}}else{var x=[],_=x6[l];if(!_)throw new Error('No SVG data for "'+l+'".');var[$,z,C]=_,S=C/1e3,E=$.length,F,N;if(E===1){if(_.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');F=["hide-tail"],N=[_[3]]}else if(E===2)F=["halfarrow-left","halfarrow-right"],N=["xMinYMin","xMaxYMin"];else if(E===3)F=["brace-left","brace-center","brace-right"],N=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
313
|
+
`+E+" children.");for(var G=0;G<E;G++){var P=new Vr($[G]),j=new gr([P],{width:"400em",height:ce(S),viewBox:"0 0 "+o+" "+C,preserveAspectRatio:N[G]+" slice"}),q=Gr([F[G]],[j],n);if(E===1)return{span:q,minWidth:z,height:S};q.style.height=ce(S),x.push(q)}return{span:ee(["stretchy"],x,n),minWidth:z,height:S}}}var{span:s,minWidth:a,height:i}=r();return s.height=i,s.style.height=ce(i),a>0&&(s.style.minWidth=ce(a)),s},_6=function(t,n,r,s,a){var i,o=t.height+t.depth+r+s;if(/fbox|color|angl/.test(n)){if(i=ee(["stretchy",n],[],a),n==="fbox"){var l=a.color&&a.getColor();l&&(i.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(n)&&c.push(new Il({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&c.push(new Il({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new gr(c,{width:"100%",height:ce(o)});i=Gr([],[d],a)}return i.height=o,i.style.height=ce(o),i},E6={bin:1,close:1,inner:1,open:1,punct:1,rel:1},A6={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function T6(e){return e in E6}function Ge(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function ro(e){var t=so(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function so(e){return e&&(e.type==="atom"||A6.hasOwnProperty(e.type))?e:null}var Kp=e=>{if(e instanceof _n)return e;if(X5(e)&&e.children.length===1)return Kp(e.children[0])},Wp=(e,t)=>{var n,r,s;e&&e.type==="supsub"?(r=Ge(e.base,"accent"),n=r.base,e.base=n,s=Y5(it(e,t)),e.base=r):(r=Ge(e,"accent"),n=r.base);var a=it(n,t.havingCrampedStyle()),i=r.isShifty&&wr(n),o=0;if(i){var l,c;o=(l=(c=Kp(a))==null?void 0:c.skew)!=null?l:0}var d=r.label==="\\c",f=d?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),m;if(r.isStretchy)m=no(r,t),m=at({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ce(2*o)+")",marginLeft:ce(2*o)}:void 0}]});else{var p,w;r.label==="\\vec"?(p=Up("vec",t),w=Fp.vec[1]):(p=eo({type:"textord",mode:r.mode,text:r.label},t),p=J5(p),p.italic=0,w=p.width,d&&(f+=p.depth)),m=ee(["accent-body"],[p]);var y=r.label==="\\textcircled";y&&(m.classes.push("accent-full"),f=a.height);var x=o;y||(x-=w/2),m.style.left=ce(x),r.label==="\\textcircled"&&(m.style.top=".2em"),m=at({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:m}]})}var _=ee(["mord","accent"],[m],t);return s?(s.children[0]=_,s.height=Math.max(_.height,s.height),s.classes[0]="mord",s):_},C6=(e,t)=>{var n=e.isStretchy?to(e.label):new ie("mo",[Nn(e.label,e.mode)]),r=new ie("mover",[gt(e.base,t),n]);return r.setAttribute("accent","true"),r},R6=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ge({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],numArgs:1,handler:(e,t)=>{var n=Bi(t[0]),r=!R6.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:n}},htmlBuilder:Wp,mathmlBuilder:C6});ge({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}});ge({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:s}},htmlBuilder:(e,t)=>{var n=it(e.base,t),r=no(e,t),s=e.label==="\\utilde"?.12:0,a=at({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:n}]});return ee(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var n=to(e.label),r=new ie("munder",[gt(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var oi=e=>{var t=new ie("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ge({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),s=Ls(it(e.body,r,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(a+"-arrow-pad");var i;e.below&&(r=t.havingStyle(n.sub()),i=Ls(it(e.below,r,t),t),i.classes.push(a+"-arrow-pad"));var o=no(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,c=-t.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(c-=s.depth);var d;if(i){var f=-t.fontMetrics().axisHeight+i.height+.5*o.height+.111;d=at({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:i,shift:f}]})}else d=at({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return ee(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var n=to(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=oi(gt(e.body,t));if(e.below){var a=oi(gt(e.below,t));r=new ie("munderover",[n,a,s])}else r=new ie("mover",[n,s])}else if(e.below){var i=oi(gt(e.below,t));r=new ie("munder",[n,i])}else r=oi(),r=new ie("mover",[n,r]);return r}});function O6(e,t){var n=Kt(e.body,t,!0);return ee([e.mclass],n,t)}function I6(e,t){var n,r=An(e.body,t);return e.mclass==="minner"?n=new ie("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new ie("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new ie("mo",r),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):(e.mclass==="mopen"||e.mclass==="mclose")&&(n.attributes.lspace="0em",n.attributes.rspace="0em")),n}ge({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],numArgs:1,primitive:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Lt(s),isCharacterBox:wr(s)}},htmlBuilder:O6,mathmlBuilder:I6});var ao=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};ge({type:"mclass",names:["\\@binrel"],numArgs:2,handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:ao(t[0]),body:Lt(t[1]),isCharacterBox:wr(t[1])}}});ge({type:"mclass",names:["\\stackrel","\\overset","\\underset"],numArgs:2,handler(e,t){var{parser:n,funcName:r}=e,s=t[1],a=t[0],i;r!=="\\stackrel"?i=ao(s):i="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Lt(s)},l=r==="\\underset"?{type:"supsub",mode:a.mode,base:o,sub:a}:{type:"supsub",mode:a.mode,base:o,sup:a};return{type:"mclass",mode:n.mode,mclass:i,body:[l],isCharacterBox:wr(l)}}});ge({type:"pmb",names:["\\pmb"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:ao(t[0]),body:Lt(t[0])}},htmlBuilder(e,t){var n=Kt(e.body,t,!0),r=ee([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=An(e.body,t),r=new ie("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var N6={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ku=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),xu=e=>e.type==="textord"&&e.text==="@",M6=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function z6(e,t,n){var r=N6[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var s=n.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},i=n.callFunction("\\Big",[a],[]),o=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[s,i,o]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function D6(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new ae("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],a=0;a<t.length;a++){for(var i=t[a],o=ku(),l=0;l<i.length;l++)if(!xu(i[l]))o.body.push(i[l]);else{r.push(o),l+=1;var c=ro(i[l]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(c))if("<>AV".includes(c))for(var f=0;f<2;f++){for(var m=!0,p=l+1;p<i.length;p++){if(M6(i[p],c)){m=!1,l=p;break}if(xu(i[p]))throw new ae("Missing a "+c+" character to complete a CD arrow.",i[p]);d[f].body.push(i[p])}if(m)throw new ae("Missing a "+c+" character to complete a CD arrow.",i[l])}else throw new ae('Expected one of "<>AV=|." after @',i[l]);var w=z6(c,d,e),y={type:"styling",body:[w],mode:"math",style:"display",resetFont:!0};r.push(y),o=ku()}a%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var x=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:x,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}ge({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Ls(it(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=ce(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new ie("mrow",[gt(e.label,t)]);return n=new ie("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new ie("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});ge({type:"cdlabelparent",names:["\\\\cdparent"],numArgs:1,handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Ls(it(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new ie("mrow",[gt(e.fragment,t)])}});ge({type:"textord",names:["\\@char"],numArgs:1,allowedInText:!0,handler(e,t){for(var{parser:n}=e,r=Ge(t[0],"ordgroup"),s=r.body,a="",i=0;i<s.length;i++){var o=Ge(s[i],"textord");a+=o.text}var l=parseInt(a),c;if(isNaN(l))throw new ae("\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new ae("\\@char with invalid code point "+a);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:c}}});var $6=(e,t)=>{var n=Kt(e.body,t.withColor(e.color),!1);return xr(n)},P6=(e,t)=>{var n=An(e.body,t.withColor(e.color)),r=new ie("mstyle",n);return r.setAttribute("mathcolor",e.color),r};ge({type:"color",names:["\\textcolor"],numArgs:2,allowedInText:!0,argTypes:["color","original"],handler(e,t){var{parser:n}=e,r=Ge(t[0],"color-token").color,s=t[1];return{type:"color",mode:n.mode,color:r,body:Lt(s)}},htmlBuilder:$6,mathmlBuilder:P6});ge({type:"color",names:["\\color"],numArgs:1,allowedInText:!0,argTypes:["color"],handler(e,t){var{parser:n,breakOnTokenText:r}=e,s=Ge(t[0],"color-token").color;n.gullet.macros.set("\\current@color",s);var a=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:s,body:a}}});ge({type:"cr",names:["\\\\"],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e,t,n){var{parser:r}=e,s=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:s&&Ge(s,"size").value}},htmlBuilder(e,t){var n=ee(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=ce(Tt(e.size,t)))),n},mathmlBuilder(e,t){var n=new ie("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",ce(Tt(e.size,t)))),n}});var ql={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Qp=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new ae("Expected a control sequence",e);return t},B6=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},Jp=(e,t,n,r)=>{var s=e.gullet.macros.get(n.text);s==null&&(n.noexpand=!0,s={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,s,r)};ge({type:"internal",names:["\\global","\\long","\\\\globallong"],numArgs:0,allowedInText:!0,handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(ql[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=ql[r.text]),Ge(t.parseFunction(),"internal");throw new ae("Invalid token after macro prefix",r)}});ge({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new ae("Expected a control sequence",r);for(var a=0,i,o=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){i=t.gullet.future(),o[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new ae('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new ae('Argument number "'+r.text+'" out of order');a++,o.push([])}else{if(r.text==="EOF")throw new ae("Expected a macro definition");o[a].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return i&&l.unshift(i),(n==="\\edef"||n==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(s,{tokens:l,numArgs:a,delimiters:o},n===ql[n]),{type:"internal",mode:t.mode}}});ge({type:"internal",names:["\\let","\\\\globallet"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Qp(t.gullet.popToken());t.gullet.consumeSpaces();var s=B6(t);return Jp(t,r,s,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});ge({type:"internal",names:["\\futurelet","\\\\globalfuture"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Qp(t.gullet.popToken()),s=t.gullet.popToken(),a=t.gullet.popToken();return Jp(t,r,a,n==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var la=function(t,n,r){var s=St.math[t]&&St.math[t].replace,a=I0(s||t,n,r);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return a},$0=function(t,n,r,s){var a=r.havingBaseStyle(n),i=ee(s.concat(a.sizingClasses(r)),[t],r),o=a.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=a.sizeMultiplier,i},Yp=function(t,n,r){var s=n.havingBaseStyle(r),a=(1-n.sizeMultiplier/s.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=ce(a),t.height-=a,t.depth+=a},L6=function(t,n,r,s,a,i){var o=ln(t,"Main-Regular",a,s),l=$0(o,n,s,i);return Yp(l,s,n),l},F6=function(t,n,r,s){return ln(t,"Size"+n+"-Regular",r,s)},Xp=function(t,n,r,s,a,i){var o=F6(t,n,a,s),l=$0(ee(["delimsizing","size"+n],[o],s),Ue.TEXT,s,i);return r&&Yp(l,s,Ue.TEXT),l},Vo=function(t,n,r){var s;n==="Size1-Regular"?s="delim-size1":s="delim-size4";var a=ee(["delimsizinginner",s],[ee([],[ln(t,n,r)])]);return{type:"elem",elem:a}},Go=function(t,n,r){var s=Jn["Size4-Regular"][t.charCodeAt(0)]?Jn["Size4-Regular"][t.charCodeAt(0)][4]:Jn["Size1-Regular"][t.charCodeAt(0)][4],a=new Vr("inner",V5(t,Math.round(1e3*n))),i=new gr([a],{width:ce(s),height:ce(n),style:"width:"+ce(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),o=Gr([],[i],r);return o.height=n,o.style.height=ce(n),o.style.width=ce(s),{type:"elem",elem:o}},Hl=.008,li={type:"kern",size:-1*Hl},U6=new Set(["|","\\lvert","\\rvert","\\vert"]),q6=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),ef=function(t,n,r,s,a,i){var o,l,c,d,f="",m=0;o=c=d=t,l=null;var p="Size1-Regular";t==="\\uparrow"?c=d="⏐":t==="\\Uparrow"?c=d="‖":t==="\\downarrow"?o=c="⏐":t==="\\Downarrow"?o=c="‖":t==="\\updownarrow"?(o="\\uparrow",c="⏐",d="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",c="‖",d="\\Downarrow"):U6.has(t)?(c="∣",f="vert",m=333):q6.has(t)?(c="∥",f="doublevert",m=556):t==="["||t==="\\lbrack"?(o="⎡",c="⎢",d="⎣",p="Size4-Regular",f="lbrack",m=667):t==="]"||t==="\\rbrack"?(o="⎤",c="⎥",d="⎦",p="Size4-Regular",f="rbrack",m=667):t==="\\lfloor"||t==="⌊"?(c=o="⎢",d="⎣",p="Size4-Regular",f="lfloor",m=667):t==="\\lceil"||t==="⌈"?(o="⎡",c=d="⎢",p="Size4-Regular",f="lceil",m=667):t==="\\rfloor"||t==="⌋"?(c=o="⎥",d="⎦",p="Size4-Regular",f="rfloor",m=667):t==="\\rceil"||t==="⌉"?(o="⎤",c=d="⎥",p="Size4-Regular",f="rceil",m=667):t==="("||t==="\\lparen"?(o="⎛",c="⎜",d="⎝",p="Size4-Regular",f="lparen",m=875):t===")"||t==="\\rparen"?(o="⎞",c="⎟",d="⎠",p="Size4-Regular",f="rparen",m=875):t==="\\{"||t==="\\lbrace"?(o="⎧",l="⎨",d="⎩",c="⎪",p="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="⎫",l="⎬",d="⎭",c="⎪",p="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(o="⎧",d="⎩",c="⎪",p="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(o="⎫",d="⎭",c="⎪",p="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(o="⎧",d="⎭",c="⎪",p="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(o="⎫",d="⎩",c="⎪",p="Size4-Regular");var w=la(o,p,a),y=w.height+w.depth,x=la(c,p,a),_=x.height+x.depth,$=la(d,p,a),z=$.height+$.depth,C=0,S=1;if(l!==null){var E=la(l,p,a);C=E.height+E.depth,S=2}var F=y+z+C,N=Math.max(0,Math.ceil((n-F)/(S*_))),G=F+N*S*_,P=s.fontMetrics().axisHeight;r&&(P*=s.sizeMultiplier);var j=G/2-P,q=[];if(f.length>0){var Y=G-y-z,te=Math.round(G*1e3),he=G5(f,Math.round(Y*1e3)),Se=new Vr(f,he),re=ce(m/1e3),ne=ce(te/1e3),Re=new gr([Se],{width:re,height:ne,viewBox:"0 0 "+m+" "+te}),se=Gr([],[Re],s);se.height=te/1e3,se.style.width=re,se.style.height=ne,q.push({type:"elem",elem:se})}else{if(q.push(Vo(d,p,a)),q.push(li),l===null){var Le=G-y-z+2*Hl;q.push(Go(c,Le,s))}else{var Ye=(G-y-z-C)/2+2*Hl;q.push(Go(c,Ye,s)),q.push(li),q.push(Vo(l,p,a)),q.push(li),q.push(Go(c,Ye,s))}q.push(li),q.push(Vo(o,p,a))}var nt=s.havingBaseStyle(Ue.TEXT),Mt=at({positionType:"bottom",positionData:j,children:q});return $0(ee(["delimsizing","mult"],[Mt],nt),Ue.TEXT,s,i)},Zo=80,jo=.08,Ko=function(t,n,r,s,a){var i=H5(t,s,r),o=new Vr(t,i),l=new gr([o],{width:"400em",height:ce(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Gr(["hide-tail"],[l],a)},H6=function(t,n){var r=n.havingBaseSizing(),s=af("\\surd",t*r.sizeMultiplier,sf,r),a=r.sizeMultiplier,i=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),o,l,c,d,f;return s.type==="small"?(d=1e3+1e3*i+Zo,t<1?a=1:t<1.4&&(a=.7),l=(1+i+jo)/a,c=(1+i)/a,o=Ko("sqrtMain",l,d,i,n),o.style.minWidth="0.853em",f=.833/a):s.type==="large"?(d=(1e3+Zo)*ma[s.size],c=(ma[s.size]+i)/a,l=(ma[s.size]+i+jo)/a,o=Ko("sqrtSize"+s.size,l,d,i,n),o.style.minWidth="1.02em",f=1/a):(l=t+i+jo,c=t+i,d=Math.floor(1e3*t+i)+Zo,o=Ko("sqrtTall",l,d,i,n),o.style.minWidth="0.742em",f=1.056),o.height=c,o.style.height=ce(l),{span:o,advanceWidth:f,ruleWidth:(n.fontMetrics().sqrtRuleThickness+i)*a}},tf=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),V6=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),nf=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),ma=[0,1.2,1.8,2.4,3],rf=function(t,n,r,s,a){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),tf.has(t)||nf.has(t))return Xp(t,n,!1,r,s,a);if(V6.has(t))return ef(t,ma[n],!1,r,s,a);throw new ae("Illegal delimiter: '"+t+"'")},G6=[{type:"small",style:Ue.SCRIPTSCRIPT},{type:"small",style:Ue.SCRIPT},{type:"small",style:Ue.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Z6=[{type:"small",style:Ue.SCRIPTSCRIPT},{type:"small",style:Ue.SCRIPT},{type:"small",style:Ue.TEXT},{type:"stack"}],sf=[{type:"small",style:Ue.SCRIPTSCRIPT},{type:"small",style:Ue.SCRIPT},{type:"small",style:Ue.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],j6=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var n=t.type;throw new Error("Add support for delim type '"+n+"' here.")},af=function(t,n,r,s){for(var a=Math.min(2,3-s.style.size),i=a;i<r.length;i++){var o=r[i];if(o.type==="stack")break;var l=la(t,j6(o),"math"),c=l.height+l.depth;if(o.type==="small"){var d=s.havingBaseStyle(o.style);c*=d.sizeMultiplier}if(c>n)return o}return r[r.length-1]},Vl=function(t,n,r,s,a,i){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var o;nf.has(t)?o=G6:tf.has(t)?o=sf:o=Z6;var l=af(t,n,o,s);return l.type==="small"?L6(t,l.style,r,s,a,i):l.type==="large"?Xp(t,l.size,r,s,a,i):ef(t,n,r,s,a,i)},Wo=function(t,n,r,s,a,i){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,c=5/s.fontMetrics().ptPerEm,d=Math.max(n-o,r+o),f=Math.max(d/500*l,2*d-c);return Vl(t,f,!0,s,a,i)},Su={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},K6=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function _u(e){return"isMiddle"in e}function io(e,t){var n=so(e);if(n&&K6.has(n.text))return n;throw n?new ae("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new ae("Invalid delimiter type '"+e.type+"'",e)}ge({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],numArgs:1,argTypes:["primitive"],handler:(e,t)=>{var n=io(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Su[e.funcName].size,mclass:Su[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?ee([e.mclass]):rf(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Nn(e.delim,e.mode));var n=new ie("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=ce(ma[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function Eu(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ge({type:"leftright-right",names:["\\right"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new ae("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:io(t[0],e).text,color:n}}});ge({type:"leftright",names:["\\left"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=io(t[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Ge(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Eu(e);for(var n=Kt(e.body,t,!0,["mopen","mclose"]),r=0,s=0,a=!1,i=0;i<n.length;i++){var o=n[i];_u(o)?a=!0:(r=Math.max(n[i].height,r),s=Math.max(n[i].depth,s))}r*=t.sizeMultiplier,s*=t.sizeMultiplier;var l;if(e.left==="."?l=Ta(t,["mopen"]):l=Wo(e.left,r,s,t,e.mode,["mopen"]),n.unshift(l),a)for(var c=1;c<n.length;c++){var d=n[c];if(_u(d)){var f=d.isMiddle;n[c]=Wo(f.delim,r,s,f.options,e.mode,[])}}var m;if(e.right===".")m=Ta(t,["mclose"]);else{var p=e.rightColor?t.withColor(e.rightColor):t;m=Wo(e.right,r,s,p,e.mode,["mclose"])}return n.push(m),ee(["minner"],n,t)},mathmlBuilder:(e,t)=>{Eu(e);var n=An(e.body,t);if(e.left!=="."){var r=new ie("mo",[Nn(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var s=new ie("mo",[Nn(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),n.push(s)}return z0(n)}});ge({type:"middle",names:["\\middle"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=io(t[0],e);if(!e.parser.leftrightDepth)throw new ae("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim==="."?n=Ta(t,[]):(n=rf(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?Nn("|","text"):Nn(e.delim,e.mode),r=new ie("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var W6=(e,t)=>{var n=Ls(it(e.body,t),t),r=e.label.slice(1),s=t.sizeMultiplier,a,i,o=wr(e.body);if(r==="sout")a=ee(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/s,i=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=Tt({number:.6,unit:"pt"},t),c=Tt({number:.35,unit:"ex"},t),d=t.havingBaseSizing();s=s/d.sizeMultiplier;var f=n.height+n.depth+l+c;n.style.paddingLeft=ce(f/2+l);var m=Math.floor(1e3*f*s),p=U5(m),w=new gr([new Vr("phase",p)],{width:"400em",height:ce(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});a=Gr(["hide-tail"],[w],t),a.style.height=ce(f),i=n.depth+l+c}else{/cancel/.test(r)?o||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var y,x,_=0;/box/.test(r)?(_=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),y=t.fontMetrics().fboxsep+(r==="colorbox"?0:_),x=y):r==="angl"?(_=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),y=4*_,x=Math.max(0,.25-n.depth)):(y=o?.2:0,x=y),a=_6(n,r,y,x,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=ce(_)):r==="angl"&&_!==.049&&(a.style.borderTopWidth=ce(_),a.style.borderRightWidth=ce(_)),i=n.depth+x,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var $;if(e.backgroundColor)$=at({positionType:"individualShift",children:[{type:"elem",elem:a,shift:i},{type:"elem",elem:n,shift:0}]});else{var z=/cancel|phase/.test(r)?["svg-align"]:[];$=at({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:a,shift:i,wrapperClasses:z}]})}return/cancel/.test(r)&&($.height=n.height,$.depth=n.depth),/cancel/.test(r)&&!o?ee(["mord","cancel-lap"],[$],t):ee(["mord"],[$],t)},Q6=(e,t)=>{var n,r=new ie(e.label.includes("colorbox")?"mpadded":"menclose",[gt(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+ce(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};ge({type:"enclose",names:["\\colorbox"],numArgs:2,allowedInText:!0,argTypes:["color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,a=Ge(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,body:i}},htmlBuilder:W6,mathmlBuilder:Q6});ge({type:"enclose",names:["\\fcolorbox"],numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,a=Ge(t[0],"color-token").color,i=Ge(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,borderColor:a,body:o}}});ge({type:"enclose",names:["\\fbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});ge({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});ge({type:"enclose",names:["\\sout"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e;n.mode==="math"&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});ge({type:"enclose",names:["\\angl"],numArgs:1,argTypes:["hbox"],allowedInText:!1,handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var of={};function tr(e){for(var{type:t,names:n,props:r,handler:s,htmlBuilder:a,mathmlBuilder:i}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},l=0;l<n.length;++l)of[n[l]]=o;a&&(Ea[t]=a),i&&(Aa[t]=i)}var lf={};function b(e,t){lf[e]=t}class mn{constructor(t,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=r}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new mn(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class xn{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new xn(n,mn.range(this,t))}}function Au(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n==="\\relax"&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n==="\\hline"||n==="\\hdashline";)e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var oo=e=>{var t=e.parser.settings;if(!t.displayMode)throw new ae("{"+e.envName+"} can be used only in display mode.")},J6=new Set(["gather","gather*"]);function P0(e){if(!e.includes("ed"))return!e.includes("*")}function Wr(e,t,n){var{hskipBeforeAndAfter:r,addJot:s,cols:a,arraystretch:i,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:f,leqno:m}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!i){var p=e.gullet.expandMacroAsText("\\arraystretch");if(p==null)i=1;else if(i=parseFloat(p),!i||i<0)throw new ae("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var w=[],y=[w],x=[],_=[],$=l!=null?[]:void 0;function z(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){$&&(e.gullet.macros.get("\\df@tag")?($.push(e.subparse([new xn("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):$.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(z(),_.push(Au(e));;){var S=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var E={type:"ordgroup",mode:e.mode,body:S};n&&(E={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[E]}),w.push(E);var F=e.fetch().text;if(F==="&"){if(f&&w.length===f){if(c||o)throw new ae("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(F==="\\end"){C(),w.length===1&&E.type==="styling"&&E.body.length===1&&E.body[0].type==="ordgroup"&&E.body[0].body.length===0&&(y.length>1||!d)&&y.pop(),_.length<y.length+1&&_.push([]);break}else if(F==="\\\\"){e.consume();var N=void 0;e.gullet.future().text!==" "&&(N=e.parseSizeGroup(!0)),x.push(N?N.value:null),C(),_.push(Au(e)),w=[],y.push(w),z()}else throw new ae("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:i,body:y,cols:a,rowGaps:x,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:o,tags:$,leqno:m}}function B0(e){return e.slice(0,1)==="d"?"display":"text"}var nr=function(t,n){var r,s,a=t.body.length,i=t.hLinesBeforeRow,o=0,l=new Array(a),c=[],d=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),f=1/n.fontMetrics().ptPerEm,m=5*f;if(t.colSeparationType&&t.colSeparationType==="small"){var p=n.havingStyle(Ue.SCRIPT).sizeMultiplier;m=.2778*(p/n.sizeMultiplier)}var w=t.colSeparationType==="CD"?Tt({number:3,unit:"ex"},n):12*f,y=3*f,x=t.arraystretch*w,_=.7*x,$=.3*x,z=0;function C(L){for(var U=0;U<L.length;++U)U>0&&(z+=.25),c.push({pos:z,isDashed:L[U]})}for(C(i[0]),r=0;r<t.body.length;++r){var S=t.body[r],E=_,F=$;o<S.length&&(o=S.length);var N={cells:new Array(S.length),height:0,depth:0,pos:0};for(s=0;s<S.length;++s){var G=it(S[s],n);F<G.depth&&(F=G.depth),E<G.height&&(E=G.height),N.cells[s]=G}var P=t.rowGaps[r],j=0;P&&(j=Tt(P,n),j>0&&(j+=$,F<j&&(F=j),j=0)),t.addJot&&r<t.body.length-1&&(F+=y),N.height=E,N.depth=F,z+=E,N.pos=z,z+=F+j,l[r]=N,C(i[r+1])}var q=z/2+n.fontMetrics().axisHeight,Y=t.cols||[],te=[],he,Se,re=[];if(t.tags&&t.tags.some(L=>L))for(r=0;r<a;++r){var ne=l[r],Re=ne.pos-q,se=t.tags[r],Le=void 0;se===!0?Le=ee(["eqn-num"],[],n):se===!1?Le=ee([],[],n):Le=ee([],Kt(se,n,!0),n),Le.depth=ne.depth,Le.height=ne.height,re.push({type:"elem",elem:Le,shift:Re})}for(s=0,Se=0;s<o||Se<Y.length;++s,++Se){for(var Ye,nt=Y[Se],Mt=!0;((Xe=nt)==null?void 0:Xe.type)==="separator";){var Xe;if(Mt||(he=ee(["arraycolsep"],[]),he.style.width=ce(n.fontMetrics().doubleRuleSep),te.push(he)),nt.separator==="|"||nt.separator===":"){var tt=nt.separator==="|"?"solid":"dashed",O=ee(["vertical-separator"],[],n);O.style.height=ce(z),O.style.borderRightWidth=ce(d),O.style.borderRightStyle=tt,O.style.margin="0 "+ce(-d/2);var oe=z-q;oe&&(O.style.verticalAlign=ce(-oe)),te.push(O)}else throw new ae("Invalid separator type: "+nt.separator);Se++,nt=Y[Se],Mt=!1}if(!(s>=o)){var K=void 0;if(s>0||t.hskipBeforeAndAfter){var ue,Ee;K=(ue=(Ee=nt)==null?void 0:Ee.pregap)!=null?ue:m,K!==0&&(he=ee(["arraycolsep"],[]),he.style.width=ce(K),te.push(he))}var Fe=[];for(r=0;r<a;++r){var ze=l[r],_e=ze.cells[s];if(_e){var pt=ze.pos-q;_e.depth=ze.depth,_e.height=ze.height,Fe.push({type:"elem",elem:_e,shift:pt})}}var je=at({positionType:"individualShift",children:Fe}),kt=ee(["col-align-"+(((Ye=nt)==null?void 0:Ye.align)||"c")],[je]);if(te.push(kt),s<o-1||t.hskipBeforeAndAfter){var pn,qn;K=(pn=(qn=nt)==null?void 0:qn.postgap)!=null?pn:m,K!==0&&(he=ee(["arraycolsep"],[]),he.style.width=ce(K),te.push(he))}}}var sr=ee(["mtable"],te);if(c.length>0){for(var Qs=Bs("hline",n,d),Js=Bs("hdashline",n,d),Sr=[{type:"elem",elem:sr,shift:0}];c.length>0;){var Tn=c.pop(),Yr=Tn.pos-q;Tn.isDashed?Sr.push({type:"elem",elem:Js,shift:Yr}):Sr.push({type:"elem",elem:Qs,shift:Yr})}sr=at({positionType:"individualShift",children:Sr})}if(re.length===0)return ee(["mord"],[sr],n);var Hn=at({positionType:"individualShift",children:re}),H=ee(["tag"],[Hn],n);return xr([sr,H])},Y6={c:"center ",l:"left ",r:"right "},rr=function(t,n){for(var r=[],s=new ie("mtd",[],["mtr-glue"]),a=new ie("mtd",[],["mml-eqn-num"]),i=0;i<t.body.length;i++){for(var o=t.body[i],l=[],c=0;c<o.length;c++)l.push(new ie("mtd",[gt(o[c],n)]));t.tags&&t.tags[i]&&(l.unshift(s),l.push(s),t.leqno?l.unshift(a):l.push(a)),r.push(new ie("mtr",l))}var d=new ie("mtable",r),f=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);d.setAttribute("rowspacing",ce(f));var m="",p="";if(t.cols&&t.cols.length>0){var w=t.cols,y="",x=!1,_=0,$=w.length;w[0].type==="separator"&&(m+="top ",_=1),w[w.length-1].type==="separator"&&(m+="bottom ",$-=1);for(var z=_;z<$;z++){var C=w[z];C.type==="align"?(p+=Y6[C.align],x&&(y+="none "),x=!0):C.type==="separator"&&x&&(y+=C.separator==="|"?"solid ":"dashed ",x=!1)}d.setAttribute("columnalign",p.trim()),/[sd]/.test(y)&&d.setAttribute("columnlines",y.trim())}if(t.colSeparationType==="align"){for(var S=t.cols||[],E="",F=1;F<S.length;F++)E+=F%2?"0em ":"1em ";d.setAttribute("columnspacing",E.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var N="",G=t.hLinesBeforeRow;m+=G[0].length>0?"left ":"",m+=G[G.length-1].length>0?"right ":"";for(var P=1;P<G.length-1;P++)N+=G[P].length===0?"none ":G[P][0]?"dashed ":"solid ";return/[sd]/.test(N)&&d.setAttribute("rowlines",N.trim()),m!==""&&(d=new ie("menclose",[d]),d.setAttribute("notation",m.trim())),t.arraystretch&&t.arraystretch<1&&(d=new ie("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},cf=function(t,n){t.envName.includes("ed")||oo(t);var r=[],s=t.envName==="split",a=Wr(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:P0(t.envName),emptySingleRow:!0,colSeparationType:t.envName.includes("at")?"alignat":"align",maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),i=0,o=0,l={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var c="",d=0;d<n[0].body.length;d++){var f=Ge(n[0].body[d],"textord");c+=f.text}i=Number(c),o=i*2}var m=!o;a.body.forEach(function(x){for(var _=1;_<x.length;_+=2){var $=Ge(x[_],"styling"),z=Ge($.body[0],"ordgroup");z.body.unshift(l)}if(m)o<x.length&&(o=x.length);else{var C=x.length/2;if(i<C)throw new ae("Too many math in a row: "+("expected "+i+", but got "+C),x[0])}});for(var p=0;p<o;++p){var w="r",y=0;p%2===1?w="l":p>0&&m&&(y=1),r[p]={type:"align",align:w,pregap:y,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};tr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=so(t[0]),r=n?[t[0]]:Ge(t[0],"ordgroup").body,s=r.map(function(i){var o=ro(i),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new ae("Unknown column alignment: "+l,i)}),a={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Wr(e.parser,a,B0(e.envName))},htmlBuilder:nr,mathmlBuilder:rr});tr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),n=s.fetch().text,!"lcr".includes(n))throw new ae("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:n}]}}var a=Wr(e.parser,r,B0(e.envName)),i=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(i).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:nr,mathmlBuilder:rr});tr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=Wr(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:nr,mathmlBuilder:rr});tr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=so(t[0]),r=n?[t[0]]:Ge(t[0],"ordgroup").body,s=r.map(function(o){var l=ro(o),c=l.text;if("lc".includes(c))return{type:"align",align:c};throw new ae("Unknown column alignment: "+c,o)});if(s.length>1)throw new ae("{subarray} can contain only one column");var a={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},i=Wr(e.parser,a,"script");if(i.body.length>0&&i.body[0].length>1)throw new ae("{subarray} can contain only one column");return i},htmlBuilder:nr,mathmlBuilder:rr});tr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=Wr(e.parser,t,B0(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:nr,mathmlBuilder:rr});tr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:cf,htmlBuilder:nr,mathmlBuilder:rr});tr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){J6.has(e.envName)&&oo(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:P0(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Wr(e.parser,t,"display")},htmlBuilder:nr,mathmlBuilder:rr});tr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:cf,htmlBuilder:nr,mathmlBuilder:rr});tr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){oo(e);var t={autoTag:P0(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Wr(e.parser,t,"display")},htmlBuilder:nr,mathmlBuilder:rr});tr({type:"array",names:["CD"],props:{numArgs:0},handler(e){return oo(e),D6(e.parser)},htmlBuilder:nr,mathmlBuilder:rr});b("\\nonumber","\\gdef\\@eqnsw{0}");b("\\notag","\\nonumber");ge({type:"text",names:["\\hline","\\hdashline"],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new ae(e.funcName+" valid only within array environment")}});var Tu=of;ge({type:"environment",names:["\\begin","\\end"],numArgs:1,argTypes:["text"],handler(e,t){var{parser:n,funcName:r}=e,s=t[0];if(s.type!=="ordgroup")throw new ae("Invalid environment name",s);for(var a="",i=0;i<s.body.length;++i)a+=Ge(s.body[i],"textord").text;if(r==="\\begin"){if(!Tu.hasOwnProperty(a))throw new ae("No such environment: "+a,s);var o=Tu[a],{args:l,optArgs:c}=n.parseArguments("\\begin{"+a+"}",o),d={mode:n.mode,envName:a,parser:n},f=o.handler(d,l,c);n.expect("\\end",!1);var m=n.nextToken,p=Ge(n.parseFunction(),"environment");if(p.name!==a)throw new ae("Mismatch: \\begin{"+a+"} matched by \\end{"+p.name+"}",m);return f}return{type:"environment",mode:n.mode,name:a,nameGroup:s}}});var X6=(e,t)=>{var n=e.font,r=t.withFont(n);return it(e.body,r)},ey=(e,t)=>{var n=e.font,r=t.withFont(n);return gt(e.body,r)},Cu={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};ge({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=Bi(t[0]),a=r in Cu?Cu[r]:r;return{type:"font",mode:n.mode,font:a.slice(1),body:s}},htmlBuilder:X6,mathmlBuilder:ey});ge({type:"mclass",names:["\\boldsymbol","\\bm"],numArgs:1,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"mclass",mode:n.mode,mclass:ao(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:wr(r)}}});ge({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],numArgs:0,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:s}=e,{mode:a}=n,i=n.parseExpression(!0,s);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:i}}}});var ty=(e,t)=>{var n=t.style,r=n.fracNum(),s=n.fracDen(),a;a=t.havingStyle(r);var i=it(e.numer,a,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;i.height=i.height<o?o:i.height,i.depth=i.depth<l?l:i.depth}a=t.havingStyle(s);var c=it(e.denom,a,t),d,f,m;e.hasBarLine?(e.barSize?(f=Tt(e.barSize,t),d=Bs("frac-line",t,f)):d=Bs("frac-line",t),f=d.height,m=d.height):(d=null,f=0,m=t.fontMetrics().defaultRuleThickness);var p,w,y;n.size===Ue.DISPLAY.size?(p=t.fontMetrics().num1,f>0?w=3*m:w=7*m,y=t.fontMetrics().denom1):(f>0?(p=t.fontMetrics().num2,w=m):(p=t.fontMetrics().num3,w=3*m),y=t.fontMetrics().denom2);var x;if(d){var $=t.fontMetrics().axisHeight;p-i.depth-($+.5*f)<w&&(p+=w-(p-i.depth-($+.5*f))),$-.5*f-(c.height-y)<w&&(y+=w-($-.5*f-(c.height-y)));var z=-($-.5*f);x=at({positionType:"individualShift",children:[{type:"elem",elem:c,shift:y},{type:"elem",elem:d,shift:z},{type:"elem",elem:i,shift:-p}]})}else{var _=p-i.depth-(c.height-y);_<w&&(p+=.5*(w-_),y+=.5*(w-_)),x=at({positionType:"individualShift",children:[{type:"elem",elem:c,shift:y},{type:"elem",elem:i,shift:-p}]})}a=t.havingStyle(n),x.height*=a.sizeMultiplier/t.sizeMultiplier,x.depth*=a.sizeMultiplier/t.sizeMultiplier;var C;n.size===Ue.DISPLAY.size?C=t.fontMetrics().delim1:n.size===Ue.SCRIPTSCRIPT.size?C=t.havingStyle(Ue.SCRIPT).fontMetrics().delim2:C=t.fontMetrics().delim2;var S,E;return e.leftDelim==null?S=Ta(t,["mopen"]):S=Vl(e.leftDelim,C,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?E=ee([]):e.rightDelim==null?E=Ta(t,["mclose"]):E=Vl(e.rightDelim,C,!0,t.havingStyle(n),e.mode,["mclose"]),ee(["mord"].concat(a.sizingClasses(t)),[S,ee(["mfrac"],[x]),E],t)},ny=(e,t)=>{var n=new ie("mfrac",[gt(e.numer,t),gt(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=Tt(e.barSize,t);n.setAttribute("linethickness",ce(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var a=new ie("mo",[new Ft(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(n),e.rightDelim!=null){var i=new ie("mo",[new Ft(e.rightDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}return z0(s)}return n},uf=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};ge({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0],a=t[1],i,o=null,l=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,o="(",l=")";break;case"\\\\bracefrac":i=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var c=r==="\\cfrac",d=null;return c||r.startsWith("\\d")?d="display":r.startsWith("\\t")&&(d="text"),uf({type:"genfrac",mode:n.mode,numer:s,denom:a,continued:c,hasBarLine:i,leftDelim:o,rightDelim:l,barSize:null},d)},htmlBuilder:ty,mathmlBuilder:ny});ge({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],numArgs:0,infix:!0,handler(e){var{parser:t,funcName:n,token:r}=e,s;switch(n){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:s,token:r}}});var Ru=["display","text","script","scriptscript"],Ou=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};ge({type:"genfrac",names:["\\genfrac"],numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"],handler(e,t){var{parser:n}=e,r=t[4],s=t[5],a=Bi(t[0]),i=a.type==="atom"&&a.family==="open"?Ou(a.text):null,o=Bi(t[1]),l=o.type==="atom"&&o.family==="close"?Ou(o.text):null,c=Ge(t[2],"size"),d,f=null;c.isBlank?d=!0:(f=c.value,d=f.number>0);var m=null,p=t[3];if(p.type==="ordgroup"){if(p.body.length>0){var w=Ge(p.body[0],"textord");m=Ru[Number(w.text)]}}else p=Ge(p,"textord"),m=Ru[Number(p.text)];return uf({type:"genfrac",mode:n.mode,numer:r,denom:s,continued:!1,hasBarLine:d,barSize:f,leftDelim:i,rightDelim:l},m)}});ge({type:"infix",names:["\\above"],numArgs:1,argTypes:["size"],infix:!0,handler(e,t){var{parser:n,funcName:r,token:s}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ge(t[0],"size").value,token:s}}});ge({type:"genfrac",names:["\\\\abovefrac"],numArgs:3,argTypes:["math","size","math"],handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0],a=Ge(t[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var i=t[2],o=a.number>0;return{type:"genfrac",mode:n.mode,numer:s,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null}}});var df=(e,t)=>{var n=t.style,r,s;e.type==="supsub"?(r=e.sup?it(e.sup,t.havingStyle(n.sup()),t):it(e.sub,t.havingStyle(n.sub()),t),s=Ge(e.base,"horizBrace")):s=Ge(e,"horizBrace");var a=it(s.base,t.havingBaseStyle(Ue.DISPLAY)),i=no(s,t),o;if(s.isOver?o=at({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:i,wrapperClasses:["svg-align"]}]}):o=at({positionType:"bottom",positionData:a.depth+.1+i.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),r){var l=ee(["minner",s.isOver?"mover":"munder"],[o],t);s.isOver?o=at({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=at({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return ee(["minner",s.isOver?"mover":"munder"],[o],t)},ry=(e,t)=>{var n=to(e.label);return new ie(e.isOver?"mover":"munder",[gt(e.base,t),n])};ge({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:r.includes("\\over"),base:t[0]}},htmlBuilder:df,mathmlBuilder:ry});ge({type:"href",names:["\\href"],numArgs:2,argTypes:["url","original"],allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=t[1],s=Ge(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:n.mode,href:s,body:Lt(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Kt(e.body,t,!1);return o6(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Zr(e.body,t);return n instanceof ie||(n=new ie("mrow",[n])),n.setAttribute("href",e.href),n}});ge({type:"href",names:["\\url"],numArgs:1,argTypes:["url"],allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=Ge(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var s=[],a=0;a<r.length;a++){var i=r[a];i==="~"&&(i="\\textasciitilde"),s.push({type:"textord",mode:"text",text:i})}var o={type:"text",mode:n.mode,font:"\\texttt",body:s};return{type:"href",mode:n.mode,href:r,body:Lt(o)}}});ge({type:"hbox",names:["\\hbox"],numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0,handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:Lt(t[0])}},htmlBuilder(e,t){var n=Kt(e.body,t.withFont(""),!1);return xr(n)},mathmlBuilder(e,t){return new ie("mrow",An(e.body,t.withFont("")))}});ge({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],numArgs:2,argTypes:["raw","original"],allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,token:s}=e,a=Ge(t[0],"raw").string,i=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(r){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var c=a.split(","),d=0;d<c.length;d++){var f=c[d],m=f.indexOf("=");if(m<0)throw new ae("\\htmlData key/value '"+f+"' missing equals sign");var p=f.slice(0,m),w=f.slice(m+1);l["data-"+p.trim()]=w}o={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(o)?{type:"html",mode:n.mode,attributes:l,body:Lt(i)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=Kt(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=ee(r,n,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&s.setAttribute(a,e.attributes[a]);return s},mathmlBuilder:(e,t)=>Zr(e.body,t)});ge({type:"htmlmathml",names:["\\html@mathml"],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Lt(t[0]),mathml:Lt(t[1])}},htmlBuilder:(e,t)=>{var n=Kt(e.html,t,!1);return xr(n)},mathmlBuilder:(e,t)=>Zr(e.mathml,t)});var Qo=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new ae("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!Mp(r))throw new ae("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ge({type:"includegraphics",names:["\\includegraphics"],numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1,handler:(e,t,n)=>{var{parser:r}=e,s={number:0,unit:"em"},a={number:.9,unit:"em"},i={number:0,unit:"em"},o="";if(n[0])for(var l=Ge(n[0],"raw").string,c=l.split(","),d=0;d<c.length;d++){var f=c[d].split("=");if(f.length===2){var m=f[1].trim();switch(f[0].trim()){case"alt":o=m;break;case"width":s=Qo(m);break;case"height":a=Qo(m);break;case"totalheight":i=Qo(m);break;default:throw new ae("Invalid key: '"+f[0]+"' in \\includegraphics.")}}}var p=Ge(t[0],"url").url;return o===""&&(o=p,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:r.mode,alt:o,width:s,height:a,totalheight:i,src:p}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=Tt(e.height,t),r=0;e.totalheight.number>0&&(r=Tt(e.totalheight,t)-n);var s=0;e.width.number>0&&(s=Tt(e.width,t));var a={height:ce(n+r)};s>0&&(a.width=ce(s)),r>0&&(a.verticalAlign=ce(-r));var i=new W5(e.src,e.alt,a);return i.height=n,i.depth=r,i},mathmlBuilder:(e,t)=>{var n=new ie("mglyph",[]);n.setAttribute("alt",e.alt);var r=Tt(e.height,t),s=0;if(e.totalheight.number>0&&(s=Tt(e.totalheight,t)-r,n.setAttribute("valign",ce(-s))),n.setAttribute("height",ce(r+s)),e.width.number>0){var a=Tt(e.width,t);n.setAttribute("width",ce(a))}return n.setAttribute("src",e.src),n}});ge({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=Ge(t[0],"size");if(n.settings.strict){var a=r[1]==="m",i=s.value.unit==="mu";a?(i||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):i&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:s.value}},htmlBuilder(e,t){return Lp(e.dimension,t)},mathmlBuilder(e,t){var n=Tt(e.dimension,t);return new Gp(n)}});ge({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=ee([],[it(e.body,t)]),n=ee(["inner"],[n],t)):n=ee(["inner"],[it(e.body,t)]);var r=ee(["fix"],[]),s=ee([e.alignment],[n,r],t),a=ee(["strut"]);return a.style.height=ce(s.height+s.depth),s.depth&&(a.style.verticalAlign=ce(-s.depth)),s.children.unshift(a),s=ee(["thinbox"],[s],t),ee(["mord","vbox"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ie("mpadded",[gt(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});ge({type:"styling",names:["\\(","$"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var{funcName:n,parser:r}=e,s=r.mode;r.switchMode("math");var a=n==="\\("?"\\)":"$",i=r.parseExpression(!1,a);return r.expect(a),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:i}}});ge({type:"text",names:["\\)","\\]"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new ae("Mismatched "+e.funcName)}});var Iu=(e,t)=>{switch(t.style.size){case Ue.DISPLAY.size:return e.display;case Ue.TEXT.size:return e.text;case Ue.SCRIPT.size:return e.script;case Ue.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ge({type:"mathchoice",names:["\\mathchoice"],numArgs:4,primitive:!0,handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Lt(t[0]),text:Lt(t[1]),script:Lt(t[2]),scriptscript:Lt(t[3])}},htmlBuilder:(e,t)=>{var n=Iu(e,t),r=Kt(n,t,!1);return xr(r)},mathmlBuilder:(e,t)=>{var n=Iu(e,t);return Zr(n,t)}});var hf=(e,t,n,r,s,a,i)=>{e=ee([],[e]);var o=n&&wr(n),l,c;if(t){var d=it(t,r.havingStyle(s.sup()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var f=it(n,r.havingStyle(s.sub()),r);l={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var m;if(c&&l){var p=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+i;m=at({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ce(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ce(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var w=e.height-i;m=at({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ce(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(c){var y=e.depth+i;m=at({positionType:"bottom",positionData:y,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ce(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var x=[m];if(l&&a!==0&&!o){var _=ee(["mspace"],[],r);_.style.marginRight=ce(a),x.unshift(_)}return ee(["mop","op-limits"],x,r)},pf=new Set(["\\smallint"]),ff=(e,t)=>{var n,r,s=!1,a;e.type==="supsub"?(n=e.sup,r=e.sub,a=Ge(e.base,"op"),s=!0):a=Ge(e,"op");var i=t.style,o=!1;i.size===Ue.DISPLAY.size&&a.symbol&&!pf.has(a.name)&&(o=!0);var l,c;if(a.symbol){var d=o?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),l=ln(a.name,d,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),c=l.italic,f.length>0){var m=Up(f+"Size"+(o?"2":"1"),t);l=at({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:m,shift:o?.08:0}]}),a.name="\\"+f,l.classes.unshift("mop"),l.italic=c}}else if(a.body){var p=Kt(a.body,t,!0);p.length===1&&p[0]instanceof _n?(l=p[0],l.classes[0]="mop"):l=ee(["mop"],p,t)}else{for(var w=[],y=1;y<a.name.length;y++)w.push(N0(a.name[y],a.mode,t));l=ee(["mop"],w,t)}var x=0,_=0;if((l instanceof _n||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift){var $;x=(l.height-l.depth)/2-t.fontMetrics().axisHeight,_=($=l.italic)!=null?$:0}return s?hf(l,n,r,t,i,_,x):(x&&(l.style.position="relative",l.style.top=ce(x)),l)},sy=(e,t)=>{var n;if(e.symbol)n=new ie("mo",[Nn(e.name,e.mode)]),pf.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new ie("mo",An(e.body,t));else{n=new ie("mi",[new Ft(e.name.slice(1))]);var r=new ie("mo",[Nn("","text")]);e.parentIsSupSub?n=new ie("mrow",[n,r]):n=Vp([n,r])}return n},ay={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ge({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],numArgs:0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=r;return s.length===1&&(s=ay[s]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:ff,mathmlBuilder:sy});ge({type:"op",names:["\\mathop"],numArgs:1,primitive:!0,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Lt(r)}}});var iy={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ge({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}});ge({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}});ge({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],numArgs:0,allowedInArgument:!0,handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=iy[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}}});var mf=(e,t)=>{var n,r,s=!1,a;e.type==="supsub"?(n=e.sup,r=e.sub,a=Ge(e.base,"operatorname"),s=!0):a=Ge(e,"operatorname");var i;if(a.body.length>0){for(var o=a.body.map(f=>{var m="text"in f?f.text:void 0;return typeof m=="string"?{type:"textord",mode:f.mode,text:m}:f}),l=Kt(o,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof _n&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=ee(["mop"],l,t)}else i=ee(["mop"],[],t);return s?hf(i,n,r,t,t.style,0,0):i},oy=(e,t)=>{for(var n=An(e.body,t.withFont("mathrm")),r=!0,s=0;s<n.length;s++){var a=n[s];if(!(a instanceof Gp))if(a instanceof ie)switch(a.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var i=a.children[0];a.children.length===1&&i instanceof Ft?i.text=i.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var o=n.map(d=>d.toText()).join("");n=[new Ft(o)]}var l=new ie("mi",n);l.setAttribute("mathvariant","normal");var c=new ie("mo",[Nn("","text")]);return e.parentIsSupSub?new ie("mrow",[l,c]):Vp([l,c])};ge({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"operatorname",mode:n.mode,body:Lt(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:mf,mathmlBuilder:oy});b("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");gs({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?xr(Kt(e.body,t,!1)):ee(["mord"],Kt(e.body,t,!0),t)},mathmlBuilder(e,t){return Zr(e.body,t,!0)}});ge({type:"overline",names:["\\overline"],numArgs:1,handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=it(e.body,t.havingCrampedStyle()),r=Bs("overline-line",t),s=t.fontMetrics().defaultRuleThickness,a=at({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return ee(["mord","overline"],[a],t)},mathmlBuilder(e,t){var n=new ie("mo",[new Ft("‾")]);n.setAttribute("stretchy","true");var r=new ie("mover",[gt(e.body,t),n]);return r.setAttribute("accent","true"),r}});ge({type:"phantom",names:["\\phantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Lt(r)}},htmlBuilder:(e,t)=>{var n=Kt(e.body,t.withPhantom(),!1);return xr(n)},mathmlBuilder:(e,t)=>{var n=An(e.body,t);return new ie("mphantom",n)}});b("\\hphantom","\\smash{\\phantom{#1}}");ge({type:"vphantom",names:["\\vphantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=ee(["inner"],[it(e.body,t.withPhantom())]),r=ee(["fix"],[]);return ee(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=An(Lt(e.body),t),r=new ie("mphantom",n),s=new ie("mpadded",[r]);return s.setAttribute("width","0px"),s}});ge({type:"raisebox",names:["\\raisebox"],numArgs:2,argTypes:["size","hbox"],allowedInText:!0,handler(e,t){var{parser:n}=e,r=Ge(t[0],"size").value,s=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:s}},htmlBuilder(e,t){var n=it(e.body,t),r=Tt(e.dy,t);return at({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ie("mpadded",[gt(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});ge({type:"internal",names:["\\relax"],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});ge({type:"rule",names:["\\rule"],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"],handler(e,t,n){var{parser:r}=e,s=n[0],a=Ge(t[0],"size"),i=Ge(t[1],"size");return{type:"rule",mode:r.mode,shift:s&&Ge(s,"size").value,width:a.value,height:i.value}},htmlBuilder(e,t){var n=ee(["mord","rule"],[],t),r=Tt(e.width,t),s=Tt(e.height,t),a=e.shift?Tt(e.shift,t):0;return n.style.borderRightWidth=ce(r),n.style.borderTopWidth=ce(s),n.style.bottom=ce(a),n.width=r,n.height=s+a,n.depth=-a,n.maxFontSize=s*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Tt(e.width,t),r=Tt(e.height,t),s=e.shift?Tt(e.shift,t):0,a=t.color&&t.getColor()||"black",i=new ie("mspace");i.setAttribute("mathbackground",a),i.setAttribute("width",ce(n)),i.setAttribute("height",ce(r));var o=new ie("mpadded",[i]);return s>=0?o.setAttribute("height",ce(s)):(o.setAttribute("height",ce(s)),o.setAttribute("depth",ce(-s))),o.setAttribute("voffset",ce(s)),o}});function gf(e,t,n){for(var r=Kt(e,t,!1),s=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var i=r[a].classes.indexOf("sizing");i<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[i+1]==="reset-size"+t.size&&(r[a].classes[i+1]="reset-size"+n.size),r[a].height*=s,r[a].depth*=s}return xr(r)}var Nu=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],ly=(e,t)=>{var n=t.havingSize(e.size);return gf(e.body,n,t)};ge({type:"sizing",names:Nu,numArgs:0,allowedInText:!0,handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:s}=e,a=s.parseExpression(!1,n);return{type:"sizing",mode:s.mode,size:Nu.indexOf(r)+1,body:a}},htmlBuilder:ly,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=An(e.body,n),s=new ie("mstyle",r);return s.setAttribute("mathsize",ce(n.sizeMultiplier)),s}});ge({type:"smash",names:["\\smash"],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var{parser:r}=e,s=!1,a=!1,i=n[0]&&Ge(n[0],"ordgroup");if(i)for(var o,l=0;l<i.body.length;++l){var c=i.body[l];if(o=ro(c).text,o==="t")s=!0;else if(o==="b")a=!0;else{s=!1,a=!1;break}}else s=!0,a=!0;var d=t[0];return{type:"smash",mode:r.mode,body:d,smashHeight:s,smashDepth:a}},htmlBuilder:(e,t)=>{var n=ee([],[it(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return ee(["mord","smash"],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);var s=at({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return ee(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ie("mpadded",[gt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});ge({type:"sqrt",names:["\\sqrt"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r}=e,s=n[0],a=t[0];return{type:"sqrt",mode:r.mode,body:a,index:s}},htmlBuilder(e,t){var n=it(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Ls(n,t);var r=t.fontMetrics(),s=r.defaultRuleThickness,a=s;t.style.id<Ue.TEXT.id&&(a=t.fontMetrics().xHeight);var i=s+a/4,o=n.height+n.depth+i+s,{span:l,ruleWidth:c,advanceWidth:d}=H6(o,t),f=l.height-c;f>n.height+n.depth+i&&(i=(i+f-n.height-n.depth)/2);var m=l.height-n.height-i-c;n.style.paddingLeft=ce(d);var p=at({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+m)},{type:"elem",elem:l},{type:"kern",size:c}]});if(e.index){var w=t.havingStyle(Ue.SCRIPTSCRIPT),y=it(e.index,w,t),x=.6*(p.height-p.depth),_=at({positionType:"shift",positionData:-x,children:[{type:"elem",elem:y}]}),$=ee(["root"],[_]);return ee(["mord","sqrt"],[$,p],t)}else return ee(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new ie("mroot",[gt(n,t),gt(r,t)]):new ie("msqrt",[gt(n,t)])}});var Gl={display:Ue.DISPLAY,text:Ue.TEXT,script:Ue.SCRIPT,scriptscript:Ue.SCRIPTSCRIPT};function cy(e){return e in Gl}ge({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var{breakOnTokenText:n,funcName:r,parser:s}=e,a=s.parseExpression(!0,n),i=r.slice(1,r.length-5);if(!cy(i))throw new Error("Unknown style: "+i);return{type:"styling",mode:s.mode,style:i,body:a}},htmlBuilder(e,t){var n=Gl[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont("")),gf(e.body,r,t)},mathmlBuilder(e,t){var n=Gl[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(""));var s=An(e.body,r),a=new ie("mstyle",s),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=i[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});var uy=function(t,n){var r=t.base;if(r)if(r.type==="op"){var s=r.limits&&(n.style.size===Ue.DISPLAY.size||r.alwaysHandleSupSub);return s?ff:null}else if(r.type==="operatorname"){var a=r.alwaysHandleSupSub&&(n.style.size===Ue.DISPLAY.size||r.limits);return a?mf:null}else{if(r.type==="accent")return wr(r.base)?Wp:null;if(r.type==="horizBrace"){var i=!t.sub;return i===r.isOver?df:null}else return null}else return null};gs({type:"supsub",htmlBuilder(e,t){var n=uy(e,t);if(n)return n(e,t);var{base:r,sup:s,sub:a}=e,i=it(r,t),o,l,c=t.fontMetrics(),d=0,f=0,m=r&&wr(r);if(s){var p=t.havingStyle(t.style.sup());o=it(s,p,t),m||(d=i.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var w=t.havingStyle(t.style.sub());l=it(a,w,t),m||(f=i.depth+w.fontMetrics().subDrop*w.sizeMultiplier/t.sizeMultiplier)}var y;t.style===Ue.DISPLAY?y=c.sup1:t.style.cramped?y=c.sup3:y=c.sup2;var x=t.sizeMultiplier,_=ce(.5/c.ptPerEm/x),$=null;if(l){var z=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(i instanceof _n||z){var C;$=ce(-((C=i.italic)!=null?C:0))}}var S;if(o&&l){d=Math.max(d,y,o.depth+.25*c.xHeight),f=Math.max(f,c.sub2);var E=c.defaultRuleThickness,F=4*E;if(d-o.depth-(l.height-f)<F){f=F-(d-o.depth)+l.height;var N=.8*c.xHeight-(d-o.depth);N>0&&(d+=N,f-=N)}var G=[{type:"elem",elem:l,shift:f,marginRight:_,marginLeft:$},{type:"elem",elem:o,shift:-d,marginRight:_}];S=at({positionType:"individualShift",children:G})}else if(l){f=Math.max(f,c.sub1,l.height-.8*c.xHeight);var P=[{type:"elem",elem:l,marginLeft:$,marginRight:_}];S=at({positionType:"shift",positionData:f,children:P})}else if(o)d=Math.max(d,y,o.depth+.25*c.xHeight),S=at({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:_}]});else throw new Error("supsub must have either sup or sub.");var j=Fl(i,"right")||"mord";return ee([j],[i,ee(["msupsub"],[S])],t)},mathmlBuilder(e,t){var n=!1,r,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[gt(e.base,t)];e.sub&&a.push(gt(e.sub,t)),e.sup&&a.push(gt(e.sup,t));var i;if(n)i=r?"mover":"munder";else if(e.sub)if(e.sup){var c=e.base;c&&c.type==="op"&&c.limits&&t.style===Ue.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(t.style===Ue.DISPLAY||c.limits)?i="munderover":i="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===Ue.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Ue.DISPLAY)?i="munder":i="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===Ue.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===Ue.DISPLAY)?i="mover":i="msup"}return new ie(i,a)}});gs({type:"atom",htmlBuilder(e,t){return N0(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new ie("mo",[Nn(e.text,e.mode)]);if(e.family==="bin"){var r=D0(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var vf={mi:"italic",mn:"normal",mtext:"normal"};gs({type:"mathord",htmlBuilder(e,t){return eo(e,t)},mathmlBuilder(e,t){var n=new ie("mi",[Nn(e.text,e.mode,t)]),r=D0(e,t)||"italic";return r!==vf[n.type]&&n.setAttribute("mathvariant",r),n}});gs({type:"textord",htmlBuilder(e,t){return eo(e,t)},mathmlBuilder(e,t){var n=Nn(e.text,e.mode,t),r=D0(e,t)||"normal",s;return e.mode==="text"?s=new ie("mtext",[n]):/[0-9]/.test(e.text)?s=new ie("mn",[n]):e.text==="\\prime"?s=new ie("mo",[n]):s=new ie("mi",[n]),r!==vf[s.type]&&s.setAttribute("mathvariant",r),s}});var Jo={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Yo={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};gs({type:"spacing",htmlBuilder(e,t){if(Yo.hasOwnProperty(e.text)){var n=Yo[e.text].className||"";if(e.mode==="text"){var r=eo(e,t);return r.classes.push(n),r}else return ee(["mspace",n],[N0(e.text,e.mode,t)],t)}else{if(Jo.hasOwnProperty(e.text))return ee(["mspace",Jo[e.text]],[],t);throw new ae('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(Yo.hasOwnProperty(e.text))n=new ie("mtext",[new Ft(" ")]);else{if(Jo.hasOwnProperty(e.text))return new ie("mspace");throw new ae('Unknown type of space "'+e.text+'"')}return n}});var Mu=()=>{var e=new ie("mtd",[]);return e.setAttribute("width","50%"),e};gs({type:"tag",mathmlBuilder(e,t){var n=new ie("mtable",[new ie("mtr",[Mu(),new ie("mtd",[Zr(e.body,t)]),Mu(),new ie("mtd",[Zr(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var zu={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Du={"\\textbf":"textbf","\\textmd":"textmd"},dy={"\\textit":"textit","\\textup":"textup"},$u=(e,t)=>{var n=e.font;if(n){if(zu[n])return t.withTextFontFamily(zu[n]);if(Du[n])return t.withTextFontWeight(Du[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(dy[n])};ge({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"text",mode:n.mode,body:Lt(s),font:r}},htmlBuilder(e,t){var n=$u(e,t),r=Kt(e.body,n,!0);return ee(["mord","text"],r,n)},mathmlBuilder(e,t){var n=$u(e,t);return Zr(e.body,n)}});ge({type:"underline",names:["\\underline"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=it(e.body,t),r=Bs("underline-line",t),s=t.fontMetrics().defaultRuleThickness,a=at({positionType:"top",positionData:n.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:n}]});return ee(["mord","underline"],[a],t)},mathmlBuilder(e,t){var n=new ie("mo",[new Ft("‾")]);n.setAttribute("stretchy","true");var r=new ie("munder",[gt(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});ge({type:"vcenter",names:["\\vcenter"],numArgs:1,argTypes:["original"],allowedInText:!1,handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=it(e.body,t),r=t.fontMetrics().axisHeight,s=.5*(n.height-r-(n.depth+r));return at({positionType:"shift",positionData:s,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ie("mpadded",[gt(e.body,t)],["vcenter"]);return new ie("mrow",[n])}});ge({type:"verb",names:["\\verb"],numArgs:0,allowedInText:!0,handler(e,t,n){throw new ae("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=Pu(e),r=[],s=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var i=n[a];i==="~"&&(i="\\textasciitilde"),r.push(ln(i,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return ee(["mord","text"].concat(s.sizingClasses(t)),Bp(r),s)},mathmlBuilder(e,t){var n=new Ft(Pu(e)),r=new ie("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Pu=e=>e.body.replace(/ /g,e.star?"␣":" "),Dr=qp,bf=`[ \r
|
|
314
|
+
]`,hy="\\\\[a-zA-Z@]+",py="\\\\[^\uD800-\uDFFF]",fy="("+hy+")"+bf+"*",my=`\\\\(
|
|
315
|
+
|[ \r ]+
|
|
316
|
+
?)[ \r ]*`,Zl="[̀-ͯ]",gy=new RegExp(Zl+"+$"),vy="("+bf+"+)|"+(my+"|")+"([!-\\[\\]-‧-豈-]"+(Zl+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Zl+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+fy)+("|"+py+")");class Bu{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(vy,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new xn("EOF",new mn(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new ae("Unexpected character: '"+t[n]+"'",new xn(t[n],new mn(this,n,n+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var a=t.indexOf(`
|
|
317
|
+
`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new xn(s,new mn(this,n,this.tokenRegex.lastIndex))}}class by{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ae("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,r){if(r===void 0&&(r=!1),r){for(var s=0;s<this.undefStack.length;s++)delete this.undefStack[s][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var yy=lf;b("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});b("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});b("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});b("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});b("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});b("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");b("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Lu={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};b("\\char",function(e){var t=e.popToken(),n,r=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new ae("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=Lu[t.text],r==null||r>=n)throw new ae("Invalid base-"+n+" digit "+t.text);for(var s;(s=Lu[e.future().text])!=null&&s<n;)r*=n,r+=s,e.popToken()}return"\\@char{"+r+"}"});var L0=(e,t,n,r)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new ae("\\newcommand's first argument must be a macro name");var a=s[0].text,i=e.isDefined(a);if(i&&!t)throw new ae("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!i&&!n)throw new ae("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var l="",c=e.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new ae("Invalid number of arguments: "+l);o=parseInt(l),s=e.consumeArg().tokens}return i&&r||e.macros.set(a,{tokens:s,numArgs:o}),""};b("\\newcommand",e=>L0(e,!1,!0,!1));b("\\renewcommand",e=>L0(e,!0,!1,!1));b("\\providecommand",e=>L0(e,!0,!0,!0));b("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});b("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});b("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Dr[n],St.math[n],St.text[n]),""});b("\\bgroup","{");b("\\egroup","}");b("~","\\nobreakspace");b("\\lq","`");b("\\rq","'");b("\\aa","\\r a");b("\\AA","\\r A");b("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");b("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");b("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");b("ℬ","\\mathscr{B}");b("ℰ","\\mathscr{E}");b("ℱ","\\mathscr{F}");b("ℋ","\\mathscr{H}");b("ℐ","\\mathscr{I}");b("ℒ","\\mathscr{L}");b("ℳ","\\mathscr{M}");b("ℛ","\\mathscr{R}");b("ℭ","\\mathfrak{C}");b("ℌ","\\mathfrak{H}");b("ℨ","\\mathfrak{Z}");b("\\Bbbk","\\Bbb{k}");b("\\llap","\\mathllap{\\textrm{#1}}");b("\\rlap","\\mathrlap{\\textrm{#1}}");b("\\clap","\\mathclap{\\textrm{#1}}");b("\\mathstrut","\\vphantom{(}");b("\\underbar","\\underline{\\text{#1}}");b("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');b("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");b("\\ne","\\neq");b("≠","\\neq");b("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");b("∉","\\notin");b("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");b("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");b("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");b("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");b("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");b("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");b("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");b("⟂","\\perp");b("‼","\\mathclose{!\\mkern-0.8mu!}");b("∌","\\notni");b("⌜","\\ulcorner");b("⌝","\\urcorner");b("⌞","\\llcorner");b("⌟","\\lrcorner");b("©","\\copyright");b("®","\\textregistered");b("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');b("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');b("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');b("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');b("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");b("⋮","\\vdots");b("\\varGamma","\\mathit{\\Gamma}");b("\\varDelta","\\mathit{\\Delta}");b("\\varTheta","\\mathit{\\Theta}");b("\\varLambda","\\mathit{\\Lambda}");b("\\varXi","\\mathit{\\Xi}");b("\\varPi","\\mathit{\\Pi}");b("\\varSigma","\\mathit{\\Sigma}");b("\\varUpsilon","\\mathit{\\Upsilon}");b("\\varPhi","\\mathit{\\Phi}");b("\\varPsi","\\mathit{\\Psi}");b("\\varOmega","\\mathit{\\Omega}");b("\\substack","\\begin{subarray}{c}#1\\end{subarray}");b("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");b("\\boxed","\\fbox{$\\displaystyle{#1}$}");b("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");b("\\implies","\\DOTSB\\;\\Longrightarrow\\;");b("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");b("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");b("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Fu={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},wy=new Set(["bin","rel"]);b("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in Fu?t=Fu[n]:(n.slice(0,4)==="\\not"||n in St.math&&wy.has(St.math[n].group))&&(t="\\dotsb"),t});var F0={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};b("\\dotso",function(e){var t=e.future().text;return t in F0?"\\ldots\\,":"\\ldots"});b("\\dotsc",function(e){var t=e.future().text;return t in F0&&t!==","?"\\ldots\\,":"\\ldots"});b("\\cdots",function(e){var t=e.future().text;return t in F0?"\\@cdots\\,":"\\@cdots"});b("\\dotsb","\\cdots");b("\\dotsm","\\cdots");b("\\dotsi","\\!\\cdots");b("\\dotsx","\\ldots\\,");b("\\DOTSI","\\relax");b("\\DOTSB","\\relax");b("\\DOTSX","\\relax");b("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");b("\\,","\\tmspace+{3mu}{.1667em}");b("\\thinspace","\\,");b("\\>","\\mskip{4mu}");b("\\:","\\tmspace+{4mu}{.2222em}");b("\\medspace","\\:");b("\\;","\\tmspace+{5mu}{.2777em}");b("\\thickspace","\\;");b("\\!","\\tmspace-{3mu}{.1667em}");b("\\negthinspace","\\!");b("\\negmedspace","\\tmspace-{4mu}{.2222em}");b("\\negthickspace","\\tmspace-{5mu}{.277em}");b("\\enspace","\\kern.5em ");b("\\enskip","\\hskip.5em\\relax");b("\\quad","\\hskip1em\\relax");b("\\qquad","\\hskip2em\\relax");b("\\tag","\\@ifstar\\tag@literal\\tag@paren");b("\\tag@paren","\\tag@literal{({#1})}");b("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new ae("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});b("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");b("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");b("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");b("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");b("\\newline","\\\\\\relax");b("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var yf=ce(Jn["Main-Regular"][84][1]-.7*Jn["Main-Regular"][65][1]);b("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+yf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");b("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+yf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");b("\\hspace","\\@ifstar\\@hspacer\\@hspace");b("\\@hspace","\\hskip #1\\relax");b("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");b("\\ordinarycolon",":");b("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");b("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');b("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');b("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');b("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');b("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');b("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');b("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');b("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');b("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');b("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');b("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');b("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');b("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');b("∷","\\dblcolon");b("∹","\\eqcolon");b("≔","\\coloneqq");b("≕","\\eqqcolon");b("⩴","\\Coloneqq");b("\\ratio","\\vcentcolon");b("\\coloncolon","\\dblcolon");b("\\colonequals","\\coloneqq");b("\\coloncolonequals","\\Coloneqq");b("\\equalscolon","\\eqqcolon");b("\\equalscoloncolon","\\Eqqcolon");b("\\colonminus","\\coloneq");b("\\coloncolonminus","\\Coloneq");b("\\minuscolon","\\eqcolon");b("\\minuscoloncolon","\\Eqcolon");b("\\coloncolonapprox","\\Colonapprox");b("\\coloncolonsim","\\Colonsim");b("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");b("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");b("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");b("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");b("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");b("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");b("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");b("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");b("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");b("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");b("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");b("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");b("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");b("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");b("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");b("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");b("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");b("\\nleqq","\\html@mathml{\\@nleqq}{≰}");b("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");b("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");b("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");b("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");b("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");b("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");b("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");b("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");b("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");b("\\imath","\\html@mathml{\\@imath}{ı}");b("\\jmath","\\html@mathml{\\@jmath}{ȷ}");b("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");b("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");b("⟦","\\llbracket");b("⟧","\\rrbracket");b("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");b("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");b("⦃","\\lBrace");b("⦄","\\rBrace");b("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");b("⦵","\\minuso");b("\\darr","\\downarrow");b("\\dArr","\\Downarrow");b("\\Darr","\\Downarrow");b("\\lang","\\langle");b("\\rang","\\rangle");b("\\uarr","\\uparrow");b("\\uArr","\\Uparrow");b("\\Uarr","\\Uparrow");b("\\N","\\mathbb{N}");b("\\R","\\mathbb{R}");b("\\Z","\\mathbb{Z}");b("\\alef","\\aleph");b("\\alefsym","\\aleph");b("\\Alpha","\\mathrm{A}");b("\\Beta","\\mathrm{B}");b("\\bull","\\bullet");b("\\Chi","\\mathrm{X}");b("\\clubs","\\clubsuit");b("\\cnums","\\mathbb{C}");b("\\Complex","\\mathbb{C}");b("\\Dagger","\\ddagger");b("\\diamonds","\\diamondsuit");b("\\empty","\\emptyset");b("\\Epsilon","\\mathrm{E}");b("\\Eta","\\mathrm{H}");b("\\exist","\\exists");b("\\harr","\\leftrightarrow");b("\\hArr","\\Leftrightarrow");b("\\Harr","\\Leftrightarrow");b("\\hearts","\\heartsuit");b("\\image","\\Im");b("\\infin","\\infty");b("\\Iota","\\mathrm{I}");b("\\isin","\\in");b("\\Kappa","\\mathrm{K}");b("\\larr","\\leftarrow");b("\\lArr","\\Leftarrow");b("\\Larr","\\Leftarrow");b("\\lrarr","\\leftrightarrow");b("\\lrArr","\\Leftrightarrow");b("\\Lrarr","\\Leftrightarrow");b("\\Mu","\\mathrm{M}");b("\\natnums","\\mathbb{N}");b("\\Nu","\\mathrm{N}");b("\\Omicron","\\mathrm{O}");b("\\plusmn","\\pm");b("\\rarr","\\rightarrow");b("\\rArr","\\Rightarrow");b("\\Rarr","\\Rightarrow");b("\\real","\\Re");b("\\reals","\\mathbb{R}");b("\\Reals","\\mathbb{R}");b("\\Rho","\\mathrm{P}");b("\\sdot","\\cdot");b("\\sect","\\S");b("\\spades","\\spadesuit");b("\\sub","\\subset");b("\\sube","\\subseteq");b("\\supe","\\supseteq");b("\\Tau","\\mathrm{T}");b("\\thetasym","\\vartheta");b("\\weierp","\\wp");b("\\Zeta","\\mathrm{Z}");b("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");b("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");b("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");b("\\bra","\\mathinner{\\langle{#1}|}");b("\\ket","\\mathinner{|{#1}\\rangle}");b("\\braket","\\mathinner{\\langle{#1}\\rangle}");b("\\Bra","\\left\\langle#1\\right|");b("\\Ket","\\left|#1\\right\\rangle");var wf=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,s=t.consumeArg().tokens,a=t.consumeArg().tokens,i=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=f=>m=>{e&&(m.macros.set("|",i),s.length&&m.macros.set("\\|",o));var p=f;if(!f&&s.length){var w=m.future();w.text==="|"&&(m.popToken(),p=!0)}return{tokens:p?s:r,numArgs:0}};t.macros.set("|",l(!1)),s.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...a,...c,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};b("\\bra@ket",wf(!1));b("\\bra@set",wf(!0));b("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");b("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");b("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");b("\\angln","{\\angl n}");b("\\blue","\\textcolor{##6495ed}{#1}");b("\\orange","\\textcolor{##ffa500}{#1}");b("\\pink","\\textcolor{##ff00af}{#1}");b("\\red","\\textcolor{##df0030}{#1}");b("\\green","\\textcolor{##28ae7b}{#1}");b("\\gray","\\textcolor{gray}{#1}");b("\\purple","\\textcolor{##9d38bd}{#1}");b("\\blueA","\\textcolor{##ccfaff}{#1}");b("\\blueB","\\textcolor{##80f6ff}{#1}");b("\\blueC","\\textcolor{##63d9ea}{#1}");b("\\blueD","\\textcolor{##11accd}{#1}");b("\\blueE","\\textcolor{##0c7f99}{#1}");b("\\tealA","\\textcolor{##94fff5}{#1}");b("\\tealB","\\textcolor{##26edd5}{#1}");b("\\tealC","\\textcolor{##01d1c1}{#1}");b("\\tealD","\\textcolor{##01a995}{#1}");b("\\tealE","\\textcolor{##208170}{#1}");b("\\greenA","\\textcolor{##b6ffb0}{#1}");b("\\greenB","\\textcolor{##8af281}{#1}");b("\\greenC","\\textcolor{##74cf70}{#1}");b("\\greenD","\\textcolor{##1fab54}{#1}");b("\\greenE","\\textcolor{##0d923f}{#1}");b("\\goldA","\\textcolor{##ffd0a9}{#1}");b("\\goldB","\\textcolor{##ffbb71}{#1}");b("\\goldC","\\textcolor{##ff9c39}{#1}");b("\\goldD","\\textcolor{##e07d10}{#1}");b("\\goldE","\\textcolor{##a75a05}{#1}");b("\\redA","\\textcolor{##fca9a9}{#1}");b("\\redB","\\textcolor{##ff8482}{#1}");b("\\redC","\\textcolor{##f9685d}{#1}");b("\\redD","\\textcolor{##e84d39}{#1}");b("\\redE","\\textcolor{##bc2612}{#1}");b("\\maroonA","\\textcolor{##ffbde0}{#1}");b("\\maroonB","\\textcolor{##ff92c6}{#1}");b("\\maroonC","\\textcolor{##ed5fa6}{#1}");b("\\maroonD","\\textcolor{##ca337c}{#1}");b("\\maroonE","\\textcolor{##9e034e}{#1}");b("\\purpleA","\\textcolor{##ddd7ff}{#1}");b("\\purpleB","\\textcolor{##c6b9fc}{#1}");b("\\purpleC","\\textcolor{##aa87ff}{#1}");b("\\purpleD","\\textcolor{##7854ab}{#1}");b("\\purpleE","\\textcolor{##543b78}{#1}");b("\\mintA","\\textcolor{##f5f9e8}{#1}");b("\\mintB","\\textcolor{##edf2df}{#1}");b("\\mintC","\\textcolor{##e0e5cc}{#1}");b("\\grayA","\\textcolor{##f6f7f7}{#1}");b("\\grayB","\\textcolor{##f0f1f2}{#1}");b("\\grayC","\\textcolor{##e3e5e6}{#1}");b("\\grayD","\\textcolor{##d6d8da}{#1}");b("\\grayE","\\textcolor{##babec2}{#1}");b("\\grayF","\\textcolor{##888d93}{#1}");b("\\grayG","\\textcolor{##626569}{#1}");b("\\grayH","\\textcolor{##3b3e40}{#1}");b("\\grayI","\\textcolor{##21242c}{#1}");b("\\kaBlue","\\textcolor{##314453}{#1}");b("\\kaGreen","\\textcolor{##71B307}{#1}");var kf={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class ky{constructor(t,n,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new by(yy,n.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Bu(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,r,s;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:s,end:r}=this.consumeArg(["]"])}else({tokens:s,start:n,end:r}=this.consumeArg());return this.pushToken(new xn("EOF",r.loc)),this.pushTokens(s),new xn("",mn.range(n,r))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],r=t&&t.length>0;r||this.consumeSpaces();var s=this.future(),a,i=0,o=0;do{if(a=this.popToken(),n.push(a),a.text==="{")++i;else if(a.text==="}"){if(--i,i===-1)throw new ae("Extra }",a)}else if(a.text==="EOF")throw new ae("Unexpected end of input in a macro argument, expected '"+(t&&r?t[o]:"}")+"'",a);if(t&&r)if((i===0||i===1&&t[o]==="{")&&a.text===t[o]){if(++o,o===t.length){n.splice(-o,o);break}}else o=0}while(i!==0||r);return s.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:s,end:a}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new ae("The length of delimiters doesn't match the number of args!");for(var r=n[0],s=0;s<r.length;s++){var a=this.popToken();if(r[s]!==a.text)throw new ae("Use of the macro doesn't match its definition",a)}}for(var i=[],o=0;o<t;o++)i.push(this.consumeArg(n&&n[o+1]).tokens);return i}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new ae("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),r=n.text,s=n.noexpand?null:this._getExpansion(r);if(s==null||t&&s.unexpandable){if(t&&s==null&&r[0]==="\\"&&!this.isDefined(r))throw new ae("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var a=s.tokens,i=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new ae("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...i[+l.text-1]);else throw new ae("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new xn(t)]):void 0}expandTokens(t){var n=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),n.push(s)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(r=>r.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var r=this.lexer.catcodes[t];if(r!=null&&r!==13)return}var s=typeof n=="function"?n(this):n;if(typeof s=="string"){var a=0;if(s.includes("#"))for(var i=s.replace(/##/g,"");i.includes("#"+(a+1));)++a;for(var o=new Bu(s,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var d={tokens:l,numArgs:a};return d}return s}isDefined(t){return this.macros.has(t)||Dr.hasOwnProperty(t)||St.math.hasOwnProperty(t)||St.text.hasOwnProperty(t)||kf.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Dr.hasOwnProperty(t)&&!Dr[t].primitive}}var Uu=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ci=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Xo={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},qu={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class lo{constructor(t,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new ky(t,n,this.mode),this.settings=n,this.leftrightDepth=0,this.nextToken=null}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new ae("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new xn("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(t,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(lo.endOfExpression.has(s.text)||n&&s.text===n||t&&Dr[s.text]&&Dr[s.text].infix)break;var a=this.parseAtom(n);if(a){if(a.type==="internal")continue}else break;r.push(a)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var n=-1,r,s=0;s<t.length;s++){var a=t[s];if(a.type==="infix"){if(n!==-1)throw new ae("only one infix operator per group",a.token);n=s,r=a.replaceWith}}if(n!==-1&&r){var i,o,l=t.slice(0,n),c=t.slice(n+1);l.length===1&&l[0].type==="ordgroup"?i=l[0]:i={type:"ordgroup",mode:this.mode,body:l},c.length===1&&c[0].type==="ordgroup"?o=c[0]:o={type:"ordgroup",mode:this.mode,body:c};var d;return r==="\\\\abovefrac"?d=this.callFunction(r,[i,t[n],o],[]):d=this.callFunction(r,[i,o],[]),[d]}else return t}handleSupSubscript(t){var n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();var s;do{var a;s=this.parseGroup(t)}while(((a=s)==null?void 0:a.type)==="internal");if(!s)throw new ae("Expected group after '"+r+"'",n);return s}formatUnsupportedCmd(t){for(var n=[],r=0;r<t.length;r++)n.push({type:"textord",mode:"text",text:t[r]});var s={type:"text",mode:this.mode,body:n},a={type:"color",mode:this.mode,color:this.settings.errorColor,body:[s]};return a}parseAtom(t){var n=this.parseGroup("atom",t);if(n?.type==="internal"||this.mode==="text")return n;for(var r,s;;){this.consumeSpaces();var a=this.fetch();if(a.text==="\\limits"||a.text==="\\nolimits"){if(n&&n.type==="op")n.limits=a.text==="\\limits",n.alwaysHandleSupSub=!0;else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=a.text==="\\limits");else throw new ae("Limit controls must follow a math operator",a);this.consume()}else if(a.text==="^"){if(r)throw new ae("Double superscript",a);r=this.handleSupSubscript("superscript")}else if(a.text==="_"){if(s)throw new ae("Double subscript",a);s=this.handleSupSubscript("subscript")}else if(a.text==="'"){if(r)throw new ae("Double superscript",a);var i={type:"textord",mode:this.mode,text:"\\prime"},o=[i];for(this.consume();this.fetch().text==="'";)o.push(i),this.consume();this.fetch().text==="^"&&o.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:o}}else if(ci[a.text]){var l=Uu.test(a.text),c=[];for(c.push(new xn(ci[a.text])),this.consume();;){var d=this.fetch().text;if(!ci[d]||Uu.test(d)!==l)break;c.unshift(new xn(ci[d])),this.consume()}var f=this.subparse(c);l?s={type:"ordgroup",mode:"math",body:f}:r={type:"ordgroup",mode:"math",body:f}}else break}return r&&s?{type:"supsub",mode:this.mode,base:n,sup:r,sub:s}:r?{type:"supsub",mode:this.mode,base:n,sup:r}:s?{type:"supsub",mode:this.mode,base:n,sub:s}:n}parseFunction(t,n){var r=this.fetch(),s=r.text,a=Dr[s];if(!a)return null;if(this.consume(),n&&n!=="atom"&&!a.allowedInArgument)throw new ae("Got function '"+s+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!a.allowedInText)throw new ae("Can't use function '"+s+"' in text mode",r);if(this.mode==="math"&&a.allowedInMath===!1)throw new ae("Can't use function '"+s+"' in math mode",r);var{args:i,optArgs:o}=this.parseArguments(s,a);return this.callFunction(s,i,o,r,t)}callFunction(t,n,r,s,a){var i={funcName:t,parser:this,token:s,breakOnTokenText:a},o=Dr[t];if(o&&o.handler)return o.handler(i,n,r);throw new ae("No function handler for "+t)}parseArguments(t,n){var r,s=(r=n.numOptionalArgs)!=null?r:0,a=n.numArgs+s;if(a===0)return{args:[],optArgs:[]};for(var i=[],o=[],l=0;l<a;l++){var c,d=(c=n.argTypes)==null?void 0:c[l],f=l<s;("primitive"in n&&n.primitive&&d==null||n.type==="sqrt"&&l===1&&o[0]==null)&&(d="primitive");var m=this.parseGroupOfType("argument to '"+t+"'",d,f);if(f)o.push(m);else if(m!=null)i.push(m);else throw new ae("Null argument, please report this as a bug")}return{args:i,optArgs:o}}parseGroupOfType(t,n,r){switch(n){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,n);case"hbox":{var s=this.parseArgumentGroup(r,"text");return s!=null?{type:"styling",mode:s.mode,body:[s],style:"text",resetFont:!0}:null}case"raw":{var a=this.parseStringGroup(r);return a!=null?{type:"raw",mode:"text",string:a.text}:null}case"primitive":{if(r)throw new ae("A primitive argument cannot be optional");var i=this.parseGroup(t);if(i==null)throw new ae("Expected group as "+t,this.fetch());return i}case"original":case void 0:return this.parseArgumentGroup(r);default:throw new ae("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r="",s;(s=this.fetch()).text!=="EOF";)r+=s.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(t,n){for(var r=this.fetch(),s=r,a="",i;(i=this.fetch()).text!=="EOF"&&t.test(a+i.text);)s=i,a+=s.text,this.consume();if(a==="")throw new ae("Invalid "+n+": '"+r.text+"'",r);return r.range(s,a)}parseColorGroup(t){var n=this.parseStringGroup(t);if(n==null)return null;var r=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!r)throw new ae("Invalid color: '"+n.text+"'",n);var s=r[0];return/^[0-9a-f]{6}$/i.test(s)&&(s="#"+s),{type:"color-token",mode:this.mode,color:s}}parseSizeGroup(t){var n,r=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup(t),!n)return null;!t&&n.text.length===0&&(n.text="0pt",r=!0);var s=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!s)throw new ae("Invalid size: '"+n.text+"'",n);var a={number:+(s[1]+s[2]),unit:s[3]};if(!Mp(a))throw new ae("Invalid unit: '"+a.unit+"'",n);return{type:"size",mode:this.mode,value:a,isBlank:r}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup(t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(t,n){var r=this.gullet.scanArgument(t);if(r==null)return null;var s=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:r.loc,body:a};return n&&this.switchMode(s),i}parseGroup(t,n){var r=this.fetch(),s=r.text,a;if(s==="{"||s==="\\begingroup"){this.consume();var i=s==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,i),l=this.fetch();this.expect(i),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:mn.range(r,l),body:o,semisimple:s==="\\begingroup"||void 0}}else if(a=this.parseFunction(n,t)||this.parseSymbol(),a==null&&s[0]==="\\"&&!kf.hasOwnProperty(s)){if(this.settings.throwOnError)throw new ae("Undefined control sequence: "+s,r);a=this.formatUnsupportedCmd(s),this.consume()}return a}formLigatures(t){for(var n=t.length-1,r=0;r<n;++r){var s=t[r];if(s.type==="textord"){var a=s.text,i=t[r+1];if(!(!i||i.type!=="textord")){if(a==="-"&&i.text==="-"){var o=t[r+2];r+1<n&&o&&o.type==="textord"&&o.text==="-"?(t.splice(r,3,{type:"textord",mode:"text",loc:mn.range(s,o),text:"---"}),n-=2):(t.splice(r,2,{type:"textord",mode:"text",loc:mn.range(s,i),text:"--"}),n-=1)}(a==="'"||a==="`")&&i.text===a&&(t.splice(r,2,{type:"textord",mode:"text",loc:mn.range(s,i),text:a+a}),n-=1)}}}}parseSymbol(){var t=this.fetch(),n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var r=n.slice(5),s=r.charAt(0)==="*";if(s&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new ae(`\\verb assertion failed --
|
|
318
|
+
please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:s}}qu.hasOwnProperty(n[0])&&!St[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',t),n=qu[n[0]]+n.slice(1));var a=gy.exec(n);a&&(n=n.substring(0,a.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var i;if(St[this.mode][n]){this.settings.strict&&this.mode==="math"&&Nl.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var o=St[this.mode][n].group,l=mn.range(t),c;T6(o)?c={type:"atom",mode:this.mode,family:o,loc:l,text:n}:c={type:o,mode:this.mode,loc:l,text:n},i=c}else if(n.charCodeAt(0)>=128)this.settings.strict&&(Np(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),i={type:"textord",mode:"text",loc:mn.range(t),text:n};else return null;if(this.consume(),a)for(var d=0;d<a[0].length;d++){var f=a[0][d];if(!Xo[f])throw new ae("Unknown accent ' "+f+"'",t);var m=Xo[f][this.mode]||Xo[f].text;if(!m)throw new ae("Accent "+f+" unsupported in "+this.mode+" mode",t);i={type:"accent",mode:this.mode,loc:mn.range(t),label:m,isStretchy:!1,isShifty:!0,base:i}}return i}}lo.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var U0=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new lo(t,n);delete r.gullet.macros.current["\\df@tag"];var s=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new ae("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:r.subparse([new xn("\\df@tag")])}]}return s},xf=function(t,n,r){n.textContent="";var s=q0(t,r).toNode();n.appendChild(s)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),xf=function(){throw new ae("KaTeX doesn't work in quirks mode.")});var xy=function(t,n){var r=q0(t,n).toMarkup();return r},Sy=function(t,n){var r=new C0(n);return U0(t,r)},Sf=function(t,n,r){if(r.throwOnError||!(t instanceof ae))throw t;var s=ee(["katex-error"],[new _n(n)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+r.errorColor),s},q0=function(t,n){var r=new C0(n);try{var s=U0(t,r);return y6(s,t,r)}catch(a){return Sf(a,t,r)}},_y=function(t,n){var r=new C0(n);try{var s=U0(t,r);return w6(s,t,r)}catch(a){return Sf(a,t,r)}},Ey="0.17.0",Ay={Span:js,Anchor:Yi,SymbolNode:_n,SvgNode:gr,PathNode:Vr,LineNode:Il},Ty={version:Ey,render:xf,renderToString:xy,ParseError:ae,SETTINGS_SCHEMA:Cl,__parse:Sy,__renderToDomTree:q0,__renderToHTMLTree:_y,__setFontMetrics:e6,__defineSymbol:u,__defineFunction:ge,__defineMacro:b,__domTree:Ay};const Cy=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:?!。,:]|$)/,Ry=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1/,Oy=/^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;function Iy(e={}){return{extensions:[Ny(e,Hu(e,!1)),My(e,Hu(e,!0))]}}function Hu(e,t){return n=>Ty.renderToString(n.text,{...e,displayMode:n.displayMode})+(t?`
|
|
319
|
+
`:"")}function Ny(e,t){const n=e&&e.nonStandard,r=n?Ry:Cy;return{name:"inlineKatex",level:"inline",start(s){let a,i=s;for(;i;){if(a=i.indexOf("$"),a===-1)return;if((n?a>-1:a===0||i.charAt(a-1)===" ")&&i.substring(a).match(r))return a;i=i.substring(a+1).replace(/^\$+/,"")}},tokenizer(s,a){const i=s.match(r);if(i)return{type:"inlineKatex",raw:i[0],text:i[2].trim(),displayMode:i[1].length===2}},renderer:t}}function My(e,t){return{name:"blockKatex",level:"block",tokenizer(n,r){const s=n.match(Oy);if(s)return{type:"blockKatex",raw:s[0],text:s[2].trim(),displayMode:s[1].length===2}},renderer:t}}function Si(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const co=new $s,zy={bash:Jb,cpp:Yb,csharp:Xb,css:l3,dockerfile:c3,go:u3,java:d3,javascript:g3,json:v3,kotlin:y3,markdown:w3,php:k3,python:x3,ruby:S3,rust:_3,sql:E3,swift:M3,typescript:D3,xml:$3,yaml:P3};for(const[e,t]of Object.entries(zy))_l.registerLanguage(e,t);co.html=({text:e})=>Si(e);co.table=function(e){return`<div class="markdown-table-wrapper">${Reflect.apply($s.prototype.table,this,[e])}</div>
|
|
320
|
+
`};co.code=({text:e,lang:t})=>{const n=t?.trim().split(/\s+/,1)[0].toLowerCase();if(n==="mermaid")return`<div class="markdown-mermaid" data-mermaid-state="pending"><pre><code>${Si(e)}</code></pre></div>
|
|
321
|
+
`;if(!n||!_l.getLanguage(n))return`<pre><code>${Si(e)}</code></pre>
|
|
322
|
+
`;const r=_l.highlight(e,{language:n,ignoreIllegals:!0}).value;return`<pre><code class="hljs language-${Si(n)}">${r}</code></pre>
|
|
323
|
+
`};st.use(Iy({nonStandard:!0,strict:"warn",throwOnError:!1}));st.use({async:!1,breaks:!0,gfm:!0,renderer:co});function Dy(e){const t=String(e??"").replace(/\r\n?/g,`
|
|
324
|
+
`).trim();return t?st.parse(t,{async:!1}):""}const $y="modulepreload",Py=function(e,t){return new URL(e,t).href},Vu={},By=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const i=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");s=c(n.map(d=>{if(d=Py(d,r),d in Vu)return;Vu[d]=!0;const f=d.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(r)for(let w=i.length-1;w>=0;w--){const y=i[w];if(y.href===d&&(!f||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${m}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":$y,f||(p.as="script"),p.crossOrigin="",p.href=d,l&&p.setAttribute("nonce",l),document.head.appendChild(p),f)return new Promise((w,y)=>{p.addEventListener("load",w),p.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(i){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i}return s.then(i=>{for(const o of i||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})};let Gu=0,Zu=Promise.resolve();function Ly(e,t){const n=Zu.then(async()=>{const{default:r}=await By(async()=>{const{default:s}=await import("./mermaid.core-B01IBkDW.js").then(a=>a.aJ);return{default:s}},[],import.meta.url);return r.initialize({flowchart:{htmlLabels:!1},securityLevel:"strict",startOnLoad:!1,suppressErrorRendering:!0,theme:t}),Gu+=1,r.render(`markdown-mermaid-${Gu}`,e)});return Zu=n.then(()=>{},()=>{}),n}const Fy=["innerHTML"],Uy=Ae({__name:"MarkdownContent",props:{content:{}},setup(e){const t=e,n=Ce(),r=be(()=>Dy(t.content)),s=new WeakMap;let a=0,i;function o(){const d=document.documentElement.dataset.theme;return d==="dark"?"dark":d==="light"?"default":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"}function l(d,f,m){const p=document.createElement("pre"),w=document.createElement("code");if(w.textContent=f,p.append(w),d.replaceChildren(p),m){const y=document.createElement("small");y.className="markdown-mermaid-error",y.textContent=m,d.append(y)}}async function c(){a+=1;const d=a;await Yn();const f=n.value;if(!f)return;const m=Array.from(f.querySelectorAll(".markdown-mermaid")),p=o();for(const w of m){const y=s.get(w)??w.querySelector("code")?.textContent??"";s.set(w,y),w.dataset.mermaidState="loading";try{const x=await Ly(y,p);if(d!==a||!w.isConnected)return;w.innerHTML=x.svg,x.bindFunctions?.(w),w.dataset.mermaidState="rendered"}catch(x){if(d!==a||!w.isConnected)return;l(w,y,x instanceof Error?x.message:"Mermaid diagram could not be rendered."),w.dataset.mermaidState="error"}}}return cn(r,()=>{c()},{flush:"post"}),ll(()=>{c(),i=new MutationObserver(()=>{c()}),i.observe(document.documentElement,{attributeFilter:["class","data-theme"],attributes:!0})}),Zi(()=>{a+=1,i?.disconnect()}),(d,f)=>(I(),V("div",{ref_key:"root",ref:n,class:"markdown-content",innerHTML:r.value},null,8,Fy))}}),Pa=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},ga=Pa(Uy,[["__scopeId","data-v-288c4ae8"]]),qy={class:"ai-session-composer__toolbar"},Hy={class:"ai-session-composer__actions"},Vy=["data-action","disabled","title"],Gy={key:0,class:"ai-session-composer__error"},Zy=Ae({__name:"AiSessionComposer",props:{modelValue:{},busy:{type:Boolean},canInterrupt:{type:Boolean},error:{},placeholder:{}},emits:["update:modelValue","add-context","run","steer"],setup(e,{emit:t}){const n=e,r=t,s=be({get:()=>n.modelValue,set:m=>r("update:modelValue",String(m))}),a=be(()=>n.modelValue.trim().length>0),i=be(()=>a.value||!n.canInterrupt?"send":"stop"),o=be(()=>a.value||!n.busy&&n.canInterrupt),l=be(()=>n.busy&&a.value),c=be(()=>i.value==="stop"?"Stop current AI turn":"Send message");function d(){o.value&&r("run")}function f(m){m.key!=="Enter"||m.shiftKey||m.isComposing||(m.preventDefault(),d())}return(m,p)=>(I(),V("form",{class:"ai-session-composer",onSubmit:jt(d,["prevent"])},[T(g(Qn),{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=w=>s.value=w),class:"ai-session-composer__input",placeholder:e.placeholder||"Ask for follow-up changes",rows:"4",onKeydown:f},null,8,["modelValue","placeholder"]),k("div",qy,[k("button",{type:"button",class:"ai-session-composer__tool",title:"Add context",onClick:p[1]||(p[1]=w=>r("add-context"))},[T(g(Sl),{size:18})]),k("div",Hy,[l.value?(I(),V("button",{key:0,type:"button",class:"ai-session-composer__tool",title:"Steer current AI turn",onClick:p[2]||(p[2]=w=>r("steer"))},[T(g(Kv),{size:18})])):pe("",!0),k("button",{type:"submit",class:"ai-session-composer__primary","data-action":i.value,disabled:!o.value,title:c.value},[i.value==="send"?(I(),ye(g(Cv),{key:0,size:18})):(I(),ye(g(m2),{key:1,size:16}))],8,Vy)])]),e.error?(I(),V("p",Gy,Z(e.error),1)):pe("",!0)],32))}}),jy=Pa(Zy,[["__scopeId","data-v-ea8c4bb1"]]);function Ky(){const e=Ce({});function t(i){return Af(i).length}function n(i){const o=t(i);if(!o)return 0;const l=e.value[i.id];return!l||l.index>=l.count-1&&o!==l.count?o-1:Math.min(Math.max(l.index,0),o-1)}function r(i,o){const l=t(i);l&&(e.value={...e.value,[i.id]:{index:(o+l)%l,count:l}})}function s(i){r(i,n(i)-1)}function a(i){r(i,n(i)+1)}return{nextPrompt:a,previousPrompt:s,promptCount:t,promptIndexFor:n}}function Wy(){const e=Ce();function t(i,o){const l=e.value;e.value=l?.sessionId===i&&l.kind===o?void 0:{sessionId:i,kind:o}}function n(i){t(i,"prompt")}function r(i){t(i,"message")}function s(){e.value=void 0}function a(i){const o=i.target instanceof Element?i.target:void 0;!o||o.closest(".ai-session-expanded-preview")||o.closest("[data-ai-preview-trigger]")||(e.value=void 0)}return jm(document,"click",a,{capture:!0}),{collapseExpandedPreview:s,expandMessage:r,expandedPreview:e,expandPrompt:n}}function _f(e){if(!e)return"";const t=Math.max(0,Math.round((Date.now()-Date.parse(e))/1e3));if(t<60)return`${t}s ago`;const n=Math.round(t/60);return n<60?`${n}m ago`:`${Math.round(n/60)}h ago`}function Qy(e){return[...e].sort((t,n)=>ju(n)-ju(t)||Ku(t).localeCompare(Ku(n)))}function ju(e){return e.status==="waiting"?4:e.status==="failed"?3:e.status==="running"?2:e.status==="idle"?1:0}function Ku(e){return[e.cwd||"",e.agent||"",e.providerSessionId||e.id].join("\0")}function Ef(e){return e?e.status==="waiting"?e.phase==="approval"?"waiting for approval":"waiting":e.status==="running"?e.currentTool?.name?`running · ${e.currentTool.name}`:e.phase==="tool"?"running · tool":e.phase==="editing"?"running · editing":e.phase==="responding"?"running · responding":"running":e.status==="failed"?"failed":"idle":"idle"}function jl(e,t){if(!e)return"No recent AI activity";const n=Tf(e);if(n.length&&t!==void 0){const s=Math.min(Math.max(t,0),n.length-1),a=n[s];return a?.lastMessage?.trim()?a.lastMessage:a?.summary?.trim()?a.summary:el(e)}const r=n.at(-1);return r&&!r.lastMessage?.trim()&&!r.summary?.trim()?el(e):e.lastMessage?.trim()?e.lastMessage:e.summary?.trim()?e.summary:el(e)}function Af(e){return e?Tf(e).map(t=>t.userPrompt?.trim()||"").filter(Boolean):[]}function Jy(e){return(e?.turns||[]).filter(t=>t.userPrompt?.trim()||t.lastMessage?.trim()||t.summary?.trim())}function Tf(e){if(!e)return[];const t=Jy(e),n=e.userPrompt?.trim();if(!n)return t;const r=e.activeTurnId?t.find(a=>a.id===e.activeTurnId):void 0;if(r)return(e.status==="running"||e.status==="waiting")&&r.userPrompt?.trim()===n?[...t.filter(a=>a.id!==r.id),r]:t;const s=t.at(-1);if(s?.userPrompt?.trim()===n&&!s.lastMessage?.trim()&&!s.summary?.trim())return t;if(e.status==="running"||e.status==="waiting"){const a={id:e.activeTurnId||`${e.id}:active`,userPrompt:n,status:e.status==="waiting"?"waiting":"running",phase:e.phase,revision:0,updatedAt:e.updatedAt};return[...t,a]}return t}function el(e){return e.currentTool?.name?e.currentTool.inputPreview?`${e.currentTool.name}: ${e.currentTool.inputPreview}`:e.currentTool.name:e.status==="running"?"Running...":e.status==="waiting"?e.phase==="approval"?"Waiting for approval.":"Waiting...":"-"}function Kl(e,t){if(!e)return"No AI session selected";const n=Af(e);if(n.length){const r=t===void 0?n.length-1:Math.min(Math.max(t,0),n.length-1);return n[r]}return"-"}function Yy(e){const t=Xy(e.cwd),n=e7(e.providerSessionId||e.id);return t&&n?`${t} · ${n}`:t||n||e.agent}function Xy(e){return e?e.split(/[\\/]/).filter(Boolean).at(-1)||e:""}function e7(e){return e?e.length>12?e.slice(0,12):e:""}function t7(e){return{active:e.filter(t=>t.status==="running").length,idle:e.filter(t=>t.status==="idle").length,waiting:e.filter(t=>t.status==="waiting").length}}function Li(e){const t=e.agent==="claude"&&typeof e.providerMeta?.short=="string";return!!((e.activeTurnId||t)&&(e.status==="running"||e.status==="waiting"))}function Cf(e){return e.status==="waiting"&&e.phase==="approval"}const n7={class:"ai-session-detail-content"},r7={class:"ai-session-detail-block ai-session-detail-block-user"},s7={class:"ai-session-detail-block ai-session-detail-block-assistant"},a7={key:0,class:"ai-session-approval-actions"},i7=["disabled"],o7=["disabled"],l7=["disabled"],c7={key:1,class:"ai-session-detail-block ai-session-queue"},u7={class:"ai-session-queue-list"},d7=["data-state"],h7={key:0},p7=["disabled","onClick"],f7=["disabled","onClick"],m7=["disabled","onClick"],g7={key:2,class:"ai-session-tool"},v7={key:0},b7={class:"ai-session-meta"},y7=Ae({__name:"AiSessionDetail",props:{busy:{type:Boolean},error:{},hasAppSession:{type:Boolean},messageDraft:{},promptIndex:{},session:{},sessionTitle:{}},emits:["open-app-session","remove-queued","resolve-approval","retry-queued","run-action","steer-draft","steer-queued","update:messageDraft"],setup(e){return(t,n)=>(I(),ye(g(kn),{class:"ai-session-detail","aria-label":"AI session detail"},{default:D(()=>[k("aside",n7,[k("header",null,[k("div",null,[k("span",null,Z(e.sessionTitle),1),k("strong",null,Z(g(Ef)(e.session)),1)]),k("small",null,Z(g(_f)(e.session.updatedAt)),1)]),k("section",r7,[n[7]||(n[7]=k("span",null,"User Message",-1)),T(g(kn),{class:"ai-session-detail-block-scroll"},{default:D(()=>[T(ga,{content:g(Kl)(e.session,e.promptIndex)},null,8,["content"])]),_:1})]),k("section",s7,[n[8]||(n[8]=k("span",null,"AI Response / Progress",-1)),T(g(kn),{class:"ai-session-detail-block-scroll"},{default:D(()=>[T(ga,{content:g(jl)(e.session,e.promptIndex)},null,8,["content"])]),_:1})]),g(Cf)(e.session)?(I(),V("div",a7,[k("button",{type:"button",disabled:e.busy,onClick:n[0]||(n[0]=r=>t.$emit("resolve-approval","allow"))},[T(g(Gh),{size:14}),n[9]||(n[9]=k("span",null,"Allow",-1))],8,i7),k("button",{type:"button",disabled:e.busy,onClick:n[1]||(n[1]=r=>t.$emit("resolve-approval","skip"))},[T(g(Ov),{size:14}),n[10]||(n[10]=k("span",null,"Skip",-1))],8,o7),k("button",{type:"button",disabled:e.busy,onClick:n[2]||(n[2]=r=>t.$emit("resolve-approval","deny"))},[T(g(us),{size:14}),n[11]||(n[11]=k("span",null,"Deny",-1))],8,l7)])):pe("",!0),e.session.queue?.items.length?(I(),V("section",c7,[k("span",null,"Queue · "+Z(e.session.queue.pendingCount),1),k("div",u7,[(I(!0),V(rt,null,$t(e.session.queue.items,r=>(I(),V("article",{key:r.id,class:"ai-session-queue-item","data-state":r.status},[k("p",null,Z(r.message),1),r.error?(I(),V("small",h7,Z(r.error),1)):pe("",!0),k("div",null,[k("button",{type:"button",disabled:e.busy||!g(Li)(e.session),onClick:s=>t.$emit("steer-queued",r.id)},"Steer",8,p7),r.status==="failed"?(I(),V("button",{key:0,type:"button",disabled:e.busy,onClick:s=>t.$emit("retry-queued",r.id)},"Retry",8,f7)):pe("",!0),k("button",{type:"button",disabled:e.busy,onClick:s=>t.$emit("remove-queued",r.id)},"Remove",8,m7)])],8,d7))),128))])])):pe("",!0),T(jy,{"model-value":e.messageDraft,class:"ai-session-compose",busy:e.busy,"can-interrupt":g(Li)(e.session),error:e.error,"onUpdate:modelValue":n[3]||(n[3]=r=>t.$emit("update:messageDraft",r)),onRun:n[4]||(n[4]=r=>t.$emit("run-action")),onSteer:n[5]||(n[5]=r=>t.$emit("steer-draft"))},null,8,["model-value","busy","can-interrupt","error"]),e.session.currentTool?.name?(I(),V("div",g7,[n[12]||(n[12]=k("span",null,"Current Tool",-1)),k("strong",null,Z(e.session.currentTool.name),1),e.session.currentTool.inputPreview?(I(),V("small",v7,Z(e.session.currentTool.inputPreview),1)):pe("",!0)])):pe("",!0),k("dl",b7,[k("div",null,[n[13]||(n[13]=k("dt",null,"Workspace",-1)),k("dd",null,Z(e.session.cwd||"Unknown"),1)]),k("div",null,[n[14]||(n[14]=k("dt",null,"Session",-1)),k("dd",null,Z(e.session.providerSessionId||e.session.id),1)]),k("div",null,[n[15]||(n[15]=k("dt",null,"App Binding",-1)),k("dd",null,Z(e.session.appSessionId||"Not bound"),1)])]),e.hasAppSession?(I(),V("button",{key:3,type:"button",class:"ai-session-detail-open",onClick:n[6]||(n[6]=r=>t.$emit("open-app-session",e.session))},[T(g(jh),{size:14}),n[16]||(n[16]=k("span",null,"Open App Session",-1))])):pe("",!0)])]),_:1}))}}),w7=Pa(y7,[["__scopeId","data-v-5ae5e9eb"]]),k7=["data-state","data-selected","data-expanded"],x7={class:"ai-session-status"},S7={class:"ai-session-card-meta"},_7={class:"ai-session-context"},E7={key:0,class:"ai-session-turn-nav"},A7=["aria-label"],T7=["aria-label"],C7={class:"ai-session-expanded-head"},R7={class:"ai-session-card-tools","aria-label":"AI session card controls"},O7=["aria-label"],I7=Ae({__name:"AiSessionListRow",props:{expandedPreview:{},hasAppSession:{type:Boolean},promptCount:{},promptIndex:{},selected:{type:Boolean},session:{},sessionTitle:{}},emits:["collapse-expanded-preview","expand-message","expand-prompt","next-prompt","open-app-session","previous-prompt","select"],setup(e){const t=e;function n(){return t.expandedPreview?.kind==="prompt"?Kl(t.session,t.promptIndex):jl(t.session,t.promptIndex)}return(r,s)=>(I(),V("article",{class:"ai-session-row","data-state":e.session.status,"data-selected":e.selected,"data-expanded":e.expandedPreview?.sessionId===e.session.id?e.expandedPreview.kind:void 0},[k("div",{class:"ai-session-select",role:"button",tabindex:"0",onClick:s[4]||(s[4]=a=>r.$emit("select",e.session.id)),onKeydown:[s[5]||(s[5]=Ts(jt(a=>r.$emit("select",e.session.id),["prevent"]),["enter"])),s[6]||(s[6]=Ts(jt(a=>r.$emit("select",e.session.id),["prevent"]),["space"]))]},[k("div",x7,[s[9]||(s[9]=k("span",{class:"ai-session-dot"},null,-1)),k("strong",null,Z(e.sessionTitle),1),k("small",null,Z(g(Ef)(e.session)),1)]),k("div",{class:"ai-session-preview-field ai-session-preview-field-user","data-ai-preview-trigger":"",onClick:s[0]||(s[0]=jt(a=>r.$emit("expand-prompt",e.session.id),["stop"]))},[T(ga,{class:"ai-session-question",content:g(Kl)(e.session,e.promptIndex)},null,8,["content"]),s[10]||(s[10]=k("small",null,"展开用户消息",-1))]),k("div",{class:"ai-session-preview-field ai-session-preview-field-assistant","data-ai-preview-trigger":"",onClick:s[1]||(s[1]=jt(a=>r.$emit("expand-message",e.session.id),["stop"]))},[T(ga,{class:"ai-session-message",content:g(jl)(e.session,e.promptIndex)},null,8,["content"]),s[11]||(s[11]=k("small",null,"展开 AI 进展",-1))]),k("div",S7,[k("small",_7,Z(g(Yy)(e.session)),1),e.promptCount>1?(I(),V("span",E7,[k("button",{type:"button","aria-label":`Previous user message for ${e.session.agent}`,onClick:s[2]||(s[2]=jt(a=>r.$emit("previous-prompt",e.session),["stop"]))},[T(g($v),{size:13})],8,A7),k("small",null,Z(e.promptIndex+1)+" / "+Z(e.promptCount),1),k("button",{type:"button","aria-label":`Next user message for ${e.session.agent}`,onClick:s[3]||(s[3]=jt(a=>r.$emit("next-prompt",e.session),["stop"]))},[T(g(Bv),{size:13})],8,T7)])):pe("",!0)])],32),e.expandedPreview?.sessionId===e.session.id?(I(),V("div",{key:0,class:"ai-session-expanded-preview",onClick:s[7]||(s[7]=jt(a=>r.$emit("collapse-expanded-preview"),["stop"]))},[k("div",C7,[k("strong",null,Z(e.expandedPreview.kind==="prompt"?"User Message":"AI Response / Progress"),1),s[12]||(s[12]=k("small",null,"滚动查看完整内容",-1))]),T(g(kn),{class:"ai-session-expanded-content"},{default:D(()=>[T(ga,{class:"ai-session-expanded-content-inner",content:n()},null,8,["content"])]),_:1})])):pe("",!0),k("div",R7,[e.hasAppSession?(I(),V("button",{key:0,type:"button",class:"ai-session-open","aria-label":`Open app session for ${e.session.agent}`,title:"Open app session",onClick:s[8]||(s[8]=a=>r.$emit("open-app-session",e.session))},[T(g(jh),{size:14})],8,O7)):pe("",!0)])],8,k7))}}),N7=Pa(I7,[["__scopeId","data-v-1a5bafd9"]]),M7={class:"ai-sessions-panel","aria-label":"AI sessions"},z7={class:"ai-sessions-head"},D7={class:"ai-session-chips","aria-label":"AI session counts"},$7={"data-tone":"active"},P7={"data-tone":"idle"},B7={"data-tone":"waiting"},L7={key:0,class:"ai-sessions-empty"},F7={key:1,class:"ai-sessions-empty"},U7={key:2,class:"ai-session-workspace"},q7={class:"ai-session-list-content"},H7=Ae({__name:"AiSessionsPanel",setup(e){const t=Sh(),n=Vs(),r=Gs(),s=be(()=>Qy(t.data.value?.sessions||[])),a=Ce(""),i=be(()=>s.value.find(re=>re.id===a.value)||s.value[0]),{nextPrompt:o,previousPrompt:l,promptCount:c,promptIndexFor:d}=Ky(),{collapseExpandedPreview:f,expandMessage:m,expandedPreview:p,expandPrompt:w}=Wy(),y=Ce(""),x=Ce(!1),_=Ce(""),$=be(()=>t7(s.value)),z=be(()=>{const re=t.data.value?.updatedAt;return re?`updated ${_f(re)}`:""});cn(s,re=>{if(!re.length){a.value="";return}re.some(ne=>ne.id===a.value)||(a.value=re[0].id)},{immediate:!0}),cn(i,()=>{_.value=""});function C(re){f(),a.value=re}function S(re){const ne=he(re);ne&&r.open(za(ne))}async function E(){const re=i.value;if(!(!re||x.value||!y.value.trim()&&!Li(re))){if(y.value.trim()){await F();return}await Y()}}async function F(){const re=i.value,ne=y.value.trim();if(!(!re||!ne||x.value)){x.value=!0,_.value="";try{await Nc(re.id,ne),y.value=""}catch(Re){_.value=Re instanceof Error?Re.message:String(Re)}finally{x.value=!1}}}async function N(){const re=i.value,ne=y.value.trim();if(!(!re||!ne||x.value)){x.value=!0,_.value="";try{await Nc(re.id,ne,"steer"),y.value="",await t.refetch()}catch(Re){_.value=Re instanceof Error?Re.message:String(Re)}finally{x.value=!1}}}async function G(re){const ne=i.value;ne&&await q(()=>p4(ne.id,re))}async function P(re){const ne=i.value;ne&&await q(()=>f4(ne.id,re))}async function j(re){const ne=i.value;ne&&await q(()=>m4(ne.id,re))}async function q(re){if(!x.value){x.value=!0,_.value="";try{await re(),await t.refetch()}catch(ne){_.value=ne instanceof Error?ne.message:String(ne)}finally{x.value=!1}}}async function Y(){const re=i.value;if(!(!re||!Li(re)||x.value||y.value.trim())){x.value=!0,_.value="";try{await S4(re.id),await t.refetch()}catch(ne){_.value=ne instanceof Error?ne.message:String(ne)}finally{x.value=!1}}}async function te(re){const ne=i.value;if(!(!ne||!Cf(ne)||x.value)){x.value=!0,_.value="";try{await g4(ne.id,re),await t.refetch()}catch(Re){_.value=Re instanceof Error?Re.message:String(Re)}finally{x.value=!1}}}function he(re){const ne=n.data.value||[];if(re.appSessionId){const se=ne.find(Le=>Le.id===re.appSessionId&&Le.status==="running");if(se)return se}const Re=typeof re.providerMeta?.short=="string"?re.providerMeta.short:"";return Re?ne.find(se=>se.status==="running"&&se.ai?.claude?.short===Re):void 0}function Se(re){return he(re)?.title||re.agent}return(re,ne)=>(I(),V("section",M7,[k("header",z7,[k("div",null,[ne[1]||(ne[1]=k("span",null,"AI Sessions",-1)),k("span",D7,[k("strong",$7,Z($.value.active)+" Active",1),k("strong",P7,Z($.value.idle)+" Idle",1),k("strong",B7,Z($.value.waiting)+" Waiting",1)])]),k("small",null,Z(z.value),1)]),g(t).isLoading.value?(I(),V("div",L7,"Loading sessions...")):s.value.length?(I(),V("div",U7,[T(g(kn),{class:"ai-session-list",role:"listbox","aria-label":"AI session list"},{default:D(()=>[k("div",q7,[(I(!0),V(rt,null,$t(s.value,Re=>(I(),ye(N7,{key:Re.id,"expanded-preview":g(p),"has-app-session":!!he(Re),"prompt-count":g(c)(Re),"prompt-index":g(d)(Re),selected:i.value?.id===Re.id,session:Re,"session-title":Se(Re),onCollapseExpandedPreview:g(f),onExpandMessage:g(m),onExpandPrompt:g(w),onNextPrompt:g(o),onOpenAppSession:S,onPreviousPrompt:g(l),onSelect:C},null,8,["expanded-preview","has-app-session","prompt-count","prompt-index","selected","session","session-title","onCollapseExpandedPreview","onExpandMessage","onExpandPrompt","onNextPrompt","onPreviousPrompt"]))),128))])]),_:1}),i.value?(I(),ye(w7,{key:0,"message-draft":y.value,"onUpdate:messageDraft":ne[0]||(ne[0]=Re=>y.value=Re),busy:x.value,error:_.value,"has-app-session":!!he(i.value),"prompt-index":g(d)(i.value),session:i.value,"session-title":Se(i.value),onOpenAppSession:S,onRemoveQueued:j,onResolveApproval:te,onRetryQueued:P,onRunAction:E,onSteerDraft:N,onSteerQueued:G},null,8,["message-draft","busy","error","has-app-session","prompt-index","session","session-title"])):pe("",!0)])):(I(),V("div",F7,"No AI sessions yet."))]))}}),V7=Pa(H7,[["__scopeId","data-v-28f6ca67"]]),G7={class:"desktop-workspace"},Z7={key:0,class:"desktop-tabs"},j7={class:"workspace-workbar"},K7={class:"workspace-tab-list"},W7=["draggable","onClick","onKeydown","onDragstart","onDrop"],Q7=["aria-invalid","disabled","title","onKeydown","onBlur"],J7={key:1,class:"workspace-tab-title"},Y7={class:"tab-kind"},X7=["onClick"],e8=["src","title"],t8={key:2,class:"gui-session"},n8=["src","title"],r8={key:1,class:"logs-empty"},s8={key:4,class:"logs-empty"},a8={key:2,class:"logs-empty"},i8={key:1,class:"desktop-empty"},o8=Ae({__name:"WorkspaceTabs",setup(e){const t=jr(),n=hs(),r=Gs(),s=Vs(),a=be(()=>r.tabs.find(q=>q.id===r.activeTabId)),i=be(()=>m0(a.value,s.data.value||[])),o=Ce(""),l=Ce(""),c=Ce(""),d=Ce(""),f=Ce(!1),m=Ce();function p(q){m.value=q instanceof HTMLInputElement?q:void 0}On(()=>{if(!s.data.value)return;const q=s.data.value||[];r.pruneSession(new Set(q.map(Y=>Y.id)),Ds(q)),r.syncSessionTitles(q)});function w(q){return q.type==="app-vnc"||q.type==="app-web"||q.type==="app-tty"}function y(q){w(q)&&(r.setActive(q.id),l.value=q.id,c.value=q.title,d.value="",f.value=!1,Yn(()=>m.value?.select()))}function x(){l.value="",c.value="",d.value="",f.value=!1}async function _(q){if(l.value!==q.id||!w(q)||f.value)return;const Y=c.value.trim();if(!Y){d.value="Session title is required.",Yn(()=>m.value?.focus());return}if(Y===q.title){x();return}f.value=!0;try{const te=await A4(q.sessionId,Y);r.syncSessionTitles([te]),x()}catch(te){f.value=!1,d.value=te instanceof Error?te.message:String(te),Yn(()=>m.value?.focus())}}function $(q){if(q.vnc?.backend==="kasmvnc"){const Se=r.guiHidpi?S():1,re=new URLSearchParams({path:Ei(`/api/apps/sessions/${q.id}/web/websockify`),autoconnect:"1",resize:r.vncResizeMode,enable_hidpi:r.guiHidpi&&Se>1?"1":"0",show_control_bar:"1"}),ne=C(q,Se);return r.vncResizeMode==="scale"&&ne&&(re.set("forced_resolution_x",String(ne.width)),re.set("forced_resolution_y",String(ne.height))),n.token&&re.set("token",n.token),`${Pn(q.vnc.webPath)}?${re.toString()}`}const Y=n.token?`?token=${encodeURIComponent(n.token)}`:"",te=q.vnc?.webPath?`${Ei(q.vnc.webPath)}${Y}`:"",he=new URLSearchParams({path:te,autoconnect:"1",resize:r.vncResizeMode});return Pn(`/api/novnc/vnc.html?${he.toString()}`)}function z(q,Y){if(Y.vnc?.backend!=="kasmvnc")return;const te=q.target;if(!(te instanceof HTMLIFrameElement))return;te.contentWindow?.postMessage({action:"resize",value:r.vncResizeMode},"*");const he=C(Y,r.guiHidpi?S():1);r.vncResizeMode==="scale"&&he&&te.contentWindow?.postMessage({action:"set_resolution",value_x:he.width,value_y:he.height},"*")}function C(q,Y){if(!q.display)return;const te=Y>1?Y:1;return{width:Math.max(1,Math.round(q.display.width/te)),height:Math.max(1,Math.round(q.display.height/te))}}function S(){return typeof window>"u"?1:window.devicePixelRatio||1}function E(q){const Y=Pn(q.web?.webPath||"");return n.token?`${Y}${Y.includes("?")?"&":"?"}token=${encodeURIComponent(n.token)}`:Y}function F(q){return q.type==="ai-sessions"?"ai":q.type==="logs"?"logs":q.type==="shared-vnc"?"shared":q.type==="app-vnc"?"vnc":q.type==="app-web"?"web":"tty"}function N(q,Y){o.value=Y.id,q.dataTransfer?.setData("text/plain",Y.id),q.dataTransfer&&(q.dataTransfer.effectAllowed="move")}function G(q,Y){if(o.value){const he=(q.currentTarget instanceof HTMLElement?q.currentTarget:void 0)?.getBoundingClientRect(),Se=he&&q.clientX>he.left+he.width/2?"after":"before";r.moveTab(o.value,Y.id,Se)}P()}function P(){o.value=""}async function j(q){if(q.type==="ai-sessions"){r.close(q.id);return}if(q.type==="app-vnc"||q.type==="app-web"||q.type==="app-tty"){await cs(q.sessionId),r.close(q.id),await t.invalidateQueries({queryKey:["status"]});return}r.close(q.id)}return(q,Y)=>(I(),V("section",G7,[g(r).tabs.length?(I(),V("div",Z7,[k("div",j7,[T(g(kn),{class:"workspace-tab-list-scroll"},{default:D(()=>[k("div",K7,[(I(!0),V(rt,null,$t(g(r).tabs,te=>(I(),ye(g(Kh),{key:te.id},{default:D(()=>[T(g(Qh),{"as-child":""},{default:D(()=>[k("div",{class:wt(["workspace-tab",{active:g(r).activeTabId===te.id,dragging:o.value===te.id,editing:l.value===te.id}]),role:"button",tabindex:"0",draggable:l.value!==te.id,onClick:he=>g(r).setActive(te.id),onKeydown:[Ts(he=>g(r).setActive(te.id),["enter"]),Ts(jt(he=>g(r).setActive(te.id),["prevent"]),["space"])],onDragstart:he=>N(he,te),onDragover:Y[2]||(Y[2]=jt(()=>{},["prevent"])),onDragenter:Y[3]||(Y[3]=jt(()=>{},["prevent"])),onDrop:jt(he=>G(he,te),["prevent"]),onDragend:P},[l.value===te.id?Vi((I(),V("input",{key:0,ref_for:!0,ref:p,"onUpdate:modelValue":Y[0]||(Y[0]=he=>c.value=he),class:"workspace-tab-title-input","aria-invalid":!!d.value,disabled:f.value,title:d.value,maxlength:"120",onClick:Y[1]||(Y[1]=jt(()=>{},["stop"])),onKeydown:[Ts(jt(he=>_(te),["stop","prevent"]),["enter"]),Ts(jt(x,["stop","prevent"]),["escape"])],onBlur:he=>_(te)},null,40,Q7)),[[Gi,c.value]]):(I(),V("span",J7,Z(te.title),1)),k("span",Y7,Z(F(te)),1),k("span",{class:"tab-close",title:"Close tab","aria-label":"Close tab",onClick:jt(he=>j(te),["stop"])},[T(g(us),{size:13,"stroke-width":2.2})],8,X7)],42,W7)]),_:2},1024),T(g(Wh),null,{default:D(()=>[T(g(Ss),{disabled:!w(te),onSelect:he=>y(te)},{default:D(()=>[...Y[5]||(Y[5]=[de("Rename session",-1)])]),_:1},8,["disabled","onSelect"])]),_:2},1024)]),_:2},1024))),128))])]),_:1})]),k("div",{class:wt(["workspace-tab-panel desktop-tab-panel",{"workspace-log-panel":a.value?.type==="logs","workspace-ai-panel":a.value?.type==="ai-sessions"}])},[a.value?.type==="ai-sessions"?(I(),ye(V7,{key:0})):i.value&&a.value?(I(),V(rt,{key:1},[a.value.type==="app-tty"&&i.value.status==="running"?(I(),ye(ap,{key:0,session:i.value},null,8,["session"])):a.value.type==="app-web"&&i.value.status==="running"&&i.value.web?(I(),V("iframe",{key:1,class:"web-frame",src:E(i.value),title:i.value.title,allow:"clipboard-read; clipboard-write; fullscreen"},null,8,e8)):a.value.type==="app-vnc"||a.value.type==="shared-vnc"?(I(),V("div",t8,[i.value.vnc?(I(),V("iframe",{key:`${i.value.id}:${g(r).vncResizeMode}:${g(r).guiHidpi?"hidpi":"1x"}`,class:"vnc-frame workspace-vnc-frame",src:$(i.value),title:`${a.value.title} VNC`,allow:"clipboard-read; clipboard-write; fullscreen",onLoad:Y[4]||(Y[4]=te=>z(te,i.value))},null,40,n8)):(I(),V("p",r8,"VNC is unavailable for this session."))])):a.value.type==="logs"?(I(),ye(g(kn),{key:3,class:"workspace-log-scroll"},{default:D(()=>[T(sp,{session:i.value},null,8,["session"])]),_:1})):(I(),V("p",s8,"Runtime view is unavailable for this session state."))],64)):(I(),V("p",a8,"The selected workspace tab no longer has a running session."))],2)])):(I(),V("div",i8,[...Y[6]||(Y[6]=[k("h1",null,"TaskHandoff Desktop",-1),k("p",null,"Launch an app from the dock.",-1)])]))]))}});var Wu;function W(e,t,n){function r(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:i,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const c=i.prototype,d=Object.keys(c);for(let f=0;f<d.length;f++){const m=d[f];m in o||(o[m]=c[m].bind(o))}}const s=n?.Parent??Object;class a extends s{}Object.defineProperty(a,"name",{value:e});function i(o){var l;const c=n?.Parent?new a:this;r(c,o),(l=c._zod).deferred??(l.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:o=>n?.Parent&&o instanceof n.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Ns extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Rf extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Wu=globalThis).__zod_globalConfig??(Wu.__zod_globalConfig={});const H0=globalThis.__zod_globalConfig;function vr(e){return H0}function Of(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function Wl(e,t){return typeof t=="bigint"?t.toString():t}function uo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function V0(e){return e==null}function G0(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function l8(e,t){const n=e/t,r=Math.round(n),s=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<s?0:n-r}const Qu=Symbol("evaluating");function ht(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Qu)return r===void 0&&(r=Qu,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function vs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Qr(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Ju(e){return JSON.stringify(e)}function c8(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const If="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ca(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const u8=uo(()=>{if(H0.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Fs(e){if(Ca(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Ca(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Nf(e){return Fs(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const d8=new Set(["string","number","symbol"]);function Us(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jr(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Oe(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function h8(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const p8={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function f8(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const a=Qr(e._zod.def,{get shape(){const i={};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(i[o]=n.shape[o])}return vs(this,"shape",i),i},checks:[]});return Jr(e,a)}function m8(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const a=Qr(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete i[o]}return vs(this,"shape",i),i},checks:[]});return Jr(e,a)}function g8(e,t){if(!Fs(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const a=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(a,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Qr(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return vs(this,"shape",a),a}});return Jr(e,s)}function v8(e,t){if(!Fs(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Qr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return vs(this,"shape",r),r}});return Jr(e,n)}function b8(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Qr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return vs(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Jr(e,n)}function y8(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=Qr(t._zod.def,{get shape(){const o=t._zod.def.shape,l={...o};if(n)for(const c in n){if(!(c in o))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=e?new e({type:"optional",innerType:o[c]}):o[c])}else for(const c in o)l[c]=e?new e({type:"optional",innerType:o[c]}):o[c];return vs(this,"shape",l),l},checks:[]});return Jr(t,i)}function w8(e,t,n){const r=Qr(t._zod.def,{get shape(){const s=t._zod.def.shape,a={...s};if(n)for(const i in n){if(!(i in a))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(a[i]=new e({type:"nonoptional",innerType:s[i]}))}else for(const i in s)a[i]=new e({type:"nonoptional",innerType:s[i]});return vs(this,"shape",a),a}});return Jr(t,r)}function Cs(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function k8(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Rs(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ui(e){return typeof e=="string"?e:e?.message}function br(e,t,n){const r=e.message?e.message:ui(e.inst?._zod.def?.error?.(e))??ui(t?.error?.(e))??ui(n.customError?.(e))??ui(n.localeError?.(e))??"Invalid input",{inst:s,continue:a,input:i,...o}=e;return o.path??(o.path=[]),o.message=r,t?.reportInput&&(o.input=i),o}function Z0(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ra(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Mf=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Wl,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zf=W("$ZodError",Mf),Df=W("$ZodError",Mf,{Parent:Error});function x8(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function S8(e,t=n=>n.message){const n={_errors:[]},r=(s,a=[])=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(o=>r({issues:o},[...a,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...a,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...a,...i.path]);else{const o=[...a,...i.path];if(o.length===0)n._errors.push(t(i));else{let l=n,c=0;for(;c<o.length;){const d=o[c];c===o.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(i))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}}};return r(e),n}const j0=e=>(t,n,r,s)=>{const a=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new Ns;if(i.issues.length){const o=new(s?.Err??e)(i.issues.map(l=>br(l,a,vr())));throw If(o,s?.callee),o}return i.value},K0=e=>async(t,n,r,s)=>{const a=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise&&(i=await i),i.issues.length){const o=new(s?.Err??e)(i.issues.map(l=>br(l,a,vr())));throw If(o,s?.callee),o}return i.value},ho=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new Ns;return a.issues.length?{success:!1,error:new(e??zf)(a.issues.map(i=>br(i,s,vr())))}:{success:!0,data:a.value}},_8=ho(Df),po=e=>async(t,n,r)=>{const s=r?{...r,async:!0}:{async:!0};let a=t._zod.run({value:n,issues:[]},s);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(i=>br(i,s,vr())))}:{success:!0,data:a.value}},E8=po(Df),A8=e=>(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return j0(e)(t,n,s)},T8=e=>(t,n,r)=>j0(e)(t,n,r),C8=e=>async(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return K0(e)(t,n,s)},R8=e=>async(t,n,r)=>K0(e)(t,n,r),O8=e=>(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return ho(e)(t,n,s)},I8=e=>(t,n,r)=>ho(e)(t,n,r),N8=e=>async(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return po(e)(t,n,s)},M8=e=>async(t,n,r)=>po(e)(t,n,r),z8=/^[cC][0-9a-z]{6,}$/,D8=/^[0-9a-z]+$/,$8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,P8=/^[0-9a-vA-V]{20}$/,B8=/^[A-Za-z0-9]{27}$/,L8=/^[a-zA-Z0-9_-]{21}$/,F8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,U8=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Yu=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,q8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,H8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function V8(){return new RegExp(H8,"u")}const G8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Z8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,j8=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,K8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,W8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$f=/^[A-Za-z0-9_-]*$/,Q8=/^https?$/,J8=/^\+[1-9]\d{6,14}$/,Pf="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Y8=new RegExp(`^${Pf}$`);function Bf(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function X8(e){return new RegExp(`^${Bf(e)}$`)}function e9(e){const t=Bf({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Pf}T(?:${r})$`)}const t9=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},n9=/^-?\d+$/,Lf=/^-?\d+(?:\.\d+)?$/,r9=/^(?:true|false)$/i,s9=/^[^A-Z]*$/,a9=/^[^a-z]*$/,gn=W("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ff={number:"number",bigint:"bigint",object:"date"},Uf=W("$ZodCheckLessThan",(e,t)=>{gn.init(e,t);const n=Ff[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,a=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qf=W("$ZodCheckGreaterThan",(e,t)=>{gn.init(e,t);const n=Ff[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,a=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),i9=W("$ZodCheckMultipleOf",(e,t)=>{gn.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):l8(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),o9=W("$ZodCheckNumberFormat",(e,t)=>{gn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,a]=p8[t.format];e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,o.minimum=s,o.maximum=a,n&&(o.pattern=n9)}),e._zod.check=i=>{const o=i.value;if(n){if(!Number.isInteger(o)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?i.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}o<s&&i.issues.push({origin:"number",input:o,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),o>a&&i.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),l9=W("$ZodCheckMaxLength",(e,t)=>{var n;gn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!V0(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const s=r.value;if(s.length<=t.maximum)return;const i=Z0(s);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),c9=W("$ZodCheckMinLength",(e,t)=>{var n;gn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!V0(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const i=Z0(s);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),u9=W("$ZodCheckLengthEquals",(e,t)=>{var n;gn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!V0(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,a=s.length;if(a===t.length)return;const i=Z0(s),o=a>t.length;r.issues.push({origin:i,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),fo=W("$ZodCheckStringFormat",(e,t)=>{var n,r;gn.init(e,t),e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),d9=W("$ZodCheckRegex",(e,t)=>{fo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),h9=W("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=s9),fo.init(e,t)}),p9=W("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=a9),fo.init(e,t)}),f9=W("$ZodCheckIncludes",(e,t)=>{gn.init(e,t);const n=Us(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),m9=W("$ZodCheckStartsWith",(e,t)=>{gn.init(e,t);const n=new RegExp(`^${Us(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),g9=W("$ZodCheckEndsWith",(e,t)=>{gn.init(e,t);const n=new RegExp(`.*${Us(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),v9=W("$ZodCheckOverwrite",(e,t)=>{gn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class b9{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
325
|
+
`).filter(i=>i),s=Math.min(...r.map(i=>i.length-i.trimStart().length)),a=r.map(i=>i.slice(s)).map(i=>" ".repeat(this.indent*2)+i);for(const i of a)this.content.push(i)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...n,s.join(`
|
|
326
|
+
`))}}const y9={major:4,minor:4,patch:3},Ct=W("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=y9;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const a of s._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(i,o,l)=>{let c=Cs(i),d;for(const f of o){if(f._zod.def.when){if(k8(i)||!f._zod.def.when(i))continue}else if(c)continue;const m=i.issues.length,p=f._zod.check(i);if(p instanceof Promise&&l?.async===!1)throw new Ns;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,i.issues.length!==m&&(c||(c=Cs(i,m)))});else{if(i.issues.length===m)continue;c||(c=Cs(i,m))}}return d?d.then(()=>i):i},a=(i,o,l)=>{if(Cs(i))return i.aborted=!0,i;const c=s(o,r,l);if(c instanceof Promise){if(l.async===!1)throw new Ns;return c.then(d=>e._zod.parse(d,l))}return e._zod.parse(c,l)};e._zod.run=(i,o)=>{if(o.skipChecks)return e._zod.parse(i,o);if(o.direction==="backward"){const c=e._zod.parse({value:i.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(d=>a(d,i,o)):a(c,i,o)}const l=e._zod.parse(i,o);if(l instanceof Promise){if(o.async===!1)throw new Ns;return l.then(c=>s(c,r,o))}return s(l,r,o)}}ht(e,"~standard",()=>({validate:s=>{try{const a=_8(e,s);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return E8(e,s).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),W0=W("$ZodString",(e,t)=>{Ct.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??t9(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Et=W("$ZodStringFormat",(e,t)=>{fo.init(e,t),W0.init(e,t)}),w9=W("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=U8),Et.init(e,t)}),k9=W("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Yu(r))}else t.pattern??(t.pattern=Yu());Et.init(e,t)}),x9=W("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=q8),Et.init(e,t)}),S9=W("$ZodURL",(e,t)=>{Et.init(e,t),e._zod.check=n=>{try{const r=n.value.trim();if(!t.normalize&&t.protocol?.source===Q8.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),_9=W("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=V8()),Et.init(e,t)}),E9=W("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=L8),Et.init(e,t)}),A9=W("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=z8),Et.init(e,t)}),T9=W("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=D8),Et.init(e,t)}),C9=W("$ZodULID",(e,t)=>{t.pattern??(t.pattern=$8),Et.init(e,t)}),R9=W("$ZodXID",(e,t)=>{t.pattern??(t.pattern=P8),Et.init(e,t)}),O9=W("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=B8),Et.init(e,t)}),I9=W("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=e9(t)),Et.init(e,t)}),N9=W("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Y8),Et.init(e,t)}),M9=W("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=X8(t)),Et.init(e,t)}),z9=W("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=F8),Et.init(e,t)}),D9=W("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=G8),Et.init(e,t),e._zod.bag.format="ipv4"}),$9=W("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Z8),Et.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),P9=W("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=j8),Et.init(e,t)}),B9=W("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=K8),Et.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,a]=r;if(!a)throw new Error;const i=Number(a);if(`${i}`!==a)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Hf(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const L9=W("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=W8),Et.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Hf(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function F9(e){if(!$f.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Hf(n)}const U9=W("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$f),Et.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{F9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),q9=W("$ZodE164",(e,t)=>{t.pattern??(t.pattern=J8),Et.init(e,t)});function H9(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const V9=W("$ZodJWT",(e,t)=>{Et.init(e,t),e._zod.check=n=>{H9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Vf=W("$ZodNumber",(e,t)=>{Ct.init(e,t),e._zod.pattern=e._zod.bag.pattern??Lf,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const a=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...a?{received:a}:{}}),n}}),G9=W("$ZodNumberFormat",(e,t)=>{o9.init(e,t),Vf.init(e,t)}),Z9=W("$ZodBoolean",(e,t)=>{Ct.init(e,t),e._zod.pattern=r9,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),j9=W("$ZodUnknown",(e,t)=>{Ct.init(e,t),e._zod.parse=n=>n}),K9=W("$ZodNever",(e,t)=>{Ct.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Xu(e,t,n){e.issues.length&&t.issues.push(...Rs(n,e.issues)),t.value[n]=e.value}const W9=W("$ZodArray",(e,t)=>{Ct.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const a=[];for(let i=0;i<s.length;i++){const o=s[i],l=t.element._zod.run({value:o,issues:[]},r);l instanceof Promise?a.push(l.then(c=>Xu(c,n,i))):Xu(l,n,i)}return a.length?Promise.all(a).then(()=>n):n}});function Fi(e,t,n,r,s,a){const i=n in r;if(e.issues.length){if(s&&a&&!i)return;t.issues.push(...Rs(n,e.issues))}if(!i&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?i&&(t.value[n]=void 0):t.value[n]=e.value}function Gf(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=h8(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Zf(e,t,n,r,s,a){const i=[],o=s.keySet,l=s.catchall._zod,c=l.def.type,d=l.optin==="optional",f=l.optout==="optional";for(const m in t){if(m==="__proto__"||o.has(m))continue;if(c==="never"){i.push(m);continue}const p=l.run({value:t[m],issues:[]},r);p instanceof Promise?e.push(p.then(w=>Fi(w,n,m,t,d,f))):Fi(p,n,m,t,d,f)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const Q9=W("$ZodObject",(e,t)=>{if(Ct.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const o=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...o};return Object.defineProperty(t,"shape",{value:l}),l}})}const r=uo(()=>Gf(t));ht(e._zod,"propValues",()=>{const o=t.shape,l={};for(const c in o){const d=o[c]._zod;if(d.values){l[c]??(l[c]=new Set);for(const f of d.values)l[c].add(f)}}return l});const s=Ca,a=t.catchall;let i;e._zod.parse=(o,l)=>{i??(i=r.value);const c=o.value;if(!s(c))return o.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),o;o.value={};const d=[],f=i.shape;for(const m of i.keys){const p=f[m],w=p._zod.optin==="optional",y=p._zod.optout==="optional",x=p._zod.run({value:c[m],issues:[]},l);x instanceof Promise?d.push(x.then(_=>Fi(_,o,m,c,w,y))):Fi(x,o,m,c,w,y)}return a?Zf(d,c,o,l,r.value,e):d.length?Promise.all(d).then(()=>o):o}}),J9=W("$ZodObjectJIT",(e,t)=>{Q9.init(e,t);const n=e._zod.parse,r=uo(()=>Gf(t)),s=m=>{const p=new b9(["shape","payload","ctx"]),w=r.value,y=z=>{const C=Ju(z);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};p.write("const input = payload.value;");const x=Object.create(null);let _=0;for(const z of w.keys)x[z]=`key_${_++}`;p.write("const newResult = {};");for(const z of w.keys){const C=x[z],S=Ju(z),E=m[z],F=E?._zod?.optin==="optional",N=E?._zod?.optout==="optional";p.write(`const ${C} = ${y(z)};`),F&&N?p.write(`
|
|
327
|
+
if (${C}.issues.length) {
|
|
328
|
+
if (${S} in input) {
|
|
329
|
+
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
330
|
+
...iss,
|
|
331
|
+
path: iss.path ? [${S}, ...iss.path] : [${S}]
|
|
332
|
+
})));
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (${C}.value === undefined) {
|
|
337
|
+
if (${S} in input) {
|
|
338
|
+
newResult[${S}] = undefined;
|
|
339
|
+
}
|
|
340
|
+
} else {
|
|
341
|
+
newResult[${S}] = ${C}.value;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
`):F?p.write(`
|
|
345
|
+
if (${C}.issues.length) {
|
|
346
|
+
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
347
|
+
...iss,
|
|
348
|
+
path: iss.path ? [${S}, ...iss.path] : [${S}]
|
|
349
|
+
})));
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if (${C}.value === undefined) {
|
|
353
|
+
if (${S} in input) {
|
|
354
|
+
newResult[${S}] = undefined;
|
|
355
|
+
}
|
|
356
|
+
} else {
|
|
357
|
+
newResult[${S}] = ${C}.value;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
`):p.write(`
|
|
361
|
+
const ${C}_present = ${S} in input;
|
|
362
|
+
if (${C}.issues.length) {
|
|
363
|
+
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
364
|
+
...iss,
|
|
365
|
+
path: iss.path ? [${S}, ...iss.path] : [${S}]
|
|
366
|
+
})));
|
|
367
|
+
}
|
|
368
|
+
if (!${C}_present && !${C}.issues.length) {
|
|
369
|
+
payload.issues.push({
|
|
370
|
+
code: "invalid_type",
|
|
371
|
+
expected: "nonoptional",
|
|
372
|
+
input: undefined,
|
|
373
|
+
path: [${S}]
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (${C}_present) {
|
|
378
|
+
if (${C}.value === undefined) {
|
|
379
|
+
newResult[${S}] = undefined;
|
|
380
|
+
} else {
|
|
381
|
+
newResult[${S}] = ${C}.value;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
`)}p.write("payload.value = newResult;"),p.write("return payload;");const $=p.compile();return(z,C)=>$(m,z,C)};let a;const i=Ca,o=!H0.jitless,c=o&&u8.value,d=t.catchall;let f;e._zod.parse=(m,p)=>{f??(f=r.value);const w=m.value;return i(w)?o&&c&&p?.async===!1&&p.jitless!==!0?(a||(a=s(t.shape)),m=a(m,p),d?Zf([],w,m,p,f,e):m):n(m,p):(m.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),m)}});function ed(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const s=e.filter(a=>!Cs(a));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(i=>br(i,r,vr())))}),t)}const jf=W("$ZodUnion",(e,t)=>{Ct.init(e,t),ht(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ht(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ht(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ht(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${r.map(s=>G0(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,s)=>{if(n)return n(r,s);let a=!1;const i=[];for(const o of t.options){const l=o._zod.run({value:r.value,issues:[]},s);if(l instanceof Promise)i.push(l),a=!0;else{if(l.issues.length===0)return l;i.push(l)}}return a?Promise.all(i).then(o=>ed(o,r,e,s)):ed(i,r,e,s)}}),Y9=W("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,jf.init(e,t);const n=e._zod.parse;ht(e._zod,"propValues",()=>{const s={};for(const a of t.options){const i=a._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const[o,l]of Object.entries(i)){s[o]||(s[o]=new Set);for(const c of l)s[o].add(c)}}return s});const r=uo(()=>{const s=t.options,a=new Map;for(const i of s){const o=i._zod.propValues?.[t.discriminator];if(!o||o.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const l of o){if(a.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);a.set(l,i)}}return a});e._zod.parse=(s,a)=>{const i=s.value;if(!Ca(i))return s.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),s;const o=r.value.get(i?.[t.discriminator]);return o?o._zod.run(s,a):t.unionFallback||a.direction==="backward"?n(s,a):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:i,path:[t.discriminator],inst:e}),s)}}),X9=W("$ZodIntersection",(e,t)=>{Ct.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,a=t.left._zod.run({value:s,issues:[]},r),i=t.right._zod.run({value:s,issues:[]},r);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(([l,c])=>td(n,l,c)):td(n,a,i)}});function Ql(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fs(e)&&Fs(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(const a of r){const i=Ql(e[a],t[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};s[a]=i.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=e[r],a=t[r],i=Ql(s,a);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function td(e,t,n){const r=new Map;let s;for(const o of t.issues)if(o.code==="unrecognized_keys"){s??(s=o);for(const l of o.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(o);for(const o of n.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(o);const a=[...r].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(a.length&&s&&e.issues.push({...s,keys:a}),Cs(e))return e;const i=Ql(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const ew=W("$ZodRecord",(e,t)=>{Ct.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Fs(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const a=[],i=t.keyType._zod.values;if(i){n.value={};const o=new Set;for(const c of i)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){o.add(typeof c=="number"?c.toString():c);const d=t.keyType._zod.run({value:c,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>br(p,r,vr())),input:c,path:[c],inst:e});continue}const f=d.value,m=t.valueType._zod.run({value:s[c],issues:[]},r);m instanceof Promise?a.push(m.then(p=>{p.issues.length&&n.issues.push(...Rs(c,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Rs(c,m.issues)),n.value[f]=m.value)}let l;for(const c in s)o.has(c)||(l=l??[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:l})}else{n.value={};for(const o of Reflect.ownKeys(s)){if(o==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,o))continue;let l=t.keyType._zod.run({value:o,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof o=="string"&&Lf.test(o)&&l.issues.length){const f=t.keyType._zod.run({value:Number(o),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(l=f)}if(l.issues.length){t.mode==="loose"?n.value[o]=s[o]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(f=>br(f,r,vr())),input:o,path:[o],inst:e});continue}const d=t.valueType._zod.run({value:s[o],issues:[]},r);d instanceof Promise?a.push(d.then(f=>{f.issues.length&&n.issues.push(...Rs(o,f.issues)),n.value[l.value]=f.value})):(d.issues.length&&n.issues.push(...Rs(o,d.issues)),n.value[l.value]=d.value)}}return a.length?Promise.all(a).then(()=>n):n}}),tw=W("$ZodEnum",(e,t)=>{Ct.init(e,t);const n=Of(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>d8.has(typeof s)).map(s=>typeof s=="string"?Us(s):s.toString()).join("|")})$`),e._zod.parse=(s,a)=>{const i=s.value;return r.has(i)||s.issues.push({code:"invalid_value",values:n,input:i,inst:e}),s}}),nw=W("$ZodLiteral",(e,t)=>{if(Ct.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Us(r):r?Us(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,s)=>{const a=r.value;return n.has(a)||r.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),r}}),rw=W("$ZodTransform",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Rf(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(i=>(n.value=i,n.fallback=!0,n));if(s instanceof Promise)throw new Ns;return n.value=s,n.fallback=!0,n}});function nd(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Kf=W("$ZodOptional",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ht(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ht(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${G0(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const s=n.value,a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>nd(i,s)):nd(a,s)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),sw=W("$ZodExactOptional",(e,t)=>{Kf.init(e,t),ht(e._zod,"values",()=>t.innerType._zod.values),ht(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),aw=W("$ZodNullable",(e,t)=>{Ct.init(e,t),ht(e._zod,"optin",()=>t.innerType._zod.optin),ht(e._zod,"optout",()=>t.innerType._zod.optout),ht(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${G0(n.source)}|null)$`):void 0}),ht(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),iw=W("$ZodDefault",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",ht(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>rd(a,t)):rd(s,t)}});function rd(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ow=W("$ZodPrefault",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",ht(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),lw=W("$ZodNonOptional",(e,t)=>{Ct.init(e,t),ht(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>sd(a,e)):sd(s,e)}});function sd(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const cw=W("$ZodCatch",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",ht(e._zod,"optout",()=>t.innerType._zod.optout),ht(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>br(i,r,vr()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(a=>br(a,r,vr()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),uw=W("$ZodPipe",(e,t)=>{Ct.init(e,t),ht(e._zod,"values",()=>t.in._zod.values),ht(e._zod,"optin",()=>t.in._zod.optin),ht(e._zod,"optout",()=>t.out._zod.optout),ht(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(i=>di(i,t.in,r)):di(a,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(a=>di(a,t.out,r)):di(s,t.out,r)}});function di(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const dw=W("$ZodReadonly",(e,t)=>{Ct.init(e,t),ht(e._zod,"propValues",()=>t.innerType._zod.propValues),ht(e._zod,"values",()=>t.innerType._zod.values),ht(e._zod,"optin",()=>t.innerType?._zod?.optin),ht(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(ad):ad(s)}});function ad(e){return e.value=Object.freeze(e.value),e}const hw=W("$ZodCustom",(e,t)=>{gn.init(e,t),Ct.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(a=>id(a,n,r,e));id(s,n,r,e)}});function id(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(Ra(s))}}var od;class pw{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const s={...r,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function fw(){return new pw}(od=globalThis).__zod_globalRegistry??(od.__zod_globalRegistry=fw());const ca=globalThis.__zod_globalRegistry;function mw(e,t){return new e({type:"string",...Oe(t)})}function gw(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Oe(t)})}function ld(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Oe(t)})}function vw(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Oe(t)})}function bw(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Oe(t)})}function yw(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Oe(t)})}function ww(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Oe(t)})}function kw(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Oe(t)})}function xw(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Oe(t)})}function Sw(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Oe(t)})}function _w(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Oe(t)})}function Ew(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Oe(t)})}function Aw(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Oe(t)})}function Tw(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Oe(t)})}function Cw(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Oe(t)})}function Rw(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Oe(t)})}function Ow(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Oe(t)})}function Iw(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Oe(t)})}function Nw(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Oe(t)})}function Mw(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Oe(t)})}function zw(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Oe(t)})}function Dw(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Oe(t)})}function $w(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Oe(t)})}function Pw(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Oe(t)})}function Bw(e,t){return new e({type:"string",format:"date",check:"string_format",...Oe(t)})}function Lw(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Oe(t)})}function Fw(e,t){return new e({type:"string",format:"duration",check:"string_format",...Oe(t)})}function Uw(e,t){return new e({type:"number",checks:[],...Oe(t)})}function qw(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Oe(t)})}function Hw(e,t){return new e({type:"boolean",...Oe(t)})}function Vw(e){return new e({type:"unknown"})}function Gw(e,t){return new e({type:"never",...Oe(t)})}function cd(e,t){return new Uf({check:"less_than",...Oe(t),value:e,inclusive:!1})}function tl(e,t){return new Uf({check:"less_than",...Oe(t),value:e,inclusive:!0})}function ud(e,t){return new qf({check:"greater_than",...Oe(t),value:e,inclusive:!1})}function nl(e,t){return new qf({check:"greater_than",...Oe(t),value:e,inclusive:!0})}function dd(e,t){return new i9({check:"multiple_of",...Oe(t),value:e})}function Wf(e,t){return new l9({check:"max_length",...Oe(t),maximum:e})}function Ui(e,t){return new c9({check:"min_length",...Oe(t),minimum:e})}function Qf(e,t){return new u9({check:"length_equals",...Oe(t),length:e})}function Zw(e,t){return new d9({check:"string_format",format:"regex",...Oe(t),pattern:e})}function jw(e){return new h9({check:"string_format",format:"lowercase",...Oe(e)})}function Kw(e){return new p9({check:"string_format",format:"uppercase",...Oe(e)})}function Ww(e,t){return new f9({check:"string_format",format:"includes",...Oe(t),includes:e})}function Qw(e,t){return new m9({check:"string_format",format:"starts_with",...Oe(t),prefix:e})}function Jw(e,t){return new g9({check:"string_format",format:"ends_with",...Oe(t),suffix:e})}function Ws(e){return new v9({check:"overwrite",tx:e})}function Yw(e){return Ws(t=>t.normalize(e))}function Xw(){return Ws(e=>e.trim())}function ek(){return Ws(e=>e.toLowerCase())}function tk(){return Ws(e=>e.toUpperCase())}function nk(){return Ws(e=>c8(e))}function rk(e,t,n){return new e({type:"array",element:t,...Oe(n)})}function sk(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Oe(n)})}function ak(e,t){const n=ik(r=>(r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ra(s,r.value,n._zod.def));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=n),a.continue??(a.continue=!n._zod.def.abort),r.issues.push(Ra(a))}},e(r.value,r)),t);return n}function ik(e,t){const n=new gn({check:"custom",...Oe(t)});return n._zod.check=e,n}function Jf(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ca,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ut(e,t,n={path:[],schemaPath:[]}){var r;const s=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const o=e._zod.toJSONSchema?.();if(o)i.schema=o;else{const d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,d);else{const m=i.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,m,d)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Ut(f,t,d),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(i.schema,l),t.io==="input"&&sn(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function Yf(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const i of e.seen.entries()){const o=e.metadataRegistry.get(i[0])?.id;if(o){const l=r.get(o);if(l&&l!==i[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(o,i[0])}}const s=i=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,m=e.external.uri??(w=>w);if(f)return{ref:m(f)};const p=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=p,{defId:p,ref:`${m("__shared")}#/${o}/${p}`}}if(i[1]===n)return{ref:"#"};const c=`#/${o}/`,d=i[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:c+d}},a=i=>{if(i[1].schema.$ref)return;const o=i[1],{ref:l,defId:c}=s(i);o.def={...o.schema},c&&(o.defId=c);const d=o.schema;for(const f in d)delete d[f];d.$ref=l};if(e.cycles==="throw")for(const i of e.seen.entries()){const o=i[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
|
|
386
|
+
|
|
387
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const o=i[1];if(t===i[0]){a(i);continue}if(e.external){const c=e.external.registry.get(i[0])?.id;if(t!==i[0]&&c){a(i);continue}}if(e.metadataRegistry.get(i[0])?.id){a(i);continue}if(o.cycle){a(i);continue}if(o.count>1&&e.reused==="ref"){a(i);continue}}}function Xf(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=o=>{const l=e.seen.get(o);if(l.ref===null)return;const c=l.def??l.schema,d={...c},f=l.ref;if(l.ref=null,f){r(f);const p=e.seen.get(f),w=p.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(w)):Object.assign(c,w),Object.assign(c,d),o._zod.parent===f)for(const x in c)x==="$ref"||x==="allOf"||x in d||delete c[x];if(w.$ref&&p.def)for(const x in c)x==="$ref"||x==="allOf"||x in p.def&&JSON.stringify(c[x])===JSON.stringify(p.def[x])&&delete c[x]}const m=o._zod.parent;if(m&&m!==f){r(m);const p=e.seen.get(m);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(const w in c)w==="$ref"||w==="allOf"||w in p.def&&JSON.stringify(c[w])===JSON.stringify(p.def[w])&&delete c[w]}e.override({zodSchema:o,jsonSchema:c,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())r(o[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(o)}Object.assign(s,n.def??n.schema);const a=e.metadataRegistry.get(t)?.id;a!==void 0&&s.id===a&&delete s.id;const i=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,i[l.defId]=l.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{const o=JSON.parse(JSON.stringify(s));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:qi(t,"input",e.processors),output:qi(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function sn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return sn(r.element,n);if(r.type==="set")return sn(r.valueType,n);if(r.type==="lazy")return sn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return sn(r.innerType,n);if(r.type==="intersection")return sn(r.left,n)||sn(r.right,n);if(r.type==="record"||r.type==="map")return sn(r.keyType,n)||sn(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:sn(r.in,n)||sn(r.out,n);if(r.type==="object"){for(const s in r.shape)if(sn(r.shape[s],n))return!0;return!1}if(r.type==="union"){for(const s of r.options)if(sn(s,n))return!0;return!1}if(r.type==="tuple"){for(const s of r.items)if(sn(s,n))return!0;return!!(r.rest&&sn(r.rest,n))}return!1}const ok=(e,t={})=>n=>{const r=Jf({...n,processors:t});return Ut(e,r),Yf(r,e),Xf(r,e)},qi=(e,t,n={})=>r=>{const{libraryOptions:s,target:a}=r??{},i=Jf({...s??{},target:a,io:t,processors:n});return Ut(e,i),Yf(i,e),Xf(i,e)},lk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ck=(e,t,n,r)=>{const s=n;s.type="string";const{minimum:a,maximum:i,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof a=="number"&&(s.minLength=a),typeof i=="number"&&(s.maxLength=i),o&&(s.format=lk[o]??o,s.format===""&&delete s.format,o==="time"&&delete s.format),c&&(s.contentEncoding=c),l&&l.size>0){const d=[...l];d.length===1?s.pattern=d[0].source:d.length>1&&(s.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},uk=(e,t,n,r)=>{const s=n,{minimum:a,maximum:i,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;typeof o=="string"&&o.includes("int")?s.type="integer":s.type="number";const f=typeof d=="number"&&d>=(a??Number.NEGATIVE_INFINITY),m=typeof c=="number"&&c<=(i??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";f?p?(s.minimum=d,s.exclusiveMinimum=!0):s.exclusiveMinimum=d:typeof a=="number"&&(s.minimum=a),m?p?(s.maximum=c,s.exclusiveMaximum=!0):s.exclusiveMaximum=c:typeof i=="number"&&(s.maximum=i),typeof l=="number"&&(s.multipleOf=l)},dk=(e,t,n,r)=>{n.type="boolean"},hk=(e,t,n,r)=>{n.not={}},pk=(e,t,n,r)=>{},fk=(e,t,n,r)=>{const s=e._zod.def,a=Of(s.entries);a.every(i=>typeof i=="number")&&(n.type="number"),a.every(i=>typeof i=="string")&&(n.type="string"),n.enum=a},mk=(e,t,n,r)=>{const s=e._zod.def,a=[];for(const i of s.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(i))}else a.push(i);if(a.length!==0)if(a.length===1){const i=a[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else a.every(i=>typeof i=="number")&&(n.type="number"),a.every(i=>typeof i=="string")&&(n.type="string"),a.every(i=>typeof i=="boolean")&&(n.type="boolean"),a.every(i=>i===null)&&(n.type="null"),n.enum=a},gk=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},vk=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},bk=(e,t,n,r)=>{const s=n,a=e._zod.def,{minimum:i,maximum:o}=e._zod.bag;typeof i=="number"&&(s.minItems=i),typeof o=="number"&&(s.maxItems=o),s.type="array",s.items=Ut(a.element,t,{...r,path:[...r.path,"items"]})},yk=(e,t,n,r)=>{const s=n,a=e._zod.def;s.type="object",s.properties={};const i=a.shape;for(const c in i)s.properties[c]=Ut(i[c],t,{...r,path:[...r.path,"properties",c]});const o=new Set(Object.keys(i)),l=new Set([...o].filter(c=>{const d=a.shape[c]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(s.required=Array.from(l)),a.catchall?._zod.def.type==="never"?s.additionalProperties=!1:a.catchall?a.catchall&&(s.additionalProperties=Ut(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},wk=(e,t,n,r)=>{const s=e._zod.def,a=s.inclusive===!1,i=s.options.map((o,l)=>Ut(o,t,{...r,path:[...r.path,a?"oneOf":"anyOf",l]}));a?n.oneOf=i:n.anyOf=i},kk=(e,t,n,r)=>{const s=e._zod.def,a=Ut(s.left,t,{...r,path:[...r.path,"allOf",0]}),i=Ut(s.right,t,{...r,path:[...r.path,"allOf",1]}),o=c=>"allOf"in c&&Object.keys(c).length===1,l=[...o(a)?a.allOf:[a],...o(i)?i.allOf:[i]];n.allOf=l},xk=(e,t,n,r)=>{const s=n,a=e._zod.def;s.type="object";const i=a.keyType,l=i._zod.bag?.patterns;if(a.mode==="loose"&&l&&l.size>0){const d=Ut(a.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});s.patternProperties={};for(const f of l)s.patternProperties[f.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=Ut(a.keyType,t,{...r,path:[...r.path,"propertyNames"]})),s.additionalProperties=Ut(a.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const c=i._zod.values;if(c){const d=[...c].filter(f=>typeof f=="string"||typeof f=="number");d.length>0&&(s.required=d)}},Sk=(e,t,n,r)=>{const s=e._zod.def,a=Ut(s.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=s.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},_k=(e,t,n,r)=>{const s=e._zod.def;Ut(s.innerType,t,r);const a=t.seen.get(e);a.ref=s.innerType},Ek=(e,t,n,r)=>{const s=e._zod.def;Ut(s.innerType,t,r);const a=t.seen.get(e);a.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},Ak=(e,t,n,r)=>{const s=e._zod.def;Ut(s.innerType,t,r);const a=t.seen.get(e);a.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},Tk=(e,t,n,r)=>{const s=e._zod.def;Ut(s.innerType,t,r);const a=t.seen.get(e);a.ref=s.innerType;let i;try{i=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},Ck=(e,t,n,r)=>{const s=e._zod.def,a=s.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?a?s.out:s.in:s.out;Ut(i,t,r);const o=t.seen.get(e);o.ref=i},Rk=(e,t,n,r)=>{const s=e._zod.def;Ut(s.innerType,t,r);const a=t.seen.get(e);a.ref=s.innerType,n.readOnly=!0},e1=(e,t,n,r)=>{const s=e._zod.def;Ut(s.innerType,t,r);const a=t.seen.get(e);a.ref=s.innerType},Ok=W("ZodISODateTime",(e,t)=>{I9.init(e,t),Ot.init(e,t)});function Ik(e){return Pw(Ok,e)}const Nk=W("ZodISODate",(e,t)=>{N9.init(e,t),Ot.init(e,t)});function Mk(e){return Bw(Nk,e)}const zk=W("ZodISOTime",(e,t)=>{M9.init(e,t),Ot.init(e,t)});function Dk(e){return Lw(zk,e)}const $k=W("ZodISODuration",(e,t)=>{z9.init(e,t),Ot.init(e,t)});function Pk(e){return Fw($k,e)}const Bk=(e,t)=>{zf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>S8(e,n)},flatten:{value:n=>x8(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Wl,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Wl,2)}},isEmpty:{get(){return e.issues.length===0}}})},zn=W("ZodError",Bk,{Parent:Error}),Lk=j0(zn),Fk=K0(zn),Uk=ho(zn),qk=po(zn),Hk=A8(zn),Vk=T8(zn),Gk=C8(zn),Zk=R8(zn),jk=O8(zn),Kk=I8(zn),Wk=N8(zn),Qk=M8(zn),hd=new WeakMap;function Ba(e,t,n){const r=Object.getPrototypeOf(e);let s=hd.get(r);if(s||(s=new Set,hd.set(r,s)),!s.has(t)){s.add(t);for(const a in n){const i=n[a];Object.defineProperty(r,a,{configurable:!0,enumerable:!1,get(){const o=i.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}const Rt=W("ZodType",(e,t)=>(Ct.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:qi(e,"input"),output:qi(e,"output")}}),e.toJSONSchema=ok(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>Lk(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Uk(e,n,r),e.parseAsync=async(n,r)=>Fk(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>qk(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Hk(e,n,r),e.decode=(n,r)=>Vk(e,n,r),e.encodeAsync=async(n,r)=>Gk(e,n,r),e.decodeAsync=async(n,r)=>Zk(e,n,r),e.safeEncode=(n,r)=>jk(e,n,r),e.safeDecode=(n,r)=>Kk(e,n,r),e.safeEncodeAsync=async(n,r)=>Wk(e,n,r),e.safeDecodeAsync=async(n,r)=>Qk(e,n,r),Ba(e,"ZodType",{check(...n){const r=this.def;return this.clone(Qr(r,{checks:[...r.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return Jr(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Hx(n,r))},superRefine(n,r){return this.check(Vx(n,r))},overwrite(n){return this.check(Ws(n))},optional(){return gd(this)},exactOptional(){return Ox(this)},nullable(){return vd(this)},nullish(){return gd(vd(this))},nonoptional(n){return $x(this,n)},array(){return Wt(this)},or(n){return xx([this,n])},and(n){return Ex(this,n)},transform(n){return bd(this,Cx(n))},default(n){return Mx(this,n)},prefault(n){return Dx(this,n)},catch(n){return Bx(this,n)},pipe(n){return bd(this,n)},readonly(){return Ux(this)},describe(n){const r=this.clone();return ca.add(r,{description:n}),r},meta(...n){if(n.length===0)return ca.get(this);const r=this.clone();return ca.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return ca.get(e)?.description},configurable:!0}),e)),t1=W("_ZodString",(e,t)=>{W0.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>ck(e,r,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Ba(e,"_ZodString",{regex(...r){return this.check(Zw(...r))},includes(...r){return this.check(Ww(...r))},startsWith(...r){return this.check(Qw(...r))},endsWith(...r){return this.check(Jw(...r))},min(...r){return this.check(Ui(...r))},max(...r){return this.check(Wf(...r))},length(...r){return this.check(Qf(...r))},nonempty(...r){return this.check(Ui(1,...r))},lowercase(r){return this.check(jw(r))},uppercase(r){return this.check(Kw(r))},trim(){return this.check(Xw())},normalize(...r){return this.check(Yw(...r))},toLowerCase(){return this.check(ek())},toUpperCase(){return this.check(tk())},slugify(){return this.check(nk())}})}),Jk=W("ZodString",(e,t)=>{W0.init(e,t),t1.init(e,t),e.email=n=>e.check(gw(Yk,n)),e.url=n=>e.check(kw(Xk,n)),e.jwt=n=>e.check($w(fx,n)),e.emoji=n=>e.check(xw(ex,n)),e.guid=n=>e.check(ld(pd,n)),e.uuid=n=>e.check(vw(hi,n)),e.uuidv4=n=>e.check(bw(hi,n)),e.uuidv6=n=>e.check(yw(hi,n)),e.uuidv7=n=>e.check(ww(hi,n)),e.nanoid=n=>e.check(Sw(tx,n)),e.guid=n=>e.check(ld(pd,n)),e.cuid=n=>e.check(_w(nx,n)),e.cuid2=n=>e.check(Ew(rx,n)),e.ulid=n=>e.check(Aw(sx,n)),e.base64=n=>e.check(Mw(dx,n)),e.base64url=n=>e.check(zw(hx,n)),e.xid=n=>e.check(Tw(ax,n)),e.ksuid=n=>e.check(Cw(ix,n)),e.ipv4=n=>e.check(Rw(ox,n)),e.ipv6=n=>e.check(Ow(lx,n)),e.cidrv4=n=>e.check(Iw(cx,n)),e.cidrv6=n=>e.check(Nw(ux,n)),e.e164=n=>e.check(Dw(px,n)),e.datetime=n=>e.check(Ik(n)),e.date=n=>e.check(Mk(n)),e.time=n=>e.check(Dk(n)),e.duration=n=>e.check(Pk(n))});function J(e){return mw(Jk,e)}const Ot=W("ZodStringFormat",(e,t)=>{Et.init(e,t),t1.init(e,t)}),Yk=W("ZodEmail",(e,t)=>{x9.init(e,t),Ot.init(e,t)}),pd=W("ZodGUID",(e,t)=>{w9.init(e,t),Ot.init(e,t)}),hi=W("ZodUUID",(e,t)=>{k9.init(e,t),Ot.init(e,t)}),Xk=W("ZodURL",(e,t)=>{S9.init(e,t),Ot.init(e,t)}),ex=W("ZodEmoji",(e,t)=>{_9.init(e,t),Ot.init(e,t)}),tx=W("ZodNanoID",(e,t)=>{E9.init(e,t),Ot.init(e,t)}),nx=W("ZodCUID",(e,t)=>{A9.init(e,t),Ot.init(e,t)}),rx=W("ZodCUID2",(e,t)=>{T9.init(e,t),Ot.init(e,t)}),sx=W("ZodULID",(e,t)=>{C9.init(e,t),Ot.init(e,t)}),ax=W("ZodXID",(e,t)=>{R9.init(e,t),Ot.init(e,t)}),ix=W("ZodKSUID",(e,t)=>{O9.init(e,t),Ot.init(e,t)}),ox=W("ZodIPv4",(e,t)=>{D9.init(e,t),Ot.init(e,t)}),lx=W("ZodIPv6",(e,t)=>{$9.init(e,t),Ot.init(e,t)}),cx=W("ZodCIDRv4",(e,t)=>{P9.init(e,t),Ot.init(e,t)}),ux=W("ZodCIDRv6",(e,t)=>{B9.init(e,t),Ot.init(e,t)}),dx=W("ZodBase64",(e,t)=>{L9.init(e,t),Ot.init(e,t)}),hx=W("ZodBase64URL",(e,t)=>{U9.init(e,t),Ot.init(e,t)}),px=W("ZodE164",(e,t)=>{q9.init(e,t),Ot.init(e,t)}),fx=W("ZodJWT",(e,t)=>{V9.init(e,t),Ot.init(e,t)}),n1=W("ZodNumber",(e,t)=>{Vf.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>uk(e,r,s),Ba(e,"ZodNumber",{gt(r,s){return this.check(ud(r,s))},gte(r,s){return this.check(nl(r,s))},min(r,s){return this.check(nl(r,s))},lt(r,s){return this.check(cd(r,s))},lte(r,s){return this.check(tl(r,s))},max(r,s){return this.check(tl(r,s))},int(r){return this.check(fd(r))},safe(r){return this.check(fd(r))},positive(r){return this.check(ud(0,r))},nonnegative(r){return this.check(nl(0,r))},negative(r){return this.check(cd(0,r))},nonpositive(r){return this.check(tl(0,r))},multipleOf(r,s){return this.check(dd(r,s))},step(r,s){return this.check(dd(r,s))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ze(e){return Uw(n1,e)}const mx=W("ZodNumberFormat",(e,t)=>{G9.init(e,t),n1.init(e,t)});function fd(e){return qw(mx,e)}const gx=W("ZodBoolean",(e,t)=>{Z9.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>dk(e,n,r)});function Ms(e){return Hw(gx,e)}const vx=W("ZodUnknown",(e,t)=>{j9.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>pk()});function Oa(){return Vw(vx)}const bx=W("ZodNever",(e,t)=>{K9.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>hk(e,n,r)});function yx(e){return Gw(bx,e)}const wx=W("ZodArray",(e,t)=>{W9.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>bk(e,n,r,s),e.element=t.element,Ba(e,"ZodArray",{min(n,r){return this.check(Ui(n,r))},nonempty(n){return this.check(Ui(1,n))},max(n,r){return this.check(Wf(n,r))},length(n,r){return this.check(Qf(n,r))},unwrap(){return this.element}})});function Wt(e,t){return rk(wx,e,t)}const kx=W("ZodObject",(e,t)=>{J9.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>yk(e,n,r,s),ht(e,"shape",()=>t.shape),Ba(e,"ZodObject",{keyof(){return Jt(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Oa()})},loose(){return this.clone({...this._zod.def,catchall:Oa()})},strict(){return this.clone({...this._zod.def,catchall:yx()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return g8(this,n)},safeExtend(n){return v8(this,n)},merge(n){return b8(this,n)},pick(n){return f8(this,n)},omit(n){return m8(this,n)},partial(...n){return y8(s1,this,n[0])},required(...n){return w8(a1,this,n[0])}})});function Ve(e,t){const n={type:"object",shape:e??{},...Oe(t)};return new kx(n)}const r1=W("ZodUnion",(e,t)=>{jf.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>wk(e,n,r,s),e.options=t.options});function xx(e,t){return new r1({type:"union",options:e,...Oe(t)})}const Sx=W("ZodDiscriminatedUnion",(e,t)=>{r1.init(e,t),Y9.init(e,t)});function Q0(e,t,n){return new Sx({type:"union",options:t,discriminator:e,...Oe(n)})}const _x=W("ZodIntersection",(e,t)=>{X9.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>kk(e,n,r,s)});function Ex(e,t){return new _x({type:"intersection",left:e,right:t})}const md=W("ZodRecord",(e,t)=>{ew.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>xk(e,n,r,s),e.keyType=t.keyType,e.valueType=t.valueType});function J0(e,t,n){return!t||!t._zod?new md({type:"record",keyType:J(),valueType:e,...Oe(t)}):new md({type:"record",keyType:e,valueType:t,...Oe(n)})}const Jl=W("ZodEnum",(e,t)=>{tw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>fk(e,r,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const a={};for(const i of r)if(n.has(i))a[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Jl({...t,checks:[],...Oe(s),entries:a})},e.exclude=(r,s)=>{const a={...t.entries};for(const i of r)if(n.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new Jl({...t,checks:[],...Oe(s),entries:a})}});function Jt(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Jl({type:"enum",entries:n,...Oe(t)})}const Ax=W("ZodLiteral",(e,t)=>{nw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>mk(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function fr(e,t){return new Ax({type:"literal",values:Array.isArray(e)?e:[e],...Oe(t)})}const Tx=W("ZodTransform",(e,t)=>{rw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>vk(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Rf(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Ra(a,n.value,t));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Ra(i))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(a=>(n.value=a,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function Cx(e){return new Tx({type:"transform",transform:e})}const s1=W("ZodOptional",(e,t)=>{Kf.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>e1(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function gd(e){return new s1({type:"optional",innerType:e})}const Rx=W("ZodExactOptional",(e,t)=>{sw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>e1(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Ox(e){return new Rx({type:"optional",innerType:e})}const Ix=W("ZodNullable",(e,t)=>{aw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Sk(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function vd(e){return new Ix({type:"nullable",innerType:e})}const Nx=W("ZodDefault",(e,t)=>{iw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ek(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Mx(e,t){return new Nx({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Nf(t)}})}const zx=W("ZodPrefault",(e,t)=>{ow.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ak(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Dx(e,t){return new zx({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Nf(t)}})}const a1=W("ZodNonOptional",(e,t)=>{lw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>_k(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function $x(e,t){return new a1({type:"nonoptional",innerType:e,...Oe(t)})}const Px=W("ZodCatch",(e,t)=>{cw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Tk(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Bx(e,t){return new Px({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Lx=W("ZodPipe",(e,t)=>{uw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ck(e,n,r,s),e.in=t.in,e.out=t.out});function bd(e,t){return new Lx({type:"pipe",in:e,out:t})}const Fx=W("ZodReadonly",(e,t)=>{dw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Rk(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Ux(e){return new Fx({type:"readonly",innerType:e})}const qx=W("ZodCustom",(e,t)=>{hw.init(e,t),Rt.init(e,t),e._zod.processJSONSchema=(n,r,s)=>gk(e,n)});function Hx(e,t={}){return sk(qx,e,t)}function Vx(e,t){return ak(e,t)}const Gx={custom:"custom"},Y0=6,Zx=20*1024*1024,yd=40*1024*1024,Fr={Snapshot:"ai-session.snapshot",Patch:"ai-session.patch",Removed:"ai-session.removed"},jx=J().trim().min(1).max(80),X0=Jt(["running","waiting","idle","failed"]),mo=Jt(["thinking","tool","editing","approval","responding","unknown"]),Kx=Ve({name:J().trim().min(1).max(120),inputPreview:J().trim().max(500).optional(),startedAt:J().datetime().optional()}).strict(),Wx=Ve({toolCalls:Ze().int().min(0).default(0),edits:Ze().int().min(0).default(0),approvals:Ze().int().min(0).default(0)}).strict().default({toolCalls:0,edits:0,approvals:0}),i1=Ve({send:Ms().optional(),interrupt:Ms().optional(),approval:Ms().optional()}).strict(),o1=Ve({id:J().trim().min(1).max(120),kind:Jt(["image"]),name:J().trim().min(1).max(240),mime:J().trim().min(1).max(120),size:Ze().int().min(0).max(Zx),data:J().min(1).max(30*1024*1024)}).strict(),Qx=o1.omit({data:!0}),Jx=Ve({id:J().trim().min(1).max(120),kind:Jt(["image"]).optional()}).strict(),Yx=Jt(["auto","queue","steer","immediate"]),l1=Ve({message:J().trim().min(1).max(2e4),mode:Yx.optional()});l1.extend({attachments:Wt(o1).max(Y0).default([])}).strict().superRefine((e,t)=>{e.attachments.reduce((r,s)=>r+s.size,0)>yd&&t.addIssue({code:Gx.custom,path:["attachments"],message:`Images must be ${yd} bytes or less in total.`})});l1.extend({attachments:Wt(Jx).max(Y0).default([])}).strict();Ve({decision:Jt(["allow","deny","skip"])}).strict();Ve({queueIds:Wt(J().trim().min(1).max(120)).max(100)}).strict();Ve({code:J().trim().min(1).max(160),message:J(),instanceId:J().trim().min(1).max(160).optional(),nodeId:J().trim().min(1).max(160).optional(),route:J().trim().min(1).max(4096).optional()}).strict();const Xx=Ve({id:J().trim().min(1).max(120),message:J().trim().min(1).max(2e4),attachments:Wt(Qx).max(Y0).default([]),status:Jt(["queued","sending","failed"]).default("queued"),createdAt:J().datetime(),updatedAt:J().datetime(),error:J().trim().max(4e3).optional()}).strict(),eS=Ve({pendingCount:Ze().int().min(0).default(0),items:Wt(Xx).max(100).default([])}).strict().default({pendingCount:0,items:[]}),c1=Jt(["control","realtime","adapter-snapshot","transcript-tail","transcript-scan","process-scan","app-session"]),u1=Ve({id:J().trim().min(1).max(240),providerTurnId:J().trim().max(240).optional(),source:c1.optional(),userPrompt:J().trim().optional(),status:Jt(["queued","running","waiting","completed","failed"]).default("running"),phase:mo.optional(),summary:J().trim().max(1e3).optional(),lastMessage:J().trim().optional(),revision:Ze().int().min(0).default(0),sourcePriority:Ze().int().min(0).max(100).optional(),snapshotVersion:Ze().int().min(0).optional(),observedAt:J().datetime().optional(),startedAt:J().datetime().optional(),updatedAt:J().datetime().optional(),completedAt:J().datetime().optional()}).strict(),d1=Ve({id:J().trim().min(1).max(120),agent:jx,appSessionId:J().trim().max(120).optional(),appId:J().trim().max(120).optional(),providerSessionId:J().trim().max(240).optional(),providerMeta:J0(J(),Oa()).optional(),appBindingKeys:Wt(J().trim().min(1).max(240)).max(20).optional(),actions:i1.optional(),activeTurnId:J().trim().max(240).optional(),conversationId:Ze().int().positive().optional(),title:J().trim().max(240).optional(),cwd:J().trim().max(4096).optional(),userPrompt:J().trim().optional(),turns:Wt(u1).max(50).optional(),status:X0.default("running"),phase:mo.default("unknown"),summary:J().trim().max(1e3).optional(),lastMessage:J().trim().optional(),currentTool:Kx.optional(),transcriptPath:J().trim().max(4096).optional(),transcriptSize:Ze().int().min(0).optional(),startedAt:J().datetime(),updatedAt:J().datetime(),completedAt:J().datetime().optional(),error:J().trim().max(4e3).optional(),counters:Wx,queue:eS}).strict();Ve({session:d1,provider:J().trim().min(1).max(80),action:Jt(["send","queue","steer","interrupt","approval"]),decision:Jt(["allow","deny","skip"]).optional(),turnId:J().trim().min(1).max(240).optional(),providerTurnId:J().trim().min(1).max(240).optional(),queueId:J().trim().min(1).max(120).optional()}).strict();const h1=d1.pick({id:!0,agent:!0,appSessionId:!0,appId:!0,providerSessionId:!0,providerMeta:!0,appBindingKeys:!0,actions:!0,activeTurnId:!0,conversationId:!0,title:!0,cwd:!0,userPrompt:!0,turns:!0,status:!0,phase:!0,summary:!0,lastMessage:!0,currentTool:!0,queue:!0,startedAt:!0,updatedAt:!0,error:!0}),go=Ve({runningCount:Ze().int().min(0).default(0),waitingCount:Ze().int().min(0).default(0),staleCount:Ze().int().min(0).default(0),sessions:Wt(h1).default([]),updatedAt:J().datetime()}).strict(),wd=Ve({streamId:J().trim().min(1).max(240),revision:Ze().int().min(0),lastEventAt:J().datetime(),snapshot:go}).strict();go.pick({runningCount:!0,waitingCount:!0,staleCount:!0,updatedAt:!0}).extend({idleCount:Ze().int().min(0).default(0),problemCount:Ze().int().min(0).default(0),revision:Ze().int().min(0).optional()});const tS=Jt(["provider-event","app-session-created","app-session-updated","app-session-deleted","discovery-scan","control-action","heartbeat-sync","startup"]),ec=Ve({streamId:J().trim().min(1).max(240),instanceId:J().trim().min(1).max(160),nodeId:J().trim().min(1).max(160).optional(),revision:Ze().int().min(0),previousRevision:Ze().int().min(0).optional(),traceId:J().trim().min(1).max(160),generatedAt:J().datetime(),reason:tS}).strict(),nS=Ve({meta:ec,snapshot:go}).strict(),rS=Ve({meta:ec,upserted:Wt(h1).default([]),removed:Wt(J().trim().min(1).max(120)).default([])}).strict(),sS=Ve({meta:ec,sessionIds:Wt(J().trim().min(1).max(120)).default([]),expiresAt:J().datetime()}).strict(),aS=Ve({streamId:J().trim().min(1).max(240),instanceId:J().trim().min(1).max(160),sinceRevision:Ze().int().min(0),latestRevision:Ze().int().min(0),earliestRetainedRevision:Ze().int().min(0),syncRequired:Ms().default(!1),events:Wt(Q0("type",[Ve({type:fr(Fr.Snapshot),payload:nS}).strict(),Ve({type:fr(Fr.Patch),payload:rS}).strict(),Ve({type:fr(Fr.Removed),payload:sS}).strict()])).default([])}).strict();function p1(e,t){const{meta:n}=t.payload;if(t.type===Fr.Snapshot)return e?.streamId===n.streamId&&n.revision===e.revision?{kind:"duplicate",projection:e}:e?.streamId===n.streamId&&n.revision<e.revision?{kind:"stale",projection:e}:{kind:"applied",projection:wd.parse({streamId:n.streamId,revision:n.revision,lastEventAt:n.generatedAt,snapshot:t.payload.snapshot})};if(!e||e.streamId!==n.streamId)return{kind:"snapshot-required",projection:e,streamId:n.streamId};if(n.revision===e.revision)return{kind:"duplicate",projection:e};if(n.revision<e.revision)return{kind:"stale",projection:e};if(n.revision!==e.revision+1||n.previousRevision!==e.revision)return{kind:"gap",projection:e,expectedRevision:e.revision+1,receivedRevision:n.revision};const r=new Map(e.snapshot.sessions.map(i=>[i.id,i]));if(t.type===Fr.Patch){for(const i of t.payload.upserted)r.set(i.id,i);for(const i of t.payload.removed)r.delete(i)}else for(const i of t.payload.sessionIds)r.delete(i);const s=[...r.values()],a=go.parse({runningCount:s.filter(i=>i.status==="running").length,waitingCount:s.filter(i=>i.status==="waiting").length,staleCount:e.snapshot.staleCount,sessions:s,updatedAt:n.generatedAt});return{kind:"applied",projection:wd.parse({streamId:n.streamId,revision:n.revision,lastEventAt:n.generatedAt,snapshot:a})}}const f1=Ve({source:c1,sourcePriority:Ze().int().min(0).max(100).optional(),observedAt:J().datetime().optional(),snapshotVersion:Ze().int().min(0).optional()}).strict(),iS=f1.extend({type:fr("snapshot"),agent:J().trim().min(1).max(80),appSessionId:J().trim().max(120).optional(),appId:J().trim().max(120).optional(),providerSessionId:J().trim().max(240).optional(),providerMeta:J0(J(),Oa()).optional(),appBindingKeys:Wt(J().trim().min(1).max(240)).max(20).optional(),actions:i1.optional(),conversationId:Ze().int().positive().optional(),title:J().trim().max(240).optional(),cwd:J().trim().max(4096).optional(),activeTurnId:J().trim().max(240).optional(),userPrompt:J().trim().optional(),turns:Wt(u1).max(50).optional(),status:X0.optional(),phase:mo.optional(),summary:J().trim().max(1e3).optional(),lastMessage:J().trim().optional(),transcriptPath:J().trim().max(4096).optional(),transcriptSize:Ze().int().min(0).optional(),replaceActivity:Ms().optional()}).strict(),oS=f1.extend({type:fr("event"),sessionId:J().trim().min(1).max(120),kind:Jt(["lifecycle","send-ack","turn-started","user-message","assistant-message","approval-requested","turn-completed"]),activeTurnId:J().trim().max(240).optional(),providerTurnId:J().trim().max(240).optional(),userPrompt:J().trim().optional(),text:J().optional(),status:X0.optional(),phase:mo.optional(),summary:J().trim().max(1e3).optional(),error:J().trim().max(4e3).optional(),counters:Ve({toolCalls:Ze().int().min(0).optional(),edits:Ze().int().min(0).optional(),approvals:Ze().int().min(0).optional()}).strict().optional()}).strict();Q0("type",[iS,oS]);const Ur={Snapshot:"app-session.snapshot",Patch:"app-session.patch",Removed:"app-session.removed"},m1=Jt(["created","starting","running","stopping","stopped","exited","failed","closed","terminated","unknown"]),g1=Ve({type:Jt(["app-session","provider-session","adapter-key"]),id:J().trim().min(1).max(240),agent:J().trim().min(1).max(80).optional(),adapter:J().trim().min(1).max(80).optional(),key:J().trim().min(1).max(240).optional()}).strict(),vo=J0(J(),Oa()).and(Ve({id:J().trim().min(1).max(160),appId:J().trim().min(1).max(160).optional(),title:J().trim().max(240).optional(),kind:J().trim().max(80).optional(),status:m1.default("unknown"),bindings:Wt(g1).max(40).default([]),workspace:Ve({cwd:J().trim().max(4096).optional()}).strict().optional(),createdAt:J().datetime().optional(),updatedAt:J().datetime().optional()})),bo=Ve({runningCount:Ze().int().min(0).default(0),problemCount:Ze().int().min(0).default(0),sessions:Wt(vo).default([]),updatedAt:J().datetime()}).strict(),kd=Ve({streamId:J().trim().min(1).max(240),revision:Ze().int().min(0),lastEventAt:J().datetime(),snapshot:bo}).strict();bo.pick({runningCount:!0,problemCount:!0,updatedAt:!0}).extend({revision:Ze().int().min(0).optional()});const lS=Jt(["app-session-created","app-session-updated","app-session-deleted","app-session-recovered","control-action","heartbeat-sync","startup"]),tc=Ve({streamId:J().trim().min(1).max(240),instanceId:J().trim().min(1).max(160),nodeId:J().trim().min(1).max(160).optional(),revision:Ze().int().min(0),previousRevision:Ze().int().min(0).optional(),traceId:J().trim().min(1).max(160),generatedAt:J().datetime(),reason:lS}).strict(),cS=Ve({meta:tc,snapshot:bo}).strict(),uS=Ve({meta:tc,session:vo}).strict(),dS=Ve({meta:tc,sessionId:J().trim().min(1).max(160),tombstone:vo.optional(),expiresAt:J().datetime().optional()}).strict(),hS=Ve({streamId:J().trim().min(1).max(240),instanceId:J().trim().min(1).max(160),sinceRevision:Ze().int().min(0),latestRevision:Ze().int().min(0),earliestRetainedRevision:Ze().int().min(0),syncRequired:Ms().default(!1),events:Wt(Q0("type",[Ve({type:fr(Ur.Snapshot),payload:cS}).strict(),Ve({type:fr(Ur.Patch),payload:uS}).strict(),Ve({type:fr(Ur.Removed),payload:dS}).strict()])).default([])}).strict();function v1(e,t){const{meta:n}=t.payload;if(t.type===Ur.Snapshot)return e?.streamId===n.streamId&&n.revision===e.revision?{kind:"duplicate",projection:e}:e?.streamId===n.streamId&&n.revision<e.revision?{kind:"stale",projection:e}:{kind:"applied",projection:kd.parse({streamId:n.streamId,revision:n.revision,lastEventAt:n.generatedAt,snapshot:t.payload.snapshot})};if(!e||e.streamId!==n.streamId)return{kind:"snapshot-required",projection:e,streamId:n.streamId};if(n.revision===e.revision)return{kind:"duplicate",projection:e};if(n.revision<e.revision)return{kind:"stale",projection:e};if(n.revision!==e.revision+1||n.previousRevision!==e.revision)return{kind:"gap",projection:e,expectedRevision:e.revision+1,receivedRevision:n.revision};const r=[...e.snapshot.sessions];if(t.type===Ur.Patch){const a=r.findIndex(i=>i.id===t.payload.session.id);a<0?r.push(t.payload.session):r[a]=t.payload.session}else{const a=r.findIndex(i=>i.id===t.payload.sessionId);a>=0&&r.splice(a,1),t.payload.tombstone&&r.push(t.payload.tombstone)}const s=pS(r,n.generatedAt);return{kind:"applied",projection:kd.parse({streamId:n.streamId,revision:n.revision,lastEventAt:n.generatedAt,snapshot:s})}}function pS(e,t=new Date().toISOString()){const n=e.map(r=>fS(r));return bo.parse({runningCount:n.filter(r=>r.status==="running").length,problemCount:n.filter(r=>r.status==="failed").length,sessions:n,updatedAt:t})}function fS(e){const t=mS(typeof e.status=="string"?e.status:void 0),n=typeof e.id=="string"?e.id:"",r=yS(e),{workspace:s,...a}=e;return vo.parse({...a,status:t,bindings:wS([...vS(e.bindings),...n?[{type:"app-session",id:n}]:[],...bS(e)]),...r?{workspace:r}:{}})}function mS(e){const t=(e||"unknown").trim().toLowerCase();return t==="ended"?"closed":t==="terminating"?"stopping":m1.options.includes(t)?t:"unknown"}function gS(e){return e.type==="app-session"?`app:${e.id}`:e.type==="provider-session"?`provider:${e.agent||""}:${e.id}`:`adapter:${e.adapter||""}:${e.key||e.id}`}function vS(e){return Array.isArray(e)?e.flatMap(t=>{const n=g1.safeParse(t);return n.success?[n.data]:[]}):[]}function bS(e){const t=Mr(e.ai),n=Mr(t.claude),r=Mr(t.appServer),s=[],a=$r(n.short);a&&s.push({type:"adapter-key",adapter:"claude",agent:"claude",id:`short:${a}`,key:`short:${a}`});const i=$r(n.providerSessionId);i&&s.push({type:"provider-session",agent:"claude",id:i});const o=Array.isArray(t.threadIds)?t.threadIds.filter(d=>typeof d=="string"&&!!d.trim()):[],l=$r(t.activeThreadId);for(const d of[...new Set([l,...o].filter(Boolean))])s.push({type:"provider-session",agent:"codex",id:d});const c=$r(r.socketPath);return c&&s.push({type:"adapter-key",adapter:"codex-app-server",agent:"codex",id:`socket:${c}`,key:`socket:${c}`}),s}function yS(e){const t=Mr(e.workspace),n=Mr(e.tty),r=Mr(e.launch),s=Mr(e.ai),a=Mr(s.claude),i=$r(t.cwd)||$r(n.cwd)||$r(a.cwd)||$r(r.cwd);return i?{cwd:i}:void 0}function wS(e){const t=new Map;for(const n of e)t.set(gS(n),n);return[...t.values()]}function Mr(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function $r(e){return typeof e=="string"&&e.trim()?e.trim():""}const kS=1,xS=Jt(["ai.sessions","app.sessions"]),SS=Ve({topic:xS,instanceId:J().trim().min(1).max(160),streamId:J().trim().min(1).max(240),latestRevision:Ze().int().min(0),earliestRetainedRevision:Ze().int().min(0)}).strict(),_S=Ve({protocolVersion:fr(kS),streams:Wt(SS)}).strict(),ES="streams.hello";let bn,aa,pi=0,fi=!1,mi=!1,is,os;const Ia=new Map,va=new Map,zs=new Map;let Hi=Un;function AS(e){return ch("/api/events",e)}function TS(e){return e.startsWith("trigger.")?[["triggers"],["status"]]:[]}function nc(e,t){is=t,e.setQueryData(["ai-sessions"],t.snapshot);for(const n of t.snapshot.sessions)e.setQueryData(["ai-session",n.id],n)}function rc(e,t){os=t,e.setQueryData(["app-sessions"],t.snapshot.sessions)}function CS(e){const t=e.payload&&typeof e.payload=="object"?e.payload:{},n=t.meta&&typeof t.meta=="object"?t.meta:{};return{streamId:typeof n.streamId=="string"?n.streamId:"",revision:typeof n.revision=="number"?n.revision:0}}function xd(e,t){const n=Ia.get(e),r=CS(t);if(!n||r.streamId!==n.streamId)return;const s=zs.get(e);zs.set(e,{streamId:n.streamId,revision:Math.max(s?.streamId===n.streamId?s.revision:0,r.revision)})}function RS(e,t){if(t.type===Fr.Snapshot||t.type===Fr.Patch||t.type===Fr.Removed){if(va.has("ai.sessions"))return xd("ai.sessions",t),!0;const n=p1(is,{type:t.type,payload:t.payload});return n.kind==="applied"&&nc(e,n.projection),(n.kind==="gap"||n.kind==="snapshot-required")&&Yl("ai.sessions",e),!0}if(t.type===Ur.Snapshot||t.type===Ur.Patch||t.type===Ur.Removed){if(va.has("app.sessions"))return xd("app.sessions",t),!0;const n=v1(os,{type:t.type,payload:t.payload});return n.kind==="applied"&&rc(e,n.projection),(n.kind==="gap"||n.kind==="snapshot-required")&&Yl("app.sessions",e),!0}return!1}async function ia(e,t){if(e==="ai.sessions"){const r=await Hi("ai-sessions");return nc(t,r),r.revision}const n=await Hi("apps/sessions");return rc(t,n),n.revision}async function OS(e,t,n){if(e==="ai.sessions"&&is?.streamId===t.streamId){const r=aS.parse(await Hi(`ai-sessions?streamId=${encodeURIComponent(t.streamId)}&sinceRevision=${is.revision}`));if(r.syncRequired)return ia(e,n);for(const s of r.events){const a=p1(is,s);if(a.kind!=="applied"&&a.kind!=="duplicate")return ia(e,n);nc(n,a.projection)}return is?.revision||0}if(e==="app.sessions"&&os?.streamId===t.streamId){const r=hS.parse(await Hi(`apps/sessions?streamId=${encodeURIComponent(t.streamId)}&sinceRevision=${os.revision}`));if(r.syncRequired)return ia(e,n);for(const s of r.events){const a=v1(os,s);if(a.kind!=="applied"&&a.kind!=="duplicate")return ia(e,n);rc(n,a.projection)}return os?.revision||0}return ia(e,n)}function Yl(e,t){const n=va.get(e);if(n)return n;const r=Promise.resolve().then(async()=>{try{for(;;){const s=Ia.get(e);if(!s)return;const a=e==="ai.sessions"?is:os,i=zs.get(e),o=Math.max(s.latestRevision,i?.streamId===s.streamId?i.revision:0);if(a?.streamId===s.streamId&&a.revision>=o){zs.get(e)?.streamId===s.streamId&&zs.delete(e);return}await OS(e,s,t)}}finally{va.delete(e)}});return va.set(e,r),r}function IS(e,t){const n=Ia.get(e.topic);return n&&n.streamId!==e.streamId&&zs.delete(e.topic),Ia.set(e.topic,e),Yl(e.topic,t)}const NS=s0("events",{state:()=>({connectionState:"idle",streamStates:{"ai.sessions":"disconnected","app.sessions":"disconnected"},reconnects:0,lastEventAt:"",events:[]}),actions:{connect(e){if(bn&&(bn.readyState===WebSocket.CONNECTING||bn.readyState===WebSocket.OPEN))return;clearTimeout(aa),this.connectionState="connecting";const t=hs();bn=new WebSocket(AS(t.token)),bn.addEventListener("open",()=>{pi=0,this.connectionState="connected"}),bn.addEventListener("message",n=>{try{const r=JSON.parse(String(n.data));if(this.lastEventAt=r.createdAt,this.events=[r,...this.events].slice(0,50),r.type===ES&&e){const s=_S.safeParse(r.payload);if(!s.success){mi=!0,this.connectionState="error",console.error("SESSION_STREAM_PROTOCOL_INCOMPATIBLE",s.error.issues),bn?.close(1002,"Incompatible session stream protocol.");return}const a=s.data;for(const i of a.streams)this.streamStates[i.topic]="recovering",IS(i,e).then(()=>{this.streamStates[i.topic]="live"});return}if(e&&RS(e,r))return;for(const s of TS(r.type))e?.invalidateQueries({queryKey:s})}catch{this.connectionState="error"}}),bn.addEventListener("close",()=>{if(this.streamStates["ai.sessions"]="disconnected",this.streamStates["app.sessions"]="disconnected",fi||mi){fi=!1,this.connectionState=mi?"error":"idle";return}this.connectionState="disconnected",this.scheduleReconnect(e)}),bn.addEventListener("error",()=>{this.connectionState="error"})},disconnect(){clearTimeout(aa),aa=void 0,bn?(fi=!0,bn.close()):fi=!1,bn=void 0,Ia.clear(),mi=!1,pi=0,this.connectionState="idle"},scheduleReconnect(e){clearTimeout(aa);const t=Math.min(3e4,1e3*2**pi),n=Math.min(3e4,Math.round(t*(.75+Math.random()*.5)));pi+=1,aa=setTimeout(()=>{this.reconnects+=1,bn=void 0,this.connect(e)},n)}}}),MS={class:"app-shell"},zS={class:"workspace"},DS={class:"topbar"},$S={class:"topbar-status"},PS=["data-state"],BS={key:0,class:"last-event"},LS={class:"topbar-right-content"},FS={id:"topbar-session-actions",class:"topbar-session-slot"},US={key:0,class:"workspace-session-actions"},qS={class:"workspace-session-status"},HS={key:1,class:"segmented-control"},VS={class:"topbar-actions"},GS=Ae({__name:"ControlledInstanceShell",setup(e){const t=jr(),n=hs(),r=NS(),s=Gs(),a=wh(),i=yh(),o=Vs(),l=Ce(n.token),c=Ce(!1),d=Ce("general"),f=be(()=>i.data.value?"Instance ready":"Web server ready"),m=be(()=>`last event ${G(r.lastEventAt)}`),p=be(()=>!!n.token),w=be(()=>s.tabs.find(P=>P.id===s.activeTabId)),y=be(()=>m0(w.value,o.data.value||[])),x=be(()=>{const P=a.data.value;return!!(P&&(!P.enabled||p.value))});On(()=>{l.value=n.token}),cn([x,()=>n.token],([P])=>{r.disconnect(),P&&r.connect(t)},{immediate:!0}),Zi(()=>{r.disconnect()});function _(){n.setToken(l.value)}function $(P){d.value=P,c.value=!0}function z(P){s.open({type:"logs",id:`logs:${P.id}`,sessionId:P.id,title:`${P.title} logs`})}function C(P){const j=new URLSearchParams;n.token&&j.set("token",n.token);const q=j.toString()?`?${j.toString()}`:"";return Pn(`/api/apps/sessions/${P.id}/screenshot${q}`)}async function S(P){await cs(P),await t.invalidateQueries({queryKey:["status"]})}async function E(P){const j=await d0(P);s.open(za(j)),await t.invalidateQueries({queryKey:["status"]})}function F(P){s.setVncResizeMode(P)}function N(P){s.setGuiHidpi(P)}function G(P){if(!P)return"";const j=new Date(P);return Number.isNaN(j.getTime())?P:j.toLocaleTimeString()}return(P,j)=>(I(),V("div",MS,[T(Z2,{onOpenSettings:$}),k("main",zS,[k("header",DS,[k("div",$S,[j[6]||(j[6]=k("span",{class:"brand"},"TaskHandoff",-1)),k("span",null,Z(f.value),1),k("span",{class:"event-state","data-state":g(r).connectionState},Z(g(r).connectionState),9,PS),g(r).lastEventAt?(I(),V("span",BS,Z(m.value),1)):pe("",!0)]),T(g(kn),{class:"topbar-right"},{default:D(()=>[k("div",LS,[k("div",FS,[y.value?(I(),V("div",US,[k("span",qS,Z(y.value.appId)+" · "+Z(y.value.status),1),T(g(Je),{variant:"outline",size:"sm",onClick:j[0]||(j[0]=q=>z(y.value))},{default:D(()=>[...j[7]||(j[7]=[de("Logs",-1)])]),_:1}),y.value.kind==="gui"&&y.value.status==="running"?(I(),ye(g(Je),{key:0,variant:"outline",size:"sm",as:"a",href:C(y.value),target:"_blank",rel:"noreferrer"},{default:D(()=>[...j[8]||(j[8]=[de("Screenshot",-1)])]),_:1},8,["href"])):pe("",!0),y.value.kind==="gui"&&y.value.status==="running"?(I(),V("div",HS,[T(g(Vh),{type:"single","model-value":g(s).vncResizeMode,"aria-label":"VNC resize mode","onUpdate:modelValue":j[1]||(j[1]=q=>q&&F(q))},{default:D(()=>[T(g(Ti),{value:"scale"},{default:D(()=>[...j[9]||(j[9]=[de("Scale",-1)])]),_:1}),T(g(Ti),{value:"remote"},{default:D(()=>[...j[10]||(j[10]=[de("Resize",-1)])]),_:1})]),_:1},8,["model-value"]),T(g(qh),{"model-value":g(s).guiHidpi,"aria-label":"Toggle HiDPI","onUpdate:modelValue":N},{default:D(()=>[...j[11]||(j[11]=[de("HiDPI",-1)])]),_:1},8,["model-value"])])):pe("",!0),T(g(Je),{variant:"outline",size:"sm",disabled:y.value.status!=="running",onClick:j[2]||(j[2]=q=>S(y.value.id))},{default:D(()=>[...j[12]||(j[12]=[de("Stop",-1)])]),_:1},8,["disabled"]),T(g(Je),{variant:"outline",size:"sm",onClick:j[3]||(j[3]=q=>E(y.value.id))},{default:D(()=>[...j[13]||(j[13]=[de("Restart",-1)])]),_:1})])):pe("",!0)]),k("div",VS,[g(a).data.value?.enabled?Vi((I(),V("input",{key:0,"onUpdate:modelValue":j[4]||(j[4]=q=>l.value=q),class:"token-input",type:"password",placeholder:"Web token",onChange:_},null,544)),[[Gi,l.value]]):pe("",!0)])])]),_:1})]),T(o8)]),c.value?(I(),ye(Fb,{key:0,section:d.value,onClose:j[5]||(j[5]=q=>c.value=!1)},null,8,["section"])):pe("",!0)]))}});let Xl=1;var ZS=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:t,...n}=e,r=typeof e.id=="number"||e.id&&e.id?.length>0?e.id:Xl++,s=this.toasts.find(i=>i.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),s?this.toasts=this.toasts.map(i=>i.id===r?(this.publish({...i,...e,id:r,title:t}),{...i,...e,id:r,dismissible:a,title:t}):i):this.addToast({title:t,...n,dismissible:a,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:"default"});error=(e,t)=>this.create({...t,type:"error",message:e});success=(e,t)=>this.create({...t,type:"success",message:e});info=(e,t)=>this.create({...t,type:"info",message:e});warning=(e,t)=>this.create({...t,type:"warning",message:e});loading=(e,t)=>this.create({...t,type:"loading",message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let s=n!==void 0,a;const i=r.then(async l=>{if(a=["resolve",l],Xs(l))s=!1,this.create({id:n,type:"default",message:l});else if(KS(l)&&!l.ok){s=!1;const d=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,p=typeof d=="object"&&!Xs(d)?d:{message:d||"",id:n||""};this.create({id:n,type:"error",description:f,...p})}else if(l instanceof Error){s=!1;const d=typeof t.error=="function"?await t.error(l):t.error,f=typeof t.description=="function"?await t.description(l):t.description,p=typeof d=="object"&&!Xs(d)?d:{message:d||"",id:n||""};this.create({id:n,type:"error",description:f,...p})}else if(t.success!==void 0){s=!1;const d=typeof t.success=="function"?await t.success(l):t.success,f=typeof t.description=="function"?await t.description(l):t.description,p=typeof d=="object"&&!Xs(d)?d:{message:d||"",id:n||""};this.create({id:n,type:"success",description:f,...p})}}).catch(async l=>{if(a=["reject",l],t.error!==void 0){s=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,m=typeof c=="object"&&!Xs(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...m})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),t.finally?.()}),o=()=>new Promise((l,c)=>i.then(()=>a[0]==="reject"?c(a[1]):l(a[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:o}:Object.assign(n,{unwrap:o})};custom=(e,t)=>{const n=t?.id||Xl++,r=this.toasts.find(a=>a.id===n),s=t?.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(a=>a.id===n?(this.publish({...a,component:e,dismissible:s,id:n,...t}),{...a,component:e,dismissible:s,id:n,...t}):a):this.addToast({component:e,dismissible:s,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};const fn=new ZS;function jS(e,t){const n=t?.id||Xl++;return fn.create({message:e,id:n,type:"default",...t}),n}const KS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",WS=jS,QS=()=>fn.toasts,JS=()=>fn.getActiveToasts();Object.assign(WS,{success:fn.success,info:fn.info,warning:fn.warning,error:fn.error,custom:fn.custom,message:fn.message,promise:fn.promise,dismiss:fn.dismiss,loading:fn.loading},{getHistory:QS,getToasts:JS});function gi(e){return e.label!==void 0}const YS=3,b1="24px",y1="16px",Sd=4e3,XS=356,e_=14,t_=45,w1=200;function n_(){const e=Ce(!1);return On(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Rr(...e){return e.filter(Boolean).join(" ")}function r_(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}function s_(e,t){const n={};return[e,t].forEach((r,s)=>{const a=s===1,i=a?"--mobile-offset":"--offset",o=a?y1:b1;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${i}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${i}-${c}`]=o:n[`${i}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(o)}),n}const a_=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded","data-testid"],i_=["aria-label","data-disabled","data-close-button-position"];var o_=Ae({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,r=t,s=Ce(null),a=Ce(null),i=Ce(!1),o=Ce(!1),l=Ce(!1),c=Ce(!1),d=Ce(!1),f=Ce(0),m=Ce(0),p=Ce(n.toast.duration||n.duration||Sd),w=Ce(null),y=Ce(null),x=be(()=>n.index===0),_=be(()=>n.index+1<=n.visibleToasts),$=be(()=>n.toast.type),z=be(()=>n.toast.dismissible!==!1),C=be(()=>n.toast.class||""),S=be(()=>n.descriptionClass||""),E=be(()=>{const O=n.toast.position||n.position,K=n.heights.filter(ue=>ue.position===O).findIndex(ue=>ue.toastId===n.toast.id);return K>=0?K:0}),F=be(()=>{const O=n.toast.position||n.position;return n.heights.filter(K=>K.position===O).reduce((K,ue,Ee)=>Ee>=E.value?K:K+ue.height,0)}),N=be(()=>E.value*n.gap+F.value||0),G=be(()=>n.toast.closeButton??n.closeButton),P=be(()=>n.toast.duration||n.duration||Sd),j=Ce(0),q=Ce(0),Y=Ce(null),te=be(()=>n.position.split("-")),he=be(()=>te.value[0]),Se=be(()=>te.value[1]),re=be(()=>typeof n.toast.title!="string"),ne=be(()=>typeof n.toast.description!="string"),{isDocumentHidden:Re}=n_(),se=be(()=>$.value&&$.value==="loading");ll(()=>{i.value=!0,p.value=P.value}),On(async()=>{if(!i.value||!y.value)return;await Yn();const O=y.value,oe=O.style.height;O.style.height="auto";const K=O.getBoundingClientRect().height;O.style.height=oe,m.value=K,r("update:height",{toastId:n.toast.id,height:K,position:n.toast.position||n.position})});function Le(){o.value=!0,f.value=N.value,setTimeout(()=>{r("removeToast",n.toast)},w1)}function Ye(){if(se.value||!z.value)return{};Le(),n.toast.onDismiss?.(n.toast)}function nt(O){O.button!==2&&(se.value||!z.value||(w.value=new Date,f.value=N.value,O.target.setPointerCapture(O.pointerId),O.target.tagName!=="BUTTON"&&(l.value=!0,Y.value={x:O.clientX,y:O.clientY})))}function Mt(){if(c.value||!z.value)return;Y.value=null;const O=Number(y.value?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),oe=Number(y.value?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),K=new Date().getTime()-(w.value?.getTime()||0),ue=s.value==="x"?O:oe,Ee=Math.abs(ue)/K;if(Math.abs(ue)>=t_||Ee>.11){f.value=N.value,n.toast.onDismiss?.(n.toast),s.value==="x"?a.value=O>0?"right":"left":a.value=oe>0?"down":"up",Le(),c.value=!0;return}else y.value?.style.setProperty("--swipe-amount-x","0px"),y.value?.style.setProperty("--swipe-amount-y","0px");d.value=!1,l.value=!1,s.value=null}function Xe(O){if(!Y.value||!z.value||(window?.getSelection()?.toString()?.length??!1))return;const K=O.clientY-Y.value.y,ue=O.clientX-Y.value.x,Ee=n.swipeDirections??r_(n.position);!s.value&&(Math.abs(ue)>1||Math.abs(K)>1)&&(s.value=Math.abs(ue)>Math.abs(K)?"x":"y");let Fe={x:0,y:0};const ze=_e=>1/(1.5+Math.abs(_e)/20);if(s.value==="y"){if(Ee.includes("top")||Ee.includes("bottom"))if(Ee.includes("top")&&K<0||Ee.includes("bottom")&&K>0)Fe.y=K;else{const _e=K*ze(K);Fe.y=Math.abs(_e)<Math.abs(K)?_e:K}}else if(s.value==="x"&&(Ee.includes("left")||Ee.includes("right")))if(Ee.includes("left")&&ue<0||Ee.includes("right")&&ue>0)Fe.x=ue;else{const _e=ue*ze(ue);Fe.x=Math.abs(_e)<Math.abs(ue)?_e:ue}(Math.abs(Fe.x)>0||Math.abs(Fe.y)>0)&&(d.value=!0),y.value?.style.setProperty("--swipe-amount-x",`${Fe.x}px`),y.value?.style.setProperty("--swipe-amount-y",`${Fe.y}px`)}ll(()=>{if(i.value=!0,!y.value)return;const O=y.value.getBoundingClientRect().height;m.value=O;const oe=[{toastId:n.toast.id,height:O,position:n.toast.position},...n.heights];r("update:heights",oe)}),Zi(()=>{y.value&&r("removeToast",n.toast)}),On(O=>{if(n.toast.promise&&$.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let oe;const K=()=>{if(q.value<j.value){const Ee=new Date().getTime()-j.value;p.value=p.value-Ee}q.value=new Date().getTime()},ue=()=>{p.value!==1/0&&(j.value=new Date().getTime(),oe=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),Le()},p.value))};n.expanded||n.interacting||Re.value?K():ue(),O(()=>{clearTimeout(oe)})}),cn(()=>n.toast.delete,O=>{O!==void 0&&O&&(Le(),n.toast.onDismiss?.(n.toast))},{deep:!0});function tt(){l.value=!1,s.value=null,Y.value=null}return(O,oe)=>(I(),V("li",{tabindex:"0",ref_key:"toastRef",ref:y,class:wt(g(Rr)(n.class,C.value,O.classes?.toast,O.toast.classes?.toast,O.classes?.[$.value],O.toast?.classes?.[$.value])),"data-sonner-toast":"","data-rich-colors":O.toast.richColors??O.defaultRichColors,"data-styled":!(O.toast.component||O.toast?.unstyled||O.unstyled),"data-mounted":i.value,"data-promise":!!O.toast.promise,"data-swiped":d.value,"data-removed":o.value,"data-visible":_.value,"data-y-position":he.value,"data-x-position":Se.value,"data-index":O.index,"data-front":x.value,"data-swiping":l.value,"data-dismissible":z.value,"data-type":$.value,"data-invert":O.toast.invert||O.invert,"data-swipe-out":c.value,"data-swipe-direction":a.value,"data-expanded":!!(O.expanded||O.expandByDefault&&i.value),"data-testid":O.toast.testId,style:bi({"--index":O.index,"--toasts-before":O.index,"--z-index":O.toasts.length-O.index,"--offset":`${o.value?f.value:N.value}px`,"--initial-height":O.expandByDefault?"auto":`${m.value}px`,...O.style,...n.toast.style}),onDragend:tt,onPointerdown:nt,onPointerup:Mt,onPointermove:Xe},[G.value&&!O.toast.component&&$.value!=="loading"?(I(),V("button",{key:0,"aria-label":O.closeButtonAriaLabel||"Close toast","data-disabled":se.value,"data-close-button":"true","data-close-button-position":O.closeButtonPosition,class:wt(g(Rr)(O.classes?.closeButton,O.toast?.classes?.closeButton)),onClick:Ye},[O.icons?.close?(I(),ye(xs(O.icons?.close),{key:0})):Be(O.$slots,"close-icon",{key:1})],10,i_)):pe("v-if",!0),O.toast.component?(I(),ye(xs(O.toast.component),xt({key:1},O.toast.componentProps,{onCloseToast:Ye,isPaused:O.$props.expanded||O.$props.interacting||g(Re)}),null,16,["isPaused"])):(I(),V(rt,{key:2},[$.value!=="default"||O.toast.icon||O.toast.promise?(I(),V("div",{key:0,"data-icon":"",class:wt(g(Rr)(O.classes?.icon,O.toast?.classes?.icon))},[O.toast.icon?(I(),ye(xs(O.toast.icon),{key:0})):(I(),V(rt,{key:1},[$.value==="loading"?Be(O.$slots,"loading-icon",{key:0}):$.value==="success"?Be(O.$slots,"success-icon",{key:1}):$.value==="error"?Be(O.$slots,"error-icon",{key:2}):$.value==="warning"?Be(O.$slots,"warning-icon",{key:3}):$.value==="info"?Be(O.$slots,"info-icon",{key:4}):pe("v-if",!0)],64))],2)):pe("v-if",!0),k("div",{"data-content":"",class:wt(g(Rr)(O.classes?.content,O.toast?.classes?.content))},[k("div",{"data-title":"",class:wt(g(Rr)(O.classes?.title,O.toast.classes?.title))},[re.value?(I(),ye(xs(O.toast.title),Sn(xt({key:0},O.toast.componentProps)),null,16)):(I(),V(rt,{key:1},[de(Z(O.toast.title),1)],64))],2),O.toast.description?(I(),V("div",{key:0,"data-description":"",class:wt(g(Rr)(O.descriptionClass,S.value,O.classes?.description,O.toast.classes?.description))},[ne.value?(I(),ye(xs(O.toast.description),Sn(xt({key:0},O.toast.componentProps)),null,16)):(I(),V(rt,{key:1},[de(Z(O.toast.description),1)],64))],2)):pe("v-if",!0)],2),O.toast.cancel?(I(),V("button",{key:1,style:bi(O.toast.cancelButtonStyle||O.cancelButtonStyle),class:wt(g(Rr)(O.classes?.cancelButton,O.toast.classes?.cancelButton)),"data-button":"","data-cancel":"",onClick:oe[0]||(oe[0]=K=>{g(gi)(O.toast.cancel)&&z.value&&(O.toast.cancel.onClick?.(K),Le())})},Z(g(gi)(O.toast.cancel)?O.toast.cancel?.label:O.toast.cancel),7)):pe("v-if",!0),O.toast.action?(I(),V("button",{key:2,style:bi(O.toast.actionButtonStyle||O.actionButtonStyle),class:wt(g(Rr)(O.classes?.actionButton,O.toast.classes?.actionButton)),"data-button":"","data-action":"",onClick:oe[1]||(oe[1]=K=>{g(gi)(O.toast.action)&&(O.toast.action.onClick?.(K),!K.defaultPrevented&&Le())})},Z(g(gi)(O.toast.action)?O.toast.action?.label:O.toast.action),7)):pe("v-if",!0)],64))],46,a_))}}),l_=o_,La=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n};const c_={},u_={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function d_(e,t){return I(),V("svg",u_,t[0]||(t[0]=[k("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),k("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var h_=La(c_,[["render",d_]]);const p_=["data-visible"],f_={class:"sonner-spinner"};var m_=Ae({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,r)=>(I(),V("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[k("div",f_,[(I(!0),V(rt,null,$t(g(t),s=>(I(),V("div",{key:`spinner-bar-${s}`,class:"sonner-loading-bar"}))),128))])],8,p_))}}),g_=m_;const v_={},b_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function y_(e,t){return I(),V("svg",b_,t[0]||(t[0]=[k("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var w_=La(v_,[["render",y_]]);const k_={},x_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function S_(e,t){return I(),V("svg",x_,t[0]||(t[0]=[k("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var __=La(k_,[["render",S_]]);const E_={},A_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function T_(e,t){return I(),V("svg",A_,t[0]||(t[0]=[k("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var C_=La(E_,[["render",T_]]);const R_={},O_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function I_(e,t){return I(),V("svg",O_,t[0]||(t[0]=[k("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var N_=La(R_,[["render",I_]]);const M_=["aria-label"],z_=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position"],D_=typeof window<"u"&&typeof document<"u";function $_(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var P_=Ae({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{id:{},invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},closeButtonPosition:{default:"top-left"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:e_},visibleToasts:{default:YS},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:b1},mobileOffset:{default:y1},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=Km(),r=Ce([]),s=be(()=>t.id?r.value.filter(P=>P.toasterId===t.id):r.value.filter(P=>!P.toasterId));function a(P,j){return s.value.filter(q=>!q.position&&j===0||q.position===P)}const i=be(()=>{const P=s.value.filter(j=>j.position).map(j=>j.position);return P.length>0?Array.from(new Set([t.position].concat(P))):[t.position]}),o=be(()=>{const P={};return i.value.forEach(j=>{P[j]=r.value.filter(q=>q.position===j)}),P}),l=Ce([]),c=Ce({}),d=Ce(!1);On(()=>{i.value.forEach(P=>{P in c.value||(c.value[P]=!1)})});const f=Ce(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),m=Ce(null),p=Ce(null),w=Ce(!1),y=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function x(P){r.value.find(j=>j.id===P.id)?.delete||fn.dismiss(P.id),r.value=r.value.filter(({id:j})=>j!==P.id),setTimeout(()=>{r.value.find(j=>j.id===P.id)||(l.value=l.value.filter(j=>j.toastId!==P.id))},w1+50)}function _(P){w.value&&!P.currentTarget?.contains?.(P.relatedTarget)&&(w.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function $(P){P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||w.value||(w.value=!0,p.value=P.relatedTarget)}function z(P){P.target&&P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||(d.value=!0)}On(P=>{const j=fn.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{r.value=r.value.map(Y=>Y.id===q.id?{...Y,delete:!0}:Y)});return}Yn(()=>{const Y=r.value.findIndex(te=>te.id===q.id);Y!==-1?r.value=[...r.value.slice(0,Y),{...r.value[Y],...q},...r.value.slice(Y+1)]:r.value=[q,...r.value]})});P(j)}),On(P=>{if(typeof window>"u")return;if(t.theme!=="system"){f.value=t.theme;return}const j=window.matchMedia("(prefers-color-scheme: dark)"),q=te=>{f.value=te?"dark":"light"};q(j.matches);const Y=te=>{q(te.matches)};try{j.addEventListener("change",Y)}catch{j.addListener(Y)}P(()=>{try{j.removeEventListener("change",Y)}catch{j.removeListener(Y)}})}),On(()=>{m.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,w.value=!1)}),On(()=>{r.value.length<=1&&Object.keys(c.value).forEach(P=>{c.value[P]=!1})}),On(P=>{function j(q){const Y=t.hotkey.every(Se=>q[Se]||q.code===Se),te=Array.isArray(m.value)?m.value[0]:m.value;Y&&(i.value.forEach(Se=>{c.value[Se]=!0}),te?.focus());const he=document.activeElement===m.value||te?.contains(document.activeElement);q.code==="Escape"&&he&&i.value.forEach(Se=>{c.value[Se]=!1})}D_&&(document.addEventListener("keydown",j),P(()=>{document.removeEventListener("keydown",j)}))});function C(P){const j=P.currentTarget,q=j.getAttribute("data-y-position")+"-"+j.getAttribute("data-x-position");c.value[q]=!0}function S(P){if(!d.value){const j=P.currentTarget,q=j.getAttribute("data-y-position")+"-"+j.getAttribute("data-x-position");c.value[q]=!1}}function E(){Object.keys(c.value).forEach(P=>{c.value[P]=!1})}function F(){d.value=!1}function N(P){l.value=P}function G(P){const j=l.value.findIndex(q=>q.toastId===P.toastId);if(j!==-1)l.value[j]=P;else{const q=l.value.findIndex(Y=>Y.position===P.position);q!==-1?l.value.splice(q,0,P):l.value.unshift(P)}}return(P,j)=>(I(),V(rt,null,[pe(" Remove item from normal navigation flow, only available via hotkey "),k("section",{"aria-label":`${P.containerAriaLabel} ${g(y)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(I(!0),V(rt,null,$t(i.value,(q,Y)=>(I(),V("ol",xt({key:q,ref_for:!0,ref_key:"listRef",ref:m,"data-sonner-toaster":"","data-sonner-theme":f.value,class:t.class,dir:P.dir==="auto"?$_():P.dir,tabIndex:-1,"data-theme":P.theme,"data-rich-colors":P.richColors,"data-y-position":q.split("-")[0],"data-x-position":q.split("-")[1],style:{"--front-toast-height":`${l.value[0]?.height||0}px`,"--width":`${g(XS)}px`,"--gap":`${P.gap}px`,...P.style,...g(n).style,...g(s_)(P.offset,P.mobileOffset)}},{ref_for:!0},P.$attrs,{onBlur:_,onFocus:$,onMouseenter:C,onMousemove:C,onMouseleave:S,onDragend:E,onPointerdown:z,onPointerup:F}),[(I(!0),V(rt,null,$t(a(q,Y),(te,he)=>(I(),ye(l_,{key:te.id,heights:l.value,icons:P.icons,index:he,toast:te,defaultRichColors:P.richColors,duration:P.toastOptions?.duration??P.duration,class:wt(P.toastOptions?.class??""),descriptionClass:P.toastOptions?.descriptionClass,invert:P.invert,visibleToasts:P.visibleToasts,closeButton:P.toastOptions?.closeButton??P.closeButton,interacting:d.value,position:q,closeButtonPosition:P.toastOptions?.closeButtonPosition??P.closeButtonPosition,style:bi(P.toastOptions?.style),unstyled:P.toastOptions?.unstyled,classes:P.toastOptions?.classes,cancelButtonStyle:P.toastOptions?.cancelButtonStyle,actionButtonStyle:P.toastOptions?.actionButtonStyle,"close-button-aria-label":P.toastOptions?.closeButtonAriaLabel,toasts:o.value[q],expandByDefault:P.expand,gap:P.gap,expanded:c.value[q]||!1,swipeDirections:t.swipeDirections,"onUpdate:heights":N,"onUpdate:height":G,onRemoveToast:x},{"close-icon":D(()=>[Be(P.$slots,"close-icon",{},()=>[T(h_)])]),"loading-icon":D(()=>[Be(P.$slots,"loading-icon",{},()=>[T(g_,{visible:te.type==="loading"},null,8,["visible"])])]),"success-icon":D(()=>[Be(P.$slots,"success-icon",{},()=>[T(w_)])]),"error-icon":D(()=>[Be(P.$slots,"error-icon",{},()=>[T(N_)])]),"warning-icon":D(()=>[Be(P.$slots,"warning-icon",{},()=>[T(C_)])]),"info-icon":D(()=>[Be(P.$slots,"info-icon",{},()=>[T(__)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","closeButtonPosition","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"]))),128))],16,z_))),128))],8,M_)],2112))}}),B_=P_;const L_=Ae({__name:"Sonner",props:{id:{},invert:{type:Boolean},theme:{},position:{},closeButtonPosition:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){const t=e,n=Pt(t,"toastOptions"),r=Ce("light");function s(){r.value=document.documentElement.classList.contains("dark")?"dark":"light"}return s(),Wm(document.documentElement,s,{attributes:!0,attributeFilter:["class","data-theme"]}),(a,i)=>(I(),ye(g(B_),xt({class:"toaster group","toast-options":{unstyled:!0,classes:{toast:"task-handoff-toast",title:"task-handoff-toast-title",description:"task-handoff-toast-description",icon:"task-handoff-toast-icon",closeButton:"task-handoff-toast-close",actionButton:"task-handoff-toast-action",cancelButton:"task-handoff-toast-cancel",success:"is-success",error:"is-error",warning:"is-warning",info:"is-info"}}},g(n),{theme:t.theme??r.value}),{"success-icon":D(()=>[T(g(Vv),{class:"size-4"})]),"info-icon":D(()=>[T(g(Xv),{class:"size-4"})]),"warning-icon":D(()=>[T(g(v2),{class:"size-4"})]),"error-icon":D(()=>[T(g(qv),{class:"size-4"})]),"loading-icon":D(()=>[k("div",null,[T(g(t2),{class:"size-4 animate-spin"})])]),"close-icon":D(()=>[T(g(us),{class:"size-4"})]),_:1},16,["theme"]))}}),F_=Ae({__name:"App",setup(e){return(t,n)=>(I(),V(rt,null,[T(GS),T(g(L_),{position:"top-right","rich-colors":""})],64))}});const As=typeof document<"u";function k1(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function U_(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&k1(e.default)}const ct=Object.assign;function rl(e,t){const n={};for(const r in t){const s=t[r];n[r]=Bn(s)?s.map(e):e(s)}return n}const ba=()=>{},Bn=Array.isArray;function _d(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const x1=/#/g,q_=/&/g,H_=/\//g,V_=/=/g,G_=/\?/g,S1=/\+/g,Z_=/%5B/g,j_=/%5D/g,_1=/%5E/g,K_=/%60/g,E1=/%7B/g,W_=/%7C/g,A1=/%7D/g,Q_=/%20/g;function sc(e){return e==null?"":encodeURI(""+e).replace(W_,"|").replace(Z_,"[").replace(j_,"]")}function J_(e){return sc(e).replace(E1,"{").replace(A1,"}").replace(_1,"^")}function e0(e){return sc(e).replace(S1,"%2B").replace(Q_,"+").replace(x1,"%23").replace(q_,"%26").replace(K_,"`").replace(E1,"{").replace(A1,"}").replace(_1,"^")}function Y_(e){return e0(e).replace(V_,"%3D")}function X_(e){return sc(e).replace(x1,"%23").replace(G_,"%3F")}function eE(e){return X_(e).replace(H_,"%2F")}function Na(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const tE=/\/$/,nE=e=>e.replace(tE,"");function sl(e,t,n="/"){let r,s={},a="",i="";const o=t.indexOf("#");let l=t.indexOf("?");return l=o>=0&&l>o?-1:l,l>=0&&(r=t.slice(0,l),a=t.slice(l,o>0?o:t.length),s=e(a.slice(1))),o>=0&&(r=r||t.slice(0,o),i=t.slice(o,t.length)),r=iE(r??t,n),{fullPath:r+a+i,path:r,query:s,hash:Na(i)}}function rE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Ed(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function sE(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&qs(t.matched[r],n.matched[s])&&T1(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function qs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function T1(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!aE(e[n],t[n]))return!1;return!0}function aE(e,t){return Bn(e)?Ad(e,t):Bn(t)?Ad(t,e):e?.valueOf()===t?.valueOf()}function Ad(e,t){return Bn(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function iE(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let a=n.length-1,i,o;for(i=0;i<r.length;i++)if(o=r[i],o!==".")if(o==="..")a>1&&a--;else break;return n.slice(0,a).join("/")+"/"+r.slice(i).join("/")}const Or={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let t0=(function(e){return e.pop="pop",e.push="push",e})({}),al=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function oE(e){if(!e)if(As){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),nE(e)}const lE=/^[^#]+#/;function cE(e,t){return e.replace(lE,"#")+t}function uE(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const yo=()=>({left:window.scrollX,top:window.scrollY});function dE(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=uE(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Td(e,t){return(history.state?history.state.position-t:-1)+e}const n0=new Map;function hE(e,t){n0.set(e,t)}function pE(e){const t=n0.get(e);return n0.delete(e),t}function fE(e){return typeof e=="string"||e&&typeof e=="object"}function C1(e){return typeof e=="string"||typeof e=="symbol"}let Nt=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const R1=Symbol("");Nt.MATCHER_NOT_FOUND+"",Nt.NAVIGATION_GUARD_REDIRECT+"",Nt.NAVIGATION_ABORTED+"",Nt.NAVIGATION_CANCELLED+"",Nt.NAVIGATION_DUPLICATED+"";function Hs(e,t){return ct(new Error,{type:e,[R1]:!0},t)}function lr(e,t){return e instanceof Error&&R1 in e&&(t==null||!!(e.type&t))}const mE=["params","query","hash"];function gE(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of mE)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function vE(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(S1," "),a=s.indexOf("="),i=Na(a<0?s:s.slice(0,a)),o=a<0?null:Na(s.slice(a+1));if(i in t){let l=t[i];Bn(l)||(l=t[i]=[l]),l.push(o)}else t[i]=o}return t}function Cd(e){let t="";for(let n in e){const r=e[n];if(n=Y_(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Bn(r)?r.map(s=>s&&e0(s)):[r&&e0(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function bE(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Bn(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const yE=Symbol(""),Rd=Symbol(""),ac=Symbol(""),O1=Symbol(""),r0=Symbol("");function oa(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Nr(e,t,n,r,s,a=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((o,l)=>{const c=m=>{m===!1?l(Hs(Nt.NAVIGATION_ABORTED,{from:n,to:t})):m instanceof Error?l(m):fE(m)?l(Hs(Nt.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(i&&r.enterCallbacks[s]===i&&typeof m=="function"&&i.push(m),o())},d=a(()=>e.call(r&&r.instances[s],t,n,c));let f=Promise.resolve(d);e.length<3&&(f=f.then(c)),f.catch(m=>l(m))})}function il(e,t,n,r,s=a=>a()){const a=[];for(const i of e)for(const o in i.components){let l=i.components[o];if(!(t!=="beforeRouteEnter"&&!i.instances[o]))if(k1(l)){const c=(l.__vccOpts||l)[t];c&&a.push(Nr(c,n,r,i,o,s))}else{let c=l();a.push(()=>c.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${o}" at "${i.path}"`);const f=U_(d)?d.default:d;i.mods[o]=d,i.components[o]=f;const m=(f.__vccOpts||f)[t];return m&&Nr(m,n,r,i,o,s)()}))}}return a}function wE(e,t){const n=[],r=[],s=[],a=Math.max(t.matched.length,e.matched.length);for(let i=0;i<a;i++){const o=t.matched[i];o&&(e.matched.find(c=>qs(c,o))?r.push(o):n.push(o));const l=e.matched[i];l&&(t.matched.find(c=>qs(c,l))||s.push(l))}return[n,r,s]}let kE=()=>location.protocol+"//"+location.host;function I1(e,t){const{pathname:n,search:r,hash:s}=t,a=e.indexOf("#");if(a>-1){let i=s.includes(e.slice(a))?e.slice(a).length:1,o=s.slice(i);return o[0]!=="/"&&(o="/"+o),Ed(o,"")}return Ed(n,e)+r+s}function xE(e,t,n,r){let s=[],a=[],i=null;const o=({state:m})=>{const p=I1(e,location),w=n.value,y=t.value;let x=0;if(m){if(n.value=p,t.value=m,i&&i===w){i=null;return}x=y?m.position-y.position:0}else r(p);s.forEach(_=>{_(n.value,w,{delta:x,type:t0.pop,direction:x?x>0?al.forward:al.back:al.unknown})})};function l(){i=n.value}function c(m){s.push(m);const p=()=>{const w=s.indexOf(m);w>-1&&s.splice(w,1)};return a.push(p),p}function d(){if(document.visibilityState==="hidden"){const{history:m}=window;if(!m.state)return;m.replaceState(ct({},m.state,{scroll:yo()}),"")}}function f(){for(const m of a)m();a=[],window.removeEventListener("popstate",o),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",o),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:l,listen:c,destroy:f}}function Od(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?yo():null}}function SE(e){const{history:t,location:n}=window,r={value:I1(e,n)},s={value:t.state};s.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(l,c,d){const f=e.indexOf("#"),m=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:kE()+e+l;try{t[d?"replaceState":"pushState"](c,"",m),s.value=c}catch(p){console.error(p),n[d?"replace":"assign"](m)}}function i(l,c){a(l,ct({},t.state,Od(s.value.back,l,s.value.forward,!0),c,{position:s.value.position}),!0),r.value=l}function o(l,c){const d=ct({},s.value,t.state,{forward:l,scroll:yo()});a(d.current,d,!0),a(l,ct({},Od(r.value,l,null),{position:d.position+1},c),!1),r.value=l}return{location:r,state:s,push:o,replace:i}}function _E(e){e=oE(e);const t=SE(e),n=xE(e,t.state,t.location,t.replace);function r(a,i=!0){i||n.pauseListeners(),history.go(a)}const s=ct({location:"",base:e,go:r,createHref:cE.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}let ls=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Gt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Gt||{});const EE={type:ls.Static,value:""},AE=/[a-zA-Z0-9_]/;function TE(e){if(!e)return[[]];if(e==="/")return[[EE]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=Gt.Static,r=n;const s=[];let a;function i(){a&&s.push(a),a=[]}let o=0,l,c="",d="";function f(){c&&(n===Gt.Static?a.push({type:ls.Static,value:c}):n===Gt.Param||n===Gt.ParamRegExp||n===Gt.ParamRegExpEnd?(a.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),a.push({type:ls.Param,value:c,regexp:d,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function m(){c+=l}for(;o<e.length;){if(l=e[o++],l==="\\"&&n!==Gt.ParamRegExp){r=n,n=Gt.EscapeNext;continue}switch(n){case Gt.Static:l==="/"?(c&&f(),i()):l===":"?(f(),n=Gt.Param):m();break;case Gt.EscapeNext:m(),n=r;break;case Gt.Param:l==="("?n=Gt.ParamRegExp:AE.test(l)?m():(f(),n=Gt.Static,l!=="*"&&l!=="?"&&l!=="+"&&o--);break;case Gt.ParamRegExp:l===")"?d[d.length-1]=="\\"?d=d.slice(0,-1)+l:n=Gt.ParamRegExpEnd:d+=l;break;case Gt.ParamRegExpEnd:f(),n=Gt.Static,l!=="*"&&l!=="?"&&l!=="+"&&o--,d="";break;default:t("Unknown state");break}}return n===Gt.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),f(),i(),s}const Id="[^/]+?",CE={sensitive:!1,strict:!1,start:!0,end:!0};var on=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(on||{});const RE=/[.+*?^${}()[\]/\\]/g;function OE(e,t){const n=ct({},CE,t),r=[];let s=n.start?"^":"";const a=[];for(const c of e){const d=c.length?[]:[on.Root];n.strict&&!c.length&&(s+="/");for(let f=0;f<c.length;f++){const m=c[f];let p=on.Segment+(n.sensitive?on.BonusCaseSensitive:0);if(m.type===ls.Static)f||(s+="/"),s+=m.value.replace(RE,"\\$&"),p+=on.Static;else if(m.type===ls.Param){const{value:w,repeatable:y,optional:x,regexp:_}=m;a.push({name:w,repeatable:y,optional:x});const $=_||Id;if($!==Id){p+=on.BonusCustomRegExp;try{`${$}`}catch(C){throw new Error(`Invalid custom RegExp for param "${w}" (${$}): `+C.message)}}let z=y?`((?:${$})(?:/(?:${$}))*)`:`(${$})`;f||(z=x&&c.length<2?`(?:/${z})`:"/"+z),x&&(z+="?"),s+=z,p+=on.Dynamic,x&&(p+=on.BonusOptional),y&&(p+=on.BonusRepeatable),$===".*"&&(p+=on.BonusWildcard)}d.push(p)}r.push(d)}if(n.strict&&n.end){const c=r.length-1;r[c][r[c].length-1]+=on.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const i=new RegExp(s,n.sensitive?"":"i");function o(c){const d=c.match(i),f={};if(!d)return null;for(let m=1;m<d.length;m++){const p=d[m]||"",w=a[m-1];f[w.name]=p&&w.repeatable?p.split("/"):p}return f}function l(c){let d="",f=!1;for(const m of e){(!f||!d.endsWith("/"))&&(d+="/"),f=!1;for(const p of m)if(p.type===ls.Static)d+=p.value;else if(p.type===ls.Param){const{value:w,repeatable:y,optional:x}=p,_=w in c?c[w]:"";if(Bn(_)&&!y)throw new Error(`Provided param "${w}" is an array but it is not repeatable (* or + modifiers)`);const $=Bn(_)?_.join("/"):_;if(!$)if(x)m.length<2&&(d.endsWith("/")?d=d.slice(0,-1):f=!0);else throw new Error(`Missing required param "${w}"`);d+=$}}return d||"/"}return{re:i,score:r,keys:a,parse:o,stringify:l}}function IE(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===on.Static+on.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===on.Static+on.Segment?1:-1:0}function N1(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const a=IE(r[n],s[n]);if(a)return a;n++}if(Math.abs(s.length-r.length)===1){if(Nd(r))return 1;if(Nd(s))return-1}return s.length-r.length}function Nd(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const NE={strict:!1,end:!0,sensitive:!1};function ME(e,t,n){const r=OE(TE(e.path),n),s=ct(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function zE(e,t){const n=[],r=new Map;t=_d(NE,t);function s(f){return r.get(f)}function a(f,m,p){const w=!p,y=zd(f);y.aliasOf=p&&p.record;const x=_d(t,f),_=[y];if("alias"in f){const C=typeof f.alias=="string"?[f.alias]:f.alias;for(const S of C)_.push(zd(ct({},y,{components:p?p.record.components:y.components,path:S,aliasOf:p?p.record:y})))}let $,z;for(const C of _){const{path:S}=C;if(m&&S[0]!=="/"){const E=m.record.path,F=E[E.length-1]==="/"?"":"/";C.path=m.record.path+(S&&F+S)}if($=ME(C,m,x),p?p.alias.push($):(z=z||$,z!==$&&z.alias.push($),w&&f.name&&!Dd($)&&i(f.name)),M1($)&&l($),y.children){const E=y.children;for(let F=0;F<E.length;F++)a(E[F],$,p&&p.children[F])}p=p||$}return z?()=>{i(z)}:ba}function i(f){if(C1(f)){const m=r.get(f);m&&(r.delete(f),n.splice(n.indexOf(m),1),m.children.forEach(i),m.alias.forEach(i))}else{const m=n.indexOf(f);m>-1&&(n.splice(m,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function o(){return n}function l(f){const m=PE(f,n);n.splice(m,0,f),f.record.name&&!Dd(f)&&r.set(f.record.name,f)}function c(f,m){let p,w={},y,x;if("name"in f&&f.name){if(p=r.get(f.name),!p)throw Hs(Nt.MATCHER_NOT_FOUND,{location:f});x=p.record.name,w=ct(Md(m.params,p.keys.filter(z=>!z.optional).concat(p.parent?p.parent.keys.filter(z=>z.optional):[]).map(z=>z.name)),f.params&&Md(f.params,p.keys.map(z=>z.name))),y=p.stringify(w)}else if(f.path!=null)y=f.path,p=n.find(z=>z.re.test(y)),p&&(w=p.parse(y),x=p.record.name);else{if(p=m.name?r.get(m.name):n.find(z=>z.re.test(m.path)),!p)throw Hs(Nt.MATCHER_NOT_FOUND,{location:f,currentLocation:m});x=p.record.name,w=ct({},m.params,f.params),y=p.stringify(w)}const _=[];let $=p;for(;$;)_.unshift($.record),$=$.parent;return{name:x,path:y,params:w,matched:_,meta:$E(_)}}e.forEach(f=>a(f));function d(){n.length=0,r.clear()}return{addRoute:a,resolve:c,removeRoute:i,clearRoutes:d,getRoutes:o,getRecordMatcher:s}}function Md(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function zd(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:DE(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function DE(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Dd(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function $E(e){return e.reduce((t,n)=>ct(t,n.meta),{})}function PE(e,t){let n=0,r=t.length;for(;n!==r;){const a=n+r>>1;N1(e,t[a])<0?r=a:n=a+1}const s=BE(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function BE(e){let t=e;for(;t=t.parent;)if(M1(t)&&N1(e,t)===0)return t}function M1({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function $d(e){const t=mr(ac),n=mr(O1),r=be(()=>{const l=g(e.to);return t.resolve(l)}),s=be(()=>{const{matched:l}=r.value,{length:c}=l,d=l[c-1],f=n.matched;if(!d||!f.length)return-1;const m=f.findIndex(qs.bind(null,d));if(m>-1)return m;const p=Pd(l[c-2]);return c>1&&Pd(d)===p&&f[f.length-1].path!==p?f.findIndex(qs.bind(null,l[c-2])):m}),a=be(()=>s.value>-1&&HE(n.params,r.value.params)),i=be(()=>s.value>-1&&s.value===n.matched.length-1&&T1(n.params,r.value.params));function o(l={}){if(qE(l)){const c=t[g(e.replace)?"replace":"push"](g(e.to)).catch(ba);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:r,href:be(()=>r.value.href),isActive:a,isExactActive:i,navigate:o}}function LE(e){return e.length===1?e[0]:e}const FE=Ae({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:$d,setup(e,{slots:t}){const n=Pr($d(e)),{options:r}=mr(ac),s=be(()=>({[Bd(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Bd(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&LE(t.default(n));return e.custom?a:ya("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},a)}}}),UE=FE;function qE(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function HE(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Bn(s)||s.length!==r.length||r.some((a,i)=>a.valueOf()!==s[i].valueOf()))return!1}return!0}function Pd(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Bd=(e,t,n)=>e??t??n,VE=Ae({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=mr(r0),s=be(()=>e.route||r.value),a=mr(Rd,0),i=be(()=>{let c=g(a);const{matched:d}=s.value;let f;for(;(f=d[c])&&!f.components;)c++;return c}),o=be(()=>s.value.matched[i.value]);vi(Rd,be(()=>i.value+1)),vi(yE,o),vi(r0,s);const l=Ce();return cn(()=>[l.value,o.value,e.name],([c,d,f],[m,p,w])=>{d&&(d.instances[f]=c,p&&p!==d&&c&&c===m&&(d.leaveGuards.size||(d.leaveGuards=p.leaveGuards),d.updateGuards.size||(d.updateGuards=p.updateGuards))),c&&d&&(!p||!qs(d,p)||!m)&&(d.enterCallbacks[f]||[]).forEach(y=>y(c))},{flush:"post"}),()=>{const c=s.value,d=e.name,f=o.value,m=f&&f.components[d];if(!m)return Ld(n.default,{Component:m,route:c});const p=f.props[d],w=p?p===!0?c.params:typeof p=="function"?p(c):p:null,x=ya(m,ct({},w,t,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(f.instances[d]=null)},ref:l}));return Ld(n.default,{Component:x,route:c})||x}}});function Ld(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const GE=VE;function ZE(e){const t=zE(e.routes,e),n=e.parseQuery||vE,r=e.stringifyQuery||Cd,s=e.history,a=oa(),i=oa(),o=oa(),l=Qm(Or);let c=Or;As&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=rl.bind(null,O=>""+O),f=rl.bind(null,eE),m=rl.bind(null,Na);function p(O,oe){let K,ue;return C1(O)?(K=t.getRecordMatcher(O),ue=oe):ue=O,t.addRoute(ue,K)}function w(O){const oe=t.getRecordMatcher(O);oe&&t.removeRoute(oe)}function y(){return t.getRoutes().map(O=>O.record)}function x(O){return!!t.getRecordMatcher(O)}function _(O,oe){if(oe=ct({},oe||l.value),typeof O=="string"){const _e=sl(n,O,oe.path),pt=t.resolve({path:_e.path},oe),je=s.createHref(_e.fullPath);return ct(_e,pt,{params:m(pt.params),hash:Na(_e.hash),redirectedFrom:void 0,href:je})}let K;if(O.path!=null)K=ct({},O,{path:sl(n,O.path,oe.path).path});else{const _e=ct({},O.params);for(const pt in _e)_e[pt]==null&&delete _e[pt];K=ct({},O,{params:f(_e)}),oe.params=f(oe.params)}const ue=t.resolve(K,oe),Ee=O.hash||"";ue.params=d(m(ue.params));const Fe=rE(r,ct({},O,{hash:J_(Ee),path:ue.path})),ze=s.createHref(Fe);return ct({fullPath:Fe,hash:Ee,query:r===Cd?bE(O.query):O.query||{}},ue,{redirectedFrom:void 0,href:ze})}function $(O){return typeof O=="string"?sl(n,O,l.value.path):ct({},O)}function z(O,oe){if(c!==O)return Hs(Nt.NAVIGATION_CANCELLED,{from:oe,to:O})}function C(O){return F(O)}function S(O){return C(ct($(O),{replace:!0}))}function E(O,oe){const K=O.matched[O.matched.length-1];if(K&&K.redirect){const{redirect:ue}=K;let Ee=typeof ue=="function"?ue(O,oe):ue;return typeof Ee=="string"&&(Ee=Ee.includes("?")||Ee.includes("#")?Ee=$(Ee):{path:Ee},Ee.params={}),ct({query:O.query,hash:O.hash,params:Ee.path!=null?{}:O.params},Ee)}}function F(O,oe){const K=c=_(O),ue=l.value,Ee=O.state,Fe=O.force,ze=O.replace===!0,_e=E(K,ue);if(_e)return F(ct($(_e),{state:typeof _e=="object"?ct({},Ee,_e.state):Ee,force:Fe,replace:ze}),oe||K);const pt=K;pt.redirectedFrom=oe;let je;return!Fe&&sE(r,ue,K)&&(je=Hs(Nt.NAVIGATION_DUPLICATED,{to:pt,from:ue}),Le(ue,ue,!0,!1)),(je?Promise.resolve(je):P(pt,ue)).catch(kt=>lr(kt)?lr(kt,Nt.NAVIGATION_GUARD_REDIRECT)?kt:se(kt):ne(kt,pt,ue)).then(kt=>{if(kt){if(lr(kt,Nt.NAVIGATION_GUARD_REDIRECT))return F(ct({replace:ze},$(kt.to),{state:typeof kt.to=="object"?ct({},Ee,kt.to.state):Ee,force:Fe}),oe||pt)}else kt=q(pt,ue,!0,ze,Ee);return j(pt,ue,kt),kt})}function N(O,oe){const K=z(O,oe);return K?Promise.reject(K):Promise.resolve()}function G(O){const oe=Mt.values().next().value;return oe&&typeof oe.runWithContext=="function"?oe.runWithContext(O):O()}function P(O,oe){let K;const[ue,Ee,Fe]=wE(O,oe);K=il(ue.reverse(),"beforeRouteLeave",O,oe);for(const _e of ue)_e.leaveGuards.forEach(pt=>{K.push(Nr(pt,O,oe))});const ze=N.bind(null,O,oe);return K.push(ze),tt(K).then(()=>{K=[];for(const _e of a.list())K.push(Nr(_e,O,oe));return K.push(ze),tt(K)}).then(()=>{K=il(Ee,"beforeRouteUpdate",O,oe);for(const _e of Ee)_e.updateGuards.forEach(pt=>{K.push(Nr(pt,O,oe))});return K.push(ze),tt(K)}).then(()=>{K=[];for(const _e of Fe)if(_e.beforeEnter)if(Bn(_e.beforeEnter))for(const pt of _e.beforeEnter)K.push(Nr(pt,O,oe));else K.push(Nr(_e.beforeEnter,O,oe));return K.push(ze),tt(K)}).then(()=>(O.matched.forEach(_e=>_e.enterCallbacks={}),K=il(Fe,"beforeRouteEnter",O,oe,G),K.push(ze),tt(K))).then(()=>{K=[];for(const _e of i.list())K.push(Nr(_e,O,oe));return K.push(ze),tt(K)}).catch(_e=>lr(_e,Nt.NAVIGATION_CANCELLED)?_e:Promise.reject(_e))}function j(O,oe,K){o.list().forEach(ue=>G(()=>ue(O,oe,K)))}function q(O,oe,K,ue,Ee){const Fe=z(O,oe);if(Fe)return Fe;const ze=oe===Or,_e=As?history.state:{};K&&(ue||ze?s.replace(O.fullPath,ct({scroll:ze&&_e&&_e.scroll},Ee)):s.push(O.fullPath,Ee)),l.value=O,Le(O,oe,K,ze),se()}let Y;function te(){Y||(Y=s.listen((O,oe,K)=>{if(!Xe.listening)return;const ue=_(O),Ee=E(ue,Xe.currentRoute.value);if(Ee){F(ct(Ee,{replace:!0,force:!0}),ue).catch(ba);return}c=ue;const Fe=l.value;As&&hE(Td(Fe.fullPath,K.delta),yo()),P(ue,Fe).catch(ze=>lr(ze,Nt.NAVIGATION_ABORTED|Nt.NAVIGATION_CANCELLED)?ze:lr(ze,Nt.NAVIGATION_GUARD_REDIRECT)?(F(ct($(ze.to),{force:!0}),ue).then(_e=>{lr(_e,Nt.NAVIGATION_ABORTED|Nt.NAVIGATION_DUPLICATED)&&!K.delta&&K.type===t0.pop&&s.go(-1,!1)}).catch(ba),Promise.reject()):(K.delta&&s.go(-K.delta,!1),ne(ze,ue,Fe))).then(ze=>{ze=ze||q(ue,Fe,!1),ze&&(K.delta&&!lr(ze,Nt.NAVIGATION_CANCELLED)?s.go(-K.delta,!1):K.type===t0.pop&&lr(ze,Nt.NAVIGATION_ABORTED|Nt.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),j(ue,Fe,ze)}).catch(ba)}))}let he=oa(),Se=oa(),re;function ne(O,oe,K){se(O);const ue=Se.list();return ue.length?ue.forEach(Ee=>Ee(O,oe,K)):console.error(O),Promise.reject(O)}function Re(){return re&&l.value!==Or?Promise.resolve():new Promise((O,oe)=>{he.add([O,oe])})}function se(O){return re||(re=!O,te(),he.list().forEach(([oe,K])=>O?K(O):oe()),he.reset()),O}function Le(O,oe,K,ue){const{scrollBehavior:Ee}=e;if(!As||!Ee)return Promise.resolve();const Fe=!K&&pE(Td(O.fullPath,0))||(ue||!K)&&history.state&&history.state.scroll||null;return Yn().then(()=>Ee(O,oe,Fe)).then(ze=>ze&&dE(ze)).catch(ze=>ne(ze,O,oe))}const Ye=O=>s.go(O);let nt;const Mt=new Set,Xe={currentRoute:l,listening:!0,addRoute:p,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:x,getRoutes:y,resolve:_,options:e,push:C,replace:S,go:Ye,back:()=>Ye(-1),forward:()=>Ye(1),beforeEach:a.add,beforeResolve:i.add,afterEach:o.add,onError:Se.add,isReady:Re,install(O){O.component("RouterLink",UE),O.component("RouterView",GE),O.config.globalProperties.$router=Xe,Object.defineProperty(O.config.globalProperties,"$route",{enumerable:!0,get:()=>g(l)}),As&&!nt&&l.value===Or&&(nt=!0,C(s.location).catch(ue=>{}));const oe={};for(const ue in Or)Object.defineProperty(oe,ue,{get:()=>l.value[ue],enumerable:!0});O.provide(ac,Xe),O.provide(O1,Zd(oe)),O.provide(r0,l);const K=O.unmount;Mt.add(O),O.unmount=function(){Mt.delete(O),Mt.size<1&&(c=Or,Y&&Y(),Y=null,l.value=Or,nt=!1,re=!1),K()}}};function tt(O){return O.reduce((oe,K)=>oe.then(()=>G(K)),Promise.resolve())}return Xe}const jE={class:"panel triggers-view"},KE={class:"triggers-head"},WE={class:"triggers-layout"},QE={class:"field-row"},JE={class:"field-row"},YE={key:0,class:"field-row"},XE={key:1,class:"field-row"},eA={key:2,class:"field-row"},tA={key:3,class:"field-row"},nA={class:"field-row"},rA={class:"field-row trigger-wide"},sA={key:0,class:"form-error"},aA={key:0,class:"trigger-list"},iA={class:"trigger-card-head"},oA={class:"trigger-title"},lA={class:"trigger-meta"},cA={class:"trigger-actions"},uA={class:"trigger-prompt"},dA={key:0,class:"form-error"},hA={key:1,class:"logs-empty"},pA={key:0,class:"trigger-run-list"},fA={key:0,class:"form-error"},mA={key:1,class:"logs-empty"},gA=Ae({__name:"TriggersView",setup(e){const t=jr(),n=v4(),r=Sh(),s=Ce(""),a=Pr({name:"",sourceType:"schedule",intervalMs:"3600000",roots:"/workspace",globs:"**/*",statuses:"idle,failed",aiSessionId:"",promptTemplate:"Please review the current context and continue with the next useful step."}),i=be(()=>n.error.value instanceof Error?n.error.value.message:""),o=be(()=>{const C=n.data.value;return C?C.deployments.map(S=>({deployment:S,config:C.configs.find(E=>E.configHash===S.configHash),runtime:C.runtime.find(E=>E.configHash===S.configHash&&(E.deploymentId||E.configHash)===(S.deploymentId||S.configHash))})).filter(S=>!!S.config):[]});function l(){return a.sourceType==="file-change"?{type:"file-change",roots:d(a.roots),globs:d(a.globs),debounceMs:1500}:a.sourceType==="ai-session"?{type:"ai-session",statuses:d(a.statuses)}:{type:"schedule",intervalMs:Math.max(1e3,Number(a.intervalMs)||36e5)}}function c(){if(!a.aiSessionId)throw new Error("Select an AI session target.");return{type:"ai-session",aiSessionId:a.aiSessionId}}function d(C){return C.split(",").map(S=>S.trim()).filter(Boolean)}async function f(){await t.invalidateQueries({queryKey:["triggers"]}),await t.invalidateQueries({queryKey:["status"]})}async function m(){s.value="";try{await b4({name:a.name.trim()||"Untitled trigger",source:l(),action:{promptTemplate:a.promptTemplate},policy:{maxConcurrentRuns:1,whenBusy:"skip"},deployment:{origin:"controlled-instance",target:c()}}),a.name="",await f()}catch(C){s.value=C instanceof Error?C.message:String(C)}}async function p(C){await k4(C),await f()}async function w(C){await y4(C),await f()}async function y(C){await w4(C),await f()}async function x(C){await x4(C),await f()}function _(C){return C.length>14?`${C.slice(0,10)}...`:C}function $(C){return`AI session ${C.aiSessionId}`}function z(C){const S=new Date(C);return Number.isNaN(S.getTime())?C:S.toLocaleString()}return(C,S)=>(I(),V("section",jE,[k("header",KE,[k("div",null,[S[8]||(S[8]=k("h1",null,"Triggers",-1)),k("p",null,Z(g(n).data.value?.configs.length||0)+" configs · "+Z(g(n).data.value?.deployments.length||0)+" deployments",1)])]),k("div",WE,[T(g(hr),null,{default:D(()=>[T(g(ha),null,{default:D(()=>[T(g(pa),null,{default:D(()=>[...S[9]||(S[9]=[de("Create Local Trigger",-1)])]),_:1}),T(g(da),null,{default:D(()=>[...S[10]||(S[10]=[de("Triggers send prompts directly to an AI session.",-1)])]),_:1})]),_:1}),T(g(wn),{class:"trigger-form"},{default:D(()=>[k("label",QE,[S[11]||(S[11]=k("span",null,"Name",-1)),T(g(yt),{modelValue:a.name,"onUpdate:modelValue":S[0]||(S[0]=E=>a.name=E),placeholder:"Review changed files"},null,8,["modelValue"])]),k("label",JE,[S[15]||(S[15]=k("span",null,"Source",-1)),T(g(Ci),{modelValue:a.sourceType,"onUpdate:modelValue":S[1]||(S[1]=E=>a.sourceType=E)},{default:D(()=>[T(g(Oi),{class:"select-input"},{default:D(()=>[T(g(Ii))]),_:1}),T(g(Ri),null,{default:D(()=>[T(g(zr),{value:"schedule"},{default:D(()=>[...S[12]||(S[12]=[de("schedule",-1)])]),_:1}),T(g(zr),{value:"file-change"},{default:D(()=>[...S[13]||(S[13]=[de("file-change",-1)])]),_:1}),T(g(zr),{value:"ai-session"},{default:D(()=>[...S[14]||(S[14]=[de("ai-session",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),a.sourceType==="schedule"?(I(),V("label",YE,[S[16]||(S[16]=k("span",null,"Interval ms",-1)),T(g(yt),{modelValue:a.intervalMs,"onUpdate:modelValue":S[2]||(S[2]=E=>a.intervalMs=E),inputmode:"numeric"},null,8,["modelValue"])])):pe("",!0),a.sourceType==="file-change"?(I(),V("label",XE,[S[17]||(S[17]=k("span",null,"Roots",-1)),T(g(yt),{modelValue:a.roots,"onUpdate:modelValue":S[3]||(S[3]=E=>a.roots=E),placeholder:"/workspace"},null,8,["modelValue"])])):pe("",!0),a.sourceType==="file-change"?(I(),V("label",eA,[S[18]||(S[18]=k("span",null,"Globs",-1)),T(g(yt),{modelValue:a.globs,"onUpdate:modelValue":S[4]||(S[4]=E=>a.globs=E),placeholder:"**/*"},null,8,["modelValue"])])):pe("",!0),a.sourceType==="ai-session"?(I(),V("label",tA,[S[19]||(S[19]=k("span",null,"Status",-1)),T(g(yt),{modelValue:a.statuses,"onUpdate:modelValue":S[5]||(S[5]=E=>a.statuses=E),placeholder:"idle,failed"},null,8,["modelValue"])])):pe("",!0),k("label",nA,[S[20]||(S[20]=k("span",null,"AI session",-1)),T(g(Ci),{modelValue:a.aiSessionId,"onUpdate:modelValue":S[6]||(S[6]=E=>a.aiSessionId=E)},{default:D(()=>[T(g(Oi),{class:"select-input"},{default:D(()=>[T(g(Ii),{placeholder:"Select a session"})]),_:1}),T(g(Ri),null,{default:D(()=>[(I(!0),V(rt,null,$t(g(r).data.value?.sessions||[],E=>(I(),ye(g(zr),{key:E.id,value:E.id},{default:D(()=>[de(Z(E.title||E.id)+" · "+Z(E.agent),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"])]),k("label",rA,[S[21]||(S[21]=k("span",null,"Prompt",-1)),T(g(Qn),{modelValue:a.promptTemplate,"onUpdate:modelValue":S[7]||(S[7]=E=>a.promptTemplate=E),rows:"8"},null,8,["modelValue"])])]),_:1}),T(g(v0),{class:"editor-actions"},{default:D(()=>[s.value?(I(),V("p",sA,Z(s.value),1)):pe("",!0),T(g(Je),{size:"sm",disabled:!a.aiSessionId,onClick:m},{default:D(()=>[...S[22]||(S[22]=[de("Create",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1}),T(g(hr),null,{default:D(()=>[T(g(ha),null,{default:D(()=>[T(g(pa),null,{default:D(()=>[...S[23]||(S[23]=[de("Deployments",-1)])]),_:1}),T(g(da),null,{default:D(()=>[de(Z(i.value||"Local and Control Plane applied triggers on this instance."),1)]),_:1})]),_:1}),T(g(wn),null,{default:D(()=>[o.value.length?(I(),V("div",aA,[(I(!0),V(rt,null,$t(o.value,E=>(I(),V("section",{key:E.deployment.deploymentId||E.config.configHash,class:"trigger-card"},[k("header",iA,[k("div",null,[k("div",oA,[de(Z(E.config.name)+" ",1),T(g(Lr),{variant:"secondary"},{default:D(()=>[de(Z(E.config.source.type),1)]),_:2},1024),T(g(Lr),null,{default:D(()=>[de(Z(E.deployment.origin),1)]),_:2},1024)]),k("div",lA,[k("span",null,Z(_(E.config.configHash)),1),k("span",null,Z(E.runtime?.status||(E.deployment.enabled?"idle":"disabled")),1),k("span",null,Z($(E.deployment.target)),1)])]),k("div",cA,[T(g(Je),{variant:"outline",size:"sm",onClick:F=>p(E.config.configHash)},{default:D(()=>[...S[24]||(S[24]=[de("Run",-1)])]),_:1},8,["onClick"]),E.deployment.enabled?(I(),ye(g(Je),{key:0,variant:"outline",size:"sm",onClick:F=>y(E.config.configHash)},{default:D(()=>[...S[25]||(S[25]=[de("Disable",-1)])]),_:1},8,["onClick"])):(I(),ye(g(Je),{key:1,variant:"outline",size:"sm",onClick:F=>w(E.config.configHash)},{default:D(()=>[...S[26]||(S[26]=[de("Enable",-1)])]),_:1},8,["onClick"])),T(g(Je),{variant:"outline",size:"sm",onClick:F=>x(E.config.configHash)},{default:D(()=>[...S[27]||(S[27]=[de("Delete",-1)])]),_:1},8,["onClick"])])]),k("pre",uA,Z(E.config.action.promptTemplate),1),E.runtime?.lastError?(I(),V("p",dA,Z(E.runtime.lastError),1)):pe("",!0)]))),128))])):(I(),V("p",hA,"No triggers yet."))]),_:1})]),_:1})]),T(g(hr),null,{default:D(()=>[T(g(ha),null,{default:D(()=>[T(g(pa),null,{default:D(()=>[...S[28]||(S[28]=[de("Recent Runs",-1)])]),_:1}),T(g(da),null,{default:D(()=>[de(Z(g(n).data.value?.recentRuns.length||0)+" runs",1)]),_:1})]),_:1}),T(g(wn),null,{default:D(()=>[g(n).data.value?.recentRuns.length?(I(),V("div",pA,[(I(!0),V(rt,null,$t(g(n).data.value.recentRuns,E=>(I(),V("div",{key:E.id,class:"trigger-run-row"},[T(g(Lr),{variant:E.status==="failed"?"destructive":"secondary"},{default:D(()=>[de(Z(E.status),1)]),_:2},1032,["variant"]),k("span",null,Z(_(E.configHash)),1),k("span",null,Z(E.eventType),1),k("span",null,Z(z(E.startedAt)),1),E.error?(I(),V("span",fA,Z(E.error),1)):pe("",!0)]))),128))])):(I(),V("p",mA,"No trigger runs yet."))]),_:1})]),_:1})]))}}),vA={class:"automation-status"},bA=Ae({__name:"AutomationStatus",props:{session:{}},setup(e){const t=e,n=E4(t.session.id,t.session.status==="running"&&!!t.session.automation),r=be(()=>n.isLoading.value?"checking":n.data.value?.ready?"ready":"not ready"),s=be(()=>{const a=n.data.value;return a?a.ready?[a.browser,a.protocolVersion?`protocol ${a.protocolVersion}`:void 0].filter(Boolean).join(" · "):a.error?.message||a.endpoint:t.session.automation?.endpoint||""});return(a,i)=>(I(),V("div",vA,[T(g(Lr),{variant:g(n).data.value?.ready?"default":"secondary"},{default:D(()=>[de(Z(r.value),1)]),_:1},8,["variant"]),k("span",null,Z(s.value),1)]))}}),yA={class:"panel"},wA={class:"apps-layout"},kA={class:"catalog-content"},xA={class:"section-head"},SA={class:"catalog-head"},_A={class:"item-title"},EA={class:"item-meta"},AA={key:0},TA={class:"catalog-actions"},CA={class:"launch-form"},RA={key:0,class:"display-fields"},OA={key:1,class:"form-error"},IA={class:"section-head sessions-head"},NA={class:"section-actions"},MA={class:"session-actions"},zA={key:0,class:"session-error"},DA={class:"session-metadata"},$A={key:0},PA={key:1},BA={key:2},LA={key:3},FA={key:4},UA={key:0},qA={key:1},HA={key:5},VA={key:6},GA={key:0},ZA={key:1},jA={class:"sessions"},KA={key:0,class:"workspace-tabs"},WA={class:"workspace-tab-list"},QA=["onClick"],JA={class:"tab-kind"},YA=["onClick"],XA={key:0,class:"desktop-tab-toolbar"},eT={key:0,class:"segmented-control"},tT={class:"workspace-tab-panel"},nT=["src","title"],rT={key:2,class:"gui-session"},sT=["src","title"],aT={key:1,class:"logs-empty"},iT={key:4,class:"logs-empty"},oT={key:1,class:"logs-empty"},lT={key:1,class:"logs-empty"},cT={class:"modal-header"},uT={key:0},dT={class:"modal-scroll-content"},hT={class:"custom-app-form"},pT={key:0,class:"display-fields"},fT={class:"catalog-actions"},mT={key:0,class:"form-error"},gT={class:"form-error"},vT=Ae({__name:"AppsView",setup(e){const t=jr(),n=kh(),r=xh(),s=Vs(),a=hs(),i=Gs(),o=Ce("[]"),l=Ce(""),c=Ce(""),d=Ce(!1),f=Ce(!1),m=Ce("scale"),p=Pr({id:"",name:"",description:"",kind:"tty",command:"",args:"",cwd:"",envJson:"{}",width:"",height:"",depth:""}),w=Pr({}),y=Pr({}),x=be(()=>i.tabs.find(H=>H.id===i.activeTabId)),_=be(()=>m0(x.value,s.data.value||[])),$=be(()=>new Set((r.data.value?.items||[]).map(H=>H.id))),z=be(()=>(s.data.value||[]).filter(se)),C=be(()=>f.value?s.data.value||[]:(s.data.value||[]).filter(H=>!se(H))),S=be(()=>{const H=r.error.value;return H?`Custom app catalog is invalid: ${H instanceof Error?H.message:String(H)}`:""});cn(()=>r.data.value?.items,H=>{o.value=JSON.stringify(H||[],null,2)},{immediate:!0}),On(()=>{if(!s.data.value)return;const H=s.data.value||[];i.pruneSession(new Set(H.map(L=>L.id)),Ds(H))});function E(H){return w[H]||={title:"",cwd:"",argsJson:"[]",envJson:"{}",width:"",height:"",depth:""},w[H]}function F(H,L,U){const Ne=H.trim();if(!Ne)return L;try{return JSON.parse(Ne)}catch(lt){throw new Error(`${U} is invalid JSON: ${lt instanceof Error?lt.message:String(lt)}`)}}function N(H){const L=E(H.id),U={},Ne=F(L.argsJson,[],"Args"),lt=F(L.envJson,{},"Env");if(!Array.isArray(Ne)||Ne.some(Dn=>typeof Dn!="string"))throw new Error("Args JSON must be an array of strings.");if(!lt||typeof lt!="object"||Array.isArray(lt)||Object.values(lt).some(Dn=>typeof Dn!="string"))throw new Error("Env JSON must be an object with string values.");L.title.trim()&&(U.title=L.title.trim()),L.cwd.trim()&&(U.cwd=L.cwd.trim()),Ne.length&&(U.args=Ne),Object.keys(lt).length&&(U.env=lt);const nn={width:G(L.width),height:G(L.height),depth:G(L.depth)},Cn=Object.fromEntries(Object.entries(nn).filter(([,Dn])=>Dn!==void 0));return H.kind==="gui"&&Object.keys(Cn).length&&(U.display=Cn),U}function G(H){const L=H.trim();if(!L)return;const U=Number(L);if(!Number.isInteger(U)||U<=0)throw new Error("Display values must be positive integers.");return U}function P(H){if(H.vnc?.backend==="kasmvnc"){const lt=i.guiHidpi?Xe():1,nn=new URLSearchParams({path:Ei(`/api/apps/sessions/${H.id}/web/websockify`),autoconnect:"1",resize:m.value,enable_hidpi:i.guiHidpi&<>1?"1":"0",show_control_bar:"1"}),Cn=q(H,lt);return m.value==="scale"&&Cn&&(nn.set("forced_resolution_x",String(Cn.width)),nn.set("forced_resolution_y",String(Cn.height))),a.token&&nn.set("token",a.token),`${Pn(H.vnc.webPath)}?${nn.toString()}`}const L=a.token?`?token=${encodeURIComponent(a.token)}`:"",U=H.vnc?.webPath?`${Ei(H.vnc.webPath)}${L}`:"",Ne=new URLSearchParams({path:U,autoconnect:"1",resize:m.value});return Pn(`/api/novnc/vnc.html?${Ne.toString()}`)}function j(H,L){if(L.vnc?.backend!=="kasmvnc")return;const U=H.target;if(!(U instanceof HTMLIFrameElement))return;U.contentWindow?.postMessage({action:"resize",value:m.value},"*");const Ne=q(L,i.guiHidpi?Xe():1);m.value==="scale"&&Ne&&U.contentWindow?.postMessage({action:"set_resolution",value_x:Ne.width,value_y:Ne.height},"*")}function q(H,L){if(!H.display)return;const U=L>1?L:1;return{width:Math.max(1,Math.round(H.display.width/U)),height:Math.max(1,Math.round(H.display.height/U))}}function Y(H){m.value=H}function te(H){i.setGuiHidpi(H)}function he(H){const L=new URLSearchParams;a.token&&L.set("token",a.token);const U=L.toString()?`?${L.toString()}`:"";return Pn(`/api/apps/sessions/${H.id}/screenshot${U}`)}function Se(H){const L=Pn(H.web?.webPath||"");return a.token?`${L}${L.includes("?")?"&":"?"}token=${encodeURIComponent(a.token)}`:L}function re(H){return H.type==="logs"?"logs":H.type==="shared-vnc"?"shared":H.type==="app-vnc"?"vnc":H.type==="app-web"?"web":"tty"}function ne(H){return H.status==="running"}function Re(H){return ne(H)&&(H.kind==="tty"||H.kind==="web"&&!!H.web||H.kind==="gui"&&!!H.vnc)}function se(H){return H.error?.code==="APP_SESSION_RESTORED_WITHOUT_PROCESS"}function Le(H){const L=new Date(H);return Number.isNaN(L.getTime())?H:L.toLocaleString()}function Ye(H){return Object.keys(H).sort().join(", ")}async function nt(H){y[H.id]="";try{const L=await _h(H.id,Mt(H,N(H)));ze(L),Fe(L),await t.invalidateQueries({queryKey:["app-sessions"]}),await t.invalidateQueries({queryKey:["status"]})}catch(L){y[H.id]=L instanceof Error?L.message:String(L)}}function Mt(H,L){if(H.kind!=="gui")return L;const U=i.guiHidpi?Xe():1,Ne={...L.env||{}};Ne.TASK_HANDOFF_GUI_SCALE||(Ne.TASK_HANDOFF_GUI_SCALE=tt(U));const lt=O(L.display||H.display,U);return{...L,env:Ne,...lt?{display:lt}:{}}}function Xe(){const H=typeof window>"u"?1:window.devicePixelRatio||1;return Math.min(3,Math.max(1,H))}function tt(H){return H.toFixed(2).replace(/\.?0+$/,"")}function O(H,L){return!H?.width||!H.height?H:{...H,width:Math.round(H.width*L),height:Math.round(H.height*L)}}async function oe(H){await cs(H),await t.invalidateQueries({queryKey:["app-sessions"]}),await t.invalidateQueries({queryKey:["status"]})}async function K(H){if(H.type==="app-vnc"||H.type==="app-web"||H.type==="app-tty"){await cs(H.sessionId),i.close(H.id),await t.invalidateQueries({queryKey:["app-sessions"]}),await t.invalidateQueries({queryKey:["status"]});return}i.close(H.id)}async function ue(H){const L=await d0(H);ze(L),Fe(L),await t.invalidateQueries({queryKey:["app-sessions"]}),await t.invalidateQueries({queryKey:["status"]})}async function Ee(H){await Eh(H);const L=(s.data.value||[]).filter(U=>U.id!==H);i.pruneSession(new Set(L.map(U=>U.id)),Ds(L)),await t.invalidateQueries({queryKey:["app-sessions"]}),await t.invalidateQueries({queryKey:["status"]})}function Fe(H){if(!Re(H)){_e(H);return}i.open(za(H))}function ze(H){t.setQueryData(["app-sessions"],(L=[])=>[H,...L.filter(U=>U.id!==H.id)])}function _e(H){i.open({type:"logs",id:`logs:${H.id}`,sessionId:H.id,title:`${H.title} logs`})}function pt(){l.value="",o.value=JSON.stringify(r.data.value?.items||[],null,2)}function je(H){return $.value.has(H)}function kt(H){return(H.match(/"[^"]*"|'[^']*'|\S+/g)||[]).map(U=>U.replace(/^(['"])(.*)\1$/,"$2"))}function pn(){const H=JSON.parse(o.value||"[]");if(!Array.isArray(H))throw new Error("Custom Apps JSON must be an array.");return H}function qn(){c.value="",p.id="",p.name="",p.description="",p.kind="tty",p.command="",p.args="",p.cwd="",p.envJson="{}",p.width="",p.height="",p.depth=""}function sr(H){c.value=H.id,p.id=H.id,p.name=H.name,p.description=H.description||"",p.kind=H.kind==="gui"?"gui":"tty",p.command=H.command||"",p.args=(H.args||[]).map(L=>/\s/.test(L)?JSON.stringify(L):L).join(" "),p.cwd=H.cwd||"",p.envJson=JSON.stringify(H.env||{},null,2),p.width=H.display?.width===void 0?"":String(H.display.width),p.height=H.display?.height===void 0?"":String(H.display.height),p.depth=H.display?.depth===void 0?"":String(H.display.depth)}function Qs(H){l.value="",sr(H)}function Js(){l.value="",qn()}function Sr(){const H=p.id.trim(),L=p.name.trim(),U=p.command.trim();if(!H||!L||!U)throw new Error("Custom app id, name, and command are required.");const Ne={id:H,name:L,kind:p.kind,command:U};p.description.trim()&&(Ne.description=p.description.trim());const lt=kt(p.args);lt.length&&(Ne.args=lt),p.cwd.trim()&&(Ne.cwd=p.cwd.trim());const nn=F(p.envJson,{},"Custom app env");if(!nn||typeof nn!="object"||Array.isArray(nn)||Object.values(nn).some(Cn=>typeof Cn!="string"))throw new Error("Custom app env JSON must be an object with string values.");if(Object.keys(nn).length&&(Ne.env=nn),p.kind==="gui"){const Cn={width:G(p.width),height:G(p.height),depth:G(p.depth)},Dn=Object.fromEntries(Object.entries(Cn).filter(([,wo])=>wo!==void 0));Object.keys(Dn).length&&(Ne.display=Dn)}return Ne}async function Tn(){l.value="";try{const H=pn(),L=Sr(),U=c.value;if(!U&&H.some(lt=>lt.id===L.id))throw new Error("Custom app id already exists.");if(U&&L.id!==U&&H.some(lt=>lt.id===L.id))throw new Error("Custom app id already exists.");if(U&&!H.some(lt=>lt.id===U))throw new Error("Custom app was not found.");const Ne=U?H.map(lt=>lt.id===U?L:lt):[...H,L];await Os(Ne),o.value=JSON.stringify(Ne,null,2),qn(),await t.invalidateQueries({queryKey:["app-catalog"]}),await t.invalidateQueries({queryKey:["app-catalog-custom"]})}catch(H){l.value=H instanceof Error?H.message:String(H)}}async function Yr(H){l.value="";try{const L=pn(),U=L.filter(Ne=>Ne.id!==H);if(U.length===L.length)throw new Error("Custom app was not found.");await Os(U),o.value=JSON.stringify(U,null,2),c.value===H&&qn(),await t.invalidateQueries({queryKey:["app-catalog"]}),await t.invalidateQueries({queryKey:["app-catalog-custom"]})}catch(L){l.value=L instanceof Error?L.message:String(L)}}async function Hn(){l.value="";try{const H=pn();await Os(H),await t.invalidateQueries({queryKey:["app-catalog"]}),await t.invalidateQueries({queryKey:["app-catalog-custom"]}),l.value=""}catch(H){l.value=H instanceof Error?H.message:String(H)}}return(H,L)=>(I(),V("section",yA,[L[49]||(L[49]=k("h1",null,"Desktop",-1)),k("div",wA,[T(g(kn),{class:"catalog"},{default:D(()=>[k("aside",kA,[k("div",xA,[L[18]||(L[18]=k("h2",null,"Apps",-1)),T(g(Je),{variant:"outline",size:"sm",onClick:L[0]||(L[0]=U=>d.value=!0)},{default:D(()=>[...L[17]||(L[17]=[de("Custom Apps",-1)])]),_:1})]),(I(!0),V(rt,null,$t(g(n).data.value||[],U=>(I(),ye(g(hr),{key:U.id},{default:D(()=>[T(g(wn),{class:"catalog-item"},{default:D(()=>[k("div",SA,[k("div",null,[k("div",_A,Z(U.name),1),k("div",EA,[T(g(Lr),{variant:"secondary"},{default:D(()=>[de(Z(U.kind),1)]),_:2},1024),U.command?(I(),V("span",AA,Z(U.command),1)):pe("",!0)])]),k("div",TA,[T(g(Je),{size:"sm",onClick:Ne=>nt(U)},{default:D(()=>[...L[19]||(L[19]=[de("Launch",-1)])]),_:1},8,["onClick"]),je(U.id)?(I(),ye(g(Je),{key:0,variant:"outline",size:"sm",onClick:Ne=>Qs(U)},{default:D(()=>[...L[20]||(L[20]=[de("Edit",-1)])]),_:1},8,["onClick"])):pe("",!0),je(U.id)?(I(),ye(g(Je),{key:1,variant:"outline",size:"sm",onClick:Ne=>Yr(U.id)},{default:D(()=>[...L[21]||(L[21]=[de("Remove",-1)])]),_:1},8,["onClick"])):pe("",!0)])]),k("div",CA,[T(g(yt),{modelValue:E(U.id).title,"onUpdate:modelValue":Ne=>E(U.id).title=Ne,placeholder:"title"},null,8,["modelValue","onUpdate:modelValue"]),T(g(yt),{modelValue:E(U.id).cwd,"onUpdate:modelValue":Ne=>E(U.id).cwd=Ne,placeholder:"/workspace"},null,8,["modelValue","onUpdate:modelValue"]),U.kind==="gui"?(I(),V("div",RA,[T(g(yt),{modelValue:E(U.id).width,"onUpdate:modelValue":Ne=>E(U.id).width=Ne,inputmode:"numeric",placeholder:"width"},null,8,["modelValue","onUpdate:modelValue"]),T(g(yt),{modelValue:E(U.id).height,"onUpdate:modelValue":Ne=>E(U.id).height=Ne,inputmode:"numeric",placeholder:"height"},null,8,["modelValue","onUpdate:modelValue"]),T(g(yt),{modelValue:E(U.id).depth,"onUpdate:modelValue":Ne=>E(U.id).depth=Ne,inputmode:"numeric",placeholder:"depth"},null,8,["modelValue","onUpdate:modelValue"])])):pe("",!0),T(g(Qn),{modelValue:E(U.id).argsJson,"onUpdate:modelValue":Ne=>E(U.id).argsJson=Ne,class:"launch-json",spellcheck:"false",placeholder:'args JSON, e.g. ["https://example.com"]'},null,8,["modelValue","onUpdate:modelValue"]),T(g(Qn),{modelValue:E(U.id).envJson,"onUpdate:modelValue":Ne=>E(U.id).envJson=Ne,class:"launch-json",spellcheck:"false",placeholder:'env JSON, e.g. {"LANG":"C.UTF-8"}'},null,8,["modelValue","onUpdate:modelValue"]),y[U.id]?(I(),V("p",OA,Z(y[U.id]),1)):pe("",!0)])]),_:2},1024)]),_:2},1024))),128)),k("div",IA,[L[22]||(L[22]=k("h2",null,"Sessions",-1)),k("div",NA,[k("span",null,Z(C.value.length),1),z.value.length?(I(),ye(g(Je),{key:0,variant:"outline",size:"sm",onClick:L[1]||(L[1]=U=>f.value=!f.value)},{default:D(()=>[de(Z(f.value?"Hide restored":`Show restored (${z.value.length})`),1)]),_:1})):pe("",!0)])]),(I(!0),V(rt,null,$t(C.value,U=>(I(),ye(g(hr),{key:U.id,class:"session-card"},{default:D(()=>[T(g(ha),{class:"session-header"},{default:D(()=>[k("div",null,[T(g(pa),null,{default:D(()=>[de(Z(U.title),1)]),_:2},1024),T(g(da),null,{default:D(()=>[de(Z(U.appId)+" · "+Z(Le(U.updatedAt)),1)]),_:2},1024)]),k("div",MA,[T(g(Lr),{variant:U.status==="running"?"default":"secondary"},{default:D(()=>[de(Z(U.status),1)]),_:2},1032,["variant"]),T(g(Je),{variant:"outline",size:"sm",disabled:!ne(U),onClick:Ne=>oe(U.id)},{default:D(()=>[...L[23]||(L[23]=[de("Stop",-1)])]),_:1},8,["disabled","onClick"]),T(g(Je),{variant:"outline",size:"sm",onClick:Ne=>ue(U.id)},{default:D(()=>[...L[24]||(L[24]=[de("Restart",-1)])]),_:1},8,["onClick"]),T(g(Je),{variant:"outline",size:"sm",disabled:!Re(U),onClick:Ne=>Fe(U)},{default:D(()=>[...L[25]||(L[25]=[de("Open",-1)])]),_:1},8,["disabled","onClick"]),T(g(Je),{variant:"outline",size:"sm",onClick:Ne=>_e(U)},{default:D(()=>[...L[26]||(L[26]=[de("Logs",-1)])]),_:1},8,["onClick"]),U.kind==="gui"&&ne(U)?(I(),ye(g(Je),{key:0,variant:"outline",size:"sm",as:"a",href:he(U),target:"_blank",rel:"noreferrer"},{default:D(()=>[...L[27]||(L[27]=[de("Screenshot",-1)])]),_:1},8,["href"])):pe("",!0),T(g(Je),{variant:"outline",size:"sm",onClick:Ne=>Ee(U.id)},{default:D(()=>[...L[28]||(L[28]=[de("Delete",-1)])]),_:1},8,["onClick"])])]),_:2},1024),T(g(wn),null,{default:D(()=>[U.error?(I(),V("p",zA,Z(U.error.code)+": "+Z(U.error.message),1)):pe("",!0),k("dl",DA,[k("div",null,[L[29]||(L[29]=k("dt",null,"Created",-1)),k("dd",null,Z(Le(U.createdAt)),1)]),k("div",null,[L[30]||(L[30]=k("dt",null,"Updated",-1)),k("dd",null,Z(Le(U.updatedAt)),1)]),U.tty?.cwd||U.launch?.cwd?(I(),V("div",$A,[L[31]||(L[31]=k("dt",null,"CWD",-1)),k("dd",null,Z(U.launch?.cwd||U.tty?.cwd),1)])):pe("",!0),U.launch?.args?.length?(I(),V("div",PA,[L[32]||(L[32]=k("dt",null,"Args",-1)),k("dd",null,Z(U.launch.args.join(" ")),1)])):pe("",!0),U.launch?.env&&Object.keys(U.launch.env).length?(I(),V("div",BA,[L[33]||(L[33]=k("dt",null,"Env",-1)),k("dd",null,Z(Ye(U.launch.env)),1)])):pe("",!0),U.display?(I(),V("div",LA,[L[34]||(L[34]=k("dt",null,"Display",-1)),k("dd",null,Z(U.display.display)+" "+Z(U.display.width)+"x"+Z(U.display.height)+"x"+Z(U.display.depth),1)])):pe("",!0),U.vnc?(I(),V("div",FA,[L[35]||(L[35]=k("dt",null,"Ports",-1)),k("dd",null,[de(Z(U.vnc.backend==="kasmvnc"?"kasmvnc":"vnc")+" "+Z(U.vnc.port),1),U.vnc.websockifyPort?(I(),V("span",UA," · ws "+Z(U.vnc.websockifyPort),1)):pe("",!0),U.automation?(I(),V("span",qA," · cdp "+Z(U.automation.port),1)):pe("",!0)])])):pe("",!0),U.automation?(I(),V("div",HA,[L[36]||(L[36]=k("dt",null,"Automation",-1)),k("dd",null,[T(bA,{session:U},null,8,["session"])])])):pe("",!0),U.process?(I(),V("div",VA,[L[37]||(L[37]=k("dt",null,"Process",-1)),k("dd",null,[de(Z(U.process.command),1),U.process.pid?(I(),V("span",GA," · pid "+Z(U.process.pid),1)):pe("",!0),U.process.exitCode!==void 0&&U.process.exitCode!==null?(I(),V("span",ZA," · exit "+Z(U.process.exitCode),1)):pe("",!0)])])):pe("",!0)])]),_:2},1024)]),_:2},1024))),128))])]),_:1}),k("section",jA,[L[41]||(L[41]=k("h2",null,"Workspace",-1)),g(i).tabs.length?(I(),V("div",KA,[T(g(kn),{class:"workspace-tab-list-scroll"},{default:D(()=>[k("div",WA,[(I(!0),V(rt,null,$t(g(i).tabs,U=>(I(),V("button",{key:U.id,type:"button",class:wt({active:g(i).activeTabId===U.id}),onClick:Ne=>g(i).setActive(U.id)},[k("span",null,Z(U.title),1),k("span",JA,Z(re(U)),1),k("span",{class:"tab-close",title:"Close tab","aria-label":"Close tab",onClick:jt(Ne=>K(U),["stop"])},[T(g(us),{size:13,"stroke-width":2.2})],8,YA)],10,QA))),128))])]),_:1}),_.value?(I(),V("div",XA,[k("span",null,Z(_.value.appId)+" · "+Z(_.value.status),1),k("div",null,[_.value.kind==="gui"&&_.value.status==="running"?(I(),V("div",eT,[T(g(Vh),{type:"single","model-value":m.value,"aria-label":"VNC resize mode","onUpdate:modelValue":L[2]||(L[2]=U=>U&&Y(U))},{default:D(()=>[T(g(Ti),{value:"scale"},{default:D(()=>[...L[38]||(L[38]=[de("Scale",-1)])]),_:1}),T(g(Ti),{value:"remote"},{default:D(()=>[...L[39]||(L[39]=[de("Resize",-1)])]),_:1})]),_:1},8,["model-value"]),T(g(qh),{"model-value":g(i).guiHidpi,"aria-label":"Toggle HiDPI","onUpdate:modelValue":te},{default:D(()=>[...L[40]||(L[40]=[de("HiDPI",-1)])]),_:1},8,["model-value"])])):pe("",!0)])])):pe("",!0),k("div",tT,[_.value&&x.value?(I(),V(rt,{key:0},[x.value.type==="app-tty"&&_.value.status==="running"?(I(),ye(ap,{key:0,session:_.value},null,8,["session"])):x.value.type==="app-web"&&_.value.status==="running"&&_.value.web?(I(),V("iframe",{key:1,class:"web-frame",src:Se(_.value),title:_.value.title,allow:"clipboard-read; clipboard-write; fullscreen"},null,8,nT)):x.value.type==="app-vnc"||x.value.type==="shared-vnc"?(I(),V("div",rT,[_.value.vnc?(I(),V("iframe",{key:`${_.value.id}:${m.value}:${g(i).guiHidpi?"hidpi":"1x"}`,class:"vnc-frame workspace-vnc-frame",src:P(_.value),title:`${x.value.title} VNC`,allow:"clipboard-read; clipboard-write; fullscreen",onLoad:L[3]||(L[3]=U=>j(U,_.value))},null,40,sT)):(I(),V("p",aT,"VNC is unavailable for this session."))])):x.value.type==="logs"?(I(),ye(sp,{key:3,session:_.value},null,8,["session"])):(I(),V("p",iT,"Runtime view is unavailable for this session state."))],64)):(I(),V("p",oT,"The selected workspace tab no longer has a running session."))])])):(I(),V("p",lT,"Open a running app to create a workspace tab."))])]),T(g(Xh),{open:d.value,"onUpdate:open":L[16]||(L[16]=U=>d.value=U)},{default:D(()=>[T(g(ep),{class:"modal-panel gap-0 p-0",style:{width:"min(1180px, calc(100vw - 48px))","max-width":"calc(100vw - 48px)"}},{default:D(()=>[k("header",cT,[k("div",null,[T(g(np),null,{default:D(()=>[...L[42]||(L[42]=[de("Custom Apps",-1)])]),_:1}),T(g(tp),{class:"sr-only"},{default:D(()=>[...L[43]||(L[43]=[de("Create and manage custom applications available in this controlled instance.",-1)])]),_:1}),g(r).data.value?(I(),V("p",uT,Z(g(r).data.value.path),1)):pe("",!0)])]),T(g(kn),{class:"modal-scroll"},{default:D(()=>[k("div",dT,[T(g(hr),{class:"catalog-editor"},{default:D(()=>[T(g(wn),null,{default:D(()=>[k("div",hT,[T(g(yt),{modelValue:p.id,"onUpdate:modelValue":L[4]||(L[4]=U=>p.id=U),placeholder:"id"},null,8,["modelValue"]),T(g(yt),{modelValue:p.name,"onUpdate:modelValue":L[5]||(L[5]=U=>p.name=U),placeholder:"name"},null,8,["modelValue"]),T(g(Qn),{modelValue:p.description,"onUpdate:modelValue":L[6]||(L[6]=U=>p.description=U),class:"launch-json",spellcheck:"false",placeholder:"description"},null,8,["modelValue"]),T(g(Ci),{modelValue:p.kind,"onUpdate:modelValue":L[7]||(L[7]=U=>p.kind=U)},{default:D(()=>[T(g(Oi),{class:"native-select"},{default:D(()=>[T(g(Ii),{placeholder:"App kind"})]),_:1}),T(g(Ri),null,{default:D(()=>[T(g(zr),{value:"tty"},{default:D(()=>[...L[44]||(L[44]=[de("TTY",-1)])]),_:1}),T(g(zr),{value:"gui"},{default:D(()=>[...L[45]||(L[45]=[de("GUI",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"]),T(g(yt),{modelValue:p.command,"onUpdate:modelValue":L[8]||(L[8]=U=>p.command=U),placeholder:"/usr/bin/app"},null,8,["modelValue"]),T(g(yt),{modelValue:p.args,"onUpdate:modelValue":L[9]||(L[9]=U=>p.args=U),placeholder:'args, e.g. --new-window "https://example.com"'},null,8,["modelValue"]),T(g(yt),{modelValue:p.cwd,"onUpdate:modelValue":L[10]||(L[10]=U=>p.cwd=U),placeholder:"/workspace"},null,8,["modelValue"]),T(g(Qn),{modelValue:p.envJson,"onUpdate:modelValue":L[11]||(L[11]=U=>p.envJson=U),class:"launch-json",spellcheck:"false",placeholder:'env JSON, e.g. {"LANG":"C.UTF-8"}'},null,8,["modelValue"]),p.kind==="gui"?(I(),V("div",pT,[T(g(yt),{modelValue:p.width,"onUpdate:modelValue":L[12]||(L[12]=U=>p.width=U),inputmode:"numeric",placeholder:"width"},null,8,["modelValue"]),T(g(yt),{modelValue:p.height,"onUpdate:modelValue":L[13]||(L[13]=U=>p.height=U),inputmode:"numeric",placeholder:"height"},null,8,["modelValue"]),T(g(yt),{modelValue:p.depth,"onUpdate:modelValue":L[14]||(L[14]=U=>p.depth=U),inputmode:"numeric",placeholder:"depth"},null,8,["modelValue"])])):pe("",!0),k("div",fT,[T(g(Je),{size:"sm",onClick:Tn},{default:D(()=>[de(Z(c.value?"Update App":"Add App"),1)]),_:1}),c.value?(I(),ye(g(Je),{key:0,variant:"outline",size:"sm",onClick:Js},{default:D(()=>[...L[46]||(L[46]=[de("Cancel",-1)])]),_:1})):pe("",!0)])])]),_:1}),T(g(wn),null,{default:D(()=>[T(g(Qn),{modelValue:o.value,"onUpdate:modelValue":L[15]||(L[15]=U=>o.value=U),class:"catalog-json",spellcheck:"false"},null,8,["modelValue"]),S.value?(I(),V("p",mT,Z(S.value),1)):pe("",!0)]),_:1}),T(g(v0),{class:"editor-actions"},{default:D(()=>[T(g(Je),{variant:"outline",size:"sm",onClick:pt},{default:D(()=>[...L[47]||(L[47]=[de("Reset",-1)])]),_:1}),T(g(Je),{size:"sm",onClick:Hn},{default:D(()=>[...L[48]||(L[48]=[de("Save",-1)])]),_:1})]),_:1}),l.value?(I(),ye(g(wn),{key:0},{default:D(()=>[k("p",gT,Z(l.value),1)]),_:1})):pe("",!0)]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"])]))}}),bT=ZE({history:_E(lh()||"/"),routes:[{path:"/",component:rp},{path:"/triggers",component:gA},{path:"/apps",component:vT},{path:"/:pathMatch(.*)*",redirect:"/"}]}),yT="task-handoff.theme",ol="dark";function wT(){if(typeof window>"u")return ol;try{const e=window.localStorage.getItem(yT);return e==="light"||e==="dark"?e:ol}catch{return ol}}function kT(e){document.documentElement.dataset.theme=e,document.documentElement.classList.toggle("dark",e==="dark")}function xT(){kT(wT())}xT();const ST=window,_T=!!ST.taskHandoffDesktop||navigator.userAgent.includes("Electron");_T&&navigator.platform.toLowerCase().includes("mac")&&document.documentElement.classList.add("native-macos-titlebar");Jm(F_).use(tg()).use(Bg).use(bT).mount("#app");export{By as _,Kb as g};
|