From 3a73f6c409e674a402953a0ab19ffe332311f52f Mon Sep 17 00:00:00 2001 From: takejohn Date: Sun, 12 Jan 2025 05:58:08 +0000 Subject: [PATCH] deploy: 35c63c5fe0eab0047754f79062d1a769e2395bdf --- .../{index-wp5tlze_.js => index-BBmCefCt.js} | 24 +++++++++---------- index.html | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) rename assets/{index-wp5tlze_.js => index-BBmCefCt.js} (84%) diff --git a/assets/index-wp5tlze_.js b/assets/index-BBmCefCt.js similarity index 84% rename from assets/index-wp5tlze_.js rename to assets/index-BBmCefCt.js index 7d58e872..88735548 100644 --- a/assets/index-wp5tlze_.js +++ b/assets/index-BBmCefCt.js @@ -2,24 +2,24 @@ * @vue/shared v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function ys(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}const ve={},dr=[],bt=()=>{},po=()=>!1,xn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ws=e=>e.startsWith("onUpdate:"),Me=Object.assign,bs=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},go=Object.prototype.hasOwnProperty,ce=(e,t)=>go.call(e,t),Y=Array.isArray,gr=e=>qr(e)==="[object Map]",Ji=e=>qr(e)==="[object Set]",Js=e=>qr(e)==="[object Date]",Q=e=>typeof e=="function",Ce=e=>typeof e=="string",_t=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Zi=e=>(be(e)||Q(e))&&Q(e.then)&&Q(e.catch),Xi=Object.prototype.toString,qr=e=>Xi.call(e),mo=e=>qr(e).slice(8,-1),Qi=e=>qr(e)==="[object Object]",xs=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Mr=ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_n=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},vo=/-(\w)/g,Lt=_n(e=>e.replace(vo,(t,r)=>r?r.toUpperCase():"")),yo=/\B([A-Z])/g,rr=_n(e=>e.replace(yo,"-$1").toLowerCase()),ea=_n(e=>e.charAt(0).toUpperCase()+e.slice(1)),Tn=_n(e=>e?`on${ea(e)}`:""),Dt=(e,t)=>!Object.is(e,t),rn=(e,...t)=>{for(let r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},es=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Zs;const En=()=>Zs||(Zs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function _s(e){if(Y(e)){const t={};for(let r=0;r{if(r){const n=r.split(bo);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Cn(e){let t="";if(Ce(e))t=e;else if(Y(e))for(let r=0;r!!(e&&e.__v_isRef===!0),cr=e=>Ce(e)?e:e==null?"":Y(e)||be(e)&&(e.toString===Xi||!Q(e.toString))?na(e)?cr(e.value):JSON.stringify(e,sa,2):String(e),sa=(e,t)=>na(t)?sa(e,t.value):gr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[In(n,i)+" =>"]=s,r),{})}:Ji(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>In(r))}:_t(t)?In(t):be(t)&&!Y(t)&&!Qi(t)?String(t):t,In=(e,t="")=>{var r;return _t(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};/** +**//*! #__NO_SIDE_EFFECTS__ */function ys(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}const ve={},dr=[],bt=()=>{},go=()=>!1,xn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ws=e=>e.startsWith("onUpdate:"),Me=Object.assign,bs=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},mo=Object.prototype.hasOwnProperty,ce=(e,t)=>mo.call(e,t),Y=Array.isArray,gr=e=>qr(e)==="[object Map]",Ji=e=>qr(e)==="[object Set]",Js=e=>qr(e)==="[object Date]",Q=e=>typeof e=="function",Ce=e=>typeof e=="string",_t=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Zi=e=>(be(e)||Q(e))&&Q(e.then)&&Q(e.catch),Xi=Object.prototype.toString,qr=e=>Xi.call(e),vo=e=>qr(e).slice(8,-1),Qi=e=>qr(e)==="[object Object]",xs=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Mr=ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_n=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},yo=/-(\w)/g,Lt=_n(e=>e.replace(yo,(t,r)=>r?r.toUpperCase():"")),wo=/\B([A-Z])/g,rr=_n(e=>e.replace(wo,"-$1").toLowerCase()),ea=_n(e=>e.charAt(0).toUpperCase()+e.slice(1)),Tn=_n(e=>e?`on${ea(e)}`:""),Dt=(e,t)=>!Object.is(e,t),rn=(e,...t)=>{for(let r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},es=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Zs;const En=()=>Zs||(Zs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function _s(e){if(Y(e)){const t={};for(let r=0;r{if(r){const n=r.split(xo);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Cn(e){let t="";if(Ce(e))t=e;else if(Y(e))for(let r=0;r!!(e&&e.__v_isRef===!0),cr=e=>Ce(e)?e:e==null?"":Y(e)||be(e)&&(e.toString===Xi||!Q(e.toString))?na(e)?cr(e.value):JSON.stringify(e,sa,2):String(e),sa=(e,t)=>na(t)?sa(e,t.value):gr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[In(n,i)+" =>"]=s,r),{})}:Ji(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>In(r))}:_t(t)?In(t):be(t)&&!Y(t)&&!Qi(t)?String(t):t,In=(e,t="")=>{var r;return _t(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};/** * @vue/reactivity v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let tt;class Ao{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=tt,!t&&tt&&(this.index=(tt.scopes||(tt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,r;if(this.scopes)for(t=0,r=this.scopes.length;t0)return;if($r){let t=$r;for($r=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Or;){let t=Or;for(Or=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=r}}if(e)throw e}function la(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ua(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),Ps(n),Fo(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function ts(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ca(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ca(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Nr))return;e.globalVersion=Nr;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ts(e)){e.flags&=-3;return}const r=we,n=ht;we=e,ht=!0;try{la(e);const s=e.fn(e._value);(t.version===0||Dt(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{we=r,ht=n,ua(e),e.flags&=-3}}function Ps(e,t=!1){const{dep:r,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),r.subs===e&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)Ps(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function Fo(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}let ht=!0;const fa=[];function Ut(){fa.push(ht),ht=!1}function Ht(){const e=fa.pop();ht=e===void 0?!0:e}function Xs(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=we;we=void 0;try{t()}finally{we=r}}}let Nr=0;class ko{constructor(t,r){this.sub=t,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class As{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!we||!ht||we===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==we)r=this.activeLink=new ko(we,this),we.deps?(r.prevDep=we.depsTail,we.depsTail.nextDep=r,we.depsTail=r):we.deps=we.depsTail=r,ha(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=we.depsTail,r.nextDep=void 0,we.depsTail.nextDep=r,we.depsTail=r,we.deps===r&&(we.deps=n)}return r}trigger(t){this.version++,Nr++,this.notify(t)}notify(t){Es();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{Cs()}}}function ha(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)ha(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}const rs=new WeakMap,Zt=Symbol(""),ns=Symbol(""),Dr=Symbol("");function Re(e,t,r){if(ht&&we){let n=rs.get(e);n||rs.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new As),s.map=n,s.key=r),s.track()}}function kt(e,t,r,n,s,i){const o=rs.get(e);if(!o){Nr++;return}const a=l=>{l&&l.trigger()};if(Es(),t==="clear")o.forEach(a);else{const l=Y(e),c=l&&xs(r);if(l&&r==="length"){const f=Number(n);o.forEach((h,v)=>{(v==="length"||v===Dr||!_t(v)&&v>=f)&&a(h)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),c&&a(o.get(Dr)),t){case"add":l?c&&a(o.get("length")):(a(o.get(Zt)),gr(e)&&a(o.get(ns)));break;case"delete":l||(a(o.get(Zt)),gr(e)&&a(o.get(ns)));break;case"set":gr(e)&&a(o.get(Zt));break}}Cs()}function or(e){const t=ue(e);return t===e?t:(Re(t,"iterate",Dr),lt(e)?t:t.map(Ne))}function Pn(e){return Re(e=ue(e),"iterate",Dr),e}const Mo={__proto__:null,[Symbol.iterator](){return Nn(this,Symbol.iterator,Ne)},concat(...e){return or(this).concat(...e.map(t=>Y(t)?or(t):t))},entries(){return Nn(this,"entries",e=>(e[1]=Ne(e[1]),e))},every(e,t){return At(this,"every",e,t,void 0,arguments)},filter(e,t){return At(this,"filter",e,t,r=>r.map(Ne),arguments)},find(e,t){return At(this,"find",e,t,Ne,arguments)},findIndex(e,t){return At(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return At(this,"findLast",e,t,Ne,arguments)},findLastIndex(e,t){return At(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return At(this,"forEach",e,t,void 0,arguments)},includes(...e){return Dn(this,"includes",e)},indexOf(...e){return Dn(this,"indexOf",e)},join(e){return or(this).join(e)},lastIndexOf(...e){return Dn(this,"lastIndexOf",e)},map(e,t){return At(this,"map",e,t,void 0,arguments)},pop(){return Pr(this,"pop")},push(...e){return Pr(this,"push",e)},reduce(e,...t){return Qs(this,"reduce",e,t)},reduceRight(e,...t){return Qs(this,"reduceRight",e,t)},shift(){return Pr(this,"shift")},some(e,t){return At(this,"some",e,t,void 0,arguments)},splice(...e){return Pr(this,"splice",e)},toReversed(){return or(this).toReversed()},toSorted(e){return or(this).toSorted(e)},toSpliced(...e){return or(this).toSpliced(...e)},unshift(...e){return Pr(this,"unshift",e)},values(){return Nn(this,"values",Ne)}};function Nn(e,t,r){const n=Pn(e),s=n[t]();return n!==e&&!lt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=r(i.value)),i}),s}const Oo=Array.prototype;function At(e,t,r,n,s,i){const o=Pn(e),a=o!==e&&!lt(e),l=o[t];if(l!==Oo[t]){const h=l.apply(e,i);return a?Ne(h):h}let c=r;o!==e&&(a?c=function(h,v){return r.call(this,Ne(h),v,e)}:r.length>2&&(c=function(h,v){return r.call(this,h,v,e)}));const f=l.call(o,c,n);return a&&s?s(f):f}function Qs(e,t,r,n){const s=Pn(e);let i=r;return s!==e&&(lt(e)?r.length>3&&(i=function(o,a,l){return r.call(this,o,a,l,e)}):i=function(o,a,l){return r.call(this,o,Ne(a),l,e)}),s[t](i,...n)}function Dn(e,t,r){const n=ue(e);Re(n,"iterate",Dr);const s=n[t](...r);return(s===-1||s===!1)&&Ms(r[0])?(r[0]=ue(r[0]),n[t](...r)):s}function Pr(e,t,r=[]){Ut(),Es();const n=ue(e)[t].apply(e,r);return Cs(),Ht(),n}const $o=ys("__proto__,__v_isRef,__isVue"),pa=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_t));function Bo(e){_t(e)||(e=String(e));const t=ue(this);return Re(t,"has",e),t.hasOwnProperty(e)}class da{constructor(t=!1,r=!1){this._isReadonly=t,this._isShallow=r}get(t,r,n){const s=this._isReadonly,i=this._isShallow;if(r==="__v_isReactive")return!s;if(r==="__v_isReadonly")return s;if(r==="__v_isShallow")return i;if(r==="__v_raw")return n===(s?i?qo:ya:i?va:ma).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const o=Y(t);if(!s){let l;if(o&&(l=Mo[r]))return l;if(r==="hasOwnProperty")return Bo}const a=Reflect.get(t,r,De(t)?t:n);return(_t(r)?pa.has(r):$o(r))||(s||Re(t,"get",r),i)?a:De(a)?o&&xs(r)?a:a.value:be(a)?s?wa(a):Fs(a):a}}class ga extends da{constructor(t=!1){super(!1,t)}set(t,r,n,s){let i=t[r];if(!this._isShallow){const l=Qt(i);if(!lt(n)&&!Qt(n)&&(i=ue(i),n=ue(n)),!Y(t)&&De(i)&&!De(n))return l?!1:(i.value=n,!0)}const o=Y(t)&&xs(r)?Number(r)e,Gr=e=>Reflect.getPrototypeOf(e);function Do(e,t,r){return function(...n){const s=this.__v_raw,i=ue(s),o=gr(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=s[e](...n),f=r?ss:t?is:Ne;return!t&&Re(i,"iterate",l?ns:Zt),{next(){const{value:h,done:v}=c.next();return v?{value:h,done:v}:{value:a?[f(h[0]),f(h[1])]:f(h),done:v}},[Symbol.iterator](){return this}}}}function Yr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Lo(e,t){const r={get(s){const i=this.__v_raw,o=ue(i),a=ue(s);e||(Dt(s,a)&&Re(o,"get",s),Re(o,"get",a));const{has:l}=Gr(o),c=t?ss:e?is:Ne;if(l.call(o,s))return c(i.get(s));if(l.call(o,a))return c(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&Re(ue(s),"iterate",Zt),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,o=ue(i),a=ue(s);return e||(Dt(s,a)&&Re(o,"has",s),Re(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=ue(a),c=t?ss:e?is:Ne;return!e&&Re(l,"iterate",Zt),a.forEach((f,h)=>s.call(i,c(f),c(h),o))}};return Me(r,e?{add:Yr("add"),set:Yr("set"),delete:Yr("delete"),clear:Yr("clear")}:{add(s){!t&&!lt(s)&&!Qt(s)&&(s=ue(s));const i=ue(this);return Gr(i).has.call(i,s)||(i.add(s),kt(i,"add",s,s)),this},set(s,i){!t&&!lt(i)&&!Qt(i)&&(i=ue(i));const o=ue(this),{has:a,get:l}=Gr(o);let c=a.call(o,s);c||(s=ue(s),c=a.call(o,s));const f=l.call(o,s);return o.set(s,i),c?Dt(i,f)&&kt(o,"set",s,i):kt(o,"add",s,i),this},delete(s){const i=ue(this),{has:o,get:a}=Gr(i);let l=o.call(i,s);l||(s=ue(s),l=o.call(i,s)),a&&a.call(i,s);const c=i.delete(s);return l&&kt(i,"delete",s,void 0),c},clear(){const s=ue(this),i=s.size!==0,o=s.clear();return i&&kt(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{r[s]=Do(s,e,t)}),r}function Ss(e,t){const r=Lo(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(ce(r,s)&&s in n?r:n,s,i)}const Uo={get:Ss(!1,!1)},Ho={get:Ss(!1,!0)},jo={get:Ss(!0,!1)};const ma=new WeakMap,va=new WeakMap,ya=new WeakMap,qo=new WeakMap;function Ko(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Vo(e){return e.__v_skip||!Object.isExtensible(e)?0:Ko(mo(e))}function Fs(e){return Qt(e)?e:ks(e,!1,Io,Uo,ma)}function Wo(e){return ks(e,!1,No,Ho,va)}function wa(e){return ks(e,!0,Ro,jo,ya)}function ks(e,t,r,n,s){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=s.get(e);if(i)return i;const o=Vo(e);if(o===0)return e;const a=new Proxy(e,o===2?n:r);return s.set(e,a),a}function mr(e){return Qt(e)?mr(e.__v_raw):!!(e&&e.__v_isReactive)}function Qt(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function Ms(e){return e?!!e.__v_raw:!1}function ue(e){const t=e&&e.__v_raw;return t?ue(t):e}function zo(e){return!ce(e,"__v_skip")&&Object.isExtensible(e)&&ta(e,"__v_skip",!0),e}const Ne=e=>be(e)?Fs(e):e,is=e=>be(e)?wa(e):e;function De(e){return e?e.__v_isRef===!0:!1}function mt(e){return Go(e,!1)}function Go(e,t){return De(e)?e:new Yo(e,t)}class Yo{constructor(t,r){this.dep=new As,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?t:ue(t),this._value=r?t:Ne(t),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(t){const r=this._rawValue,n=this.__v_isShallow||lt(t)||Qt(t);t=n?t:ue(t),Dt(t,r)&&(this._rawValue=t,this._value=n?t:Ne(t),this.dep.trigger())}}function Sr(e){return De(e)?e.value:e}const Jo={get:(e,t,r)=>t==="__v_raw"?e:Sr(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return De(s)&&!De(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function ba(e){return mr(e)?e:new Proxy(e,Jo)}class Zo{constructor(t,r,n){this.fn=t,this.setter=r,this._value=void 0,this.dep=new As(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Nr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&we!==this)return oa(this,!0),!0}get value(){const t=this.dep.track();return ca(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Xo(e,t,r=!1){let n,s;return Q(e)?n=e:(n=e.get,s=e.set),new Zo(n,s,r)}const Jr={},hn=new WeakMap;let Wt;function Qo(e,t=!1,r=Wt){if(r){let n=hn.get(r);n||hn.set(r,n=[]),n.push(e)}}function el(e,t,r=ve){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,c=d=>s?d:lt(d)||s===!1||s===0?Mt(d,1):Mt(d);let f,h,v,x,k=!1,T=!1;if(De(e)?(h=()=>e.value,k=lt(e)):mr(e)?(h=()=>c(e),k=!0):Y(e)?(T=!0,k=e.some(d=>mr(d)||lt(d)),h=()=>e.map(d=>{if(De(d))return d.value;if(mr(d))return c(d);if(Q(d))return l?l(d,2):d()})):Q(e)?t?h=l?()=>l(e,2):e:h=()=>{if(v){Ut();try{v()}finally{Ht()}}const d=Wt;Wt=f;try{return l?l(e,3,[x]):e(x)}finally{Wt=d}}:h=bt,t&&s){const d=h,y=s===!0?1/0:s;h=()=>Mt(d(),y)}const j=So(),H=()=>{f.stop(),j&&bs(j.effects,f)};if(i&&t){const d=t;t=(...y)=>{d(...y),H()}}let m=T?new Array(e.length).fill(Jr):Jr;const p=d=>{if(!(!(f.flags&1)||!f.dirty&&!d))if(t){const y=f.run();if(s||k||(T?y.some((b,E)=>Dt(b,m[E])):Dt(y,m))){v&&v();const b=Wt;Wt=f;try{const E=[y,m===Jr?void 0:T&&m[0]===Jr?[]:m,x];l?l(t,3,E):t(...E),m=y}finally{Wt=b}}}else f.run()};return a&&a(p),f=new ia(h),f.scheduler=o?()=>o(p,!1):p,x=d=>Qo(d,!1,f),v=f.onStop=()=>{const d=hn.get(f);if(d){if(l)l(d,4);else for(const y of d)y();hn.delete(f)}},t?n?p(!0):m=f.run():o?o(p.bind(null,!0),!0):f.run(),H.pause=f.pause.bind(f),H.resume=f.resume.bind(f),H.stop=H,H}function Mt(e,t=1/0,r){if(t<=0||!be(e)||e.__v_skip||(r=r||new Set,r.has(e)))return e;if(r.add(e),t--,De(e))Mt(e.value,t,r);else if(Y(e))for(let n=0;n{Mt(n,t,r)});else if(Qi(e)){for(const n in e)Mt(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Mt(e[n],t,r)}return e}/** +**/let tt;class So{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=tt,!t&&tt&&(this.index=(tt.scopes||(tt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,r;if(this.scopes)for(t=0,r=this.scopes.length;t0)return;if($r){let t=$r;for($r=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Or;){let t=Or;for(Or=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=r}}if(e)throw e}function la(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ua(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),Ps(n),ko(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function ts(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ca(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ca(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Nr))return;e.globalVersion=Nr;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ts(e)){e.flags&=-3;return}const r=we,n=ht;we=e,ht=!0;try{la(e);const s=e.fn(e._value);(t.version===0||Dt(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{we=r,ht=n,ua(e),e.flags&=-3}}function Ps(e,t=!1){const{dep:r,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),r.subs===e&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)Ps(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function ko(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}let ht=!0;const fa=[];function Ut(){fa.push(ht),ht=!1}function Ht(){const e=fa.pop();ht=e===void 0?!0:e}function Xs(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=we;we=void 0;try{t()}finally{we=r}}}let Nr=0;class Mo{constructor(t,r){this.sub=t,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class As{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!we||!ht||we===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==we)r=this.activeLink=new Mo(we,this),we.deps?(r.prevDep=we.depsTail,we.depsTail.nextDep=r,we.depsTail=r):we.deps=we.depsTail=r,ha(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=we.depsTail,r.nextDep=void 0,we.depsTail.nextDep=r,we.depsTail=r,we.deps===r&&(we.deps=n)}return r}trigger(t){this.version++,Nr++,this.notify(t)}notify(t){Es();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{Cs()}}}function ha(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)ha(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}const rs=new WeakMap,Zt=Symbol(""),ns=Symbol(""),Dr=Symbol("");function Re(e,t,r){if(ht&&we){let n=rs.get(e);n||rs.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new As),s.map=n,s.key=r),s.track()}}function kt(e,t,r,n,s,i){const o=rs.get(e);if(!o){Nr++;return}const a=l=>{l&&l.trigger()};if(Es(),t==="clear")o.forEach(a);else{const l=Y(e),c=l&&xs(r);if(l&&r==="length"){const f=Number(n);o.forEach((h,v)=>{(v==="length"||v===Dr||!_t(v)&&v>=f)&&a(h)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),c&&a(o.get(Dr)),t){case"add":l?c&&a(o.get("length")):(a(o.get(Zt)),gr(e)&&a(o.get(ns)));break;case"delete":l||(a(o.get(Zt)),gr(e)&&a(o.get(ns)));break;case"set":gr(e)&&a(o.get(Zt));break}}Cs()}function or(e){const t=ue(e);return t===e?t:(Re(t,"iterate",Dr),lt(e)?t:t.map(Ne))}function Pn(e){return Re(e=ue(e),"iterate",Dr),e}const Oo={__proto__:null,[Symbol.iterator](){return Nn(this,Symbol.iterator,Ne)},concat(...e){return or(this).concat(...e.map(t=>Y(t)?or(t):t))},entries(){return Nn(this,"entries",e=>(e[1]=Ne(e[1]),e))},every(e,t){return At(this,"every",e,t,void 0,arguments)},filter(e,t){return At(this,"filter",e,t,r=>r.map(Ne),arguments)},find(e,t){return At(this,"find",e,t,Ne,arguments)},findIndex(e,t){return At(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return At(this,"findLast",e,t,Ne,arguments)},findLastIndex(e,t){return At(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return At(this,"forEach",e,t,void 0,arguments)},includes(...e){return Dn(this,"includes",e)},indexOf(...e){return Dn(this,"indexOf",e)},join(e){return or(this).join(e)},lastIndexOf(...e){return Dn(this,"lastIndexOf",e)},map(e,t){return At(this,"map",e,t,void 0,arguments)},pop(){return Pr(this,"pop")},push(...e){return Pr(this,"push",e)},reduce(e,...t){return Qs(this,"reduce",e,t)},reduceRight(e,...t){return Qs(this,"reduceRight",e,t)},shift(){return Pr(this,"shift")},some(e,t){return At(this,"some",e,t,void 0,arguments)},splice(...e){return Pr(this,"splice",e)},toReversed(){return or(this).toReversed()},toSorted(e){return or(this).toSorted(e)},toSpliced(...e){return or(this).toSpliced(...e)},unshift(...e){return Pr(this,"unshift",e)},values(){return Nn(this,"values",Ne)}};function Nn(e,t,r){const n=Pn(e),s=n[t]();return n!==e&&!lt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=r(i.value)),i}),s}const $o=Array.prototype;function At(e,t,r,n,s,i){const o=Pn(e),a=o!==e&&!lt(e),l=o[t];if(l!==$o[t]){const h=l.apply(e,i);return a?Ne(h):h}let c=r;o!==e&&(a?c=function(h,v){return r.call(this,Ne(h),v,e)}:r.length>2&&(c=function(h,v){return r.call(this,h,v,e)}));const f=l.call(o,c,n);return a&&s?s(f):f}function Qs(e,t,r,n){const s=Pn(e);let i=r;return s!==e&&(lt(e)?r.length>3&&(i=function(o,a,l){return r.call(this,o,a,l,e)}):i=function(o,a,l){return r.call(this,o,Ne(a),l,e)}),s[t](i,...n)}function Dn(e,t,r){const n=ue(e);Re(n,"iterate",Dr);const s=n[t](...r);return(s===-1||s===!1)&&Ms(r[0])?(r[0]=ue(r[0]),n[t](...r)):s}function Pr(e,t,r=[]){Ut(),Es();const n=ue(e)[t].apply(e,r);return Cs(),Ht(),n}const Bo=ys("__proto__,__v_isRef,__isVue"),pa=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_t));function To(e){_t(e)||(e=String(e));const t=ue(this);return Re(t,"has",e),t.hasOwnProperty(e)}class da{constructor(t=!1,r=!1){this._isReadonly=t,this._isShallow=r}get(t,r,n){const s=this._isReadonly,i=this._isShallow;if(r==="__v_isReactive")return!s;if(r==="__v_isReadonly")return s;if(r==="__v_isShallow")return i;if(r==="__v_raw")return n===(s?i?Ko:ya:i?va:ma).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const o=Y(t);if(!s){let l;if(o&&(l=Oo[r]))return l;if(r==="hasOwnProperty")return To}const a=Reflect.get(t,r,De(t)?t:n);return(_t(r)?pa.has(r):Bo(r))||(s||Re(t,"get",r),i)?a:De(a)?o&&xs(r)?a:a.value:be(a)?s?wa(a):Fs(a):a}}class ga extends da{constructor(t=!1){super(!1,t)}set(t,r,n,s){let i=t[r];if(!this._isShallow){const l=Qt(i);if(!lt(n)&&!Qt(n)&&(i=ue(i),n=ue(n)),!Y(t)&&De(i)&&!De(n))return l?!1:(i.value=n,!0)}const o=Y(t)&&xs(r)?Number(r)e,Gr=e=>Reflect.getPrototypeOf(e);function Lo(e,t,r){return function(...n){const s=this.__v_raw,i=ue(s),o=gr(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=s[e](...n),f=r?ss:t?is:Ne;return!t&&Re(i,"iterate",l?ns:Zt),{next(){const{value:h,done:v}=c.next();return v?{value:h,done:v}:{value:a?[f(h[0]),f(h[1])]:f(h),done:v}},[Symbol.iterator](){return this}}}}function Yr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Uo(e,t){const r={get(s){const i=this.__v_raw,o=ue(i),a=ue(s);e||(Dt(s,a)&&Re(o,"get",s),Re(o,"get",a));const{has:l}=Gr(o),c=t?ss:e?is:Ne;if(l.call(o,s))return c(i.get(s));if(l.call(o,a))return c(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&Re(ue(s),"iterate",Zt),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,o=ue(i),a=ue(s);return e||(Dt(s,a)&&Re(o,"has",s),Re(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=ue(a),c=t?ss:e?is:Ne;return!e&&Re(l,"iterate",Zt),a.forEach((f,h)=>s.call(i,c(f),c(h),o))}};return Me(r,e?{add:Yr("add"),set:Yr("set"),delete:Yr("delete"),clear:Yr("clear")}:{add(s){!t&&!lt(s)&&!Qt(s)&&(s=ue(s));const i=ue(this);return Gr(i).has.call(i,s)||(i.add(s),kt(i,"add",s,s)),this},set(s,i){!t&&!lt(i)&&!Qt(i)&&(i=ue(i));const o=ue(this),{has:a,get:l}=Gr(o);let c=a.call(o,s);c||(s=ue(s),c=a.call(o,s));const f=l.call(o,s);return o.set(s,i),c?Dt(i,f)&&kt(o,"set",s,i):kt(o,"add",s,i),this},delete(s){const i=ue(this),{has:o,get:a}=Gr(i);let l=o.call(i,s);l||(s=ue(s),l=o.call(i,s)),a&&a.call(i,s);const c=i.delete(s);return l&&kt(i,"delete",s,void 0),c},clear(){const s=ue(this),i=s.size!==0,o=s.clear();return i&&kt(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{r[s]=Lo(s,e,t)}),r}function Ss(e,t){const r=Uo(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(ce(r,s)&&s in n?r:n,s,i)}const Ho={get:Ss(!1,!1)},jo={get:Ss(!1,!0)},qo={get:Ss(!0,!1)};const ma=new WeakMap,va=new WeakMap,ya=new WeakMap,Ko=new WeakMap;function Vo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Wo(e){return e.__v_skip||!Object.isExtensible(e)?0:Vo(vo(e))}function Fs(e){return Qt(e)?e:ks(e,!1,Ro,Ho,ma)}function zo(e){return ks(e,!1,Do,jo,va)}function wa(e){return ks(e,!0,No,qo,ya)}function ks(e,t,r,n,s){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=s.get(e);if(i)return i;const o=Wo(e);if(o===0)return e;const a=new Proxy(e,o===2?n:r);return s.set(e,a),a}function mr(e){return Qt(e)?mr(e.__v_raw):!!(e&&e.__v_isReactive)}function Qt(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function Ms(e){return e?!!e.__v_raw:!1}function ue(e){const t=e&&e.__v_raw;return t?ue(t):e}function Go(e){return!ce(e,"__v_skip")&&Object.isExtensible(e)&&ta(e,"__v_skip",!0),e}const Ne=e=>be(e)?Fs(e):e,is=e=>be(e)?wa(e):e;function De(e){return e?e.__v_isRef===!0:!1}function mt(e){return Yo(e,!1)}function Yo(e,t){return De(e)?e:new Jo(e,t)}class Jo{constructor(t,r){this.dep=new As,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?t:ue(t),this._value=r?t:Ne(t),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(t){const r=this._rawValue,n=this.__v_isShallow||lt(t)||Qt(t);t=n?t:ue(t),Dt(t,r)&&(this._rawValue=t,this._value=n?t:Ne(t),this.dep.trigger())}}function Sr(e){return De(e)?e.value:e}const Zo={get:(e,t,r)=>t==="__v_raw"?e:Sr(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return De(s)&&!De(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function ba(e){return mr(e)?e:new Proxy(e,Zo)}class Xo{constructor(t,r,n){this.fn=t,this.setter=r,this._value=void 0,this.dep=new As(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Nr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&we!==this)return oa(this,!0),!0}get value(){const t=this.dep.track();return ca(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Qo(e,t,r=!1){let n,s;return Q(e)?n=e:(n=e.get,s=e.set),new Xo(n,s,r)}const Jr={},hn=new WeakMap;let Wt;function el(e,t=!1,r=Wt){if(r){let n=hn.get(r);n||hn.set(r,n=[]),n.push(e)}}function tl(e,t,r=ve){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,c=d=>s?d:lt(d)||s===!1||s===0?Mt(d,1):Mt(d);let f,h,v,x,k=!1,T=!1;if(De(e)?(h=()=>e.value,k=lt(e)):mr(e)?(h=()=>c(e),k=!0):Y(e)?(T=!0,k=e.some(d=>mr(d)||lt(d)),h=()=>e.map(d=>{if(De(d))return d.value;if(mr(d))return c(d);if(Q(d))return l?l(d,2):d()})):Q(e)?t?h=l?()=>l(e,2):e:h=()=>{if(v){Ut();try{v()}finally{Ht()}}const d=Wt;Wt=f;try{return l?l(e,3,[x]):e(x)}finally{Wt=d}}:h=bt,t&&s){const d=h,y=s===!0?1/0:s;h=()=>Mt(d(),y)}const j=Fo(),H=()=>{f.stop(),j&&bs(j.effects,f)};if(i&&t){const d=t;t=(...y)=>{d(...y),H()}}let m=T?new Array(e.length).fill(Jr):Jr;const p=d=>{if(!(!(f.flags&1)||!f.dirty&&!d))if(t){const y=f.run();if(s||k||(T?y.some((b,E)=>Dt(b,m[E])):Dt(y,m))){v&&v();const b=Wt;Wt=f;try{const E=[y,m===Jr?void 0:T&&m[0]===Jr?[]:m,x];l?l(t,3,E):t(...E),m=y}finally{Wt=b}}}else f.run()};return a&&a(p),f=new ia(h),f.scheduler=o?()=>o(p,!1):p,x=d=>el(d,!1,f),v=f.onStop=()=>{const d=hn.get(f);if(d){if(l)l(d,4);else for(const y of d)y();hn.delete(f)}},t?n?p(!0):m=f.run():o?o(p.bind(null,!0),!0):f.run(),H.pause=f.pause.bind(f),H.resume=f.resume.bind(f),H.stop=H,H}function Mt(e,t=1/0,r){if(t<=0||!be(e)||e.__v_skip||(r=r||new Set,r.has(e)))return e;if(r.add(e),t--,De(e))Mt(e.value,t,r);else if(Y(e))for(let n=0;n{Mt(n,t,r)});else if(Qi(e)){for(const n in e)Mt(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Mt(e[n],t,r)}return e}/** * @vue/runtime-core v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Kr(e,t,r,n){try{return n?e(...n):e()}catch(s){An(s,t,r)}}function Et(e,t,r,n){if(Q(e)){const s=Kr(e,t,r,n);return s&&Zi(s)&&s.catch(i=>{An(i,t,r)}),s}if(Y(e)){const s=[];for(let i=0;i>>1,s=je[n],i=Lr(s);i=Lr(r)?je.push(e):je.splice(nl(t),0,e),e.flags|=1,_a()}}function _a(){pn||(pn=xa.then(Ca))}function sl(e){Y(e)?vr.push(...e):It&&e.id===-1?It.splice(fr+1,0,e):e.flags&1||(vr.push(e),e.flags|=1),_a()}function ei(e,t,r=gt+1){for(;rLr(r)-Lr(n));if(vr.length=0,It){It.push(...t);return}for(It=t,fr=0;fre.id==null?e.flags&2?-1:1/0:e.id;function Ca(e){try{for(gt=0;gt{n._d&&li(-1);const i=dn(t);let o;try{o=e(...s)}finally{dn(i),n._d&&li(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Zr(e,t){if(ot===null)return e;const r=Mn(ot),n=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport;function $s(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$s(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function ll(e,t){return Q(e)?Me({name:e.name},t,{setup:e}):e}function Aa(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function as(e,t,r,n,s=!1){if(Y(e)){e.forEach((k,T)=>as(k,t&&(Y(t)?t[T]:t),r,n,s));return}if(Br(n)&&!s)return;const i=n.shapeFlag&4?Mn(n.component):n.el,o=s?null:i,{i:a,r:l}=e,c=t&&t.r,f=a.refs===ve?a.refs={}:a.refs,h=a.setupState,v=ue(h),x=h===ve?()=>!1:k=>ce(v,k);if(c!=null&&c!==l&&(Ce(c)?(f[c]=null,x(c)&&(h[c]=null)):De(c)&&(c.value=null)),Q(l))Kr(l,a,12,[o,f]);else{const k=Ce(l),T=De(l);if(k||T){const j=()=>{if(e.f){const H=k?x(l)?h[l]:f[l]:l.value;s?Y(H)&&bs(H,i):Y(H)?H.includes(i)||H.push(i):k?(f[l]=[i],x(l)&&(h[l]=f[l])):(l.value=[i],e.k&&(f[e.k]=l.value))}else k?(f[l]=o,x(l)&&(h[l]=o)):T&&(l.value=o,e.k&&(f[e.k]=o))};o?(j.id=-1,Qe(j,r)):j()}}}En().requestIdleCallback;En().cancelIdleCallback;const Br=e=>!!e.type.__asyncLoader,Sa=e=>e.type.__isKeepAlive;function ul(e,t){Fa(e,"a",t)}function cl(e,t){Fa(e,"da",t)}function Fa(e,t,r=qe){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Sn(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Sa(s.parent.vnode)&&fl(n,t,r,s),s=s.parent}}function fl(e,t,r,n){const s=Sn(t,e,n,!0);ka(()=>{bs(n[t],s)},r)}function Sn(e,t,r=qe,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Ut();const a=Vr(r),l=Et(t,r,e,o);return a(),Ht(),l});return n?s.unshift(i):s.push(i),i}}const $t=e=>(t,r=qe)=>{(!Hr||e==="sp")&&Sn(e,(...n)=>t(...n),r)},hl=$t("bm"),pl=$t("m"),dl=$t("bu"),gl=$t("u"),ml=$t("bum"),ka=$t("um"),vl=$t("sp"),yl=$t("rtg"),wl=$t("rtc");function bl(e,t=qe){Sn("ec",e,t)}const xl=Symbol.for("v-ndc");function _l(e,t,r,n){let s;const i=r,o=Y(e);if(o||Ce(e)){const a=o&&mr(e);let l=!1;a&&(l=!lt(e),e=Pn(e)),s=new Array(e.length);for(let c=0,f=e.length;ct(a,l,void 0,i));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,c=a.length;le?Ja(e)?Mn(e):os(e.parent):null,Tr=Me(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>os(e.parent),$root:e=>os(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Bs(e),$forceUpdate:e=>e.f||(e.f=()=>{Os(e.update)}),$nextTick:e=>e.n||(e.n=rl.bind(e.proxy)),$watch:e=>Kl.bind(e)}),Ln=(e,t)=>e!==ve&&!e.__isScriptSetup&&ce(e,t),El={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:o,type:a,appContext:l}=e;let c;if(t[0]!=="$"){const x=o[t];if(x!==void 0)switch(x){case 1:return n[t];case 2:return s[t];case 4:return r[t];case 3:return i[t]}else{if(Ln(n,t))return o[t]=1,n[t];if(s!==ve&&ce(s,t))return o[t]=2,s[t];if((c=e.propsOptions[0])&&ce(c,t))return o[t]=3,i[t];if(r!==ve&&ce(r,t))return o[t]=4,r[t];ls&&(o[t]=0)}}const f=Tr[t];let h,v;if(f)return t==="$attrs"&&Re(e.attrs,"get",""),f(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(r!==ve&&ce(r,t))return o[t]=4,r[t];if(v=l.config.globalProperties,ce(v,t))return v[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return Ln(s,t)?(s[t]=r,!0):n!==ve&&ce(n,t)?(n[t]=r,!0):ce(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:s,propsOptions:i}},o){let a;return!!r[o]||e!==ve&&ce(e,o)||Ln(t,o)||(a=i[0])&&ce(a,o)||ce(n,o)||ce(Tr,o)||ce(s.config.globalProperties,o)},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:ce(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};function ti(e){return Y(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}let ls=!0;function Cl(e){const t=Bs(e),r=e.proxy,n=e.ctx;ls=!1,t.beforeCreate&&ri(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:f,beforeMount:h,mounted:v,beforeUpdate:x,updated:k,activated:T,deactivated:j,beforeDestroy:H,beforeUnmount:m,destroyed:p,unmounted:d,render:y,renderTracked:b,renderTriggered:E,errorCaptured:M,serverPrefetch:P,expose:q,inheritAttrs:K,components:ne,directives:me,filters:Ae}=t;if(c&&Pl(c,n,null),o)for(const fe in o){const V=o[fe];Q(V)&&(n[fe]=V.bind(r))}if(s){const fe=s.call(r,r);be(fe)&&(e.data=Fs(fe))}if(ls=!0,i)for(const fe in i){const V=i[fe],he=Q(V)?V.bind(r,r):Q(V.get)?V.get.bind(r,r):bt,Se=!Q(V)&&Q(V.set)?V.set.bind(r):bt,Oe=Xa({get:he,set:Se});Object.defineProperty(n,fe,{enumerable:!0,configurable:!0,get:()=>Oe.value,set:ae=>Oe.value=ae})}if(a)for(const fe in a)Ma(a[fe],n,r,fe);if(l){const fe=Q(l)?l.call(r):l;Reflect.ownKeys(fe).forEach(V=>{Ol(V,fe[V])})}f&&ri(f,e,"c");function _e(fe,V){Y(V)?V.forEach(he=>fe(he.bind(r))):V&&fe(V.bind(r))}if(_e(hl,h),_e(pl,v),_e(dl,x),_e(gl,k),_e(ul,T),_e(cl,j),_e(bl,M),_e(wl,b),_e(yl,E),_e(ml,m),_e(ka,d),_e(vl,P),Y(q))if(q.length){const fe=e.exposed||(e.exposed={});q.forEach(V=>{Object.defineProperty(fe,V,{get:()=>r[V],set:he=>r[V]=he})})}else e.exposed||(e.exposed={});y&&e.render===bt&&(e.render=y),K!=null&&(e.inheritAttrs=K),ne&&(e.components=ne),me&&(e.directives=me),P&&Aa(e)}function Pl(e,t,r=bt){Y(e)&&(e=us(e));for(const n in e){const s=e[n];let i;be(s)?"default"in s?i=nn(s.from||n,s.default,!0):i=nn(s.from||n):i=nn(s),De(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function ri(e,t,r){Et(Y(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Ma(e,t,r,n){let s=n.includes(".")?Ka(r,n):()=>r[n];if(Ce(e)){const i=t[e];Q(i)&&sn(s,i)}else if(Q(e))sn(s,e.bind(r));else if(be(e))if(Y(e))e.forEach(i=>Ma(i,t,r,n));else{const i=Q(e.handler)?e.handler.bind(r):t[e.handler];Q(i)&&sn(s,i,e)}}function Bs(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!r&&!n?l=t:(l={},s.length&&s.forEach(c=>gn(l,c,o,!0)),gn(l,t,o)),be(t)&&i.set(t,l),l}function gn(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&gn(e,i,r,!0),s&&s.forEach(o=>gn(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=Al[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const Al={data:ni,props:si,emits:si,methods:Fr,computed:Fr,beforeCreate:Ue,created:Ue,beforeMount:Ue,mounted:Ue,beforeUpdate:Ue,updated:Ue,beforeDestroy:Ue,beforeUnmount:Ue,destroyed:Ue,unmounted:Ue,activated:Ue,deactivated:Ue,errorCaptured:Ue,serverPrefetch:Ue,components:Fr,directives:Fr,watch:Fl,provide:ni,inject:Sl};function ni(e,t){return t?e?function(){return Me(Q(e)?e.call(this,this):e,Q(t)?t.call(this,this):t)}:t:e}function Sl(e,t){return Fr(us(e),us(t))}function us(e){if(Y(e)){const t={};for(let r=0;r1)return r&&Q(t)?t.call(n&&n.proxy):t}}const $a={},Ba=()=>Object.create($a),Ta=e=>Object.getPrototypeOf(e)===$a;function $l(e,t,r,n=!1){const s={},i=Ba();e.propsDefaults=Object.create(null),Ia(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:Wo(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Bl(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=ue(s),[l]=e.propsOptions;let c=!1;if((n||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let h=0;h{l=!0;const[v,x]=Ra(h,t,!0);Me(o,v),x&&a.push(...x)};!r&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!l)return be(e)&&n.set(e,dr),dr;if(Y(i))for(let f=0;fe[0]==="_"||e==="$stable",Ts=e=>Y(e)?e.map(yt):[yt(e)],Il=(e,t,r)=>{if(t._n)return t;const n=il((...s)=>Ts(t(...s)),r);return n._c=!1,n},Da=(e,t,r)=>{const n=e._ctx;for(const s in e){if(Na(s))continue;const i=e[s];if(Q(i))t[s]=Il(s,i,n);else if(i!=null){const o=Ts(i);t[s]=()=>o}}},La=(e,t)=>{const r=Ts(t);e.slots.default=()=>r},Ua=(e,t,r)=>{for(const n in t)(r||n!=="_")&&(e[n]=t[n])},Rl=(e,t,r)=>{const n=e.slots=Ba();if(e.vnode.shapeFlag&32){const s=t._;s?(Ua(n,t,r),r&&ta(n,"_",s,!0)):Da(t,n)}else t&&La(e,t)},Nl=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=ve;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:Ua(s,t,r):(i=!t.$stable,Da(t,s)),o=t}else t&&(La(e,t),o={default:1});if(i)for(const a in s)!Na(a)&&o[a]==null&&delete s[a]},Qe=Zl;function Dl(e){return Ll(e)}function Ll(e,t){const r=En();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:f,parentNode:h,nextSibling:v,setScopeId:x=bt,insertStaticContent:k}=e,T=(g,w,C,$=null,S=null,O=null,N=void 0,R=null,I=!!w.dynamicChildren)=>{if(g===w)return;g&&!Ar(g,w)&&($=Ke(g),ae(g,S,O,!0),g=null),w.patchFlag===-2&&(I=!1,w.dynamicChildren=null);const{type:B,ref:G,shapeFlag:U}=w;switch(B){case kn:j(g,w,C,$);break;case er:H(g,w,C,$);break;case jn:g==null&&m(w,C,$,N);break;case vt:ne(g,w,C,$,S,O,N,R,I);break;default:U&1?y(g,w,C,$,S,O,N,R,I):U&6?me(g,w,C,$,S,O,N,R,I):(U&64||U&128)&&B.process(g,w,C,$,S,O,N,R,I,Ye)}G!=null&&S&&as(G,g&&g.ref,O,w||g,!w)},j=(g,w,C,$)=>{if(g==null)n(w.el=a(w.children),C,$);else{const S=w.el=g.el;w.children!==g.children&&c(S,w.children)}},H=(g,w,C,$)=>{g==null?n(w.el=l(w.children||""),C,$):w.el=g.el},m=(g,w,C,$)=>{[g.el,g.anchor]=k(g.children,w,C,$,g.el,g.anchor)},p=({el:g,anchor:w},C,$)=>{let S;for(;g&&g!==w;)S=v(g),n(g,C,$),g=S;n(w,C,$)},d=({el:g,anchor:w})=>{let C;for(;g&&g!==w;)C=v(g),s(g),g=C;s(w)},y=(g,w,C,$,S,O,N,R,I)=>{w.type==="svg"?N="svg":w.type==="math"&&(N="mathml"),g==null?b(w,C,$,S,O,N,R,I):P(g,w,S,O,N,R,I)},b=(g,w,C,$,S,O,N,R)=>{let I,B;const{props:G,shapeFlag:U,transition:W,dirs:J}=g;if(I=g.el=o(g.type,O,G&&G.is,G),U&8?f(I,g.children):U&16&&M(g.children,I,null,$,S,Un(g,O),N,R),J&&jt(g,null,$,"created"),E(I,g,g.scopeId,N,$),G){for(const ye in G)ye!=="value"&&!Mr(ye)&&i(I,ye,null,G[ye],O,$);"value"in G&&i(I,"value",null,G.value,O),(B=G.onVnodeBeforeMount)&&dt(B,$,g)}J&&jt(g,null,$,"beforeMount");const oe=Ul(S,W);oe&&W.beforeEnter(I),n(I,w,C),((B=G&&G.onVnodeMounted)||oe||J)&&Qe(()=>{B&&dt(B,$,g),oe&&W.enter(I),J&&jt(g,null,$,"mounted")},S)},E=(g,w,C,$,S)=>{if(C&&x(g,C),$)for(let O=0;O<$.length;O++)x(g,$[O]);if(S){let O=S.subTree;if(w===O||Wa(O.type)&&(O.ssContent===w||O.ssFallback===w)){const N=S.vnode;E(g,N,N.scopeId,N.slotScopeIds,S.parent)}}},M=(g,w,C,$,S,O,N,R,I=0)=>{for(let B=I;B{const R=w.el=g.el;let{patchFlag:I,dynamicChildren:B,dirs:G}=w;I|=g.patchFlag&16;const U=g.props||ve,W=w.props||ve;let J;if(C&&qt(C,!1),(J=W.onVnodeBeforeUpdate)&&dt(J,C,w,g),G&&jt(w,g,C,"beforeUpdate"),C&&qt(C,!0),(U.innerHTML&&W.innerHTML==null||U.textContent&&W.textContent==null)&&f(R,""),B?q(g.dynamicChildren,B,R,C,$,Un(w,S),O):N||V(g,w,R,null,C,$,Un(w,S),O,!1),I>0){if(I&16)K(R,U,W,C,S);else if(I&2&&U.class!==W.class&&i(R,"class",null,W.class,S),I&4&&i(R,"style",U.style,W.style,S),I&8){const oe=w.dynamicProps;for(let ye=0;ye{J&&dt(J,C,w,g),G&&jt(w,g,C,"updated")},$)},q=(g,w,C,$,S,O,N)=>{for(let R=0;R{if(w!==C){if(w!==ve)for(const O in w)!Mr(O)&&!(O in C)&&i(g,O,w[O],null,S,$);for(const O in C){if(Mr(O))continue;const N=C[O],R=w[O];N!==R&&O!=="value"&&i(g,O,R,N,S,$)}"value"in C&&i(g,"value",w.value,C.value,S)}},ne=(g,w,C,$,S,O,N,R,I)=>{const B=w.el=g?g.el:a(""),G=w.anchor=g?g.anchor:a("");let{patchFlag:U,dynamicChildren:W,slotScopeIds:J}=w;J&&(R=R?R.concat(J):J),g==null?(n(B,C,$),n(G,C,$),M(w.children||[],C,G,S,O,N,R,I)):U>0&&U&64&&W&&g.dynamicChildren?(q(g.dynamicChildren,W,C,S,O,N,R),(w.key!=null||S&&w===S.subTree)&&Ha(g,w,!0)):V(g,w,C,G,S,O,N,R,I)},me=(g,w,C,$,S,O,N,R,I)=>{w.slotScopeIds=R,g==null?w.shapeFlag&512?S.ctx.activate(w,C,$,N,I):Ae(w,C,$,S,O,N,I):ut(g,w,I)},Ae=(g,w,C,$,S,O,N)=>{const R=g.component=su(g,$,S);if(Sa(g)&&(R.ctx.renderer=Ye),iu(R,!1,N),R.asyncDep){if(S&&S.registerDep(R,_e,N),!g.el){const I=R.subTree=We(er);H(null,I,w,C)}}else _e(R,g,w,C,S,O,N)},ut=(g,w,C)=>{const $=w.component=g.component;if(Yl(g,w,C))if($.asyncDep&&!$.asyncResolved){fe($,w,C);return}else $.next=w,$.update();else w.el=g.el,$.vnode=w},_e=(g,w,C,$,S,O,N)=>{const R=()=>{if(g.isMounted){let{next:U,bu:W,u:J,parent:oe,vnode:ye}=g;{const Ze=ja(g);if(Ze){U&&(U.el=ye.el,fe(g,U,N)),Ze.asyncDep.then(()=>{g.isUnmounted||R()});return}}let pe=U,Je;qt(g,!1),U?(U.el=ye.el,fe(g,U,N)):U=ye,W&&rn(W),(Je=U.props&&U.props.onVnodeBeforeUpdate)&&dt(Je,oe,U,ye),qt(g,!0);const Te=Hn(g),ft=g.subTree;g.subTree=Te,T(ft,Te,h(ft.el),Ke(ft),g,S,O),U.el=Te.el,pe===null&&Jl(g,Te.el),J&&Qe(J,S),(Je=U.props&&U.props.onVnodeUpdated)&&Qe(()=>dt(Je,oe,U,ye),S)}else{let U;const{el:W,props:J}=w,{bm:oe,m:ye,parent:pe,root:Je,type:Te}=g,ft=Br(w);if(qt(g,!1),oe&&rn(oe),!ft&&(U=J&&J.onVnodeBeforeMount)&&dt(U,pe,w),qt(g,!0),W&&ar){const Ze=()=>{g.subTree=Hn(g),ar(W,g.subTree,g,S,null)};ft&&Te.__asyncHydrate?Te.__asyncHydrate(W,g,Ze):Ze()}else{Je.ce&&Je.ce._injectChildStyle(Te);const Ze=g.subTree=Hn(g);T(null,Ze,C,$,g,S,O),w.el=Ze.el}if(ye&&Qe(ye,S),!ft&&(U=J&&J.onVnodeMounted)){const Ze=w;Qe(()=>dt(U,pe,Ze),S)}(w.shapeFlag&256||pe&&Br(pe.vnode)&&pe.vnode.shapeFlag&256)&&g.a&&Qe(g.a,S),g.isMounted=!0,w=C=$=null}};g.scope.on();const I=g.effect=new ia(R);g.scope.off();const B=g.update=I.run.bind(I),G=g.job=I.runIfDirty.bind(I);G.i=g,G.id=g.uid,I.scheduler=()=>Os(G),qt(g,!0),B()},fe=(g,w,C)=>{w.component=g;const $=g.vnode.props;g.vnode=w,g.next=null,Bl(g,w.props,$,C),Nl(g,w.children,C),Ut(),ei(g),Ht()},V=(g,w,C,$,S,O,N,R,I=!1)=>{const B=g&&g.children,G=g?g.shapeFlag:0,U=w.children,{patchFlag:W,shapeFlag:J}=w;if(W>0){if(W&128){Se(B,U,C,$,S,O,N,R,I);return}else if(W&256){he(B,U,C,$,S,O,N,R,I);return}}J&8?(G&16&&Le(B,S,O),U!==B&&f(C,U)):G&16?J&16?Se(B,U,C,$,S,O,N,R,I):Le(B,S,O,!0):(G&8&&f(C,""),J&16&&M(U,C,$,S,O,N,R,I))},he=(g,w,C,$,S,O,N,R,I)=>{g=g||dr,w=w||dr;const B=g.length,G=w.length,U=Math.min(B,G);let W;for(W=0;WG?Le(g,S,O,!0,!1,U):M(w,C,$,S,O,N,R,I,U)},Se=(g,w,C,$,S,O,N,R,I)=>{let B=0;const G=w.length;let U=g.length-1,W=G-1;for(;B<=U&&B<=W;){const J=g[B],oe=w[B]=I?Rt(w[B]):yt(w[B]);if(Ar(J,oe))T(J,oe,C,null,S,O,N,R,I);else break;B++}for(;B<=U&&B<=W;){const J=g[U],oe=w[W]=I?Rt(w[W]):yt(w[W]);if(Ar(J,oe))T(J,oe,C,null,S,O,N,R,I);else break;U--,W--}if(B>U){if(B<=W){const J=W+1,oe=JW)for(;B<=U;)ae(g[B],S,O,!0),B++;else{const J=B,oe=B,ye=new Map;for(B=oe;B<=W;B++){const Xe=w[B]=I?Rt(w[B]):yt(w[B]);Xe.key!=null&&ye.set(Xe.key,B)}let pe,Je=0;const Te=W-oe+1;let ft=!1,Ze=0;const Cr=new Array(Te);for(B=0;B=Te){ae(Xe,S,O,!0);continue}let pt;if(Xe.key!=null)pt=ye.get(Xe.key);else for(pe=oe;pe<=W;pe++)if(Cr[pe-oe]===0&&Ar(Xe,w[pe])){pt=pe;break}pt===void 0?ae(Xe,S,O,!0):(Cr[pt-oe]=B+1,pt>=Ze?Ze=pt:ft=!0,T(Xe,w[pt],C,null,S,O,N,R,I),Je++)}const Gs=ft?Hl(Cr):dr;for(pe=Gs.length-1,B=Te-1;B>=0;B--){const Xe=oe+B,pt=w[Xe],Ys=Xe+1{const{el:O,type:N,transition:R,children:I,shapeFlag:B}=g;if(B&6){Oe(g.component.subTree,w,C,$);return}if(B&128){g.suspense.move(w,C,$);return}if(B&64){N.move(g,w,C,Ye);return}if(N===vt){n(O,w,C);for(let U=0;UR.enter(O),S);else{const{leave:U,delayLeave:W,afterLeave:J}=R,oe=()=>n(O,w,C),ye=()=>{U(O,()=>{oe(),J&&J()})};W?W(O,oe,ye):ye()}else n(O,w,C)},ae=(g,w,C,$=!1,S=!1)=>{const{type:O,props:N,ref:R,children:I,dynamicChildren:B,shapeFlag:G,patchFlag:U,dirs:W,cacheIndex:J}=g;if(U===-2&&(S=!1),R!=null&&as(R,null,C,g,!0),J!=null&&(w.renderCache[J]=void 0),G&256){w.ctx.deactivate(g);return}const oe=G&1&&W,ye=!Br(g);let pe;if(ye&&(pe=N&&N.onVnodeBeforeUnmount)&&dt(pe,w,g),G&6)Ge(g.component,C,$);else{if(G&128){g.suspense.unmount(C,$);return}oe&&jt(g,null,w,"beforeUnmount"),G&64?g.type.remove(g,w,C,Ye,$):B&&!B.hasOnce&&(O!==vt||U>0&&U&64)?Le(B,w,C,!1,!0):(O===vt&&U&384||!S&&G&16)&&Le(I,w,C),$&&ir(g)}(ye&&(pe=N&&N.onVnodeUnmounted)||oe)&&Qe(()=>{pe&&dt(pe,w,g),oe&&jt(g,null,w,"unmounted")},C)},ir=g=>{const{type:w,el:C,anchor:$,transition:S}=g;if(w===vt){Pe(C,$);return}if(w===jn){d(g);return}const O=()=>{s(C),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(g.shapeFlag&1&&S&&!S.persisted){const{leave:N,delayLeave:R}=S,I=()=>N(C,O);R?R(g.el,O,I):I()}else O()},Pe=(g,w)=>{let C;for(;g!==w;)C=v(g),s(g),g=C;s(w)},Ge=(g,w,C)=>{const{bum:$,scope:S,job:O,subTree:N,um:R,m:I,a:B}=g;ai(I),ai(B),$&&rn($),S.stop(),O&&(O.flags|=8,ae(N,g,w,C)),R&&Qe(R,w),Qe(()=>{g.isUnmounted=!0},w),w&&w.pendingBranch&&!w.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===w.pendingId&&(w.deps--,w.deps===0&&w.resolve())},Le=(g,w,C,$=!1,S=!1,O=0)=>{for(let N=O;N{if(g.shapeFlag&6)return Ke(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const w=v(g.anchor||g.el),C=w&&w[al];return C?v(C):w};let ct=!1;const Bt=(g,w,C)=>{g==null?w._vnode&&ae(w._vnode,null,null,!0):T(w._vnode||null,g,w,null,null,null,C),w._vnode=g,ct||(ct=!0,ei(),Ea(),ct=!1)},Ye={p:T,um:ae,m:Oe,r:ir,mt:Ae,mc:M,pc:V,pbc:q,n:Ke,o:e};let st,ar;return{render:Bt,hydrate:st,createApp:Ml(Bt,st)}}function Un({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function qt({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ul(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ha(e,t,r=!1){const n=e.children,s=t.children;if(Y(n)&&Y(s))for(let i=0;i>1,e[r[a]]0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}function ja(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ja(t)}function ai(e){if(e)for(let t=0;tnn(jl);function sn(e,t,r){return qa(e,t,r)}function qa(e,t,r=ve){const{immediate:n,deep:s,flush:i,once:o}=r,a=Me({},r),l=t&&n||!t&&i!=="post";let c;if(Hr){if(i==="sync"){const x=ql();c=x.__watcherHandles||(x.__watcherHandles=[])}else if(!l){const x=()=>{};return x.stop=bt,x.resume=bt,x.pause=bt,x}}const f=qe;a.call=(x,k,T)=>Et(x,f,k,T);let h=!1;i==="post"?a.scheduler=x=>{Qe(x,f&&f.suspense)}:i!=="sync"&&(h=!0,a.scheduler=(x,k)=>{k?x():Os(x)}),a.augmentJob=x=>{t&&(x.flags|=4),h&&(x.flags|=2,f&&(x.id=f.uid,x.i=f))};const v=el(e,t,a);return Hr&&(c?c.push(v):l&&v()),v}function Kl(e,t,r){const n=this.proxy,s=Ce(e)?e.includes(".")?Ka(n,e):()=>n[e]:e.bind(n,n);let i;Q(t)?i=t:(i=t.handler,r=t);const o=Vr(this),a=qa(s,i.bind(n),r);return o(),a}function Ka(e,t){const r=t.split(".");return()=>{let n=e;for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Lt(t)}Modifiers`]||e[`${rr(t)}Modifiers`];function Wl(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||ve;let s=r;const i=t.startsWith("update:"),o=i&&Vl(n,t.slice(7));o&&(o.trim&&(s=r.map(f=>Ce(f)?f.trim():f)),o.number&&(s=r.map(es)));let a,l=n[a=Tn(t)]||n[a=Tn(Lt(t))];!l&&i&&(l=n[a=Tn(rr(t))]),l&&Et(l,e,6,s);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Et(c,e,6,s)}}function Va(e,t,r=!1){const n=t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Q(e)){const l=c=>{const f=Va(c,t,!0);f&&(a=!0,Me(o,f))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(be(e)&&n.set(e,null),null):(Y(i)?i.forEach(l=>o[l]=null):Me(o,i),be(e)&&n.set(e,o),o)}function Fn(e,t){return!e||!xn(t)?!1:(t=t.slice(2).replace(/Once$/,""),ce(e,t[0].toLowerCase()+t.slice(1))||ce(e,rr(t))||ce(e,t))}function Hn(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:f,props:h,data:v,setupState:x,ctx:k,inheritAttrs:T}=e,j=dn(e);let H,m;try{if(r.shapeFlag&4){const d=s||n,y=d;H=yt(c.call(y,d,f,h,x,v,k)),m=a}else{const d=t;H=yt(d.length>1?d(h,{attrs:a,slots:o,emit:l}):d(h,null)),m=t.props?a:zl(a)}}catch(d){Ir.length=0,An(d,e,1),H=We(er)}let p=H;if(m&&T!==!1){const d=Object.keys(m),{shapeFlag:y}=p;d.length&&y&7&&(i&&d.some(ws)&&(m=Gl(m,i)),p=Er(p,m,!1,!0))}return r.dirs&&(p=Er(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(r.dirs):r.dirs),r.transition&&$s(p,r.transition),H=p,dn(j),H}const zl=e=>{let t;for(const r in e)(r==="class"||r==="style"||xn(r))&&((t||(t={}))[r]=e[r]);return t},Gl=(e,t)=>{const r={};for(const n in e)(!ws(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function Yl(e,t,r){const{props:n,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?oi(n,o,c):!!o;if(l&8){const f=t.dynamicProps;for(let h=0;he.__isSuspense;function Zl(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):sl(e)}const vt=Symbol.for("v-fgt"),kn=Symbol.for("v-txt"),er=Symbol.for("v-cmt"),jn=Symbol.for("v-stc"),Ir=[];let rt=null;function St(e=!1){Ir.push(rt=e?null:[])}function Xl(){Ir.pop(),rt=Ir[Ir.length-1]||null}let Ur=1;function li(e){Ur+=e,e<0&&rt&&(rt.hasOnce=!0)}function za(e){return e.dynamicChildren=Ur>0?rt||dr:null,Xl(),Ur>0&&rt&&rt.push(e),e}function zt(e,t,r,n,s,i){return za(ee(e,t,r,n,s,i,!0))}function Ga(e,t,r,n,s){return za(We(e,t,r,n,s,!0))}function mn(e){return e?e.__v_isVNode===!0:!1}function Ar(e,t){return e.type===t.type&&e.key===t.key}const Ya=({key:e})=>e??null,an=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||De(e)||Q(e)?{i:ot,r:e,k:t,f:!!r}:e:null);function ee(e,t=null,r=null,n=0,s=null,i=e===vt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ya(t),ref:t&&an(t),scopeId:Pa,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ot};return a?(Is(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=Ce(r)?8:16),Ur>0&&!o&&rt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&rt.push(l),l}const We=Ql;function Ql(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===xl)&&(e=er),mn(e)){const a=Er(e,t,!0);return r&&Is(a,r),Ur>0&&!i&&rt&&(a.shapeFlag&6?rt[rt.indexOf(e)]=a:rt.push(a)),a.patchFlag=-2,a}if(uu(e)&&(e=e.__vccOpts),t){t=eu(t);let{class:a,style:l}=t;a&&!Ce(a)&&(t.class=Cn(a)),be(l)&&(Ms(l)&&!Y(l)&&(l=Me({},l)),t.style=_s(l))}const o=Ce(e)?1:Wa(e)?128:ol(e)?64:be(e)?4:Q(e)?2:0;return ee(e,t,r,n,s,o,i,!0)}function eu(e){return e?Ms(e)||Ta(e)?Me({},e):e:null}function Er(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?tu(s||{},t):s,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Ya(c),ref:t&&t.ref?r&&i?Y(i)?i.concat(an(t)):[i,an(t)]:an(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==vt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Er(e.ssContent),ssFallback:e.ssFallback&&Er(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&$s(f,l.clone(f)),f}function Jt(e=" ",t=0){return We(kn,null,e,t)}function ui(e="",t=!1){return t?(St(),Ga(er,null,e)):We(er,null,e)}function yt(e){return e==null||typeof e=="boolean"?We(er):Y(e)?We(vt,null,e.slice()):mn(e)?Rt(e):We(kn,null,String(e))}function Rt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Er(e)}function Is(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Y(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Is(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!Ta(t)?t._ctx=ot:s===3&&ot&&(ot.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Q(t)?(t={default:t,_ctx:ot},r=32):(t=String(t),n&64?(r=16,t=[Jt(t)]):r=8);e.children=t,e.shapeFlag|=r}function tu(...e){const t={};for(let r=0;r{let s;return(s=e[r])||(s=e[r]=[]),s.push(n),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};vn=t("__VUE_INSTANCE_SETTERS__",r=>qe=r),fs=t("__VUE_SSR_SETTERS__",r=>Hr=r)}const Vr=e=>{const t=qe;return vn(e),e.scope.on(),()=>{e.scope.off(),vn(t)}},ci=()=>{qe&&qe.scope.off(),vn(null)};function Ja(e){return e.vnode.shapeFlag&4}let Hr=!1;function iu(e,t=!1,r=!1){t&&fs(t);const{props:n,children:s}=e.vnode,i=Ja(e);$l(e,n,i,t),Rl(e,s,r);const o=i?au(e,t):void 0;return t&&fs(!1),o}function au(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,El);const{setup:n}=r;if(n){Ut();const s=e.setupContext=n.length>1?lu(e):null,i=Vr(e),o=Kr(n,e,0,[e.props,s]),a=Zi(o);if(Ht(),i(),(a||e.sp)&&!Br(e)&&Aa(e),a){if(o.then(ci,ci),t)return o.then(l=>{fi(e,l,t)}).catch(l=>{An(l,e,0)});e.asyncDep=o}else fi(e,o,t)}else Za(e,t)}function fi(e,t,r){Q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=ba(t)),Za(e,r)}let hi;function Za(e,t,r){const n=e.type;if(!e.render){if(!t&&hi&&!n.render){const s=n.template||Bs(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,c=Me(Me({isCustomElement:i,delimiters:a},o),l);n.render=hi(s,c)}}e.render=n.render||bt}{const s=Vr(e);Ut();try{Cl(e)}finally{Ht(),s()}}}const ou={get(e,t){return Re(e,"get",""),e[t]}};function lu(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,ou),slots:e.slots,emit:e.emit,expose:t}}function Mn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ba(zo(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Tr)return Tr[r](e)},has(t,r){return r in t||r in Tr}})):e.proxy}function uu(e){return Q(e)&&"__vccOpts"in e}const Xa=(e,t)=>Xo(e,t,Hr);function Kt(e,t,r){const n=arguments.length;return n===2?be(t)&&!Y(t)?mn(t)?We(e,null,[t]):We(e,t):We(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&mn(r)&&(r=[r]),We(e,t,r))}const cu="3.5.12";/** +**/function Kr(e,t,r,n){try{return n?e(...n):e()}catch(s){An(s,t,r)}}function Et(e,t,r,n){if(Q(e)){const s=Kr(e,t,r,n);return s&&Zi(s)&&s.catch(i=>{An(i,t,r)}),s}if(Y(e)){const s=[];for(let i=0;i>>1,s=je[n],i=Lr(s);i=Lr(r)?je.push(e):je.splice(sl(t),0,e),e.flags|=1,_a()}}function _a(){pn||(pn=xa.then(Ca))}function il(e){Y(e)?vr.push(...e):It&&e.id===-1?It.splice(fr+1,0,e):e.flags&1||(vr.push(e),e.flags|=1),_a()}function ei(e,t,r=gt+1){for(;rLr(r)-Lr(n));if(vr.length=0,It){It.push(...t);return}for(It=t,fr=0;fre.id==null?e.flags&2?-1:1/0:e.id;function Ca(e){try{for(gt=0;gt{n._d&&li(-1);const i=dn(t);let o;try{o=e(...s)}finally{dn(i),n._d&&li(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Zr(e,t){if(ot===null)return e;const r=Mn(ot),n=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport;function $s(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$s(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function ul(e,t){return Q(e)?Me({name:e.name},t,{setup:e}):e}function Aa(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function as(e,t,r,n,s=!1){if(Y(e)){e.forEach((k,T)=>as(k,t&&(Y(t)?t[T]:t),r,n,s));return}if(Br(n)&&!s)return;const i=n.shapeFlag&4?Mn(n.component):n.el,o=s?null:i,{i:a,r:l}=e,c=t&&t.r,f=a.refs===ve?a.refs={}:a.refs,h=a.setupState,v=ue(h),x=h===ve?()=>!1:k=>ce(v,k);if(c!=null&&c!==l&&(Ce(c)?(f[c]=null,x(c)&&(h[c]=null)):De(c)&&(c.value=null)),Q(l))Kr(l,a,12,[o,f]);else{const k=Ce(l),T=De(l);if(k||T){const j=()=>{if(e.f){const H=k?x(l)?h[l]:f[l]:l.value;s?Y(H)&&bs(H,i):Y(H)?H.includes(i)||H.push(i):k?(f[l]=[i],x(l)&&(h[l]=f[l])):(l.value=[i],e.k&&(f[e.k]=l.value))}else k?(f[l]=o,x(l)&&(h[l]=o)):T&&(l.value=o,e.k&&(f[e.k]=o))};o?(j.id=-1,Qe(j,r)):j()}}}En().requestIdleCallback;En().cancelIdleCallback;const Br=e=>!!e.type.__asyncLoader,Sa=e=>e.type.__isKeepAlive;function cl(e,t){Fa(e,"a",t)}function fl(e,t){Fa(e,"da",t)}function Fa(e,t,r=qe){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Sn(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Sa(s.parent.vnode)&&hl(n,t,r,s),s=s.parent}}function hl(e,t,r,n){const s=Sn(t,e,n,!0);ka(()=>{bs(n[t],s)},r)}function Sn(e,t,r=qe,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Ut();const a=Vr(r),l=Et(t,r,e,o);return a(),Ht(),l});return n?s.unshift(i):s.push(i),i}}const $t=e=>(t,r=qe)=>{(!Hr||e==="sp")&&Sn(e,(...n)=>t(...n),r)},pl=$t("bm"),dl=$t("m"),gl=$t("bu"),ml=$t("u"),vl=$t("bum"),ka=$t("um"),yl=$t("sp"),wl=$t("rtg"),bl=$t("rtc");function xl(e,t=qe){Sn("ec",e,t)}const _l=Symbol.for("v-ndc");function El(e,t,r,n){let s;const i=r,o=Y(e);if(o||Ce(e)){const a=o&&mr(e);let l=!1;a&&(l=!lt(e),e=Pn(e)),s=new Array(e.length);for(let c=0,f=e.length;ct(a,l,void 0,i));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,c=a.length;le?Ja(e)?Mn(e):os(e.parent):null,Tr=Me(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>os(e.parent),$root:e=>os(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Bs(e),$forceUpdate:e=>e.f||(e.f=()=>{Os(e.update)}),$nextTick:e=>e.n||(e.n=nl.bind(e.proxy)),$watch:e=>Vl.bind(e)}),Ln=(e,t)=>e!==ve&&!e.__isScriptSetup&&ce(e,t),Cl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:o,type:a,appContext:l}=e;let c;if(t[0]!=="$"){const x=o[t];if(x!==void 0)switch(x){case 1:return n[t];case 2:return s[t];case 4:return r[t];case 3:return i[t]}else{if(Ln(n,t))return o[t]=1,n[t];if(s!==ve&&ce(s,t))return o[t]=2,s[t];if((c=e.propsOptions[0])&&ce(c,t))return o[t]=3,i[t];if(r!==ve&&ce(r,t))return o[t]=4,r[t];ls&&(o[t]=0)}}const f=Tr[t];let h,v;if(f)return t==="$attrs"&&Re(e.attrs,"get",""),f(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(r!==ve&&ce(r,t))return o[t]=4,r[t];if(v=l.config.globalProperties,ce(v,t))return v[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return Ln(s,t)?(s[t]=r,!0):n!==ve&&ce(n,t)?(n[t]=r,!0):ce(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:s,propsOptions:i}},o){let a;return!!r[o]||e!==ve&&ce(e,o)||Ln(t,o)||(a=i[0])&&ce(a,o)||ce(n,o)||ce(Tr,o)||ce(s.config.globalProperties,o)},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:ce(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};function ti(e){return Y(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}let ls=!0;function Pl(e){const t=Bs(e),r=e.proxy,n=e.ctx;ls=!1,t.beforeCreate&&ri(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:f,beforeMount:h,mounted:v,beforeUpdate:x,updated:k,activated:T,deactivated:j,beforeDestroy:H,beforeUnmount:m,destroyed:p,unmounted:d,render:y,renderTracked:b,renderTriggered:E,errorCaptured:M,serverPrefetch:P,expose:q,inheritAttrs:K,components:ne,directives:me,filters:Ae}=t;if(c&&Al(c,n,null),o)for(const fe in o){const V=o[fe];Q(V)&&(n[fe]=V.bind(r))}if(s){const fe=s.call(r,r);be(fe)&&(e.data=Fs(fe))}if(ls=!0,i)for(const fe in i){const V=i[fe],he=Q(V)?V.bind(r,r):Q(V.get)?V.get.bind(r,r):bt,Se=!Q(V)&&Q(V.set)?V.set.bind(r):bt,Oe=Xa({get:he,set:Se});Object.defineProperty(n,fe,{enumerable:!0,configurable:!0,get:()=>Oe.value,set:ae=>Oe.value=ae})}if(a)for(const fe in a)Ma(a[fe],n,r,fe);if(l){const fe=Q(l)?l.call(r):l;Reflect.ownKeys(fe).forEach(V=>{$l(V,fe[V])})}f&&ri(f,e,"c");function _e(fe,V){Y(V)?V.forEach(he=>fe(he.bind(r))):V&&fe(V.bind(r))}if(_e(pl,h),_e(dl,v),_e(gl,x),_e(ml,k),_e(cl,T),_e(fl,j),_e(xl,M),_e(bl,b),_e(wl,E),_e(vl,m),_e(ka,d),_e(yl,P),Y(q))if(q.length){const fe=e.exposed||(e.exposed={});q.forEach(V=>{Object.defineProperty(fe,V,{get:()=>r[V],set:he=>r[V]=he})})}else e.exposed||(e.exposed={});y&&e.render===bt&&(e.render=y),K!=null&&(e.inheritAttrs=K),ne&&(e.components=ne),me&&(e.directives=me),P&&Aa(e)}function Al(e,t,r=bt){Y(e)&&(e=us(e));for(const n in e){const s=e[n];let i;be(s)?"default"in s?i=nn(s.from||n,s.default,!0):i=nn(s.from||n):i=nn(s),De(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function ri(e,t,r){Et(Y(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Ma(e,t,r,n){let s=n.includes(".")?Ka(r,n):()=>r[n];if(Ce(e)){const i=t[e];Q(i)&&sn(s,i)}else if(Q(e))sn(s,e.bind(r));else if(be(e))if(Y(e))e.forEach(i=>Ma(i,t,r,n));else{const i=Q(e.handler)?e.handler.bind(r):t[e.handler];Q(i)&&sn(s,i,e)}}function Bs(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!r&&!n?l=t:(l={},s.length&&s.forEach(c=>gn(l,c,o,!0)),gn(l,t,o)),be(t)&&i.set(t,l),l}function gn(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&gn(e,i,r,!0),s&&s.forEach(o=>gn(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=Sl[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const Sl={data:ni,props:si,emits:si,methods:Fr,computed:Fr,beforeCreate:Ue,created:Ue,beforeMount:Ue,mounted:Ue,beforeUpdate:Ue,updated:Ue,beforeDestroy:Ue,beforeUnmount:Ue,destroyed:Ue,unmounted:Ue,activated:Ue,deactivated:Ue,errorCaptured:Ue,serverPrefetch:Ue,components:Fr,directives:Fr,watch:kl,provide:ni,inject:Fl};function ni(e,t){return t?e?function(){return Me(Q(e)?e.call(this,this):e,Q(t)?t.call(this,this):t)}:t:e}function Fl(e,t){return Fr(us(e),us(t))}function us(e){if(Y(e)){const t={};for(let r=0;r1)return r&&Q(t)?t.call(n&&n.proxy):t}}const $a={},Ba=()=>Object.create($a),Ta=e=>Object.getPrototypeOf(e)===$a;function Bl(e,t,r,n=!1){const s={},i=Ba();e.propsDefaults=Object.create(null),Ia(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:zo(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Tl(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=ue(s),[l]=e.propsOptions;let c=!1;if((n||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let h=0;h{l=!0;const[v,x]=Ra(h,t,!0);Me(o,v),x&&a.push(...x)};!r&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!l)return be(e)&&n.set(e,dr),dr;if(Y(i))for(let f=0;fe[0]==="_"||e==="$stable",Ts=e=>Y(e)?e.map(yt):[yt(e)],Rl=(e,t,r)=>{if(t._n)return t;const n=al((...s)=>Ts(t(...s)),r);return n._c=!1,n},Da=(e,t,r)=>{const n=e._ctx;for(const s in e){if(Na(s))continue;const i=e[s];if(Q(i))t[s]=Rl(s,i,n);else if(i!=null){const o=Ts(i);t[s]=()=>o}}},La=(e,t)=>{const r=Ts(t);e.slots.default=()=>r},Ua=(e,t,r)=>{for(const n in t)(r||n!=="_")&&(e[n]=t[n])},Nl=(e,t,r)=>{const n=e.slots=Ba();if(e.vnode.shapeFlag&32){const s=t._;s?(Ua(n,t,r),r&&ta(n,"_",s,!0)):Da(t,n)}else t&&La(e,t)},Dl=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=ve;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:Ua(s,t,r):(i=!t.$stable,Da(t,s)),o=t}else t&&(La(e,t),o={default:1});if(i)for(const a in s)!Na(a)&&o[a]==null&&delete s[a]},Qe=Xl;function Ll(e){return Ul(e)}function Ul(e,t){const r=En();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:f,parentNode:h,nextSibling:v,setScopeId:x=bt,insertStaticContent:k}=e,T=(g,w,C,$=null,S=null,O=null,N=void 0,R=null,I=!!w.dynamicChildren)=>{if(g===w)return;g&&!Ar(g,w)&&($=Ke(g),ae(g,S,O,!0),g=null),w.patchFlag===-2&&(I=!1,w.dynamicChildren=null);const{type:B,ref:G,shapeFlag:U}=w;switch(B){case kn:j(g,w,C,$);break;case er:H(g,w,C,$);break;case jn:g==null&&m(w,C,$,N);break;case vt:ne(g,w,C,$,S,O,N,R,I);break;default:U&1?y(g,w,C,$,S,O,N,R,I):U&6?me(g,w,C,$,S,O,N,R,I):(U&64||U&128)&&B.process(g,w,C,$,S,O,N,R,I,Ye)}G!=null&&S&&as(G,g&&g.ref,O,w||g,!w)},j=(g,w,C,$)=>{if(g==null)n(w.el=a(w.children),C,$);else{const S=w.el=g.el;w.children!==g.children&&c(S,w.children)}},H=(g,w,C,$)=>{g==null?n(w.el=l(w.children||""),C,$):w.el=g.el},m=(g,w,C,$)=>{[g.el,g.anchor]=k(g.children,w,C,$,g.el,g.anchor)},p=({el:g,anchor:w},C,$)=>{let S;for(;g&&g!==w;)S=v(g),n(g,C,$),g=S;n(w,C,$)},d=({el:g,anchor:w})=>{let C;for(;g&&g!==w;)C=v(g),s(g),g=C;s(w)},y=(g,w,C,$,S,O,N,R,I)=>{w.type==="svg"?N="svg":w.type==="math"&&(N="mathml"),g==null?b(w,C,$,S,O,N,R,I):P(g,w,S,O,N,R,I)},b=(g,w,C,$,S,O,N,R)=>{let I,B;const{props:G,shapeFlag:U,transition:W,dirs:J}=g;if(I=g.el=o(g.type,O,G&&G.is,G),U&8?f(I,g.children):U&16&&M(g.children,I,null,$,S,Un(g,O),N,R),J&&jt(g,null,$,"created"),E(I,g,g.scopeId,N,$),G){for(const ye in G)ye!=="value"&&!Mr(ye)&&i(I,ye,null,G[ye],O,$);"value"in G&&i(I,"value",null,G.value,O),(B=G.onVnodeBeforeMount)&&dt(B,$,g)}J&&jt(g,null,$,"beforeMount");const oe=Hl(S,W);oe&&W.beforeEnter(I),n(I,w,C),((B=G&&G.onVnodeMounted)||oe||J)&&Qe(()=>{B&&dt(B,$,g),oe&&W.enter(I),J&&jt(g,null,$,"mounted")},S)},E=(g,w,C,$,S)=>{if(C&&x(g,C),$)for(let O=0;O<$.length;O++)x(g,$[O]);if(S){let O=S.subTree;if(w===O||Wa(O.type)&&(O.ssContent===w||O.ssFallback===w)){const N=S.vnode;E(g,N,N.scopeId,N.slotScopeIds,S.parent)}}},M=(g,w,C,$,S,O,N,R,I=0)=>{for(let B=I;B{const R=w.el=g.el;let{patchFlag:I,dynamicChildren:B,dirs:G}=w;I|=g.patchFlag&16;const U=g.props||ve,W=w.props||ve;let J;if(C&&qt(C,!1),(J=W.onVnodeBeforeUpdate)&&dt(J,C,w,g),G&&jt(w,g,C,"beforeUpdate"),C&&qt(C,!0),(U.innerHTML&&W.innerHTML==null||U.textContent&&W.textContent==null)&&f(R,""),B?q(g.dynamicChildren,B,R,C,$,Un(w,S),O):N||V(g,w,R,null,C,$,Un(w,S),O,!1),I>0){if(I&16)K(R,U,W,C,S);else if(I&2&&U.class!==W.class&&i(R,"class",null,W.class,S),I&4&&i(R,"style",U.style,W.style,S),I&8){const oe=w.dynamicProps;for(let ye=0;ye{J&&dt(J,C,w,g),G&&jt(w,g,C,"updated")},$)},q=(g,w,C,$,S,O,N)=>{for(let R=0;R{if(w!==C){if(w!==ve)for(const O in w)!Mr(O)&&!(O in C)&&i(g,O,w[O],null,S,$);for(const O in C){if(Mr(O))continue;const N=C[O],R=w[O];N!==R&&O!=="value"&&i(g,O,R,N,S,$)}"value"in C&&i(g,"value",w.value,C.value,S)}},ne=(g,w,C,$,S,O,N,R,I)=>{const B=w.el=g?g.el:a(""),G=w.anchor=g?g.anchor:a("");let{patchFlag:U,dynamicChildren:W,slotScopeIds:J}=w;J&&(R=R?R.concat(J):J),g==null?(n(B,C,$),n(G,C,$),M(w.children||[],C,G,S,O,N,R,I)):U>0&&U&64&&W&&g.dynamicChildren?(q(g.dynamicChildren,W,C,S,O,N,R),(w.key!=null||S&&w===S.subTree)&&Ha(g,w,!0)):V(g,w,C,G,S,O,N,R,I)},me=(g,w,C,$,S,O,N,R,I)=>{w.slotScopeIds=R,g==null?w.shapeFlag&512?S.ctx.activate(w,C,$,N,I):Ae(w,C,$,S,O,N,I):ut(g,w,I)},Ae=(g,w,C,$,S,O,N)=>{const R=g.component=iu(g,$,S);if(Sa(g)&&(R.ctx.renderer=Ye),au(R,!1,N),R.asyncDep){if(S&&S.registerDep(R,_e,N),!g.el){const I=R.subTree=We(er);H(null,I,w,C)}}else _e(R,g,w,C,S,O,N)},ut=(g,w,C)=>{const $=w.component=g.component;if(Jl(g,w,C))if($.asyncDep&&!$.asyncResolved){fe($,w,C);return}else $.next=w,$.update();else w.el=g.el,$.vnode=w},_e=(g,w,C,$,S,O,N)=>{const R=()=>{if(g.isMounted){let{next:U,bu:W,u:J,parent:oe,vnode:ye}=g;{const Ze=ja(g);if(Ze){U&&(U.el=ye.el,fe(g,U,N)),Ze.asyncDep.then(()=>{g.isUnmounted||R()});return}}let pe=U,Je;qt(g,!1),U?(U.el=ye.el,fe(g,U,N)):U=ye,W&&rn(W),(Je=U.props&&U.props.onVnodeBeforeUpdate)&&dt(Je,oe,U,ye),qt(g,!0);const Te=Hn(g),ft=g.subTree;g.subTree=Te,T(ft,Te,h(ft.el),Ke(ft),g,S,O),U.el=Te.el,pe===null&&Zl(g,Te.el),J&&Qe(J,S),(Je=U.props&&U.props.onVnodeUpdated)&&Qe(()=>dt(Je,oe,U,ye),S)}else{let U;const{el:W,props:J}=w,{bm:oe,m:ye,parent:pe,root:Je,type:Te}=g,ft=Br(w);if(qt(g,!1),oe&&rn(oe),!ft&&(U=J&&J.onVnodeBeforeMount)&&dt(U,pe,w),qt(g,!0),W&&ar){const Ze=()=>{g.subTree=Hn(g),ar(W,g.subTree,g,S,null)};ft&&Te.__asyncHydrate?Te.__asyncHydrate(W,g,Ze):Ze()}else{Je.ce&&Je.ce._injectChildStyle(Te);const Ze=g.subTree=Hn(g);T(null,Ze,C,$,g,S,O),w.el=Ze.el}if(ye&&Qe(ye,S),!ft&&(U=J&&J.onVnodeMounted)){const Ze=w;Qe(()=>dt(U,pe,Ze),S)}(w.shapeFlag&256||pe&&Br(pe.vnode)&&pe.vnode.shapeFlag&256)&&g.a&&Qe(g.a,S),g.isMounted=!0,w=C=$=null}};g.scope.on();const I=g.effect=new ia(R);g.scope.off();const B=g.update=I.run.bind(I),G=g.job=I.runIfDirty.bind(I);G.i=g,G.id=g.uid,I.scheduler=()=>Os(G),qt(g,!0),B()},fe=(g,w,C)=>{w.component=g;const $=g.vnode.props;g.vnode=w,g.next=null,Tl(g,w.props,$,C),Dl(g,w.children,C),Ut(),ei(g),Ht()},V=(g,w,C,$,S,O,N,R,I=!1)=>{const B=g&&g.children,G=g?g.shapeFlag:0,U=w.children,{patchFlag:W,shapeFlag:J}=w;if(W>0){if(W&128){Se(B,U,C,$,S,O,N,R,I);return}else if(W&256){he(B,U,C,$,S,O,N,R,I);return}}J&8?(G&16&&Le(B,S,O),U!==B&&f(C,U)):G&16?J&16?Se(B,U,C,$,S,O,N,R,I):Le(B,S,O,!0):(G&8&&f(C,""),J&16&&M(U,C,$,S,O,N,R,I))},he=(g,w,C,$,S,O,N,R,I)=>{g=g||dr,w=w||dr;const B=g.length,G=w.length,U=Math.min(B,G);let W;for(W=0;WG?Le(g,S,O,!0,!1,U):M(w,C,$,S,O,N,R,I,U)},Se=(g,w,C,$,S,O,N,R,I)=>{let B=0;const G=w.length;let U=g.length-1,W=G-1;for(;B<=U&&B<=W;){const J=g[B],oe=w[B]=I?Rt(w[B]):yt(w[B]);if(Ar(J,oe))T(J,oe,C,null,S,O,N,R,I);else break;B++}for(;B<=U&&B<=W;){const J=g[U],oe=w[W]=I?Rt(w[W]):yt(w[W]);if(Ar(J,oe))T(J,oe,C,null,S,O,N,R,I);else break;U--,W--}if(B>U){if(B<=W){const J=W+1,oe=JW)for(;B<=U;)ae(g[B],S,O,!0),B++;else{const J=B,oe=B,ye=new Map;for(B=oe;B<=W;B++){const Xe=w[B]=I?Rt(w[B]):yt(w[B]);Xe.key!=null&&ye.set(Xe.key,B)}let pe,Je=0;const Te=W-oe+1;let ft=!1,Ze=0;const Cr=new Array(Te);for(B=0;B=Te){ae(Xe,S,O,!0);continue}let pt;if(Xe.key!=null)pt=ye.get(Xe.key);else for(pe=oe;pe<=W;pe++)if(Cr[pe-oe]===0&&Ar(Xe,w[pe])){pt=pe;break}pt===void 0?ae(Xe,S,O,!0):(Cr[pt-oe]=B+1,pt>=Ze?Ze=pt:ft=!0,T(Xe,w[pt],C,null,S,O,N,R,I),Je++)}const Gs=ft?jl(Cr):dr;for(pe=Gs.length-1,B=Te-1;B>=0;B--){const Xe=oe+B,pt=w[Xe],Ys=Xe+1{const{el:O,type:N,transition:R,children:I,shapeFlag:B}=g;if(B&6){Oe(g.component.subTree,w,C,$);return}if(B&128){g.suspense.move(w,C,$);return}if(B&64){N.move(g,w,C,Ye);return}if(N===vt){n(O,w,C);for(let U=0;UR.enter(O),S);else{const{leave:U,delayLeave:W,afterLeave:J}=R,oe=()=>n(O,w,C),ye=()=>{U(O,()=>{oe(),J&&J()})};W?W(O,oe,ye):ye()}else n(O,w,C)},ae=(g,w,C,$=!1,S=!1)=>{const{type:O,props:N,ref:R,children:I,dynamicChildren:B,shapeFlag:G,patchFlag:U,dirs:W,cacheIndex:J}=g;if(U===-2&&(S=!1),R!=null&&as(R,null,C,g,!0),J!=null&&(w.renderCache[J]=void 0),G&256){w.ctx.deactivate(g);return}const oe=G&1&&W,ye=!Br(g);let pe;if(ye&&(pe=N&&N.onVnodeBeforeUnmount)&&dt(pe,w,g),G&6)Ge(g.component,C,$);else{if(G&128){g.suspense.unmount(C,$);return}oe&&jt(g,null,w,"beforeUnmount"),G&64?g.type.remove(g,w,C,Ye,$):B&&!B.hasOnce&&(O!==vt||U>0&&U&64)?Le(B,w,C,!1,!0):(O===vt&&U&384||!S&&G&16)&&Le(I,w,C),$&&ir(g)}(ye&&(pe=N&&N.onVnodeUnmounted)||oe)&&Qe(()=>{pe&&dt(pe,w,g),oe&&jt(g,null,w,"unmounted")},C)},ir=g=>{const{type:w,el:C,anchor:$,transition:S}=g;if(w===vt){Pe(C,$);return}if(w===jn){d(g);return}const O=()=>{s(C),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(g.shapeFlag&1&&S&&!S.persisted){const{leave:N,delayLeave:R}=S,I=()=>N(C,O);R?R(g.el,O,I):I()}else O()},Pe=(g,w)=>{let C;for(;g!==w;)C=v(g),s(g),g=C;s(w)},Ge=(g,w,C)=>{const{bum:$,scope:S,job:O,subTree:N,um:R,m:I,a:B}=g;ai(I),ai(B),$&&rn($),S.stop(),O&&(O.flags|=8,ae(N,g,w,C)),R&&Qe(R,w),Qe(()=>{g.isUnmounted=!0},w),w&&w.pendingBranch&&!w.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===w.pendingId&&(w.deps--,w.deps===0&&w.resolve())},Le=(g,w,C,$=!1,S=!1,O=0)=>{for(let N=O;N{if(g.shapeFlag&6)return Ke(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const w=v(g.anchor||g.el),C=w&&w[ol];return C?v(C):w};let ct=!1;const Bt=(g,w,C)=>{g==null?w._vnode&&ae(w._vnode,null,null,!0):T(w._vnode||null,g,w,null,null,null,C),w._vnode=g,ct||(ct=!0,ei(),Ea(),ct=!1)},Ye={p:T,um:ae,m:Oe,r:ir,mt:Ae,mc:M,pc:V,pbc:q,n:Ke,o:e};let st,ar;return{render:Bt,hydrate:st,createApp:Ol(Bt,st)}}function Un({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function qt({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Hl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ha(e,t,r=!1){const n=e.children,s=t.children;if(Y(n)&&Y(s))for(let i=0;i>1,e[r[a]]0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}function ja(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ja(t)}function ai(e){if(e)for(let t=0;tnn(ql);function sn(e,t,r){return qa(e,t,r)}function qa(e,t,r=ve){const{immediate:n,deep:s,flush:i,once:o}=r,a=Me({},r),l=t&&n||!t&&i!=="post";let c;if(Hr){if(i==="sync"){const x=Kl();c=x.__watcherHandles||(x.__watcherHandles=[])}else if(!l){const x=()=>{};return x.stop=bt,x.resume=bt,x.pause=bt,x}}const f=qe;a.call=(x,k,T)=>Et(x,f,k,T);let h=!1;i==="post"?a.scheduler=x=>{Qe(x,f&&f.suspense)}:i!=="sync"&&(h=!0,a.scheduler=(x,k)=>{k?x():Os(x)}),a.augmentJob=x=>{t&&(x.flags|=4),h&&(x.flags|=2,f&&(x.id=f.uid,x.i=f))};const v=tl(e,t,a);return Hr&&(c?c.push(v):l&&v()),v}function Vl(e,t,r){const n=this.proxy,s=Ce(e)?e.includes(".")?Ka(n,e):()=>n[e]:e.bind(n,n);let i;Q(t)?i=t:(i=t.handler,r=t);const o=Vr(this),a=qa(s,i.bind(n),r);return o(),a}function Ka(e,t){const r=t.split(".");return()=>{let n=e;for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Lt(t)}Modifiers`]||e[`${rr(t)}Modifiers`];function zl(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||ve;let s=r;const i=t.startsWith("update:"),o=i&&Wl(n,t.slice(7));o&&(o.trim&&(s=r.map(f=>Ce(f)?f.trim():f)),o.number&&(s=r.map(es)));let a,l=n[a=Tn(t)]||n[a=Tn(Lt(t))];!l&&i&&(l=n[a=Tn(rr(t))]),l&&Et(l,e,6,s);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Et(c,e,6,s)}}function Va(e,t,r=!1){const n=t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Q(e)){const l=c=>{const f=Va(c,t,!0);f&&(a=!0,Me(o,f))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(be(e)&&n.set(e,null),null):(Y(i)?i.forEach(l=>o[l]=null):Me(o,i),be(e)&&n.set(e,o),o)}function Fn(e,t){return!e||!xn(t)?!1:(t=t.slice(2).replace(/Once$/,""),ce(e,t[0].toLowerCase()+t.slice(1))||ce(e,rr(t))||ce(e,t))}function Hn(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:f,props:h,data:v,setupState:x,ctx:k,inheritAttrs:T}=e,j=dn(e);let H,m;try{if(r.shapeFlag&4){const d=s||n,y=d;H=yt(c.call(y,d,f,h,x,v,k)),m=a}else{const d=t;H=yt(d.length>1?d(h,{attrs:a,slots:o,emit:l}):d(h,null)),m=t.props?a:Gl(a)}}catch(d){Ir.length=0,An(d,e,1),H=We(er)}let p=H;if(m&&T!==!1){const d=Object.keys(m),{shapeFlag:y}=p;d.length&&y&7&&(i&&d.some(ws)&&(m=Yl(m,i)),p=Er(p,m,!1,!0))}return r.dirs&&(p=Er(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(r.dirs):r.dirs),r.transition&&$s(p,r.transition),H=p,dn(j),H}const Gl=e=>{let t;for(const r in e)(r==="class"||r==="style"||xn(r))&&((t||(t={}))[r]=e[r]);return t},Yl=(e,t)=>{const r={};for(const n in e)(!ws(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function Jl(e,t,r){const{props:n,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?oi(n,o,c):!!o;if(l&8){const f=t.dynamicProps;for(let h=0;he.__isSuspense;function Xl(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):il(e)}const vt=Symbol.for("v-fgt"),kn=Symbol.for("v-txt"),er=Symbol.for("v-cmt"),jn=Symbol.for("v-stc"),Ir=[];let rt=null;function St(e=!1){Ir.push(rt=e?null:[])}function Ql(){Ir.pop(),rt=Ir[Ir.length-1]||null}let Ur=1;function li(e){Ur+=e,e<0&&rt&&(rt.hasOnce=!0)}function za(e){return e.dynamicChildren=Ur>0?rt||dr:null,Ql(),Ur>0&&rt&&rt.push(e),e}function zt(e,t,r,n,s,i){return za(ee(e,t,r,n,s,i,!0))}function Ga(e,t,r,n,s){return za(We(e,t,r,n,s,!0))}function mn(e){return e?e.__v_isVNode===!0:!1}function Ar(e,t){return e.type===t.type&&e.key===t.key}const Ya=({key:e})=>e??null,an=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||De(e)||Q(e)?{i:ot,r:e,k:t,f:!!r}:e:null);function ee(e,t=null,r=null,n=0,s=null,i=e===vt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ya(t),ref:t&&an(t),scopeId:Pa,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ot};return a?(Is(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=Ce(r)?8:16),Ur>0&&!o&&rt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&rt.push(l),l}const We=eu;function eu(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===_l)&&(e=er),mn(e)){const a=Er(e,t,!0);return r&&Is(a,r),Ur>0&&!i&&rt&&(a.shapeFlag&6?rt[rt.indexOf(e)]=a:rt.push(a)),a.patchFlag=-2,a}if(cu(e)&&(e=e.__vccOpts),t){t=tu(t);let{class:a,style:l}=t;a&&!Ce(a)&&(t.class=Cn(a)),be(l)&&(Ms(l)&&!Y(l)&&(l=Me({},l)),t.style=_s(l))}const o=Ce(e)?1:Wa(e)?128:ll(e)?64:be(e)?4:Q(e)?2:0;return ee(e,t,r,n,s,o,i,!0)}function tu(e){return e?Ms(e)||Ta(e)?Me({},e):e:null}function Er(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?ru(s||{},t):s,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Ya(c),ref:t&&t.ref?r&&i?Y(i)?i.concat(an(t)):[i,an(t)]:an(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==vt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Er(e.ssContent),ssFallback:e.ssFallback&&Er(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&$s(f,l.clone(f)),f}function Jt(e=" ",t=0){return We(kn,null,e,t)}function ui(e="",t=!1){return t?(St(),Ga(er,null,e)):We(er,null,e)}function yt(e){return e==null||typeof e=="boolean"?We(er):Y(e)?We(vt,null,e.slice()):mn(e)?Rt(e):We(kn,null,String(e))}function Rt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Er(e)}function Is(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Y(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Is(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!Ta(t)?t._ctx=ot:s===3&&ot&&(ot.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Q(t)?(t={default:t,_ctx:ot},r=32):(t=String(t),n&64?(r=16,t=[Jt(t)]):r=8);e.children=t,e.shapeFlag|=r}function ru(...e){const t={};for(let r=0;r{let s;return(s=e[r])||(s=e[r]=[]),s.push(n),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};vn=t("__VUE_INSTANCE_SETTERS__",r=>qe=r),fs=t("__VUE_SSR_SETTERS__",r=>Hr=r)}const Vr=e=>{const t=qe;return vn(e),e.scope.on(),()=>{e.scope.off(),vn(t)}},ci=()=>{qe&&qe.scope.off(),vn(null)};function Ja(e){return e.vnode.shapeFlag&4}let Hr=!1;function au(e,t=!1,r=!1){t&&fs(t);const{props:n,children:s}=e.vnode,i=Ja(e);Bl(e,n,i,t),Nl(e,s,r);const o=i?ou(e,t):void 0;return t&&fs(!1),o}function ou(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Cl);const{setup:n}=r;if(n){Ut();const s=e.setupContext=n.length>1?uu(e):null,i=Vr(e),o=Kr(n,e,0,[e.props,s]),a=Zi(o);if(Ht(),i(),(a||e.sp)&&!Br(e)&&Aa(e),a){if(o.then(ci,ci),t)return o.then(l=>{fi(e,l,t)}).catch(l=>{An(l,e,0)});e.asyncDep=o}else fi(e,o,t)}else Za(e,t)}function fi(e,t,r){Q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=ba(t)),Za(e,r)}let hi;function Za(e,t,r){const n=e.type;if(!e.render){if(!t&&hi&&!n.render){const s=n.template||Bs(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,c=Me(Me({isCustomElement:i,delimiters:a},o),l);n.render=hi(s,c)}}e.render=n.render||bt}{const s=Vr(e);Ut();try{Pl(e)}finally{Ht(),s()}}}const lu={get(e,t){return Re(e,"get",""),e[t]}};function uu(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,lu),slots:e.slots,emit:e.emit,expose:t}}function Mn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ba(Go(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Tr)return Tr[r](e)},has(t,r){return r in t||r in Tr}})):e.proxy}function cu(e){return Q(e)&&"__vccOpts"in e}const Xa=(e,t)=>Qo(e,t,Hr);function Kt(e,t,r){const n=arguments.length;return n===2?be(t)&&!Y(t)?mn(t)?We(e,null,[t]):We(e,t):We(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&mn(r)&&(r=[r]),We(e,t,r))}const fu="3.5.12";/** * @vue/runtime-dom v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let hs;const pi=typeof window<"u"&&window.trustedTypes;if(pi)try{hs=pi.createPolicy("vue",{createHTML:e=>e})}catch{}const Qa=hs?e=>hs.createHTML(e):e=>e,fu="http://www.w3.org/2000/svg",hu="http://www.w3.org/1998/Math/MathML",Ft=typeof document<"u"?document:null,di=Ft&&Ft.createElement("template"),pu={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const s=t==="svg"?Ft.createElementNS(fu,e):t==="mathml"?Ft.createElementNS(hu,e):r?Ft.createElement(e,{is:r}):Ft.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Ft.createTextNode(e),createComment:e=>Ft.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ft.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,s,i){const o=r?r.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{di.innerHTML=Qa(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const a=di.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},du=Symbol("_vtc");function gu(e,t,r){const n=e[du];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}const gi=Symbol("_vod"),mu=Symbol("_vsh"),vu=Symbol(""),yu=/(^|;)\s*display\s*:/;function wu(e,t,r){const n=e.style,s=Ce(r);let i=!1;if(r&&!s){if(t)if(Ce(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&on(n,a,"")}else for(const o in t)r[o]==null&&on(n,o,"");for(const o in r)o==="display"&&(i=!0),on(n,o,r[o])}else if(s){if(t!==r){const o=n[vu];o&&(r+=";"+o),n.cssText=r,i=yu.test(r)}}else t&&e.removeAttribute("style");gi in e&&(e[gi]=i?n.display:"",e[mu]&&(n.display="none"))}const mi=/\s*!important$/;function on(e,t,r){if(Y(r))r.forEach(n=>on(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=bu(e,t);mi.test(r)?e.setProperty(rr(n),r.replace(mi,""),"important"):e[n]=r}}const vi=["Webkit","Moz","ms"],qn={};function bu(e,t){const r=qn[t];if(r)return r;let n=Lt(t);if(n!=="filter"&&n in e)return qn[t]=n;n=ea(n);for(let s=0;sKn||(Cu.then(()=>Kn=0),Kn=Date.now());function Au(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Et(Su(n,r.value),t,5,[n])};return r.value=e,r.attached=Pu(),r}function Su(e,t){if(Y(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>s=>!s._stopped&&n&&n(s))}else return t}const Ei=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fu=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?gu(e,n,o):t==="style"?wu(e,r,n):xn(t)?ws(t)||_u(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ku(e,t,n,o))?(bi(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&wi(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ce(n))?bi(e,Lt(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),wi(e,t,n,o))};function ku(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ei(t)&&Q(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Ei(t)&&Ce(r)?!1:t in e}const yn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Y(t)?r=>rn(t,r):t};function Mu(e){e.target.composing=!0}function Ci(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const wr=Symbol("_assign"),Pi={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[wr]=yn(s);const i=n||s.props&&s.props.type==="number";Gt(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;r&&(a=a.trim()),i&&(a=es(a)),e[wr](a)}),r&&Gt(e,"change",()=>{e.value=e.value.trim()}),t||(Gt(e,"compositionstart",Mu),Gt(e,"compositionend",Ci),Gt(e,"change",Ci))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[wr]=yn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?es(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(n&&t===r||s&&e.value.trim()===l)||(e.value=l))}},Ai={created(e,{value:t},r){e.checked=fn(t,r.props.value),e[wr]=yn(r),Gt(e,"change",()=>{e[wr](Ou(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[wr]=yn(n),t!==r&&(e.checked=fn(t,n.props.value))}};function Ou(e){return"_value"in e?e._value:e.value}const $u=Me({patchProp:Fu},pu);let Si;function Bu(){return Si||(Si=Dl($u))}const Tu=(...e)=>{const t=Bu().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=Ru(n);if(!s)return;const i=t._component;!Q(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,Iu(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function Iu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ru(e){return Ce(e)?document.querySelector(e):e}function ie(e,t,r){let n=r.value;return{configurable:!0,get(){const s=n.bind(this);return Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),s},set(s){n=s}}}class Ot extends Error{name="AiScript";info;pos;constructor(t,r){super(t),this.info=r,Error.captureStackTrace&&Error.captureStackTrace(this,Ot)}}class Fi extends Ot{name="Internal";constructor(t){const r=String(t?.message??t);super(r,t)}}class X extends Ot{pos;name="Syntax";constructor(t,r,n){super(`${t} (Line ${r.line}, Column ${r.column})`,n),this.pos=r}}class He extends X{constructor(t,r){super("unexpected EOF",t,r)}}class Vn extends Ot{pos;name="Namespace";constructor(t,r,n){super(`${t} (Line ${r.line}, Column ${r.column})`,n),this.pos=r}}class re extends Ot{name="Runtime";constructor(t,r){super(t,r)}}class eo extends re{constructor(t,r){super(t,r)}}class Nu extends re{name="";constructor(t,r){super(t,r)}}class ki extends Ot{name="Host";constructor(t,r){super(t,r)}}const Du=["def","return","each","for","loop","break","continue","assign","addAssign","subAssign"];function Lu(e){return Du.includes(e.type)}var Pt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};class ze{parent;layerdStates;name;opts={};nsName;constructor(t=[],r,n,s){this.layerdStates=t,this.parent=r,this.name=n||(t.length===1?"":""),this.nsName=s}log(t,r){this.parent?this.parent.log(t,r):this.opts.log&&this.opts.log(t,r)}onUpdated(t,r){this.parent?this.parent.onUpdated(t,r):this.opts.onUpdated&&this.opts.onUpdated(t,r)}createChildScope(t=new Map,r){const n=[t,...this.layerdStates];return new ze(n,this,r)}createChildNamespaceScope(t,r=new Map,n){const s=[r,...this.layerdStates];return new ze(s,this,n,t)}get(t){for(const r of this.layerdStates)if(r.has(t)){const n=r.get(t).value;return this.log("read",{var:t,val:n}),n}throw new re(`No such variable '${t}' in scope '${this.name}'`,{scope:this.layerdStates})}getNsPrefix(){return this.parent==null||this.nsName==null?"":this.parent.getNsPrefix()+this.nsName+":"}exists(t){for(const r of this.layerdStates)if(r.has(t))return this.log("exists",{var:t}),!0;return this.log("not exists",{var:t}),!1}getAll(){const t=this.layerdStates.reduce((r,n)=>[...r,...n],[]);return new Map(t)}add(t,r){this.log("add",{var:t,val:r});const n=this.layerdStates[0];if(n.has(t))throw new re(`Variable '${t}' already exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(t,r),this.parent==null?this.onUpdated(t,r.value):this.nsName!=null&&this.parent.add(this.nsName+":"+t,r)}assign(t,r){let n=1;for(const s of this.layerdStates){if(s.has(t)){const i=s.get(t);if(!i.isMutable)throw new re(`Cannot assign to an immutable variable ${t}.`);i.value=r,this.log("assign",{var:t,val:r}),n===this.layerdStates.length&&this.onUpdated(t,r);return}n++}throw new re(`No such variable '${t}' in scope '${this.name}'`,{scope:this.layerdStates})}}Pt([ie],ze.prototype,"log",null);Pt([ie],ze.prototype,"onUpdated",null);Pt([ie],ze.prototype,"createChildScope",null);Pt([ie],ze.prototype,"createChildNamespaceScope",null);Pt([ie],ze.prototype,"get",null);Pt([ie],ze.prototype,"getNsPrefix",null);Pt([ie],ze.prototype,"exists",null);Pt([ie],ze.prototype,"getAll",null);Pt([ie],ze.prototype,"add",null);Pt([ie],ze.prototype,"assign",null);const $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function Uu(e,t=0){return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}let Wn;const Hu=new Uint8Array(16);function ju(){if(!Wn){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Wn=crypto.getRandomValues.bind(crypto)}return Wn(Hu)}const qu=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mi={randomUUID:qu};function Ku(e,t,r){if(Mi.randomUUID&&!t&&!e)return Mi.randomUUID();e=e||{};const n=e.random||(e.rng||ju)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Uu(n)}const z={type:"null"},Fe={type:"bool",value:!0},ke={type:"bool",value:!1},F=e=>({type:"num",value:e}),se=e=>({type:"str",value:e}),Xt=e=>({type:"bool",value:e}),br=e=>({type:"obj",value:e}),ge=e=>({type:"arr",value:e}),Vu=(e,t,r)=>({type:"fn",params:e,statements:t,scope:r}),_=e=>({type:"fn",native:e}),ln=(e,t)=>({type:"error",value:e,info:t});function Ie(e){if(e==null)throw new re("Expect anything, but got nothing.")}function Be(e){if(e==null)throw new re("Expect boolean, but got nothing.");if(e.type!=="bool")throw new re(`Expect boolean, but got ${e.type}.`)}function at(e){if(e==null)throw new re("Expect function, but got nothing.");if(e.type!=="fn")throw new re(`Expect function, but got ${e.type}.`)}function le(e){if(e==null)throw new re("Expect string, but got nothing.");if(e.type!=="str")throw new re(`Expect string, but got ${e.type}.`)}function A(e){if(e==null)throw new re("Expect number, but got nothing.");if(e.type!=="num")throw new re(`Expect number, but got ${e.type}.`)}function et(e){if(e==null)throw new re("Expect object, but got nothing.");if(e.type!=="obj")throw new re(`Expect object, but got ${e.type}.`)}function wt(e){if(e==null)throw new re("Expect array, but got nothing.");if(e.type!=="arr")throw new re(`Expect array, but got ${e.type}.`)}function Oi(e){return e.type==="fn"}function zn(e){return e.type==="obj"}function wn(e){return e.type==="arr"}function xr(e,t){return e.type==="fn"&&t.type==="fn"?e.native&&t.native?e.native===t.native:e===t:e.type==="fn"||t.type==="fn"?!1:e.type==="null"&&t.type==="null"?!0:e.type==="null"||t.type==="null"?!1:e.value===t.value}function ps(e,t=!1){if(t){if(e.type==="num")return e.value.toString();if(e.type==="bool")return e.value?"true":"false";if(e.type==="str")return`"${e.value}"`;if(e.type==="arr")return`[${e.value.map(n=>ps(n,!0)).join(", ")}]`;if(e.type==="null")return"(null)"}const r=e.type==="num"||e.type==="bool"?e.value:e.type==="str"?`"${e.value}"`:e.type==="fn"||e.type==="obj"?"...":e.type==="null"?"":null;return`${e.type}<${r}>`}function ds(e){switch(e.type){case"fn":return"";case"arr":return e.value.map(t=>ds(t));case"bool":return e.value;case"null":return null;case"num":return e.value;case"obj":{const t={};for(const[r,n]of e.value.entries())t[r]=ds(n);return t}case"str":return e.value;default:throw new Error(`Unrecognized value type: ${e.type}`)}}function gs(e){if(e===null)return z;if(typeof e=="boolean")return Xt(e);if(typeof e=="string")return se(e);if(typeof e=="number")return F(e);if(Array.isArray(e))return ge(e.map(t=>gs(t)));if(typeof e=="object"){const t=new Map;for(const[r,n]of Object.entries(e))t.set(r,gs(n));return br(t)}return z}function _r(e,t=!1,r=new Set){if((e.type==="arr"||e.type==="obj")&&r.has(e.value))return"...";if(t&&e.type==="str")return'"'+e.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(e.type==="str")return e.value;if(e.type==="num")return e.value.toString();if(e.type==="arr"){r.add(e.value);const n=[];for(const s of e.value)n.push(_r(s,!0,r));return"[ "+n.join(", ")+" ]"}if(e.type==="obj"){r.add(e.value);const n=[];for(const[s,i]of e.value)n.push(`${s}: ${_r(i,!0,r)}`);return"{ "+n.join(", ")+" }"}return e.type==="bool"?e.value.toString():e.type==="null"?"null":e.type==="fn"?e.native?"@( ?? ) { native code }":`@( ${e.params.map(n=>n.dest.type==="identifier"?n.dest.name:"?").join(", ")} ) { ... }`:"?"}const Wu={version:"1.0.0"},to=Wu.version,ro=new TextEncoder,zu=new TextDecoder,Yt=Math.ceil(Math.log2(Number.MAX_SAFE_INTEGER));BigInt(Yt);const Gu=Yt-1;BigInt(Gu);class Rs{generateNumber0To1(){let t=this.generateBigUintByBits(Yt),r=1022,n=Yt-$i(t);for(;n>0&&r>=Yt;)r-=n,t<<=BigInt(n),t|=this.generateBigUintByBits(n),n=Yt-$i(t);if(n>0){const s=Math.min(r-1,n);t<<=BigInt(s),t|=this.generateBigUintByBits(s),r=Math.max(r-s,0)}return Number(t)*.5**Yt*.5**(1022-r)}generateUniform(t){if(t<1)return 0n;const r=t.toString(2).length,n=Math.ceil(r/8),s=BigInt(n*8-r);let i;do i=this.generateBigUintByBytes(n)>>s;while(i>t);return i}generateRandomIntegerInRange(t,r){const n=Math.ceil(t),s=Math.floor(r),i=s-n;if(i===0)return n;const o=Math.abs(i),a=Math.sign(i);if(!Number.isSafeInteger(o)||!Number.isSafeInteger(n)||!Number.isSafeInteger(s))return null;const l=BigInt(o);return Number(this.generateUniform(l))*a+n}}function $i(e){return e===0n?0:e.toString(2).length}function Yu(e){if(e.byteLength===0)return null;if(e.byteLength<8){const t=new Uint8Array(8);return t.set(new Uint8Array(e)),new DataView(t.buffer).getBigUint64(0,!0)}return new DataView(e).getBigUint64(0,!0)}function Ns(e){if(e.byteLength===0)return null;if(e.byteLength<=8)return Yu(e);const t=new DataView(e);let r=0n,n=0n,s=0;for(;s>n}generateBytes(t){return crypto.getRandomValues(t)}}var nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ju(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zu(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var Ds={exports:{}};Ds.exports;(function(e){(function(t,r,n){function s(l){var c=this,f=a();c.next=function(){var h=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=h-(c.c=h|0)},c.c=1,c.s0=f(" "),c.s1=f(" "),c.s2=f(" "),c.s0-=f(l),c.s0<0&&(c.s0+=1),c.s1-=f(l),c.s1<0&&(c.s1+=1),c.s2-=f(l),c.s2<0&&(c.s2+=1),f=null}function i(l,c){return c.c=l.c,c.s0=l.s0,c.s1=l.s1,c.s2=l.s2,c}function o(l,c){var f=new s(l),h=c&&c.state,v=f.next;return v.int32=function(){return f.next()*4294967296|0},v.double=function(){return v()+(v()*2097152|0)*11102230246251565e-32},v.quick=v,h&&(typeof h=="object"&&i(h,f),v.state=function(){return i(f,{})}),v}function a(){var l=4022871197,c=function(f){f=String(f);for(var h=0;h>>0,v-=l,v*=l,l=v>>>0,v-=l,l+=v*4294967296}return(l>>>0)*23283064365386963e-26};return c}r&&r.exports?r.exports=o:this.alea=o})(nt,e)})(Ds);var Xu=Ds.exports,Ls={exports:{}};Ls.exports;(function(e){(function(t,r,n){function s(a){var l=this,c="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var h=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^h^h>>>8},a===(a|0)?l.x=a:c+=a;for(var f=0;f>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(typeof f=="object"&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.xor128=o})(nt,e)})(Ls);var Qu=Ls.exports,Us={exports:{}};Us.exports;(function(e){(function(t,r,n){function s(a){var l=this,c="";l.next=function(){var h=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(h^h<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,a===(a|0)?l.x=a:c+=a;for(var f=0;f>>4),l.next()}function i(a,l){return l.x=a.x,l.y=a.y,l.z=a.z,l.w=a.w,l.v=a.v,l.d=a.d,l}function o(a,l){var c=new s(a),f=l&&l.state,h=function(){return(c.next()>>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(typeof f=="object"&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.xorwow=o})(nt,e)})(Us);var ec=Us.exports,Hs={exports:{}};Hs.exports;(function(e){(function(t,r,n){function s(a){var l=this;l.next=function(){var f=l.x,h=l.i,v,x;return v=f[h],v^=v>>>7,x=v^v<<24,v=f[h+1&7],x^=v^v>>>10,v=f[h+3&7],x^=v^v>>>3,v=f[h+4&7],x^=v^v<<7,v=f[h+7&7],v=v^v<<13,x^=v^v<<9,f[h]=x,l.i=h+1&7,x};function c(f,h){var v,x=[];if(h===(h|0))x[0]=h;else for(h=""+h,v=0;v0;--v)f.next()}c(l,a)}function i(a,l){return l.x=a.x.slice(),l.i=a.i,l}function o(a,l){a==null&&(a=+new Date);var c=new s(a),f=l&&l.state,h=function(){return(c.next()>>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(f.x&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.xorshift7=o})(nt,e)})(Hs);var tc=Hs.exports,js={exports:{}};js.exports;(function(e){(function(t,r,n){function s(a){var l=this;l.next=function(){var f=l.w,h=l.X,v=l.i,x,k;return l.w=f=f+1640531527|0,k=h[v+34&127],x=h[v=v+1&127],k^=k<<13,x^=x<<17,k^=k>>>15,x^=x>>>12,k=h[v]=k^x,l.i=v,k+(f^f>>>16)|0};function c(f,h){var v,x,k,T,j,H=[],m=128;for(h===(h|0)?(x=h,h=null):(h=h+"\0",x=0,m=Math.max(m,h.length)),k=0,T=-32;T>>15,x^=x<<4,x^=x>>>13,T>=0&&(j=j+1640531527|0,v=H[T&127]^=x+j,k=v==0?k+1:0);for(k>=128&&(H[(h&&h.length||0)&127]=-1),k=127,T=4*128;T>0;--T)x=H[k+34&127],v=H[k=k+1&127],x^=x<<13,v^=v<<17,x^=x>>>15,v^=v>>>12,H[k]=x^v;f.w=j,f.X=H,f.i=k}c(l,a)}function i(a,l){return l.i=a.i,l.w=a.w,l.X=a.X.slice(),l}function o(a,l){a==null&&(a=+new Date);var c=new s(a),f=l&&l.state,h=function(){return(c.next()>>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(f.X&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.xor4096=o})(nt,e)})(js);var rc=js.exports,qs={exports:{}};qs.exports;(function(e){(function(t,r,n){function s(a){var l=this,c="";l.next=function(){var h=l.b,v=l.c,x=l.d,k=l.a;return h=h<<25^h>>>7^v,v=v-x|0,x=x<<24^x>>>8^k,k=k-h|0,l.b=h=h<<20^h>>>12^v,l.c=v=v-x|0,l.d=x<<16^v>>>16^k,l.a=k-h|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,a===Math.floor(a)?(l.a=a/4294967296|0,l.b=a|0):c+=a;for(var f=0;f>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(typeof f=="object"&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.tychei=o})(nt,e)})(qs);var nc=qs.exports,no={exports:{}};const sc={},ic=Object.freeze(Object.defineProperty({__proto__:null,default:sc},Symbol.toStringTag,{value:"Module"})),ac=Zu(ic);(function(e){(function(t,r,n){var s=256,i=6,o=52,a="random",l=n.pow(s,i),c=n.pow(2,o),f=c*2,h=s-1,v;function x(d,y,b){var E=[];y=y==!0?{entropy:!0}:y||{};var M=H(j(y.entropy?[d,p(r)]:d??m(),3),E),P=new k(E),q=function(){for(var K=P.g(i),ne=l,me=0;K=f;)K/=2,ne/=2,me>>>=1;return(K+me)/ne};return q.int32=function(){return P.g(4)|0},q.quick=function(){return P.g(4)/4294967296},q.double=q,H(p(P.S),r),(y.pass||b||function(K,ne,me,Ae){return Ae&&(Ae.S&&T(Ae,P),K.state=function(){return T(P,{})}),me?(n[a]=K,ne):K})(q,M,"global"in y?y.global:this==n,y.state)}function k(d){var y,b=d.length,E=this,M=0,P=E.i=E.j=0,q=E.S=[];for(b||(d=[b++]);M>n}generateBytes(t){if(t.length<1)return t;t.fill(0);let r=t;if(r.length<=this.filledBuffer.length)return r.set(this.filledBuffer.subarray(0,r.length)),this.filledBuffer=this.filledBuffer.subarray(r.length),t;for(;r.length>0;){if(this.filledBuffer.length===0){if(r.length>=Vt){const n=r.subarray(0,r.length-r.length%Vt);this.fillBufferDirect(n),r=r.subarray(n.length);continue}this.fillBuffer()}if(r.length<=this.filledBuffer.length)return r.set(this.filledBuffer.subarray(0,r.length)),this.filledBuffer=this.filledBuffer.subarray(r.length),t;r.set(this.filledBuffer),r=r.subarray(this.filledBuffer.length),this.fillBuffer()}return t}}const Xr=64,mc=20,Qr=32,Bi=8;function en(e,t){return e<>>32-t}function Tt(e,t,r,n,s){if(e.length<16)return;let i=e[t],o=e[r],a=e[n],l=e[s];i===void 0||o===void 0||a===void 0||l===void 0||(i=i+o|0,l=en(l^i,16),a=a+l|0,o=en(o^a,12),i=i+o|0,l=en(l^i,8),a=a+l|0,o=en(o^a,7),e[t]=i,e[r]=o,e[n]=a,e[s]=l)}function vc(e,t){if(!(e.length<16||t.length<16)){e.set(t);for(let r=0;r"u")n=crypto.getRandomValues(new Uint8Array(r));else if(n=t,n.byteLength>r&&(n=t.subarray(0,r)),n.byteLength0;){const o=i.subarray(0,n.byteLength),a=new Uint32Array(o.buffer);n.set(this.keynonce),s[6]=BigInt.asUintN(64,r),vc(a,n),i=i.subarray(o.length),r=BigInt.asUintN(64,r+1n)}return this.counter=r,t}generateBigUintByBytes(t){let r=new Uint8Array(Math.ceil(t/8)*8);return r.length<1||!Number.isSafeInteger(t)?0n:(r=this.generateBytes(r.subarray(0,t)),Ns(r.buffer)??0n)}generateBigUintByBits(t){if(t<1||!Number.isSafeInteger(t))return 0n;const r=Math.ceil(t/8),n=BigInt(r*8-t);return this.generateBigUintByBytes(r)>>n}generateBytes(t){if(t.length<1)return t;t.fill(0);let r=t;if(r.length<=this.filledBuffer.length)return r.set(this.filledBuffer.subarray(0,r.length)),this.filledBuffer=this.filledBuffer.subarray(r.length),t;for(;r.length>0;){if(this.filledBuffer.length===0){if(r.length>=Xr){const n=r.subarray(0,r.length-r.length%Xr);this.fillBufferDirect(n),r=r.subarray(n.length);continue}this.fillBuffer()}if(r.length<=this.filledBuffer.length)return r.set(this.filledBuffer.subarray(0,r.length)),this.filledBuffer=this.filledBuffer.subarray(r.length),t;r.set(this.filledBuffer),r=r.subarray(this.filledBuffer.length),this.fillBuffer()}return t}}function wc(e){if(!e||e.type!=="num"&&e.type!=="str")return z;const t=so(e.value.toString());return _(([r,n])=>r&&r.type==="num"&&n&&n.type==="num"?F(Math.floor(t()*(Math.floor(n.value)-Math.ceil(r.value)+1)+Math.ceil(r.value))):F(t()))}function bc(e){if(!e||e.type!=="num"&&e.type!=="str")return z;const t=new gc(e.value);return _(([r,n])=>{if(r&&r.type==="num"&&n&&n.type==="num"){const s=t.generateRandomIntegerInRange(r.value,n.value);return typeof s=="number"?F(s):z}return F(t.generateNumber0To1())})}async function xc(e){if(!e||e.type!=="num"&&e.type!=="str"&&e.type!=="null")return z;let t;e.type==="num"?t=new Uint8Array(await crypto.subtle.digest("SHA-384",new Uint8Array(new Float64Array([e.value])))):e.type==="str"&&(t=new Uint8Array(await crypto.subtle.digest("SHA-384",new Uint8Array(ro.encode(e.value)))));const r=new yc(t);return _(([n,s])=>{if(n&&n.type==="num"&&s&&s.type==="num"){const i=r.generateRandomIntegerInRange(n.value,s.value);return typeof i=="number"?F(i):z}return F(r.generateNumber0To1())})}const _c={help:se("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":se(to),"Core:ai":se("kawaii"),"Core:not":_(([e])=>(Be(e),e.value?ke:Fe)),"Core:eq":_(([e,t])=>(Ie(e),Ie(t),xr(e,t)?Fe:ke)),"Core:neq":_(([e,t])=>(Ie(e),Ie(t),xr(e,t)?ke:Fe)),"Core:and":_(([e,t])=>(Be(e),e.value?(Be(t),t.value?Fe:ke):ke)),"Core:or":_(([e,t])=>(Be(e),e.value?Fe:(Be(t),t.value?Fe:ke))),"Core:add":_(([e,t])=>(A(e),A(t),F(e.value+t.value))),"Core:sub":_(([e,t])=>(A(e),A(t),F(e.value-t.value))),"Core:mul":_(([e,t])=>(A(e),A(t),F(e.value*t.value))),"Core:pow":_(([e,t])=>{A(e),A(t);const r=e.value**t.value;return F(r)}),"Core:div":_(([e,t])=>{A(e),A(t);const r=e.value/t.value;return F(r)}),"Core:mod":_(([e,t])=>(A(e),A(t),F(e.value%t.value))),"Core:gt":_(([e,t])=>(A(e),A(t),e.value>t.value?Fe:ke)),"Core:lt":_(([e,t])=>(A(e),A(t),e.value(A(e),A(t),e.value>=t.value?Fe:ke)),"Core:lteq":_(([e,t])=>(A(e),A(t),e.value<=t.value?Fe:ke)),"Core:type":_(([e])=>(Ie(e),se(e.type))),"Core:to_str":_(([e])=>(Ie(e),se(_r(e)))),"Core:range":_(([e,t])=>(A(e),A(t),e.valueF(n+e.value))):e.value>t.value?ge(Array.from({length:e.value-t.value+1},(r,n)=>F(e.value-n))):ge([e]))),"Core:sleep":_(async([e])=>(A(e),await new Promise(t=>setTimeout(t,e.value)),z)),"Core:abort":_(async([e])=>{throw le(e),new Nu(e.value)}),"Util:uuid":_(()=>se(Ku())),"Json:stringify":_(([e])=>(Ie(e),se(JSON.stringify(ds(e))))),"Json:parse":_(([e])=>{le(e);try{return gs(JSON.parse(e.value))}catch{return ln("not_json")}}),"Json:parsable":_(([e])=>{le(e);try{JSON.parse(e.value)}catch{return Xt(!1)}return Xt(!0)}),"Date:now":_(()=>F(Date.now())),"Date:year":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getFullYear()))),"Date:month":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getMonth()+1))),"Date:day":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getDate()))),"Date:hour":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getHours()))),"Date:minute":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getMinutes()))),"Date:second":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getSeconds()))),"Date:millisecond":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getMilliseconds()))),"Date:parse":_(([e])=>{le(e);const t=new Date(e.value).getTime();return t===t?F(t):ln("not_date")}),"Date:to_iso_str":_(([e,t])=>{e&&A(e);const r=new Date(e?.value??Date.now());t&&A(t);const n=t?.value??-r.getTimezoneOffset();let s;if(n===0)s="Z";else{const v=Math.sign(n),x=Math.floor(Math.abs(n)/60),k=Math.abs(n)%60;r.setUTCHours(r.getUTCHours()+v*x),r.setUTCMinutes(r.getUTCMinutes()+v*k);const T=n>0?"+":"-",j=x.toString().padStart(2,"0"),H=k.toString().padStart(2,"0");s=`${T}${j}:${H}`}const i=r.getUTCFullYear().toString().padStart(4,"0"),o=(r.getUTCMonth()+1).toString().padStart(2,"0"),a=r.getUTCDate().toString().padStart(2,"0"),l=r.getUTCHours().toString().padStart(2,"0"),c=r.getUTCMinutes().toString().padStart(2,"0"),f=r.getUTCSeconds().toString().padStart(2,"0"),h=r.getUTCMilliseconds().toString().padStart(3,"0");return se(`${i}-${o}-${a}T${l}:${c}:${f}.${h}${s}`)}),"Math:Infinity":F(1/0),"Math:E":F(Math.E),"Math:LN2":F(Math.LN2),"Math:LN10":F(Math.LN10),"Math:LOG2E":F(Math.LOG2E),"Math:LOG10E":F(Math.LOG10E),"Math:PI":F(Math.PI),"Math:SQRT1_2":F(Math.SQRT1_2),"Math:SQRT2":F(Math.SQRT2),"Math:abs":_(([e])=>(A(e),F(Math.abs(e.value)))),"Math:acos":_(([e])=>(A(e),F(Math.acos(e.value)))),"Math:acosh":_(([e])=>(A(e),F(Math.acosh(e.value)))),"Math:asin":_(([e])=>(A(e),F(Math.asin(e.value)))),"Math:asinh":_(([e])=>(A(e),F(Math.asinh(e.value)))),"Math:atan":_(([e])=>(A(e),F(Math.atan(e.value)))),"Math:atanh":_(([e])=>(A(e),F(Math.atanh(e.value)))),"Math:atan2":_(([e,t])=>(A(e),A(t),F(Math.atan2(e.value,t.value)))),"Math:cbrt":_(([e])=>(A(e),F(Math.cbrt(e.value)))),"Math:ceil":_(([e])=>(A(e),F(Math.ceil(e.value)))),"Math:clz32":_(([e])=>(A(e),F(Math.clz32(e.value)))),"Math:cos":_(([e])=>(A(e),F(Math.cos(e.value)))),"Math:cosh":_(([e])=>(A(e),F(Math.cosh(e.value)))),"Math:exp":_(([e])=>(A(e),F(Math.exp(e.value)))),"Math:expm1":_(([e])=>(A(e),F(Math.expm1(e.value)))),"Math:floor":_(([e])=>(A(e),F(Math.floor(e.value)))),"Math:fround":_(([e])=>(A(e),F(Math.fround(e.value)))),"Math:hypot":_(([e])=>{wt(e);const t=[];for(const r of e.value)A(r),t.push(r.value);return F(Math.hypot(...t))}),"Math:imul":_(([e,t])=>(A(e),A(t),F(Math.imul(e.value,t.value)))),"Math:log":_(([e])=>(A(e),F(Math.log(e.value)))),"Math:log1p":_(([e])=>(A(e),F(Math.log1p(e.value)))),"Math:log10":_(([e])=>(A(e),F(Math.log10(e.value)))),"Math:log2":_(([e])=>(A(e),F(Math.log2(e.value)))),"Math:max":_(([e,t])=>(A(e),A(t),F(Math.max(e.value,t.value)))),"Math:min":_(([e,t])=>(A(e),A(t),F(Math.min(e.value,t.value)))),"Math:pow":_(([e,t])=>(A(e),A(t),F(Math.pow(e.value,t.value)))),"Math:round":_(([e])=>(A(e),F(Math.round(e.value)))),"Math:sign":_(([e])=>(A(e),F(Math.sign(e.value)))),"Math:sin":_(([e])=>(A(e),F(Math.sin(e.value)))),"Math:sinh":_(([e])=>(A(e),F(Math.sinh(e.value)))),"Math:sqrt":_(([e])=>{A(e);const t=Math.sqrt(e.value);return F(t)}),"Math:tan":_(([e])=>(A(e),F(Math.tan(e.value)))),"Math:tanh":_(([e])=>(A(e),F(Math.tanh(e.value)))),"Math:trunc":_(([e])=>(A(e),F(Math.trunc(e.value)))),"Math:rnd":_(([e,t])=>{if(e&&e.type==="num"&&t&&t.type==="num"){const r=jr.instance.generateRandomIntegerInRange(e.value,t.value);return r===null?z:F(r)}return F(jr.instance.generateNumber0To1())}),"Math:gen_rng":_(async([e,t])=>{Ie(e);let r="chacha20";if(t?.type==="obj"){const n=t.value.get("algorithm");if(n?.type!=="str")throw new re("`options.algorithm` must be string.");r=n.value}else if(t?.type!==void 0)throw new re("`options` must be an object if specified.");if(e.type!=="num"&&e.type!=="str"&&e.type!=="null")throw new re("`seed` must be either number or string if specified.");switch(r){case"rc4_legacy":return wc(e);case"rc4":return bc(e);case"chacha20":return await xc(e);default:throw new re("`options.algorithm` must be one of these: `chacha20`, `rc4`, or `rc4_legacy`.")}}),"Num:from_hex":_(([e])=>(le(e),F(parseInt(e.value,16)))),"Str:lf":se(` -`),"Str:lt":_(([e,t])=>(le(e),le(t),e.value(le(e),le(t),e.value>t.value?F(-1):e.value===t.value?F(0):F(1))),"Str:from_codepoint":_(([e])=>(A(e),se(String.fromCodePoint(e.value)))),"Str:from_unicode_codepoints":_(([e])=>(wt(e),se(Array.from(e.value.map(t=>(A(t),String.fromCodePoint(t.value)))).join("")))),"Str:from_utf8_bytes":_(([e])=>(wt(e),se(zu.decode(Uint8Array.from(e.value.map(t=>(A(t),t.value))))))),"Uri:encode_full":_(([e])=>(le(e),se(encodeURI(e.value)))),"Uri:encode_component":_(([e])=>(le(e),se(encodeURIComponent(e.value)))),"Uri:decode_full":_(([e])=>(le(e),se(decodeURI(e.value)))),"Uri:decode_component":_(([e])=>(le(e),se(decodeURIComponent(e.value)))),"Arr:create":_(([e,t])=>{A(e);try{return ge(Array(e.value).fill(t??z))}catch(r){throw e.value<0?new re("Arr:create expected non-negative number, got negative"):Number.isInteger(e.value)?r:new re("Arr:create expected integer, got non-integer")}}),"Obj:keys":_(([e])=>(et(e),ge(Array.from(e.value.keys()).map(t=>se(t))))),"Obj:vals":_(([e])=>(et(e),ge(Array.from(e.value.values())))),"Obj:kvs":_(([e])=>(et(e),ge(Array.from(e.value.entries()).map(([t,r])=>ge([se(t),r]))))),"Obj:get":_(([e,t])=>(et(e),le(t),e.value.get(t.value)??z)),"Obj:set":_(([e,t,r])=>(et(e),le(t),Ie(r),e.value.set(t.value,r),z)),"Obj:has":_(([e,t])=>(et(e),le(t),Xt(e.value.has(t.value)))),"Obj:copy":_(([e])=>(et(e),br(new Map(e.value)))),"Obj:merge":_(([e,t])=>(et(e),et(t),br(new Map([...e.value,...t.value])))),"Obj:pick":_(([e,t])=>(et(e),wt(t),br(new Map(t.value.map(r=>(le(r),[r.value,e.value.get(r.value)??z])))))),"Error:create":_(([e,t])=>(le(e),ln(e.value,t))),"Async:interval":_(async([e,t,r],n)=>{A(e),at(t),r&&(Be(r),r.value&&n.call(t,[]));let s;const i=()=>{s=setInterval(()=>{n.topCall(t,[])},e.value),n.registerAbortHandler(o),n.registerPauseHandler(o),n.unregisterUnpauseHandler(i)},o=()=>{clearInterval(s),n.unregisterAbortHandler(o),n.unregisterPauseHandler(o),n.registerUnpauseHandler(i)};return i(),_(([],a)=>{o(),a.unregisterUnpauseHandler(i)})}),"Async:timeout":_(async([e,t],r)=>{A(e),at(t);let n;const s=()=>{n=setTimeout(()=>{r.topCall(t,[]),r.unregisterAbortHandler(i),r.unregisterPauseHandler(i)},e.value),r.registerAbortHandler(i),r.registerPauseHandler(i),r.unregisterUnpauseHandler(s)},i=()=>{clearTimeout(n),r.unregisterAbortHandler(i),r.unregisterPauseHandler(i),r.registerUnpauseHandler(s)};return s(),_(([],o)=>{i(),o.unregisterUnpauseHandler(s)})})},Ec=e=>({type:"return",value:e}),Cc=(e,t)=>({type:"break",label:e,value:t}),Pc=e=>({type:"continue",label:e,value:null});function lr(e,t){return e.type==="break"&&e.label!=null&&e.label===t?e.value??z:e}function Ac(e){switch(e.type){case"return":return e.value;default:return un(e),e}}function un(e){switch(e.type){case"return":throw new re("Invalid return");case"break":throw new re("Invalid break");case"continue":throw new re("Invalid continue")}}function te(e){switch(e.type){case"null":case"bool":case"num":case"str":case"arr":case"obj":case"fn":case"error":case"reference":return!1;case"return":case"break":case"continue":return!0}throw new TypeError("expected value or control")}var sr={},Sc=()=>{const e="\\ud800-\\udfff",o="\\u0300-\\u036f"+"\\ufe20-\\ufe2f"+"\\u20d0-\\u20ff"+"\\u1ab0-\\u1aff"+"\\u1dc0-\\u1dff",a="\\ufe0e\\ufe0f",l="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",c=`[${e}]`,f=`[${o}]`,h="\\ud83c[\\udffb-\\udfff]",v=`(?:${f}|${h})`,x=`[^${e}]`,k="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",T="[\\ud800-\\udbff][\\udc00-\\udfff]",j="\\u200d",H="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",m=`[${l}]`,p=`${v}?`,d=`[${a}]?`,y=`(?:${j}(?:${[x,k,T].join("|")})${d+p})*`,b=d+p+y,M=`(?:${[`${x}${f}?`,f,k,T,c,m].join("|")})`;return new RegExp(`${H}|${h}(?=${h})|${M+b}`,"g")},Fc=nt&&nt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sr,"__esModule",{value:!0});var On=Fc(Sc);function ms(e){if(typeof e!="string")throw new Error("A string is expected as input");return e.match(On.default())||[]}var Gn=sr.toArray=ms;function Ks(e){if(typeof e!="string")throw new Error("Input must be a string");var t=e.match(On.default());return t===null?0:t.length}var kc=sr.length=Ks;function io(e,t,r){if(t===void 0&&(t=0),typeof e!="string")throw new Error("Input must be a string");(typeof t!="number"||t<0)&&(t=0),typeof r=="number"&&r<0&&(r=0);var n=e.match(On.default());return n?n.slice(t,r).join(""):""}var Mc=sr.substring=io;function Oc(e,t,r){if(t===void 0&&(t=0),typeof e!="string")throw new Error("Input must be a string");var n=Ks(e);if(typeof t!="number"&&(t=parseInt(t,10)),t>=n)return"";t<0&&(t+=n);var s;typeof r>"u"?s=n:(typeof r!="number"&&(r=parseInt(r,10)),s=r>=0?r+t:t);var i=e.match(On.default());return i?i.slice(t,s).join(""):""}sr.substr=Oc;function $c(e,t,r,n){if(t===void 0&&(t=16),r===void 0&&(r="#"),n===void 0&&(n="right"),typeof e!="string"||typeof t!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(n)===-1)throw new Error("Pad position should be either left or right");typeof r!="string"&&(r=String(r));var s=Ks(e);if(s>t)return io(e,0,t);if(s=n.length)return t===""?n.length:-1;if(t==="")return r;var s=ms(t),i=!1,o;for(o=r;o_(async(t,r)=>se(e.value.toString())),to_hex:e=>_(async(t,r)=>se(e.value.toString(16)))},str:{to_num:e=>_(async(t,r)=>{const n=parseInt(e.value,10);return isNaN(n)?z:F(n)}),to_arr:e=>_(async(t,r)=>ge(Gn(e.value).map(n=>se(n)))),to_unicode_arr:e=>_(async(t,r)=>ge([...e.value].map(n=>se(n)))),to_unicode_codepoint_arr:e=>_(async(t,r)=>ge([...e.value].map(n=>{const s=n.codePointAt(0);return F(s??n.charCodeAt(0))}))),to_char_arr:e=>_(async(t,r)=>ge(e.value.split("").map(n=>se(n)))),to_charcode_arr:e=>_(async(t,r)=>ge(e.value.split("").map(n=>F(n.charCodeAt(0))))),to_utf8_byte_arr:e=>_(async(t,r)=>ge(Array.from(ro.encode(e.value)).map(n=>F(n)))),len:e=>F(kc(e.value)),replace:e=>_(async([t,r],n)=>(le(t),le(r),se(e.value.split(t.value).join(r.value)))),index_of:e=>_(async([t,r],n)=>{le(t),r&&A(r);const s=r?r.value<0?e.value.length+r.value:r.value:void 0;return F(Tc(e.value,t.value,s))}),incl:e=>_(async([t],r)=>(le(t),e.value.includes(t.value)?Fe:ke)),trim:e=>_(async(t,r)=>se(e.value.trim())),upper:e=>_(async(t,r)=>se(e.value.toUpperCase())),lower:e=>_(async(t,r)=>se(e.value.toLowerCase())),split:e=>_(async([t],r)=>(t&&le(t),ge(t?e.value.split(t?t.value:"").map(n=>se(n)):Gn(e.value).map(n=>se(n))))),slice:e=>_(async([t,r],n)=>(A(t),A(r),se(Mc(e.value,t.value,r.value)))),pick:e=>_(async([t],r)=>{A(t);const s=Gn(e.value)[t.value];return s?se(s):z}),charcode_at:e=>_(([t],r)=>{A(t);const n=e.value.charCodeAt(t.value);return Number.isNaN(n)?z:F(n)}),codepoint_at:e=>_(([t],r)=>{A(t);const n=e.value.codePointAt(t.value)??e.value.charCodeAt(t.value);return Number.isNaN(n)?z:F(n)}),starts_with:e=>_(async([t,r],n)=>{if(le(t),!t.value)return Fe;r&&A(r);const s=r?.value??0;if(s<-e.value.length||s>e.value.length)return ke;const i=s>=0?s:e.value.length+s;return e.value.startsWith(t.value,i)?Fe:ke}),ends_with:e=>_(async([t,r],n)=>{if(le(t),!t.value)return Fe;r&&A(r);const s=r?.value??e.value.length;if(s<-e.value.length||s>e.value.length)return ke;const i=s>=0?s:e.value.length+s;return e.value.endsWith(t.value,i)?Fe:ke}),pad_start:e=>_(([t,r],n)=>{A(t);const s=r?(le(r),r.value):" ";return se(e.value.padStart(t.value,s))}),pad_end:e=>_(([t,r],n)=>{A(t);const s=r?(le(r),r.value):" ";return se(e.value.padEnd(t.value,s))})},arr:{len:e=>F(e.value.length),push:e=>_(async([t],r)=>(Ie(t),e.value.push(t),e)),unshift:e=>_(async([t],r)=>(Ie(t),e.value.unshift(t),e)),pop:e=>_(async(t,r)=>e.value.pop()??z),shift:e=>_(async(t,r)=>e.value.shift()??z),concat:e=>_(async([t],r)=>(wt(t),ge(e.value.concat(t.value)))),slice:e=>_(async([t,r],n)=>(A(t),A(r),ge(e.value.slice(t.value,r.value)))),join:e=>_(async([t],r)=>(t&&le(t),se(e.value.map(n=>n.type==="str"?n.value:"").join(t?t.value:"")))),map:e=>_(async([t],r)=>{at(t);const n=e.value.map(async(s,i)=>await r.call(t,[s,F(i)]));return ge(await Promise.all(n))}),filter:e=>_(async([t],r)=>{at(t);const n=[];for(let s=0;s_(async([t,r],n)=>{at(t);const s=r!=null;if(!s&&e.value.length===0)throw new re("Reduce of empty array without initial value");let i=s?r:e.value[0];for(let o=s?0:1;o_(async([t],r)=>{at(t);for(let n=0;n_(async([t],r)=>(Ie(t),e.value.some(n=>xr(t,n))?Fe:ke)),index_of:e=>_(async([t,r],n)=>{if(Ie(t),r){A(r);const s=e.value.slice(0,r.value).length,i=e.value.slice(r.value).findIndex(o=>xr(o,t));return F(i<0?i:i+s)}else return F(e.value.findIndex(s=>xr(s,t)))}),reverse:e=>_(async(t,r)=>(e.value.reverse(),z)),copy:e=>_(async(t,r)=>ge([...e.value])),sort:e=>_(async([t],r)=>{const n=async(i,o)=>{if(i.length<=1)return i;const a=Math.floor(i.length/2),l=n(i.slice(0,a),o),c=n(i.slice(a),o),[f,h]=await Promise.all([l,c]);return s(f,h,o)},s=async(i,o,a)=>{const l=[];let c=0,f=0;for(;c_(async([t,r,n],s)=>{const i=t??z,o=r&&(A(r),r.value),a=n&&(A(n),n.value);return e.value.fill(i,o,a),e}),repeat:e=>_(async([t],r)=>{A(t);try{return ge(Array(t.value).fill(e.value).flat())}catch(n){throw t.value<0?new re("arr.repeat expected non-negative number, got negative"):Number.isInteger(t.value)?n:new re("arr.repeat expected integer, got non-integer")}}),splice:e=>_(async([t,r,n],s)=>{A(t);const i=t.value<-e.value.length?0:t.value<0?e.value.length+t.value:t.value>=e.value.length?e.value.length:t.value,o=r!=null?(A(r),r.value):e.value.length-i,a=n!=null?(wt(n),n.value):[],l=e.value.splice(i,o,...a);return ge(l)}),flat:e=>_(async([t],r)=>{if(t=t??F(1),A(t),!Number.isInteger(t.value))throw new re("arr.flat expected integer, got non-integer");if(t.value<0)throw new re("arr.flat expected non-negative number, got negative");const n=(i,o,a)=>{if(o===0){a.push(...i);return}for(const l of i)wn(l)?n(l.value,o-1,a):a.push(l)},s=[];return n(e.value,t.value,s),ge(s)}),flat_map:e=>_(async([t],r)=>{at(t);const n=e.value.map(async(i,o)=>{const a=await r.call(t,[i,F(o)]);return wn(a)?a.value:a}),s=await Promise.all(n);return ge(s.flat())}),every:e=>_(async([t],r)=>{at(t);for(let n=0;n_(async([t],r)=>{at(t);for(let n=0;n_(async([t,r],n)=>(A(t),Ie(r),e.value.splice(t.value,0,r),z)),remove:e=>_(async([t],r)=>(A(t),e.value.splice(t.value,1)[0]??z)),at:e=>_(async([t,r],n)=>(A(t),e.value.at(t.value)??r??z))},error:{name:e=>se(e.value),info:e=>e.info??z}};function Ic(e,t){if(Object.hasOwn(Ti,e.type)){const r=Ti[e.type];if(Object.hasOwn(r,t))return r[t](e);throw new re(`No such prop (${t}) in ${e.type}.`)}else throw new re(`Cannot read prop of ${e.type}. (reading ${t})`)}const Rc={mut(e){return{isMutable:!0,value:e}},const(e){return{isMutable:!1,value:e}}},ur={variable(e,t){return new Nc(e,t)},index(e,t){return new Dc(e.value,t)},prop(e,t){return new Lc(e.value,t)},arr(e){return new Uc(e)},obj(e){return new Hc(e)}};class Nc{name;scope;constructor(t,r){this.name=t,this.scope=r,this.type="reference"}type;get(){return this.scope.get(this.name)}set(t){this.scope.assign(this.name,t)}}class Dc{target;index;constructor(t,r){this.target=t,this.index=r,this.type="reference"}type;get(){return this.assertIndexInRange(),this.target[this.index]}set(t){this.assertIndexInRange(),this.target[this.index]=t}assertIndexInRange(){const t=this.index;if(t<0||this.target.length<=t)throw new eo(`Index out of range. index: ${this.index} max: ${this.target.length-1}`)}}class Lc{target;index;constructor(t,r){this.target=t,this.index=r,this.type="reference"}type;get(){return this.target.get(this.index)??z}set(t){this.target.set(this.index,t)}}class Uc{items;constructor(t){this.items=t,this.type="reference"}type;get(){return ge(this.items.map(t=>t.get()))}set(t){wt(t);for(const[r,n]of this.items.entries())n.set(t.value[r]??z)}}class Hc{entries;constructor(t){this.entries=t,this.type="reference"}type;get(){return br(new Map([...this.entries].map(([t,r])=>[t,r.get()])))}set(t){et(t);for(const[r,n]of this.entries.entries())n.set(t.value.get(r)??z)}}var Ee=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};class xe{opts;stepCount=0;stop=!1;pausing=null;scope;abortHandlers=[];pauseHandlers=[];unpauseHandlers=[];vars={};irqRate;irqSleep;constructor(t,r={}){this.opts=r;const n={print:_(([i])=>{Ie(i),this.opts.out&&this.opts.out(i)}),readline:_(async i=>{const o=i[0];if(le(o),this.opts.in==null)return z;const a=await this.opts.in(o.value);return se(a)})};if(this.vars=Object.fromEntries(Object.entries({...t,..._c,...n}).map(([i,o])=>[i,Rc.const(o)])),this.scope=new ze([new Map(Object.entries(this.vars))]),this.scope.opts.log=(i,o)=>{switch(i){case"add":this.log("var:add",o);break;case"read":this.log("var:read",o);break;case"write":this.log("var:write",o);break}},!((this.opts.irqRate??300)>=0))throw new ki(`Invalid IRQ rate (${this.opts.irqRate}): must be non-negative number`);this.irqRate=this.opts.irqRate??300;const s=i=>()=>new Promise(o=>setTimeout(o,i));if(typeof this.opts.irqSleep=="function")this.irqSleep=this.opts.irqSleep;else if(this.opts.irqSleep===void 0)this.irqSleep=s(5);else if(this.opts.irqSleep>=0)this.irqSleep=s(this.opts.irqSleep);else throw new ki("irqSleep must be a function or a positive number.")}async exec(t){if(!(t==null||t.length===0))try{await this.collectNs(t);const r=await this._run(t,this.scope,[]);un(r),this.log("end",{val:r})}catch(r){this.handleError(r)}}async execFn(t,r){return await this._fn(t,r,[]).catch(n=>(this.handleError(n),ln("func_failed")))}execFnSimple(t,r){return this._fn(t,r,[])}static collectMetadata(t){if(t==null||t.length===0)return;function r(s){switch(s.type){case"arr":return s.value.map(i=>r(i));case"bool":return s.value;case"null":return null;case"num":return s.value;case"obj":{const i={};for(const[o,a]of s.value.entries())i[o]=r(a);return i}case"str":return s.value;default:return}}const n=new Map;for(const s of t)switch(s.type){case"meta":{n.set(s.name,r(s.value));break}}return n}handleError(t){if(!this.opts.err)throw t;if(this.opts.abortOnError){if(this.stop)return;this.abort()}t instanceof Ot?this.opts.err(t):this.opts.err(new Fi(t))}log(t,r){this.opts.log&&this.opts.log(t,r)}async collectNs(t,r=this.scope){for(const n of t)switch(n.type){case"ns":{await this.collectNsMember(n,r);break}}}async collectNsMember(t,r=this.scope){const n=r.createChildNamespaceScope(t.name);await this.collectNs(t.members,n);for(const s of t.members)switch(s.type){case"def":{if(s.dest.type!=="identifier")throw new Vn("Destructuring assignment is invalid in namespace declarations.",s.loc.start);if(s.mut)throw new Vn('No "var" in namespace declaration: '+s.dest.name,s.loc.start);const i=await this._eval(s.expr,n,[]);un(i),s.expr.type==="fn"&&Oi(i)&&!i.native&&(i.name=n.getNsPrefix()+s.dest.name),await this.define(n,s.dest,i,s.mut);break}case"ns":break;default:{const o=s;throw new Vn("invalid ns member type: "+o.type,o.loc.start)}}}async _fn(t,r,n,s){if(t.native){const i={name:"",pos:s};return t.native(r,{call:(a,l)=>this._fn(a,l,[...n,i]),topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,registerPauseHandler:this.registerPauseHandler,registerUnpauseHandler:this.registerUnpauseHandler,unregisterAbortHandler:this.unregisterAbortHandler,unregisterPauseHandler:this.unregisterPauseHandler,unregisterUnpauseHandler:this.unregisterUnpauseHandler})??z}else{const i=t.scope.createChildScope();for(const[a,l]of t.params.entries()){const c=r[a];l.default||Ie(c),this.define(i,l.dest,c??l.default,!0)}const o={name:t.name??"",pos:s};return Ac(await this._run(t.statements,i,[...n,o]))}}_evalClause(t,r,n){return this._eval(t,Lu(t)?r.createChildScope():r,n)}async _evalBinaryOperation(t,r,n,s,i){const o=s.get(t);at(o);const a=await this._eval(r,s,i);if(te(a))return a;const l=await this._eval(n,s,i);return te(l)?l:this._fn(o,[a,l],i)}_eval(t,r,n){return this.__eval(t,r,n).catch(s=>{if(s.pos)throw s;{const i=s instanceof Ot?s:new Fi(s);throw i.pos=t.loc.start,i.message=[i.message,...[...n,{pos:i.pos}].map(({pos:o},a)=>{const l=n[a-1]?.name??"";return o?` at ${l} (Line ${o.line}, Column ${o.column})`:` at ${l}`}).reverse()].join(` -`),i}})}async __eval(t,r,n){if(this.stop)return z;if(this.pausing&&await this.pausing.promise,this.irqRate!==0&&this.stepCount%this.irqRate>=this.irqRate-1&&await this.irqSleep(),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new re("max step exceeded");switch(t.type){case"call":{const s=await this._eval(t.target,r,n);if(te(s))return s;at(s);const i=[];for(const o of t.args){const a=await this._eval(o,r,n);if(te(a))return a;i.push(a)}return this._fn(s,i,n,t.loc.start)}case"if":{const s=await this._eval(t.cond,r,n);if(te(s))return s;if(Be(s),s.value)return lr(await this._evalClause(t.then,r,n),t.label);for(const i of t.elseif){const o=await this._eval(i.cond,r,n);if(te(o))return o;if(Be(o),o.value)return lr(await this._evalClause(i.then,r,n),t.label)}return t.else?lr(await this._evalClause(t.else,r,n),t.label):z}case"match":{const s=await this._eval(t.about,r,n);if(te(s))return s;for(const i of t.qs){const o=await this._eval(i.q,r,n);if(te(o))return o;if(xr(s,o))return lr(await this._evalClause(i.a,r,n),t.label)}return t.default?lr(await this._evalClause(t.default,r,n),t.label):z}case"loop":{for(;;){const s=await this._run(t.statements,r.createChildScope(),n);if(s.type==="break"){if(s.label!=null&&s.label!==t.label)return s;break}else if(s.type==="continue"){if(s.label!=null&&s.label!==t.label)return s}else if(s.type==="return")return s}return z}case"for":{if(t.times){const s=await this._eval(t.times,r,n);if(te(s))return s;A(s);for(let i=0;i0){const i=[];for(const o of t.attr){const a=await this._eval(o.value,r,n);un(a),i.push({name:o.name,value:a})}s.attr=i}return t.expr.type==="fn"&&t.dest.type==="identifier"&&Oi(s)&&!s.native&&(s.name=t.dest.name),await this.define(r,t.dest,s,t.mut),z}case"identifier":return r.get(t.name);case"assign":{const s=await this.getReference(t.dest,r,n);if(te(s))return s;const i=await this._eval(t.expr,r,n);return te(i)?i:(s.set(i),z)}case"addAssign":{const s=await this.getReference(t.dest,r,n);if(te(s))return s;const i=await this._eval(t.expr,r,n);if(te(i))return i;A(i);const o=s.get();return A(o),s.set(F(o.value+i.value)),z}case"subAssign":{const s=await this.getReference(t.dest,r,n);if(te(s))return s;const i=await this._eval(t.expr,r,n);if(te(i))return i;A(i);const o=s.get();return A(o),s.set(F(o.value-i.value)),z}case"null":return z;case"bool":return Xt(t.value);case"num":return F(t.value);case"str":return se(t.value);case"arr":{const s=[];for(const i of t.value){const o=await this._eval(i,r,n);if(te(o))return o;s.push(o)}return ge(s)}case"obj":{const s=new Map;for(const[i,o]of t.value){const a=await this._eval(o,r,n);if(te(a))return a;s.set(i,a)}return br(s)}case"prop":{const s=await this._eval(t.target,r,n);return te(s)?s:zn(s)?s.value.has(t.name)?s.value.get(t.name):z:Ic(s,t.name)}case"index":{const s=await this._eval(t.target,r,n);if(te(s))return s;const i=await this._eval(t.index,r,n);if(te(i))return i;if(wn(s)){A(i);const o=s.value[i.value];if(o===void 0)throw new eo(`Index out of range. index: ${i.value} max: ${s.value.length-1}`);return o}else{if(zn(s))return le(i),s.value.has(i.value)?s.value.get(i.value):z;throw new re(`Cannot read prop (${_r(i)}) of ${s.type}.`)}}case"plus":{const s=await this._eval(t.expr,r,n);return te(s)||A(s),s}case"minus":{const s=await this._eval(t.expr,r,n);return te(s)?s:(A(s),F(-s.value))}case"not":{const s=await this._eval(t.expr,r,n);return te(s)?s:(Be(s),Xt(!s.value))}case"fn":{const s=await Promise.all(t.params.map(async o=>({dest:o.dest,default:o.default?await this._eval(o.default,r,n):o.optional?z:void 0}))),i=s.map(o=>o.default).filter(o=>o!=null).find(te);return i??Vu(s,t.children,r)}case"block":return lr(await this._run(t.statements,r.createChildScope(),n),t.label);case"exists":return Xt(r.exists(t.identifier.name));case"tmpl":{let s="";for(const i of t.tmpl)if(typeof i=="string")s+=i;else{const o=await this._eval(i,r,n);if(te(o))return o;s+=_r(o)}return se(s)}case"return":{const s=await this._eval(t.expr,r,n);return te(s)?s:(this.log("block:return",{scope:r.name,val:s}),Ec(s))}case"break":{let s;if(t.expr!=null){const i=await this._eval(t.expr,r,n);if(te(i))return i;s=i}return this.log("block:break",{scope:r.name}),Cc(t.label,s)}case"continue":return this.log("block:continue",{scope:r.name}),Pc(t.label);case"ns":return z;case"meta":return z;case"pow":return this._evalBinaryOperation("Core:pow",t.left,t.right,r,n);case"mul":return this._evalBinaryOperation("Core:mul",t.left,t.right,r,n);case"div":return this._evalBinaryOperation("Core:div",t.left,t.right,r,n);case"rem":return this._evalBinaryOperation("Core:mod",t.left,t.right,r,n);case"add":return this._evalBinaryOperation("Core:add",t.left,t.right,r,n);case"sub":return this._evalBinaryOperation("Core:sub",t.left,t.right,r,n);case"lt":return this._evalBinaryOperation("Core:lt",t.left,t.right,r,n);case"lteq":return this._evalBinaryOperation("Core:lteq",t.left,t.right,r,n);case"gt":return this._evalBinaryOperation("Core:gt",t.left,t.right,r,n);case"gteq":return this._evalBinaryOperation("Core:gteq",t.left,t.right,r,n);case"eq":return this._evalBinaryOperation("Core:eq",t.left,t.right,r,n);case"neq":return this._evalBinaryOperation("Core:neq",t.left,t.right,r,n);case"and":{const s=await this._eval(t.left,r,n);if(te(s))return s;if(Be(s),s.value){const i=await this._eval(t.right,r,n);return te(i)||Be(i),i}else return s}case"or":{const s=await this._eval(t.left,r,n);if(te(s)||(Be(s),s.value))return s;{const i=await this._eval(t.right,r,n);return te(i)||Be(i),i}}case"namedTypeSource":case"fnTypeSource":case"unionTypeSource":case"attr":throw new Error("invalid node type");default:throw new Error("invalid node type")}}async _run(t,r,n){this.log("block:enter",{scope:r.name});let s=z;for(let i=0;ir!==t)}unregisterPauseHandler(t){this.pauseHandlers=this.pauseHandlers.filter(r=>r!==t)}unregisterUnpauseHandler(t){this.unpauseHandlers=this.unpauseHandlers.filter(r=>r!==t)}abort(){this.stop=!0;for(const t of this.abortHandlers)t();this.abortHandlers=[]}pause(){if(this.pausing)return;let t;const r=new Promise(n=>{t=()=>n()});this.pausing={promise:r,resolve:t};for(const n of this.pauseHandlers)n();this.pauseHandlers=[]}unpause(){if(this.pausing){this.pausing.resolve(),this.pausing=null;for(const t of this.unpauseHandlers)t();this.unpauseHandlers=[]}}async define(t,r,n,s){switch(r.type){case"identifier":{t.add(r.name,{isMutable:s,value:n});break}case"arr":{wt(n),await Promise.all(r.value.map((i,o)=>this.define(t,i,n.value[o]??z,s)));break}case"obj":{et(n),await Promise.all([...r.value].map(([i,o])=>this.define(t,o,n.value.get(i)??z,s)));break}default:throw new re("The left-hand side of an definition expression must be a variable.")}}async getReference(t,r,n){switch(t.type){case"identifier":return ur.variable(t.name,r);case"index":{const s=await this._eval(t.target,r,n);if(te(s))return s;const i=await this._eval(t.index,r,n);if(te(i))return i;if(wn(s))return A(i),ur.index(s,i.value);if(zn(s))return le(i),ur.prop(s,i.value);throw new re(`Cannot read prop (${_r(i)}) of ${s.type}.`)}case"prop":{const s=await this._eval(t.target,r,n);return te(s)?s:(et(s),ur.prop(s,t.name))}case"arr":{const s=[];for(const i of t.value){const o=await this.getReference(i,r,n);if(te(o))return o;s.push(o)}return ur.arr(s)}case"obj":{const s=new Map;for(const[i,o]of t.value.entries()){const a=await this.getReference(o,r,n);if(te(a))return a;s.set(i,a)}return ur.obj(s)}default:throw new re("The left-hand side of an assignment expression must be a variable or a property/index access.")}}}Ee([ie],xe.prototype,"exec",null);Ee([ie],xe.prototype,"execFn",null);Ee([ie],xe.prototype,"execFnSimple",null);Ee([ie],xe.prototype,"handleError",null);Ee([ie],xe.prototype,"log",null);Ee([ie],xe.prototype,"collectNs",null);Ee([ie],xe.prototype,"collectNsMember",null);Ee([ie],xe.prototype,"_fn",null);Ee([ie],xe.prototype,"_evalClause",null);Ee([ie],xe.prototype,"_evalBinaryOperation",null);Ee([ie],xe.prototype,"_eval",null);Ee([ie],xe.prototype,"__eval",null);Ee([ie],xe.prototype,"_run",null);Ee([ie],xe.prototype,"registerAbortHandler",null);Ee([ie],xe.prototype,"registerPauseHandler",null);Ee([ie],xe.prototype,"registerUnpauseHandler",null);Ee([ie],xe.prototype,"unregisterAbortHandler",null);Ee([ie],xe.prototype,"unregisterPauseHandler",null);Ee([ie],xe.prototype,"unregisterUnpauseHandler",null);Ee([ie],xe.prototype,"abort",null);Ee([ie],xe.prototype,"pause",null);Ee([ie],xe.prototype,"unpause",null);Ee([ie],xe.prototype,"define",null);Ee([ie],xe.prototype,"getReference",null);Ee([ie],xe,"collectMetadata",null);class jc{pages;firstPageIndex;lastPageIndex;pageIndex;address;_char;line;column;constructor(t,r){this.pages=new Map,this.pages.set(0,t),this.firstPageIndex=0,this.lastPageIndex=0,this.pageIndex=0,this.address=0,this.line=r?.line??0,this.column=r?.column??0,this.moveNext()}get eof(){return this.endOfPage&&this.isLastPage}get char(){if(this.eof)throw new Error("end of stream");return this._char}getPos(){return{line:this.line+1,column:this.column+1}}next(){!this.eof&&this._char===` -`?(this.line++,this.column=0):this.column++,this.incAddr(),this.moveNext()}prev(){this.decAddr(),this.movePrev()}get isFirstPage(){return this.pageIndex<=this.firstPageIndex}get isLastPage(){return this.pageIndex>=this.lastPageIndex}get endOfPage(){const t=this.pages.get(this.pageIndex);return this.address>=t.length}moveNext(){for(this.loadChar();;){if(!this.eof&&this._char==="\r"){this.incAddr(),this.loadChar();continue}break}}incAddr(){this.endOfPage?this.isLastPage||(this.pageIndex++,this.address=0):this.address++}movePrev(){for(this.loadChar();;){if(!this.eof&&this._char==="\r"){this.decAddr(),this.loadChar();continue}break}}decAddr(){this.address>0?this.address--:this.isFirstPage||(this.pageIndex--,this.address=this.pages.get(this.pageIndex).length-1)}loadChar(){this.eof?this._char=void 0:this._char=this.pages.get(this.pageIndex)[this.address]}}var u;(function(e){e[e.EOF=0]="EOF",e[e.NewLine=1]="NewLine",e[e.Identifier=2]="Identifier",e[e.NumberLiteral=3]="NumberLiteral",e[e.StringLiteral=4]="StringLiteral",e[e.Template=5]="Template",e[e.TemplateStringElement=6]="TemplateStringElement",e[e.TemplateExprElement=7]="TemplateExprElement",e[e.NullKeyword=8]="NullKeyword",e[e.TrueKeyword=9]="TrueKeyword",e[e.FalseKeyword=10]="FalseKeyword",e[e.EachKeyword=11]="EachKeyword",e[e.ForKeyword=12]="ForKeyword",e[e.LoopKeyword=13]="LoopKeyword",e[e.DoKeyword=14]="DoKeyword",e[e.WhileKeyword=15]="WhileKeyword",e[e.BreakKeyword=16]="BreakKeyword",e[e.ContinueKeyword=17]="ContinueKeyword",e[e.MatchKeyword=18]="MatchKeyword",e[e.CaseKeyword=19]="CaseKeyword",e[e.DefaultKeyword=20]="DefaultKeyword",e[e.IfKeyword=21]="IfKeyword",e[e.ElifKeyword=22]="ElifKeyword",e[e.ElseKeyword=23]="ElseKeyword",e[e.ReturnKeyword=24]="ReturnKeyword",e[e.EvalKeyword=25]="EvalKeyword",e[e.VarKeyword=26]="VarKeyword",e[e.LetKeyword=27]="LetKeyword",e[e.ExistsKeyword=28]="ExistsKeyword",e[e.Not=29]="Not",e[e.NotEq=30]="NotEq",e[e.Sharp=31]="Sharp",e[e.OpenSharpBracket=32]="OpenSharpBracket",e[e.Sharp3=33]="Sharp3",e[e.Percent=34]="Percent",e[e.And2=35]="And2",e[e.OpenParen=36]="OpenParen",e[e.CloseParen=37]="CloseParen",e[e.Asterisk=38]="Asterisk",e[e.Plus=39]="Plus",e[e.PlusEq=40]="PlusEq",e[e.Comma=41]="Comma",e[e.Minus=42]="Minus",e[e.MinusEq=43]="MinusEq",e[e.Dot=44]="Dot",e[e.Slash=45]="Slash",e[e.Colon=46]="Colon",e[e.Colon2=47]="Colon2",e[e.SemiColon=48]="SemiColon",e[e.Lt=49]="Lt",e[e.LtEq=50]="LtEq",e[e.Out=51]="Out",e[e.Eq=52]="Eq",e[e.Eq2=53]="Eq2",e[e.Arrow=54]="Arrow",e[e.Gt=55]="Gt",e[e.GtEq=56]="GtEq",e[e.Question=57]="Question",e[e.At=58]="At",e[e.OpenBracket=59]="OpenBracket",e[e.BackSlash=60]="BackSlash",e[e.CloseBracket=61]="CloseBracket",e[e.Hat=62]="Hat",e[e.OpenBrace=63]="OpenBrace",e[e.Or=64]="Or",e[e.Or2=65]="Or2",e[e.CloseBrace=66]="CloseBrace"})(u||(u={}));class qc{kind;pos;hasLeftSpacing;value;children;constructor(t,r,n=!1,s,i){this.kind=t,this.pos=r,this.hasLeftSpacing=n,this.value=s,this.children=i}}function D(e,t,r){return new qc(e,t,r?.hasLeftSpacing,r?.value,r?.children)}function L(e,t,r,n){const s={type:e};for(const i of Object.keys(t))t[i]!==void 0&&(s[i]=t[i]);return s.loc={start:r,end:n},s}function Kc(e,t,r,n){return L("call",{target:L("identifier",{name:e},r,r),args:t},r,n)}function Ct(e,t,r){return e===u.EOF?new He(t,r):new X(`unexpected token: ${u[e]}`,t,r)}const Yn=[" "," "],Ii=["\r",` -`],Ri=/^[0-9]$/,Vc=/^[A-Za-z0-9_]$/;class Wc{stream;_tokens=[];constructor(t){typeof t=="string"?this.stream=new jc(t):this.stream=t,this._tokens.push(this.readToken())}getToken(){return this._tokens[0]}is(t){return this.getTokenKind()===t}getTokenKind(){return this.getToken().kind}getTokenValue(){return this.getToken().value}getPos(){return this.getToken().pos}next(){this._tokens[0].kind!==u.EOF&&(this._tokens.shift(),this._tokens.length===0&&this._tokens.push(this.readToken()))}lookahead(t){for(;this._tokens.length<=t;)this._tokens.push(this.readToken());return this._tokens[t]}expect(t){if(!this.is(t))throw Ct(this.getTokenKind(),this.getPos())}readToken(){let t=!1;for(;;){if(this.stream.eof)return D(u.EOF,this.stream.getPos(),{hasLeftSpacing:t});if(Yn.includes(this.stream.char)){this.stream.next(),t=!0;continue}const r=this.stream.getPos();if(Ii.includes(this.stream.char))return this.skipEmptyLines(),D(u.NewLine,r,{hasLeftSpacing:t});switch(this.stream.char){case"!":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.NotEq,r,{hasLeftSpacing:t})):D(u.Not,r,{hasLeftSpacing:t});case'"':case"'":return this.readStringLiteral(t);case"#":if(this.stream.next(),!this.stream.eof&&this.stream.char==="#"){if(this.stream.next(),!this.stream.eof&&this.stream.char==="#")return this.stream.next(),D(u.Sharp3,r,{hasLeftSpacing:t});throw new X('invalid sequence of characters: "##"',r)}else return!this.stream.eof&&this.stream.char==="["?(this.stream.next(),D(u.OpenSharpBracket,r,{hasLeftSpacing:t})):D(u.Sharp,r,{hasLeftSpacing:t});case"%":return this.stream.next(),D(u.Percent,r,{hasLeftSpacing:t});case"&":{if(this.stream.next(),!this.stream.eof&&this.stream.char==="&")return this.stream.next(),D(u.And2,r,{hasLeftSpacing:t});throw new X('invalid character: "&"',r)}case"(":return this.stream.next(),D(u.OpenParen,r,{hasLeftSpacing:t});case")":return this.stream.next(),D(u.CloseParen,r,{hasLeftSpacing:t});case"*":return this.stream.next(),D(u.Asterisk,r,{hasLeftSpacing:t});case"+":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.PlusEq,r,{hasLeftSpacing:t})):D(u.Plus,r,{hasLeftSpacing:t});case",":return this.stream.next(),D(u.Comma,r,{hasLeftSpacing:t});case"-":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.MinusEq,r,{hasLeftSpacing:t})):D(u.Minus,r,{hasLeftSpacing:t});case".":return this.stream.next(),D(u.Dot,r,{hasLeftSpacing:t});case"/":if(this.stream.next(),!this.stream.eof&&this.stream.char==="*"){this.stream.next(),this.skipCommentRange();continue}else if(!this.stream.eof&&this.stream.char==="/"){this.stream.next(),this.skipCommentLine();continue}else return D(u.Slash,r,{hasLeftSpacing:t});case":":return this.stream.next(),!this.stream.eof&&this.stream.char===":"?(this.stream.next(),D(u.Colon2,r,{hasLeftSpacing:t})):D(u.Colon,r,{hasLeftSpacing:t});case";":return this.stream.next(),D(u.SemiColon,r,{hasLeftSpacing:t});case"<":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.LtEq,r,{hasLeftSpacing:t})):!this.stream.eof&&this.stream.char===":"?(this.stream.next(),D(u.Out,r,{hasLeftSpacing:t})):D(u.Lt,r,{hasLeftSpacing:t});case"=":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.Eq2,r,{hasLeftSpacing:t})):!this.stream.eof&&this.stream.char===">"?(this.stream.next(),D(u.Arrow,r,{hasLeftSpacing:t})):D(u.Eq,r,{hasLeftSpacing:t});case">":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.GtEq,r,{hasLeftSpacing:t})):D(u.Gt,r,{hasLeftSpacing:t});case"?":return this.stream.next(),D(u.Question,r,{hasLeftSpacing:t});case"@":return this.stream.next(),D(u.At,r,{hasLeftSpacing:t});case"[":return this.stream.next(),D(u.OpenBracket,r,{hasLeftSpacing:t});case"\\":return this.stream.next(),D(u.BackSlash,r,{hasLeftSpacing:t});case"]":return this.stream.next(),D(u.CloseBracket,r,{hasLeftSpacing:t});case"^":return this.stream.next(),D(u.Hat,r,{hasLeftSpacing:t});case"`":return this.readTemplate(t);case"{":return this.stream.next(),D(u.OpenBrace,r,{hasLeftSpacing:t});case"|":return this.stream.next(),!this.stream.eof&&this.stream.char==="|"?(this.stream.next(),D(u.Or2,r,{hasLeftSpacing:t})):D(u.Or,r,{hasLeftSpacing:t});case"}":return this.stream.next(),D(u.CloseBrace,r,{hasLeftSpacing:t});default:{const n=this.tryReadDigits(t);if(n)return n;const s=this.tryReadWord(t);if(s)return s;throw new X(`invalid character: "${this.stream.char}"`,r)}}break}}tryReadWord(t){let r="";const n=this.stream.getPos();for(;!this.stream.eof&&Vc.test(this.stream.char);)r+=this.stream.char,this.stream.next();if(r.length!==0)switch(r){case"null":return D(u.NullKeyword,n,{hasLeftSpacing:t});case"true":return D(u.TrueKeyword,n,{hasLeftSpacing:t});case"false":return D(u.FalseKeyword,n,{hasLeftSpacing:t});case"each":return D(u.EachKeyword,n,{hasLeftSpacing:t});case"for":return D(u.ForKeyword,n,{hasLeftSpacing:t});case"loop":return D(u.LoopKeyword,n,{hasLeftSpacing:t});case"do":return D(u.DoKeyword,n,{hasLeftSpacing:t});case"while":return D(u.WhileKeyword,n,{hasLeftSpacing:t});case"break":return D(u.BreakKeyword,n,{hasLeftSpacing:t});case"continue":return D(u.ContinueKeyword,n,{hasLeftSpacing:t});case"match":return D(u.MatchKeyword,n,{hasLeftSpacing:t});case"case":return D(u.CaseKeyword,n,{hasLeftSpacing:t});case"default":return D(u.DefaultKeyword,n,{hasLeftSpacing:t});case"if":return D(u.IfKeyword,n,{hasLeftSpacing:t});case"elif":return D(u.ElifKeyword,n,{hasLeftSpacing:t});case"else":return D(u.ElseKeyword,n,{hasLeftSpacing:t});case"return":return D(u.ReturnKeyword,n,{hasLeftSpacing:t});case"eval":return D(u.EvalKeyword,n,{hasLeftSpacing:t});case"var":return D(u.VarKeyword,n,{hasLeftSpacing:t});case"let":return D(u.LetKeyword,n,{hasLeftSpacing:t});case"exists":return D(u.ExistsKeyword,n,{hasLeftSpacing:t});default:return D(u.Identifier,n,{hasLeftSpacing:t,value:r})}}tryReadDigits(t){let r="",n="";const s=this.stream.getPos();for(;!this.stream.eof&&Ri.test(this.stream.char);)r+=this.stream.char,this.stream.next();if(r.length===0)return;if(!this.stream.eof&&this.stream.char==="."){for(this.stream.next();!this.stream.eof&&Ri.test(this.stream.char);)n+=this.stream.char,this.stream.next();if(n.length===0)throw new X("digit expected",s)}let i;return n.length>0?i=r+"."+n:i=r,D(u.NumberLiteral,s,{hasLeftSpacing:t,value:i})}readStringLiteral(t){let r="";const n=this.stream.char;let s="string";const i=this.stream.getPos();for(this.stream.next();s!=="finish";)switch(s){case"string":{if(this.stream.eof)throw new He(i);if(this.stream.char==="\\"){this.stream.next(),s="escape";break}if(this.stream.char===n){this.stream.next(),s="finish";break}r+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new He(i);r+=this.stream.char,this.stream.next(),s="string";break}}return D(u.StringLiteral,i,{hasLeftSpacing:t,value:r})}readTemplate(t){const r=[];let n="",s=[],i="string",o=0;const a=this.stream.getPos();let l=a;for(this.stream.next();i!=="finish";)switch(i){case"string":{if(this.stream.eof)throw new He(a);if(this.stream.char==="\\"){this.stream.next(),i="escape";break}if(this.stream.char==="`"){this.stream.next(),n.length>0&&r.push(D(u.TemplateStringElement,l,{hasLeftSpacing:t,value:n})),i="finish";break}if(this.stream.char==="{"){this.stream.next(),n.length>0&&(r.push(D(u.TemplateStringElement,l,{hasLeftSpacing:t,value:n})),n=""),l=this.stream.getPos(),i="expr";break}n+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new He(a);n+=this.stream.char,this.stream.next(),i="string";break}case"expr":{if(this.stream.eof)throw new He(a);if(Yn.includes(this.stream.char)){this.stream.next();continue}if(this.stream.char==="{"&&o++,this.stream.char==="}"){if(o===0){r.push(D(u.TemplateExprElement,l,{hasLeftSpacing:t,children:s})),l=this.stream.getPos(),s.push(D(u.EOF,l)),s=[],i="string",this.stream.next();break}o--}const c=this.readToken();s.push(c);break}}return D(u.Template,a,{hasLeftSpacing:t,children:r})}skipEmptyLines(){for(;!this.stream.eof;){if(Yn.includes(this.stream.char)||Ii.includes(this.stream.char)){this.stream.next();continue}if(this.stream.char==="/")if(this.stream.next(),!this.stream.eof&&this.stream.char==="*"){this.stream.next(),this.skipCommentRange();continue}else if(!this.stream.eof&&this.stream.char==="/"){this.stream.next(),this.skipCommentLine();continue}else{this.stream.prev();break}break}}skipCommentLine(){for(;!(this.stream.eof||this.stream.char===` -`);)this.stream.next()}skipCommentRange(){for(;;){if(this.stream.eof)throw new He(this.stream.getPos());if(this.stream.char==="*"){if(this.stream.next(),this.stream.eof)throw new He(this.stream.getPos());if(this.stream.char==="/"){this.stream.next();break}continue}this.stream.next()}}}class zc{source;index;_token;constructor(t){this.source=t,this.index=0,this.load()}get eof(){return this.index>=this.source.length}getToken(){return this.eof?D(u.EOF,{line:-1,column:-1}):this._token}is(t){return this.getTokenKind()===t}getTokenValue(){return this.getToken().value}getTokenKind(){return this.getToken().kind}getPos(){return this.getToken().pos}next(){this.eof||this.index++,this.load()}lookahead(t){return this.index+t0)switch(e.getTokenKind()){case u.Comma:{e.next();break}case u.EOF:throw new He(e.getPos());default:throw new X("separator expected",e.getPos())}const i=tr(e);n.push(i)}e.expect(u.CloseParen),e.next(),e.expect(u.Arrow),e.next();const s=tr(e);return L("fnTypeSource",{typeParams:r,params:n,result:s},t,e.getPos())}function Jc(e){const t=e.getPos();let r;e.is(u.Identifier)?(r=e.getTokenValue(),e.next()):(e.expect(u.NullKeyword),e.next(),r="null");let n;return e.is(u.Lt)&&(e.next(),n=tr(e),e.expect(u.Gt),e.next()),L("namedTypeSource",{name:r,inner:n},t,e.getPos())}function de(e,t){return t?ao(e,!0):Ws(e,0)}const Jn=[{opKind:"postfix",kind:u.OpenParen,bp:20},{opKind:"postfix",kind:u.OpenBracket,bp:20},{opKind:"infix",kind:u.Dot,lbp:18,rbp:19},{opKind:"infix",kind:u.Hat,lbp:17,rbp:16},{opKind:"prefix",kind:u.Plus,bp:14},{opKind:"prefix",kind:u.Minus,bp:14},{opKind:"prefix",kind:u.Not,bp:14},{opKind:"infix",kind:u.Asterisk,lbp:12,rbp:13},{opKind:"infix",kind:u.Slash,lbp:12,rbp:13},{opKind:"infix",kind:u.Percent,lbp:12,rbp:13},{opKind:"infix",kind:u.Plus,lbp:10,rbp:11},{opKind:"infix",kind:u.Minus,lbp:10,rbp:11},{opKind:"infix",kind:u.Lt,lbp:8,rbp:9},{opKind:"infix",kind:u.LtEq,lbp:8,rbp:9},{opKind:"infix",kind:u.Gt,lbp:8,rbp:9},{opKind:"infix",kind:u.GtEq,lbp:8,rbp:9},{opKind:"infix",kind:u.Eq2,lbp:6,rbp:7},{opKind:"infix",kind:u.NotEq,lbp:6,rbp:7},{opKind:"infix",kind:u.And2,lbp:4,rbp:5},{opKind:"infix",kind:u.Or2,lbp:2,rbp:3}];function Zc(e,t){const r=e.getPos(),n=e.getTokenKind();e.next(),e.is(u.BackSlash)&&(e.next(),e.expect(u.NewLine),e.next());const s=Ws(e,t),i=s.loc.end;switch(n){case u.Plus:return s.type==="num"?L("num",{value:s.value},r,i):L("plus",{expr:s},r,i);case u.Minus:return s.type==="num"?L("num",{value:-1*s.value},r,i):L("minus",{expr:s},r,i);case u.Not:return L("not",{expr:s},r,i);default:throw Ct(n,r)}}function Xc(e,t,r){const n=e.getPos(),s=e.getTokenKind();if(e.next(),e.is(u.BackSlash)&&(e.next(),e.expect(u.NewLine),e.next()),s===u.Dot){e.expect(u.Identifier);const i=e.getTokenValue();return e.next(),L("prop",{target:t,name:i},n,e.getPos())}else{const i=Ws(e,r),o=e.getPos();switch(s){case u.Hat:return L("pow",{left:t,right:i},n,o);case u.Asterisk:return L("mul",{left:t,right:i},n,o);case u.Slash:return L("div",{left:t,right:i},n,o);case u.Percent:return L("rem",{left:t,right:i},n,o);case u.Plus:return L("add",{left:t,right:i},n,o);case u.Minus:return L("sub",{left:t,right:i},n,o);case u.Lt:return L("lt",{left:t,right:i},n,o);case u.LtEq:return L("lteq",{left:t,right:i},n,o);case u.Gt:return L("gt",{left:t,right:i},n,o);case u.GtEq:return L("gteq",{left:t,right:i},n,o);case u.Eq2:return L("eq",{left:t,right:i},n,o);case u.NotEq:return L("neq",{left:t,right:i},n,o);case u.And2:return L("and",{left:t,right:i},n,o);case u.Or2:return L("or",{left:t,right:i},n,o);default:throw Ct(s,n)}}}function Qc(e,t){const r=e.getPos(),n=e.getTokenKind();switch(n){case u.OpenParen:return ef(e,t);case u.OpenBracket:{e.next();const s=de(e,!1);return e.expect(u.CloseBracket),e.next(),L("index",{target:t,index:s},r,e.getPos())}default:throw Ct(n,r)}}function ao(e,t){const r=e.getPos();switch(e.getTokenKind()){case u.IfKeyword:{if(t)break;return rf(e)}case u.At:{if(t)break;return nf(e)}case u.MatchKeyword:{if(t)break;return sf(e)}case u.EvalKeyword:{if(t)break;return af(e)}case u.ExistsKeyword:{if(t)break;return of(e)}case u.Template:{const n=[];if(t)break;for(const[s,i]of e.getToken().children.entries())switch(i.kind){case u.TemplateStringElement:{const o=e.getToken().children[s+1]??e.lookahead(1);n.push(L("str",{value:i.value},i.pos,o.pos));break}case u.TemplateExprElement:{const o=new zc(i.children);o.is(u.NewLine)&&o.next();const a=de(o,!1);o.is(u.NewLine)&&o.next(),o.expect(u.EOF),n.push(a);break}default:throw Ct(i.kind,i.pos)}return e.next(),L("tmpl",{tmpl:n},r,e.getPos())}case u.StringLiteral:{const n=e.getTokenValue();return e.next(),L("str",{value:n},r,e.getPos())}case u.NumberLiteral:{const n=Number(e.getTokenValue());return e.next(),L("num",{value:n},r,e.getPos())}case u.TrueKeyword:case u.FalseKeyword:{const n=e.is(u.TrueKeyword);return e.next(),L("bool",{value:n},r,e.getPos())}case u.NullKeyword:return e.next(),L("null",{},r,e.getPos());case u.OpenBrace:return lf(e,t);case u.OpenBracket:return uf(e,t);case u.Identifier:{if(t)break;return oo(e)}case u.OpenParen:{e.next();const n=de(e,t);return e.expect(u.CloseParen),e.next(),n}case u.Sharp:return tf(e)}throw Ct(e.getTokenKind(),r)}function ef(e,t){const r=e.getPos(),n=[];for(e.expect(u.OpenParen),e.next(),e.is(u.NewLine)&&e.next();!e.is(u.CloseParen);)switch(n.push(de(e,!1)),e.getTokenKind()){case u.NewLine:{e.next();break}case u.Comma:{e.next(),e.is(u.NewLine)&&e.next();break}case u.CloseParen:break;case u.EOF:throw new He(e.getPos());default:throw new X("separator expected",e.getPos())}return e.expect(u.CloseParen),e.next(),L("call",{target:t,args:n},r,e.getPos())}function tf(e){const t=$n(e);e.expect(u.Colon),e.next();const r=de(e,!1);switch(r.type){case"if":case"match":case"block":return r.label=t,r;default:throw new X("cannot use label for expression other than eval / if / match",r.loc.start)}}function rf(e){const t=e.getPos();e.expect(u.IfKeyword),e.next();const r=de(e,!1),n=xt(e);e.is(u.NewLine)&&[u.ElifKeyword,u.ElseKeyword].includes(e.lookahead(1).kind)&&e.next();const s=[];for(;e.is(u.ElifKeyword);){e.next();const o=de(e,!1),a=xt(e);e.is(u.NewLine)&&[u.ElifKeyword,u.ElseKeyword].includes(e.lookahead(1).kind)&&e.next(),s.push({cond:o,then:a})}let i;return e.is(u.ElseKeyword)&&(e.next(),i=xt(e)),L("if",{cond:r,then:n,elseif:s,else:i},t,e.getPos())}function nf(e){const t=e.getPos();e.expect(u.At),e.next();let r;e.is(u.Lt)?r=Vs(e):r=[];const n=lo(e);let s;e.is(u.Colon)&&(e.next(),s=tr(e));const i=Wr(e);return L("fn",{typeParams:r,params:n,retType:s,children:i},t,e.getPos())}function sf(e){const t=e.getPos();e.expect(u.MatchKeyword),e.next();const r=de(e,!1);e.expect(u.OpenBrace),e.next(),e.is(u.NewLine)&&e.next();const n=[];let s;if(e.is(u.CaseKeyword)){n.push(Li(e));let i=kr(e);for(;e.is(u.CaseKeyword);){if(!i)throw new X("separator expected",e.getPos());n.push(Li(e)),i=kr(e)}if(e.is(u.DefaultKeyword)){if(!i)throw new X("separator expected",e.getPos());s=Ui(e),kr(e)}}else e.is(u.DefaultKeyword)&&(s=Ui(e),kr(e));return e.expect(u.CloseBrace),e.next(),L("match",{about:r,qs:n,default:s},t,e.getPos())}function Li(e){e.expect(u.CaseKeyword),e.next();const t=de(e,!1);e.expect(u.Arrow),e.next();const r=xt(e);return{q:t,a:r}}function Ui(e){return e.expect(u.DefaultKeyword),e.next(),e.expect(u.Arrow),e.next(),xt(e)}function af(e){const t=e.getPos();e.expect(u.EvalKeyword),e.next();const r=Wr(e);return L("block",{statements:r},t,e.getPos())}function of(e){const t=e.getPos();e.expect(u.ExistsKeyword),e.next();const r=oo(e);return L("exists",{identifier:r},t,e.getPos())}function oo(e){const t=e.getPos(),r=[];for(;;){if(r.length>0)if(e.is(u.Colon)){if(e.getToken().hasLeftSpacing)throw new X("Cannot use spaces in a reference.",e.getPos());if(e.next(),e.getToken().hasLeftSpacing)throw new X("Cannot use spaces in a reference.",e.getPos())}else break;e.expect(u.Identifier),r.push(e.getTokenValue()),e.next()}return L("identifier",{name:r.join(":")},t,e.getPos())}function lf(e,t){const r=e.getPos();for(e.expect(u.OpenBrace),e.next();e.is(u.NewLine);)e.next();const n=new Map;for(;!e.is(u.CloseBrace);){const s=e.getTokenKind();if(s!==u.Identifier&&s!==u.StringLiteral)throw Ct(s,e.getPos());const i=e.getTokenValue();e.next(),e.expect(u.Colon),e.next();const o=de(e,t);switch(n.set(i,o),e.getTokenKind()){case u.NewLine:case u.Comma:{for(e.next();e.is(u.NewLine);)e.next();break}case u.CloseBrace:break;case u.EOF:throw new He(e.getPos());default:throw new X("separator expected",e.getPos())}}return e.expect(u.CloseBrace),e.next(),L("obj",{value:n},r,e.getPos())}function uf(e,t){const r=e.getPos();for(e.expect(u.OpenBracket),e.next();e.is(u.NewLine);)e.next();const n=[];for(;!e.is(u.CloseBracket);)switch(n.push(de(e,t)),e.getTokenKind()){case u.NewLine:case u.Comma:{for(e.next();e.is(u.NewLine);)e.next();break}case u.CloseBracket:break;case u.EOF:throw new He(e.getPos());default:throw new X("separator expected",e.getPos())}return e.expect(u.CloseBracket),e.next(),L("arr",{value:n},r,e.getPos())}function Ws(e,t){let r;const n=e.getTokenKind(),s=Jn.find(i=>i.opKind==="prefix"&&i.kind===n);for(s!=null?r=Zc(e,s.bp):r=ao(e,!1);;){e.is(u.BackSlash)&&(e.next(),e.expect(u.NewLine),e.next());const i=e.getTokenKind(),o=Jn.find(l=>l.opKind==="postfix"&&l.kind===i);if(o!=null){if(o.bpl.opKind==="infix"&&l.kind===i);if(a!=null){if(a.lbpZ(s,t,r)),n.expr=Z(n.expr,t,r);break}case"return":{n.expr=Z(n.expr,t,r);break}case"each":{n.items=Z(n.items,t,r),n.for=Z(n.for,t,r);break}case"for":{n.from!=null&&(n.from=Z(n.from,t,r)),n.to!=null&&(n.to=Z(n.to,t,r)),n.times!=null&&(n.times=Z(n.times,t,r)),n.for=Z(n.for,t,r);break}case"loop":{for(let s=0;s=0;r--){const n=e[r];switch(n.type){case"loop":case"for":case"each":{if(t!=null&&t!==n.label)continue;return n}case"if":case"match":case"block":{if(t==null||t!==n.label)continue;return n}case"fn":return}}}function Sf(e,t){switch(e.type){case"return":{if(!t.some(({type:r})=>r==="fn"))throw new X("return must be inside function",e.loc.start);break}case"break":{const r=Hi(t,e.label);if(r==null)throw e.label!=null?new X(`label "${e.label}" is not defined`,e.loc.start):new X("unlabeled break must be inside for / each / while / do-while / loop",e.loc.start);switch(r.type){case"each":{if(t.includes(r.items))throw new X("break corresponding to each is not allowed in the target",e.loc.start);break}case"for":{if(r.times!=null&&t.includes(r.times))throw new X("break corresponding to for is not allowed in the count",e.loc.start);if(t.some(n=>n===r.from||n===r.to))throw new X("break corresponding to for is not allowed in the range",e.loc.start);break}case"if":{if(t.includes(r.cond)||r.elseif.some(({cond:n})=>t.includes(n)))throw new X("break corresponding to if is not allowed in the condition",e.loc.start);break}case"match":{if(t.includes(r.about))throw new X("break corresponding to match is not allowed in the target",e.loc.start);if(r.qs.some(({q:n})=>t.includes(n)))throw new X("break corresponding to match is not allowed in the pattern",e.loc.start);break}}if(e.expr!=null)switch(r.type){case"if":case"match":case"block":break;default:throw new X("break corresponding to statement cannot include value",e.loc.start)}break}case"continue":{const r=Hi(t,e.label);if(r==null)throw e.label!=null?new X(`label "${e.label}" is not defined`,e.loc.start):new X("continue must be inside for / each / while / do-while / loop",e.loc.start);switch(r.type){case"each":{if(t.includes(r.items))throw new X("continue corresponding to each is not allowed in the target",e.loc.start);break}case"for":{if(r.times!=null&&t.includes(r.times))throw new X("continue corresponding to for is not allowed in the count",e.loc.start);if(t.some(n=>n===r.from||n===r.to))throw new X("continue corresponding to for is not allowed in the range",e.loc.start);break}case"if":throw new X("cannot use continue for if",e.loc.start);case"match":throw new X("cannot use continue for match",e.loc.start);case"block":throw new X("cannot use continue for eval",e.loc.start)}break}}return e}function Ff(e){for(const t of e)Bn(t,Sf);return e}const it=["as","async","attr","attribute","await","catch","class","component","constructor","dictionary","enum","export","finally","fn","hash","in","interface","out","private","public","ref","static","struct","table","this","throw","trait","try","undefined","use","using","when","yield","import","is","meta","module","namespace","new"];function Ve(e,t){throw new X(`Reserved word "${e}" cannot be used as variable name.`,t.start)}function Zn(e){return Bn(e,t=>{switch(t.type){case"null":{Ve(t.type,t.loc);break}case"bool":{Ve(`${t.value}`,t.loc);break}case"identifier":{it.includes(t.name)&&Ve(t.name,t.loc);break}}return t})}function ji(e){for(const t of e.typeParams)it.includes(t.name)&&Ve(t.name,e.loc)}function kf(e){switch(e.type){case"def":{Zn(e.dest);break}case"ns":case"attr":case"identifier":case"prop":{it.includes(e.name)&&Ve(e.name,e.loc);break}case"meta":{e.name!=null&&it.includes(e.name)&&Ve(e.name,e.loc);break}case"each":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc),Zn(e.var);break}case"for":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc),e.var!=null&&it.includes(e.var)&&Ve(e.var,e.loc);break}case"loop":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc);break}case"break":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc);break}case"continue":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc);break}case"fn":{ji(e);for(const t of e.params)Zn(t.dest);break}case"obj":{for(const t of e.value.keys())it.includes(t)&&Ve(t,e.loc);break}case"namedTypeSource":{it.includes(e.name)&&Ve(e.name,e.loc);break}case"fnTypeSource":{ji(e);break}}return e}function Mf(e){for(const t of e)Bn(t,kf);return e}function qi(e){return{type:"simple",name:e}}function Of(e,t){return{type:"generic",name:e,inners:t}}function $f(e,t){return{type:"fn",params:e,result:t}}function Bf(e){return{type:"param",name:e}}function Tf(e){return{type:"union",inners:e}}function cn(e){switch(e.type){case"namedTypeSource":if(e.inner){const t=cn(e.inner);return`${e.name}<${t}>`}else return e.name;case"fnTypeSource":{const t=e.params.map(n=>cn(n)).join(", "),r=cn(e.result);return`@(${t}) { ${r} }`}case"unionTypeSource":return e.inners.map(t=>Nt(t)).join(" | ")}}function Nt(e,t){if(e.type==="namedTypeSource"){const r=t?.find(n=>n.name===e.name);if(r!=null)return Bf(r.name);switch(e.name){case"null":case"bool":case"num":case"str":case"error":case"never":case"any":case"void":{if(e.inner==null)return qi(e.name);break}case"arr":case"obj":{let n;return e.inner!=null?n=Nt(e.inner,t):n=qi("any"),Of(e.name,[n])}}throw new X(`Unknown type: '${cn(e)}'`,e.loc.start)}else if(e.type==="fnTypeSource"){let r=e.typeParams;t!=null&&(r=r.concat(t));const n=e.params.map(s=>Nt(s,r));return $f(n,Nt(e.result,r))}else{const r=e.inners.map(n=>Nt(n,t));return Tf(r)}}function Xn(e,t){const r=[];if(e.type==="fn"){const n=new Set;for(const s of e.typeParams){if(n.has(s.name))throw new Error(`type parameter name ${s.name} is duplicate`);n.add(s.name)}r.push(...e.typeParams)}for(let n=t.length-1;n>=0;n--){const s=t[n];s.type==="fn"&&r.push(...s.typeParams)}return r}function If(e,t){switch(e.type){case"def":{e.varType!=null&&Nt(e.varType,Xn(e,t));break}case"fn":{for(const r of e.params)r.argType!=null&&Nt(r.argType,Xn(e,t));e.retType!=null&&Nt(e.retType,Xn(e,t));break}}return e}function Rf(e){for(const t of e)Bn(t,If);return e}class pr{static instance;plugins;constructor(){this.plugins={validate:[Mf,Rf,Ff],transform:[]}}static parse(t){return pr.instance==null&&(pr.instance=new pr),pr.instance.parse(t)}addPlugin(t,r){switch(t){case"validate":this.plugins.validate.push(r);break;case"transform":this.plugins.transform.push(r);break;default:throw new Error("unknown plugin type")}}parse(t){let r;const n=new Wc(t);r=Pf(n);for(const s of this.plugins.validate)r=s(r);for(const s of this.plugins.transform)r=s(r);return r}}function Rr(){return Rr=Object.assign||function(e){for(var t=1;t";return t},lineNumbersCount:function(){var t=this.codeData.split(/\r\n|\n/).length;return t}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var t=this.$refs.pre,r=this.$el.querySelector(".prism-editor__line-numbers"),n=window.getComputedStyle(t);this.$nextTick(function(){var s="border-top-left-radius",i="border-bottom-left-radius";if(r){r.style[s]=n[s],r.style[i]=n[i],t.style[s]="0",t.style[i]="0";var o=["background-color","margin-top","padding-top","font-family","font-size","line-height"];o.forEach(function(a){r.style[a]=n[a]}),r.style["margin-bottom"]="-"+n["padding-top"]}})}},_recordCurrentState:function(){var t=this.$refs.textarea;if(t){var r=t.value,n=t.selectionStart,s=t.selectionEnd;this._recordChange({value:r,selectionStart:n,selectionEnd:s})}},_getLines:function(t,r){return t.substring(0,r).split(` +**/let hs;const pi=typeof window<"u"&&window.trustedTypes;if(pi)try{hs=pi.createPolicy("vue",{createHTML:e=>e})}catch{}const Qa=hs?e=>hs.createHTML(e):e=>e,hu="http://www.w3.org/2000/svg",pu="http://www.w3.org/1998/Math/MathML",Ft=typeof document<"u"?document:null,di=Ft&&Ft.createElement("template"),du={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const s=t==="svg"?Ft.createElementNS(hu,e):t==="mathml"?Ft.createElementNS(pu,e):r?Ft.createElement(e,{is:r}):Ft.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Ft.createTextNode(e),createComment:e=>Ft.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ft.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,s,i){const o=r?r.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{di.innerHTML=Qa(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const a=di.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},gu=Symbol("_vtc");function mu(e,t,r){const n=e[gu];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}const gi=Symbol("_vod"),vu=Symbol("_vsh"),yu=Symbol(""),wu=/(^|;)\s*display\s*:/;function bu(e,t,r){const n=e.style,s=Ce(r);let i=!1;if(r&&!s){if(t)if(Ce(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&on(n,a,"")}else for(const o in t)r[o]==null&&on(n,o,"");for(const o in r)o==="display"&&(i=!0),on(n,o,r[o])}else if(s){if(t!==r){const o=n[yu];o&&(r+=";"+o),n.cssText=r,i=wu.test(r)}}else t&&e.removeAttribute("style");gi in e&&(e[gi]=i?n.display:"",e[vu]&&(n.display="none"))}const mi=/\s*!important$/;function on(e,t,r){if(Y(r))r.forEach(n=>on(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=xu(e,t);mi.test(r)?e.setProperty(rr(n),r.replace(mi,""),"important"):e[n]=r}}const vi=["Webkit","Moz","ms"],qn={};function xu(e,t){const r=qn[t];if(r)return r;let n=Lt(t);if(n!=="filter"&&n in e)return qn[t]=n;n=ea(n);for(let s=0;sKn||(Pu.then(()=>Kn=0),Kn=Date.now());function Su(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Et(Fu(n,r.value),t,5,[n])};return r.value=e,r.attached=Au(),r}function Fu(e,t){if(Y(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>s=>!s._stopped&&n&&n(s))}else return t}const Ei=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ku=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?mu(e,n,o):t==="style"?bu(e,r,n):xn(t)?ws(t)||Eu(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Mu(e,t,n,o))?(bi(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&wi(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ce(n))?bi(e,Lt(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),wi(e,t,n,o))};function Mu(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ei(t)&&Q(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Ei(t)&&Ce(r)?!1:t in e}const yn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Y(t)?r=>rn(t,r):t};function Ou(e){e.target.composing=!0}function Ci(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const wr=Symbol("_assign"),Pi={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[wr]=yn(s);const i=n||s.props&&s.props.type==="number";Gt(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;r&&(a=a.trim()),i&&(a=es(a)),e[wr](a)}),r&&Gt(e,"change",()=>{e.value=e.value.trim()}),t||(Gt(e,"compositionstart",Ou),Gt(e,"compositionend",Ci),Gt(e,"change",Ci))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[wr]=yn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?es(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(n&&t===r||s&&e.value.trim()===l)||(e.value=l))}},Ai={created(e,{value:t},r){e.checked=fn(t,r.props.value),e[wr]=yn(r),Gt(e,"change",()=>{e[wr]($u(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[wr]=yn(n),t!==r&&(e.checked=fn(t,n.props.value))}};function $u(e){return"_value"in e?e._value:e.value}const Bu=Me({patchProp:ku},du);let Si;function Tu(){return Si||(Si=Ll(Bu))}const Iu=(...e)=>{const t=Tu().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=Nu(n);if(!s)return;const i=t._component;!Q(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,Ru(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function Ru(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Nu(e){return Ce(e)?document.querySelector(e):e}function ie(e,t,r){let n=r.value;return{configurable:!0,get(){const s=n.bind(this);return Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),s},set(s){n=s}}}class Ot extends Error{name="AiScript";info;pos;constructor(t,r){super(t),this.info=r,Error.captureStackTrace&&Error.captureStackTrace(this,Ot)}}class Fi extends Ot{name="Internal";constructor(t){const r=String(t?.message??t);super(r,t)}}class X extends Ot{pos;name="Syntax";constructor(t,r,n){super(`${t} (Line ${r.line}, Column ${r.column})`,n),this.pos=r}}class He extends X{constructor(t,r){super("unexpected EOF",t,r)}}class Vn extends Ot{pos;name="Namespace";constructor(t,r,n){super(`${t} (Line ${r.line}, Column ${r.column})`,n),this.pos=r}}class re extends Ot{name="Runtime";constructor(t,r){super(t,r)}}class eo extends re{constructor(t,r){super(t,r)}}class Du extends re{name="";constructor(t,r){super(t,r)}}class ki extends Ot{name="Host";constructor(t,r){super(t,r)}}const Lu=["def","return","each","for","loop","break","continue","assign","addAssign","subAssign"];function Uu(e){return Lu.includes(e.type)}var Pt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};class ze{parent;layerdStates;name;opts={};nsName;constructor(t=[],r,n,s){this.layerdStates=t,this.parent=r,this.name=n||(t.length===1?"":""),this.nsName=s}log(t,r){this.parent?this.parent.log(t,r):this.opts.log&&this.opts.log(t,r)}onUpdated(t,r){this.parent?this.parent.onUpdated(t,r):this.opts.onUpdated&&this.opts.onUpdated(t,r)}createChildScope(t=new Map,r){const n=[t,...this.layerdStates];return new ze(n,this,r)}createChildNamespaceScope(t,r=new Map,n){const s=[r,...this.layerdStates];return new ze(s,this,n,t)}get(t){for(const r of this.layerdStates)if(r.has(t)){const n=r.get(t).value;return this.log("read",{var:t,val:n}),n}throw new re(`No such variable '${t}' in scope '${this.name}'`,{scope:this.layerdStates})}getNsPrefix(){return this.parent==null||this.nsName==null?"":this.parent.getNsPrefix()+this.nsName+":"}exists(t){for(const r of this.layerdStates)if(r.has(t))return this.log("exists",{var:t}),!0;return this.log("not exists",{var:t}),!1}getAll(){const t=this.layerdStates.reduce((r,n)=>[...r,...n],[]);return new Map(t)}add(t,r){this.log("add",{var:t,val:r});const n=this.layerdStates[0];if(n.has(t))throw new re(`Variable '${t}' already exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(t,r),this.parent==null?this.onUpdated(t,r.value):this.nsName!=null&&this.parent.add(this.nsName+":"+t,r)}assign(t,r){let n=1;for(const s of this.layerdStates){if(s.has(t)){const i=s.get(t);if(!i.isMutable)throw new re(`Cannot assign to an immutable variable ${t}.`);i.value=r,this.log("assign",{var:t,val:r}),n===this.layerdStates.length&&this.onUpdated(t,r);return}n++}throw new re(`No such variable '${t}' in scope '${this.name}'`,{scope:this.layerdStates})}}Pt([ie],ze.prototype,"log",null);Pt([ie],ze.prototype,"onUpdated",null);Pt([ie],ze.prototype,"createChildScope",null);Pt([ie],ze.prototype,"createChildNamespaceScope",null);Pt([ie],ze.prototype,"get",null);Pt([ie],ze.prototype,"getNsPrefix",null);Pt([ie],ze.prototype,"exists",null);Pt([ie],ze.prototype,"getAll",null);Pt([ie],ze.prototype,"add",null);Pt([ie],ze.prototype,"assign",null);const $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function Hu(e,t=0){return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}let Wn;const ju=new Uint8Array(16);function qu(){if(!Wn){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Wn=crypto.getRandomValues.bind(crypto)}return Wn(ju)}const Ku=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mi={randomUUID:Ku};function Vu(e,t,r){if(Mi.randomUUID&&!t&&!e)return Mi.randomUUID();e=e||{};const n=e.random||(e.rng||qu)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Hu(n)}const z={type:"null"},Fe={type:"bool",value:!0},ke={type:"bool",value:!1},F=e=>({type:"num",value:e}),se=e=>({type:"str",value:e}),Xt=e=>({type:"bool",value:e}),br=e=>({type:"obj",value:e}),ge=e=>({type:"arr",value:e}),Wu=(e,t,r)=>({type:"fn",params:e,statements:t,scope:r}),_=e=>({type:"fn",native:e}),ln=(e,t)=>({type:"error",value:e,info:t});function Ie(e){if(e==null)throw new re("Expect anything, but got nothing.")}function Be(e){if(e==null)throw new re("Expect boolean, but got nothing.");if(e.type!=="bool")throw new re(`Expect boolean, but got ${e.type}.`)}function at(e){if(e==null)throw new re("Expect function, but got nothing.");if(e.type!=="fn")throw new re(`Expect function, but got ${e.type}.`)}function le(e){if(e==null)throw new re("Expect string, but got nothing.");if(e.type!=="str")throw new re(`Expect string, but got ${e.type}.`)}function A(e){if(e==null)throw new re("Expect number, but got nothing.");if(e.type!=="num")throw new re(`Expect number, but got ${e.type}.`)}function et(e){if(e==null)throw new re("Expect object, but got nothing.");if(e.type!=="obj")throw new re(`Expect object, but got ${e.type}.`)}function wt(e){if(e==null)throw new re("Expect array, but got nothing.");if(e.type!=="arr")throw new re(`Expect array, but got ${e.type}.`)}function Oi(e){return e.type==="fn"}function zn(e){return e.type==="obj"}function wn(e){return e.type==="arr"}function xr(e,t){return e.type==="fn"&&t.type==="fn"?e.native&&t.native?e.native===t.native:e===t:e.type==="fn"||t.type==="fn"?!1:e.type==="null"&&t.type==="null"?!0:e.type==="null"||t.type==="null"?!1:e.value===t.value}function ps(e,t=!1){if(t){if(e.type==="num")return e.value.toString();if(e.type==="bool")return e.value?"true":"false";if(e.type==="str")return`"${e.value}"`;if(e.type==="arr")return`[${e.value.map(n=>ps(n,!0)).join(", ")}]`;if(e.type==="null")return"(null)"}const r=e.type==="num"||e.type==="bool"?e.value:e.type==="str"?`"${e.value}"`:e.type==="fn"||e.type==="obj"?"...":e.type==="null"?"":null;return`${e.type}<${r}>`}function ds(e){switch(e.type){case"fn":return"";case"arr":return e.value.map(t=>ds(t));case"bool":return e.value;case"null":return null;case"num":return e.value;case"obj":{const t={};for(const[r,n]of e.value.entries())t[r]=ds(n);return t}case"str":return e.value;default:throw new Error(`Unrecognized value type: ${e.type}`)}}function gs(e){if(e===null)return z;if(typeof e=="boolean")return Xt(e);if(typeof e=="string")return se(e);if(typeof e=="number")return F(e);if(Array.isArray(e))return ge(e.map(t=>gs(t)));if(typeof e=="object"){const t=new Map;for(const[r,n]of Object.entries(e))t.set(r,gs(n));return br(t)}return z}function _r(e,t=!1,r=new Set){if((e.type==="arr"||e.type==="obj")&&r.has(e.value))return"...";if(t&&e.type==="str")return'"'+e.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(e.type==="str")return e.value;if(e.type==="num")return e.value.toString();if(e.type==="arr"){r.add(e.value);const n=[];for(const s of e.value)n.push(_r(s,!0,r));return"[ "+n.join(", ")+" ]"}if(e.type==="obj"){r.add(e.value);const n=[];for(const[s,i]of e.value)n.push(`${s}: ${_r(i,!0,r)}`);return"{ "+n.join(", ")+" }"}return e.type==="bool"?e.value.toString():e.type==="null"?"null":e.type==="fn"?e.native?"@( ?? ) { native code }":`@( ${e.params.map(n=>n.dest.type==="identifier"?n.dest.name:"?").join(", ")} ) { ... }`:"?"}const zu={version:"1.0.0"},to=zu.version,ro=new TextEncoder,Gu=new TextDecoder,Yt=Math.ceil(Math.log2(Number.MAX_SAFE_INTEGER));BigInt(Yt);const Yu=Yt-1;BigInt(Yu);class Rs{generateNumber0To1(){let t=this.generateBigUintByBits(Yt),r=1022,n=Yt-$i(t);for(;n>0&&r>=Yt;)r-=n,t<<=BigInt(n),t|=this.generateBigUintByBits(n),n=Yt-$i(t);if(n>0){const s=Math.min(r-1,n);t<<=BigInt(s),t|=this.generateBigUintByBits(s),r=Math.max(r-s,0)}return Number(t)*.5**Yt*.5**(1022-r)}generateUniform(t){if(t<1)return 0n;const r=t.toString(2).length,n=Math.ceil(r/8),s=BigInt(n*8-r);let i;do i=this.generateBigUintByBytes(n)>>s;while(i>t);return i}generateRandomIntegerInRange(t,r){const n=Math.ceil(t),s=Math.floor(r),i=s-n;if(i===0)return n;const o=Math.abs(i),a=Math.sign(i);if(!Number.isSafeInteger(o)||!Number.isSafeInteger(n)||!Number.isSafeInteger(s))return null;const l=BigInt(o);return Number(this.generateUniform(l))*a+n}}function $i(e){return e===0n?0:e.toString(2).length}function Ju(e){if(e.byteLength===0)return null;if(e.byteLength<8){const t=new Uint8Array(8);return t.set(new Uint8Array(e)),new DataView(t.buffer).getBigUint64(0,!0)}return new DataView(e).getBigUint64(0,!0)}function Ns(e){if(e.byteLength===0)return null;if(e.byteLength<=8)return Ju(e);const t=new DataView(e);let r=0n,n=0n,s=0;for(;s>n}generateBytes(t){return crypto.getRandomValues(t)}}var nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xu(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var Ds={exports:{}};Ds.exports;(function(e){(function(t,r,n){function s(l){var c=this,f=a();c.next=function(){var h=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=h-(c.c=h|0)},c.c=1,c.s0=f(" "),c.s1=f(" "),c.s2=f(" "),c.s0-=f(l),c.s0<0&&(c.s0+=1),c.s1-=f(l),c.s1<0&&(c.s1+=1),c.s2-=f(l),c.s2<0&&(c.s2+=1),f=null}function i(l,c){return c.c=l.c,c.s0=l.s0,c.s1=l.s1,c.s2=l.s2,c}function o(l,c){var f=new s(l),h=c&&c.state,v=f.next;return v.int32=function(){return f.next()*4294967296|0},v.double=function(){return v()+(v()*2097152|0)*11102230246251565e-32},v.quick=v,h&&(typeof h=="object"&&i(h,f),v.state=function(){return i(f,{})}),v}function a(){var l=4022871197,c=function(f){f=String(f);for(var h=0;h>>0,v-=l,v*=l,l=v>>>0,v-=l,l+=v*4294967296}return(l>>>0)*23283064365386963e-26};return c}r&&r.exports?r.exports=o:this.alea=o})(nt,e)})(Ds);var Qu=Ds.exports,Ls={exports:{}};Ls.exports;(function(e){(function(t,r,n){function s(a){var l=this,c="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var h=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^h^h>>>8},a===(a|0)?l.x=a:c+=a;for(var f=0;f>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(typeof f=="object"&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.xor128=o})(nt,e)})(Ls);var ec=Ls.exports,Us={exports:{}};Us.exports;(function(e){(function(t,r,n){function s(a){var l=this,c="";l.next=function(){var h=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(h^h<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,a===(a|0)?l.x=a:c+=a;for(var f=0;f>>4),l.next()}function i(a,l){return l.x=a.x,l.y=a.y,l.z=a.z,l.w=a.w,l.v=a.v,l.d=a.d,l}function o(a,l){var c=new s(a),f=l&&l.state,h=function(){return(c.next()>>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(typeof f=="object"&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.xorwow=o})(nt,e)})(Us);var tc=Us.exports,Hs={exports:{}};Hs.exports;(function(e){(function(t,r,n){function s(a){var l=this;l.next=function(){var f=l.x,h=l.i,v,x;return v=f[h],v^=v>>>7,x=v^v<<24,v=f[h+1&7],x^=v^v>>>10,v=f[h+3&7],x^=v^v>>>3,v=f[h+4&7],x^=v^v<<7,v=f[h+7&7],v=v^v<<13,x^=v^v<<9,f[h]=x,l.i=h+1&7,x};function c(f,h){var v,x=[];if(h===(h|0))x[0]=h;else for(h=""+h,v=0;v0;--v)f.next()}c(l,a)}function i(a,l){return l.x=a.x.slice(),l.i=a.i,l}function o(a,l){a==null&&(a=+new Date);var c=new s(a),f=l&&l.state,h=function(){return(c.next()>>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(f.x&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.xorshift7=o})(nt,e)})(Hs);var rc=Hs.exports,js={exports:{}};js.exports;(function(e){(function(t,r,n){function s(a){var l=this;l.next=function(){var f=l.w,h=l.X,v=l.i,x,k;return l.w=f=f+1640531527|0,k=h[v+34&127],x=h[v=v+1&127],k^=k<<13,x^=x<<17,k^=k>>>15,x^=x>>>12,k=h[v]=k^x,l.i=v,k+(f^f>>>16)|0};function c(f,h){var v,x,k,T,j,H=[],m=128;for(h===(h|0)?(x=h,h=null):(h=h+"\0",x=0,m=Math.max(m,h.length)),k=0,T=-32;T>>15,x^=x<<4,x^=x>>>13,T>=0&&(j=j+1640531527|0,v=H[T&127]^=x+j,k=v==0?k+1:0);for(k>=128&&(H[(h&&h.length||0)&127]=-1),k=127,T=4*128;T>0;--T)x=H[k+34&127],v=H[k=k+1&127],x^=x<<13,v^=v<<17,x^=x>>>15,v^=v>>>12,H[k]=x^v;f.w=j,f.X=H,f.i=k}c(l,a)}function i(a,l){return l.i=a.i,l.w=a.w,l.X=a.X.slice(),l}function o(a,l){a==null&&(a=+new Date);var c=new s(a),f=l&&l.state,h=function(){return(c.next()>>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(f.X&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.xor4096=o})(nt,e)})(js);var nc=js.exports,qs={exports:{}};qs.exports;(function(e){(function(t,r,n){function s(a){var l=this,c="";l.next=function(){var h=l.b,v=l.c,x=l.d,k=l.a;return h=h<<25^h>>>7^v,v=v-x|0,x=x<<24^x>>>8^k,k=k-h|0,l.b=h=h<<20^h>>>12^v,l.c=v=v-x|0,l.d=x<<16^v>>>16^k,l.a=k-h|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,a===Math.floor(a)?(l.a=a/4294967296|0,l.b=a|0):c+=a;for(var f=0;f>>0)/4294967296};return h.double=function(){do var v=c.next()>>>11,x=(c.next()>>>0)/4294967296,k=(v+x)/(1<<21);while(k===0);return k},h.int32=c.next,h.quick=h,f&&(typeof f=="object"&&i(f,c),h.state=function(){return i(c,{})}),h}r&&r.exports?r.exports=o:this.tychei=o})(nt,e)})(qs);var sc=qs.exports,no={exports:{}};const ic={},ac=Object.freeze(Object.defineProperty({__proto__:null,default:ic},Symbol.toStringTag,{value:"Module"})),oc=Xu(ac);(function(e){(function(t,r,n){var s=256,i=6,o=52,a="random",l=n.pow(s,i),c=n.pow(2,o),f=c*2,h=s-1,v;function x(d,y,b){var E=[];y=y==!0?{entropy:!0}:y||{};var M=H(j(y.entropy?[d,p(r)]:d??m(),3),E),P=new k(E),q=function(){for(var K=P.g(i),ne=l,me=0;K=f;)K/=2,ne/=2,me>>>=1;return(K+me)/ne};return q.int32=function(){return P.g(4)|0},q.quick=function(){return P.g(4)/4294967296},q.double=q,H(p(P.S),r),(y.pass||b||function(K,ne,me,Ae){return Ae&&(Ae.S&&T(Ae,P),K.state=function(){return T(P,{})}),me?(n[a]=K,ne):K})(q,M,"global"in y?y.global:this==n,y.state)}function k(d){var y,b=d.length,E=this,M=0,P=E.i=E.j=0,q=E.S=[];for(b||(d=[b++]);M>n}generateBytes(t){if(t.length<1)return t;t.fill(0);let r=t;if(r.length<=this.filledBuffer.length)return r.set(this.filledBuffer.subarray(0,r.length)),this.filledBuffer=this.filledBuffer.subarray(r.length),t;for(;r.length>0;){if(this.filledBuffer.length===0){if(r.length>=Vt){const n=r.subarray(0,r.length-r.length%Vt);this.fillBufferDirect(n),r=r.subarray(n.length);continue}this.fillBuffer()}if(r.length<=this.filledBuffer.length)return r.set(this.filledBuffer.subarray(0,r.length)),this.filledBuffer=this.filledBuffer.subarray(r.length),t;r.set(this.filledBuffer),r=r.subarray(this.filledBuffer.length),this.fillBuffer()}return t}}const Xr=64,vc=20,Qr=32,Bi=8;function en(e,t){return e<>>32-t}function Tt(e,t,r,n,s){if(e.length<16)return;let i=e[t],o=e[r],a=e[n],l=e[s];i===void 0||o===void 0||a===void 0||l===void 0||(i=i+o|0,l=en(l^i,16),a=a+l|0,o=en(o^a,12),i=i+o|0,l=en(l^i,8),a=a+l|0,o=en(o^a,7),e[t]=i,e[r]=o,e[n]=a,e[s]=l)}function yc(e,t){if(!(e.length<16||t.length<16)){e.set(t);for(let r=0;r"u")n=crypto.getRandomValues(new Uint8Array(r));else if(n=t,n.byteLength>r&&(n=t.subarray(0,r)),n.byteLength0;){const o=i.subarray(0,n.byteLength),a=new Uint32Array(o.buffer);n.set(this.keynonce),s[6]=BigInt.asUintN(64,r),yc(a,n),i=i.subarray(o.length),r=BigInt.asUintN(64,r+1n)}return this.counter=r,t}generateBigUintByBytes(t){let r=new Uint8Array(Math.ceil(t/8)*8);return r.length<1||!Number.isSafeInteger(t)?0n:(r=this.generateBytes(r.subarray(0,t)),Ns(r.buffer)??0n)}generateBigUintByBits(t){if(t<1||!Number.isSafeInteger(t))return 0n;const r=Math.ceil(t/8),n=BigInt(r*8-t);return this.generateBigUintByBytes(r)>>n}generateBytes(t){if(t.length<1)return t;t.fill(0);let r=t;if(r.length<=this.filledBuffer.length)return r.set(this.filledBuffer.subarray(0,r.length)),this.filledBuffer=this.filledBuffer.subarray(r.length),t;for(;r.length>0;){if(this.filledBuffer.length===0){if(r.length>=Xr){const n=r.subarray(0,r.length-r.length%Xr);this.fillBufferDirect(n),r=r.subarray(n.length);continue}this.fillBuffer()}if(r.length<=this.filledBuffer.length)return r.set(this.filledBuffer.subarray(0,r.length)),this.filledBuffer=this.filledBuffer.subarray(r.length),t;r.set(this.filledBuffer),r=r.subarray(this.filledBuffer.length),this.fillBuffer()}return t}}function bc(e){if(!e||e.type!=="num"&&e.type!=="str")return z;const t=so(e.value.toString());return _(([r,n])=>r&&r.type==="num"&&n&&n.type==="num"?F(Math.floor(t()*(Math.floor(n.value)-Math.ceil(r.value)+1)+Math.ceil(r.value))):F(t()))}function xc(e){if(!e||e.type!=="num"&&e.type!=="str")return z;const t=new mc(e.value);return _(([r,n])=>{if(r&&r.type==="num"&&n&&n.type==="num"){const s=t.generateRandomIntegerInRange(r.value,n.value);return typeof s=="number"?F(s):z}return F(t.generateNumber0To1())})}async function _c(e){if(!e||e.type!=="num"&&e.type!=="str"&&e.type!=="null")return z;let t;e.type==="num"?t=new Uint8Array(await crypto.subtle.digest("SHA-384",new Uint8Array(new Float64Array([e.value])))):e.type==="str"&&(t=new Uint8Array(await crypto.subtle.digest("SHA-384",new Uint8Array(ro.encode(e.value)))));const r=new wc(t);return _(([n,s])=>{if(n&&n.type==="num"&&s&&s.type==="num"){const i=r.generateRandomIntegerInRange(n.value,s.value);return typeof i=="number"?F(i):z}return F(r.generateNumber0To1())})}const Ec={help:se("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":se(to),"Core:ai":se("kawaii"),"Core:not":_(([e])=>(Be(e),e.value?ke:Fe)),"Core:eq":_(([e,t])=>(Ie(e),Ie(t),xr(e,t)?Fe:ke)),"Core:neq":_(([e,t])=>(Ie(e),Ie(t),xr(e,t)?ke:Fe)),"Core:and":_(([e,t])=>(Be(e),e.value?(Be(t),t.value?Fe:ke):ke)),"Core:or":_(([e,t])=>(Be(e),e.value?Fe:(Be(t),t.value?Fe:ke))),"Core:add":_(([e,t])=>(A(e),A(t),F(e.value+t.value))),"Core:sub":_(([e,t])=>(A(e),A(t),F(e.value-t.value))),"Core:mul":_(([e,t])=>(A(e),A(t),F(e.value*t.value))),"Core:pow":_(([e,t])=>{A(e),A(t);const r=e.value**t.value;return F(r)}),"Core:div":_(([e,t])=>{A(e),A(t);const r=e.value/t.value;return F(r)}),"Core:mod":_(([e,t])=>(A(e),A(t),F(e.value%t.value))),"Core:gt":_(([e,t])=>(A(e),A(t),e.value>t.value?Fe:ke)),"Core:lt":_(([e,t])=>(A(e),A(t),e.value(A(e),A(t),e.value>=t.value?Fe:ke)),"Core:lteq":_(([e,t])=>(A(e),A(t),e.value<=t.value?Fe:ke)),"Core:type":_(([e])=>(Ie(e),se(e.type))),"Core:to_str":_(([e])=>(Ie(e),se(_r(e)))),"Core:range":_(([e,t])=>(A(e),A(t),e.valueF(n+e.value))):e.value>t.value?ge(Array.from({length:e.value-t.value+1},(r,n)=>F(e.value-n))):ge([e]))),"Core:sleep":_(async([e])=>(A(e),await new Promise(t=>setTimeout(t,e.value)),z)),"Core:abort":_(async([e])=>{throw le(e),new Du(e.value)}),"Util:uuid":_(()=>se(Vu())),"Json:stringify":_(([e])=>(Ie(e),se(JSON.stringify(ds(e))))),"Json:parse":_(([e])=>{le(e);try{return gs(JSON.parse(e.value))}catch{return ln("not_json")}}),"Json:parsable":_(([e])=>{le(e);try{JSON.parse(e.value)}catch{return Xt(!1)}return Xt(!0)}),"Date:now":_(()=>F(Date.now())),"Date:year":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getFullYear()))),"Date:month":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getMonth()+1))),"Date:day":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getDate()))),"Date:hour":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getHours()))),"Date:minute":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getMinutes()))),"Date:second":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getSeconds()))),"Date:millisecond":_(([e])=>(e&&A(e),F(new Date(e?.value??Date.now()).getMilliseconds()))),"Date:parse":_(([e])=>{le(e);const t=new Date(e.value).getTime();return t===t?F(t):ln("not_date")}),"Date:to_iso_str":_(([e,t])=>{e&&A(e);const r=new Date(e?.value??Date.now());t&&A(t);const n=t?.value??-r.getTimezoneOffset();let s;if(n===0)s="Z";else{const v=Math.sign(n),x=Math.floor(Math.abs(n)/60),k=Math.abs(n)%60;r.setUTCHours(r.getUTCHours()+v*x),r.setUTCMinutes(r.getUTCMinutes()+v*k);const T=n>0?"+":"-",j=x.toString().padStart(2,"0"),H=k.toString().padStart(2,"0");s=`${T}${j}:${H}`}const i=r.getUTCFullYear().toString().padStart(4,"0"),o=(r.getUTCMonth()+1).toString().padStart(2,"0"),a=r.getUTCDate().toString().padStart(2,"0"),l=r.getUTCHours().toString().padStart(2,"0"),c=r.getUTCMinutes().toString().padStart(2,"0"),f=r.getUTCSeconds().toString().padStart(2,"0"),h=r.getUTCMilliseconds().toString().padStart(3,"0");return se(`${i}-${o}-${a}T${l}:${c}:${f}.${h}${s}`)}),"Math:Infinity":F(1/0),"Math:E":F(Math.E),"Math:LN2":F(Math.LN2),"Math:LN10":F(Math.LN10),"Math:LOG2E":F(Math.LOG2E),"Math:LOG10E":F(Math.LOG10E),"Math:PI":F(Math.PI),"Math:SQRT1_2":F(Math.SQRT1_2),"Math:SQRT2":F(Math.SQRT2),"Math:abs":_(([e])=>(A(e),F(Math.abs(e.value)))),"Math:acos":_(([e])=>(A(e),F(Math.acos(e.value)))),"Math:acosh":_(([e])=>(A(e),F(Math.acosh(e.value)))),"Math:asin":_(([e])=>(A(e),F(Math.asin(e.value)))),"Math:asinh":_(([e])=>(A(e),F(Math.asinh(e.value)))),"Math:atan":_(([e])=>(A(e),F(Math.atan(e.value)))),"Math:atanh":_(([e])=>(A(e),F(Math.atanh(e.value)))),"Math:atan2":_(([e,t])=>(A(e),A(t),F(Math.atan2(e.value,t.value)))),"Math:cbrt":_(([e])=>(A(e),F(Math.cbrt(e.value)))),"Math:ceil":_(([e])=>(A(e),F(Math.ceil(e.value)))),"Math:clz32":_(([e])=>(A(e),F(Math.clz32(e.value)))),"Math:cos":_(([e])=>(A(e),F(Math.cos(e.value)))),"Math:cosh":_(([e])=>(A(e),F(Math.cosh(e.value)))),"Math:exp":_(([e])=>(A(e),F(Math.exp(e.value)))),"Math:expm1":_(([e])=>(A(e),F(Math.expm1(e.value)))),"Math:floor":_(([e])=>(A(e),F(Math.floor(e.value)))),"Math:fround":_(([e])=>(A(e),F(Math.fround(e.value)))),"Math:hypot":_(([e])=>{wt(e);const t=[];for(const r of e.value)A(r),t.push(r.value);return F(Math.hypot(...t))}),"Math:imul":_(([e,t])=>(A(e),A(t),F(Math.imul(e.value,t.value)))),"Math:log":_(([e])=>(A(e),F(Math.log(e.value)))),"Math:log1p":_(([e])=>(A(e),F(Math.log1p(e.value)))),"Math:log10":_(([e])=>(A(e),F(Math.log10(e.value)))),"Math:log2":_(([e])=>(A(e),F(Math.log2(e.value)))),"Math:max":_(([e,t])=>(A(e),A(t),F(Math.max(e.value,t.value)))),"Math:min":_(([e,t])=>(A(e),A(t),F(Math.min(e.value,t.value)))),"Math:pow":_(([e,t])=>(A(e),A(t),F(Math.pow(e.value,t.value)))),"Math:round":_(([e])=>(A(e),F(Math.round(e.value)))),"Math:sign":_(([e])=>(A(e),F(Math.sign(e.value)))),"Math:sin":_(([e])=>(A(e),F(Math.sin(e.value)))),"Math:sinh":_(([e])=>(A(e),F(Math.sinh(e.value)))),"Math:sqrt":_(([e])=>{A(e);const t=Math.sqrt(e.value);return F(t)}),"Math:tan":_(([e])=>(A(e),F(Math.tan(e.value)))),"Math:tanh":_(([e])=>(A(e),F(Math.tanh(e.value)))),"Math:trunc":_(([e])=>(A(e),F(Math.trunc(e.value)))),"Math:rnd":_(([e,t])=>{if(e&&e.type==="num"&&t&&t.type==="num"){const r=jr.instance.generateRandomIntegerInRange(e.value,t.value);return r===null?z:F(r)}return F(jr.instance.generateNumber0To1())}),"Math:gen_rng":_(async([e,t])=>{Ie(e);let r="chacha20";if(t?.type==="obj"){const n=t.value.get("algorithm");if(n?.type!=="str")throw new re("`options.algorithm` must be string.");r=n.value}else if(t?.type!==void 0)throw new re("`options` must be an object if specified.");if(e.type!=="num"&&e.type!=="str"&&e.type!=="null")throw new re("`seed` must be either number or string if specified.");switch(r){case"rc4_legacy":return bc(e);case"rc4":return xc(e);case"chacha20":return await _c(e);default:throw new re("`options.algorithm` must be one of these: `chacha20`, `rc4`, or `rc4_legacy`.")}}),"Num:from_hex":_(([e])=>(le(e),F(parseInt(e.value,16)))),"Str:lf":se(` +`),"Str:lt":_(([e,t])=>(le(e),le(t),e.value(le(e),le(t),e.value>t.value?F(-1):e.value===t.value?F(0):F(1))),"Str:from_codepoint":_(([e])=>(A(e),se(String.fromCodePoint(e.value)))),"Str:from_unicode_codepoints":_(([e])=>(wt(e),se(Array.from(e.value.map(t=>(A(t),String.fromCodePoint(t.value)))).join("")))),"Str:from_utf8_bytes":_(([e])=>(wt(e),se(Gu.decode(Uint8Array.from(e.value.map(t=>(A(t),t.value))))))),"Uri:encode_full":_(([e])=>(le(e),se(encodeURI(e.value)))),"Uri:encode_component":_(([e])=>(le(e),se(encodeURIComponent(e.value)))),"Uri:decode_full":_(([e])=>(le(e),se(decodeURI(e.value)))),"Uri:decode_component":_(([e])=>(le(e),se(decodeURIComponent(e.value)))),"Arr:create":_(([e,t])=>{A(e);try{return ge(Array(e.value).fill(t??z))}catch(r){throw e.value<0?new re("Arr:create expected non-negative number, got negative"):Number.isInteger(e.value)?r:new re("Arr:create expected integer, got non-integer")}}),"Obj:keys":_(([e])=>(et(e),ge(Array.from(e.value.keys()).map(t=>se(t))))),"Obj:vals":_(([e])=>(et(e),ge(Array.from(e.value.values())))),"Obj:kvs":_(([e])=>(et(e),ge(Array.from(e.value.entries()).map(([t,r])=>ge([se(t),r]))))),"Obj:get":_(([e,t])=>(et(e),le(t),e.value.get(t.value)??z)),"Obj:set":_(([e,t,r])=>(et(e),le(t),Ie(r),e.value.set(t.value,r),z)),"Obj:has":_(([e,t])=>(et(e),le(t),Xt(e.value.has(t.value)))),"Obj:copy":_(([e])=>(et(e),br(new Map(e.value)))),"Obj:merge":_(([e,t])=>(et(e),et(t),br(new Map([...e.value,...t.value])))),"Obj:pick":_(([e,t])=>(et(e),wt(t),br(new Map(t.value.map(r=>(le(r),[r.value,e.value.get(r.value)??z])))))),"Error:create":_(([e,t])=>(le(e),ln(e.value,t))),"Async:interval":_(async([e,t,r],n)=>{A(e),at(t),r&&(Be(r),r.value&&n.call(t,[]));let s;const i=()=>{s=setInterval(()=>{n.topCall(t,[])},e.value),n.registerAbortHandler(o),n.registerPauseHandler(o),n.unregisterUnpauseHandler(i)},o=()=>{clearInterval(s),n.unregisterAbortHandler(o),n.unregisterPauseHandler(o),n.registerUnpauseHandler(i)};return i(),_(([],a)=>{o(),a.unregisterUnpauseHandler(i)})}),"Async:timeout":_(async([e,t],r)=>{A(e),at(t);let n;const s=()=>{n=setTimeout(()=>{r.topCall(t,[]),r.unregisterAbortHandler(i),r.unregisterPauseHandler(i)},e.value),r.registerAbortHandler(i),r.registerPauseHandler(i),r.unregisterUnpauseHandler(s)},i=()=>{clearTimeout(n),r.unregisterAbortHandler(i),r.unregisterPauseHandler(i),r.registerUnpauseHandler(s)};return s(),_(([],o)=>{i(),o.unregisterUnpauseHandler(s)})})},Cc=e=>({type:"return",value:e}),Pc=(e,t)=>({type:"break",label:e,value:t}),Ac=e=>({type:"continue",label:e,value:null});function lr(e,t){return e.type==="break"&&e.label!=null&&e.label===t?e.value??z:e}function Sc(e){switch(e.type){case"return":return e.value;default:return un(e),e}}function un(e){switch(e.type){case"return":throw new re("Invalid return");case"break":throw new re("Invalid break");case"continue":throw new re("Invalid continue")}}function te(e){switch(e.type){case"null":case"bool":case"num":case"str":case"arr":case"obj":case"fn":case"error":case"reference":return!1;case"return":case"break":case"continue":return!0}throw new TypeError("expected value or control")}var sr={},Fc=()=>{const e="\\ud800-\\udfff",o="\\u0300-\\u036f"+"\\ufe20-\\ufe2f"+"\\u20d0-\\u20ff"+"\\u1ab0-\\u1aff"+"\\u1dc0-\\u1dff",a="\\ufe0e\\ufe0f",l="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",c=`[${e}]`,f=`[${o}]`,h="\\ud83c[\\udffb-\\udfff]",v=`(?:${f}|${h})`,x=`[^${e}]`,k="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",T="[\\ud800-\\udbff][\\udc00-\\udfff]",j="\\u200d",H="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",m=`[${l}]`,p=`${v}?`,d=`[${a}]?`,y=`(?:${j}(?:${[x,k,T].join("|")})${d+p})*`,b=d+p+y,M=`(?:${[`${x}${f}?`,f,k,T,c,m].join("|")})`;return new RegExp(`${H}|${h}(?=${h})|${M+b}`,"g")},kc=nt&&nt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sr,"__esModule",{value:!0});var On=kc(Fc);function ms(e){if(typeof e!="string")throw new Error("A string is expected as input");return e.match(On.default())||[]}var Gn=sr.toArray=ms;function Ks(e){if(typeof e!="string")throw new Error("Input must be a string");var t=e.match(On.default());return t===null?0:t.length}var Mc=sr.length=Ks;function io(e,t,r){if(t===void 0&&(t=0),typeof e!="string")throw new Error("Input must be a string");(typeof t!="number"||t<0)&&(t=0),typeof r=="number"&&r<0&&(r=0);var n=e.match(On.default());return n?n.slice(t,r).join(""):""}var Oc=sr.substring=io;function $c(e,t,r){if(t===void 0&&(t=0),typeof e!="string")throw new Error("Input must be a string");var n=Ks(e);if(typeof t!="number"&&(t=parseInt(t,10)),t>=n)return"";t<0&&(t+=n);var s;typeof r>"u"?s=n:(typeof r!="number"&&(r=parseInt(r,10)),s=r>=0?r+t:t);var i=e.match(On.default());return i?i.slice(t,s).join(""):""}sr.substr=$c;function Bc(e,t,r,n){if(t===void 0&&(t=16),r===void 0&&(r="#"),n===void 0&&(n="right"),typeof e!="string"||typeof t!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(n)===-1)throw new Error("Pad position should be either left or right");typeof r!="string"&&(r=String(r));var s=Ks(e);if(s>t)return io(e,0,t);if(s=n.length)return t===""?n.length:-1;if(t==="")return r;var s=ms(t),i=!1,o;for(o=r;o_(async(t,r)=>se(e.value.toString())),to_hex:e=>_(async(t,r)=>se(e.value.toString(16)))},str:{to_num:e=>_(async(t,r)=>{const n=parseInt(e.value,10);return isNaN(n)?z:F(n)}),to_arr:e=>_(async(t,r)=>ge(Gn(e.value).map(n=>se(n)))),to_unicode_arr:e=>_(async(t,r)=>ge([...e.value].map(n=>se(n)))),to_unicode_codepoint_arr:e=>_(async(t,r)=>ge([...e.value].map(n=>{const s=n.codePointAt(0);return F(s??n.charCodeAt(0))}))),to_char_arr:e=>_(async(t,r)=>ge(e.value.split("").map(n=>se(n)))),to_charcode_arr:e=>_(async(t,r)=>ge(e.value.split("").map(n=>F(n.charCodeAt(0))))),to_utf8_byte_arr:e=>_(async(t,r)=>ge(Array.from(ro.encode(e.value)).map(n=>F(n)))),len:e=>F(Mc(e.value)),replace:e=>_(async([t,r],n)=>(le(t),le(r),se(e.value.split(t.value).join(r.value)))),index_of:e=>_(async([t,r],n)=>{le(t),r&&A(r);const s=r?r.value<0?e.value.length+r.value:r.value:void 0;return F(Ic(e.value,t.value,s))}),incl:e=>_(async([t],r)=>(le(t),e.value.includes(t.value)?Fe:ke)),trim:e=>_(async(t,r)=>se(e.value.trim())),upper:e=>_(async(t,r)=>se(e.value.toUpperCase())),lower:e=>_(async(t,r)=>se(e.value.toLowerCase())),split:e=>_(async([t],r)=>(t&&le(t),ge(t?e.value.split(t?t.value:"").map(n=>se(n)):Gn(e.value).map(n=>se(n))))),slice:e=>_(async([t,r],n)=>(A(t),A(r),se(Oc(e.value,t.value,r.value)))),pick:e=>_(async([t],r)=>{A(t);const s=Gn(e.value)[t.value];return s?se(s):z}),charcode_at:e=>_(([t],r)=>{A(t);const n=e.value.charCodeAt(t.value);return Number.isNaN(n)?z:F(n)}),codepoint_at:e=>_(([t],r)=>{A(t);const n=e.value.codePointAt(t.value)??e.value.charCodeAt(t.value);return Number.isNaN(n)?z:F(n)}),starts_with:e=>_(async([t,r],n)=>{if(le(t),!t.value)return Fe;r&&A(r);const s=r?.value??0;if(s<-e.value.length||s>e.value.length)return ke;const i=s>=0?s:e.value.length+s;return e.value.startsWith(t.value,i)?Fe:ke}),ends_with:e=>_(async([t,r],n)=>{if(le(t),!t.value)return Fe;r&&A(r);const s=r?.value??e.value.length;if(s<-e.value.length||s>e.value.length)return ke;const i=s>=0?s:e.value.length+s;return e.value.endsWith(t.value,i)?Fe:ke}),pad_start:e=>_(([t,r],n)=>{A(t);const s=r?(le(r),r.value):" ";return se(e.value.padStart(t.value,s))}),pad_end:e=>_(([t,r],n)=>{A(t);const s=r?(le(r),r.value):" ";return se(e.value.padEnd(t.value,s))})},arr:{len:e=>F(e.value.length),push:e=>_(async([t],r)=>(Ie(t),e.value.push(t),e)),unshift:e=>_(async([t],r)=>(Ie(t),e.value.unshift(t),e)),pop:e=>_(async(t,r)=>e.value.pop()??z),shift:e=>_(async(t,r)=>e.value.shift()??z),concat:e=>_(async([t],r)=>(wt(t),ge(e.value.concat(t.value)))),slice:e=>_(async([t,r],n)=>(A(t),A(r),ge(e.value.slice(t.value,r.value)))),join:e=>_(async([t],r)=>(t&&le(t),se(e.value.map(n=>n.type==="str"?n.value:"").join(t?t.value:"")))),map:e=>_(async([t],r)=>{at(t);const n=e.value.map(async(s,i)=>await r.call(t,[s,F(i)]));return ge(await Promise.all(n))}),filter:e=>_(async([t],r)=>{at(t);const n=[];for(let s=0;s_(async([t,r],n)=>{at(t);const s=r!=null;if(!s&&e.value.length===0)throw new re("Reduce of empty array without initial value");let i=s?r:e.value[0];for(let o=s?0:1;o_(async([t],r)=>{at(t);for(let n=0;n_(async([t],r)=>(Ie(t),e.value.some(n=>xr(t,n))?Fe:ke)),index_of:e=>_(async([t,r],n)=>{if(Ie(t),r){A(r);const s=e.value.slice(0,r.value).length,i=e.value.slice(r.value).findIndex(o=>xr(o,t));return F(i<0?i:i+s)}else return F(e.value.findIndex(s=>xr(s,t)))}),reverse:e=>_(async(t,r)=>(e.value.reverse(),z)),copy:e=>_(async(t,r)=>ge([...e.value])),sort:e=>_(async([t],r)=>{const n=async(i,o)=>{if(i.length<=1)return i;const a=Math.floor(i.length/2),l=n(i.slice(0,a),o),c=n(i.slice(a),o),[f,h]=await Promise.all([l,c]);return s(f,h,o)},s=async(i,o,a)=>{const l=[];let c=0,f=0;for(;c_(async([t,r,n],s)=>{const i=t??z,o=r&&(A(r),r.value),a=n&&(A(n),n.value);return e.value.fill(i,o,a),e}),repeat:e=>_(async([t],r)=>{A(t);try{return ge(Array(t.value).fill(e.value).flat())}catch(n){throw t.value<0?new re("arr.repeat expected non-negative number, got negative"):Number.isInteger(t.value)?n:new re("arr.repeat expected integer, got non-integer")}}),splice:e=>_(async([t,r,n],s)=>{A(t);const i=t.value<-e.value.length?0:t.value<0?e.value.length+t.value:t.value>=e.value.length?e.value.length:t.value,o=r!=null?(A(r),r.value):e.value.length-i,a=n!=null?(wt(n),n.value):[],l=e.value.splice(i,o,...a);return ge(l)}),flat:e=>_(async([t],r)=>{if(t=t??F(1),A(t),!Number.isInteger(t.value))throw new re("arr.flat expected integer, got non-integer");if(t.value<0)throw new re("arr.flat expected non-negative number, got negative");const n=(i,o,a)=>{if(o===0){a.push(...i);return}for(const l of i)wn(l)?n(l.value,o-1,a):a.push(l)},s=[];return n(e.value,t.value,s),ge(s)}),flat_map:e=>_(async([t],r)=>{at(t);const n=e.value.map(async(i,o)=>{const a=await r.call(t,[i,F(o)]);return wn(a)?a.value:a}),s=await Promise.all(n);return ge(s.flat())}),every:e=>_(async([t],r)=>{at(t);for(let n=0;n_(async([t],r)=>{at(t);for(let n=0;n_(async([t,r],n)=>(A(t),Ie(r),e.value.splice(t.value,0,r),z)),remove:e=>_(async([t],r)=>(A(t),e.value.splice(t.value,1)[0]??z)),at:e=>_(async([t,r],n)=>(A(t),e.value.at(t.value)??r??z))},error:{name:e=>se(e.value),info:e=>e.info??z}};function Rc(e,t){if(Object.hasOwn(Ti,e.type)){const r=Ti[e.type];if(Object.hasOwn(r,t))return r[t](e);throw new re(`No such prop (${t}) in ${e.type}.`)}else throw new re(`Cannot read prop of ${e.type}. (reading ${t})`)}const Nc={mut(e){return{isMutable:!0,value:e}},const(e){return{isMutable:!1,value:e}}},ur={variable(e,t){return new Dc(e,t)},index(e,t){return new Lc(e.value,t)},prop(e,t){return new Uc(e.value,t)},arr(e){return new Hc(e)},obj(e){return new jc(e)}};class Dc{name;scope;constructor(t,r){this.name=t,this.scope=r,this.type="reference"}type;get(){return this.scope.get(this.name)}set(t){this.scope.assign(this.name,t)}}class Lc{target;index;constructor(t,r){this.target=t,this.index=r,this.type="reference"}type;get(){return this.assertIndexInRange(),this.target[this.index]}set(t){this.assertIndexInRange(),this.target[this.index]=t}assertIndexInRange(){const t=this.index;if(t<0||this.target.length<=t)throw new eo(`Index out of range. index: ${this.index} max: ${this.target.length-1}`)}}class Uc{target;index;constructor(t,r){this.target=t,this.index=r,this.type="reference"}type;get(){return this.target.get(this.index)??z}set(t){this.target.set(this.index,t)}}class Hc{items;constructor(t){this.items=t,this.type="reference"}type;get(){return ge(this.items.map(t=>t.get()))}set(t){wt(t);for(const[r,n]of this.items.entries())n.set(t.value[r]??z)}}class jc{entries;constructor(t){this.entries=t,this.type="reference"}type;get(){return br(new Map([...this.entries].map(([t,r])=>[t,r.get()])))}set(t){et(t);for(const[r,n]of this.entries.entries())n.set(t.value.get(r)??z)}}var Ee=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};class xe{opts;stepCount=0;stop=!1;pausing=null;scope;abortHandlers=[];pauseHandlers=[];unpauseHandlers=[];vars={};irqRate;irqSleep;constructor(t,r={}){this.opts=r;const n={print:_(([i])=>{Ie(i),this.opts.out&&this.opts.out(i)}),readline:_(async i=>{const o=i[0];if(le(o),this.opts.in==null)return z;const a=await this.opts.in(o.value);return se(a)})};if(this.vars=Object.fromEntries(Object.entries({...t,...Ec,...n}).map(([i,o])=>[i,Nc.const(o)])),this.scope=new ze([new Map(Object.entries(this.vars))]),this.scope.opts.log=(i,o)=>{switch(i){case"add":this.log("var:add",o);break;case"read":this.log("var:read",o);break;case"write":this.log("var:write",o);break}},!((this.opts.irqRate??300)>=0))throw new ki(`Invalid IRQ rate (${this.opts.irqRate}): must be non-negative number`);this.irqRate=this.opts.irqRate??300;const s=i=>()=>new Promise(o=>setTimeout(o,i));if(typeof this.opts.irqSleep=="function")this.irqSleep=this.opts.irqSleep;else if(this.opts.irqSleep===void 0)this.irqSleep=s(5);else if(this.opts.irqSleep>=0)this.irqSleep=s(this.opts.irqSleep);else throw new ki("irqSleep must be a function or a positive number.")}async exec(t){if(!(t==null||t.length===0))try{await this.collectNs(t);const r=await this._run(t,this.scope,[]);un(r),this.log("end",{val:r})}catch(r){this.handleError(r)}}async execFn(t,r){return await this._fn(t,r,[]).catch(n=>(this.handleError(n),ln("func_failed")))}execFnSimple(t,r){return this._fn(t,r,[])}static collectMetadata(t){if(t==null||t.length===0)return;function r(s){switch(s.type){case"arr":return s.value.map(i=>r(i));case"bool":return s.value;case"null":return null;case"num":return s.value;case"obj":{const i={};for(const[o,a]of s.value.entries())i[o]=r(a);return i}case"str":return s.value;default:return}}const n=new Map;for(const s of t)switch(s.type){case"meta":{n.set(s.name,r(s.value));break}}return n}handleError(t){if(!this.opts.err)throw t;if(this.opts.abortOnError){if(this.stop)return;this.abort()}t instanceof Ot?this.opts.err(t):this.opts.err(new Fi(t))}log(t,r){this.opts.log&&this.opts.log(t,r)}async collectNs(t,r=this.scope){for(const n of t)switch(n.type){case"ns":{await this.collectNsMember(n,r);break}}}async collectNsMember(t,r=this.scope){const n=r.createChildNamespaceScope(t.name);await this.collectNs(t.members,n);for(const s of t.members)switch(s.type){case"def":{if(s.dest.type!=="identifier")throw new Vn("Destructuring assignment is invalid in namespace declarations.",s.loc.start);if(s.mut)throw new Vn('No "var" in namespace declaration: '+s.dest.name,s.loc.start);const i=await this._eval(s.expr,n,[]);un(i),s.expr.type==="fn"&&Oi(i)&&!i.native&&(i.name=n.getNsPrefix()+s.dest.name),await this.define(n,s.dest,i,s.mut);break}case"ns":break;default:{const o=s;throw new Vn("invalid ns member type: "+o.type,o.loc.start)}}}async _fn(t,r,n,s){if(t.native){const i={name:"",pos:s};return t.native(r,{call:(a,l)=>this._fn(a,l,[...n,i]),topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,registerPauseHandler:this.registerPauseHandler,registerUnpauseHandler:this.registerUnpauseHandler,unregisterAbortHandler:this.unregisterAbortHandler,unregisterPauseHandler:this.unregisterPauseHandler,unregisterUnpauseHandler:this.unregisterUnpauseHandler})??z}else{const i=t.scope.createChildScope();for(const[a,l]of t.params.entries()){const c=r[a];l.default||Ie(c),this.define(i,l.dest,c??l.default,!0)}const o={name:t.name??"",pos:s};return Sc(await this._run(t.statements,i,[...n,o]))}}_evalClause(t,r,n){return this._eval(t,Uu(t)?r.createChildScope():r,n)}async _evalBinaryOperation(t,r,n,s,i){const o=s.get(t);at(o);const a=await this._eval(r,s,i);if(te(a))return a;const l=await this._eval(n,s,i);return te(l)?l:this._fn(o,[a,l],i)}_eval(t,r,n){return this.__eval(t,r,n).catch(s=>{if(s.pos)throw s;{const i=s instanceof Ot?s:new Fi(s);throw i.pos=t.loc.start,i.message=[i.message,...[...n,{pos:i.pos}].map(({pos:o},a)=>{const l=n[a-1]?.name??"";return o?` at ${l} (Line ${o.line}, Column ${o.column})`:` at ${l}`}).reverse()].join(` +`),i}})}async __eval(t,r,n){if(this.stop)return z;if(this.pausing&&await this.pausing.promise,this.irqRate!==0&&this.stepCount%this.irqRate>=this.irqRate-1&&await this.irqSleep(),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new re("max step exceeded");switch(t.type){case"call":{const s=await this._eval(t.target,r,n);if(te(s))return s;at(s);const i=[];for(const o of t.args){const a=await this._eval(o,r,n);if(te(a))return a;i.push(a)}return this._fn(s,i,n,t.loc.start)}case"if":{const s=await this._eval(t.cond,r,n);if(te(s))return s;if(Be(s),s.value)return lr(await this._evalClause(t.then,r,n),t.label);for(const i of t.elseif){const o=await this._eval(i.cond,r,n);if(te(o))return o;if(Be(o),o.value)return lr(await this._evalClause(i.then,r,n),t.label)}return t.else?lr(await this._evalClause(t.else,r,n),t.label):z}case"match":{const s=await this._eval(t.about,r,n);if(te(s))return s;for(const i of t.qs){const o=await this._eval(i.q,r,n);if(te(o))return o;if(xr(s,o))return lr(await this._evalClause(i.a,r,n),t.label)}return t.default?lr(await this._evalClause(t.default,r,n),t.label):z}case"loop":{for(;;){const s=await this._run(t.statements,r.createChildScope(),n);if(s.type==="break"){if(s.label!=null&&s.label!==t.label)return s;break}else if(s.type==="continue"){if(s.label!=null&&s.label!==t.label)return s}else if(s.type==="return")return s}return z}case"for":{if(t.times){const s=await this._eval(t.times,r,n);if(te(s))return s;A(s);for(let i=0;i0){const i=[];for(const o of t.attr){const a=await this._eval(o.value,r,n);un(a),i.push({name:o.name,value:a})}s.attr=i}return t.expr.type==="fn"&&t.dest.type==="identifier"&&Oi(s)&&!s.native&&(s.name=t.dest.name),await this.define(r,t.dest,s,t.mut),z}case"identifier":return r.get(t.name);case"assign":{const s=await this.getReference(t.dest,r,n);if(te(s))return s;const i=await this._eval(t.expr,r,n);return te(i)?i:(s.set(i),z)}case"addAssign":{const s=await this.getReference(t.dest,r,n);if(te(s))return s;const i=await this._eval(t.expr,r,n);if(te(i))return i;A(i);const o=s.get();return A(o),s.set(F(o.value+i.value)),z}case"subAssign":{const s=await this.getReference(t.dest,r,n);if(te(s))return s;const i=await this._eval(t.expr,r,n);if(te(i))return i;A(i);const o=s.get();return A(o),s.set(F(o.value-i.value)),z}case"null":return z;case"bool":return Xt(t.value);case"num":return F(t.value);case"str":return se(t.value);case"arr":{const s=[];for(const i of t.value){const o=await this._eval(i,r,n);if(te(o))return o;s.push(o)}return ge(s)}case"obj":{const s=new Map;for(const[i,o]of t.value){const a=await this._eval(o,r,n);if(te(a))return a;s.set(i,a)}return br(s)}case"prop":{const s=await this._eval(t.target,r,n);return te(s)?s:zn(s)?s.value.has(t.name)?s.value.get(t.name):z:Rc(s,t.name)}case"index":{const s=await this._eval(t.target,r,n);if(te(s))return s;const i=await this._eval(t.index,r,n);if(te(i))return i;if(wn(s)){A(i);const o=s.value[i.value];if(o===void 0)throw new eo(`Index out of range. index: ${i.value} max: ${s.value.length-1}`);return o}else{if(zn(s))return le(i),s.value.has(i.value)?s.value.get(i.value):z;throw new re(`Cannot read prop (${_r(i)}) of ${s.type}.`)}}case"plus":{const s=await this._eval(t.expr,r,n);return te(s)||A(s),s}case"minus":{const s=await this._eval(t.expr,r,n);return te(s)?s:(A(s),F(-s.value))}case"not":{const s=await this._eval(t.expr,r,n);return te(s)?s:(Be(s),Xt(!s.value))}case"fn":{const s=await Promise.all(t.params.map(async o=>({dest:o.dest,default:o.default?await this._eval(o.default,r,n):o.optional?z:void 0}))),i=s.map(o=>o.default).filter(o=>o!=null).find(te);return i??Wu(s,t.children,r)}case"block":return lr(await this._run(t.statements,r.createChildScope(),n),t.label);case"exists":return Xt(r.exists(t.identifier.name));case"tmpl":{let s="";for(const i of t.tmpl)if(typeof i=="string")s+=i;else{const o=await this._eval(i,r,n);if(te(o))return o;s+=_r(o)}return se(s)}case"return":{const s=await this._eval(t.expr,r,n);return te(s)?s:(this.log("block:return",{scope:r.name,val:s}),Cc(s))}case"break":{let s;if(t.expr!=null){const i=await this._eval(t.expr,r,n);if(te(i))return i;s=i}return this.log("block:break",{scope:r.name}),Pc(t.label,s)}case"continue":return this.log("block:continue",{scope:r.name}),Ac(t.label);case"ns":return z;case"meta":return z;case"pow":return this._evalBinaryOperation("Core:pow",t.left,t.right,r,n);case"mul":return this._evalBinaryOperation("Core:mul",t.left,t.right,r,n);case"div":return this._evalBinaryOperation("Core:div",t.left,t.right,r,n);case"rem":return this._evalBinaryOperation("Core:mod",t.left,t.right,r,n);case"add":return this._evalBinaryOperation("Core:add",t.left,t.right,r,n);case"sub":return this._evalBinaryOperation("Core:sub",t.left,t.right,r,n);case"lt":return this._evalBinaryOperation("Core:lt",t.left,t.right,r,n);case"lteq":return this._evalBinaryOperation("Core:lteq",t.left,t.right,r,n);case"gt":return this._evalBinaryOperation("Core:gt",t.left,t.right,r,n);case"gteq":return this._evalBinaryOperation("Core:gteq",t.left,t.right,r,n);case"eq":return this._evalBinaryOperation("Core:eq",t.left,t.right,r,n);case"neq":return this._evalBinaryOperation("Core:neq",t.left,t.right,r,n);case"and":{const s=await this._eval(t.left,r,n);if(te(s))return s;if(Be(s),s.value){const i=await this._eval(t.right,r,n);return te(i)||Be(i),i}else return s}case"or":{const s=await this._eval(t.left,r,n);if(te(s)||(Be(s),s.value))return s;{const i=await this._eval(t.right,r,n);return te(i)||Be(i),i}}case"namedTypeSource":case"fnTypeSource":case"unionTypeSource":case"attr":throw new Error("invalid node type");default:throw new Error("invalid node type")}}async _run(t,r,n){this.log("block:enter",{scope:r.name});let s=z;for(let i=0;ir!==t)}unregisterPauseHandler(t){this.pauseHandlers=this.pauseHandlers.filter(r=>r!==t)}unregisterUnpauseHandler(t){this.unpauseHandlers=this.unpauseHandlers.filter(r=>r!==t)}abort(){this.stop=!0;for(const t of this.abortHandlers)t();this.abortHandlers=[]}pause(){if(this.pausing)return;let t;const r=new Promise(n=>{t=()=>n()});this.pausing={promise:r,resolve:t};for(const n of this.pauseHandlers)n();this.pauseHandlers=[]}unpause(){if(this.pausing){this.pausing.resolve(),this.pausing=null;for(const t of this.unpauseHandlers)t();this.unpauseHandlers=[]}}async define(t,r,n,s){switch(r.type){case"identifier":{t.add(r.name,{isMutable:s,value:n});break}case"arr":{wt(n),await Promise.all(r.value.map((i,o)=>this.define(t,i,n.value[o]??z,s)));break}case"obj":{et(n),await Promise.all([...r.value].map(([i,o])=>this.define(t,o,n.value.get(i)??z,s)));break}default:throw new re("The left-hand side of an definition expression must be a variable.")}}async getReference(t,r,n){switch(t.type){case"identifier":return ur.variable(t.name,r);case"index":{const s=await this._eval(t.target,r,n);if(te(s))return s;const i=await this._eval(t.index,r,n);if(te(i))return i;if(wn(s))return A(i),ur.index(s,i.value);if(zn(s))return le(i),ur.prop(s,i.value);throw new re(`Cannot read prop (${_r(i)}) of ${s.type}.`)}case"prop":{const s=await this._eval(t.target,r,n);return te(s)?s:(et(s),ur.prop(s,t.name))}case"arr":{const s=[];for(const i of t.value){const o=await this.getReference(i,r,n);if(te(o))return o;s.push(o)}return ur.arr(s)}case"obj":{const s=new Map;for(const[i,o]of t.value.entries()){const a=await this.getReference(o,r,n);if(te(a))return a;s.set(i,a)}return ur.obj(s)}default:throw new re("The left-hand side of an assignment expression must be a variable or a property/index access.")}}}Ee([ie],xe.prototype,"exec",null);Ee([ie],xe.prototype,"execFn",null);Ee([ie],xe.prototype,"execFnSimple",null);Ee([ie],xe.prototype,"handleError",null);Ee([ie],xe.prototype,"log",null);Ee([ie],xe.prototype,"collectNs",null);Ee([ie],xe.prototype,"collectNsMember",null);Ee([ie],xe.prototype,"_fn",null);Ee([ie],xe.prototype,"_evalClause",null);Ee([ie],xe.prototype,"_evalBinaryOperation",null);Ee([ie],xe.prototype,"_eval",null);Ee([ie],xe.prototype,"__eval",null);Ee([ie],xe.prototype,"_run",null);Ee([ie],xe.prototype,"registerAbortHandler",null);Ee([ie],xe.prototype,"registerPauseHandler",null);Ee([ie],xe.prototype,"registerUnpauseHandler",null);Ee([ie],xe.prototype,"unregisterAbortHandler",null);Ee([ie],xe.prototype,"unregisterPauseHandler",null);Ee([ie],xe.prototype,"unregisterUnpauseHandler",null);Ee([ie],xe.prototype,"abort",null);Ee([ie],xe.prototype,"pause",null);Ee([ie],xe.prototype,"unpause",null);Ee([ie],xe.prototype,"define",null);Ee([ie],xe.prototype,"getReference",null);Ee([ie],xe,"collectMetadata",null);class qc{pages;firstPageIndex;lastPageIndex;pageIndex;address;_char;line;column;constructor(t,r){this.pages=new Map,this.pages.set(0,t),this.firstPageIndex=0,this.lastPageIndex=0,this.pageIndex=0,this.address=0,this.line=r?.line??0,this.column=r?.column??0,this.moveNext()}get eof(){return this.endOfPage&&this.isLastPage}get char(){if(this.eof)throw new Error("end of stream");return this._char}getPos(){return{line:this.line+1,column:this.column+1}}next(){!this.eof&&this._char===` +`?(this.line++,this.column=0):this.column++,this.incAddr(),this.moveNext()}prev(){this.decAddr(),this.movePrev()}get isFirstPage(){return this.pageIndex<=this.firstPageIndex}get isLastPage(){return this.pageIndex>=this.lastPageIndex}get endOfPage(){const t=this.pages.get(this.pageIndex);return this.address>=t.length}moveNext(){for(this.loadChar();;){if(!this.eof&&this._char==="\r"){this.incAddr(),this.loadChar();continue}break}}incAddr(){this.endOfPage?this.isLastPage||(this.pageIndex++,this.address=0):this.address++}movePrev(){for(this.loadChar();;){if(!this.eof&&this._char==="\r"){this.decAddr(),this.loadChar();continue}break}}decAddr(){this.address>0?this.address--:this.isFirstPage||(this.pageIndex--,this.address=this.pages.get(this.pageIndex).length-1)}loadChar(){this.eof?this._char=void 0:this._char=this.pages.get(this.pageIndex)[this.address]}}var u;(function(e){e[e.EOF=0]="EOF",e[e.NewLine=1]="NewLine",e[e.Identifier=2]="Identifier",e[e.NumberLiteral=3]="NumberLiteral",e[e.StringLiteral=4]="StringLiteral",e[e.Template=5]="Template",e[e.TemplateStringElement=6]="TemplateStringElement",e[e.TemplateExprElement=7]="TemplateExprElement",e[e.NullKeyword=8]="NullKeyword",e[e.TrueKeyword=9]="TrueKeyword",e[e.FalseKeyword=10]="FalseKeyword",e[e.EachKeyword=11]="EachKeyword",e[e.ForKeyword=12]="ForKeyword",e[e.LoopKeyword=13]="LoopKeyword",e[e.DoKeyword=14]="DoKeyword",e[e.WhileKeyword=15]="WhileKeyword",e[e.BreakKeyword=16]="BreakKeyword",e[e.ContinueKeyword=17]="ContinueKeyword",e[e.MatchKeyword=18]="MatchKeyword",e[e.CaseKeyword=19]="CaseKeyword",e[e.DefaultKeyword=20]="DefaultKeyword",e[e.IfKeyword=21]="IfKeyword",e[e.ElifKeyword=22]="ElifKeyword",e[e.ElseKeyword=23]="ElseKeyword",e[e.ReturnKeyword=24]="ReturnKeyword",e[e.EvalKeyword=25]="EvalKeyword",e[e.VarKeyword=26]="VarKeyword",e[e.LetKeyword=27]="LetKeyword",e[e.ExistsKeyword=28]="ExistsKeyword",e[e.Not=29]="Not",e[e.NotEq=30]="NotEq",e[e.Sharp=31]="Sharp",e[e.OpenSharpBracket=32]="OpenSharpBracket",e[e.Sharp3=33]="Sharp3",e[e.Percent=34]="Percent",e[e.And2=35]="And2",e[e.OpenParen=36]="OpenParen",e[e.CloseParen=37]="CloseParen",e[e.Asterisk=38]="Asterisk",e[e.Plus=39]="Plus",e[e.PlusEq=40]="PlusEq",e[e.Comma=41]="Comma",e[e.Minus=42]="Minus",e[e.MinusEq=43]="MinusEq",e[e.Dot=44]="Dot",e[e.Slash=45]="Slash",e[e.Colon=46]="Colon",e[e.Colon2=47]="Colon2",e[e.SemiColon=48]="SemiColon",e[e.Lt=49]="Lt",e[e.LtEq=50]="LtEq",e[e.Out=51]="Out",e[e.Eq=52]="Eq",e[e.Eq2=53]="Eq2",e[e.Arrow=54]="Arrow",e[e.Gt=55]="Gt",e[e.GtEq=56]="GtEq",e[e.Question=57]="Question",e[e.At=58]="At",e[e.OpenBracket=59]="OpenBracket",e[e.BackSlash=60]="BackSlash",e[e.CloseBracket=61]="CloseBracket",e[e.Hat=62]="Hat",e[e.OpenBrace=63]="OpenBrace",e[e.Or=64]="Or",e[e.Or2=65]="Or2",e[e.CloseBrace=66]="CloseBrace"})(u||(u={}));class Kc{kind;pos;hasLeftSpacing;value;children;constructor(t,r,n=!1,s,i){this.kind=t,this.pos=r,this.hasLeftSpacing=n,this.value=s,this.children=i}}function D(e,t,r){return new Kc(e,t,r?.hasLeftSpacing,r?.value,r?.children)}function L(e,t,r,n){const s={type:e};for(const i of Object.keys(t))t[i]!==void 0&&(s[i]=t[i]);return s.loc={start:r,end:n},s}function Vc(e,t,r,n){return L("call",{target:L("identifier",{name:e},r,r),args:t},r,n)}function Ct(e,t,r){return e===u.EOF?new He(t,r):new X(`unexpected token: ${u[e]}`,t,r)}const Yn=[" "," "],Ii=["\r",` +`],Ri=/^[0-9]$/,Wc=/^[A-Za-z0-9_]$/;class zc{stream;_tokens=[];constructor(t){typeof t=="string"?this.stream=new qc(t):this.stream=t,this._tokens.push(this.readToken())}getToken(){return this._tokens[0]}is(t){return this.getTokenKind()===t}getTokenKind(){return this.getToken().kind}getTokenValue(){return this.getToken().value}getPos(){return this.getToken().pos}next(){this._tokens[0].kind!==u.EOF&&(this._tokens.shift(),this._tokens.length===0&&this._tokens.push(this.readToken()))}lookahead(t){for(;this._tokens.length<=t;)this._tokens.push(this.readToken());return this._tokens[t]}expect(t){if(!this.is(t))throw Ct(this.getTokenKind(),this.getPos())}readToken(){let t=!1;for(;;){if(this.stream.eof)return D(u.EOF,this.stream.getPos(),{hasLeftSpacing:t});if(Yn.includes(this.stream.char)){this.stream.next(),t=!0;continue}const r=this.stream.getPos();if(Ii.includes(this.stream.char))return this.skipEmptyLines(),D(u.NewLine,r,{hasLeftSpacing:t});switch(this.stream.char){case"!":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.NotEq,r,{hasLeftSpacing:t})):D(u.Not,r,{hasLeftSpacing:t});case'"':case"'":return this.readStringLiteral(t);case"#":if(this.stream.next(),!this.stream.eof&&this.stream.char==="#"){if(this.stream.next(),!this.stream.eof&&this.stream.char==="#")return this.stream.next(),D(u.Sharp3,r,{hasLeftSpacing:t});throw new X('invalid sequence of characters: "##"',r)}else return!this.stream.eof&&this.stream.char==="["?(this.stream.next(),D(u.OpenSharpBracket,r,{hasLeftSpacing:t})):D(u.Sharp,r,{hasLeftSpacing:t});case"%":return this.stream.next(),D(u.Percent,r,{hasLeftSpacing:t});case"&":{if(this.stream.next(),!this.stream.eof&&this.stream.char==="&")return this.stream.next(),D(u.And2,r,{hasLeftSpacing:t});throw new X('invalid character: "&"',r)}case"(":return this.stream.next(),D(u.OpenParen,r,{hasLeftSpacing:t});case")":return this.stream.next(),D(u.CloseParen,r,{hasLeftSpacing:t});case"*":return this.stream.next(),D(u.Asterisk,r,{hasLeftSpacing:t});case"+":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.PlusEq,r,{hasLeftSpacing:t})):D(u.Plus,r,{hasLeftSpacing:t});case",":return this.stream.next(),D(u.Comma,r,{hasLeftSpacing:t});case"-":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.MinusEq,r,{hasLeftSpacing:t})):D(u.Minus,r,{hasLeftSpacing:t});case".":return this.stream.next(),D(u.Dot,r,{hasLeftSpacing:t});case"/":if(this.stream.next(),!this.stream.eof&&this.stream.char==="*"){this.stream.next(),this.skipCommentRange();continue}else if(!this.stream.eof&&this.stream.char==="/"){this.stream.next(),this.skipCommentLine();continue}else return D(u.Slash,r,{hasLeftSpacing:t});case":":return this.stream.next(),!this.stream.eof&&this.stream.char===":"?(this.stream.next(),D(u.Colon2,r,{hasLeftSpacing:t})):D(u.Colon,r,{hasLeftSpacing:t});case";":return this.stream.next(),D(u.SemiColon,r,{hasLeftSpacing:t});case"<":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.LtEq,r,{hasLeftSpacing:t})):!this.stream.eof&&this.stream.char===":"?(this.stream.next(),D(u.Out,r,{hasLeftSpacing:t})):D(u.Lt,r,{hasLeftSpacing:t});case"=":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.Eq2,r,{hasLeftSpacing:t})):!this.stream.eof&&this.stream.char===">"?(this.stream.next(),D(u.Arrow,r,{hasLeftSpacing:t})):D(u.Eq,r,{hasLeftSpacing:t});case">":return this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),D(u.GtEq,r,{hasLeftSpacing:t})):D(u.Gt,r,{hasLeftSpacing:t});case"?":return this.stream.next(),D(u.Question,r,{hasLeftSpacing:t});case"@":return this.stream.next(),D(u.At,r,{hasLeftSpacing:t});case"[":return this.stream.next(),D(u.OpenBracket,r,{hasLeftSpacing:t});case"\\":return this.stream.next(),D(u.BackSlash,r,{hasLeftSpacing:t});case"]":return this.stream.next(),D(u.CloseBracket,r,{hasLeftSpacing:t});case"^":return this.stream.next(),D(u.Hat,r,{hasLeftSpacing:t});case"`":return this.readTemplate(t);case"{":return this.stream.next(),D(u.OpenBrace,r,{hasLeftSpacing:t});case"|":return this.stream.next(),!this.stream.eof&&this.stream.char==="|"?(this.stream.next(),D(u.Or2,r,{hasLeftSpacing:t})):D(u.Or,r,{hasLeftSpacing:t});case"}":return this.stream.next(),D(u.CloseBrace,r,{hasLeftSpacing:t});default:{const n=this.tryReadDigits(t);if(n)return n;const s=this.tryReadWord(t);if(s)return s;throw new X(`invalid character: "${this.stream.char}"`,r)}}break}}tryReadWord(t){let r="";const n=this.stream.getPos();for(;!this.stream.eof&&Wc.test(this.stream.char);)r+=this.stream.char,this.stream.next();if(r.length!==0)switch(r){case"null":return D(u.NullKeyword,n,{hasLeftSpacing:t});case"true":return D(u.TrueKeyword,n,{hasLeftSpacing:t});case"false":return D(u.FalseKeyword,n,{hasLeftSpacing:t});case"each":return D(u.EachKeyword,n,{hasLeftSpacing:t});case"for":return D(u.ForKeyword,n,{hasLeftSpacing:t});case"loop":return D(u.LoopKeyword,n,{hasLeftSpacing:t});case"do":return D(u.DoKeyword,n,{hasLeftSpacing:t});case"while":return D(u.WhileKeyword,n,{hasLeftSpacing:t});case"break":return D(u.BreakKeyword,n,{hasLeftSpacing:t});case"continue":return D(u.ContinueKeyword,n,{hasLeftSpacing:t});case"match":return D(u.MatchKeyword,n,{hasLeftSpacing:t});case"case":return D(u.CaseKeyword,n,{hasLeftSpacing:t});case"default":return D(u.DefaultKeyword,n,{hasLeftSpacing:t});case"if":return D(u.IfKeyword,n,{hasLeftSpacing:t});case"elif":return D(u.ElifKeyword,n,{hasLeftSpacing:t});case"else":return D(u.ElseKeyword,n,{hasLeftSpacing:t});case"return":return D(u.ReturnKeyword,n,{hasLeftSpacing:t});case"eval":return D(u.EvalKeyword,n,{hasLeftSpacing:t});case"var":return D(u.VarKeyword,n,{hasLeftSpacing:t});case"let":return D(u.LetKeyword,n,{hasLeftSpacing:t});case"exists":return D(u.ExistsKeyword,n,{hasLeftSpacing:t});default:return D(u.Identifier,n,{hasLeftSpacing:t,value:r})}}tryReadDigits(t){let r="",n="";const s=this.stream.getPos();for(;!this.stream.eof&&Ri.test(this.stream.char);)r+=this.stream.char,this.stream.next();if(r.length===0)return;if(!this.stream.eof&&this.stream.char==="."){for(this.stream.next();!this.stream.eof&&Ri.test(this.stream.char);)n+=this.stream.char,this.stream.next();if(n.length===0)throw new X("digit expected",s)}let i;return n.length>0?i=r+"."+n:i=r,D(u.NumberLiteral,s,{hasLeftSpacing:t,value:i})}readStringLiteral(t){let r="";const n=this.stream.char;let s="string";const i=this.stream.getPos();for(this.stream.next();s!=="finish";)switch(s){case"string":{if(this.stream.eof)throw new He(i);if(this.stream.char==="\\"){this.stream.next(),s="escape";break}if(this.stream.char===n){this.stream.next(),s="finish";break}r+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new He(i);r+=this.stream.char,this.stream.next(),s="string";break}}return D(u.StringLiteral,i,{hasLeftSpacing:t,value:r})}readTemplate(t){const r=[];let n="",s=[],i="string",o=0;const a=this.stream.getPos();let l=a;for(this.stream.next();i!=="finish";)switch(i){case"string":{if(this.stream.eof)throw new He(a);if(this.stream.char==="\\"){this.stream.next(),i="escape";break}if(this.stream.char==="`"){this.stream.next(),n.length>0&&r.push(D(u.TemplateStringElement,l,{hasLeftSpacing:t,value:n})),i="finish";break}if(this.stream.char==="{"){this.stream.next(),n.length>0&&(r.push(D(u.TemplateStringElement,l,{hasLeftSpacing:t,value:n})),n=""),l=this.stream.getPos(),i="expr";break}n+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new He(a);n+=this.stream.char,this.stream.next(),i="string";break}case"expr":{if(this.stream.eof)throw new He(a);if(Yn.includes(this.stream.char)){this.stream.next();continue}if(this.stream.char==="{"&&o++,this.stream.char==="}"){if(o===0){r.push(D(u.TemplateExprElement,l,{hasLeftSpacing:t,children:s})),l=this.stream.getPos(),s.push(D(u.EOF,l)),s=[],i="string",this.stream.next();break}o--}const c=this.readToken();s.push(c);break}}return D(u.Template,a,{hasLeftSpacing:t,children:r})}skipEmptyLines(){for(;!this.stream.eof;){if(Yn.includes(this.stream.char)||Ii.includes(this.stream.char)){this.stream.next();continue}if(this.stream.char==="/")if(this.stream.next(),!this.stream.eof&&this.stream.char==="*"){this.stream.next(),this.skipCommentRange();continue}else if(!this.stream.eof&&this.stream.char==="/"){this.stream.next(),this.skipCommentLine();continue}else{this.stream.prev();break}break}}skipCommentLine(){for(;!(this.stream.eof||this.stream.char===` +`);)this.stream.next()}skipCommentRange(){for(;;){if(this.stream.eof)throw new He(this.stream.getPos());if(this.stream.char==="*"){if(this.stream.next(),this.stream.eof)throw new He(this.stream.getPos());if(this.stream.char==="/"){this.stream.next();break}continue}this.stream.next()}}}class Gc{source;index;_token;constructor(t){this.source=t,this.index=0,this.load()}get eof(){return this.index>=this.source.length}getToken(){return this.eof?D(u.EOF,{line:-1,column:-1}):this._token}is(t){return this.getTokenKind()===t}getTokenValue(){return this.getToken().value}getTokenKind(){return this.getToken().kind}getPos(){return this.getToken().pos}next(){this.eof||this.index++,this.load()}lookahead(t){return this.index+t0)switch(e.getTokenKind()){case u.Comma:{e.next();break}case u.EOF:throw new He(e.getPos());default:throw new X("separator expected",e.getPos())}const i=tr(e);n.push(i)}e.expect(u.CloseParen),e.next(),e.expect(u.Arrow),e.next();const s=tr(e);return L("fnTypeSource",{typeParams:r,params:n,result:s},t,e.getPos())}function Zc(e){const t=e.getPos();let r;e.is(u.Identifier)?(r=e.getTokenValue(),e.next()):(e.expect(u.NullKeyword),e.next(),r="null");let n;return e.is(u.Lt)&&(e.next(),n=tr(e),e.expect(u.Gt),e.next()),L("namedTypeSource",{name:r,inner:n},t,e.getPos())}function de(e,t){return t?ao(e,!0):Ws(e,0)}const Jn=[{opKind:"postfix",kind:u.OpenParen,bp:20},{opKind:"postfix",kind:u.OpenBracket,bp:20},{opKind:"infix",kind:u.Dot,lbp:18,rbp:19},{opKind:"infix",kind:u.Hat,lbp:17,rbp:16},{opKind:"prefix",kind:u.Plus,bp:14},{opKind:"prefix",kind:u.Minus,bp:14},{opKind:"prefix",kind:u.Not,bp:14},{opKind:"infix",kind:u.Asterisk,lbp:12,rbp:13},{opKind:"infix",kind:u.Slash,lbp:12,rbp:13},{opKind:"infix",kind:u.Percent,lbp:12,rbp:13},{opKind:"infix",kind:u.Plus,lbp:10,rbp:11},{opKind:"infix",kind:u.Minus,lbp:10,rbp:11},{opKind:"infix",kind:u.Lt,lbp:8,rbp:9},{opKind:"infix",kind:u.LtEq,lbp:8,rbp:9},{opKind:"infix",kind:u.Gt,lbp:8,rbp:9},{opKind:"infix",kind:u.GtEq,lbp:8,rbp:9},{opKind:"infix",kind:u.Eq2,lbp:6,rbp:7},{opKind:"infix",kind:u.NotEq,lbp:6,rbp:7},{opKind:"infix",kind:u.And2,lbp:4,rbp:5},{opKind:"infix",kind:u.Or2,lbp:2,rbp:3}];function Xc(e,t){const r=e.getPos(),n=e.getTokenKind();e.next(),e.is(u.BackSlash)&&(e.next(),e.expect(u.NewLine),e.next());const s=Ws(e,t),i=s.loc.end;switch(n){case u.Plus:return s.type==="num"?L("num",{value:s.value},r,i):L("plus",{expr:s},r,i);case u.Minus:return s.type==="num"?L("num",{value:-1*s.value},r,i):L("minus",{expr:s},r,i);case u.Not:return L("not",{expr:s},r,i);default:throw Ct(n,r)}}function Qc(e,t,r){const n=e.getPos(),s=e.getTokenKind();if(e.next(),e.is(u.BackSlash)&&(e.next(),e.expect(u.NewLine),e.next()),s===u.Dot){e.expect(u.Identifier);const i=e.getTokenValue();return e.next(),L("prop",{target:t,name:i},n,e.getPos())}else{const i=Ws(e,r),o=e.getPos();switch(s){case u.Hat:return L("pow",{left:t,right:i},n,o);case u.Asterisk:return L("mul",{left:t,right:i},n,o);case u.Slash:return L("div",{left:t,right:i},n,o);case u.Percent:return L("rem",{left:t,right:i},n,o);case u.Plus:return L("add",{left:t,right:i},n,o);case u.Minus:return L("sub",{left:t,right:i},n,o);case u.Lt:return L("lt",{left:t,right:i},n,o);case u.LtEq:return L("lteq",{left:t,right:i},n,o);case u.Gt:return L("gt",{left:t,right:i},n,o);case u.GtEq:return L("gteq",{left:t,right:i},n,o);case u.Eq2:return L("eq",{left:t,right:i},n,o);case u.NotEq:return L("neq",{left:t,right:i},n,o);case u.And2:return L("and",{left:t,right:i},n,o);case u.Or2:return L("or",{left:t,right:i},n,o);default:throw Ct(s,n)}}}function ef(e,t){const r=e.getPos(),n=e.getTokenKind();switch(n){case u.OpenParen:return tf(e,t);case u.OpenBracket:{e.next();const s=de(e,!1);return e.expect(u.CloseBracket),e.next(),L("index",{target:t,index:s},r,e.getPos())}default:throw Ct(n,r)}}function ao(e,t){const r=e.getPos();switch(e.getTokenKind()){case u.IfKeyword:{if(t)break;return nf(e)}case u.At:{if(t)break;return sf(e)}case u.MatchKeyword:{if(t)break;return af(e)}case u.EvalKeyword:{if(t)break;return of(e)}case u.ExistsKeyword:{if(t)break;return lf(e)}case u.Template:{const n=[];if(t)break;for(const[s,i]of e.getToken().children.entries())switch(i.kind){case u.TemplateStringElement:{const o=e.getToken().children[s+1]??e.lookahead(1);n.push(L("str",{value:i.value},i.pos,o.pos));break}case u.TemplateExprElement:{const o=new Gc(i.children);o.is(u.NewLine)&&o.next();const a=de(o,!1);o.is(u.NewLine)&&o.next(),o.expect(u.EOF),n.push(a);break}default:throw Ct(i.kind,i.pos)}return e.next(),L("tmpl",{tmpl:n},r,e.getPos())}case u.StringLiteral:{const n=e.getTokenValue();return e.next(),L("str",{value:n},r,e.getPos())}case u.NumberLiteral:{const n=Number(e.getTokenValue());return e.next(),L("num",{value:n},r,e.getPos())}case u.TrueKeyword:case u.FalseKeyword:{const n=e.is(u.TrueKeyword);return e.next(),L("bool",{value:n},r,e.getPos())}case u.NullKeyword:return e.next(),L("null",{},r,e.getPos());case u.OpenBrace:return uf(e,t);case u.OpenBracket:return cf(e,t);case u.Identifier:{if(t)break;return oo(e)}case u.OpenParen:{e.next();const n=de(e,t);return e.expect(u.CloseParen),e.next(),n}case u.Sharp:return rf(e)}throw Ct(e.getTokenKind(),r)}function tf(e,t){const r=e.getPos(),n=[];for(e.expect(u.OpenParen),e.next(),e.is(u.NewLine)&&e.next();!e.is(u.CloseParen);)switch(n.push(de(e,!1)),e.getTokenKind()){case u.NewLine:{e.next();break}case u.Comma:{e.next(),e.is(u.NewLine)&&e.next();break}case u.CloseParen:break;case u.EOF:throw new He(e.getPos());default:throw new X("separator expected",e.getPos())}return e.expect(u.CloseParen),e.next(),L("call",{target:t,args:n},r,e.getPos())}function rf(e){const t=$n(e);e.expect(u.Colon),e.next();const r=de(e,!1);switch(r.type){case"if":case"match":case"block":return r.label=t,r;default:throw new X("cannot use label for expression other than eval / if / match",r.loc.start)}}function nf(e){const t=e.getPos();e.expect(u.IfKeyword),e.next();const r=de(e,!1),n=xt(e);e.is(u.NewLine)&&[u.ElifKeyword,u.ElseKeyword].includes(e.lookahead(1).kind)&&e.next();const s=[];for(;e.is(u.ElifKeyword);){e.next();const o=de(e,!1),a=xt(e);e.is(u.NewLine)&&[u.ElifKeyword,u.ElseKeyword].includes(e.lookahead(1).kind)&&e.next(),s.push({cond:o,then:a})}let i;return e.is(u.ElseKeyword)&&(e.next(),i=xt(e)),L("if",{cond:r,then:n,elseif:s,else:i},t,e.getPos())}function sf(e){const t=e.getPos();e.expect(u.At),e.next();let r;e.is(u.Lt)?r=Vs(e):r=[];const n=lo(e);let s;e.is(u.Colon)&&(e.next(),s=tr(e));const i=Wr(e);return L("fn",{typeParams:r,params:n,retType:s,children:i},t,e.getPos())}function af(e){const t=e.getPos();e.expect(u.MatchKeyword),e.next();const r=de(e,!1);e.expect(u.OpenBrace),e.next(),e.is(u.NewLine)&&e.next();const n=[];let s;if(e.is(u.CaseKeyword)){n.push(Li(e));let i=kr(e);for(;e.is(u.CaseKeyword);){if(!i)throw new X("separator expected",e.getPos());n.push(Li(e)),i=kr(e)}if(e.is(u.DefaultKeyword)){if(!i)throw new X("separator expected",e.getPos());s=Ui(e),kr(e)}}else e.is(u.DefaultKeyword)&&(s=Ui(e),kr(e));return e.expect(u.CloseBrace),e.next(),L("match",{about:r,qs:n,default:s},t,e.getPos())}function Li(e){e.expect(u.CaseKeyword),e.next();const t=de(e,!1);e.expect(u.Arrow),e.next();const r=xt(e);return{q:t,a:r}}function Ui(e){return e.expect(u.DefaultKeyword),e.next(),e.expect(u.Arrow),e.next(),xt(e)}function of(e){const t=e.getPos();e.expect(u.EvalKeyword),e.next();const r=Wr(e);return L("block",{statements:r},t,e.getPos())}function lf(e){const t=e.getPos();e.expect(u.ExistsKeyword),e.next();const r=oo(e);return L("exists",{identifier:r},t,e.getPos())}function oo(e){const t=e.getPos(),r=[];for(;;){if(r.length>0)if(e.is(u.Colon)){if(e.getToken().hasLeftSpacing)throw new X("Cannot use spaces in a reference.",e.getPos());if(e.next(),e.getToken().hasLeftSpacing)throw new X("Cannot use spaces in a reference.",e.getPos())}else break;e.expect(u.Identifier),r.push(e.getTokenValue()),e.next()}return L("identifier",{name:r.join(":")},t,e.getPos())}function uf(e,t){const r=e.getPos();for(e.expect(u.OpenBrace),e.next();e.is(u.NewLine);)e.next();const n=new Map;for(;!e.is(u.CloseBrace);){const s=e.getTokenKind();if(s!==u.Identifier&&s!==u.StringLiteral)throw Ct(s,e.getPos());const i=e.getTokenValue();e.next(),e.expect(u.Colon),e.next();const o=de(e,t);switch(n.set(i,o),e.getTokenKind()){case u.NewLine:case u.Comma:{for(e.next();e.is(u.NewLine);)e.next();break}case u.CloseBrace:break;case u.EOF:throw new He(e.getPos());default:throw new X("separator expected",e.getPos())}}return e.expect(u.CloseBrace),e.next(),L("obj",{value:n},r,e.getPos())}function cf(e,t){const r=e.getPos();for(e.expect(u.OpenBracket),e.next();e.is(u.NewLine);)e.next();const n=[];for(;!e.is(u.CloseBracket);)switch(n.push(de(e,t)),e.getTokenKind()){case u.NewLine:case u.Comma:{for(e.next();e.is(u.NewLine);)e.next();break}case u.CloseBracket:break;case u.EOF:throw new He(e.getPos());default:throw new X("separator expected",e.getPos())}return e.expect(u.CloseBracket),e.next(),L("arr",{value:n},r,e.getPos())}function Ws(e,t){let r;const n=e.getTokenKind(),s=Jn.find(i=>i.opKind==="prefix"&&i.kind===n);for(s!=null?r=Xc(e,s.bp):r=ao(e,!1);;){e.is(u.BackSlash)&&(e.next(),e.expect(u.NewLine),e.next());const i=e.getTokenKind(),o=Jn.find(l=>l.opKind==="postfix"&&l.kind===i);if(o!=null){if(o.bpl.opKind==="infix"&&l.kind===i);if(a!=null){if(a.lbpZ(s,t,r)),n.expr=Z(n.expr,t,r);break}case"return":{n.expr=Z(n.expr,t,r);break}case"each":{n.items=Z(n.items,t,r),n.for=Z(n.for,t,r);break}case"for":{n.from!=null&&(n.from=Z(n.from,t,r)),n.to!=null&&(n.to=Z(n.to,t,r)),n.times!=null&&(n.times=Z(n.times,t,r)),n.for=Z(n.for,t,r);break}case"loop":{for(let s=0;s=0;r--){const n=e[r];switch(n.type){case"loop":case"for":case"each":{if(t!=null&&t!==n.label)continue;return n}case"if":case"match":case"block":{if(t==null||t!==n.label)continue;return n}case"fn":return}}}function Sf(e,t){switch(e.type){case"return":{if(!t.some(({type:r})=>r==="fn"))throw new X("return must be inside function",e.loc.start);break}case"break":{const r=Hi(t,e.label);if(r==null)throw e.label!=null?new X(`label "${e.label}" is not defined`,e.loc.start):new X("unlabeled break must be inside for / each / while / do-while / loop",e.loc.start);switch(r.type){case"each":{if(t.includes(r.items))throw new X("break corresponding to each is not allowed in the target",e.loc.start);break}case"for":{if(r.times!=null&&t.includes(r.times))throw new X("break corresponding to for is not allowed in the count",e.loc.start);if(t.some(n=>n===r.from||n===r.to))throw new X("break corresponding to for is not allowed in the range",e.loc.start);break}case"if":{if(t.includes(r.cond)||r.elseif.some(({cond:n})=>t.includes(n)))throw new X("break corresponding to if is not allowed in the condition",e.loc.start);break}case"match":{if(t.includes(r.about))throw new X("break corresponding to match is not allowed in the target",e.loc.start);if(r.qs.some(({q:n})=>t.includes(n)))throw new X("break corresponding to match is not allowed in the pattern",e.loc.start);break}}if(e.expr!=null)switch(r.type){case"if":case"match":case"block":break;default:throw new X("break corresponding to statement cannot include value",e.loc.start)}break}case"continue":{const r=Hi(t,e.label);if(r==null)throw e.label!=null?new X(`label "${e.label}" is not defined`,e.loc.start):new X("continue must be inside for / each / while / do-while / loop",e.loc.start);switch(r.type){case"each":{if(t.includes(r.items))throw new X("continue corresponding to each is not allowed in the target",e.loc.start);break}case"for":{if(r.times!=null&&t.includes(r.times))throw new X("continue corresponding to for is not allowed in the count",e.loc.start);if(t.some(n=>n===r.from||n===r.to))throw new X("continue corresponding to for is not allowed in the range",e.loc.start);break}case"if":throw new X("cannot use continue for if",e.loc.start);case"match":throw new X("cannot use continue for match",e.loc.start);case"block":throw new X("cannot use continue for eval",e.loc.start)}break}}return e}function Ff(e){for(const t of e)Bn(t,Sf);return e}const it=["as","async","attr","attribute","await","catch","class","component","constructor","dictionary","enum","export","finally","fn","hash","in","interface","out","private","public","ref","static","struct","table","this","throw","trait","try","undefined","use","using","when","yield","import","is","meta","module","namespace","new"];function Ve(e,t){throw new X(`Reserved word "${e}" cannot be used as variable name.`,t.start)}function Zn(e){return Bn(e,t=>{switch(t.type){case"null":{Ve(t.type,t.loc);break}case"bool":{Ve(`${t.value}`,t.loc);break}case"identifier":{it.includes(t.name)&&Ve(t.name,t.loc);break}}return t})}function ji(e){for(const t of e.typeParams)it.includes(t.name)&&Ve(t.name,e.loc)}function kf(e){switch(e.type){case"def":{Zn(e.dest);break}case"ns":case"attr":case"identifier":case"prop":{it.includes(e.name)&&Ve(e.name,e.loc);break}case"meta":{e.name!=null&&it.includes(e.name)&&Ve(e.name,e.loc);break}case"each":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc),Zn(e.var);break}case"for":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc),e.var!=null&&it.includes(e.var)&&Ve(e.var,e.loc);break}case"loop":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc);break}case"break":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc);break}case"continue":{e.label!=null&&it.includes(e.label)&&Ve(e.label,e.loc);break}case"fn":{ji(e);for(const t of e.params)Zn(t.dest);break}case"obj":{for(const t of e.value.keys())it.includes(t)&&Ve(t,e.loc);break}case"namedTypeSource":{it.includes(e.name)&&Ve(e.name,e.loc);break}case"fnTypeSource":{ji(e);break}}return e}function Mf(e){for(const t of e)Bn(t,kf);return e}function qi(e){return{type:"simple",name:e}}function Of(e,t){return{type:"generic",name:e,inners:t}}function $f(e,t){return{type:"fn",params:e,result:t}}function Bf(e){return{type:"param",name:e}}function Tf(e){return{type:"union",inners:e}}function cn(e){switch(e.type){case"namedTypeSource":if(e.inner){const t=cn(e.inner);return`${e.name}<${t}>`}else return e.name;case"fnTypeSource":{const t=e.params.map(n=>cn(n)).join(", "),r=cn(e.result);return`@(${t}) { ${r} }`}case"unionTypeSource":return e.inners.map(t=>Nt(t)).join(" | ")}}function Nt(e,t){if(e.type==="namedTypeSource"){const r=t?.find(n=>n.name===e.name);if(r!=null)return Bf(r.name);switch(e.name){case"null":case"bool":case"num":case"str":case"error":case"never":case"any":case"void":{if(e.inner==null)return qi(e.name);break}case"arr":case"obj":{let n;return e.inner!=null?n=Nt(e.inner,t):n=qi("any"),Of(e.name,[n])}}throw new X(`Unknown type: '${cn(e)}'`,e.loc.start)}else if(e.type==="fnTypeSource"){let r=e.typeParams;t!=null&&(r=r.concat(t));const n=e.params.map(s=>Nt(s,r));return $f(n,Nt(e.result,r))}else{const r=e.inners.map(n=>Nt(n,t));return Tf(r)}}function Xn(e,t){const r=[];if(e.type==="fn"){const n=new Set;for(const s of e.typeParams){if(n.has(s.name))throw new Error(`type parameter name ${s.name} is duplicate`);n.add(s.name)}r.push(...e.typeParams)}for(let n=t.length-1;n>=0;n--){const s=t[n];s.type==="fn"&&r.push(...s.typeParams)}return r}function If(e,t){switch(e.type){case"def":{e.varType!=null&&Nt(e.varType,Xn(e,t));break}case"fn":{for(const r of e.params)r.argType!=null&&Nt(r.argType,Xn(e,t));e.retType!=null&&Nt(e.retType,Xn(e,t));break}}return e}function Rf(e){for(const t of e)Bn(t,If);return e}class pr{static instance;plugins;constructor(){this.plugins={validate:[Mf,Rf,Ff],transform:[]}}static parse(t){return pr.instance==null&&(pr.instance=new pr),pr.instance.parse(t)}addPlugin(t,r){switch(t){case"validate":this.plugins.validate.push(r);break;case"transform":this.plugins.transform.push(r);break;default:throw new Error("unknown plugin type")}}parse(t){let r;const n=new zc(t);r=Pf(n);for(const s of this.plugins.validate)r=s(r);for(const s of this.plugins.transform)r=s(r);return r}}function Rr(){return Rr=Object.assign||function(e){for(var t=1;t";return t},lineNumbersCount:function(){var t=this.codeData.split(/\r\n|\n/).length;return t}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var t=this.$refs.pre,r=this.$el.querySelector(".prism-editor__line-numbers"),n=window.getComputedStyle(t);this.$nextTick(function(){var s="border-top-left-radius",i="border-bottom-left-radius";if(r){r.style[s]=n[s],r.style[i]=n[i],t.style[s]="0",t.style[i]="0";var o=["background-color","margin-top","padding-top","font-family","font-size","line-height"];o.forEach(function(a){r.style[a]=n[a]}),r.style["margin-bottom"]="-"+n["padding-top"]}})}},_recordCurrentState:function(){var t=this.$refs.textarea;if(t){var r=t.value,n=t.selectionStart,s=t.selectionEnd;this._recordChange({value:r,selectionStart:n,selectionEnd:s})}},_getLines:function(t,r){return t.substring(0,r).split(` `)},_applyEdits:function(t){var r=this.$refs.textarea,n=this.history.stack[this.history.offset];n&&r&&(this.history.stack[this.history.offset]=Rr({},n,{selectionStart:r.selectionStart,selectionEnd:r.selectionEnd})),this._recordChange(t),this._updateInput(t)},_recordChange:function(t,r){r===void 0&&(r=!1);var n=this.history,s=n.stack,i=n.offset;if(s.length&&i>-1){this.history.stack=s.slice(0,i+1);var o=this.history.stack.length;if(o>Gi){var a=o-Gi;this.history.stack=s.slice(a,o),this.history.offset=Math.max(this.history.offset-a,0)}}var l=Date.now();if(r){var c=this.history.stack[this.history.offset];if(c&&l-c.timestamp=h&&me<=v&&ne.startsWith(c)?ne.substring(c.length):ne}).join(` `);if(o!==x){var k=f[h];this._applyEdits({value:x,selectionStart:k.startsWith(c)?a-c.length:a,selectionEnd:l-(o.length-x.length)})}}else if(a!==l){var T=this._getLines(o,a),j=T.length-1,H=this._getLines(o,l).length-1,m=T[j];this._applyEdits({value:o.split(` @@ -33,16 +33,16 @@ * @namespace * @public */var r=function(n){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,o={},a={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function m(p){return p instanceof l?new l(p.type,m(p.content),p.alias):Array.isArray(p)?p.map(m):p.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(y){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack)||[])[1];if(m){var p=document.getElementsByTagName("script");for(var d in p)if(p[d].src==m)return p[d]}return null}},isActive:function(m,p,d){for(var y="no-"+p;m;){var b=m.classList;if(b.contains(p))return!0;if(b.contains(y))return!1;m=m.parentElement}return!!d}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(m,p){var d=a.util.clone(a.languages[m]);for(var y in p)d[y]=p[y];return d},insertBefore:function(m,p,d,y){y=y||a.languages;var b=y[m],E={};for(var M in b)if(b.hasOwnProperty(M)){if(M==p)for(var P in d)d.hasOwnProperty(P)&&(E[P]=d[P]);d.hasOwnProperty(M)||(E[M]=b[M])}var q=y[m];return y[m]=E,a.languages.DFS(a.languages,function(K,ne){ne===q&&K!=m&&(this[K]=E)}),E},DFS:function m(p,d,y,b){b=b||{};var E=a.util.objId;for(var M in p)if(p.hasOwnProperty(M)){d.call(p,M,p[M],y||M);var P=p[M],q=a.util.type(P);q==="Object"&&!b[E(P)]?(b[E(P)]=!0,m(P,d,null,b)):q==="Array"&&!b[E(P)]&&(b[E(P)]=!0,m(P,d,M,b))}}},plugins:{},highlightAll:function(m,p){a.highlightAllUnder(document,m,p)},highlightAllUnder:function(m,p,d){var y={callback:d,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",y),y.elements=Array.prototype.slice.apply(y.container.querySelectorAll(y.selector)),a.hooks.run("before-all-elements-highlight",y);for(var b=0,E;E=y.elements[b++];)a.highlightElement(E,p===!0,y.callback)},highlightElement:function(m,p,d){var y=a.util.getLanguage(m),b=a.languages[y];a.util.setLanguage(m,y);var E=m.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(E,y);var M=m.textContent,P={element:m,language:y,grammar:b,code:M};function q(ne){P.highlightedCode=ne,a.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,a.hooks.run("after-highlight",P),a.hooks.run("complete",P),d&&d.call(P.element)}if(a.hooks.run("before-sanity-check",P),E=P.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!P.code){a.hooks.run("complete",P),d&&d.call(P.element);return}if(a.hooks.run("before-highlight",P),!P.grammar){q(a.util.encode(P.code));return}if(p&&n.Worker){var K=new Worker(a.filename);K.onmessage=function(ne){q(ne.data)},K.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else q(a.highlight(P.code,P.grammar,P.language))},highlight:function(m,p,d){var y={code:m,grammar:p,language:d};if(a.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=a.tokenize(y.code,y.grammar),a.hooks.run("after-tokenize",y),l.stringify(a.util.encode(y.tokens),y.language)},tokenize:function(m,p){var d=p.rest;if(d){for(var y in d)p[y]=d[y];delete p.rest}var b=new h;return v(b,b.head,m),f(m,b,p,b.head,0),k(b)},hooks:{all:{},add:function(m,p){var d=a.hooks.all;d[m]=d[m]||[],d[m].push(p)},run:function(m,p){var d=a.hooks.all[m];if(!(!d||!d.length))for(var y=0,b;b=d[y++];)b(p)}},Token:l};n.Prism=a;function l(m,p,d,y){this.type=m,this.content=p,this.alias=d,this.length=(y||"").length|0}l.stringify=function m(p,d){if(typeof p=="string")return p;if(Array.isArray(p)){var y="";return p.forEach(function(q){y+=m(q,d)}),y}var b={type:p.type,content:m(p.content,d),tag:"span",classes:["token",p.type],attributes:{},language:d},E=p.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(b.classes,E):b.classes.push(E)),a.hooks.run("wrap",b);var M="";for(var P in b.attributes)M+=" "+P+'="'+(b.attributes[P]||"").replace(/"/g,""")+'"';return"<"+b.tag+' class="'+b.classes.join(" ")+'"'+M+">"+b.content+""};function c(m,p,d,y){m.lastIndex=p;var b=m.exec(d);if(b&&y&&b[1]){var E=b[1].length;b.index+=E,b[0]=b[0].slice(E)}return b}function f(m,p,d,y,b,E){for(var M in d)if(!(!d.hasOwnProperty(M)||!d[M])){var P=d[M];P=Array.isArray(P)?P:[P];for(var q=0;q=E.reach);he+=V.value.length,V=V.next){var Se=V.value;if(p.length>m.length)return;if(!(Se instanceof l)){var Oe=1,ae;if(Ae){if(ae=c(fe,he,m,me),!ae||ae.index>=m.length)break;var Le=ae.index,ir=ae.index+ae[0].length,Pe=he;for(Pe+=V.value.length;Le>=Pe;)V=V.next,Pe+=V.value.length;if(Pe-=V.value.length,he=Pe,V.value instanceof l)continue;for(var Ge=V;Ge!==p.tail&&(PeE.reach&&(E.reach=Ye);var st=V.prev;ct&&(st=v(p,st,ct),he+=ct.length),x(p,st,Oe);var ar=new l(M,ne?a.tokenize(Ke,ne):Ke,ut,Ke);if(V=v(p,st,ar),Bt&&v(p,V,Bt),Oe>1){var g={cause:M+","+q,reach:Ye};f(m,p,d,V.prev,he,g),E&&g.reach>E.reach&&(E.reach=g.reach)}}}}}}function h(){var m={value:null,prev:null,next:null},p={value:null,prev:m,next:null};m.next=p,this.head=m,this.tail=p,this.length=0}function v(m,p,d){var y=p.next,b={value:d,prev:p,next:y};return p.next=b,y.prev=b,m.length++,b}function x(m,p,d){for(var y=p.next,b=0;b/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(s,i){var o={};o["language-"+i]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[i]},o.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:o}};a["language-"+i]={pattern:/[\s\S]+/,inside:r.languages[i]};var l={};l[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:a},r.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,s){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:r.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(n){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var i=n.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",s=function(T,j){return"✖ Error "+T+" while fetching file: "+j},i="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",c="loaded",f="failed",h="pre[data-src]:not(["+a+'="'+c+'"]):not(['+a+'="'+l+'"])';function v(T,j,H){var m=new XMLHttpRequest;m.open("GET",T,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?j(m.responseText):m.status>=400?H(s(m.status,m.statusText)):H(i))},m.send(null)}function x(T){var j=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(T||"");if(j){var H=Number(j[1]),m=j[2],p=j[3];return m?p?[H,Number(p)]:[H,void 0]:[H,H]}}r.hooks.add("before-highlightall",function(T){T.selector+=", "+h}),r.hooks.add("before-sanity-check",function(T){var j=T.element;if(j.matches(h)){T.code="",j.setAttribute(a,l);var H=j.appendChild(document.createElement("CODE"));H.textContent=n;var m=j.getAttribute("data-src"),p=T.language;if(p==="none"){var d=(/\.(\w+)$/.exec(m)||[,"none"])[1];p=o[d]||d}r.util.setLanguage(H,p),r.util.setLanguage(j,p);var y=r.plugins.autoloader;y&&y.loadLanguages(p),v(m,function(b){j.setAttribute(a,c);var E=x(j.getAttribute("data-range"));if(E){var M=b.split(/\r\n?|\n/g),P=E[0],q=E[1]==null?M.length:E[1];P<0&&(P+=M.length),P=Math.max(0,Math.min(P-1,M.length)),q<0&&(q+=M.length),q=Math.max(0,Math.min(q,M.length)),b=M.slice(P,q).join(` -`),j.hasAttribute("data-start")||j.setAttribute("data-start",String(P+1))}H.textContent=b,r.highlightElement(H)},function(b){j.setAttribute(a,f),H.textContent=b})}}),r.plugins.fileHighlight={highlight:function(j){for(var H=(j||document).querySelectorAll(h),m=0,p;p=H[m++];)r.highlightElement(p)}};var k=!1;r.fileHighlight=function(){k||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),k=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Wf);var ho={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** +`),j.hasAttribute("data-start")||j.setAttribute("data-start",String(P+1))}H.textContent=b,r.highlightElement(H)},function(b){j.setAttribute(a,f),H.textContent=b})}}),r.plugins.fileHighlight={highlight:function(j){for(var H=(j||document).querySelectorAll(h),m=0,p;p=H[m++];)r.highlightElement(p)}};var k=!1;r.fileHighlight=function(){k||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),k=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Wf);var po={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** * Prism: Lightweight, robust, elegant syntax highlighting * * @license MIT * @author Lea Verou * @namespace * @public - */var r=function(n){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,o={},a={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function m(p){return p instanceof l?new l(p.type,m(p.content),p.alias):Array.isArray(p)?p.map(m):p.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(y){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack)||[])[1];if(m){var p=document.getElementsByTagName("script");for(var d in p)if(p[d].src==m)return p[d]}return null}},isActive:function(m,p,d){for(var y="no-"+p;m;){var b=m.classList;if(b.contains(p))return!0;if(b.contains(y))return!1;m=m.parentElement}return!!d}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(m,p){var d=a.util.clone(a.languages[m]);for(var y in p)d[y]=p[y];return d},insertBefore:function(m,p,d,y){y=y||a.languages;var b=y[m],E={};for(var M in b)if(b.hasOwnProperty(M)){if(M==p)for(var P in d)d.hasOwnProperty(P)&&(E[P]=d[P]);d.hasOwnProperty(M)||(E[M]=b[M])}var q=y[m];return y[m]=E,a.languages.DFS(a.languages,function(K,ne){ne===q&&K!=m&&(this[K]=E)}),E},DFS:function m(p,d,y,b){b=b||{};var E=a.util.objId;for(var M in p)if(p.hasOwnProperty(M)){d.call(p,M,p[M],y||M);var P=p[M],q=a.util.type(P);q==="Object"&&!b[E(P)]?(b[E(P)]=!0,m(P,d,null,b)):q==="Array"&&!b[E(P)]&&(b[E(P)]=!0,m(P,d,M,b))}}},plugins:{},highlightAll:function(m,p){a.highlightAllUnder(document,m,p)},highlightAllUnder:function(m,p,d){var y={callback:d,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",y),y.elements=Array.prototype.slice.apply(y.container.querySelectorAll(y.selector)),a.hooks.run("before-all-elements-highlight",y);for(var b=0,E;E=y.elements[b++];)a.highlightElement(E,p===!0,y.callback)},highlightElement:function(m,p,d){var y=a.util.getLanguage(m),b=a.languages[y];a.util.setLanguage(m,y);var E=m.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(E,y);var M=m.textContent,P={element:m,language:y,grammar:b,code:M};function q(ne){P.highlightedCode=ne,a.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,a.hooks.run("after-highlight",P),a.hooks.run("complete",P),d&&d.call(P.element)}if(a.hooks.run("before-sanity-check",P),E=P.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!P.code){a.hooks.run("complete",P),d&&d.call(P.element);return}if(a.hooks.run("before-highlight",P),!P.grammar){q(a.util.encode(P.code));return}if(p&&n.Worker){var K=new Worker(a.filename);K.onmessage=function(ne){q(ne.data)},K.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else q(a.highlight(P.code,P.grammar,P.language))},highlight:function(m,p,d){var y={code:m,grammar:p,language:d};if(a.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=a.tokenize(y.code,y.grammar),a.hooks.run("after-tokenize",y),l.stringify(a.util.encode(y.tokens),y.language)},tokenize:function(m,p){var d=p.rest;if(d){for(var y in d)p[y]=d[y];delete p.rest}var b=new h;return v(b,b.head,m),f(m,b,p,b.head,0),k(b)},hooks:{all:{},add:function(m,p){var d=a.hooks.all;d[m]=d[m]||[],d[m].push(p)},run:function(m,p){var d=a.hooks.all[m];if(!(!d||!d.length))for(var y=0,b;b=d[y++];)b(p)}},Token:l};n.Prism=a;function l(m,p,d,y){this.type=m,this.content=p,this.alias=d,this.length=(y||"").length|0}l.stringify=function m(p,d){if(typeof p=="string")return p;if(Array.isArray(p)){var y="";return p.forEach(function(q){y+=m(q,d)}),y}var b={type:p.type,content:m(p.content,d),tag:"span",classes:["token",p.type],attributes:{},language:d},E=p.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(b.classes,E):b.classes.push(E)),a.hooks.run("wrap",b);var M="";for(var P in b.attributes)M+=" "+P+'="'+(b.attributes[P]||"").replace(/"/g,""")+'"';return"<"+b.tag+' class="'+b.classes.join(" ")+'"'+M+">"+b.content+""};function c(m,p,d,y){m.lastIndex=p;var b=m.exec(d);if(b&&y&&b[1]){var E=b[1].length;b.index+=E,b[0]=b[0].slice(E)}return b}function f(m,p,d,y,b,E){for(var M in d)if(!(!d.hasOwnProperty(M)||!d[M])){var P=d[M];P=Array.isArray(P)?P:[P];for(var q=0;q=E.reach);he+=V.value.length,V=V.next){var Se=V.value;if(p.length>m.length)return;if(!(Se instanceof l)){var Oe=1,ae;if(Ae){if(ae=c(fe,he,m,me),!ae||ae.index>=m.length)break;var Le=ae.index,ir=ae.index+ae[0].length,Pe=he;for(Pe+=V.value.length;Le>=Pe;)V=V.next,Pe+=V.value.length;if(Pe-=V.value.length,he=Pe,V.value instanceof l)continue;for(var Ge=V;Ge!==p.tail&&(PeE.reach&&(E.reach=Ye);var st=V.prev;ct&&(st=v(p,st,ct),he+=ct.length),x(p,st,Oe);var ar=new l(M,ne?a.tokenize(Ke,ne):Ke,ut,Ke);if(V=v(p,st,ar),Bt&&v(p,V,Bt),Oe>1){var g={cause:M+","+q,reach:Ye};f(m,p,d,V.prev,he,g),E&&g.reach>E.reach&&(E.reach=g.reach)}}}}}}function h(){var m={value:null,prev:null,next:null},p={value:null,prev:m,next:null};m.next=p,this.head=m,this.tail=p,this.length=0}function v(m,p,d){var y=p.next,b={value:d,prev:p,next:y};return p.next=b,y.prev=b,m.length++,b}function x(m,p,d){for(var y=p.next,b=0;b]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;const zf={id:"settings-body"},Gf={class:"settings-item"},Yf={class:"settings-item"},Jf=["disabled"],vs=mt(5),hr=mt("time"),bn=mt({irqRate:300,irqSleep:Xa(()=>({time:vs.value,requestIdleCallback:()=>new Promise(e=>requestIdleCallback(e))})[hr.value])}),Zf={__name:"Settings",emits:["exit"],setup(e,{emit:t}){const r=mt(null);return(n,s)=>(St(),zt("div",{ref_key:"bg",ref:r,id:"settings-bg",onClick:s[4]||(s[4]=i=>i.target===r.value&&n.$emit("exit"))},[ee("div",zf,[ee("div",Gf,[s[5]||(s[5]=ee("header",null,"IRQ Rate",-1)),Zr(ee("input",{type:"number","onUpdate:modelValue":s[0]||(s[0]=i=>bn.value.irqRate=i)},null,512),[[Pi,bn.value.irqRate]])]),ee("div",Yf,[s[8]||(s[8]=ee("header",null,"IRQ Sleep Time",-1)),ee("div",null,[Zr(ee("input",{type:"radio",value:"time","onUpdate:modelValue":s[1]||(s[1]=i=>hr.value=i)},null,512),[[Ai,hr.value]]),s[6]||(s[6]=Jt(" time(milliseconds) ")),Zr(ee("input",{type:"number","onUpdate:modelValue":s[2]||(s[2]=i=>vs.value=i),disabled:hr.value!=="time"},null,8,Jf),[[Pi,vs.value]])]),ee("div",null,[Zr(ee("input",{type:"radio",value:"requestIdleCallback","onUpdate:modelValue":s[3]||(s[3]=i=>hr.value=i)},null,512),[[Ai,hr.value]]),s[7]||(s[7]=Jt(" requestIdleCallback "))])])])],512))}},Xf={id:"root"},Qf={id:"grid1"},eh={id:"editor",class:"container"},th={key:0,class:"syntaxError"},rh={id:"logs",class:"container"},nh={key:0,class:"actions"},sh={key:1,class:"actions"},ih={class:"type"},ah={id:"grid2"},oh={id:"ast",class:"container"},lh={__name:"App",setup(e){const t=mt(window.localStorage.getItem("script")||'<: "Hello, AiScript!"'),r=mt(null),n=mt([]),s=mt(null),i=mt(!1),o=mt(!1);sn(t,()=>{window.localStorage.setItem("script",t.value);try{r.value=pr.parse(t.value),s.value=null}catch(h){s.value=h.message,console.error(h.info);return}},{immediate:!0});const a=()=>{t.value=`for (let i, 100) { + */var r=function(n){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,o={},a={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function m(p){return p instanceof l?new l(p.type,m(p.content),p.alias):Array.isArray(p)?p.map(m):p.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(y){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack)||[])[1];if(m){var p=document.getElementsByTagName("script");for(var d in p)if(p[d].src==m)return p[d]}return null}},isActive:function(m,p,d){for(var y="no-"+p;m;){var b=m.classList;if(b.contains(p))return!0;if(b.contains(y))return!1;m=m.parentElement}return!!d}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(m,p){var d=a.util.clone(a.languages[m]);for(var y in p)d[y]=p[y];return d},insertBefore:function(m,p,d,y){y=y||a.languages;var b=y[m],E={};for(var M in b)if(b.hasOwnProperty(M)){if(M==p)for(var P in d)d.hasOwnProperty(P)&&(E[P]=d[P]);d.hasOwnProperty(M)||(E[M]=b[M])}var q=y[m];return y[m]=E,a.languages.DFS(a.languages,function(K,ne){ne===q&&K!=m&&(this[K]=E)}),E},DFS:function m(p,d,y,b){b=b||{};var E=a.util.objId;for(var M in p)if(p.hasOwnProperty(M)){d.call(p,M,p[M],y||M);var P=p[M],q=a.util.type(P);q==="Object"&&!b[E(P)]?(b[E(P)]=!0,m(P,d,null,b)):q==="Array"&&!b[E(P)]&&(b[E(P)]=!0,m(P,d,M,b))}}},plugins:{},highlightAll:function(m,p){a.highlightAllUnder(document,m,p)},highlightAllUnder:function(m,p,d){var y={callback:d,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",y),y.elements=Array.prototype.slice.apply(y.container.querySelectorAll(y.selector)),a.hooks.run("before-all-elements-highlight",y);for(var b=0,E;E=y.elements[b++];)a.highlightElement(E,p===!0,y.callback)},highlightElement:function(m,p,d){var y=a.util.getLanguage(m),b=a.languages[y];a.util.setLanguage(m,y);var E=m.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(E,y);var M=m.textContent,P={element:m,language:y,grammar:b,code:M};function q(ne){P.highlightedCode=ne,a.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,a.hooks.run("after-highlight",P),a.hooks.run("complete",P),d&&d.call(P.element)}if(a.hooks.run("before-sanity-check",P),E=P.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!P.code){a.hooks.run("complete",P),d&&d.call(P.element);return}if(a.hooks.run("before-highlight",P),!P.grammar){q(a.util.encode(P.code));return}if(p&&n.Worker){var K=new Worker(a.filename);K.onmessage=function(ne){q(ne.data)},K.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else q(a.highlight(P.code,P.grammar,P.language))},highlight:function(m,p,d){var y={code:m,grammar:p,language:d};if(a.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=a.tokenize(y.code,y.grammar),a.hooks.run("after-tokenize",y),l.stringify(a.util.encode(y.tokens),y.language)},tokenize:function(m,p){var d=p.rest;if(d){for(var y in d)p[y]=d[y];delete p.rest}var b=new h;return v(b,b.head,m),f(m,b,p,b.head,0),k(b)},hooks:{all:{},add:function(m,p){var d=a.hooks.all;d[m]=d[m]||[],d[m].push(p)},run:function(m,p){var d=a.hooks.all[m];if(!(!d||!d.length))for(var y=0,b;b=d[y++];)b(p)}},Token:l};n.Prism=a;function l(m,p,d,y){this.type=m,this.content=p,this.alias=d,this.length=(y||"").length|0}l.stringify=function m(p,d){if(typeof p=="string")return p;if(Array.isArray(p)){var y="";return p.forEach(function(q){y+=m(q,d)}),y}var b={type:p.type,content:m(p.content,d),tag:"span",classes:["token",p.type],attributes:{},language:d},E=p.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(b.classes,E):b.classes.push(E)),a.hooks.run("wrap",b);var M="";for(var P in b.attributes)M+=" "+P+'="'+(b.attributes[P]||"").replace(/"/g,""")+'"';return"<"+b.tag+' class="'+b.classes.join(" ")+'"'+M+">"+b.content+""};function c(m,p,d,y){m.lastIndex=p;var b=m.exec(d);if(b&&y&&b[1]){var E=b[1].length;b.index+=E,b[0]=b[0].slice(E)}return b}function f(m,p,d,y,b,E){for(var M in d)if(!(!d.hasOwnProperty(M)||!d[M])){var P=d[M];P=Array.isArray(P)?P:[P];for(var q=0;q=E.reach);he+=V.value.length,V=V.next){var Se=V.value;if(p.length>m.length)return;if(!(Se instanceof l)){var Oe=1,ae;if(Ae){if(ae=c(fe,he,m,me),!ae||ae.index>=m.length)break;var Le=ae.index,ir=ae.index+ae[0].length,Pe=he;for(Pe+=V.value.length;Le>=Pe;)V=V.next,Pe+=V.value.length;if(Pe-=V.value.length,he=Pe,V.value instanceof l)continue;for(var Ge=V;Ge!==p.tail&&(PeE.reach&&(E.reach=Ye);var st=V.prev;ct&&(st=v(p,st,ct),he+=ct.length),x(p,st,Oe);var ar=new l(M,ne?a.tokenize(Ke,ne):Ke,ut,Ke);if(V=v(p,st,ar),Bt&&v(p,V,Bt),Oe>1){var g={cause:M+","+q,reach:Ye};f(m,p,d,V.prev,he,g),E&&g.reach>E.reach&&(E.reach=g.reach)}}}}}}function h(){var m={value:null,prev:null,next:null},p={value:null,prev:m,next:null};m.next=p,this.head=m,this.tail=p,this.length=0}function v(m,p,d){var y=p.next,b={value:d,prev:p,next:y};return p.next=b,y.prev=b,m.length++,b}function x(m,p,d){for(var y=p.next,b=0;b]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;const zf={id:"settings-body"},Gf={class:"settings-item"},Yf={class:"settings-item"},Jf=["disabled"],vs=mt(5),hr=mt("time"),bn=mt({irqRate:300,irqSleep:Xa(()=>({time:vs.value,requestIdleCallback:()=>new Promise(e=>requestIdleCallback(e))})[hr.value])}),Zf={__name:"Settings",emits:["exit"],setup(e,{emit:t}){const r=mt(null);return(n,s)=>(St(),zt("div",{ref_key:"bg",ref:r,id:"settings-bg",onClick:s[4]||(s[4]=i=>i.target===r.value&&n.$emit("exit"))},[ee("div",zf,[ee("div",Gf,[s[5]||(s[5]=ee("header",null,"IRQ Rate",-1)),Zr(ee("input",{type:"number","onUpdate:modelValue":s[0]||(s[0]=i=>bn.value.irqRate=i)},null,512),[[Pi,bn.value.irqRate]])]),ee("div",Yf,[s[8]||(s[8]=ee("header",null,"IRQ Sleep Time",-1)),ee("div",null,[Zr(ee("input",{type:"radio",value:"time","onUpdate:modelValue":s[1]||(s[1]=i=>hr.value=i)},null,512),[[Ai,hr.value]]),s[6]||(s[6]=Jt(" time(milliseconds) ")),Zr(ee("input",{type:"number","onUpdate:modelValue":s[2]||(s[2]=i=>vs.value=i),disabled:hr.value!=="time"},null,8,Jf),[[Pi,vs.value]])]),ee("div",null,[Zr(ee("input",{type:"radio",value:"requestIdleCallback","onUpdate:modelValue":s[3]||(s[3]=i=>hr.value=i)},null,512),[[Ai,hr.value]]),s[7]||(s[7]=Jt(" requestIdleCallback "))])])])],512))}},Xf={id:"root"},Qf={id:"grid1"},eh={id:"editor",class:"container"},th={key:0,class:"syntaxError"},rh={id:"logs",class:"container"},nh={key:0,class:"actions"},sh={key:1,class:"actions"},ih={class:"type"},ah={id:"grid2"},oh={id:"ast",class:"container"},lh={__name:"App",setup(e){const t=mt(window.localStorage.getItem("script")||'<: "Hello, AiScript!"'),r=mt(null),n=mt([]),s=mt(null),i=mt(!1),o=mt(!1);sn(t,()=>{window.localStorage.setItem("script",t.value);try{r.value=pr.parse(t.value),s.value=null}catch(h){s.value=h.message,console.error(h.info);return}},{immediate:!0});const a=()=>{t.value=`for (let i, 100) { <: if (i % 15 == 0) "FizzBuzz" elif (i % 3 == 0) "Fizz" elif (i % 5 == 0) "Buzz" else i -}`};let l=null;const c=async()=>{n.value=[],l?.abort(),o.value=!1,l=new xe({},{in:h=>new Promise(v=>{const x=window.prompt(h);v(x)}),out:h=>{n.value.push({id:Math.random(),type:h.type,text:h.type==="str"||h.type==="num"?h.value:ps(h),print:!0})},err:h=>{window.alert(h.toString())},log:(h,v)=>{switch(h){case"end":n.value.push({id:Math.random(),text:ps(v.val,!0),print:!1});break}},irqRate:bn.value.irqRate,irqSleep:bn.value.irqSleep});try{await l.exec(r.value)}catch(h){console.error(h),window.alert("Internal Error: "+h)}},f=h=>Yi.highlight(h,Yi.languages.js,"javascript");return(h,v)=>(St(),zt("div",Xf,[i.value?(St(),Ga(Zf,{key:0,onExit:v[0]||(v[0]=x=>i.value=!1)})):ui("",!0),ee("h1",null,[Jt("AiScript (v"+cr(Sr(to))+") Playground",1),ee("button",{id:"show-settings-button",onClick:v[1]||(v[1]=x=>i.value=!0)},"Settings")]),ee("div",Qf,[ee("div",eh,[ee("header",null,[v[5]||(v[5]=Jt("Input")),ee("div",{class:"actions"},[ee("button",{onClick:a},"FizzBuzz")])]),ee("div",null,[We(Sr(Vf),{class:"code",modelValue:t.value,"onUpdate:modelValue":v[2]||(v[2]=x=>t.value=x),highlight:f,"line-numbers":!1},null,8,["modelValue"])]),ee("footer",null,[s.value?(St(),zt("span",th,cr(s.value),1)):ui("",!0),ee("div",{class:"actions"},[ee("button",{onClick:c},"RUN")])])]),ee("div",rh,[ee("header",null,[v[6]||(v[6]=Jt(" Output ")),o.value?(St(),zt("div",nh,[ee("button",{onClick:v[3]||(v[3]=x=>(Sr(l).unpause(),o.value=!1))},"Unpause")])):(St(),zt("div",sh,[ee("button",{onClick:v[4]||(v[4]=x=>(Sr(l).pause(),o.value=!0))},"Pause")]))]),ee("div",null,[(St(!0),zt(vt,null,_l(n.value,x=>(St(),zt("div",{class:Cn(["log",[{print:x.print},x.type]]),key:x.id},[ee("span",ih,cr(x.type),1),Jt(" "+cr(x.text),1)],2))),128))])])]),ee("div",ah,[ee("div",oh,[v[7]||(v[7]=ee("header",null,"AST",-1)),ee("div",null,[ee("pre",null,cr(JSON.stringify(r.value,(x,k)=>k instanceof Map?Object.fromEntries(k):k," ")),1)])]),v[8]||(v[8]=ee("div",{id:"bin",class:"container"},[ee("header",null,"Bytecode"),ee("div")],-1)),v[9]||(v[9]=ee("div",{id:"debugger",class:"container"},[ee("header",null,"Debugger"),ee("div")],-1))])]))}};Tu(lh).mount("#app"); +}`};let l=null;const c=async()=>{n.value=[],l?.abort(),o.value=!1,l=new xe({},{in:h=>new Promise(v=>{const x=window.prompt(h);v(x)}),out:h=>{n.value.push({id:Math.random(),type:h.type,text:h.type==="str"||h.type==="num"?h.value:ps(h),print:!0})},err:h=>{window.alert(h.toString())},log:(h,v)=>{switch(h){case"end":n.value.push({id:Math.random(),text:ps(v.val,!0),print:!1});break}},irqRate:bn.value.irqRate,irqSleep:bn.value.irqSleep});try{await l.exec(r.value)}catch(h){console.error(h),window.alert("Internal Error: "+h)}},f=h=>Yi.highlight(h,Yi.languages.js,"javascript");return(h,v)=>(St(),zt("div",Xf,[i.value?(St(),Ga(Zf,{key:0,onExit:v[0]||(v[0]=x=>i.value=!1)})):ui("",!0),ee("h1",null,[Jt("AiScript (v"+cr(Sr(to))+") Playground",1),ee("button",{id:"show-settings-button",onClick:v[1]||(v[1]=x=>i.value=!0)},"Settings")]),ee("div",Qf,[ee("div",eh,[ee("header",null,[v[5]||(v[5]=Jt("Input")),ee("div",{class:"actions"},[ee("button",{onClick:a},"FizzBuzz")])]),ee("div",null,[We(Sr(Vf),{class:"code",modelValue:t.value,"onUpdate:modelValue":v[2]||(v[2]=x=>t.value=x),highlight:f,"line-numbers":!1},null,8,["modelValue"])]),ee("footer",null,[s.value?(St(),zt("span",th,cr(s.value),1)):ui("",!0),ee("div",{class:"actions"},[ee("button",{onClick:c},"RUN")])])]),ee("div",rh,[ee("header",null,[v[6]||(v[6]=Jt(" Output ")),o.value?(St(),zt("div",nh,[ee("button",{onClick:v[3]||(v[3]=x=>(Sr(l).unpause(),o.value=!1))},"Unpause")])):(St(),zt("div",sh,[ee("button",{onClick:v[4]||(v[4]=x=>(Sr(l).pause(),o.value=!0))},"Pause")]))]),ee("div",null,[(St(!0),zt(vt,null,El(n.value,x=>(St(),zt("div",{class:Cn(["log",[{print:x.print},x.type]]),key:x.id},[ee("span",ih,cr(x.type),1),Jt(" "+cr(x.text),1)],2))),128))])])]),ee("div",ah,[ee("div",oh,[v[7]||(v[7]=ee("header",null,"AST",-1)),ee("div",null,[ee("pre",null,cr(JSON.stringify(r.value,(x,k)=>k instanceof Map?Object.fromEntries(k):k," ")),1)])]),v[8]||(v[8]=ee("div",{id:"bin",class:"container"},[ee("header",null,"Bytecode"),ee("div")],-1)),v[9]||(v[9]=ee("div",{id:"debugger",class:"container"},[ee("header",null,"Debugger"),ee("div")],-1))])]))}};Iu(lh).mount("#app"); diff --git a/index.html b/index.html index be474091..17880ef8 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ AiScript Playground - +