From fd2961b29b4eccdd674cb7f0834ee29212217b1c Mon Sep 17 00:00:00 2001 From: FineArchs Date: Thu, 16 Nov 2023 20:49:57 +0000 Subject: [PATCH] deploy: fbc54caf0b364b3eef0abb9be7cd5a1d11f41ec2 --- assets/index-25f1a00e.js | 91 ++++++++++++++++++++++++++++++++++++++++ assets/index-d8a4d495.js | 91 ---------------------------------------- index.html | 2 +- 3 files changed, 92 insertions(+), 92 deletions(-) create mode 100644 assets/index-25f1a00e.js delete mode 100644 assets/index-d8a4d495.js diff --git a/assets/index-25f1a00e.js b/assets/index-25f1a00e.js new file mode 100644 index 0000000..01a3f51 --- /dev/null +++ b/assets/index-25f1a00e.js @@ -0,0 +1,91 @@ +var sd=Object.defineProperty;var nd=(t,r,e)=>r in t?sd(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var me=(t,r,e)=>(nd(t,typeof r!="symbol"?r+"":r,e),e);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))n(h);new MutationObserver(h=>{for(const d of h)if(d.type==="childList")for(const $ of d.addedNodes)$.tagName==="LINK"&&$.rel==="modulepreload"&&n($)}).observe(document,{childList:!0,subtree:!0});function e(h){const d={};return h.integrity&&(d.integrity=h.integrity),h.referrerPolicy&&(d.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?d.credentials="include":h.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function n(h){if(h.ep)return;h.ep=!0;const d=e(h);fetch(h.href,d)}})();function jh(t,r){const e=Object.create(null),n=t.split(",");for(let h=0;h!!e[h.toLowerCase()]:h=>!!e[h]}const ir={},yu=[],Dn=()=>{},ad=()=>!1,id=/^on[^a-z]/,sc=t=>id.test(t),Rh=t=>t.startsWith("onUpdate:"),Sr=Object.assign,Dh=(t,r)=>{const e=t.indexOf(r);e>-1&&t.splice(e,1)},ld=Object.prototype.hasOwnProperty,$t=(t,r)=>ld.call(t,r),Ge=Array.isArray,wu=t=>ac(t)==="[object Map]",kv=t=>ac(t)==="[object Set]",ft=t=>typeof t=="function",Pr=t=>typeof t=="string",nc=t=>typeof t=="symbol",ar=t=>t!==null&&typeof t=="object",Pv=t=>(ar(t)||ft(t))&&ft(t.then)&&ft(t.catch),Ev=Object.prototype.toString,ac=t=>Ev.call(t),od=t=>ac(t).slice(8,-1),Mv=t=>ac(t)==="[object Object]",Lh=t=>Pr(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Pf=jh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ic=t=>{const r=Object.create(null);return e=>r[e]||(r[e]=t(e))},ud=/-(\w)/g,Ou=ic(t=>t.replace(ud,(r,e)=>e?e.toUpperCase():"")),fd=/\B([A-Z])/g,Ru=ic(t=>t.replace(fd,"-$1").toLowerCase()),Sv=ic(t=>t.charAt(0).toUpperCase()+t.slice(1)),xc=ic(t=>t?`on${Sv(t)}`:""),tu=(t,r)=>!Object.is(t,r),bc=(t,r)=>{for(let e=0;e{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value:e})},cd=t=>{const r=parseFloat(t);return isNaN(r)?t:r},hd=t=>{const r=Pr(t)?Number(t):NaN;return isNaN(r)?t:r};let vp;const Kc=()=>vp||(vp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Bh(t){if(Ge(t)){const r={};for(let e=0;e{if(e){const n=e.split(vd);n.length>1&&(r[n[0].trim()]=n[1].trim())}}),r}function Yr(t){let r="";if(Pr(t))r=t;else if(Ge(t))for(let e=0;ePr(t)?t:t==null?"":Ge(t)||ar(t)&&(t.toString===Ev||!ft(t.toString))?JSON.stringify(t,Ov,2):String(t),Ov=(t,r)=>r&&r.__v_isRef?Ov(t,r.value):wu(r)?{[`Map(${r.size})`]:[...r.entries()].reduce((e,[n,h])=>(e[`${n} =>`]=h,e),{})}:kv(r)?{[`Set(${r.size})`]:[...r.values()]}:ar(r)&&!Ge(r)&&!Mv(r)?String(r):r;let Tn;class md{constructor(r=!1){this.detached=r,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Tn,!r&&Tn&&(this.index=(Tn.scopes||(Tn.scopes=[])).push(this)-1)}get active(){return this._active}run(r){if(this._active){const e=Tn;try{return Tn=this,r()}finally{Tn=e}}}on(){Tn=this}off(){Tn=this.parent}stop(r){if(this._active){let e,n;for(e=0,n=this.effects.length;e{const r=new Set(t);return r.w=0,r.n=0,r},Nv=t=>(t.w&wi)>0,Tv=t=>(t.n&wi)>0,bd=({deps:t})=>{if(t.length)for(let r=0;r{const{deps:r}=t;if(r.length){let e=0;for(let n=0;n{(F==="length"||!nc(F)&&F>=k)&&b.push(E)})}else switch(e!==void 0&&b.push($.get(e)),r){case"add":Ge(t)?Lh(e)&&b.push($.get("length")):(b.push($.get(Vo)),wu(t)&&b.push($.get(Gc)));break;case"delete":Ge(t)||(b.push($.get(Vo)),wu(t)&&b.push($.get(Gc)));break;case"set":wu(t)&&b.push($.get(Vo));break}if(b.length===1)b[0]&&Qc(b[0]);else{const k=[];for(const E of b)E&&k.push(...E);Qc(Hh(k))}}function Qc(t,r){const e=Ge(t)?t:[...t];for(const n of e)n.computed&&dp(n);for(const n of e)n.computed||dp(n)}function dp(t,r){(t!==In||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const Cd=jh("__proto__,__v_isRef,__isVue"),Rv=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(nc)),yp=_d();function _d(){const t={};return["includes","indexOf","lastIndexOf"].forEach(r=>{t[r]=function(...e){const n=_t(this);for(let d=0,$=this.length;d<$;d++)bs(n,"get",d+"");const h=n[r](...e);return h===-1||h===!1?n[r](...e.map(_t)):h}}),["push","pop","shift","unshift","splice"].forEach(r=>{t[r]=function(...e){Du();const n=_t(this)[r].apply(this,e);return Lu(),n}}),t}function kd(t){const r=_t(this);return bs(r,"has",t),r.hasOwnProperty(t)}class Dv{constructor(r=!1,e=!1){this._isReadonly=r,this._shallow=e}get(r,e,n){const h=this._isReadonly,d=this._shallow;if(e==="__v_isReactive")return!h;if(e==="__v_isReadonly")return h;if(e==="__v_isShallow")return d;if(e==="__v_raw"&&n===(h?d?Ld:Uv:d?Hv:Bv).get(r))return r;const $=Ge(r);if(!h){if($&&$t(yp,e))return Reflect.get(yp,e,n);if(e==="hasOwnProperty")return kd}const b=Reflect.get(r,e,n);return(nc(e)?Rv.has(e):Cd(e))||(h||bs(r,"get",e),d)?b:es(b)?$&&Lh(e)?b:b.value:ar(b)?h?qv(b):Wh(b):b}}class Lv extends Dv{constructor(r=!1){super(!1,r)}set(r,e,n,h){let d=r[e];if(Nu(d)&&es(d)&&!es(n))return!1;if(!this._shallow&&(!Vf(n)&&!Nu(n)&&(d=_t(d),n=_t(n)),!Ge(r)&&es(d)&&!es(n)))return d.value=n,!0;const $=Ge(r)&&Lh(e)?Number(e)t,lc=t=>Reflect.getPrototypeOf(t);function df(t,r,e=!1,n=!1){t=t.__v_raw;const h=_t(t),d=_t(r);e||(tu(r,d)&&bs(h,"get",r),bs(h,"get",d));const{has:$}=lc(h),b=n?qh:e?Kh:tf;if($.call(h,r))return b(t.get(r));if($.call(h,d))return b(t.get(d));t!==h&&t.get(r)}function yf(t,r=!1){const e=this.__v_raw,n=_t(e),h=_t(t);return r||(tu(t,h)&&bs(n,"has",t),bs(n,"has",h)),t===h?e.has(t):e.has(t)||e.has(h)}function wf(t,r=!1){return t=t.__v_raw,!r&&bs(_t(t),"iterate",Vo),Reflect.get(t,"size",t)}function wp(t){t=_t(t);const r=_t(this);return lc(r).has.call(r,t)||(r.add(t),Ga(r,"add",t,t)),this}function mp(t,r){r=_t(r);const e=_t(this),{has:n,get:h}=lc(e);let d=n.call(e,t);d||(t=_t(t),d=n.call(e,t));const $=h.call(e,t);return e.set(t,r),d?tu(r,$)&&Ga(e,"set",t,r):Ga(e,"add",t,r),this}function $p(t){const r=_t(this),{has:e,get:n}=lc(r);let h=e.call(r,t);h||(t=_t(t),h=e.call(r,t)),n&&n.call(r,t);const d=r.delete(t);return h&&Ga(r,"delete",t,void 0),d}function xp(){const t=_t(this),r=t.size!==0,e=t.clear();return r&&Ga(t,"clear",void 0,void 0),e}function mf(t,r){return function(n,h){const d=this,$=d.__v_raw,b=_t($),k=r?qh:t?Kh:tf;return!t&&bs(b,"iterate",Vo),$.forEach((E,F)=>n.call(h,k(E),k(F),d))}}function $f(t,r,e){return function(...n){const h=this.__v_raw,d=_t(h),$=wu(d),b=t==="entries"||t===Symbol.iterator&&$,k=t==="keys"&&$,E=h[t](...n),F=e?qh:r?Kh:tf;return!r&&bs(d,"iterate",k?Gc:Vo),{next(){const{value:j,done:D}=E.next();return D?{value:j,done:D}:{value:b?[F(j[0]),F(j[1])]:F(j),done:D}},[Symbol.iterator](){return this}}}}function ti(t){return function(...r){return t==="delete"?!1:this}}function Fd(){const t={get(d){return df(this,d)},get size(){return wf(this)},has:yf,add:wp,set:mp,delete:$p,clear:xp,forEach:mf(!1,!1)},r={get(d){return df(this,d,!1,!0)},get size(){return wf(this)},has:yf,add:wp,set:mp,delete:$p,clear:xp,forEach:mf(!1,!0)},e={get(d){return df(this,d,!0)},get size(){return wf(this,!0)},has(d){return yf.call(this,d,!0)},add:ti("add"),set:ti("set"),delete:ti("delete"),clear:ti("clear"),forEach:mf(!0,!1)},n={get(d){return df(this,d,!0,!0)},get size(){return wf(this,!0)},has(d){return yf.call(this,d,!0)},add:ti("add"),set:ti("set"),delete:ti("delete"),clear:ti("clear"),forEach:mf(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{t[d]=$f(d,!1,!1),e[d]=$f(d,!0,!1),r[d]=$f(d,!1,!0),n[d]=$f(d,!0,!0)}),[t,e,r,n]}const[Od,Nd,Td,Id]=Fd();function zh(t,r){const e=r?t?Id:Td:t?Nd:Od;return(n,h,d)=>h==="__v_isReactive"?!t:h==="__v_isReadonly"?t:h==="__v_raw"?n:Reflect.get($t(e,h)&&h in n?e:n,h,d)}const jd={get:zh(!1,!1)},Rd={get:zh(!1,!0)},Dd={get:zh(!0,!1)},Bv=new WeakMap,Hv=new WeakMap,Uv=new WeakMap,Ld=new WeakMap;function Bd(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Hd(t){return t.__v_skip||!Object.isExtensible(t)?0:Bd(od(t))}function Wh(t){return Nu(t)?t:Vh(t,!1,Ed,jd,Bv)}function Ud(t){return Vh(t,!1,Sd,Rd,Hv)}function qv(t){return Vh(t,!0,Md,Dd,Uv)}function Vh(t,r,e,n,h){if(!ar(t)||t.__v_raw&&!(r&&t.__v_isReactive))return t;const d=h.get(t);if(d)return d;const $=Hd(t);if($===0)return t;const b=new Proxy(t,$===2?n:e);return h.set(t,b),b}function mu(t){return Nu(t)?mu(t.__v_raw):!!(t&&t.__v_isReactive)}function Nu(t){return!!(t&&t.__v_isReadonly)}function Vf(t){return!!(t&&t.__v_isShallow)}function zv(t){return mu(t)||Nu(t)}function _t(t){const r=t&&t.__v_raw;return r?_t(r):t}function Wv(t){return Wf(t,"__v_skip",!0),t}const tf=t=>ar(t)?Wh(t):t,Kh=t=>ar(t)?qv(t):t;function Vv(t){gi&&In&&(t=_t(t),jv(t.dep||(t.dep=Hh())))}function Kv(t,r){t=_t(t);const e=t.dep;e&&Qc(e)}function es(t){return!!(t&&t.__v_isRef===!0)}function Bo(t){return qd(t,!1)}function qd(t,r){return es(t)?t:new zd(t,r)}class zd{constructor(r,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?r:_t(r),this._value=e?r:tf(r)}get value(){return Vv(this),this._value}set value(r){const e=this.__v_isShallow||Vf(r)||Nu(r);r=e?r:_t(r),tu(r,this._rawValue)&&(this._rawValue=r,this._value=e?r:tf(r),Kv(this))}}function rf(t){return es(t)?t.value:t}const Wd={get:(t,r,e)=>rf(Reflect.get(t,r,e)),set:(t,r,e,n)=>{const h=t[r];return es(h)&&!es(e)?(h.value=e,!0):Reflect.set(t,r,e,n)}};function Jv(t){return mu(t)?t:new Proxy(t,Wd)}class Vd{constructor(r,e,n,h){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new Uh(r,()=>{this._dirty||(this._dirty=!0,Kv(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!h,this.__v_isReadonly=n}get value(){const r=_t(this);return Vv(r),(r._dirty||!r._cacheable)&&(r._dirty=!1,r._value=r.effect.run()),r._value}set value(r){this._setter(r)}}function Kd(t,r,e=!1){let n,h;const d=ft(t);return d?(n=t,h=Dn):(n=t.get,h=t.set),new Vd(n,h,d||!h,e)}function di(t,r,e,n){let h;try{h=n?t(...n):t()}catch(d){oc(d,r,e)}return h}function hn(t,r,e,n){if(ft(t)){const d=di(t,r,e,n);return d&&Pv(d)&&d.catch($=>{oc($,r,e)}),d}const h=[];for(let d=0;d>>1,h=Xr[n],d=nf(h);dqn&&Xr.splice(r,1)}function Xd(t){Ge(t)?$u.push(...t):(!Wa||!Wa.includes(t,t.allowRecurse?jo+1:jo))&&$u.push(t),Gv()}function bp(t,r=sf?qn+1:0){for(;rnf(e)-nf(n)),jo=0;jot.id==null?1/0:t.id,Yd=(t,r)=>{const e=nf(t)-nf(r);if(e===0){if(t.pre&&!r.pre)return-1;if(r.pre&&!t.pre)return 1}return e};function Xv(t){Xc=!1,sf=!0,Xr.sort(Yd);const r=Dn;try{for(qn=0;qnPr(V)?V.trim():V)),j&&(h=e.map(cd))}let b,k=n[b=xc(r)]||n[b=xc(Ou(r))];!k&&d&&(k=n[b=xc(Ru(r))]),k&&hn(k,t,6,h);const E=n[b+"Once"];if(E){if(!t.emitted)t.emitted={};else if(t.emitted[b])return;t.emitted[b]=!0,hn(E,t,6,h)}}function Yv(t,r,e=!1){const n=r.emitsCache,h=n.get(t);if(h!==void 0)return h;const d=t.emits;let $={},b=!1;if(!ft(t)){const k=E=>{const F=Yv(E,r,!0);F&&(b=!0,Sr($,F))};!e&&r.mixins.length&&r.mixins.forEach(k),t.extends&&k(t.extends),t.mixins&&t.mixins.forEach(k)}return!d&&!b?(ar(t)&&n.set(t,null),null):(Ge(d)?d.forEach(k=>$[k]=null):Sr($,d),ar(t)&&n.set(t,$),$)}function uc(t,r){return!t||!sc(r)?!1:(r=r.slice(2).replace(/Once$/,""),$t(t,r[0].toLowerCase()+r.slice(1))||$t(t,Ru(r))||$t(t,r))}let ys=null,fc=null;function Kf(t){const r=ys;return ys=t,fc=t&&t.type.__scopeId||null,r}function ty(t){fc=t}function ry(){fc=null}function xs(t,r=ys,e){if(!r||t._n)return t;const n=(...h)=>{n._d&&Np(-1);const d=Kf(r);let $;try{$=t(...h)}finally{Kf(d),n._d&&Np(1)}return $};return n._n=!0,n._c=!0,n._d=!0,n}function Ac(t){const{type:r,vnode:e,proxy:n,withProxy:h,props:d,propsOptions:[$],slots:b,attrs:k,emit:E,render:F,renderCache:j,data:D,setupState:V,ctx:pe,inheritAttrs:ee}=t;let ae,_e;const H=Kf(t);try{if(e.shapeFlag&4){const B=h||n;ae=Un(F.call(B,B,j,d,V,D,pe)),_e=k}else{const B=r;ae=Un(B.length>1?B(d,{attrs:k,slots:b,emit:E}):B(d,null)),_e=r.props?k:sy(k)}}catch(B){Xu.length=0,oc(B,t,1),ae=hr(pn)}let L=ae;if(_e&&ee!==!1){const B=Object.keys(_e),{shapeFlag:q}=L;B.length&&q&7&&($&&B.some(Rh)&&(_e=ny(_e,$)),L=mi(L,_e))}return e.dirs&&(L=mi(L),L.dirs=L.dirs?L.dirs.concat(e.dirs):e.dirs),e.transition&&(L.transition=e.transition),ae=L,Kf(H),ae}const sy=t=>{let r;for(const e in t)(e==="class"||e==="style"||sc(e))&&((r||(r={}))[e]=t[e]);return r},ny=(t,r)=>{const e={};for(const n in t)(!Rh(n)||!(n.slice(9)in r))&&(e[n]=t[n]);return e};function ay(t,r,e){const{props:n,children:h,component:d}=t,{props:$,children:b,patchFlag:k}=r,E=d.emitsOptions;if(r.dirs||r.transition)return!0;if(e&&k>=0){if(k&1024)return!0;if(k&16)return n?Ap(n,$,E):!!$;if(k&8){const F=r.dynamicProps;for(let j=0;jt.__isSuspense;function uy(t,r){r&&r.pendingBranch?Ge(t)?r.effects.push(...t):r.effects.push(t):Xd(t)}const xf={};function Zu(t,r,e){return eg(t,r,e)}function eg(t,r,{immediate:e,deep:n,flush:h,onTrack:d,onTrigger:$}=ir){var b;const k=xd()===((b=qr)==null?void 0:b.scope)?qr:null;let E,F=!1,j=!1;if(es(t)?(E=()=>t.value,F=Vf(t)):mu(t)?(E=()=>t,n=!0):Ge(t)?(j=!0,F=t.some(B=>mu(B)||Vf(B)),E=()=>t.map(B=>{if(es(B))return B.value;if(mu(B))return du(B);if(ft(B))return di(B,k,2)})):ft(t)?r?E=()=>di(t,k,2):E=()=>{if(!(k&&k.isUnmounted))return D&&D(),hn(t,k,3,[V])}:E=Dn,r&&n){const B=E;E=()=>du(B())}let D,V=B=>{D=H.onStop=()=>{di(B,k,4)}},pe;if(lf)if(V=Dn,r?e&&hn(r,k,3,[E(),j?[]:void 0,V]):E(),h==="sync"){const B=nw();pe=B.__watcherHandles||(B.__watcherHandles=[])}else return Dn;let ee=j?new Array(t.length).fill(xf):xf;const ae=()=>{if(H.active)if(r){const B=H.run();(n||F||(j?B.some((q,J)=>tu(q,ee[J])):tu(B,ee)))&&(D&&D(),hn(r,k,3,[B,ee===xf?void 0:j&&ee[0]===xf?[]:ee,V]),ee=B)}else H.run()};ae.allowRecurse=!!r;let _e;h==="sync"?_e=ae:h==="post"?_e=()=>$s(ae,k&&k.suspense):(ae.pre=!0,k&&(ae.id=k.uid),_e=()=>Zh(ae));const H=new Uh(E,_e);r?e?ae():ee=H.run():h==="post"?$s(H.run.bind(H),k&&k.suspense):H.run();const L=()=>{H.stop(),k&&k.scope&&Dh(k.scope.effects,H)};return pe&&pe.push(L),L}function fy(t,r,e){const n=this.proxy,h=Pr(t)?t.includes(".")?tg(n,t):()=>n[t]:t.bind(n,n);let d;ft(r)?d=r:(d=r.handler,e=r);const $=qr;Iu(this);const b=eg(h,d.bind(n),e);return $?Iu($):Ko(),b}function tg(t,r){const e=r.split(".");return()=>{let n=t;for(let h=0;h{du(e,r)});else if(Mv(t))for(const e in t)du(t[e],r);return t}function Oo(t,r,e,n){const h=t.dirs,d=r&&r.dirs;for(let $=0;${t.isMounted=!0}),lg(()=>{t.isUnmounting=!0}),t}const nn=[Function,Array],rg={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nn,onEnter:nn,onAfterEnter:nn,onEnterCancelled:nn,onBeforeLeave:nn,onLeave:nn,onAfterLeave:nn,onLeaveCancelled:nn,onBeforeAppear:nn,onAppear:nn,onAfterAppear:nn,onAppearCancelled:nn},hy={name:"BaseTransition",props:rg,setup(t,{slots:r}){const e=Gy(),n=cy();let h;return()=>{const d=r.default&&ng(r.default(),!0);if(!d||!d.length)return;let $=d[0];if(d.length>1){for(const ee of d)if(ee.type!==pn){$=ee;break}}const b=_t(t),{mode:k}=b;if(n.isLeaving)return Cc($);const E=Cp($);if(!E)return Cc($);const F=Yc(E,b,n,e);eh(E,F);const j=e.subTree,D=j&&Cp(j);let V=!1;const{getTransitionKey:pe}=E.type;if(pe){const ee=pe();h===void 0?h=ee:ee!==h&&(h=ee,V=!0)}if(D&&D.type!==pn&&(!Ro(E,D)||V)){const ee=Yc(D,b,n,e);if(eh(D,ee),k==="out-in")return n.isLeaving=!0,ee.afterLeave=()=>{n.isLeaving=!1,e.update.active!==!1&&e.update()},Cc($);k==="in-out"&&E.type!==pn&&(ee.delayLeave=(ae,_e,H)=>{const L=sg(n,D);L[String(D.key)]=D,ae[oi]=()=>{_e(),ae[oi]=void 0,delete F.delayedLeave},F.delayedLeave=H})}return $}}},py=hy;function sg(t,r){const{leavingVNodes:e}=t;let n=e.get(r.type);return n||(n=Object.create(null),e.set(r.type,n)),n}function Yc(t,r,e,n){const{appear:h,mode:d,persisted:$=!1,onBeforeEnter:b,onEnter:k,onAfterEnter:E,onEnterCancelled:F,onBeforeLeave:j,onLeave:D,onAfterLeave:V,onLeaveCancelled:pe,onBeforeAppear:ee,onAppear:ae,onAfterAppear:_e,onAppearCancelled:H}=r,L=String(t.key),B=sg(e,t),q=(Q,X)=>{Q&&hn(Q,n,9,X)},J=(Q,X)=>{const $e=X[1];q(Q,X),Ge(Q)?Q.every(ke=>ke.length<=1)&&$e():Q.length<=1&&$e()},G={mode:d,persisted:$,beforeEnter(Q){let X=b;if(!e.isMounted)if(h)X=ee||b;else return;Q[oi]&&Q[oi](!0);const $e=B[L];$e&&Ro(t,$e)&&$e.el[oi]&&$e.el[oi](),q(X,[Q])},enter(Q){let X=k,$e=E,ke=F;if(!e.isMounted)if(h)X=ae||k,$e=_e||E,ke=H||F;else return;let ge=!1;const qe=Q[bf]=it=>{ge||(ge=!0,it?q(ke,[Q]):q($e,[Q]),G.delayedLeave&&G.delayedLeave(),Q[bf]=void 0)};X?J(X,[Q,qe]):qe()},leave(Q,X){const $e=String(t.key);if(Q[bf]&&Q[bf](!0),e.isUnmounting)return X();q(j,[Q]);let ke=!1;const ge=Q[oi]=qe=>{ke||(ke=!0,X(),qe?q(pe,[Q]):q(V,[Q]),Q[oi]=void 0,B[$e]===t&&delete B[$e])};B[$e]=t,D?J(D,[Q,ge]):ge()},clone(Q){return Yc(Q,r,e,n)}};return G}function Cc(t){if(cc(t))return t=mi(t),t.children=null,t}function Cp(t){return cc(t)?t.children?t.children[0]:void 0:t}function eh(t,r){t.shapeFlag&6&&t.component?eh(t.component.subTree,r):t.shapeFlag&128?(t.ssContent.transition=r.clone(t.ssContent),t.ssFallback.transition=r.clone(t.ssFallback)):t.transition=r}function ng(t,r=!1,e){let n=[],h=0;for(let d=0;d1)for(let d=0;dSr({name:t.name},r,{setup:t}))():t}const Gu=t=>!!t.type.__asyncLoader,cc=t=>t.type.__isKeepAlive;function vy(t,r){ag(t,"a",r)}function gy(t,r){ag(t,"da",r)}function ag(t,r,e=qr){const n=t.__wdc||(t.__wdc=()=>{let h=e;for(;h;){if(h.isDeactivated)return;h=h.parent}return t()});if(hc(r,n,e),e){let h=e.parent;for(;h&&h.parent;)cc(h.parent.vnode)&&dy(n,r,e,h),h=h.parent}}function dy(t,r,e,n){const h=hc(r,t,n,!0);og(()=>{Dh(n[r],h)},e)}function hc(t,r,e=qr,n=!1){if(e){const h=e[t]||(e[t]=[]),d=r.__weh||(r.__weh=(...$)=>{if(e.isUnmounted)return;Du(),Iu(e);const b=hn(r,e,t,$);return Ko(),Lu(),b});return n?h.unshift(d):h.push(d),d}}const Qa=t=>(r,e=qr)=>(!lf||t==="sp")&&hc(t,(...n)=>r(...n),e),yy=Qa("bm"),ig=Qa("m"),wy=Qa("bu"),my=Qa("u"),lg=Qa("bum"),og=Qa("um"),$y=Qa("sp"),xy=Qa("rtg"),by=Qa("rtc");function Ay(t,r=qr){hc("ec",t,r)}function Jf(t,r,e,n){let h;const d=e&&e[n];if(Ge(t)||Pr(t)){h=new Array(t.length);for(let $=0,b=t.length;$r($,b,void 0,d&&d[b]));else{const $=Object.keys(t);h=new Array($.length);for(let b=0,k=$.length;bQf(r)?!(r.type===pn||r.type===Qr&&!ug(r.children)):!0)?t:null}const th=t=>t?$g(t)?ep(t)||t.proxy:th(t.parent):null,Qu=Sr(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>th(t.parent),$root:t=>th(t.root),$emit:t=>t.emit,$options:t=>Gh(t),$forceUpdate:t=>t.f||(t.f=()=>Zh(t.update)),$nextTick:t=>t.n||(t.n=Zd.bind(t.proxy)),$watch:t=>fy.bind(t)}),_c=(t,r)=>t!==ir&&!t.__isScriptSetup&&$t(t,r),Cy={get({_:t},r){const{ctx:e,setupState:n,data:h,props:d,accessCache:$,type:b,appContext:k}=t;let E;if(r[0]!=="$"){const V=$[r];if(V!==void 0)switch(V){case 1:return n[r];case 2:return h[r];case 4:return e[r];case 3:return d[r]}else{if(_c(n,r))return $[r]=1,n[r];if(h!==ir&&$t(h,r))return $[r]=2,h[r];if((E=t.propsOptions[0])&&$t(E,r))return $[r]=3,d[r];if(e!==ir&&$t(e,r))return $[r]=4,e[r];rh&&($[r]=0)}}const F=Qu[r];let j,D;if(F)return r==="$attrs"&&bs(t,"get",r),F(t);if((j=b.__cssModules)&&(j=j[r]))return j;if(e!==ir&&$t(e,r))return $[r]=4,e[r];if(D=k.config.globalProperties,$t(D,r))return D[r]},set({_:t},r,e){const{data:n,setupState:h,ctx:d}=t;return _c(h,r)?(h[r]=e,!0):n!==ir&&$t(n,r)?(n[r]=e,!0):$t(t.props,r)||r[0]==="$"&&r.slice(1)in t?!1:(d[r]=e,!0)},has({_:{data:t,setupState:r,accessCache:e,ctx:n,appContext:h,propsOptions:d}},$){let b;return!!e[$]||t!==ir&&$t(t,$)||_c(r,$)||(b=d[0])&&$t(b,$)||$t(n,$)||$t(Qu,$)||$t(h.config.globalProperties,$)},defineProperty(t,r,e){return e.get!=null?t._.accessCache[r]=0:$t(e,"value")&&this.set(t,r,e.value,null),Reflect.defineProperty(t,r,e)}};function _p(t){return Ge(t)?t.reduce((r,e)=>(r[e]=null,r),{}):t}let rh=!0;function _y(t){const r=Gh(t),e=t.proxy,n=t.ctx;rh=!1,r.beforeCreate&&kp(r.beforeCreate,t,"bc");const{data:h,computed:d,methods:$,watch:b,provide:k,inject:E,created:F,beforeMount:j,mounted:D,beforeUpdate:V,updated:pe,activated:ee,deactivated:ae,beforeDestroy:_e,beforeUnmount:H,destroyed:L,unmounted:B,render:q,renderTracked:J,renderTriggered:G,errorCaptured:Q,serverPrefetch:X,expose:$e,inheritAttrs:ke,components:ge,directives:qe,filters:it}=r;if(E&&ky(E,n,null),$)for(const ot in $){const Ie=$[ot];ft(Ie)&&(n[ot]=Ie.bind(e))}if(h){const ot=h.call(e,e);ar(ot)&&(t.data=Wh(ot))}if(rh=!0,d)for(const ot in d){const Ie=d[ot],at=ft(Ie)?Ie.bind(e,e):ft(Ie.get)?Ie.get.bind(e,e):Dn,Mt=!ft(Ie)&&ft(Ie.set)?Ie.set.bind(e):Dn,St=rw({get:at,set:Mt});Object.defineProperty(n,ot,{enumerable:!0,configurable:!0,get:()=>St.value,set:Qe=>St.value=Qe})}if(b)for(const ot in b)fg(b[ot],n,e,ot);if(k){const ot=ft(k)?k.call(e):k;Reflect.ownKeys(ot).forEach(Ie=>{Oy(Ie,ot[Ie])})}F&&kp(F,t,"c");function lt(ot,Ie){Ge(Ie)?Ie.forEach(at=>ot(at.bind(e))):Ie&&ot(Ie.bind(e))}if(lt(yy,j),lt(ig,D),lt(wy,V),lt(my,pe),lt(vy,ee),lt(gy,ae),lt(Ay,Q),lt(by,J),lt(xy,G),lt(lg,H),lt(og,B),lt($y,X),Ge($e))if($e.length){const ot=t.exposed||(t.exposed={});$e.forEach(Ie=>{Object.defineProperty(ot,Ie,{get:()=>e[Ie],set:at=>e[Ie]=at})})}else t.exposed||(t.exposed={});q&&t.render===Dn&&(t.render=q),ke!=null&&(t.inheritAttrs=ke),ge&&(t.components=ge),qe&&(t.directives=qe)}function ky(t,r,e=Dn){Ge(t)&&(t=sh(t));for(const n in t){const h=t[n];let d;ar(h)?"default"in h?d=Mf(h.from||n,h.default,!0):d=Mf(h.from||n):d=Mf(h),es(d)?Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:()=>d.value,set:$=>d.value=$}):r[n]=d}}function kp(t,r,e){hn(Ge(t)?t.map(n=>n.bind(r.proxy)):t.bind(r.proxy),r,e)}function fg(t,r,e,n){const h=n.includes(".")?tg(e,n):()=>e[n];if(Pr(t)){const d=r[t];ft(d)&&Zu(h,d)}else if(ft(t))Zu(h,t.bind(e));else if(ar(t))if(Ge(t))t.forEach(d=>fg(d,r,e,n));else{const d=ft(t.handler)?t.handler.bind(e):r[t.handler];ft(d)&&Zu(h,d,t)}}function Gh(t){const r=t.type,{mixins:e,extends:n}=r,{mixins:h,optionsCache:d,config:{optionMergeStrategies:$}}=t.appContext,b=d.get(r);let k;return b?k=b:!h.length&&!e&&!n?k=r:(k={},h.length&&h.forEach(E=>Zf(k,E,$,!0)),Zf(k,r,$)),ar(r)&&d.set(r,k),k}function Zf(t,r,e,n=!1){const{mixins:h,extends:d}=r;d&&Zf(t,d,e,!0),h&&h.forEach($=>Zf(t,$,e,!0));for(const $ in r)if(!(n&&$==="expose")){const b=Py[$]||e&&e[$];t[$]=b?b(t[$],r[$]):r[$]}return t}const Py={data:Pp,props:Ep,emits:Ep,methods:Ku,computed:Ku,beforeCreate:cs,created:cs,beforeMount:cs,mounted:cs,beforeUpdate:cs,updated:cs,beforeDestroy:cs,beforeUnmount:cs,destroyed:cs,unmounted:cs,activated:cs,deactivated:cs,errorCaptured:cs,serverPrefetch:cs,components:Ku,directives:Ku,watch:My,provide:Pp,inject:Ey};function Pp(t,r){return r?t?function(){return Sr(ft(t)?t.call(this,this):t,ft(r)?r.call(this,this):r)}:r:t}function Ey(t,r){return Ku(sh(t),sh(r))}function sh(t){if(Ge(t)){const r={};for(let e=0;e1)return e&&ft(r)?r.call(n&&n.proxy):r}}function Ny(t,r,e,n=!1){const h={},d={};Wf(d,gc,1),t.propsDefaults=Object.create(null),hg(t,r,h,d);for(const $ in t.propsOptions[0])$ in h||(h[$]=void 0);e?t.props=n?h:Ud(h):t.type.props?t.props=h:t.props=d,t.attrs=d}function Ty(t,r,e,n){const{props:h,attrs:d,vnode:{patchFlag:$}}=t,b=_t(h),[k]=t.propsOptions;let E=!1;if((n||$>0)&&!($&16)){if($&8){const F=t.vnode.dynamicProps;for(let j=0;j{k=!0;const[D,V]=pg(j,r,!0);Sr($,D),V&&b.push(...V)};!e&&r.mixins.length&&r.mixins.forEach(F),t.extends&&F(t.extends),t.mixins&&t.mixins.forEach(F)}if(!d&&!k)return ar(t)&&n.set(t,yu),yu;if(Ge(d))for(let F=0;F-1,V[1]=ee<0||pe-1||$t(V,"default"))&&b.push(j)}}}const E=[$,b];return ar(t)&&n.set(t,E),E}function Mp(t){return t[0]!=="$"}function Sp(t){const r=t&&t.toString().match(/^\s*(function|class) (\w+)/);return r?r[2]:t===null?"null":""}function Fp(t,r){return Sp(t)===Sp(r)}function Op(t,r){return Ge(r)?r.findIndex(e=>Fp(e,t)):ft(r)&&Fp(r,t)?0:-1}const vg=t=>t[0]==="_"||t==="$stable",Qh=t=>Ge(t)?t.map(Un):[Un(t)],Iy=(t,r,e)=>{if(r._n)return r;const n=xs((...h)=>Qh(r(...h)),e);return n._c=!1,n},gg=(t,r,e)=>{const n=t._ctx;for(const h in t){if(vg(h))continue;const d=t[h];if(ft(d))r[h]=Iy(h,d,n);else if(d!=null){const $=Qh(d);r[h]=()=>$}}},dg=(t,r)=>{const e=Qh(r);t.slots.default=()=>e},jy=(t,r)=>{if(t.vnode.shapeFlag&32){const e=r._;e?(t.slots=_t(r),Wf(r,"_",e)):gg(r,t.slots={})}else t.slots={},r&&dg(t,r);Wf(t.slots,gc,1)},Ry=(t,r,e)=>{const{vnode:n,slots:h}=t;let d=!0,$=ir;if(n.shapeFlag&32){const b=r._;b?e&&b===1?d=!1:(Sr(h,r),!e&&b===1&&delete h._):(d=!r.$stable,gg(r,h)),$=r}else r&&(dg(t,r),$={default:1});if(d)for(const b in h)!vg(b)&&$[b]==null&&delete h[b]};function ah(t,r,e,n,h=!1){if(Ge(t)){t.forEach((D,V)=>ah(D,r&&(Ge(r)?r[V]:r),e,n,h));return}if(Gu(n)&&!h)return;const d=n.shapeFlag&4?ep(n.component)||n.component.proxy:n.el,$=h?null:d,{i:b,r:k}=t,E=r&&r.r,F=b.refs===ir?b.refs={}:b.refs,j=b.setupState;if(E!=null&&E!==k&&(Pr(E)?(F[E]=null,$t(j,E)&&(j[E]=null)):es(E)&&(E.value=null)),ft(k))di(k,b,12,[$,F]);else{const D=Pr(k),V=es(k);if(D||V){const pe=()=>{if(t.f){const ee=D?$t(j,k)?j[k]:F[k]:k.value;h?Ge(ee)&&Dh(ee,d):Ge(ee)?ee.includes(d)||ee.push(d):D?(F[k]=[d],$t(j,k)&&(j[k]=F[k])):(k.value=[d],t.k&&(F[t.k]=k.value))}else D?(F[k]=$,$t(j,k)&&(j[k]=$)):V&&(k.value=$,t.k&&(F[t.k]=$))};$?(pe.id=-1,$s(pe,e)):pe()}}}const $s=uy;function Dy(t){return Ly(t)}function Ly(t,r){const e=Kc();e.__VUE__=!0;const{insert:n,remove:h,patchProp:d,createElement:$,createText:b,createComment:k,setText:E,setElementText:F,parentNode:j,nextSibling:D,setScopeId:V=Dn,insertStaticContent:pe}=t,ee=(U,K,te,ce=null,he=null,ie=null,Ne=!1,de=null,we=!!K.dynamicChildren)=>{if(U===K)return;U&&!Ro(U,K)&&(ce=dr(U),Qe(U,he,ie,!0),U=null),K.patchFlag===-2&&(we=!1,K.dynamicChildren=null);const{type:ue,ref:De,shapeFlag:je}=K;switch(ue){case pc:ae(U,K,te,ce);break;case pn:_e(U,K,te,ce);break;case kc:U==null&&H(K,te,ce,Ne);break;case Qr:ge(U,K,te,ce,he,ie,Ne,de,we);break;default:je&1?q(U,K,te,ce,he,ie,Ne,de,we):je&6?qe(U,K,te,ce,he,ie,Ne,de,we):(je&64||je&128)&&ue.process(U,K,te,ce,he,ie,Ne,de,we,_r)}De!=null&&he&&ah(De,U&&U.ref,ie,K||U,!K)},ae=(U,K,te,ce)=>{if(U==null)n(K.el=b(K.children),te,ce);else{const he=K.el=U.el;K.children!==U.children&&E(he,K.children)}},_e=(U,K,te,ce)=>{U==null?n(K.el=k(K.children||""),te,ce):K.el=U.el},H=(U,K,te,ce)=>{[U.el,U.anchor]=pe(U.children,K,te,ce,U.el,U.anchor)},L=({el:U,anchor:K},te,ce)=>{let he;for(;U&&U!==K;)he=D(U),n(U,te,ce),U=he;n(K,te,ce)},B=({el:U,anchor:K})=>{let te;for(;U&&U!==K;)te=D(U),h(U),U=te;h(K)},q=(U,K,te,ce,he,ie,Ne,de,we)=>{Ne=Ne||K.type==="svg",U==null?J(K,te,ce,he,ie,Ne,de,we):X(U,K,he,ie,Ne,de,we)},J=(U,K,te,ce,he,ie,Ne,de)=>{let we,ue;const{type:De,props:je,shapeFlag:Be,transition:We,dirs:Ze}=U;if(we=U.el=$(U.type,ie,je&&je.is,je),Be&8?F(we,U.children):Be&16&&Q(U.children,we,null,ce,he,ie&&De!=="foreignObject",Ne,de),Ze&&Oo(U,null,ce,"created"),G(we,U,U.scopeId,Ne,ce),je){for(const st in je)st!=="value"&&!Pf(st)&&d(we,st,null,je[st],ie,U.children,ce,he,kt);"value"in je&&d(we,"value",null,je.value),(ue=je.onVnodeBeforeMount)&&Ln(ue,ce,U)}Ze&&Oo(U,null,ce,"beforeMount");const rt=By(he,We);rt&&We.beforeEnter(we),n(we,K,te),((ue=je&&je.onVnodeMounted)||rt||Ze)&&$s(()=>{ue&&Ln(ue,ce,U),rt&&We.enter(we),Ze&&Oo(U,null,ce,"mounted")},he)},G=(U,K,te,ce,he)=>{if(te&&V(U,te),ce)for(let ie=0;ie{for(let ue=we;ue{const de=K.el=U.el;let{patchFlag:we,dynamicChildren:ue,dirs:De}=K;we|=U.patchFlag&16;const je=U.props||ir,Be=K.props||ir;let We;te&&No(te,!1),(We=Be.onVnodeBeforeUpdate)&&Ln(We,te,K,U),De&&Oo(K,U,te,"beforeUpdate"),te&&No(te,!0);const Ze=he&&K.type!=="foreignObject";if(ue?$e(U.dynamicChildren,ue,de,te,ce,Ze,ie):Ne||Ie(U,K,de,null,te,ce,Ze,ie,!1),we>0){if(we&16)ke(de,K,je,Be,te,ce,he);else if(we&2&&je.class!==Be.class&&d(de,"class",null,Be.class,he),we&4&&d(de,"style",je.style,Be.style,he),we&8){const rt=K.dynamicProps;for(let st=0;st{We&&Ln(We,te,K,U),De&&Oo(K,U,te,"updated")},ce)},$e=(U,K,te,ce,he,ie,Ne)=>{for(let de=0;de{if(te!==ce){if(te!==ir)for(const de in te)!Pf(de)&&!(de in ce)&&d(U,de,te[de],null,Ne,K.children,he,ie,kt);for(const de in ce){if(Pf(de))continue;const we=ce[de],ue=te[de];we!==ue&&de!=="value"&&d(U,de,ue,we,Ne,K.children,he,ie,kt)}"value"in ce&&d(U,"value",te.value,ce.value)}},ge=(U,K,te,ce,he,ie,Ne,de,we)=>{const ue=K.el=U?U.el:b(""),De=K.anchor=U?U.anchor:b("");let{patchFlag:je,dynamicChildren:Be,slotScopeIds:We}=K;We&&(de=de?de.concat(We):We),U==null?(n(ue,te,ce),n(De,te,ce),Q(K.children,te,De,he,ie,Ne,de,we)):je>0&&je&64&&Be&&U.dynamicChildren?($e(U.dynamicChildren,Be,te,he,ie,Ne,de),(K.key!=null||he&&K===he.subTree)&&yg(U,K,!0)):Ie(U,K,te,De,he,ie,Ne,de,we)},qe=(U,K,te,ce,he,ie,Ne,de,we)=>{K.slotScopeIds=de,U==null?K.shapeFlag&512?he.ctx.activate(K,te,ce,Ne,we):it(K,te,ce,he,ie,Ne,we):Zt(U,K,we)},it=(U,K,te,ce,he,ie,Ne)=>{const de=U.component=Zy(U,ce,he);if(cc(U)&&(de.ctx.renderer=_r),Qy(de),de.asyncDep){if(he&&he.registerDep(de,lt),!U.el){const we=de.subTree=hr(pn);_e(null,we,K,te)}return}lt(de,U,K,te,he,ie,Ne)},Zt=(U,K,te)=>{const ce=K.component=U.component;if(ay(U,K,te))if(ce.asyncDep&&!ce.asyncResolved){ot(ce,K,te);return}else ce.next=K,Qd(ce.update),ce.update();else K.el=U.el,ce.vnode=K},lt=(U,K,te,ce,he,ie,Ne)=>{const de=()=>{if(U.isMounted){let{next:De,bu:je,u:Be,parent:We,vnode:Ze}=U,rt=De,st;No(U,!1),De?(De.el=Ze.el,ot(U,De,Ne)):De=Ze,je&&bc(je),(st=De.props&&De.props.onVnodeBeforeUpdate)&&Ln(st,We,De,Ze),No(U,!0);const wt=Ac(U),Lt=U.subTree;U.subTree=wt,ee(Lt,wt,j(Lt.el),dr(Lt),U,he,ie),De.el=wt.el,rt===null&&iy(U,wt.el),Be&&$s(Be,he),(st=De.props&&De.props.onVnodeUpdated)&&$s(()=>Ln(st,We,De,Ze),he)}else{let De;const{el:je,props:Be}=K,{bm:We,m:Ze,parent:rt}=U,st=Gu(K);if(No(U,!1),We&&bc(We),!st&&(De=Be&&Be.onVnodeBeforeMount)&&Ln(De,rt,K),No(U,!0),je&&Ft){const wt=()=>{U.subTree=Ac(U),Ft(je,U.subTree,U,he,null)};st?K.type.__asyncLoader().then(()=>!U.isUnmounted&&wt()):wt()}else{const wt=U.subTree=Ac(U);ee(null,wt,te,ce,U,he,ie),K.el=wt.el}if(Ze&&$s(Ze,he),!st&&(De=Be&&Be.onVnodeMounted)){const wt=K;$s(()=>Ln(De,rt,wt),he)}(K.shapeFlag&256||rt&&Gu(rt.vnode)&&rt.vnode.shapeFlag&256)&&U.a&&$s(U.a,he),U.isMounted=!0,K=te=ce=null}},we=U.effect=new Uh(de,()=>Zh(ue),U.scope),ue=U.update=()=>we.run();ue.id=U.uid,No(U,!0),ue()},ot=(U,K,te)=>{K.component=U;const ce=U.vnode.props;U.vnode=K,U.next=null,Ty(U,K.props,ce,te),Ry(U,K.children,te),Du(),bp(),Lu()},Ie=(U,K,te,ce,he,ie,Ne,de,we=!1)=>{const ue=U&&U.children,De=U?U.shapeFlag:0,je=K.children,{patchFlag:Be,shapeFlag:We}=K;if(Be>0){if(Be&128){Mt(ue,je,te,ce,he,ie,Ne,de,we);return}else if(Be&256){at(ue,je,te,ce,he,ie,Ne,de,we);return}}We&8?(De&16&&kt(ue,he,ie),je!==ue&&F(te,je)):De&16?We&16?Mt(ue,je,te,ce,he,ie,Ne,de,we):kt(ue,he,ie,!0):(De&8&&F(te,""),We&16&&Q(je,te,ce,he,ie,Ne,de,we))},at=(U,K,te,ce,he,ie,Ne,de,we)=>{U=U||yu,K=K||yu;const ue=U.length,De=K.length,je=Math.min(ue,De);let Be;for(Be=0;BeDe?kt(U,he,ie,!0,!1,je):Q(K,te,ce,he,ie,Ne,de,we,je)},Mt=(U,K,te,ce,he,ie,Ne,de,we)=>{let ue=0;const De=K.length;let je=U.length-1,Be=De-1;for(;ue<=je&&ue<=Be;){const We=U[ue],Ze=K[ue]=we?ui(K[ue]):Un(K[ue]);if(Ro(We,Ze))ee(We,Ze,te,null,he,ie,Ne,de,we);else break;ue++}for(;ue<=je&&ue<=Be;){const We=U[je],Ze=K[Be]=we?ui(K[Be]):Un(K[Be]);if(Ro(We,Ze))ee(We,Ze,te,null,he,ie,Ne,de,we);else break;je--,Be--}if(ue>je){if(ue<=Be){const We=Be+1,Ze=WeBe)for(;ue<=je;)Qe(U[ue],he,ie,!0),ue++;else{const We=ue,Ze=ue,rt=new Map;for(ue=Ze;ue<=Be;ue++){const Ot=K[ue]=we?ui(K[ue]):Un(K[ue]);Ot.key!=null&&rt.set(Ot.key,ue)}let st,wt=0;const Lt=Be-Ze+1;let xt=!1,Gt=0;const _s=new Array(Lt);for(ue=0;ue=Lt){Qe(Ot,he,ie,!0);continue}let ht;if(Ot.key!=null)ht=rt.get(Ot.key);else for(st=Ze;st<=Be;st++)if(_s[st-Ze]===0&&Ro(Ot,K[st])){ht=st;break}ht===void 0?Qe(Ot,he,ie,!0):(_s[ht-Ze]=ue+1,ht>=Gt?Gt=ht:xt=!0,ee(Ot,K[ht],te,null,he,ie,Ne,de,we),wt++)}const Wr=xt?Hy(_s):yu;for(st=Wr.length-1,ue=Lt-1;ue>=0;ue--){const Ot=Ze+ue,ht=K[Ot],It=Ot+1{const{el:ie,type:Ne,transition:de,children:we,shapeFlag:ue}=U;if(ue&6){St(U.component.subTree,K,te,ce);return}if(ue&128){U.suspense.move(K,te,ce);return}if(ue&64){Ne.move(U,K,te,_r);return}if(Ne===Qr){n(ie,K,te);for(let je=0;jede.enter(ie),he);else{const{leave:je,delayLeave:Be,afterLeave:We}=de,Ze=()=>n(ie,K,te),rt=()=>{je(ie,()=>{Ze(),We&&We()})};Be?Be(ie,Ze,rt):rt()}else n(ie,K,te)},Qe=(U,K,te,ce=!1,he=!1)=>{const{type:ie,props:Ne,ref:de,children:we,dynamicChildren:ue,shapeFlag:De,patchFlag:je,dirs:Be}=U;if(de!=null&&ah(de,null,te,U,!0),De&256){K.ctx.deactivate(U);return}const We=De&1&&Be,Ze=!Gu(U);let rt;if(Ze&&(rt=Ne&&Ne.onVnodeBeforeUnmount)&&Ln(rt,K,U),De&6)yr(U.component,te,ce);else{if(De&128){U.suspense.unmount(te,ce);return}We&&Oo(U,null,K,"beforeUnmount"),De&64?U.type.remove(U,K,te,he,_r,ce):ue&&(ie!==Qr||je>0&&je&64)?kt(ue,K,te,!1,!0):(ie===Qr&&je&384||!he&&De&16)&&kt(we,K,te),ce&&Fr(U)}(Ze&&(rt=Ne&&Ne.onVnodeUnmounted)||We)&&$s(()=>{rt&&Ln(rt,K,U),We&&Oo(U,null,K,"unmounted")},te)},Fr=U=>{const{type:K,el:te,anchor:ce,transition:he}=U;if(K===Qr){Dt(te,ce);return}if(K===kc){B(U);return}const ie=()=>{h(te),he&&!he.persisted&&he.afterLeave&&he.afterLeave()};if(U.shapeFlag&1&&he&&!he.persisted){const{leave:Ne,delayLeave:de}=he,we=()=>Ne(te,ie);de?de(U.el,ie,we):we()}else ie()},Dt=(U,K)=>{let te;for(;U!==K;)te=D(U),h(U),U=te;h(K)},yr=(U,K,te)=>{const{bum:ce,scope:he,update:ie,subTree:Ne,um:de}=U;ce&&bc(ce),he.stop(),ie&&(ie.active=!1,Qe(Ne,U,K,te)),de&&$s(de,K),$s(()=>{U.isUnmounted=!0},K),K&&K.pendingBranch&&!K.isUnmounted&&U.asyncDep&&!U.asyncResolved&&U.suspenseId===K.pendingId&&(K.deps--,K.deps===0&&K.resolve())},kt=(U,K,te,ce=!1,he=!1,ie=0)=>{for(let Ne=ie;NeU.shapeFlag&6?dr(U.component.subTree):U.shapeFlag&128?U.suspense.next():D(U.anchor||U.el),Or=(U,K,te)=>{U==null?K._vnode&&Qe(K._vnode,null,null,!0):ee(K._vnode||null,U,K,null,null,null,te),bp(),Qv(),K._vnode=U},_r={p:ee,um:Qe,m:St,r:Fr,mt:it,mc:Q,pc:Ie,pbc:$e,n:dr,o:t};let Er,Ft;return r&&([Er,Ft]=r(_r)),{render:Or,hydrate:Er,createApp:Fy(Or,Er)}}function No({effect:t,update:r},e){t.allowRecurse=r.allowRecurse=e}function By(t,r){return(!t||t&&!t.pendingBranch)&&r&&!r.persisted}function yg(t,r,e=!1){const n=t.children,h=r.children;if(Ge(n)&&Ge(h))for(let d=0;d>1,t[e[b]]0&&(r[n]=e[d-1]),e[d]=n)}}for(d=e.length,$=e[d-1];d-- >0;)e[d]=$,$=r[$];return e}const Uy=t=>t.__isTeleport,Qr=Symbol.for("v-fgt"),pc=Symbol.for("v-txt"),pn=Symbol.for("v-cmt"),kc=Symbol.for("v-stc"),Xu=[];let Rn=null;function cr(t=!1){Xu.push(Rn=t?null:[])}function qy(){Xu.pop(),Rn=Xu[Xu.length-1]||null}let af=1;function Np(t){af+=t}function wg(t){return t.dynamicChildren=af>0?Rn||yu:null,qy(),af>0&&Rn&&Rn.push(t),t}function Mr(t,r,e,n,h,d){return wg(cn(t,r,e,n,h,d,!0))}function vc(t,r,e,n,h){return wg(hr(t,r,e,n,h,!0))}function Qf(t){return t?t.__v_isVNode===!0:!1}function Ro(t,r){return t.type===r.type&&t.key===r.key}const gc="__vInternal",mg=({key:t})=>t??null,Sf=({ref:t,ref_key:r,ref_for:e})=>(typeof t=="number"&&(t=""+t),t!=null?Pr(t)||es(t)||ft(t)?{i:ys,r:t,k:r,f:!!e}:t:null);function cn(t,r=null,e=null,n=0,h=null,d=t===Qr?0:1,$=!1,b=!1){const k={__v_isVNode:!0,__v_skip:!0,type:t,props:r,key:r&&mg(r),ref:r&&Sf(r),scopeId:fc,slotScopeIds:null,children:e,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:n,dynamicProps:h,dynamicChildren:null,appContext:null,ctx:ys};return b?(Xh(k,e),d&128&&t.normalize(k)):e&&(k.shapeFlag|=Pr(e)?8:16),af>0&&!$&&Rn&&(k.patchFlag>0||d&6)&&k.patchFlag!==32&&Rn.push(k),k}const hr=zy;function zy(t,r=null,e=null,n=0,h=null,d=!1){if((!t||t===ly)&&(t=pn),Qf(t)){const b=mi(t,r,!0);return e&&Xh(b,e),af>0&&!d&&Rn&&(b.shapeFlag&6?Rn[Rn.indexOf(t)]=b:Rn.push(b)),b.patchFlag|=-2,b}if(tw(t)&&(t=t.__vccOpts),r){r=Wy(r);let{class:b,style:k}=r;b&&!Pr(b)&&(r.class=Yr(b)),ar(k)&&(zv(k)&&!Ge(k)&&(k=Sr({},k)),r.style=Bh(k))}const $=Pr(t)?1:oy(t)?128:Uy(t)?64:ar(t)?4:ft(t)?2:0;return cn(t,r,e,n,h,$,d,!0)}function Wy(t){return t?zv(t)||gc in t?Sr({},t):t:null}function mi(t,r,e=!1){const{props:n,ref:h,patchFlag:d,children:$}=t,b=r?Vy(n||{},r):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:b,key:b&&mg(b),ref:r&&r.ref?e&&h?Ge(h)?h.concat(Sf(r)):[h,Sf(r)]:Sf(r):h,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:$,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:r&&t.type!==Qr?d===-1?16:d|16:d,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&mi(t.ssContent),ssFallback:t.ssFallback&&mi(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function jn(t=" ",r=0){return hr(pc,null,t,r)}function Tu(t="",r=!1){return r?(cr(),vc(pn,null,t)):hr(pn,null,t)}function Un(t){return t==null||typeof t=="boolean"?hr(pn):Ge(t)?hr(Qr,null,t.slice()):typeof t=="object"?ui(t):hr(pc,null,String(t))}function ui(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:mi(t)}function Xh(t,r){let e=0;const{shapeFlag:n}=t;if(r==null)r=null;else if(Ge(r))e=16;else if(typeof r=="object")if(n&65){const h=r.default;h&&(h._c&&(h._d=!1),Xh(t,h()),h._c&&(h._d=!0));return}else{e=32;const h=r._;!h&&!(gc in r)?r._ctx=ys:h===3&&ys&&(ys.slots._===1?r._=1:(r._=2,t.patchFlag|=1024))}else ft(r)?(r={default:r,_ctx:ys},e=32):(r=String(r),n&64?(e=16,r=[jn(r)]):e=8);t.children=r,t.shapeFlag|=e}function Vy(...t){const r={};for(let e=0;eqr||ys;let Yh,cu,Tp="__VUE_INSTANCE_SETTERS__";(cu=Kc()[Tp])||(cu=Kc()[Tp]=[]),cu.push(t=>qr=t),Yh=t=>{cu.length>1?cu.forEach(r=>r(t)):cu[0](t)};const Iu=t=>{Yh(t),t.scope.on()},Ko=()=>{qr&&qr.scope.off(),Yh(null)};function $g(t){return t.vnode.shapeFlag&4}let lf=!1;function Qy(t,r=!1){lf=r;const{props:e,children:n}=t.vnode,h=$g(t);Ny(t,e,h,r),jy(t,n);const d=h?Xy(t,r):void 0;return lf=!1,d}function Xy(t,r){const e=t.type;t.accessCache=Object.create(null),t.proxy=Wv(new Proxy(t.ctx,Cy));const{setup:n}=e;if(n){const h=t.setupContext=n.length>1?ew(t):null;Iu(t),Du();const d=di(n,t,0,[t.props,h]);if(Lu(),Ko(),Pv(d)){if(d.then(Ko,Ko),r)return d.then($=>{Ip(t,$,r)}).catch($=>{oc($,t,0)});t.asyncDep=d}else Ip(t,d,r)}else xg(t,r)}function Ip(t,r,e){ft(r)?t.type.__ssrInlineRender?t.ssrRender=r:t.render=r:ar(r)&&(t.setupState=Jv(r)),xg(t,e)}let jp;function xg(t,r,e){const n=t.type;if(!t.render){if(!r&&jp&&!n.render){const h=n.template||Gh(t).template;if(h){const{isCustomElement:d,compilerOptions:$}=t.appContext.config,{delimiters:b,compilerOptions:k}=n,E=Sr(Sr({isCustomElement:d,delimiters:b},$),k);n.render=jp(h,E)}}t.render=n.render||Dn}{Iu(t),Du();try{_y(t)}finally{Lu(),Ko()}}}function Yy(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(r,e){return bs(t,"get","$attrs"),r[e]}}))}function ew(t){const r=e=>{t.exposed=e||{}};return{get attrs(){return Yy(t)},slots:t.slots,emit:t.emit,expose:r}}function ep(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(Jv(Wv(t.exposed)),{get(r,e){if(e in r)return r[e];if(e in Qu)return Qu[e](t)},has(r,e){return e in r||e in Qu}}))}function tw(t){return ft(t)&&"__vccOpts"in t}const rw=(t,r)=>Kd(t,r,lf);function ni(t,r,e){const n=arguments.length;return n===2?ar(r)&&!Ge(r)?Qf(r)?hr(t,null,[r]):hr(t,r):hr(t,null,r):(n>3?e=Array.prototype.slice.call(arguments,2):n===3&&Qf(e)&&(e=[e]),hr(t,r,e))}const sw=Symbol.for("v-scx"),nw=()=>Mf(sw),aw="3.3.8",iw="http://www.w3.org/2000/svg",Do=typeof document<"u"?document:null,Rp=Do&&Do.createElement("template"),lw={insert:(t,r,e)=>{r.insertBefore(t,e||null)},remove:t=>{const r=t.parentNode;r&&r.removeChild(t)},createElement:(t,r,e,n)=>{const h=r?Do.createElementNS(iw,t):Do.createElement(t,e?{is:e}:void 0);return t==="select"&&n&&n.multiple!=null&&h.setAttribute("multiple",n.multiple),h},createText:t=>Do.createTextNode(t),createComment:t=>Do.createComment(t),setText:(t,r)=>{t.nodeValue=r},setElementText:(t,r)=>{t.textContent=r},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Do.querySelector(t),setScopeId(t,r){t.setAttribute(r,"")},insertStaticContent(t,r,e,n,h,d){const $=e?e.previousSibling:r.lastChild;if(h&&(h===d||h.nextSibling))for(;r.insertBefore(h.cloneNode(!0),e),!(h===d||!(h=h.nextSibling)););else{Rp.innerHTML=n?`${t}`:t;const b=Rp.content;if(n){const k=b.firstChild;for(;k.firstChild;)b.appendChild(k.firstChild);b.removeChild(k)}r.insertBefore(b,e)}return[$?$.nextSibling:r.firstChild,e?e.previousSibling:r.lastChild]}},ri="transition",Bu="animation",of=Symbol("_vtc"),tp=(t,{slots:r})=>ni(py,ow(t),r);tp.displayName="Transition";const bg={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};tp.props=Sr({},rg,bg);const To=(t,r=[])=>{Ge(t)?t.forEach(e=>e(...r)):t&&t(...r)},Dp=t=>t?Ge(t)?t.some(r=>r.length>1):t.length>1:!1;function ow(t){const r={};for(const ge in t)ge in bg||(r[ge]=t[ge]);if(t.css===!1)return r;const{name:e="v",type:n,duration:h,enterFromClass:d=`${e}-enter-from`,enterActiveClass:$=`${e}-enter-active`,enterToClass:b=`${e}-enter-to`,appearFromClass:k=d,appearActiveClass:E=$,appearToClass:F=b,leaveFromClass:j=`${e}-leave-from`,leaveActiveClass:D=`${e}-leave-active`,leaveToClass:V=`${e}-leave-to`}=t,pe=uw(h),ee=pe&&pe[0],ae=pe&&pe[1],{onBeforeEnter:_e,onEnter:H,onEnterCancelled:L,onLeave:B,onLeaveCancelled:q,onBeforeAppear:J=_e,onAppear:G=H,onAppearCancelled:Q=L}=r,X=(ge,qe,it)=>{Io(ge,qe?F:b),Io(ge,qe?E:$),it&&it()},$e=(ge,qe)=>{ge._isLeaving=!1,Io(ge,j),Io(ge,V),Io(ge,D),qe&&qe()},ke=ge=>(qe,it)=>{const Zt=ge?G:H,lt=()=>X(qe,ge,it);To(Zt,[qe,lt]),Lp(()=>{Io(qe,ge?k:d),si(qe,ge?F:b),Dp(Zt)||Bp(qe,n,ee,lt)})};return Sr(r,{onBeforeEnter(ge){To(_e,[ge]),si(ge,d),si(ge,$)},onBeforeAppear(ge){To(J,[ge]),si(ge,k),si(ge,E)},onEnter:ke(!1),onAppear:ke(!0),onLeave(ge,qe){ge._isLeaving=!0;const it=()=>$e(ge,qe);si(ge,j),hw(),si(ge,D),Lp(()=>{ge._isLeaving&&(Io(ge,j),si(ge,V),Dp(B)||Bp(ge,n,ae,it))}),To(B,[ge,it])},onEnterCancelled(ge){X(ge,!1),To(L,[ge])},onAppearCancelled(ge){X(ge,!0),To(Q,[ge])},onLeaveCancelled(ge){$e(ge),To(q,[ge])}})}function uw(t){if(t==null)return null;if(ar(t))return[Pc(t.enter),Pc(t.leave)];{const r=Pc(t);return[r,r]}}function Pc(t){return hd(t)}function si(t,r){r.split(/\s+/).forEach(e=>e&&t.classList.add(e)),(t[of]||(t[of]=new Set)).add(r)}function Io(t,r){r.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const e=t[of];e&&(e.delete(r),e.size||(t[of]=void 0))}function Lp(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let fw=0;function Bp(t,r,e,n){const h=t._endId=++fw,d=()=>{h===t._endId&&n()};if(e)return setTimeout(d,e);const{type:$,timeout:b,propCount:k}=cw(t,r);if(!$)return n();const E=$+"end";let F=0;const j=()=>{t.removeEventListener(E,D),d()},D=V=>{V.target===t&&++F>=k&&j()};setTimeout(()=>{F(e[pe]||"").split(", "),h=n(`${ri}Delay`),d=n(`${ri}Duration`),$=Hp(h,d),b=n(`${Bu}Delay`),k=n(`${Bu}Duration`),E=Hp(b,k);let F=null,j=0,D=0;r===ri?$>0&&(F=ri,j=$,D=d.length):r===Bu?E>0&&(F=Bu,j=E,D=k.length):(j=Math.max($,E),F=j>0?$>E?ri:Bu:null,D=F?F===ri?d.length:k.length:0);const V=F===ri&&/\b(transform|all)(,|$)/.test(n(`${ri}Property`).toString());return{type:F,timeout:j,propCount:D,hasTransform:V}}function Hp(t,r){for(;t.lengthUp(e)+Up(t[n])))}function Up(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function hw(){return document.body.offsetHeight}function pw(t,r,e){const n=t[of];n&&(r=(r?[r,...n]:[...n]).join(" ")),r==null?t.removeAttribute("class"):e?t.setAttribute("class",r):t.className=r}const vw=Symbol("_vod");function gw(t,r,e){const n=t.style,h=Pr(e);if(e&&!h){if(r&&!Pr(r))for(const d in r)e[d]==null&&ih(n,d,"");for(const d in e)ih(n,d,e[d])}else{const d=n.display;h?r!==e&&(n.cssText=e):r&&t.removeAttribute("style"),vw in t&&(n.display=d)}}const qp=/\s*!important$/;function ih(t,r,e){if(Ge(e))e.forEach(n=>ih(t,r,n));else if(e==null&&(e=""),r.startsWith("--"))t.setProperty(r,e);else{const n=dw(t,r);qp.test(e)?t.setProperty(Ru(n),e.replace(qp,""),"important"):t[n]=e}}const zp=["Webkit","Moz","ms"],Ec={};function dw(t,r){const e=Ec[r];if(e)return e;let n=Ou(r);if(n!=="filter"&&n in t)return Ec[r]=n;n=Sv(n);for(let h=0;hMc||(Aw.then(()=>Mc=0),Mc=Date.now());function _w(t,r){const e=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=e.attached)return;hn(kw(n,e.value),r,5,[n])};return e.value=t,e.attached=Cw(),e}function kw(t,r){if(Ge(r)){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{e.call(t),t._stopped=!0},r.map(n=>h=>!h._stopped&&n&&n(h))}else return r}const Jp=/^on[a-z]/,Pw=(t,r,e,n,h=!1,d,$,b,k)=>{r==="class"?pw(t,n,h):r==="style"?gw(t,e,n):sc(r)?Rh(r)||xw(t,r,e,n,$):(r[0]==="."?(r=r.slice(1),!0):r[0]==="^"?(r=r.slice(1),!1):Ew(t,r,n,h))?ww(t,r,n,d,$,b,k):(r==="true-value"?t._trueValue=n:r==="false-value"&&(t._falseValue=n),yw(t,r,n,h))};function Ew(t,r,e,n){return n?!!(r==="innerHTML"||r==="textContent"||r in t&&Jp.test(r)&&ft(e)):r==="spellcheck"||r==="draggable"||r==="translate"||r==="form"||r==="list"&&t.tagName==="INPUT"||r==="type"&&t.tagName==="TEXTAREA"||Jp.test(r)&&Pr(e)?!1:r in t}const Mw=Sr({patchProp:Pw},lw);let Zp;function Sw(){return Zp||(Zp=Dy(Mw))}const Fw=(...t)=>{const r=Sw().createApp(...t),{mount:e}=r;return r.mount=n=>{const h=Ow(n);if(!h)return;const d=r._component;!ft(d)&&!d.render&&!d.template&&(d.template=h.innerHTML),h.innerHTML="";const $=e(h,!1,h instanceof SVGElement);return h instanceof Element&&(h.removeAttribute("v-cloak"),h.setAttribute("data-v-app","")),$},r};function Ow(t){return Pr(t)?document.querySelector(t):t}function Yu(){return Yu=Object.assign||function(t){for(var r=1;r";return r},lineNumbersCount:function(){var r=this.codeData.split(/\r\n|\n/).length;return r}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var r=this.$refs.pre,e=this.$el.querySelector(".prism-editor__line-numbers"),n=window.getComputedStyle(r);this.$nextTick(function(){var h="border-top-left-radius",d="border-bottom-left-radius";if(e){e.style[h]=n[h],e.style[d]=n[d],r.style[h]="0",r.style[d]="0";var $=["background-color","margin-top","padding-top","font-family","font-size","line-height"];$.forEach(function(b){e.style[b]=n[b]}),e.style["margin-bottom"]="-"+n["padding-top"]}})}},_recordCurrentState:function(){var r=this.$refs.textarea;if(r){var e=r.value,n=r.selectionStart,h=r.selectionEnd;this._recordChange({value:e,selectionStart:n,selectionEnd:h})}},_getLines:function(r,e){return r.substring(0,e).split(` +`)},_applyEdits:function(r){var e=this.$refs.textarea,n=this.history.stack[this.history.offset];n&&e&&(this.history.stack[this.history.offset]=Yu({},n,{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd})),this._recordChange(r),this._updateInput(r)},_recordChange:function(r,e){e===void 0&&(e=!1);var n=this.history,h=n.stack,d=n.offset;if(h.length&&d>-1){this.history.stack=h.slice(0,d+1);var $=this.history.stack.length;if($>ev){var b=$-ev;this.history.stack=h.slice(b,$),this.history.offset=Math.max(this.history.offset-b,0)}}var k=Date.now();if(e){var E=this.history.stack[this.history.offset];if(E&&k-E.timestamp=j&&qe<=D&&ge.startsWith(E)?ge.substring(E.length):ge}).join(` +`);if($!==V){var pe=F[j];this._applyEdits({value:V,selectionStart:pe.startsWith(E)?b-E.length:b,selectionEnd:k-($.length-V.length)})}}else if(b!==k){var ee=this._getLines($,b),ae=ee.length-1,_e=this._getLines($,k).length-1,H=ee[ae];this._applyEdits({value:$.split(` +`).map(function(ge,qe){return qe>=ae&&qe<=_e?E+ge:ge}).join(` +`),selectionStart:/\S/.test(H)?b+E.length:b,selectionEnd:k+E.length*(_e-ae+1)})}else{var L=b+E.length;this._applyEdits({value:$.substring(0,b)+E+$.substring(k),selectionStart:L,selectionEnd:L})}else if(r.keyCode===Iw){var B=b!==k,q=$.substring(0,b);if(q.endsWith(E)&&!B){r.preventDefault();var J=b-E.length;this._applyEdits({value:$.substring(0,b-E.length)+$.substring(k),selectionStart:J,selectionEnd:J})}}else if(r.keyCode===Nw){if(b===k){var G=this._getLines($,b).pop(),Q=G==null?void 0:G.match(/^\s+/);if(Q&&Q[0]){r.preventDefault();var X=` +`+Q[0],$e=b+X.length;this._applyEdits({value:$.substring(0,b)+X+$.substring(k),selectionStart:$e,selectionEnd:$e})}}}else if(r.keyCode===Gp||r.keyCode===Qp||r.keyCode===Xp||r.keyCode===Yp){var ke;r.keyCode===Gp&&r.shiftKey?ke=["(",")"]:r.keyCode===Qp?r.shiftKey?ke=["{","}"]:ke=["[","]"]:r.keyCode===Xp?r.shiftKey?ke=['"','"']:ke=["'","'"]:r.keyCode===Yp&&!r.shiftKey&&(ke=["`","`"]),b!==k&&ke&&(r.preventDefault(),this._applyEdits({value:$.substring(0,b)+ke[0]+$.substring(b,k)+ke[1]+$.substring(k),selectionStart:b,selectionEnd:k+2}))}else(Sc?r.metaKey&&r.keyCode===Af:r.ctrlKey&&r.keyCode===Af)&&!r.shiftKey&&!r.altKey?(r.preventDefault(),this._undoEdit()):(Sc?r.metaKey&&r.keyCode===Af&&r.shiftKey:Bw?r.ctrlKey&&r.keyCode===jw:r.ctrlKey&&r.keyCode===Af&&r.shiftKey)&&!r.altKey?(r.preventDefault(),this._redoEdit()):r.keyCode===Rw&&r.ctrlKey&&(!Sc||r.shiftKey)&&(r.preventDefault(),this.capture=!this.capture)}}},render:function(){var r=this,e=ni("div",{class:"prism-editor__line-width-calc",style:"height: 0px; visibility: hidden; pointer-events: none;"},"999"),n=ni("div",{class:"prism-editor__line-numbers",style:{"min-height":this.lineNumbersHeight},"aria-hidden":"true"},[e,Array.from(Array(this.lineNumbersCount).keys()).map(function(b,k){return ni("div",{class:"prism-editor__line-number token comment"},""+ ++k)})]),h=ni("textarea",{ref:"textarea",onInput:this.handleChange,onKeydown:this.handleKeyDown,onClick:function(k){r.$emit("click",k)},onKeyup:function(k){r.$emit("keyup",k)},onFocus:function(k){r.$emit("focus",k)},onBlur:function(k){r.$emit("blur",k)},class:{"prism-editor__textarea":!0,"prism-editor__textarea--empty":this.isEmpty},spellCheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","data-gramm":"false",placeholder:this.placeholder,"data-testid":"textarea",readonly:this.readonly,value:this.codeData}),d=ni("pre",{ref:"pre",class:"prism-editor__editor","data-testid":"preview",innerHTML:this.content}),$=ni("div",{class:"prism-editor__container"},[h,d]);return ni("div",{class:"prism-editor-wrapper"},[this.lineNumbers&&n,$])}});var tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function qw(t){if(t.__esModule)return t;var r=t.default;if(typeof r=="function"){var e=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};e.prototype=r.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var h=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,h.get?h:{enumerable:!0,get:function(){return t[n]}})}),e}var zw={exports:{}};(function(t){var r=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 e=function(n){var h=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,$={},b={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function H(L){return L instanceof k?new k(L.type,H(L.content),L.alias):Array.isArray(L)?L.map(H):L.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(q){var H=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(q.stack)||[])[1];if(H){var L=document.getElementsByTagName("script");for(var B in L)if(L[B].src==H)return L[B]}return null}},isActive:function(H,L,B){for(var q="no-"+L;H;){var J=H.classList;if(J.contains(L))return!0;if(J.contains(q))return!1;H=H.parentElement}return!!B}},languages:{plain:$,plaintext:$,text:$,txt:$,extend:function(H,L){var B=b.util.clone(b.languages[H]);for(var q in L)B[q]=L[q];return B},insertBefore:function(H,L,B,q){q=q||b.languages;var J=q[H],G={};for(var Q in J)if(J.hasOwnProperty(Q)){if(Q==L)for(var X in B)B.hasOwnProperty(X)&&(G[X]=B[X]);B.hasOwnProperty(Q)||(G[Q]=J[Q])}var $e=q[H];return q[H]=G,b.languages.DFS(b.languages,function(ke,ge){ge===$e&&ke!=H&&(this[ke]=G)}),G},DFS:function H(L,B,q,J){J=J||{};var G=b.util.objId;for(var Q in L)if(L.hasOwnProperty(Q)){B.call(L,Q,L[Q],q||Q);var X=L[Q],$e=b.util.type(X);$e==="Object"&&!J[G(X)]?(J[G(X)]=!0,H(X,B,null,J)):$e==="Array"&&!J[G(X)]&&(J[G(X)]=!0,H(X,B,Q,J))}}},plugins:{},highlightAll:function(H,L){b.highlightAllUnder(document,H,L)},highlightAllUnder:function(H,L,B){var q={callback:B,container:H,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};b.hooks.run("before-highlightall",q),q.elements=Array.prototype.slice.apply(q.container.querySelectorAll(q.selector)),b.hooks.run("before-all-elements-highlight",q);for(var J=0,G;G=q.elements[J++];)b.highlightElement(G,L===!0,q.callback)},highlightElement:function(H,L,B){var q=b.util.getLanguage(H),J=b.languages[q];b.util.setLanguage(H,q);var G=H.parentElement;G&&G.nodeName.toLowerCase()==="pre"&&b.util.setLanguage(G,q);var Q=H.textContent,X={element:H,language:q,grammar:J,code:Q};function $e(ge){X.highlightedCode=ge,b.hooks.run("before-insert",X),X.element.innerHTML=X.highlightedCode,b.hooks.run("after-highlight",X),b.hooks.run("complete",X),B&&B.call(X.element)}if(b.hooks.run("before-sanity-check",X),G=X.element.parentElement,G&&G.nodeName.toLowerCase()==="pre"&&!G.hasAttribute("tabindex")&&G.setAttribute("tabindex","0"),!X.code){b.hooks.run("complete",X),B&&B.call(X.element);return}if(b.hooks.run("before-highlight",X),!X.grammar){$e(b.util.encode(X.code));return}if(L&&n.Worker){var ke=new Worker(b.filename);ke.onmessage=function(ge){$e(ge.data)},ke.postMessage(JSON.stringify({language:X.language,code:X.code,immediateClose:!0}))}else $e(b.highlight(X.code,X.grammar,X.language))},highlight:function(H,L,B){var q={code:H,grammar:L,language:B};if(b.hooks.run("before-tokenize",q),!q.grammar)throw new Error('The language "'+q.language+'" has no grammar.');return q.tokens=b.tokenize(q.code,q.grammar),b.hooks.run("after-tokenize",q),k.stringify(b.util.encode(q.tokens),q.language)},tokenize:function(H,L){var B=L.rest;if(B){for(var q in B)L[q]=B[q];delete L.rest}var J=new j;return D(J,J.head,H),F(H,J,L,J.head,0),pe(J)},hooks:{all:{},add:function(H,L){var B=b.hooks.all;B[H]=B[H]||[],B[H].push(L)},run:function(H,L){var B=b.hooks.all[H];if(!(!B||!B.length))for(var q=0,J;J=B[q++];)J(L)}},Token:k};n.Prism=b;function k(H,L,B,q){this.type=H,this.content=L,this.alias=B,this.length=(q||"").length|0}k.stringify=function H(L,B){if(typeof L=="string")return L;if(Array.isArray(L)){var q="";return L.forEach(function($e){q+=H($e,B)}),q}var J={type:L.type,content:H(L.content,B),tag:"span",classes:["token",L.type],attributes:{},language:B},G=L.alias;G&&(Array.isArray(G)?Array.prototype.push.apply(J.classes,G):J.classes.push(G)),b.hooks.run("wrap",J);var Q="";for(var X in J.attributes)Q+=" "+X+'="'+(J.attributes[X]||"").replace(/"/g,""")+'"';return"<"+J.tag+' class="'+J.classes.join(" ")+'"'+Q+">"+J.content+""};function E(H,L,B,q){H.lastIndex=L;var J=H.exec(B);if(J&&q&&J[1]){var G=J[1].length;J.index+=G,J[0]=J[0].slice(G)}return J}function F(H,L,B,q,J,G){for(var Q in B)if(!(!B.hasOwnProperty(Q)||!B[Q])){var X=B[Q];X=Array.isArray(X)?X:[X];for(var $e=0;$e=G.reach);at+=Ie.value.length,Ie=Ie.next){var Mt=Ie.value;if(L.length>H.length)return;if(!(Mt instanceof k)){var St=1,Qe;if(it){if(Qe=E(ot,at,H,qe),!Qe||Qe.index>=H.length)break;var kt=Qe.index,Fr=Qe.index+Qe[0].length,Dt=at;for(Dt+=Ie.value.length;kt>=Dt;)Ie=Ie.next,Dt+=Ie.value.length;if(Dt-=Ie.value.length,at=Dt,Ie.value instanceof k)continue;for(var yr=Ie;yr!==L.tail&&(DtG.reach&&(G.reach=Er);var Ft=Ie.prev;Or&&(Ft=D(L,Ft,Or),at+=Or.length),V(L,Ft,St);var U=new k(Q,ge?b.tokenize(dr,ge):dr,Zt,dr);if(Ie=D(L,Ft,U),_r&&D(L,Ie,_r),St>1){var K={cause:Q+","+$e,reach:Er};F(H,L,B,Ie.prev,at,K),G&&K.reach>G.reach&&(G.reach=K.reach)}}}}}}function j(){var H={value:null,prev:null,next:null},L={value:null,prev:H,next:null};H.next=L,this.head=H,this.tail=L,this.length=0}function D(H,L,B){var q=L.next,J={value:B,prev:L,next:q};return L.next=J,q.prev=J,H.length++,J}function V(H,L,B){for(var q=L.next,J=0;J/,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]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(h,d){var $={};$["language-"+d]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[d]},$.cdata=/^$/i;var b={"included-cdata":{pattern://i,inside:$}};b["language-"+d]={pattern:/[\s\S]+/,inside:e.languages[d]};var k={};k[h]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return h}),"i"),lookbehind:!0,greedy:!0,inside:b},e.languages.insertBefore("markup","cdata",k)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,h){e.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:[h,"language-"+h],inside:e.languages[h]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml,function(n){var h=/(?:"(?:\\(?:\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+"|"+h.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\\((?:"+h.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+h.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+h.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:h,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 d=n.languages.markup;d&&(d.tag.addInlined("style","css"),d.tag.addAttribute("style","css"))}(e),e.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:/[{}[\];(),.:]/},e.languages.javascript=e.languages.extend("clike",{"class-name":[e.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}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.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:e.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:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.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:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.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:e.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"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.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")),e.languages.js=e.languages.javascript,function(){if(typeof e>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",h=function(ee,ae){return"✖ Error "+ee+" while fetching file: "+ae},d="✖ Error: File does not exist or is empty",$={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},b="data-src-status",k="loading",E="loaded",F="failed",j="pre[data-src]:not(["+b+'="'+E+'"]):not(['+b+'="'+k+'"])';function D(ee,ae,_e){var H=new XMLHttpRequest;H.open("GET",ee,!0),H.onreadystatechange=function(){H.readyState==4&&(H.status<400&&H.responseText?ae(H.responseText):H.status>=400?_e(h(H.status,H.statusText)):_e(d))},H.send(null)}function V(ee){var ae=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(ee||"");if(ae){var _e=Number(ae[1]),H=ae[2],L=ae[3];return H?L?[_e,Number(L)]:[_e,void 0]:[_e,_e]}}e.hooks.add("before-highlightall",function(ee){ee.selector+=", "+j}),e.hooks.add("before-sanity-check",function(ee){var ae=ee.element;if(ae.matches(j)){ee.code="",ae.setAttribute(b,k);var _e=ae.appendChild(document.createElement("CODE"));_e.textContent=n;var H=ae.getAttribute("data-src"),L=ee.language;if(L==="none"){var B=(/\.(\w+)$/.exec(H)||[,"none"])[1];L=$[B]||B}e.util.setLanguage(_e,L),e.util.setLanguage(ae,L);var q=e.plugins.autoloader;q&&q.loadLanguages(L),D(H,function(J){ae.setAttribute(b,E);var G=V(ae.getAttribute("data-range"));if(G){var Q=J.split(/\r\n?|\n/g),X=G[0],$e=G[1]==null?Q.length:G[1];X<0&&(X+=Q.length),X=Math.max(0,Math.min(X-1,Q.length)),$e<0&&($e+=Q.length),$e=Math.max(0,Math.min($e,Q.length)),J=Q.slice(X,$e).join(` +`),ae.hasAttribute("data-start")||ae.setAttribute("data-start",String(X+1))}_e.textContent=J,e.highlightElement(_e)},function(J){ae.setAttribute(b,F),_e.textContent=J})}}),e.plugins.fileHighlight={highlight:function(ae){for(var _e=(ae||document).querySelectorAll(j),H=0,L;L=_e[H++];)e.highlightElement(L)}};var pe=!1;e.fileHighlight=function(){pe||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),pe=!0),e.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(zw);var Ag={exports:{}};(function(t){var r=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 e=function(n){var h=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,$={},b={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function H(L){return L instanceof k?new k(L.type,H(L.content),L.alias):Array.isArray(L)?L.map(H):L.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(q){var H=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(q.stack)||[])[1];if(H){var L=document.getElementsByTagName("script");for(var B in L)if(L[B].src==H)return L[B]}return null}},isActive:function(H,L,B){for(var q="no-"+L;H;){var J=H.classList;if(J.contains(L))return!0;if(J.contains(q))return!1;H=H.parentElement}return!!B}},languages:{plain:$,plaintext:$,text:$,txt:$,extend:function(H,L){var B=b.util.clone(b.languages[H]);for(var q in L)B[q]=L[q];return B},insertBefore:function(H,L,B,q){q=q||b.languages;var J=q[H],G={};for(var Q in J)if(J.hasOwnProperty(Q)){if(Q==L)for(var X in B)B.hasOwnProperty(X)&&(G[X]=B[X]);B.hasOwnProperty(Q)||(G[Q]=J[Q])}var $e=q[H];return q[H]=G,b.languages.DFS(b.languages,function(ke,ge){ge===$e&&ke!=H&&(this[ke]=G)}),G},DFS:function H(L,B,q,J){J=J||{};var G=b.util.objId;for(var Q in L)if(L.hasOwnProperty(Q)){B.call(L,Q,L[Q],q||Q);var X=L[Q],$e=b.util.type(X);$e==="Object"&&!J[G(X)]?(J[G(X)]=!0,H(X,B,null,J)):$e==="Array"&&!J[G(X)]&&(J[G(X)]=!0,H(X,B,Q,J))}}},plugins:{},highlightAll:function(H,L){b.highlightAllUnder(document,H,L)},highlightAllUnder:function(H,L,B){var q={callback:B,container:H,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};b.hooks.run("before-highlightall",q),q.elements=Array.prototype.slice.apply(q.container.querySelectorAll(q.selector)),b.hooks.run("before-all-elements-highlight",q);for(var J=0,G;G=q.elements[J++];)b.highlightElement(G,L===!0,q.callback)},highlightElement:function(H,L,B){var q=b.util.getLanguage(H),J=b.languages[q];b.util.setLanguage(H,q);var G=H.parentElement;G&&G.nodeName.toLowerCase()==="pre"&&b.util.setLanguage(G,q);var Q=H.textContent,X={element:H,language:q,grammar:J,code:Q};function $e(ge){X.highlightedCode=ge,b.hooks.run("before-insert",X),X.element.innerHTML=X.highlightedCode,b.hooks.run("after-highlight",X),b.hooks.run("complete",X),B&&B.call(X.element)}if(b.hooks.run("before-sanity-check",X),G=X.element.parentElement,G&&G.nodeName.toLowerCase()==="pre"&&!G.hasAttribute("tabindex")&&G.setAttribute("tabindex","0"),!X.code){b.hooks.run("complete",X),B&&B.call(X.element);return}if(b.hooks.run("before-highlight",X),!X.grammar){$e(b.util.encode(X.code));return}if(L&&n.Worker){var ke=new Worker(b.filename);ke.onmessage=function(ge){$e(ge.data)},ke.postMessage(JSON.stringify({language:X.language,code:X.code,immediateClose:!0}))}else $e(b.highlight(X.code,X.grammar,X.language))},highlight:function(H,L,B){var q={code:H,grammar:L,language:B};if(b.hooks.run("before-tokenize",q),!q.grammar)throw new Error('The language "'+q.language+'" has no grammar.');return q.tokens=b.tokenize(q.code,q.grammar),b.hooks.run("after-tokenize",q),k.stringify(b.util.encode(q.tokens),q.language)},tokenize:function(H,L){var B=L.rest;if(B){for(var q in B)L[q]=B[q];delete L.rest}var J=new j;return D(J,J.head,H),F(H,J,L,J.head,0),pe(J)},hooks:{all:{},add:function(H,L){var B=b.hooks.all;B[H]=B[H]||[],B[H].push(L)},run:function(H,L){var B=b.hooks.all[H];if(!(!B||!B.length))for(var q=0,J;J=B[q++];)J(L)}},Token:k};n.Prism=b;function k(H,L,B,q){this.type=H,this.content=L,this.alias=B,this.length=(q||"").length|0}k.stringify=function H(L,B){if(typeof L=="string")return L;if(Array.isArray(L)){var q="";return L.forEach(function($e){q+=H($e,B)}),q}var J={type:L.type,content:H(L.content,B),tag:"span",classes:["token",L.type],attributes:{},language:B},G=L.alias;G&&(Array.isArray(G)?Array.prototype.push.apply(J.classes,G):J.classes.push(G)),b.hooks.run("wrap",J);var Q="";for(var X in J.attributes)Q+=" "+X+'="'+(J.attributes[X]||"").replace(/"/g,""")+'"';return"<"+J.tag+' class="'+J.classes.join(" ")+'"'+Q+">"+J.content+""};function E(H,L,B,q){H.lastIndex=L;var J=H.exec(B);if(J&&q&&J[1]){var G=J[1].length;J.index+=G,J[0]=J[0].slice(G)}return J}function F(H,L,B,q,J,G){for(var Q in B)if(!(!B.hasOwnProperty(Q)||!B[Q])){var X=B[Q];X=Array.isArray(X)?X:[X];for(var $e=0;$e=G.reach);at+=Ie.value.length,Ie=Ie.next){var Mt=Ie.value;if(L.length>H.length)return;if(!(Mt instanceof k)){var St=1,Qe;if(it){if(Qe=E(ot,at,H,qe),!Qe||Qe.index>=H.length)break;var kt=Qe.index,Fr=Qe.index+Qe[0].length,Dt=at;for(Dt+=Ie.value.length;kt>=Dt;)Ie=Ie.next,Dt+=Ie.value.length;if(Dt-=Ie.value.length,at=Dt,Ie.value instanceof k)continue;for(var yr=Ie;yr!==L.tail&&(DtG.reach&&(G.reach=Er);var Ft=Ie.prev;Or&&(Ft=D(L,Ft,Or),at+=Or.length),V(L,Ft,St);var U=new k(Q,ge?b.tokenize(dr,ge):dr,Zt,dr);if(Ie=D(L,Ft,U),_r&&D(L,Ie,_r),St>1){var K={cause:Q+","+$e,reach:Er};F(H,L,B,Ie.prev,at,K),G&&K.reach>G.reach&&(G.reach=K.reach)}}}}}}function j(){var H={value:null,prev:null,next:null},L={value:null,prev:H,next:null};H.next=L,this.head=H,this.tail=L,this.length=0}function D(H,L,B){var q=L.next,J={value:B,prev:L,next:q};return L.next=J,q.prev=J,H.length++,J}function V(H,L,B){for(var q=L.next,J=0;J]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,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 Ww={computed:{hasHeader(){return!!this.$slots.header},hasFooter(){return!!this.$slots.footer}}},Vw="_container_zhbxc_2",Kw="_header_zhbxc_9",Jw="_main_zhbxc_14",Zw="_footer_zhbxc_19",Gw={container:Vw,header:Kw,main:Jw,footer:Zw},ff=(t,r)=>{const e=t.__vccOpts||t;for(const[n,h]of r)e[n]=h;return e};function Qw(t,r,e,n,h,d){return cr(),Mr("div",{class:Yr(t.$style.container)},[d.hasHeader?(cr(),Mr("header",{key:0,class:Yr(t.$style.header)},[Ef(t.$slots,"header")],2)):Tu("",!0),cn("main",{class:Yr(t.$style.main)},[Ef(t.$slots,"default")],2),d.hasFooter?(cr(),Mr("footer",{key:1,class:Yr(t.$style.footer)},[Ef(t.$slots,"footer")],2)):Tu("",!0)],2)}const Xw={$style:Gw},Ju=ff(Ww,[["render",Qw],["__cssModules",Xw]]),Yw={key:0},em=["onClick"],tm={key:1},rm=["onClick"],sm=uf({__name:"MenuButton",props:{options:{}},emits:["select"],setup(t,{emit:r}){const e=Bo(!1),n=r;return(h,d)=>(cr(),Mr("div",{class:Yr(h.$style.wrapper)},[cn("button",{onClick:d[0]||(d[0]=$=>e.value=!e.value)},[Ef(h.$slots,"default")]),hr(tp,null,{default:xs(()=>[e.value?(cr(),Mr("div",{key:0,class:Yr(h.$style.menu)},[h.options instanceof Array?(cr(),Mr("div",Yw,[(cr(!0),Mr(Qr,null,Jf(h.options,$=>(cr(),Mr("div",{class:Yr(h.$style.opt),onClick:b=>{e.value=!1,n("select",$)}},Wo($),11,em))),256))])):(cr(),Mr("div",tm,[(cr(!0),Mr(Qr,null,Jf(Object.keys(h.options),$=>(cr(),Mr("div",{class:Yr(h.$style.opt),onClick:b=>{e.value=!1,n("select",$)}},Wo(h.options[$]),11,rm))),256))]))],2)):Tu("",!0)]),_:1})],2))}}),nm="_wrapper_1dk0z_2",am="_menu_1dk0z_5",im="_opt_1dk0z_12",lm={wrapper:nm,menu:am,opt:im},om={$style:lm},Cg=ff(sm,[["__cssModules",om]]),um=uf({__name:"Editor",props:{modelValue:{},samples:{},parseError:{}},emits:["run","update:modelValue"],setup(t,{emit:r}){const e=t,n=r,h=Bo(e.modelValue);Zu(h,()=>{n("update:modelValue",h.value)},{immediate:!0});function d(b){h.value=e.samples[b]}const $=b=>tv.highlight(b,tv.languages.js,"javascript");return(b,k)=>(cr(),vc(Ju,null,{header:xs(()=>[jn(" Input "),e.samples?(cr(),Mr("div",{key:0,class:Yr(b.$style.actions)},[hr(Cg,{options:Object.keys(e.samples),onSelect:d},{default:xs(()=>[jn("Samples")]),_:1},8,["options"])],2)):Tu("",!0)]),footer:xs(()=>[e.parseError?(cr(),Mr("span",{key:0,class:Yr(b.$style.parseError)},Wo(e.parseError),3)):Tu("",!0),cn("div",{class:Yr(b.$style.actions)},[cn("button",{onClick:k[1]||(k[1]=E=>n("run"))},"RUN")],2)]),default:xs(()=>[hr(rf(Hw),{class:Yr(b.$style.code),modelValue:h.value,"onUpdate:modelValue":k[0]||(k[0]=E=>h.value=E),highlight:$,"line-numbers":!1},null,8,["class","modelValue"])]),_:1}))}}),fm="_code_af8rl_2",cm="_parseError_af8rl_6",hm="_actions_af8rl_9",pm={code:fm,parseError:cm,actions:hm},vm={$style:pm},gm=ff(um,[["__cssModules",vm]]);function lr(t,r,e){let n=e.value;return{configurable:!0,get(){const h=n.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:h}),h},set(h){n=h}}}let ju=class _g extends Error{constructor(e,n){super(e);me(this,"name","AiScript");me(this,"info");me(this,"loc");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,_g)}},rv=class extends ju{constructor(e){super(e.message??`${e}`,e);me(this,"name","Internal")}},gt=class extends ju{constructor(e,n,h){super(`${e} (Line ${n.line}, Column ${n.column})`,h);me(this,"loc");me(this,"name","Syntax");this.loc=n}};class sv extends ju{constructor(e,n,h){super(`${e} (Line ${n.line}, Column ${n.column})`,h);me(this,"loc");me(this,"name","Namespace");this.loc=n}}let Vt=class extends ju{constructor(e,n){super(e,n);me(this,"name","Runtime")}},dm=class extends Vt{constructor(r,e){super(r,e)}};var $i=globalThis&&globalThis.__decorate||function(t,r,e,n){var h=arguments.length,d=h<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var b=t.length-1;b>=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};let Xa=class kg{constructor(r=[],e,n){me(this,"parent");me(this,"layerdStates");me(this,"name");me(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new kg(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r).value;return this.log("read",{var:r,val:n}),n}throw new Vt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new Vt(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let n=1;for(const h of this.layerdStates){if(h.has(r)){const d=h.get(r);if(!d.isMutable)throw new Vt(`Cannot assign to an immutable variable ${r}.`);d.value=e,this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new Vt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};$i([lr],Xa.prototype,"log",null);$i([lr],Xa.prototype,"onUpdated",null);$i([lr],Xa.prototype,"createChildScope",null);$i([lr],Xa.prototype,"get",null);$i([lr],Xa.prototype,"exists",null);$i([lr],Xa.prototype,"getAll",null);$i([lr],Xa.prototype,"add",null);$i([lr],Xa.prototype,"assign",null);let Cf;const ym=new Uint8Array(16);function wm(){if(!Cf&&(Cf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cf(ym)}const Br=[];for(let t=0;t<256;++t)Br.push((t+256).toString(16).slice(1));function mm(t,r=0){return Br[t[r+0]]+Br[t[r+1]]+Br[t[r+2]]+Br[t[r+3]]+"-"+Br[t[r+4]]+Br[t[r+5]]+"-"+Br[t[r+6]]+Br[t[r+7]]+"-"+Br[t[r+8]]+Br[t[r+9]]+"-"+Br[t[r+10]]+Br[t[r+11]]+Br[t[r+12]]+Br[t[r+13]]+Br[t[r+14]]+Br[t[r+15]]}const $m=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nv={randomUUID:$m};function rp(t,r,e){if(nv.randomUUID&&!r&&!t)return nv.randomUUID();t=t||{};const n=t.random||(t.rng||wm)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let h=0;h<16;++h)r[e+h]=n[h];return r}return mm(n)}var sp={exports:{}};sp.exports;(function(t){(function(r,e,n){function h(k){var E=this,F=b();E.next=function(){var j=2091639*E.s0+E.c*23283064365386963e-26;return E.s0=E.s1,E.s1=E.s2,E.s2=j-(E.c=j|0)},E.c=1,E.s0=F(" "),E.s1=F(" "),E.s2=F(" "),E.s0-=F(k),E.s0<0&&(E.s0+=1),E.s1-=F(k),E.s1<0&&(E.s1+=1),E.s2-=F(k),E.s2<0&&(E.s2+=1),F=null}function d(k,E){return E.c=k.c,E.s0=k.s0,E.s1=k.s1,E.s2=k.s2,E}function $(k,E){var F=new h(k),j=E&&E.state,D=F.next;return D.int32=function(){return F.next()*4294967296|0},D.double=function(){return D()+(D()*2097152|0)*11102230246251565e-32},D.quick=D,j&&(typeof j=="object"&&d(j,F),D.state=function(){return d(F,{})}),D}function b(){var k=4022871197,E=function(F){F=String(F);for(var j=0;j>>0,D-=k,D*=k,k=D>>>0,D-=k,k+=D*4294967296}return(k>>>0)*23283064365386963e-26};return E}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.alea=$})(tn,t,!1)})(sp);var xm=sp.exports,np={exports:{}};np.exports;(function(t){(function(r,e,n){function h(b){var k=this,E="";k.x=0,k.y=0,k.z=0,k.w=0,k.next=function(){var j=k.x^k.x<<11;return k.x=k.y,k.y=k.z,k.z=k.w,k.w^=k.w>>>19^j^j>>>8},b===(b|0)?k.x=b:E+=b;for(var F=0;F>>0)/4294967296};return j.double=function(){do var D=E.next()>>>11,V=(E.next()>>>0)/4294967296,pe=(D+V)/(1<<21);while(pe===0);return pe},j.int32=E.next,j.quick=j,F&&(typeof F=="object"&&d(F,E),j.state=function(){return d(E,{})}),j}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor128=$})(tn,t,!1)})(np);var bm=np.exports,ap={exports:{}};ap.exports;(function(t){(function(r,e,n){function h(b){var k=this,E="";k.next=function(){var j=k.x^k.x>>>2;return k.x=k.y,k.y=k.z,k.z=k.w,k.w=k.v,(k.d=k.d+362437|0)+(k.v=k.v^k.v<<4^(j^j<<1))|0},k.x=0,k.y=0,k.z=0,k.w=0,k.v=0,b===(b|0)?k.x=b:E+=b;for(var F=0;F>>4),k.next()}function d(b,k){return k.x=b.x,k.y=b.y,k.z=b.z,k.w=b.w,k.v=b.v,k.d=b.d,k}function $(b,k){var E=new h(b),F=k&&k.state,j=function(){return(E.next()>>>0)/4294967296};return j.double=function(){do var D=E.next()>>>11,V=(E.next()>>>0)/4294967296,pe=(D+V)/(1<<21);while(pe===0);return pe},j.int32=E.next,j.quick=j,F&&(typeof F=="object"&&d(F,E),j.state=function(){return d(E,{})}),j}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorwow=$})(tn,t,!1)})(ap);var Am=ap.exports,ip={exports:{}};ip.exports;(function(t){(function(r,e,n){function h(b){var k=this;k.next=function(){var F=k.x,j=k.i,D,V;return D=F[j],D^=D>>>7,V=D^D<<24,D=F[j+1&7],V^=D^D>>>10,D=F[j+3&7],V^=D^D>>>3,D=F[j+4&7],V^=D^D<<7,D=F[j+7&7],D=D^D<<13,V^=D^D<<9,F[j]=V,k.i=j+1&7,V};function E(F,j){var D,V=[];if(j===(j|0))V[0]=j;else for(j=""+j,D=0;D0;--D)F.next()}E(k,b)}function d(b,k){return k.x=b.x.slice(),k.i=b.i,k}function $(b,k){b==null&&(b=+new Date);var E=new h(b),F=k&&k.state,j=function(){return(E.next()>>>0)/4294967296};return j.double=function(){do var D=E.next()>>>11,V=(E.next()>>>0)/4294967296,pe=(D+V)/(1<<21);while(pe===0);return pe},j.int32=E.next,j.quick=j,F&&(F.x&&d(F,E),j.state=function(){return d(E,{})}),j}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorshift7=$})(tn,t,!1)})(ip);var Cm=ip.exports,lp={exports:{}};lp.exports;(function(t){(function(r,e,n){function h(b){var k=this;k.next=function(){var F=k.w,j=k.X,D=k.i,V,pe;return k.w=F=F+1640531527|0,pe=j[D+34&127],V=j[D=D+1&127],pe^=pe<<13,V^=V<<17,pe^=pe>>>15,V^=V>>>12,pe=j[D]=pe^V,k.i=D,pe+(F^F>>>16)|0};function E(F,j){var D,V,pe,ee,ae,_e=[],H=128;for(j===(j|0)?(V=j,j=null):(j=j+"\0",V=0,H=Math.max(H,j.length)),pe=0,ee=-32;ee>>15,V^=V<<4,V^=V>>>13,ee>=0&&(ae=ae+1640531527|0,D=_e[ee&127]^=V+ae,pe=D==0?pe+1:0);for(pe>=128&&(_e[(j&&j.length||0)&127]=-1),pe=127,ee=4*128;ee>0;--ee)V=_e[pe+34&127],D=_e[pe=pe+1&127],V^=V<<13,D^=D<<17,V^=V>>>15,D^=D>>>12,_e[pe]=V^D;F.w=ae,F.X=_e,F.i=pe}E(k,b)}function d(b,k){return k.i=b.i,k.w=b.w,k.X=b.X.slice(),k}function $(b,k){b==null&&(b=+new Date);var E=new h(b),F=k&&k.state,j=function(){return(E.next()>>>0)/4294967296};return j.double=function(){do var D=E.next()>>>11,V=(E.next()>>>0)/4294967296,pe=(D+V)/(1<<21);while(pe===0);return pe},j.int32=E.next,j.quick=j,F&&(F.X&&d(F,E),j.state=function(){return d(E,{})}),j}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor4096=$})(tn,t,!1)})(lp);var _m=lp.exports,op={exports:{}};op.exports;(function(t){(function(r,e,n){function h(b){var k=this,E="";k.next=function(){var j=k.b,D=k.c,V=k.d,pe=k.a;return j=j<<25^j>>>7^D,D=D-V|0,V=V<<24^V>>>8^pe,pe=pe-j|0,k.b=j=j<<20^j>>>12^D,k.c=D=D-V|0,k.d=V<<16^D>>>16^pe,k.a=pe-j|0},k.a=0,k.b=0,k.c=-1640531527,k.d=1367130551,b===Math.floor(b)?(k.a=b/4294967296|0,k.b=b|0):E+=b;for(var F=0;F>>0)/4294967296};return j.double=function(){do var D=E.next()>>>11,V=(E.next()>>>0)/4294967296,pe=(D+V)/(1<<21);while(pe===0);return pe},j.int32=E.next,j.quick=j,F&&(typeof F=="object"&&d(F,E),j.state=function(){return d(E,{})}),j}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.tychei=$})(tn,t,!1)})(op);var km=op.exports,Pg={exports:{}};const Pm={},Em=Object.freeze(Object.defineProperty({__proto__:null,default:Pm},Symbol.toStringTag,{value:"Module"})),Mm=qw(Em);(function(t){(function(r,e,n){var h=256,d=6,$=52,b="random",k=n.pow(h,d),E=n.pow(2,$),F=E*2,j=h-1,D;function V(B,q,J){var G=[];q=q==!0?{entropy:!0}:q||{};var Q=_e(ae(q.entropy?[B,L(e)]:B??H(),3),G),X=new pe(G),$e=function(){for(var ke=X.g(d),ge=k,qe=0;ke=F;)ke/=2,ge/=2,qe>>>=1;return(ke+qe)/ge};return $e.int32=function(){return X.g(4)|0},$e.quick=function(){return X.g(4)/4294967296},$e.double=$e,_e(L(X.S),e),(q.pass||J||function(ke,ge,qe,it){return it&&(it.S&&ee(it,X),ke.state=function(){return ee(X,{})}),qe?(n[b]=ke,ge):ke})($e,Q,"global"in q?q.global:this==n,q.state)}function pe(B){var q,J=B.length,G=this,Q=0,X=G.i=G.j=0,$e=G.S=[];for(J||(B=[J++]);Q({type:"num",value:t}),qt=t=>({type:"str",value:t}),Jo=t=>({type:"bool",value:t}),Xf=t=>({type:"obj",value:t}),Vr=t=>({type:"arr",value:t}),Dm=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),le=t=>({type:"fn",native:t}),Lm=t=>({type:"return",value:t}),Bm=()=>({type:"break",value:null}),Hm=()=>({type:"continue",value:null}),Um=t=>t.type==="return"?t.value:t,lh=(t,r)=>({type:"error",value:t,info:r});function Gs(t){if(t==null)throw new Vt("Expect anything, but got nothing.")}function hs(t){if(t==null)throw new Vt("Expect boolean, but got nothing.");if(t.type!=="bool")throw new Vt(`Expect boolean, but got ${t.type}.`)}function fi(t){if(t==null)throw new Vt("Expect function, but got nothing.");if(t.type!=="fn")throw new Vt(`Expect function, but got ${t.type}.`)}function Ar(t){if(t==null)throw new Vt("Expect string, but got nothing.");if(t.type!=="str")throw new Vt(`Expect string, but got ${t.type}.`)}function be(t){if(t==null)throw new Vt("Expect number, but got nothing.");if(t.type!=="num")throw new Vt(`Expect number, but got ${t.type}.`)}function Bn(t){if(t==null)throw new Vt("Expect object, but got nothing.");if(t.type!=="obj")throw new Vt(`Expect object, but got ${t.type}.`)}function Yf(t){if(t==null)throw new Vt("Expect array, but got nothing.");if(t.type!=="arr")throw new Vt(`Expect array, but got ${t.type}.`)}function Fc(t){return t.type==="obj"}function av(t){return t.type==="arr"}function oh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function uh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>uh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function fh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>fh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=fh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function ch(t){if(t===null)return bt;if(typeof t=="boolean")return Jo(t);if(typeof t=="string")return qt(t);if(typeof t=="number")return Me(t);if(Array.isArray(t))return Vr(t.map(r=>ch(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,ch(n));return Xf(r)}return bt}function xu(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const n=[];for(const h of t.value)n.push(xu(h,!0,e));return"[ "+n.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const n=[];for(const[h,d]of t.value)n.push(`${h}: ${xu(d,!0,e)}`);return"{ "+n.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const qm={help:qt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":qt("0.16.0"),"Core:ai":qt("kawaii"),"Core:not":le(([t])=>(hs(t),t.value?Ws:an)),"Core:eq":le(([t,r])=>(Gs(t),Gs(r),oh(t,r)?an:Ws)),"Core:neq":le(([t,r])=>(Gs(t),Gs(r),oh(t,r)?Ws:an)),"Core:and":le(([t,r])=>(hs(t),t.value?(hs(r),r.value?an:Ws):Ws)),"Core:or":le(([t,r])=>(hs(t),t.value?an:(hs(r),r.value?an:Ws))),"Core:add":le(([t,r])=>(be(t),be(r),Me(t.value+r.value))),"Core:sub":le(([t,r])=>(be(t),be(r),Me(t.value-r.value))),"Core:mul":le(([t,r])=>(be(t),be(r),Me(t.value*r.value))),"Core:pow":le(([t,r])=>{be(t),be(r);const e=t.value**r.value;if(isNaN(e))throw new Vt("Invalid operation.");return Me(e)}),"Core:div":le(([t,r])=>{be(t),be(r);const e=t.value/r.value;if(isNaN(e))throw new Vt("Invalid operation.");return Me(e)}),"Core:mod":le(([t,r])=>(be(t),be(r),Me(t.value%r.value))),"Core:gt":le(([t,r])=>(be(t),be(r),t.value>r.value?an:Ws)),"Core:lt":le(([t,r])=>(be(t),be(r),t.value(be(t),be(r),t.value>=r.value?an:Ws)),"Core:lteq":le(([t,r])=>(be(t),be(r),t.value<=r.value?an:Ws)),"Core:type":le(([t])=>(Gs(t),qt(t.type))),"Core:to_str":le(([t])=>(Gs(t),qt(xu(t)))),"Core:range":le(([t,r])=>(be(t),be(r),t.valueMe(n+t.value))):t.value>r.value?Vr(Array.from({length:t.value-r.value+1},(e,n)=>Me(t.value-n))):Vr([t]))),"Core:sleep":le(async([t])=>(be(t),await new Promise(r=>setTimeout(r,t.value)),bt)),"Util:uuid":le(()=>qt(rp())),"Json:stringify":le(([t])=>(Gs(t),qt(JSON.stringify(fh(t))))),"Json:parse":le(([t])=>{Ar(t);try{return ch(JSON.parse(t.value))}catch{return lh("not_json")}}),"Json:parsable":le(([t])=>{Ar(t);try{JSON.parse(t.value)}catch{return Jo(!1)}return Jo(!0)}),"Date:now":le(()=>Me(Date.now())),"Date:year":le(([t])=>(t&&be(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":le(([t])=>(t&&be(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":le(([t])=>(t&&be(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":le(([t])=>(t&&be(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":le(([t])=>(t&&be(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":le(([t])=>(t&&be(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":le(([t])=>(Ar(t),Me(new Date(t.value).getTime()))),"Math:Infinity":Me(1/0),"Math:E":Me(Math.E),"Math:LN2":Me(Math.LN2),"Math:LN10":Me(Math.LN10),"Math:LOG2E":Me(Math.LOG2E),"Math:LOG10E":Me(Math.LOG10E),"Math:PI":Me(Math.PI),"Math:SQRT1_2":Me(Math.SQRT1_2),"Math:SQRT2":Me(Math.SQRT2),"Math:abs":le(([t])=>(be(t),Me(Math.abs(t.value)))),"Math:acos":le(([t])=>(be(t),Me(Math.acos(t.value)))),"Math:acosh":le(([t])=>(be(t),Me(Math.acosh(t.value)))),"Math:asin":le(([t])=>(be(t),Me(Math.asin(t.value)))),"Math:asinh":le(([t])=>(be(t),Me(Math.asinh(t.value)))),"Math:atan":le(([t])=>(be(t),Me(Math.atan(t.value)))),"Math:atanh":le(([t])=>(be(t),Me(Math.atanh(t.value)))),"Math:atan2":le(([t,r])=>(be(t),be(r),Me(Math.atan2(t.value,r.value)))),"Math:cbrt":le(([t])=>(be(t),Me(Math.cbrt(t.value)))),"Math:ceil":le(([t])=>(be(t),Me(Math.ceil(t.value)))),"Math:clz32":le(([t])=>(be(t),Me(Math.clz32(t.value)))),"Math:cos":le(([t])=>(be(t),Me(Math.cos(t.value)))),"Math:cosh":le(([t])=>(be(t),Me(Math.cosh(t.value)))),"Math:exp":le(([t])=>(be(t),Me(Math.exp(t.value)))),"Math:expm1":le(([t])=>(be(t),Me(Math.expm1(t.value)))),"Math:floor":le(([t])=>(be(t),Me(Math.floor(t.value)))),"Math:fround":le(([t])=>(be(t),Me(Math.fround(t.value)))),"Math:hypot":le(([t])=>{Yf(t);const r=[];for(const e of t.value)be(e),r.push(e.value);return Me(Math.hypot(...r))}),"Math:imul":le(([t,r])=>(be(t),be(r),Me(Math.imul(t.value,r.value)))),"Math:log":le(([t])=>(be(t),Me(Math.log(t.value)))),"Math:log1p":le(([t])=>(be(t),Me(Math.log1p(t.value)))),"Math:log10":le(([t])=>(be(t),Me(Math.log10(t.value)))),"Math:log2":le(([t])=>(be(t),Me(Math.log2(t.value)))),"Math:max":le(([t,r])=>(be(t),be(r),Me(Math.max(t.value,r.value)))),"Math:min":le(([t,r])=>(be(t),be(r),Me(Math.min(t.value,r.value)))),"Math:pow":le(([t,r])=>(be(t),be(r),Me(Math.pow(t.value,r.value)))),"Math:round":le(([t])=>(be(t),Me(Math.round(t.value)))),"Math:sign":le(([t])=>(be(t),Me(Math.sign(t.value)))),"Math:sin":le(([t])=>(be(t),Me(Math.sin(t.value)))),"Math:sinh":le(([t])=>(be(t),Me(Math.sinh(t.value)))),"Math:sqrt":le(([t])=>{be(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new Vt("Invalid operation.");return Me(r)}),"Math:tan":le(([t])=>(be(t),Me(Math.tan(t.value)))),"Math:tanh":le(([t])=>(be(t),Me(Math.tanh(t.value)))),"Math:trunc":le(([t])=>(be(t),Me(Math.trunc(t.value)))),"Math:rnd":le(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Me(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Me(Math.random())),"Math:gen_rng":le(([t])=>{if(Gs(t),t.type!=="num"&&t.type!=="str")return bt;const r=cf(t.value.toString());return le(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Me(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Me(r()))}),"Num:to_hex":le(([t])=>(be(t),qt(t.value.toString(16)))),"Num:from_hex":le(([t])=>(Ar(t),Me(parseInt(t.value,16)))),"Str:lf":qt(` +`),"Str:lt":le(([t,r])=>(Ar(t),Ar(r),t.value(Ar(t),Ar(r),t.value>r.value?Me(-1):t.value===r.value?Me(0):Me(1))),"Str:from_codepoint":le(([t])=>(be(t),qt(String.fromCodePoint(t.value)))),"Obj:keys":le(([t])=>(Bn(t),Vr(Array.from(t.value.keys()).map(r=>qt(r))))),"Obj:vals":le(([t])=>(Bn(t),Vr(Array.from(t.value.values())))),"Obj:kvs":le(([t])=>(Bn(t),Vr(Array.from(t.value.entries()).map(([r,e])=>Vr([qt(r),e]))))),"Obj:get":le(([t,r])=>(Bn(t),Ar(r),t.value.get(r.value)??bt)),"Obj:set":le(([t,r,e])=>(Bn(t),Ar(r),Gs(e),t.value.set(r.value,e),bt)),"Obj:has":le(([t,r])=>(Bn(t),Ar(r),Jo(t.value.has(r.value)))),"Obj:copy":le(([t])=>(Bn(t),Xf(new Map(t.value)))),"Obj:merge":le(([t,r])=>(Bn(t),Bn(r),Xf(new Map([...t.value,...r.value])))),"Error:create":le(([t,r])=>(Ar(t),lh(t.value,r))),"Async:interval":le(async([t,r,e],n)=>{be(t),fi(r),e&&(hs(e),e.value&&n.call(r,[]));const h=setInterval(()=>{n.topCall(r,[])},t.value),d=()=>{clearInterval(h)};return n.registerAbortHandler(d),le(([],$)=>{clearInterval(h),$.unregisterAbortHandler(d)})}),"Async:timeout":le(async([t,r],e)=>{be(t),fi(r);const n=setTimeout(()=>{e.topCall(r,[])},t.value),h=()=>{clearTimeout(n)};return e.registerAbortHandler(h),le(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(h)})})};var ou={},zm=()=>{const t="\\ud800-\\udfff",r="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",h="\\u1ab0-\\u1aff",d="\\u1dc0-\\u1dff",$=r+e+n+h+d,b="\\ufe0e\\ufe0f",k="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",E=`[${t}]`,F=`[${$}]`,j="\\ud83c[\\udffb-\\udfff]",D=`(?:${F}|${j})`,V=`[^${t}]`,pe="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",ee="[\\ud800-\\udbff][\\udc00-\\udfff]",ae="\\u200d",_e="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",H=`[${k}]`,L=`${D}?`,B=`[${b}]?`,q=`(?:${ae}(?:${[V,pe,ee].join("|")})${B+L})*`,J=B+L+q,Q=`(?:${[`${V}${F}?`,F,pe,ee,E,H].join("|")})`;return new RegExp(`${_e}|${j}(?=${j})|${Q+J}`,"g")},Wm=tn&&tn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ou,"__esModule",{value:!0});var dc=Wm(zm);function hh(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match(dc.default())||[]}var zn=ou.toArray=hh;function up(t){if(typeof t!="string")throw new Error("Input must be a string");var r=t.match(dc.default());return r===null?0:r.length}var hf=ou.length=up;function Eg(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");(typeof r!="number"||r<0)&&(r=0),typeof e=="number"&&e<0&&(e=0);var n=t.match(dc.default());return n?n.slice(r,e).join(""):""}var pf=ou.substring=Eg;function Vm(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");var n=up(t);if(typeof r!="number"&&(r=parseInt(r,10)),r>=n)return"";r<0&&(r+=n);var h;typeof e>"u"?h=n:(typeof e!="number"&&(e=parseInt(e,10)),h=e>=0?e+r:r);var d=t.match(dc.default());return d?d.slice(r,h).join(""):""}ou.substr=Vm;function Km(t,r,e,n){if(r===void 0&&(r=16),e===void 0&&(e="#"),n===void 0&&(n="right"),typeof t!="string"||typeof r!="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 e!="string"&&(e=String(e));var h=up(t);if(h>r)return Eg(t,0,r);if(h=n.length)return r===""?n.length:-1;if(r==="")return e;var h=hh(r),d=!1,$;for($=e;$le(async(r,e)=>qt(t.value.toString()))},str:{to_num:t=>le(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?bt:Me(n)}),len:t=>Me(hf(t.value)),replace:t=>le(async([r,e],n)=>(Ar(r),Ar(e),qt(t.value.split(r.value).join(e.value)))),index_of:t=>le(async([r],e)=>(Ar(r),Me(vf(t.value,r.value)))),incl:t=>le(async([r],e)=>(Ar(r),t.value.includes(r.value)?an:Ws)),trim:t=>le(async(r,e)=>qt(t.value.trim())),upper:t=>le(async(r,e)=>qt(t.value.toUpperCase())),lower:t=>le(async(r,e)=>qt(t.value.toLowerCase())),split:t=>le(async([r],e)=>(r&&Ar(r),Vr(r?t.value.split(r?r.value:"").map(n=>qt(n)):zn(t.value).map(n=>qt(n))))),slice:t=>le(async([r,e],n)=>(be(r),be(e),qt(pf(t.value,r.value,e.value)))),pick:t=>le(async([r],e)=>{be(r);const h=zn(t.value)[r.value];return h?qt(h):bt}),codepoint_at:t=>le(([r],e)=>{be(r);const n=t.value.charCodeAt(r.value);return Number.isNaN(n)?bt:Me(n)})},arr:{len:t=>Me(t.value.length),push:t=>le(async([r],e)=>(Gs(r),t.value.push(r),t)),unshift:t=>le(async([r],e)=>(Gs(r),t.value.unshift(r),t)),pop:t=>le(async(r,e)=>t.value.pop()??bt),shift:t=>le(async(r,e)=>t.value.shift()??bt),concat:t=>le(async([r],e)=>(Yf(r),Vr(t.value.concat(r.value)))),slice:t=>le(async([r,e],n)=>(be(r),be(e),Vr(t.value.slice(r.value,e.value)))),join:t=>le(async([r],e)=>(r&&Ar(r),qt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>le(async([r],e)=>{fi(r);const n=t.value.map(async(h,d)=>await e.call(r,[h,Me(d)]));return Vr(await Promise.all(n))}),filter:t=>le(async([r],e)=>{fi(r);const n=[];for(let h=0;hle(async([r,e],n)=>{fi(r);const h=e!=null;let d=h?e:t.value[0];for(let $=h?0:1;$le(async([r],e)=>{fi(r);for(let n=0;nle(async([r],e)=>(Gs(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Ws:(h=>h.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?an:Ws)),reverse:t=>le(async(r,e)=>(t.value.reverse(),bt)),copy:t=>le(async(r,e)=>Vr([...t.value])),sort:t=>le(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const b=Math.floor(d.length/2),k=await n(d.slice(0,b),$),E=await n(d.slice(b),$);return h(k,E,$)},h=async(d,$,b)=>{const k=[];let E=0,F=0;for(;Eqt(t.value),info:t=>t.info??bt}};function Zm(t,r){if(Object.hasOwn(iv,t.type)){const e=iv[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new Vt(`No such prop (${r}) in ${t.type}.`)}else throw new Vt(`Cannot read prop of ${t.type}. (reading ${r})`)}const Gm={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var ts=globalThis&&globalThis.__decorate||function(t,r,e,n){var h=arguments.length,d=h<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var b=t.length-1;b>=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};const Mg=300,Qm=Mg-1;let zr=class{constructor(r,e={}){me(this,"opts");me(this,"stepCount",0);me(this,"stop",!1);me(this,"scope");me(this,"abortHandlers",[]);me(this,"vars",{});this.opts=e;const n={print:le(([h])=>{Gs(h),this.opts.out&&this.opts.out(h)}),readline:le(async h=>{const d=h[0];if(Ar(d),this.opts.in==null)return bt;const $=await this.opts.in(d.value);return qt($)})};this.vars=Object.fromEntries(Object.entries({...r,...qm,...n}).map(([h,d])=>[h,Gm.const(d)])),this.scope=new Xa([new Map(Object.entries(this.vars))]),this.scope.opts.log=(h,d)=>{switch(h){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(n=>(this.handleError(n),lh("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(h){switch(h.type){case"arr":return h.value.map(d=>e(d));case"bool":return h.value;case"null":return null;case"num":return h.value;case"obj":{const d={};for(const[$,b]of h.value.entries())d[$]=e(b);return d}case"str":return h.value;default:return}}const n=new Map;for(const h of r)switch(h.type){case"meta":{n.set(h.name,e(h.value));break}}return n}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof ju?this.opts.err(r):this.opts.err(new rv(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{if(n.mut)throw new sv('No "var" in namespace declaration: '+n.name,n.loc);const h={isMutable:n.mut,value:await this._eval(n.expr,e)};e.add(n.name,h),this.scope.add(r.name+":"+n.name,h);break}case"ns":break;default:{const d=n;throw new sv("invalid ns member type: "+d.type,d.loc)}}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??bt;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],{isMutable:!0,value:e[d]});const h=r.scope.createChildScope(n);return Um(await this._run(r.statements,h))}}_eval(r,e){return this.__eval(r,e).catch(n=>{if(n.loc)throw n;{const h=n instanceof ju?n:new rv(n);throw h.loc=r.loc,h.message=`${h.message} (Line ${r.loc.line}, Column ${r.loc.column})`,h}})}async __eval(r,e){if(this.stop)return bt;if(this.stepCount%Mg===Qm&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new Vt("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);fi(n);const h=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,h)}case"if":{const n=await this._eval(r.cond,e);if(hs(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const h of r.elseif){const d=await this._eval(h.cond,e);if(hs(d),d.value)return this._eval(h.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return bt}case"match":{const n=await this._eval(r.about,e);for(const h of r.qs){const d=await this._eval(h.q,e);if(oh(n,d))return await this._eval(h.a,e)}return r.default?await this._eval(r.default,e):bt}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return bt}case"for":{if(r.times){const n=await this._eval(r.times,e);be(n);for(let h=0;h0){const h=[];for(const d of r.attr)h.push({name:d.name,value:await this._eval(d.value,e)});n.attr=h}return e.add(r.name,{isMutable:r.mut,value:n}),bt}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),bt}case"addAssign":{const n=await this._eval(r.dest,e);be(n);const h=await this._eval(r.expr,e);return be(h),await this.assign(e,r.dest,Me(n.value+h.value)),bt}case"subAssign":{const n=await this._eval(r.dest,e);be(n);const h=await this._eval(r.expr,e);return be(h),await this.assign(e,r.dest,Me(n.value-h.value)),bt}case"null":return bt;case"bool":return Jo(r.value);case"num":return Me(r.value);case"str":return qt(r.value);case"arr":return Vr(await Promise.all(r.value.map(n=>this._eval(n,e))));case"obj":{const n=new Map;for(const h of r.value.keys())n.set(h,await this._eval(r.value.get(h),e));return Xf(n)}case"prop":{const n=await this._eval(r.target,e);return Fc(n)?n.value.has(r.name)?n.value.get(r.name):bt:Zm(n,r.name)}case"index":{const n=await this._eval(r.target,e),h=await this._eval(r.index,e);if(av(n)){be(h);const d=n.value[h.value];if(d===void 0)throw new dm(`Index out of range. index: ${h.value} max: ${n.value.length-1}`);return d}else{if(Fc(n))return Ar(h),n.value.has(h.value)?n.value.get(h.value):bt;throw new Vt(`Cannot read prop (${xu(h)}) of ${n.type}.`)}}case"not":{const n=await this._eval(r.expr,e);return hs(n),Jo(!n.value)}case"fn":return Dm(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return Jo(e.exists(r.identifier.name));case"tmpl":{let n="";for(const h of r.tmpl)if(typeof h=="string")n+=h;else{const d=await this._eval(h,e);n+=xu(d)}return qt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),Lm(n)}case"break":return this.log("block:break",{scope:e.name}),Bm();case"continue":return this.log("block:continue",{scope:e.name}),Hm();case"ns":return bt;case"meta":return bt;case"and":{const n=await this._eval(r.left,e);if(hs(n),n.value){const h=await this._eval(r.right,e);return hs(h),h}else return n}case"or":{const n=await this._eval(r.left,e);if(hs(n),n.value)return n;{const h=await this._eval(r.right,e);return hs(h),h}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=bt;for(let h=0;he!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const h=await this._eval(e.target,r),d=await this._eval(e.index,r);if(av(h))be(d),h.value[d.value]=n;else if(Fc(h))Ar(d),h.value.set(d.value,n);else throw new Vt(`Cannot read prop (${xu(d)}) of ${h.type}.`)}else if(e.type==="prop"){const h=await this._eval(e.target,r);Bn(h),h.value.set(e.name,n)}else throw new Vt("The left-hand side of an assignment expression must be a variable or a property/index access.")}};ts([lr],zr.prototype,"exec",null);ts([lr],zr.prototype,"execFn",null);ts([lr],zr.prototype,"execFnSimple",null);ts([lr],zr.prototype,"handleError",null);ts([lr],zr.prototype,"log",null);ts([lr],zr.prototype,"collectNs",null);ts([lr],zr.prototype,"collectNsMember",null);ts([lr],zr.prototype,"_fn",null);ts([lr],zr.prototype,"_eval",null);ts([lr],zr.prototype,"__eval",null);ts([lr],zr.prototype,"_run",null);ts([lr],zr.prototype,"registerAbortHandler",null);ts([lr],zr.prototype,"unregisterAbortHandler",null);ts([lr],zr.prototype,"abort",null);ts([lr],zr.prototype,"assign",null);ts([lr],zr,"collectMetadata",null);class Xm{constructor(r,e){me(this,"pages");me(this,"firstPageIndex");me(this,"lastPageIndex");me(this,"pageIndex");me(this,"address");me(this,"_char");me(this,"line");me(this,"column");this.pages=new Map,this.pages.set(0,r),this.firstPageIndex=0,this.lastPageIndex=0,this.pageIndex=0,this.address=0,this.line=(e==null?void 0:e.line)??0,this.column=(e==null?void 0:e.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 r=this.pages.get(this.pageIndex);return this.address>=r.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 N;(function(t){t[t.EOF=0]="EOF",t[t.NewLine=1]="NewLine",t[t.Identifier=2]="Identifier",t[t.NumberLiteral=3]="NumberLiteral",t[t.StringLiteral=4]="StringLiteral",t[t.Template=5]="Template",t[t.TemplateStringElement=6]="TemplateStringElement",t[t.TemplateExprElement=7]="TemplateExprElement",t[t.NullKeyword=8]="NullKeyword",t[t.TrueKeyword=9]="TrueKeyword",t[t.FalseKeyword=10]="FalseKeyword",t[t.EachKeyword=11]="EachKeyword",t[t.ForKeyword=12]="ForKeyword",t[t.LoopKeyword=13]="LoopKeyword",t[t.BreakKeyword=14]="BreakKeyword",t[t.ContinueKeyword=15]="ContinueKeyword",t[t.MatchKeyword=16]="MatchKeyword",t[t.CaseKeyword=17]="CaseKeyword",t[t.DefaultKeyword=18]="DefaultKeyword",t[t.IfKeyword=19]="IfKeyword",t[t.ElifKeyword=20]="ElifKeyword",t[t.ElseKeyword=21]="ElseKeyword",t[t.ReturnKeyword=22]="ReturnKeyword",t[t.EvalKeyword=23]="EvalKeyword",t[t.VarKeyword=24]="VarKeyword",t[t.LetKeyword=25]="LetKeyword",t[t.ExistsKeyword=26]="ExistsKeyword",t[t.Not=27]="Not",t[t.NotEq=28]="NotEq",t[t.OpenSharpBracket=29]="OpenSharpBracket",t[t.Sharp3=30]="Sharp3",t[t.Percent=31]="Percent",t[t.And2=32]="And2",t[t.OpenParen=33]="OpenParen",t[t.CloseParen=34]="CloseParen",t[t.Asterisk=35]="Asterisk",t[t.Plus=36]="Plus",t[t.PlusEq=37]="PlusEq",t[t.Comma=38]="Comma",t[t.Minus=39]="Minus",t[t.MinusEq=40]="MinusEq",t[t.Dot=41]="Dot",t[t.Slash=42]="Slash",t[t.Colon=43]="Colon",t[t.Colon2=44]="Colon2",t[t.SemiColon=45]="SemiColon",t[t.Lt=46]="Lt",t[t.LtEq=47]="LtEq",t[t.Out=48]="Out",t[t.Eq=49]="Eq",t[t.Eq2=50]="Eq2",t[t.Arrow=51]="Arrow",t[t.Gt=52]="Gt",t[t.GtEq=53]="GtEq",t[t.At=54]="At",t[t.OpenBracket=55]="OpenBracket",t[t.BackSlash=56]="BackSlash",t[t.CloseBracket=57]="CloseBracket",t[t.Hat=58]="Hat",t[t.OpenBrace=59]="OpenBrace",t[t.Or2=60]="Or2",t[t.CloseBrace=61]="CloseBrace"})(N||(N={}));class Ym{constructor(r,e,n=!1,h,d){me(this,"kind");me(this,"loc");me(this,"hasLeftSpacing");me(this,"value");me(this,"children");this.kind=r,this.loc=e,this.hasLeftSpacing=n,this.value=h,this.children=d}}function Le(t,r,e){return new Ym(t,r,e==null?void 0:e.hasLeftSpacing,e==null?void 0:e.value,e==null?void 0:e.children)}const lv=[" "," "],e0=["\r",` +`],ov=/^[0-9]$/,t0=/^[A-Za-z0-9_]$/;class r0{constructor(r){me(this,"stream");me(this,"_tokens",[]);typeof r=="string"?this.stream=new Xm(r):this.stream=r,this._tokens.push(this.readToken())}get token(){return this._tokens[0]}get kind(){return this.token.kind}next(){this._tokens[0].kind!==N.EOF&&(this._tokens.shift(),this._tokens.length===0&&this._tokens.push(this.readToken()))}lookahead(r){for(;this._tokens.length<=r;)this._tokens.push(this.readToken());return this._tokens[r]}expect(r){if(this.kind!==r)throw new gt(`unexpected token: ${N[this.kind]}`,this.token.loc)}nextWith(r){this.expect(r),this.next()}readToken(){let r,e=!1;for(;;){if(this.stream.eof){r=Le(N.EOF,this.stream.getPos(),{hasLeftSpacing:e});break}if(lv.includes(this.stream.char)){this.stream.next(),e=!0;continue}const n=this.stream.getPos();if(e0.includes(this.stream.char))return this.stream.next(),r=Le(N.NewLine,n,{hasLeftSpacing:e}),r;switch(this.stream.char){case"!":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Le(N.NotEq,n,{hasLeftSpacing:e})):r=Le(N.Not,n,{hasLeftSpacing:e});break}case'"':case"'":{r=this.readStringLiteral(e);break}case"#":{if(this.stream.next(),!this.stream.eof&&this.stream.char==="#")this.stream.next(),!this.stream.eof&&this.stream.char==="#"&&(this.stream.next(),r=Le(N.Sharp3,n,{hasLeftSpacing:e}));else if(!this.stream.eof&&this.stream.char==="[")this.stream.next(),r=Le(N.OpenSharpBracket,n,{hasLeftSpacing:e});else throw new gt('invalid character: "#"',n);break}case"%":{this.stream.next(),r=Le(N.Percent,n,{hasLeftSpacing:e});break}case"&":{this.stream.next(),!this.stream.eof&&this.stream.char==="&"&&(this.stream.next(),r=Le(N.And2,n,{hasLeftSpacing:e}));break}case"(":{this.stream.next(),r=Le(N.OpenParen,n,{hasLeftSpacing:e});break}case")":{this.stream.next(),r=Le(N.CloseParen,n,{hasLeftSpacing:e});break}case"*":{this.stream.next(),r=Le(N.Asterisk,n,{hasLeftSpacing:e});break}case"+":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Le(N.PlusEq,n,{hasLeftSpacing:e})):r=Le(N.Plus,n,{hasLeftSpacing:e});break}case",":{this.stream.next(),r=Le(N.Comma,n,{hasLeftSpacing:e});break}case"-":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Le(N.MinusEq,n,{hasLeftSpacing:e})):r=Le(N.Minus,n,{hasLeftSpacing:e});break}case".":{this.stream.next(),r=Le(N.Dot,n,{hasLeftSpacing:e});break}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 r=Le(N.Slash,n,{hasLeftSpacing:e});break}case":":{this.stream.next(),!this.stream.eof&&this.stream.char===":"?(this.stream.next(),r=Le(N.Colon2,n,{hasLeftSpacing:e})):r=Le(N.Colon,n,{hasLeftSpacing:e});break}case";":{this.stream.next(),r=Le(N.SemiColon,n,{hasLeftSpacing:e});break}case"<":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Le(N.LtEq,n,{hasLeftSpacing:e})):!this.stream.eof&&this.stream.char===":"?(this.stream.next(),r=Le(N.Out,n,{hasLeftSpacing:e})):r=Le(N.Lt,n,{hasLeftSpacing:e});break}case"=":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Le(N.Eq2,n,{hasLeftSpacing:e})):!this.stream.eof&&this.stream.char===">"?(this.stream.next(),r=Le(N.Arrow,n,{hasLeftSpacing:e})):r=Le(N.Eq,n,{hasLeftSpacing:e});break}case">":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Le(N.GtEq,n,{hasLeftSpacing:e})):r=Le(N.Gt,n,{hasLeftSpacing:e});break}case"@":{this.stream.next(),r=Le(N.At,n,{hasLeftSpacing:e});break}case"[":{this.stream.next(),r=Le(N.OpenBracket,n,{hasLeftSpacing:e});break}case"\\":{this.stream.next(),r=Le(N.BackSlash,n,{hasLeftSpacing:e});break}case"]":{this.stream.next(),r=Le(N.CloseBracket,n,{hasLeftSpacing:e});break}case"^":{this.stream.next(),r=Le(N.Hat,n,{hasLeftSpacing:e});break}case"`":{r=this.readTemplate(e);break}case"{":{this.stream.next(),r=Le(N.OpenBrace,n,{hasLeftSpacing:e});break}case"|":{this.stream.next(),!this.stream.eof&&this.stream.char==="|"&&(this.stream.next(),r=Le(N.Or2,n,{hasLeftSpacing:e}));break}case"}":{this.stream.next(),r=Le(N.CloseBrace,n,{hasLeftSpacing:e});break}}if(r==null){const h=this.tryReadDigits(e);if(h){r=h;break}const d=this.tryReadWord(e);if(d){r=d;break}throw new gt(`invalid character: "${this.stream.char}"`,n)}break}return r}tryReadWord(r){let e="";const n=this.stream.getPos();for(;!this.stream.eof&&t0.test(this.stream.char);)e+=this.stream.char,this.stream.next();if(e.length!==0)switch(e){case"null":return Le(N.NullKeyword,n,{hasLeftSpacing:r});case"true":return Le(N.TrueKeyword,n,{hasLeftSpacing:r});case"false":return Le(N.FalseKeyword,n,{hasLeftSpacing:r});case"each":return Le(N.EachKeyword,n,{hasLeftSpacing:r});case"for":return Le(N.ForKeyword,n,{hasLeftSpacing:r});case"loop":return Le(N.LoopKeyword,n,{hasLeftSpacing:r});case"break":return Le(N.BreakKeyword,n,{hasLeftSpacing:r});case"continue":return Le(N.ContinueKeyword,n,{hasLeftSpacing:r});case"match":return Le(N.MatchKeyword,n,{hasLeftSpacing:r});case"case":return Le(N.CaseKeyword,n,{hasLeftSpacing:r});case"default":return Le(N.DefaultKeyword,n,{hasLeftSpacing:r});case"if":return Le(N.IfKeyword,n,{hasLeftSpacing:r});case"elif":return Le(N.ElifKeyword,n,{hasLeftSpacing:r});case"else":return Le(N.ElseKeyword,n,{hasLeftSpacing:r});case"return":return Le(N.ReturnKeyword,n,{hasLeftSpacing:r});case"eval":return Le(N.EvalKeyword,n,{hasLeftSpacing:r});case"var":return Le(N.VarKeyword,n,{hasLeftSpacing:r});case"let":return Le(N.LetKeyword,n,{hasLeftSpacing:r});case"exists":return Le(N.ExistsKeyword,n,{hasLeftSpacing:r});default:return Le(N.Identifier,n,{hasLeftSpacing:r,value:e})}}tryReadDigits(r){let e="",n="";const h=this.stream.getPos();for(;!this.stream.eof&&ov.test(this.stream.char);)e+=this.stream.char,this.stream.next();if(e.length===0)return;if(!this.stream.eof&&this.stream.char==="."){for(this.stream.next();!this.stream.eof&&ov.test(this.stream.char);)n+=this.stream.char,this.stream.next();if(n.length===0)throw new gt("digit expected",h)}let d;return n.length>0?d=e+"."+n:d=e,Le(N.NumberLiteral,h,{hasLeftSpacing:r,value:d})}readStringLiteral(r){let e="";const n=this.stream.char;let h="string";const d=this.stream.getPos();for(this.stream.next();h!=="finish";)switch(h){case"string":{if(this.stream.eof)throw new gt("unexpected EOF",d);if(this.stream.char==="\\"){this.stream.next(),h="escape";break}if(this.stream.char===n){this.stream.next(),h="finish";break}e+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new gt("unexpected EOF",d);e+=this.stream.char,this.stream.next(),h="string";break}}return Le(N.StringLiteral,d,{hasLeftSpacing:r,value:e})}readTemplate(r){const e=[];let n="",h=[],d="string";const $=this.stream.getPos();let b=$;for(this.stream.next();d!=="finish";)switch(d){case"string":{if(this.stream.eof)throw new gt("unexpected EOF",$);if(this.stream.char==="\\"){this.stream.next(),d="escape";break}if(this.stream.char==="`"){this.stream.next(),n.length>0&&e.push(Le(N.TemplateStringElement,b,{hasLeftSpacing:r,value:n})),d="finish";break}if(this.stream.char==="{"){this.stream.next(),n.length>0&&(e.push(Le(N.TemplateStringElement,b,{hasLeftSpacing:r,value:n})),n=""),b=this.stream.getPos(),d="expr";break}n+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new gt("unexpected EOF",$);n+=this.stream.char,this.stream.next(),d="string";break}case"expr":{if(this.stream.eof)throw new gt("unexpected EOF",$);if(lv.includes(this.stream.char)){this.stream.next();continue}if(this.stream.char==="}"){this.stream.next(),e.push(Le(N.TemplateExprElement,b,{hasLeftSpacing:r,children:h})),h=[],b=this.stream.getPos(),d="string";break}const k=this.readToken();h.push(k);break}}return Le(N.Template,$,{hasLeftSpacing:r,children:e})}skipCommentLine(){for(;!(this.stream.eof||this.stream.char===` +`);)this.stream.next()}skipCommentRange(){for(;!this.stream.eof;){if(this.stream.char==="*"){if(this.stream.next(),this.stream.char==="/"){this.stream.next();break}continue}this.stream.next()}}}function Xe(t,r,e){const n={type:t};for(const h of Object.keys(r))r[h]!==void 0&&(n[h]=r[h]);return n.loc=e,n}function zs(t,r,e){return Xe("call",{target:Xe("identifier",{name:t},e),args:r},e)}function Sg(t){const r=[];for(t.nextWith(N.OpenParen),t.kind===N.NewLine&&t.next();t.kind!==N.CloseParen;){t.expect(N.Identifier);const e=t.token.value;t.next();let n;switch(t.kind===N.Colon&&(t.next(),n=ru(t)),r.push({name:e,argType:n}),t.kind){case N.NewLine:{t.next();break}case N.Comma:{t.next(),t.kind===N.NewLine&&t.next();break}case N.CloseParen:break;default:throw new gt("separator expected",t.token.loc)}}return t.nextWith(N.CloseParen),r}function gf(t){for(t.nextWith(N.OpenBrace);t.kind===N.NewLine;)t.next();const r=[];for(;t.kind!==N.CloseBrace;)switch(r.push(yc(t)),t.kind){case N.NewLine:case N.SemiColon:{for(;[N.NewLine,N.SemiColon].includes(t.kind);)t.next();break}case N.CloseBrace:break;default:throw new gt("Multiple statements cannot be placed on a single line.",t.token.loc)}return t.nextWith(N.CloseBrace),r}function ru(t){return t.kind===N.At?s0(t):n0(t)}function s0(t){const r=t.token.loc;t.nextWith(N.At),t.nextWith(N.OpenParen);const e=[];for(;t.kind!==N.CloseParen;){if(e.length>0)switch(t.kind){case N.Comma:{t.next();break}default:throw new gt("separator expected",t.token.loc)}const h=ru(t);e.push(h)}t.nextWith(N.CloseParen),t.nextWith(N.Arrow);const n=ru(t);return Xe("fnTypeSource",{args:e,result:n},r)}function n0(t){const r=t.token.loc;t.expect(N.Identifier);const e=t.token.value;t.next();let n=null;return t.kind===N.Lt&&(t.next(),n=ru(t),t.nextWith(N.Gt)),Xe("namedTypeSource",{name:e,inner:n},r)}class a0{constructor(r){me(this,"source");me(this,"index");me(this,"_token");this.source=r,this.index=0,this.load()}get eof(){return this.index>=this.source.length}get token(){return this.eof?Le(N.EOF,{line:-1,column:-1}):this._token}get kind(){return this.token.kind}next(){this.eof||this.index++,this.load()}lookahead(r){return this.index+r0)if(t.kind===N.Colon){if(t.token.hasLeftSpacing)throw new gt("Cannot use spaces in a reference.",t.token.loc);if(t.next(),t.token.hasLeftSpacing)throw new gt("Cannot use spaces in a reference.",t.token.loc)}else break;t.expect(N.Identifier),e.push(t.token.value),t.next()}return Xe("identifier",{name:e.join(":")},r)}function g0(t,r){const e=t.token.loc;t.nextWith(N.OpenBrace),t.kind===N.NewLine&&t.next();const n=new Map;for(;t.kind!==N.CloseBrace;){t.expect(N.Identifier);const h=t.token.value;t.next(),t.nextWith(N.Colon);const d=pr(t,r);switch(n.set(h,d),t.kind){case N.NewLine:{t.next();break}case N.Comma:{t.next(),t.kind===N.NewLine&&t.next();break}case N.CloseBrace:break;default:throw new gt("separator expected",t.token.loc)}}return t.nextWith(N.CloseBrace),Xe("obj",{value:n},e)}function d0(t,r){const e=t.token.loc;t.nextWith(N.OpenBracket),t.kind===N.NewLine&&t.next();const n=[];for(;t.kind!==N.CloseBracket;)switch(n.push(pr(t,r)),t.kind){case N.NewLine:{t.next();break}case N.Comma:{t.next(),t.kind===N.NewLine&&t.next();break}case N.CloseBracket:break;default:throw new gt("separator expected",t.token.loc)}return t.nextWith(N.CloseBracket),Xe("arr",{value:n},e)}function fp(t,r){let e;const n=t.kind,h=Oc.find(d=>d.opKind==="prefix"&&d.kind===n);for(h!=null?e=i0(t,h.bp):e=Fg(t,!1);;){t.kind===N.BackSlash&&(t.next(),t.nextWith(N.NewLine));const d=t.kind,$=Oc.find(k=>k.opKind==="postfix"&&k.kind===d);if($!=null){if($.bpk.opKind==="infix"&&k.kind===d);if(b!=null){if(b.lbp`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>Ff(n)).join(", "),e=Ff(t.result);return`@(${r}) { ${e} }`}}}function bu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return uv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=bu(t.inner):r=uv("any"),S0(t.name,[r])}}throw new gt(`Unknown type: '${Ff(t)}'`,t.loc)}else{const r=t.args.map(e=>bu(e));return F0(r,bu(t.result))}}function O0(t){switch(t.type){case"def":{t.varType!=null&&bu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&bu(r.argType);t.retType!=null&&bu(t.retType);break}}return t}function N0(t){for(const r of t)vt(r,O0);return t}var Va;let T0=(Va=class{constructor(){me(this,"plugins");this.plugins={validate:[M0,N0],transform:[]}}static parse(r){return Va.instance==null&&(Va.instance=new Va),Va.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;const n=new r0(r);e=k0(n);for(const h of this.plugins.validate)e=h(e);for(const h of this.plugins.transform)e=h(e);return e}},me(Va,"instance"),Va);const I0="next",j0={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`};let ph=[],Hu=null;function R0(t){return ph=T0.parse(t),JSON.stringify(ph,null," ")}async function D0(t){Hu==null||Hu.abort(),Hu=new zr({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:uh(r,!0),print:!0})},err:t.err,log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:uh(e.val,!0),print:!1});break}}});try{await Hu.exec(ph)}catch(r){t.err(r)}}const L0=Object.freeze(Object.defineProperty({__proto__:null,exec:D0,parse:R0,samples:j0,version:I0},Symbol.toStringTag,{value:"Module"}));function vr(t,r,e){let n=e.value;return{configurable:!0,get(){const h=n.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:h}),h},set(h){n=h}}}let wc=class jg extends Error{constructor(e,n){super(e);me(this,"name","AiScript");me(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,jg)}},B0=class extends wc{constructor(e){super(e.message??`${e}`,e);me(this,"name","Internal")}},su=class extends wc{constructor(e,n){super(e,n);me(this,"name","Syntax")}},Kt=class extends wc{constructor(e,n){super(e,n);me(this,"name","Runtime")}},H0=class extends Kt{constructor(r,e){super(r,e)}};var xi=globalThis&&globalThis.__decorate||function(t,r,e,n){var h=arguments.length,d=h<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var b=t.length-1;b>=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};let Ya=class Rg{constructor(r=[],e,n){me(this,"parent");me(this,"layerdStates");me(this,"name");me(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new Rg(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r).value;return this.log("read",{var:r,val:n}),n}throw new Kt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new Kt(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let n=1;for(const h of this.layerdStates){if(h.has(r)){const d=h.get(r);if(!d.isMutable)throw new Kt(`Cannot assign to an immutable variable ${r}.`);d.value=e,this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new Kt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};xi([vr],Ya.prototype,"log",null);xi([vr],Ya.prototype,"onUpdated",null);xi([vr],Ya.prototype,"createChildScope",null);xi([vr],Ya.prototype,"get",null);xi([vr],Ya.prototype,"exists",null);xi([vr],Ya.prototype,"getAll",null);xi([vr],Ya.prototype,"add",null);xi([vr],Ya.prototype,"assign",null);const At={type:"null"},ln={type:"bool",value:!0},Vs={type:"bool",value:!1},Se=t=>({type:"num",value:t}),zt=t=>({type:"str",value:t}),Zo=t=>({type:"bool",value:t}),ec=t=>({type:"obj",value:t}),Kr=t=>({type:"arr",value:t}),U0=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),oe=t=>({type:"fn",native:t}),q0=t=>({type:"return",value:t}),z0=()=>({type:"break",value:null}),W0=()=>({type:"continue",value:null}),V0=t=>t.type==="return"?t.value:t,vh=(t,r)=>({type:"error",value:t,info:r});function Qs(t){if(t==null)throw new Kt("Expect anything, but got nothing.")}function ps(t){if(t==null)throw new Kt("Expect boolean, but got nothing.");if(t.type!=="bool")throw new Kt(`Expect boolean, but got ${t.type}.`)}function ci(t){if(t==null)throw new Kt("Expect function, but got nothing.");if(t.type!=="fn")throw new Kt(`Expect function, but got ${t.type}.`)}function Cr(t){if(t==null)throw new Kt("Expect string, but got nothing.");if(t.type!=="str")throw new Kt(`Expect string, but got ${t.type}.`)}function Ae(t){if(t==null)throw new Kt("Expect number, but got nothing.");if(t.type!=="num")throw new Kt(`Expect number, but got ${t.type}.`)}function Hn(t){if(t==null)throw new Kt("Expect object, but got nothing.");if(t.type!=="obj")throw new Kt(`Expect object, but got ${t.type}.`)}function tc(t){if(t==null)throw new Kt("Expect array, but got nothing.");if(t.type!=="arr")throw new Kt(`Expect array, but got ${t.type}.`)}function Nc(t){return t.type==="obj"}function fv(t){return t.type==="arr"}function gh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function dh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>dh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function yh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>yh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=yh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function wh(t){if(t===null)return At;if(typeof t=="boolean")return Zo(t);if(typeof t=="string")return zt(t);if(typeof t=="number")return Se(t);if(Array.isArray(t))return Kr(t.map(r=>wh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,wh(n));return ec(r)}return At}function Au(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const n=[];for(const h of t.value)n.push(Au(h,!0,e));return"[ "+n.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const n=[];for(const[h,d]of t.value)n.push(`${h}: ${Au(d,!0,e)}`);return"{ "+n.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const K0={help:zt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":zt("0.16.0"),"Core:ai":zt("kawaii"),"Core:not":oe(([t])=>(ps(t),t.value?Vs:ln)),"Core:eq":oe(([t,r])=>(Qs(t),Qs(r),gh(t,r)?ln:Vs)),"Core:neq":oe(([t,r])=>(Qs(t),Qs(r),gh(t,r)?Vs:ln)),"Core:and":oe(([t,r])=>(ps(t),t.value?(ps(r),r.value?ln:Vs):Vs)),"Core:or":oe(([t,r])=>(ps(t),t.value?ln:(ps(r),r.value?ln:Vs))),"Core:add":oe(([t,r])=>(Ae(t),Ae(r),Se(t.value+r.value))),"Core:sub":oe(([t,r])=>(Ae(t),Ae(r),Se(t.value-r.value))),"Core:mul":oe(([t,r])=>(Ae(t),Ae(r),Se(t.value*r.value))),"Core:pow":oe(([t,r])=>{Ae(t),Ae(r);const e=t.value**r.value;if(isNaN(e))throw new Kt("Invalid operation.");return Se(e)}),"Core:div":oe(([t,r])=>{Ae(t),Ae(r);const e=t.value/r.value;if(isNaN(e))throw new Kt("Invalid operation.");return Se(e)}),"Core:mod":oe(([t,r])=>(Ae(t),Ae(r),Se(t.value%r.value))),"Core:gt":oe(([t,r])=>(Ae(t),Ae(r),t.value>r.value?ln:Vs)),"Core:lt":oe(([t,r])=>(Ae(t),Ae(r),t.value(Ae(t),Ae(r),t.value>=r.value?ln:Vs)),"Core:lteq":oe(([t,r])=>(Ae(t),Ae(r),t.value<=r.value?ln:Vs)),"Core:type":oe(([t])=>(Qs(t),zt(t.type))),"Core:to_str":oe(([t])=>(Qs(t),zt(Au(t)))),"Core:range":oe(([t,r])=>(Ae(t),Ae(r),t.valueSe(n+t.value))):t.value>r.value?Kr(Array.from({length:t.value-r.value+1},(e,n)=>Se(t.value-n))):Kr([t]))),"Core:sleep":oe(async([t])=>(Ae(t),await new Promise(r=>setTimeout(r,t.value)),At)),"Util:uuid":oe(()=>zt(rp())),"Json:stringify":oe(([t])=>(Qs(t),zt(JSON.stringify(yh(t))))),"Json:parse":oe(([t])=>{Cr(t);try{return wh(JSON.parse(t.value))}catch{return vh("not_json")}}),"Json:parsable":oe(([t])=>{Cr(t);try{JSON.parse(t.value)}catch{return Zo(!1)}return Zo(!0)}),"Date:now":oe(()=>Se(Date.now())),"Date:year":oe(([t])=>(t&&Ae(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":oe(([t])=>(t&&Ae(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":oe(([t])=>(t&&Ae(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":oe(([t])=>(t&&Ae(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":oe(([t])=>(t&&Ae(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":oe(([t])=>(t&&Ae(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":oe(([t])=>(Cr(t),Se(new Date(t.value).getTime()))),"Math:Infinity":Se(1/0),"Math:E":Se(Math.E),"Math:LN2":Se(Math.LN2),"Math:LN10":Se(Math.LN10),"Math:LOG2E":Se(Math.LOG2E),"Math:LOG10E":Se(Math.LOG10E),"Math:PI":Se(Math.PI),"Math:SQRT1_2":Se(Math.SQRT1_2),"Math:SQRT2":Se(Math.SQRT2),"Math:abs":oe(([t])=>(Ae(t),Se(Math.abs(t.value)))),"Math:acos":oe(([t])=>(Ae(t),Se(Math.acos(t.value)))),"Math:acosh":oe(([t])=>(Ae(t),Se(Math.acosh(t.value)))),"Math:asin":oe(([t])=>(Ae(t),Se(Math.asin(t.value)))),"Math:asinh":oe(([t])=>(Ae(t),Se(Math.asinh(t.value)))),"Math:atan":oe(([t])=>(Ae(t),Se(Math.atan(t.value)))),"Math:atanh":oe(([t])=>(Ae(t),Se(Math.atanh(t.value)))),"Math:atan2":oe(([t,r])=>(Ae(t),Ae(r),Se(Math.atan2(t.value,r.value)))),"Math:cbrt":oe(([t])=>(Ae(t),Se(Math.cbrt(t.value)))),"Math:ceil":oe(([t])=>(Ae(t),Se(Math.ceil(t.value)))),"Math:clz32":oe(([t])=>(Ae(t),Se(Math.clz32(t.value)))),"Math:cos":oe(([t])=>(Ae(t),Se(Math.cos(t.value)))),"Math:cosh":oe(([t])=>(Ae(t),Se(Math.cosh(t.value)))),"Math:exp":oe(([t])=>(Ae(t),Se(Math.exp(t.value)))),"Math:expm1":oe(([t])=>(Ae(t),Se(Math.expm1(t.value)))),"Math:floor":oe(([t])=>(Ae(t),Se(Math.floor(t.value)))),"Math:fround":oe(([t])=>(Ae(t),Se(Math.fround(t.value)))),"Math:hypot":oe(([t])=>{tc(t);const r=[];for(const e of t.value)Ae(e),r.push(e.value);return Se(Math.hypot(...r))}),"Math:imul":oe(([t,r])=>(Ae(t),Ae(r),Se(Math.imul(t.value,r.value)))),"Math:log":oe(([t])=>(Ae(t),Se(Math.log(t.value)))),"Math:log1p":oe(([t])=>(Ae(t),Se(Math.log1p(t.value)))),"Math:log10":oe(([t])=>(Ae(t),Se(Math.log10(t.value)))),"Math:log2":oe(([t])=>(Ae(t),Se(Math.log2(t.value)))),"Math:max":oe(([t,r])=>(Ae(t),Ae(r),Se(Math.max(t.value,r.value)))),"Math:min":oe(([t,r])=>(Ae(t),Ae(r),Se(Math.min(t.value,r.value)))),"Math:pow":oe(([t,r])=>(Ae(t),Ae(r),Se(Math.pow(t.value,r.value)))),"Math:round":oe(([t])=>(Ae(t),Se(Math.round(t.value)))),"Math:sign":oe(([t])=>(Ae(t),Se(Math.sign(t.value)))),"Math:sin":oe(([t])=>(Ae(t),Se(Math.sin(t.value)))),"Math:sinh":oe(([t])=>(Ae(t),Se(Math.sinh(t.value)))),"Math:sqrt":oe(([t])=>{Ae(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new Kt("Invalid operation.");return Se(r)}),"Math:tan":oe(([t])=>(Ae(t),Se(Math.tan(t.value)))),"Math:tanh":oe(([t])=>(Ae(t),Se(Math.tanh(t.value)))),"Math:trunc":oe(([t])=>(Ae(t),Se(Math.trunc(t.value)))),"Math:rnd":oe(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Se(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Se(Math.random())),"Math:gen_rng":oe(([t])=>{if(Qs(t),t.type!=="num"&&t.type!=="str")return At;const r=cf(t.value.toString());return oe(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Se(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Se(r()))}),"Num:to_hex":oe(([t])=>(Ae(t),zt(t.value.toString(16)))),"Num:from_hex":oe(([t])=>(Cr(t),Se(parseInt(t.value,16)))),"Str:lf":zt(` +`),"Str:lt":oe(([t,r])=>(Cr(t),Cr(r),t.value(Cr(t),Cr(r),t.value>r.value?Se(-1):t.value===r.value?Se(0):Se(1))),"Str:from_codepoint":oe(([t])=>(Ae(t),zt(String.fromCodePoint(t.value)))),"Obj:keys":oe(([t])=>(Hn(t),Kr(Array.from(t.value.keys()).map(r=>zt(r))))),"Obj:vals":oe(([t])=>(Hn(t),Kr(Array.from(t.value.values())))),"Obj:kvs":oe(([t])=>(Hn(t),Kr(Array.from(t.value.entries()).map(([r,e])=>Kr([zt(r),e]))))),"Obj:get":oe(([t,r])=>(Hn(t),Cr(r),t.value.get(r.value)??At)),"Obj:set":oe(([t,r,e])=>(Hn(t),Cr(r),Qs(e),t.value.set(r.value,e),At)),"Obj:has":oe(([t,r])=>(Hn(t),Cr(r),Zo(t.value.has(r.value)))),"Obj:copy":oe(([t])=>(Hn(t),ec(new Map(t.value)))),"Obj:merge":oe(([t,r])=>(Hn(t),Hn(r),ec(new Map([...t.value,...r.value])))),"Error:create":oe(([t,r])=>(Cr(t),vh(t.value,r))),"Async:interval":oe(async([t,r,e],n)=>{Ae(t),ci(r),e&&(ps(e),e.value&&n.call(r,[]));const h=setInterval(()=>{n.topCall(r,[])},t.value),d=()=>{clearInterval(h)};return n.registerAbortHandler(d),oe(([],$)=>{clearInterval(h),$.unregisterAbortHandler(d)})}),"Async:timeout":oe(async([t,r],e)=>{Ae(t),ci(r);const n=setTimeout(()=>{e.topCall(r,[])},t.value),h=()=>{clearTimeout(n)};return e.registerAbortHandler(h),oe(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(h)})})},cv={num:{to_str:t=>oe(async(r,e)=>zt(t.value.toString()))},str:{to_num:t=>oe(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?At:Se(n)}),len:t=>Se(hf(t.value)),replace:t=>oe(async([r,e],n)=>(Cr(r),Cr(e),zt(t.value.split(r.value).join(e.value)))),index_of:t=>oe(async([r],e)=>(Cr(r),Se(vf(t.value,r.value)))),incl:t=>oe(async([r],e)=>(Cr(r),t.value.includes(r.value)?ln:Vs)),trim:t=>oe(async(r,e)=>zt(t.value.trim())),upper:t=>oe(async(r,e)=>zt(t.value.toUpperCase())),lower:t=>oe(async(r,e)=>zt(t.value.toLowerCase())),split:t=>oe(async([r],e)=>(r&&Cr(r),Kr(r?t.value.split(r?r.value:"").map(n=>zt(n)):zn(t.value).map(n=>zt(n))))),slice:t=>oe(async([r,e],n)=>(Ae(r),Ae(e),zt(pf(t.value,r.value,e.value)))),pick:t=>oe(async([r],e)=>{Ae(r);const h=zn(t.value)[r.value];return h?zt(h):At}),codepoint_at:t=>oe(([r],e)=>{Ae(r);const n=t.value.charCodeAt(r.value);return Number.isNaN(n)?At:Se(n)})},arr:{len:t=>Se(t.value.length),push:t=>oe(async([r],e)=>(Qs(r),t.value.push(r),t)),unshift:t=>oe(async([r],e)=>(Qs(r),t.value.unshift(r),t)),pop:t=>oe(async(r,e)=>t.value.pop()??At),shift:t=>oe(async(r,e)=>t.value.shift()??At),concat:t=>oe(async([r],e)=>(tc(r),Kr(t.value.concat(r.value)))),slice:t=>oe(async([r,e],n)=>(Ae(r),Ae(e),Kr(t.value.slice(r.value,e.value)))),join:t=>oe(async([r],e)=>(r&&Cr(r),zt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>oe(async([r],e)=>{ci(r);const n=t.value.map(async(h,d)=>await e.call(r,[h,Se(d)]));return Kr(await Promise.all(n))}),filter:t=>oe(async([r],e)=>{ci(r);const n=[];for(let h=0;hoe(async([r,e],n)=>{ci(r);const h=e!=null;let d=h?e:t.value[0];for(let $=h?0:1;$oe(async([r],e)=>{ci(r);for(let n=0;noe(async([r],e)=>(Qs(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Vs:(h=>h.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?ln:Vs)),reverse:t=>oe(async(r,e)=>(t.value.reverse(),At)),copy:t=>oe(async(r,e)=>Kr([...t.value])),sort:t=>oe(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const b=Math.floor(d.length/2),k=await n(d.slice(0,b),$),E=await n(d.slice(b),$);return h(k,E,$)},h=async(d,$,b)=>{const k=[];let E=0,F=0;for(;Ezt(t.value),info:t=>t.info??At}};function J0(t,r){if(Object.hasOwn(cv,t.type)){const e=cv[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new Kt(`No such prop (${r}) in ${t.type}.`)}else throw new Kt(`Cannot read prop of ${t.type}. (reading ${r})`)}const Z0={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var ws=globalThis&&globalThis.__decorate||function(t,r,e,n){var h=arguments.length,d=h<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var b=t.length-1;b>=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};const Dg=300,G0=Dg-1;let rs=class{constructor(r,e={}){me(this,"opts");me(this,"stepCount",0);me(this,"stop",!1);me(this,"scope");me(this,"abortHandlers",[]);me(this,"vars",{});this.opts=e;const n={print:oe(([h])=>{Qs(h),this.opts.out&&this.opts.out(h)}),readline:oe(async h=>{const d=h[0];if(Cr(d),this.opts.in==null)return At;const $=await this.opts.in(d.value);return zt($)})};this.vars=Object.fromEntries(Object.entries({...r,...K0,...n}).map(([h,d])=>[h,Z0.const(d)])),this.scope=new Ya([new Map(Object.entries(this.vars))]),this.scope.opts.log=(h,d)=>{switch(h){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(n=>(this.handleError(n),vh("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(h){switch(h.type){case"arr":return h.value.map(d=>e(d));case"bool":return h.value;case"null":return null;case"num":return h.value;case"obj":{const d={};for(const[$,b]of h.value.entries())d[$]=e(b);return d}case"str":return h.value;default:return}}const n=new Map;for(const h of r)switch(h.type){case"meta":{n.set(h.name,e(h.value));break}}return n}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof wc?this.opts.err(r):this.opts.err(new B0(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{if(n.mut)throw new Error("Namespaces cannot include mutable variable: "+n.name);const h={isMutable:n.mut,value:await this._eval(n.expr,e)};e.add(n.name,h),this.scope.add(r.name+":"+n.name,h);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??At;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],{isMutable:!0,value:e[d]});const h=r.scope.createChildScope(n);return V0(await this._run(r.statements,h))}}async _eval(r,e){if(this.stop)return At;if(this.stepCount%Dg===G0&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new Kt("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);ci(n);const h=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,h)}case"if":{const n=await this._eval(r.cond,e);if(ps(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const h of r.elseif){const d=await this._eval(h.cond,e);if(ps(d),d.value)return this._eval(h.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return At}case"match":{const n=await this._eval(r.about,e);for(const h of r.qs){const d=await this._eval(h.q,e);if(gh(n,d))return await this._eval(h.a,e)}return r.default?await this._eval(r.default,e):At}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return At}case"for":{if(r.times){const n=await this._eval(r.times,e);Ae(n);for(let h=0;h0){const h=[];for(const d of r.attr)h.push({name:d.name,value:await this._eval(d.value,e)});n.attr=h}return e.add(r.name,{isMutable:r.mut,value:n}),At}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),At}case"addAssign":{const n=await this._eval(r.dest,e);Ae(n);const h=await this._eval(r.expr,e);return Ae(h),await this.assign(e,r.dest,Se(n.value+h.value)),At}case"subAssign":{const n=await this._eval(r.dest,e);Ae(n);const h=await this._eval(r.expr,e);return Ae(h),await this.assign(e,r.dest,Se(n.value-h.value)),At}case"null":return At;case"bool":return Zo(r.value);case"num":return Se(r.value);case"str":return zt(r.value);case"arr":return Kr(await Promise.all(r.value.map(n=>this._eval(n,e))));case"obj":{const n=new Map;for(const h of r.value.keys())n.set(h,await this._eval(r.value.get(h),e));return ec(n)}case"prop":{const n=await this._eval(r.target,e);return Nc(n)?n.value.has(r.name)?n.value.get(r.name):At:J0(n,r.name)}case"index":{const n=await this._eval(r.target,e),h=await this._eval(r.index,e);if(fv(n)){Ae(h);const d=n.value[h.value];if(d===void 0)throw new H0(`Index out of range. index: ${h.value} max: ${n.value.length-1}`);return d}else{if(Nc(n))return Cr(h),n.value.has(h.value)?n.value.get(h.value):At;throw new Kt(`Cannot read prop (${Au(h)}) of ${n.type}.`)}}case"not":{const n=await this._eval(r.expr,e);return ps(n),Zo(!n.value)}case"fn":return U0(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return Zo(e.exists(r.identifier.name));case"tmpl":{let n="";for(const h of r.tmpl)if(typeof h=="string")n+=h;else{const d=await this._eval(h,e);n+=Au(d)}return zt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),q0(n)}case"break":return this.log("block:break",{scope:e.name}),z0();case"continue":return this.log("block:continue",{scope:e.name}),W0();case"ns":return At;case"meta":return At;case"and":{const n=await this._eval(r.left,e);if(ps(n),n.value){const h=await this._eval(r.right,e);return ps(h),h}else return n}case"or":{const n=await this._eval(r.left,e);if(ps(n),n.value)return n;{const h=await this._eval(r.right,e);return ps(h),h}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=At;for(let h=0;he!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const h=await this._eval(e.target,r),d=await this._eval(e.index,r);if(fv(h))Ae(d),h.value[d.value]=n;else if(Nc(h))Cr(d),h.value.set(d.value,n);else throw new Kt(`Cannot read prop (${Au(d)}) of ${h.type}.`)}else if(e.type==="prop"){const h=await this._eval(e.target,r);Hn(h),h.value.set(e.name,n)}else throw new Kt("The left-hand side of an assignment expression must be a variable or a property/index access.")}};ws([vr],rs.prototype,"exec",null);ws([vr],rs.prototype,"execFn",null);ws([vr],rs.prototype,"execFnSimple",null);ws([vr],rs.prototype,"handleError",null);ws([vr],rs.prototype,"log",null);ws([vr],rs.prototype,"collectNs",null);ws([vr],rs.prototype,"collectNsMember",null);ws([vr],rs.prototype,"_fn",null);ws([vr],rs.prototype,"_eval",null);ws([vr],rs.prototype,"_run",null);ws([vr],rs.prototype,"registerAbortHandler",null);ws([vr],rs.prototype,"unregisterAbortHandler",null);ws([vr],rs.prototype,"abort",null);ws([vr],rs.prototype,"assign",null);ws([vr],rs,"collectMetadata",null);function Q0(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function Go(t,r,e,n){var h=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(h,Go.prototype),h.expected=r,h.found=e,h.location=n,h.name="SyntaxError",h}Q0(Go,Error);function Tc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}Go.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` +`+k+` | +`+d.line+" | "+E+` +`+k+" | "+Tc("",h.column-1," ")+Tc("",j,"^")}else r+=` + at `+$}return r};Go.buildMessage=function(t,r){var e={literal:function(E){return'"'+h(E.text)+'"'},class:function(E){var F=E.parts.map(function(j){return Array.isArray(j)?d(j[0])+"-"+d(j[1]):d(j)});return"["+(E.inverted?"^":"")+F.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(E){return E.description}};function n(E){return E.charCodeAt(0).toString(16).toUpperCase()}function h(E){return E.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+n(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+n(F)})}function d(E){return E.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+n(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+n(F)})}function $(E){return e[E.type](E)}function b(E){var F=E.map($),j,D;if(F.sort(),F.length>0){for(j=1,D=1;j=",Qe="<",Fr=">",Dt="+",yr="-",kt="*",dr="^",Or="/",_r="%",Er="!",Ft="[",U=".",K="if",te="elif",ce="else",he="match",ie="=>",Ne="eval",de="exists",we="`",ue='"',De="'",je='\\"',Be="\\'",We="true",Ze="false",rt="null",st=";",wt="@",Lt="@(",xt=`\r +`,Gt=/^[A-Z0-9_:]/i,_s=/^[^`{]/,Wr=/^[{}`]/,Ot=/^[+\-]/,ht=/^[1-9]/,It=/^[0-9]/,Vn=/^[A-Z_]/i,Kn=/^[A-Z0-9_]/i,Ci=/^[\r\n]/,_i=/^[ \t\r\n]/,tr=/^[ \t]/,rr=Bs(),ki=se("//",!1),vn=se("/*",!1),wr=se("*/",!1),Pt=se("(",!1),mr=se(")",!1),sr=se("::",!1),Ye=se("{",!1),Bt=se("}",!1),Ir=se("###",!1),dt=se("let",!1),yt=se(":",!1),ns=se("=",!1),Pi=se("var",!1),Ei=se("<:",!1),ks=se("#[",!1),as=se("]",!1),mt=se("each",!1),pt=se(",",!1),Ps=se("for",!1),or=se("return",!1),ur=Nt([["A","Z"],["0","9"],"_",":"],!1,!0),Mi=se("loop",!1),Si=se("break",!1),Fi=se("continue",!1),Oi=se("+=",!1),Jn=se("-=",!1),Zn=se("\\",!1),Ni=se("||",!1),Ti=se("&&",!1),Ii=se("==",!1),ji=se("!=",!1),Ri=se("<=",!1),Gn=se(">=",!1),gn=se("<",!1),Qn=se(">",!1),Di=se("+",!1),Xn=se("-",!1),Yn=se("*",!1),Li=se("^",!1),Bi=se("/",!1),Hi=se("%",!1),dn=se("!",!1),is=se("[",!1),yn=se(".",!1),Ui=se("if",!1),qi=se("elif",!1),zi=se("else",!1),Es=se("match",!1),Ms=se("=>",!1),Ss=se("eval",!1),Wi=se("exists",!1),Fs=se("`",!1),Os=Nt(["`","{"],!0,!1),Ns=Nt(["{","}","`"],!1,!1),Ts=se('"',!1),Is=se("'",!1),js=se('\\"',!1),ea=se("\\'",!1),Et=Nt(["+","-"],!1,!1),ta=Nt([["1","9"]],!1,!1),nr=Nt([["0","9"]],!1,!1),Vi=se("true",!1),Rs=se("false",!1),Ki=se("null",!1),ls=se(";",!1),Ji=se("@",!1),wn=se("@(",!1),Zi=Nt([["A","Z"],"_"],!1,!0),ra=Nt([["A","Z"],["0","9"],"_"],!1,!0),Gi=se(`\r +`,!1),Qi=Nt(["\r",` +`],!1,!1),Xi=Nt([" "," ","\r",` +`],!1,!1),Yi=Nt([" "," "],!1,!1),el=function(s){return s.join("")},tl=function(){return Y()},rl=function(){return Y()},sl=function(){return""},sa=function(){return""},nl=function(s){return s??[]},mn=function(s,o){return o},al=function(s,o){return[s,...o]},$n=function(s,o){return o},il=function(s,o){return[s,...o]},na=function(s,o){return o},ll=function(s,o){return[s,...o]},ol=function(s){return s},ul=function(s,o){return c("ns",{name:s,members:o})},fl=function(s,o){return c("meta",{name:s,value:o})},cl=function(s){return c("meta",{name:null,value:s})},hl=function(s,o,p){return c("def",{name:s,varType:o,expr:p,mut:!1,attr:[]})},pl=function(s,o,p){return c("def",{name:s,varType:o,expr:p,mut:!0,attr:[]})},vl=function(s){return c("identifier",{name:"print",chain:[c("callChain",{args:[s]})]})},gl=function(s,o){return c("attr",{name:s,value:o??c("bool",{value:!0})})},dl=function(s,o,p){return c("each",{var:s,items:o,for:p})},yl=function(s,o,p){return c("each",{var:s,items:o,for:p})},wl=function(s,o){return o},ml=function(s,o,p,u){return c("for",{var:s,from:o??c("num",{value:0}),to:p,for:u})},$l=function(s,o){return o},xl=function(s,o,p,u){return c("for",{var:s,from:o??c("num",{value:0}),to:p,for:u})},bl=function(s,o){return c("for",{times:s,for:o})},Al=function(s,o){return c("for",{times:s,for:o})},Cl=function(s){return c("return",{expr:s})},_l=function(s){return c("loop",{statements:s})},kl=function(){return c("break",{})},aa=function(){return c("continue",{})},Pl=function(s,o,p){return o==="+="?c("addAssign",{dest:s,expr:p}):o==="-="?c("subAssign",{dest:s,expr:p}):c("assign",{dest:s,expr:p})},ia=function(s,o,p){return{op:o,term:p}},El=function(s,o){return c("infix",{operands:[s,...o.map(p=>p.term)],operators:o.map(p=>p.op)})},Ml=function(){return Y()},Sl=function(s){return c("not",{expr:s})},la=function(s,o){return s.chain?{...s,chain:[...s.chain,...o]}:{...s,chain:o}},Fl=function(s){return c("callChain",{args:s??[]})},oa=function(s,o){return o},Ol=function(s,o){return[s,...o]},Nl=function(s){return c("indexChain",{index:s})},Tl=function(s){return c("propChain",{name:s})},Il=function(s,o,p,u){return c("if",{cond:s,then:o,elseif:p??[],else:u})},jl=function(s,o){return[s,...o]},ua=function(s,o){return{cond:s,then:o}},Rl=function(s){return s},fa=function(s,o,p){return{q:o,a:p}},Dl=function(s,o,p){return c("match",{about:s,qs:o??[],default:p})},Ll=function(s){return c("block",{statements:s})},Bl=function(s){return c("exists",{identifier:s})},ca=function(s){return c("identifier",{name:s})},Hl=function(s){return c("tmpl",{tmpl:s})},ha=function(s){return s.join("")},pa=function(s){return s},Ul=function(s){return c("str",{value:s.join("")})},va=function(s){return s},ql=function(s){return c("str",{value:s.join("")})},zl=function(){return'"'},Wl=function(){return"'"},Vl=function(){return c("num",{value:parseFloat(Y())})},Kl=function(){return c("num",{value:parseFloat(Y())})},Jl=function(){return c("num",{value:parseInt(Y(),10)})},Zl=function(){return c("num",{value:parseInt(Y(),10)})},ga=function(){return c("bool",{value:!0})},Gl=function(){return c("bool",{value:!1})},da=function(){return c("null",{})},ya=function(s,o){return{k:s,v:o}},Ql=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return c("obj",{value:o})},wa=function(s){return s},Xl=function(s){return c("arr",{value:s})},Yl=function(s,o){return{name:s,argType:o}},ma=function(s,o){return[s,...o]},eo=function(s,o,p,u,g,v){return(s.length>0||p.length>0)&&lo("Cannot use spaces before or after the function name."),c("def",{name:o,expr:c("fn",{args:u??[],retType:g},v??[]),mut:!1,attr:[]})},$a=function(s,o,p){return c("fn",{args:s??[],retType:o},p??[])},xa=function(s){return s},to=function(s){return c("arr",{value:s})},ba=function(s,o){return{k:s,v:o}},ro=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return c("obj",{value:o})},so=function(s,o){return c("fnTypeSource",{args:s??[],result:o})},no=function(s,o){return[s,...o]},ao=function(s,o){return c("namedTypeSource",{name:s,inner:o})},io=function(s){return c("namedTypeSource",{name:s,inner:null})},i=function(){return Y()},W=function(){return Y()},Ds=function(s){return c("block",{statements:s??[]})},a=0,z=0,C=[{line:1,column:1}],O=0,jr=[],A=0,T={},Ls;if("startRule"in r){if(!(r.startRule in h))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=h[r.startRule]}function Y(){return t.substring(z,a)}function Ht(){return Hs(z,a)}function lo(s,o){throw o=o!==void 0?o:Hs(z,a),Ca(s,o)}function se(s,o){return{type:"literal",text:s,ignoreCase:o}}function Nt(s,o,p){return{type:"class",parts:s,inverted:o,ignoreCase:p}}function Bs(){return{type:"any"}}function S(){return{type:"end"}}function Aa(s){var o=C[s],p;if(o)return o;for(p=s-1;!C[p];)p--;for(o=C[p],o={line:o.line,column:o.column};pO&&(O=a,jr=[]),jr.push(s))}function Ca(s,o){return new Go(s,null,null,o)}function oo(s,o,p){return new Go(Go.buildMessage(s,o),s,o,p)}function _a(){var s,o,p,u=a*77+0,g=T[u];if(g)return a=g.nextPos,g.result;for(s=a,o=[],p=ka();p!==e;)o.push(p),p=ka();return z=s,o=el(o),s=o,T[u]={nextPos:a,result:s},s}function ka(){var s,o,p=a*77+1,u=T[p];return u?(a=u.nextPos,u.result):(s=a,o=qs(),o!==e&&(z=s,o=tl()),s=o,s===e&&(s=a,o=En(),o!==e&&(z=s,o=rl()),s=o,s===e&&(s=uo(),s===e&&(t.length>a?(s=t.charAt(a),a++):(s=e,A===0&&M(rr))))),T[p]={nextPos:a,result:s},s)}function uo(){var s,o,p,u,g,v,m=a*77+2,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,2)===$?(o=$,a+=2):(o=e,A===0&&M(ki)),o!==e){for(p=[],u=a,g=a,A++,v=l(),A--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,v=l(),A--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);z=s,s=sl()}else a=s,s=e;if(s===e)if(s=a,t.substr(a,2)===b?(o=b,a+=2):(o=e,A===0&&M(vn)),o!==e){for(p=[],u=a,g=a,A++,t.substr(a,2)===k?(v=k,a+=2):(v=e,A===0&&M(wr)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,t.substr(a,2)===k?(v=k,a+=2):(v=e,A===0&&M(wr)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);t.substr(a,2)===k?(u=k,a+=2):(u=e,A===0&&M(wr)),u!==e?(z=s,s=sa()):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function os(){var s,o,p,u,g,v=a*77+3,m=T[v];if(m)return a=m.nextPos,m.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();for(p=xn(),p===e&&(p=null),u=[],g=f();g!==e;)u.push(g),g=f();return z=s,s=nl(p),T[v]={nextPos:a,result:s},s}function xn(){var s,o,p,u,g,v,m,w,_=a*77+4,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=Re(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Re(),w!==e?(z=u,u=mn(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Re(),w!==e?(z=u,u=mn(o,w)):(a=u,u=e)}else a=u,u=e}z=s,s=al(o,p)}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function bn(){var s,o,p,u,g,v,m,w,_=a*77+5,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=Rr(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Rr(),w!==e?(z=u,u=$n(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Rr(),w!==e?(z=u,u=$n(o,w)):(a=u,u=e)}else a=u,u=e}z=s,s=il(o,p)}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function fr(){var s,o,p,u,g,v,m,w,_=a*77+6,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=Dr(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Dr(),w!==e?(z=u,u=na(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Dr(),w!==e?(z=u,u=na(o,w)):(a=u,u=e)}else a=u,u=e}z=s,s=ll(o,p)}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function Re(){var s,o=a*77+7,p=T[o];return p?(a=p.nextPos,p.result):(s=Ea(),s===e&&(s=fo(),s===e&&(s=Dr())),T[o]={nextPos:a,result:s},s)}function Rr(){var s,o=a*77+8,p=T[o];return p?(a=p.nextPos,p.result):(s=Ma(),s===e&&(s=Ut(),s===e&&(s=Ea())),T[o]={nextPos:a,result:s},s)}function Dr(){var s,o=a*77+9,p=T[o];return p?(a=p.nextPos,p.result):(s=Ma(),s===e&&(s=Ut(),s===e&&(s=co(),s===e&&(s=go(),s===e&&(s=ho(),s===e&&(s=po(),s===e&&(s=vo(),s===e&&(s=yo(),s===e&&(s=wo(),s===e&&(s=xr(),s===e&&(s=Sa(),s===e&&(s=Te()))))))))))),T[o]={nextPos:a,result:s},s)}function Te(){var s,o=a*77+10,p=T[o];return p?(a=p.nextPos,p.result):(s=mo(),s===e&&(s=us()),T[o]={nextPos:a,result:s},s)}function us(){var s,o=a*77+11,p=T[o];return p?(a=p.nextPos,p.result):(s=bo(),s===e&&(s=Eo(),s===e&&(s=Fa(),s===e&&(s=Pa()))),T[o]={nextPos:a,result:s},s)}function Pa(){var s,o,p,u,g,v,m=a*77+12,w=T[m];if(w)return a=w.nextPos,w.result;if(s=Na(),s===e&&(s=Ta(),s===e&&(s=Ia(),s===e&&(s=qs(),s===e&&(s=En(),s===e&&(s=La(),s===e&&(s=Ha(),s===e&&(s=Fn(),s===e&&(s=Ua(),s===e&&(s=Po(),s===e&&(s=$o(),s===e&&(s=ja(),s===e))))))))))))if(s=a,t.charCodeAt(a)===40?(o=E,a++):(o=e,A===0&&M(Pt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Te(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e?(z=s,s=ol(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function $r(){var s,o=a*77+13,p=T[o];return p?(a=p.nextPos,p.result):(s=La(),s===e&&(s=En(),s===e&&(s=Ha(),s===e&&(s=Mo(),s===e&&(s=So(),s===e&&(s=Fn()))))),T[o]={nextPos:a,result:s},s)}function Ea(){var s,o,p,u,g,v,m,w,_,P,I=a*77+14,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.substr(a,2)===j?(o=j,a+=2):(o=e,A===0&&M(sr)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ue(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(t.charCodeAt(a)===123?(v=D,a++):(v=e,A===0&&M(Ye)),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(w=bn(),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();t.charCodeAt(a)===125?(P=V,a++):(P=e,A===0&&M(Bt)),P!==e?(z=s,s=ul(u,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function fo(){var s,o,p,u,g,v,m=a*77+15,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,3)===pe?(o=pe,a+=3):(o=e,A===0&&M(Ir)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Ue(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();v=$r(),v!==e?(z=s,s=fl(u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===pe?(o=pe,a+=3):(o=e,A===0&&M(Ir)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();u=$r(),u!==e?(z=s,s=cl(u)):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Ma(){var s,o,p,u,g,v,m,w,_,P=a*77+16,I=T[P];if(I)return a=I.nextPos,I.result;if(s=a,t.substr(a,3)===ee?(o=ee,a+=3):(o=e,A===0&&M(dt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ue(),u!==e){for(g=a,v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===58?(m=ae,a++):(m=e,A===0&&M(yt)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();_=He(),_!==e?g=_:(a=g,g=e)}else a=g,g=e;for(g===e&&(g=null),v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===61?(m=_e,a++):(m=e,A===0&&M(ns)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();_=Te(),_!==e?(z=s,s=hl(u,g,_)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===H?(o=H,a+=3):(o=e,A===0&&M(Pi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ue(),u!==e){for(g=a,v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===58?(m=ae,a++):(m=e,A===0&&M(yt)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();_=He(),_!==e?g=_:(a=g,g=e)}else a=g,g=e;for(g===e&&(g=null),v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===61?(m=_e,a++):(m=e,A===0&&M(ns)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();_=Te(),_!==e?(z=s,s=pl(u,g,_)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return T[P]={nextPos:a,result:s},s}function co(){var s,o,p,u,g=a*77+17,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,2)===L?(o=L,a+=2):(o=e,A===0&&M(Ei)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();u=Te(),u!==e?(z=s,s=vl(u)):(a=s,s=e)}else a=s,s=e;return T[g]={nextPos:a,result:s},s}function ho(){var s,o,p,u,g,v,m,w=a*77+18,_=T[w];if(_)return a=_.nextPos,_.result;if(s=a,t.substr(a,2)===B?(o=B,a+=2):(o=e,A===0&&M(ks)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Ue(),u!==e){for(g=a,v=[],m=f();m!==e;)v.push(m),m=f();for(m=$r(),m!==e?g=m:(a=g,g=e),g===e&&(g=null),v=[],m=f();m!==e;)v.push(m),m=f();t.charCodeAt(a)===93?(m=q,a++):(m=e,A===0&&M(as)),m!==e?(z=s,s=gl(u,g)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return T[w]={nextPos:a,result:s},s}function po(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re=a*77+19,Ke=T[re];if(Ke)return a=Ke.nextPos,Ke.result;if(s=a,t.substr(a,4)===J?(o=J,a+=4):(o=e,A===0&&M(mt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=E,a++):(u=e,A===0&&M(Pt)),u!==e)if(t.substr(a,3)===ee?(g=ee,a+=3):(g=e,A===0&&M(dt)),g!==e){if(v=[],m=f(),m!==e)for(;m!==e;)v.push(m),m=f();else v=e;if(v!==e)if(m=Ue(),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();for(t.charCodeAt(a)===44?(_=G,a++):(_=e,A===0&&M(pt)),_===e&&(_=null),P=[],I=f();I!==e;)P.push(I),I=f();if(I=Te(),I!==e)if(t.charCodeAt(a)===41?(R=F,a++):(R=e,A===0&&M(mr)),R!==e){for(Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();ye=xe(),ye!==e?(z=s,s=dl(m,I,ye)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,4)===J?(o=J,a+=4):(o=e,A===0&&M(mt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,A===0&&M(dt)),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();if(P=Te(),P!==e){if(I=[],R=f(),R!==e)for(;R!==e;)I.push(R),R=f();else I=e;I!==e?(R=xe(),R!==e?(z=s,s=yl(v,P,R)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return T[re]={nextPos:a,result:s},s}function vo(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re,Ke=a*77+20,Je=T[Ke];if(Je)return a=Je.nextPos,Je.result;if(s=a,t.substr(a,3)===Q?(o=Q,a+=3):(o=e,A===0&&M(Ps)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=E,a++):(u=e,A===0&&M(Pt)),u!==e)if(t.substr(a,3)===ee?(g=ee,a+=3):(g=e,A===0&&M(dt)),g!==e){if(v=[],m=f(),m!==e)for(;m!==e;)v.push(m),m=f();else v=e;if(v!==e)if(m=Ue(),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();if(_=a,t.charCodeAt(a)===61?(P=_e,a++):(P=e,A===0&&M(ns)),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();R=Te(),R!==e?(z=_,_=wl(m,R)):(a=_,_=e)}else a=_,_=e;for(_===e&&(_=null),t.charCodeAt(a)===44?(P=G,a++):(P=e,A===0&&M(pt)),P===e&&(P=null),I=[],R=f();R!==e;)I.push(R),R=f();if(R=Te(),R!==e)if(t.charCodeAt(a)===41?(Z=F,a++):(Z=e,A===0&&M(mr)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();re=xe(),re!==e?(z=s,s=ml(m,_,R,re)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===Q?(o=Q,a+=3):(o=e,A===0&&M(Ps)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,A===0&&M(dt)),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(w=a,t.charCodeAt(a)===61?(_=_e,a++):(_=e,A===0&&M(ns)),_!==e){for(P=[],I=f();I!==e;)P.push(I),I=f();I=Te(),I!==e?(z=w,w=$l(v,I)):(a=w,w=e)}else a=w,w=e;for(w===e&&(w=null),t.charCodeAt(a)===44?(_=G,a++):(_=e,A===0&&M(pt)),_===e&&(_=null),P=[],I=f();I!==e;)P.push(I),I=f();if(I=Te(),I!==e){if(R=[],Z=f(),Z!==e)for(;Z!==e;)R.push(Z),Z=f();else R=e;R!==e?(Z=xe(),Z!==e?(z=s,s=xl(v,w,I,Z)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===Q?(o=Q,a+=3):(o=e,A===0&&M(Ps)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=E,a++):(u=e,A===0&&M(Pt)),u!==e)if(g=Te(),g!==e)if(t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=xe(),w!==e?(z=s,s=bl(g,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===Q?(o=Q,a+=3):(o=e,A===0&&M(Ps)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Te(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;g!==e?(v=xe(),v!==e?(z=s,s=Al(u,v)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e}}return T[Ke]={nextPos:a,result:s},s}function go(){var s,o,p,u,g,v=a*77+21,m=T[v];if(m)return a=m.nextPos,m.result;if(s=a,t.substr(a,6)===X?(o=X,a+=6):(o=e,A===0&&M(or)),o!==e)if(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();g=Te(),g!==e?(z=s,s=Cl(g)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return T[v]={nextPos:a,result:s},s}function yo(){var s,o,p,u,g,v,m,w,_=a*77+22,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,t.substr(a,4)===$e?(o=$e,a+=4):(o=e,A===0&&M(Mi)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=D,a++):(u=e,A===0&&M(Ye)),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();if(v=fr(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();t.charCodeAt(a)===125?(w=V,a++):(w=e,A===0&&M(Bt)),w!==e?(z=s,s=_l(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function wo(){var s,o,p,u,g=a*77+23,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===ke?(o=ke,a+=5):(o=e,A===0&&M(Si)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=kl()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function xr(){var s,o,p,u,g=a*77+24,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,8)===ge?(o=ge,a+=8):(o=e,A===0&&M(Fi)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=aa()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function Sa(){var s,o,p,u,g,v,m=a*77+25,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=Te(),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.substr(a,2)===qe?(u=qe,a+=2):(u=e,A===0&&M(Oi)),u===e&&(t.substr(a,2)===it?(u=it,a+=2):(u=e,A===0&&M(Jn)),u===e&&(t.charCodeAt(a)===61?(u=_e,a++):(u=e,A===0&&M(ns)))),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();v=Te(),v!==e?(z=s,s=Pl(o,u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function mo(){var s,o,p,u,g,v,m,w,_=a*77+26,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=us(),o!==e){for(p=[],u=a,g=[],v=br();v!==e;)g.push(v),v=br();if(v=An(),v!==e){for(m=[],w=br();w!==e;)m.push(w),w=br();w=us(),w!==e?(z=u,u=ia(o,v,w)):(a=u,u=e)}else a=u,u=e;if(u!==e)for(;u!==e;){for(p.push(u),u=a,g=[],v=br();v!==e;)g.push(v),v=br();if(v=An(),v!==e){for(m=[],w=br();w!==e;)m.push(w),w=br();w=us(),w!==e?(z=u,u=ia(o,v,w)):(a=u,u=e)}else a=u,u=e}else p=e;p!==e?(z=s,s=El(o,p)):(a=s,s=e)}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function br(){var s,o,p,u=a*77+27,g=T[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===92?(o=Zt,a++):(o=e,A===0&&M(Zn)),o!==e?(p=ne(),p!==e?(o=[o,p],s=o):(a=s,s=e)):(a=s,s=e),s===e&&(s=y()),T[u]={nextPos:a,result:s},s)}function An(){var s,o,p=a*77+28,u=T[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===lt?(o=lt,a+=2):(o=e,A===0&&M(Ni)),o===e&&(t.substr(a,2)===ot?(o=ot,a+=2):(o=e,A===0&&M(Ti)),o===e&&(t.substr(a,2)===Ie?(o=Ie,a+=2):(o=e,A===0&&M(Ii)),o===e&&(t.substr(a,2)===at?(o=at,a+=2):(o=e,A===0&&M(ji)),o===e&&(t.substr(a,2)===Mt?(o=Mt,a+=2):(o=e,A===0&&M(Ri)),o===e&&(t.substr(a,2)===St?(o=St,a+=2):(o=e,A===0&&M(Gn)),o===e&&(t.charCodeAt(a)===60?(o=Qe,a++):(o=e,A===0&&M(gn)),o===e&&(t.charCodeAt(a)===62?(o=Fr,a++):(o=e,A===0&&M(Qn)),o===e&&(t.charCodeAt(a)===43?(o=Dt,a++):(o=e,A===0&&M(Di)),o===e&&(t.charCodeAt(a)===45?(o=yr,a++):(o=e,A===0&&M(Xn)),o===e&&(t.charCodeAt(a)===42?(o=kt,a++):(o=e,A===0&&M(Yn)),o===e&&(t.charCodeAt(a)===94?(o=dr,a++):(o=e,A===0&&M(Li)),o===e&&(t.charCodeAt(a)===47?(o=Or,a++):(o=e,A===0&&M(Bi)),o===e&&(t.charCodeAt(a)===37?(o=_r,a++):(o=e,A===0&&M(Hi))))))))))))))),o!==e&&(z=s,o=Ml()),s=o,T[p]={nextPos:a,result:s},s)}function $o(){var s,o,p,u=a*77+29,g=T[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===33?(o=Er,a++):(o=e,A===0&&M(dn)),o!==e?(p=Te(),p!==e?(z=s,s=Sl(p)):(a=s,s=e)):(a=s,s=e),T[u]={nextPos:a,result:s},s)}function Fa(){var s,o,p,u,g=a*77+30,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,o=Pa(),o!==e){if(p=[],u=Cn(),u===e&&(u=Oa(),u===e&&(u=Us())),u!==e)for(;u!==e;)p.push(u),u=Cn(),u===e&&(u=Oa(),u===e&&(u=Us()));else p=e;p!==e?(z=s,s=la(o,p)):(a=s,s=e)}else a=s,s=e;return T[g]={nextPos:a,result:s},s}function Cn(){var s,o,p,u,g,v,m=a*77+31,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===40?(o=E,a++):(o=e,A===0&&M(Pt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=xo(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e?(z=s,s=Fl(u)):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function xo(){var s,o,p,u,g,v,m=a*77+32,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=Te(),o!==e){for(p=[],u=a,g=x(),g!==e?(v=Te(),v!==e?(z=u,u=oa(o,v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=x(),g!==e?(v=Te(),v!==e?(z=u,u=oa(o,v)):(a=u,u=e)):(a=u,u=e);z=s,s=Ol(o,p)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Oa(){var s,o,p,u,g,v,m=a*77+33,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===91?(o=Ft,a++):(o=e,A===0&&M(is)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Te(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=q,a++):(v=e,A===0&&M(as)),v!==e?(z=s,s=Nl(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Us(){var s,o,p,u=a*77+34,g=T[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===46?(o=U,a++):(o=e,A===0&&M(yn)),o!==e?(p=Ue(),p!==e?(z=s,s=Tl(p)):(a=s,s=e)):(a=s,s=e),T[u]={nextPos:a,result:s},s)}function bo(){var s,o,p,u,g,v,m,w,_,P,I=a*77+35,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.substr(a,2)===K?(o=K,a+=2):(o=e,A===0&&M(Ui)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Te(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=xe(),v!==e){if(m=a,w=[],_=f(),_!==e)for(;_!==e;)w.push(_),_=f();else w=e;if(w!==e?(_=Ao(),_!==e?m=_:(a=m,m=e)):(a=m,m=e),m===e&&(m=null),w=a,_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;_!==e?(P=Co(),P!==e?w=P:(a=w,w=e)):(a=w,w=e),w===e&&(w=null),z=s,s=Il(u,v,m,w)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function Ao(){var s,o,p,u,g,v,m=a*77+36,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=_n(),o!==e){for(p=[],u=a,g=[],v=f();v!==e;)g.push(v),v=f();for(v=_n(),v!==e?u=v:(a=u,u=e);u!==e;){for(p.push(u),u=a,g=[],v=f();v!==e;)g.push(v),v=f();v=_n(),v!==e?u=v:(a=u,u=e)}z=s,s=jl(o,p)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function _n(){var s,o,p,u,g,v,m,w=a*77+37,_=T[w];if(_)return a=_.nextPos,_.result;if(s=a,t.substr(a,4)===te?(o=te,a+=4):(o=e,A===0&&M(qi)),o!==e)if(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();if(g=Te(),g!==e){for(v=[],m=f();m!==e;)v.push(m),m=f();m=xe(),m!==e?(z=s,s=ua(g,m)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e;return T[w]={nextPos:a,result:s},s}function Co(){var s,o,p,u,g,v=a*77+38,m=T[v];if(m)return a=m.nextPos,m.result;if(s=a,t.substr(a,4)===ce?(o=ce,a+=4):(o=e,A===0&&M(zi)),o!==e)if(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();g=xe(),g!==e?(z=s,s=Rl(g)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return T[v]={nextPos:a,result:s},s}function Na(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re,Ke,Je,Nn=a*77+39,fs=T[Nn];if(fs)return a=fs.nextPos,fs.result;if(s=a,t.substr(a,5)===he?(o=he,a+=5):(o=e,A===0&&M(Es)),o!==e)if(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();if(g=Te(),g!==e){for(v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===123?(m=D,a++):(m=e,A===0&&M(Ye)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();if(_=[],P=a,I=Te(),I!==e){for(R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.substr(a,2)===ie?(Z=ie,a+=2):(Z=e,A===0&&M(Ms)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();if(re=xe(),re!==e){for(Ke=[],Je=f();Je!==e;)Ke.push(Je),Je=f();z=P,P=fa(g,I,re)}else a=P,P=e}else a=P,P=e}else a=P,P=e;if(P!==e)for(;P!==e;)if(_.push(P),P=a,I=Te(),I!==e){for(R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.substr(a,2)===ie?(Z=ie,a+=2):(Z=e,A===0&&M(Ms)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();if(re=xe(),re!==e){for(Ke=[],Je=f();Je!==e;)Ke.push(Je),Je=f();z=P,P=fa(g,I,re)}else a=P,P=e}else a=P,P=e}else a=P,P=e;else _=e;if(_!==e){if(P=a,t.charCodeAt(a)===42?(I=kt,a++):(I=e,A===0&&M(Yn)),I!==e){for(R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.substr(a,2)===ie?(Z=ie,a+=2):(Z=e,A===0&&M(Ms)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();if(re=xe(),re!==e){for(Ke=[],Je=f();Je!==e;)Ke.push(Je),Je=f();P=re}else a=P,P=e}else a=P,P=e}else a=P,P=e;for(P===e&&(P=null),I=[],R=f();R!==e;)I.push(R),R=f();t.charCodeAt(a)===125?(R=V,a++):(R=e,A===0&&M(Bt)),R!==e?(z=s,s=Dl(g,_,P)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;else a=s,s=e;return T[Nn]={nextPos:a,result:s},s}function Ta(){var s,o,p,u,g,v,m,w,_=a*77+40,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,t.substr(a,4)===Ne?(o=Ne,a+=4):(o=e,A===0&&M(Ss)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=D,a++):(u=e,A===0&&M(Ye)),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();if(v=fr(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();t.charCodeAt(a)===125?(w=V,a++):(w=e,A===0&&M(Bt)),w!==e?(z=s,s=Ll(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function Ia(){var s,o,p,u,g=a*77+41,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,6)===de?(o=de,a+=6):(o=e,A===0&&M(Wi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;p!==e?(u=ja(),u!==e?(z=s,s=Bl(u)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;return T[g]={nextPos:a,result:s},s}function ja(){var s,o,p=a*77+42,u=T[p];return u?(a=u.nextPos,u.result):(s=a,o=za(),o!==e&&(z=s,o=ca(o)),s=o,T[p]={nextPos:a,result:s},s)}function qs(){var s,o,p,u,g,v,m=a*77+43,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===96?(o=we,a++):(o=e,A===0&&M(Fs)),o!==e){for(p=[],u=a,g=a,A++,t.charCodeAt(a)===96?(v=we,a++):(v=e,A===0&&M(Fs)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=kn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,t.charCodeAt(a)===96?(v=we,a++):(v=e,A===0&&M(Fs)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=kn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===96?(u=we,a++):(u=e,A===0&&M(Fs)),u!==e?(z=s,s=Hl(p)):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function kn(){var s,o,p,u,g,v,m=a*77+44,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=D,a++):(o=e,A===0&&M(Ye)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Te(),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();t.charCodeAt(a)===125?(v=V,a++):(v=e,A===0&&M(Bt)),v!==e?s=u:(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,o=[],p=Pn(),p!==e)for(;p!==e;)o.push(p),p=Pn();else o=e;o!==e&&(z=s,o=ha(o)),s=o}return T[m]={nextPos:a,result:s},s}function Pn(){var s,o=a*77+45,p=T[o];return p?(a=p.nextPos,p.result):(s=Ra(),s===e&&(_s.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,A===0&&M(Os))),T[o]={nextPos:a,result:s},s)}function Ra(){var s,o,p,u=a*77+46,g=T[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===92?(o=Zt,a++):(o=e,A===0&&M(Zn)),o!==e?(Wr.test(t.charAt(a))?(p=t.charAt(a),a++):(p=e,A===0&&M(Ns)),p!==e?s=p:(a=s,s=e)):(a=s,s=e),T[u]={nextPos:a,result:s},s)}function En(){var s,o,p,u,g,v,m=a*77+47,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===34?(o=ue,a++):(o=e,A===0&&M(Ts)),o!==e){for(p=[],u=a,g=a,A++,t.charCodeAt(a)===34?(v=ue,a++):(v=e,A===0&&M(Ts)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Da(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr))),v!==e?(z=u,u=pa(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,t.charCodeAt(a)===34?(v=ue,a++):(v=e,A===0&&M(Ts)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Da(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr))),v!==e?(z=u,u=pa(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===34?(u=ue,a++):(u=e,A===0&&M(Ts)),u!==e?(z=s,s=Ul(p)):(a=s,s=e)}else a=s,s=e;if(s===e)if(s=a,t.charCodeAt(a)===39?(o=De,a++):(o=e,A===0&&M(Is)),o!==e){for(p=[],u=a,g=a,A++,t.charCodeAt(a)===39?(v=De,a++):(v=e,A===0&&M(Is)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Mn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr))),v!==e?(z=u,u=va(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,t.charCodeAt(a)===39?(v=De,a++):(v=e,A===0&&M(Is)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Mn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr))),v!==e?(z=u,u=va(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===39?(u=De,a++):(u=e,A===0&&M(Is)),u!==e?(z=s,s=ql(p)):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Da(){var s,o,p=a*77+48,u=T[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===je?(o=je,a+=2):(o=e,A===0&&M(js)),o!==e&&(z=s,o=zl()),s=o,T[p]={nextPos:a,result:s},s)}function Mn(){var s,o,p=a*77+49,u=T[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Be?(o=Be,a+=2):(o=e,A===0&&M(ea)),o!==e&&(z=s,o=Wl()),s=o,T[p]={nextPos:a,result:s},s)}function La(){var s,o=a*77+50,p=T[o];return p?(a=p.nextPos,p.result):(s=_o(),s===e&&(s=Ba()),T[o]={nextPos:a,result:s},s)}function _o(){var s,o,p,u,g,v,m=a*77+51,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,Ot.test(t.charAt(a))?(t.charAt(a),a++):A===0&&M(Et),ht.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(ta)),o!==e){if(p=[],It.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(nr)),u!==e)for(;u!==e;)p.push(u),It.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(nr));else p=e;if(p!==e)if(t.charCodeAt(a)===46?(u=U,a++):(u=e,A===0&&M(yn)),u!==e){if(g=[],It.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,A===0&&M(nr)),v!==e)for(;v!==e;)g.push(v),It.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,A===0&&M(nr));else g=e;g!==e?(z=s,s=Vl()):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,Ot.test(t.charAt(a))?(t.charAt(a),a++):A===0&&M(Et),It.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(nr)),o!==e)if(t.charCodeAt(a)===46?(p=U,a++):(p=e,A===0&&M(yn)),p!==e){if(u=[],It.test(t.charAt(a))?(g=t.charAt(a),a++):(g=e,A===0&&M(nr)),g!==e)for(;g!==e;)u.push(g),It.test(t.charAt(a))?(g=t.charAt(a),a++):(g=e,A===0&&M(nr));else u=e;u!==e?(z=s,s=Kl()):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Ba(){var s,o,p,u,g=a*77+52,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,Ot.test(t.charAt(a))?(t.charAt(a),a++):A===0&&M(Et),ht.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(ta)),o!==e){if(p=[],It.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(nr)),u!==e)for(;u!==e;)p.push(u),It.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(nr));else p=e;p!==e?(z=s,s=Jl()):(a=s,s=e)}else a=s,s=e;return s===e&&(s=a,Ot.test(t.charAt(a))?(t.charAt(a),a++):A===0&&M(Et),It.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(nr)),o!==e?(z=s,s=Zl()):(a=s,s=e)),T[g]={nextPos:a,result:s},s}function Ha(){var s,o=a*77+53,p=T[o];return p?(a=p.nextPos,p.result):(s=ko(),s===e&&(s=Sn()),T[o]={nextPos:a,result:s},s)}function ko(){var s,o,p,u,g=a*77+54,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===We?(o=We,a+=4):(o=e,A===0&&M(Vi)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=ga()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function Sn(){var s,o,p,u,g=a*77+55,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===Ze?(o=Ze,a+=5):(o=e,A===0&&M(Rs)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=Gl()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function Fn(){var s,o,p,u,g=a*77+56,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===rt?(o=rt,a+=4):(o=e,A===0&&M(Ki)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=da()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function Ua(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re=a*77+57,Ke=T[re];if(Ke)return a=Ke.nextPos,Ke.result;if(s=a,t.charCodeAt(a)===123?(o=D,a++):(o=e,A===0&&M(Ye)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.charCodeAt(a)===58?(w=ae,a++):(w=e,A===0&&M(yt)),w!==e){if(_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;if(_!==e)if(P=Te(),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();for(t.charCodeAt(a)===44?(R=G,a++):(R=e,A===0&&M(pt)),R===e&&(t.charCodeAt(a)===59?(R=st,a++):(R=e,A===0&&M(ls))),R===e&&(R=null),Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();z=g,g=ya(v,P)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.charCodeAt(a)===58?(w=ae,a++):(w=e,A===0&&M(yt)),w!==e){if(_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;if(_!==e)if(P=Te(),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();for(t.charCodeAt(a)===44?(R=G,a++):(R=e,A===0&&M(pt)),R===e&&(t.charCodeAt(a)===59?(R=st,a++):(R=e,A===0&&M(ls))),R===e&&(R=null),Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();z=g,g=ya(v,P)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;t.charCodeAt(a)===125?(g=V,a++):(g=e,A===0&&M(Bt)),g!==e?(z=s,s=Ql(u)):(a=s,s=e)}else a=s,s=e;return T[re]={nextPos:a,result:s},s}function Po(){var s,o,p,u,g,v,m,w,_,P,I=a*77+58,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.charCodeAt(a)===91?(o=Ft,a++):(o=e,A===0&&M(is)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=Te(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();z=g,g=wa(v)}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=Te(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();z=g,g=wa(v)}else a=g,g=e;for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=q,a++):(v=e,A===0&&M(as)),v!==e?(z=s,s=Xl(u)):(a=s,s=e)}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function On(){var s,o,p,u,g,v,m,w=a*77+59,_=T[w];if(_)return a=_.nextPos,_.result;if(s=a,o=Ue(),o!==e){for(p=a,u=[],g=f();g!==e;)u.push(g),g=f();if(t.charCodeAt(a)===58?(g=ae,a++):(g=e,A===0&&M(yt)),g!==e){for(v=[],m=f();m!==e;)v.push(m),m=f();m=He(),m!==e?p=m:(a=p,p=e)}else a=p,p=e;p===e&&(p=null),z=s,s=Yl(o,p)}else a=s,s=e;return T[w]={nextPos:a,result:s},s}function qa(){var s,o,p,u,g,v,m=a*77+60,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=On(),o!==e){for(p=[],u=a,g=x(),g!==e?(v=On(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=x(),g!==e?(v=On(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);z=s,s=ma(o,p)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Ut(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re,Ke,Je,Nn=a*77+61,fs=T[Nn];if(fs)return a=fs.nextPos,fs.result;if(s=a,t.charCodeAt(a)===64?(o=wt,a++):(o=e,A===0&&M(Ji)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Ue(),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();if(t.charCodeAt(a)===40?(v=E,a++):(v=e,A===0&&M(Pt)),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(w=qa(),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();if(t.charCodeAt(a)===41?(P=F,a++):(P=e,A===0&&M(mr)),P!==e){for(I=a,R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.charCodeAt(a)===58?(Z=ae,a++):(Z=e,A===0&&M(yt)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();re=He(),re!==e?I=re:(a=I,I=e)}else a=I,I=e;for(I===e&&(I=null),R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.charCodeAt(a)===123?(Z=D,a++):(Z=e,A===0&&M(Ye)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();for(re=fr(),re===e&&(re=null),Ke=[],Je=f();Je!==e;)Ke.push(Je),Je=f();t.charCodeAt(a)===125?(Je=V,a++):(Je=e,A===0&&M(Bt)),Je!==e?(z=s,s=eo(p,u,g,w,I,re)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[Nn]={nextPos:a,result:s},s}function Eo(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye=a*77+62,re=T[ye];if(re)return a=re.nextPos,re.result;if(s=a,t.substr(a,2)===Lt?(o=Lt,a+=2):(o=e,A===0&&M(wn)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=qa(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();if(t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e){for(m=a,w=[],_=f();_!==e;)w.push(_),_=f();if(t.charCodeAt(a)===58?(_=ae,a++):(_=e,A===0&&M(yt)),_!==e){for(P=[],I=f();I!==e;)P.push(I),I=f();I=He(),I!==e?m=I:(a=m,m=e)}else a=m,m=e;for(m===e&&(m=null),w=[],_=f();_!==e;)w.push(_),_=f();if(t.charCodeAt(a)===123?(_=D,a++):(_=e,A===0&&M(Ye)),_!==e){for(P=[],I=f();I!==e;)P.push(I),I=f();for(I=fr(),I===e&&(I=null),R=[],Z=f();Z!==e;)R.push(Z),Z=f();t.charCodeAt(a)===125?(Z=V,a++):(Z=e,A===0&&M(Bt)),Z!==e?(z=s,s=$a(u,m,I)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[ye]={nextPos:a,result:s},s}function Mo(){var s,o,p,u,g,v,m,w,_,P,I=a*77+63,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.charCodeAt(a)===91?(o=Ft,a++):(o=e,A===0&&M(is)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=$r(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();z=g,g=xa(v)}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=$r(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();z=g,g=xa(v)}else a=g,g=e;for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=q,a++):(v=e,A===0&&M(as)),v!==e?(z=s,s=to(u)):(a=s,s=e)}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function So(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re=a*77+64,Ke=T[re];if(Ke)return a=Ke.nextPos,Ke.result;if(s=a,t.charCodeAt(a)===123?(o=D,a++):(o=e,A===0&&M(Ye)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.charCodeAt(a)===58?(w=ae,a++):(w=e,A===0&&M(yt)),w!==e){if(_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;if(_!==e)if(P=$r(),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();for(t.charCodeAt(a)===44?(R=G,a++):(R=e,A===0&&M(pt)),R===e&&(t.charCodeAt(a)===59?(R=st,a++):(R=e,A===0&&M(ls))),R===e&&(R=null),Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();z=g,g=ba(v,P)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.charCodeAt(a)===58?(w=ae,a++):(w=e,A===0&&M(yt)),w!==e){if(_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;if(_!==e)if(P=$r(),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();for(t.charCodeAt(a)===44?(R=G,a++):(R=e,A===0&&M(pt)),R===e&&(t.charCodeAt(a)===59?(R=st,a++):(R=e,A===0&&M(ls))),R===e&&(R=null),Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();z=g,g=ba(v,P)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;t.charCodeAt(a)===125?(g=V,a++):(g=e,A===0&&M(Bt)),g!==e?(z=s,s=ro(u)):(a=s,s=e)}else a=s,s=e;return T[re]={nextPos:a,result:s},s}function He(){var s,o=a*77+65,p=T[o];return p?(a=p.nextPos,p.result):(s=Fo(),s===e&&(s=Tt()),T[o]={nextPos:a,result:s},s)}function Fo(){var s,o,p,u,g,v,m,w,_,P,I=a*77+66,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.substr(a,2)===Lt?(o=Lt,a+=2):(o=e,A===0&&M(wn)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Lr(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();if(t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.substr(a,2)===ie?(w=ie,a+=2):(w=e,A===0&&M(Ms)),w!==e){for(_=[],P=f();P!==e;)_.push(P),P=f();P=He(),P!==e?(z=s,s=so(u,P)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function Lr(){var s,o,p,u,g,v,m=a*77+67,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=He(),o!==e){for(p=[],u=a,g=x(),g!==e?(v=He(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=x(),g!==e?(v=He(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);z=s,s=no(o,p)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Tt(){var s,o,p,u,g,v,m,w,_=a*77+68,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=Ue(),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(t.charCodeAt(a)===60?(u=Qe,a++):(u=e,A===0&&M(gn)),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();if(v=He(),v!==e){for(m=[],w=y();w!==e;)m.push(w),w=y();t.charCodeAt(a)===62?(w=Fr,a++):(w=e,A===0&&M(Qn)),w!==e?(z=s,s=ao(o,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return s===e&&(s=a,o=Ue(),o!==e&&(z=s,o=io(o)),s=o),T[_]={nextPos:a,result:s},s}function Ue(){var s,o,p,u,g=a*77+69,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,Vn.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(Zi)),o!==e){for(p=[],Kn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ra));u!==e;)p.push(u),Kn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ra));z=s,s=i()}else a=s,s=e;return T[g]={nextPos:a,result:s},s}function za(){var s,o,p,u,g,v,m=a*77+70,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=Ue(),o!==e){for(p=[],u=a,t.charCodeAt(a)===58?(g=ae,a++):(g=e,A===0&&M(yt)),g!==e?(v=Ue(),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,t.charCodeAt(a)===58?(g=ae,a++):(g=e,A===0&&M(yt)),g!==e?(v=Ue(),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);z=s,s=W()}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function x(){var s,o,p,u,g,v=a*77+71,m=T[v];if(m)return a=m.nextPos,m.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();if(t.charCodeAt(a)===44?(p=G,a++):(p=e,A===0&&M(pt)),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();o=[o,p,u],s=o}else a=s,s=e;if(s===e)if(s=[],o=f(),o!==e)for(;o!==e;)s.push(o),o=f();else s=e;return T[v]={nextPos:a,result:s},s}function xe(){var s,o,p,u,g,v,m=a*77+72,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=D,a++):(o=e,A===0&&M(Ye)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=fr(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===125?(v=V,a++):(v=e,A===0&&M(Bt)),v!==e?(z=s,s=Ds(u)):(a=s,s=e)}else a=s,s=e;return s===e&&(s=Dr()),T[m]={nextPos:a,result:s},s}function ne(){var s,o=a*77+73,p=T[o];return p?(a=p.nextPos,p.result):(t.substr(a,2)===xt?(s=xt,a+=2):(s=e,A===0&&M(Gi)),s===e&&(Ci.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,A===0&&M(Qi))),T[o]={nextPos:a,result:s},s)}function l(){var s,o,p=a*77+74,u=T[p];return u?(a=u.nextPos,u.result):(s=a,A++,t.length>a?(o=t.charAt(a),a++):(o=e,A===0&&M(rr)),A--,o===e?s=void 0:(a=s,s=e),s===e&&(s=ne()),T[p]={nextPos:a,result:s},s)}function f(){var s,o=a*77+75,p=T[o];return p?(a=p.nextPos,p.result):(_i.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,A===0&&M(Xi)),T[o]={nextPos:a,result:s},s)}function y(){var s,o=a*77+76,p=T[o];return p?(a=p.nextPos,p.result):(tr.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,A===0&&M(Yi)),T[o]={nextPos:a,result:s},s)}function c(s,o,p){const u={type:s};o.children=p;for(const v of Object.keys(o))o[v]!==void 0&&(u[v]=o[v]);const g=Ht();return u.loc={start:g.start.offset,end:g.end.offset-1},u}if(Ls=d(),Ls!==e&&a===t.length)return Ls;throw Ls!==e&&a`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>Of(n)).join(", "),e=Of(t.result);return`@(${r}) { ${e} }`}}}function Cu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return pv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Cu(t.inner):r=pv("any"),a$(t.name,[r])}}throw new su(`Unknown type: '${Of(t)}'`)}else{const r=t.args.map(e=>Cu(e));return i$(r,Cu(t.result))}}function l$(t){switch(t.type){case"def":{t.varType!=null&&Cu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Cu(r.argType);t.retType!=null&&Cu(t.retType);break}}return t}function o$(t){for(const r of t)et(r,l$);return t}function Nf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=Nf(n.expr.children)),r.push(n);else{if(e.length>0)throw new su("invalid attribute.");switch(n.type){case"fn":{n.children=Nf(n.children);break}case"block":{n.statements=Nf(n.statements);break}}r.push(n)}if(e.length>0)throw new su("invalid attribute.");return r}function u$(t){if(Y0(t)&&Lg(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const h of r)switch(h.type){case"callChain":{n=e$(n,h.args,h.loc);break}case"indexChain":{n=t$(n,h.index,h.loc);break}case"propChain":{n=r$(n,h.name,h.loc);break}}return n}return t}function f$(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:Ho(t.left),right:Ho(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:Ho(t.left),right:Ho(t.right)}),priority:3}};function h$(t){const r=t.operators.map(n=>{const h=c$[n];if(h==null)throw new su(`No such operator: ${n}.`);return h});let e=Tf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?h$(e):e);return t}var Ka;let v$=(Ka=class{constructor(){me(this,"plugins");this.plugins={validate:[n$,o$],transform:[Nf,f$,p$]}}static parse(r){return Ka.instance==null&&(Ka.instance=new Ka),Ka.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=hv(r,{startRule:"Preprocess"});e=hv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new su(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`,n):new su(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`,n):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}},me(Ka,"instance"),Ka);const g$="develop",d$={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`};let mh=[],Uu=null;function y$(t){return mh=v$.parse(t),JSON.stringify(mh,null," ")}async function w$(t){Uu==null||Uu.abort(),Uu=new rs({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:dh(r,!0),print:!0})},err:t.err,log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:dh(e.val,!0),print:!1});break}}});try{await Uu.exec(mh)}catch(r){t.err(r)}}const m$=Object.freeze(Object.defineProperty({__proto__:null,exec:w$,parse:y$,samples:d$,version:g$},Symbol.toStringTag,{value:"Module"}));function gr(t,r,e){let n=e.value;return{configurable:!0,get(){const h=n.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:h}),h},set(h){n=h}}}let mc=class Hg extends Error{constructor(e,n){super(e);me(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,Hg)}};class $$ extends mc{constructor(r){super(`Internal Error. ${r}`,r)}}class nu extends mc{constructor(r,e){super(r,e)}}class Jt extends mc{constructor(r,e){super(r,e)}}class x$ extends Jt{constructor(r,e){super(r,e)}}var bi=globalThis&&globalThis.__decorate||function(t,r,e,n){var h=arguments.length,d=h<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var b=t.length-1;b>=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};let ei=class Ug{constructor(r=[],e,n){me(this,"parent");me(this,"layerdStates");me(this,"name");me(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new Ug(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r).value;return this.log("read",{var:r,val:n}),n}throw new Jt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new Jt(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let n=1;for(const h of this.layerdStates){if(h.has(r)){const d=h.get(r);if(!d.isMutable)throw new Jt(`Cannot assign to an immutable variable ${r}.`);d.value=e,this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new Jt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};bi([gr],ei.prototype,"log",null);bi([gr],ei.prototype,"onUpdated",null);bi([gr],ei.prototype,"createChildScope",null);bi([gr],ei.prototype,"get",null);bi([gr],ei.prototype,"exists",null);bi([gr],ei.prototype,"getAll",null);bi([gr],ei.prototype,"add",null);bi([gr],ei.prototype,"assign",null);const Ct={type:"null"},on={type:"bool",value:!0},Ks={type:"bool",value:!1},Fe=t=>({type:"num",value:t}),Wt=t=>({type:"str",value:t}),Qo=t=>({type:"bool",value:t}),cp=t=>({type:"obj",value:t}),Jr=t=>({type:"arr",value:t}),b$=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),fe=t=>({type:"fn",native:t}),A$=t=>({type:"return",value:t}),C$=()=>({type:"break",value:null}),_$=()=>({type:"continue",value:null}),k$=t=>t.type==="return"?t.value:t,qg=(t,r)=>({type:"error",value:t,info:r});function Xs(t){if(t==null)throw new Jt("Expect anything, but got nothing.")}function vs(t){if(t==null)throw new Jt("Expect boolean, but got nothing.");if(t.type!=="bool")throw new Jt(`Expect boolean, but got ${t.type}.`)}function hi(t){if(t==null)throw new Jt("Expect function, but got nothing.");if(t.type!=="fn")throw new Jt(`Expect function, but got ${t.type}.`)}function kr(t){if(t==null)throw new Jt("Expect string, but got nothing.");if(t.type!=="str")throw new Jt(`Expect string, but got ${t.type}.`)}function Ce(t){if(t==null)throw new Jt("Expect number, but got nothing.");if(t.type!=="num")throw new Jt(`Expect number, but got ${t.type}.`)}function ai(t){if(t==null)throw new Jt("Expect object, but got nothing.");if(t.type!=="obj")throw new Jt(`Expect object, but got ${t.type}.`)}function rc(t){if(t==null)throw new Jt("Expect array, but got nothing.");if(t.type!=="arr")throw new Jt(`Expect array, but got ${t.type}.`)}function Rc(t){return t.type==="obj"}function vv(t){return t.type==="arr"}function $h(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function xh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>xh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function bh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>bh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=bh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Ah(t){if(t===null)return Ct;if(typeof t=="boolean")return Qo(t);if(typeof t=="string")return Wt(t);if(typeof t=="number")return Fe(t);if(Array.isArray(t))return Jr(t.map(r=>Ah(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,Ah(n));return cp(r)}return Ct}function _u(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const n=[];for(const h of t.value)n.push(_u(h,!0,e));return"[ "+n.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const n=[];for(const[h,d]of t.value)n.push(`${h}: ${_u(d,!0,e)}`);return"{ "+n.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const P$={help:Wt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Wt("0.16.0"),"Core:ai":Wt("kawaii"),"Core:not":fe(([t])=>(vs(t),t.value?Ks:on)),"Core:eq":fe(([t,r])=>(Xs(t),Xs(r),$h(t,r)?on:Ks)),"Core:neq":fe(([t,r])=>(Xs(t),Xs(r),$h(t,r)?Ks:on)),"Core:and":fe(([t,r])=>(vs(t),t.value?(vs(r),r.value?on:Ks):Ks)),"Core:or":fe(([t,r])=>(vs(t),t.value?on:(vs(r),r.value?on:Ks))),"Core:add":fe(([t,r])=>(Ce(t),Ce(r),Fe(t.value+r.value))),"Core:sub":fe(([t,r])=>(Ce(t),Ce(r),Fe(t.value-r.value))),"Core:mul":fe(([t,r])=>(Ce(t),Ce(r),Fe(t.value*r.value))),"Core:pow":fe(([t,r])=>{Ce(t),Ce(r);const e=t.value**r.value;if(isNaN(e))throw new Jt("Invalid operation.");return Fe(e)}),"Core:div":fe(([t,r])=>{Ce(t),Ce(r);const e=t.value/r.value;if(isNaN(e))throw new Jt("Invalid operation.");return Fe(e)}),"Core:mod":fe(([t,r])=>(Ce(t),Ce(r),Fe(t.value%r.value))),"Core:gt":fe(([t,r])=>(Ce(t),Ce(r),t.value>r.value?on:Ks)),"Core:lt":fe(([t,r])=>(Ce(t),Ce(r),t.value(Ce(t),Ce(r),t.value>=r.value?on:Ks)),"Core:lteq":fe(([t,r])=>(Ce(t),Ce(r),t.value<=r.value?on:Ks)),"Core:type":fe(([t])=>(Xs(t),Wt(t.type))),"Core:to_str":fe(([t])=>(Xs(t),Wt(_u(t)))),"Core:range":fe(([t,r])=>(Ce(t),Ce(r),t.valueFe(n+t.value))):t.value>r.value?Jr(Array.from({length:t.value-r.value+1},(e,n)=>Fe(t.value-n))):Jr([t]))),"Core:sleep":fe(async([t])=>(Ce(t),await new Promise(r=>setTimeout(r,t.value)),Ct)),"Util:uuid":fe(()=>Wt(rp())),"Json:stringify":fe(([t])=>(Xs(t),Wt(JSON.stringify(bh(t))))),"Json:parse":fe(([t])=>{kr(t);try{return Ah(JSON.parse(t.value))}catch{return qg("not_json")}}),"Json:parsable":fe(([t])=>{kr(t);try{JSON.parse(t.value)}catch{return Qo(!1)}return Qo(!0)}),"Date:now":fe(()=>Fe(Date.now())),"Date:year":fe(([t])=>(t&&Ce(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":fe(([t])=>(t&&Ce(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":fe(([t])=>(t&&Ce(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":fe(([t])=>(t&&Ce(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":fe(([t])=>(t&&Ce(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":fe(([t])=>(t&&Ce(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":fe(([t])=>(kr(t),Fe(new Date(t.value).getTime()))),"Math:Infinity":Fe(1/0),"Math:E":Fe(Math.E),"Math:LN2":Fe(Math.LN2),"Math:LN10":Fe(Math.LN10),"Math:LOG2E":Fe(Math.LOG2E),"Math:LOG10E":Fe(Math.LOG10E),"Math:PI":Fe(Math.PI),"Math:SQRT1_2":Fe(Math.SQRT1_2),"Math:SQRT2":Fe(Math.SQRT2),"Math:abs":fe(([t])=>(Ce(t),Fe(Math.abs(t.value)))),"Math:acos":fe(([t])=>(Ce(t),Fe(Math.acos(t.value)))),"Math:acosh":fe(([t])=>(Ce(t),Fe(Math.acosh(t.value)))),"Math:asin":fe(([t])=>(Ce(t),Fe(Math.asin(t.value)))),"Math:asinh":fe(([t])=>(Ce(t),Fe(Math.asinh(t.value)))),"Math:atan":fe(([t])=>(Ce(t),Fe(Math.atan(t.value)))),"Math:atanh":fe(([t])=>(Ce(t),Fe(Math.atanh(t.value)))),"Math:atan2":fe(([t,r])=>(Ce(t),Ce(r),Fe(Math.atan2(t.value,r.value)))),"Math:cbrt":fe(([t])=>(Ce(t),Fe(Math.cbrt(t.value)))),"Math:ceil":fe(([t])=>(Ce(t),Fe(Math.ceil(t.value)))),"Math:clz32":fe(([t])=>(Ce(t),Fe(Math.clz32(t.value)))),"Math:cos":fe(([t])=>(Ce(t),Fe(Math.cos(t.value)))),"Math:cosh":fe(([t])=>(Ce(t),Fe(Math.cosh(t.value)))),"Math:exp":fe(([t])=>(Ce(t),Fe(Math.exp(t.value)))),"Math:expm1":fe(([t])=>(Ce(t),Fe(Math.expm1(t.value)))),"Math:floor":fe(([t])=>(Ce(t),Fe(Math.floor(t.value)))),"Math:fround":fe(([t])=>(Ce(t),Fe(Math.fround(t.value)))),"Math:hypot":fe(([t])=>{rc(t);const r=[];for(const e of t.value)Ce(e),r.push(e.value);return Fe(Math.hypot(...r))}),"Math:imul":fe(([t,r])=>(Ce(t),Ce(r),Fe(Math.imul(t.value,r.value)))),"Math:log":fe(([t])=>(Ce(t),Fe(Math.log(t.value)))),"Math:log1p":fe(([t])=>(Ce(t),Fe(Math.log1p(t.value)))),"Math:log10":fe(([t])=>(Ce(t),Fe(Math.log10(t.value)))),"Math:log2":fe(([t])=>(Ce(t),Fe(Math.log2(t.value)))),"Math:max":fe(([t,r])=>(Ce(t),Ce(r),Fe(Math.max(t.value,r.value)))),"Math:min":fe(([t,r])=>(Ce(t),Ce(r),Fe(Math.min(t.value,r.value)))),"Math:pow":fe(([t,r])=>(Ce(t),Ce(r),Fe(Math.pow(t.value,r.value)))),"Math:round":fe(([t])=>(Ce(t),Fe(Math.round(t.value)))),"Math:sign":fe(([t])=>(Ce(t),Fe(Math.sign(t.value)))),"Math:sin":fe(([t])=>(Ce(t),Fe(Math.sin(t.value)))),"Math:sinh":fe(([t])=>(Ce(t),Fe(Math.sinh(t.value)))),"Math:sqrt":fe(([t])=>{Ce(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new Jt("Invalid operation.");return Fe(r)}),"Math:tan":fe(([t])=>(Ce(t),Fe(Math.tan(t.value)))),"Math:tanh":fe(([t])=>(Ce(t),Fe(Math.tanh(t.value)))),"Math:trunc":fe(([t])=>(Ce(t),Fe(Math.trunc(t.value)))),"Math:rnd":fe(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Fe(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Fe(Math.random())),"Math:gen_rng":fe(([t])=>{if(Xs(t),t.type!=="num"&&t.type!=="str")return Ct;const r=cf(t.value.toString());return fe(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Fe(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Fe(r()))}),"Num:to_hex":fe(([t])=>(Ce(t),Wt(t.value.toString(16)))),"Num:from_hex":fe(([t])=>(kr(t),Fe(parseInt(t.value,16)))),"Str:lf":Wt(` +`),"Str:lt":fe(([t,r])=>(kr(t),kr(r),t.value(kr(t),kr(r),t.value>r.value?Fe(-1):t.value===r.value?Fe(0):Fe(1))),"Str:from_codepoint":fe(([t])=>(Ce(t),Wt(String.fromCodePoint(t.value)))),"Obj:keys":fe(([t])=>(ai(t),Jr(Array.from(t.value.keys()).map(r=>Wt(r))))),"Obj:vals":fe(([t])=>(ai(t),Jr(Array.from(t.value.values())))),"Obj:kvs":fe(([t])=>(ai(t),Jr(Array.from(t.value.entries()).map(([r,e])=>Jr([Wt(r),e]))))),"Obj:get":fe(([t,r])=>(ai(t),kr(r),t.value.get(r.value)??Ct)),"Obj:set":fe(([t,r,e])=>(ai(t),kr(r),Xs(e),t.value.set(r.value,e),Ct)),"Obj:has":fe(([t,r])=>(ai(t),kr(r),Qo(t.value.has(r.value)))),"Obj:copy":fe(([t])=>(ai(t),cp(new Map(t.value)))),"Async:interval":fe(async([t,r,e],n)=>{Ce(t),hi(r),e&&(vs(e),e.value&&n.call(r,[]));const h=setInterval(()=>{n.topCall(r,[])},t.value),d=()=>{clearInterval(h)};return n.registerAbortHandler(d),fe(([],$)=>{clearInterval(h),$.unregisterAbortHandler(d)})}),"Async:timeout":fe(async([t,r],e)=>{Ce(t),hi(r);const n=setTimeout(()=>{e.topCall(r,[])},t.value),h=()=>{clearTimeout(n)};return e.registerAbortHandler(h),fe(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(h)})})},gv={num:{to_str:t=>fe(async(r,e)=>Wt(t.value.toString()))},str:{to_num:t=>fe(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?Ct:Fe(n)}),len:t=>Fe(hf(t.value)),replace:t=>fe(async([r,e],n)=>(kr(r),kr(e),Wt(t.value.split(r.value).join(e.value)))),index_of:t=>fe(async([r],e)=>(kr(r),Fe(vf(t.value,r.value)))),incl:t=>fe(async([r],e)=>(kr(r),t.value.includes(r.value)?on:Ks)),trim:t=>fe(async(r,e)=>Wt(t.value.trim())),upper:t=>fe(async(r,e)=>Wt(t.value.toUpperCase())),lower:t=>fe(async(r,e)=>Wt(t.value.toLowerCase())),split:t=>fe(async([r],e)=>(r&&kr(r),Jr(r?t.value.split(r?r.value:"").map(n=>Wt(n)):zn(t.value).map(n=>Wt(n))))),slice:t=>fe(async([r,e],n)=>(Ce(r),Ce(e),Wt(pf(t.value,r.value,e.value)))),pick:t=>fe(async([r],e)=>{Ce(r);const h=zn(t.value)[r.value];return h?Wt(h):Ct}),codepoint_at:t=>fe(([r],e)=>{Ce(r);const n=t.value.charCodeAt(r.value);return Number.isNaN(n)?Ct:Fe(n)})},arr:{len:t=>Fe(t.value.length),push:t=>fe(async([r],e)=>(Xs(r),t.value.push(r),t)),unshift:t=>fe(async([r],e)=>(Xs(r),t.value.unshift(r),t)),pop:t=>fe(async(r,e)=>t.value.pop()??Ct),shift:t=>fe(async(r,e)=>t.value.shift()??Ct),concat:t=>fe(async([r],e)=>(rc(r),Jr(t.value.concat(r.value)))),slice:t=>fe(async([r,e],n)=>(Ce(r),Ce(e),Jr(t.value.slice(r.value,e.value)))),join:t=>fe(async([r],e)=>(r&&kr(r),Wt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>fe(async([r],e)=>{hi(r);const n=t.value.map(async(h,d)=>await e.call(r,[h,Fe(d)]));return Jr(await Promise.all(n))}),filter:t=>fe(async([r],e)=>{hi(r);const n=[];for(let h=0;hfe(async([r,e],n)=>{hi(r);const h=e!=null;let d=h?e:t.value[0];for(let $=h?0:1;$fe(async([r],e)=>{hi(r);for(let n=0;nfe(async([r],e)=>(Xs(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Ks:(h=>h.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?on:Ks)),reverse:t=>fe(async(r,e)=>(t.value.reverse(),Ct)),copy:t=>fe(async(r,e)=>Jr([...t.value])),sort:t=>fe(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const b=Math.floor(d.length/2),k=await n(d.slice(0,b),$),E=await n(d.slice(b),$);return h(k,E,$)},h=async(d,$,b)=>{const k=[];let E=0,F=0;for(;EWt(t.value),info:t=>t.info??Ct}};function E$(t,r){if(Object.hasOwn(gv,t.type)){const e=gv[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new Jt(`No such prop (${r}) in ${t.type}.`)}else throw new Jt(`Cannot read prop of ${t.type}. (reading ${r})`)}const M$={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var ms=globalThis&&globalThis.__decorate||function(t,r,e,n){var h=arguments.length,d=h<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var b=t.length-1;b>=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};const zg=300,S$=zg-1;let ss=class{constructor(r,e={}){me(this,"opts");me(this,"stepCount",0);me(this,"stop",!1);me(this,"scope");me(this,"abortHandlers",[]);me(this,"vars",{});this.opts=e;const n={print:fe(([h])=>{Xs(h),this.opts.out&&this.opts.out(h)}),readline:fe(async h=>{const d=h[0];if(kr(d),this.opts.in==null)return Ct;const $=await this.opts.in(d.value);return Wt($)})};this.vars=Object.fromEntries(Object.entries({...r,...P$,...n}).map(([h,d])=>[h,M$.const(d)])),this.scope=new ei([new Map(Object.entries(this.vars))]),this.scope.opts.log=(h,d)=>{switch(h){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(n=>(this.handleError(n),qg("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(h){switch(h.type){case"arr":return h.value.map(d=>e(d));case"bool":return h.value;case"null":return null;case"num":return h.value;case"obj":{const d={};for(const[$,b]of h.value.entries())d[$]=e(b);return d}case"str":return h.value;default:return}}const n=new Map;for(const h of r)switch(h.type){case"meta":{n.set(h.name,e(h.value));break}}return n}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof mc?this.opts.err(r):this.opts.err(new $$(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{if(n.mut)throw new Error("Namespaces cannot include mutable variable: "+n.name);const h={isMutable:n.mut,value:await this._eval(n.expr,e)};e.add(n.name,h),this.scope.add(r.name+":"+n.name,h);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??Ct;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],{isMutable:!0,value:e[d]});const h=r.scope.createChildScope(n);return k$(await this._run(r.statements,h))}}async _eval(r,e){if(this.stop)return Ct;if(this.stepCount%zg===S$&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new Jt("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);hi(n);const h=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,h)}case"if":{const n=await this._eval(r.cond,e);if(vs(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const h of r.elseif){const d=await this._eval(h.cond,e);if(vs(d),d.value)return this._eval(h.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return Ct}case"match":{const n=await this._eval(r.about,e);for(const h of r.qs){const d=await this._eval(h.q,e);if($h(n,d))return await this._eval(h.a,e)}return r.default?await this._eval(r.default,e):Ct}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return Ct}case"for":{if(r.times){const n=await this._eval(r.times,e);Ce(n);for(let h=0;h0){const h=[];for(const d of r.attr)h.push({name:d.name,value:await this._eval(d.value,e)});n.attr=h}return e.add(r.name,{isMutable:r.mut,value:n}),Ct}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),Ct}case"addAssign":{const n=await this._eval(r.dest,e);Ce(n);const h=await this._eval(r.expr,e);return Ce(h),await this.assign(e,r.dest,Fe(n.value+h.value)),Ct}case"subAssign":{const n=await this._eval(r.dest,e);Ce(n);const h=await this._eval(r.expr,e);return Ce(h),await this.assign(e,r.dest,Fe(n.value-h.value)),Ct}case"null":return Ct;case"bool":return Qo(r.value);case"num":return Fe(r.value);case"str":return Wt(r.value);case"arr":return Jr(await Promise.all(r.value.map(n=>this._eval(n,e))));case"obj":{const n=new Map;for(const h of r.value.keys())n.set(h,await this._eval(r.value.get(h),e));return cp(n)}case"prop":{const n=await this._eval(r.target,e);return Rc(n)?n.value.has(r.name)?n.value.get(r.name):Ct:E$(n,r.name)}case"index":{const n=await this._eval(r.target,e),h=await this._eval(r.index,e);if(vv(n)){Ce(h);const d=n.value[h.value];if(d===void 0)throw new x$(`Index out of range. index: ${h.value} max: ${n.value.length-1}`);return d}else{if(Rc(n))return kr(h),n.value.has(h.value)?n.value.get(h.value):Ct;throw new Jt(`Cannot read prop (${_u(h)}) of ${n.type}.`)}}case"not":{const n=await this._eval(r.expr,e);return vs(n),Qo(!n.value)}case"fn":return b$(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return Qo(e.exists(r.identifier.name));case"tmpl":{let n="";for(const h of r.tmpl)if(typeof h=="string")n+=h;else{const d=await this._eval(h,e);n+=_u(d)}return Wt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),A$(n)}case"break":return this.log("block:break",{scope:e.name}),C$();case"continue":return this.log("block:continue",{scope:e.name}),_$();case"ns":return Ct;case"meta":return Ct;case"and":{const n=await this._eval(r.left,e);if(vs(n),n.value){const h=await this._eval(r.right,e);return vs(h),h}else return n}case"or":{const n=await this._eval(r.left,e);if(vs(n),n.value)return n;{const h=await this._eval(r.right,e);return vs(h),h}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=Ct;for(let h=0;he!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const h=await this._eval(e.target,r),d=await this._eval(e.index,r);if(vv(h))Ce(d),h.value[d.value]=n;else if(Rc(h))kr(d),h.value.set(d.value,n);else throw new Jt(`Cannot read prop (${_u(d)}) of ${h.type}.`)}else if(e.type==="prop"){const h=await this._eval(e.target,r);ai(h),h.value.set(e.name,n)}else throw new Jt("The left-hand side of an assignment expression must be a variable or a property/index access.")}};ms([gr],ss.prototype,"exec",null);ms([gr],ss.prototype,"execFn",null);ms([gr],ss.prototype,"execFnSimple",null);ms([gr],ss.prototype,"handleError",null);ms([gr],ss.prototype,"log",null);ms([gr],ss.prototype,"collectNs",null);ms([gr],ss.prototype,"collectNsMember",null);ms([gr],ss.prototype,"_fn",null);ms([gr],ss.prototype,"_eval",null);ms([gr],ss.prototype,"_run",null);ms([gr],ss.prototype,"registerAbortHandler",null);ms([gr],ss.prototype,"unregisterAbortHandler",null);ms([gr],ss.prototype,"abort",null);ms([gr],ss.prototype,"assign",null);ms([gr],ss,"collectMetadata",null);function F$(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function Xo(t,r,e,n){var h=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(h,Xo.prototype),h.expected=r,h.found=e,h.location=n,h.name="SyntaxError",h}F$(Xo,Error);function Dc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}Xo.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` +`+k+` | +`+d.line+" | "+E+` +`+k+" | "+Dc("",h.column-1," ")+Dc("",j,"^")}else r+=` + at `+$}return r};Xo.buildMessage=function(t,r){var e={literal:function(E){return'"'+h(E.text)+'"'},class:function(E){var F=E.parts.map(function(j){return Array.isArray(j)?d(j[0])+"-"+d(j[1]):d(j)});return"["+(E.inverted?"^":"")+F.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(E){return E.description}};function n(E){return E.charCodeAt(0).toString(16).toUpperCase()}function h(E){return E.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+n(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+n(F)})}function d(E){return E.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+n(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+n(F)})}function $(E){return e[E.type](E)}function b(E){var F=E.map($),j,D;if(F.sort(),F.length>0){for(j=1,D=1;j=",Qe="<",Fr=">",Dt="+",yr="-",kt="*",dr="^",Or="/",_r="%",Er="!",Ft="[",U=".",K="if",te="elif",ce="else",he="match",ie="=>",Ne="eval",de="exists",we="`",ue='"',De="'",je='\\"',Be="\\'",We="true",Ze="false",rt="null",st=";",wt="@",Lt="@(",xt=`\r +`,Gt=/^[A-Z0-9_:]/i,_s=/^[^`{]/,Wr=/^[{}`]/,Ot=/^[+\-]/,ht=/^[1-9]/,It=/^[0-9]/,Vn=/^[A-Z_]/i,Kn=/^[A-Z0-9_]/i,Ci=/^[\r\n]/,_i=/^[ \t\r\n]/,tr=/^[ \t]/,rr=Bs(),ki=se("//",!1),vn=se("/*",!1),wr=se("*/",!1),Pt=se("(",!1),mr=se(")",!1),sr=se("::",!1),Ye=se("{",!1),Bt=se("}",!1),Ir=se("###",!1),dt=se("let",!1),yt=se(":",!1),ns=se("=",!1),Pi=se("var",!1),Ei=se("<:",!1),ks=se("#[",!1),as=se("]",!1),mt=se("each",!1),pt=se(",",!1),Ps=se("for",!1),or=se("return",!1),ur=Nt([["A","Z"],["0","9"],"_",":"],!1,!0),Mi=se("loop",!1),Si=se("break",!1),Fi=se("continue",!1),Oi=se("+=",!1),Jn=se("-=",!1),Zn=se("\\",!1),Ni=se("||",!1),Ti=se("&&",!1),Ii=se("==",!1),ji=se("!=",!1),Ri=se("<=",!1),Gn=se(">=",!1),gn=se("<",!1),Qn=se(">",!1),Di=se("+",!1),Xn=se("-",!1),Yn=se("*",!1),Li=se("^",!1),Bi=se("/",!1),Hi=se("%",!1),dn=se("!",!1),is=se("[",!1),yn=se(".",!1),Ui=se("if",!1),qi=se("elif",!1),zi=se("else",!1),Es=se("match",!1),Ms=se("=>",!1),Ss=se("eval",!1),Wi=se("exists",!1),Fs=se("`",!1),Os=Nt(["`","{"],!0,!1),Ns=Nt(["{","}","`"],!1,!1),Ts=se('"',!1),Is=se("'",!1),js=se('\\"',!1),ea=se("\\'",!1),Et=Nt(["+","-"],!1,!1),ta=Nt([["1","9"]],!1,!1),nr=Nt([["0","9"]],!1,!1),Vi=se("true",!1),Rs=se("false",!1),Ki=se("null",!1),ls=se(";",!1),Ji=se("@",!1),wn=se("@(",!1),Zi=Nt([["A","Z"],"_"],!1,!0),ra=Nt([["A","Z"],["0","9"],"_"],!1,!0),Gi=se(`\r +`,!1),Qi=Nt(["\r",` +`],!1,!1),Xi=Nt([" "," ","\r",` +`],!1,!1),Yi=Nt([" "," "],!1,!1),el=function(s){return s.join("")},tl=function(){return Y()},rl=function(){return Y()},sl=function(){return""},sa=function(){return""},nl=function(s){return s??[]},mn=function(s,o){return o},al=function(s,o){return[s,...o]},$n=function(s,o){return o},il=function(s,o){return[s,...o]},na=function(s,o){return o},ll=function(s,o){return[s,...o]},ol=function(s){return s},ul=function(s,o){return c("ns",{name:s,members:o})},fl=function(s,o){return c("meta",{name:s,value:o})},cl=function(s){return c("meta",{name:null,value:s})},hl=function(s,o,p){return c("def",{name:s,varType:o,expr:p,mut:!1,attr:[]})},pl=function(s,o,p){return c("def",{name:s,varType:o,expr:p,mut:!0,attr:[]})},vl=function(s){return c("identifier",{name:"print",chain:[c("callChain",{args:[s]})]})},gl=function(s,o){return c("attr",{name:s,value:o??c("bool",{value:!0})})},dl=function(s,o,p){return c("each",{var:s,items:o,for:p})},yl=function(s,o,p){return c("each",{var:s,items:o,for:p})},wl=function(s,o){return o},ml=function(s,o,p,u){return c("for",{var:s,from:o??c("num",{value:0}),to:p,for:u})},$l=function(s,o){return o},xl=function(s,o,p,u){return c("for",{var:s,from:o??c("num",{value:0}),to:p,for:u})},bl=function(s,o){return c("for",{times:s,for:o})},Al=function(s,o){return c("for",{times:s,for:o})},Cl=function(s){return c("return",{expr:s})},_l=function(s){return c("loop",{statements:s})},kl=function(){return c("break",{})},aa=function(){return c("continue",{})},Pl=function(s,o,p){return o==="+="?c("addAssign",{dest:s,expr:p}):o==="-="?c("subAssign",{dest:s,expr:p}):c("assign",{dest:s,expr:p})},ia=function(s,o,p){return{op:o,term:p}},El=function(s,o){return c("infix",{operands:[s,...o.map(p=>p.term)],operators:o.map(p=>p.op)})},Ml=function(){return Y()},Sl=function(s){return c("not",{expr:s})},la=function(s,o){return{...s,chain:o}},Fl=function(s){return c("callChain",{args:s??[]})},oa=function(s,o){return o},Ol=function(s,o){return[s,...o]},Nl=function(s){return c("indexChain",{index:s})},Tl=function(s){return c("propChain",{name:s})},Il=function(s,o,p,u){return c("if",{cond:s,then:o,elseif:p??[],else:u})},jl=function(s,o){return[s,...o]},ua=function(s,o){return{cond:s,then:o}},Rl=function(s){return s},fa=function(s,o,p){return{q:o,a:p}},Dl=function(s,o,p){return c("match",{about:s,qs:o??[],default:p})},Ll=function(s){return c("block",{statements:s})},Bl=function(s){return c("exists",{identifier:s})},ca=function(s){return c("identifier",{name:s})},Hl=function(s){return c("tmpl",{tmpl:s})},ha=function(s){return s.join("")},pa=function(s){return s},Ul=function(s){return c("str",{value:s.join("")})},va=function(s){return s},ql=function(s){return c("str",{value:s.join("")})},zl=function(){return'"'},Wl=function(){return"'"},Vl=function(){return c("num",{value:parseFloat(Y())})},Kl=function(){return c("num",{value:parseFloat(Y())})},Jl=function(){return c("num",{value:parseInt(Y(),10)})},Zl=function(){return c("num",{value:parseInt(Y(),10)})},ga=function(){return c("bool",{value:!0})},Gl=function(){return c("bool",{value:!1})},da=function(){return c("null",{})},ya=function(s,o){return{k:s,v:o}},Ql=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return c("obj",{value:o})},wa=function(s){return s},Xl=function(s){return c("arr",{value:s})},Yl=function(s,o){return{name:s,argType:o}},ma=function(s,o){return[s,...o]},eo=function(s,o,p,u,g,v){return(s.length>0||p.length>0)&&lo("Cannot use spaces before or after the function name."),c("def",{name:o,expr:c("fn",{args:u??[],retType:g},v??[]),mut:!1,attr:[]})},$a=function(s,o,p){return c("fn",{args:s??[],retType:o},p??[])},xa=function(s){return s},to=function(s){return c("arr",{value:s})},ba=function(s,o){return{k:s,v:o}},ro=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return c("obj",{value:o})},so=function(s,o){return c("fnTypeSource",{args:s??[],result:o})},no=function(s,o){return[s,...o]},ao=function(s,o){return c("namedTypeSource",{name:s,inner:o})},io=function(s){return c("namedTypeSource",{name:s,inner:null})},i=function(){return Y()},W=function(){return Y()},Ds=function(s){return c("block",{statements:s??[]})},a=0,z=0,C=[{line:1,column:1}],O=0,jr=[],A=0,T={},Ls;if("startRule"in r){if(!(r.startRule in h))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=h[r.startRule]}function Y(){return t.substring(z,a)}function Ht(){return Hs(z,a)}function lo(s,o){throw o=o!==void 0?o:Hs(z,a),Ca(s,o)}function se(s,o){return{type:"literal",text:s,ignoreCase:o}}function Nt(s,o,p){return{type:"class",parts:s,inverted:o,ignoreCase:p}}function Bs(){return{type:"any"}}function S(){return{type:"end"}}function Aa(s){var o=C[s],p;if(o)return o;for(p=s-1;!C[p];)p--;for(o=C[p],o={line:o.line,column:o.column};pO&&(O=a,jr=[]),jr.push(s))}function Ca(s,o){return new Xo(s,null,null,o)}function oo(s,o,p){return new Xo(Xo.buildMessage(s,o),s,o,p)}function _a(){var s,o,p,u=a*77+0,g=T[u];if(g)return a=g.nextPos,g.result;for(s=a,o=[],p=ka();p!==e;)o.push(p),p=ka();return z=s,o=el(o),s=o,T[u]={nextPos:a,result:s},s}function ka(){var s,o,p=a*77+1,u=T[p];return u?(a=u.nextPos,u.result):(s=a,o=qs(),o!==e&&(z=s,o=tl()),s=o,s===e&&(s=a,o=En(),o!==e&&(z=s,o=rl()),s=o,s===e&&(s=uo(),s===e&&(t.length>a?(s=t.charAt(a),a++):(s=e,A===0&&M(rr))))),T[p]={nextPos:a,result:s},s)}function uo(){var s,o,p,u,g,v,m=a*77+2,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,2)===$?(o=$,a+=2):(o=e,A===0&&M(ki)),o!==e){for(p=[],u=a,g=a,A++,v=l(),A--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,v=l(),A--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);z=s,s=sl()}else a=s,s=e;if(s===e)if(s=a,t.substr(a,2)===b?(o=b,a+=2):(o=e,A===0&&M(vn)),o!==e){for(p=[],u=a,g=a,A++,t.substr(a,2)===k?(v=k,a+=2):(v=e,A===0&&M(wr)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,t.substr(a,2)===k?(v=k,a+=2):(v=e,A===0&&M(wr)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);t.substr(a,2)===k?(u=k,a+=2):(u=e,A===0&&M(wr)),u!==e?(z=s,s=sa()):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function os(){var s,o,p,u,g,v=a*77+3,m=T[v];if(m)return a=m.nextPos,m.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();for(p=xn(),p===e&&(p=null),u=[],g=f();g!==e;)u.push(g),g=f();return z=s,s=nl(p),T[v]={nextPos:a,result:s},s}function xn(){var s,o,p,u,g,v,m,w,_=a*77+4,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=Re(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Re(),w!==e?(z=u,u=mn(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Re(),w!==e?(z=u,u=mn(o,w)):(a=u,u=e)}else a=u,u=e}z=s,s=al(o,p)}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function bn(){var s,o,p,u,g,v,m,w,_=a*77+5,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=Rr(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Rr(),w!==e?(z=u,u=$n(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Rr(),w!==e?(z=u,u=$n(o,w)):(a=u,u=e)}else a=u,u=e}z=s,s=il(o,p)}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function fr(){var s,o,p,u,g,v,m,w,_=a*77+6,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=Dr(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Dr(),w!==e?(z=u,u=na(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ne(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=Dr(),w!==e?(z=u,u=na(o,w)):(a=u,u=e)}else a=u,u=e}z=s,s=ll(o,p)}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function Re(){var s,o=a*77+7,p=T[o];return p?(a=p.nextPos,p.result):(s=Ea(),s===e&&(s=fo(),s===e&&(s=Dr())),T[o]={nextPos:a,result:s},s)}function Rr(){var s,o=a*77+8,p=T[o];return p?(a=p.nextPos,p.result):(s=Ma(),s===e&&(s=Ut(),s===e&&(s=Ea())),T[o]={nextPos:a,result:s},s)}function Dr(){var s,o=a*77+9,p=T[o];return p?(a=p.nextPos,p.result):(s=Ma(),s===e&&(s=Ut(),s===e&&(s=co(),s===e&&(s=go(),s===e&&(s=ho(),s===e&&(s=po(),s===e&&(s=vo(),s===e&&(s=yo(),s===e&&(s=wo(),s===e&&(s=xr(),s===e&&(s=Sa(),s===e&&(s=Te()))))))))))),T[o]={nextPos:a,result:s},s)}function Te(){var s,o=a*77+10,p=T[o];return p?(a=p.nextPos,p.result):(s=mo(),s===e&&(s=us()),T[o]={nextPos:a,result:s},s)}function us(){var s,o=a*77+11,p=T[o];return p?(a=p.nextPos,p.result):(s=bo(),s===e&&(s=Eo(),s===e&&(s=Fa(),s===e&&(s=Pa()))),T[o]={nextPos:a,result:s},s)}function Pa(){var s,o,p,u,g,v,m=a*77+12,w=T[m];if(w)return a=w.nextPos,w.result;if(s=Na(),s===e&&(s=Ta(),s===e&&(s=Ia(),s===e&&(s=qs(),s===e&&(s=En(),s===e&&(s=La(),s===e&&(s=Ha(),s===e&&(s=Fn(),s===e&&(s=Ua(),s===e&&(s=Po(),s===e&&(s=$o(),s===e&&(s=ja(),s===e))))))))))))if(s=a,t.charCodeAt(a)===40?(o=E,a++):(o=e,A===0&&M(Pt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Te(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e?(z=s,s=ol(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function $r(){var s,o=a*77+13,p=T[o];return p?(a=p.nextPos,p.result):(s=La(),s===e&&(s=En(),s===e&&(s=Ha(),s===e&&(s=Mo(),s===e&&(s=So(),s===e&&(s=Fn()))))),T[o]={nextPos:a,result:s},s)}function Ea(){var s,o,p,u,g,v,m,w,_,P,I=a*77+14,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.substr(a,2)===j?(o=j,a+=2):(o=e,A===0&&M(sr)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ue(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(t.charCodeAt(a)===123?(v=D,a++):(v=e,A===0&&M(Ye)),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(w=bn(),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();t.charCodeAt(a)===125?(P=V,a++):(P=e,A===0&&M(Bt)),P!==e?(z=s,s=ul(u,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function fo(){var s,o,p,u,g,v,m=a*77+15,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,3)===pe?(o=pe,a+=3):(o=e,A===0&&M(Ir)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Ue(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();v=$r(),v!==e?(z=s,s=fl(u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===pe?(o=pe,a+=3):(o=e,A===0&&M(Ir)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();u=$r(),u!==e?(z=s,s=cl(u)):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Ma(){var s,o,p,u,g,v,m,w,_,P=a*77+16,I=T[P];if(I)return a=I.nextPos,I.result;if(s=a,t.substr(a,3)===ee?(o=ee,a+=3):(o=e,A===0&&M(dt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ue(),u!==e){for(g=a,v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===58?(m=ae,a++):(m=e,A===0&&M(yt)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();_=He(),_!==e?g=_:(a=g,g=e)}else a=g,g=e;for(g===e&&(g=null),v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===61?(m=_e,a++):(m=e,A===0&&M(ns)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();_=Te(),_!==e?(z=s,s=hl(u,g,_)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===H?(o=H,a+=3):(o=e,A===0&&M(Pi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ue(),u!==e){for(g=a,v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===58?(m=ae,a++):(m=e,A===0&&M(yt)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();_=He(),_!==e?g=_:(a=g,g=e)}else a=g,g=e;for(g===e&&(g=null),v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===61?(m=_e,a++):(m=e,A===0&&M(ns)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();_=Te(),_!==e?(z=s,s=pl(u,g,_)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return T[P]={nextPos:a,result:s},s}function co(){var s,o,p,u,g=a*77+17,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,2)===L?(o=L,a+=2):(o=e,A===0&&M(Ei)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();u=Te(),u!==e?(z=s,s=vl(u)):(a=s,s=e)}else a=s,s=e;return T[g]={nextPos:a,result:s},s}function ho(){var s,o,p,u,g,v,m,w=a*77+18,_=T[w];if(_)return a=_.nextPos,_.result;if(s=a,t.substr(a,2)===B?(o=B,a+=2):(o=e,A===0&&M(ks)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Ue(),u!==e){for(g=a,v=[],m=f();m!==e;)v.push(m),m=f();for(m=$r(),m!==e?g=m:(a=g,g=e),g===e&&(g=null),v=[],m=f();m!==e;)v.push(m),m=f();t.charCodeAt(a)===93?(m=q,a++):(m=e,A===0&&M(as)),m!==e?(z=s,s=gl(u,g)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return T[w]={nextPos:a,result:s},s}function po(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re=a*77+19,Ke=T[re];if(Ke)return a=Ke.nextPos,Ke.result;if(s=a,t.substr(a,4)===J?(o=J,a+=4):(o=e,A===0&&M(mt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=E,a++):(u=e,A===0&&M(Pt)),u!==e)if(t.substr(a,3)===ee?(g=ee,a+=3):(g=e,A===0&&M(dt)),g!==e){if(v=[],m=f(),m!==e)for(;m!==e;)v.push(m),m=f();else v=e;if(v!==e)if(m=Ue(),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();for(t.charCodeAt(a)===44?(_=G,a++):(_=e,A===0&&M(pt)),_===e&&(_=null),P=[],I=f();I!==e;)P.push(I),I=f();if(I=Te(),I!==e)if(t.charCodeAt(a)===41?(R=F,a++):(R=e,A===0&&M(mr)),R!==e){for(Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();ye=xe(),ye!==e?(z=s,s=dl(m,I,ye)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,4)===J?(o=J,a+=4):(o=e,A===0&&M(mt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,A===0&&M(dt)),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();if(P=Te(),P!==e){if(I=[],R=f(),R!==e)for(;R!==e;)I.push(R),R=f();else I=e;I!==e?(R=xe(),R!==e?(z=s,s=yl(v,P,R)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return T[re]={nextPos:a,result:s},s}function vo(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re,Ke=a*77+20,Je=T[Ke];if(Je)return a=Je.nextPos,Je.result;if(s=a,t.substr(a,3)===Q?(o=Q,a+=3):(o=e,A===0&&M(Ps)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=E,a++):(u=e,A===0&&M(Pt)),u!==e)if(t.substr(a,3)===ee?(g=ee,a+=3):(g=e,A===0&&M(dt)),g!==e){if(v=[],m=f(),m!==e)for(;m!==e;)v.push(m),m=f();else v=e;if(v!==e)if(m=Ue(),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();if(_=a,t.charCodeAt(a)===61?(P=_e,a++):(P=e,A===0&&M(ns)),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();R=Te(),R!==e?(z=_,_=wl(m,R)):(a=_,_=e)}else a=_,_=e;for(_===e&&(_=null),t.charCodeAt(a)===44?(P=G,a++):(P=e,A===0&&M(pt)),P===e&&(P=null),I=[],R=f();R!==e;)I.push(R),R=f();if(R=Te(),R!==e)if(t.charCodeAt(a)===41?(Z=F,a++):(Z=e,A===0&&M(mr)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();re=xe(),re!==e?(z=s,s=ml(m,_,R,re)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===Q?(o=Q,a+=3):(o=e,A===0&&M(Ps)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,A===0&&M(dt)),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(w=a,t.charCodeAt(a)===61?(_=_e,a++):(_=e,A===0&&M(ns)),_!==e){for(P=[],I=f();I!==e;)P.push(I),I=f();I=Te(),I!==e?(z=w,w=$l(v,I)):(a=w,w=e)}else a=w,w=e;for(w===e&&(w=null),t.charCodeAt(a)===44?(_=G,a++):(_=e,A===0&&M(pt)),_===e&&(_=null),P=[],I=f();I!==e;)P.push(I),I=f();if(I=Te(),I!==e){if(R=[],Z=f(),Z!==e)for(;Z!==e;)R.push(Z),Z=f();else R=e;R!==e?(Z=xe(),Z!==e?(z=s,s=xl(v,w,I,Z)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===Q?(o=Q,a+=3):(o=e,A===0&&M(Ps)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=E,a++):(u=e,A===0&&M(Pt)),u!==e)if(g=Te(),g!==e)if(t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();w=xe(),w!==e?(z=s,s=bl(g,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===Q?(o=Q,a+=3):(o=e,A===0&&M(Ps)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Te(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;g!==e?(v=xe(),v!==e?(z=s,s=Al(u,v)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e}}return T[Ke]={nextPos:a,result:s},s}function go(){var s,o,p,u,g,v=a*77+21,m=T[v];if(m)return a=m.nextPos,m.result;if(s=a,t.substr(a,6)===X?(o=X,a+=6):(o=e,A===0&&M(or)),o!==e)if(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();g=Te(),g!==e?(z=s,s=Cl(g)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return T[v]={nextPos:a,result:s},s}function yo(){var s,o,p,u,g,v,m,w,_=a*77+22,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,t.substr(a,4)===$e?(o=$e,a+=4):(o=e,A===0&&M(Mi)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=D,a++):(u=e,A===0&&M(Ye)),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();if(v=fr(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();t.charCodeAt(a)===125?(w=V,a++):(w=e,A===0&&M(Bt)),w!==e?(z=s,s=_l(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function wo(){var s,o,p,u,g=a*77+23,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===ke?(o=ke,a+=5):(o=e,A===0&&M(Si)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=kl()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function xr(){var s,o,p,u,g=a*77+24,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,8)===ge?(o=ge,a+=8):(o=e,A===0&&M(Fi)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=aa()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function Sa(){var s,o,p,u,g,v,m=a*77+25,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=Te(),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.substr(a,2)===qe?(u=qe,a+=2):(u=e,A===0&&M(Oi)),u===e&&(t.substr(a,2)===it?(u=it,a+=2):(u=e,A===0&&M(Jn)),u===e&&(t.charCodeAt(a)===61?(u=_e,a++):(u=e,A===0&&M(ns)))),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();v=Te(),v!==e?(z=s,s=Pl(o,u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function mo(){var s,o,p,u,g,v,m,w,_=a*77+26,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=us(),o!==e){for(p=[],u=a,g=[],v=br();v!==e;)g.push(v),v=br();if(v=An(),v!==e){for(m=[],w=br();w!==e;)m.push(w),w=br();w=us(),w!==e?(z=u,u=ia(o,v,w)):(a=u,u=e)}else a=u,u=e;if(u!==e)for(;u!==e;){for(p.push(u),u=a,g=[],v=br();v!==e;)g.push(v),v=br();if(v=An(),v!==e){for(m=[],w=br();w!==e;)m.push(w),w=br();w=us(),w!==e?(z=u,u=ia(o,v,w)):(a=u,u=e)}else a=u,u=e}else p=e;p!==e?(z=s,s=El(o,p)):(a=s,s=e)}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function br(){var s,o,p,u=a*77+27,g=T[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===92?(o=Zt,a++):(o=e,A===0&&M(Zn)),o!==e?(p=ne(),p!==e?(o=[o,p],s=o):(a=s,s=e)):(a=s,s=e),s===e&&(s=y()),T[u]={nextPos:a,result:s},s)}function An(){var s,o,p=a*77+28,u=T[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===lt?(o=lt,a+=2):(o=e,A===0&&M(Ni)),o===e&&(t.substr(a,2)===ot?(o=ot,a+=2):(o=e,A===0&&M(Ti)),o===e&&(t.substr(a,2)===Ie?(o=Ie,a+=2):(o=e,A===0&&M(Ii)),o===e&&(t.substr(a,2)===at?(o=at,a+=2):(o=e,A===0&&M(ji)),o===e&&(t.substr(a,2)===Mt?(o=Mt,a+=2):(o=e,A===0&&M(Ri)),o===e&&(t.substr(a,2)===St?(o=St,a+=2):(o=e,A===0&&M(Gn)),o===e&&(t.charCodeAt(a)===60?(o=Qe,a++):(o=e,A===0&&M(gn)),o===e&&(t.charCodeAt(a)===62?(o=Fr,a++):(o=e,A===0&&M(Qn)),o===e&&(t.charCodeAt(a)===43?(o=Dt,a++):(o=e,A===0&&M(Di)),o===e&&(t.charCodeAt(a)===45?(o=yr,a++):(o=e,A===0&&M(Xn)),o===e&&(t.charCodeAt(a)===42?(o=kt,a++):(o=e,A===0&&M(Yn)),o===e&&(t.charCodeAt(a)===94?(o=dr,a++):(o=e,A===0&&M(Li)),o===e&&(t.charCodeAt(a)===47?(o=Or,a++):(o=e,A===0&&M(Bi)),o===e&&(t.charCodeAt(a)===37?(o=_r,a++):(o=e,A===0&&M(Hi))))))))))))))),o!==e&&(z=s,o=Ml()),s=o,T[p]={nextPos:a,result:s},s)}function $o(){var s,o,p,u=a*77+29,g=T[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===33?(o=Er,a++):(o=e,A===0&&M(dn)),o!==e?(p=Te(),p!==e?(z=s,s=Sl(p)):(a=s,s=e)):(a=s,s=e),T[u]={nextPos:a,result:s},s)}function Fa(){var s,o,p,u,g=a*77+30,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,o=Pa(),o!==e){if(p=[],u=Cn(),u===e&&(u=Oa(),u===e&&(u=Us())),u!==e)for(;u!==e;)p.push(u),u=Cn(),u===e&&(u=Oa(),u===e&&(u=Us()));else p=e;p!==e?(z=s,s=la(o,p)):(a=s,s=e)}else a=s,s=e;return T[g]={nextPos:a,result:s},s}function Cn(){var s,o,p,u,g,v,m=a*77+31,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===40?(o=E,a++):(o=e,A===0&&M(Pt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=xo(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e?(z=s,s=Fl(u)):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function xo(){var s,o,p,u,g,v,m=a*77+32,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=Te(),o!==e){for(p=[],u=a,g=x(),g!==e?(v=Te(),v!==e?(z=u,u=oa(o,v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=x(),g!==e?(v=Te(),v!==e?(z=u,u=oa(o,v)):(a=u,u=e)):(a=u,u=e);z=s,s=Ol(o,p)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Oa(){var s,o,p,u,g,v,m=a*77+33,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===91?(o=Ft,a++):(o=e,A===0&&M(is)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Te(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=q,a++):(v=e,A===0&&M(as)),v!==e?(z=s,s=Nl(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Us(){var s,o,p,u=a*77+34,g=T[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===46?(o=U,a++):(o=e,A===0&&M(yn)),o!==e?(p=Ue(),p!==e?(z=s,s=Tl(p)):(a=s,s=e)):(a=s,s=e),T[u]={nextPos:a,result:s},s)}function bo(){var s,o,p,u,g,v,m,w,_,P,I=a*77+35,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.substr(a,2)===K?(o=K,a+=2):(o=e,A===0&&M(Ui)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Te(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=xe(),v!==e){if(m=a,w=[],_=f(),_!==e)for(;_!==e;)w.push(_),_=f();else w=e;if(w!==e?(_=Ao(),_!==e?m=_:(a=m,m=e)):(a=m,m=e),m===e&&(m=null),w=a,_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;_!==e?(P=Co(),P!==e?w=P:(a=w,w=e)):(a=w,w=e),w===e&&(w=null),z=s,s=Il(u,v,m,w)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function Ao(){var s,o,p,u,g,v,m=a*77+36,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=_n(),o!==e){for(p=[],u=a,g=[],v=f();v!==e;)g.push(v),v=f();for(v=_n(),v!==e?u=v:(a=u,u=e);u!==e;){for(p.push(u),u=a,g=[],v=f();v!==e;)g.push(v),v=f();v=_n(),v!==e?u=v:(a=u,u=e)}z=s,s=jl(o,p)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function _n(){var s,o,p,u,g,v,m,w=a*77+37,_=T[w];if(_)return a=_.nextPos,_.result;if(s=a,t.substr(a,4)===te?(o=te,a+=4):(o=e,A===0&&M(qi)),o!==e)if(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();if(g=Te(),g!==e){for(v=[],m=f();m!==e;)v.push(m),m=f();m=xe(),m!==e?(z=s,s=ua(g,m)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e;return T[w]={nextPos:a,result:s},s}function Co(){var s,o,p,u,g,v=a*77+38,m=T[v];if(m)return a=m.nextPos,m.result;if(s=a,t.substr(a,4)===ce?(o=ce,a+=4):(o=e,A===0&&M(zi)),o!==e)if(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();g=xe(),g!==e?(z=s,s=Rl(g)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return T[v]={nextPos:a,result:s},s}function Na(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re,Ke,Je,Nn=a*77+39,fs=T[Nn];if(fs)return a=fs.nextPos,fs.result;if(s=a,t.substr(a,5)===he?(o=he,a+=5):(o=e,A===0&&M(Es)),o!==e)if(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();if(g=Te(),g!==e){for(v=[],m=f();m!==e;)v.push(m),m=f();if(t.charCodeAt(a)===123?(m=D,a++):(m=e,A===0&&M(Ye)),m!==e){for(w=[],_=f();_!==e;)w.push(_),_=f();if(_=[],P=a,I=Te(),I!==e){for(R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.substr(a,2)===ie?(Z=ie,a+=2):(Z=e,A===0&&M(Ms)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();if(re=xe(),re!==e){for(Ke=[],Je=f();Je!==e;)Ke.push(Je),Je=f();z=P,P=fa(g,I,re)}else a=P,P=e}else a=P,P=e}else a=P,P=e;if(P!==e)for(;P!==e;)if(_.push(P),P=a,I=Te(),I!==e){for(R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.substr(a,2)===ie?(Z=ie,a+=2):(Z=e,A===0&&M(Ms)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();if(re=xe(),re!==e){for(Ke=[],Je=f();Je!==e;)Ke.push(Je),Je=f();z=P,P=fa(g,I,re)}else a=P,P=e}else a=P,P=e}else a=P,P=e;else _=e;if(_!==e){if(P=a,t.charCodeAt(a)===42?(I=kt,a++):(I=e,A===0&&M(Yn)),I!==e){for(R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.substr(a,2)===ie?(Z=ie,a+=2):(Z=e,A===0&&M(Ms)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();if(re=xe(),re!==e){for(Ke=[],Je=f();Je!==e;)Ke.push(Je),Je=f();P=re}else a=P,P=e}else a=P,P=e}else a=P,P=e;for(P===e&&(P=null),I=[],R=f();R!==e;)I.push(R),R=f();t.charCodeAt(a)===125?(R=V,a++):(R=e,A===0&&M(Bt)),R!==e?(z=s,s=Dl(g,_,P)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;else a=s,s=e;return T[Nn]={nextPos:a,result:s},s}function Ta(){var s,o,p,u,g,v,m,w,_=a*77+40,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,t.substr(a,4)===Ne?(o=Ne,a+=4):(o=e,A===0&&M(Ss)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=D,a++):(u=e,A===0&&M(Ye)),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();if(v=fr(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();t.charCodeAt(a)===125?(w=V,a++):(w=e,A===0&&M(Bt)),w!==e?(z=s,s=Ll(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[_]={nextPos:a,result:s},s}function Ia(){var s,o,p,u,g=a*77+41,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,6)===de?(o=de,a+=6):(o=e,A===0&&M(Wi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;p!==e?(u=ja(),u!==e?(z=s,s=Bl(u)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;return T[g]={nextPos:a,result:s},s}function ja(){var s,o,p=a*77+42,u=T[p];return u?(a=u.nextPos,u.result):(s=a,o=za(),o!==e&&(z=s,o=ca(o)),s=o,T[p]={nextPos:a,result:s},s)}function qs(){var s,o,p,u,g,v,m=a*77+43,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===96?(o=we,a++):(o=e,A===0&&M(Fs)),o!==e){for(p=[],u=a,g=a,A++,t.charCodeAt(a)===96?(v=we,a++):(v=e,A===0&&M(Fs)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=kn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,t.charCodeAt(a)===96?(v=we,a++):(v=e,A===0&&M(Fs)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=kn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===96?(u=we,a++):(u=e,A===0&&M(Fs)),u!==e?(z=s,s=Hl(p)):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function kn(){var s,o,p,u,g,v,m=a*77+44,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=D,a++):(o=e,A===0&&M(Ye)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Te(),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();t.charCodeAt(a)===125?(v=V,a++):(v=e,A===0&&M(Bt)),v!==e?s=u:(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,o=[],p=Pn(),p!==e)for(;p!==e;)o.push(p),p=Pn();else o=e;o!==e&&(z=s,o=ha(o)),s=o}return T[m]={nextPos:a,result:s},s}function Pn(){var s,o=a*77+45,p=T[o];return p?(a=p.nextPos,p.result):(s=Ra(),s===e&&(_s.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,A===0&&M(Os))),T[o]={nextPos:a,result:s},s)}function Ra(){var s,o,p,u=a*77+46,g=T[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===92?(o=Zt,a++):(o=e,A===0&&M(Zn)),o!==e?(Wr.test(t.charAt(a))?(p=t.charAt(a),a++):(p=e,A===0&&M(Ns)),p!==e?s=p:(a=s,s=e)):(a=s,s=e),T[u]={nextPos:a,result:s},s)}function En(){var s,o,p,u,g,v,m=a*77+47,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===34?(o=ue,a++):(o=e,A===0&&M(Ts)),o!==e){for(p=[],u=a,g=a,A++,t.charCodeAt(a)===34?(v=ue,a++):(v=e,A===0&&M(Ts)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Da(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr))),v!==e?(z=u,u=pa(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,t.charCodeAt(a)===34?(v=ue,a++):(v=e,A===0&&M(Ts)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Da(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr))),v!==e?(z=u,u=pa(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===34?(u=ue,a++):(u=e,A===0&&M(Ts)),u!==e?(z=s,s=Ul(p)):(a=s,s=e)}else a=s,s=e;if(s===e)if(s=a,t.charCodeAt(a)===39?(o=De,a++):(o=e,A===0&&M(Is)),o!==e){for(p=[],u=a,g=a,A++,t.charCodeAt(a)===39?(v=De,a++):(v=e,A===0&&M(Is)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Mn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr))),v!==e?(z=u,u=va(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,A++,t.charCodeAt(a)===39?(v=De,a++):(v=e,A===0&&M(Is)),A--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Mn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,A===0&&M(rr))),v!==e?(z=u,u=va(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===39?(u=De,a++):(u=e,A===0&&M(Is)),u!==e?(z=s,s=ql(p)):(a=s,s=e)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Da(){var s,o,p=a*77+48,u=T[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===je?(o=je,a+=2):(o=e,A===0&&M(js)),o!==e&&(z=s,o=zl()),s=o,T[p]={nextPos:a,result:s},s)}function Mn(){var s,o,p=a*77+49,u=T[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Be?(o=Be,a+=2):(o=e,A===0&&M(ea)),o!==e&&(z=s,o=Wl()),s=o,T[p]={nextPos:a,result:s},s)}function La(){var s,o=a*77+50,p=T[o];return p?(a=p.nextPos,p.result):(s=_o(),s===e&&(s=Ba()),T[o]={nextPos:a,result:s},s)}function _o(){var s,o,p,u,g,v,m=a*77+51,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,Ot.test(t.charAt(a))?(t.charAt(a),a++):A===0&&M(Et),ht.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(ta)),o!==e){if(p=[],It.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(nr)),u!==e)for(;u!==e;)p.push(u),It.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(nr));else p=e;if(p!==e)if(t.charCodeAt(a)===46?(u=U,a++):(u=e,A===0&&M(yn)),u!==e){if(g=[],It.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,A===0&&M(nr)),v!==e)for(;v!==e;)g.push(v),It.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,A===0&&M(nr));else g=e;g!==e?(z=s,s=Vl()):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,Ot.test(t.charAt(a))?(t.charAt(a),a++):A===0&&M(Et),It.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(nr)),o!==e)if(t.charCodeAt(a)===46?(p=U,a++):(p=e,A===0&&M(yn)),p!==e){if(u=[],It.test(t.charAt(a))?(g=t.charAt(a),a++):(g=e,A===0&&M(nr)),g!==e)for(;g!==e;)u.push(g),It.test(t.charAt(a))?(g=t.charAt(a),a++):(g=e,A===0&&M(nr));else u=e;u!==e?(z=s,s=Kl()):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Ba(){var s,o,p,u,g=a*77+52,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,Ot.test(t.charAt(a))?(t.charAt(a),a++):A===0&&M(Et),ht.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(ta)),o!==e){if(p=[],It.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(nr)),u!==e)for(;u!==e;)p.push(u),It.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(nr));else p=e;p!==e?(z=s,s=Jl()):(a=s,s=e)}else a=s,s=e;return s===e&&(s=a,Ot.test(t.charAt(a))?(t.charAt(a),a++):A===0&&M(Et),It.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(nr)),o!==e?(z=s,s=Zl()):(a=s,s=e)),T[g]={nextPos:a,result:s},s}function Ha(){var s,o=a*77+53,p=T[o];return p?(a=p.nextPos,p.result):(s=ko(),s===e&&(s=Sn()),T[o]={nextPos:a,result:s},s)}function ko(){var s,o,p,u,g=a*77+54,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===We?(o=We,a+=4):(o=e,A===0&&M(Vi)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=ga()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function Sn(){var s,o,p,u,g=a*77+55,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===Ze?(o=Ze,a+=5):(o=e,A===0&&M(Rs)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=Gl()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function Fn(){var s,o,p,u,g=a*77+56,v=T[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===rt?(o=rt,a+=4):(o=e,A===0&&M(Ki)),o!==e?(p=a,A++,Gt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ur)),A--,u===e?p=void 0:(a=p,p=e),p!==e?(z=s,s=da()):(a=s,s=e)):(a=s,s=e),T[g]={nextPos:a,result:s},s)}function Ua(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re=a*77+57,Ke=T[re];if(Ke)return a=Ke.nextPos,Ke.result;if(s=a,t.charCodeAt(a)===123?(o=D,a++):(o=e,A===0&&M(Ye)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.charCodeAt(a)===58?(w=ae,a++):(w=e,A===0&&M(yt)),w!==e){if(_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;if(_!==e)if(P=Te(),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();for(t.charCodeAt(a)===44?(R=G,a++):(R=e,A===0&&M(pt)),R===e&&(t.charCodeAt(a)===59?(R=st,a++):(R=e,A===0&&M(ls))),R===e&&(R=null),Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();z=g,g=ya(v,P)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.charCodeAt(a)===58?(w=ae,a++):(w=e,A===0&&M(yt)),w!==e){if(_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;if(_!==e)if(P=Te(),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();for(t.charCodeAt(a)===44?(R=G,a++):(R=e,A===0&&M(pt)),R===e&&(t.charCodeAt(a)===59?(R=st,a++):(R=e,A===0&&M(ls))),R===e&&(R=null),Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();z=g,g=ya(v,P)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;t.charCodeAt(a)===125?(g=V,a++):(g=e,A===0&&M(Bt)),g!==e?(z=s,s=Ql(u)):(a=s,s=e)}else a=s,s=e;return T[re]={nextPos:a,result:s},s}function Po(){var s,o,p,u,g,v,m,w,_,P,I=a*77+58,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.charCodeAt(a)===91?(o=Ft,a++):(o=e,A===0&&M(is)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=Te(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();z=g,g=wa(v)}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=Te(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();z=g,g=wa(v)}else a=g,g=e;for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=q,a++):(v=e,A===0&&M(as)),v!==e?(z=s,s=Xl(u)):(a=s,s=e)}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function On(){var s,o,p,u,g,v,m,w=a*77+59,_=T[w];if(_)return a=_.nextPos,_.result;if(s=a,o=Ue(),o!==e){for(p=a,u=[],g=f();g!==e;)u.push(g),g=f();if(t.charCodeAt(a)===58?(g=ae,a++):(g=e,A===0&&M(yt)),g!==e){for(v=[],m=f();m!==e;)v.push(m),m=f();m=He(),m!==e?p=m:(a=p,p=e)}else a=p,p=e;p===e&&(p=null),z=s,s=Yl(o,p)}else a=s,s=e;return T[w]={nextPos:a,result:s},s}function qa(){var s,o,p,u,g,v,m=a*77+60,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=On(),o!==e){for(p=[],u=a,g=x(),g!==e?(v=On(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=x(),g!==e?(v=On(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);z=s,s=ma(o,p)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Ut(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re,Ke,Je,Nn=a*77+61,fs=T[Nn];if(fs)return a=fs.nextPos,fs.result;if(s=a,t.charCodeAt(a)===64?(o=wt,a++):(o=e,A===0&&M(Ji)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Ue(),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();if(t.charCodeAt(a)===40?(v=E,a++):(v=e,A===0&&M(Pt)),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(w=qa(),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();if(t.charCodeAt(a)===41?(P=F,a++):(P=e,A===0&&M(mr)),P!==e){for(I=a,R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.charCodeAt(a)===58?(Z=ae,a++):(Z=e,A===0&&M(yt)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();re=He(),re!==e?I=re:(a=I,I=e)}else a=I,I=e;for(I===e&&(I=null),R=[],Z=f();Z!==e;)R.push(Z),Z=f();if(t.charCodeAt(a)===123?(Z=D,a++):(Z=e,A===0&&M(Ye)),Z!==e){for(ye=[],re=f();re!==e;)ye.push(re),re=f();for(re=fr(),re===e&&(re=null),Ke=[],Je=f();Je!==e;)Ke.push(Je),Je=f();t.charCodeAt(a)===125?(Je=V,a++):(Je=e,A===0&&M(Bt)),Je!==e?(z=s,s=eo(p,u,g,w,I,re)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[Nn]={nextPos:a,result:s},s}function Eo(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye=a*77+62,re=T[ye];if(re)return a=re.nextPos,re.result;if(s=a,t.substr(a,2)===Lt?(o=Lt,a+=2):(o=e,A===0&&M(wn)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=qa(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();if(t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e){for(m=a,w=[],_=f();_!==e;)w.push(_),_=f();if(t.charCodeAt(a)===58?(_=ae,a++):(_=e,A===0&&M(yt)),_!==e){for(P=[],I=f();I!==e;)P.push(I),I=f();I=He(),I!==e?m=I:(a=m,m=e)}else a=m,m=e;for(m===e&&(m=null),w=[],_=f();_!==e;)w.push(_),_=f();if(t.charCodeAt(a)===123?(_=D,a++):(_=e,A===0&&M(Ye)),_!==e){for(P=[],I=f();I!==e;)P.push(I),I=f();for(I=fr(),I===e&&(I=null),R=[],Z=f();Z!==e;)R.push(Z),Z=f();t.charCodeAt(a)===125?(Z=V,a++):(Z=e,A===0&&M(Bt)),Z!==e?(z=s,s=$a(u,m,I)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[ye]={nextPos:a,result:s},s}function Mo(){var s,o,p,u,g,v,m,w,_,P,I=a*77+63,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.charCodeAt(a)===91?(o=Ft,a++):(o=e,A===0&&M(is)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=$r(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();z=g,g=xa(v)}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=$r(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();for(t.charCodeAt(a)===44?(w=G,a++):(w=e,A===0&&M(pt)),w===e&&(w=null),_=[],P=f();P!==e;)_.push(P),P=f();z=g,g=xa(v)}else a=g,g=e;for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=q,a++):(v=e,A===0&&M(as)),v!==e?(z=s,s=to(u)):(a=s,s=e)}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function So(){var s,o,p,u,g,v,m,w,_,P,I,R,Z,ye,re=a*77+64,Ke=T[re];if(Ke)return a=Ke.nextPos,Ke.result;if(s=a,t.charCodeAt(a)===123?(o=D,a++):(o=e,A===0&&M(Ye)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.charCodeAt(a)===58?(w=ae,a++):(w=e,A===0&&M(yt)),w!==e){if(_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;if(_!==e)if(P=$r(),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();for(t.charCodeAt(a)===44?(R=G,a++):(R=e,A===0&&M(pt)),R===e&&(t.charCodeAt(a)===59?(R=st,a++):(R=e,A===0&&M(ls))),R===e&&(R=null),Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();z=g,g=ba(v,P)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=Ue(),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.charCodeAt(a)===58?(w=ae,a++):(w=e,A===0&&M(yt)),w!==e){if(_=[],P=f(),P!==e)for(;P!==e;)_.push(P),P=f();else _=e;if(_!==e)if(P=$r(),P!==e){for(I=[],R=f();R!==e;)I.push(R),R=f();for(t.charCodeAt(a)===44?(R=G,a++):(R=e,A===0&&M(pt)),R===e&&(t.charCodeAt(a)===59?(R=st,a++):(R=e,A===0&&M(ls))),R===e&&(R=null),Z=[],ye=f();ye!==e;)Z.push(ye),ye=f();z=g,g=ba(v,P)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;t.charCodeAt(a)===125?(g=V,a++):(g=e,A===0&&M(Bt)),g!==e?(z=s,s=ro(u)):(a=s,s=e)}else a=s,s=e;return T[re]={nextPos:a,result:s},s}function He(){var s,o=a*77+65,p=T[o];return p?(a=p.nextPos,p.result):(s=Fo(),s===e&&(s=Tt()),T[o]={nextPos:a,result:s},s)}function Fo(){var s,o,p,u,g,v,m,w,_,P,I=a*77+66,R=T[I];if(R)return a=R.nextPos,R.result;if(s=a,t.substr(a,2)===Lt?(o=Lt,a+=2):(o=e,A===0&&M(wn)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Lr(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();if(t.charCodeAt(a)===41?(v=F,a++):(v=e,A===0&&M(mr)),v!==e){for(m=[],w=f();w!==e;)m.push(w),w=f();if(t.substr(a,2)===ie?(w=ie,a+=2):(w=e,A===0&&M(Ms)),w!==e){for(_=[],P=f();P!==e;)_.push(P),P=f();P=He(),P!==e?(z=s,s=so(u,P)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return T[I]={nextPos:a,result:s},s}function Lr(){var s,o,p,u,g,v,m=a*77+67,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=He(),o!==e){for(p=[],u=a,g=x(),g!==e?(v=He(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=x(),g!==e?(v=He(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);z=s,s=no(o,p)}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function Tt(){var s,o,p,u,g,v,m,w,_=a*77+68,P=T[_];if(P)return a=P.nextPos,P.result;if(s=a,o=Ue(),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(t.charCodeAt(a)===60?(u=Qe,a++):(u=e,A===0&&M(gn)),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();if(v=He(),v!==e){for(m=[],w=y();w!==e;)m.push(w),w=y();t.charCodeAt(a)===62?(w=Fr,a++):(w=e,A===0&&M(Qn)),w!==e?(z=s,s=ao(o,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return s===e&&(s=a,o=Ue(),o!==e&&(z=s,o=io(o)),s=o),T[_]={nextPos:a,result:s},s}function Ue(){var s,o,p,u,g=a*77+69,v=T[g];if(v)return a=v.nextPos,v.result;if(s=a,Vn.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,A===0&&M(Zi)),o!==e){for(p=[],Kn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ra));u!==e;)p.push(u),Kn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,A===0&&M(ra));z=s,s=i()}else a=s,s=e;return T[g]={nextPos:a,result:s},s}function za(){var s,o,p,u,g,v,m=a*77+70,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,o=Ue(),o!==e){for(p=[],u=a,t.charCodeAt(a)===58?(g=ae,a++):(g=e,A===0&&M(yt)),g!==e?(v=Ue(),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,t.charCodeAt(a)===58?(g=ae,a++):(g=e,A===0&&M(yt)),g!==e?(v=Ue(),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);z=s,s=W()}else a=s,s=e;return T[m]={nextPos:a,result:s},s}function x(){var s,o,p,u,g,v=a*77+71,m=T[v];if(m)return a=m.nextPos,m.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();if(t.charCodeAt(a)===44?(p=G,a++):(p=e,A===0&&M(pt)),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();o=[o,p,u],s=o}else a=s,s=e;if(s===e)if(s=[],o=f(),o!==e)for(;o!==e;)s.push(o),o=f();else s=e;return T[v]={nextPos:a,result:s},s}function xe(){var s,o,p,u,g,v,m=a*77+72,w=T[m];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=D,a++):(o=e,A===0&&M(Ye)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=fr(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===125?(v=V,a++):(v=e,A===0&&M(Bt)),v!==e?(z=s,s=Ds(u)):(a=s,s=e)}else a=s,s=e;return s===e&&(s=Dr()),T[m]={nextPos:a,result:s},s}function ne(){var s,o=a*77+73,p=T[o];return p?(a=p.nextPos,p.result):(t.substr(a,2)===xt?(s=xt,a+=2):(s=e,A===0&&M(Gi)),s===e&&(Ci.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,A===0&&M(Qi))),T[o]={nextPos:a,result:s},s)}function l(){var s,o,p=a*77+74,u=T[p];return u?(a=u.nextPos,u.result):(s=a,A++,t.length>a?(o=t.charAt(a),a++):(o=e,A===0&&M(rr)),A--,o===e?s=void 0:(a=s,s=e),s===e&&(s=ne()),T[p]={nextPos:a,result:s},s)}function f(){var s,o=a*77+75,p=T[o];return p?(a=p.nextPos,p.result):(_i.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,A===0&&M(Xi)),T[o]={nextPos:a,result:s},s)}function y(){var s,o=a*77+76,p=T[o];return p?(a=p.nextPos,p.result):(tr.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,A===0&&M(Yi)),T[o]={nextPos:a,result:s},s)}function c(s,o,p){const u={type:s};o.children=p;for(const v of Object.keys(o))o[v]!==void 0&&(u[v]=o[v]);const g=Ht();return u.loc={start:g.start.offset,end:g.end.offset-1},u}if(Ls=d(),Ls!==e&&a===t.length)return Ls;throw Ls!==e&&a`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>If(n)).join(", "),e=If(t.result);return`@(${r}) { ${e} }`}}}function ku(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return yv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=ku(t.inner):r=yv("any"),L$(t.name,[r])}}throw new nu(`Unknown type: '${If(t)}'`)}else{const r=t.args.map(e=>ku(e));return B$(r,ku(t.result))}}function H$(t){switch(t.type){case"def":{t.varType!=null&&ku(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&ku(r.argType);t.retType!=null&&ku(t.retType);break}}return t}function U$(t){for(const r of t)tt(r,H$);return t}function jf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=jf(n.expr.children)),r.push(n);else{if(e.length>0)throw new nu("invalid attribute.");switch(n.type){case"fn":{n.children=jf(n.children);break}case"block":{n.statements=jf(n.statements);break}}r.push(n)}if(e.length>0)throw new nu("invalid attribute.");return r}function q$(t){if(N$(t)&&Wg(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const h of r)switch(h.type){case"callChain":{n=T$(n,h.args,h.loc);break}case"indexChain":{n=I$(n,h.index,h.loc);break}case"propChain":{n=j$(n,h.name,h.loc);break}}return n}return t}function z$(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:Uo(t.left),right:Uo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:Uo(t.left),right:Uo(t.right)}),priority:3}};function V$(t){const r=t.operators.map(n=>{const h=W$[n];if(h==null)throw new nu(`No such operator: ${n}.`);return h});let e=Rf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?V$(e):e);return t}var Ja;let J$=(Ja=class{constructor(){me(this,"plugins");this.plugins={validate:[D$,U$],transform:[jf,z$,K$]}}static parse(r){return Ja.instance==null&&(Ja.instance=new Ja),Ja.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=dv(r,{startRule:"Preprocess"});e=dv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new nu(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`,n):new nu(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`,n):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}},me(Ja,"instance"),Ja);const Z$="0.16.0",G$={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`};let Ch=[],qu=null;function Q$(t){return Ch=J$.parse(t),JSON.stringify(Ch,null," ")}async function X$(t){qu==null||qu.abort(),qu=new ss({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:xh(r,!0),print:!0})},err:t.err,log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:xh(e.val,!0),print:!1});break}}});try{await qu.exec(Ch)}catch(r){t.err(r)}}const Y$=Object.freeze(Object.defineProperty({__proto__:null,exec:X$,parse:Q$,samples:G$,version:Z$},Symbol.toStringTag,{value:"Module"}));function Df(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Df=function(e){return typeof e}:Df=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Df(t)}function Kg(t,r,e){var n=e.value;if(typeof n!="function")throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(Df(n)));var h=!1;return{configurable:!0,get:function(){if(h||this===t.prototype||this.hasOwnProperty(r)||typeof n!="function")return n;var $=n.bind(this);return h=!0,Object.defineProperty(this,r,{configurable:!0,get:function(){return $},set:function(k){n=k,delete this[r]}}),h=!1,$},set:function($){n=$}}}function ex(t){var r;return typeof Reflect<"u"&&typeof Reflect.ownKeys=="function"?r=Reflect.ownKeys(t.prototype):(r=Object.getOwnPropertyNames(t.prototype),typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t.prototype)))),r.forEach(function(e){if(e!=="constructor"){var n=Object.getOwnPropertyDescriptor(t.prototype,e);typeof n.value=="function"&&Object.defineProperty(t.prototype,e,Kg(t,e,n))}}),t}function ct(){return arguments.length===1?ex.apply(void 0,arguments):Kg.apply(void 0,arguments)}let Jg=class Zg extends Error{constructor(e,n){super(e);me(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,Zg)}},au=class extends Jg{constructor(r,e){super(r,e)}},Yt=class extends Jg{constructor(r,e){super(r,e)}},tx=class extends Yt{constructor(r,e){super(r,e)}};var uu=globalThis&&globalThis.__decorate||function(t,r,e,n){var h=arguments.length,d=h<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var b=t.length-1;b>=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};let Ai=class Gg{constructor(r=[],e,n){me(this,"parent");me(this,"layerdStates");me(this,"name");me(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new Gg(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r);return this.log("read",{var:r,val:n}),n}throw new Yt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new Yt(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e)}assign(r,e){let n=1;for(const h of this.layerdStates){if(h.has(r)){h.set(r,e),this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new Yt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};uu([ct],Ai.prototype,"log",null);uu([ct],Ai.prototype,"onUpdated",null);uu([ct],Ai.prototype,"createChildScope",null);uu([ct],Ai.prototype,"get",null);uu([ct],Ai.prototype,"getAll",null);uu([ct],Ai.prototype,"add",null);uu([ct],Ai.prototype,"assign",null);let _f;const rx=new Uint8Array(16);function sx(){if(!_f&&(_f=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!_f))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _f(rx)}const Hr=[];for(let t=0;t<256;++t)Hr.push((t+256).toString(16).slice(1));function nx(t,r=0){return(Hr[t[r+0]]+Hr[t[r+1]]+Hr[t[r+2]]+Hr[t[r+3]]+"-"+Hr[t[r+4]]+Hr[t[r+5]]+"-"+Hr[t[r+6]]+Hr[t[r+7]]+"-"+Hr[t[r+8]]+Hr[t[r+9]]+"-"+Hr[t[r+10]]+Hr[t[r+11]]+Hr[t[r+12]]+Hr[t[r+13]]+Hr[t[r+14]]+Hr[t[r+15]]).toLowerCase()}const ax=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),wv={randomUUID:ax};function ix(t,r,e){if(wv.randomUUID&&!r&&!t)return wv.randomUUID();t=t||{};const n=t.random||(t.rng||sx)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let h=0;h<16;++h)r[e+h]=n[h];return r}return nx(n)}const jt={type:"null"},un={type:"bool",value:!0},Js={type:"bool",value:!1},Oe=t=>({type:"num",value:t}),Qt=t=>({type:"str",value:t}),Pu=t=>({type:"bool",value:t}),hp=t=>({type:"obj",value:t}),Zr=t=>({type:"arr",value:t}),lx=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),ve=t=>({type:"fn",native:t}),ox=t=>({type:"return",value:t}),ux=()=>({type:"break",value:null}),fx=()=>({type:"continue",value:null}),cx=t=>t.type==="return"?t.value:t;function Ys(t){if(t==null)throw new Yt("Expect anything, but got nothing.")}function gs(t){if(t==null)throw new Yt("Expect boolean, but got nothing.");if(t.type!=="bool")throw new Yt(`Expect boolean, but got ${t.type}.`)}function pi(t){if(t==null)throw new Yt("Expect function, but got nothing.");if(t.type!=="fn")throw new Yt(`Expect function, but got ${t.type}.`)}function Nr(t){if(t==null)throw new Yt("Expect string, but got nothing.");if(t.type!=="str")throw new Yt(`Expect string, but got ${t.type}.`)}function Pe(t){if(t==null)throw new Yt("Expect number, but got nothing.");if(t.type!=="num")throw new Yt(`Expect number, but got ${t.type}.`)}function ii(t){if(t==null)throw new Yt("Expect object, but got nothing.");if(t.type!=="obj")throw new Yt(`Expect object, but got ${t.type}.`)}function Eu(t){if(t==null)throw new Yt("Expect array, but got nothing.");if(t.type!=="arr")throw new Yt(`Expect array, but got ${t.type}.`)}function hx(t){return t.type==="str"}function px(t){return t.type==="num"}function vx(t){return t.type==="obj"}function gx(t){return t.type==="arr"}function _h(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function kh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>kh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Ph(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Ph(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=Ph(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Eh(t){if(t===null)return jt;if(typeof t=="boolean")return Pu(t);if(typeof t=="string")return Qt(t);if(typeof t=="number")return Oe(t);if(Array.isArray(t))return Zr(t.map(r=>Eh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,Eh(n));return hp(r)}return jt}const dx={help:Qt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Qt("0.14.1"),"Core:ai":Qt("kawaii"),"Core:not":ve(([t])=>(gs(t),t.value?Js:un)),"Core:eq":ve(([t,r])=>(Ys(t),Ys(r),_h(t,r)?un:Js)),"Core:neq":ve(([t,r])=>(Ys(t),Ys(r),_h(t,r)?Js:un)),"Core:and":ve(([t,r])=>(gs(t),t.value?(gs(r),r.value?un:Js):Js)),"Core:or":ve(([t,r])=>(gs(t),t.value?un:(gs(r),r.value?un:Js))),"Core:add":ve(([t,r])=>(Pe(t),Pe(r),Oe(t.value+r.value))),"Core:sub":ve(([t,r])=>(Pe(t),Pe(r),Oe(t.value-r.value))),"Core:mul":ve(([t,r])=>(Pe(t),Pe(r),Oe(t.value*r.value))),"Core:pow":ve(([t,r])=>{Pe(t),Pe(r);const e=t.value**r.value;if(isNaN(e))throw new Yt("Invalid operation.");return Oe(e)}),"Core:div":ve(([t,r])=>{Pe(t),Pe(r);const e=t.value/r.value;if(isNaN(e))throw new Yt("Invalid operation.");return Oe(e)}),"Core:mod":ve(([t,r])=>(Pe(t),Pe(r),Oe(t.value%r.value))),"Core:gt":ve(([t,r])=>(Pe(t),Pe(r),t.value>r.value?un:Js)),"Core:lt":ve(([t,r])=>(Pe(t),Pe(r),t.value(Pe(t),Pe(r),t.value>=r.value?un:Js)),"Core:lteq":ve(([t,r])=>(Pe(t),Pe(r),t.value<=r.value?un:Js)),"Core:type":ve(([t])=>(Ys(t),Qt(t.type))),"Core:to_str":ve(([t])=>(Ys(t),t.type==="str"?t:t.type==="num"?Qt(t.value.toString()):Qt("?"))),"Core:range":ve(([t,r])=>(Pe(t),Pe(r),t.valueOe(n+t.value))):t.value>r.value?Zr(Array.from({length:t.value-r.value+1},(e,n)=>Oe(t.value-n))):Zr([t]))),"Util:uuid":ve(()=>Qt(ix())),"Json:stringify":ve(([t])=>(Ys(t),Qt(JSON.stringify(Ph(t))))),"Json:parse":ve(([t])=>(Nr(t),Eh(JSON.parse(t.value)))),"Json:parsable":ve(([t])=>{Nr(t);try{JSON.parse(t.value)}catch{return Pu(!1)}return Pu(!0)}),"Date:now":ve(()=>Oe(Date.now())),"Date:year":ve(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":ve(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":ve(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":ve(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":ve(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":ve(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":ve(([t])=>(Nr(t),Oe(new Date(t.value).getTime()))),"Math:Infinity":Oe(1/0),"Math:E":Oe(Math.E),"Math:LN2":Oe(Math.LN2),"Math:LN10":Oe(Math.LN10),"Math:LOG2E":Oe(Math.LOG2E),"Math:LOG10E":Oe(Math.LOG10E),"Math:PI":Oe(Math.PI),"Math:SQRT1_2":Oe(Math.SQRT1_2),"Math:SQRT2":Oe(Math.SQRT2),"Math:abs":ve(([t])=>(Pe(t),Oe(Math.abs(t.value)))),"Math:acos":ve(([t])=>(Pe(t),Oe(Math.acos(t.value)))),"Math:acosh":ve(([t])=>(Pe(t),Oe(Math.acosh(t.value)))),"Math:asin":ve(([t])=>(Pe(t),Oe(Math.asin(t.value)))),"Math:asinh":ve(([t])=>(Pe(t),Oe(Math.asinh(t.value)))),"Math:atan":ve(([t])=>(Pe(t),Oe(Math.atan(t.value)))),"Math:atanh":ve(([t])=>(Pe(t),Oe(Math.atanh(t.value)))),"Math:atan2":ve(([t,r])=>(Pe(t),Pe(r),Oe(Math.atan2(t.value,r.value)))),"Math:cbrt":ve(([t])=>(Pe(t),Oe(Math.cbrt(t.value)))),"Math:ceil":ve(([t])=>(Pe(t),Oe(Math.ceil(t.value)))),"Math:clz32":ve(([t])=>(Pe(t),Oe(Math.clz32(t.value)))),"Math:cos":ve(([t])=>(Pe(t),Oe(Math.cos(t.value)))),"Math:cosh":ve(([t])=>(Pe(t),Oe(Math.cosh(t.value)))),"Math:exp":ve(([t])=>(Pe(t),Oe(Math.exp(t.value)))),"Math:expm1":ve(([t])=>(Pe(t),Oe(Math.expm1(t.value)))),"Math:floor":ve(([t])=>(Pe(t),Oe(Math.floor(t.value)))),"Math:fround":ve(([t])=>(Pe(t),Oe(Math.fround(t.value)))),"Math:hypot":ve(([t])=>{Eu(t);const r=[];for(const e of t.value)Pe(e),r.push(e.value);return Oe(Math.hypot(...r))}),"Math:imul":ve(([t,r])=>(Pe(t),Pe(r),Oe(Math.imul(t.value,r.value)))),"Math:log":ve(([t])=>(Pe(t),Oe(Math.log(t.value)))),"Math:log1p":ve(([t])=>(Pe(t),Oe(Math.log1p(t.value)))),"Math:log10":ve(([t])=>(Pe(t),Oe(Math.log10(t.value)))),"Math:log2":ve(([t])=>(Pe(t),Oe(Math.log2(t.value)))),"Math:max":ve(([t,r])=>(Pe(t),Pe(r),Oe(Math.max(t.value,r.value)))),"Math:min":ve(([t,r])=>(Pe(t),Pe(r),Oe(Math.min(t.value,r.value)))),"Math:pow":ve(([t,r])=>(Pe(t),Pe(r),Oe(Math.pow(t.value,r.value)))),"Math:round":ve(([t])=>(Pe(t),Oe(Math.round(t.value)))),"Math:sign":ve(([t])=>(Pe(t),Oe(Math.sign(t.value)))),"Math:sin":ve(([t])=>(Pe(t),Oe(Math.sin(t.value)))),"Math:sinh":ve(([t])=>(Pe(t),Oe(Math.sinh(t.value)))),"Math:sqrt":ve(([t])=>{Pe(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new Yt("Invalid operation.");return Oe(r)}),"Math:tan":ve(([t])=>(Pe(t),Oe(Math.tan(t.value)))),"Math:tanh":ve(([t])=>(Pe(t),Oe(Math.tanh(t.value)))),"Math:trunc":ve(([t])=>(Pe(t),Oe(Math.trunc(t.value)))),"Math:rnd":ve(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Oe(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Oe(Math.random())),"Math:gen_rng":ve(([t])=>{if(Ys(t),t.type!=="num"&&t.type!=="str")return jt;const r=cf(t.value.toString());return ve(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Oe(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Oe(r()))}),"Num:to_hex":ve(([t])=>(Pe(t),Qt(t.value.toString(16)))),"Num:from_hex":ve(([t])=>(Nr(t),Oe(parseInt(t.value,16)))),"Str:lf":Qt(` +`),"Str:lt":ve(([t,r])=>(Nr(t),Nr(r),t.value(Nr(t),Nr(r),t.value>r.value?Oe(-1):t.value===r.value?Oe(0):Oe(1))),"Obj:keys":ve(([t])=>(ii(t),Zr(Array.from(t.value.keys()).map(r=>Qt(r))))),"Obj:vals":ve(([t])=>(ii(t),Zr(Array.from(t.value.values())))),"Obj:kvs":ve(([t])=>(ii(t),Zr(Array.from(t.value.entries()).map(([r,e])=>Zr([Qt(r),e]))))),"Obj:get":ve(([t,r])=>(ii(t),Nr(r),t.value.get(r.value)??jt)),"Obj:set":ve(([t,r,e])=>(ii(t),Nr(r),Ys(e),t.value.set(r.value,e),jt)),"Obj:has":ve(([t,r])=>(ii(t),Nr(r),Pu(t.value.has(r.value)))),"Obj:copy":ve(([t])=>(ii(t),hp(new Map(t.value)))),"Async:interval":ve(async([t,r,e],n)=>{Pe(t),pi(r),e&&(gs(e),e.value&&n.call(r,[]));const h=setInterval(()=>{n.call(r,[])},t.value),d=()=>{clearInterval(h)};return n.registerAbortHandler(d),ve(([],$)=>{clearInterval(h),$.unregisterAbortHandler(d)})}),"Async:timeout":ve(async([t,r],e)=>{Pe(t),pi(r);const n=setTimeout(()=>{e.call(r,[])},t.value),h=()=>{clearTimeout(n)};return e.registerAbortHandler(h),ve(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(h)})})},vu={num:{to_str:t=>ve(async(r,e)=>Qt(t.value.toString()))},str:{to_num:t=>ve(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?jt:Oe(n)}),len:t=>Oe(hf(t.value)),replace:t=>ve(async([r,e],n)=>(Nr(r),Nr(e),Qt(t.value.split(r.value).join(e.value)))),index_of:t=>ve(async([r],e)=>(Nr(r),Oe(vf(t.value,r.value)))),incl:t=>ve(async([r],e)=>(Nr(r),t.value.includes(r.value)?un:Js)),trim:t=>ve(async(r,e)=>Qt(t.value.trim())),upper:t=>ve(async(r,e)=>Qt(t.value.toUpperCase())),lower:t=>ve(async(r,e)=>Qt(t.value.toLowerCase())),split:t=>ve(async([r],e)=>(r&&Nr(r),Zr(r?t.value.split(r?r.value:"").map(n=>Qt(n)):zn(t.value).map(n=>Qt(n))))),slice:t=>ve(async([r,e],n)=>(Pe(r),Pe(e),Qt(pf(t.value,r.value,e.value)))),pick:t=>ve(async([r],e)=>{Pe(r);const h=zn(t.value)[r.value];return h?Qt(h):jt})},arr:{len:t=>Oe(t.value.length),push:t=>ve(async([r],e)=>(Ys(r),t.value.push(r),t)),unshift:t=>ve(async([r],e)=>(Ys(r),t.value.unshift(r),t)),pop:t=>ve(async(r,e)=>t.value.pop()??jt),shift:t=>ve(async(r,e)=>t.value.shift()??jt),concat:t=>ve(async([r],e)=>(Eu(r),Zr(t.value.concat(r.value)))),slice:t=>ve(async([r,e],n)=>(Pe(r),Pe(e),Zr(t.value.slice(r.value,e.value)))),join:t=>ve(async([r],e)=>(r&&Nr(r),Qt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>ve(async([r],e)=>{pi(r);const n=t.value.map(async(h,d)=>await e.call(r,[h,Oe(d)]));return Zr(await Promise.all(n))}),filter:t=>ve(async([r],e)=>{pi(r);const n=[];for(let h=0;hve(async([r,e],n)=>{pi(r);const h=e!=null;let d=h?e:t.value[0];for(let $=h?0:1;$ve(async([r],e)=>{pi(r);for(let n=0;nve(async([r],e)=>(Ys(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Js:(h=>h.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?un:Js)),reverse:t=>ve(async(r,e)=>(t.value.reverse(),jt)),copy:t=>ve(async(r,e)=>Zr([...t.value])),sort:t=>ve(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const b=Math.floor(d.length/2),k=await n(d.slice(0,b),$),E=await n(d.slice(b),$);return h(k,E,$)},h=async(d,$,b)=>{const k=[];let E=0,F=0;for(;E=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};const Qg=300,yx=Qg-1;let As=class{constructor(r,e){me(this,"vars");me(this,"opts");me(this,"stepCount",0);me(this,"stop",!1);me(this,"scope");me(this,"abortHandlers",[]);this.opts=e??{};const n={print:ve(([h])=>{Ys(h),this.opts.out&&this.opts.out(h)}),readline:ve(async h=>{const d=h[0];if(Nr(d),this.opts.in==null)return jt;const $=await this.opts.in(d.value);return Qt($)})};this.vars={...r,...dx,...n},this.scope=new Ai([new Map(Object.entries(this.vars))]),this.scope.opts.log=(h,d)=>{switch(h){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(r==null||r.length===0)return;await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}async execFn(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(h){switch(h.type){case"arr":return h.value.map(d=>e(d));case"bool":return h.value;case"null":return null;case"num":return h.value;case"obj":{const d={};for(const[$,b]of h.value.entries())d[$]=e(b);return d}case"str":return h.value;default:return}}const n=new Map;for(const h of r)switch(h.type){case"meta":{n.set(h.name,e(h.value));break}}return n}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{const h=await this._eval(n.expr,e);e.add(n.name,h),this.scope.add(r.name+":"+n.name,h);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this._fn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??jt;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],e[d]);const h=r.scope.createChildScope(n);return cx(await this._run(r.statements,h))}}async _eval(r,e){if(this.stop)return jt;if(this.stepCount%Qg===yx&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new Yt("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);pi(n);const h=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,h)}case"if":{const n=await this._eval(r.cond,e);if(gs(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const h of r.elseif){const d=await this._eval(h.cond,e);if(gs(d),d.value)return this._eval(h.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return jt}case"match":{const n=await this._eval(r.about,e);for(const h of r.qs){const d=await this._eval(h.q,e);if(_h(n,d))return await this._eval(h.a,e)}return r.default?await this._eval(r.default,e):jt}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return jt}case"for":{if(r.times){const n=await this._eval(r.times,e);Pe(n);for(let h=0;h0){const h=[];for(const d of r.attr)h.push({name:d.name,value:await this._eval(d.value,e)});n.attr=h}return e.add(r.name,n),jt}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),jt}case"addAssign":{const n=await this._eval(r.dest,e);Pe(n);const h=await this._eval(r.expr,e);return Pe(h),await this.assign(e,r.dest,Oe(n.value+h.value)),jt}case"subAssign":{const n=await this._eval(r.dest,e);Pe(n);const h=await this._eval(r.expr,e);return Pe(h),await this.assign(e,r.dest,Oe(n.value-h.value)),jt}case"null":return jt;case"bool":return Pu(r.value);case"num":return Oe(r.value);case"str":return Qt(r.value);case"arr":return Zr(await Promise.all(r.value.map(async n=>await this._eval(n,e))));case"obj":{const n=new Map;for(const h of r.value.keys())n.set(h,await this._eval(r.value.get(h),e));return hp(n)}case"prop":{const n=await this._eval(r.target,e);if(vx(n))return n.value.has(r.name)?n.value.get(r.name):jt;if(px(n)){if(Object.hasOwn(vu.num,r.name))return vu.num[r.name](n);throw new Yt(`No such prop (${r.name}) in ${n.type}.`)}else if(hx(n)){if(Object.hasOwn(vu.str,r.name))return vu.str[r.name](n);throw new Yt(`No such prop (${r.name}) in ${n.type}.`)}else if(gx(n)){if(Object.hasOwn(vu.arr,r.name))return vu.arr[r.name](n);throw new Yt(`No such prop (${r.name}) in ${n.type}.`)}else throw new Yt(`Cannot read prop (${r.name}) of ${n.type}.`)}case"index":{const n=await this._eval(r.target,e);Eu(n);const h=await this._eval(r.index,e);Pe(h);const d=n.value[h.value];if(d===void 0)throw new tx(`Index out of range. index: ${h.value} max: ${n.value.length-1}`);return d}case"not":{const n=await this._eval(r.expr,e);return gs(n),Pu(!n.value)}case"fn":return lx(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"tmpl":{let n="";for(const h of r.tmpl)if(typeof h=="string")n+=h;else{const d=await this._eval(h,e);let $="";d.type==="str"?$=d.value:d.type==="num"&&($=d.value.toString()),n+=$}return Qt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),ox(n)}case"break":return this.log("block:break",{scope:e.name}),ux();case"continue":return this.log("block:continue",{scope:e.name}),fx();case"ns":return jt;case"meta":return jt;case"and":{const n=await this._eval(r.left,e);if(gs(n),n.value){const h=await this._eval(r.right,e);return gs(h),h}else return n}case"or":{const n=await this._eval(r.left,e);if(gs(n),n.value)return n;{const h=await this._eval(r.right,e);return gs(h),h}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=jt;for(let h=0;he!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const h=await this._eval(e.target,r);Eu(h);const d=await this._eval(e.index,r);Pe(d),h.value[d.value]=n}else if(e.type==="prop"){const h=await this._eval(e.target,r);ii(h),h.value.set(e.name,n)}else throw new Yt("The left-hand side of an assignment expression must be a variable or a property/index access.")}};rn([ct],As.prototype,"exec",null);rn([ct],As.prototype,"execFn",null);rn([ct],As.prototype,"log",null);rn([ct],As.prototype,"collectNs",null);rn([ct],As.prototype,"collectNsMember",null);rn([ct],As.prototype,"_fn",null);rn([ct],As.prototype,"_eval",null);rn([ct],As.prototype,"_run",null);rn([ct],As.prototype,"registerAbortHandler",null);rn([ct],As.prototype,"unregisterAbortHandler",null);rn([ct],As.prototype,"abort",null);rn([ct],As.prototype,"assign",null);rn([ct],As,"collectMetadata",null);function wx(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function Yo(t,r,e,n){var h=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(h,Yo.prototype),h.expected=r,h.found=e,h.location=n,h.name="SyntaxError",h}wx(Yo,Error);function Hc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}Yo.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` +`+k+` | +`+d.line+" | "+E+` +`+k+" | "+Hc("",h.column-1," ")+Hc("",j,"^")}else r+=` + at `+$}return r};Yo.buildMessage=function(t,r){var e={literal:function(E){return'"'+h(E.text)+'"'},class:function(E){var F=E.parts.map(function(j){return Array.isArray(j)?d(j[0])+"-"+d(j[1]):d(j)});return"["+(E.inverted?"^":"")+F.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(E){return E.description}};function n(E){return E.charCodeAt(0).toString(16).toUpperCase()}function h(E){return E.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+n(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+n(F)})}function d(E){return E.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+n(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+n(F)})}function $(E){return e[E.type](E)}function b(E){var F=E.map($),j,D;if(F.sort(),F.length>0){for(j=1,D=1;j=",Qe="<",Fr=">",Dt="+",yr="-",kt="*",dr="^",Or="/",_r="%",Er="!",Ft="[",U=".",K="if",te="elif",ce="else",he="match",ie="=>",Ne="eval",de="`",we='"',ue="'",De='\\"',je="\\'",Be="true",We="false",Ze="null",rt=";",st="@",wt="@(",Lt=`\r +`,xt=/^[A-Z0-9_:]/i,Gt=/^[^`{]/,_s=/^[{}`]/,Wr=/^[+\-]/,Ot=/^[1-9]/,ht=/^[0-9]/,It=/^[A-Z_]/i,Vn=/^[A-Z0-9_]/i,Kn=/^[\r\n]/,Ci=/^[ \t\r\n]/,_i=/^[ \t]/,tr=lo(),rr=Y("//",!1),ki=Y("/*",!1),vn=Y("*/",!1),wr=Y("(",!1),Pt=Y(")",!1),mr=Y("::",!1),sr=Y("{",!1),Ye=Y("}",!1),Bt=Y("###",!1),Ir=Y("let",!1),dt=Y(":",!1),yt=Y("=",!1),ns=Y("var",!1),Pi=Y("<:",!1),Ei=Y("#[",!1),ks=Y("]",!1),as=Y("each",!1),mt=Y(",",!1),pt=Y("for",!1),Ps=Y("return",!1),or=Ht([["A","Z"],["0","9"],"_",":"],!1,!0),ur=Y("loop",!1),Mi=Y("break",!1),Si=Y("continue",!1),Fi=Y("+=",!1),Oi=Y("-=",!1),Jn=Y("\\",!1),Zn=Y("||",!1),Ni=Y("&&",!1),Ti=Y("==",!1),Ii=Y("!=",!1),ji=Y("<=",!1),Ri=Y(">=",!1),Gn=Y("<",!1),gn=Y(">",!1),Qn=Y("+",!1),Di=Y("-",!1),Xn=Y("*",!1),Yn=Y("^",!1),Li=Y("/",!1),Bi=Y("%",!1),Hi=Y("!",!1),dn=Y("[",!1),is=Y(".",!1),yn=Y("if",!1),Ui=Y("elif",!1),qi=Y("else",!1),zi=Y("match",!1),Es=Y("=>",!1),Ms=Y("eval",!1),Ss=Y("`",!1),Wi=Ht(["`","{"],!0,!1),Fs=Ht(["{","}","`"],!1,!1),Os=Y('"',!1),Ns=Y("'",!1),Ts=Y('\\"',!1),Is=Y("\\'",!1),js=Ht(["+","-"],!1,!1),ea=Ht([["1","9"]],!1,!1),Et=Ht([["0","9"]],!1,!1),ta=Y("true",!1),nr=Y("false",!1),Vi=Y("null",!1),Rs=Y(";",!1),Ki=Y("@",!1),ls=Y("@(",!1),Ji=Ht([["A","Z"],"_"],!1,!0),wn=Ht([["A","Z"],["0","9"],"_"],!1,!0),Zi=Y(`\r +`,!1),ra=Ht(["\r",` +`],!1,!1),Gi=Ht([" "," ","\r",` +`],!1,!1),Qi=Ht([" "," "],!1,!1),Xi=function(l){return l.join("")},Yi=function(){return A()},el=function(){return A()},tl=function(){return""},rl=function(){return""},sl=function(l){return l??[]},sa=function(l,f){return f},nl=function(l,f){return[l,...f]},mn=function(l,f){return f},al=function(l,f){return[l,...f]},$n=function(l,f){return f},il=function(l,f){return[l,...f]},na=function(l){return l},ll=function(l,f){return ne("ns",{name:l,members:f})},ol=function(l,f){return ne("meta",{name:l,value:f})},ul=function(l){return ne("meta",{name:null,value:l})},fl=function(l,f,y){return ne("def",{name:l,varType:f,expr:y,mut:!1,attr:[]})},cl=function(l,f,y){return ne("def",{name:l,varType:f,expr:y,mut:!0,attr:[]})},hl=function(l){return ne("identifier",{name:"print",chain:[ne("callChain",{args:[l]})]})},pl=function(l,f){return ne("attr",{name:l,value:f??ne("bool",{value:!0})})},vl=function(l,f,y){return ne("each",{var:l,items:f,for:y})},gl=function(l,f,y){return ne("each",{var:l,items:f,for:y})},dl=function(l,f){return f},yl=function(l,f,y,c){return ne("for",{var:l,from:f??ne("num",{value:0}),to:y,for:c})},wl=function(l,f){return f},ml=function(l,f,y,c){return ne("for",{var:l,from:f??ne("num",{value:0}),to:y,for:c})},$l=function(l,f){return ne("for",{times:l,for:f})},xl=function(l,f){return ne("for",{times:l,for:f})},bl=function(l){return ne("return",{expr:l})},Al=function(l){return ne("loop",{statements:l})},Cl=function(){return ne("break",{})},_l=function(){return ne("continue",{})},kl=function(l,f,y){return f==="+="?ne("addAssign",{dest:l,expr:y}):f==="-="?ne("subAssign",{dest:l,expr:y}):ne("assign",{dest:l,expr:y})},aa=function(l,f,y){return{op:f,term:y}},Pl=function(l,f){return ne("infix",{operands:[l,...f.map(y=>y.term)],operators:f.map(y=>y.op)})},ia=function(){return A()},El=function(l){return ne("not",{expr:l})},Ml=function(l,f){return{...l,chain:f}},Sl=function(l){return ne("callChain",{args:l??[]})},la=function(l,f){return f},Fl=function(l,f){return[l,...f]},oa=function(l){return ne("indexChain",{index:l})},Ol=function(l){return ne("propChain",{name:l})},Nl=function(l,f,y,c){return ne("if",{cond:l,then:f,elseif:y??[],else:c})},Tl=function(l,f){return[l,...f]},Il=function(l,f){return{cond:l,then:f}},jl=function(l){return l},ua=function(l,f,y){return{q:f,a:y}},Rl=function(l,f,y){return ne("match",{about:l,qs:f??[],default:y})},fa=function(l){return ne("block",{statements:l})},Dl=function(l){return ne("identifier",{name:l})},Ll=function(l){return ne("tmpl",{tmpl:l})},Bl=function(l){return l.join("")},ca=function(l){return l},Hl=function(l){return ne("str",{value:l.join("")})},ha=function(l){return l},pa=function(l){return ne("str",{value:l.join("")})},Ul=function(){return'"'},va=function(){return"'"},ql=function(){return ne("num",{value:parseFloat(A())})},zl=function(){return ne("num",{value:parseFloat(A())})},Wl=function(){return ne("num",{value:parseInt(A(),10)})},Vl=function(){return ne("num",{value:parseInt(A(),10)})},Kl=function(){return ne("bool",{value:!0})},Jl=function(){return ne("bool",{value:!1})},Zl=function(){return ne("null",{})},ga=function(l,f){return{k:l,v:f}},Gl=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ne("obj",{value:f})},da=function(l){return l},ya=function(l){return ne("arr",{value:l})},Ql=function(l,f){return{name:l,argType:f}},wa=function(l,f){return[l,...f]},Xl=function(l,f,y,c,s,o){return(l.length>0||y.length>0)&&Ls("Cannot use spaces before or after the function name."),ne("def",{name:f,expr:ne("fn",{args:c??[],retType:s},o??[]),mut:!1,attr:[]})},Yl=function(l,f,y){return ne("fn",{args:l??[],retType:f},y??[])},ma=function(l){return l},eo=function(l){return ne("arr",{value:l})},$a=function(l,f){return{k:l,v:f}},xa=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ne("obj",{value:f})},to=function(l,f){return ne("fnTypeSource",{args:l??[],result:f})},ba=function(l,f){return[l,...f]},ro=function(l,f){return ne("namedTypeSource",{name:l,inner:f})},so=function(l){return ne("namedTypeSource",{name:l,inner:null})},no=function(){return A()},ao=function(){return A()},io=function(l){return ne("block",{statements:l??[]})},i=0,W=0,Ds=[{line:1,column:1}],a=0,z=[],C=0,O={},jr;if("startRule"in r){if(!(r.startRule in h))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=h[r.startRule]}function A(){return t.substring(W,i)}function T(){return Bs(W,i)}function Ls(l,f){throw f=f!==void 0?f:Bs(W,i),Aa(l,f)}function Y(l,f){return{type:"literal",text:l,ignoreCase:f}}function Ht(l,f,y){return{type:"class",parts:l,inverted:f,ignoreCase:y}}function lo(){return{type:"any"}}function se(){return{type:"end"}}function Nt(l){var f=Ds[l],y;if(f)return f;for(y=l-1;!Ds[y];)y--;for(f=Ds[y],f={line:f.line,column:f.column};ya&&(a=i,z=[]),z.push(l))}function Aa(l,f){return new Yo(l,null,null,f)}function Hs(l,f,y){return new Yo(Yo.buildMessage(l,f),l,f,y)}function M(){var l,f,y,c=i*76+0,s=O[c];if(s)return i=s.nextPos,s.result;for(l=i,f=[],y=Ca();y!==e;)f.push(y),y=Ca();return W=l,f=Xi(f),l=f,O[c]={nextPos:i,result:l},l}function Ca(){var l,f,y=i*76+1,c=O[y];return c?(i=c.nextPos,c.result):(l=i,f=Na(),f!==e&&(W=l,f=Yi()),l=f,l===e&&(l=i,f=qs(),f!==e&&(W=l,f=el()),l=f,l===e&&(l=oo(),l===e&&(t.length>i?(l=t.charAt(i),i++):(l=e,C===0&&S(tr))))),O[y]={nextPos:i,result:l},l)}function oo(){var l,f,y,c,s,o,p=i*76+2,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,2)===$?(f=$,i+=2):(f=e,C===0&&S(rr)),f!==e){for(y=[],c=i,s=i,C++,o=za(),C--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr)),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,o=za(),C--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr)),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);W=l,l=tl()}else i=l,l=e;if(l===e)if(l=i,t.substr(i,2)===b?(f=b,i+=2):(f=e,C===0&&S(ki)),f!==e){for(y=[],c=i,s=i,C++,t.substr(i,2)===k?(o=k,i+=2):(o=e,C===0&&S(vn)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr)),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,t.substr(i,2)===k?(o=k,i+=2):(o=e,C===0&&S(vn)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr)),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);t.substr(i,2)===k?(c=k,i+=2):(c=e,C===0&&S(vn)),c!==e?(W=l,l=rl()):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function _a(){var l,f,y,c,s,o=i*76+3,p=O[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=x();y!==e;)f.push(y),y=x();for(y=ka(),y===e&&(y=null),c=[],s=x();s!==e;)c.push(s),s=x();return W=l,l=sl(y),O[o]={nextPos:i,result:l},l}function ka(){var l,f,y,c,s,o,p,u,g=i*76+4,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=xn(),f!==e){for(y=[],c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=xn(),u!==e?(W=c,c=sa(f,u)):(i=c,c=e)}else i=c,c=e;for(;c!==e;){for(y.push(c),c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=xn(),u!==e?(W=c,c=sa(f,u)):(i=c,c=e)}else i=c,c=e}W=l,l=nl(f,y)}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function uo(){var l,f,y,c,s,o,p,u,g=i*76+5,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=bn(),f!==e){for(y=[],c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=bn(),u!==e?(W=c,c=mn(f,u)):(i=c,c=e)}else i=c,c=e;for(;c!==e;){for(y.push(c),c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=bn(),u!==e?(W=c,c=mn(f,u)):(i=c,c=e)}else i=c,c=e}W=l,l=al(f,y)}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function os(){var l,f,y,c,s,o,p,u,g=i*76+6,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=fr(),f!==e){for(y=[],c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=fr(),u!==e?(W=c,c=$n(f,u)):(i=c,c=e)}else i=c,c=e;for(;c!==e;){for(y.push(c),c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=fr(),u!==e?(W=c,c=$n(f,u)):(i=c,c=e)}else i=c,c=e}W=l,l=il(f,y)}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function xn(){var l,f=i*76+7,y=O[f];return y?(i=y.nextPos,y.result):(l=us(),l===e&&(l=Pa(),l===e&&(l=fr())),O[f]={nextPos:i,result:l},l)}function bn(){var l,f=i*76+8,y=O[f];return y?(i=y.nextPos,y.result):(l=$r(),l===e&&(l=Ua(),l===e&&(l=us())),O[f]={nextPos:i,result:l},l)}function fr(){var l,f=i*76+9,y=O[f];return y?(i=y.nextPos,y.result):(l=$r(),l===e&&(l=Ua(),l===e&&(l=Ea(),l===e&&(l=ho(),l===e&&(l=fo(),l===e&&(l=Ma(),l===e&&(l=co(),l===e&&(l=po(),l===e&&(l=vo(),l===e&&(l=go(),l===e&&(l=yo(),l===e&&(l=Re()))))))))))),O[f]={nextPos:i,result:l},l)}function Re(){var l,f=i*76+10,y=O[f];return y?(i=y.nextPos,y.result):(l=wo(),l===e&&(l=Rr()),O[f]={nextPos:i,result:l},l)}function Rr(){var l,f=i*76+11,y=O[f];return y?(i=y.nextPos,y.result):(l=xo(),l===e&&(l=Po(),l===e&&(l=br(),l===e&&(l=Dr()))),O[f]={nextPos:i,result:l},l)}function Dr(){var l,f,y,c,s,o,p=i*76+12,u=O[p];if(u)return i=u.nextPos,u.result;if(l=Ao(),l===e&&(l=_n(),l===e&&(l=Na(),l===e&&(l=qs(),l===e&&(l=Ra(),l===e&&(l=Mn(),l===e&&(l=Ba(),l===e&&(l=Ha(),l===e&&(l=ko(),l===e&&(l=mo(),l===e&&(l=Co(),l===e)))))))))))if(l=i,t.charCodeAt(i)===40?(f=E,i++):(f=e,C===0&&S(wr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=Re(),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e?(W=l,l=na(c)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Te(){var l,f=i*76+13,y=O[f];return y?(i=y.nextPos,y.result):(l=Ra(),l===e&&(l=qs(),l===e&&(l=Mn(),l===e&&(l=On(),l===e&&(l=qa(),l===e&&(l=Ba()))))),O[f]={nextPos:i,result:l},l)}function us(){var l,f,y,c,s,o,p,u,g,v,m=i*76+14,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===j?(f=j,i+=2):(f=e,C===0&&S(mr)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=He(),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;if(s!==e)if(t.charCodeAt(i)===123?(o=D,i++):(o=e,C===0&&S(sr)),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(u=uo(),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();t.charCodeAt(i)===125?(v=V,i++):(v=e,C===0&&S(Ye)),v!==e?(W=l,l=ll(c,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function Pa(){var l,f,y,c,s,o,p=i*76+15,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,3)===pe?(f=pe,i+=3):(f=e,C===0&&S(Bt)),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();if(c=He(),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();o=Te(),o!==e?(W=l,l=ol(c,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===pe?(f=pe,i+=3):(f=e,C===0&&S(Bt)),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();c=Te(),c!==e?(W=l,l=ul(c)):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function $r(){var l,f,y,c,s,o,p,u,g,v=i*76+16,m=O[v];if(m)return i=m.nextPos,m.result;if(l=i,t.substr(i,3)===ee?(f=ee,i+=3):(f=e,C===0&&S(Ir)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=He(),c!==e){for(s=i,o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===58?(p=ae,i++):(p=e,C===0&&S(dt)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();g=Ut(),g!==e?s=g:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===61?(p=_e,i++):(p=e,C===0&&S(yt)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();g=Re(),g!==e?(W=l,l=fl(c,s,g)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===H?(f=H,i+=3):(f=e,C===0&&S(ns)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=He(),c!==e){for(s=i,o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===58?(p=ae,i++):(p=e,C===0&&S(dt)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();g=Ut(),g!==e?s=g:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===61?(p=_e,i++):(p=e,C===0&&S(yt)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();g=Re(),g!==e?(W=l,l=cl(c,s,g)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return O[v]={nextPos:i,result:l},l}function Ea(){var l,f,y,c,s=i*76+17,o=O[s];if(o)return i=o.nextPos,o.result;if(l=i,t.substr(i,2)===L?(f=L,i+=2):(f=e,C===0&&S(Pi)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();c=Re(),c!==e?(W=l,l=hl(c)):(i=l,l=e)}else i=l,l=e;return O[s]={nextPos:i,result:l},l}function fo(){var l,f,y,c,s,o,p,u=i*76+18,g=O[u];if(g)return i=g.nextPos,g.result;if(l=i,t.substr(i,2)===B?(f=B,i+=2):(f=e,C===0&&S(Ei)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=He(),c!==e){for(s=i,o=[],p=x();p!==e;)o.push(p),p=x();for(p=Te(),p!==e?s=p:(i=s,s=e),s===e&&(s=null),o=[],p=x();p!==e;)o.push(p),p=x();t.charCodeAt(i)===93?(p=q,i++):(p=e,C===0&&S(ks)),p!==e?(W=l,l=pl(c,s)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return O[u]={nextPos:i,result:l},l}function Ma(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I=i*76+19,R=O[I];if(R)return i=R.nextPos,R.result;if(l=i,t.substr(i,4)===J?(f=J,i+=4):(f=e,C===0&&S(as)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===40?(c=E,i++):(c=e,C===0&&S(wr)),c!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,C===0&&S(Ir)),s!==e){if(o=[],p=x(),p!==e)for(;p!==e;)o.push(p),p=x();else o=e;if(o!==e)if(p=He(),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();for(t.charCodeAt(i)===44?(g=G,i++):(g=e,C===0&&S(mt)),g===e&&(g=null),v=[],m=x();m!==e;)v.push(m),m=x();if(m=Re(),m!==e)if(t.charCodeAt(i)===41?(w=F,i++):(w=e,C===0&&S(Pt)),w!==e){for(_=[],P=x();P!==e;)_.push(P),P=x();P=Tt(),P!==e?(W=l,l=vl(p,m,P)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,4)===J?(f=J,i+=4):(f=e,C===0&&S(as)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(t.substr(i,3)===ee?(c=ee,i+=3):(c=e,C===0&&S(Ir)),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;if(s!==e)if(o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();if(v=Re(),v!==e){if(m=[],w=x(),w!==e)for(;w!==e;)m.push(w),w=x();else m=e;m!==e?(w=Tt(),w!==e?(W=l,l=gl(o,v,w)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return O[I]={nextPos:i,result:l},l}function co(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I,R=i*76+20,Z=O[R];if(Z)return i=Z.nextPos,Z.result;if(l=i,t.substr(i,3)===Q?(f=Q,i+=3):(f=e,C===0&&S(pt)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===40?(c=E,i++):(c=e,C===0&&S(wr)),c!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,C===0&&S(Ir)),s!==e){if(o=[],p=x(),p!==e)for(;p!==e;)o.push(p),p=x();else o=e;if(o!==e)if(p=He(),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();if(g=i,t.charCodeAt(i)===61?(v=_e,i++):(v=e,C===0&&S(yt)),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();w=Re(),w!==e?(W=g,g=dl(p,w)):(i=g,g=e)}else i=g,g=e;for(g===e&&(g=null),t.charCodeAt(i)===44?(v=G,i++):(v=e,C===0&&S(mt)),v===e&&(v=null),m=[],w=x();w!==e;)m.push(w),w=x();if(w=Re(),w!==e)if(t.charCodeAt(i)===41?(_=F,i++):(_=e,C===0&&S(Pt)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();I=Tt(),I!==e?(W=l,l=yl(p,g,w,I)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===Q?(f=Q,i+=3):(f=e,C===0&&S(pt)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(t.substr(i,3)===ee?(c=ee,i+=3):(c=e,C===0&&S(Ir)),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;if(s!==e)if(o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(u=i,t.charCodeAt(i)===61?(g=_e,i++):(g=e,C===0&&S(yt)),g!==e){for(v=[],m=x();m!==e;)v.push(m),m=x();m=Re(),m!==e?(W=u,u=wl(o,m)):(i=u,u=e)}else i=u,u=e;for(u===e&&(u=null),t.charCodeAt(i)===44?(g=G,i++):(g=e,C===0&&S(mt)),g===e&&(g=null),v=[],m=x();m!==e;)v.push(m),m=x();if(m=Re(),m!==e){if(w=[],_=x(),_!==e)for(;_!==e;)w.push(_),_=x();else w=e;w!==e?(_=Tt(),_!==e?(W=l,l=ml(o,u,m,_)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===Q?(f=Q,i+=3):(f=e,C===0&&S(pt)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===40?(c=E,i++):(c=e,C===0&&S(wr)),c!==e)if(s=Re(),s!==e)if(t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=Tt(),u!==e?(W=l,l=$l(s,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===Q?(f=Q,i+=3):(f=e,C===0&&S(pt)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=Re(),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;s!==e?(o=Tt(),o!==e?(W=l,l=xl(c,o)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e}}return O[R]={nextPos:i,result:l},l}function ho(){var l,f,y,c,s,o=i*76+21,p=O[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,6)===X?(f=X,i+=6):(f=e,C===0&&S(Ps)),f!==e)if(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();s=Re(),s!==e?(W=l,l=bl(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return O[o]={nextPos:i,result:l},l}function po(){var l,f,y,c,s,o,p,u,g=i*76+22,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===$e?(f=$e,i+=4):(f=e,C===0&&S(ur)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===123?(c=D,i++):(c=e,C===0&&S(sr)),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();if(o=os(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();t.charCodeAt(i)===125?(u=V,i++):(u=e,C===0&&S(Ye)),u!==e?(W=l,l=Al(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function vo(){var l,f,y,c,s=i*76+23,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===ke?(f=ke,i+=5):(f=e,C===0&&S(Mi)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=Cl()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function go(){var l,f,y,c,s=i*76+24,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,8)===ge?(f=ge,i+=8):(f=e,C===0&&S(Si)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=_l()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function yo(){var l,f,y,c,s,o,p=i*76+25,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Re(),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.substr(i,2)===qe?(c=qe,i+=2):(c=e,C===0&&S(Fi)),c===e&&(t.substr(i,2)===it?(c=it,i+=2):(c=e,C===0&&S(Oi)),c===e&&(t.charCodeAt(i)===61?(c=_e,i++):(c=e,C===0&&S(yt)))),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();o=Re(),o!==e?(W=l,l=kl(f,c,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function wo(){var l,f,y,c,s,o,p,u,g=i*76+26,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=Rr(),f!==e){for(y=[],c=i,s=[],o=xr();o!==e;)s.push(o),o=xr();if(o=Sa(),o!==e){for(p=[],u=xr();u!==e;)p.push(u),u=xr();u=Rr(),u!==e?(W=c,c=aa(f,o,u)):(i=c,c=e)}else i=c,c=e;if(c!==e)for(;c!==e;){for(y.push(c),c=i,s=[],o=xr();o!==e;)s.push(o),o=xr();if(o=Sa(),o!==e){for(p=[],u=xr();u!==e;)p.push(u),u=xr();u=Rr(),u!==e?(W=c,c=aa(f,o,u)):(i=c,c=e)}else i=c,c=e}else y=e;y!==e?(W=l,l=Pl(f,y)):(i=l,l=e)}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function xr(){var l,f,y,c=i*76+27,s=O[c];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=Zt,i++):(f=e,C===0&&S(Jn)),f!==e?(y=Ue(),y!==e?(f=[f,y],l=f):(i=l,l=e)):(i=l,l=e),l===e&&(l=xe()),O[c]={nextPos:i,result:l},l)}function Sa(){var l,f,y=i*76+28,c=O[y];return c?(i=c.nextPos,c.result):(l=i,t.substr(i,2)===lt?(f=lt,i+=2):(f=e,C===0&&S(Zn)),f===e&&(t.substr(i,2)===ot?(f=ot,i+=2):(f=e,C===0&&S(Ni)),f===e&&(t.substr(i,2)===Ie?(f=Ie,i+=2):(f=e,C===0&&S(Ti)),f===e&&(t.substr(i,2)===at?(f=at,i+=2):(f=e,C===0&&S(Ii)),f===e&&(t.substr(i,2)===Mt?(f=Mt,i+=2):(f=e,C===0&&S(ji)),f===e&&(t.substr(i,2)===St?(f=St,i+=2):(f=e,C===0&&S(Ri)),f===e&&(t.charCodeAt(i)===60?(f=Qe,i++):(f=e,C===0&&S(Gn)),f===e&&(t.charCodeAt(i)===62?(f=Fr,i++):(f=e,C===0&&S(gn)),f===e&&(t.charCodeAt(i)===43?(f=Dt,i++):(f=e,C===0&&S(Qn)),f===e&&(t.charCodeAt(i)===45?(f=yr,i++):(f=e,C===0&&S(Di)),f===e&&(t.charCodeAt(i)===42?(f=kt,i++):(f=e,C===0&&S(Xn)),f===e&&(t.charCodeAt(i)===94?(f=dr,i++):(f=e,C===0&&S(Yn)),f===e&&(t.charCodeAt(i)===47?(f=Or,i++):(f=e,C===0&&S(Li)),f===e&&(t.charCodeAt(i)===37?(f=_r,i++):(f=e,C===0&&S(Bi))))))))))))))),f!==e&&(W=l,f=ia()),l=f,O[y]={nextPos:i,result:l},l)}function mo(){var l,f,y,c=i*76+29,s=O[c];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===33?(f=Er,i++):(f=e,C===0&&S(Hi)),f!==e?(y=Re(),y!==e?(W=l,l=El(y)):(i=l,l=e)):(i=l,l=e),O[c]={nextPos:i,result:l},l)}function br(){var l,f,y,c,s=i*76+30,o=O[s];if(o)return i=o.nextPos,o.result;if(l=i,f=Dr(),f!==e){if(y=[],c=An(),c===e&&(c=Fa(),c===e&&(c=Cn())),c!==e)for(;c!==e;)y.push(c),c=An(),c===e&&(c=Fa(),c===e&&(c=Cn()));else y=e;y!==e?(W=l,l=Ml(f,y)):(i=l,l=e)}else i=l,l=e;return O[s]={nextPos:i,result:l},l}function An(){var l,f,y,c,s,o,p=i*76+31,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===40?(f=E,i++):(f=e,C===0&&S(wr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();for(c=$o(),c===e&&(c=null),s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e?(W=l,l=Sl(c)):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function $o(){var l,f,y,c,s,o,p=i*76+32,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Re(),f!==e){for(y=[],c=i,s=Lr(),s!==e?(o=Re(),o!==e?(W=c,c=la(f,o)):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=Lr(),s!==e?(o=Re(),o!==e?(W=c,c=la(f,o)):(i=c,c=e)):(i=c,c=e);W=l,l=Fl(f,y)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Fa(){var l,f,y,c,s,o,p=i*76+33,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===91?(f=Ft,i++):(f=e,C===0&&S(dn)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=Re(),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===93?(o=q,i++):(o=e,C===0&&S(ks)),o!==e?(W=l,l=oa(c)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Cn(){var l,f,y,c=i*76+34,s=O[c];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===46?(f=U,i++):(f=e,C===0&&S(is)),f!==e?(y=He(),y!==e?(W=l,l=Ol(y)):(i=l,l=e)):(i=l,l=e),O[c]={nextPos:i,result:l},l)}function xo(){var l,f,y,c,s,o,p,u,g,v,m=i*76+35,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===K?(f=K,i+=2):(f=e,C===0&&S(yn)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=Re(),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;if(s!==e)if(o=Tt(),o!==e){if(p=i,u=[],g=x(),g!==e)for(;g!==e;)u.push(g),g=x();else u=e;if(u!==e?(g=Oa(),g!==e?p=g:(i=p,p=e)):(i=p,p=e),p===e&&(p=null),u=i,g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;g!==e?(v=bo(),v!==e?u=v:(i=u,u=e)):(i=u,u=e),u===e&&(u=null),W=l,l=Nl(c,o,p,u)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function Oa(){var l,f,y,c,s,o,p=i*76+36,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Us(),f!==e){for(y=[],c=i,s=[],o=x();o!==e;)s.push(o),o=x();for(o=Us(),o!==e?c=o:(i=c,c=e);c!==e;){for(y.push(c),c=i,s=[],o=x();o!==e;)s.push(o),o=x();o=Us(),o!==e?c=o:(i=c,c=e)}W=l,l=Tl(f,y)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Us(){var l,f,y,c,s,o,p,u=i*76+37,g=O[u];if(g)return i=g.nextPos,g.result;if(l=i,t.substr(i,4)===te?(f=te,i+=4):(f=e,C===0&&S(Ui)),f!==e)if(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();if(s=Re(),s!==e){for(o=[],p=x();p!==e;)o.push(p),p=x();p=Tt(),p!==e?(W=l,l=Il(s,p)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e;return O[u]={nextPos:i,result:l},l}function bo(){var l,f,y,c,s,o=i*76+38,p=O[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,4)===ce?(f=ce,i+=4):(f=e,C===0&&S(qi)),f!==e)if(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();s=Tt(),s!==e?(W=l,l=jl(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return O[o]={nextPos:i,result:l},l}function Ao(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I,R,Z,ye=i*76+39,re=O[ye];if(re)return i=re.nextPos,re.result;if(l=i,t.substr(i,5)===he?(f=he,i+=5):(f=e,C===0&&S(zi)),f!==e)if(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();if(s=Re(),s!==e){for(o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===123?(p=D,i++):(p=e,C===0&&S(sr)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();if(g=[],v=i,m=Re(),m!==e){for(w=[],_=x();_!==e;)w.push(_),_=x();if(t.substr(i,2)===ie?(_=ie,i+=2):(_=e,C===0&&S(Es)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();if(I=Tt(),I!==e){for(R=[],Z=x();Z!==e;)R.push(Z),Z=x();W=v,v=ua(s,m,I)}else i=v,v=e}else i=v,v=e}else i=v,v=e;if(v!==e)for(;v!==e;)if(g.push(v),v=i,m=Re(),m!==e){for(w=[],_=x();_!==e;)w.push(_),_=x();if(t.substr(i,2)===ie?(_=ie,i+=2):(_=e,C===0&&S(Es)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();if(I=Tt(),I!==e){for(R=[],Z=x();Z!==e;)R.push(Z),Z=x();W=v,v=ua(s,m,I)}else i=v,v=e}else i=v,v=e}else i=v,v=e;else g=e;if(g!==e){if(v=i,t.charCodeAt(i)===42?(m=kt,i++):(m=e,C===0&&S(Xn)),m!==e){for(w=[],_=x();_!==e;)w.push(_),_=x();if(t.substr(i,2)===ie?(_=ie,i+=2):(_=e,C===0&&S(Es)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();if(I=Tt(),I!==e){for(R=[],Z=x();Z!==e;)R.push(Z),Z=x();v=I}else i=v,v=e}else i=v,v=e}else i=v,v=e;for(v===e&&(v=null),m=[],w=x();w!==e;)m.push(w),w=x();t.charCodeAt(i)===125?(w=V,i++):(w=e,C===0&&S(Ye)),w!==e?(W=l,l=Rl(s,g,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;else i=l,l=e;return O[ye]={nextPos:i,result:l},l}function _n(){var l,f,y,c,s,o,p,u,g=i*76+40,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===Ne?(f=Ne,i+=4):(f=e,C===0&&S(Ms)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===123?(c=D,i++):(c=e,C===0&&S(sr)),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();if(o=os(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();t.charCodeAt(i)===125?(u=V,i++):(u=e,C===0&&S(Ye)),u!==e?(W=l,l=fa(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function Co(){var l,f,y=i*76+41,c=O[y];return c?(i=c.nextPos,c.result):(l=i,f=Fo(),f!==e&&(W=l,f=Dl(f)),l=f,O[y]={nextPos:i,result:l},l)}function Na(){var l,f,y,c,s,o,p=i*76+42,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===96?(f=de,i++):(f=e,C===0&&S(Ss)),f!==e){for(y=[],c=i,s=i,C++,t.charCodeAt(i)===96?(o=de,i++):(o=e,C===0&&S(Ss)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Ta(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,t.charCodeAt(i)===96?(o=de,i++):(o=e,C===0&&S(Ss)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Ta(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);t.charCodeAt(i)===96?(c=de,i++):(c=e,C===0&&S(Ss)),c!==e?(W=l,l=Ll(y)):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Ta(){var l,f,y,c,s,o,p=i*76+43,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=D,i++):(f=e,C===0&&S(sr)),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();if(c=Re(),c!==e){for(s=[],o=xe();o!==e;)s.push(o),o=xe();t.charCodeAt(i)===125?(o=V,i++):(o=e,C===0&&S(Ye)),o!==e?l=c:(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,f=[],y=Ia(),y!==e)for(;y!==e;)f.push(y),y=Ia();else f=e;f!==e&&(W=l,f=Bl(f)),l=f}return O[p]={nextPos:i,result:l},l}function Ia(){var l,f=i*76+44,y=O[f];return y?(i=y.nextPos,y.result):(l=ja(),l===e&&(Gt.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,C===0&&S(Wi))),O[f]={nextPos:i,result:l},l)}function ja(){var l,f,y,c=i*76+45,s=O[c];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=Zt,i++):(f=e,C===0&&S(Jn)),f!==e?(_s.test(t.charAt(i))?(y=t.charAt(i),i++):(y=e,C===0&&S(Fs)),y!==e?l=y:(i=l,l=e)):(i=l,l=e),O[c]={nextPos:i,result:l},l)}function qs(){var l,f,y,c,s,o,p=i*76+46,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===34?(f=we,i++):(f=e,C===0&&S(Os)),f!==e){for(y=[],c=i,s=i,C++,t.charCodeAt(i)===34?(o=we,i++):(o=e,C===0&&S(Os)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=kn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr))),o!==e?(W=c,c=ca(o)):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,t.charCodeAt(i)===34?(o=we,i++):(o=e,C===0&&S(Os)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=kn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr))),o!==e?(W=c,c=ca(o)):(i=c,c=e)):(i=c,c=e);t.charCodeAt(i)===34?(c=we,i++):(c=e,C===0&&S(Os)),c!==e?(W=l,l=Hl(y)):(i=l,l=e)}else i=l,l=e;if(l===e)if(l=i,t.charCodeAt(i)===39?(f=ue,i++):(f=e,C===0&&S(Ns)),f!==e){for(y=[],c=i,s=i,C++,t.charCodeAt(i)===39?(o=ue,i++):(o=e,C===0&&S(Ns)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Pn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr))),o!==e?(W=c,c=ha(o)):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,t.charCodeAt(i)===39?(o=ue,i++):(o=e,C===0&&S(Ns)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Pn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr))),o!==e?(W=c,c=ha(o)):(i=c,c=e)):(i=c,c=e);t.charCodeAt(i)===39?(c=ue,i++):(c=e,C===0&&S(Ns)),c!==e?(W=l,l=pa(y)):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function kn(){var l,f,y=i*76+47,c=O[y];return c?(i=c.nextPos,c.result):(l=i,t.substr(i,2)===De?(f=De,i+=2):(f=e,C===0&&S(Ts)),f!==e&&(W=l,f=Ul()),l=f,O[y]={nextPos:i,result:l},l)}function Pn(){var l,f,y=i*76+48,c=O[y];return c?(i=c.nextPos,c.result):(l=i,t.substr(i,2)===je?(f=je,i+=2):(f=e,C===0&&S(Is)),f!==e&&(W=l,f=va()),l=f,O[y]={nextPos:i,result:l},l)}function Ra(){var l,f=i*76+49,y=O[f];return y?(i=y.nextPos,y.result):(l=En(),l===e&&(l=Da()),O[f]={nextPos:i,result:l},l)}function En(){var l,f,y,c,s,o,p=i*76+50,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,Wr.test(t.charAt(i))?(t.charAt(i),i++):C===0&&S(js),Ot.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(ea)),f!==e){if(y=[],ht.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(Et)),c!==e)for(;c!==e;)y.push(c),ht.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(Et));else y=e;if(y!==e)if(t.charCodeAt(i)===46?(c=U,i++):(c=e,C===0&&S(is)),c!==e){if(s=[],ht.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,C===0&&S(Et)),o!==e)for(;o!==e;)s.push(o),ht.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,C===0&&S(Et));else s=e;s!==e?(W=l,l=ql()):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,Wr.test(t.charAt(i))?(t.charAt(i),i++):C===0&&S(js),ht.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(Et)),f!==e)if(t.charCodeAt(i)===46?(y=U,i++):(y=e,C===0&&S(is)),y!==e){if(c=[],ht.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,C===0&&S(Et)),s!==e)for(;s!==e;)c.push(s),ht.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,C===0&&S(Et));else c=e;c!==e?(W=l,l=zl()):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Da(){var l,f,y,c,s=i*76+51,o=O[s];if(o)return i=o.nextPos,o.result;if(l=i,Wr.test(t.charAt(i))?(t.charAt(i),i++):C===0&&S(js),Ot.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(ea)),f!==e){if(y=[],ht.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(Et)),c!==e)for(;c!==e;)y.push(c),ht.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(Et));else y=e;y!==e?(W=l,l=Wl()):(i=l,l=e)}else i=l,l=e;return l===e&&(l=i,Wr.test(t.charAt(i))?(t.charAt(i),i++):C===0&&S(js),ht.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(Et)),f!==e?(W=l,l=Vl()):(i=l,l=e)),O[s]={nextPos:i,result:l},l}function Mn(){var l,f=i*76+52,y=O[f];return y?(i=y.nextPos,y.result):(l=La(),l===e&&(l=_o()),O[f]={nextPos:i,result:l},l)}function La(){var l,f,y,c,s=i*76+53,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===Be?(f=Be,i+=4):(f=e,C===0&&S(ta)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=Kl()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function _o(){var l,f,y,c,s=i*76+54,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===We?(f=We,i+=5):(f=e,C===0&&S(nr)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=Jl()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function Ba(){var l,f,y,c,s=i*76+55,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===Ze?(f=Ze,i+=4):(f=e,C===0&&S(Vi)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=Zl()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function Ha(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I=i*76+56,R=O[I];if(R)return i=R.nextPos,R.result;if(l=i,t.charCodeAt(i)===123?(f=D,i++):(f=e,C===0&&S(sr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=[],s=i,o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.charCodeAt(i)===58?(u=ae,i++):(u=e,C===0&&S(dt)),u!==e){if(g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;if(g!==e)if(v=Re(),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();for(t.charCodeAt(i)===44?(w=G,i++):(w=e,C===0&&S(mt)),w===e&&(t.charCodeAt(i)===59?(w=rt,i++):(w=e,C===0&&S(Rs))),w===e&&(w=null),_=[],P=x();P!==e;)_.push(P),P=x();W=s,s=ga(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(c.push(s),s=i,o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.charCodeAt(i)===58?(u=ae,i++):(u=e,C===0&&S(dt)),u!==e){if(g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;if(g!==e)if(v=Re(),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();for(t.charCodeAt(i)===44?(w=G,i++):(w=e,C===0&&S(mt)),w===e&&(t.charCodeAt(i)===59?(w=rt,i++):(w=e,C===0&&S(Rs))),w===e&&(w=null),_=[],P=x();P!==e;)_.push(P),P=x();W=s,s=ga(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=V,i++):(s=e,C===0&&S(Ye)),s!==e?(W=l,l=Gl(c)):(i=l,l=e)}else i=l,l=e;return O[I]={nextPos:i,result:l},l}function ko(){var l,f,y,c,s,o,p,u,g,v,m=i*76+57,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Ft,i++):(f=e,C===0&&S(dn)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=[],s=i,o=Re(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();W=s,s=da(o)}else i=s,s=e;for(;s!==e;)if(c.push(s),s=i,o=Re(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();W=s,s=da(o)}else i=s,s=e;for(s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===93?(o=q,i++):(o=e,C===0&&S(ks)),o!==e?(W=l,l=ya(c)):(i=l,l=e)}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function Sn(){var l,f,y,c,s,o,p,u=i*76+58,g=O[u];if(g)return i=g.nextPos,g.result;if(l=i,f=He(),f!==e){for(y=i,c=[],s=x();s!==e;)c.push(s),s=x();if(t.charCodeAt(i)===58?(s=ae,i++):(s=e,C===0&&S(dt)),s!==e){for(o=[],p=x();p!==e;)o.push(p),p=x();p=Ut(),p!==e?y=p:(i=y,y=e)}else i=y,y=e;y===e&&(y=null),W=l,l=Ql(f,y)}else i=l,l=e;return O[u]={nextPos:i,result:l},l}function Fn(){var l,f,y,c,s,o,p=i*76+59,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Sn(),f!==e){for(y=[],c=i,s=Lr(),s!==e?(o=Sn(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=Lr(),s!==e?(o=Sn(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);W=l,l=wa(f,y)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Ua(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I,R,Z,ye=i*76+60,re=O[ye];if(re)return i=re.nextPos,re.result;if(l=i,t.charCodeAt(i)===64?(f=st,i++):(f=e,C===0&&S(Ki)),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();if(c=He(),c!==e){for(s=[],o=xe();o!==e;)s.push(o),o=xe();if(t.charCodeAt(i)===40?(o=E,i++):(o=e,C===0&&S(wr)),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(u=Fn(),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();if(t.charCodeAt(i)===41?(v=F,i++):(v=e,C===0&&S(Pt)),v!==e){for(m=i,w=[],_=x();_!==e;)w.push(_),_=x();if(t.charCodeAt(i)===58?(_=ae,i++):(_=e,C===0&&S(dt)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();I=Ut(),I!==e?m=I:(i=m,m=e)}else i=m,m=e;for(m===e&&(m=null),w=[],_=x();_!==e;)w.push(_),_=x();if(t.charCodeAt(i)===123?(_=D,i++):(_=e,C===0&&S(sr)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();for(I=os(),I===e&&(I=null),R=[],Z=x();Z!==e;)R.push(Z),Z=x();t.charCodeAt(i)===125?(Z=V,i++):(Z=e,C===0&&S(Ye)),Z!==e?(W=l,l=Xl(y,c,s,u,m,I)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[ye]={nextPos:i,result:l},l}function Po(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P=i*76+61,I=O[P];if(I)return i=I.nextPos,I.result;if(l=i,t.substr(i,2)===wt?(f=wt,i+=2):(f=e,C===0&&S(ls)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();for(c=Fn(),c===e&&(c=null),s=[],o=x();o!==e;)s.push(o),o=x();if(t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e){for(p=i,u=[],g=x();g!==e;)u.push(g),g=x();if(t.charCodeAt(i)===58?(g=ae,i++):(g=e,C===0&&S(dt)),g!==e){for(v=[],m=x();m!==e;)v.push(m),m=x();m=Ut(),m!==e?p=m:(i=p,p=e)}else i=p,p=e;for(p===e&&(p=null),u=[],g=x();g!==e;)u.push(g),g=x();if(t.charCodeAt(i)===123?(g=D,i++):(g=e,C===0&&S(sr)),g!==e){for(v=[],m=x();m!==e;)v.push(m),m=x();for(m=os(),m===e&&(m=null),w=[],_=x();_!==e;)w.push(_),_=x();t.charCodeAt(i)===125?(_=V,i++):(_=e,C===0&&S(Ye)),_!==e?(W=l,l=Yl(c,p,m)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[P]={nextPos:i,result:l},l}function On(){var l,f,y,c,s,o,p,u,g,v,m=i*76+62,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Ft,i++):(f=e,C===0&&S(dn)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=[],s=i,o=Te(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();W=s,s=ma(o)}else i=s,s=e;for(;s!==e;)if(c.push(s),s=i,o=Te(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();W=s,s=ma(o)}else i=s,s=e;for(s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===93?(o=q,i++):(o=e,C===0&&S(ks)),o!==e?(W=l,l=eo(c)):(i=l,l=e)}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function qa(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I=i*76+63,R=O[I];if(R)return i=R.nextPos,R.result;if(l=i,t.charCodeAt(i)===123?(f=D,i++):(f=e,C===0&&S(sr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=[],s=i,o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.charCodeAt(i)===58?(u=ae,i++):(u=e,C===0&&S(dt)),u!==e){if(g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;if(g!==e)if(v=Te(),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();for(t.charCodeAt(i)===44?(w=G,i++):(w=e,C===0&&S(mt)),w===e&&(t.charCodeAt(i)===59?(w=rt,i++):(w=e,C===0&&S(Rs))),w===e&&(w=null),_=[],P=x();P!==e;)_.push(P),P=x();W=s,s=$a(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(c.push(s),s=i,o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.charCodeAt(i)===58?(u=ae,i++):(u=e,C===0&&S(dt)),u!==e){if(g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;if(g!==e)if(v=Te(),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();for(t.charCodeAt(i)===44?(w=G,i++):(w=e,C===0&&S(mt)),w===e&&(t.charCodeAt(i)===59?(w=rt,i++):(w=e,C===0&&S(Rs))),w===e&&(w=null),_=[],P=x();P!==e;)_.push(P),P=x();W=s,s=$a(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=V,i++):(s=e,C===0&&S(Ye)),s!==e?(W=l,l=xa(c)):(i=l,l=e)}else i=l,l=e;return O[I]={nextPos:i,result:l},l}function Ut(){var l,f=i*76+64,y=O[f];return y?(i=y.nextPos,y.result):(l=Eo(),l===e&&(l=So()),O[f]={nextPos:i,result:l},l)}function Eo(){var l,f,y,c,s,o,p,u,g,v,m=i*76+65,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===wt?(f=wt,i+=2):(f=e,C===0&&S(ls)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();for(c=Mo(),c===e&&(c=null),s=[],o=x();o!==e;)s.push(o),o=x();if(t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.substr(i,2)===ie?(u=ie,i+=2):(u=e,C===0&&S(Es)),u!==e){for(g=[],v=x();v!==e;)g.push(v),v=x();v=Ut(),v!==e?(W=l,l=to(c,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function Mo(){var l,f,y,c,s,o,p=i*76+66,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Ut(),f!==e){for(y=[],c=i,s=Lr(),s!==e?(o=Ut(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=Lr(),s!==e?(o=Ut(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);W=l,l=ba(f,y)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function So(){var l,f,y,c,s,o,p,u,g=i*76+67,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=He(),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();if(t.charCodeAt(i)===60?(c=Qe,i++):(c=e,C===0&&S(Gn)),c!==e){for(s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ut(),o!==e){for(p=[],u=xe();u!==e;)p.push(u),u=xe();t.charCodeAt(i)===62?(u=Fr,i++):(u=e,C===0&&S(gn)),u!==e?(W=l,l=ro(f,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return l===e&&(l=i,f=He(),f!==e&&(W=l,f=so(f)),l=f),O[g]={nextPos:i,result:l},l}function He(){var l,f,y,c,s=i*76+68,o=O[s];if(o)return i=o.nextPos,o.result;if(l=i,It.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(Ji)),f!==e){for(y=[],Vn.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(wn));c!==e;)y.push(c),Vn.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(wn));W=l,l=no()}else i=l,l=e;return O[s]={nextPos:i,result:l},l}function Fo(){var l,f,y,c,s,o,p=i*76+69,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=He(),f!==e){for(y=[],c=i,t.charCodeAt(i)===58?(s=ae,i++):(s=e,C===0&&S(dt)),s!==e?(o=He(),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,t.charCodeAt(i)===58?(s=ae,i++):(s=e,C===0&&S(dt)),s!==e?(o=He(),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);W=l,l=ao()}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Lr(){var l,f,y,c,s,o=i*76+70,p=O[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=x();y!==e;)f.push(y),y=x();if(t.charCodeAt(i)===44?(y=G,i++):(y=e,C===0&&S(mt)),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();f=[f,y,c],l=f}else i=l,l=e;if(l===e)if(l=[],f=x(),f!==e)for(;f!==e;)l.push(f),f=x();else l=e;return O[o]={nextPos:i,result:l},l}function Tt(){var l,f,y,c,s,o,p=i*76+71,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=D,i++):(f=e,C===0&&S(sr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();for(c=os(),c===e&&(c=null),s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===125?(o=V,i++):(o=e,C===0&&S(Ye)),o!==e?(W=l,l=io(c)):(i=l,l=e)}else i=l,l=e;return l===e&&(l=fr()),O[p]={nextPos:i,result:l},l}function Ue(){var l,f=i*76+72,y=O[f];return y?(i=y.nextPos,y.result):(t.substr(i,2)===Lt?(l=Lt,i+=2):(l=e,C===0&&S(Zi)),l===e&&(Kn.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,C===0&&S(ra))),O[f]={nextPos:i,result:l},l)}function za(){var l,f,y=i*76+73,c=O[y];return c?(i=c.nextPos,c.result):(l=i,C++,t.length>i?(f=t.charAt(i),i++):(f=e,C===0&&S(tr)),C--,f===e?l=void 0:(i=l,l=e),l===e&&(l=Ue()),O[y]={nextPos:i,result:l},l)}function x(){var l,f=i*76+74,y=O[f];return y?(i=y.nextPos,y.result):(Ci.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,C===0&&S(Gi)),O[f]={nextPos:i,result:l},l)}function xe(){var l,f=i*76+75,y=O[f];return y?(i=y.nextPos,y.result):(_i.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,C===0&&S(Qi)),O[f]={nextPos:i,result:l},l)}function ne(l,f,y){const c={type:l};f.children=y;for(const o of Object.keys(f))f[o]!==void 0&&(c[o]=f[o]);const s=T();return c.loc={start:s.start.offset,end:s.end.offset-1},c}if(jr=d(),jr!==e&&i===t.length)return jr;throw jr!==e&&i`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>Lf(n)).join(", "),e=Lf(t.result);return`@(${r}) { ${e} }`}}}function Mu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return $v(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Mu(t.inner):r=$v("any"),kx(t.name,[r])}}throw new au(`Unknown type: '${Lf(t)}'`)}else{const r=t.args.map(e=>Mu(e));return Px(r,Mu(t.result))}}function Ex(t){switch(t.type){case"def":{t.varType!=null&&Mu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Mu(r.argType);t.retType!=null&&Mu(t.retType);break}}return t}function Mx(t){for(const r of t)nt(r,Ex);return t}function Bf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=Bf(n.expr.children)),r.push(n);else{if(e.length>0)throw new au("invalid attribute.");switch(n.type){case"fn":{n.children=Bf(n.children);break}case"block":{n.statements=Bf(n.statements);break}}r.push(n)}if(e.length>0)throw new au("invalid attribute.");return r}function Sx(t){if($x(t)&&Xg(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const h of r)switch(h.type){case"callChain":{n=xx(n,h.args,h.loc);break}case"indexChain":{n=bx(n,h.index,h.loc);break}case"propChain":{n=Ax(n,h.name,h.loc);break}}return n}return t}function Fx(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:qo(t.left),right:qo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:qo(t.left),right:qo(t.right)}),priority:3}};function Nx(t){const r=t.operators.map(n=>{const h=Ox[n];if(h==null)throw new au(`No such operator: ${n}.`);return h});let e=Hf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?Nx(e):e);return t}var Za;let Ix=(Za=class{constructor(){me(this,"plugins");this.plugins={validate:[_x,Mx],transform:[Bf,Fx,Tx]}}static parse(r){return Za.instance==null&&(Za.instance=new Za),Za.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=mv(r,{startRule:"Preprocess"});e=mv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new au(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`):new au(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}},me(Za,"instance"),Za);const jx="0.15.0",Rx={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`};let Mh=[],zu=null;function Dx(t){return Mh=Ix.parse(t),JSON.stringify(Mh,null," ")}async function Lx(t){zu==null||zu.abort(),zu=new As({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:kh(r,!0),print:!0})},log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:kh(e.val,!0),print:!1});break}}});try{await zu.exec(Mh)}catch(r){t.err(r)}}const Bx=Object.freeze(Object.defineProperty({__proto__:null,exec:Lx,parse:Dx,samples:Rx,version:jx},Symbol.toStringTag,{value:"Module"}));class $c extends Error{constructor(e,n){super(e);me(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,$c)}}class iu extends $c{constructor(r,e){super(r,e)}}class er extends $c{constructor(r,e){super(r,e)}}class Hx extends er{constructor(r,e){super(r,e)}}var fu=globalThis&&globalThis.__decorate||function(t,r,e,n){var h=arguments.length,d=h<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var b=t.length-1;b>=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};class Wn{constructor(r=[],e,n){me(this,"parent");me(this,"layerdStates");me(this,"name");me(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new Wn(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r);return this.log("read",{var:r,val:n}),n}throw new er(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new er(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e)}assign(r,e){let n=1;for(const h of this.layerdStates){if(h.has(r)){h.set(r,e),this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new er(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}}fu([ct],Wn.prototype,"log",null);fu([ct],Wn.prototype,"onUpdated",null);fu([ct],Wn.prototype,"createChildScope",null);fu([ct],Wn.prototype,"get",null);fu([ct],Wn.prototype,"getAll",null);fu([ct],Wn.prototype,"add",null);fu([ct],Wn.prototype,"assign",null);let kf;const Ux=new Uint8Array(16);function qx(){if(!kf&&(kf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!kf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kf(Ux)}const Ur=[];for(let t=0;t<256;++t)Ur.push((t+256).toString(16).slice(1));function zx(t,r=0){return(Ur[t[r+0]]+Ur[t[r+1]]+Ur[t[r+2]]+Ur[t[r+3]]+"-"+Ur[t[r+4]]+Ur[t[r+5]]+"-"+Ur[t[r+6]]+Ur[t[r+7]]+"-"+Ur[t[r+8]]+Ur[t[r+9]]+"-"+Ur[t[r+10]]+Ur[t[r+11]]+Ur[t[r+12]]+Ur[t[r+13]]+Ur[t[r+14]]+Ur[t[r+15]]).toLowerCase()}const Wx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xv={randomUUID:Wx};function Vx(t,r,e){if(xv.randomUUID&&!r&&!t)return xv.randomUUID();t=t||{};const n=t.random||(t.rng||qx)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let h=0;h<16;++h)r[e+h]=n[h];return r}return zx(n)}const Rt={type:"null"},fn={type:"bool",value:!0},Zs={type:"bool",value:!1},Ve=t=>({type:"num",value:t}),Xt=t=>({type:"str",value:t}),Su=t=>({type:"bool",value:t}),pp=t=>({type:"obj",value:t}),Gr=t=>({type:"arr",value:t}),Kx=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),Ee=t=>({type:"fn",native:t}),Jx=t=>({type:"return",value:t}),Zx=()=>({type:"break",value:null}),Gx=()=>({type:"continue",value:null}),Qx=t=>t.type==="return"?t.value:t;function en(t){if(t==null)throw new er("Expect anything, but got nothing.")}function ds(t){if(t==null)throw new er("Expect boolean, but got nothing.");if(t.type!=="bool")throw new er(`Expect boolean, but got ${t.type}.`)}function vi(t){if(t==null)throw new er("Expect function, but got nothing.");if(t.type!=="fn")throw new er(`Expect function, but got ${t.type}.`)}function Tr(t){if(t==null)throw new er("Expect string, but got nothing.");if(t.type!=="str")throw new er(`Expect string, but got ${t.type}.`)}function ze(t){if(t==null)throw new er("Expect number, but got nothing.");if(t.type!=="num")throw new er(`Expect number, but got ${t.type}.`)}function li(t){if(t==null)throw new er("Expect object, but got nothing.");if(t.type!=="obj")throw new er(`Expect object, but got ${t.type}.`)}function ef(t){if(t==null)throw new er("Expect array, but got nothing.");if(t.type!=="arr")throw new er(`Expect array, but got ${t.type}.`)}function Xx(t){return t.type==="str"}function Yx(t){return t.type==="num"}function eb(t){return t.type==="obj"}function tb(t){return t.type==="arr"}function Sh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function Fh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>Fh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Oh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Oh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=Oh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Nh(t){if(t===null)return Rt;if(typeof t=="boolean")return Su(t);if(typeof t=="string")return Xt(t);if(typeof t=="number")return Ve(t);if(Array.isArray(t))return Gr(t.map(r=>Nh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,Nh(n));return pp(r)}return Rt}const rb={help:Xt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Xt("0.14.1"),"Core:ai":Xt("kawaii"),"Core:not":Ee(([t])=>(ds(t),t.value?Zs:fn)),"Core:eq":Ee(([t,r])=>(en(t),en(r),Sh(t,r)?fn:Zs)),"Core:neq":Ee(([t,r])=>(en(t),en(r),Sh(t,r)?Zs:fn)),"Core:and":Ee(([t,r])=>(ds(t),t.value?(ds(r),r.value?fn:Zs):Zs)),"Core:or":Ee(([t,r])=>(ds(t),t.value?fn:(ds(r),r.value?fn:Zs))),"Core:add":Ee(([t,r])=>(ze(t),ze(r),Ve(t.value+r.value))),"Core:sub":Ee(([t,r])=>(ze(t),ze(r),Ve(t.value-r.value))),"Core:mul":Ee(([t,r])=>(ze(t),ze(r),Ve(t.value*r.value))),"Core:pow":Ee(([t,r])=>{ze(t),ze(r);const e=t.value**r.value;if(isNaN(e))throw new er("Invalid operation.");return Ve(e)}),"Core:div":Ee(([t,r])=>{ze(t),ze(r);const e=t.value/r.value;if(isNaN(e))throw new er("Invalid operation.");return Ve(e)}),"Core:mod":Ee(([t,r])=>(ze(t),ze(r),Ve(t.value%r.value))),"Core:gt":Ee(([t,r])=>(ze(t),ze(r),t.value>r.value?fn:Zs)),"Core:lt":Ee(([t,r])=>(ze(t),ze(r),t.value(ze(t),ze(r),t.value>=r.value?fn:Zs)),"Core:lteq":Ee(([t,r])=>(ze(t),ze(r),t.value<=r.value?fn:Zs)),"Core:type":Ee(([t])=>(en(t),Xt(t.type))),"Core:to_str":Ee(([t])=>(en(t),t.type==="str"?t:t.type==="num"?Xt(t.value.toString()):Xt("?"))),"Core:range":Ee(([t,r])=>(ze(t),ze(r),t.valueVe(n+t.value))):t.value>r.value?Gr(Array.from({length:t.value-r.value+1},(e,n)=>Ve(t.value-n))):Gr([t]))),"Util:uuid":Ee(()=>Xt(Vx())),"Json:stringify":Ee(([t])=>(en(t),Xt(JSON.stringify(Oh(t))))),"Json:parse":Ee(([t])=>(Tr(t),Nh(JSON.parse(t.value)))),"Json:parsable":Ee(([t])=>{Tr(t);try{JSON.parse(t.value)}catch{return Su(!1)}return Su(!0)}),"Date:now":Ee(()=>Ve(Date.now())),"Date:year":Ee(([t])=>(t&&ze(t),Ve(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":Ee(([t])=>(t&&ze(t),Ve(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":Ee(([t])=>(t&&ze(t),Ve(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":Ee(([t])=>(t&&ze(t),Ve(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":Ee(([t])=>(t&&ze(t),Ve(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":Ee(([t])=>(t&&ze(t),Ve(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":Ee(([t])=>(Tr(t),Ve(new Date(t.value).getTime()))),"Math:Infinity":Ve(1/0),"Math:PI":Ve(Math.PI),"Math:sin":Ee(([t])=>(ze(t),Ve(Math.sin(t.value)))),"Math:cos":Ee(([t])=>(ze(t),Ve(Math.cos(t.value)))),"Math:abs":Ee(([t])=>(ze(t),Ve(Math.abs(t.value)))),"Math:sqrt":Ee(([t])=>{ze(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new er("Invalid operation.");return Ve(r)}),"Math:round":Ee(([t])=>(ze(t),Ve(Math.round(t.value)))),"Math:ceil":Ee(([t])=>(ze(t),Ve(Math.ceil(t.value)))),"Math:floor":Ee(([t])=>(ze(t),Ve(Math.floor(t.value)))),"Math:min":Ee(([t,r])=>(ze(t),ze(r),Ve(Math.min(t.value,r.value)))),"Math:max":Ee(([t,r])=>(ze(t),ze(r),Ve(Math.max(t.value,r.value)))),"Math:rnd":Ee(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Ve(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Ve(Math.random())),"Math:gen_rng":Ee(([t])=>{if(en(t),t.type!=="num"&&t.type!=="str")return Rt;const r=cf(t.value.toString());return Ee(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Ve(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Ve(r()))}),"Num:to_hex":Ee(([t])=>(ze(t),Xt(t.value.toString(16)))),"Num:from_hex":Ee(([t])=>(Tr(t),Ve(parseInt(t.value,16)))),"Str:lf":Xt(` +`),"Str:lt":Ee(([t,r])=>(Tr(t),Tr(r),t.value(Tr(t),Tr(r),t.value>r.value?Ve(-1):t.value===r.value?Ve(0):Ve(1))),"Obj:keys":Ee(([t])=>(li(t),Gr(Array.from(t.value.keys()).map(r=>Xt(r))))),"Obj:vals":Ee(([t])=>(li(t),Gr(Array.from(t.value.values())))),"Obj:kvs":Ee(([t])=>(li(t),Gr(Array.from(t.value.entries()).map(([r,e])=>Gr([Xt(r),e]))))),"Obj:get":Ee(([t,r])=>(li(t),Tr(r),t.value.get(r.value)??Rt)),"Obj:set":Ee(([t,r,e])=>(li(t),Tr(r),en(e),t.value.set(r.value,e),Rt)),"Obj:has":Ee(([t,r])=>(li(t),Tr(r),Su(t.value.has(r.value)))),"Obj:copy":Ee(([t])=>(li(t),pp(new Map(t.value)))),"Async:interval":Ee(async([t,r,e],n)=>{ze(t),vi(r),e&&(ds(e),e.value&&n.call(r,[]));const h=setInterval(()=>{n.call(r,[])},t.value),d=()=>{clearInterval(h)};return n.registerAbortHandler(d),Ee(([],$)=>{clearInterval(h),$.unregisterAbortHandler(d)})}),"Async:timeout":Ee(async([t,r],e)=>{ze(t),vi(r);const n=setTimeout(()=>{e.call(r,[])},t.value),h=()=>{clearTimeout(n)};return e.registerAbortHandler(h),Ee(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(h)})})},gu={num:{to_str:t=>Ee(async(r,e)=>Xt(t.value.toString()))},str:{to_num:t=>Ee(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?Rt:Ve(n)}),len:t=>Ve(hf(t.value)),replace:t=>Ee(async([r,e],n)=>(Tr(r),Tr(e),Xt(t.value.split(r.value).join(e.value)))),index_of:t=>Ee(async([r],e)=>(Tr(r),Ve(vf(t.value,r.value)))),incl:t=>Ee(async([r],e)=>(Tr(r),t.value.includes(r.value)?fn:Zs)),trim:t=>Ee(async(r,e)=>Xt(t.value.trim())),upper:t=>Ee(async(r,e)=>Xt(t.value.toUpperCase())),lower:t=>Ee(async(r,e)=>Xt(t.value.toLowerCase())),split:t=>Ee(async([r],e)=>(r&&Tr(r),Gr(r?t.value.split(r?r.value:"").map(n=>Xt(n)):zn(t.value).map(n=>Xt(n))))),slice:t=>Ee(async([r,e],n)=>(ze(r),ze(e),Xt(pf(t.value,r.value,e.value)))),pick:t=>Ee(async([r],e)=>{ze(r);const h=zn(t.value)[r.value];return h?Xt(h):Rt})},arr:{len:t=>Ve(t.value.length),push:t=>Ee(async([r],e)=>(en(r),t.value.push(r),t)),unshift:t=>Ee(async([r],e)=>(en(r),t.value.unshift(r),t)),pop:t=>Ee(async(r,e)=>t.value.pop()??Rt),shift:t=>Ee(async(r,e)=>t.value.shift()??Rt),concat:t=>Ee(async([r],e)=>(ef(r),Gr(t.value.concat(r.value)))),slice:t=>Ee(async([r,e],n)=>(ze(r),ze(e),Gr(t.value.slice(r.value,e.value)))),join:t=>Ee(async([r],e)=>(r&&Tr(r),Xt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>Ee(async([r],e)=>{vi(r);const n=t.value.map(async(h,d)=>await e.call(r,[h,Ve(d)]));return Gr(await Promise.all(n))}),filter:t=>Ee(async([r],e)=>{vi(r);const n=[];for(let h=0;hEe(async([r,e],n)=>{vi(r);const h=e!=null;let d=h?e:t.value[0];for(let $=h?0:1;$Ee(async([r],e)=>{vi(r);for(let n=0;nEe(async([r],e)=>(en(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Zs:(h=>h.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?fn:Zs)),reverse:t=>Ee(async(r,e)=>(t.value.reverse(),Rt)),copy:t=>Ee(async(r,e)=>Gr([...t.value])),sort:t=>Ee(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const b=Math.floor(d.length/2),k=await n(d.slice(0,b),$),E=await n(d.slice(b),$);return h(k,E,$)},h=async(d,$,b)=>{const k=[];let E=0,F=0;for(;E=0;b--)($=t[b])&&(d=(h<3?$(d):h>3?$(r,e,d):$(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};const ed=300,sb=ed-1;class Cs{constructor(r,e){me(this,"vars");me(this,"opts");me(this,"stepCount",0);me(this,"stop",!1);me(this,"scope");me(this,"abortHandlers",[]);this.opts=e??{};const n={print:Ee(([h])=>{en(h),this.opts.out&&this.opts.out(h)}),readline:Ee(async h=>{const d=h[0];if(Tr(d),this.opts.in==null)return Rt;const $=await this.opts.in(d.value);return Xt($)})};this.vars={...r,...rb,...n},this.scope=new Wn([new Map(Object.entries(this.vars))]),this.scope.opts.log=(h,d)=>{switch(h){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(r==null||r.length===0)return;await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}async execFn(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(h){switch(h.type){case"arr":return h.value.map(d=>e(d));case"bool":return h.value;case"null":return null;case"num":return h.value;case"obj":{const d={};for(const[$,b]of h.value.entries())d[$]=e(b);return d}case"str":return h.value;default:return}}const n=new Map;for(const h of r)switch(h.type){case"meta":{n.set(h.name,e(h.value));break}}return n}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{const h=await this._eval(n.expr,e);e.add(n.name,h),this.scope.add(r.name+":"+n.name,h);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this._fn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??Rt;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],e[d]);const h=r.scope.createChildScope(n);return Qx(await this._run(r.statements,h))}}async _eval(r,e){if(this.stop)return Rt;if(this.stepCount%ed===sb&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new er("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);vi(n);const h=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,h)}case"if":{const n=await this._eval(r.cond,e);if(ds(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const h of r.elseif){const d=await this._eval(h.cond,e);if(ds(d),d.value)return this._eval(h.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return Rt}case"match":{const n=await this._eval(r.about,e);for(const h of r.qs){const d=await this._eval(h.q,e);if(Sh(n,d))return await this._eval(h.a,e)}return r.default?await this._eval(r.default,e):Rt}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return Rt}case"for":{if(r.times){const n=await this._eval(r.times,e);ze(n);for(let h=0;h0){const h=[];for(const d of r.attr)h.push({name:d.name,value:await this._eval(d.value,e)});n.attr=h}return e.add(r.name,n),Rt}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),Rt}case"addAssign":{const n=await this._eval(r.dest,e);ze(n);const h=await this._eval(r.expr,e);return ze(h),await this.assign(e,r.dest,Ve(n.value+h.value)),Rt}case"subAssign":{const n=await this._eval(r.dest,e);ze(n);const h=await this._eval(r.expr,e);return ze(h),await this.assign(e,r.dest,Ve(n.value-h.value)),Rt}case"null":return Rt;case"bool":return Su(r.value);case"num":return Ve(r.value);case"str":return Xt(r.value);case"arr":return Gr(await Promise.all(r.value.map(async n=>await this._eval(n,e))));case"obj":{const n=new Map;for(const h of r.value.keys())n.set(h,await this._eval(r.value.get(h),e));return pp(n)}case"prop":{const n=await this._eval(r.target,e);if(eb(n))return n.value.has(r.name)?n.value.get(r.name):Rt;if(Yx(n)){if(Object.hasOwn(gu.num,r.name))return gu.num[r.name](n);throw new er(`No such prop (${r.name}) in ${n.type}.`)}else if(Xx(n)){if(Object.hasOwn(gu.str,r.name))return gu.str[r.name](n);throw new er(`No such prop (${r.name}) in ${n.type}.`)}else if(tb(n)){if(Object.hasOwn(gu.arr,r.name))return gu.arr[r.name](n);throw new er(`No such prop (${r.name}) in ${n.type}.`)}else throw new er(`Cannot read prop (${r.name}) of ${n.type}.`)}case"index":{const n=await this._eval(r.target,e);ef(n);const h=await this._eval(r.index,e);ze(h);const d=n.value[h.value];if(d===void 0)throw new Hx(`Index out of range. index: ${h.value} max: ${n.value.length-1}`);return d}case"not":{const n=await this._eval(r.expr,e);return ds(n),Su(!n.value)}case"fn":return Kx(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"tmpl":{let n="";for(const h of r.tmpl)if(typeof h=="string")n+=h;else{const d=await this._eval(h,e);let $="";d.type==="str"?$=d.value:d.type==="num"&&($=d.value.toString()),n+=$}return Xt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),Jx(n)}case"break":return this.log("block:break",{scope:e.name}),Zx();case"continue":return this.log("block:continue",{scope:e.name}),Gx();case"ns":return Rt;case"meta":return Rt;case"and":{const n=await this._eval(r.left,e);if(ds(n),n.value){const h=await this._eval(r.right,e);return ds(h),h}else return n}case"or":{const n=await this._eval(r.left,e);if(ds(n),n.value)return n;{const h=await this._eval(r.right,e);return ds(h),h}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=Rt;for(let h=0;he!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const h=await this._eval(e.target,r);ef(h);const d=await this._eval(e.index,r);ze(d),h.value[d.value]=n}else if(e.type==="prop"){const h=await this._eval(e.target,r);li(h),h.value.set(e.name,n)}else throw new er("The left-hand side of an assignment expression must be a variable or a property/index access.")}}sn([ct],Cs.prototype,"exec",null);sn([ct],Cs.prototype,"execFn",null);sn([ct],Cs.prototype,"log",null);sn([ct],Cs.prototype,"collectNs",null);sn([ct],Cs.prototype,"collectNsMember",null);sn([ct],Cs.prototype,"_fn",null);sn([ct],Cs.prototype,"_eval",null);sn([ct],Cs.prototype,"_run",null);sn([ct],Cs.prototype,"registerAbortHandler",null);sn([ct],Cs.prototype,"unregisterAbortHandler",null);sn([ct],Cs.prototype,"abort",null);sn([ct],Cs.prototype,"assign",null);sn([ct],Cs,"collectMetadata",null);function nb(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function eu(t,r,e,n){var h=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(h,eu.prototype),h.expected=r,h.found=e,h.location=n,h.name="SyntaxError",h}nb(eu,Error);function zc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}eu.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` +`+k+` | +`+d.line+" | "+E+` +`+k+" | "+zc("",h.column-1," ")+zc("",j,"^")}else r+=` + at `+$}return r};eu.buildMessage=function(t,r){var e={literal:function(E){return'"'+h(E.text)+'"'},class:function(E){var F=E.parts.map(function(j){return Array.isArray(j)?d(j[0])+"-"+d(j[1]):d(j)});return"["+(E.inverted?"^":"")+F.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(E){return E.description}};function n(E){return E.charCodeAt(0).toString(16).toUpperCase()}function h(E){return E.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+n(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+n(F)})}function d(E){return E.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+n(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+n(F)})}function $(E){return e[E.type](E)}function b(E){var F=E.map($),j,D;if(F.sort(),F.length>0){for(j=1,D=1;j=",Qe="<",Fr=">",Dt="+",yr="-",kt="*",dr="^",Or="/",_r="%",Er="!",Ft="[",U=".",K="if",te="elif",ce="else",he="match",ie="=>",Ne="eval",de="`",we='"',ue="'",De='\\"',je="\\'",Be="true",We="false",Ze="null",rt=";",st="@",wt="@(",Lt=`\r +`,xt=/^[A-Z0-9_:]/i,Gt=/^[^`{]/,_s=/^[{}`]/,Wr=/^[+\-]/,Ot=/^[1-9]/,ht=/^[0-9]/,It=/^[A-Z_]/i,Vn=/^[A-Z0-9_]/i,Kn=/^[\r\n]/,Ci=/^[ \t\r\n]/,_i=/^[ \t]/,tr=lo(),rr=Y("//",!1),ki=Y("/*",!1),vn=Y("*/",!1),wr=Y("(",!1),Pt=Y(")",!1),mr=Y("::",!1),sr=Y("{",!1),Ye=Y("}",!1),Bt=Y("###",!1),Ir=Y("let",!1),dt=Y(":",!1),yt=Y("=",!1),ns=Y("var",!1),Pi=Y("<:",!1),Ei=Y("#[",!1),ks=Y("]",!1),as=Y("each",!1),mt=Y(",",!1),pt=Y("for",!1),Ps=Y("return",!1),or=Ht([["A","Z"],["0","9"],"_",":"],!1,!0),ur=Y("loop",!1),Mi=Y("break",!1),Si=Y("continue",!1),Fi=Y("+=",!1),Oi=Y("-=",!1),Jn=Y("\\",!1),Zn=Y("||",!1),Ni=Y("&&",!1),Ti=Y("==",!1),Ii=Y("!=",!1),ji=Y("<=",!1),Ri=Y(">=",!1),Gn=Y("<",!1),gn=Y(">",!1),Qn=Y("+",!1),Di=Y("-",!1),Xn=Y("*",!1),Yn=Y("^",!1),Li=Y("/",!1),Bi=Y("%",!1),Hi=Y("!",!1),dn=Y("[",!1),is=Y(".",!1),yn=Y("if",!1),Ui=Y("elif",!1),qi=Y("else",!1),zi=Y("match",!1),Es=Y("=>",!1),Ms=Y("eval",!1),Ss=Y("`",!1),Wi=Ht(["`","{"],!0,!1),Fs=Ht(["{","}","`"],!1,!1),Os=Y('"',!1),Ns=Y("'",!1),Ts=Y('\\"',!1),Is=Y("\\'",!1),js=Ht(["+","-"],!1,!1),ea=Ht([["1","9"]],!1,!1),Et=Ht([["0","9"]],!1,!1),ta=Y("true",!1),nr=Y("false",!1),Vi=Y("null",!1),Rs=Y(";",!1),Ki=Y("@",!1),ls=Y("@(",!1),Ji=Ht([["A","Z"],"_"],!1,!0),wn=Ht([["A","Z"],["0","9"],"_"],!1,!0),Zi=Y(`\r +`,!1),ra=Ht(["\r",` +`],!1,!1),Gi=Ht([" "," ","\r",` +`],!1,!1),Qi=Ht([" "," "],!1,!1),Xi=function(l){return l.join("")},Yi=function(){return A()},el=function(){return A()},tl=function(){return""},rl=function(){return""},sl=function(l){return l??[]},sa=function(l,f){return f},nl=function(l,f){return[l,...f]},mn=function(l,f){return f},al=function(l,f){return[l,...f]},$n=function(l,f){return f},il=function(l,f){return[l,...f]},na=function(l){return l},ll=function(l,f){return ne("ns",{name:l,members:f})},ol=function(l,f){return ne("meta",{name:l,value:f})},ul=function(l){return ne("meta",{name:null,value:l})},fl=function(l,f,y){return ne("def",{name:l,varType:f,expr:y,mut:!1,attr:[]})},cl=function(l,f,y){return ne("def",{name:l,varType:f,expr:y,mut:!0,attr:[]})},hl=function(l){return ne("identifier",{name:"print",chain:[ne("callChain",{args:[l]})]})},pl=function(l,f){return ne("attr",{name:l,value:f??ne("bool",{value:!0})})},vl=function(l,f,y){return ne("each",{var:l,items:f,for:y})},gl=function(l,f,y){return ne("each",{var:l,items:f,for:y})},dl=function(l,f){return f},yl=function(l,f,y,c){return ne("for",{var:l,from:f??ne("num",{value:0}),to:y,for:c})},wl=function(l,f){return f},ml=function(l,f,y,c){return ne("for",{var:l,from:f??ne("num",{value:0}),to:y,for:c})},$l=function(l,f){return ne("for",{times:l,for:f})},xl=function(l,f){return ne("for",{times:l,for:f})},bl=function(l){return ne("return",{expr:l})},Al=function(l){return ne("loop",{statements:l})},Cl=function(){return ne("break",{})},_l=function(){return ne("continue",{})},kl=function(l,f,y){return f==="+="?ne("addAssign",{dest:l,expr:y}):f==="-="?ne("subAssign",{dest:l,expr:y}):ne("assign",{dest:l,expr:y})},aa=function(l,f,y){return{op:f,term:y}},Pl=function(l,f){return ne("infix",{operands:[l,...f.map(y=>y.term)],operators:f.map(y=>y.op)})},ia=function(){return A()},El=function(l){return ne("not",{expr:l})},Ml=function(l,f){return{...l,chain:f}},Sl=function(l){return ne("callChain",{args:l??[]})},la=function(l,f){return f},Fl=function(l,f){return[l,...f]},oa=function(l){return ne("indexChain",{index:l})},Ol=function(l){return ne("propChain",{name:l})},Nl=function(l,f,y,c){return ne("if",{cond:l,then:f,elseif:y??[],else:c})},Tl=function(l,f){return[l,...f]},Il=function(l,f){return{cond:l,then:f}},jl=function(l){return l},ua=function(l,f,y){return{q:f,a:y}},Rl=function(l,f,y){return ne("match",{about:l,qs:f??[],default:y})},fa=function(l){return ne("block",{statements:l})},Dl=function(l){return ne("identifier",{name:l})},Ll=function(l){return ne("tmpl",{tmpl:l})},Bl=function(l){return l.join("")},ca=function(l){return l},Hl=function(l){return ne("str",{value:l.join("")})},ha=function(l){return l},pa=function(l){return ne("str",{value:l.join("")})},Ul=function(){return'"'},va=function(){return"'"},ql=function(){return ne("num",{value:parseFloat(A())})},zl=function(){return ne("num",{value:parseFloat(A())})},Wl=function(){return ne("num",{value:parseInt(A(),10)})},Vl=function(){return ne("num",{value:parseInt(A(),10)})},Kl=function(){return ne("bool",{value:!0})},Jl=function(){return ne("bool",{value:!1})},Zl=function(){return ne("null",{})},ga=function(l,f){return{k:l,v:f}},Gl=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ne("obj",{value:f})},da=function(l){return l},ya=function(l){return ne("arr",{value:l})},Ql=function(l,f){return{name:l,argType:f}},wa=function(l,f){return[l,...f]},Xl=function(l,f,y,c,s,o){return(l.length>0||y.length>0)&&Ls("Cannot use spaces before or after the function name."),ne("def",{name:f,expr:ne("fn",{args:c??[],retType:s},o??[]),mut:!1,attr:[]})},Yl=function(l,f,y){return ne("fn",{args:l??[],retType:f},y??[])},ma=function(l){return l},eo=function(l){return ne("arr",{value:l})},$a=function(l,f){return{k:l,v:f}},xa=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ne("obj",{value:f})},to=function(l,f){return ne("fnTypeSource",{args:l??[],result:f})},ba=function(l,f){return[l,...f]},ro=function(l,f){return ne("namedTypeSource",{name:l,inner:f})},so=function(l){return ne("namedTypeSource",{name:l,inner:null})},no=function(){return A()},ao=function(){return A()},io=function(l){return ne("block",{statements:l??[]})},i=0,W=0,Ds=[{line:1,column:1}],a=0,z=[],C=0,O={},jr;if("startRule"in r){if(!(r.startRule in h))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=h[r.startRule]}function A(){return t.substring(W,i)}function T(){return Bs(W,i)}function Ls(l,f){throw f=f!==void 0?f:Bs(W,i),Aa(l,f)}function Y(l,f){return{type:"literal",text:l,ignoreCase:f}}function Ht(l,f,y){return{type:"class",parts:l,inverted:f,ignoreCase:y}}function lo(){return{type:"any"}}function se(){return{type:"end"}}function Nt(l){var f=Ds[l],y;if(f)return f;for(y=l-1;!Ds[y];)y--;for(f=Ds[y],f={line:f.line,column:f.column};ya&&(a=i,z=[]),z.push(l))}function Aa(l,f){return new eu(l,null,null,f)}function Hs(l,f,y){return new eu(eu.buildMessage(l,f),l,f,y)}function M(){var l,f,y,c=i*76+0,s=O[c];if(s)return i=s.nextPos,s.result;for(l=i,f=[],y=Ca();y!==e;)f.push(y),y=Ca();return W=l,f=Xi(f),l=f,O[c]={nextPos:i,result:l},l}function Ca(){var l,f,y=i*76+1,c=O[y];return c?(i=c.nextPos,c.result):(l=i,f=Na(),f!==e&&(W=l,f=Yi()),l=f,l===e&&(l=i,f=qs(),f!==e&&(W=l,f=el()),l=f,l===e&&(l=oo(),l===e&&(t.length>i?(l=t.charAt(i),i++):(l=e,C===0&&S(tr))))),O[y]={nextPos:i,result:l},l)}function oo(){var l,f,y,c,s,o,p=i*76+2,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,2)===$?(f=$,i+=2):(f=e,C===0&&S(rr)),f!==e){for(y=[],c=i,s=i,C++,o=za(),C--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr)),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,o=za(),C--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr)),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);W=l,l=tl()}else i=l,l=e;if(l===e)if(l=i,t.substr(i,2)===b?(f=b,i+=2):(f=e,C===0&&S(ki)),f!==e){for(y=[],c=i,s=i,C++,t.substr(i,2)===k?(o=k,i+=2):(o=e,C===0&&S(vn)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr)),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,t.substr(i,2)===k?(o=k,i+=2):(o=e,C===0&&S(vn)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr)),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);t.substr(i,2)===k?(c=k,i+=2):(c=e,C===0&&S(vn)),c!==e?(W=l,l=rl()):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function _a(){var l,f,y,c,s,o=i*76+3,p=O[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=x();y!==e;)f.push(y),y=x();for(y=ka(),y===e&&(y=null),c=[],s=x();s!==e;)c.push(s),s=x();return W=l,l=sl(y),O[o]={nextPos:i,result:l},l}function ka(){var l,f,y,c,s,o,p,u,g=i*76+4,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=xn(),f!==e){for(y=[],c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=xn(),u!==e?(W=c,c=sa(f,u)):(i=c,c=e)}else i=c,c=e;for(;c!==e;){for(y.push(c),c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=xn(),u!==e?(W=c,c=sa(f,u)):(i=c,c=e)}else i=c,c=e}W=l,l=nl(f,y)}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function uo(){var l,f,y,c,s,o,p,u,g=i*76+5,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=bn(),f!==e){for(y=[],c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=bn(),u!==e?(W=c,c=mn(f,u)):(i=c,c=e)}else i=c,c=e;for(;c!==e;){for(y.push(c),c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=bn(),u!==e?(W=c,c=mn(f,u)):(i=c,c=e)}else i=c,c=e}W=l,l=al(f,y)}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function os(){var l,f,y,c,s,o,p,u,g=i*76+6,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=fr(),f!==e){for(y=[],c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=fr(),u!==e?(W=c,c=$n(f,u)):(i=c,c=e)}else i=c,c=e;for(;c!==e;){for(y.push(c),c=i,s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ue(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=fr(),u!==e?(W=c,c=$n(f,u)):(i=c,c=e)}else i=c,c=e}W=l,l=il(f,y)}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function xn(){var l,f=i*76+7,y=O[f];return y?(i=y.nextPos,y.result):(l=us(),l===e&&(l=Pa(),l===e&&(l=fr())),O[f]={nextPos:i,result:l},l)}function bn(){var l,f=i*76+8,y=O[f];return y?(i=y.nextPos,y.result):(l=$r(),l===e&&(l=Ua(),l===e&&(l=us())),O[f]={nextPos:i,result:l},l)}function fr(){var l,f=i*76+9,y=O[f];return y?(i=y.nextPos,y.result):(l=$r(),l===e&&(l=Ua(),l===e&&(l=Ea(),l===e&&(l=ho(),l===e&&(l=fo(),l===e&&(l=Ma(),l===e&&(l=co(),l===e&&(l=po(),l===e&&(l=vo(),l===e&&(l=go(),l===e&&(l=yo(),l===e&&(l=Re()))))))))))),O[f]={nextPos:i,result:l},l)}function Re(){var l,f=i*76+10,y=O[f];return y?(i=y.nextPos,y.result):(l=wo(),l===e&&(l=Rr()),O[f]={nextPos:i,result:l},l)}function Rr(){var l,f=i*76+11,y=O[f];return y?(i=y.nextPos,y.result):(l=xo(),l===e&&(l=Po(),l===e&&(l=br(),l===e&&(l=Dr()))),O[f]={nextPos:i,result:l},l)}function Dr(){var l,f,y,c,s,o,p=i*76+12,u=O[p];if(u)return i=u.nextPos,u.result;if(l=Ao(),l===e&&(l=_n(),l===e&&(l=Na(),l===e&&(l=qs(),l===e&&(l=Ra(),l===e&&(l=Mn(),l===e&&(l=Ba(),l===e&&(l=Ha(),l===e&&(l=ko(),l===e&&(l=mo(),l===e&&(l=Co(),l===e)))))))))))if(l=i,t.charCodeAt(i)===40?(f=E,i++):(f=e,C===0&&S(wr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=Re(),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e?(W=l,l=na(c)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Te(){var l,f=i*76+13,y=O[f];return y?(i=y.nextPos,y.result):(l=Ra(),l===e&&(l=qs(),l===e&&(l=Mn(),l===e&&(l=On(),l===e&&(l=qa(),l===e&&(l=Ba()))))),O[f]={nextPos:i,result:l},l)}function us(){var l,f,y,c,s,o,p,u,g,v,m=i*76+14,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===j?(f=j,i+=2):(f=e,C===0&&S(mr)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=He(),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;if(s!==e)if(t.charCodeAt(i)===123?(o=D,i++):(o=e,C===0&&S(sr)),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(u=uo(),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();t.charCodeAt(i)===125?(v=V,i++):(v=e,C===0&&S(Ye)),v!==e?(W=l,l=ll(c,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function Pa(){var l,f,y,c,s,o,p=i*76+15,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,3)===pe?(f=pe,i+=3):(f=e,C===0&&S(Bt)),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();if(c=He(),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();o=Te(),o!==e?(W=l,l=ol(c,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===pe?(f=pe,i+=3):(f=e,C===0&&S(Bt)),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();c=Te(),c!==e?(W=l,l=ul(c)):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function $r(){var l,f,y,c,s,o,p,u,g,v=i*76+16,m=O[v];if(m)return i=m.nextPos,m.result;if(l=i,t.substr(i,3)===ee?(f=ee,i+=3):(f=e,C===0&&S(Ir)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=He(),c!==e){for(s=i,o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===58?(p=ae,i++):(p=e,C===0&&S(dt)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();g=Ut(),g!==e?s=g:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===61?(p=_e,i++):(p=e,C===0&&S(yt)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();g=Re(),g!==e?(W=l,l=fl(c,s,g)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===H?(f=H,i+=3):(f=e,C===0&&S(ns)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=He(),c!==e){for(s=i,o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===58?(p=ae,i++):(p=e,C===0&&S(dt)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();g=Ut(),g!==e?s=g:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===61?(p=_e,i++):(p=e,C===0&&S(yt)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();g=Re(),g!==e?(W=l,l=cl(c,s,g)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return O[v]={nextPos:i,result:l},l}function Ea(){var l,f,y,c,s=i*76+17,o=O[s];if(o)return i=o.nextPos,o.result;if(l=i,t.substr(i,2)===L?(f=L,i+=2):(f=e,C===0&&S(Pi)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();c=Re(),c!==e?(W=l,l=hl(c)):(i=l,l=e)}else i=l,l=e;return O[s]={nextPos:i,result:l},l}function fo(){var l,f,y,c,s,o,p,u=i*76+18,g=O[u];if(g)return i=g.nextPos,g.result;if(l=i,t.substr(i,2)===B?(f=B,i+=2):(f=e,C===0&&S(Ei)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=He(),c!==e){for(s=i,o=[],p=x();p!==e;)o.push(p),p=x();for(p=Te(),p!==e?s=p:(i=s,s=e),s===e&&(s=null),o=[],p=x();p!==e;)o.push(p),p=x();t.charCodeAt(i)===93?(p=q,i++):(p=e,C===0&&S(ks)),p!==e?(W=l,l=pl(c,s)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return O[u]={nextPos:i,result:l},l}function Ma(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I=i*76+19,R=O[I];if(R)return i=R.nextPos,R.result;if(l=i,t.substr(i,4)===J?(f=J,i+=4):(f=e,C===0&&S(as)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===40?(c=E,i++):(c=e,C===0&&S(wr)),c!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,C===0&&S(Ir)),s!==e){if(o=[],p=x(),p!==e)for(;p!==e;)o.push(p),p=x();else o=e;if(o!==e)if(p=He(),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();for(t.charCodeAt(i)===44?(g=G,i++):(g=e,C===0&&S(mt)),g===e&&(g=null),v=[],m=x();m!==e;)v.push(m),m=x();if(m=Re(),m!==e)if(t.charCodeAt(i)===41?(w=F,i++):(w=e,C===0&&S(Pt)),w!==e){for(_=[],P=x();P!==e;)_.push(P),P=x();P=Tt(),P!==e?(W=l,l=vl(p,m,P)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,4)===J?(f=J,i+=4):(f=e,C===0&&S(as)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(t.substr(i,3)===ee?(c=ee,i+=3):(c=e,C===0&&S(Ir)),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;if(s!==e)if(o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();if(v=Re(),v!==e){if(m=[],w=x(),w!==e)for(;w!==e;)m.push(w),w=x();else m=e;m!==e?(w=Tt(),w!==e?(W=l,l=gl(o,v,w)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return O[I]={nextPos:i,result:l},l}function co(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I,R=i*76+20,Z=O[R];if(Z)return i=Z.nextPos,Z.result;if(l=i,t.substr(i,3)===Q?(f=Q,i+=3):(f=e,C===0&&S(pt)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===40?(c=E,i++):(c=e,C===0&&S(wr)),c!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,C===0&&S(Ir)),s!==e){if(o=[],p=x(),p!==e)for(;p!==e;)o.push(p),p=x();else o=e;if(o!==e)if(p=He(),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();if(g=i,t.charCodeAt(i)===61?(v=_e,i++):(v=e,C===0&&S(yt)),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();w=Re(),w!==e?(W=g,g=dl(p,w)):(i=g,g=e)}else i=g,g=e;for(g===e&&(g=null),t.charCodeAt(i)===44?(v=G,i++):(v=e,C===0&&S(mt)),v===e&&(v=null),m=[],w=x();w!==e;)m.push(w),w=x();if(w=Re(),w!==e)if(t.charCodeAt(i)===41?(_=F,i++):(_=e,C===0&&S(Pt)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();I=Tt(),I!==e?(W=l,l=yl(p,g,w,I)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===Q?(f=Q,i+=3):(f=e,C===0&&S(pt)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(t.substr(i,3)===ee?(c=ee,i+=3):(c=e,C===0&&S(Ir)),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;if(s!==e)if(o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(u=i,t.charCodeAt(i)===61?(g=_e,i++):(g=e,C===0&&S(yt)),g!==e){for(v=[],m=x();m!==e;)v.push(m),m=x();m=Re(),m!==e?(W=u,u=wl(o,m)):(i=u,u=e)}else i=u,u=e;for(u===e&&(u=null),t.charCodeAt(i)===44?(g=G,i++):(g=e,C===0&&S(mt)),g===e&&(g=null),v=[],m=x();m!==e;)v.push(m),m=x();if(m=Re(),m!==e){if(w=[],_=x(),_!==e)for(;_!==e;)w.push(_),_=x();else w=e;w!==e?(_=Tt(),_!==e?(W=l,l=ml(o,u,m,_)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===Q?(f=Q,i+=3):(f=e,C===0&&S(pt)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===40?(c=E,i++):(c=e,C===0&&S(wr)),c!==e)if(s=Re(),s!==e)if(t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();u=Tt(),u!==e?(W=l,l=$l(s,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===Q?(f=Q,i+=3):(f=e,C===0&&S(pt)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=Re(),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;s!==e?(o=Tt(),o!==e?(W=l,l=xl(c,o)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e}}return O[R]={nextPos:i,result:l},l}function ho(){var l,f,y,c,s,o=i*76+21,p=O[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,6)===X?(f=X,i+=6):(f=e,C===0&&S(Ps)),f!==e)if(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();s=Re(),s!==e?(W=l,l=bl(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return O[o]={nextPos:i,result:l},l}function po(){var l,f,y,c,s,o,p,u,g=i*76+22,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===$e?(f=$e,i+=4):(f=e,C===0&&S(ur)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===123?(c=D,i++):(c=e,C===0&&S(sr)),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();if(o=os(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();t.charCodeAt(i)===125?(u=V,i++):(u=e,C===0&&S(Ye)),u!==e?(W=l,l=Al(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function vo(){var l,f,y,c,s=i*76+23,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===ke?(f=ke,i+=5):(f=e,C===0&&S(Mi)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=Cl()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function go(){var l,f,y,c,s=i*76+24,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,8)===ge?(f=ge,i+=8):(f=e,C===0&&S(Si)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=_l()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function yo(){var l,f,y,c,s,o,p=i*76+25,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Re(),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.substr(i,2)===qe?(c=qe,i+=2):(c=e,C===0&&S(Fi)),c===e&&(t.substr(i,2)===it?(c=it,i+=2):(c=e,C===0&&S(Oi)),c===e&&(t.charCodeAt(i)===61?(c=_e,i++):(c=e,C===0&&S(yt)))),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();o=Re(),o!==e?(W=l,l=kl(f,c,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function wo(){var l,f,y,c,s,o,p,u,g=i*76+26,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=Rr(),f!==e){for(y=[],c=i,s=[],o=xr();o!==e;)s.push(o),o=xr();if(o=Sa(),o!==e){for(p=[],u=xr();u!==e;)p.push(u),u=xr();u=Rr(),u!==e?(W=c,c=aa(f,o,u)):(i=c,c=e)}else i=c,c=e;if(c!==e)for(;c!==e;){for(y.push(c),c=i,s=[],o=xr();o!==e;)s.push(o),o=xr();if(o=Sa(),o!==e){for(p=[],u=xr();u!==e;)p.push(u),u=xr();u=Rr(),u!==e?(W=c,c=aa(f,o,u)):(i=c,c=e)}else i=c,c=e}else y=e;y!==e?(W=l,l=Pl(f,y)):(i=l,l=e)}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function xr(){var l,f,y,c=i*76+27,s=O[c];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=Zt,i++):(f=e,C===0&&S(Jn)),f!==e?(y=Ue(),y!==e?(f=[f,y],l=f):(i=l,l=e)):(i=l,l=e),l===e&&(l=xe()),O[c]={nextPos:i,result:l},l)}function Sa(){var l,f,y=i*76+28,c=O[y];return c?(i=c.nextPos,c.result):(l=i,t.substr(i,2)===lt?(f=lt,i+=2):(f=e,C===0&&S(Zn)),f===e&&(t.substr(i,2)===ot?(f=ot,i+=2):(f=e,C===0&&S(Ni)),f===e&&(t.substr(i,2)===Ie?(f=Ie,i+=2):(f=e,C===0&&S(Ti)),f===e&&(t.substr(i,2)===at?(f=at,i+=2):(f=e,C===0&&S(Ii)),f===e&&(t.substr(i,2)===Mt?(f=Mt,i+=2):(f=e,C===0&&S(ji)),f===e&&(t.substr(i,2)===St?(f=St,i+=2):(f=e,C===0&&S(Ri)),f===e&&(t.charCodeAt(i)===60?(f=Qe,i++):(f=e,C===0&&S(Gn)),f===e&&(t.charCodeAt(i)===62?(f=Fr,i++):(f=e,C===0&&S(gn)),f===e&&(t.charCodeAt(i)===43?(f=Dt,i++):(f=e,C===0&&S(Qn)),f===e&&(t.charCodeAt(i)===45?(f=yr,i++):(f=e,C===0&&S(Di)),f===e&&(t.charCodeAt(i)===42?(f=kt,i++):(f=e,C===0&&S(Xn)),f===e&&(t.charCodeAt(i)===94?(f=dr,i++):(f=e,C===0&&S(Yn)),f===e&&(t.charCodeAt(i)===47?(f=Or,i++):(f=e,C===0&&S(Li)),f===e&&(t.charCodeAt(i)===37?(f=_r,i++):(f=e,C===0&&S(Bi))))))))))))))),f!==e&&(W=l,f=ia()),l=f,O[y]={nextPos:i,result:l},l)}function mo(){var l,f,y,c=i*76+29,s=O[c];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===33?(f=Er,i++):(f=e,C===0&&S(Hi)),f!==e?(y=Re(),y!==e?(W=l,l=El(y)):(i=l,l=e)):(i=l,l=e),O[c]={nextPos:i,result:l},l)}function br(){var l,f,y,c,s=i*76+30,o=O[s];if(o)return i=o.nextPos,o.result;if(l=i,f=Dr(),f!==e){if(y=[],c=An(),c===e&&(c=Fa(),c===e&&(c=Cn())),c!==e)for(;c!==e;)y.push(c),c=An(),c===e&&(c=Fa(),c===e&&(c=Cn()));else y=e;y!==e?(W=l,l=Ml(f,y)):(i=l,l=e)}else i=l,l=e;return O[s]={nextPos:i,result:l},l}function An(){var l,f,y,c,s,o,p=i*76+31,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===40?(f=E,i++):(f=e,C===0&&S(wr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();for(c=$o(),c===e&&(c=null),s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e?(W=l,l=Sl(c)):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function $o(){var l,f,y,c,s,o,p=i*76+32,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Re(),f!==e){for(y=[],c=i,s=Lr(),s!==e?(o=Re(),o!==e?(W=c,c=la(f,o)):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=Lr(),s!==e?(o=Re(),o!==e?(W=c,c=la(f,o)):(i=c,c=e)):(i=c,c=e);W=l,l=Fl(f,y)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Fa(){var l,f,y,c,s,o,p=i*76+33,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===91?(f=Ft,i++):(f=e,C===0&&S(dn)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=Re(),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===93?(o=q,i++):(o=e,C===0&&S(ks)),o!==e?(W=l,l=oa(c)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Cn(){var l,f,y,c=i*76+34,s=O[c];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===46?(f=U,i++):(f=e,C===0&&S(is)),f!==e?(y=He(),y!==e?(W=l,l=Ol(y)):(i=l,l=e)):(i=l,l=e),O[c]={nextPos:i,result:l},l)}function xo(){var l,f,y,c,s,o,p,u,g,v,m=i*76+35,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===K?(f=K,i+=2):(f=e,C===0&&S(yn)),f!==e){if(y=[],c=x(),c!==e)for(;c!==e;)y.push(c),c=x();else y=e;if(y!==e)if(c=Re(),c!==e){if(s=[],o=x(),o!==e)for(;o!==e;)s.push(o),o=x();else s=e;if(s!==e)if(o=Tt(),o!==e){if(p=i,u=[],g=x(),g!==e)for(;g!==e;)u.push(g),g=x();else u=e;if(u!==e?(g=Oa(),g!==e?p=g:(i=p,p=e)):(i=p,p=e),p===e&&(p=null),u=i,g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;g!==e?(v=bo(),v!==e?u=v:(i=u,u=e)):(i=u,u=e),u===e&&(u=null),W=l,l=Nl(c,o,p,u)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function Oa(){var l,f,y,c,s,o,p=i*76+36,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Us(),f!==e){for(y=[],c=i,s=[],o=x();o!==e;)s.push(o),o=x();for(o=Us(),o!==e?c=o:(i=c,c=e);c!==e;){for(y.push(c),c=i,s=[],o=x();o!==e;)s.push(o),o=x();o=Us(),o!==e?c=o:(i=c,c=e)}W=l,l=Tl(f,y)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Us(){var l,f,y,c,s,o,p,u=i*76+37,g=O[u];if(g)return i=g.nextPos,g.result;if(l=i,t.substr(i,4)===te?(f=te,i+=4):(f=e,C===0&&S(Ui)),f!==e)if(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();if(s=Re(),s!==e){for(o=[],p=x();p!==e;)o.push(p),p=x();p=Tt(),p!==e?(W=l,l=Il(s,p)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e;return O[u]={nextPos:i,result:l},l}function bo(){var l,f,y,c,s,o=i*76+38,p=O[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,4)===ce?(f=ce,i+=4):(f=e,C===0&&S(qi)),f!==e)if(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();s=Tt(),s!==e?(W=l,l=jl(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return O[o]={nextPos:i,result:l},l}function Ao(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I,R,Z,ye=i*76+39,re=O[ye];if(re)return i=re.nextPos,re.result;if(l=i,t.substr(i,5)===he?(f=he,i+=5):(f=e,C===0&&S(zi)),f!==e)if(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();if(s=Re(),s!==e){for(o=[],p=x();p!==e;)o.push(p),p=x();if(t.charCodeAt(i)===123?(p=D,i++):(p=e,C===0&&S(sr)),p!==e){for(u=[],g=x();g!==e;)u.push(g),g=x();if(g=[],v=i,m=Re(),m!==e){for(w=[],_=x();_!==e;)w.push(_),_=x();if(t.substr(i,2)===ie?(_=ie,i+=2):(_=e,C===0&&S(Es)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();if(I=Tt(),I!==e){for(R=[],Z=x();Z!==e;)R.push(Z),Z=x();W=v,v=ua(s,m,I)}else i=v,v=e}else i=v,v=e}else i=v,v=e;if(v!==e)for(;v!==e;)if(g.push(v),v=i,m=Re(),m!==e){for(w=[],_=x();_!==e;)w.push(_),_=x();if(t.substr(i,2)===ie?(_=ie,i+=2):(_=e,C===0&&S(Es)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();if(I=Tt(),I!==e){for(R=[],Z=x();Z!==e;)R.push(Z),Z=x();W=v,v=ua(s,m,I)}else i=v,v=e}else i=v,v=e}else i=v,v=e;else g=e;if(g!==e){if(v=i,t.charCodeAt(i)===42?(m=kt,i++):(m=e,C===0&&S(Xn)),m!==e){for(w=[],_=x();_!==e;)w.push(_),_=x();if(t.substr(i,2)===ie?(_=ie,i+=2):(_=e,C===0&&S(Es)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();if(I=Tt(),I!==e){for(R=[],Z=x();Z!==e;)R.push(Z),Z=x();v=I}else i=v,v=e}else i=v,v=e}else i=v,v=e;for(v===e&&(v=null),m=[],w=x();w!==e;)m.push(w),w=x();t.charCodeAt(i)===125?(w=V,i++):(w=e,C===0&&S(Ye)),w!==e?(W=l,l=Rl(s,g,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;else i=l,l=e;return O[ye]={nextPos:i,result:l},l}function _n(){var l,f,y,c,s,o,p,u,g=i*76+40,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===Ne?(f=Ne,i+=4):(f=e,C===0&&S(Ms)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(t.charCodeAt(i)===123?(c=D,i++):(c=e,C===0&&S(sr)),c!==e){for(s=[],o=x();o!==e;)s.push(o),o=x();if(o=os(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();t.charCodeAt(i)===125?(u=V,i++):(u=e,C===0&&S(Ye)),u!==e?(W=l,l=fa(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[g]={nextPos:i,result:l},l}function Co(){var l,f,y=i*76+41,c=O[y];return c?(i=c.nextPos,c.result):(l=i,f=Fo(),f!==e&&(W=l,f=Dl(f)),l=f,O[y]={nextPos:i,result:l},l)}function Na(){var l,f,y,c,s,o,p=i*76+42,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===96?(f=de,i++):(f=e,C===0&&S(Ss)),f!==e){for(y=[],c=i,s=i,C++,t.charCodeAt(i)===96?(o=de,i++):(o=e,C===0&&S(Ss)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Ta(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,t.charCodeAt(i)===96?(o=de,i++):(o=e,C===0&&S(Ss)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Ta(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);t.charCodeAt(i)===96?(c=de,i++):(c=e,C===0&&S(Ss)),c!==e?(W=l,l=Ll(y)):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Ta(){var l,f,y,c,s,o,p=i*76+43,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=D,i++):(f=e,C===0&&S(sr)),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();if(c=Re(),c!==e){for(s=[],o=xe();o!==e;)s.push(o),o=xe();t.charCodeAt(i)===125?(o=V,i++):(o=e,C===0&&S(Ye)),o!==e?l=c:(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,f=[],y=Ia(),y!==e)for(;y!==e;)f.push(y),y=Ia();else f=e;f!==e&&(W=l,f=Bl(f)),l=f}return O[p]={nextPos:i,result:l},l}function Ia(){var l,f=i*76+44,y=O[f];return y?(i=y.nextPos,y.result):(l=ja(),l===e&&(Gt.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,C===0&&S(Wi))),O[f]={nextPos:i,result:l},l)}function ja(){var l,f,y,c=i*76+45,s=O[c];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=Zt,i++):(f=e,C===0&&S(Jn)),f!==e?(_s.test(t.charAt(i))?(y=t.charAt(i),i++):(y=e,C===0&&S(Fs)),y!==e?l=y:(i=l,l=e)):(i=l,l=e),O[c]={nextPos:i,result:l},l)}function qs(){var l,f,y,c,s,o,p=i*76+46,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===34?(f=we,i++):(f=e,C===0&&S(Os)),f!==e){for(y=[],c=i,s=i,C++,t.charCodeAt(i)===34?(o=we,i++):(o=e,C===0&&S(Os)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=kn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr))),o!==e?(W=c,c=ca(o)):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,t.charCodeAt(i)===34?(o=we,i++):(o=e,C===0&&S(Os)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=kn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr))),o!==e?(W=c,c=ca(o)):(i=c,c=e)):(i=c,c=e);t.charCodeAt(i)===34?(c=we,i++):(c=e,C===0&&S(Os)),c!==e?(W=l,l=Hl(y)):(i=l,l=e)}else i=l,l=e;if(l===e)if(l=i,t.charCodeAt(i)===39?(f=ue,i++):(f=e,C===0&&S(Ns)),f!==e){for(y=[],c=i,s=i,C++,t.charCodeAt(i)===39?(o=ue,i++):(o=e,C===0&&S(Ns)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Pn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr))),o!==e?(W=c,c=ha(o)):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=i,C++,t.charCodeAt(i)===39?(o=ue,i++):(o=e,C===0&&S(Ns)),C--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Pn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,C===0&&S(tr))),o!==e?(W=c,c=ha(o)):(i=c,c=e)):(i=c,c=e);t.charCodeAt(i)===39?(c=ue,i++):(c=e,C===0&&S(Ns)),c!==e?(W=l,l=pa(y)):(i=l,l=e)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function kn(){var l,f,y=i*76+47,c=O[y];return c?(i=c.nextPos,c.result):(l=i,t.substr(i,2)===De?(f=De,i+=2):(f=e,C===0&&S(Ts)),f!==e&&(W=l,f=Ul()),l=f,O[y]={nextPos:i,result:l},l)}function Pn(){var l,f,y=i*76+48,c=O[y];return c?(i=c.nextPos,c.result):(l=i,t.substr(i,2)===je?(f=je,i+=2):(f=e,C===0&&S(Is)),f!==e&&(W=l,f=va()),l=f,O[y]={nextPos:i,result:l},l)}function Ra(){var l,f=i*76+49,y=O[f];return y?(i=y.nextPos,y.result):(l=En(),l===e&&(l=Da()),O[f]={nextPos:i,result:l},l)}function En(){var l,f,y,c,s,o,p=i*76+50,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,Wr.test(t.charAt(i))?(t.charAt(i),i++):C===0&&S(js),Ot.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(ea)),f!==e){if(y=[],ht.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(Et)),c!==e)for(;c!==e;)y.push(c),ht.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(Et));else y=e;if(y!==e)if(t.charCodeAt(i)===46?(c=U,i++):(c=e,C===0&&S(is)),c!==e){if(s=[],ht.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,C===0&&S(Et)),o!==e)for(;o!==e;)s.push(o),ht.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,C===0&&S(Et));else s=e;s!==e?(W=l,l=ql()):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,Wr.test(t.charAt(i))?(t.charAt(i),i++):C===0&&S(js),ht.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(Et)),f!==e)if(t.charCodeAt(i)===46?(y=U,i++):(y=e,C===0&&S(is)),y!==e){if(c=[],ht.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,C===0&&S(Et)),s!==e)for(;s!==e;)c.push(s),ht.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,C===0&&S(Et));else c=e;c!==e?(W=l,l=zl()):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Da(){var l,f,y,c,s=i*76+51,o=O[s];if(o)return i=o.nextPos,o.result;if(l=i,Wr.test(t.charAt(i))?(t.charAt(i),i++):C===0&&S(js),Ot.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(ea)),f!==e){if(y=[],ht.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(Et)),c!==e)for(;c!==e;)y.push(c),ht.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(Et));else y=e;y!==e?(W=l,l=Wl()):(i=l,l=e)}else i=l,l=e;return l===e&&(l=i,Wr.test(t.charAt(i))?(t.charAt(i),i++):C===0&&S(js),ht.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(Et)),f!==e?(W=l,l=Vl()):(i=l,l=e)),O[s]={nextPos:i,result:l},l}function Mn(){var l,f=i*76+52,y=O[f];return y?(i=y.nextPos,y.result):(l=La(),l===e&&(l=_o()),O[f]={nextPos:i,result:l},l)}function La(){var l,f,y,c,s=i*76+53,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===Be?(f=Be,i+=4):(f=e,C===0&&S(ta)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=Kl()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function _o(){var l,f,y,c,s=i*76+54,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===We?(f=We,i+=5):(f=e,C===0&&S(nr)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=Jl()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function Ba(){var l,f,y,c,s=i*76+55,o=O[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===Ze?(f=Ze,i+=4):(f=e,C===0&&S(Vi)),f!==e?(y=i,C++,xt.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(or)),C--,c===e?y=void 0:(i=y,y=e),y!==e?(W=l,l=Zl()):(i=l,l=e)):(i=l,l=e),O[s]={nextPos:i,result:l},l)}function Ha(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I=i*76+56,R=O[I];if(R)return i=R.nextPos,R.result;if(l=i,t.charCodeAt(i)===123?(f=D,i++):(f=e,C===0&&S(sr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=[],s=i,o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.charCodeAt(i)===58?(u=ae,i++):(u=e,C===0&&S(dt)),u!==e){if(g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;if(g!==e)if(v=Re(),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();for(t.charCodeAt(i)===44?(w=G,i++):(w=e,C===0&&S(mt)),w===e&&(t.charCodeAt(i)===59?(w=rt,i++):(w=e,C===0&&S(Rs))),w===e&&(w=null),_=[],P=x();P!==e;)_.push(P),P=x();W=s,s=ga(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(c.push(s),s=i,o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.charCodeAt(i)===58?(u=ae,i++):(u=e,C===0&&S(dt)),u!==e){if(g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;if(g!==e)if(v=Re(),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();for(t.charCodeAt(i)===44?(w=G,i++):(w=e,C===0&&S(mt)),w===e&&(t.charCodeAt(i)===59?(w=rt,i++):(w=e,C===0&&S(Rs))),w===e&&(w=null),_=[],P=x();P!==e;)_.push(P),P=x();W=s,s=ga(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=V,i++):(s=e,C===0&&S(Ye)),s!==e?(W=l,l=Gl(c)):(i=l,l=e)}else i=l,l=e;return O[I]={nextPos:i,result:l},l}function ko(){var l,f,y,c,s,o,p,u,g,v,m=i*76+57,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Ft,i++):(f=e,C===0&&S(dn)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=[],s=i,o=Re(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();W=s,s=da(o)}else i=s,s=e;for(;s!==e;)if(c.push(s),s=i,o=Re(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();W=s,s=da(o)}else i=s,s=e;for(s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===93?(o=q,i++):(o=e,C===0&&S(ks)),o!==e?(W=l,l=ya(c)):(i=l,l=e)}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function Sn(){var l,f,y,c,s,o,p,u=i*76+58,g=O[u];if(g)return i=g.nextPos,g.result;if(l=i,f=He(),f!==e){for(y=i,c=[],s=x();s!==e;)c.push(s),s=x();if(t.charCodeAt(i)===58?(s=ae,i++):(s=e,C===0&&S(dt)),s!==e){for(o=[],p=x();p!==e;)o.push(p),p=x();p=Ut(),p!==e?y=p:(i=y,y=e)}else i=y,y=e;y===e&&(y=null),W=l,l=Ql(f,y)}else i=l,l=e;return O[u]={nextPos:i,result:l},l}function Fn(){var l,f,y,c,s,o,p=i*76+59,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Sn(),f!==e){for(y=[],c=i,s=Lr(),s!==e?(o=Sn(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=Lr(),s!==e?(o=Sn(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);W=l,l=wa(f,y)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Ua(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I,R,Z,ye=i*76+60,re=O[ye];if(re)return i=re.nextPos,re.result;if(l=i,t.charCodeAt(i)===64?(f=st,i++):(f=e,C===0&&S(Ki)),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();if(c=He(),c!==e){for(s=[],o=xe();o!==e;)s.push(o),o=xe();if(t.charCodeAt(i)===40?(o=E,i++):(o=e,C===0&&S(wr)),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(u=Fn(),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();if(t.charCodeAt(i)===41?(v=F,i++):(v=e,C===0&&S(Pt)),v!==e){for(m=i,w=[],_=x();_!==e;)w.push(_),_=x();if(t.charCodeAt(i)===58?(_=ae,i++):(_=e,C===0&&S(dt)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();I=Ut(),I!==e?m=I:(i=m,m=e)}else i=m,m=e;for(m===e&&(m=null),w=[],_=x();_!==e;)w.push(_),_=x();if(t.charCodeAt(i)===123?(_=D,i++):(_=e,C===0&&S(sr)),_!==e){for(P=[],I=x();I!==e;)P.push(I),I=x();for(I=os(),I===e&&(I=null),R=[],Z=x();Z!==e;)R.push(Z),Z=x();t.charCodeAt(i)===125?(Z=V,i++):(Z=e,C===0&&S(Ye)),Z!==e?(W=l,l=Xl(y,c,s,u,m,I)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[ye]={nextPos:i,result:l},l}function Po(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P=i*76+61,I=O[P];if(I)return i=I.nextPos,I.result;if(l=i,t.substr(i,2)===wt?(f=wt,i+=2):(f=e,C===0&&S(ls)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();for(c=Fn(),c===e&&(c=null),s=[],o=x();o!==e;)s.push(o),o=x();if(t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e){for(p=i,u=[],g=x();g!==e;)u.push(g),g=x();if(t.charCodeAt(i)===58?(g=ae,i++):(g=e,C===0&&S(dt)),g!==e){for(v=[],m=x();m!==e;)v.push(m),m=x();m=Ut(),m!==e?p=m:(i=p,p=e)}else i=p,p=e;for(p===e&&(p=null),u=[],g=x();g!==e;)u.push(g),g=x();if(t.charCodeAt(i)===123?(g=D,i++):(g=e,C===0&&S(sr)),g!==e){for(v=[],m=x();m!==e;)v.push(m),m=x();for(m=os(),m===e&&(m=null),w=[],_=x();_!==e;)w.push(_),_=x();t.charCodeAt(i)===125?(_=V,i++):(_=e,C===0&&S(Ye)),_!==e?(W=l,l=Yl(c,p,m)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[P]={nextPos:i,result:l},l}function On(){var l,f,y,c,s,o,p,u,g,v,m=i*76+62,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Ft,i++):(f=e,C===0&&S(dn)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=[],s=i,o=Te(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();W=s,s=ma(o)}else i=s,s=e;for(;s!==e;)if(c.push(s),s=i,o=Te(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();for(t.charCodeAt(i)===44?(u=G,i++):(u=e,C===0&&S(mt)),u===e&&(u=null),g=[],v=x();v!==e;)g.push(v),v=x();W=s,s=ma(o)}else i=s,s=e;for(s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===93?(o=q,i++):(o=e,C===0&&S(ks)),o!==e?(W=l,l=eo(c)):(i=l,l=e)}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function qa(){var l,f,y,c,s,o,p,u,g,v,m,w,_,P,I=i*76+63,R=O[I];if(R)return i=R.nextPos,R.result;if(l=i,t.charCodeAt(i)===123?(f=D,i++):(f=e,C===0&&S(sr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();if(c=[],s=i,o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.charCodeAt(i)===58?(u=ae,i++):(u=e,C===0&&S(dt)),u!==e){if(g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;if(g!==e)if(v=Te(),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();for(t.charCodeAt(i)===44?(w=G,i++):(w=e,C===0&&S(mt)),w===e&&(t.charCodeAt(i)===59?(w=rt,i++):(w=e,C===0&&S(Rs))),w===e&&(w=null),_=[],P=x();P!==e;)_.push(P),P=x();W=s,s=$a(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(c.push(s),s=i,o=He(),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.charCodeAt(i)===58?(u=ae,i++):(u=e,C===0&&S(dt)),u!==e){if(g=[],v=x(),v!==e)for(;v!==e;)g.push(v),v=x();else g=e;if(g!==e)if(v=Te(),v!==e){for(m=[],w=x();w!==e;)m.push(w),w=x();for(t.charCodeAt(i)===44?(w=G,i++):(w=e,C===0&&S(mt)),w===e&&(t.charCodeAt(i)===59?(w=rt,i++):(w=e,C===0&&S(Rs))),w===e&&(w=null),_=[],P=x();P!==e;)_.push(P),P=x();W=s,s=$a(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=V,i++):(s=e,C===0&&S(Ye)),s!==e?(W=l,l=xa(c)):(i=l,l=e)}else i=l,l=e;return O[I]={nextPos:i,result:l},l}function Ut(){var l,f=i*76+64,y=O[f];return y?(i=y.nextPos,y.result):(l=Eo(),l===e&&(l=So()),O[f]={nextPos:i,result:l},l)}function Eo(){var l,f,y,c,s,o,p,u,g,v,m=i*76+65,w=O[m];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===wt?(f=wt,i+=2):(f=e,C===0&&S(ls)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();for(c=Mo(),c===e&&(c=null),s=[],o=x();o!==e;)s.push(o),o=x();if(t.charCodeAt(i)===41?(o=F,i++):(o=e,C===0&&S(Pt)),o!==e){for(p=[],u=x();u!==e;)p.push(u),u=x();if(t.substr(i,2)===ie?(u=ie,i+=2):(u=e,C===0&&S(Es)),u!==e){for(g=[],v=x();v!==e;)g.push(v),v=x();v=Ut(),v!==e?(W=l,l=to(c,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return O[m]={nextPos:i,result:l},l}function Mo(){var l,f,y,c,s,o,p=i*76+66,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Ut(),f!==e){for(y=[],c=i,s=Lr(),s!==e?(o=Ut(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,s=Lr(),s!==e?(o=Ut(),o!==e?c=o:(i=c,c=e)):(i=c,c=e);W=l,l=ba(f,y)}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function So(){var l,f,y,c,s,o,p,u,g=i*76+67,v=O[g];if(v)return i=v.nextPos,v.result;if(l=i,f=He(),f!==e){for(y=[],c=xe();c!==e;)y.push(c),c=xe();if(t.charCodeAt(i)===60?(c=Qe,i++):(c=e,C===0&&S(Gn)),c!==e){for(s=[],o=xe();o!==e;)s.push(o),o=xe();if(o=Ut(),o!==e){for(p=[],u=xe();u!==e;)p.push(u),u=xe();t.charCodeAt(i)===62?(u=Fr,i++):(u=e,C===0&&S(gn)),u!==e?(W=l,l=ro(f,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return l===e&&(l=i,f=He(),f!==e&&(W=l,f=so(f)),l=f),O[g]={nextPos:i,result:l},l}function He(){var l,f,y,c,s=i*76+68,o=O[s];if(o)return i=o.nextPos,o.result;if(l=i,It.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,C===0&&S(Ji)),f!==e){for(y=[],Vn.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(wn));c!==e;)y.push(c),Vn.test(t.charAt(i))?(c=t.charAt(i),i++):(c=e,C===0&&S(wn));W=l,l=no()}else i=l,l=e;return O[s]={nextPos:i,result:l},l}function Fo(){var l,f,y,c,s,o,p=i*76+69,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,f=He(),f!==e){for(y=[],c=i,t.charCodeAt(i)===58?(s=ae,i++):(s=e,C===0&&S(dt)),s!==e?(o=He(),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);c!==e;)y.push(c),c=i,t.charCodeAt(i)===58?(s=ae,i++):(s=e,C===0&&S(dt)),s!==e?(o=He(),o!==e?(s=[s,o],c=s):(i=c,c=e)):(i=c,c=e);W=l,l=ao()}else i=l,l=e;return O[p]={nextPos:i,result:l},l}function Lr(){var l,f,y,c,s,o=i*76+70,p=O[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=x();y!==e;)f.push(y),y=x();if(t.charCodeAt(i)===44?(y=G,i++):(y=e,C===0&&S(mt)),y!==e){for(c=[],s=x();s!==e;)c.push(s),s=x();f=[f,y,c],l=f}else i=l,l=e;if(l===e)if(l=[],f=x(),f!==e)for(;f!==e;)l.push(f),f=x();else l=e;return O[o]={nextPos:i,result:l},l}function Tt(){var l,f,y,c,s,o,p=i*76+71,u=O[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=D,i++):(f=e,C===0&&S(sr)),f!==e){for(y=[],c=x();c!==e;)y.push(c),c=x();for(c=os(),c===e&&(c=null),s=[],o=x();o!==e;)s.push(o),o=x();t.charCodeAt(i)===125?(o=V,i++):(o=e,C===0&&S(Ye)),o!==e?(W=l,l=io(c)):(i=l,l=e)}else i=l,l=e;return l===e&&(l=fr()),O[p]={nextPos:i,result:l},l}function Ue(){var l,f=i*76+72,y=O[f];return y?(i=y.nextPos,y.result):(t.substr(i,2)===Lt?(l=Lt,i+=2):(l=e,C===0&&S(Zi)),l===e&&(Kn.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,C===0&&S(ra))),O[f]={nextPos:i,result:l},l)}function za(){var l,f,y=i*76+73,c=O[y];return c?(i=c.nextPos,c.result):(l=i,C++,t.length>i?(f=t.charAt(i),i++):(f=e,C===0&&S(tr)),C--,f===e?l=void 0:(i=l,l=e),l===e&&(l=Ue()),O[y]={nextPos:i,result:l},l)}function x(){var l,f=i*76+74,y=O[f];return y?(i=y.nextPos,y.result):(Ci.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,C===0&&S(Gi)),O[f]={nextPos:i,result:l},l)}function xe(){var l,f=i*76+75,y=O[f];return y?(i=y.nextPos,y.result):(_i.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,C===0&&S(Qi)),O[f]={nextPos:i,result:l},l)}function ne(l,f,y){const c={type:l};f.children=y;for(const o of Object.keys(f))f[o]!==void 0&&(c[o]=f[o]);const s=T();return c.loc={start:s.start.offset,end:s.end.offset-1},c}if(jr=d(),jr!==e&&i===t.length)return jr;throw jr!==e&&i`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>Uf(n)).join(", "),e=Uf(t.result);return`@(${r}) { ${e} }`}}}function Fu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return Av(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Fu(t.inner):r=Av("any"),hb(t.name,[r])}}throw new iu(`Unknown type: '${Uf(t)}'`)}else{const r=t.args.map(e=>Fu(e));return pb(r,Fu(t.result))}}function vb(t){switch(t.type){case"def":{t.varType!=null&&Fu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Fu(r.argType);t.retType!=null&&Fu(t.retType);break}}return t}function gb(t){for(const r of t)ut(r,vb);return t}function qf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=qf(n.expr.children)),r.push(n);else{if(e.length>0)throw new iu("invalid attribute.");switch(n.type){case"fn":{n.children=qf(n.children);break}case"block":{n.statements=qf(n.statements);break}}r.push(n)}if(e.length>0)throw new iu("invalid attribute.");return r}function db(t){if(ib(t)&&td(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const h of r)switch(h.type){case"callChain":{n=lb(n,h.args,h.loc);break}case"indexChain":{n=ob(n,h.index,h.loc);break}case"propChain":{n=ub(n,h.name,h.loc);break}}return n}return t}function yb(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:zo(t.left),right:zo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:zo(t.left),right:zo(t.right)}),priority:3}};function mb(t){const r=t.operators.map(n=>{const h=wb[n];if(h==null)throw new iu(`No such operator: ${n}.`);return h});let e=zf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?mb(e):e);return t}const Lo=class Lo{constructor(){me(this,"plugins");this.plugins={validate:[cb,gb],transform:[qf,yb,$b]}}static parse(r){return Lo.instance==null&&(Lo.instance=new Lo),Lo.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=bv(r,{startRule:"Preprocess"});e=bv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new iu(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`):new iu(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}};me(Lo,"instance");let Th=Lo;const xb="0.14.1",bb={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`};let Ih=[],Wu=null;function Ab(t){return Ih=Th.parse(t),JSON.stringify(Ih,null," ")}async function Cb(t){Wu==null||Wu.abort(),Wu=new Cs({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:Fh(r,!0),print:!0})},log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:Fh(e.val,!0),print:!1});break}}});try{await Wu.exec(Ih)}catch(r){t.err(r)}}const _b=Object.freeze(Object.defineProperty({__proto__:null,exec:Cb,parse:Ab,samples:bb,version:xb},Symbol.toStringTag,{value:"Module"})),kb=t=>(ty("data-v-449a2641"),t=t(),ry(),t),Pb={id:"root"},Eb={id:"grid1"},Mb={class:"type"},Sb={id:"grid2"},Fb=kb(()=>cn("header",null,null,-1)),Cv=["next","develop","0.16.0","0.15.0","0.14.1"],_v="0.16.0",Ob=uf({__name:"MainArea",props:{ver:{}},setup(t){const r=t,{parse:e,exec:n,version:h,samples:d}={next:L0,develop:m$,"0.16.0":Y$,"0.15.0":Bx,"0.14.1":_b}[r.ver],$=Bo(window.localStorage.getItem(h)??'<: "Hello, AiScript!"'),b=Bo([]),k=Bo(""),E=Bo(null);Zu($,()=>{window.localStorage.setItem(h,$.value);try{k.value=e($.value),E.value=null}catch(j){const D=j;E.value=D.message,console.error("info"in D?D.info:D);return}},{immediate:!0});function F(){b.value=[],n({in:j=>new Promise(D=>{const V=window.prompt(j);D(V??"")}),out:j=>b.value.push(j),end:j=>b.value.push(j),err:j=>{console.error(j),window.alert(`${j}`)}})}return(j,D)=>(cr(),Mr("div",Pb,[cn("div",Eb,[hr(gm,{modelValue:$.value,"onUpdate:modelValue":D[0]||(D[0]=V=>$.value=V),samples:rf(d),parseError:E.value,onRun:F},null,8,["modelValue","samples","parseError"]),hr(Ju,{id:"logs"},{header:xs(()=>[jn("Output")]),default:xs(()=>[(cr(!0),Mr(Qr,null,Jf(b.value,V=>(cr(),Mr("div",{class:Yr(["log",[{print:V.print},V.type]]),key:V.id},[cn("span",Mb,Wo(V.type),1),jn(" "+Wo(V.text),1)],2))),128))]),_:1})]),cn("div",Sb,[hr(Ju,{id:"ast"},{header:xs(()=>[jn("AST")]),default:xs(()=>[cn("pre",null,Wo(k.value),1)]),_:1}),hr(Ju,{id:"bin"},{header:xs(()=>[jn("Bytecode")]),default:xs(()=>[Fb]),_:1}),hr(Ju,{id:"debugger"},{header:xs(()=>[jn("Debugger")]),_:1})])]))}});const Nb=ff(Ob,[["__scopeId","data-v-449a2641"]]),Tb={id:"wrapper"},Ib=uf({__name:"App",setup(t){const r=Bo(window.localStorage.getItem("version")??_v),e=Object.fromEntries(Cv.map(h=>[h,h+(h==_v?"(latest)":"")]));function n(h){r.value=h,window.localStorage.setItem("version",r.value)}return(h,d)=>(cr(),Mr("div",Tb,[cn("h1",null,[jn(" AiScript ( "),hr(Cg,{id:"version",options:rf(e),onSelect:n},{default:xs(()=>[jn(Wo(r.value),1)]),_:1},8,["options"]),jn(" ) Playground ")]),(cr(!0),Mr(Qr,null,Jf(rf(Cv),$=>(cr(),Mr("div",null,[$==r.value?(cr(),vc(Nb,{key:0,ver:$},null,8,["ver"])):Tu("",!0)]))),256))]))}});const jb=ff(Ib,[["__scopeId","data-v-caf8f745"]]);Fw(jb).mount("#app"); diff --git a/assets/index-d8a4d495.js b/assets/index-d8a4d495.js deleted file mode 100644 index 949277d..0000000 --- a/assets/index-d8a4d495.js +++ /dev/null @@ -1,91 +0,0 @@ -var Dd=Object.defineProperty;var Ld=(t,r,e)=>r in t?Dd(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var be=(t,r,e)=>(Ld(t,typeof r!="symbol"?r+"":r,e),e);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))n(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const $ of d.addedNodes)$.tagName==="LINK"&&$.rel==="modulepreload"&&n($)}).observe(document,{childList:!0,subtree:!0});function e(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function n(c){if(c.ep)return;c.ep=!0;const d=e(c);fetch(c.href,d)}})();function zh(t,r){const e=Object.create(null),n=t.split(",");for(let c=0;c!!e[c.toLowerCase()]:c=>!!e[c]}const lr={},bu=[],Bn=()=>{},Bd=()=>!1,Hd=/^on[^a-z]/,lc=t=>Hd.test(t),Vh=t=>t.startsWith("onUpdate:"),Fr=Object.assign,Wh=(t,r)=>{const e=t.indexOf(r);e>-1&&t.splice(e,1)},Ud=Object.prototype.hasOwnProperty,$t=(t,r)=>Ud.call(t,r),Qe=Array.isArray,Au=t=>uc(t)==="[object Map]",sg=t=>uc(t)==="[object Set]",ft=t=>typeof t=="function",Er=t=>typeof t=="string",oc=t=>typeof t=="symbol",ir=t=>t!==null&&typeof t=="object",ng=t=>(ir(t)||ft(t))&&ft(t.then)&&ft(t.catch),ag=Object.prototype.toString,uc=t=>ag.call(t),qd=t=>uc(t).slice(8,-1),ig=t=>uc(t)==="[object Object]",Kh=t=>Er(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ff=zh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fc=t=>{const r=Object.create(null);return e=>r[e]||(r[e]=t(e))},zd=/-(\w)/g,Ru=fc(t=>t.replace(zd,(r,e)=>e?e.toUpperCase():"")),Vd=/\B([A-Z])/g,qu=fc(t=>t.replace(Vd,"-$1").toLowerCase()),lg=fc(t=>t.charAt(0).toUpperCase()+t.slice(1)),Pc=fc(t=>t?`on${lg(t)}`:""),ru=(t,r)=>!Object.is(t,r),Ec=(t,r)=>{for(let e=0;e{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value:e})},Wd=t=>{const r=parseFloat(t);return isNaN(r)?t:r},Kd=t=>{const r=Er(t)?Number(t):NaN;return isNaN(r)?t:r};let Hp;const Yc=()=>Hp||(Hp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Jh(t){if(Qe(t)){const r={};for(let e=0;e{if(e){const n=e.split(Xd);n.length>1&&(r[n[0].trim()]=n[1].trim())}}),r}function rs(t){let r="";if(Er(t))r=t;else if(Qe(t))for(let e=0;eEr(t)?t:t==null?"":Qe(t)||ir(t)&&(t.toString===ag||!ft(t.toString))?JSON.stringify(t,ug,2):String(t),ug=(t,r)=>r&&r.__v_isRef?ug(t,r.value):Au(r)?{[`Map(${r.size})`]:[...r.entries()].reduce((e,[n,c])=>(e[`${n} =>`]=c,e),{})}:sg(r)?{[`Set(${r.size})`]:[...r.values()]}:ir(r)&&!Qe(r)&&!ig(r)?String(r):r;let jn;class e0{constructor(r=!1){this.detached=r,this._active=!0,this.effects=[],this.cleanups=[],this.parent=jn,!r&&jn&&(this.index=(jn.scopes||(jn.scopes=[])).push(this)-1)}get active(){return this._active}run(r){if(this._active){const e=jn;try{return jn=this,r()}finally{jn=e}}}on(){jn=this}off(){jn=this.parent}stop(r){if(this._active){let e,n;for(e=0,n=this.effects.length;e{const r=new Set(t);return r.w=0,r.n=0,r},fg=t=>(t.w&mi)>0,cg=t=>(t.n&mi)>0,s0=({deps:t})=>{if(t.length)for(let r=0;r{const{deps:r}=t;if(r.length){let e=0;for(let n=0;n{(_==="length"||!oc(_)&&_>=m)&&x.push(A)})}else switch(e!==void 0&&x.push($.get(e)),r){case"add":Qe(t)?Kh(e)&&x.push($.get("length")):(x.push($.get(Ko)),Au(t)&&x.push($.get(rh)));break;case"delete":Qe(t)||(x.push($.get(Ko)),Au(t)&&x.push($.get(rh)));break;case"set":Au(t)&&x.push($.get(Ko));break}if(x.length===1)x[0]&&sh(x[0]);else{const m=[];for(const A of x)A&&m.push(...A);sh(Xh(m))}}function sh(t,r){const e=Qe(t)?t:[...t];for(const n of e)n.computed&&qp(n);for(const n of e)n.computed||qp(n)}function qp(t,r){(t!==Rn||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const a0=zh("__proto__,__v_isRef,__isVue"),vg=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(oc)),zp=i0();function i0(){const t={};return["includes","indexOf","lastIndexOf"].forEach(r=>{t[r]=function(...e){const n=kt(this);for(let d=0,$=this.length;d<$;d++)_s(n,"get",d+"");const c=n[r](...e);return c===-1||c===!1?n[r](...e.map(kt)):c}}),["push","pop","shift","unshift","splice"].forEach(r=>{t[r]=function(...e){zu();const n=kt(this)[r].apply(this,e);return Vu(),n}}),t}function l0(t){const r=kt(this);return _s(r,"has",t),r.hasOwnProperty(t)}class gg{constructor(r=!1,e=!1){this._isReadonly=r,this._shallow=e}get(r,e,n){const c=this._isReadonly,d=this._shallow;if(e==="__v_isReactive")return!c;if(e==="__v_isReadonly")return c;if(e==="__v_isShallow")return d;if(e==="__v_raw"&&n===(c?d?x0:mg:d?wg:yg).get(r))return r;const $=Qe(r);if(!c){if($&&$t(zp,e))return Reflect.get(zp,e,n);if(e==="hasOwnProperty")return l0}const x=Reflect.get(r,e,n);return(oc(e)?vg.has(e):a0(e))||(c||_s(r,"get",e),d)?x:ss(x)?$&&Kh(e)?x:x.value:ir(x)?c?xg(x):Yh(x):x}}class dg extends gg{constructor(r=!1){super(!1,r)}set(r,e,n,c){let d=r[e];if(Du(d)&&ss(d)&&!ss(n))return!1;if(!this._shallow&&(!Gf(n)&&!Du(n)&&(d=kt(d),n=kt(n)),!Qe(r)&&ss(d)&&!ss(n)))return d.value=n,!0;const $=Qe(r)&&Kh(e)?Number(e)t,cc=t=>Reflect.getPrototypeOf(t);function wf(t,r,e=!1,n=!1){t=t.__v_raw;const c=kt(t),d=kt(r);e||(ru(r,d)&&_s(c,"get",r),_s(c,"get",d));const{has:$}=cc(c),x=n?Zh:e?tp:of;if($.call(c,r))return x(t.get(r));if($.call(c,d))return x(t.get(d));t!==c&&t.get(r)}function mf(t,r=!1){const e=this.__v_raw,n=kt(e),c=kt(t);return r||(ru(t,c)&&_s(n,"has",t),_s(n,"has",c)),t===c?e.has(t):e.has(t)||e.has(c)}function xf(t,r=!1){return t=t.__v_raw,!r&&_s(kt(t),"iterate",Ko),Reflect.get(t,"size",t)}function Vp(t){t=kt(t);const r=kt(this);return cc(r).has.call(r,t)||(r.add(t),Za(r,"add",t,t)),this}function Wp(t,r){r=kt(r);const e=kt(this),{has:n,get:c}=cc(e);let d=n.call(e,t);d||(t=kt(t),d=n.call(e,t));const $=c.call(e,t);return e.set(t,r),d?ru(r,$)&&Za(e,"set",t,r):Za(e,"add",t,r),this}function Kp(t){const r=kt(this),{has:e,get:n}=cc(r);let c=e.call(r,t);c||(t=kt(t),c=e.call(r,t)),n&&n.call(r,t);const d=r.delete(t);return c&&Za(r,"delete",t,void 0),d}function Jp(){const t=kt(this),r=t.size!==0,e=t.clear();return r&&Za(t,"clear",void 0,void 0),e}function $f(t,r){return function(n,c){const d=this,$=d.__v_raw,x=kt($),m=r?Zh:t?tp:of;return!t&&_s(x,"iterate",Ko),$.forEach((A,_)=>n.call(c,m(A),m(_),d))}}function bf(t,r,e){return function(...n){const c=this.__v_raw,d=kt(c),$=Au(d),x=t==="entries"||t===Symbol.iterator&&$,m=t==="keys"&&$,A=c[t](...n),_=e?Zh:r?tp:of;return!r&&_s(d,"iterate",m?rh:Ko),{next(){const{value:k,done:S}=A.next();return S?{value:k,done:S}:{value:x?[_(k[0]),_(k[1])]:_(k),done:S}},[Symbol.iterator](){return this}}}}function ri(t){return function(...r){return t==="delete"?!1:this}}function h0(){const t={get(d){return wf(this,d)},get size(){return xf(this)},has:mf,add:Vp,set:Wp,delete:Kp,clear:Jp,forEach:$f(!1,!1)},r={get(d){return wf(this,d,!1,!0)},get size(){return xf(this)},has:mf,add:Vp,set:Wp,delete:Kp,clear:Jp,forEach:$f(!1,!0)},e={get(d){return wf(this,d,!0)},get size(){return xf(this,!0)},has(d){return mf.call(this,d,!0)},add:ri("add"),set:ri("set"),delete:ri("delete"),clear:ri("clear"),forEach:$f(!0,!1)},n={get(d){return wf(this,d,!0,!0)},get size(){return xf(this,!0)},has(d){return mf.call(this,d,!0)},add:ri("add"),set:ri("set"),delete:ri("delete"),clear:ri("clear"),forEach:$f(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{t[d]=bf(d,!1,!1),e[d]=bf(d,!0,!1),r[d]=bf(d,!1,!0),n[d]=bf(d,!0,!0)}),[t,e,r,n]}const[p0,v0,g0,d0]=h0();function Qh(t,r){const e=r?t?d0:g0:t?v0:p0;return(n,c,d)=>c==="__v_isReactive"?!t:c==="__v_isReadonly"?t:c==="__v_raw"?n:Reflect.get($t(e,c)&&c in n?e:n,c,d)}const y0={get:Qh(!1,!1)},w0={get:Qh(!1,!0)},m0={get:Qh(!0,!1)},yg=new WeakMap,wg=new WeakMap,mg=new WeakMap,x0=new WeakMap;function $0(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function b0(t){return t.__v_skip||!Object.isExtensible(t)?0:$0(qd(t))}function Yh(t){return Du(t)?t:ep(t,!1,u0,y0,yg)}function A0(t){return ep(t,!1,c0,w0,wg)}function xg(t){return ep(t,!0,f0,m0,mg)}function ep(t,r,e,n,c){if(!ir(t)||t.__v_raw&&!(r&&t.__v_isReactive))return t;const d=c.get(t);if(d)return d;const $=b0(t);if($===0)return t;const x=new Proxy(t,$===2?n:e);return c.set(t,x),x}function Cu(t){return Du(t)?Cu(t.__v_raw):!!(t&&t.__v_isReactive)}function Du(t){return!!(t&&t.__v_isReadonly)}function Gf(t){return!!(t&&t.__v_isShallow)}function $g(t){return Cu(t)||Du(t)}function kt(t){const r=t&&t.__v_raw;return r?kt(r):t}function bg(t){return Xf(t,"__v_skip",!0),t}const of=t=>ir(t)?Yh(t):t,tp=t=>ir(t)?xg(t):t;function Ag(t){di&&Rn&&(t=kt(t),pg(t.dep||(t.dep=Xh())))}function Cg(t,r){t=kt(t);const e=t.dep;e&&sh(e)}function ss(t){return!!(t&&t.__v_isRef===!0)}function Ho(t){return C0(t,!1)}function C0(t,r){return ss(t)?t:new _0(t,r)}class _0{constructor(r,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?r:kt(r),this._value=e?r:of(r)}get value(){return Ag(this),this._value}set value(r){const e=this.__v_isShallow||Gf(r)||Du(r);r=e?r:kt(r),ru(r,this._rawValue)&&(this._rawValue=r,this._value=e?r:of(r),Cg(this))}}function uf(t){return ss(t)?t.value:t}const k0={get:(t,r,e)=>uf(Reflect.get(t,r,e)),set:(t,r,e,n)=>{const c=t[r];return ss(c)&&!ss(e)?(c.value=e,!0):Reflect.set(t,r,e,n)}};function _g(t){return Cu(t)?t:new Proxy(t,k0)}class P0{constructor(r,e,n,c){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new Gh(r,()=>{this._dirty||(this._dirty=!0,Cg(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!c,this.__v_isReadonly=n}get value(){const r=kt(this);return Ag(r),(r._dirty||!r._cacheable)&&(r._dirty=!1,r._value=r.effect.run()),r._value}set value(r){this._setter(r)}}function E0(t,r,e=!1){let n,c;const d=ft(t);return d?(n=t,c=Bn):(n=t.get,c=t.set),new P0(n,c,d||!c,e)}function yi(t,r,e,n){let c;try{c=n?t(...n):t()}catch(d){hc(d,r,e)}return c}function vn(t,r,e,n){if(ft(t)){const d=yi(t,r,e,n);return d&&ng(d)&&d.catch($=>{hc($,r,e)}),d}const c=[];for(let d=0;d>>1,c=ts[n],d=cf(c);dVn&&ts.splice(r,1)}function N0(t){Qe(t)?_u.push(...t):(!Wa||!Wa.includes(t,t.allowRecurse?Ro+1:Ro))&&_u.push(t),Pg()}function Xp(t,r=ff?Vn+1:0){for(;rcf(e)-cf(n)),Ro=0;Rot.id==null?1/0:t.id,T0=(t,r)=>{const e=cf(t)-cf(r);if(e===0){if(t.pre&&!r.pre)return-1;if(r.pre&&!t.pre)return 1}return e};function Mg(t){nh=!1,ff=!0,ts.sort(T0);const r=Bn;try{for(Vn=0;VnEr(T)?T.trim():T)),k&&(c=e.map(Wd))}let x,m=n[x=Pc(r)]||n[x=Pc(Ru(r))];!m&&d&&(m=n[x=Pc(qu(r))]),m&&vn(m,t,6,c);const A=n[x+"Once"];if(A){if(!t.emitted)t.emitted={};else if(t.emitted[x])return;t.emitted[x]=!0,vn(A,t,6,c)}}function Sg(t,r,e=!1){const n=r.emitsCache,c=n.get(t);if(c!==void 0)return c;const d=t.emits;let $={},x=!1;if(!ft(t)){const m=A=>{const _=Sg(A,r,!0);_&&(x=!0,Fr($,_))};!e&&r.mixins.length&&r.mixins.forEach(m),t.extends&&m(t.extends),t.mixins&&t.mixins.forEach(m)}return!d&&!x?(ir(t)&&n.set(t,null),null):(Qe(d)?d.forEach(m=>$[m]=null):Fr($,d),ir(t)&&n.set(t,$),$)}function pc(t,r){return!t||!lc(r)?!1:(r=r.slice(2).replace(/Once$/,""),$t(t,r[0].toLowerCase()+r.slice(1))||$t(t,qu(r))||$t(t,r))}let xs=null,vc=null;function Zf(t){const r=xs;return xs=t,vc=t&&t.type.__scopeId||null,r}function j0(t){vc=t}function R0(){vc=null}function Cs(t,r=xs,e){if(!r||t._n)return t;const n=(...c)=>{n._d&&iv(-1);const d=Zf(r);let $;try{$=t(...c)}finally{Zf(d),n._d&&iv(1)}return $};return n._n=!0,n._c=!0,n._d=!0,n}function Mc(t){const{type:r,vnode:e,proxy:n,withProxy:c,props:d,propsOptions:[$],slots:x,attrs:m,emit:A,render:_,renderCache:k,data:S,setupState:T,ctx:G,inheritAttrs:ee}=t;let re,ge;const q=Zf(t);try{if(e.shapeFlag&4){const L=c||n;re=zn(_.call(L,L,k,d,T,S,G)),ge=m}else{const L=r;re=zn(L.length>1?L(d,{attrs:m,slots:x,emit:A}):L(d,null)),ge=r.props?m:D0(m)}}catch(L){nf.length=0,hc(L,t,1),re=pr(gn)}let U=re;if(ge&&ee!==!1){const L=Object.keys(ge),{shapeFlag:H}=U;L.length&&H&7&&($&&L.some(Vh)&&(ge=L0(ge,$)),U=xi(U,ge))}return e.dirs&&(U=xi(U),U.dirs=U.dirs?U.dirs.concat(e.dirs):e.dirs),e.transition&&(U.transition=e.transition),re=U,Zf(q),re}const D0=t=>{let r;for(const e in t)(e==="class"||e==="style"||lc(e))&&((r||(r={}))[e]=t[e]);return r},L0=(t,r)=>{const e={};for(const n in t)(!Vh(n)||!(n.slice(9)in r))&&(e[n]=t[n]);return e};function B0(t,r,e){const{props:n,children:c,component:d}=t,{props:$,children:x,patchFlag:m}=r,A=d.emitsOptions;if(r.dirs||r.transition)return!0;if(e&&m>=0){if(m&1024)return!0;if(m&16)return n?Gp(n,$,A):!!$;if(m&8){const _=r.dynamicProps;for(let k=0;k<_.length;k++){const S=_[k];if($[S]!==n[S]&&!pc(A,S))return!0}}}else return(c||x)&&(!x||!x.$stable)?!0:n===$?!1:n?$?Gp(n,$,A):!0:!!$;return!1}function Gp(t,r,e){const n=Object.keys(r);if(n.length!==Object.keys(t).length)return!0;for(let c=0;ct.__isSuspense;function z0(t,r){r&&r.pendingBranch?Qe(t)?r.effects.push(...t):r.effects.push(t):N0(t)}const Af={};function tf(t,r,e){return Fg(t,r,e)}function Fg(t,r,{immediate:e,deep:n,flush:c,onTrack:d,onTrigger:$}=lr){var x;const m=r0()===((x=Wr)==null?void 0:x.scope)?Wr:null;let A,_=!1,k=!1;if(ss(t)?(A=()=>t.value,_=Gf(t)):Cu(t)?(A=()=>t,n=!0):Qe(t)?(k=!0,_=t.some(L=>Cu(L)||Gf(L)),A=()=>t.map(L=>{if(ss(L))return L.value;if(Cu(L))return $u(L);if(ft(L))return yi(L,m,2)})):ft(t)?r?A=()=>yi(t,m,2):A=()=>{if(!(m&&m.isUnmounted))return S&&S(),vn(t,m,3,[T])}:A=Bn,r&&n){const L=A;A=()=>$u(L())}let S,T=L=>{S=q.onStop=()=>{yi(L,m,4)}},G;if(pf)if(T=Bn,r?e&&vn(r,m,3,[A(),k?[]:void 0,T]):A(),c==="sync"){const L=Ly();G=L.__watcherHandles||(L.__watcherHandles=[])}else return Bn;let ee=k?new Array(t.length).fill(Af):Af;const re=()=>{if(q.active)if(r){const L=q.run();(n||_||(k?L.some((H,W)=>ru(H,ee[W])):ru(L,ee)))&&(S&&S(),vn(r,m,3,[L,ee===Af?void 0:k&&ee[0]===Af?[]:ee,T]),ee=L)}else q.run()};re.allowRecurse=!!r;let ge;c==="sync"?ge=re:c==="post"?ge=()=>As(re,m&&m.suspense):(re.pre=!0,m&&(re.id=m.uid),ge=()=>sp(re));const q=new Gh(A,ge);r?e?re():ee=q.run():c==="post"?As(q.run.bind(q),m&&m.suspense):q.run();const U=()=>{q.stop(),m&&m.scope&&Wh(m.scope.effects,q)};return G&&G.push(U),U}function V0(t,r,e){const n=this.proxy,c=Er(t)?t.includes(".")?Og(n,t):()=>n[t]:t.bind(n,n);let d;ft(r)?d=r:(d=r.handler,e=r);const $=Wr;Bu(this);const x=Fg(c,d.bind(n),e);return $?Bu($):Jo(),x}function Og(t,r){const e=r.split(".");return()=>{let n=t;for(let c=0;c{$u(e,r)});else if(ig(t))for(const e in t)$u(t[e],r);return t}function No(t,r,e,n){const c=t.dirs,d=r&&r.dirs;for(let $=0;${t.isMounted=!0}),Dg(()=>{t.isUnmounting=!0}),t}const ln=[Function,Array],Ng={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ln,onEnter:ln,onAfterEnter:ln,onEnterCancelled:ln,onBeforeLeave:ln,onLeave:ln,onAfterLeave:ln,onLeaveCancelled:ln,onBeforeAppear:ln,onAppear:ln,onAfterAppear:ln,onAppearCancelled:ln},K0={name:"BaseTransition",props:Ng,setup(t,{slots:r}){const e=Fy(),n=W0();let c;return()=>{const d=r.default&&Ig(r.default(),!0);if(!d||!d.length)return;let $=d[0];if(d.length>1){for(const ee of d)if(ee.type!==gn){$=ee;break}}const x=kt(t),{mode:m}=x;if(n.isLeaving)return Sc($);const A=Zp($);if(!A)return Sc($);const _=ah(A,x,n,e);ih(A,_);const k=e.subTree,S=k&&Zp(k);let T=!1;const{getTransitionKey:G}=A.type;if(G){const ee=G();c===void 0?c=ee:ee!==c&&(c=ee,T=!0)}if(S&&S.type!==gn&&(!Do(A,S)||T)){const ee=ah(S,x,n,e);if(ih(S,ee),m==="out-in")return n.isLeaving=!0,ee.afterLeave=()=>{n.isLeaving=!1,e.update.active!==!1&&e.update()},Sc($);m==="in-out"&&A.type!==gn&&(ee.delayLeave=(re,ge,q)=>{const U=Tg(n,S);U[String(S.key)]=S,re[ui]=()=>{ge(),re[ui]=void 0,delete _.delayedLeave},_.delayedLeave=q})}return $}}},J0=K0;function Tg(t,r){const{leavingVNodes:e}=t;let n=e.get(r.type);return n||(n=Object.create(null),e.set(r.type,n)),n}function ah(t,r,e,n){const{appear:c,mode:d,persisted:$=!1,onBeforeEnter:x,onEnter:m,onAfterEnter:A,onEnterCancelled:_,onBeforeLeave:k,onLeave:S,onAfterLeave:T,onLeaveCancelled:G,onBeforeAppear:ee,onAppear:re,onAfterAppear:ge,onAppearCancelled:q}=r,U=String(t.key),L=Tg(e,t),H=(J,Y)=>{J&&vn(J,n,9,Y)},W=(J,Y)=>{const ue=Y[1];H(J,Y),Qe(J)?J.every(de=>de.length<=1)&&ue():J.length<=1&&ue()},V={mode:d,persisted:$,beforeEnter(J){let Y=x;if(!e.isMounted)if(c)Y=ee||x;else return;J[ui]&&J[ui](!0);const ue=L[U];ue&&Do(t,ue)&&ue.el[ui]&&ue.el[ui](),H(Y,[J])},enter(J){let Y=m,ue=A,de=_;if(!e.isMounted)if(c)Y=re||m,ue=ge||A,de=q||_;else return;let le=!1;const Te=J[Cf]=ze=>{le||(le=!0,ze?H(de,[J]):H(ue,[J]),V.delayedLeave&&V.delayedLeave(),J[Cf]=void 0)};Y?W(Y,[J,Te]):Te()},leave(J,Y){const ue=String(t.key);if(J[Cf]&&J[Cf](!0),e.isUnmounting)return Y();H(k,[J]);let de=!1;const le=J[ui]=Te=>{de||(de=!0,Y(),Te?H(G,[J]):H(T,[J]),J[ui]=void 0,L[ue]===t&&delete L[ue])};L[ue]=t,S?W(S,[J,le]):le()},clone(J){return ah(J,r,e,n)}};return V}function Sc(t){if(gc(t))return t=xi(t),t.children=null,t}function Zp(t){return gc(t)?t.children?t.children[0]:void 0:t}function ih(t,r){t.shapeFlag&6&&t.component?ih(t.component.subTree,r):t.shapeFlag&128?(t.ssContent.transition=r.clone(t.ssContent),t.ssFallback.transition=r.clone(t.ssFallback)):t.transition=r}function Ig(t,r=!1,e){let n=[],c=0;for(let d=0;d1)for(let d=0;dFr({name:t.name},r,{setup:t}))():t}const rf=t=>!!t.type.__asyncLoader,gc=t=>t.type.__isKeepAlive;function X0(t,r){jg(t,"a",r)}function G0(t,r){jg(t,"da",r)}function jg(t,r,e=Wr){const n=t.__wdc||(t.__wdc=()=>{let c=e;for(;c;){if(c.isDeactivated)return;c=c.parent}return t()});if(dc(r,n,e),e){let c=e.parent;for(;c&&c.parent;)gc(c.parent.vnode)&&Z0(n,r,e,c),c=c.parent}}function Z0(t,r,e,n){const c=dc(r,t,n,!0);Lg(()=>{Wh(n[r],c)},e)}function dc(t,r,e=Wr,n=!1){if(e){const c=e[t]||(e[t]=[]),d=r.__weh||(r.__weh=(...$)=>{if(e.isUnmounted)return;zu(),Bu(e);const x=vn(r,e,t,$);return Jo(),Vu(),x});return n?c.unshift(d):c.push(d),d}}const Qa=t=>(r,e=Wr)=>(!pf||t==="sp")&&dc(t,(...n)=>r(...n),e),Q0=Qa("bm"),Rg=Qa("m"),Y0=Qa("bu"),ey=Qa("u"),Dg=Qa("bum"),Lg=Qa("um"),ty=Qa("sp"),ry=Qa("rtg"),sy=Qa("rtc");function ny(t,r=Wr){dc("ec",t,r)}function Qf(t,r,e,n){let c;const d=e&&e[n];if(Qe(t)||Er(t)){c=new Array(t.length);for(let $=0,x=t.length;$r($,x,void 0,d&&d[x]));else{const $=Object.keys(t);c=new Array($.length);for(let x=0,m=$.length;xtc(r)?!(r.type===gn||r.type===es&&!Bg(r.children)):!0)?t:null}const lh=t=>t?Zg(t)?op(t)||t.proxy:lh(t.parent):null,sf=Fr(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>lh(t.parent),$root:t=>lh(t.root),$emit:t=>t.emit,$options:t=>np(t),$forceUpdate:t=>t.f||(t.f=()=>sp(t.update)),$nextTick:t=>t.n||(t.n=S0.bind(t.proxy)),$watch:t=>V0.bind(t)}),Fc=(t,r)=>t!==lr&&!t.__isScriptSetup&&$t(t,r),ay={get({_:t},r){const{ctx:e,setupState:n,data:c,props:d,accessCache:$,type:x,appContext:m}=t;let A;if(r[0]!=="$"){const T=$[r];if(T!==void 0)switch(T){case 1:return n[r];case 2:return c[r];case 4:return e[r];case 3:return d[r]}else{if(Fc(n,r))return $[r]=1,n[r];if(c!==lr&&$t(c,r))return $[r]=2,c[r];if((A=t.propsOptions[0])&&$t(A,r))return $[r]=3,d[r];if(e!==lr&&$t(e,r))return $[r]=4,e[r];oh&&($[r]=0)}}const _=sf[r];let k,S;if(_)return r==="$attrs"&&_s(t,"get",r),_(t);if((k=x.__cssModules)&&(k=k[r]))return k;if(e!==lr&&$t(e,r))return $[r]=4,e[r];if(S=m.config.globalProperties,$t(S,r))return S[r]},set({_:t},r,e){const{data:n,setupState:c,ctx:d}=t;return Fc(c,r)?(c[r]=e,!0):n!==lr&&$t(n,r)?(n[r]=e,!0):$t(t.props,r)||r[0]==="$"&&r.slice(1)in t?!1:(d[r]=e,!0)},has({_:{data:t,setupState:r,accessCache:e,ctx:n,appContext:c,propsOptions:d}},$){let x;return!!e[$]||t!==lr&&$t(t,$)||Fc(r,$)||(x=d[0])&&$t(x,$)||$t(n,$)||$t(sf,$)||$t(c.config.globalProperties,$)},defineProperty(t,r,e){return e.get!=null?t._.accessCache[r]=0:$t(e,"value")&&this.set(t,r,e.value,null),Reflect.defineProperty(t,r,e)}};function Qp(t){return Qe(t)?t.reduce((r,e)=>(r[e]=null,r),{}):t}let oh=!0;function iy(t){const r=np(t),e=t.proxy,n=t.ctx;oh=!1,r.beforeCreate&&Yp(r.beforeCreate,t,"bc");const{data:c,computed:d,methods:$,watch:x,provide:m,inject:A,created:_,beforeMount:k,mounted:S,beforeUpdate:T,updated:G,activated:ee,deactivated:re,beforeDestroy:ge,beforeUnmount:q,destroyed:U,unmounted:L,render:H,renderTracked:W,renderTriggered:V,errorCaptured:J,serverPrefetch:Y,expose:ue,inheritAttrs:de,components:le,directives:Te,filters:ze}=r;if(A&&ly(A,n,null),$)for(const ot in $){const je=$[ot];ft(je)&&(n[ot]=je.bind(e))}if(c){const ot=c.call(e,e);ir(ot)&&(t.data=Yh(ot))}if(oh=!0,d)for(const ot in d){const je=d[ot],lt=ft(je)?je.bind(e,e):ft(je.get)?je.get.bind(e,e):Bn,Ft=!ft(je)&&ft(je.set)?je.set.bind(e):Bn,Ot=Ry({get:lt,set:Ft});Object.defineProperty(n,ot,{enumerable:!0,configurable:!0,get:()=>Ot.value,set:Ye=>Ot.value=Ye})}if(x)for(const ot in x)Hg(x[ot],n,e,ot);if(m){const ot=ft(m)?m.call(e):m;Reflect.ownKeys(ot).forEach(je=>{py(je,ot[je])})}_&&Yp(_,t,"c");function Ke(ot,je){Qe(je)?je.forEach(lt=>ot(lt.bind(e))):je&&ot(je.bind(e))}if(Ke(Q0,k),Ke(Rg,S),Ke(Y0,T),Ke(ey,G),Ke(X0,ee),Ke(G0,re),Ke(ny,J),Ke(sy,W),Ke(ry,V),Ke(Dg,q),Ke(Lg,L),Ke(ty,Y),Qe(ue))if(ue.length){const ot=t.exposed||(t.exposed={});ue.forEach(je=>{Object.defineProperty(ot,je,{get:()=>e[je],set:lt=>e[je]=lt})})}else t.exposed||(t.exposed={});H&&t.render===Bn&&(t.render=H),de!=null&&(t.inheritAttrs=de),le&&(t.components=le),Te&&(t.directives=Te)}function ly(t,r,e=Bn){Qe(t)&&(t=uh(t));for(const n in t){const c=t[n];let d;ir(c)?"default"in c?d=Nf(c.from||n,c.default,!0):d=Nf(c.from||n):d=Nf(c),ss(d)?Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:()=>d.value,set:$=>d.value=$}):r[n]=d}}function Yp(t,r,e){vn(Qe(t)?t.map(n=>n.bind(r.proxy)):t.bind(r.proxy),r,e)}function Hg(t,r,e,n){const c=n.includes(".")?Og(e,n):()=>e[n];if(Er(t)){const d=r[t];ft(d)&&tf(c,d)}else if(ft(t))tf(c,t.bind(e));else if(ir(t))if(Qe(t))t.forEach(d=>Hg(d,r,e,n));else{const d=ft(t.handler)?t.handler.bind(e):r[t.handler];ft(d)&&tf(c,d,t)}}function np(t){const r=t.type,{mixins:e,extends:n}=r,{mixins:c,optionsCache:d,config:{optionMergeStrategies:$}}=t.appContext,x=d.get(r);let m;return x?m=x:!c.length&&!e&&!n?m=r:(m={},c.length&&c.forEach(A=>Yf(m,A,$,!0)),Yf(m,r,$)),ir(r)&&d.set(r,m),m}function Yf(t,r,e,n=!1){const{mixins:c,extends:d}=r;d&&Yf(t,d,e,!0),c&&c.forEach($=>Yf(t,$,e,!0));for(const $ in r)if(!(n&&$==="expose")){const x=oy[$]||e&&e[$];t[$]=x?x(t[$],r[$]):r[$]}return t}const oy={data:ev,props:tv,emits:tv,methods:Yu,computed:Yu,beforeCreate:vs,created:vs,beforeMount:vs,mounted:vs,beforeUpdate:vs,updated:vs,beforeDestroy:vs,beforeUnmount:vs,destroyed:vs,unmounted:vs,activated:vs,deactivated:vs,errorCaptured:vs,serverPrefetch:vs,components:Yu,directives:Yu,watch:fy,provide:ev,inject:uy};function ev(t,r){return r?t?function(){return Fr(ft(t)?t.call(this,this):t,ft(r)?r.call(this,this):r)}:r:t}function uy(t,r){return Yu(uh(t),uh(r))}function uh(t){if(Qe(t)){const r={};for(let e=0;e1)return e&&ft(r)?r.call(n&&n.proxy):r}}function vy(t,r,e,n=!1){const c={},d={};Xf(d,mc,1),t.propsDefaults=Object.create(null),qg(t,r,c,d);for(const $ in t.propsOptions[0])$ in c||(c[$]=void 0);e?t.props=n?c:A0(c):t.type.props?t.props=c:t.props=d,t.attrs=d}function gy(t,r,e,n){const{props:c,attrs:d,vnode:{patchFlag:$}}=t,x=kt(c),[m]=t.propsOptions;let A=!1;if((n||$>0)&&!($&16)){if($&8){const _=t.vnode.dynamicProps;for(let k=0;k<_.length;k++){let S=_[k];if(pc(t.emitsOptions,S))continue;const T=r[S];if(m)if($t(d,S))T!==d[S]&&(d[S]=T,A=!0);else{const G=Ru(S);c[G]=fh(m,x,G,T,t,!1)}else T!==d[S]&&(d[S]=T,A=!0)}}}else{qg(t,r,c,d)&&(A=!0);let _;for(const k in x)(!r||!$t(r,k)&&((_=qu(k))===k||!$t(r,_)))&&(m?e&&(e[k]!==void 0||e[_]!==void 0)&&(c[k]=fh(m,x,k,void 0,t,!0)):delete c[k]);if(d!==x)for(const k in d)(!r||!$t(r,k))&&(delete d[k],A=!0)}A&&Za(t,"set","$attrs")}function qg(t,r,e,n){const[c,d]=t.propsOptions;let $=!1,x;if(r)for(let m in r){if(Ff(m))continue;const A=r[m];let _;c&&$t(c,_=Ru(m))?!d||!d.includes(_)?e[_]=A:(x||(x={}))[_]=A:pc(t.emitsOptions,m)||(!(m in n)||A!==n[m])&&(n[m]=A,$=!0)}if(d){const m=kt(e),A=x||lr;for(let _=0;_{m=!0;const[S,T]=zg(k,r,!0);Fr($,S),T&&x.push(...T)};!e&&r.mixins.length&&r.mixins.forEach(_),t.extends&&_(t.extends),t.mixins&&t.mixins.forEach(_)}if(!d&&!m)return ir(t)&&n.set(t,bu),bu;if(Qe(d))for(let _=0;_-1,T[1]=ee<0||G-1||$t(T,"default"))&&x.push(k)}}}const A=[$,x];return ir(t)&&n.set(t,A),A}function rv(t){return t[0]!=="$"}function sv(t){const r=t&&t.toString().match(/^\s*(function|class) (\w+)/);return r?r[2]:t===null?"null":""}function nv(t,r){return sv(t)===sv(r)}function av(t,r){return Qe(r)?r.findIndex(e=>nv(e,t)):ft(r)&&nv(r,t)?0:-1}const Vg=t=>t[0]==="_"||t==="$stable",ap=t=>Qe(t)?t.map(zn):[zn(t)],dy=(t,r,e)=>{if(r._n)return r;const n=Cs((...c)=>ap(r(...c)),e);return n._c=!1,n},Wg=(t,r,e)=>{const n=t._ctx;for(const c in t){if(Vg(c))continue;const d=t[c];if(ft(d))r[c]=dy(c,d,n);else if(d!=null){const $=ap(d);r[c]=()=>$}}},Kg=(t,r)=>{const e=ap(r);t.slots.default=()=>e},yy=(t,r)=>{if(t.vnode.shapeFlag&32){const e=r._;e?(t.slots=kt(r),Xf(r,"_",e)):Wg(r,t.slots={})}else t.slots={},r&&Kg(t,r);Xf(t.slots,mc,1)},wy=(t,r,e)=>{const{vnode:n,slots:c}=t;let d=!0,$=lr;if(n.shapeFlag&32){const x=r._;x?e&&x===1?d=!1:(Fr(c,r),!e&&x===1&&delete c._):(d=!r.$stable,Wg(r,c)),$=r}else r&&(Kg(t,r),$={default:1});if(d)for(const x in c)!Vg(x)&&$[x]==null&&delete c[x]};function ch(t,r,e,n,c=!1){if(Qe(t)){t.forEach((S,T)=>ch(S,r&&(Qe(r)?r[T]:r),e,n,c));return}if(rf(n)&&!c)return;const d=n.shapeFlag&4?op(n.component)||n.component.proxy:n.el,$=c?null:d,{i:x,r:m}=t,A=r&&r.r,_=x.refs===lr?x.refs={}:x.refs,k=x.setupState;if(A!=null&&A!==m&&(Er(A)?(_[A]=null,$t(k,A)&&(k[A]=null)):ss(A)&&(A.value=null)),ft(m))yi(m,x,12,[$,_]);else{const S=Er(m),T=ss(m);if(S||T){const G=()=>{if(t.f){const ee=S?$t(k,m)?k[m]:_[m]:m.value;c?Qe(ee)&&Wh(ee,d):Qe(ee)?ee.includes(d)||ee.push(d):S?(_[m]=[d],$t(k,m)&&(k[m]=_[m])):(m.value=[d],t.k&&(_[t.k]=m.value))}else S?(_[m]=$,$t(k,m)&&(k[m]=$)):T&&(m.value=$,t.k&&(_[t.k]=$))};$?(G.id=-1,As(G,e)):G()}}}const As=z0;function my(t){return xy(t)}function xy(t,r){const e=Yc();e.__VUE__=!0;const{insert:n,remove:c,patchProp:d,createElement:$,createText:x,createComment:m,setText:A,setElementText:_,parentNode:k,nextSibling:S,setScopeId:T=Bn,insertStaticContent:G}=t,ee=(z,Z,se,ve=null,ye=null,oe=null,Ne=!1,me=null,$e=!!Z.dynamicChildren)=>{if(z===Z)return;z&&!Do(z,Z)&&(ve=yr(z),Ye(z,ye,oe,!0),z=null),Z.patchFlag===-2&&($e=!1,Z.dynamicChildren=null);const{type:he,ref:Le,shapeFlag:Re}=Z;switch(he){case yc:re(z,Z,se,ve);break;case gn:ge(z,Z,se,ve);break;case Oc:z==null&&q(Z,se,ve,Ne);break;case es:le(z,Z,se,ve,ye,oe,Ne,me,$e);break;default:Re&1?H(z,Z,se,ve,ye,oe,Ne,me,$e):Re&6?Te(z,Z,se,ve,ye,oe,Ne,me,$e):(Re&64||Re&128)&&he.process(z,Z,se,ve,ye,oe,Ne,me,$e,kr)}Le!=null&&ye&&ch(Le,z&&z.ref,oe,Z||z,!Z)},re=(z,Z,se,ve)=>{if(z==null)n(Z.el=x(Z.children),se,ve);else{const ye=Z.el=z.el;Z.children!==z.children&&A(ye,Z.children)}},ge=(z,Z,se,ve)=>{z==null?n(Z.el=m(Z.children||""),se,ve):Z.el=z.el},q=(z,Z,se,ve)=>{[z.el,z.anchor]=G(z.children,Z,se,ve,z.el,z.anchor)},U=({el:z,anchor:Z},se,ve)=>{let ye;for(;z&&z!==Z;)ye=S(z),n(z,se,ve),z=ye;n(Z,se,ve)},L=({el:z,anchor:Z})=>{let se;for(;z&&z!==Z;)se=S(z),c(z),z=se;c(Z)},H=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{Ne=Ne||Z.type==="svg",z==null?W(Z,se,ve,ye,oe,Ne,me,$e):Y(z,Z,ye,oe,Ne,me,$e)},W=(z,Z,se,ve,ye,oe,Ne,me)=>{let $e,he;const{type:Le,props:Re,shapeFlag:He,transition:We,dirs:Ze}=z;if($e=z.el=$(z.type,oe,Re&&Re.is,Re),He&8?_($e,z.children):He&16&&J(z.children,$e,null,ve,ye,oe&&Le!=="foreignObject",Ne,me),Ze&&No(z,null,ve,"created"),V($e,z,z.scopeId,Ne,ve),Re){for(const at in Re)at!=="value"&&!Ff(at)&&d($e,at,null,Re[at],oe,z.children,ve,ye,Pt);"value"in Re&&d($e,"value",null,Re.value),(he=Re.onVnodeBeforeMount)&&Hn(he,ve,z)}Ze&&No(z,null,ve,"beforeMount");const nt=$y(ye,We);nt&&We.beforeEnter($e),n($e,Z,se),((he=Re&&Re.onVnodeMounted)||nt||Ze)&&As(()=>{he&&Hn(he,ve,z),nt&&We.enter($e),Ze&&No(z,null,ve,"mounted")},ye)},V=(z,Z,se,ve,ye)=>{if(se&&T(z,se),ve)for(let oe=0;oe{for(let he=$e;he{const me=Z.el=z.el;let{patchFlag:$e,dynamicChildren:he,dirs:Le}=Z;$e|=z.patchFlag&16;const Re=z.props||lr,He=Z.props||lr;let We;se&&To(se,!1),(We=He.onVnodeBeforeUpdate)&&Hn(We,se,Z,z),Le&&No(Z,z,se,"beforeUpdate"),se&&To(se,!0);const Ze=ye&&Z.type!=="foreignObject";if(he?ue(z.dynamicChildren,he,me,se,ve,Ze,oe):Ne||je(z,Z,me,null,se,ve,Ze,oe,!1),$e>0){if($e&16)de(me,Z,Re,He,se,ve,ye);else if($e&2&&Re.class!==He.class&&d(me,"class",null,He.class,ye),$e&4&&d(me,"style",Re.style,He.style,ye),$e&8){const nt=Z.dynamicProps;for(let at=0;at{We&&Hn(We,se,Z,z),Le&&No(Z,z,se,"updated")},ve)},ue=(z,Z,se,ve,ye,oe,Ne)=>{for(let me=0;me{if(se!==ve){if(se!==lr)for(const me in se)!Ff(me)&&!(me in ve)&&d(z,me,se[me],null,Ne,Z.children,ye,oe,Pt);for(const me in ve){if(Ff(me))continue;const $e=ve[me],he=se[me];$e!==he&&me!=="value"&&d(z,me,he,$e,Ne,Z.children,ye,oe,Pt)}"value"in ve&&d(z,"value",se.value,ve.value)}},le=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{const he=Z.el=z?z.el:x(""),Le=Z.anchor=z?z.anchor:x("");let{patchFlag:Re,dynamicChildren:He,slotScopeIds:We}=Z;We&&(me=me?me.concat(We):We),z==null?(n(he,se,ve),n(Le,se,ve),J(Z.children,se,Le,ye,oe,Ne,me,$e)):Re>0&&Re&64&&He&&z.dynamicChildren?(ue(z.dynamicChildren,He,se,ye,oe,Ne,me),(Z.key!=null||ye&&Z===ye.subTree)&&Jg(z,Z,!0)):je(z,Z,se,Le,ye,oe,Ne,me,$e)},Te=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{Z.slotScopeIds=me,z==null?Z.shapeFlag&512?ye.ctx.activate(Z,se,ve,Ne,$e):ze(Z,se,ve,ye,oe,Ne,$e):dt(z,Z,$e)},ze=(z,Z,se,ve,ye,oe,Ne)=>{const me=z.component=Sy(z,ve,ye);if(gc(z)&&(me.ctx.renderer=kr),Oy(me),me.asyncDep){if(ye&&ye.registerDep(me,Ke),!z.el){const $e=me.subTree=pr(gn);ge(null,$e,Z,se)}return}Ke(me,z,Z,se,ye,oe,Ne)},dt=(z,Z,se)=>{const ve=Z.component=z.component;if(B0(z,Z,se))if(ve.asyncDep&&!ve.asyncResolved){ot(ve,Z,se);return}else ve.next=Z,O0(ve.update),ve.update();else Z.el=z.el,ve.vnode=Z},Ke=(z,Z,se,ve,ye,oe,Ne)=>{const me=()=>{if(z.isMounted){let{next:Le,bu:Re,u:He,parent:We,vnode:Ze}=z,nt=Le,at;To(z,!1),Le?(Le.el=Ze.el,ot(z,Le,Ne)):Le=Ze,Re&&Ec(Re),(at=Le.props&&Le.props.onVnodeBeforeUpdate)&&Hn(at,We,Le,Ze),To(z,!0);const mt=Mc(z),Ht=z.subTree;z.subTree=mt,ee(Ht,mt,k(Ht.el),yr(Ht),z,ye,oe),Le.el=mt.el,nt===null&&H0(z,mt.el),He&&As(He,ye),(at=Le.props&&Le.props.onVnodeUpdated)&&As(()=>Hn(at,We,Le,Ze),ye)}else{let Le;const{el:Re,props:He}=Z,{bm:We,m:Ze,parent:nt}=z,at=rf(Z);if(To(z,!1),We&&Ec(We),!at&&(Le=He&&He.onVnodeBeforeMount)&&Hn(Le,nt,Z),To(z,!0),Re&&Nt){const mt=()=>{z.subTree=Mc(z),Nt(Re,z.subTree,z,ye,null)};at?Z.type.__asyncLoader().then(()=>!z.isUnmounted&&mt()):mt()}else{const mt=z.subTree=Mc(z);ee(null,mt,se,ve,z,ye,oe),Z.el=mt.el}if(Ze&&As(Ze,ye),!at&&(Le=He&&He.onVnodeMounted)){const mt=Z;As(()=>Hn(Le,nt,mt),ye)}(Z.shapeFlag&256||nt&&rf(nt.vnode)&&nt.vnode.shapeFlag&256)&&z.a&&As(z.a,ye),z.isMounted=!0,Z=se=ve=null}},$e=z.effect=new Gh(me,()=>sp(he),z.scope),he=z.update=()=>$e.run();he.id=z.uid,To(z,!0),he()},ot=(z,Z,se)=>{Z.component=z;const ve=z.vnode.props;z.vnode=Z,z.next=null,gy(z,Z.props,ve,se),wy(z,Z.children,se),zu(),Xp(),Vu()},je=(z,Z,se,ve,ye,oe,Ne,me,$e=!1)=>{const he=z&&z.children,Le=z?z.shapeFlag:0,Re=Z.children,{patchFlag:He,shapeFlag:We}=Z;if(He>0){if(He&128){Ft(he,Re,se,ve,ye,oe,Ne,me,$e);return}else if(He&256){lt(he,Re,se,ve,ye,oe,Ne,me,$e);return}}We&8?(Le&16&&Pt(he,ye,oe),Re!==he&&_(se,Re)):Le&16?We&16?Ft(he,Re,se,ve,ye,oe,Ne,me,$e):Pt(he,ye,oe,!0):(Le&8&&_(se,""),We&16&&J(Re,se,ve,ye,oe,Ne,me,$e))},lt=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{z=z||bu,Z=Z||bu;const he=z.length,Le=Z.length,Re=Math.min(he,Le);let He;for(He=0;HeLe?Pt(z,ye,oe,!0,!1,Re):J(Z,se,ve,ye,oe,Ne,me,$e,Re)},Ft=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{let he=0;const Le=Z.length;let Re=z.length-1,He=Le-1;for(;he<=Re&&he<=He;){const We=z[he],Ze=Z[he]=$e?fi(Z[he]):zn(Z[he]);if(Do(We,Ze))ee(We,Ze,se,null,ye,oe,Ne,me,$e);else break;he++}for(;he<=Re&&he<=He;){const We=z[Re],Ze=Z[He]=$e?fi(Z[He]):zn(Z[He]);if(Do(We,Ze))ee(We,Ze,se,null,ye,oe,Ne,me,$e);else break;Re--,He--}if(he>Re){if(he<=He){const We=He+1,Ze=WeHe)for(;he<=Re;)Ye(z[he],ye,oe,!0),he++;else{const We=he,Ze=he,nt=new Map;for(he=Ze;he<=He;he++){const Tt=Z[he]=$e?fi(Z[he]):zn(Z[he]);Tt.key!=null&&nt.set(Tt.key,he)}let at,mt=0;const Ht=He-Ze+1;let bt=!1,Zt=0;const Es=new Array(Ht);for(he=0;he=Ht){Ye(Tt,ye,oe,!0);continue}let ht;if(Tt.key!=null)ht=nt.get(Tt.key);else for(at=Ze;at<=He;at++)if(Es[at-Ze]===0&&Do(Tt,Z[at])){ht=at;break}ht===void 0?Ye(Tt,ye,oe,!0):(Es[ht-Ze]=he+1,ht>=Zt?Zt=ht:bt=!0,ee(Tt,Z[ht],se,null,ye,oe,Ne,me,$e),mt++)}const Jr=bt?by(Es):bu;for(at=Jr.length-1,he=Ht-1;he>=0;he--){const Tt=Ze+he,ht=Z[Tt],Rt=Tt+1{const{el:oe,type:Ne,transition:me,children:$e,shapeFlag:he}=z;if(he&6){Ot(z.component.subTree,Z,se,ve);return}if(he&128){z.suspense.move(Z,se,ve);return}if(he&64){Ne.move(z,Z,se,kr);return}if(Ne===es){n(oe,Z,se);for(let Re=0;Re<$e.length;Re++)Ot($e[Re],Z,se,ve);n(z.anchor,Z,se);return}if(Ne===Oc){U(z,Z,se);return}if(ve!==2&&he&1&&me)if(ve===0)me.beforeEnter(oe),n(oe,Z,se),As(()=>me.enter(oe),ye);else{const{leave:Re,delayLeave:He,afterLeave:We}=me,Ze=()=>n(oe,Z,se),nt=()=>{Re(oe,()=>{Ze(),We&&We()})};He?He(oe,Ze,nt):nt()}else n(oe,Z,se)},Ye=(z,Z,se,ve=!1,ye=!1)=>{const{type:oe,props:Ne,ref:me,children:$e,dynamicChildren:he,shapeFlag:Le,patchFlag:Re,dirs:He}=z;if(me!=null&&ch(me,null,se,z,!0),Le&256){Z.ctx.deactivate(z);return}const We=Le&1&&He,Ze=!rf(z);let nt;if(Ze&&(nt=Ne&&Ne.onVnodeBeforeUnmount)&&Hn(nt,Z,z),Le&6)wr(z.component,se,ve);else{if(Le&128){z.suspense.unmount(se,ve);return}We&&No(z,null,Z,"beforeUnmount"),Le&64?z.type.remove(z,Z,se,ye,kr,ve):he&&(oe!==es||Re>0&&Re&64)?Pt(he,Z,se,!1,!0):(oe===es&&Re&384||!ye&&Le&16)&&Pt($e,Z,se),ve&&Or(z)}(Ze&&(nt=Ne&&Ne.onVnodeUnmounted)||We)&&As(()=>{nt&&Hn(nt,Z,z),We&&No(z,null,Z,"unmounted")},se)},Or=z=>{const{type:Z,el:se,anchor:ve,transition:ye}=z;if(Z===es){Bt(se,ve);return}if(Z===Oc){L(z);return}const oe=()=>{c(se),ye&&!ye.persisted&&ye.afterLeave&&ye.afterLeave()};if(z.shapeFlag&1&&ye&&!ye.persisted){const{leave:Ne,delayLeave:me}=ye,$e=()=>Ne(se,oe);me?me(z.el,oe,$e):$e()}else oe()},Bt=(z,Z)=>{let se;for(;z!==Z;)se=S(z),c(z),z=se;c(Z)},wr=(z,Z,se)=>{const{bum:ve,scope:ye,update:oe,subTree:Ne,um:me}=z;ve&&Ec(ve),ye.stop(),oe&&(oe.active=!1,Ye(Ne,z,Z,se)),me&&As(me,Z),As(()=>{z.isUnmounted=!0},Z),Z&&Z.pendingBranch&&!Z.isUnmounted&&z.asyncDep&&!z.asyncResolved&&z.suspenseId===Z.pendingId&&(Z.deps--,Z.deps===0&&Z.resolve())},Pt=(z,Z,se,ve=!1,ye=!1,oe=0)=>{for(let Ne=oe;Nez.shapeFlag&6?yr(z.component.subTree):z.shapeFlag&128?z.suspense.next():S(z.anchor||z.el),Nr=(z,Z,se)=>{z==null?Z._vnode&&Ye(Z._vnode,null,null,!0):ee(Z._vnode||null,z,Z,null,null,null,se),Xp(),Eg(),Z._vnode=z},kr={p:ee,um:Ye,m:Ot,r:Or,mt:ze,mc:J,pc:je,pbc:ue,n:yr,o:t};let Mr,Nt;return r&&([Mr,Nt]=r(kr)),{render:Nr,hydrate:Mr,createApp:hy(Nr,Mr)}}function To({effect:t,update:r},e){t.allowRecurse=r.allowRecurse=e}function $y(t,r){return(!t||t&&!t.pendingBranch)&&r&&!r.persisted}function Jg(t,r,e=!1){const n=t.children,c=r.children;if(Qe(n)&&Qe(c))for(let d=0;d>1,t[e[x]]0&&(r[n]=e[d-1]),e[d]=n)}}for(d=e.length,$=e[d-1];d-- >0;)e[d]=$,$=r[$];return e}const Ay=t=>t.__isTeleport,es=Symbol.for("v-fgt"),yc=Symbol.for("v-txt"),gn=Symbol.for("v-cmt"),Oc=Symbol.for("v-stc"),nf=[];let Ln=null;function hr(t=!1){nf.push(Ln=t?null:[])}function Cy(){nf.pop(),Ln=nf[nf.length-1]||null}let hf=1;function iv(t){hf+=t}function Xg(t){return t.dynamicChildren=hf>0?Ln||bu:null,Cy(),hf>0&&Ln&&Ln.push(t),t}function Sr(t,r,e,n,c,d){return Xg(pn(t,r,e,n,c,d,!0))}function wc(t,r,e,n,c){return Xg(pr(t,r,e,n,c,!0))}function tc(t){return t?t.__v_isVNode===!0:!1}function Do(t,r){return t.type===r.type&&t.key===r.key}const mc="__vInternal",Gg=({key:t})=>t??null,Tf=({ref:t,ref_key:r,ref_for:e})=>(typeof t=="number"&&(t=""+t),t!=null?Er(t)||ss(t)||ft(t)?{i:xs,r:t,k:r,f:!!e}:t:null);function pn(t,r=null,e=null,n=0,c=null,d=t===es?0:1,$=!1,x=!1){const m={__v_isVNode:!0,__v_skip:!0,type:t,props:r,key:r&&Gg(r),ref:r&&Tf(r),scopeId:vc,slotScopeIds:null,children:e,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:n,dynamicProps:c,dynamicChildren:null,appContext:null,ctx:xs};return x?(ip(m,e),d&128&&t.normalize(m)):e&&(m.shapeFlag|=Er(e)?8:16),hf>0&&!$&&Ln&&(m.patchFlag>0||d&6)&&m.patchFlag!==32&&Ln.push(m),m}const pr=_y;function _y(t,r=null,e=null,n=0,c=null,d=!1){if((!t||t===U0)&&(t=gn),tc(t)){const x=xi(t,r,!0);return e&&ip(x,e),hf>0&&!d&&Ln&&(x.shapeFlag&6?Ln[Ln.indexOf(t)]=x:Ln.push(x)),x.patchFlag|=-2,x}if(jy(t)&&(t=t.__vccOpts),r){r=ky(r);let{class:x,style:m}=r;x&&!Er(x)&&(r.class=rs(x)),ir(m)&&($g(m)&&!Qe(m)&&(m=Fr({},m)),r.style=Jh(m))}const $=Er(t)?1:q0(t)?128:Ay(t)?64:ir(t)?4:ft(t)?2:0;return pn(t,r,e,n,c,$,d,!0)}function ky(t){return t?$g(t)||mc in t?Fr({},t):t:null}function xi(t,r,e=!1){const{props:n,ref:c,patchFlag:d,children:$}=t,x=r?Py(n||{},r):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:x,key:x&&Gg(x),ref:r&&r.ref?e&&c?Qe(c)?c.concat(Tf(r)):[c,Tf(r)]:Tf(r):c,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:$,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:r&&t.type!==es?d===-1?16:d|16:d,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&xi(t.ssContent),ssFallback:t.ssFallback&&xi(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function Dn(t=" ",r=0){return pr(yc,null,t,r)}function Lu(t="",r=!1){return r?(hr(),wc(gn,null,t)):pr(gn,null,t)}function zn(t){return t==null||typeof t=="boolean"?pr(gn):Qe(t)?pr(es,null,t.slice()):typeof t=="object"?fi(t):pr(yc,null,String(t))}function fi(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:xi(t)}function ip(t,r){let e=0;const{shapeFlag:n}=t;if(r==null)r=null;else if(Qe(r))e=16;else if(typeof r=="object")if(n&65){const c=r.default;c&&(c._c&&(c._d=!1),ip(t,c()),c._c&&(c._d=!0));return}else{e=32;const c=r._;!c&&!(mc in r)?r._ctx=xs:c===3&&xs&&(xs.slots._===1?r._=1:(r._=2,t.patchFlag|=1024))}else ft(r)?(r={default:r,_ctx:xs},e=32):(r=String(r),n&64?(e=16,r=[Dn(r)]):e=8);t.children=r,t.shapeFlag|=e}function Py(...t){const r={};for(let e=0;eWr||xs;let lp,du,lv="__VUE_INSTANCE_SETTERS__";(du=Yc()[lv])||(du=Yc()[lv]=[]),du.push(t=>Wr=t),lp=t=>{du.length>1?du.forEach(r=>r(t)):du[0](t)};const Bu=t=>{lp(t),t.scope.on()},Jo=()=>{Wr&&Wr.scope.off(),lp(null)};function Zg(t){return t.vnode.shapeFlag&4}let pf=!1;function Oy(t,r=!1){pf=r;const{props:e,children:n}=t.vnode,c=Zg(t);vy(t,e,c,r),yy(t,n);const d=c?Ny(t,r):void 0;return pf=!1,d}function Ny(t,r){const e=t.type;t.accessCache=Object.create(null),t.proxy=bg(new Proxy(t.ctx,ay));const{setup:n}=e;if(n){const c=t.setupContext=n.length>1?Iy(t):null;Bu(t),zu();const d=yi(n,t,0,[t.props,c]);if(Vu(),Jo(),ng(d)){if(d.then(Jo,Jo),r)return d.then($=>{ov(t,$,r)}).catch($=>{hc($,t,0)});t.asyncDep=d}else ov(t,d,r)}else Qg(t,r)}function ov(t,r,e){ft(r)?t.type.__ssrInlineRender?t.ssrRender=r:t.render=r:ir(r)&&(t.setupState=_g(r)),Qg(t,e)}let uv;function Qg(t,r,e){const n=t.type;if(!t.render){if(!r&&uv&&!n.render){const c=n.template||np(t).template;if(c){const{isCustomElement:d,compilerOptions:$}=t.appContext.config,{delimiters:x,compilerOptions:m}=n,A=Fr(Fr({isCustomElement:d,delimiters:x},$),m);n.render=uv(c,A)}}t.render=n.render||Bn}{Bu(t),zu();try{iy(t)}finally{Vu(),Jo()}}}function Ty(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(r,e){return _s(t,"get","$attrs"),r[e]}}))}function Iy(t){const r=e=>{t.exposed=e||{}};return{get attrs(){return Ty(t)},slots:t.slots,emit:t.emit,expose:r}}function op(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(_g(bg(t.exposed)),{get(r,e){if(e in r)return r[e];if(e in sf)return sf[e](t)},has(r,e){return e in r||e in sf}}))}function jy(t){return ft(t)&&"__vccOpts"in t}const Ry=(t,r)=>E0(t,r,pf);function ai(t,r,e){const n=arguments.length;return n===2?ir(r)&&!Qe(r)?tc(r)?pr(t,null,[r]):pr(t,r):pr(t,null,r):(n>3?e=Array.prototype.slice.call(arguments,2):n===3&&tc(e)&&(e=[e]),pr(t,r,e))}const Dy=Symbol.for("v-scx"),Ly=()=>Nf(Dy),By="3.3.8",Hy="http://www.w3.org/2000/svg",Lo=typeof document<"u"?document:null,fv=Lo&&Lo.createElement("template"),Uy={insert:(t,r,e)=>{r.insertBefore(t,e||null)},remove:t=>{const r=t.parentNode;r&&r.removeChild(t)},createElement:(t,r,e,n)=>{const c=r?Lo.createElementNS(Hy,t):Lo.createElement(t,e?{is:e}:void 0);return t==="select"&&n&&n.multiple!=null&&c.setAttribute("multiple",n.multiple),c},createText:t=>Lo.createTextNode(t),createComment:t=>Lo.createComment(t),setText:(t,r)=>{t.nodeValue=r},setElementText:(t,r)=>{t.textContent=r},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Lo.querySelector(t),setScopeId(t,r){t.setAttribute(r,"")},insertStaticContent(t,r,e,n,c,d){const $=e?e.previousSibling:r.lastChild;if(c&&(c===d||c.nextSibling))for(;r.insertBefore(c.cloneNode(!0),e),!(c===d||!(c=c.nextSibling)););else{fv.innerHTML=n?`${t}`:t;const x=fv.content;if(n){const m=x.firstChild;for(;m.firstChild;)x.appendChild(m.firstChild);x.removeChild(m)}r.insertBefore(x,e)}return[$?$.nextSibling:r.firstChild,e?e.previousSibling:r.lastChild]}},si="transition",Wu="animation",vf=Symbol("_vtc"),up=(t,{slots:r})=>ai(J0,qy(t),r);up.displayName="Transition";const Yg={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};up.props=Fr({},Ng,Yg);const Io=(t,r=[])=>{Qe(t)?t.forEach(e=>e(...r)):t&&t(...r)},cv=t=>t?Qe(t)?t.some(r=>r.length>1):t.length>1:!1;function qy(t){const r={};for(const le in t)le in Yg||(r[le]=t[le]);if(t.css===!1)return r;const{name:e="v",type:n,duration:c,enterFromClass:d=`${e}-enter-from`,enterActiveClass:$=`${e}-enter-active`,enterToClass:x=`${e}-enter-to`,appearFromClass:m=d,appearActiveClass:A=$,appearToClass:_=x,leaveFromClass:k=`${e}-leave-from`,leaveActiveClass:S=`${e}-leave-active`,leaveToClass:T=`${e}-leave-to`}=t,G=zy(c),ee=G&&G[0],re=G&&G[1],{onBeforeEnter:ge,onEnter:q,onEnterCancelled:U,onLeave:L,onLeaveCancelled:H,onBeforeAppear:W=ge,onAppear:V=q,onAppearCancelled:J=U}=r,Y=(le,Te,ze)=>{jo(le,Te?_:x),jo(le,Te?A:$),ze&&ze()},ue=(le,Te)=>{le._isLeaving=!1,jo(le,k),jo(le,T),jo(le,S),Te&&Te()},de=le=>(Te,ze)=>{const dt=le?V:q,Ke=()=>Y(Te,le,ze);Io(dt,[Te,Ke]),hv(()=>{jo(Te,le?m:d),ni(Te,le?_:x),cv(dt)||pv(Te,n,ee,Ke)})};return Fr(r,{onBeforeEnter(le){Io(ge,[le]),ni(le,d),ni(le,$)},onBeforeAppear(le){Io(W,[le]),ni(le,m),ni(le,A)},onEnter:de(!1),onAppear:de(!0),onLeave(le,Te){le._isLeaving=!0;const ze=()=>ue(le,Te);ni(le,k),Ky(),ni(le,S),hv(()=>{le._isLeaving&&(jo(le,k),ni(le,T),cv(L)||pv(le,n,re,ze))}),Io(L,[le,ze])},onEnterCancelled(le){Y(le,!1),Io(U,[le])},onAppearCancelled(le){Y(le,!0),Io(J,[le])},onLeaveCancelled(le){ue(le),Io(H,[le])}})}function zy(t){if(t==null)return null;if(ir(t))return[Nc(t.enter),Nc(t.leave)];{const r=Nc(t);return[r,r]}}function Nc(t){return Kd(t)}function ni(t,r){r.split(/\s+/).forEach(e=>e&&t.classList.add(e)),(t[vf]||(t[vf]=new Set)).add(r)}function jo(t,r){r.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const e=t[vf];e&&(e.delete(r),e.size||(t[vf]=void 0))}function hv(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let Vy=0;function pv(t,r,e,n){const c=t._endId=++Vy,d=()=>{c===t._endId&&n()};if(e)return setTimeout(d,e);const{type:$,timeout:x,propCount:m}=Wy(t,r);if(!$)return n();const A=$+"end";let _=0;const k=()=>{t.removeEventListener(A,S),d()},S=T=>{T.target===t&&++_>=m&&k()};setTimeout(()=>{_(e[G]||"").split(", "),c=n(`${si}Delay`),d=n(`${si}Duration`),$=vv(c,d),x=n(`${Wu}Delay`),m=n(`${Wu}Duration`),A=vv(x,m);let _=null,k=0,S=0;r===si?$>0&&(_=si,k=$,S=d.length):r===Wu?A>0&&(_=Wu,k=A,S=m.length):(k=Math.max($,A),_=k>0?$>A?si:Wu:null,S=_?_===si?d.length:m.length:0);const T=_===si&&/\b(transform|all)(,|$)/.test(n(`${si}Property`).toString());return{type:_,timeout:k,propCount:S,hasTransform:T}}function vv(t,r){for(;t.lengthgv(e)+gv(t[n])))}function gv(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Ky(){return document.body.offsetHeight}function Jy(t,r,e){const n=t[vf];n&&(r=(r?[r,...n]:[...n]).join(" ")),r==null?t.removeAttribute("class"):e?t.setAttribute("class",r):t.className=r}const Xy=Symbol("_vod");function Gy(t,r,e){const n=t.style,c=Er(e);if(e&&!c){if(r&&!Er(r))for(const d in r)e[d]==null&&hh(n,d,"");for(const d in e)hh(n,d,e[d])}else{const d=n.display;c?r!==e&&(n.cssText=e):r&&t.removeAttribute("style"),Xy in t&&(n.display=d)}}const dv=/\s*!important$/;function hh(t,r,e){if(Qe(e))e.forEach(n=>hh(t,r,n));else if(e==null&&(e=""),r.startsWith("--"))t.setProperty(r,e);else{const n=Zy(t,r);dv.test(e)?t.setProperty(qu(n),e.replace(dv,""),"important"):t[n]=e}}const yv=["Webkit","Moz","ms"],Tc={};function Zy(t,r){const e=Tc[r];if(e)return e;let n=Ru(r);if(n!=="filter"&&n in t)return Tc[r]=n;n=lg(n);for(let c=0;cIc||(nw.then(()=>Ic=0),Ic=Date.now());function iw(t,r){const e=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=e.attached)return;vn(lw(n,e.value),r,5,[n])};return e.value=t,e.attached=aw(),e}function lw(t,r){if(Qe(r)){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{e.call(t),t._stopped=!0},r.map(n=>c=>!c._stopped&&n&&n(c))}else return r}const $v=/^on[a-z]/,ow=(t,r,e,n,c=!1,d,$,x,m)=>{r==="class"?Jy(t,n,c):r==="style"?Gy(t,e,n):lc(r)?Vh(r)||rw(t,r,e,n,$):(r[0]==="."?(r=r.slice(1),!0):r[0]==="^"?(r=r.slice(1),!1):uw(t,r,n,c))?Yy(t,r,n,d,$,x,m):(r==="true-value"?t._trueValue=n:r==="false-value"&&(t._falseValue=n),Qy(t,r,n,c))};function uw(t,r,e,n){return n?!!(r==="innerHTML"||r==="textContent"||r in t&&$v.test(r)&&ft(e)):r==="spellcheck"||r==="draggable"||r==="translate"||r==="form"||r==="list"&&t.tagName==="INPUT"||r==="type"&&t.tagName==="TEXTAREA"||$v.test(r)&&Er(e)?!1:r in t}const fw=Fr({patchProp:ow},Uy);let bv;function cw(){return bv||(bv=my(fw))}const hw=(...t)=>{const r=cw().createApp(...t),{mount:e}=r;return r.mount=n=>{const c=pw(n);if(!c)return;const d=r._component;!ft(d)&&!d.render&&!d.template&&(d.template=c.innerHTML),c.innerHTML="";const $=e(c,!1,c instanceof SVGElement);return c instanceof Element&&(c.removeAttribute("v-cloak"),c.setAttribute("data-v-app","")),$},r};function pw(t){return Er(t)?document.querySelector(t):t}function af(){return af=Object.assign||function(t){for(var r=1;r";return r},lineNumbersCount:function(){var r=this.codeData.split(/\r\n|\n/).length;return r}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var r=this.$refs.pre,e=this.$el.querySelector(".prism-editor__line-numbers"),n=window.getComputedStyle(r);this.$nextTick(function(){var c="border-top-left-radius",d="border-bottom-left-radius";if(e){e.style[c]=n[c],e.style[d]=n[d],r.style[c]="0",r.style[d]="0";var $=["background-color","margin-top","padding-top","font-family","font-size","line-height"];$.forEach(function(x){e.style[x]=n[x]}),e.style["margin-bottom"]="-"+n["padding-top"]}})}},_recordCurrentState:function(){var r=this.$refs.textarea;if(r){var e=r.value,n=r.selectionStart,c=r.selectionEnd;this._recordChange({value:e,selectionStart:n,selectionEnd:c})}},_getLines:function(r,e){return r.substring(0,e).split(` -`)},_applyEdits:function(r){var e=this.$refs.textarea,n=this.history.stack[this.history.offset];n&&e&&(this.history.stack[this.history.offset]=af({},n,{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd})),this._recordChange(r),this._updateInput(r)},_recordChange:function(r,e){e===void 0&&(e=!1);var n=this.history,c=n.stack,d=n.offset;if(c.length&&d>-1){this.history.stack=c.slice(0,d+1);var $=this.history.stack.length;if($>Pv){var x=$-Pv;this.history.stack=c.slice(x,$),this.history.offset=Math.max(this.history.offset-x,0)}}var m=Date.now();if(e){var A=this.history.stack[this.history.offset];if(A&&m-A.timestamp=k&&Te<=S&&le.startsWith(A)?le.substring(A.length):le}).join(` -`);if($!==T){var G=_[k];this._applyEdits({value:T,selectionStart:G.startsWith(A)?x-A.length:x,selectionEnd:m-($.length-T.length)})}}else if(x!==m){var ee=this._getLines($,x),re=ee.length-1,ge=this._getLines($,m).length-1,q=ee[re];this._applyEdits({value:$.split(` -`).map(function(le,Te){return Te>=re&&Te<=ge?A+le:le}).join(` -`),selectionStart:/\S/.test(q)?x+A.length:x,selectionEnd:m+A.length*(ge-re+1)})}else{var U=x+A.length;this._applyEdits({value:$.substring(0,x)+A+$.substring(m),selectionStart:U,selectionEnd:U})}else if(r.keyCode===dw){var L=x!==m,H=$.substring(0,x);if(H.endsWith(A)&&!L){r.preventDefault();var W=x-A.length;this._applyEdits({value:$.substring(0,x-A.length)+$.substring(m),selectionStart:W,selectionEnd:W})}}else if(r.keyCode===vw){if(x===m){var V=this._getLines($,x).pop(),J=V==null?void 0:V.match(/^\s+/);if(J&&J[0]){r.preventDefault();var Y=` -`+J[0],ue=x+Y.length;this._applyEdits({value:$.substring(0,x)+Y+$.substring(m),selectionStart:ue,selectionEnd:ue})}}}else if(r.keyCode===Av||r.keyCode===Cv||r.keyCode===_v||r.keyCode===kv){var de;r.keyCode===Av&&r.shiftKey?de=["(",")"]:r.keyCode===Cv?r.shiftKey?de=["{","}"]:de=["[","]"]:r.keyCode===_v?r.shiftKey?de=['"','"']:de=["'","'"]:r.keyCode===kv&&!r.shiftKey&&(de=["`","`"]),x!==m&&de&&(r.preventDefault(),this._applyEdits({value:$.substring(0,x)+de[0]+$.substring(x,m)+de[1]+$.substring(m),selectionStart:x,selectionEnd:m+2}))}else(jc?r.metaKey&&r.keyCode===_f:r.ctrlKey&&r.keyCode===_f)&&!r.shiftKey&&!r.altKey?(r.preventDefault(),this._undoEdit()):(jc?r.metaKey&&r.keyCode===_f&&r.shiftKey:$w?r.ctrlKey&&r.keyCode===yw:r.ctrlKey&&r.keyCode===_f&&r.shiftKey)&&!r.altKey?(r.preventDefault(),this._redoEdit()):r.keyCode===ww&&r.ctrlKey&&(!jc||r.shiftKey)&&(r.preventDefault(),this.capture=!this.capture)}}},render:function(){var r=this,e=ai("div",{class:"prism-editor__line-width-calc",style:"height: 0px; visibility: hidden; pointer-events: none;"},"999"),n=ai("div",{class:"prism-editor__line-numbers",style:{"min-height":this.lineNumbersHeight},"aria-hidden":"true"},[e,Array.from(Array(this.lineNumbersCount).keys()).map(function(x,m){return ai("div",{class:"prism-editor__line-number token comment"},""+ ++m)})]),c=ai("textarea",{ref:"textarea",onInput:this.handleChange,onKeydown:this.handleKeyDown,onClick:function(m){r.$emit("click",m)},onKeyup:function(m){r.$emit("keyup",m)},onFocus:function(m){r.$emit("focus",m)},onBlur:function(m){r.$emit("blur",m)},class:{"prism-editor__textarea":!0,"prism-editor__textarea--empty":this.isEmpty},spellCheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","data-gramm":"false",placeholder:this.placeholder,"data-testid":"textarea",readonly:this.readonly,value:this.codeData}),d=ai("pre",{ref:"pre",class:"prism-editor__editor","data-testid":"preview",innerHTML:this.content}),$=ai("div",{class:"prism-editor__container"},[c,d]);return ai("div",{class:"prism-editor-wrapper"},[this.lineNumbers&&n,$])}});var St=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Aw(t){if(t.__esModule)return t;var r=t.default;if(typeof r=="function"){var e=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};e.prototype=r.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var c=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,c.get?c:{enumerable:!0,get:function(){return t[n]}})}),e}var Cw={exports:{}};(function(t){var r=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 e=function(n){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,$={},x={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function q(U){return U instanceof m?new m(U.type,q(U.content),U.alias):Array.isArray(U)?U.map(q):U.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(H){var q=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(H.stack)||[])[1];if(q){var U=document.getElementsByTagName("script");for(var L in U)if(U[L].src==q)return U[L]}return null}},isActive:function(q,U,L){for(var H="no-"+U;q;){var W=q.classList;if(W.contains(U))return!0;if(W.contains(H))return!1;q=q.parentElement}return!!L}},languages:{plain:$,plaintext:$,text:$,txt:$,extend:function(q,U){var L=x.util.clone(x.languages[q]);for(var H in U)L[H]=U[H];return L},insertBefore:function(q,U,L,H){H=H||x.languages;var W=H[q],V={};for(var J in W)if(W.hasOwnProperty(J)){if(J==U)for(var Y in L)L.hasOwnProperty(Y)&&(V[Y]=L[Y]);L.hasOwnProperty(J)||(V[J]=W[J])}var ue=H[q];return H[q]=V,x.languages.DFS(x.languages,function(de,le){le===ue&&de!=q&&(this[de]=V)}),V},DFS:function q(U,L,H,W){W=W||{};var V=x.util.objId;for(var J in U)if(U.hasOwnProperty(J)){L.call(U,J,U[J],H||J);var Y=U[J],ue=x.util.type(Y);ue==="Object"&&!W[V(Y)]?(W[V(Y)]=!0,q(Y,L,null,W)):ue==="Array"&&!W[V(Y)]&&(W[V(Y)]=!0,q(Y,L,J,W))}}},plugins:{},highlightAll:function(q,U){x.highlightAllUnder(document,q,U)},highlightAllUnder:function(q,U,L){var H={callback:L,container:q,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};x.hooks.run("before-highlightall",H),H.elements=Array.prototype.slice.apply(H.container.querySelectorAll(H.selector)),x.hooks.run("before-all-elements-highlight",H);for(var W=0,V;V=H.elements[W++];)x.highlightElement(V,U===!0,H.callback)},highlightElement:function(q,U,L){var H=x.util.getLanguage(q),W=x.languages[H];x.util.setLanguage(q,H);var V=q.parentElement;V&&V.nodeName.toLowerCase()==="pre"&&x.util.setLanguage(V,H);var J=q.textContent,Y={element:q,language:H,grammar:W,code:J};function ue(le){Y.highlightedCode=le,x.hooks.run("before-insert",Y),Y.element.innerHTML=Y.highlightedCode,x.hooks.run("after-highlight",Y),x.hooks.run("complete",Y),L&&L.call(Y.element)}if(x.hooks.run("before-sanity-check",Y),V=Y.element.parentElement,V&&V.nodeName.toLowerCase()==="pre"&&!V.hasAttribute("tabindex")&&V.setAttribute("tabindex","0"),!Y.code){x.hooks.run("complete",Y),L&&L.call(Y.element);return}if(x.hooks.run("before-highlight",Y),!Y.grammar){ue(x.util.encode(Y.code));return}if(U&&n.Worker){var de=new Worker(x.filename);de.onmessage=function(le){ue(le.data)},de.postMessage(JSON.stringify({language:Y.language,code:Y.code,immediateClose:!0}))}else ue(x.highlight(Y.code,Y.grammar,Y.language))},highlight:function(q,U,L){var H={code:q,grammar:U,language:L};if(x.hooks.run("before-tokenize",H),!H.grammar)throw new Error('The language "'+H.language+'" has no grammar.');return H.tokens=x.tokenize(H.code,H.grammar),x.hooks.run("after-tokenize",H),m.stringify(x.util.encode(H.tokens),H.language)},tokenize:function(q,U){var L=U.rest;if(L){for(var H in L)U[H]=L[H];delete U.rest}var W=new k;return S(W,W.head,q),_(q,W,U,W.head,0),G(W)},hooks:{all:{},add:function(q,U){var L=x.hooks.all;L[q]=L[q]||[],L[q].push(U)},run:function(q,U){var L=x.hooks.all[q];if(!(!L||!L.length))for(var H=0,W;W=L[H++];)W(U)}},Token:m};n.Prism=x;function m(q,U,L,H){this.type=q,this.content=U,this.alias=L,this.length=(H||"").length|0}m.stringify=function q(U,L){if(typeof U=="string")return U;if(Array.isArray(U)){var H="";return U.forEach(function(ue){H+=q(ue,L)}),H}var W={type:U.type,content:q(U.content,L),tag:"span",classes:["token",U.type],attributes:{},language:L},V=U.alias;V&&(Array.isArray(V)?Array.prototype.push.apply(W.classes,V):W.classes.push(V)),x.hooks.run("wrap",W);var J="";for(var Y in W.attributes)J+=" "+Y+'="'+(W.attributes[Y]||"").replace(/"/g,""")+'"';return"<"+W.tag+' class="'+W.classes.join(" ")+'"'+J+">"+W.content+""};function A(q,U,L,H){q.lastIndex=U;var W=q.exec(L);if(W&&H&&W[1]){var V=W[1].length;W.index+=V,W[0]=W[0].slice(V)}return W}function _(q,U,L,H,W,V){for(var J in L)if(!(!L.hasOwnProperty(J)||!L[J])){var Y=L[J];Y=Array.isArray(Y)?Y:[Y];for(var ue=0;ue=V.reach);lt+=je.value.length,je=je.next){var Ft=je.value;if(U.length>q.length)return;if(!(Ft instanceof m)){var Ot=1,Ye;if(ze){if(Ye=A(ot,lt,q,Te),!Ye||Ye.index>=q.length)break;var Pt=Ye.index,Or=Ye.index+Ye[0].length,Bt=lt;for(Bt+=je.value.length;Pt>=Bt;)je=je.next,Bt+=je.value.length;if(Bt-=je.value.length,lt=Bt,je.value instanceof m)continue;for(var wr=je;wr!==U.tail&&(BtV.reach&&(V.reach=Mr);var Nt=je.prev;Nr&&(Nt=S(U,Nt,Nr),lt+=Nr.length),T(U,Nt,Ot);var z=new m(J,le?x.tokenize(yr,le):yr,dt,yr);if(je=S(U,Nt,z),kr&&S(U,je,kr),Ot>1){var Z={cause:J+","+ue,reach:Mr};_(q,U,L,je.prev,lt,Z),V&&Z.reach>V.reach&&(V.reach=Z.reach)}}}}}}function k(){var q={value:null,prev:null,next:null},U={value:null,prev:q,next:null};q.next=U,this.head=q,this.tail=U,this.length=0}function S(q,U,L){var H=U.next,W={value:L,prev:U,next:H};return U.next=W,H.prev=W,q.length++,W}function T(q,U,L){for(var H=U.next,W=0;W/,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]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(c,d){var $={};$["language-"+d]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[d]},$.cdata=/^$/i;var x={"included-cdata":{pattern://i,inside:$}};x["language-"+d]={pattern:/[\s\S]+/,inside:e.languages[d]};var m={};m[c]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return c}),"i"),lookbehind:!0,greedy:!0,inside:x},e.languages.insertBefore("markup","cdata",m)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,c){e.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:[c,"language-"+c],inside:e.languages[c]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml,function(n){var c=/(?:"(?:\\(?:\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+"|"+c.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\\((?:"+c.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+c.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+c.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:c,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 d=n.languages.markup;d&&(d.tag.addInlined("style","css"),d.tag.addAttribute("style","css"))}(e),e.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:/[{}[\];(),.:]/},e.languages.javascript=e.languages.extend("clike",{"class-name":[e.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}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.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:e.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:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.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:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.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:e.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"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.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")),e.languages.js=e.languages.javascript,function(){if(typeof e>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",c=function(ee,re){return"✖ Error "+ee+" while fetching file: "+re},d="✖ Error: File does not exist or is empty",$={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},x="data-src-status",m="loading",A="loaded",_="failed",k="pre[data-src]:not(["+x+'="'+A+'"]):not(['+x+'="'+m+'"])';function S(ee,re,ge){var q=new XMLHttpRequest;q.open("GET",ee,!0),q.onreadystatechange=function(){q.readyState==4&&(q.status<400&&q.responseText?re(q.responseText):q.status>=400?ge(c(q.status,q.statusText)):ge(d))},q.send(null)}function T(ee){var re=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(ee||"");if(re){var ge=Number(re[1]),q=re[2],U=re[3];return q?U?[ge,Number(U)]:[ge,void 0]:[ge,ge]}}e.hooks.add("before-highlightall",function(ee){ee.selector+=", "+k}),e.hooks.add("before-sanity-check",function(ee){var re=ee.element;if(re.matches(k)){ee.code="",re.setAttribute(x,m);var ge=re.appendChild(document.createElement("CODE"));ge.textContent=n;var q=re.getAttribute("data-src"),U=ee.language;if(U==="none"){var L=(/\.(\w+)$/.exec(q)||[,"none"])[1];U=$[L]||L}e.util.setLanguage(ge,U),e.util.setLanguage(re,U);var H=e.plugins.autoloader;H&&H.loadLanguages(U),S(q,function(W){re.setAttribute(x,A);var V=T(re.getAttribute("data-range"));if(V){var J=W.split(/\r\n?|\n/g),Y=V[0],ue=V[1]==null?J.length:V[1];Y<0&&(Y+=J.length),Y=Math.max(0,Math.min(Y-1,J.length)),ue<0&&(ue+=J.length),ue=Math.max(0,Math.min(ue,J.length)),W=J.slice(Y,ue).join(` -`),re.hasAttribute("data-start")||re.setAttribute("data-start",String(Y+1))}ge.textContent=W,e.highlightElement(ge)},function(W){re.setAttribute(x,_),ge.textContent=W})}}),e.plugins.fileHighlight={highlight:function(re){for(var ge=(re||document).querySelectorAll(k),q=0,U;U=ge[q++];)e.highlightElement(U)}};var G=!1;e.fileHighlight=function(){G||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),G=!0),e.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Cw);var ed={exports:{}};(function(t){var r=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 e=function(n){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,$={},x={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function q(U){return U instanceof m?new m(U.type,q(U.content),U.alias):Array.isArray(U)?U.map(q):U.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(H){var q=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(H.stack)||[])[1];if(q){var U=document.getElementsByTagName("script");for(var L in U)if(U[L].src==q)return U[L]}return null}},isActive:function(q,U,L){for(var H="no-"+U;q;){var W=q.classList;if(W.contains(U))return!0;if(W.contains(H))return!1;q=q.parentElement}return!!L}},languages:{plain:$,plaintext:$,text:$,txt:$,extend:function(q,U){var L=x.util.clone(x.languages[q]);for(var H in U)L[H]=U[H];return L},insertBefore:function(q,U,L,H){H=H||x.languages;var W=H[q],V={};for(var J in W)if(W.hasOwnProperty(J)){if(J==U)for(var Y in L)L.hasOwnProperty(Y)&&(V[Y]=L[Y]);L.hasOwnProperty(J)||(V[J]=W[J])}var ue=H[q];return H[q]=V,x.languages.DFS(x.languages,function(de,le){le===ue&&de!=q&&(this[de]=V)}),V},DFS:function q(U,L,H,W){W=W||{};var V=x.util.objId;for(var J in U)if(U.hasOwnProperty(J)){L.call(U,J,U[J],H||J);var Y=U[J],ue=x.util.type(Y);ue==="Object"&&!W[V(Y)]?(W[V(Y)]=!0,q(Y,L,null,W)):ue==="Array"&&!W[V(Y)]&&(W[V(Y)]=!0,q(Y,L,J,W))}}},plugins:{},highlightAll:function(q,U){x.highlightAllUnder(document,q,U)},highlightAllUnder:function(q,U,L){var H={callback:L,container:q,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};x.hooks.run("before-highlightall",H),H.elements=Array.prototype.slice.apply(H.container.querySelectorAll(H.selector)),x.hooks.run("before-all-elements-highlight",H);for(var W=0,V;V=H.elements[W++];)x.highlightElement(V,U===!0,H.callback)},highlightElement:function(q,U,L){var H=x.util.getLanguage(q),W=x.languages[H];x.util.setLanguage(q,H);var V=q.parentElement;V&&V.nodeName.toLowerCase()==="pre"&&x.util.setLanguage(V,H);var J=q.textContent,Y={element:q,language:H,grammar:W,code:J};function ue(le){Y.highlightedCode=le,x.hooks.run("before-insert",Y),Y.element.innerHTML=Y.highlightedCode,x.hooks.run("after-highlight",Y),x.hooks.run("complete",Y),L&&L.call(Y.element)}if(x.hooks.run("before-sanity-check",Y),V=Y.element.parentElement,V&&V.nodeName.toLowerCase()==="pre"&&!V.hasAttribute("tabindex")&&V.setAttribute("tabindex","0"),!Y.code){x.hooks.run("complete",Y),L&&L.call(Y.element);return}if(x.hooks.run("before-highlight",Y),!Y.grammar){ue(x.util.encode(Y.code));return}if(U&&n.Worker){var de=new Worker(x.filename);de.onmessage=function(le){ue(le.data)},de.postMessage(JSON.stringify({language:Y.language,code:Y.code,immediateClose:!0}))}else ue(x.highlight(Y.code,Y.grammar,Y.language))},highlight:function(q,U,L){var H={code:q,grammar:U,language:L};if(x.hooks.run("before-tokenize",H),!H.grammar)throw new Error('The language "'+H.language+'" has no grammar.');return H.tokens=x.tokenize(H.code,H.grammar),x.hooks.run("after-tokenize",H),m.stringify(x.util.encode(H.tokens),H.language)},tokenize:function(q,U){var L=U.rest;if(L){for(var H in L)U[H]=L[H];delete U.rest}var W=new k;return S(W,W.head,q),_(q,W,U,W.head,0),G(W)},hooks:{all:{},add:function(q,U){var L=x.hooks.all;L[q]=L[q]||[],L[q].push(U)},run:function(q,U){var L=x.hooks.all[q];if(!(!L||!L.length))for(var H=0,W;W=L[H++];)W(U)}},Token:m};n.Prism=x;function m(q,U,L,H){this.type=q,this.content=U,this.alias=L,this.length=(H||"").length|0}m.stringify=function q(U,L){if(typeof U=="string")return U;if(Array.isArray(U)){var H="";return U.forEach(function(ue){H+=q(ue,L)}),H}var W={type:U.type,content:q(U.content,L),tag:"span",classes:["token",U.type],attributes:{},language:L},V=U.alias;V&&(Array.isArray(V)?Array.prototype.push.apply(W.classes,V):W.classes.push(V)),x.hooks.run("wrap",W);var J="";for(var Y in W.attributes)J+=" "+Y+'="'+(W.attributes[Y]||"").replace(/"/g,""")+'"';return"<"+W.tag+' class="'+W.classes.join(" ")+'"'+J+">"+W.content+""};function A(q,U,L,H){q.lastIndex=U;var W=q.exec(L);if(W&&H&&W[1]){var V=W[1].length;W.index+=V,W[0]=W[0].slice(V)}return W}function _(q,U,L,H,W,V){for(var J in L)if(!(!L.hasOwnProperty(J)||!L[J])){var Y=L[J];Y=Array.isArray(Y)?Y:[Y];for(var ue=0;ue=V.reach);lt+=je.value.length,je=je.next){var Ft=je.value;if(U.length>q.length)return;if(!(Ft instanceof m)){var Ot=1,Ye;if(ze){if(Ye=A(ot,lt,q,Te),!Ye||Ye.index>=q.length)break;var Pt=Ye.index,Or=Ye.index+Ye[0].length,Bt=lt;for(Bt+=je.value.length;Pt>=Bt;)je=je.next,Bt+=je.value.length;if(Bt-=je.value.length,lt=Bt,je.value instanceof m)continue;for(var wr=je;wr!==U.tail&&(BtV.reach&&(V.reach=Mr);var Nt=je.prev;Nr&&(Nt=S(U,Nt,Nr),lt+=Nr.length),T(U,Nt,Ot);var z=new m(J,le?x.tokenize(yr,le):yr,dt,yr);if(je=S(U,Nt,z),kr&&S(U,je,kr),Ot>1){var Z={cause:J+","+ue,reach:Mr};_(q,U,L,je.prev,lt,Z),V&&Z.reach>V.reach&&(V.reach=Z.reach)}}}}}}function k(){var q={value:null,prev:null,next:null},U={value:null,prev:q,next:null};q.next=U,this.head=q,this.tail=U,this.length=0}function S(q,U,L){var H=U.next,W={value:L,prev:U,next:H};return U.next=W,H.prev=W,q.length++,W}function T(q,U,L){for(var H=U.next,W=0;W]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,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 _w={computed:{hasHeader(){return!!this.$slots.header},hasFooter(){return!!this.$slots.footer}}},kw="_container_zhbxc_2",Pw="_header_zhbxc_9",Ew="_main_zhbxc_14",Mw="_footer_zhbxc_19",Sw={container:kw,header:Pw,main:Ew,footer:Mw},df=(t,r)=>{const e=t.__vccOpts||t;for(const[n,c]of r)e[n]=c;return e};function Fw(t,r,e,n,c,d){return hr(),Sr("div",{class:rs(t.$style.container)},[d.hasHeader?(hr(),Sr("header",{key:0,class:rs(t.$style.header)},[Of(t.$slots,"header")],2)):Lu("",!0),pn("main",{class:rs(t.$style.main)},[Of(t.$slots,"default")],2),d.hasFooter?(hr(),Sr("footer",{key:1,class:rs(t.$style.footer)},[Of(t.$slots,"footer")],2)):Lu("",!0)],2)}const Ow={$style:Sw},ef=df(_w,[["render",Fw],["__cssModules",Ow]]),Nw={key:0},Tw=["onClick"],Iw={key:1},jw=["onClick"],Rw=gf({__name:"MenuButton",props:{options:{}},emits:["select"],setup(t,{emit:r}){const e=Ho(!1),n=r;return(c,d)=>(hr(),Sr("div",{class:rs(c.$style.wrapper)},[pn("button",{onClick:d[0]||(d[0]=$=>e.value=!e.value)},[Of(c.$slots,"default")]),pr(up,null,{default:Cs(()=>[e.value?(hr(),Sr("div",{key:0,class:rs(c.$style.menu)},[c.options instanceof Array?(hr(),Sr("div",Nw,[(hr(!0),Sr(es,null,Qf(c.options,$=>(hr(),Sr("div",{class:rs(c.$style.opt),onClick:x=>{e.value=!1,n("select",$)}},Wo($),11,Tw))),256))])):(hr(),Sr("div",Iw,[(hr(!0),Sr(es,null,Qf(Object.keys(c.options),$=>(hr(),Sr("div",{class:rs(c.$style.opt),onClick:x=>{e.value=!1,n("select",$)}},Wo(c.options[$]),11,jw))),256))]))],2)):Lu("",!0)]),_:1})],2))}}),Dw="_wrapper_1dk0z_2",Lw="_menu_1dk0z_5",Bw="_opt_1dk0z_12",Hw={wrapper:Dw,menu:Lw,opt:Bw},Uw={$style:Hw},td=df(Rw,[["__cssModules",Uw]]),qw=gf({__name:"Editor",props:{modelValue:{},samples:{},parseError:{}},emits:["run","update:modelValue"],setup(t,{emit:r}){const e=t,n=r,c=Ho(e.modelValue);tf(c,()=>{n("update:modelValue",c.value)},{immediate:!0});function d(x){c.value=e.samples[x]}const $=x=>Ev.highlight(x,Ev.languages.js,"javascript");return(x,m)=>(hr(),wc(ef,null,{header:Cs(()=>[Dn(" Input "),e.samples?(hr(),Sr("div",{key:0,class:rs(x.$style.actions)},[pr(td,{options:Object.keys(e.samples),onSelect:d},{default:Cs(()=>[Dn("Samples")]),_:1},8,["options"])],2)):Lu("",!0)]),footer:Cs(()=>[e.parseError?(hr(),Sr("span",{key:0,class:rs(x.$style.parseError)},Wo(e.parseError),3)):Lu("",!0),pn("div",{class:rs(x.$style.actions)},[pn("button",{onClick:m[1]||(m[1]=A=>n("run"))},"RUN")],2)]),default:Cs(()=>[pr(uf(bw),{class:rs(x.$style.code),modelValue:c.value,"onUpdate:modelValue":m[0]||(m[0]=A=>c.value=A),highlight:$,"line-numbers":!1},null,8,["class","modelValue"])]),_:1}))}}),zw="_code_af8rl_2",Vw="_parseError_af8rl_6",Ww="_actions_af8rl_9",Kw={code:zw,parseError:Vw,actions:Ww},Jw={$style:Kw},Xw=df(qw,[["__cssModules",Jw]]);function or(t,r,e){let n=e.value;return{configurable:!0,get(){const c=n.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:c}),c},set(c){n=c}}}let Hu=class rd extends Error{constructor(e,n){super(e);be(this,"name","AiScript");be(this,"info");be(this,"loc");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,rd)}},Mv=class extends Hu{constructor(e){super(e.message??`${e}`,e);be(this,"name","Internal")}},gt=class extends Hu{constructor(e,n,c){super(`${e} (Line ${n.line}, Column ${n.column})`,c);be(this,"loc");be(this,"name","Syntax");this.loc=n}};class Sv extends Hu{constructor(e,n,c){super(`${e} (Line ${n.line}, Column ${n.column})`,c);be(this,"loc");be(this,"name","Namespace");this.loc=n}}let Jt=class extends Hu{constructor(e,n){super(e,n);be(this,"name","Runtime")}},Gw=class extends Jt{constructor(r,e){super(r,e)}};var $i=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,d=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};let Ya=class sd{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new sd(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r).value;return this.log("read",{var:r,val:n}),n}throw new Jt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new Jt(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){const d=c.get(r);if(!d.isMutable)throw new Jt(`Cannot assign to an immutable variable ${r}.`);d.value=e,this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new Jt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};$i([or],Ya.prototype,"log",null);$i([or],Ya.prototype,"onUpdated",null);$i([or],Ya.prototype,"createChildScope",null);$i([or],Ya.prototype,"get",null);$i([or],Ya.prototype,"exists",null);$i([or],Ya.prototype,"getAll",null);$i([or],Ya.prototype,"add",null);$i([or],Ya.prototype,"assign",null);let kf;const Zw=new Uint8Array(16);function Qw(){if(!kf&&(kf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!kf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kf(Zw)}const Hr=[];for(let t=0;t<256;++t)Hr.push((t+256).toString(16).slice(1));function Yw(t,r=0){return Hr[t[r+0]]+Hr[t[r+1]]+Hr[t[r+2]]+Hr[t[r+3]]+"-"+Hr[t[r+4]]+Hr[t[r+5]]+"-"+Hr[t[r+6]]+Hr[t[r+7]]+"-"+Hr[t[r+8]]+Hr[t[r+9]]+"-"+Hr[t[r+10]]+Hr[t[r+11]]+Hr[t[r+12]]+Hr[t[r+13]]+Hr[t[r+14]]+Hr[t[r+15]]}const em=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Fv={randomUUID:em};function tm(t,r,e){if(Fv.randomUUID&&!r&&!t)return Fv.randomUUID();t=t||{};const n=t.random||(t.rng||Qw)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return Yw(n)}var cp={exports:{}};cp.exports;(function(t){(function(r,e,n){function c(m){var A=this,_=x();A.next=function(){var k=2091639*A.s0+A.c*23283064365386963e-26;return A.s0=A.s1,A.s1=A.s2,A.s2=k-(A.c=k|0)},A.c=1,A.s0=_(" "),A.s1=_(" "),A.s2=_(" "),A.s0-=_(m),A.s0<0&&(A.s0+=1),A.s1-=_(m),A.s1<0&&(A.s1+=1),A.s2-=_(m),A.s2<0&&(A.s2+=1),_=null}function d(m,A){return A.c=m.c,A.s0=m.s0,A.s1=m.s1,A.s2=m.s2,A}function $(m,A){var _=new c(m),k=A&&A.state,S=_.next;return S.int32=function(){return _.next()*4294967296|0},S.double=function(){return S()+(S()*2097152|0)*11102230246251565e-32},S.quick=S,k&&(typeof k=="object"&&d(k,_),S.state=function(){return d(_,{})}),S}function x(){var m=4022871197,A=function(_){_=String(_);for(var k=0;k<_.length;k++){m+=_.charCodeAt(k);var S=.02519603282416938*m;m=S>>>0,S-=m,S*=m,m=S>>>0,S-=m,m+=S*4294967296}return(m>>>0)*23283064365386963e-26};return A}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.alea=$})(St,t,!1)})(cp);var rm=cp.exports,hp={exports:{}};hp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.x=0,m.y=0,m.z=0,m.w=0,m.next=function(){var k=m.x^m.x<<11;return m.x=m.y,m.y=m.z,m.z=m.w,m.w^=m.w>>>19^k^k>>>8},x===(x|0)?m.x=x:A+=x;for(var _=0;_>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(typeof _=="object"&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor128=$})(St,t,!1)})(hp);var sm=hp.exports,pp={exports:{}};pp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var k=m.x^m.x>>>2;return m.x=m.y,m.y=m.z,m.z=m.w,m.w=m.v,(m.d=m.d+362437|0)+(m.v=m.v^m.v<<4^(k^k<<1))|0},m.x=0,m.y=0,m.z=0,m.w=0,m.v=0,x===(x|0)?m.x=x:A+=x;for(var _=0;_>>4),m.next()}function d(x,m){return m.x=x.x,m.y=x.y,m.z=x.z,m.w=x.w,m.v=x.v,m.d=x.d,m}function $(x,m){var A=new c(x),_=m&&m.state,k=function(){return(A.next()>>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(typeof _=="object"&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorwow=$})(St,t,!1)})(pp);var nm=pp.exports,vp={exports:{}};vp.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var _=m.x,k=m.i,S,T;return S=_[k],S^=S>>>7,T=S^S<<24,S=_[k+1&7],T^=S^S>>>10,S=_[k+3&7],T^=S^S>>>3,S=_[k+4&7],T^=S^S<<7,S=_[k+7&7],S=S^S<<13,T^=S^S<<9,_[k]=T,m.i=k+1&7,T};function A(_,k){var S,T=[];if(k===(k|0))T[0]=k;else for(k=""+k,S=0;S0;--S)_.next()}A(m,x)}function d(x,m){return m.x=x.x.slice(),m.i=x.i,m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),_=m&&m.state,k=function(){return(A.next()>>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(_.x&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorshift7=$})(St,t,!1)})(vp);var am=vp.exports,gp={exports:{}};gp.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var _=m.w,k=m.X,S=m.i,T,G;return m.w=_=_+1640531527|0,G=k[S+34&127],T=k[S=S+1&127],G^=G<<13,T^=T<<17,G^=G>>>15,T^=T>>>12,G=k[S]=G^T,m.i=S,G+(_^_>>>16)|0};function A(_,k){var S,T,G,ee,re,ge=[],q=128;for(k===(k|0)?(T=k,k=null):(k=k+"\0",T=0,q=Math.max(q,k.length)),G=0,ee=-32;ee>>15,T^=T<<4,T^=T>>>13,ee>=0&&(re=re+1640531527|0,S=ge[ee&127]^=T+re,G=S==0?G+1:0);for(G>=128&&(ge[(k&&k.length||0)&127]=-1),G=127,ee=4*128;ee>0;--ee)T=ge[G+34&127],S=ge[G=G+1&127],T^=T<<13,S^=S<<17,T^=T>>>15,S^=S>>>12,ge[G]=T^S;_.w=re,_.X=ge,_.i=G}A(m,x)}function d(x,m){return m.i=x.i,m.w=x.w,m.X=x.X.slice(),m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),_=m&&m.state,k=function(){return(A.next()>>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(_.X&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor4096=$})(St,t,!1)})(gp);var im=gp.exports,dp={exports:{}};dp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var k=m.b,S=m.c,T=m.d,G=m.a;return k=k<<25^k>>>7^S,S=S-T|0,T=T<<24^T>>>8^G,G=G-k|0,m.b=k=k<<20^k>>>12^S,m.c=S=S-T|0,m.d=T<<16^S>>>16^G,m.a=G-k|0},m.a=0,m.b=0,m.c=-1640531527,m.d=1367130551,x===Math.floor(x)?(m.a=x/4294967296|0,m.b=x|0):A+=x;for(var _=0;_>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(typeof _=="object"&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.tychei=$})(St,t,!1)})(dp);var lm=dp.exports,nd={exports:{}};const om={},um=Object.freeze(Object.defineProperty({__proto__:null,default:om},Symbol.toStringTag,{value:"Module"})),yp=Aw(um);(function(t){(function(r,e,n){var c=256,d=6,$=52,x="random",m=n.pow(c,d),A=n.pow(2,$),_=A*2,k=c-1,S;function T(L,H,W){var V=[];H=H==!0?{entropy:!0}:H||{};var J=ge(re(H.entropy?[L,U(e)]:L??q(),3),V),Y=new G(V),ue=function(){for(var de=Y.g(d),le=m,Te=0;de=_;)de/=2,le/=2,Te>>>=1;return(de+Te)/le};return ue.int32=function(){return Y.g(4)|0},ue.quick=function(){return Y.g(4)/4294967296},ue.double=ue,ge(U(Y.S),e),(H.pass||W||function(de,le,Te,ze){return ze&&(ze.S&&ee(ze,Y),de.state=function(){return ee(Y,{})}),Te?(n[x]=de,le):de})(ue,J,"global"in H?H.global:this==n,H.state)}function G(L){var H,W=L.length,V=this,J=0,Y=V.i=V.j=0,ue=V.S=[];for(W||(L=[W++]);J({type:"num",value:t}),Vt=t=>({type:"str",value:t}),Xo=t=>({type:"bool",value:t}),rc=t=>({type:"obj",value:t}),Xr=t=>({type:"arr",value:t}),mm=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),fe=t=>({type:"fn",native:t}),xm=t=>({type:"return",value:t}),$m=()=>({type:"break",value:null}),bm=()=>({type:"continue",value:null}),Am=t=>t.type==="return"?t.value:t,ph=(t,r)=>({type:"error",value:t,info:r});function Ys(t){if(t==null)throw new Jt("Expect anything, but got nothing.")}function gs(t){if(t==null)throw new Jt("Expect boolean, but got nothing.");if(t.type!=="bool")throw new Jt(`Expect boolean, but got ${t.type}.`)}function ci(t){if(t==null)throw new Jt("Expect function, but got nothing.");if(t.type!=="fn")throw new Jt(`Expect function, but got ${t.type}.`)}function Cr(t){if(t==null)throw new Jt("Expect string, but got nothing.");if(t.type!=="str")throw new Jt(`Expect string, but got ${t.type}.`)}function Ce(t){if(t==null)throw new Jt("Expect number, but got nothing.");if(t.type!=="num")throw new Jt(`Expect number, but got ${t.type}.`)}function Un(t){if(t==null)throw new Jt("Expect object, but got nothing.");if(t.type!=="obj")throw new Jt(`Expect object, but got ${t.type}.`)}function sc(t){if(t==null)throw new Jt("Expect array, but got nothing.");if(t.type!=="arr")throw new Jt(`Expect array, but got ${t.type}.`)}function Rc(t){return t.type==="obj"}function Ov(t){return t.type==="arr"}function vh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function gh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>gh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function dh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>dh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=dh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function yh(t){if(t===null)return At;if(typeof t=="boolean")return Xo(t);if(typeof t=="string")return Vt(t);if(typeof t=="number")return Me(t);if(Array.isArray(t))return Xr(t.map(r=>yh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,yh(n));return rc(r)}return At}function ku(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const n=[];for(const c of t.value)n.push(ku(c,!0,e));return"[ "+n.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const n=[];for(const[c,d]of t.value)n.push(`${c}: ${ku(d,!0,e)}`);return"{ "+n.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const Cm={help:Vt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Vt("0.16.0"),"Core:ai":Vt("kawaii"),"Core:not":fe(([t])=>(gs(t),t.value?Js:on)),"Core:eq":fe(([t,r])=>(Ys(t),Ys(r),vh(t,r)?on:Js)),"Core:neq":fe(([t,r])=>(Ys(t),Ys(r),vh(t,r)?Js:on)),"Core:and":fe(([t,r])=>(gs(t),t.value?(gs(r),r.value?on:Js):Js)),"Core:or":fe(([t,r])=>(gs(t),t.value?on:(gs(r),r.value?on:Js))),"Core:add":fe(([t,r])=>(Ce(t),Ce(r),Me(t.value+r.value))),"Core:sub":fe(([t,r])=>(Ce(t),Ce(r),Me(t.value-r.value))),"Core:mul":fe(([t,r])=>(Ce(t),Ce(r),Me(t.value*r.value))),"Core:pow":fe(([t,r])=>{Ce(t),Ce(r);const e=t.value**r.value;if(isNaN(e))throw new Jt("Invalid operation.");return Me(e)}),"Core:div":fe(([t,r])=>{Ce(t),Ce(r);const e=t.value/r.value;if(isNaN(e))throw new Jt("Invalid operation.");return Me(e)}),"Core:mod":fe(([t,r])=>(Ce(t),Ce(r),Me(t.value%r.value))),"Core:gt":fe(([t,r])=>(Ce(t),Ce(r),t.value>r.value?on:Js)),"Core:lt":fe(([t,r])=>(Ce(t),Ce(r),t.value(Ce(t),Ce(r),t.value>=r.value?on:Js)),"Core:lteq":fe(([t,r])=>(Ce(t),Ce(r),t.value<=r.value?on:Js)),"Core:type":fe(([t])=>(Ys(t),Vt(t.type))),"Core:to_str":fe(([t])=>(Ys(t),Vt(ku(t)))),"Core:range":fe(([t,r])=>(Ce(t),Ce(r),t.valueMe(n+t.value))):t.value>r.value?Xr(Array.from({length:t.value-r.value+1},(e,n)=>Me(t.value-n))):Xr([t]))),"Core:sleep":fe(async([t])=>(Ce(t),await new Promise(r=>setTimeout(r,t.value)),At)),"Util:uuid":fe(()=>Vt(tm())),"Json:stringify":fe(([t])=>(Ys(t),Vt(JSON.stringify(dh(t))))),"Json:parse":fe(([t])=>{Cr(t);try{return yh(JSON.parse(t.value))}catch{return ph("not_json")}}),"Json:parsable":fe(([t])=>{Cr(t);try{JSON.parse(t.value)}catch{return Xo(!1)}return Xo(!0)}),"Date:now":fe(()=>Me(Date.now())),"Date:year":fe(([t])=>(t&&Ce(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":fe(([t])=>(t&&Ce(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":fe(([t])=>(t&&Ce(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":fe(([t])=>(t&&Ce(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":fe(([t])=>(t&&Ce(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":fe(([t])=>(t&&Ce(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":fe(([t])=>(Cr(t),Me(new Date(t.value).getTime()))),"Math:Infinity":Me(1/0),"Math:E":Me(Math.E),"Math:LN2":Me(Math.LN2),"Math:LN10":Me(Math.LN10),"Math:LOG2E":Me(Math.LOG2E),"Math:LOG10E":Me(Math.LOG10E),"Math:PI":Me(Math.PI),"Math:SQRT1_2":Me(Math.SQRT1_2),"Math:SQRT2":Me(Math.SQRT2),"Math:abs":fe(([t])=>(Ce(t),Me(Math.abs(t.value)))),"Math:acos":fe(([t])=>(Ce(t),Me(Math.acos(t.value)))),"Math:acosh":fe(([t])=>(Ce(t),Me(Math.acosh(t.value)))),"Math:asin":fe(([t])=>(Ce(t),Me(Math.asin(t.value)))),"Math:asinh":fe(([t])=>(Ce(t),Me(Math.asinh(t.value)))),"Math:atan":fe(([t])=>(Ce(t),Me(Math.atan(t.value)))),"Math:atanh":fe(([t])=>(Ce(t),Me(Math.atanh(t.value)))),"Math:atan2":fe(([t,r])=>(Ce(t),Ce(r),Me(Math.atan2(t.value,r.value)))),"Math:cbrt":fe(([t])=>(Ce(t),Me(Math.cbrt(t.value)))),"Math:ceil":fe(([t])=>(Ce(t),Me(Math.ceil(t.value)))),"Math:clz32":fe(([t])=>(Ce(t),Me(Math.clz32(t.value)))),"Math:cos":fe(([t])=>(Ce(t),Me(Math.cos(t.value)))),"Math:cosh":fe(([t])=>(Ce(t),Me(Math.cosh(t.value)))),"Math:exp":fe(([t])=>(Ce(t),Me(Math.exp(t.value)))),"Math:expm1":fe(([t])=>(Ce(t),Me(Math.expm1(t.value)))),"Math:floor":fe(([t])=>(Ce(t),Me(Math.floor(t.value)))),"Math:fround":fe(([t])=>(Ce(t),Me(Math.fround(t.value)))),"Math:hypot":fe(([t])=>{sc(t);const r=[];for(const e of t.value)Ce(e),r.push(e.value);return Me(Math.hypot(...r))}),"Math:imul":fe(([t,r])=>(Ce(t),Ce(r),Me(Math.imul(t.value,r.value)))),"Math:log":fe(([t])=>(Ce(t),Me(Math.log(t.value)))),"Math:log1p":fe(([t])=>(Ce(t),Me(Math.log1p(t.value)))),"Math:log10":fe(([t])=>(Ce(t),Me(Math.log10(t.value)))),"Math:log2":fe(([t])=>(Ce(t),Me(Math.log2(t.value)))),"Math:max":fe(([t,r])=>(Ce(t),Ce(r),Me(Math.max(t.value,r.value)))),"Math:min":fe(([t,r])=>(Ce(t),Ce(r),Me(Math.min(t.value,r.value)))),"Math:pow":fe(([t,r])=>(Ce(t),Ce(r),Me(Math.pow(t.value,r.value)))),"Math:round":fe(([t])=>(Ce(t),Me(Math.round(t.value)))),"Math:sign":fe(([t])=>(Ce(t),Me(Math.sign(t.value)))),"Math:sin":fe(([t])=>(Ce(t),Me(Math.sin(t.value)))),"Math:sinh":fe(([t])=>(Ce(t),Me(Math.sinh(t.value)))),"Math:sqrt":fe(([t])=>{Ce(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new Jt("Invalid operation.");return Me(r)}),"Math:tan":fe(([t])=>(Ce(t),Me(Math.tan(t.value)))),"Math:tanh":fe(([t])=>(Ce(t),Me(Math.tanh(t.value)))),"Math:trunc":fe(([t])=>(Ce(t),Me(Math.trunc(t.value)))),"Math:rnd":fe(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Me(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Me(Math.random())),"Math:gen_rng":fe(([t])=>{if(Ys(t),t.type!=="num"&&t.type!=="str")return At;const r=wm(t.value.toString());return fe(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Me(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Me(r()))}),"Num:to_hex":fe(([t])=>(Ce(t),Vt(t.value.toString(16)))),"Num:from_hex":fe(([t])=>(Cr(t),Me(parseInt(t.value,16)))),"Str:lf":Vt(` -`),"Str:lt":fe(([t,r])=>(Cr(t),Cr(r),t.value(Cr(t),Cr(r),t.value>r.value?Me(-1):t.value===r.value?Me(0):Me(1))),"Str:from_codepoint":fe(([t])=>(Ce(t),Vt(String.fromCodePoint(t.value)))),"Obj:keys":fe(([t])=>(Un(t),Xr(Array.from(t.value.keys()).map(r=>Vt(r))))),"Obj:vals":fe(([t])=>(Un(t),Xr(Array.from(t.value.values())))),"Obj:kvs":fe(([t])=>(Un(t),Xr(Array.from(t.value.entries()).map(([r,e])=>Xr([Vt(r),e]))))),"Obj:get":fe(([t,r])=>(Un(t),Cr(r),t.value.get(r.value)??At)),"Obj:set":fe(([t,r,e])=>(Un(t),Cr(r),Ys(e),t.value.set(r.value,e),At)),"Obj:has":fe(([t,r])=>(Un(t),Cr(r),Xo(t.value.has(r.value)))),"Obj:copy":fe(([t])=>(Un(t),rc(new Map(t.value)))),"Obj:merge":fe(([t,r])=>(Un(t),Un(r),rc(new Map([...t.value,...r.value])))),"Error:create":fe(([t,r])=>(Cr(t),ph(t.value,r))),"Async:interval":fe(async([t,r,e],n)=>{Ce(t),ci(r),e&&(gs(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.topCall(r,[])},t.value),d=()=>{clearInterval(c)};return n.registerAbortHandler(d),fe(([],$)=>{clearInterval(c),$.unregisterAbortHandler(d)})}),"Async:timeout":fe(async([t,r],e)=>{Ce(t),ci(r);const n=setTimeout(()=>{e.topCall(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),fe(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(c)})})};var uu={},_m=()=>{const t="\\ud800-\\udfff",r="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",c="\\u1ab0-\\u1aff",d="\\u1dc0-\\u1dff",$=r+e+n+c+d,x="\\ufe0e\\ufe0f",m="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",A=`[${t}]`,_=`[${$}]`,k="\\ud83c[\\udffb-\\udfff]",S=`(?:${_}|${k})`,T=`[^${t}]`,G="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",ee="[\\ud800-\\udbff][\\udc00-\\udfff]",re="\\u200d",ge="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",q=`[${m}]`,U=`${S}?`,L=`[${x}]?`,H=`(?:${re}(?:${[T,G,ee].join("|")})${L+U})*`,W=L+U+H,J=`(?:${[`${T}${_}?`,_,G,ee,A,q].join("|")})`;return new RegExp(`${ge}|${k}(?=${k})|${J+W}`,"g")},km=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uu,"__esModule",{value:!0});var xc=km(_m);function wh(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match(xc.default())||[]}var Nv=uu.toArray=wh;function wp(t){if(typeof t!="string")throw new Error("Input must be a string");var r=t.match(xc.default());return r===null?0:r.length}var Pm=uu.length=wp;function ad(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");(typeof r!="number"||r<0)&&(r=0),typeof e=="number"&&e<0&&(e=0);var n=t.match(xc.default());return n?n.slice(r,e).join(""):""}var Em=uu.substring=ad;function Mm(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");var n=wp(t);if(typeof r!="number"&&(r=parseInt(r,10)),r>=n)return"";r<0&&(r+=n);var c;typeof e>"u"?c=n:(typeof e!="number"&&(e=parseInt(e,10)),c=e>=0?e+r:r);var d=t.match(xc.default());return d?d.slice(r,c).join(""):""}uu.substr=Mm;function Sm(t,r,e,n){if(r===void 0&&(r=16),e===void 0&&(e="#"),n===void 0&&(n="right"),typeof t!="string"||typeof r!="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 e!="string"&&(e=String(e));var c=wp(t);if(c>r)return ad(t,0,r);if(c=n.length)return r===""?n.length:-1;if(r==="")return e;var c=wh(r),d=!1,$;for($=e;$fe(async(r,e)=>Vt(t.value.toString()))},str:{to_num:t=>fe(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?At:Me(n)}),len:t=>Me(Pm(t.value)),replace:t=>fe(async([r,e],n)=>(Cr(r),Cr(e),Vt(t.value.split(r.value).join(e.value)))),index_of:t=>fe(async([r],e)=>(Cr(r),Me(Om(t.value,r.value)))),incl:t=>fe(async([r],e)=>(Cr(r),t.value.includes(r.value)?on:Js)),trim:t=>fe(async(r,e)=>Vt(t.value.trim())),upper:t=>fe(async(r,e)=>Vt(t.value.toUpperCase())),lower:t=>fe(async(r,e)=>Vt(t.value.toLowerCase())),split:t=>fe(async([r],e)=>(r&&Cr(r),Xr(r?t.value.split(r?r.value:"").map(n=>Vt(n)):Nv(t.value).map(n=>Vt(n))))),slice:t=>fe(async([r,e],n)=>(Ce(r),Ce(e),Vt(Em(t.value,r.value,e.value)))),pick:t=>fe(async([r],e)=>{Ce(r);const c=Nv(t.value)[r.value];return c?Vt(c):At}),codepoint_at:t=>fe(([r],e)=>{Ce(r);const n=t.value.charCodeAt(r.value);return Number.isNaN(n)?At:Me(n)})},arr:{len:t=>Me(t.value.length),push:t=>fe(async([r],e)=>(Ys(r),t.value.push(r),t)),unshift:t=>fe(async([r],e)=>(Ys(r),t.value.unshift(r),t)),pop:t=>fe(async(r,e)=>t.value.pop()??At),shift:t=>fe(async(r,e)=>t.value.shift()??At),concat:t=>fe(async([r],e)=>(sc(r),Xr(t.value.concat(r.value)))),slice:t=>fe(async([r,e],n)=>(Ce(r),Ce(e),Xr(t.value.slice(r.value,e.value)))),join:t=>fe(async([r],e)=>(r&&Cr(r),Vt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>fe(async([r],e)=>{ci(r);const n=t.value.map(async(c,d)=>await e.call(r,[c,Me(d)]));return Xr(await Promise.all(n))}),filter:t=>fe(async([r],e)=>{ci(r);const n=[];for(let c=0;cfe(async([r,e],n)=>{ci(r);const c=e!=null;let d=c?e:t.value[0];for(let $=c?0:1;$fe(async([r],e)=>{ci(r);for(let n=0;nfe(async([r],e)=>(Ys(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Js:(c=>c.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?on:Js)),reverse:t=>fe(async(r,e)=>(t.value.reverse(),At)),copy:t=>fe(async(r,e)=>Xr([...t.value])),sort:t=>fe(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const x=Math.floor(d.length/2),m=await n(d.slice(0,x),$),A=await n(d.slice(x),$);return c(m,A,$)},c=async(d,$,x)=>{const m=[];let A=0,_=0;for(;AVt(t.value),info:t=>t.info??At}};function Nm(t,r){if(Object.hasOwn(Tv,t.type)){const e=Tv[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new Jt(`No such prop (${r}) in ${t.type}.`)}else throw new Jt(`Cannot read prop of ${t.type}. (reading ${r})`)}const Tm={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var ns=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,d=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};const id=300,Im=id-1;let Kr=class{constructor(r,e={}){be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);be(this,"vars",{});this.opts=e;const n={print:fe(([c])=>{Ys(c),this.opts.out&&this.opts.out(c)}),readline:fe(async c=>{const d=c[0];if(Cr(d),this.opts.in==null)return At;const $=await this.opts.in(d.value);return Vt($)})};this.vars=Object.fromEntries(Object.entries({...r,...Cm,...n}).map(([c,d])=>[c,Tm.const(d)])),this.scope=new Ya([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,d)=>{switch(c){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(n=>(this.handleError(n),ph("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(d=>e(d));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const d={};for(const[$,x]of c.value.entries())d[$]=e(x);return d}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof Hu?this.opts.err(r):this.opts.err(new Mv(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{if(n.mut)throw new Sv('No "var" in namespace declaration: '+n.name,n.loc);const c={isMutable:n.mut,value:await this._eval(n.expr,e)};e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:{const d=n;throw new Sv("invalid ns member type: "+d.type,d.loc)}}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??At;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],{isMutable:!0,value:e[d]});const c=r.scope.createChildScope(n);return Am(await this._run(r.statements,c))}}_eval(r,e){return this.__eval(r,e).catch(n=>{if(n.loc)throw n;{const c=n instanceof Hu?n:new Mv(n);throw c.loc=r.loc,c.message=`${c.message} (Line ${r.loc.line}, Column ${r.loc.column})`,c}})}async __eval(r,e){if(this.stop)return At;if(this.stepCount%id===Im&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new Jt("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);ci(n);const c=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if(gs(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const d=await this._eval(c.cond,e);if(gs(d),d.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return At}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const d=await this._eval(c.q,e);if(vh(n,d))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):At}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return At}case"for":{if(r.times){const n=await this._eval(r.times,e);Ce(n);for(let c=0;c0){const c=[];for(const d of r.attr)c.push({name:d.name,value:await this._eval(d.value,e)});n.attr=c}return e.add(r.name,{isMutable:r.mut,value:n}),At}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),At}case"addAssign":{const n=await this._eval(r.dest,e);Ce(n);const c=await this._eval(r.expr,e);return Ce(c),await this.assign(e,r.dest,Me(n.value+c.value)),At}case"subAssign":{const n=await this._eval(r.dest,e);Ce(n);const c=await this._eval(r.expr,e);return Ce(c),await this.assign(e,r.dest,Me(n.value-c.value)),At}case"null":return At;case"bool":return Xo(r.value);case"num":return Me(r.value);case"str":return Vt(r.value);case"arr":return Xr(await Promise.all(r.value.map(n=>this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return rc(n)}case"prop":{const n=await this._eval(r.target,e);return Rc(n)?n.value.has(r.name)?n.value.get(r.name):At:Nm(n,r.name)}case"index":{const n=await this._eval(r.target,e),c=await this._eval(r.index,e);if(Ov(n)){Ce(c);const d=n.value[c.value];if(d===void 0)throw new Gw(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return d}else{if(Rc(n))return Cr(c),n.value.has(c.value)?n.value.get(c.value):At;throw new Jt(`Cannot read prop (${ku(c)}) of ${n.type}.`)}}case"not":{const n=await this._eval(r.expr,e);return gs(n),Xo(!n.value)}case"fn":return mm(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return Xo(e.exists(r.identifier.name));case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const d=await this._eval(c,e);n+=ku(d)}return Vt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),xm(n)}case"break":return this.log("block:break",{scope:e.name}),$m();case"continue":return this.log("block:continue",{scope:e.name}),bm();case"ns":return At;case"meta":return At;case"and":{const n=await this._eval(r.left,e);if(gs(n),n.value){const c=await this._eval(r.right,e);return gs(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if(gs(n),n.value)return n;{const c=await this._eval(r.right,e);return gs(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=At;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r),d=await this._eval(e.index,r);if(Ov(c))Ce(d),c.value[d.value]=n;else if(Rc(c))Cr(d),c.value.set(d.value,n);else throw new Jt(`Cannot read prop (${ku(d)}) of ${c.type}.`)}else if(e.type==="prop"){const c=await this._eval(e.target,r);Un(c),c.value.set(e.name,n)}else throw new Jt("The left-hand side of an assignment expression must be a variable or a property/index access.")}};ns([or],Kr.prototype,"exec",null);ns([or],Kr.prototype,"execFn",null);ns([or],Kr.prototype,"execFnSimple",null);ns([or],Kr.prototype,"handleError",null);ns([or],Kr.prototype,"log",null);ns([or],Kr.prototype,"collectNs",null);ns([or],Kr.prototype,"collectNsMember",null);ns([or],Kr.prototype,"_fn",null);ns([or],Kr.prototype,"_eval",null);ns([or],Kr.prototype,"__eval",null);ns([or],Kr.prototype,"_run",null);ns([or],Kr.prototype,"registerAbortHandler",null);ns([or],Kr.prototype,"unregisterAbortHandler",null);ns([or],Kr.prototype,"abort",null);ns([or],Kr.prototype,"assign",null);ns([or],Kr,"collectMetadata",null);class jm{constructor(r,e){be(this,"pages");be(this,"firstPageIndex");be(this,"lastPageIndex");be(this,"pageIndex");be(this,"address");be(this,"_char");be(this,"line");be(this,"column");this.pages=new Map,this.pages.set(0,r),this.firstPageIndex=0,this.lastPageIndex=0,this.pageIndex=0,this.address=0,this.line=(e==null?void 0:e.line)??0,this.column=(e==null?void 0:e.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 r=this.pages.get(this.pageIndex);return this.address>=r.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 j;(function(t){t[t.EOF=0]="EOF",t[t.NewLine=1]="NewLine",t[t.Identifier=2]="Identifier",t[t.NumberLiteral=3]="NumberLiteral",t[t.StringLiteral=4]="StringLiteral",t[t.Template=5]="Template",t[t.TemplateStringElement=6]="TemplateStringElement",t[t.TemplateExprElement=7]="TemplateExprElement",t[t.NullKeyword=8]="NullKeyword",t[t.TrueKeyword=9]="TrueKeyword",t[t.FalseKeyword=10]="FalseKeyword",t[t.EachKeyword=11]="EachKeyword",t[t.ForKeyword=12]="ForKeyword",t[t.LoopKeyword=13]="LoopKeyword",t[t.BreakKeyword=14]="BreakKeyword",t[t.ContinueKeyword=15]="ContinueKeyword",t[t.MatchKeyword=16]="MatchKeyword",t[t.CaseKeyword=17]="CaseKeyword",t[t.DefaultKeyword=18]="DefaultKeyword",t[t.IfKeyword=19]="IfKeyword",t[t.ElifKeyword=20]="ElifKeyword",t[t.ElseKeyword=21]="ElseKeyword",t[t.ReturnKeyword=22]="ReturnKeyword",t[t.EvalKeyword=23]="EvalKeyword",t[t.VarKeyword=24]="VarKeyword",t[t.LetKeyword=25]="LetKeyword",t[t.ExistsKeyword=26]="ExistsKeyword",t[t.Not=27]="Not",t[t.NotEq=28]="NotEq",t[t.OpenSharpBracket=29]="OpenSharpBracket",t[t.Sharp3=30]="Sharp3",t[t.Percent=31]="Percent",t[t.And2=32]="And2",t[t.OpenParen=33]="OpenParen",t[t.CloseParen=34]="CloseParen",t[t.Asterisk=35]="Asterisk",t[t.Plus=36]="Plus",t[t.PlusEq=37]="PlusEq",t[t.Comma=38]="Comma",t[t.Minus=39]="Minus",t[t.MinusEq=40]="MinusEq",t[t.Dot=41]="Dot",t[t.Slash=42]="Slash",t[t.Colon=43]="Colon",t[t.Colon2=44]="Colon2",t[t.SemiColon=45]="SemiColon",t[t.Lt=46]="Lt",t[t.LtEq=47]="LtEq",t[t.Out=48]="Out",t[t.Eq=49]="Eq",t[t.Eq2=50]="Eq2",t[t.Arrow=51]="Arrow",t[t.Gt=52]="Gt",t[t.GtEq=53]="GtEq",t[t.At=54]="At",t[t.OpenBracket=55]="OpenBracket",t[t.BackSlash=56]="BackSlash",t[t.CloseBracket=57]="CloseBracket",t[t.Hat=58]="Hat",t[t.OpenBrace=59]="OpenBrace",t[t.Or2=60]="Or2",t[t.CloseBrace=61]="CloseBrace"})(j||(j={}));class Rm{constructor(r,e,n=!1,c,d){be(this,"kind");be(this,"loc");be(this,"hasLeftSpacing");be(this,"value");be(this,"children");this.kind=r,this.loc=e,this.hasLeftSpacing=n,this.value=c,this.children=d}}function Be(t,r,e){return new Rm(t,r,e==null?void 0:e.hasLeftSpacing,e==null?void 0:e.value,e==null?void 0:e.children)}const Iv=[" "," "],Dm=["\r",` -`],jv=/^[0-9]$/,Lm=/^[A-Za-z0-9_]$/;class Bm{constructor(r){be(this,"stream");be(this,"_tokens",[]);typeof r=="string"?this.stream=new jm(r):this.stream=r,this._tokens.push(this.readToken())}get token(){return this._tokens[0]}get kind(){return this.token.kind}next(){this._tokens[0].kind!==j.EOF&&(this._tokens.shift(),this._tokens.length===0&&this._tokens.push(this.readToken()))}lookahead(r){for(;this._tokens.length<=r;)this._tokens.push(this.readToken());return this._tokens[r]}expect(r){if(this.kind!==r)throw new gt(`unexpected token: ${j[this.kind]}`,this.token.loc)}nextWith(r){this.expect(r),this.next()}readToken(){let r,e=!1;for(;;){if(this.stream.eof){r=Be(j.EOF,this.stream.getPos(),{hasLeftSpacing:e});break}if(Iv.includes(this.stream.char)){this.stream.next(),e=!0;continue}const n=this.stream.getPos();if(Dm.includes(this.stream.char))return this.stream.next(),r=Be(j.NewLine,n,{hasLeftSpacing:e}),r;switch(this.stream.char){case"!":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.NotEq,n,{hasLeftSpacing:e})):r=Be(j.Not,n,{hasLeftSpacing:e});break}case'"':case"'":{r=this.readStringLiteral(e);break}case"#":{if(this.stream.next(),!this.stream.eof&&this.stream.char==="#")this.stream.next(),!this.stream.eof&&this.stream.char==="#"&&(this.stream.next(),r=Be(j.Sharp3,n,{hasLeftSpacing:e}));else if(!this.stream.eof&&this.stream.char==="[")this.stream.next(),r=Be(j.OpenSharpBracket,n,{hasLeftSpacing:e});else throw new gt('invalid character: "#"',n);break}case"%":{this.stream.next(),r=Be(j.Percent,n,{hasLeftSpacing:e});break}case"&":{this.stream.next(),!this.stream.eof&&this.stream.char==="&"&&(this.stream.next(),r=Be(j.And2,n,{hasLeftSpacing:e}));break}case"(":{this.stream.next(),r=Be(j.OpenParen,n,{hasLeftSpacing:e});break}case")":{this.stream.next(),r=Be(j.CloseParen,n,{hasLeftSpacing:e});break}case"*":{this.stream.next(),r=Be(j.Asterisk,n,{hasLeftSpacing:e});break}case"+":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.PlusEq,n,{hasLeftSpacing:e})):r=Be(j.Plus,n,{hasLeftSpacing:e});break}case",":{this.stream.next(),r=Be(j.Comma,n,{hasLeftSpacing:e});break}case"-":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.MinusEq,n,{hasLeftSpacing:e})):r=Be(j.Minus,n,{hasLeftSpacing:e});break}case".":{this.stream.next(),r=Be(j.Dot,n,{hasLeftSpacing:e});break}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 r=Be(j.Slash,n,{hasLeftSpacing:e});break}case":":{this.stream.next(),!this.stream.eof&&this.stream.char===":"?(this.stream.next(),r=Be(j.Colon2,n,{hasLeftSpacing:e})):r=Be(j.Colon,n,{hasLeftSpacing:e});break}case";":{this.stream.next(),r=Be(j.SemiColon,n,{hasLeftSpacing:e});break}case"<":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.LtEq,n,{hasLeftSpacing:e})):!this.stream.eof&&this.stream.char===":"?(this.stream.next(),r=Be(j.Out,n,{hasLeftSpacing:e})):r=Be(j.Lt,n,{hasLeftSpacing:e});break}case"=":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.Eq2,n,{hasLeftSpacing:e})):!this.stream.eof&&this.stream.char===">"?(this.stream.next(),r=Be(j.Arrow,n,{hasLeftSpacing:e})):r=Be(j.Eq,n,{hasLeftSpacing:e});break}case">":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.GtEq,n,{hasLeftSpacing:e})):r=Be(j.Gt,n,{hasLeftSpacing:e});break}case"@":{this.stream.next(),r=Be(j.At,n,{hasLeftSpacing:e});break}case"[":{this.stream.next(),r=Be(j.OpenBracket,n,{hasLeftSpacing:e});break}case"\\":{this.stream.next(),r=Be(j.BackSlash,n,{hasLeftSpacing:e});break}case"]":{this.stream.next(),r=Be(j.CloseBracket,n,{hasLeftSpacing:e});break}case"^":{this.stream.next(),r=Be(j.Hat,n,{hasLeftSpacing:e});break}case"`":{r=this.readTemplate(e);break}case"{":{this.stream.next(),r=Be(j.OpenBrace,n,{hasLeftSpacing:e});break}case"|":{this.stream.next(),!this.stream.eof&&this.stream.char==="|"&&(this.stream.next(),r=Be(j.Or2,n,{hasLeftSpacing:e}));break}case"}":{this.stream.next(),r=Be(j.CloseBrace,n,{hasLeftSpacing:e});break}}if(r==null){const c=this.tryReadDigits(e);if(c){r=c;break}const d=this.tryReadWord(e);if(d){r=d;break}throw new gt(`invalid character: "${this.stream.char}"`,n)}break}return r}tryReadWord(r){let e="";const n=this.stream.getPos();for(;!this.stream.eof&&Lm.test(this.stream.char);)e+=this.stream.char,this.stream.next();if(e.length!==0)switch(e){case"null":return Be(j.NullKeyword,n,{hasLeftSpacing:r});case"true":return Be(j.TrueKeyword,n,{hasLeftSpacing:r});case"false":return Be(j.FalseKeyword,n,{hasLeftSpacing:r});case"each":return Be(j.EachKeyword,n,{hasLeftSpacing:r});case"for":return Be(j.ForKeyword,n,{hasLeftSpacing:r});case"loop":return Be(j.LoopKeyword,n,{hasLeftSpacing:r});case"break":return Be(j.BreakKeyword,n,{hasLeftSpacing:r});case"continue":return Be(j.ContinueKeyword,n,{hasLeftSpacing:r});case"match":return Be(j.MatchKeyword,n,{hasLeftSpacing:r});case"case":return Be(j.CaseKeyword,n,{hasLeftSpacing:r});case"default":return Be(j.DefaultKeyword,n,{hasLeftSpacing:r});case"if":return Be(j.IfKeyword,n,{hasLeftSpacing:r});case"elif":return Be(j.ElifKeyword,n,{hasLeftSpacing:r});case"else":return Be(j.ElseKeyword,n,{hasLeftSpacing:r});case"return":return Be(j.ReturnKeyword,n,{hasLeftSpacing:r});case"eval":return Be(j.EvalKeyword,n,{hasLeftSpacing:r});case"var":return Be(j.VarKeyword,n,{hasLeftSpacing:r});case"let":return Be(j.LetKeyword,n,{hasLeftSpacing:r});case"exists":return Be(j.ExistsKeyword,n,{hasLeftSpacing:r});default:return Be(j.Identifier,n,{hasLeftSpacing:r,value:e})}}tryReadDigits(r){let e="",n="";const c=this.stream.getPos();for(;!this.stream.eof&&jv.test(this.stream.char);)e+=this.stream.char,this.stream.next();if(e.length===0)return;if(!this.stream.eof&&this.stream.char==="."){for(this.stream.next();!this.stream.eof&&jv.test(this.stream.char);)n+=this.stream.char,this.stream.next();if(n.length===0)throw new gt("digit expected",c)}let d;return n.length>0?d=e+"."+n:d=e,Be(j.NumberLiteral,c,{hasLeftSpacing:r,value:d})}readStringLiteral(r){let e="";const n=this.stream.char;let c="string";const d=this.stream.getPos();for(this.stream.next();c!=="finish";)switch(c){case"string":{if(this.stream.eof)throw new gt("unexpected EOF",d);if(this.stream.char==="\\"){this.stream.next(),c="escape";break}if(this.stream.char===n){this.stream.next(),c="finish";break}e+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new gt("unexpected EOF",d);e+=this.stream.char,this.stream.next(),c="string";break}}return Be(j.StringLiteral,d,{hasLeftSpacing:r,value:e})}readTemplate(r){const e=[];let n="",c=[],d="string";const $=this.stream.getPos();let x=$;for(this.stream.next();d!=="finish";)switch(d){case"string":{if(this.stream.eof)throw new gt("unexpected EOF",$);if(this.stream.char==="\\"){this.stream.next(),d="escape";break}if(this.stream.char==="`"){this.stream.next(),n.length>0&&e.push(Be(j.TemplateStringElement,x,{hasLeftSpacing:r,value:n})),d="finish";break}if(this.stream.char==="{"){this.stream.next(),n.length>0&&(e.push(Be(j.TemplateStringElement,x,{hasLeftSpacing:r,value:n})),n=""),x=this.stream.getPos(),d="expr";break}n+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new gt("unexpected EOF",$);n+=this.stream.char,this.stream.next(),d="string";break}case"expr":{if(this.stream.eof)throw new gt("unexpected EOF",$);if(Iv.includes(this.stream.char)){this.stream.next();continue}if(this.stream.char==="}"){this.stream.next(),e.push(Be(j.TemplateExprElement,x,{hasLeftSpacing:r,children:c})),c=[],x=this.stream.getPos(),d="string";break}const m=this.readToken();c.push(m);break}}return Be(j.Template,$,{hasLeftSpacing:r,children:e})}skipCommentLine(){for(;!this.stream.eof;){if(this.stream.char===` -`){this.stream.next();break}this.stream.next()}}skipCommentRange(){for(;!this.stream.eof;){if(this.stream.char==="*"){if(this.stream.next(),this.stream.char==="/"){this.stream.next();break}continue}this.stream.next()}}}function et(t,r,e){const n={type:t};for(const c of Object.keys(r))r[c]!==void 0&&(n[c]=r[c]);return n.loc=e,n}function Ks(t,r,e){return et("call",{target:et("identifier",{name:t},e),args:r},e)}function ld(t){const r=[];for(t.nextWith(j.OpenParen),t.kind===j.NewLine&&t.next();t.kind!==j.CloseParen;){t.expect(j.Identifier);const e=t.token.value;t.next();let n;switch(t.kind===j.Colon&&(t.next(),n=su(t)),r.push({name:e,argType:n}),t.kind){case j.NewLine:{t.next();break}case j.Comma:{t.next(),t.kind===j.NewLine&&t.next();break}case j.CloseParen:break;default:throw new gt("separator expected",t.token.loc)}}return t.nextWith(j.CloseParen),r}function yf(t){for(t.nextWith(j.OpenBrace);t.kind===j.NewLine;)t.next();const r=[];for(;t.kind!==j.CloseBrace;)switch(r.push($c(t)),t.kind){case j.NewLine:case j.SemiColon:{for(;[j.NewLine,j.SemiColon].includes(t.kind);)t.next();break}case j.CloseBrace:break;default:throw new gt("Multiple statements cannot be placed on a single line.",t.token.loc)}return t.nextWith(j.CloseBrace),r}function su(t){return t.kind===j.At?Hm(t):Um(t)}function Hm(t){const r=t.token.loc;t.nextWith(j.At),t.nextWith(j.OpenParen);const e=[];for(;t.kind!==j.CloseParen;){if(e.length>0)switch(t.kind){case j.Comma:{t.next();break}default:throw new gt("separator expected",t.token.loc)}const c=su(t);e.push(c)}t.nextWith(j.CloseParen),t.nextWith(j.Arrow);const n=su(t);return et("fnTypeSource",{args:e,result:n},r)}function Um(t){const r=t.token.loc;t.expect(j.Identifier);const e=t.token.value;t.next();let n=null;return t.kind===j.Lt&&(t.next(),n=su(t),t.nextWith(j.Gt)),et("namedTypeSource",{name:e,inner:n},r)}class qm{constructor(r){be(this,"source");be(this,"index");be(this,"_token");this.source=r,this.index=0,this.load()}get eof(){return this.index>=this.source.length}get token(){return this.eof?Be(j.EOF,{line:-1,column:-1}):this._token}get kind(){return this.token.kind}next(){this.eof||this.index++,this.load()}lookahead(r){return this.index+r0)if(t.kind===j.Colon){if(t.token.hasLeftSpacing)throw new gt("Cannot use spaces in a reference.",t.token.loc);if(t.next(),t.token.hasLeftSpacing)throw new gt("Cannot use spaces in a reference.",t.token.loc)}else break;t.expect(j.Identifier),e.push(t.token.value),t.next()}return et("identifier",{name:e.join(":")},r)}function Ym(t,r){const e=t.token.loc;t.nextWith(j.OpenBrace),t.kind===j.NewLine&&t.next();const n=new Map;for(;t.kind!==j.CloseBrace;){t.expect(j.Identifier);const c=t.token.value;t.next(),t.nextWith(j.Colon);const d=vr(t,r);switch(n.set(c,d),t.kind){case j.NewLine:{t.next();break}case j.Comma:{t.next(),t.kind===j.NewLine&&t.next();break}case j.CloseBrace:break;default:throw new gt("separator expected",t.token.loc)}}return t.nextWith(j.CloseBrace),et("obj",{value:n},e)}function ex(t,r){const e=t.token.loc;t.nextWith(j.OpenBracket),t.kind===j.NewLine&&t.next();const n=[];for(;t.kind!==j.CloseBracket;)switch(n.push(vr(t,r)),t.kind){case j.NewLine:{t.next();break}case j.Comma:{t.next(),t.kind===j.NewLine&&t.next();break}case j.CloseBracket:break;default:throw new gt("separator expected",t.token.loc)}return t.nextWith(j.CloseBracket),et("arr",{value:n},e)}function mp(t,r){let e;const n=t.kind,c=Dc.find(d=>d.opKind==="prefix"&&d.kind===n);for(c!=null?e=zm(t,c.bp):e=od(t,!1);;){t.kind===j.BackSlash&&(t.next(),t.nextWith(j.NewLine));const d=t.kind,$=Dc.find(m=>m.opKind==="postfix"&&m.kind===d);if($!=null){if($.bpm.opKind==="infix"&&m.kind===d);if(x!=null){if(x.lbp`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>If(n)).join(", "),e=If(t.result);return`@(${r}) { ${e} }`}}}function Pu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return Rv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Pu(t.inner):r=Rv("any"),vx(t.name,[r])}}throw new gt(`Unknown type: '${If(t)}'`,t.loc)}else{const r=t.args.map(e=>Pu(e));return gx(r,Pu(t.result))}}function dx(t){switch(t.type){case"def":{t.varType!=null&&Pu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Pu(r.argType);t.retType!=null&&Pu(t.retType);break}}return t}function yx(t){for(const r of t)vt(r,dx);return t}var Ka;let wx=(Ka=class{constructor(){be(this,"plugins");this.plugins={validate:[px,yx],transform:[]}}static parse(r){return Ka.instance==null&&(Ka.instance=new Ka),Ka.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;const n=new Bm(r);e=fx(n);for(const c of this.plugins.validate)e=c(e);for(const c of this.plugins.transform)e=c(e);return e}},be(Ka,"instance"),Ka);const mx="next",xx={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { - <: if (i % 15 == 0) "FizzBuzz" - elif (i % 3 == 0) "Fizz" - elif (i % 5 == 0) "Buzz" - else i - }`};let mh=[],Ku=null;function $x(t){return mh=wx.parse(t),JSON.stringify(mh,null," ")}async function bx(t){Ku==null||Ku.abort(),Ku=new Kr({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:gh(r,!0),print:!0})},err:t.err,log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:gh(e.val,!0),print:!1});break}}});try{await Ku.exec(mh)}catch(r){t.err(r)}}const Ax=Object.freeze(Object.defineProperty({__proto__:null,exec:bx,parse:$x,samples:xx,version:mx},Symbol.toStringTag,{value:"Module"}));function gr(t,r,e){let n=e.value;return{configurable:!0,get(){const c=n.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:c}),c},set(c){n=c}}}let bc=class pd extends Error{constructor(e,n){super(e);be(this,"name","AiScript");be(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,pd)}},Cx=class extends bc{constructor(e){super(e.message??`${e}`,e);be(this,"name","Internal")}},nu=class extends bc{constructor(e,n){super(e,n);be(this,"name","Syntax")}},Xt=class extends bc{constructor(e,n){super(e,n);be(this,"name","Runtime")}},_x=class extends Xt{constructor(r,e){super(r,e)}};var bi=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,d=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};let ei=class vd{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new vd(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r).value;return this.log("read",{var:r,val:n}),n}throw new Xt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new Xt(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){const d=c.get(r);if(!d.isMutable)throw new Xt(`Cannot assign to an immutable variable ${r}.`);d.value=e,this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new Xt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};bi([gr],ei.prototype,"log",null);bi([gr],ei.prototype,"onUpdated",null);bi([gr],ei.prototype,"createChildScope",null);bi([gr],ei.prototype,"get",null);bi([gr],ei.prototype,"exists",null);bi([gr],ei.prototype,"getAll",null);bi([gr],ei.prototype,"add",null);bi([gr],ei.prototype,"assign",null);let Pf;const kx=new Uint8Array(16);function Px(){if(!Pf&&(Pf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Pf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pf(kx)}const Ur=[];for(let t=0;t<256;++t)Ur.push((t+256).toString(16).slice(1));function Ex(t,r=0){return Ur[t[r+0]]+Ur[t[r+1]]+Ur[t[r+2]]+Ur[t[r+3]]+"-"+Ur[t[r+4]]+Ur[t[r+5]]+"-"+Ur[t[r+6]]+Ur[t[r+7]]+"-"+Ur[t[r+8]]+Ur[t[r+9]]+"-"+Ur[t[r+10]]+Ur[t[r+11]]+Ur[t[r+12]]+Ur[t[r+13]]+Ur[t[r+14]]+Ur[t[r+15]]}const Mx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Dv={randomUUID:Mx};function Sx(t,r,e){if(Dv.randomUUID&&!r&&!t)return Dv.randomUUID();t=t||{};const n=t.random||(t.rng||Px)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return Ex(n)}var xp={exports:{}};xp.exports;(function(t){(function(r,e,n){function c(m){var A=this,_=x();A.next=function(){var k=2091639*A.s0+A.c*23283064365386963e-26;return A.s0=A.s1,A.s1=A.s2,A.s2=k-(A.c=k|0)},A.c=1,A.s0=_(" "),A.s1=_(" "),A.s2=_(" "),A.s0-=_(m),A.s0<0&&(A.s0+=1),A.s1-=_(m),A.s1<0&&(A.s1+=1),A.s2-=_(m),A.s2<0&&(A.s2+=1),_=null}function d(m,A){return A.c=m.c,A.s0=m.s0,A.s1=m.s1,A.s2=m.s2,A}function $(m,A){var _=new c(m),k=A&&A.state,S=_.next;return S.int32=function(){return _.next()*4294967296|0},S.double=function(){return S()+(S()*2097152|0)*11102230246251565e-32},S.quick=S,k&&(typeof k=="object"&&d(k,_),S.state=function(){return d(_,{})}),S}function x(){var m=4022871197,A=function(_){_=String(_);for(var k=0;k<_.length;k++){m+=_.charCodeAt(k);var S=.02519603282416938*m;m=S>>>0,S-=m,S*=m,m=S>>>0,S-=m,m+=S*4294967296}return(m>>>0)*23283064365386963e-26};return A}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.alea=$})(St,t,!1)})(xp);var Fx=xp.exports,$p={exports:{}};$p.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.x=0,m.y=0,m.z=0,m.w=0,m.next=function(){var k=m.x^m.x<<11;return m.x=m.y,m.y=m.z,m.z=m.w,m.w^=m.w>>>19^k^k>>>8},x===(x|0)?m.x=x:A+=x;for(var _=0;_>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(typeof _=="object"&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor128=$})(St,t,!1)})($p);var Ox=$p.exports,bp={exports:{}};bp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var k=m.x^m.x>>>2;return m.x=m.y,m.y=m.z,m.z=m.w,m.w=m.v,(m.d=m.d+362437|0)+(m.v=m.v^m.v<<4^(k^k<<1))|0},m.x=0,m.y=0,m.z=0,m.w=0,m.v=0,x===(x|0)?m.x=x:A+=x;for(var _=0;_>>4),m.next()}function d(x,m){return m.x=x.x,m.y=x.y,m.z=x.z,m.w=x.w,m.v=x.v,m.d=x.d,m}function $(x,m){var A=new c(x),_=m&&m.state,k=function(){return(A.next()>>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(typeof _=="object"&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorwow=$})(St,t,!1)})(bp);var Nx=bp.exports,Ap={exports:{}};Ap.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var _=m.x,k=m.i,S,T;return S=_[k],S^=S>>>7,T=S^S<<24,S=_[k+1&7],T^=S^S>>>10,S=_[k+3&7],T^=S^S>>>3,S=_[k+4&7],T^=S^S<<7,S=_[k+7&7],S=S^S<<13,T^=S^S<<9,_[k]=T,m.i=k+1&7,T};function A(_,k){var S,T=[];if(k===(k|0))T[0]=k;else for(k=""+k,S=0;S0;--S)_.next()}A(m,x)}function d(x,m){return m.x=x.x.slice(),m.i=x.i,m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),_=m&&m.state,k=function(){return(A.next()>>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(_.x&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorshift7=$})(St,t,!1)})(Ap);var Tx=Ap.exports,Cp={exports:{}};Cp.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var _=m.w,k=m.X,S=m.i,T,G;return m.w=_=_+1640531527|0,G=k[S+34&127],T=k[S=S+1&127],G^=G<<13,T^=T<<17,G^=G>>>15,T^=T>>>12,G=k[S]=G^T,m.i=S,G+(_^_>>>16)|0};function A(_,k){var S,T,G,ee,re,ge=[],q=128;for(k===(k|0)?(T=k,k=null):(k=k+"\0",T=0,q=Math.max(q,k.length)),G=0,ee=-32;ee>>15,T^=T<<4,T^=T>>>13,ee>=0&&(re=re+1640531527|0,S=ge[ee&127]^=T+re,G=S==0?G+1:0);for(G>=128&&(ge[(k&&k.length||0)&127]=-1),G=127,ee=4*128;ee>0;--ee)T=ge[G+34&127],S=ge[G=G+1&127],T^=T<<13,S^=S<<17,T^=T>>>15,S^=S>>>12,ge[G]=T^S;_.w=re,_.X=ge,_.i=G}A(m,x)}function d(x,m){return m.i=x.i,m.w=x.w,m.X=x.X.slice(),m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),_=m&&m.state,k=function(){return(A.next()>>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(_.X&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor4096=$})(St,t,!1)})(Cp);var Ix=Cp.exports,_p={exports:{}};_p.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var k=m.b,S=m.c,T=m.d,G=m.a;return k=k<<25^k>>>7^S,S=S-T|0,T=T<<24^T>>>8^G,G=G-k|0,m.b=k=k<<20^k>>>12^S,m.c=S=S-T|0,m.d=T<<16^S>>>16^G,m.a=G-k|0},m.a=0,m.b=0,m.c=-1640531527,m.d=1367130551,x===Math.floor(x)?(m.a=x/4294967296|0,m.b=x|0):A+=x;for(var _=0;_>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(typeof _=="object"&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.tychei=$})(St,t,!1)})(_p);var jx=_p.exports,gd={exports:{}};(function(t){(function(r,e,n){var c=256,d=6,$=52,x="random",m=n.pow(c,d),A=n.pow(2,$),_=A*2,k=c-1,S;function T(L,H,W){var V=[];H=H==!0?{entropy:!0}:H||{};var J=ge(re(H.entropy?[L,U(e)]:L??q(),3),V),Y=new G(V),ue=function(){for(var de=Y.g(d),le=m,Te=0;de=_;)de/=2,le/=2,Te>>>=1;return(de+Te)/le};return ue.int32=function(){return Y.g(4)|0},ue.quick=function(){return Y.g(4)/4294967296},ue.double=ue,ge(U(Y.S),e),(H.pass||W||function(de,le,Te,ze){return ze&&(ze.S&&ee(ze,Y),de.state=function(){return ee(Y,{})}),Te?(n[x]=de,le):de})(ue,J,"global"in H?H.global:this==n,H.state)}function G(L){var H,W=L.length,V=this,J=0,Y=V.i=V.j=0,ue=V.S=[];for(W||(L=[W++]);J({type:"num",value:t}),Wt=t=>({type:"str",value:t}),Go=t=>({type:"bool",value:t}),nc=t=>({type:"obj",value:t}),Gr=t=>({type:"arr",value:t}),Wx=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),ce=t=>({type:"fn",native:t}),Kx=t=>({type:"return",value:t}),Jx=()=>({type:"break",value:null}),Xx=()=>({type:"continue",value:null}),Gx=t=>t.type==="return"?t.value:t,xh=(t,r)=>({type:"error",value:t,info:r});function en(t){if(t==null)throw new Xt("Expect anything, but got nothing.")}function ds(t){if(t==null)throw new Xt("Expect boolean, but got nothing.");if(t.type!=="bool")throw new Xt(`Expect boolean, but got ${t.type}.`)}function hi(t){if(t==null)throw new Xt("Expect function, but got nothing.");if(t.type!=="fn")throw new Xt(`Expect function, but got ${t.type}.`)}function _r(t){if(t==null)throw new Xt("Expect string, but got nothing.");if(t.type!=="str")throw new Xt(`Expect string, but got ${t.type}.`)}function _e(t){if(t==null)throw new Xt("Expect number, but got nothing.");if(t.type!=="num")throw new Xt(`Expect number, but got ${t.type}.`)}function qn(t){if(t==null)throw new Xt("Expect object, but got nothing.");if(t.type!=="obj")throw new Xt(`Expect object, but got ${t.type}.`)}function ac(t){if(t==null)throw new Xt("Expect array, but got nothing.");if(t.type!=="arr")throw new Xt(`Expect array, but got ${t.type}.`)}function Lc(t){return t.type==="obj"}function Lv(t){return t.type==="arr"}function $h(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function bh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>bh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Ah(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Ah(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=Ah(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Ch(t){if(t===null)return Ct;if(typeof t=="boolean")return Go(t);if(typeof t=="string")return Wt(t);if(typeof t=="number")return Se(t);if(Array.isArray(t))return Gr(t.map(r=>Ch(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,Ch(n));return nc(r)}return Ct}function Eu(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const n=[];for(const c of t.value)n.push(Eu(c,!0,e));return"[ "+n.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const n=[];for(const[c,d]of t.value)n.push(`${c}: ${Eu(d,!0,e)}`);return"{ "+n.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const Zx={help:Wt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Wt("0.16.0"),"Core:ai":Wt("kawaii"),"Core:not":ce(([t])=>(ds(t),t.value?Xs:un)),"Core:eq":ce(([t,r])=>(en(t),en(r),$h(t,r)?un:Xs)),"Core:neq":ce(([t,r])=>(en(t),en(r),$h(t,r)?Xs:un)),"Core:and":ce(([t,r])=>(ds(t),t.value?(ds(r),r.value?un:Xs):Xs)),"Core:or":ce(([t,r])=>(ds(t),t.value?un:(ds(r),r.value?un:Xs))),"Core:add":ce(([t,r])=>(_e(t),_e(r),Se(t.value+r.value))),"Core:sub":ce(([t,r])=>(_e(t),_e(r),Se(t.value-r.value))),"Core:mul":ce(([t,r])=>(_e(t),_e(r),Se(t.value*r.value))),"Core:pow":ce(([t,r])=>{_e(t),_e(r);const e=t.value**r.value;if(isNaN(e))throw new Xt("Invalid operation.");return Se(e)}),"Core:div":ce(([t,r])=>{_e(t),_e(r);const e=t.value/r.value;if(isNaN(e))throw new Xt("Invalid operation.");return Se(e)}),"Core:mod":ce(([t,r])=>(_e(t),_e(r),Se(t.value%r.value))),"Core:gt":ce(([t,r])=>(_e(t),_e(r),t.value>r.value?un:Xs)),"Core:lt":ce(([t,r])=>(_e(t),_e(r),t.value(_e(t),_e(r),t.value>=r.value?un:Xs)),"Core:lteq":ce(([t,r])=>(_e(t),_e(r),t.value<=r.value?un:Xs)),"Core:type":ce(([t])=>(en(t),Wt(t.type))),"Core:to_str":ce(([t])=>(en(t),Wt(Eu(t)))),"Core:range":ce(([t,r])=>(_e(t),_e(r),t.valueSe(n+t.value))):t.value>r.value?Gr(Array.from({length:t.value-r.value+1},(e,n)=>Se(t.value-n))):Gr([t]))),"Core:sleep":ce(async([t])=>(_e(t),await new Promise(r=>setTimeout(r,t.value)),Ct)),"Util:uuid":ce(()=>Wt(Sx())),"Json:stringify":ce(([t])=>(en(t),Wt(JSON.stringify(Ah(t))))),"Json:parse":ce(([t])=>{_r(t);try{return Ch(JSON.parse(t.value))}catch{return xh("not_json")}}),"Json:parsable":ce(([t])=>{_r(t);try{JSON.parse(t.value)}catch{return Go(!1)}return Go(!0)}),"Date:now":ce(()=>Se(Date.now())),"Date:year":ce(([t])=>(t&&_e(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":ce(([t])=>(t&&_e(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":ce(([t])=>(t&&_e(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":ce(([t])=>(t&&_e(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":ce(([t])=>(t&&_e(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":ce(([t])=>(t&&_e(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":ce(([t])=>(_r(t),Se(new Date(t.value).getTime()))),"Math:Infinity":Se(1/0),"Math:E":Se(Math.E),"Math:LN2":Se(Math.LN2),"Math:LN10":Se(Math.LN10),"Math:LOG2E":Se(Math.LOG2E),"Math:LOG10E":Se(Math.LOG10E),"Math:PI":Se(Math.PI),"Math:SQRT1_2":Se(Math.SQRT1_2),"Math:SQRT2":Se(Math.SQRT2),"Math:abs":ce(([t])=>(_e(t),Se(Math.abs(t.value)))),"Math:acos":ce(([t])=>(_e(t),Se(Math.acos(t.value)))),"Math:acosh":ce(([t])=>(_e(t),Se(Math.acosh(t.value)))),"Math:asin":ce(([t])=>(_e(t),Se(Math.asin(t.value)))),"Math:asinh":ce(([t])=>(_e(t),Se(Math.asinh(t.value)))),"Math:atan":ce(([t])=>(_e(t),Se(Math.atan(t.value)))),"Math:atanh":ce(([t])=>(_e(t),Se(Math.atanh(t.value)))),"Math:atan2":ce(([t,r])=>(_e(t),_e(r),Se(Math.atan2(t.value,r.value)))),"Math:cbrt":ce(([t])=>(_e(t),Se(Math.cbrt(t.value)))),"Math:ceil":ce(([t])=>(_e(t),Se(Math.ceil(t.value)))),"Math:clz32":ce(([t])=>(_e(t),Se(Math.clz32(t.value)))),"Math:cos":ce(([t])=>(_e(t),Se(Math.cos(t.value)))),"Math:cosh":ce(([t])=>(_e(t),Se(Math.cosh(t.value)))),"Math:exp":ce(([t])=>(_e(t),Se(Math.exp(t.value)))),"Math:expm1":ce(([t])=>(_e(t),Se(Math.expm1(t.value)))),"Math:floor":ce(([t])=>(_e(t),Se(Math.floor(t.value)))),"Math:fround":ce(([t])=>(_e(t),Se(Math.fround(t.value)))),"Math:hypot":ce(([t])=>{ac(t);const r=[];for(const e of t.value)_e(e),r.push(e.value);return Se(Math.hypot(...r))}),"Math:imul":ce(([t,r])=>(_e(t),_e(r),Se(Math.imul(t.value,r.value)))),"Math:log":ce(([t])=>(_e(t),Se(Math.log(t.value)))),"Math:log1p":ce(([t])=>(_e(t),Se(Math.log1p(t.value)))),"Math:log10":ce(([t])=>(_e(t),Se(Math.log10(t.value)))),"Math:log2":ce(([t])=>(_e(t),Se(Math.log2(t.value)))),"Math:max":ce(([t,r])=>(_e(t),_e(r),Se(Math.max(t.value,r.value)))),"Math:min":ce(([t,r])=>(_e(t),_e(r),Se(Math.min(t.value,r.value)))),"Math:pow":ce(([t,r])=>(_e(t),_e(r),Se(Math.pow(t.value,r.value)))),"Math:round":ce(([t])=>(_e(t),Se(Math.round(t.value)))),"Math:sign":ce(([t])=>(_e(t),Se(Math.sign(t.value)))),"Math:sin":ce(([t])=>(_e(t),Se(Math.sin(t.value)))),"Math:sinh":ce(([t])=>(_e(t),Se(Math.sinh(t.value)))),"Math:sqrt":ce(([t])=>{_e(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new Xt("Invalid operation.");return Se(r)}),"Math:tan":ce(([t])=>(_e(t),Se(Math.tan(t.value)))),"Math:tanh":ce(([t])=>(_e(t),Se(Math.tanh(t.value)))),"Math:trunc":ce(([t])=>(_e(t),Se(Math.trunc(t.value)))),"Math:rnd":ce(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Se(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Se(Math.random())),"Math:gen_rng":ce(([t])=>{if(en(t),t.type!=="num"&&t.type!=="str")return Ct;const r=Vx(t.value.toString());return ce(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Se(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Se(r()))}),"Num:to_hex":ce(([t])=>(_e(t),Wt(t.value.toString(16)))),"Num:from_hex":ce(([t])=>(_r(t),Se(parseInt(t.value,16)))),"Str:lf":Wt(` -`),"Str:lt":ce(([t,r])=>(_r(t),_r(r),t.value(_r(t),_r(r),t.value>r.value?Se(-1):t.value===r.value?Se(0):Se(1))),"Str:from_codepoint":ce(([t])=>(_e(t),Wt(String.fromCodePoint(t.value)))),"Obj:keys":ce(([t])=>(qn(t),Gr(Array.from(t.value.keys()).map(r=>Wt(r))))),"Obj:vals":ce(([t])=>(qn(t),Gr(Array.from(t.value.values())))),"Obj:kvs":ce(([t])=>(qn(t),Gr(Array.from(t.value.entries()).map(([r,e])=>Gr([Wt(r),e]))))),"Obj:get":ce(([t,r])=>(qn(t),_r(r),t.value.get(r.value)??Ct)),"Obj:set":ce(([t,r,e])=>(qn(t),_r(r),en(e),t.value.set(r.value,e),Ct)),"Obj:has":ce(([t,r])=>(qn(t),_r(r),Go(t.value.has(r.value)))),"Obj:copy":ce(([t])=>(qn(t),nc(new Map(t.value)))),"Obj:merge":ce(([t,r])=>(qn(t),qn(r),nc(new Map([...t.value,...r.value])))),"Error:create":ce(([t,r])=>(_r(t),xh(t.value,r))),"Async:interval":ce(async([t,r,e],n)=>{_e(t),hi(r),e&&(ds(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.topCall(r,[])},t.value),d=()=>{clearInterval(c)};return n.registerAbortHandler(d),ce(([],$)=>{clearInterval(c),$.unregisterAbortHandler(d)})}),"Async:timeout":ce(async([t,r],e)=>{_e(t),hi(r);const n=setTimeout(()=>{e.topCall(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),ce(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(c)})})};var cu={},Qx=()=>{const t="\\ud800-\\udfff",r="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",c="\\u1ab0-\\u1aff",d="\\u1dc0-\\u1dff",$=r+e+n+c+d,x="\\ufe0e\\ufe0f",m="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",A=`[${t}]`,_=`[${$}]`,k="\\ud83c[\\udffb-\\udfff]",S=`(?:${_}|${k})`,T=`[^${t}]`,G="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",ee="[\\ud800-\\udbff][\\udc00-\\udfff]",re="\\u200d",ge="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",q=`[${m}]`,U=`${S}?`,L=`[${x}]?`,H=`(?:${re}(?:${[T,G,ee].join("|")})${L+U})*`,W=L+U+H,J=`(?:${[`${T}${_}?`,_,G,ee,A,q].join("|")})`;return new RegExp(`${ge}|${k}(?=${k})|${J+W}`,"g")},Yx=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cu,"__esModule",{value:!0});var Ac=Yx(Qx);function _h(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match(Ac.default())||[]}var Bv=cu.toArray=_h;function kp(t){if(typeof t!="string")throw new Error("Input must be a string");var r=t.match(Ac.default());return r===null?0:r.length}var e$=cu.length=kp;function dd(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");(typeof r!="number"||r<0)&&(r=0),typeof e=="number"&&e<0&&(e=0);var n=t.match(Ac.default());return n?n.slice(r,e).join(""):""}var t$=cu.substring=dd;function r$(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");var n=kp(t);if(typeof r!="number"&&(r=parseInt(r,10)),r>=n)return"";r<0&&(r+=n);var c;typeof e>"u"?c=n:(typeof e!="number"&&(e=parseInt(e,10)),c=e>=0?e+r:r);var d=t.match(Ac.default());return d?d.slice(r,c).join(""):""}cu.substr=r$;function s$(t,r,e,n){if(r===void 0&&(r=16),e===void 0&&(e="#"),n===void 0&&(n="right"),typeof t!="string"||typeof r!="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 e!="string"&&(e=String(e));var c=kp(t);if(c>r)return dd(t,0,r);if(c=n.length)return r===""?n.length:-1;if(r==="")return e;var c=_h(r),d=!1,$;for($=e;$ce(async(r,e)=>Wt(t.value.toString()))},str:{to_num:t=>ce(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?Ct:Se(n)}),len:t=>Se(e$(t.value)),replace:t=>ce(async([r,e],n)=>(_r(r),_r(e),Wt(t.value.split(r.value).join(e.value)))),index_of:t=>ce(async([r],e)=>(_r(r),Se(a$(t.value,r.value)))),incl:t=>ce(async([r],e)=>(_r(r),t.value.includes(r.value)?un:Xs)),trim:t=>ce(async(r,e)=>Wt(t.value.trim())),upper:t=>ce(async(r,e)=>Wt(t.value.toUpperCase())),lower:t=>ce(async(r,e)=>Wt(t.value.toLowerCase())),split:t=>ce(async([r],e)=>(r&&_r(r),Gr(r?t.value.split(r?r.value:"").map(n=>Wt(n)):Bv(t.value).map(n=>Wt(n))))),slice:t=>ce(async([r,e],n)=>(_e(r),_e(e),Wt(t$(t.value,r.value,e.value)))),pick:t=>ce(async([r],e)=>{_e(r);const c=Bv(t.value)[r.value];return c?Wt(c):Ct}),codepoint_at:t=>ce(([r],e)=>{_e(r);const n=t.value.charCodeAt(r.value);return Number.isNaN(n)?Ct:Se(n)})},arr:{len:t=>Se(t.value.length),push:t=>ce(async([r],e)=>(en(r),t.value.push(r),t)),unshift:t=>ce(async([r],e)=>(en(r),t.value.unshift(r),t)),pop:t=>ce(async(r,e)=>t.value.pop()??Ct),shift:t=>ce(async(r,e)=>t.value.shift()??Ct),concat:t=>ce(async([r],e)=>(ac(r),Gr(t.value.concat(r.value)))),slice:t=>ce(async([r,e],n)=>(_e(r),_e(e),Gr(t.value.slice(r.value,e.value)))),join:t=>ce(async([r],e)=>(r&&_r(r),Wt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>ce(async([r],e)=>{hi(r);const n=t.value.map(async(c,d)=>await e.call(r,[c,Se(d)]));return Gr(await Promise.all(n))}),filter:t=>ce(async([r],e)=>{hi(r);const n=[];for(let c=0;cce(async([r,e],n)=>{hi(r);const c=e!=null;let d=c?e:t.value[0];for(let $=c?0:1;$ce(async([r],e)=>{hi(r);for(let n=0;nce(async([r],e)=>(en(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Xs:(c=>c.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?un:Xs)),reverse:t=>ce(async(r,e)=>(t.value.reverse(),Ct)),copy:t=>ce(async(r,e)=>Gr([...t.value])),sort:t=>ce(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const x=Math.floor(d.length/2),m=await n(d.slice(0,x),$),A=await n(d.slice(x),$);return c(m,A,$)},c=async(d,$,x)=>{const m=[];let A=0,_=0;for(;AWt(t.value),info:t=>t.info??Ct}};function i$(t,r){if(Object.hasOwn(Hv,t.type)){const e=Hv[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new Xt(`No such prop (${r}) in ${t.type}.`)}else throw new Xt(`Cannot read prop of ${t.type}. (reading ${r})`)}const l$={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var $s=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,d=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};const yd=300,o$=yd-1;let as=class{constructor(r,e={}){be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);be(this,"vars",{});this.opts=e;const n={print:ce(([c])=>{en(c),this.opts.out&&this.opts.out(c)}),readline:ce(async c=>{const d=c[0];if(_r(d),this.opts.in==null)return Ct;const $=await this.opts.in(d.value);return Wt($)})};this.vars=Object.fromEntries(Object.entries({...r,...Zx,...n}).map(([c,d])=>[c,l$.const(d)])),this.scope=new ei([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,d)=>{switch(c){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(n=>(this.handleError(n),xh("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(d=>e(d));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const d={};for(const[$,x]of c.value.entries())d[$]=e(x);return d}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof bc?this.opts.err(r):this.opts.err(new Cx(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{if(n.mut)throw new Error("Namespaces cannot include mutable variable: "+n.name);const c={isMutable:n.mut,value:await this._eval(n.expr,e)};e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??Ct;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],{isMutable:!0,value:e[d]});const c=r.scope.createChildScope(n);return Gx(await this._run(r.statements,c))}}async _eval(r,e){if(this.stop)return Ct;if(this.stepCount%yd===o$&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new Xt("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);hi(n);const c=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if(ds(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const d=await this._eval(c.cond,e);if(ds(d),d.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return Ct}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const d=await this._eval(c.q,e);if($h(n,d))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):Ct}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return Ct}case"for":{if(r.times){const n=await this._eval(r.times,e);_e(n);for(let c=0;c0){const c=[];for(const d of r.attr)c.push({name:d.name,value:await this._eval(d.value,e)});n.attr=c}return e.add(r.name,{isMutable:r.mut,value:n}),Ct}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),Ct}case"addAssign":{const n=await this._eval(r.dest,e);_e(n);const c=await this._eval(r.expr,e);return _e(c),await this.assign(e,r.dest,Se(n.value+c.value)),Ct}case"subAssign":{const n=await this._eval(r.dest,e);_e(n);const c=await this._eval(r.expr,e);return _e(c),await this.assign(e,r.dest,Se(n.value-c.value)),Ct}case"null":return Ct;case"bool":return Go(r.value);case"num":return Se(r.value);case"str":return Wt(r.value);case"arr":return Gr(await Promise.all(r.value.map(n=>this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return nc(n)}case"prop":{const n=await this._eval(r.target,e);return Lc(n)?n.value.has(r.name)?n.value.get(r.name):Ct:i$(n,r.name)}case"index":{const n=await this._eval(r.target,e),c=await this._eval(r.index,e);if(Lv(n)){_e(c);const d=n.value[c.value];if(d===void 0)throw new _x(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return d}else{if(Lc(n))return _r(c),n.value.has(c.value)?n.value.get(c.value):Ct;throw new Xt(`Cannot read prop (${Eu(c)}) of ${n.type}.`)}}case"not":{const n=await this._eval(r.expr,e);return ds(n),Go(!n.value)}case"fn":return Wx(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return Go(e.exists(r.identifier.name));case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const d=await this._eval(c,e);n+=Eu(d)}return Wt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),Kx(n)}case"break":return this.log("block:break",{scope:e.name}),Jx();case"continue":return this.log("block:continue",{scope:e.name}),Xx();case"ns":return Ct;case"meta":return Ct;case"and":{const n=await this._eval(r.left,e);if(ds(n),n.value){const c=await this._eval(r.right,e);return ds(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if(ds(n),n.value)return n;{const c=await this._eval(r.right,e);return ds(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=Ct;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r),d=await this._eval(e.index,r);if(Lv(c))_e(d),c.value[d.value]=n;else if(Lc(c))_r(d),c.value.set(d.value,n);else throw new Xt(`Cannot read prop (${Eu(d)}) of ${c.type}.`)}else if(e.type==="prop"){const c=await this._eval(e.target,r);qn(c),c.value.set(e.name,n)}else throw new Xt("The left-hand side of an assignment expression must be a variable or a property/index access.")}};$s([gr],as.prototype,"exec",null);$s([gr],as.prototype,"execFn",null);$s([gr],as.prototype,"execFnSimple",null);$s([gr],as.prototype,"handleError",null);$s([gr],as.prototype,"log",null);$s([gr],as.prototype,"collectNs",null);$s([gr],as.prototype,"collectNsMember",null);$s([gr],as.prototype,"_fn",null);$s([gr],as.prototype,"_eval",null);$s([gr],as.prototype,"_run",null);$s([gr],as.prototype,"registerAbortHandler",null);$s([gr],as.prototype,"unregisterAbortHandler",null);$s([gr],as.prototype,"abort",null);$s([gr],as.prototype,"assign",null);$s([gr],as,"collectMetadata",null);function u$(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function Zo(t,r,e,n){var c=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(c,Zo.prototype),c.expected=r,c.found=e,c.location=n,c.name="SyntaxError",c}u$(Zo,Error);function Bc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}Zo.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` -`+m+` | -`+d.line+" | "+A+` -`+m+" | "+Bc("",c.column-1," ")+Bc("",k,"^")}else r+=` - at `+$}return r};Zo.buildMessage=function(t,r){var e={literal:function(A){return'"'+c(A.text)+'"'},class:function(A){var _=A.parts.map(function(k){return Array.isArray(k)?d(k[0])+"-"+d(k[1]):d(k)});return"["+(A.inverted?"^":"")+_.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(A){return A.description}};function n(A){return A.charCodeAt(0).toString(16).toUpperCase()}function c(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(_){return"\\x0"+n(_)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(_){return"\\x"+n(_)})}function d(A){return A.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(_){return"\\x0"+n(_)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(_){return"\\x"+n(_)})}function $(A){return e[A.type](A)}function x(A){var _=A.map($),k,S;if(_.sort(),_.length>0){for(k=1,S=1;k<_.length;k++)_[k-1]!==_[k]&&(_[S]=_[k],S++);_.length=S}switch(_.length){case 1:return _[0];case 2:return _[0]+" or "+_[1];default:return _.slice(0,-1).join(", ")+", or "+_[_.length-1]}}function m(A){return A?'"'+c(A)+'"':"end of input"}return"Expected "+x(t)+" but "+m(r)+" found."};function Uv(t,r){r=r!==void 0?r:{};var e={},n=r.grammarSource,c={Preprocess:ka,Main:cs},d=ka,$="//",x="/*",m="*/",A="(",_=")",k="::",S="{",T="}",G="###",ee="let",re=":",ge="=",q="var",U="<:",L="#[",H="]",W="each",V=",",J="for",Y="return",ue="loop",de="break",le="continue",Te="+=",ze="-=",dt="\\",Ke="||",ot="&&",je="==",lt="!=",Ft="<=",Ot=">=",Ye="<",Or=">",Bt="+",wr="-",Pt="*",yr="^",Nr="/",kr="%",Mr="!",Nt="[",z=".",Z="if",se="elif",ve="else",ye="match",oe="=>",Ne="eval",me="exists",$e="`",he='"',Le="'",Re='\\"',He="\\'",We="true",Ze="false",nt="null",at=";",mt="@",Ht="@(",bt=`\r -`,Zt=/^[A-Z0-9_:]/i,Es=/^[^`{]/,Jr=/^[{}`]/,Tt=/^[+\-]/,ht=/^[1-9]/,Rt=/^[0-9]/,Kn=/^[A-Z_]/i,Jn=/^[A-Z0-9_]/i,_i=/^[\r\n]/,ki=/^[ \t\r\n]/,rr=/^[ \t]/,sr=qs(),Pi=ae("//",!1),dn=ae("/*",!1),mr=ae("*/",!1),Et=ae("(",!1),xr=ae(")",!1),nr=ae("::",!1),tt=ae("{",!1),Ut=ae("}",!1),jr=ae("###",!1),yt=ae("let",!1),wt=ae(":",!1),ls=ae("=",!1),Ei=ae("var",!1),Mi=ae("<:",!1),Ms=ae("#[",!1),os=ae("]",!1),xt=ae("each",!1),pt=ae(",",!1),Ss=ae("for",!1),ur=ae("return",!1),fr=It([["A","Z"],["0","9"],"_",":"],!1,!0),Si=ae("loop",!1),Fi=ae("break",!1),Oi=ae("continue",!1),Ni=ae("+=",!1),Xn=ae("-=",!1),Gn=ae("\\",!1),Ti=ae("||",!1),Ii=ae("&&",!1),ji=ae("==",!1),Ri=ae("!=",!1),Di=ae("<=",!1),Zn=ae(">=",!1),yn=ae("<",!1),Qn=ae(">",!1),Li=ae("+",!1),Yn=ae("-",!1),ea=ae("*",!1),Bi=ae("^",!1),Hi=ae("/",!1),Ui=ae("%",!1),wn=ae("!",!1),us=ae("[",!1),mn=ae(".",!1),qi=ae("if",!1),zi=ae("elif",!1),Vi=ae("else",!1),Fs=ae("match",!1),Os=ae("=>",!1),Ns=ae("eval",!1),Wi=ae("exists",!1),Ts=ae("`",!1),Is=It(["`","{"],!0,!1),js=It(["{","}","`"],!1,!1),Rs=ae('"',!1),Ds=ae("'",!1),Ls=ae('\\"',!1),ta=ae("\\'",!1),Mt=It(["+","-"],!1,!1),ra=It([["1","9"]],!1,!1),ar=It([["0","9"]],!1,!1),Ki=ae("true",!1),Bs=ae("false",!1),Ji=ae("null",!1),fs=ae(";",!1),Xi=ae("@",!1),xn=ae("@(",!1),Gi=It([["A","Z"],"_"],!1,!0),sa=It([["A","Z"],["0","9"],"_"],!1,!0),Zi=ae(`\r -`,!1),Qi=It(["\r",` -`],!1,!1),Yi=It([" "," ","\r",` -`],!1,!1),el=It([" "," "],!1,!1),tl=function(s){return s.join("")},rl=function(){return te()},sl=function(){return te()},nl=function(){return""},na=function(){return""},al=function(s){return s??[]},$n=function(s,o){return o},il=function(s,o){return[s,...o]},bn=function(s,o){return o},ll=function(s,o){return[s,...o]},aa=function(s,o){return o},ol=function(s,o){return[s,...o]},ul=function(s){return s},fl=function(s,o){return h("ns",{name:s,members:o})},cl=function(s,o){return h("meta",{name:s,value:o})},hl=function(s){return h("meta",{name:null,value:s})},pl=function(s,o,p){return h("def",{name:s,varType:o,expr:p,mut:!1,attr:[]})},vl=function(s,o,p){return h("def",{name:s,varType:o,expr:p,mut:!0,attr:[]})},gl=function(s){return h("identifier",{name:"print",chain:[h("callChain",{args:[s]})]})},dl=function(s,o){return h("attr",{name:s,value:o??h("bool",{value:!0})})},yl=function(s,o,p){return h("each",{var:s,items:o,for:p})},wl=function(s,o,p){return h("each",{var:s,items:o,for:p})},ml=function(s,o){return o},xl=function(s,o,p,u){return h("for",{var:s,from:o??h("num",{value:0}),to:p,for:u})},$l=function(s,o){return o},bl=function(s,o,p,u){return h("for",{var:s,from:o??h("num",{value:0}),to:p,for:u})},Al=function(s,o){return h("for",{times:s,for:o})},Cl=function(s,o){return h("for",{times:s,for:o})},_l=function(s){return h("return",{expr:s})},kl=function(s){return h("loop",{statements:s})},Pl=function(){return h("break",{})},ia=function(){return h("continue",{})},El=function(s,o,p){return o==="+="?h("addAssign",{dest:s,expr:p}):o==="-="?h("subAssign",{dest:s,expr:p}):h("assign",{dest:s,expr:p})},la=function(s,o,p){return{op:o,term:p}},Ml=function(s,o){return h("infix",{operands:[s,...o.map(p=>p.term)],operators:o.map(p=>p.op)})},Sl=function(){return te()},Fl=function(s){return h("not",{expr:s})},oa=function(s,o){return s.chain?{...s,chain:[...s.chain,...o]}:{...s,chain:o}},Ol=function(s){return h("callChain",{args:s??[]})},ua=function(s,o){return o},Nl=function(s,o){return[s,...o]},Tl=function(s){return h("indexChain",{index:s})},Il=function(s){return h("propChain",{name:s})},jl=function(s,o,p,u){return h("if",{cond:s,then:o,elseif:p??[],else:u})},Rl=function(s,o){return[s,...o]},fa=function(s,o){return{cond:s,then:o}},Dl=function(s){return s},ca=function(s,o,p){return{q:o,a:p}},Ll=function(s,o,p){return h("match",{about:s,qs:o??[],default:p})},Bl=function(s){return h("block",{statements:s})},Hl=function(s){return h("exists",{identifier:s})},ha=function(s){return h("identifier",{name:s})},Ul=function(s){return h("tmpl",{tmpl:s})},pa=function(s){return s.join("")},va=function(s){return s},ql=function(s){return h("str",{value:s.join("")})},ga=function(s){return s},zl=function(s){return h("str",{value:s.join("")})},Vl=function(){return'"'},Wl=function(){return"'"},Kl=function(){return h("num",{value:parseFloat(te())})},Jl=function(){return h("num",{value:parseFloat(te())})},Xl=function(){return h("num",{value:parseInt(te(),10)})},Gl=function(){return h("num",{value:parseInt(te(),10)})},da=function(){return h("bool",{value:!0})},Zl=function(){return h("bool",{value:!1})},ya=function(){return h("null",{})},wa=function(s,o){return{k:s,v:o}},Ql=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return h("obj",{value:o})},ma=function(s){return s},Yl=function(s){return h("arr",{value:s})},eo=function(s,o){return{name:s,argType:o}},xa=function(s,o){return[s,...o]},to=function(s,o,p,u,g,v){return(s.length>0||p.length>0)&&oo("Cannot use spaces before or after the function name."),h("def",{name:o,expr:h("fn",{args:u??[],retType:g},v??[]),mut:!1,attr:[]})},$a=function(s,o,p){return h("fn",{args:s??[],retType:o},p??[])},ba=function(s){return s},ro=function(s){return h("arr",{value:s})},Aa=function(s,o){return{k:s,v:o}},so=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return h("obj",{value:o})},no=function(s,o){return h("fnTypeSource",{args:s??[],result:o})},ao=function(s,o){return[s,...o]},io=function(s,o){return h("namedTypeSource",{name:s,inner:o})},lo=function(s){return h("namedTypeSource",{name:s,inner:null})},i=function(){return te()},X=function(){return te()},Hs=function(s){return h("block",{statements:s??[]})},a=0,K=0,E=[{line:1,column:1}],I=0,Rr=[],P=0,R={},Us;if("startRule"in r){if(!(r.startRule in c))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=c[r.startRule]}function te(){return t.substring(K,a)}function qt(){return zs(K,a)}function oo(s,o){throw o=o!==void 0?o:zs(K,a),_a(s,o)}function ae(s,o){return{type:"literal",text:s,ignoreCase:o}}function It(s,o,p){return{type:"class",parts:s,inverted:o,ignoreCase:p}}function qs(){return{type:"any"}}function N(){return{type:"end"}}function Ca(s){var o=E[s],p;if(o)return o;for(p=s-1;!E[p];)p--;for(o=E[p],o={line:o.line,column:o.column};pI&&(I=a,Rr=[]),Rr.push(s))}function _a(s,o){return new Zo(s,null,null,o)}function uo(s,o,p){return new Zo(Zo.buildMessage(s,o),s,o,p)}function ka(){var s,o,p,u=a*77+0,g=R[u];if(g)return a=g.nextPos,g.result;for(s=a,o=[],p=Pa();p!==e;)o.push(p),p=Pa();return K=s,o=tl(o),s=o,R[u]={nextPos:a,result:s},s}function Pa(){var s,o,p=a*77+1,u=R[p];return u?(a=u.nextPos,u.result):(s=a,o=Ws(),o!==e&&(K=s,o=rl()),s=o,s===e&&(s=a,o=Sn(),o!==e&&(K=s,o=sl()),s=o,s===e&&(s=fo(),s===e&&(t.length>a?(s=t.charAt(a),a++):(s=e,P===0&&O(sr))))),R[p]={nextPos:a,result:s},s)}function fo(){var s,o,p,u,g,v,b=a*77+2,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,2)===$?(o=$,a+=2):(o=e,P===0&&O(Pi)),o!==e){for(p=[],u=a,g=a,P++,v=l(),P--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,v=l(),P--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);K=s,s=nl()}else a=s,s=e;if(s===e)if(s=a,t.substr(a,2)===x?(o=x,a+=2):(o=e,P===0&&O(dn)),o!==e){for(p=[],u=a,g=a,P++,t.substr(a,2)===m?(v=m,a+=2):(v=e,P===0&&O(mr)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,t.substr(a,2)===m?(v=m,a+=2):(v=e,P===0&&O(mr)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);t.substr(a,2)===m?(u=m,a+=2):(u=e,P===0&&O(mr)),u!==e?(K=s,s=na()):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function cs(){var s,o,p,u,g,v=a*77+3,b=R[v];if(b)return a=b.nextPos,b.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();for(p=An(),p===e&&(p=null),u=[],g=f();g!==e;)u.push(g),g=f();return K=s,s=al(p),R[v]={nextPos:a,result:s},s}function An(){var s,o,p,u,g,v,b,w,M=a*77+4,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=De(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=De(),w!==e?(K=u,u=$n(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=De(),w!==e?(K=u,u=$n(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=il(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Cn(){var s,o,p,u,g,v,b,w,M=a*77+5,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=Dr(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Dr(),w!==e?(K=u,u=bn(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Dr(),w!==e?(K=u,u=bn(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=ll(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function cr(){var s,o,p,u,g,v,b,w,M=a*77+6,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=Lr(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Lr(),w!==e?(K=u,u=aa(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Lr(),w!==e?(K=u,u=aa(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=ol(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function De(){var s,o=a*77+7,p=R[o];return p?(a=p.nextPos,p.result):(s=Ma(),s===e&&(s=co(),s===e&&(s=Lr())),R[o]={nextPos:a,result:s},s)}function Dr(){var s,o=a*77+8,p=R[o];return p?(a=p.nextPos,p.result):(s=Sa(),s===e&&(s=zt(),s===e&&(s=Ma())),R[o]={nextPos:a,result:s},s)}function Lr(){var s,o=a*77+9,p=R[o];return p?(a=p.nextPos,p.result):(s=Sa(),s===e&&(s=zt(),s===e&&(s=ho(),s===e&&(s=yo(),s===e&&(s=po(),s===e&&(s=vo(),s===e&&(s=go(),s===e&&(s=wo(),s===e&&(s=mo(),s===e&&(s=br(),s===e&&(s=Fa(),s===e&&(s=Ie()))))))))))),R[o]={nextPos:a,result:s},s)}function Ie(){var s,o=a*77+10,p=R[o];return p?(a=p.nextPos,p.result):(s=xo(),s===e&&(s=hs()),R[o]={nextPos:a,result:s},s)}function hs(){var s,o=a*77+11,p=R[o];return p?(a=p.nextPos,p.result):(s=Ao(),s===e&&(s=Mo(),s===e&&(s=Oa(),s===e&&(s=Ea()))),R[o]={nextPos:a,result:s},s)}function Ea(){var s,o,p,u,g,v,b=a*77+12,w=R[b];if(w)return a=w.nextPos,w.result;if(s=Ta(),s===e&&(s=Ia(),s===e&&(s=ja(),s===e&&(s=Ws(),s===e&&(s=Sn(),s===e&&(s=Ba(),s===e&&(s=Ua(),s===e&&(s=Nn(),s===e&&(s=qa(),s===e&&(s=Eo(),s===e&&(s=$o(),s===e&&(s=Ra(),s===e))))))))))))if(s=a,t.charCodeAt(a)===40?(o=A,a++):(o=e,P===0&&O(Et)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Ie(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e?(K=s,s=ul(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function $r(){var s,o=a*77+13,p=R[o];return p?(a=p.nextPos,p.result):(s=Ba(),s===e&&(s=Sn(),s===e&&(s=Ua(),s===e&&(s=So(),s===e&&(s=Fo(),s===e&&(s=Nn()))))),R[o]={nextPos:a,result:s},s)}function Ma(){var s,o,p,u,g,v,b,w,M,F,D=a*77+14,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===k?(o=k,a+=2):(o=e,P===0&&O(nr)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(t.charCodeAt(a)===123?(v=S,a++):(v=e,P===0&&O(tt)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(w=Cn(),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();t.charCodeAt(a)===125?(F=T,a++):(F=e,P===0&&O(Ut)),F!==e?(K=s,s=fl(u,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function co(){var s,o,p,u,g,v,b=a*77+15,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,3)===G?(o=G,a+=3):(o=e,P===0&&O(jr)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=qe(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();v=$r(),v!==e?(K=s,s=cl(u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===G?(o=G,a+=3):(o=e,P===0&&O(jr)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();u=$r(),u!==e?(K=s,s=hl(u)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Sa(){var s,o,p,u,g,v,b,w,M,F=a*77+16,D=R[F];if(D)return a=D.nextPos,D.result;if(s=a,t.substr(a,3)===ee?(o=ee,a+=3):(o=e,P===0&&O(yt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){for(g=a,v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===58?(b=re,a++):(b=e,P===0&&O(wt)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ue(),M!==e?g=M:(a=g,g=e)}else a=g,g=e;for(g===e&&(g=null),v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===61?(b=ge,a++):(b=e,P===0&&O(ls)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ie(),M!==e?(K=s,s=pl(u,g,M)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===q?(o=q,a+=3):(o=e,P===0&&O(Ei)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){for(g=a,v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===58?(b=re,a++):(b=e,P===0&&O(wt)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ue(),M!==e?g=M:(a=g,g=e)}else a=g,g=e;for(g===e&&(g=null),v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===61?(b=ge,a++):(b=e,P===0&&O(ls)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ie(),M!==e?(K=s,s=vl(u,g,M)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[F]={nextPos:a,result:s},s}function ho(){var s,o,p,u,g=a*77+17,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,2)===U?(o=U,a+=2):(o=e,P===0&&O(Mi)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();u=Ie(),u!==e?(K=s,s=gl(u)):(a=s,s=e)}else a=s,s=e;return R[g]={nextPos:a,result:s},s}function po(){var s,o,p,u,g,v,b,w=a*77+18,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,t.substr(a,2)===L?(o=L,a+=2):(o=e,P===0&&O(Ms)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=qe(),u!==e){for(g=a,v=[],b=f();b!==e;)v.push(b),b=f();for(b=$r(),b!==e?g=b:(a=g,g=e),g===e&&(g=null),v=[],b=f();b!==e;)v.push(b),b=f();t.charCodeAt(a)===93?(b=H,a++):(b=e,P===0&&O(os)),b!==e?(K=s,s=dl(u,g)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[w]={nextPos:a,result:s},s}function vo(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne=a*77+19,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.substr(a,4)===W?(o=W,a+=4):(o=e,P===0&&O(xt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,P===0&&O(Et)),u!==e)if(t.substr(a,3)===ee?(g=ee,a+=3):(g=e,P===0&&O(yt)),g!==e){if(v=[],b=f(),b!==e)for(;b!==e;)v.push(b),b=f();else v=e;if(v!==e)if(b=qe(),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();for(t.charCodeAt(a)===44?(M=V,a++):(M=e,P===0&&O(pt)),M===e&&(M=null),F=[],D=f();D!==e;)F.push(D),D=f();if(D=Ie(),D!==e)if(t.charCodeAt(a)===41?(B=_,a++):(B=e,P===0&&O(xr)),B!==e){for(Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();xe=Ae(),xe!==e?(K=s,s=yl(b,D,xe)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,4)===W?(o=W,a+=4):(o=e,P===0&&O(xt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,P===0&&O(yt)),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();if(F=Ie(),F!==e){if(D=[],B=f(),B!==e)for(;B!==e;)D.push(B),B=f();else D=e;D!==e?(B=Ae(),B!==e?(K=s,s=wl(v,F,B)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function go(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne,Xe=a*77+20,Ge=R[Xe];if(Ge)return a=Ge.nextPos,Ge.result;if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,P===0&&O(Ss)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,P===0&&O(Et)),u!==e)if(t.substr(a,3)===ee?(g=ee,a+=3):(g=e,P===0&&O(yt)),g!==e){if(v=[],b=f(),b!==e)for(;b!==e;)v.push(b),b=f();else v=e;if(v!==e)if(b=qe(),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();if(M=a,t.charCodeAt(a)===61?(F=ge,a++):(F=e,P===0&&O(ls)),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();B=Ie(),B!==e?(K=M,M=ml(b,B)):(a=M,M=e)}else a=M,M=e;for(M===e&&(M=null),t.charCodeAt(a)===44?(F=V,a++):(F=e,P===0&&O(pt)),F===e&&(F=null),D=[],B=f();B!==e;)D.push(B),B=f();if(B=Ie(),B!==e)if(t.charCodeAt(a)===41?(Q=_,a++):(Q=e,P===0&&O(xr)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();ne=Ae(),ne!==e?(K=s,s=xl(b,M,B,ne)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,P===0&&O(Ss)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,P===0&&O(yt)),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(w=a,t.charCodeAt(a)===61?(M=ge,a++):(M=e,P===0&&O(ls)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();D=Ie(),D!==e?(K=w,w=$l(v,D)):(a=w,w=e)}else a=w,w=e;for(w===e&&(w=null),t.charCodeAt(a)===44?(M=V,a++):(M=e,P===0&&O(pt)),M===e&&(M=null),F=[],D=f();D!==e;)F.push(D),D=f();if(D=Ie(),D!==e){if(B=[],Q=f(),Q!==e)for(;Q!==e;)B.push(Q),Q=f();else B=e;B!==e?(Q=Ae(),Q!==e?(K=s,s=bl(v,w,D,Q)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,P===0&&O(Ss)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,P===0&&O(Et)),u!==e)if(g=Ie(),g!==e)if(t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Ae(),w!==e?(K=s,s=Al(g,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,P===0&&O(Ss)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ie(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;g!==e?(v=Ae(),v!==e?(K=s,s=Cl(u,v)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e}}return R[Xe]={nextPos:a,result:s},s}function yo(){var s,o,p,u,g,v=a*77+21,b=R[v];if(b)return a=b.nextPos,b.result;if(s=a,t.substr(a,6)===Y?(o=Y,a+=6):(o=e,P===0&&O(ur)),o!==e)if(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();g=Ie(),g!==e?(K=s,s=_l(g)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[v]={nextPos:a,result:s},s}function wo(){var s,o,p,u,g,v,b,w,M=a*77+22,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,t.substr(a,4)===ue?(o=ue,a+=4):(o=e,P===0&&O(Si)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=S,a++):(u=e,P===0&&O(tt)),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();if(v=cr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();t.charCodeAt(a)===125?(w=T,a++):(w=e,P===0&&O(Ut)),w!==e?(K=s,s=kl(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function mo(){var s,o,p,u,g=a*77+23,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===de?(o=de,a+=5):(o=e,P===0&&O(Fi)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=Pl()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function br(){var s,o,p,u,g=a*77+24,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,8)===le?(o=le,a+=8):(o=e,P===0&&O(Oi)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=ia()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function Fa(){var s,o,p,u,g,v,b=a*77+25,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Ie(),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.substr(a,2)===Te?(u=Te,a+=2):(u=e,P===0&&O(Ni)),u===e&&(t.substr(a,2)===ze?(u=ze,a+=2):(u=e,P===0&&O(Xn)),u===e&&(t.charCodeAt(a)===61?(u=ge,a++):(u=e,P===0&&O(ls)))),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();v=Ie(),v!==e?(K=s,s=El(o,u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function xo(){var s,o,p,u,g,v,b,w,M=a*77+26,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=hs(),o!==e){for(p=[],u=a,g=[],v=Ar();v!==e;)g.push(v),v=Ar();if(v=_n(),v!==e){for(b=[],w=Ar();w!==e;)b.push(w),w=Ar();w=hs(),w!==e?(K=u,u=la(o,v,w)):(a=u,u=e)}else a=u,u=e;if(u!==e)for(;u!==e;){for(p.push(u),u=a,g=[],v=Ar();v!==e;)g.push(v),v=Ar();if(v=_n(),v!==e){for(b=[],w=Ar();w!==e;)b.push(w),w=Ar();w=hs(),w!==e?(K=u,u=la(o,v,w)):(a=u,u=e)}else a=u,u=e}else p=e;p!==e?(K=s,s=Ml(o,p)):(a=s,s=e)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Ar(){var s,o,p,u=a*77+27,g=R[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===92?(o=dt,a++):(o=e,P===0&&O(Gn)),o!==e?(p=ie(),p!==e?(o=[o,p],s=o):(a=s,s=e)):(a=s,s=e),s===e&&(s=y()),R[u]={nextPos:a,result:s},s)}function _n(){var s,o,p=a*77+28,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Ke?(o=Ke,a+=2):(o=e,P===0&&O(Ti)),o===e&&(t.substr(a,2)===ot?(o=ot,a+=2):(o=e,P===0&&O(Ii)),o===e&&(t.substr(a,2)===je?(o=je,a+=2):(o=e,P===0&&O(ji)),o===e&&(t.substr(a,2)===lt?(o=lt,a+=2):(o=e,P===0&&O(Ri)),o===e&&(t.substr(a,2)===Ft?(o=Ft,a+=2):(o=e,P===0&&O(Di)),o===e&&(t.substr(a,2)===Ot?(o=Ot,a+=2):(o=e,P===0&&O(Zn)),o===e&&(t.charCodeAt(a)===60?(o=Ye,a++):(o=e,P===0&&O(yn)),o===e&&(t.charCodeAt(a)===62?(o=Or,a++):(o=e,P===0&&O(Qn)),o===e&&(t.charCodeAt(a)===43?(o=Bt,a++):(o=e,P===0&&O(Li)),o===e&&(t.charCodeAt(a)===45?(o=wr,a++):(o=e,P===0&&O(Yn)),o===e&&(t.charCodeAt(a)===42?(o=Pt,a++):(o=e,P===0&&O(ea)),o===e&&(t.charCodeAt(a)===94?(o=yr,a++):(o=e,P===0&&O(Bi)),o===e&&(t.charCodeAt(a)===47?(o=Nr,a++):(o=e,P===0&&O(Hi)),o===e&&(t.charCodeAt(a)===37?(o=kr,a++):(o=e,P===0&&O(Ui))))))))))))))),o!==e&&(K=s,o=Sl()),s=o,R[p]={nextPos:a,result:s},s)}function $o(){var s,o,p,u=a*77+29,g=R[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===33?(o=Mr,a++):(o=e,P===0&&O(wn)),o!==e?(p=Ie(),p!==e?(K=s,s=Fl(p)):(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function Oa(){var s,o,p,u,g=a*77+30,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,o=Ea(),o!==e){if(p=[],u=kn(),u===e&&(u=Na(),u===e&&(u=Vs())),u!==e)for(;u!==e;)p.push(u),u=kn(),u===e&&(u=Na(),u===e&&(u=Vs()));else p=e;p!==e?(K=s,s=oa(o,p)):(a=s,s=e)}else a=s,s=e;return R[g]={nextPos:a,result:s},s}function kn(){var s,o,p,u,g,v,b=a*77+31,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===40?(o=A,a++):(o=e,P===0&&O(Et)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=bo(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e?(K=s,s=Ol(u)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function bo(){var s,o,p,u,g,v,b=a*77+32,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Ie(),o!==e){for(p=[],u=a,g=C(),g!==e?(v=Ie(),v!==e?(K=u,u=ua(o,v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=C(),g!==e?(v=Ie(),v!==e?(K=u,u=ua(o,v)):(a=u,u=e)):(a=u,u=e);K=s,s=Nl(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Na(){var s,o,p,u,g,v,b=a*77+33,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===91?(o=Nt,a++):(o=e,P===0&&O(us)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Ie(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,P===0&&O(os)),v!==e?(K=s,s=Tl(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Vs(){var s,o,p,u=a*77+34,g=R[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===46?(o=z,a++):(o=e,P===0&&O(mn)),o!==e?(p=qe(),p!==e?(K=s,s=Il(p)):(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function Ao(){var s,o,p,u,g,v,b,w,M,F,D=a*77+35,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===Z?(o=Z,a+=2):(o=e,P===0&&O(qi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ie(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=Ae(),v!==e){if(b=a,w=[],M=f(),M!==e)for(;M!==e;)w.push(M),M=f();else w=e;if(w!==e?(M=Co(),M!==e?b=M:(a=b,b=e)):(a=b,b=e),b===e&&(b=null),w=a,M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;M!==e?(F=_o(),F!==e?w=F:(a=w,w=e)):(a=w,w=e),w===e&&(w=null),K=s,s=jl(u,v,b,w)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Co(){var s,o,p,u,g,v,b=a*77+36,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Pn(),o!==e){for(p=[],u=a,g=[],v=f();v!==e;)g.push(v),v=f();for(v=Pn(),v!==e?u=v:(a=u,u=e);u!==e;){for(p.push(u),u=a,g=[],v=f();v!==e;)g.push(v),v=f();v=Pn(),v!==e?u=v:(a=u,u=e)}K=s,s=Rl(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Pn(){var s,o,p,u,g,v,b,w=a*77+37,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,t.substr(a,4)===se?(o=se,a+=4):(o=e,P===0&&O(zi)),o!==e)if(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();if(g=Ie(),g!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();b=Ae(),b!==e?(K=s,s=fa(g,b)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e;return R[w]={nextPos:a,result:s},s}function _o(){var s,o,p,u,g,v=a*77+38,b=R[v];if(b)return a=b.nextPos,b.result;if(s=a,t.substr(a,4)===ve?(o=ve,a+=4):(o=e,P===0&&O(Vi)),o!==e)if(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();g=Ae(),g!==e?(K=s,s=Dl(g)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[v]={nextPos:a,result:s},s}function Ta(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne,Xe,Ge,In=a*77+39,ps=R[In];if(ps)return a=ps.nextPos,ps.result;if(s=a,t.substr(a,5)===ye?(o=ye,a+=5):(o=e,P===0&&O(Fs)),o!==e)if(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();if(g=Ie(),g!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===123?(b=S,a++):(b=e,P===0&&O(tt)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();if(M=[],F=a,D=Ie(),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,P===0&&O(Os)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();K=F,F=ca(g,D,ne)}else a=F,F=e}else a=F,F=e}else a=F,F=e;if(F!==e)for(;F!==e;)if(M.push(F),F=a,D=Ie(),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,P===0&&O(Os)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();K=F,F=ca(g,D,ne)}else a=F,F=e}else a=F,F=e}else a=F,F=e;else M=e;if(M!==e){if(F=a,t.charCodeAt(a)===42?(D=Pt,a++):(D=e,P===0&&O(ea)),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,P===0&&O(Os)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();F=ne}else a=F,F=e}else a=F,F=e}else a=F,F=e;for(F===e&&(F=null),D=[],B=f();B!==e;)D.push(B),B=f();t.charCodeAt(a)===125?(B=T,a++):(B=e,P===0&&O(Ut)),B!==e?(K=s,s=Ll(g,M,F)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;else a=s,s=e;return R[In]={nextPos:a,result:s},s}function Ia(){var s,o,p,u,g,v,b,w,M=a*77+40,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,t.substr(a,4)===Ne?(o=Ne,a+=4):(o=e,P===0&&O(Ns)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=S,a++):(u=e,P===0&&O(tt)),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();if(v=cr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();t.charCodeAt(a)===125?(w=T,a++):(w=e,P===0&&O(Ut)),w!==e?(K=s,s=Bl(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function ja(){var s,o,p,u,g=a*77+41,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,6)===me?(o=me,a+=6):(o=e,P===0&&O(Wi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;p!==e?(u=Ra(),u!==e?(K=s,s=Hl(u)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;return R[g]={nextPos:a,result:s},s}function Ra(){var s,o,p=a*77+42,u=R[p];return u?(a=u.nextPos,u.result):(s=a,o=Va(),o!==e&&(K=s,o=ha(o)),s=o,R[p]={nextPos:a,result:s},s)}function Ws(){var s,o,p,u,g,v,b=a*77+43,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===96?(o=$e,a++):(o=e,P===0&&O(Ts)),o!==e){for(p=[],u=a,g=a,P++,t.charCodeAt(a)===96?(v=$e,a++):(v=e,P===0&&O(Ts)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=En(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,t.charCodeAt(a)===96?(v=$e,a++):(v=e,P===0&&O(Ts)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=En(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===96?(u=$e,a++):(u=e,P===0&&O(Ts)),u!==e?(K=s,s=Ul(p)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function En(){var s,o,p,u,g,v,b=a*77+44,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,P===0&&O(tt)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Ie(),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();t.charCodeAt(a)===125?(v=T,a++):(v=e,P===0&&O(Ut)),v!==e?s=u:(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,o=[],p=Mn(),p!==e)for(;p!==e;)o.push(p),p=Mn();else o=e;o!==e&&(K=s,o=pa(o)),s=o}return R[b]={nextPos:a,result:s},s}function Mn(){var s,o=a*77+45,p=R[o];return p?(a=p.nextPos,p.result):(s=Da(),s===e&&(Es.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,P===0&&O(Is))),R[o]={nextPos:a,result:s},s)}function Da(){var s,o,p,u=a*77+46,g=R[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===92?(o=dt,a++):(o=e,P===0&&O(Gn)),o!==e?(Jr.test(t.charAt(a))?(p=t.charAt(a),a++):(p=e,P===0&&O(js)),p!==e?s=p:(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function Sn(){var s,o,p,u,g,v,b=a*77+47,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===34?(o=he,a++):(o=e,P===0&&O(Rs)),o!==e){for(p=[],u=a,g=a,P++,t.charCodeAt(a)===34?(v=he,a++):(v=e,P===0&&O(Rs)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=La(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr))),v!==e?(K=u,u=va(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,t.charCodeAt(a)===34?(v=he,a++):(v=e,P===0&&O(Rs)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=La(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr))),v!==e?(K=u,u=va(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===34?(u=he,a++):(u=e,P===0&&O(Rs)),u!==e?(K=s,s=ql(p)):(a=s,s=e)}else a=s,s=e;if(s===e)if(s=a,t.charCodeAt(a)===39?(o=Le,a++):(o=e,P===0&&O(Ds)),o!==e){for(p=[],u=a,g=a,P++,t.charCodeAt(a)===39?(v=Le,a++):(v=e,P===0&&O(Ds)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Fn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr))),v!==e?(K=u,u=ga(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,t.charCodeAt(a)===39?(v=Le,a++):(v=e,P===0&&O(Ds)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Fn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr))),v!==e?(K=u,u=ga(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===39?(u=Le,a++):(u=e,P===0&&O(Ds)),u!==e?(K=s,s=zl(p)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function La(){var s,o,p=a*77+48,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Re?(o=Re,a+=2):(o=e,P===0&&O(Ls)),o!==e&&(K=s,o=Vl()),s=o,R[p]={nextPos:a,result:s},s)}function Fn(){var s,o,p=a*77+49,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===He?(o=He,a+=2):(o=e,P===0&&O(ta)),o!==e&&(K=s,o=Wl()),s=o,R[p]={nextPos:a,result:s},s)}function Ba(){var s,o=a*77+50,p=R[o];return p?(a=p.nextPos,p.result):(s=ko(),s===e&&(s=Ha()),R[o]={nextPos:a,result:s},s)}function ko(){var s,o,p,u,g,v,b=a*77+51,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,Tt.test(t.charAt(a))?(t.charAt(a),a++):P===0&&O(Mt),ht.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(ra)),o!==e){if(p=[],Rt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(ar)),u!==e)for(;u!==e;)p.push(u),Rt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(ar));else p=e;if(p!==e)if(t.charCodeAt(a)===46?(u=z,a++):(u=e,P===0&&O(mn)),u!==e){if(g=[],Rt.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,P===0&&O(ar)),v!==e)for(;v!==e;)g.push(v),Rt.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,P===0&&O(ar));else g=e;g!==e?(K=s,s=Kl()):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,Tt.test(t.charAt(a))?(t.charAt(a),a++):P===0&&O(Mt),Rt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(ar)),o!==e)if(t.charCodeAt(a)===46?(p=z,a++):(p=e,P===0&&O(mn)),p!==e){if(u=[],Rt.test(t.charAt(a))?(g=t.charAt(a),a++):(g=e,P===0&&O(ar)),g!==e)for(;g!==e;)u.push(g),Rt.test(t.charAt(a))?(g=t.charAt(a),a++):(g=e,P===0&&O(ar));else u=e;u!==e?(K=s,s=Jl()):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Ha(){var s,o,p,u,g=a*77+52,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,Tt.test(t.charAt(a))?(t.charAt(a),a++):P===0&&O(Mt),ht.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(ra)),o!==e){if(p=[],Rt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(ar)),u!==e)for(;u!==e;)p.push(u),Rt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(ar));else p=e;p!==e?(K=s,s=Xl()):(a=s,s=e)}else a=s,s=e;return s===e&&(s=a,Tt.test(t.charAt(a))?(t.charAt(a),a++):P===0&&O(Mt),Rt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(ar)),o!==e?(K=s,s=Gl()):(a=s,s=e)),R[g]={nextPos:a,result:s},s}function Ua(){var s,o=a*77+53,p=R[o];return p?(a=p.nextPos,p.result):(s=Po(),s===e&&(s=On()),R[o]={nextPos:a,result:s},s)}function Po(){var s,o,p,u,g=a*77+54,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===We?(o=We,a+=4):(o=e,P===0&&O(Ki)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=da()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function On(){var s,o,p,u,g=a*77+55,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===Ze?(o=Ze,a+=5):(o=e,P===0&&O(Bs)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=Zl()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function Nn(){var s,o,p,u,g=a*77+56,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===nt?(o=nt,a+=4):(o=e,P===0&&O(Ji)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=ya()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function qa(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne=a*77+57,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,P===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,P===0&&O(wt)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=Ie(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,P===0&&O(pt)),B===e&&(t.charCodeAt(a)===59?(B=at,a++):(B=e,P===0&&O(fs))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=g,g=wa(v,F)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,P===0&&O(wt)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=Ie(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,P===0&&O(pt)),B===e&&(t.charCodeAt(a)===59?(B=at,a++):(B=e,P===0&&O(fs))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=g,g=wa(v,F)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;t.charCodeAt(a)===125?(g=T,a++):(g=e,P===0&&O(Ut)),g!==e?(K=s,s=Ql(u)):(a=s,s=e)}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Eo(){var s,o,p,u,g,v,b,w,M,F,D=a*77+58,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.charCodeAt(a)===91?(o=Nt,a++):(o=e,P===0&&O(us)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=Ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=g,g=ma(v)}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=Ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=g,g=ma(v)}else a=g,g=e;for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,P===0&&O(os)),v!==e?(K=s,s=Yl(u)):(a=s,s=e)}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Tn(){var s,o,p,u,g,v,b,w=a*77+59,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,o=qe(),o!==e){for(p=a,u=[],g=f();g!==e;)u.push(g),g=f();if(t.charCodeAt(a)===58?(g=re,a++):(g=e,P===0&&O(wt)),g!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();b=Ue(),b!==e?p=b:(a=p,p=e)}else a=p,p=e;p===e&&(p=null),K=s,s=eo(o,p)}else a=s,s=e;return R[w]={nextPos:a,result:s},s}function za(){var s,o,p,u,g,v,b=a*77+60,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Tn(),o!==e){for(p=[],u=a,g=C(),g!==e?(v=Tn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=C(),g!==e?(v=Tn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);K=s,s=xa(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function zt(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne,Xe,Ge,In=a*77+61,ps=R[In];if(ps)return a=ps.nextPos,ps.result;if(s=a,t.charCodeAt(a)===64?(o=mt,a++):(o=e,P===0&&O(Xi)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=qe(),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();if(t.charCodeAt(a)===40?(v=A,a++):(v=e,P===0&&O(Et)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(w=za(),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();if(t.charCodeAt(a)===41?(F=_,a++):(F=e,P===0&&O(xr)),F!==e){for(D=a,B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.charCodeAt(a)===58?(Q=re,a++):(Q=e,P===0&&O(wt)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();ne=Ue(),ne!==e?D=ne:(a=D,D=e)}else a=D,D=e;for(D===e&&(D=null),B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.charCodeAt(a)===123?(Q=S,a++):(Q=e,P===0&&O(tt)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();for(ne=cr(),ne===e&&(ne=null),Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();t.charCodeAt(a)===125?(Ge=T,a++):(Ge=e,P===0&&O(Ut)),Ge!==e?(K=s,s=to(p,u,g,w,D,ne)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[In]={nextPos:a,result:s},s}function Mo(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe=a*77+62,ne=R[xe];if(ne)return a=ne.nextPos,ne.result;if(s=a,t.substr(a,2)===Ht?(o=Ht,a+=2):(o=e,P===0&&O(xn)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=za(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();if(t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e){for(b=a,w=[],M=f();M!==e;)w.push(M),M=f();if(t.charCodeAt(a)===58?(M=re,a++):(M=e,P===0&&O(wt)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();D=Ue(),D!==e?b=D:(a=b,b=e)}else a=b,b=e;for(b===e&&(b=null),w=[],M=f();M!==e;)w.push(M),M=f();if(t.charCodeAt(a)===123?(M=S,a++):(M=e,P===0&&O(tt)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();for(D=cr(),D===e&&(D=null),B=[],Q=f();Q!==e;)B.push(Q),Q=f();t.charCodeAt(a)===125?(Q=T,a++):(Q=e,P===0&&O(Ut)),Q!==e?(K=s,s=$a(u,b,D)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[xe]={nextPos:a,result:s},s}function So(){var s,o,p,u,g,v,b,w,M,F,D=a*77+63,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.charCodeAt(a)===91?(o=Nt,a++):(o=e,P===0&&O(us)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=$r(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=g,g=ba(v)}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=$r(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=g,g=ba(v)}else a=g,g=e;for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,P===0&&O(os)),v!==e?(K=s,s=ro(u)):(a=s,s=e)}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Fo(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne=a*77+64,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,P===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,P===0&&O(wt)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=$r(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,P===0&&O(pt)),B===e&&(t.charCodeAt(a)===59?(B=at,a++):(B=e,P===0&&O(fs))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=g,g=Aa(v,F)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,P===0&&O(wt)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=$r(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,P===0&&O(pt)),B===e&&(t.charCodeAt(a)===59?(B=at,a++):(B=e,P===0&&O(fs))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=g,g=Aa(v,F)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;t.charCodeAt(a)===125?(g=T,a++):(g=e,P===0&&O(Ut)),g!==e?(K=s,s=so(u)):(a=s,s=e)}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Ue(){var s,o=a*77+65,p=R[o];return p?(a=p.nextPos,p.result):(s=Oo(),s===e&&(s=jt()),R[o]={nextPos:a,result:s},s)}function Oo(){var s,o,p,u,g,v,b,w,M,F,D=a*77+66,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===Ht?(o=Ht,a+=2):(o=e,P===0&&O(xn)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Br(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();if(t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.substr(a,2)===oe?(w=oe,a+=2):(w=e,P===0&&O(Os)),w!==e){for(M=[],F=f();F!==e;)M.push(F),F=f();F=Ue(),F!==e?(K=s,s=no(u,F)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Br(){var s,o,p,u,g,v,b=a*77+67,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Ue(),o!==e){for(p=[],u=a,g=C(),g!==e?(v=Ue(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=C(),g!==e?(v=Ue(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);K=s,s=ao(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function jt(){var s,o,p,u,g,v,b,w,M=a*77+68,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=qe(),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(t.charCodeAt(a)===60?(u=Ye,a++):(u=e,P===0&&O(yn)),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();if(v=Ue(),v!==e){for(b=[],w=y();w!==e;)b.push(w),w=y();t.charCodeAt(a)===62?(w=Or,a++):(w=e,P===0&&O(Qn)),w!==e?(K=s,s=io(o,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return s===e&&(s=a,o=qe(),o!==e&&(K=s,o=lo(o)),s=o),R[M]={nextPos:a,result:s},s}function qe(){var s,o,p,u,g=a*77+69,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,Kn.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(Gi)),o!==e){for(p=[],Jn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(sa));u!==e;)p.push(u),Jn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(sa));K=s,s=i()}else a=s,s=e;return R[g]={nextPos:a,result:s},s}function Va(){var s,o,p,u,g,v,b=a*77+70,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=qe(),o!==e){for(p=[],u=a,t.charCodeAt(a)===58?(g=re,a++):(g=e,P===0&&O(wt)),g!==e?(v=qe(),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,t.charCodeAt(a)===58?(g=re,a++):(g=e,P===0&&O(wt)),g!==e?(v=qe(),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);K=s,s=X()}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function C(){var s,o,p,u,g,v=a*77+71,b=R[v];if(b)return a=b.nextPos,b.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();if(t.charCodeAt(a)===44?(p=V,a++):(p=e,P===0&&O(pt)),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();o=[o,p,u],s=o}else a=s,s=e;if(s===e)if(s=[],o=f(),o!==e)for(;o!==e;)s.push(o),o=f();else s=e;return R[v]={nextPos:a,result:s},s}function Ae(){var s,o,p,u,g,v,b=a*77+72,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,P===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=cr(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===125?(v=T,a++):(v=e,P===0&&O(Ut)),v!==e?(K=s,s=Hs(u)):(a=s,s=e)}else a=s,s=e;return s===e&&(s=Lr()),R[b]={nextPos:a,result:s},s}function ie(){var s,o=a*77+73,p=R[o];return p?(a=p.nextPos,p.result):(t.substr(a,2)===bt?(s=bt,a+=2):(s=e,P===0&&O(Zi)),s===e&&(_i.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,P===0&&O(Qi))),R[o]={nextPos:a,result:s},s)}function l(){var s,o,p=a*77+74,u=R[p];return u?(a=u.nextPos,u.result):(s=a,P++,t.length>a?(o=t.charAt(a),a++):(o=e,P===0&&O(sr)),P--,o===e?s=void 0:(a=s,s=e),s===e&&(s=ie()),R[p]={nextPos:a,result:s},s)}function f(){var s,o=a*77+75,p=R[o];return p?(a=p.nextPos,p.result):(ki.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,P===0&&O(Yi)),R[o]={nextPos:a,result:s},s)}function y(){var s,o=a*77+76,p=R[o];return p?(a=p.nextPos,p.result):(rr.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,P===0&&O(el)),R[o]={nextPos:a,result:s},s)}function h(s,o,p){const u={type:s};o.children=p;for(const v of Object.keys(o))o[v]!==void 0&&(u[v]=o[v]);const g=qt();return u.loc={start:g.start.offset,end:g.end.offset-1},u}if(Us=d(),Us!==e&&a===t.length)return Us;throw Us!==e&&a`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>jf(n)).join(", "),e=jf(t.result);return`@(${r}) { ${e} }`}}}function Mu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return qv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Mu(t.inner):r=qv("any"),y$(t.name,[r])}}throw new nu(`Unknown type: '${jf(t)}'`)}else{const r=t.args.map(e=>Mu(e));return w$(r,Mu(t.result))}}function m$(t){switch(t.type){case"def":{t.varType!=null&&Mu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Mu(r.argType);t.retType!=null&&Mu(t.retType);break}}return t}function x$(t){for(const r of t)rt(r,m$);return t}function Rf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=Rf(n.expr.children)),r.push(n);else{if(e.length>0)throw new nu("invalid attribute.");switch(n.type){case"fn":{n.children=Rf(n.children);break}case"block":{n.statements=Rf(n.statements);break}}r.push(n)}if(e.length>0)throw new nu("invalid attribute.");return r}function $$(t){if(c$(t)&&wd(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const c of r)switch(c.type){case"callChain":{n=h$(n,c.args,c.loc);break}case"indexChain":{n=p$(n,c.index,c.loc);break}case"propChain":{n=v$(n,c.name,c.loc);break}}return n}return t}function b$(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:Uo(t.left),right:Uo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:Uo(t.left),right:Uo(t.right)}),priority:3}};function C$(t){const r=t.operators.map(n=>{const c=A$[n];if(c==null)throw new nu(`No such operator: ${n}.`);return c});let e=Df(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?C$(e):e);return t}var Ja;let k$=(Ja=class{constructor(){be(this,"plugins");this.plugins={validate:[d$,x$],transform:[Rf,b$,_$]}}static parse(r){return Ja.instance==null&&(Ja.instance=new Ja),Ja.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=Uv(r,{startRule:"Preprocess"});e=Uv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new nu(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`,n):new nu(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`,n):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}},be(Ja,"instance"),Ja);const P$="develop",E$={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { - <: if (i % 15 == 0) "FizzBuzz" - elif (i % 3 == 0) "Fizz" - elif (i % 5 == 0) "Buzz" - else i - }`};let kh=[],Ju=null;function M$(t){return kh=k$.parse(t),JSON.stringify(kh,null," ")}async function S$(t){Ju==null||Ju.abort(),Ju=new as({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:bh(r,!0),print:!0})},err:t.err,log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:bh(e.val,!0),print:!1});break}}});try{await Ju.exec(kh)}catch(r){t.err(r)}}const F$=Object.freeze(Object.defineProperty({__proto__:null,exec:S$,parse:M$,samples:E$,version:P$},Symbol.toStringTag,{value:"Module"}));function dr(t,r,e){let n=e.value;return{configurable:!0,get(){const c=n.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:c}),c},set(c){n=c}}}let Cc=class xd extends Error{constructor(e,n){super(e);be(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,xd)}};class O$ extends Cc{constructor(r){super(`Internal Error. ${r}`,r)}}class au extends Cc{constructor(r,e){super(r,e)}}class Gt extends Cc{constructor(r,e){super(r,e)}}class N$ extends Gt{constructor(r,e){super(r,e)}}var Ai=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,d=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};let ti=class $d{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new $d(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r).value;return this.log("read",{var:r,val:n}),n}throw new Gt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new Gt(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){const d=c.get(r);if(!d.isMutable)throw new Gt(`Cannot assign to an immutable variable ${r}.`);d.value=e,this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new Gt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};Ai([dr],ti.prototype,"log",null);Ai([dr],ti.prototype,"onUpdated",null);Ai([dr],ti.prototype,"createChildScope",null);Ai([dr],ti.prototype,"get",null);Ai([dr],ti.prototype,"exists",null);Ai([dr],ti.prototype,"getAll",null);Ai([dr],ti.prototype,"add",null);Ai([dr],ti.prototype,"assign",null);let Ef;const T$=new Uint8Array(16);function I$(){if(!Ef&&(Ef=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ef))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ef(T$)}const qr=[];for(let t=0;t<256;++t)qr.push((t+256).toString(16).slice(1));function j$(t,r=0){return qr[t[r+0]]+qr[t[r+1]]+qr[t[r+2]]+qr[t[r+3]]+"-"+qr[t[r+4]]+qr[t[r+5]]+"-"+qr[t[r+6]]+qr[t[r+7]]+"-"+qr[t[r+8]]+qr[t[r+9]]+"-"+qr[t[r+10]]+qr[t[r+11]]+qr[t[r+12]]+qr[t[r+13]]+qr[t[r+14]]+qr[t[r+15]]}const R$=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zv={randomUUID:R$};function D$(t,r,e){if(zv.randomUUID&&!r&&!t)return zv.randomUUID();t=t||{};const n=t.random||(t.rng||I$)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return j$(n)}var Pp={exports:{}};Pp.exports;(function(t){(function(r,e,n){function c(m){var A=this,_=x();A.next=function(){var k=2091639*A.s0+A.c*23283064365386963e-26;return A.s0=A.s1,A.s1=A.s2,A.s2=k-(A.c=k|0)},A.c=1,A.s0=_(" "),A.s1=_(" "),A.s2=_(" "),A.s0-=_(m),A.s0<0&&(A.s0+=1),A.s1-=_(m),A.s1<0&&(A.s1+=1),A.s2-=_(m),A.s2<0&&(A.s2+=1),_=null}function d(m,A){return A.c=m.c,A.s0=m.s0,A.s1=m.s1,A.s2=m.s2,A}function $(m,A){var _=new c(m),k=A&&A.state,S=_.next;return S.int32=function(){return _.next()*4294967296|0},S.double=function(){return S()+(S()*2097152|0)*11102230246251565e-32},S.quick=S,k&&(typeof k=="object"&&d(k,_),S.state=function(){return d(_,{})}),S}function x(){var m=4022871197,A=function(_){_=String(_);for(var k=0;k<_.length;k++){m+=_.charCodeAt(k);var S=.02519603282416938*m;m=S>>>0,S-=m,S*=m,m=S>>>0,S-=m,m+=S*4294967296}return(m>>>0)*23283064365386963e-26};return A}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.alea=$})(St,t,!1)})(Pp);var L$=Pp.exports,Ep={exports:{}};Ep.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.x=0,m.y=0,m.z=0,m.w=0,m.next=function(){var k=m.x^m.x<<11;return m.x=m.y,m.y=m.z,m.z=m.w,m.w^=m.w>>>19^k^k>>>8},x===(x|0)?m.x=x:A+=x;for(var _=0;_>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(typeof _=="object"&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor128=$})(St,t,!1)})(Ep);var B$=Ep.exports,Mp={exports:{}};Mp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var k=m.x^m.x>>>2;return m.x=m.y,m.y=m.z,m.z=m.w,m.w=m.v,(m.d=m.d+362437|0)+(m.v=m.v^m.v<<4^(k^k<<1))|0},m.x=0,m.y=0,m.z=0,m.w=0,m.v=0,x===(x|0)?m.x=x:A+=x;for(var _=0;_>>4),m.next()}function d(x,m){return m.x=x.x,m.y=x.y,m.z=x.z,m.w=x.w,m.v=x.v,m.d=x.d,m}function $(x,m){var A=new c(x),_=m&&m.state,k=function(){return(A.next()>>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(typeof _=="object"&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorwow=$})(St,t,!1)})(Mp);var H$=Mp.exports,Sp={exports:{}};Sp.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var _=m.x,k=m.i,S,T;return S=_[k],S^=S>>>7,T=S^S<<24,S=_[k+1&7],T^=S^S>>>10,S=_[k+3&7],T^=S^S>>>3,S=_[k+4&7],T^=S^S<<7,S=_[k+7&7],S=S^S<<13,T^=S^S<<9,_[k]=T,m.i=k+1&7,T};function A(_,k){var S,T=[];if(k===(k|0))T[0]=k;else for(k=""+k,S=0;S0;--S)_.next()}A(m,x)}function d(x,m){return m.x=x.x.slice(),m.i=x.i,m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),_=m&&m.state,k=function(){return(A.next()>>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(_.x&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorshift7=$})(St,t,!1)})(Sp);var U$=Sp.exports,Fp={exports:{}};Fp.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var _=m.w,k=m.X,S=m.i,T,G;return m.w=_=_+1640531527|0,G=k[S+34&127],T=k[S=S+1&127],G^=G<<13,T^=T<<17,G^=G>>>15,T^=T>>>12,G=k[S]=G^T,m.i=S,G+(_^_>>>16)|0};function A(_,k){var S,T,G,ee,re,ge=[],q=128;for(k===(k|0)?(T=k,k=null):(k=k+"\0",T=0,q=Math.max(q,k.length)),G=0,ee=-32;ee>>15,T^=T<<4,T^=T>>>13,ee>=0&&(re=re+1640531527|0,S=ge[ee&127]^=T+re,G=S==0?G+1:0);for(G>=128&&(ge[(k&&k.length||0)&127]=-1),G=127,ee=4*128;ee>0;--ee)T=ge[G+34&127],S=ge[G=G+1&127],T^=T<<13,S^=S<<17,T^=T>>>15,S^=S>>>12,ge[G]=T^S;_.w=re,_.X=ge,_.i=G}A(m,x)}function d(x,m){return m.i=x.i,m.w=x.w,m.X=x.X.slice(),m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),_=m&&m.state,k=function(){return(A.next()>>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(_.X&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor4096=$})(St,t,!1)})(Fp);var q$=Fp.exports,Op={exports:{}};Op.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var k=m.b,S=m.c,T=m.d,G=m.a;return k=k<<25^k>>>7^S,S=S-T|0,T=T<<24^T>>>8^G,G=G-k|0,m.b=k=k<<20^k>>>12^S,m.c=S=S-T|0,m.d=T<<16^S>>>16^G,m.a=G-k|0},m.a=0,m.b=0,m.c=-1640531527,m.d=1367130551,x===Math.floor(x)?(m.a=x/4294967296|0,m.b=x|0):A+=x;for(var _=0;_>>0)/4294967296};return k.double=function(){do var S=A.next()>>>11,T=(A.next()>>>0)/4294967296,G=(S+T)/(1<<21);while(G===0);return G},k.int32=A.next,k.quick=k,_&&(typeof _=="object"&&d(_,A),k.state=function(){return d(A,{})}),k}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.tychei=$})(St,t,!1)})(Op);var z$=Op.exports,bd={exports:{}};(function(t){(function(r,e,n){var c=256,d=6,$=52,x="random",m=n.pow(c,d),A=n.pow(2,$),_=A*2,k=c-1,S;function T(L,H,W){var V=[];H=H==!0?{entropy:!0}:H||{};var J=ge(re(H.entropy?[L,U(e)]:L??q(),3),V),Y=new G(V),ue=function(){for(var de=Y.g(d),le=m,Te=0;de=_;)de/=2,le/=2,Te>>>=1;return(de+Te)/le};return ue.int32=function(){return Y.g(4)|0},ue.quick=function(){return Y.g(4)/4294967296},ue.double=ue,ge(U(Y.S),e),(H.pass||W||function(de,le,Te,ze){return ze&&(ze.S&&ee(ze,Y),de.state=function(){return ee(Y,{})}),Te?(n[x]=de,le):de})(ue,J,"global"in H?H.global:this==n,H.state)}function G(L){var H,W=L.length,V=this,J=0,Y=V.i=V.j=0,ue=V.S=[];for(W||(L=[W++]);J({type:"num",value:t}),Kt=t=>({type:"str",value:t}),Qo=t=>({type:"bool",value:t}),Tp=t=>({type:"obj",value:t}),Zr=t=>({type:"arr",value:t}),Y$=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),pe=t=>({type:"fn",native:t}),eb=t=>({type:"return",value:t}),tb=()=>({type:"break",value:null}),rb=()=>({type:"continue",value:null}),sb=t=>t.type==="return"?t.value:t,Ad=(t,r)=>({type:"error",value:t,info:r});function tn(t){if(t==null)throw new Gt("Expect anything, but got nothing.")}function ys(t){if(t==null)throw new Gt("Expect boolean, but got nothing.");if(t.type!=="bool")throw new Gt(`Expect boolean, but got ${t.type}.`)}function pi(t){if(t==null)throw new Gt("Expect function, but got nothing.");if(t.type!=="fn")throw new Gt(`Expect function, but got ${t.type}.`)}function Pr(t){if(t==null)throw new Gt("Expect string, but got nothing.");if(t.type!=="str")throw new Gt(`Expect string, but got ${t.type}.`)}function ke(t){if(t==null)throw new Gt("Expect number, but got nothing.");if(t.type!=="num")throw new Gt(`Expect number, but got ${t.type}.`)}function ii(t){if(t==null)throw new Gt("Expect object, but got nothing.");if(t.type!=="obj")throw new Gt(`Expect object, but got ${t.type}.`)}function ic(t){if(t==null)throw new Gt("Expect array, but got nothing.");if(t.type!=="arr")throw new Gt(`Expect array, but got ${t.type}.`)}function qc(t){return t.type==="obj"}function Vv(t){return t.type==="arr"}function Ph(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function Eh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>Eh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Mh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Mh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=Mh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Sh(t){if(t===null)return _t;if(typeof t=="boolean")return Qo(t);if(typeof t=="string")return Kt(t);if(typeof t=="number")return Fe(t);if(Array.isArray(t))return Zr(t.map(r=>Sh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,Sh(n));return Tp(r)}return _t}function Su(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const n=[];for(const c of t.value)n.push(Su(c,!0,e));return"[ "+n.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const n=[];for(const[c,d]of t.value)n.push(`${c}: ${Su(d,!0,e)}`);return"{ "+n.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const nb={help:Kt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Kt("0.16.0"),"Core:ai":Kt("kawaii"),"Core:not":pe(([t])=>(ys(t),t.value?Gs:fn)),"Core:eq":pe(([t,r])=>(tn(t),tn(r),Ph(t,r)?fn:Gs)),"Core:neq":pe(([t,r])=>(tn(t),tn(r),Ph(t,r)?Gs:fn)),"Core:and":pe(([t,r])=>(ys(t),t.value?(ys(r),r.value?fn:Gs):Gs)),"Core:or":pe(([t,r])=>(ys(t),t.value?fn:(ys(r),r.value?fn:Gs))),"Core:add":pe(([t,r])=>(ke(t),ke(r),Fe(t.value+r.value))),"Core:sub":pe(([t,r])=>(ke(t),ke(r),Fe(t.value-r.value))),"Core:mul":pe(([t,r])=>(ke(t),ke(r),Fe(t.value*r.value))),"Core:pow":pe(([t,r])=>{ke(t),ke(r);const e=t.value**r.value;if(isNaN(e))throw new Gt("Invalid operation.");return Fe(e)}),"Core:div":pe(([t,r])=>{ke(t),ke(r);const e=t.value/r.value;if(isNaN(e))throw new Gt("Invalid operation.");return Fe(e)}),"Core:mod":pe(([t,r])=>(ke(t),ke(r),Fe(t.value%r.value))),"Core:gt":pe(([t,r])=>(ke(t),ke(r),t.value>r.value?fn:Gs)),"Core:lt":pe(([t,r])=>(ke(t),ke(r),t.value(ke(t),ke(r),t.value>=r.value?fn:Gs)),"Core:lteq":pe(([t,r])=>(ke(t),ke(r),t.value<=r.value?fn:Gs)),"Core:type":pe(([t])=>(tn(t),Kt(t.type))),"Core:to_str":pe(([t])=>(tn(t),Kt(Su(t)))),"Core:range":pe(([t,r])=>(ke(t),ke(r),t.valueFe(n+t.value))):t.value>r.value?Zr(Array.from({length:t.value-r.value+1},(e,n)=>Fe(t.value-n))):Zr([t]))),"Core:sleep":pe(async([t])=>(ke(t),await new Promise(r=>setTimeout(r,t.value)),_t)),"Util:uuid":pe(()=>Kt(D$())),"Json:stringify":pe(([t])=>(tn(t),Kt(JSON.stringify(Mh(t))))),"Json:parse":pe(([t])=>{Pr(t);try{return Sh(JSON.parse(t.value))}catch{return Ad("not_json")}}),"Json:parsable":pe(([t])=>{Pr(t);try{JSON.parse(t.value)}catch{return Qo(!1)}return Qo(!0)}),"Date:now":pe(()=>Fe(Date.now())),"Date:year":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":pe(([t])=>(Pr(t),Fe(new Date(t.value).getTime()))),"Math:Infinity":Fe(1/0),"Math:E":Fe(Math.E),"Math:LN2":Fe(Math.LN2),"Math:LN10":Fe(Math.LN10),"Math:LOG2E":Fe(Math.LOG2E),"Math:LOG10E":Fe(Math.LOG10E),"Math:PI":Fe(Math.PI),"Math:SQRT1_2":Fe(Math.SQRT1_2),"Math:SQRT2":Fe(Math.SQRT2),"Math:abs":pe(([t])=>(ke(t),Fe(Math.abs(t.value)))),"Math:acos":pe(([t])=>(ke(t),Fe(Math.acos(t.value)))),"Math:acosh":pe(([t])=>(ke(t),Fe(Math.acosh(t.value)))),"Math:asin":pe(([t])=>(ke(t),Fe(Math.asin(t.value)))),"Math:asinh":pe(([t])=>(ke(t),Fe(Math.asinh(t.value)))),"Math:atan":pe(([t])=>(ke(t),Fe(Math.atan(t.value)))),"Math:atanh":pe(([t])=>(ke(t),Fe(Math.atanh(t.value)))),"Math:atan2":pe(([t,r])=>(ke(t),ke(r),Fe(Math.atan2(t.value,r.value)))),"Math:cbrt":pe(([t])=>(ke(t),Fe(Math.cbrt(t.value)))),"Math:ceil":pe(([t])=>(ke(t),Fe(Math.ceil(t.value)))),"Math:clz32":pe(([t])=>(ke(t),Fe(Math.clz32(t.value)))),"Math:cos":pe(([t])=>(ke(t),Fe(Math.cos(t.value)))),"Math:cosh":pe(([t])=>(ke(t),Fe(Math.cosh(t.value)))),"Math:exp":pe(([t])=>(ke(t),Fe(Math.exp(t.value)))),"Math:expm1":pe(([t])=>(ke(t),Fe(Math.expm1(t.value)))),"Math:floor":pe(([t])=>(ke(t),Fe(Math.floor(t.value)))),"Math:fround":pe(([t])=>(ke(t),Fe(Math.fround(t.value)))),"Math:hypot":pe(([t])=>{ic(t);const r=[];for(const e of t.value)ke(e),r.push(e.value);return Fe(Math.hypot(...r))}),"Math:imul":pe(([t,r])=>(ke(t),ke(r),Fe(Math.imul(t.value,r.value)))),"Math:log":pe(([t])=>(ke(t),Fe(Math.log(t.value)))),"Math:log1p":pe(([t])=>(ke(t),Fe(Math.log1p(t.value)))),"Math:log10":pe(([t])=>(ke(t),Fe(Math.log10(t.value)))),"Math:log2":pe(([t])=>(ke(t),Fe(Math.log2(t.value)))),"Math:max":pe(([t,r])=>(ke(t),ke(r),Fe(Math.max(t.value,r.value)))),"Math:min":pe(([t,r])=>(ke(t),ke(r),Fe(Math.min(t.value,r.value)))),"Math:pow":pe(([t,r])=>(ke(t),ke(r),Fe(Math.pow(t.value,r.value)))),"Math:round":pe(([t])=>(ke(t),Fe(Math.round(t.value)))),"Math:sign":pe(([t])=>(ke(t),Fe(Math.sign(t.value)))),"Math:sin":pe(([t])=>(ke(t),Fe(Math.sin(t.value)))),"Math:sinh":pe(([t])=>(ke(t),Fe(Math.sinh(t.value)))),"Math:sqrt":pe(([t])=>{ke(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new Gt("Invalid operation.");return Fe(r)}),"Math:tan":pe(([t])=>(ke(t),Fe(Math.tan(t.value)))),"Math:tanh":pe(([t])=>(ke(t),Fe(Math.tanh(t.value)))),"Math:trunc":pe(([t])=>(ke(t),Fe(Math.trunc(t.value)))),"Math:rnd":pe(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Fe(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Fe(Math.random())),"Math:gen_rng":pe(([t])=>{if(tn(t),t.type!=="num"&&t.type!=="str")return _t;const r=Np(t.value.toString());return pe(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Fe(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Fe(r()))}),"Num:to_hex":pe(([t])=>(ke(t),Kt(t.value.toString(16)))),"Num:from_hex":pe(([t])=>(Pr(t),Fe(parseInt(t.value,16)))),"Str:lf":Kt(` -`),"Str:lt":pe(([t,r])=>(Pr(t),Pr(r),t.value(Pr(t),Pr(r),t.value>r.value?Fe(-1):t.value===r.value?Fe(0):Fe(1))),"Str:from_codepoint":pe(([t])=>(ke(t),Kt(String.fromCodePoint(t.value)))),"Obj:keys":pe(([t])=>(ii(t),Zr(Array.from(t.value.keys()).map(r=>Kt(r))))),"Obj:vals":pe(([t])=>(ii(t),Zr(Array.from(t.value.values())))),"Obj:kvs":pe(([t])=>(ii(t),Zr(Array.from(t.value.entries()).map(([r,e])=>Zr([Kt(r),e]))))),"Obj:get":pe(([t,r])=>(ii(t),Pr(r),t.value.get(r.value)??_t)),"Obj:set":pe(([t,r,e])=>(ii(t),Pr(r),tn(e),t.value.set(r.value,e),_t)),"Obj:has":pe(([t,r])=>(ii(t),Pr(r),Qo(t.value.has(r.value)))),"Obj:copy":pe(([t])=>(ii(t),Tp(new Map(t.value)))),"Async:interval":pe(async([t,r,e],n)=>{ke(t),pi(r),e&&(ys(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.topCall(r,[])},t.value),d=()=>{clearInterval(c)};return n.registerAbortHandler(d),pe(([],$)=>{clearInterval(c),$.unregisterAbortHandler(d)})}),"Async:timeout":pe(async([t,r],e)=>{ke(t),pi(r);const n=setTimeout(()=>{e.topCall(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),pe(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(c)})})};var pu={},ab=()=>{const t="\\ud800-\\udfff",r="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",c="\\u1ab0-\\u1aff",d="\\u1dc0-\\u1dff",$=r+e+n+c+d,x="\\ufe0e\\ufe0f",m="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",A=`[${t}]`,_=`[${$}]`,k="\\ud83c[\\udffb-\\udfff]",S=`(?:${_}|${k})`,T=`[^${t}]`,G="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",ee="[\\ud800-\\udbff][\\udc00-\\udfff]",re="\\u200d",ge="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",q=`[${m}]`,U=`${S}?`,L=`[${x}]?`,H=`(?:${re}(?:${[T,G,ee].join("|")})${L+U})*`,W=L+U+H,J=`(?:${[`${T}${_}?`,_,G,ee,A,q].join("|")})`;return new RegExp(`${ge}|${k}(?=${k})|${J+W}`,"g")},ib=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pu,"__esModule",{value:!0});var _c=ib(ab);function Fh(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match(_c.default())||[]}var Uu=pu.toArray=Fh;function Ip(t){if(typeof t!="string")throw new Error("Input must be a string");var r=t.match(_c.default());return r===null?0:r.length}var jp=pu.length=Ip;function Cd(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");(typeof r!="number"||r<0)&&(r=0),typeof e=="number"&&e<0&&(e=0);var n=t.match(_c.default());return n?n.slice(r,e).join(""):""}var Rp=pu.substring=Cd;function lb(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");var n=Ip(t);if(typeof r!="number"&&(r=parseInt(r,10)),r>=n)return"";r<0&&(r+=n);var c;typeof e>"u"?c=n:(typeof e!="number"&&(e=parseInt(e,10)),c=e>=0?e+r:r);var d=t.match(_c.default());return d?d.slice(r,c).join(""):""}pu.substr=lb;function ob(t,r,e,n){if(r===void 0&&(r=16),e===void 0&&(e="#"),n===void 0&&(n="right"),typeof t!="string"||typeof r!="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 e!="string"&&(e=String(e));var c=Ip(t);if(c>r)return Cd(t,0,r);if(c=n.length)return r===""?n.length:-1;if(r==="")return e;var c=Fh(r),d=!1,$;for($=e;$pe(async(r,e)=>Kt(t.value.toString()))},str:{to_num:t=>pe(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?_t:Fe(n)}),len:t=>Fe(jp(t.value)),replace:t=>pe(async([r,e],n)=>(Pr(r),Pr(e),Kt(t.value.split(r.value).join(e.value)))),index_of:t=>pe(async([r],e)=>(Pr(r),Fe(Dp(t.value,r.value)))),incl:t=>pe(async([r],e)=>(Pr(r),t.value.includes(r.value)?fn:Gs)),trim:t=>pe(async(r,e)=>Kt(t.value.trim())),upper:t=>pe(async(r,e)=>Kt(t.value.toUpperCase())),lower:t=>pe(async(r,e)=>Kt(t.value.toLowerCase())),split:t=>pe(async([r],e)=>(r&&Pr(r),Zr(r?t.value.split(r?r.value:"").map(n=>Kt(n)):Uu(t.value).map(n=>Kt(n))))),slice:t=>pe(async([r,e],n)=>(ke(r),ke(e),Kt(Rp(t.value,r.value,e.value)))),pick:t=>pe(async([r],e)=>{ke(r);const c=Uu(t.value)[r.value];return c?Kt(c):_t}),codepoint_at:t=>pe(([r],e)=>{ke(r);const n=t.value.charCodeAt(r.value);return Number.isNaN(n)?_t:Fe(n)})},arr:{len:t=>Fe(t.value.length),push:t=>pe(async([r],e)=>(tn(r),t.value.push(r),t)),unshift:t=>pe(async([r],e)=>(tn(r),t.value.unshift(r),t)),pop:t=>pe(async(r,e)=>t.value.pop()??_t),shift:t=>pe(async(r,e)=>t.value.shift()??_t),concat:t=>pe(async([r],e)=>(ic(r),Zr(t.value.concat(r.value)))),slice:t=>pe(async([r,e],n)=>(ke(r),ke(e),Zr(t.value.slice(r.value,e.value)))),join:t=>pe(async([r],e)=>(r&&Pr(r),Kt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>pe(async([r],e)=>{pi(r);const n=t.value.map(async(c,d)=>await e.call(r,[c,Fe(d)]));return Zr(await Promise.all(n))}),filter:t=>pe(async([r],e)=>{pi(r);const n=[];for(let c=0;cpe(async([r,e],n)=>{pi(r);const c=e!=null;let d=c?e:t.value[0];for(let $=c?0:1;$pe(async([r],e)=>{pi(r);for(let n=0;npe(async([r],e)=>(tn(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Gs:(c=>c.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?fn:Gs)),reverse:t=>pe(async(r,e)=>(t.value.reverse(),_t)),copy:t=>pe(async(r,e)=>Zr([...t.value])),sort:t=>pe(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const x=Math.floor(d.length/2),m=await n(d.slice(0,x),$),A=await n(d.slice(x),$);return c(m,A,$)},c=async(d,$,x)=>{const m=[];let A=0,_=0;for(;AKt(t.value),info:t=>t.info??_t}};function fb(t,r){if(Object.hasOwn(Wv,t.type)){const e=Wv[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new Gt(`No such prop (${r}) in ${t.type}.`)}else throw new Gt(`Cannot read prop of ${t.type}. (reading ${r})`)}const cb={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var bs=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,d=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};const _d=300,hb=_d-1;let is=class{constructor(r,e={}){be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);be(this,"vars",{});this.opts=e;const n={print:pe(([c])=>{tn(c),this.opts.out&&this.opts.out(c)}),readline:pe(async c=>{const d=c[0];if(Pr(d),this.opts.in==null)return _t;const $=await this.opts.in(d.value);return Kt($)})};this.vars=Object.fromEntries(Object.entries({...r,...nb,...n}).map(([c,d])=>[c,cb.const(d)])),this.scope=new ti([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,d)=>{switch(c){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(n=>(this.handleError(n),Ad("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(d=>e(d));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const d={};for(const[$,x]of c.value.entries())d[$]=e(x);return d}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof Cc?this.opts.err(r):this.opts.err(new O$(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{if(n.mut)throw new Error("Namespaces cannot include mutable variable: "+n.name);const c={isMutable:n.mut,value:await this._eval(n.expr,e)};e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??_t;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],{isMutable:!0,value:e[d]});const c=r.scope.createChildScope(n);return sb(await this._run(r.statements,c))}}async _eval(r,e){if(this.stop)return _t;if(this.stepCount%_d===hb&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new Gt("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);pi(n);const c=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if(ys(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const d=await this._eval(c.cond,e);if(ys(d),d.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return _t}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const d=await this._eval(c.q,e);if(Ph(n,d))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):_t}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return _t}case"for":{if(r.times){const n=await this._eval(r.times,e);ke(n);for(let c=0;c0){const c=[];for(const d of r.attr)c.push({name:d.name,value:await this._eval(d.value,e)});n.attr=c}return e.add(r.name,{isMutable:r.mut,value:n}),_t}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),_t}case"addAssign":{const n=await this._eval(r.dest,e);ke(n);const c=await this._eval(r.expr,e);return ke(c),await this.assign(e,r.dest,Fe(n.value+c.value)),_t}case"subAssign":{const n=await this._eval(r.dest,e);ke(n);const c=await this._eval(r.expr,e);return ke(c),await this.assign(e,r.dest,Fe(n.value-c.value)),_t}case"null":return _t;case"bool":return Qo(r.value);case"num":return Fe(r.value);case"str":return Kt(r.value);case"arr":return Zr(await Promise.all(r.value.map(n=>this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return Tp(n)}case"prop":{const n=await this._eval(r.target,e);return qc(n)?n.value.has(r.name)?n.value.get(r.name):_t:fb(n,r.name)}case"index":{const n=await this._eval(r.target,e),c=await this._eval(r.index,e);if(Vv(n)){ke(c);const d=n.value[c.value];if(d===void 0)throw new N$(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return d}else{if(qc(n))return Pr(c),n.value.has(c.value)?n.value.get(c.value):_t;throw new Gt(`Cannot read prop (${Su(c)}) of ${n.type}.`)}}case"not":{const n=await this._eval(r.expr,e);return ys(n),Qo(!n.value)}case"fn":return Y$(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return Qo(e.exists(r.identifier.name));case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const d=await this._eval(c,e);n+=Su(d)}return Kt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),eb(n)}case"break":return this.log("block:break",{scope:e.name}),tb();case"continue":return this.log("block:continue",{scope:e.name}),rb();case"ns":return _t;case"meta":return _t;case"and":{const n=await this._eval(r.left,e);if(ys(n),n.value){const c=await this._eval(r.right,e);return ys(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if(ys(n),n.value)return n;{const c=await this._eval(r.right,e);return ys(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=_t;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r),d=await this._eval(e.index,r);if(Vv(c))ke(d),c.value[d.value]=n;else if(qc(c))Pr(d),c.value.set(d.value,n);else throw new Gt(`Cannot read prop (${Su(d)}) of ${c.type}.`)}else if(e.type==="prop"){const c=await this._eval(e.target,r);ii(c),c.value.set(e.name,n)}else throw new Gt("The left-hand side of an assignment expression must be a variable or a property/index access.")}};bs([dr],is.prototype,"exec",null);bs([dr],is.prototype,"execFn",null);bs([dr],is.prototype,"execFnSimple",null);bs([dr],is.prototype,"handleError",null);bs([dr],is.prototype,"log",null);bs([dr],is.prototype,"collectNs",null);bs([dr],is.prototype,"collectNsMember",null);bs([dr],is.prototype,"_fn",null);bs([dr],is.prototype,"_eval",null);bs([dr],is.prototype,"_run",null);bs([dr],is.prototype,"registerAbortHandler",null);bs([dr],is.prototype,"unregisterAbortHandler",null);bs([dr],is.prototype,"abort",null);bs([dr],is.prototype,"assign",null);bs([dr],is,"collectMetadata",null);function pb(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function Yo(t,r,e,n){var c=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(c,Yo.prototype),c.expected=r,c.found=e,c.location=n,c.name="SyntaxError",c}pb(Yo,Error);function zc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}Yo.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` -`+m+` | -`+d.line+" | "+A+` -`+m+" | "+zc("",c.column-1," ")+zc("",k,"^")}else r+=` - at `+$}return r};Yo.buildMessage=function(t,r){var e={literal:function(A){return'"'+c(A.text)+'"'},class:function(A){var _=A.parts.map(function(k){return Array.isArray(k)?d(k[0])+"-"+d(k[1]):d(k)});return"["+(A.inverted?"^":"")+_.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(A){return A.description}};function n(A){return A.charCodeAt(0).toString(16).toUpperCase()}function c(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(_){return"\\x0"+n(_)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(_){return"\\x"+n(_)})}function d(A){return A.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(_){return"\\x0"+n(_)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(_){return"\\x"+n(_)})}function $(A){return e[A.type](A)}function x(A){var _=A.map($),k,S;if(_.sort(),_.length>0){for(k=1,S=1;k<_.length;k++)_[k-1]!==_[k]&&(_[S]=_[k],S++);_.length=S}switch(_.length){case 1:return _[0];case 2:return _[0]+" or "+_[1];default:return _.slice(0,-1).join(", ")+", or "+_[_.length-1]}}function m(A){return A?'"'+c(A)+'"':"end of input"}return"Expected "+x(t)+" but "+m(r)+" found."};function Kv(t,r){r=r!==void 0?r:{};var e={},n=r.grammarSource,c={Preprocess:ka,Main:cs},d=ka,$="//",x="/*",m="*/",A="(",_=")",k="::",S="{",T="}",G="###",ee="let",re=":",ge="=",q="var",U="<:",L="#[",H="]",W="each",V=",",J="for",Y="return",ue="loop",de="break",le="continue",Te="+=",ze="-=",dt="\\",Ke="||",ot="&&",je="==",lt="!=",Ft="<=",Ot=">=",Ye="<",Or=">",Bt="+",wr="-",Pt="*",yr="^",Nr="/",kr="%",Mr="!",Nt="[",z=".",Z="if",se="elif",ve="else",ye="match",oe="=>",Ne="eval",me="exists",$e="`",he='"',Le="'",Re='\\"',He="\\'",We="true",Ze="false",nt="null",at=";",mt="@",Ht="@(",bt=`\r -`,Zt=/^[A-Z0-9_:]/i,Es=/^[^`{]/,Jr=/^[{}`]/,Tt=/^[+\-]/,ht=/^[1-9]/,Rt=/^[0-9]/,Kn=/^[A-Z_]/i,Jn=/^[A-Z0-9_]/i,_i=/^[\r\n]/,ki=/^[ \t\r\n]/,rr=/^[ \t]/,sr=qs(),Pi=ae("//",!1),dn=ae("/*",!1),mr=ae("*/",!1),Et=ae("(",!1),xr=ae(")",!1),nr=ae("::",!1),tt=ae("{",!1),Ut=ae("}",!1),jr=ae("###",!1),yt=ae("let",!1),wt=ae(":",!1),ls=ae("=",!1),Ei=ae("var",!1),Mi=ae("<:",!1),Ms=ae("#[",!1),os=ae("]",!1),xt=ae("each",!1),pt=ae(",",!1),Ss=ae("for",!1),ur=ae("return",!1),fr=It([["A","Z"],["0","9"],"_",":"],!1,!0),Si=ae("loop",!1),Fi=ae("break",!1),Oi=ae("continue",!1),Ni=ae("+=",!1),Xn=ae("-=",!1),Gn=ae("\\",!1),Ti=ae("||",!1),Ii=ae("&&",!1),ji=ae("==",!1),Ri=ae("!=",!1),Di=ae("<=",!1),Zn=ae(">=",!1),yn=ae("<",!1),Qn=ae(">",!1),Li=ae("+",!1),Yn=ae("-",!1),ea=ae("*",!1),Bi=ae("^",!1),Hi=ae("/",!1),Ui=ae("%",!1),wn=ae("!",!1),us=ae("[",!1),mn=ae(".",!1),qi=ae("if",!1),zi=ae("elif",!1),Vi=ae("else",!1),Fs=ae("match",!1),Os=ae("=>",!1),Ns=ae("eval",!1),Wi=ae("exists",!1),Ts=ae("`",!1),Is=It(["`","{"],!0,!1),js=It(["{","}","`"],!1,!1),Rs=ae('"',!1),Ds=ae("'",!1),Ls=ae('\\"',!1),ta=ae("\\'",!1),Mt=It(["+","-"],!1,!1),ra=It([["1","9"]],!1,!1),ar=It([["0","9"]],!1,!1),Ki=ae("true",!1),Bs=ae("false",!1),Ji=ae("null",!1),fs=ae(";",!1),Xi=ae("@",!1),xn=ae("@(",!1),Gi=It([["A","Z"],"_"],!1,!0),sa=It([["A","Z"],["0","9"],"_"],!1,!0),Zi=ae(`\r -`,!1),Qi=It(["\r",` -`],!1,!1),Yi=It([" "," ","\r",` -`],!1,!1),el=It([" "," "],!1,!1),tl=function(s){return s.join("")},rl=function(){return te()},sl=function(){return te()},nl=function(){return""},na=function(){return""},al=function(s){return s??[]},$n=function(s,o){return o},il=function(s,o){return[s,...o]},bn=function(s,o){return o},ll=function(s,o){return[s,...o]},aa=function(s,o){return o},ol=function(s,o){return[s,...o]},ul=function(s){return s},fl=function(s,o){return h("ns",{name:s,members:o})},cl=function(s,o){return h("meta",{name:s,value:o})},hl=function(s){return h("meta",{name:null,value:s})},pl=function(s,o,p){return h("def",{name:s,varType:o,expr:p,mut:!1,attr:[]})},vl=function(s,o,p){return h("def",{name:s,varType:o,expr:p,mut:!0,attr:[]})},gl=function(s){return h("identifier",{name:"print",chain:[h("callChain",{args:[s]})]})},dl=function(s,o){return h("attr",{name:s,value:o??h("bool",{value:!0})})},yl=function(s,o,p){return h("each",{var:s,items:o,for:p})},wl=function(s,o,p){return h("each",{var:s,items:o,for:p})},ml=function(s,o){return o},xl=function(s,o,p,u){return h("for",{var:s,from:o??h("num",{value:0}),to:p,for:u})},$l=function(s,o){return o},bl=function(s,o,p,u){return h("for",{var:s,from:o??h("num",{value:0}),to:p,for:u})},Al=function(s,o){return h("for",{times:s,for:o})},Cl=function(s,o){return h("for",{times:s,for:o})},_l=function(s){return h("return",{expr:s})},kl=function(s){return h("loop",{statements:s})},Pl=function(){return h("break",{})},ia=function(){return h("continue",{})},El=function(s,o,p){return o==="+="?h("addAssign",{dest:s,expr:p}):o==="-="?h("subAssign",{dest:s,expr:p}):h("assign",{dest:s,expr:p})},la=function(s,o,p){return{op:o,term:p}},Ml=function(s,o){return h("infix",{operands:[s,...o.map(p=>p.term)],operators:o.map(p=>p.op)})},Sl=function(){return te()},Fl=function(s){return h("not",{expr:s})},oa=function(s,o){return{...s,chain:o}},Ol=function(s){return h("callChain",{args:s??[]})},ua=function(s,o){return o},Nl=function(s,o){return[s,...o]},Tl=function(s){return h("indexChain",{index:s})},Il=function(s){return h("propChain",{name:s})},jl=function(s,o,p,u){return h("if",{cond:s,then:o,elseif:p??[],else:u})},Rl=function(s,o){return[s,...o]},fa=function(s,o){return{cond:s,then:o}},Dl=function(s){return s},ca=function(s,o,p){return{q:o,a:p}},Ll=function(s,o,p){return h("match",{about:s,qs:o??[],default:p})},Bl=function(s){return h("block",{statements:s})},Hl=function(s){return h("exists",{identifier:s})},ha=function(s){return h("identifier",{name:s})},Ul=function(s){return h("tmpl",{tmpl:s})},pa=function(s){return s.join("")},va=function(s){return s},ql=function(s){return h("str",{value:s.join("")})},ga=function(s){return s},zl=function(s){return h("str",{value:s.join("")})},Vl=function(){return'"'},Wl=function(){return"'"},Kl=function(){return h("num",{value:parseFloat(te())})},Jl=function(){return h("num",{value:parseFloat(te())})},Xl=function(){return h("num",{value:parseInt(te(),10)})},Gl=function(){return h("num",{value:parseInt(te(),10)})},da=function(){return h("bool",{value:!0})},Zl=function(){return h("bool",{value:!1})},ya=function(){return h("null",{})},wa=function(s,o){return{k:s,v:o}},Ql=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return h("obj",{value:o})},ma=function(s){return s},Yl=function(s){return h("arr",{value:s})},eo=function(s,o){return{name:s,argType:o}},xa=function(s,o){return[s,...o]},to=function(s,o,p,u,g,v){return(s.length>0||p.length>0)&&oo("Cannot use spaces before or after the function name."),h("def",{name:o,expr:h("fn",{args:u??[],retType:g},v??[]),mut:!1,attr:[]})},$a=function(s,o,p){return h("fn",{args:s??[],retType:o},p??[])},ba=function(s){return s},ro=function(s){return h("arr",{value:s})},Aa=function(s,o){return{k:s,v:o}},so=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return h("obj",{value:o})},no=function(s,o){return h("fnTypeSource",{args:s??[],result:o})},ao=function(s,o){return[s,...o]},io=function(s,o){return h("namedTypeSource",{name:s,inner:o})},lo=function(s){return h("namedTypeSource",{name:s,inner:null})},i=function(){return te()},X=function(){return te()},Hs=function(s){return h("block",{statements:s??[]})},a=0,K=0,E=[{line:1,column:1}],I=0,Rr=[],P=0,R={},Us;if("startRule"in r){if(!(r.startRule in c))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=c[r.startRule]}function te(){return t.substring(K,a)}function qt(){return zs(K,a)}function oo(s,o){throw o=o!==void 0?o:zs(K,a),_a(s,o)}function ae(s,o){return{type:"literal",text:s,ignoreCase:o}}function It(s,o,p){return{type:"class",parts:s,inverted:o,ignoreCase:p}}function qs(){return{type:"any"}}function N(){return{type:"end"}}function Ca(s){var o=E[s],p;if(o)return o;for(p=s-1;!E[p];)p--;for(o=E[p],o={line:o.line,column:o.column};pI&&(I=a,Rr=[]),Rr.push(s))}function _a(s,o){return new Yo(s,null,null,o)}function uo(s,o,p){return new Yo(Yo.buildMessage(s,o),s,o,p)}function ka(){var s,o,p,u=a*77+0,g=R[u];if(g)return a=g.nextPos,g.result;for(s=a,o=[],p=Pa();p!==e;)o.push(p),p=Pa();return K=s,o=tl(o),s=o,R[u]={nextPos:a,result:s},s}function Pa(){var s,o,p=a*77+1,u=R[p];return u?(a=u.nextPos,u.result):(s=a,o=Ws(),o!==e&&(K=s,o=rl()),s=o,s===e&&(s=a,o=Sn(),o!==e&&(K=s,o=sl()),s=o,s===e&&(s=fo(),s===e&&(t.length>a?(s=t.charAt(a),a++):(s=e,P===0&&O(sr))))),R[p]={nextPos:a,result:s},s)}function fo(){var s,o,p,u,g,v,b=a*77+2,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,2)===$?(o=$,a+=2):(o=e,P===0&&O(Pi)),o!==e){for(p=[],u=a,g=a,P++,v=l(),P--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,v=l(),P--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);K=s,s=nl()}else a=s,s=e;if(s===e)if(s=a,t.substr(a,2)===x?(o=x,a+=2):(o=e,P===0&&O(dn)),o!==e){for(p=[],u=a,g=a,P++,t.substr(a,2)===m?(v=m,a+=2):(v=e,P===0&&O(mr)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,t.substr(a,2)===m?(v=m,a+=2):(v=e,P===0&&O(mr)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr)),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);t.substr(a,2)===m?(u=m,a+=2):(u=e,P===0&&O(mr)),u!==e?(K=s,s=na()):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function cs(){var s,o,p,u,g,v=a*77+3,b=R[v];if(b)return a=b.nextPos,b.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();for(p=An(),p===e&&(p=null),u=[],g=f();g!==e;)u.push(g),g=f();return K=s,s=al(p),R[v]={nextPos:a,result:s},s}function An(){var s,o,p,u,g,v,b,w,M=a*77+4,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=De(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=De(),w!==e?(K=u,u=$n(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=De(),w!==e?(K=u,u=$n(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=il(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Cn(){var s,o,p,u,g,v,b,w,M=a*77+5,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=Dr(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Dr(),w!==e?(K=u,u=bn(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Dr(),w!==e?(K=u,u=bn(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=ll(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function cr(){var s,o,p,u,g,v,b,w,M=a*77+6,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=Lr(),o!==e){for(p=[],u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Lr(),w!==e?(K=u,u=aa(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,g=[],v=y();v!==e;)g.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Lr(),w!==e?(K=u,u=aa(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=ol(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function De(){var s,o=a*77+7,p=R[o];return p?(a=p.nextPos,p.result):(s=Ma(),s===e&&(s=co(),s===e&&(s=Lr())),R[o]={nextPos:a,result:s},s)}function Dr(){var s,o=a*77+8,p=R[o];return p?(a=p.nextPos,p.result):(s=Sa(),s===e&&(s=zt(),s===e&&(s=Ma())),R[o]={nextPos:a,result:s},s)}function Lr(){var s,o=a*77+9,p=R[o];return p?(a=p.nextPos,p.result):(s=Sa(),s===e&&(s=zt(),s===e&&(s=ho(),s===e&&(s=yo(),s===e&&(s=po(),s===e&&(s=vo(),s===e&&(s=go(),s===e&&(s=wo(),s===e&&(s=mo(),s===e&&(s=br(),s===e&&(s=Fa(),s===e&&(s=Ie()))))))))))),R[o]={nextPos:a,result:s},s)}function Ie(){var s,o=a*77+10,p=R[o];return p?(a=p.nextPos,p.result):(s=xo(),s===e&&(s=hs()),R[o]={nextPos:a,result:s},s)}function hs(){var s,o=a*77+11,p=R[o];return p?(a=p.nextPos,p.result):(s=Ao(),s===e&&(s=Mo(),s===e&&(s=Oa(),s===e&&(s=Ea()))),R[o]={nextPos:a,result:s},s)}function Ea(){var s,o,p,u,g,v,b=a*77+12,w=R[b];if(w)return a=w.nextPos,w.result;if(s=Ta(),s===e&&(s=Ia(),s===e&&(s=ja(),s===e&&(s=Ws(),s===e&&(s=Sn(),s===e&&(s=Ba(),s===e&&(s=Ua(),s===e&&(s=Nn(),s===e&&(s=qa(),s===e&&(s=Eo(),s===e&&(s=$o(),s===e&&(s=Ra(),s===e))))))))))))if(s=a,t.charCodeAt(a)===40?(o=A,a++):(o=e,P===0&&O(Et)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Ie(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e?(K=s,s=ul(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function $r(){var s,o=a*77+13,p=R[o];return p?(a=p.nextPos,p.result):(s=Ba(),s===e&&(s=Sn(),s===e&&(s=Ua(),s===e&&(s=So(),s===e&&(s=Fo(),s===e&&(s=Nn()))))),R[o]={nextPos:a,result:s},s)}function Ma(){var s,o,p,u,g,v,b,w,M,F,D=a*77+14,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===k?(o=k,a+=2):(o=e,P===0&&O(nr)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(t.charCodeAt(a)===123?(v=S,a++):(v=e,P===0&&O(tt)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(w=Cn(),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();t.charCodeAt(a)===125?(F=T,a++):(F=e,P===0&&O(Ut)),F!==e?(K=s,s=fl(u,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function co(){var s,o,p,u,g,v,b=a*77+15,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,3)===G?(o=G,a+=3):(o=e,P===0&&O(jr)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=qe(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();v=$r(),v!==e?(K=s,s=cl(u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===G?(o=G,a+=3):(o=e,P===0&&O(jr)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();u=$r(),u!==e?(K=s,s=hl(u)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Sa(){var s,o,p,u,g,v,b,w,M,F=a*77+16,D=R[F];if(D)return a=D.nextPos,D.result;if(s=a,t.substr(a,3)===ee?(o=ee,a+=3):(o=e,P===0&&O(yt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){for(g=a,v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===58?(b=re,a++):(b=e,P===0&&O(wt)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ue(),M!==e?g=M:(a=g,g=e)}else a=g,g=e;for(g===e&&(g=null),v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===61?(b=ge,a++):(b=e,P===0&&O(ls)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ie(),M!==e?(K=s,s=pl(u,g,M)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===q?(o=q,a+=3):(o=e,P===0&&O(Ei)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){for(g=a,v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===58?(b=re,a++):(b=e,P===0&&O(wt)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ue(),M!==e?g=M:(a=g,g=e)}else a=g,g=e;for(g===e&&(g=null),v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===61?(b=ge,a++):(b=e,P===0&&O(ls)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ie(),M!==e?(K=s,s=vl(u,g,M)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[F]={nextPos:a,result:s},s}function ho(){var s,o,p,u,g=a*77+17,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,2)===U?(o=U,a+=2):(o=e,P===0&&O(Mi)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();u=Ie(),u!==e?(K=s,s=gl(u)):(a=s,s=e)}else a=s,s=e;return R[g]={nextPos:a,result:s},s}function po(){var s,o,p,u,g,v,b,w=a*77+18,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,t.substr(a,2)===L?(o=L,a+=2):(o=e,P===0&&O(Ms)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=qe(),u!==e){for(g=a,v=[],b=f();b!==e;)v.push(b),b=f();for(b=$r(),b!==e?g=b:(a=g,g=e),g===e&&(g=null),v=[],b=f();b!==e;)v.push(b),b=f();t.charCodeAt(a)===93?(b=H,a++):(b=e,P===0&&O(os)),b!==e?(K=s,s=dl(u,g)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[w]={nextPos:a,result:s},s}function vo(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne=a*77+19,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.substr(a,4)===W?(o=W,a+=4):(o=e,P===0&&O(xt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,P===0&&O(Et)),u!==e)if(t.substr(a,3)===ee?(g=ee,a+=3):(g=e,P===0&&O(yt)),g!==e){if(v=[],b=f(),b!==e)for(;b!==e;)v.push(b),b=f();else v=e;if(v!==e)if(b=qe(),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();for(t.charCodeAt(a)===44?(M=V,a++):(M=e,P===0&&O(pt)),M===e&&(M=null),F=[],D=f();D!==e;)F.push(D),D=f();if(D=Ie(),D!==e)if(t.charCodeAt(a)===41?(B=_,a++):(B=e,P===0&&O(xr)),B!==e){for(Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();xe=Ae(),xe!==e?(K=s,s=yl(b,D,xe)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,4)===W?(o=W,a+=4):(o=e,P===0&&O(xt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,P===0&&O(yt)),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();if(F=Ie(),F!==e){if(D=[],B=f(),B!==e)for(;B!==e;)D.push(B),B=f();else D=e;D!==e?(B=Ae(),B!==e?(K=s,s=wl(v,F,B)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function go(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne,Xe=a*77+20,Ge=R[Xe];if(Ge)return a=Ge.nextPos,Ge.result;if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,P===0&&O(Ss)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,P===0&&O(Et)),u!==e)if(t.substr(a,3)===ee?(g=ee,a+=3):(g=e,P===0&&O(yt)),g!==e){if(v=[],b=f(),b!==e)for(;b!==e;)v.push(b),b=f();else v=e;if(v!==e)if(b=qe(),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();if(M=a,t.charCodeAt(a)===61?(F=ge,a++):(F=e,P===0&&O(ls)),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();B=Ie(),B!==e?(K=M,M=ml(b,B)):(a=M,M=e)}else a=M,M=e;for(M===e&&(M=null),t.charCodeAt(a)===44?(F=V,a++):(F=e,P===0&&O(pt)),F===e&&(F=null),D=[],B=f();B!==e;)D.push(B),B=f();if(B=Ie(),B!==e)if(t.charCodeAt(a)===41?(Q=_,a++):(Q=e,P===0&&O(xr)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();ne=Ae(),ne!==e?(K=s,s=xl(b,M,B,ne)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,P===0&&O(Ss)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,P===0&&O(yt)),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(w=a,t.charCodeAt(a)===61?(M=ge,a++):(M=e,P===0&&O(ls)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();D=Ie(),D!==e?(K=w,w=$l(v,D)):(a=w,w=e)}else a=w,w=e;for(w===e&&(w=null),t.charCodeAt(a)===44?(M=V,a++):(M=e,P===0&&O(pt)),M===e&&(M=null),F=[],D=f();D!==e;)F.push(D),D=f();if(D=Ie(),D!==e){if(B=[],Q=f(),Q!==e)for(;Q!==e;)B.push(Q),Q=f();else B=e;B!==e?(Q=Ae(),Q!==e?(K=s,s=bl(v,w,D,Q)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,P===0&&O(Ss)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,P===0&&O(Et)),u!==e)if(g=Ie(),g!==e)if(t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Ae(),w!==e?(K=s,s=Al(g,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,P===0&&O(Ss)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ie(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;g!==e?(v=Ae(),v!==e?(K=s,s=Cl(u,v)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e}}return R[Xe]={nextPos:a,result:s},s}function yo(){var s,o,p,u,g,v=a*77+21,b=R[v];if(b)return a=b.nextPos,b.result;if(s=a,t.substr(a,6)===Y?(o=Y,a+=6):(o=e,P===0&&O(ur)),o!==e)if(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();g=Ie(),g!==e?(K=s,s=_l(g)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[v]={nextPos:a,result:s},s}function wo(){var s,o,p,u,g,v,b,w,M=a*77+22,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,t.substr(a,4)===ue?(o=ue,a+=4):(o=e,P===0&&O(Si)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=S,a++):(u=e,P===0&&O(tt)),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();if(v=cr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();t.charCodeAt(a)===125?(w=T,a++):(w=e,P===0&&O(Ut)),w!==e?(K=s,s=kl(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function mo(){var s,o,p,u,g=a*77+23,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===de?(o=de,a+=5):(o=e,P===0&&O(Fi)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=Pl()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function br(){var s,o,p,u,g=a*77+24,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,8)===le?(o=le,a+=8):(o=e,P===0&&O(Oi)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=ia()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function Fa(){var s,o,p,u,g,v,b=a*77+25,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Ie(),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.substr(a,2)===Te?(u=Te,a+=2):(u=e,P===0&&O(Ni)),u===e&&(t.substr(a,2)===ze?(u=ze,a+=2):(u=e,P===0&&O(Xn)),u===e&&(t.charCodeAt(a)===61?(u=ge,a++):(u=e,P===0&&O(ls)))),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();v=Ie(),v!==e?(K=s,s=El(o,u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function xo(){var s,o,p,u,g,v,b,w,M=a*77+26,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=hs(),o!==e){for(p=[],u=a,g=[],v=Ar();v!==e;)g.push(v),v=Ar();if(v=_n(),v!==e){for(b=[],w=Ar();w!==e;)b.push(w),w=Ar();w=hs(),w!==e?(K=u,u=la(o,v,w)):(a=u,u=e)}else a=u,u=e;if(u!==e)for(;u!==e;){for(p.push(u),u=a,g=[],v=Ar();v!==e;)g.push(v),v=Ar();if(v=_n(),v!==e){for(b=[],w=Ar();w!==e;)b.push(w),w=Ar();w=hs(),w!==e?(K=u,u=la(o,v,w)):(a=u,u=e)}else a=u,u=e}else p=e;p!==e?(K=s,s=Ml(o,p)):(a=s,s=e)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Ar(){var s,o,p,u=a*77+27,g=R[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===92?(o=dt,a++):(o=e,P===0&&O(Gn)),o!==e?(p=ie(),p!==e?(o=[o,p],s=o):(a=s,s=e)):(a=s,s=e),s===e&&(s=y()),R[u]={nextPos:a,result:s},s)}function _n(){var s,o,p=a*77+28,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Ke?(o=Ke,a+=2):(o=e,P===0&&O(Ti)),o===e&&(t.substr(a,2)===ot?(o=ot,a+=2):(o=e,P===0&&O(Ii)),o===e&&(t.substr(a,2)===je?(o=je,a+=2):(o=e,P===0&&O(ji)),o===e&&(t.substr(a,2)===lt?(o=lt,a+=2):(o=e,P===0&&O(Ri)),o===e&&(t.substr(a,2)===Ft?(o=Ft,a+=2):(o=e,P===0&&O(Di)),o===e&&(t.substr(a,2)===Ot?(o=Ot,a+=2):(o=e,P===0&&O(Zn)),o===e&&(t.charCodeAt(a)===60?(o=Ye,a++):(o=e,P===0&&O(yn)),o===e&&(t.charCodeAt(a)===62?(o=Or,a++):(o=e,P===0&&O(Qn)),o===e&&(t.charCodeAt(a)===43?(o=Bt,a++):(o=e,P===0&&O(Li)),o===e&&(t.charCodeAt(a)===45?(o=wr,a++):(o=e,P===0&&O(Yn)),o===e&&(t.charCodeAt(a)===42?(o=Pt,a++):(o=e,P===0&&O(ea)),o===e&&(t.charCodeAt(a)===94?(o=yr,a++):(o=e,P===0&&O(Bi)),o===e&&(t.charCodeAt(a)===47?(o=Nr,a++):(o=e,P===0&&O(Hi)),o===e&&(t.charCodeAt(a)===37?(o=kr,a++):(o=e,P===0&&O(Ui))))))))))))))),o!==e&&(K=s,o=Sl()),s=o,R[p]={nextPos:a,result:s},s)}function $o(){var s,o,p,u=a*77+29,g=R[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===33?(o=Mr,a++):(o=e,P===0&&O(wn)),o!==e?(p=Ie(),p!==e?(K=s,s=Fl(p)):(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function Oa(){var s,o,p,u,g=a*77+30,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,o=Ea(),o!==e){if(p=[],u=kn(),u===e&&(u=Na(),u===e&&(u=Vs())),u!==e)for(;u!==e;)p.push(u),u=kn(),u===e&&(u=Na(),u===e&&(u=Vs()));else p=e;p!==e?(K=s,s=oa(o,p)):(a=s,s=e)}else a=s,s=e;return R[g]={nextPos:a,result:s},s}function kn(){var s,o,p,u,g,v,b=a*77+31,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===40?(o=A,a++):(o=e,P===0&&O(Et)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=bo(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e?(K=s,s=Ol(u)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function bo(){var s,o,p,u,g,v,b=a*77+32,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Ie(),o!==e){for(p=[],u=a,g=C(),g!==e?(v=Ie(),v!==e?(K=u,u=ua(o,v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=C(),g!==e?(v=Ie(),v!==e?(K=u,u=ua(o,v)):(a=u,u=e)):(a=u,u=e);K=s,s=Nl(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Na(){var s,o,p,u,g,v,b=a*77+33,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===91?(o=Nt,a++):(o=e,P===0&&O(us)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Ie(),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,P===0&&O(os)),v!==e?(K=s,s=Tl(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Vs(){var s,o,p,u=a*77+34,g=R[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===46?(o=z,a++):(o=e,P===0&&O(mn)),o!==e?(p=qe(),p!==e?(K=s,s=Il(p)):(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function Ao(){var s,o,p,u,g,v,b,w,M,F,D=a*77+35,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===Z?(o=Z,a+=2):(o=e,P===0&&O(qi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Ie(),u!==e){if(g=[],v=f(),v!==e)for(;v!==e;)g.push(v),v=f();else g=e;if(g!==e)if(v=Ae(),v!==e){if(b=a,w=[],M=f(),M!==e)for(;M!==e;)w.push(M),M=f();else w=e;if(w!==e?(M=Co(),M!==e?b=M:(a=b,b=e)):(a=b,b=e),b===e&&(b=null),w=a,M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;M!==e?(F=_o(),F!==e?w=F:(a=w,w=e)):(a=w,w=e),w===e&&(w=null),K=s,s=jl(u,v,b,w)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Co(){var s,o,p,u,g,v,b=a*77+36,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Pn(),o!==e){for(p=[],u=a,g=[],v=f();v!==e;)g.push(v),v=f();for(v=Pn(),v!==e?u=v:(a=u,u=e);u!==e;){for(p.push(u),u=a,g=[],v=f();v!==e;)g.push(v),v=f();v=Pn(),v!==e?u=v:(a=u,u=e)}K=s,s=Rl(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Pn(){var s,o,p,u,g,v,b,w=a*77+37,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,t.substr(a,4)===se?(o=se,a+=4):(o=e,P===0&&O(zi)),o!==e)if(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();if(g=Ie(),g!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();b=Ae(),b!==e?(K=s,s=fa(g,b)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e;return R[w]={nextPos:a,result:s},s}function _o(){var s,o,p,u,g,v=a*77+38,b=R[v];if(b)return a=b.nextPos,b.result;if(s=a,t.substr(a,4)===ve?(o=ve,a+=4):(o=e,P===0&&O(Vi)),o!==e)if(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();g=Ae(),g!==e?(K=s,s=Dl(g)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[v]={nextPos:a,result:s},s}function Ta(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne,Xe,Ge,In=a*77+39,ps=R[In];if(ps)return a=ps.nextPos,ps.result;if(s=a,t.substr(a,5)===ye?(o=ye,a+=5):(o=e,P===0&&O(Fs)),o!==e)if(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();if(g=Ie(),g!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===123?(b=S,a++):(b=e,P===0&&O(tt)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();if(M=[],F=a,D=Ie(),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,P===0&&O(Os)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();K=F,F=ca(g,D,ne)}else a=F,F=e}else a=F,F=e}else a=F,F=e;if(F!==e)for(;F!==e;)if(M.push(F),F=a,D=Ie(),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,P===0&&O(Os)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();K=F,F=ca(g,D,ne)}else a=F,F=e}else a=F,F=e}else a=F,F=e;else M=e;if(M!==e){if(F=a,t.charCodeAt(a)===42?(D=Pt,a++):(D=e,P===0&&O(ea)),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,P===0&&O(Os)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();F=ne}else a=F,F=e}else a=F,F=e}else a=F,F=e;for(F===e&&(F=null),D=[],B=f();B!==e;)D.push(B),B=f();t.charCodeAt(a)===125?(B=T,a++):(B=e,P===0&&O(Ut)),B!==e?(K=s,s=Ll(g,M,F)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;else a=s,s=e;return R[In]={nextPos:a,result:s},s}function Ia(){var s,o,p,u,g,v,b,w,M=a*77+40,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,t.substr(a,4)===Ne?(o=Ne,a+=4):(o=e,P===0&&O(Ns)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=S,a++):(u=e,P===0&&O(tt)),u!==e){for(g=[],v=f();v!==e;)g.push(v),v=f();if(v=cr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();t.charCodeAt(a)===125?(w=T,a++):(w=e,P===0&&O(Ut)),w!==e?(K=s,s=Bl(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function ja(){var s,o,p,u,g=a*77+41,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,6)===me?(o=me,a+=6):(o=e,P===0&&O(Wi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;p!==e?(u=Ra(),u!==e?(K=s,s=Hl(u)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;return R[g]={nextPos:a,result:s},s}function Ra(){var s,o,p=a*77+42,u=R[p];return u?(a=u.nextPos,u.result):(s=a,o=Va(),o!==e&&(K=s,o=ha(o)),s=o,R[p]={nextPos:a,result:s},s)}function Ws(){var s,o,p,u,g,v,b=a*77+43,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===96?(o=$e,a++):(o=e,P===0&&O(Ts)),o!==e){for(p=[],u=a,g=a,P++,t.charCodeAt(a)===96?(v=$e,a++):(v=e,P===0&&O(Ts)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=En(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,t.charCodeAt(a)===96?(v=$e,a++):(v=e,P===0&&O(Ts)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=En(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===96?(u=$e,a++):(u=e,P===0&&O(Ts)),u!==e?(K=s,s=Ul(p)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function En(){var s,o,p,u,g,v,b=a*77+44,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,P===0&&O(tt)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Ie(),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();t.charCodeAt(a)===125?(v=T,a++):(v=e,P===0&&O(Ut)),v!==e?s=u:(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,o=[],p=Mn(),p!==e)for(;p!==e;)o.push(p),p=Mn();else o=e;o!==e&&(K=s,o=pa(o)),s=o}return R[b]={nextPos:a,result:s},s}function Mn(){var s,o=a*77+45,p=R[o];return p?(a=p.nextPos,p.result):(s=Da(),s===e&&(Es.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,P===0&&O(Is))),R[o]={nextPos:a,result:s},s)}function Da(){var s,o,p,u=a*77+46,g=R[u];return g?(a=g.nextPos,g.result):(s=a,t.charCodeAt(a)===92?(o=dt,a++):(o=e,P===0&&O(Gn)),o!==e?(Jr.test(t.charAt(a))?(p=t.charAt(a),a++):(p=e,P===0&&O(js)),p!==e?s=p:(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function Sn(){var s,o,p,u,g,v,b=a*77+47,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===34?(o=he,a++):(o=e,P===0&&O(Rs)),o!==e){for(p=[],u=a,g=a,P++,t.charCodeAt(a)===34?(v=he,a++):(v=e,P===0&&O(Rs)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=La(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr))),v!==e?(K=u,u=va(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,t.charCodeAt(a)===34?(v=he,a++):(v=e,P===0&&O(Rs)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=La(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr))),v!==e?(K=u,u=va(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===34?(u=he,a++):(u=e,P===0&&O(Rs)),u!==e?(K=s,s=ql(p)):(a=s,s=e)}else a=s,s=e;if(s===e)if(s=a,t.charCodeAt(a)===39?(o=Le,a++):(o=e,P===0&&O(Ds)),o!==e){for(p=[],u=a,g=a,P++,t.charCodeAt(a)===39?(v=Le,a++):(v=e,P===0&&O(Ds)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Fn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr))),v!==e?(K=u,u=ga(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=a,P++,t.charCodeAt(a)===39?(v=Le,a++):(v=e,P===0&&O(Ds)),P--,v===e?g=void 0:(a=g,g=e),g!==e?(v=Fn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,P===0&&O(sr))),v!==e?(K=u,u=ga(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===39?(u=Le,a++):(u=e,P===0&&O(Ds)),u!==e?(K=s,s=zl(p)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function La(){var s,o,p=a*77+48,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Re?(o=Re,a+=2):(o=e,P===0&&O(Ls)),o!==e&&(K=s,o=Vl()),s=o,R[p]={nextPos:a,result:s},s)}function Fn(){var s,o,p=a*77+49,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===He?(o=He,a+=2):(o=e,P===0&&O(ta)),o!==e&&(K=s,o=Wl()),s=o,R[p]={nextPos:a,result:s},s)}function Ba(){var s,o=a*77+50,p=R[o];return p?(a=p.nextPos,p.result):(s=ko(),s===e&&(s=Ha()),R[o]={nextPos:a,result:s},s)}function ko(){var s,o,p,u,g,v,b=a*77+51,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,Tt.test(t.charAt(a))?(t.charAt(a),a++):P===0&&O(Mt),ht.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(ra)),o!==e){if(p=[],Rt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(ar)),u!==e)for(;u!==e;)p.push(u),Rt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(ar));else p=e;if(p!==e)if(t.charCodeAt(a)===46?(u=z,a++):(u=e,P===0&&O(mn)),u!==e){if(g=[],Rt.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,P===0&&O(ar)),v!==e)for(;v!==e;)g.push(v),Rt.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,P===0&&O(ar));else g=e;g!==e?(K=s,s=Kl()):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,Tt.test(t.charAt(a))?(t.charAt(a),a++):P===0&&O(Mt),Rt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(ar)),o!==e)if(t.charCodeAt(a)===46?(p=z,a++):(p=e,P===0&&O(mn)),p!==e){if(u=[],Rt.test(t.charAt(a))?(g=t.charAt(a),a++):(g=e,P===0&&O(ar)),g!==e)for(;g!==e;)u.push(g),Rt.test(t.charAt(a))?(g=t.charAt(a),a++):(g=e,P===0&&O(ar));else u=e;u!==e?(K=s,s=Jl()):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Ha(){var s,o,p,u,g=a*77+52,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,Tt.test(t.charAt(a))?(t.charAt(a),a++):P===0&&O(Mt),ht.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(ra)),o!==e){if(p=[],Rt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(ar)),u!==e)for(;u!==e;)p.push(u),Rt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(ar));else p=e;p!==e?(K=s,s=Xl()):(a=s,s=e)}else a=s,s=e;return s===e&&(s=a,Tt.test(t.charAt(a))?(t.charAt(a),a++):P===0&&O(Mt),Rt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(ar)),o!==e?(K=s,s=Gl()):(a=s,s=e)),R[g]={nextPos:a,result:s},s}function Ua(){var s,o=a*77+53,p=R[o];return p?(a=p.nextPos,p.result):(s=Po(),s===e&&(s=On()),R[o]={nextPos:a,result:s},s)}function Po(){var s,o,p,u,g=a*77+54,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===We?(o=We,a+=4):(o=e,P===0&&O(Ki)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=da()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function On(){var s,o,p,u,g=a*77+55,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===Ze?(o=Ze,a+=5):(o=e,P===0&&O(Bs)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=Zl()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function Nn(){var s,o,p,u,g=a*77+56,v=R[g];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===nt?(o=nt,a+=4):(o=e,P===0&&O(Ji)),o!==e?(p=a,P++,Zt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(fr)),P--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=ya()):(a=s,s=e)):(a=s,s=e),R[g]={nextPos:a,result:s},s)}function qa(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne=a*77+57,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,P===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,P===0&&O(wt)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=Ie(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,P===0&&O(pt)),B===e&&(t.charCodeAt(a)===59?(B=at,a++):(B=e,P===0&&O(fs))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=g,g=wa(v,F)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,P===0&&O(wt)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=Ie(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,P===0&&O(pt)),B===e&&(t.charCodeAt(a)===59?(B=at,a++):(B=e,P===0&&O(fs))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=g,g=wa(v,F)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;t.charCodeAt(a)===125?(g=T,a++):(g=e,P===0&&O(Ut)),g!==e?(K=s,s=Ql(u)):(a=s,s=e)}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Eo(){var s,o,p,u,g,v,b,w,M,F,D=a*77+58,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.charCodeAt(a)===91?(o=Nt,a++):(o=e,P===0&&O(us)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=Ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=g,g=ma(v)}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=Ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=g,g=ma(v)}else a=g,g=e;for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,P===0&&O(os)),v!==e?(K=s,s=Yl(u)):(a=s,s=e)}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Tn(){var s,o,p,u,g,v,b,w=a*77+59,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,o=qe(),o!==e){for(p=a,u=[],g=f();g!==e;)u.push(g),g=f();if(t.charCodeAt(a)===58?(g=re,a++):(g=e,P===0&&O(wt)),g!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();b=Ue(),b!==e?p=b:(a=p,p=e)}else a=p,p=e;p===e&&(p=null),K=s,s=eo(o,p)}else a=s,s=e;return R[w]={nextPos:a,result:s},s}function za(){var s,o,p,u,g,v,b=a*77+60,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Tn(),o!==e){for(p=[],u=a,g=C(),g!==e?(v=Tn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=C(),g!==e?(v=Tn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);K=s,s=xa(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function zt(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne,Xe,Ge,In=a*77+61,ps=R[In];if(ps)return a=ps.nextPos,ps.result;if(s=a,t.charCodeAt(a)===64?(o=mt,a++):(o=e,P===0&&O(Xi)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=qe(),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();if(t.charCodeAt(a)===40?(v=A,a++):(v=e,P===0&&O(Et)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(w=za(),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();if(t.charCodeAt(a)===41?(F=_,a++):(F=e,P===0&&O(xr)),F!==e){for(D=a,B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.charCodeAt(a)===58?(Q=re,a++):(Q=e,P===0&&O(wt)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();ne=Ue(),ne!==e?D=ne:(a=D,D=e)}else a=D,D=e;for(D===e&&(D=null),B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.charCodeAt(a)===123?(Q=S,a++):(Q=e,P===0&&O(tt)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();for(ne=cr(),ne===e&&(ne=null),Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();t.charCodeAt(a)===125?(Ge=T,a++):(Ge=e,P===0&&O(Ut)),Ge!==e?(K=s,s=to(p,u,g,w,D,ne)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[In]={nextPos:a,result:s},s}function Mo(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe=a*77+62,ne=R[xe];if(ne)return a=ne.nextPos,ne.result;if(s=a,t.substr(a,2)===Ht?(o=Ht,a+=2):(o=e,P===0&&O(xn)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=za(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();if(t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e){for(b=a,w=[],M=f();M!==e;)w.push(M),M=f();if(t.charCodeAt(a)===58?(M=re,a++):(M=e,P===0&&O(wt)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();D=Ue(),D!==e?b=D:(a=b,b=e)}else a=b,b=e;for(b===e&&(b=null),w=[],M=f();M!==e;)w.push(M),M=f();if(t.charCodeAt(a)===123?(M=S,a++):(M=e,P===0&&O(tt)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();for(D=cr(),D===e&&(D=null),B=[],Q=f();Q!==e;)B.push(Q),Q=f();t.charCodeAt(a)===125?(Q=T,a++):(Q=e,P===0&&O(Ut)),Q!==e?(K=s,s=$a(u,b,D)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[xe]={nextPos:a,result:s},s}function So(){var s,o,p,u,g,v,b,w,M,F,D=a*77+63,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.charCodeAt(a)===91?(o=Nt,a++):(o=e,P===0&&O(us)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=$r(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=g,g=ba(v)}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=$r(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,P===0&&O(pt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=g,g=ba(v)}else a=g,g=e;for(g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,P===0&&O(os)),v!==e?(K=s,s=ro(u)):(a=s,s=e)}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Fo(){var s,o,p,u,g,v,b,w,M,F,D,B,Q,xe,ne=a*77+64,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,P===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],g=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,P===0&&O(wt)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=$r(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,P===0&&O(pt)),B===e&&(t.charCodeAt(a)===59?(B=at,a++):(B=e,P===0&&O(fs))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=g,g=Aa(v,F)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;for(;g!==e;)if(u.push(g),g=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,P===0&&O(wt)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=$r(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,P===0&&O(pt)),B===e&&(t.charCodeAt(a)===59?(B=at,a++):(B=e,P===0&&O(fs))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=g,g=Aa(v,F)}else a=g,g=e;else a=g,g=e}else a=g,g=e}else a=g,g=e;t.charCodeAt(a)===125?(g=T,a++):(g=e,P===0&&O(Ut)),g!==e?(K=s,s=so(u)):(a=s,s=e)}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Ue(){var s,o=a*77+65,p=R[o];return p?(a=p.nextPos,p.result):(s=Oo(),s===e&&(s=jt()),R[o]={nextPos:a,result:s},s)}function Oo(){var s,o,p,u,g,v,b,w,M,F,D=a*77+66,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===Ht?(o=Ht,a+=2):(o=e,P===0&&O(xn)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Br(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();if(t.charCodeAt(a)===41?(v=_,a++):(v=e,P===0&&O(xr)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.substr(a,2)===oe?(w=oe,a+=2):(w=e,P===0&&O(Os)),w!==e){for(M=[],F=f();F!==e;)M.push(F),F=f();F=Ue(),F!==e?(K=s,s=no(u,F)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Br(){var s,o,p,u,g,v,b=a*77+67,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Ue(),o!==e){for(p=[],u=a,g=C(),g!==e?(v=Ue(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,g=C(),g!==e?(v=Ue(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);K=s,s=ao(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function jt(){var s,o,p,u,g,v,b,w,M=a*77+68,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=qe(),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(t.charCodeAt(a)===60?(u=Ye,a++):(u=e,P===0&&O(yn)),u!==e){for(g=[],v=y();v!==e;)g.push(v),v=y();if(v=Ue(),v!==e){for(b=[],w=y();w!==e;)b.push(w),w=y();t.charCodeAt(a)===62?(w=Or,a++):(w=e,P===0&&O(Qn)),w!==e?(K=s,s=io(o,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return s===e&&(s=a,o=qe(),o!==e&&(K=s,o=lo(o)),s=o),R[M]={nextPos:a,result:s},s}function qe(){var s,o,p,u,g=a*77+69,v=R[g];if(v)return a=v.nextPos,v.result;if(s=a,Kn.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,P===0&&O(Gi)),o!==e){for(p=[],Jn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(sa));u!==e;)p.push(u),Jn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,P===0&&O(sa));K=s,s=i()}else a=s,s=e;return R[g]={nextPos:a,result:s},s}function Va(){var s,o,p,u,g,v,b=a*77+70,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=qe(),o!==e){for(p=[],u=a,t.charCodeAt(a)===58?(g=re,a++):(g=e,P===0&&O(wt)),g!==e?(v=qe(),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,t.charCodeAt(a)===58?(g=re,a++):(g=e,P===0&&O(wt)),g!==e?(v=qe(),v!==e?(g=[g,v],u=g):(a=u,u=e)):(a=u,u=e);K=s,s=X()}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function C(){var s,o,p,u,g,v=a*77+71,b=R[v];if(b)return a=b.nextPos,b.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();if(t.charCodeAt(a)===44?(p=V,a++):(p=e,P===0&&O(pt)),p!==e){for(u=[],g=f();g!==e;)u.push(g),g=f();o=[o,p,u],s=o}else a=s,s=e;if(s===e)if(s=[],o=f(),o!==e)for(;o!==e;)s.push(o),o=f();else s=e;return R[v]={nextPos:a,result:s},s}function Ae(){var s,o,p,u,g,v,b=a*77+72,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,P===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=cr(),u===e&&(u=null),g=[],v=f();v!==e;)g.push(v),v=f();t.charCodeAt(a)===125?(v=T,a++):(v=e,P===0&&O(Ut)),v!==e?(K=s,s=Hs(u)):(a=s,s=e)}else a=s,s=e;return s===e&&(s=Lr()),R[b]={nextPos:a,result:s},s}function ie(){var s,o=a*77+73,p=R[o];return p?(a=p.nextPos,p.result):(t.substr(a,2)===bt?(s=bt,a+=2):(s=e,P===0&&O(Zi)),s===e&&(_i.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,P===0&&O(Qi))),R[o]={nextPos:a,result:s},s)}function l(){var s,o,p=a*77+74,u=R[p];return u?(a=u.nextPos,u.result):(s=a,P++,t.length>a?(o=t.charAt(a),a++):(o=e,P===0&&O(sr)),P--,o===e?s=void 0:(a=s,s=e),s===e&&(s=ie()),R[p]={nextPos:a,result:s},s)}function f(){var s,o=a*77+75,p=R[o];return p?(a=p.nextPos,p.result):(ki.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,P===0&&O(Yi)),R[o]={nextPos:a,result:s},s)}function y(){var s,o=a*77+76,p=R[o];return p?(a=p.nextPos,p.result):(rr.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,P===0&&O(el)),R[o]={nextPos:a,result:s},s)}function h(s,o,p){const u={type:s};o.children=p;for(const v of Object.keys(o))o[v]!==void 0&&(u[v]=o[v]);const g=qt();return u.loc={start:g.start.offset,end:g.end.offset-1},u}if(Us=d(),Us!==e&&a===t.length)return Us;throw Us!==e&&a`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>Lf(n)).join(", "),e=Lf(t.result);return`@(${r}) { ${e} }`}}}function Fu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return Jv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Fu(t.inner):r=Jv("any"),$b(t.name,[r])}}throw new au(`Unknown type: '${Lf(t)}'`)}else{const r=t.args.map(e=>Fu(e));return bb(r,Fu(t.result))}}function Ab(t){switch(t.type){case"def":{t.varType!=null&&Fu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Fu(r.argType);t.retType!=null&&Fu(t.retType);break}}return t}function Cb(t){for(const r of t)st(r,Ab);return t}function Bf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=Bf(n.expr.children)),r.push(n);else{if(e.length>0)throw new au("invalid attribute.");switch(n.type){case"fn":{n.children=Bf(n.children);break}case"block":{n.statements=Bf(n.statements);break}}r.push(n)}if(e.length>0)throw new au("invalid attribute.");return r}function _b(t){if(gb(t)&&kd(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const c of r)switch(c.type){case"callChain":{n=db(n,c.args,c.loc);break}case"indexChain":{n=yb(n,c.index,c.loc);break}case"propChain":{n=wb(n,c.name,c.loc);break}}return n}return t}function kb(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:qo(t.left),right:qo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:qo(t.left),right:qo(t.right)}),priority:3}};function Eb(t){const r=t.operators.map(n=>{const c=Pb[n];if(c==null)throw new au(`No such operator: ${n}.`);return c});let e=Hf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?Eb(e):e);return t}var Xa;let Sb=(Xa=class{constructor(){be(this,"plugins");this.plugins={validate:[xb,Cb],transform:[Bf,kb,Mb]}}static parse(r){return Xa.instance==null&&(Xa.instance=new Xa),Xa.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=Kv(r,{startRule:"Preprocess"});e=Kv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new au(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`,n):new au(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`,n):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}},be(Xa,"instance"),Xa);const Fb="0.16.0",Ob={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { - <: if (i % 15 == 0) "FizzBuzz" - elif (i % 3 == 0) "Fizz" - elif (i % 5 == 0) "Buzz" - else i - }`};let Oh=[],Xu=null;function Nb(t){return Oh=Sb.parse(t),JSON.stringify(Oh,null," ")}async function Tb(t){Xu==null||Xu.abort(),Xu=new is({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:Eh(r,!0),print:!0})},err:t.err,log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:Eh(e.val,!0),print:!1});break}}});try{await Xu.exec(Oh)}catch(r){t.err(r)}}const Ib=Object.freeze(Object.defineProperty({__proto__:null,exec:Tb,parse:Nb,samples:Ob,version:Fb},Symbol.toStringTag,{value:"Module"}));function Uf(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Uf=function(e){return typeof e}:Uf=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uf(t)}function Ed(t,r,e){var n=e.value;if(typeof n!="function")throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(Uf(n)));var c=!1;return{configurable:!0,get:function(){if(c||this===t.prototype||this.hasOwnProperty(r)||typeof n!="function")return n;var $=n.bind(this);return c=!0,Object.defineProperty(this,r,{configurable:!0,get:function(){return $},set:function(m){n=m,delete this[r]}}),c=!1,$},set:function($){n=$}}}function jb(t){var r;return typeof Reflect<"u"&&typeof Reflect.ownKeys=="function"?r=Reflect.ownKeys(t.prototype):(r=Object.getOwnPropertyNames(t.prototype),typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t.prototype)))),r.forEach(function(e){if(e!=="constructor"){var n=Object.getOwnPropertyDescriptor(t.prototype,e);typeof n.value=="function"&&Object.defineProperty(t.prototype,e,Ed(t,e,n))}}),t}function ct(){return arguments.length===1?jb.apply(void 0,arguments):Ed.apply(void 0,arguments)}let Md=class Sd extends Error{constructor(e,n){super(e);be(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,Sd)}},iu=class extends Md{constructor(r,e){super(r,e)}},er=class extends Md{constructor(r,e){super(r,e)}},Rb=class extends er{constructor(r,e){super(r,e)}};var vu=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,d=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};let Ci=class Fd{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new Fd(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r);return this.log("read",{var:r,val:n}),n}throw new er(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new er(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){c.set(r,e),this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new er(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};vu([ct],Ci.prototype,"log",null);vu([ct],Ci.prototype,"onUpdated",null);vu([ct],Ci.prototype,"createChildScope",null);vu([ct],Ci.prototype,"get",null);vu([ct],Ci.prototype,"getAll",null);vu([ct],Ci.prototype,"add",null);vu([ct],Ci.prototype,"assign",null);let Mf;const Db=new Uint8Array(16);function Lb(){if(!Mf&&(Mf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mf(Db)}const zr=[];for(let t=0;t<256;++t)zr.push((t+256).toString(16).slice(1));function Bb(t,r=0){return(zr[t[r+0]]+zr[t[r+1]]+zr[t[r+2]]+zr[t[r+3]]+"-"+zr[t[r+4]]+zr[t[r+5]]+"-"+zr[t[r+6]]+zr[t[r+7]]+"-"+zr[t[r+8]]+zr[t[r+9]]+"-"+zr[t[r+10]]+zr[t[r+11]]+zr[t[r+12]]+zr[t[r+13]]+zr[t[r+14]]+zr[t[r+15]]).toLowerCase()}const Hb=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xv={randomUUID:Hb};function Ub(t,r,e){if(Xv.randomUUID&&!r&&!t)return Xv.randomUUID();t=t||{};const n=t.random||(t.rng||Lb)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return Bb(n)}const Dt={type:"null"},cn={type:"bool",value:!0},Zs={type:"bool",value:!1},Oe=t=>({type:"num",value:t}),Qt=t=>({type:"str",value:t}),Ou=t=>({type:"bool",value:t}),Lp=t=>({type:"obj",value:t}),Qr=t=>({type:"arr",value:t}),qb=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),we=t=>({type:"fn",native:t}),zb=t=>({type:"return",value:t}),Vb=()=>({type:"break",value:null}),Wb=()=>({type:"continue",value:null}),Kb=t=>t.type==="return"?t.value:t;function rn(t){if(t==null)throw new er("Expect anything, but got nothing.")}function ws(t){if(t==null)throw new er("Expect boolean, but got nothing.");if(t.type!=="bool")throw new er(`Expect boolean, but got ${t.type}.`)}function vi(t){if(t==null)throw new er("Expect function, but got nothing.");if(t.type!=="fn")throw new er(`Expect function, but got ${t.type}.`)}function Tr(t){if(t==null)throw new er("Expect string, but got nothing.");if(t.type!=="str")throw new er(`Expect string, but got ${t.type}.`)}function Pe(t){if(t==null)throw new er("Expect number, but got nothing.");if(t.type!=="num")throw new er(`Expect number, but got ${t.type}.`)}function li(t){if(t==null)throw new er("Expect object, but got nothing.");if(t.type!=="obj")throw new er(`Expect object, but got ${t.type}.`)}function Nu(t){if(t==null)throw new er("Expect array, but got nothing.");if(t.type!=="arr")throw new er(`Expect array, but got ${t.type}.`)}function Jb(t){return t.type==="str"}function Xb(t){return t.type==="num"}function Gb(t){return t.type==="obj"}function Zb(t){return t.type==="arr"}function Nh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function Th(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>Th(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Ih(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Ih(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=Ih(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function jh(t){if(t===null)return Dt;if(typeof t=="boolean")return Ou(t);if(typeof t=="string")return Qt(t);if(typeof t=="number")return Oe(t);if(Array.isArray(t))return Qr(t.map(r=>jh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,jh(n));return Lp(r)}return Dt}const Qb={help:Qt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Qt("0.14.1"),"Core:ai":Qt("kawaii"),"Core:not":we(([t])=>(ws(t),t.value?Zs:cn)),"Core:eq":we(([t,r])=>(rn(t),rn(r),Nh(t,r)?cn:Zs)),"Core:neq":we(([t,r])=>(rn(t),rn(r),Nh(t,r)?Zs:cn)),"Core:and":we(([t,r])=>(ws(t),t.value?(ws(r),r.value?cn:Zs):Zs)),"Core:or":we(([t,r])=>(ws(t),t.value?cn:(ws(r),r.value?cn:Zs))),"Core:add":we(([t,r])=>(Pe(t),Pe(r),Oe(t.value+r.value))),"Core:sub":we(([t,r])=>(Pe(t),Pe(r),Oe(t.value-r.value))),"Core:mul":we(([t,r])=>(Pe(t),Pe(r),Oe(t.value*r.value))),"Core:pow":we(([t,r])=>{Pe(t),Pe(r);const e=t.value**r.value;if(isNaN(e))throw new er("Invalid operation.");return Oe(e)}),"Core:div":we(([t,r])=>{Pe(t),Pe(r);const e=t.value/r.value;if(isNaN(e))throw new er("Invalid operation.");return Oe(e)}),"Core:mod":we(([t,r])=>(Pe(t),Pe(r),Oe(t.value%r.value))),"Core:gt":we(([t,r])=>(Pe(t),Pe(r),t.value>r.value?cn:Zs)),"Core:lt":we(([t,r])=>(Pe(t),Pe(r),t.value(Pe(t),Pe(r),t.value>=r.value?cn:Zs)),"Core:lteq":we(([t,r])=>(Pe(t),Pe(r),t.value<=r.value?cn:Zs)),"Core:type":we(([t])=>(rn(t),Qt(t.type))),"Core:to_str":we(([t])=>(rn(t),t.type==="str"?t:t.type==="num"?Qt(t.value.toString()):Qt("?"))),"Core:range":we(([t,r])=>(Pe(t),Pe(r),t.valueOe(n+t.value))):t.value>r.value?Qr(Array.from({length:t.value-r.value+1},(e,n)=>Oe(t.value-n))):Qr([t]))),"Util:uuid":we(()=>Qt(Ub())),"Json:stringify":we(([t])=>(rn(t),Qt(JSON.stringify(Ih(t))))),"Json:parse":we(([t])=>(Tr(t),jh(JSON.parse(t.value)))),"Json:parsable":we(([t])=>{Tr(t);try{JSON.parse(t.value)}catch{return Ou(!1)}return Ou(!0)}),"Date:now":we(()=>Oe(Date.now())),"Date:year":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":we(([t])=>(Tr(t),Oe(new Date(t.value).getTime()))),"Math:Infinity":Oe(1/0),"Math:E":Oe(Math.E),"Math:LN2":Oe(Math.LN2),"Math:LN10":Oe(Math.LN10),"Math:LOG2E":Oe(Math.LOG2E),"Math:LOG10E":Oe(Math.LOG10E),"Math:PI":Oe(Math.PI),"Math:SQRT1_2":Oe(Math.SQRT1_2),"Math:SQRT2":Oe(Math.SQRT2),"Math:abs":we(([t])=>(Pe(t),Oe(Math.abs(t.value)))),"Math:acos":we(([t])=>(Pe(t),Oe(Math.acos(t.value)))),"Math:acosh":we(([t])=>(Pe(t),Oe(Math.acosh(t.value)))),"Math:asin":we(([t])=>(Pe(t),Oe(Math.asin(t.value)))),"Math:asinh":we(([t])=>(Pe(t),Oe(Math.asinh(t.value)))),"Math:atan":we(([t])=>(Pe(t),Oe(Math.atan(t.value)))),"Math:atanh":we(([t])=>(Pe(t),Oe(Math.atanh(t.value)))),"Math:atan2":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.atan2(t.value,r.value)))),"Math:cbrt":we(([t])=>(Pe(t),Oe(Math.cbrt(t.value)))),"Math:ceil":we(([t])=>(Pe(t),Oe(Math.ceil(t.value)))),"Math:clz32":we(([t])=>(Pe(t),Oe(Math.clz32(t.value)))),"Math:cos":we(([t])=>(Pe(t),Oe(Math.cos(t.value)))),"Math:cosh":we(([t])=>(Pe(t),Oe(Math.cosh(t.value)))),"Math:exp":we(([t])=>(Pe(t),Oe(Math.exp(t.value)))),"Math:expm1":we(([t])=>(Pe(t),Oe(Math.expm1(t.value)))),"Math:floor":we(([t])=>(Pe(t),Oe(Math.floor(t.value)))),"Math:fround":we(([t])=>(Pe(t),Oe(Math.fround(t.value)))),"Math:hypot":we(([t])=>{Nu(t);const r=[];for(const e of t.value)Pe(e),r.push(e.value);return Oe(Math.hypot(...r))}),"Math:imul":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.imul(t.value,r.value)))),"Math:log":we(([t])=>(Pe(t),Oe(Math.log(t.value)))),"Math:log1p":we(([t])=>(Pe(t),Oe(Math.log1p(t.value)))),"Math:log10":we(([t])=>(Pe(t),Oe(Math.log10(t.value)))),"Math:log2":we(([t])=>(Pe(t),Oe(Math.log2(t.value)))),"Math:max":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.max(t.value,r.value)))),"Math:min":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.min(t.value,r.value)))),"Math:pow":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.pow(t.value,r.value)))),"Math:round":we(([t])=>(Pe(t),Oe(Math.round(t.value)))),"Math:sign":we(([t])=>(Pe(t),Oe(Math.sign(t.value)))),"Math:sin":we(([t])=>(Pe(t),Oe(Math.sin(t.value)))),"Math:sinh":we(([t])=>(Pe(t),Oe(Math.sinh(t.value)))),"Math:sqrt":we(([t])=>{Pe(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new er("Invalid operation.");return Oe(r)}),"Math:tan":we(([t])=>(Pe(t),Oe(Math.tan(t.value)))),"Math:tanh":we(([t])=>(Pe(t),Oe(Math.tanh(t.value)))),"Math:trunc":we(([t])=>(Pe(t),Oe(Math.trunc(t.value)))),"Math:rnd":we(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Oe(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Oe(Math.random())),"Math:gen_rng":we(([t])=>{if(rn(t),t.type!=="num"&&t.type!=="str")return Dt;const r=Np(t.value.toString());return we(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Oe(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Oe(r()))}),"Num:to_hex":we(([t])=>(Pe(t),Qt(t.value.toString(16)))),"Num:from_hex":we(([t])=>(Tr(t),Oe(parseInt(t.value,16)))),"Str:lf":Qt(` -`),"Str:lt":we(([t,r])=>(Tr(t),Tr(r),t.value(Tr(t),Tr(r),t.value>r.value?Oe(-1):t.value===r.value?Oe(0):Oe(1))),"Obj:keys":we(([t])=>(li(t),Qr(Array.from(t.value.keys()).map(r=>Qt(r))))),"Obj:vals":we(([t])=>(li(t),Qr(Array.from(t.value.values())))),"Obj:kvs":we(([t])=>(li(t),Qr(Array.from(t.value.entries()).map(([r,e])=>Qr([Qt(r),e]))))),"Obj:get":we(([t,r])=>(li(t),Tr(r),t.value.get(r.value)??Dt)),"Obj:set":we(([t,r,e])=>(li(t),Tr(r),rn(e),t.value.set(r.value,e),Dt)),"Obj:has":we(([t,r])=>(li(t),Tr(r),Ou(t.value.has(r.value)))),"Obj:copy":we(([t])=>(li(t),Lp(new Map(t.value)))),"Async:interval":we(async([t,r,e],n)=>{Pe(t),vi(r),e&&(ws(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.call(r,[])},t.value),d=()=>{clearInterval(c)};return n.registerAbortHandler(d),we(([],$)=>{clearInterval(c),$.unregisterAbortHandler(d)})}),"Async:timeout":we(async([t,r],e)=>{Pe(t),vi(r);const n=setTimeout(()=>{e.call(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),we(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(c)})})},mu={num:{to_str:t=>we(async(r,e)=>Qt(t.value.toString()))},str:{to_num:t=>we(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?Dt:Oe(n)}),len:t=>Oe(jp(t.value)),replace:t=>we(async([r,e],n)=>(Tr(r),Tr(e),Qt(t.value.split(r.value).join(e.value)))),index_of:t=>we(async([r],e)=>(Tr(r),Oe(Dp(t.value,r.value)))),incl:t=>we(async([r],e)=>(Tr(r),t.value.includes(r.value)?cn:Zs)),trim:t=>we(async(r,e)=>Qt(t.value.trim())),upper:t=>we(async(r,e)=>Qt(t.value.toUpperCase())),lower:t=>we(async(r,e)=>Qt(t.value.toLowerCase())),split:t=>we(async([r],e)=>(r&&Tr(r),Qr(r?t.value.split(r?r.value:"").map(n=>Qt(n)):Uu(t.value).map(n=>Qt(n))))),slice:t=>we(async([r,e],n)=>(Pe(r),Pe(e),Qt(Rp(t.value,r.value,e.value)))),pick:t=>we(async([r],e)=>{Pe(r);const c=Uu(t.value)[r.value];return c?Qt(c):Dt})},arr:{len:t=>Oe(t.value.length),push:t=>we(async([r],e)=>(rn(r),t.value.push(r),t)),unshift:t=>we(async([r],e)=>(rn(r),t.value.unshift(r),t)),pop:t=>we(async(r,e)=>t.value.pop()??Dt),shift:t=>we(async(r,e)=>t.value.shift()??Dt),concat:t=>we(async([r],e)=>(Nu(r),Qr(t.value.concat(r.value)))),slice:t=>we(async([r,e],n)=>(Pe(r),Pe(e),Qr(t.value.slice(r.value,e.value)))),join:t=>we(async([r],e)=>(r&&Tr(r),Qt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>we(async([r],e)=>{vi(r);const n=t.value.map(async(c,d)=>await e.call(r,[c,Oe(d)]));return Qr(await Promise.all(n))}),filter:t=>we(async([r],e)=>{vi(r);const n=[];for(let c=0;cwe(async([r,e],n)=>{vi(r);const c=e!=null;let d=c?e:t.value[0];for(let $=c?0:1;$we(async([r],e)=>{vi(r);for(let n=0;nwe(async([r],e)=>(rn(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Zs:(c=>c.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?cn:Zs)),reverse:t=>we(async(r,e)=>(t.value.reverse(),Dt)),copy:t=>we(async(r,e)=>Qr([...t.value])),sort:t=>we(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const x=Math.floor(d.length/2),m=await n(d.slice(0,x),$),A=await n(d.slice(x),$);return c(m,A,$)},c=async(d,$,x)=>{const m=[];let A=0,_=0;for(;A=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};const Od=300,Yb=Od-1;let ks=class{constructor(r,e){be(this,"vars");be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);this.opts=e??{};const n={print:we(([c])=>{rn(c),this.opts.out&&this.opts.out(c)}),readline:we(async c=>{const d=c[0];if(Tr(d),this.opts.in==null)return Dt;const $=await this.opts.in(d.value);return Qt($)})};this.vars={...r,...Qb,...n},this.scope=new Ci([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,d)=>{switch(c){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(r==null||r.length===0)return;await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}async execFn(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(d=>e(d));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const d={};for(const[$,x]of c.value.entries())d[$]=e(x);return d}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{const c=await this._eval(n.expr,e);e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this._fn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??Dt;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],e[d]);const c=r.scope.createChildScope(n);return Kb(await this._run(r.statements,c))}}async _eval(r,e){if(this.stop)return Dt;if(this.stepCount%Od===Yb&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new er("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);vi(n);const c=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if(ws(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const d=await this._eval(c.cond,e);if(ws(d),d.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return Dt}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const d=await this._eval(c.q,e);if(Nh(n,d))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):Dt}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return Dt}case"for":{if(r.times){const n=await this._eval(r.times,e);Pe(n);for(let c=0;c0){const c=[];for(const d of r.attr)c.push({name:d.name,value:await this._eval(d.value,e)});n.attr=c}return e.add(r.name,n),Dt}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),Dt}case"addAssign":{const n=await this._eval(r.dest,e);Pe(n);const c=await this._eval(r.expr,e);return Pe(c),await this.assign(e,r.dest,Oe(n.value+c.value)),Dt}case"subAssign":{const n=await this._eval(r.dest,e);Pe(n);const c=await this._eval(r.expr,e);return Pe(c),await this.assign(e,r.dest,Oe(n.value-c.value)),Dt}case"null":return Dt;case"bool":return Ou(r.value);case"num":return Oe(r.value);case"str":return Qt(r.value);case"arr":return Qr(await Promise.all(r.value.map(async n=>await this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return Lp(n)}case"prop":{const n=await this._eval(r.target,e);if(Gb(n))return n.value.has(r.name)?n.value.get(r.name):Dt;if(Xb(n)){if(Object.hasOwn(mu.num,r.name))return mu.num[r.name](n);throw new er(`No such prop (${r.name}) in ${n.type}.`)}else if(Jb(n)){if(Object.hasOwn(mu.str,r.name))return mu.str[r.name](n);throw new er(`No such prop (${r.name}) in ${n.type}.`)}else if(Zb(n)){if(Object.hasOwn(mu.arr,r.name))return mu.arr[r.name](n);throw new er(`No such prop (${r.name}) in ${n.type}.`)}else throw new er(`Cannot read prop (${r.name}) of ${n.type}.`)}case"index":{const n=await this._eval(r.target,e);Nu(n);const c=await this._eval(r.index,e);Pe(c);const d=n.value[c.value];if(d===void 0)throw new Rb(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return d}case"not":{const n=await this._eval(r.expr,e);return ws(n),Ou(!n.value)}case"fn":return qb(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const d=await this._eval(c,e);let $="";d.type==="str"?$=d.value:d.type==="num"&&($=d.value.toString()),n+=$}return Qt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),zb(n)}case"break":return this.log("block:break",{scope:e.name}),Vb();case"continue":return this.log("block:continue",{scope:e.name}),Wb();case"ns":return Dt;case"meta":return Dt;case"and":{const n=await this._eval(r.left,e);if(ws(n),n.value){const c=await this._eval(r.right,e);return ws(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if(ws(n),n.value)return n;{const c=await this._eval(r.right,e);return ws(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=Dt;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r);Nu(c);const d=await this._eval(e.index,r);Pe(d),c.value[d.value]=n}else if(e.type==="prop"){const c=await this._eval(e.target,r);li(c),c.value.set(e.name,n)}else throw new er("The left-hand side of an assignment expression must be a variable or a property/index access.")}};nn([ct],ks.prototype,"exec",null);nn([ct],ks.prototype,"execFn",null);nn([ct],ks.prototype,"log",null);nn([ct],ks.prototype,"collectNs",null);nn([ct],ks.prototype,"collectNsMember",null);nn([ct],ks.prototype,"_fn",null);nn([ct],ks.prototype,"_eval",null);nn([ct],ks.prototype,"_run",null);nn([ct],ks.prototype,"registerAbortHandler",null);nn([ct],ks.prototype,"unregisterAbortHandler",null);nn([ct],ks.prototype,"abort",null);nn([ct],ks.prototype,"assign",null);nn([ct],ks,"collectMetadata",null);function e1(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function eu(t,r,e,n){var c=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(c,eu.prototype),c.expected=r,c.found=e,c.location=n,c.name="SyntaxError",c}e1(eu,Error);function Kc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}eu.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` -`+m+` | -`+d.line+" | "+A+` -`+m+" | "+Kc("",c.column-1," ")+Kc("",k,"^")}else r+=` - at `+$}return r};eu.buildMessage=function(t,r){var e={literal:function(A){return'"'+c(A.text)+'"'},class:function(A){var _=A.parts.map(function(k){return Array.isArray(k)?d(k[0])+"-"+d(k[1]):d(k)});return"["+(A.inverted?"^":"")+_.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(A){return A.description}};function n(A){return A.charCodeAt(0).toString(16).toUpperCase()}function c(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(_){return"\\x0"+n(_)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(_){return"\\x"+n(_)})}function d(A){return A.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(_){return"\\x0"+n(_)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(_){return"\\x"+n(_)})}function $(A){return e[A.type](A)}function x(A){var _=A.map($),k,S;if(_.sort(),_.length>0){for(k=1,S=1;k<_.length;k++)_[k-1]!==_[k]&&(_[S]=_[k],S++);_.length=S}switch(_.length){case 1:return _[0];case 2:return _[0]+" or "+_[1];default:return _.slice(0,-1).join(", ")+", or "+_[_.length-1]}}function m(A){return A?'"'+c(A)+'"':"end of input"}return"Expected "+x(t)+" but "+m(r)+" found."};function Gv(t,r){r=r!==void 0?r:{};var e={},n=r.grammarSource,c={Preprocess:O,Main:ka},d=O,$="//",x="/*",m="*/",A="(",_=")",k="::",S="{",T="}",G="###",ee="let",re=":",ge="=",q="var",U="<:",L="#[",H="]",W="each",V=",",J="for",Y="return",ue="loop",de="break",le="continue",Te="+=",ze="-=",dt="\\",Ke="||",ot="&&",je="==",lt="!=",Ft="<=",Ot=">=",Ye="<",Or=">",Bt="+",wr="-",Pt="*",yr="^",Nr="/",kr="%",Mr="!",Nt="[",z=".",Z="if",se="elif",ve="else",ye="match",oe="=>",Ne="eval",me="`",$e='"',he="'",Le='\\"',Re="\\'",He="true",We="false",Ze="null",nt=";",at="@",mt="@(",Ht=`\r -`,bt=/^[A-Z0-9_:]/i,Zt=/^[^`{]/,Es=/^[{}`]/,Jr=/^[+\-]/,Tt=/^[1-9]/,ht=/^[0-9]/,Rt=/^[A-Z_]/i,Kn=/^[A-Z0-9_]/i,Jn=/^[\r\n]/,_i=/^[ \t\r\n]/,ki=/^[ \t]/,rr=oo(),sr=te("//",!1),Pi=te("/*",!1),dn=te("*/",!1),mr=te("(",!1),Et=te(")",!1),xr=te("::",!1),nr=te("{",!1),tt=te("}",!1),Ut=te("###",!1),jr=te("let",!1),yt=te(":",!1),wt=te("=",!1),ls=te("var",!1),Ei=te("<:",!1),Mi=te("#[",!1),Ms=te("]",!1),os=te("each",!1),xt=te(",",!1),pt=te("for",!1),Ss=te("return",!1),ur=qt([["A","Z"],["0","9"],"_",":"],!1,!0),fr=te("loop",!1),Si=te("break",!1),Fi=te("continue",!1),Oi=te("+=",!1),Ni=te("-=",!1),Xn=te("\\",!1),Gn=te("||",!1),Ti=te("&&",!1),Ii=te("==",!1),ji=te("!=",!1),Ri=te("<=",!1),Di=te(">=",!1),Zn=te("<",!1),yn=te(">",!1),Qn=te("+",!1),Li=te("-",!1),Yn=te("*",!1),ea=te("^",!1),Bi=te("/",!1),Hi=te("%",!1),Ui=te("!",!1),wn=te("[",!1),us=te(".",!1),mn=te("if",!1),qi=te("elif",!1),zi=te("else",!1),Vi=te("match",!1),Fs=te("=>",!1),Os=te("eval",!1),Ns=te("`",!1),Wi=qt(["`","{"],!0,!1),Ts=qt(["{","}","`"],!1,!1),Is=te('"',!1),js=te("'",!1),Rs=te('\\"',!1),Ds=te("\\'",!1),Ls=qt(["+","-"],!1,!1),ta=qt([["1","9"]],!1,!1),Mt=qt([["0","9"]],!1,!1),ra=te("true",!1),ar=te("false",!1),Ki=te("null",!1),Bs=te(";",!1),Ji=te("@",!1),fs=te("@(",!1),Xi=qt([["A","Z"],"_"],!1,!0),xn=qt([["A","Z"],["0","9"],"_"],!1,!0),Gi=te(`\r -`,!1),sa=qt(["\r",` -`],!1,!1),Zi=qt([" "," ","\r",` -`],!1,!1),Qi=qt([" "," "],!1,!1),Yi=function(l){return l.join("")},el=function(){return P()},tl=function(){return P()},rl=function(){return""},sl=function(){return""},nl=function(l){return l??[]},na=function(l,f){return f},al=function(l,f){return[l,...f]},$n=function(l,f){return f},il=function(l,f){return[l,...f]},bn=function(l,f){return f},ll=function(l,f){return[l,...f]},aa=function(l){return l},ol=function(l,f){return ie("ns",{name:l,members:f})},ul=function(l,f){return ie("meta",{name:l,value:f})},fl=function(l){return ie("meta",{name:null,value:l})},cl=function(l,f,y){return ie("def",{name:l,varType:f,expr:y,mut:!1,attr:[]})},hl=function(l,f,y){return ie("def",{name:l,varType:f,expr:y,mut:!0,attr:[]})},pl=function(l){return ie("identifier",{name:"print",chain:[ie("callChain",{args:[l]})]})},vl=function(l,f){return ie("attr",{name:l,value:f??ie("bool",{value:!0})})},gl=function(l,f,y){return ie("each",{var:l,items:f,for:y})},dl=function(l,f,y){return ie("each",{var:l,items:f,for:y})},yl=function(l,f){return f},wl=function(l,f,y,h){return ie("for",{var:l,from:f??ie("num",{value:0}),to:y,for:h})},ml=function(l,f){return f},xl=function(l,f,y,h){return ie("for",{var:l,from:f??ie("num",{value:0}),to:y,for:h})},$l=function(l,f){return ie("for",{times:l,for:f})},bl=function(l,f){return ie("for",{times:l,for:f})},Al=function(l){return ie("return",{expr:l})},Cl=function(l){return ie("loop",{statements:l})},_l=function(){return ie("break",{})},kl=function(){return ie("continue",{})},Pl=function(l,f,y){return f==="+="?ie("addAssign",{dest:l,expr:y}):f==="-="?ie("subAssign",{dest:l,expr:y}):ie("assign",{dest:l,expr:y})},ia=function(l,f,y){return{op:f,term:y}},El=function(l,f){return ie("infix",{operands:[l,...f.map(y=>y.term)],operators:f.map(y=>y.op)})},la=function(){return P()},Ml=function(l){return ie("not",{expr:l})},Sl=function(l,f){return{...l,chain:f}},Fl=function(l){return ie("callChain",{args:l??[]})},oa=function(l,f){return f},Ol=function(l,f){return[l,...f]},ua=function(l){return ie("indexChain",{index:l})},Nl=function(l){return ie("propChain",{name:l})},Tl=function(l,f,y,h){return ie("if",{cond:l,then:f,elseif:y??[],else:h})},Il=function(l,f){return[l,...f]},jl=function(l,f){return{cond:l,then:f}},Rl=function(l){return l},fa=function(l,f,y){return{q:f,a:y}},Dl=function(l,f,y){return ie("match",{about:l,qs:f??[],default:y})},ca=function(l){return ie("block",{statements:l})},Ll=function(l){return ie("identifier",{name:l})},Bl=function(l){return ie("tmpl",{tmpl:l})},Hl=function(l){return l.join("")},ha=function(l){return l},Ul=function(l){return ie("str",{value:l.join("")})},pa=function(l){return l},va=function(l){return ie("str",{value:l.join("")})},ql=function(){return'"'},ga=function(){return"'"},zl=function(){return ie("num",{value:parseFloat(P())})},Vl=function(){return ie("num",{value:parseFloat(P())})},Wl=function(){return ie("num",{value:parseInt(P(),10)})},Kl=function(){return ie("num",{value:parseInt(P(),10)})},Jl=function(){return ie("bool",{value:!0})},Xl=function(){return ie("bool",{value:!1})},Gl=function(){return ie("null",{})},da=function(l,f){return{k:l,v:f}},Zl=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ie("obj",{value:f})},ya=function(l){return l},wa=function(l){return ie("arr",{value:l})},Ql=function(l,f){return{name:l,argType:f}},ma=function(l,f){return[l,...f]},Yl=function(l,f,y,h,s,o){return(l.length>0||y.length>0)&&Us("Cannot use spaces before or after the function name."),ie("def",{name:f,expr:ie("fn",{args:h??[],retType:s},o??[]),mut:!1,attr:[]})},eo=function(l,f,y){return ie("fn",{args:l??[],retType:f},y??[])},xa=function(l){return l},to=function(l){return ie("arr",{value:l})},$a=function(l,f){return{k:l,v:f}},ba=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ie("obj",{value:f})},ro=function(l,f){return ie("fnTypeSource",{args:l??[],result:f})},Aa=function(l,f){return[l,...f]},so=function(l,f){return ie("namedTypeSource",{name:l,inner:f})},no=function(l){return ie("namedTypeSource",{name:l,inner:null})},ao=function(){return P()},io=function(){return P()},lo=function(l){return ie("block",{statements:l??[]})},i=0,X=0,Hs=[{line:1,column:1}],a=0,K=[],E=0,I={},Rr;if("startRule"in r){if(!(r.startRule in c))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=c[r.startRule]}function P(){return t.substring(X,i)}function R(){return qs(X,i)}function Us(l,f){throw f=f!==void 0?f:qs(X,i),Ca(l,f)}function te(l,f){return{type:"literal",text:l,ignoreCase:f}}function qt(l,f,y){return{type:"class",parts:l,inverted:f,ignoreCase:y}}function oo(){return{type:"any"}}function ae(){return{type:"end"}}function It(l){var f=Hs[l],y;if(f)return f;for(y=l-1;!Hs[y];)y--;for(f=Hs[y],f={line:f.line,column:f.column};ya&&(a=i,K=[]),K.push(l))}function Ca(l,f){return new eu(l,null,null,f)}function zs(l,f,y){return new eu(eu.buildMessage(l,f),l,f,y)}function O(){var l,f,y,h=i*76+0,s=I[h];if(s)return i=s.nextPos,s.result;for(l=i,f=[],y=_a();y!==e;)f.push(y),y=_a();return X=l,f=Yi(f),l=f,I[h]={nextPos:i,result:l},l}function _a(){var l,f,y=i*76+1,h=I[y];return h?(i=h.nextPos,h.result):(l=i,f=Ta(),f!==e&&(X=l,f=el()),l=f,l===e&&(l=i,f=Ws(),f!==e&&(X=l,f=tl()),l=f,l===e&&(l=uo(),l===e&&(t.length>i?(l=t.charAt(i),i++):(l=e,E===0&&N(rr))))),I[y]={nextPos:i,result:l},l)}function uo(){var l,f,y,h,s,o,p=i*76+2,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,2)===$?(f=$,i+=2):(f=e,E===0&&N(sr)),f!==e){for(y=[],h=i,s=i,E++,o=Va(),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,o=Va(),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);X=l,l=rl()}else i=l,l=e;if(l===e)if(l=i,t.substr(i,2)===x?(f=x,i+=2):(f=e,E===0&&N(Pi)),f!==e){for(y=[],h=i,s=i,E++,t.substr(i,2)===m?(o=m,i+=2):(o=e,E===0&&N(dn)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.substr(i,2)===m?(o=m,i+=2):(o=e,E===0&&N(dn)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);t.substr(i,2)===m?(h=m,i+=2):(h=e,E===0&&N(dn)),h!==e?(X=l,l=sl()):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function ka(){var l,f,y,h,s,o=i*76+3,p=I[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=C();y!==e;)f.push(y),y=C();for(y=Pa(),y===e&&(y=null),h=[],s=C();s!==e;)h.push(s),s=C();return X=l,l=nl(y),I[o]={nextPos:i,result:l},l}function Pa(){var l,f,y,h,s,o,p,u,g=i*76+4,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=An(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=An(),u!==e?(X=h,h=na(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=An(),u!==e?(X=h,h=na(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=al(f,y)}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function fo(){var l,f,y,h,s,o,p,u,g=i*76+5,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=Cn(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=Cn(),u!==e?(X=h,h=$n(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=Cn(),u!==e?(X=h,h=$n(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=il(f,y)}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function cs(){var l,f,y,h,s,o,p,u,g=i*76+6,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=cr(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=cr(),u!==e?(X=h,h=bn(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=cr(),u!==e?(X=h,h=bn(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=ll(f,y)}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function An(){var l,f=i*76+7,y=I[f];return y?(i=y.nextPos,y.result):(l=hs(),l===e&&(l=Ea(),l===e&&(l=cr())),I[f]={nextPos:i,result:l},l)}function Cn(){var l,f=i*76+8,y=I[f];return y?(i=y.nextPos,y.result):(l=$r(),l===e&&(l=qa(),l===e&&(l=hs())),I[f]={nextPos:i,result:l},l)}function cr(){var l,f=i*76+9,y=I[f];return y?(i=y.nextPos,y.result):(l=$r(),l===e&&(l=qa(),l===e&&(l=Ma(),l===e&&(l=po(),l===e&&(l=co(),l===e&&(l=Sa(),l===e&&(l=ho(),l===e&&(l=vo(),l===e&&(l=go(),l===e&&(l=yo(),l===e&&(l=wo(),l===e&&(l=De()))))))))))),I[f]={nextPos:i,result:l},l)}function De(){var l,f=i*76+10,y=I[f];return y?(i=y.nextPos,y.result):(l=mo(),l===e&&(l=Dr()),I[f]={nextPos:i,result:l},l)}function Dr(){var l,f=i*76+11,y=I[f];return y?(i=y.nextPos,y.result):(l=bo(),l===e&&(l=Eo(),l===e&&(l=Ar(),l===e&&(l=Lr()))),I[f]={nextPos:i,result:l},l)}function Lr(){var l,f,y,h,s,o,p=i*76+12,u=I[p];if(u)return i=u.nextPos,u.result;if(l=Co(),l===e&&(l=Pn(),l===e&&(l=Ta(),l===e&&(l=Ws(),l===e&&(l=Da(),l===e&&(l=Fn(),l===e&&(l=Ha(),l===e&&(l=Ua(),l===e&&(l=Po(),l===e&&(l=xo(),l===e&&(l=_o(),l===e)))))))))))if(l=i,t.charCodeAt(i)===40?(f=A,i++):(f=e,E===0&&N(mr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=De(),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e?(X=l,l=aa(h)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Ie(){var l,f=i*76+13,y=I[f];return y?(i=y.nextPos,y.result):(l=Da(),l===e&&(l=Ws(),l===e&&(l=Fn(),l===e&&(l=Tn(),l===e&&(l=za(),l===e&&(l=Ha()))))),I[f]={nextPos:i,result:l},l)}function hs(){var l,f,y,h,s,o,p,u,g,v,b=i*76+14,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===k?(f=k,i+=2):(f=e,E===0&&N(xr)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=Ue(),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;if(s!==e)if(t.charCodeAt(i)===123?(o=S,i++):(o=e,E===0&&N(nr)),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(u=fo(),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();t.charCodeAt(i)===125?(v=T,i++):(v=e,E===0&&N(tt)),v!==e?(X=l,l=ol(h,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function Ea(){var l,f,y,h,s,o,p=i*76+15,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,3)===G?(f=G,i+=3):(f=e,E===0&&N(Ut)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=Ue(),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();o=Ie(),o!==e?(X=l,l=ul(h,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===G?(f=G,i+=3):(f=e,E===0&&N(Ut)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();h=Ie(),h!==e?(X=l,l=fl(h)):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function $r(){var l,f,y,h,s,o,p,u,g,v=i*76+16,b=I[v];if(b)return i=b.nextPos,b.result;if(l=i,t.substr(i,3)===ee?(f=ee,i+=3):(f=e,E===0&&N(jr)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=Ue(),h!==e){for(s=i,o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===58?(p=re,i++):(p=e,E===0&&N(yt)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();g=zt(),g!==e?s=g:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===61?(p=ge,i++):(p=e,E===0&&N(wt)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();g=De(),g!==e?(X=l,l=cl(h,s,g)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===q?(f=q,i+=3):(f=e,E===0&&N(ls)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=Ue(),h!==e){for(s=i,o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===58?(p=re,i++):(p=e,E===0&&N(yt)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();g=zt(),g!==e?s=g:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===61?(p=ge,i++):(p=e,E===0&&N(wt)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();g=De(),g!==e?(X=l,l=hl(h,s,g)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return I[v]={nextPos:i,result:l},l}function Ma(){var l,f,y,h,s=i*76+17,o=I[s];if(o)return i=o.nextPos,o.result;if(l=i,t.substr(i,2)===U?(f=U,i+=2):(f=e,E===0&&N(Ei)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();h=De(),h!==e?(X=l,l=pl(h)):(i=l,l=e)}else i=l,l=e;return I[s]={nextPos:i,result:l},l}function co(){var l,f,y,h,s,o,p,u=i*76+18,g=I[u];if(g)return i=g.nextPos,g.result;if(l=i,t.substr(i,2)===L?(f=L,i+=2):(f=e,E===0&&N(Mi)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=Ue(),h!==e){for(s=i,o=[],p=C();p!==e;)o.push(p),p=C();for(p=Ie(),p!==e?s=p:(i=s,s=e),s===e&&(s=null),o=[],p=C();p!==e;)o.push(p),p=C();t.charCodeAt(i)===93?(p=H,i++):(p=e,E===0&&N(Ms)),p!==e?(X=l,l=vl(h,s)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return I[u]={nextPos:i,result:l},l}function Sa(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D=i*76+19,B=I[D];if(B)return i=B.nextPos,B.result;if(l=i,t.substr(i,4)===W?(f=W,i+=4):(f=e,E===0&&N(os)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(mr)),h!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,E===0&&N(jr)),s!==e){if(o=[],p=C(),p!==e)for(;p!==e;)o.push(p),p=C();else o=e;if(o!==e)if(p=Ue(),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();for(t.charCodeAt(i)===44?(g=V,i++):(g=e,E===0&&N(xt)),g===e&&(g=null),v=[],b=C();b!==e;)v.push(b),b=C();if(b=De(),b!==e)if(t.charCodeAt(i)===41?(w=_,i++):(w=e,E===0&&N(Et)),w!==e){for(M=[],F=C();F!==e;)M.push(F),F=C();F=jt(),F!==e?(X=l,l=gl(p,b,F)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,4)===W?(f=W,i+=4):(f=e,E===0&&N(os)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(t.substr(i,3)===ee?(h=ee,i+=3):(h=e,E===0&&N(jr)),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;if(s!==e)if(o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();if(v=De(),v!==e){if(b=[],w=C(),w!==e)for(;w!==e;)b.push(w),w=C();else b=e;b!==e?(w=jt(),w!==e?(X=l,l=dl(o,v,w)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return I[D]={nextPos:i,result:l},l}function ho(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D,B=i*76+20,Q=I[B];if(Q)return i=Q.nextPos,Q.result;if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(pt)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(mr)),h!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,E===0&&N(jr)),s!==e){if(o=[],p=C(),p!==e)for(;p!==e;)o.push(p),p=C();else o=e;if(o!==e)if(p=Ue(),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();if(g=i,t.charCodeAt(i)===61?(v=ge,i++):(v=e,E===0&&N(wt)),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();w=De(),w!==e?(X=g,g=yl(p,w)):(i=g,g=e)}else i=g,g=e;for(g===e&&(g=null),t.charCodeAt(i)===44?(v=V,i++):(v=e,E===0&&N(xt)),v===e&&(v=null),b=[],w=C();w!==e;)b.push(w),w=C();if(w=De(),w!==e)if(t.charCodeAt(i)===41?(M=_,i++):(M=e,E===0&&N(Et)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();D=jt(),D!==e?(X=l,l=wl(p,g,w,D)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(pt)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(t.substr(i,3)===ee?(h=ee,i+=3):(h=e,E===0&&N(jr)),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;if(s!==e)if(o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(u=i,t.charCodeAt(i)===61?(g=ge,i++):(g=e,E===0&&N(wt)),g!==e){for(v=[],b=C();b!==e;)v.push(b),b=C();b=De(),b!==e?(X=u,u=ml(o,b)):(i=u,u=e)}else i=u,u=e;for(u===e&&(u=null),t.charCodeAt(i)===44?(g=V,i++):(g=e,E===0&&N(xt)),g===e&&(g=null),v=[],b=C();b!==e;)v.push(b),b=C();if(b=De(),b!==e){if(w=[],M=C(),M!==e)for(;M!==e;)w.push(M),M=C();else w=e;w!==e?(M=jt(),M!==e?(X=l,l=xl(o,u,b,M)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(pt)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(mr)),h!==e)if(s=De(),s!==e)if(t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=jt(),u!==e?(X=l,l=$l(s,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(pt)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=De(),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;s!==e?(o=jt(),o!==e?(X=l,l=bl(h,o)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e}}return I[B]={nextPos:i,result:l},l}function po(){var l,f,y,h,s,o=i*76+21,p=I[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,6)===Y?(f=Y,i+=6):(f=e,E===0&&N(Ss)),f!==e)if(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();s=De(),s!==e?(X=l,l=Al(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return I[o]={nextPos:i,result:l},l}function vo(){var l,f,y,h,s,o,p,u,g=i*76+22,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===ue?(f=ue,i+=4):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===123?(h=S,i++):(h=e,E===0&&N(nr)),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();if(o=cs(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();t.charCodeAt(i)===125?(u=T,i++):(u=e,E===0&&N(tt)),u!==e?(X=l,l=Cl(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function go(){var l,f,y,h,s=i*76+23,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===de?(f=de,i+=5):(f=e,E===0&&N(Si)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=_l()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function yo(){var l,f,y,h,s=i*76+24,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,8)===le?(f=le,i+=8):(f=e,E===0&&N(Fi)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=kl()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function wo(){var l,f,y,h,s,o,p=i*76+25,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=De(),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.substr(i,2)===Te?(h=Te,i+=2):(h=e,E===0&&N(Oi)),h===e&&(t.substr(i,2)===ze?(h=ze,i+=2):(h=e,E===0&&N(Ni)),h===e&&(t.charCodeAt(i)===61?(h=ge,i++):(h=e,E===0&&N(wt)))),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();o=De(),o!==e?(X=l,l=Pl(f,h,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function mo(){var l,f,y,h,s,o,p,u,g=i*76+26,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=Dr(),f!==e){for(y=[],h=i,s=[],o=br();o!==e;)s.push(o),o=br();if(o=Fa(),o!==e){for(p=[],u=br();u!==e;)p.push(u),u=br();u=Dr(),u!==e?(X=h,h=ia(f,o,u)):(i=h,h=e)}else i=h,h=e;if(h!==e)for(;h!==e;){for(y.push(h),h=i,s=[],o=br();o!==e;)s.push(o),o=br();if(o=Fa(),o!==e){for(p=[],u=br();u!==e;)p.push(u),u=br();u=Dr(),u!==e?(X=h,h=ia(f,o,u)):(i=h,h=e)}else i=h,h=e}else y=e;y!==e?(X=l,l=El(f,y)):(i=l,l=e)}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function br(){var l,f,y,h=i*76+27,s=I[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=dt,i++):(f=e,E===0&&N(Xn)),f!==e?(y=qe(),y!==e?(f=[f,y],l=f):(i=l,l=e)):(i=l,l=e),l===e&&(l=Ae()),I[h]={nextPos:i,result:l},l)}function Fa(){var l,f,y=i*76+28,h=I[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Ke?(f=Ke,i+=2):(f=e,E===0&&N(Gn)),f===e&&(t.substr(i,2)===ot?(f=ot,i+=2):(f=e,E===0&&N(Ti)),f===e&&(t.substr(i,2)===je?(f=je,i+=2):(f=e,E===0&&N(Ii)),f===e&&(t.substr(i,2)===lt?(f=lt,i+=2):(f=e,E===0&&N(ji)),f===e&&(t.substr(i,2)===Ft?(f=Ft,i+=2):(f=e,E===0&&N(Ri)),f===e&&(t.substr(i,2)===Ot?(f=Ot,i+=2):(f=e,E===0&&N(Di)),f===e&&(t.charCodeAt(i)===60?(f=Ye,i++):(f=e,E===0&&N(Zn)),f===e&&(t.charCodeAt(i)===62?(f=Or,i++):(f=e,E===0&&N(yn)),f===e&&(t.charCodeAt(i)===43?(f=Bt,i++):(f=e,E===0&&N(Qn)),f===e&&(t.charCodeAt(i)===45?(f=wr,i++):(f=e,E===0&&N(Li)),f===e&&(t.charCodeAt(i)===42?(f=Pt,i++):(f=e,E===0&&N(Yn)),f===e&&(t.charCodeAt(i)===94?(f=yr,i++):(f=e,E===0&&N(ea)),f===e&&(t.charCodeAt(i)===47?(f=Nr,i++):(f=e,E===0&&N(Bi)),f===e&&(t.charCodeAt(i)===37?(f=kr,i++):(f=e,E===0&&N(Hi))))))))))))))),f!==e&&(X=l,f=la()),l=f,I[y]={nextPos:i,result:l},l)}function xo(){var l,f,y,h=i*76+29,s=I[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===33?(f=Mr,i++):(f=e,E===0&&N(Ui)),f!==e?(y=De(),y!==e?(X=l,l=Ml(y)):(i=l,l=e)):(i=l,l=e),I[h]={nextPos:i,result:l},l)}function Ar(){var l,f,y,h,s=i*76+30,o=I[s];if(o)return i=o.nextPos,o.result;if(l=i,f=Lr(),f!==e){if(y=[],h=_n(),h===e&&(h=Oa(),h===e&&(h=kn())),h!==e)for(;h!==e;)y.push(h),h=_n(),h===e&&(h=Oa(),h===e&&(h=kn()));else y=e;y!==e?(X=l,l=Sl(f,y)):(i=l,l=e)}else i=l,l=e;return I[s]={nextPos:i,result:l},l}function _n(){var l,f,y,h,s,o,p=i*76+31,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===40?(f=A,i++):(f=e,E===0&&N(mr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();for(h=$o(),h===e&&(h=null),s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e?(X=l,l=Fl(h)):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function $o(){var l,f,y,h,s,o,p=i*76+32,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=De(),f!==e){for(y=[],h=i,s=Br(),s!==e?(o=De(),o!==e?(X=h,h=oa(f,o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Br(),s!==e?(o=De(),o!==e?(X=h,h=oa(f,o)):(i=h,h=e)):(i=h,h=e);X=l,l=Ol(f,y)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Oa(){var l,f,y,h,s,o,p=i*76+33,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===91?(f=Nt,i++):(f=e,E===0&&N(wn)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=De(),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Ms)),o!==e?(X=l,l=ua(h)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function kn(){var l,f,y,h=i*76+34,s=I[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===46?(f=z,i++):(f=e,E===0&&N(us)),f!==e?(y=Ue(),y!==e?(X=l,l=Nl(y)):(i=l,l=e)):(i=l,l=e),I[h]={nextPos:i,result:l},l)}function bo(){var l,f,y,h,s,o,p,u,g,v,b=i*76+35,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===Z?(f=Z,i+=2):(f=e,E===0&&N(mn)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=De(),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;if(s!==e)if(o=jt(),o!==e){if(p=i,u=[],g=C(),g!==e)for(;g!==e;)u.push(g),g=C();else u=e;if(u!==e?(g=Na(),g!==e?p=g:(i=p,p=e)):(i=p,p=e),p===e&&(p=null),u=i,g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;g!==e?(v=Ao(),v!==e?u=v:(i=u,u=e)):(i=u,u=e),u===e&&(u=null),X=l,l=Tl(h,o,p,u)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function Na(){var l,f,y,h,s,o,p=i*76+36,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Vs(),f!==e){for(y=[],h=i,s=[],o=C();o!==e;)s.push(o),o=C();for(o=Vs(),o!==e?h=o:(i=h,h=e);h!==e;){for(y.push(h),h=i,s=[],o=C();o!==e;)s.push(o),o=C();o=Vs(),o!==e?h=o:(i=h,h=e)}X=l,l=Il(f,y)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Vs(){var l,f,y,h,s,o,p,u=i*76+37,g=I[u];if(g)return i=g.nextPos,g.result;if(l=i,t.substr(i,4)===se?(f=se,i+=4):(f=e,E===0&&N(qi)),f!==e)if(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();if(s=De(),s!==e){for(o=[],p=C();p!==e;)o.push(p),p=C();p=jt(),p!==e?(X=l,l=jl(s,p)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e;return I[u]={nextPos:i,result:l},l}function Ao(){var l,f,y,h,s,o=i*76+38,p=I[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,4)===ve?(f=ve,i+=4):(f=e,E===0&&N(zi)),f!==e)if(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();s=jt(),s!==e?(X=l,l=Rl(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return I[o]={nextPos:i,result:l},l}function Co(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D,B,Q,xe=i*76+39,ne=I[xe];if(ne)return i=ne.nextPos,ne.result;if(l=i,t.substr(i,5)===ye?(f=ye,i+=5):(f=e,E===0&&N(Vi)),f!==e)if(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();if(s=De(),s!==e){for(o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===123?(p=S,i++):(p=e,E===0&&N(nr)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();if(g=[],v=i,b=De(),b!==e){for(w=[],M=C();M!==e;)w.push(M),M=C();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(Fs)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();if(D=jt(),D!==e){for(B=[],Q=C();Q!==e;)B.push(Q),Q=C();X=v,v=fa(s,b,D)}else i=v,v=e}else i=v,v=e}else i=v,v=e;if(v!==e)for(;v!==e;)if(g.push(v),v=i,b=De(),b!==e){for(w=[],M=C();M!==e;)w.push(M),M=C();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(Fs)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();if(D=jt(),D!==e){for(B=[],Q=C();Q!==e;)B.push(Q),Q=C();X=v,v=fa(s,b,D)}else i=v,v=e}else i=v,v=e}else i=v,v=e;else g=e;if(g!==e){if(v=i,t.charCodeAt(i)===42?(b=Pt,i++):(b=e,E===0&&N(Yn)),b!==e){for(w=[],M=C();M!==e;)w.push(M),M=C();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(Fs)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();if(D=jt(),D!==e){for(B=[],Q=C();Q!==e;)B.push(Q),Q=C();v=D}else i=v,v=e}else i=v,v=e}else i=v,v=e;for(v===e&&(v=null),b=[],w=C();w!==e;)b.push(w),w=C();t.charCodeAt(i)===125?(w=T,i++):(w=e,E===0&&N(tt)),w!==e?(X=l,l=Dl(s,g,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;else i=l,l=e;return I[xe]={nextPos:i,result:l},l}function Pn(){var l,f,y,h,s,o,p,u,g=i*76+40,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===Ne?(f=Ne,i+=4):(f=e,E===0&&N(Os)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===123?(h=S,i++):(h=e,E===0&&N(nr)),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();if(o=cs(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();t.charCodeAt(i)===125?(u=T,i++):(u=e,E===0&&N(tt)),u!==e?(X=l,l=ca(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function _o(){var l,f,y=i*76+41,h=I[y];return h?(i=h.nextPos,h.result):(l=i,f=Oo(),f!==e&&(X=l,f=Ll(f)),l=f,I[y]={nextPos:i,result:l},l)}function Ta(){var l,f,y,h,s,o,p=i*76+42,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===96?(f=me,i++):(f=e,E===0&&N(Ns)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===96?(o=me,i++):(o=e,E===0&&N(Ns)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Ia(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===96?(o=me,i++):(o=e,E===0&&N(Ns)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Ia(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===96?(h=me,i++):(h=e,E===0&&N(Ns)),h!==e?(X=l,l=Bl(y)):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Ia(){var l,f,y,h,s,o,p=i*76+43,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(nr)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=De(),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();t.charCodeAt(i)===125?(o=T,i++):(o=e,E===0&&N(tt)),o!==e?l=h:(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,f=[],y=ja(),y!==e)for(;y!==e;)f.push(y),y=ja();else f=e;f!==e&&(X=l,f=Hl(f)),l=f}return I[p]={nextPos:i,result:l},l}function ja(){var l,f=i*76+44,y=I[f];return y?(i=y.nextPos,y.result):(l=Ra(),l===e&&(Zt.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(Wi))),I[f]={nextPos:i,result:l},l)}function Ra(){var l,f,y,h=i*76+45,s=I[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=dt,i++):(f=e,E===0&&N(Xn)),f!==e?(Es.test(t.charAt(i))?(y=t.charAt(i),i++):(y=e,E===0&&N(Ts)),y!==e?l=y:(i=l,l=e)):(i=l,l=e),I[h]={nextPos:i,result:l},l)}function Ws(){var l,f,y,h,s,o,p=i*76+46,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===34?(f=$e,i++):(f=e,E===0&&N(Is)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===34?(o=$e,i++):(o=e,E===0&&N(Is)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=En(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr))),o!==e?(X=h,h=ha(o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===34?(o=$e,i++):(o=e,E===0&&N(Is)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=En(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr))),o!==e?(X=h,h=ha(o)):(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===34?(h=$e,i++):(h=e,E===0&&N(Is)),h!==e?(X=l,l=Ul(y)):(i=l,l=e)}else i=l,l=e;if(l===e)if(l=i,t.charCodeAt(i)===39?(f=he,i++):(f=e,E===0&&N(js)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===39?(o=he,i++):(o=e,E===0&&N(js)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Mn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr))),o!==e?(X=h,h=pa(o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===39?(o=he,i++):(o=e,E===0&&N(js)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Mn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr))),o!==e?(X=h,h=pa(o)):(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===39?(h=he,i++):(h=e,E===0&&N(js)),h!==e?(X=l,l=va(y)):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function En(){var l,f,y=i*76+47,h=I[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Le?(f=Le,i+=2):(f=e,E===0&&N(Rs)),f!==e&&(X=l,f=ql()),l=f,I[y]={nextPos:i,result:l},l)}function Mn(){var l,f,y=i*76+48,h=I[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Re?(f=Re,i+=2):(f=e,E===0&&N(Ds)),f!==e&&(X=l,f=ga()),l=f,I[y]={nextPos:i,result:l},l)}function Da(){var l,f=i*76+49,y=I[f];return y?(i=y.nextPos,y.result):(l=Sn(),l===e&&(l=La()),I[f]={nextPos:i,result:l},l)}function Sn(){var l,f,y,h,s,o,p=i*76+50,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,Jr.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(Ls),Tt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(ta)),f!==e){if(y=[],ht.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Mt)),h!==e)for(;h!==e;)y.push(h),ht.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Mt));else y=e;if(y!==e)if(t.charCodeAt(i)===46?(h=z,i++):(h=e,E===0&&N(us)),h!==e){if(s=[],ht.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,E===0&&N(Mt)),o!==e)for(;o!==e;)s.push(o),ht.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,E===0&&N(Mt));else s=e;s!==e?(X=l,l=zl()):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,Jr.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(Ls),ht.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Mt)),f!==e)if(t.charCodeAt(i)===46?(y=z,i++):(y=e,E===0&&N(us)),y!==e){if(h=[],ht.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,E===0&&N(Mt)),s!==e)for(;s!==e;)h.push(s),ht.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,E===0&&N(Mt));else h=e;h!==e?(X=l,l=Vl()):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return I[p]={nextPos:i,result:l},l}function La(){var l,f,y,h,s=i*76+51,o=I[s];if(o)return i=o.nextPos,o.result;if(l=i,Jr.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(Ls),Tt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(ta)),f!==e){if(y=[],ht.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Mt)),h!==e)for(;h!==e;)y.push(h),ht.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Mt));else y=e;y!==e?(X=l,l=Wl()):(i=l,l=e)}else i=l,l=e;return l===e&&(l=i,Jr.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(Ls),ht.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Mt)),f!==e?(X=l,l=Kl()):(i=l,l=e)),I[s]={nextPos:i,result:l},l}function Fn(){var l,f=i*76+52,y=I[f];return y?(i=y.nextPos,y.result):(l=Ba(),l===e&&(l=ko()),I[f]={nextPos:i,result:l},l)}function Ba(){var l,f,y,h,s=i*76+53,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===He?(f=He,i+=4):(f=e,E===0&&N(ra)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Jl()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function ko(){var l,f,y,h,s=i*76+54,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===We?(f=We,i+=5):(f=e,E===0&&N(ar)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Xl()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function Ha(){var l,f,y,h,s=i*76+55,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===Ze?(f=Ze,i+=4):(f=e,E===0&&N(Ki)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Gl()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function Ua(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D=i*76+56,B=I[D];if(B)return i=B.nextPos,B.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(nr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=[],s=i,o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(yt)),u!==e){if(g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;if(g!==e)if(v=De(),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(xt)),w===e&&(t.charCodeAt(i)===59?(w=nt,i++):(w=e,E===0&&N(Bs))),w===e&&(w=null),M=[],F=C();F!==e;)M.push(F),F=C();X=s,s=da(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(yt)),u!==e){if(g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;if(g!==e)if(v=De(),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(xt)),w===e&&(t.charCodeAt(i)===59?(w=nt,i++):(w=e,E===0&&N(Bs))),w===e&&(w=null),M=[],F=C();F!==e;)M.push(F),F=C();X=s,s=da(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=T,i++):(s=e,E===0&&N(tt)),s!==e?(X=l,l=Zl(h)):(i=l,l=e)}else i=l,l=e;return I[D]={nextPos:i,result:l},l}function Po(){var l,f,y,h,s,o,p,u,g,v,b=i*76+57,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Nt,i++):(f=e,E===0&&N(wn)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=[],s=i,o=De(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();X=s,s=ya(o)}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=De(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();X=s,s=ya(o)}else i=s,s=e;for(s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Ms)),o!==e?(X=l,l=wa(h)):(i=l,l=e)}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function On(){var l,f,y,h,s,o,p,u=i*76+58,g=I[u];if(g)return i=g.nextPos,g.result;if(l=i,f=Ue(),f!==e){for(y=i,h=[],s=C();s!==e;)h.push(s),s=C();if(t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(yt)),s!==e){for(o=[],p=C();p!==e;)o.push(p),p=C();p=zt(),p!==e?y=p:(i=y,y=e)}else i=y,y=e;y===e&&(y=null),X=l,l=Ql(f,y)}else i=l,l=e;return I[u]={nextPos:i,result:l},l}function Nn(){var l,f,y,h,s,o,p=i*76+59,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=On(),f!==e){for(y=[],h=i,s=Br(),s!==e?(o=On(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Br(),s!==e?(o=On(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);X=l,l=ma(f,y)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function qa(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D,B,Q,xe=i*76+60,ne=I[xe];if(ne)return i=ne.nextPos,ne.result;if(l=i,t.charCodeAt(i)===64?(f=at,i++):(f=e,E===0&&N(Ji)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=Ue(),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(t.charCodeAt(i)===40?(o=A,i++):(o=e,E===0&&N(mr)),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(u=Nn(),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();if(t.charCodeAt(i)===41?(v=_,i++):(v=e,E===0&&N(Et)),v!==e){for(b=i,w=[],M=C();M!==e;)w.push(M),M=C();if(t.charCodeAt(i)===58?(M=re,i++):(M=e,E===0&&N(yt)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();D=zt(),D!==e?b=D:(i=b,b=e)}else i=b,b=e;for(b===e&&(b=null),w=[],M=C();M!==e;)w.push(M),M=C();if(t.charCodeAt(i)===123?(M=S,i++):(M=e,E===0&&N(nr)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();for(D=cs(),D===e&&(D=null),B=[],Q=C();Q!==e;)B.push(Q),Q=C();t.charCodeAt(i)===125?(Q=T,i++):(Q=e,E===0&&N(tt)),Q!==e?(X=l,l=Yl(y,h,s,u,b,D)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[xe]={nextPos:i,result:l},l}function Eo(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F=i*76+61,D=I[F];if(D)return i=D.nextPos,D.result;if(l=i,t.substr(i,2)===mt?(f=mt,i+=2):(f=e,E===0&&N(fs)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();for(h=Nn(),h===e&&(h=null),s=[],o=C();o!==e;)s.push(o),o=C();if(t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e){for(p=i,u=[],g=C();g!==e;)u.push(g),g=C();if(t.charCodeAt(i)===58?(g=re,i++):(g=e,E===0&&N(yt)),g!==e){for(v=[],b=C();b!==e;)v.push(b),b=C();b=zt(),b!==e?p=b:(i=p,p=e)}else i=p,p=e;for(p===e&&(p=null),u=[],g=C();g!==e;)u.push(g),g=C();if(t.charCodeAt(i)===123?(g=S,i++):(g=e,E===0&&N(nr)),g!==e){for(v=[],b=C();b!==e;)v.push(b),b=C();for(b=cs(),b===e&&(b=null),w=[],M=C();M!==e;)w.push(M),M=C();t.charCodeAt(i)===125?(M=T,i++):(M=e,E===0&&N(tt)),M!==e?(X=l,l=eo(h,p,b)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[F]={nextPos:i,result:l},l}function Tn(){var l,f,y,h,s,o,p,u,g,v,b=i*76+62,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Nt,i++):(f=e,E===0&&N(wn)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=[],s=i,o=Ie(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();X=s,s=xa(o)}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ie(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();X=s,s=xa(o)}else i=s,s=e;for(s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Ms)),o!==e?(X=l,l=to(h)):(i=l,l=e)}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function za(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D=i*76+63,B=I[D];if(B)return i=B.nextPos,B.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(nr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=[],s=i,o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(yt)),u!==e){if(g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;if(g!==e)if(v=Ie(),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(xt)),w===e&&(t.charCodeAt(i)===59?(w=nt,i++):(w=e,E===0&&N(Bs))),w===e&&(w=null),M=[],F=C();F!==e;)M.push(F),F=C();X=s,s=$a(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(yt)),u!==e){if(g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;if(g!==e)if(v=Ie(),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(xt)),w===e&&(t.charCodeAt(i)===59?(w=nt,i++):(w=e,E===0&&N(Bs))),w===e&&(w=null),M=[],F=C();F!==e;)M.push(F),F=C();X=s,s=$a(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=T,i++):(s=e,E===0&&N(tt)),s!==e?(X=l,l=ba(h)):(i=l,l=e)}else i=l,l=e;return I[D]={nextPos:i,result:l},l}function zt(){var l,f=i*76+64,y=I[f];return y?(i=y.nextPos,y.result):(l=Mo(),l===e&&(l=Fo()),I[f]={nextPos:i,result:l},l)}function Mo(){var l,f,y,h,s,o,p,u,g,v,b=i*76+65,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===mt?(f=mt,i+=2):(f=e,E===0&&N(fs)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();for(h=So(),h===e&&(h=null),s=[],o=C();o!==e;)s.push(o),o=C();if(t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.substr(i,2)===oe?(u=oe,i+=2):(u=e,E===0&&N(Fs)),u!==e){for(g=[],v=C();v!==e;)g.push(v),v=C();v=zt(),v!==e?(X=l,l=ro(h,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function So(){var l,f,y,h,s,o,p=i*76+66,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=zt(),f!==e){for(y=[],h=i,s=Br(),s!==e?(o=zt(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Br(),s!==e?(o=zt(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);X=l,l=Aa(f,y)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Fo(){var l,f,y,h,s,o,p,u,g=i*76+67,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=Ue(),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(t.charCodeAt(i)===60?(h=Ye,i++):(h=e,E===0&&N(Zn)),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=zt(),o!==e){for(p=[],u=Ae();u!==e;)p.push(u),u=Ae();t.charCodeAt(i)===62?(u=Or,i++):(u=e,E===0&&N(yn)),u!==e?(X=l,l=so(f,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return l===e&&(l=i,f=Ue(),f!==e&&(X=l,f=no(f)),l=f),I[g]={nextPos:i,result:l},l}function Ue(){var l,f,y,h,s=i*76+68,o=I[s];if(o)return i=o.nextPos,o.result;if(l=i,Rt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Xi)),f!==e){for(y=[],Kn.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(xn));h!==e;)y.push(h),Kn.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(xn));X=l,l=ao()}else i=l,l=e;return I[s]={nextPos:i,result:l},l}function Oo(){var l,f,y,h,s,o,p=i*76+69,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Ue(),f!==e){for(y=[],h=i,t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(yt)),s!==e?(o=Ue(),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(yt)),s!==e?(o=Ue(),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);X=l,l=io()}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Br(){var l,f,y,h,s,o=i*76+70,p=I[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=C();y!==e;)f.push(y),y=C();if(t.charCodeAt(i)===44?(y=V,i++):(y=e,E===0&&N(xt)),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();f=[f,y,h],l=f}else i=l,l=e;if(l===e)if(l=[],f=C(),f!==e)for(;f!==e;)l.push(f),f=C();else l=e;return I[o]={nextPos:i,result:l},l}function jt(){var l,f,y,h,s,o,p=i*76+71,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(nr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();for(h=cs(),h===e&&(h=null),s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===125?(o=T,i++):(o=e,E===0&&N(tt)),o!==e?(X=l,l=lo(h)):(i=l,l=e)}else i=l,l=e;return l===e&&(l=cr()),I[p]={nextPos:i,result:l},l}function qe(){var l,f=i*76+72,y=I[f];return y?(i=y.nextPos,y.result):(t.substr(i,2)===Ht?(l=Ht,i+=2):(l=e,E===0&&N(Gi)),l===e&&(Jn.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(sa))),I[f]={nextPos:i,result:l},l)}function Va(){var l,f,y=i*76+73,h=I[y];return h?(i=h.nextPos,h.result):(l=i,E++,t.length>i?(f=t.charAt(i),i++):(f=e,E===0&&N(rr)),E--,f===e?l=void 0:(i=l,l=e),l===e&&(l=qe()),I[y]={nextPos:i,result:l},l)}function C(){var l,f=i*76+74,y=I[f];return y?(i=y.nextPos,y.result):(_i.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(Zi)),I[f]={nextPos:i,result:l},l)}function Ae(){var l,f=i*76+75,y=I[f];return y?(i=y.nextPos,y.result):(ki.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(Qi)),I[f]={nextPos:i,result:l},l)}function ie(l,f,y){const h={type:l};f.children=y;for(const o of Object.keys(f))f[o]!==void 0&&(h[o]=f[o]);const s=R();return h.loc={start:s.start.offset,end:s.end.offset-1},h}if(Rr=d(),Rr!==e&&i===t.length)return Rr;throw Rr!==e&&i`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>qf(n)).join(", "),e=qf(t.result);return`@(${r}) { ${e} }`}}}function Tu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return Zv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Tu(t.inner):r=Zv("any"),o1(t.name,[r])}}throw new iu(`Unknown type: '${qf(t)}'`)}else{const r=t.args.map(e=>Tu(e));return u1(r,Tu(t.result))}}function f1(t){switch(t.type){case"def":{t.varType!=null&&Tu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Tu(r.argType);t.retType!=null&&Tu(t.retType);break}}return t}function c1(t){for(const r of t)it(r,f1);return t}function zf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=zf(n.expr.children)),r.push(n);else{if(e.length>0)throw new iu("invalid attribute.");switch(n.type){case"fn":{n.children=zf(n.children);break}case"block":{n.statements=zf(n.statements);break}}r.push(n)}if(e.length>0)throw new iu("invalid attribute.");return r}function h1(t){if(r1(t)&&Nd(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const c of r)switch(c.type){case"callChain":{n=s1(n,c.args,c.loc);break}case"indexChain":{n=n1(n,c.index,c.loc);break}case"propChain":{n=a1(n,c.name,c.loc);break}}return n}return t}function p1(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:zo(t.left),right:zo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:zo(t.left),right:zo(t.right)}),priority:3}};function g1(t){const r=t.operators.map(n=>{const c=v1[n];if(c==null)throw new iu(`No such operator: ${n}.`);return c});let e=Vf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?g1(e):e);return t}var Ga;let y1=(Ga=class{constructor(){be(this,"plugins");this.plugins={validate:[l1,c1],transform:[zf,p1,d1]}}static parse(r){return Ga.instance==null&&(Ga.instance=new Ga),Ga.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=Gv(r,{startRule:"Preprocess"});e=Gv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new iu(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`):new iu(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}},be(Ga,"instance"),Ga);const w1="0.15.0",m1={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { - <: if (i % 15 == 0) "FizzBuzz" - elif (i % 3 == 0) "Fizz" - elif (i % 5 == 0) "Buzz" - else i - }`};let Rh=[],Gu=null;function x1(t){return Rh=y1.parse(t),JSON.stringify(Rh,null," ")}async function $1(t){Gu==null||Gu.abort(),Gu=new ks({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:Th(r,!0),print:!0})},log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:Th(e.val,!0),print:!1});break}}});try{await Gu.exec(Rh)}catch(r){t.err(r)}}const b1=Object.freeze(Object.defineProperty({__proto__:null,exec:$1,parse:x1,samples:m1,version:w1},Symbol.toStringTag,{value:"Module"}));class kc extends Error{constructor(e,n){super(e);be(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,kc)}}class lu extends kc{constructor(r,e){super(r,e)}}class tr extends kc{constructor(r,e){super(r,e)}}class A1 extends tr{constructor(r,e){super(r,e)}}var gu=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,d=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};class Wn{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new Wn(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r);return this.log("read",{var:r,val:n}),n}throw new tr(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new tr(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){c.set(r,e),this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new tr(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}}gu([ct],Wn.prototype,"log",null);gu([ct],Wn.prototype,"onUpdated",null);gu([ct],Wn.prototype,"createChildScope",null);gu([ct],Wn.prototype,"get",null);gu([ct],Wn.prototype,"getAll",null);gu([ct],Wn.prototype,"add",null);gu([ct],Wn.prototype,"assign",null);let Sf;const C1=new Uint8Array(16);function _1(){if(!Sf&&(Sf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sf(C1)}const Vr=[];for(let t=0;t<256;++t)Vr.push((t+256).toString(16).slice(1));function k1(t,r=0){return(Vr[t[r+0]]+Vr[t[r+1]]+Vr[t[r+2]]+Vr[t[r+3]]+"-"+Vr[t[r+4]]+Vr[t[r+5]]+"-"+Vr[t[r+6]]+Vr[t[r+7]]+"-"+Vr[t[r+8]]+Vr[t[r+9]]+"-"+Vr[t[r+10]]+Vr[t[r+11]]+Vr[t[r+12]]+Vr[t[r+13]]+Vr[t[r+14]]+Vr[t[r+15]]).toLowerCase()}const P1=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Qv={randomUUID:P1};function E1(t,r,e){if(Qv.randomUUID&&!r&&!t)return Qv.randomUUID();t=t||{};const n=t.random||(t.rng||_1)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return k1(n)}const Lt={type:"null"},hn={type:"bool",value:!0},Qs={type:"bool",value:!1},Je=t=>({type:"num",value:t}),Yt=t=>({type:"str",value:t}),Iu=t=>({type:"bool",value:t}),Bp=t=>({type:"obj",value:t}),Yr=t=>({type:"arr",value:t}),M1=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),Ee=t=>({type:"fn",native:t}),S1=t=>({type:"return",value:t}),F1=()=>({type:"break",value:null}),O1=()=>({type:"continue",value:null}),N1=t=>t.type==="return"?t.value:t;function sn(t){if(t==null)throw new tr("Expect anything, but got nothing.")}function ms(t){if(t==null)throw new tr("Expect boolean, but got nothing.");if(t.type!=="bool")throw new tr(`Expect boolean, but got ${t.type}.`)}function gi(t){if(t==null)throw new tr("Expect function, but got nothing.");if(t.type!=="fn")throw new tr(`Expect function, but got ${t.type}.`)}function Ir(t){if(t==null)throw new tr("Expect string, but got nothing.");if(t.type!=="str")throw new tr(`Expect string, but got ${t.type}.`)}function Ve(t){if(t==null)throw new tr("Expect number, but got nothing.");if(t.type!=="num")throw new tr(`Expect number, but got ${t.type}.`)}function oi(t){if(t==null)throw new tr("Expect object, but got nothing.");if(t.type!=="obj")throw new tr(`Expect object, but got ${t.type}.`)}function lf(t){if(t==null)throw new tr("Expect array, but got nothing.");if(t.type!=="arr")throw new tr(`Expect array, but got ${t.type}.`)}function T1(t){return t.type==="str"}function I1(t){return t.type==="num"}function j1(t){return t.type==="obj"}function R1(t){return t.type==="arr"}function Dh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function Lh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>Lh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Bh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Bh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=Bh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Hh(t){if(t===null)return Lt;if(typeof t=="boolean")return Iu(t);if(typeof t=="string")return Yt(t);if(typeof t=="number")return Je(t);if(Array.isArray(t))return Yr(t.map(r=>Hh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,Hh(n));return Bp(r)}return Lt}const D1={help:Yt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Yt("0.14.1"),"Core:ai":Yt("kawaii"),"Core:not":Ee(([t])=>(ms(t),t.value?Qs:hn)),"Core:eq":Ee(([t,r])=>(sn(t),sn(r),Dh(t,r)?hn:Qs)),"Core:neq":Ee(([t,r])=>(sn(t),sn(r),Dh(t,r)?Qs:hn)),"Core:and":Ee(([t,r])=>(ms(t),t.value?(ms(r),r.value?hn:Qs):Qs)),"Core:or":Ee(([t,r])=>(ms(t),t.value?hn:(ms(r),r.value?hn:Qs))),"Core:add":Ee(([t,r])=>(Ve(t),Ve(r),Je(t.value+r.value))),"Core:sub":Ee(([t,r])=>(Ve(t),Ve(r),Je(t.value-r.value))),"Core:mul":Ee(([t,r])=>(Ve(t),Ve(r),Je(t.value*r.value))),"Core:pow":Ee(([t,r])=>{Ve(t),Ve(r);const e=t.value**r.value;if(isNaN(e))throw new tr("Invalid operation.");return Je(e)}),"Core:div":Ee(([t,r])=>{Ve(t),Ve(r);const e=t.value/r.value;if(isNaN(e))throw new tr("Invalid operation.");return Je(e)}),"Core:mod":Ee(([t,r])=>(Ve(t),Ve(r),Je(t.value%r.value))),"Core:gt":Ee(([t,r])=>(Ve(t),Ve(r),t.value>r.value?hn:Qs)),"Core:lt":Ee(([t,r])=>(Ve(t),Ve(r),t.value(Ve(t),Ve(r),t.value>=r.value?hn:Qs)),"Core:lteq":Ee(([t,r])=>(Ve(t),Ve(r),t.value<=r.value?hn:Qs)),"Core:type":Ee(([t])=>(sn(t),Yt(t.type))),"Core:to_str":Ee(([t])=>(sn(t),t.type==="str"?t:t.type==="num"?Yt(t.value.toString()):Yt("?"))),"Core:range":Ee(([t,r])=>(Ve(t),Ve(r),t.valueJe(n+t.value))):t.value>r.value?Yr(Array.from({length:t.value-r.value+1},(e,n)=>Je(t.value-n))):Yr([t]))),"Util:uuid":Ee(()=>Yt(E1())),"Json:stringify":Ee(([t])=>(sn(t),Yt(JSON.stringify(Bh(t))))),"Json:parse":Ee(([t])=>(Ir(t),Hh(JSON.parse(t.value)))),"Json:parsable":Ee(([t])=>{Ir(t);try{JSON.parse(t.value)}catch{return Iu(!1)}return Iu(!0)}),"Date:now":Ee(()=>Je(Date.now())),"Date:year":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":Ee(([t])=>(Ir(t),Je(new Date(t.value).getTime()))),"Math:Infinity":Je(1/0),"Math:PI":Je(Math.PI),"Math:sin":Ee(([t])=>(Ve(t),Je(Math.sin(t.value)))),"Math:cos":Ee(([t])=>(Ve(t),Je(Math.cos(t.value)))),"Math:abs":Ee(([t])=>(Ve(t),Je(Math.abs(t.value)))),"Math:sqrt":Ee(([t])=>{Ve(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new tr("Invalid operation.");return Je(r)}),"Math:round":Ee(([t])=>(Ve(t),Je(Math.round(t.value)))),"Math:ceil":Ee(([t])=>(Ve(t),Je(Math.ceil(t.value)))),"Math:floor":Ee(([t])=>(Ve(t),Je(Math.floor(t.value)))),"Math:min":Ee(([t,r])=>(Ve(t),Ve(r),Je(Math.min(t.value,r.value)))),"Math:max":Ee(([t,r])=>(Ve(t),Ve(r),Je(Math.max(t.value,r.value)))),"Math:rnd":Ee(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Je(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Je(Math.random())),"Math:gen_rng":Ee(([t])=>{if(sn(t),t.type!=="num"&&t.type!=="str")return Lt;const r=Np(t.value.toString());return Ee(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Je(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Je(r()))}),"Num:to_hex":Ee(([t])=>(Ve(t),Yt(t.value.toString(16)))),"Num:from_hex":Ee(([t])=>(Ir(t),Je(parseInt(t.value,16)))),"Str:lf":Yt(` -`),"Str:lt":Ee(([t,r])=>(Ir(t),Ir(r),t.value(Ir(t),Ir(r),t.value>r.value?Je(-1):t.value===r.value?Je(0):Je(1))),"Obj:keys":Ee(([t])=>(oi(t),Yr(Array.from(t.value.keys()).map(r=>Yt(r))))),"Obj:vals":Ee(([t])=>(oi(t),Yr(Array.from(t.value.values())))),"Obj:kvs":Ee(([t])=>(oi(t),Yr(Array.from(t.value.entries()).map(([r,e])=>Yr([Yt(r),e]))))),"Obj:get":Ee(([t,r])=>(oi(t),Ir(r),t.value.get(r.value)??Lt)),"Obj:set":Ee(([t,r,e])=>(oi(t),Ir(r),sn(e),t.value.set(r.value,e),Lt)),"Obj:has":Ee(([t,r])=>(oi(t),Ir(r),Iu(t.value.has(r.value)))),"Obj:copy":Ee(([t])=>(oi(t),Bp(new Map(t.value)))),"Async:interval":Ee(async([t,r,e],n)=>{Ve(t),gi(r),e&&(ms(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.call(r,[])},t.value),d=()=>{clearInterval(c)};return n.registerAbortHandler(d),Ee(([],$)=>{clearInterval(c),$.unregisterAbortHandler(d)})}),"Async:timeout":Ee(async([t,r],e)=>{Ve(t),gi(r);const n=setTimeout(()=>{e.call(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),Ee(([],d)=>{clearTimeout(n),d.unregisterAbortHandler(c)})})},xu={num:{to_str:t=>Ee(async(r,e)=>Yt(t.value.toString()))},str:{to_num:t=>Ee(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?Lt:Je(n)}),len:t=>Je(jp(t.value)),replace:t=>Ee(async([r,e],n)=>(Ir(r),Ir(e),Yt(t.value.split(r.value).join(e.value)))),index_of:t=>Ee(async([r],e)=>(Ir(r),Je(Dp(t.value,r.value)))),incl:t=>Ee(async([r],e)=>(Ir(r),t.value.includes(r.value)?hn:Qs)),trim:t=>Ee(async(r,e)=>Yt(t.value.trim())),upper:t=>Ee(async(r,e)=>Yt(t.value.toUpperCase())),lower:t=>Ee(async(r,e)=>Yt(t.value.toLowerCase())),split:t=>Ee(async([r],e)=>(r&&Ir(r),Yr(r?t.value.split(r?r.value:"").map(n=>Yt(n)):Uu(t.value).map(n=>Yt(n))))),slice:t=>Ee(async([r,e],n)=>(Ve(r),Ve(e),Yt(Rp(t.value,r.value,e.value)))),pick:t=>Ee(async([r],e)=>{Ve(r);const c=Uu(t.value)[r.value];return c?Yt(c):Lt})},arr:{len:t=>Je(t.value.length),push:t=>Ee(async([r],e)=>(sn(r),t.value.push(r),t)),unshift:t=>Ee(async([r],e)=>(sn(r),t.value.unshift(r),t)),pop:t=>Ee(async(r,e)=>t.value.pop()??Lt),shift:t=>Ee(async(r,e)=>t.value.shift()??Lt),concat:t=>Ee(async([r],e)=>(lf(r),Yr(t.value.concat(r.value)))),slice:t=>Ee(async([r,e],n)=>(Ve(r),Ve(e),Yr(t.value.slice(r.value,e.value)))),join:t=>Ee(async([r],e)=>(r&&Ir(r),Yt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>Ee(async([r],e)=>{gi(r);const n=t.value.map(async(c,d)=>await e.call(r,[c,Je(d)]));return Yr(await Promise.all(n))}),filter:t=>Ee(async([r],e)=>{gi(r);const n=[];for(let c=0;cEe(async([r,e],n)=>{gi(r);const c=e!=null;let d=c?e:t.value[0];for(let $=c?0:1;$Ee(async([r],e)=>{gi(r);for(let n=0;nEe(async([r],e)=>(sn(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Qs:(c=>c.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?hn:Qs)),reverse:t=>Ee(async(r,e)=>(t.value.reverse(),Lt)),copy:t=>Ee(async(r,e)=>Yr([...t.value])),sort:t=>Ee(async([r],e)=>{const n=async(d,$)=>{if(d.length<=1)return d;const x=Math.floor(d.length/2),m=await n(d.slice(0,x),$),A=await n(d.slice(x),$);return c(m,A,$)},c=async(d,$,x)=>{const m=[];let A=0,_=0;for(;A=0;x--)($=t[x])&&(d=(c<3?$(d):c>3?$(r,e,d):$(r,e))||d);return c>3&&d&&Object.defineProperty(r,e,d),d};const Id=300,L1=Id-1;class Ps{constructor(r,e){be(this,"vars");be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);this.opts=e??{};const n={print:Ee(([c])=>{sn(c),this.opts.out&&this.opts.out(c)}),readline:Ee(async c=>{const d=c[0];if(Ir(d),this.opts.in==null)return Lt;const $=await this.opts.in(d.value);return Yt($)})};this.vars={...r,...D1,...n},this.scope=new Wn([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,d)=>{switch(c){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(r==null||r.length===0)return;await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}async execFn(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(d=>e(d));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const d={};for(const[$,x]of c.value.entries())d[$]=e(x);return d}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{const c=await this._eval(n.expr,e);e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this._fn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??Lt;{const n=new Map;for(let d=0;d<(r.args??[]).length;d++)n.set(r.args[d],e[d]);const c=r.scope.createChildScope(n);return N1(await this._run(r.statements,c))}}async _eval(r,e){if(this.stop)return Lt;if(this.stepCount%Id===L1&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new tr("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);gi(n);const c=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if(ms(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const d=await this._eval(c.cond,e);if(ms(d),d.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return Lt}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const d=await this._eval(c.q,e);if(Dh(n,d))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):Lt}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return Lt}case"for":{if(r.times){const n=await this._eval(r.times,e);Ve(n);for(let c=0;c0){const c=[];for(const d of r.attr)c.push({name:d.name,value:await this._eval(d.value,e)});n.attr=c}return e.add(r.name,n),Lt}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),Lt}case"addAssign":{const n=await this._eval(r.dest,e);Ve(n);const c=await this._eval(r.expr,e);return Ve(c),await this.assign(e,r.dest,Je(n.value+c.value)),Lt}case"subAssign":{const n=await this._eval(r.dest,e);Ve(n);const c=await this._eval(r.expr,e);return Ve(c),await this.assign(e,r.dest,Je(n.value-c.value)),Lt}case"null":return Lt;case"bool":return Iu(r.value);case"num":return Je(r.value);case"str":return Yt(r.value);case"arr":return Yr(await Promise.all(r.value.map(async n=>await this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return Bp(n)}case"prop":{const n=await this._eval(r.target,e);if(j1(n))return n.value.has(r.name)?n.value.get(r.name):Lt;if(I1(n)){if(Object.hasOwn(xu.num,r.name))return xu.num[r.name](n);throw new tr(`No such prop (${r.name}) in ${n.type}.`)}else if(T1(n)){if(Object.hasOwn(xu.str,r.name))return xu.str[r.name](n);throw new tr(`No such prop (${r.name}) in ${n.type}.`)}else if(R1(n)){if(Object.hasOwn(xu.arr,r.name))return xu.arr[r.name](n);throw new tr(`No such prop (${r.name}) in ${n.type}.`)}else throw new tr(`Cannot read prop (${r.name}) of ${n.type}.`)}case"index":{const n=await this._eval(r.target,e);lf(n);const c=await this._eval(r.index,e);Ve(c);const d=n.value[c.value];if(d===void 0)throw new A1(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return d}case"not":{const n=await this._eval(r.expr,e);return ms(n),Iu(!n.value)}case"fn":return M1(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const d=await this._eval(c,e);let $="";d.type==="str"?$=d.value:d.type==="num"&&($=d.value.toString()),n+=$}return Yt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),S1(n)}case"break":return this.log("block:break",{scope:e.name}),F1();case"continue":return this.log("block:continue",{scope:e.name}),O1();case"ns":return Lt;case"meta":return Lt;case"and":{const n=await this._eval(r.left,e);if(ms(n),n.value){const c=await this._eval(r.right,e);return ms(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if(ms(n),n.value)return n;{const c=await this._eval(r.right,e);return ms(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=Lt;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r);lf(c);const d=await this._eval(e.index,r);Ve(d),c.value[d.value]=n}else if(e.type==="prop"){const c=await this._eval(e.target,r);oi(c),c.value.set(e.name,n)}else throw new tr("The left-hand side of an assignment expression must be a variable or a property/index access.")}}an([ct],Ps.prototype,"exec",null);an([ct],Ps.prototype,"execFn",null);an([ct],Ps.prototype,"log",null);an([ct],Ps.prototype,"collectNs",null);an([ct],Ps.prototype,"collectNsMember",null);an([ct],Ps.prototype,"_fn",null);an([ct],Ps.prototype,"_eval",null);an([ct],Ps.prototype,"_run",null);an([ct],Ps.prototype,"registerAbortHandler",null);an([ct],Ps.prototype,"unregisterAbortHandler",null);an([ct],Ps.prototype,"abort",null);an([ct],Ps.prototype,"assign",null);an([ct],Ps,"collectMetadata",null);function B1(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function tu(t,r,e,n){var c=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(c,tu.prototype),c.expected=r,c.found=e,c.location=n,c.name="SyntaxError",c}B1(tu,Error);function Gc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}tu.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` -`+m+` | -`+d.line+" | "+A+` -`+m+" | "+Gc("",c.column-1," ")+Gc("",k,"^")}else r+=` - at `+$}return r};tu.buildMessage=function(t,r){var e={literal:function(A){return'"'+c(A.text)+'"'},class:function(A){var _=A.parts.map(function(k){return Array.isArray(k)?d(k[0])+"-"+d(k[1]):d(k)});return"["+(A.inverted?"^":"")+_.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(A){return A.description}};function n(A){return A.charCodeAt(0).toString(16).toUpperCase()}function c(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(_){return"\\x0"+n(_)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(_){return"\\x"+n(_)})}function d(A){return A.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(_){return"\\x0"+n(_)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(_){return"\\x"+n(_)})}function $(A){return e[A.type](A)}function x(A){var _=A.map($),k,S;if(_.sort(),_.length>0){for(k=1,S=1;k<_.length;k++)_[k-1]!==_[k]&&(_[S]=_[k],S++);_.length=S}switch(_.length){case 1:return _[0];case 2:return _[0]+" or "+_[1];default:return _.slice(0,-1).join(", ")+", or "+_[_.length-1]}}function m(A){return A?'"'+c(A)+'"':"end of input"}return"Expected "+x(t)+" but "+m(r)+" found."};function Yv(t,r){r=r!==void 0?r:{};var e={},n=r.grammarSource,c={Preprocess:O,Main:ka},d=O,$="//",x="/*",m="*/",A="(",_=")",k="::",S="{",T="}",G="###",ee="let",re=":",ge="=",q="var",U="<:",L="#[",H="]",W="each",V=",",J="for",Y="return",ue="loop",de="break",le="continue",Te="+=",ze="-=",dt="\\",Ke="||",ot="&&",je="==",lt="!=",Ft="<=",Ot=">=",Ye="<",Or=">",Bt="+",wr="-",Pt="*",yr="^",Nr="/",kr="%",Mr="!",Nt="[",z=".",Z="if",se="elif",ve="else",ye="match",oe="=>",Ne="eval",me="`",$e='"',he="'",Le='\\"',Re="\\'",He="true",We="false",Ze="null",nt=";",at="@",mt="@(",Ht=`\r -`,bt=/^[A-Z0-9_:]/i,Zt=/^[^`{]/,Es=/^[{}`]/,Jr=/^[+\-]/,Tt=/^[1-9]/,ht=/^[0-9]/,Rt=/^[A-Z_]/i,Kn=/^[A-Z0-9_]/i,Jn=/^[\r\n]/,_i=/^[ \t\r\n]/,ki=/^[ \t]/,rr=oo(),sr=te("//",!1),Pi=te("/*",!1),dn=te("*/",!1),mr=te("(",!1),Et=te(")",!1),xr=te("::",!1),nr=te("{",!1),tt=te("}",!1),Ut=te("###",!1),jr=te("let",!1),yt=te(":",!1),wt=te("=",!1),ls=te("var",!1),Ei=te("<:",!1),Mi=te("#[",!1),Ms=te("]",!1),os=te("each",!1),xt=te(",",!1),pt=te("for",!1),Ss=te("return",!1),ur=qt([["A","Z"],["0","9"],"_",":"],!1,!0),fr=te("loop",!1),Si=te("break",!1),Fi=te("continue",!1),Oi=te("+=",!1),Ni=te("-=",!1),Xn=te("\\",!1),Gn=te("||",!1),Ti=te("&&",!1),Ii=te("==",!1),ji=te("!=",!1),Ri=te("<=",!1),Di=te(">=",!1),Zn=te("<",!1),yn=te(">",!1),Qn=te("+",!1),Li=te("-",!1),Yn=te("*",!1),ea=te("^",!1),Bi=te("/",!1),Hi=te("%",!1),Ui=te("!",!1),wn=te("[",!1),us=te(".",!1),mn=te("if",!1),qi=te("elif",!1),zi=te("else",!1),Vi=te("match",!1),Fs=te("=>",!1),Os=te("eval",!1),Ns=te("`",!1),Wi=qt(["`","{"],!0,!1),Ts=qt(["{","}","`"],!1,!1),Is=te('"',!1),js=te("'",!1),Rs=te('\\"',!1),Ds=te("\\'",!1),Ls=qt(["+","-"],!1,!1),ta=qt([["1","9"]],!1,!1),Mt=qt([["0","9"]],!1,!1),ra=te("true",!1),ar=te("false",!1),Ki=te("null",!1),Bs=te(";",!1),Ji=te("@",!1),fs=te("@(",!1),Xi=qt([["A","Z"],"_"],!1,!0),xn=qt([["A","Z"],["0","9"],"_"],!1,!0),Gi=te(`\r -`,!1),sa=qt(["\r",` -`],!1,!1),Zi=qt([" "," ","\r",` -`],!1,!1),Qi=qt([" "," "],!1,!1),Yi=function(l){return l.join("")},el=function(){return P()},tl=function(){return P()},rl=function(){return""},sl=function(){return""},nl=function(l){return l??[]},na=function(l,f){return f},al=function(l,f){return[l,...f]},$n=function(l,f){return f},il=function(l,f){return[l,...f]},bn=function(l,f){return f},ll=function(l,f){return[l,...f]},aa=function(l){return l},ol=function(l,f){return ie("ns",{name:l,members:f})},ul=function(l,f){return ie("meta",{name:l,value:f})},fl=function(l){return ie("meta",{name:null,value:l})},cl=function(l,f,y){return ie("def",{name:l,varType:f,expr:y,mut:!1,attr:[]})},hl=function(l,f,y){return ie("def",{name:l,varType:f,expr:y,mut:!0,attr:[]})},pl=function(l){return ie("identifier",{name:"print",chain:[ie("callChain",{args:[l]})]})},vl=function(l,f){return ie("attr",{name:l,value:f??ie("bool",{value:!0})})},gl=function(l,f,y){return ie("each",{var:l,items:f,for:y})},dl=function(l,f,y){return ie("each",{var:l,items:f,for:y})},yl=function(l,f){return f},wl=function(l,f,y,h){return ie("for",{var:l,from:f??ie("num",{value:0}),to:y,for:h})},ml=function(l,f){return f},xl=function(l,f,y,h){return ie("for",{var:l,from:f??ie("num",{value:0}),to:y,for:h})},$l=function(l,f){return ie("for",{times:l,for:f})},bl=function(l,f){return ie("for",{times:l,for:f})},Al=function(l){return ie("return",{expr:l})},Cl=function(l){return ie("loop",{statements:l})},_l=function(){return ie("break",{})},kl=function(){return ie("continue",{})},Pl=function(l,f,y){return f==="+="?ie("addAssign",{dest:l,expr:y}):f==="-="?ie("subAssign",{dest:l,expr:y}):ie("assign",{dest:l,expr:y})},ia=function(l,f,y){return{op:f,term:y}},El=function(l,f){return ie("infix",{operands:[l,...f.map(y=>y.term)],operators:f.map(y=>y.op)})},la=function(){return P()},Ml=function(l){return ie("not",{expr:l})},Sl=function(l,f){return{...l,chain:f}},Fl=function(l){return ie("callChain",{args:l??[]})},oa=function(l,f){return f},Ol=function(l,f){return[l,...f]},ua=function(l){return ie("indexChain",{index:l})},Nl=function(l){return ie("propChain",{name:l})},Tl=function(l,f,y,h){return ie("if",{cond:l,then:f,elseif:y??[],else:h})},Il=function(l,f){return[l,...f]},jl=function(l,f){return{cond:l,then:f}},Rl=function(l){return l},fa=function(l,f,y){return{q:f,a:y}},Dl=function(l,f,y){return ie("match",{about:l,qs:f??[],default:y})},ca=function(l){return ie("block",{statements:l})},Ll=function(l){return ie("identifier",{name:l})},Bl=function(l){return ie("tmpl",{tmpl:l})},Hl=function(l){return l.join("")},ha=function(l){return l},Ul=function(l){return ie("str",{value:l.join("")})},pa=function(l){return l},va=function(l){return ie("str",{value:l.join("")})},ql=function(){return'"'},ga=function(){return"'"},zl=function(){return ie("num",{value:parseFloat(P())})},Vl=function(){return ie("num",{value:parseFloat(P())})},Wl=function(){return ie("num",{value:parseInt(P(),10)})},Kl=function(){return ie("num",{value:parseInt(P(),10)})},Jl=function(){return ie("bool",{value:!0})},Xl=function(){return ie("bool",{value:!1})},Gl=function(){return ie("null",{})},da=function(l,f){return{k:l,v:f}},Zl=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ie("obj",{value:f})},ya=function(l){return l},wa=function(l){return ie("arr",{value:l})},Ql=function(l,f){return{name:l,argType:f}},ma=function(l,f){return[l,...f]},Yl=function(l,f,y,h,s,o){return(l.length>0||y.length>0)&&Us("Cannot use spaces before or after the function name."),ie("def",{name:f,expr:ie("fn",{args:h??[],retType:s},o??[]),mut:!1,attr:[]})},eo=function(l,f,y){return ie("fn",{args:l??[],retType:f},y??[])},xa=function(l){return l},to=function(l){return ie("arr",{value:l})},$a=function(l,f){return{k:l,v:f}},ba=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ie("obj",{value:f})},ro=function(l,f){return ie("fnTypeSource",{args:l??[],result:f})},Aa=function(l,f){return[l,...f]},so=function(l,f){return ie("namedTypeSource",{name:l,inner:f})},no=function(l){return ie("namedTypeSource",{name:l,inner:null})},ao=function(){return P()},io=function(){return P()},lo=function(l){return ie("block",{statements:l??[]})},i=0,X=0,Hs=[{line:1,column:1}],a=0,K=[],E=0,I={},Rr;if("startRule"in r){if(!(r.startRule in c))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=c[r.startRule]}function P(){return t.substring(X,i)}function R(){return qs(X,i)}function Us(l,f){throw f=f!==void 0?f:qs(X,i),Ca(l,f)}function te(l,f){return{type:"literal",text:l,ignoreCase:f}}function qt(l,f,y){return{type:"class",parts:l,inverted:f,ignoreCase:y}}function oo(){return{type:"any"}}function ae(){return{type:"end"}}function It(l){var f=Hs[l],y;if(f)return f;for(y=l-1;!Hs[y];)y--;for(f=Hs[y],f={line:f.line,column:f.column};ya&&(a=i,K=[]),K.push(l))}function Ca(l,f){return new tu(l,null,null,f)}function zs(l,f,y){return new tu(tu.buildMessage(l,f),l,f,y)}function O(){var l,f,y,h=i*76+0,s=I[h];if(s)return i=s.nextPos,s.result;for(l=i,f=[],y=_a();y!==e;)f.push(y),y=_a();return X=l,f=Yi(f),l=f,I[h]={nextPos:i,result:l},l}function _a(){var l,f,y=i*76+1,h=I[y];return h?(i=h.nextPos,h.result):(l=i,f=Ta(),f!==e&&(X=l,f=el()),l=f,l===e&&(l=i,f=Ws(),f!==e&&(X=l,f=tl()),l=f,l===e&&(l=uo(),l===e&&(t.length>i?(l=t.charAt(i),i++):(l=e,E===0&&N(rr))))),I[y]={nextPos:i,result:l},l)}function uo(){var l,f,y,h,s,o,p=i*76+2,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,2)===$?(f=$,i+=2):(f=e,E===0&&N(sr)),f!==e){for(y=[],h=i,s=i,E++,o=Va(),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,o=Va(),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);X=l,l=rl()}else i=l,l=e;if(l===e)if(l=i,t.substr(i,2)===x?(f=x,i+=2):(f=e,E===0&&N(Pi)),f!==e){for(y=[],h=i,s=i,E++,t.substr(i,2)===m?(o=m,i+=2):(o=e,E===0&&N(dn)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.substr(i,2)===m?(o=m,i+=2):(o=e,E===0&&N(dn)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);t.substr(i,2)===m?(h=m,i+=2):(h=e,E===0&&N(dn)),h!==e?(X=l,l=sl()):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function ka(){var l,f,y,h,s,o=i*76+3,p=I[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=C();y!==e;)f.push(y),y=C();for(y=Pa(),y===e&&(y=null),h=[],s=C();s!==e;)h.push(s),s=C();return X=l,l=nl(y),I[o]={nextPos:i,result:l},l}function Pa(){var l,f,y,h,s,o,p,u,g=i*76+4,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=An(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=An(),u!==e?(X=h,h=na(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=An(),u!==e?(X=h,h=na(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=al(f,y)}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function fo(){var l,f,y,h,s,o,p,u,g=i*76+5,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=Cn(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=Cn(),u!==e?(X=h,h=$n(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=Cn(),u!==e?(X=h,h=$n(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=il(f,y)}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function cs(){var l,f,y,h,s,o,p,u,g=i*76+6,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=cr(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=cr(),u!==e?(X=h,h=bn(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=cr(),u!==e?(X=h,h=bn(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=ll(f,y)}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function An(){var l,f=i*76+7,y=I[f];return y?(i=y.nextPos,y.result):(l=hs(),l===e&&(l=Ea(),l===e&&(l=cr())),I[f]={nextPos:i,result:l},l)}function Cn(){var l,f=i*76+8,y=I[f];return y?(i=y.nextPos,y.result):(l=$r(),l===e&&(l=qa(),l===e&&(l=hs())),I[f]={nextPos:i,result:l},l)}function cr(){var l,f=i*76+9,y=I[f];return y?(i=y.nextPos,y.result):(l=$r(),l===e&&(l=qa(),l===e&&(l=Ma(),l===e&&(l=po(),l===e&&(l=co(),l===e&&(l=Sa(),l===e&&(l=ho(),l===e&&(l=vo(),l===e&&(l=go(),l===e&&(l=yo(),l===e&&(l=wo(),l===e&&(l=De()))))))))))),I[f]={nextPos:i,result:l},l)}function De(){var l,f=i*76+10,y=I[f];return y?(i=y.nextPos,y.result):(l=mo(),l===e&&(l=Dr()),I[f]={nextPos:i,result:l},l)}function Dr(){var l,f=i*76+11,y=I[f];return y?(i=y.nextPos,y.result):(l=bo(),l===e&&(l=Eo(),l===e&&(l=Ar(),l===e&&(l=Lr()))),I[f]={nextPos:i,result:l},l)}function Lr(){var l,f,y,h,s,o,p=i*76+12,u=I[p];if(u)return i=u.nextPos,u.result;if(l=Co(),l===e&&(l=Pn(),l===e&&(l=Ta(),l===e&&(l=Ws(),l===e&&(l=Da(),l===e&&(l=Fn(),l===e&&(l=Ha(),l===e&&(l=Ua(),l===e&&(l=Po(),l===e&&(l=xo(),l===e&&(l=_o(),l===e)))))))))))if(l=i,t.charCodeAt(i)===40?(f=A,i++):(f=e,E===0&&N(mr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=De(),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e?(X=l,l=aa(h)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Ie(){var l,f=i*76+13,y=I[f];return y?(i=y.nextPos,y.result):(l=Da(),l===e&&(l=Ws(),l===e&&(l=Fn(),l===e&&(l=Tn(),l===e&&(l=za(),l===e&&(l=Ha()))))),I[f]={nextPos:i,result:l},l)}function hs(){var l,f,y,h,s,o,p,u,g,v,b=i*76+14,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===k?(f=k,i+=2):(f=e,E===0&&N(xr)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=Ue(),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;if(s!==e)if(t.charCodeAt(i)===123?(o=S,i++):(o=e,E===0&&N(nr)),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(u=fo(),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();t.charCodeAt(i)===125?(v=T,i++):(v=e,E===0&&N(tt)),v!==e?(X=l,l=ol(h,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function Ea(){var l,f,y,h,s,o,p=i*76+15,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,3)===G?(f=G,i+=3):(f=e,E===0&&N(Ut)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=Ue(),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();o=Ie(),o!==e?(X=l,l=ul(h,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===G?(f=G,i+=3):(f=e,E===0&&N(Ut)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();h=Ie(),h!==e?(X=l,l=fl(h)):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function $r(){var l,f,y,h,s,o,p,u,g,v=i*76+16,b=I[v];if(b)return i=b.nextPos,b.result;if(l=i,t.substr(i,3)===ee?(f=ee,i+=3):(f=e,E===0&&N(jr)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=Ue(),h!==e){for(s=i,o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===58?(p=re,i++):(p=e,E===0&&N(yt)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();g=zt(),g!==e?s=g:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===61?(p=ge,i++):(p=e,E===0&&N(wt)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();g=De(),g!==e?(X=l,l=cl(h,s,g)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===q?(f=q,i+=3):(f=e,E===0&&N(ls)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=Ue(),h!==e){for(s=i,o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===58?(p=re,i++):(p=e,E===0&&N(yt)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();g=zt(),g!==e?s=g:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===61?(p=ge,i++):(p=e,E===0&&N(wt)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();g=De(),g!==e?(X=l,l=hl(h,s,g)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return I[v]={nextPos:i,result:l},l}function Ma(){var l,f,y,h,s=i*76+17,o=I[s];if(o)return i=o.nextPos,o.result;if(l=i,t.substr(i,2)===U?(f=U,i+=2):(f=e,E===0&&N(Ei)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();h=De(),h!==e?(X=l,l=pl(h)):(i=l,l=e)}else i=l,l=e;return I[s]={nextPos:i,result:l},l}function co(){var l,f,y,h,s,o,p,u=i*76+18,g=I[u];if(g)return i=g.nextPos,g.result;if(l=i,t.substr(i,2)===L?(f=L,i+=2):(f=e,E===0&&N(Mi)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=Ue(),h!==e){for(s=i,o=[],p=C();p!==e;)o.push(p),p=C();for(p=Ie(),p!==e?s=p:(i=s,s=e),s===e&&(s=null),o=[],p=C();p!==e;)o.push(p),p=C();t.charCodeAt(i)===93?(p=H,i++):(p=e,E===0&&N(Ms)),p!==e?(X=l,l=vl(h,s)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return I[u]={nextPos:i,result:l},l}function Sa(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D=i*76+19,B=I[D];if(B)return i=B.nextPos,B.result;if(l=i,t.substr(i,4)===W?(f=W,i+=4):(f=e,E===0&&N(os)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(mr)),h!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,E===0&&N(jr)),s!==e){if(o=[],p=C(),p!==e)for(;p!==e;)o.push(p),p=C();else o=e;if(o!==e)if(p=Ue(),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();for(t.charCodeAt(i)===44?(g=V,i++):(g=e,E===0&&N(xt)),g===e&&(g=null),v=[],b=C();b!==e;)v.push(b),b=C();if(b=De(),b!==e)if(t.charCodeAt(i)===41?(w=_,i++):(w=e,E===0&&N(Et)),w!==e){for(M=[],F=C();F!==e;)M.push(F),F=C();F=jt(),F!==e?(X=l,l=gl(p,b,F)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,4)===W?(f=W,i+=4):(f=e,E===0&&N(os)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(t.substr(i,3)===ee?(h=ee,i+=3):(h=e,E===0&&N(jr)),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;if(s!==e)if(o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();if(v=De(),v!==e){if(b=[],w=C(),w!==e)for(;w!==e;)b.push(w),w=C();else b=e;b!==e?(w=jt(),w!==e?(X=l,l=dl(o,v,w)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return I[D]={nextPos:i,result:l},l}function ho(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D,B=i*76+20,Q=I[B];if(Q)return i=Q.nextPos,Q.result;if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(pt)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(mr)),h!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,E===0&&N(jr)),s!==e){if(o=[],p=C(),p!==e)for(;p!==e;)o.push(p),p=C();else o=e;if(o!==e)if(p=Ue(),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();if(g=i,t.charCodeAt(i)===61?(v=ge,i++):(v=e,E===0&&N(wt)),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();w=De(),w!==e?(X=g,g=yl(p,w)):(i=g,g=e)}else i=g,g=e;for(g===e&&(g=null),t.charCodeAt(i)===44?(v=V,i++):(v=e,E===0&&N(xt)),v===e&&(v=null),b=[],w=C();w!==e;)b.push(w),w=C();if(w=De(),w!==e)if(t.charCodeAt(i)===41?(M=_,i++):(M=e,E===0&&N(Et)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();D=jt(),D!==e?(X=l,l=wl(p,g,w,D)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(pt)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(t.substr(i,3)===ee?(h=ee,i+=3):(h=e,E===0&&N(jr)),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;if(s!==e)if(o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(u=i,t.charCodeAt(i)===61?(g=ge,i++):(g=e,E===0&&N(wt)),g!==e){for(v=[],b=C();b!==e;)v.push(b),b=C();b=De(),b!==e?(X=u,u=ml(o,b)):(i=u,u=e)}else i=u,u=e;for(u===e&&(u=null),t.charCodeAt(i)===44?(g=V,i++):(g=e,E===0&&N(xt)),g===e&&(g=null),v=[],b=C();b!==e;)v.push(b),b=C();if(b=De(),b!==e){if(w=[],M=C(),M!==e)for(;M!==e;)w.push(M),M=C();else w=e;w!==e?(M=jt(),M!==e?(X=l,l=xl(o,u,b,M)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(pt)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(mr)),h!==e)if(s=De(),s!==e)if(t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();u=jt(),u!==e?(X=l,l=$l(s,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(pt)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=De(),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;s!==e?(o=jt(),o!==e?(X=l,l=bl(h,o)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e}}return I[B]={nextPos:i,result:l},l}function po(){var l,f,y,h,s,o=i*76+21,p=I[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,6)===Y?(f=Y,i+=6):(f=e,E===0&&N(Ss)),f!==e)if(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();s=De(),s!==e?(X=l,l=Al(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return I[o]={nextPos:i,result:l},l}function vo(){var l,f,y,h,s,o,p,u,g=i*76+22,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===ue?(f=ue,i+=4):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===123?(h=S,i++):(h=e,E===0&&N(nr)),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();if(o=cs(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();t.charCodeAt(i)===125?(u=T,i++):(u=e,E===0&&N(tt)),u!==e?(X=l,l=Cl(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function go(){var l,f,y,h,s=i*76+23,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===de?(f=de,i+=5):(f=e,E===0&&N(Si)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=_l()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function yo(){var l,f,y,h,s=i*76+24,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,8)===le?(f=le,i+=8):(f=e,E===0&&N(Fi)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=kl()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function wo(){var l,f,y,h,s,o,p=i*76+25,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=De(),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.substr(i,2)===Te?(h=Te,i+=2):(h=e,E===0&&N(Oi)),h===e&&(t.substr(i,2)===ze?(h=ze,i+=2):(h=e,E===0&&N(Ni)),h===e&&(t.charCodeAt(i)===61?(h=ge,i++):(h=e,E===0&&N(wt)))),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();o=De(),o!==e?(X=l,l=Pl(f,h,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function mo(){var l,f,y,h,s,o,p,u,g=i*76+26,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=Dr(),f!==e){for(y=[],h=i,s=[],o=br();o!==e;)s.push(o),o=br();if(o=Fa(),o!==e){for(p=[],u=br();u!==e;)p.push(u),u=br();u=Dr(),u!==e?(X=h,h=ia(f,o,u)):(i=h,h=e)}else i=h,h=e;if(h!==e)for(;h!==e;){for(y.push(h),h=i,s=[],o=br();o!==e;)s.push(o),o=br();if(o=Fa(),o!==e){for(p=[],u=br();u!==e;)p.push(u),u=br();u=Dr(),u!==e?(X=h,h=ia(f,o,u)):(i=h,h=e)}else i=h,h=e}else y=e;y!==e?(X=l,l=El(f,y)):(i=l,l=e)}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function br(){var l,f,y,h=i*76+27,s=I[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=dt,i++):(f=e,E===0&&N(Xn)),f!==e?(y=qe(),y!==e?(f=[f,y],l=f):(i=l,l=e)):(i=l,l=e),l===e&&(l=Ae()),I[h]={nextPos:i,result:l},l)}function Fa(){var l,f,y=i*76+28,h=I[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Ke?(f=Ke,i+=2):(f=e,E===0&&N(Gn)),f===e&&(t.substr(i,2)===ot?(f=ot,i+=2):(f=e,E===0&&N(Ti)),f===e&&(t.substr(i,2)===je?(f=je,i+=2):(f=e,E===0&&N(Ii)),f===e&&(t.substr(i,2)===lt?(f=lt,i+=2):(f=e,E===0&&N(ji)),f===e&&(t.substr(i,2)===Ft?(f=Ft,i+=2):(f=e,E===0&&N(Ri)),f===e&&(t.substr(i,2)===Ot?(f=Ot,i+=2):(f=e,E===0&&N(Di)),f===e&&(t.charCodeAt(i)===60?(f=Ye,i++):(f=e,E===0&&N(Zn)),f===e&&(t.charCodeAt(i)===62?(f=Or,i++):(f=e,E===0&&N(yn)),f===e&&(t.charCodeAt(i)===43?(f=Bt,i++):(f=e,E===0&&N(Qn)),f===e&&(t.charCodeAt(i)===45?(f=wr,i++):(f=e,E===0&&N(Li)),f===e&&(t.charCodeAt(i)===42?(f=Pt,i++):(f=e,E===0&&N(Yn)),f===e&&(t.charCodeAt(i)===94?(f=yr,i++):(f=e,E===0&&N(ea)),f===e&&(t.charCodeAt(i)===47?(f=Nr,i++):(f=e,E===0&&N(Bi)),f===e&&(t.charCodeAt(i)===37?(f=kr,i++):(f=e,E===0&&N(Hi))))))))))))))),f!==e&&(X=l,f=la()),l=f,I[y]={nextPos:i,result:l},l)}function xo(){var l,f,y,h=i*76+29,s=I[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===33?(f=Mr,i++):(f=e,E===0&&N(Ui)),f!==e?(y=De(),y!==e?(X=l,l=Ml(y)):(i=l,l=e)):(i=l,l=e),I[h]={nextPos:i,result:l},l)}function Ar(){var l,f,y,h,s=i*76+30,o=I[s];if(o)return i=o.nextPos,o.result;if(l=i,f=Lr(),f!==e){if(y=[],h=_n(),h===e&&(h=Oa(),h===e&&(h=kn())),h!==e)for(;h!==e;)y.push(h),h=_n(),h===e&&(h=Oa(),h===e&&(h=kn()));else y=e;y!==e?(X=l,l=Sl(f,y)):(i=l,l=e)}else i=l,l=e;return I[s]={nextPos:i,result:l},l}function _n(){var l,f,y,h,s,o,p=i*76+31,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===40?(f=A,i++):(f=e,E===0&&N(mr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();for(h=$o(),h===e&&(h=null),s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e?(X=l,l=Fl(h)):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function $o(){var l,f,y,h,s,o,p=i*76+32,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=De(),f!==e){for(y=[],h=i,s=Br(),s!==e?(o=De(),o!==e?(X=h,h=oa(f,o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Br(),s!==e?(o=De(),o!==e?(X=h,h=oa(f,o)):(i=h,h=e)):(i=h,h=e);X=l,l=Ol(f,y)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Oa(){var l,f,y,h,s,o,p=i*76+33,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===91?(f=Nt,i++):(f=e,E===0&&N(wn)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=De(),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Ms)),o!==e?(X=l,l=ua(h)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function kn(){var l,f,y,h=i*76+34,s=I[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===46?(f=z,i++):(f=e,E===0&&N(us)),f!==e?(y=Ue(),y!==e?(X=l,l=Nl(y)):(i=l,l=e)):(i=l,l=e),I[h]={nextPos:i,result:l},l)}function bo(){var l,f,y,h,s,o,p,u,g,v,b=i*76+35,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===Z?(f=Z,i+=2):(f=e,E===0&&N(mn)),f!==e){if(y=[],h=C(),h!==e)for(;h!==e;)y.push(h),h=C();else y=e;if(y!==e)if(h=De(),h!==e){if(s=[],o=C(),o!==e)for(;o!==e;)s.push(o),o=C();else s=e;if(s!==e)if(o=jt(),o!==e){if(p=i,u=[],g=C(),g!==e)for(;g!==e;)u.push(g),g=C();else u=e;if(u!==e?(g=Na(),g!==e?p=g:(i=p,p=e)):(i=p,p=e),p===e&&(p=null),u=i,g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;g!==e?(v=Ao(),v!==e?u=v:(i=u,u=e)):(i=u,u=e),u===e&&(u=null),X=l,l=Tl(h,o,p,u)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function Na(){var l,f,y,h,s,o,p=i*76+36,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Vs(),f!==e){for(y=[],h=i,s=[],o=C();o!==e;)s.push(o),o=C();for(o=Vs(),o!==e?h=o:(i=h,h=e);h!==e;){for(y.push(h),h=i,s=[],o=C();o!==e;)s.push(o),o=C();o=Vs(),o!==e?h=o:(i=h,h=e)}X=l,l=Il(f,y)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Vs(){var l,f,y,h,s,o,p,u=i*76+37,g=I[u];if(g)return i=g.nextPos,g.result;if(l=i,t.substr(i,4)===se?(f=se,i+=4):(f=e,E===0&&N(qi)),f!==e)if(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();if(s=De(),s!==e){for(o=[],p=C();p!==e;)o.push(p),p=C();p=jt(),p!==e?(X=l,l=jl(s,p)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e;return I[u]={nextPos:i,result:l},l}function Ao(){var l,f,y,h,s,o=i*76+38,p=I[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,4)===ve?(f=ve,i+=4):(f=e,E===0&&N(zi)),f!==e)if(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();s=jt(),s!==e?(X=l,l=Rl(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return I[o]={nextPos:i,result:l},l}function Co(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D,B,Q,xe=i*76+39,ne=I[xe];if(ne)return i=ne.nextPos,ne.result;if(l=i,t.substr(i,5)===ye?(f=ye,i+=5):(f=e,E===0&&N(Vi)),f!==e)if(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();if(s=De(),s!==e){for(o=[],p=C();p!==e;)o.push(p),p=C();if(t.charCodeAt(i)===123?(p=S,i++):(p=e,E===0&&N(nr)),p!==e){for(u=[],g=C();g!==e;)u.push(g),g=C();if(g=[],v=i,b=De(),b!==e){for(w=[],M=C();M!==e;)w.push(M),M=C();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(Fs)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();if(D=jt(),D!==e){for(B=[],Q=C();Q!==e;)B.push(Q),Q=C();X=v,v=fa(s,b,D)}else i=v,v=e}else i=v,v=e}else i=v,v=e;if(v!==e)for(;v!==e;)if(g.push(v),v=i,b=De(),b!==e){for(w=[],M=C();M!==e;)w.push(M),M=C();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(Fs)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();if(D=jt(),D!==e){for(B=[],Q=C();Q!==e;)B.push(Q),Q=C();X=v,v=fa(s,b,D)}else i=v,v=e}else i=v,v=e}else i=v,v=e;else g=e;if(g!==e){if(v=i,t.charCodeAt(i)===42?(b=Pt,i++):(b=e,E===0&&N(Yn)),b!==e){for(w=[],M=C();M!==e;)w.push(M),M=C();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(Fs)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();if(D=jt(),D!==e){for(B=[],Q=C();Q!==e;)B.push(Q),Q=C();v=D}else i=v,v=e}else i=v,v=e}else i=v,v=e;for(v===e&&(v=null),b=[],w=C();w!==e;)b.push(w),w=C();t.charCodeAt(i)===125?(w=T,i++):(w=e,E===0&&N(tt)),w!==e?(X=l,l=Dl(s,g,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;else i=l,l=e;return I[xe]={nextPos:i,result:l},l}function Pn(){var l,f,y,h,s,o,p,u,g=i*76+40,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===Ne?(f=Ne,i+=4):(f=e,E===0&&N(Os)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(t.charCodeAt(i)===123?(h=S,i++):(h=e,E===0&&N(nr)),h!==e){for(s=[],o=C();o!==e;)s.push(o),o=C();if(o=cs(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();t.charCodeAt(i)===125?(u=T,i++):(u=e,E===0&&N(tt)),u!==e?(X=l,l=ca(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[g]={nextPos:i,result:l},l}function _o(){var l,f,y=i*76+41,h=I[y];return h?(i=h.nextPos,h.result):(l=i,f=Oo(),f!==e&&(X=l,f=Ll(f)),l=f,I[y]={nextPos:i,result:l},l)}function Ta(){var l,f,y,h,s,o,p=i*76+42,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===96?(f=me,i++):(f=e,E===0&&N(Ns)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===96?(o=me,i++):(o=e,E===0&&N(Ns)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Ia(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===96?(o=me,i++):(o=e,E===0&&N(Ns)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Ia(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===96?(h=me,i++):(h=e,E===0&&N(Ns)),h!==e?(X=l,l=Bl(y)):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Ia(){var l,f,y,h,s,o,p=i*76+43,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(nr)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=De(),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();t.charCodeAt(i)===125?(o=T,i++):(o=e,E===0&&N(tt)),o!==e?l=h:(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,f=[],y=ja(),y!==e)for(;y!==e;)f.push(y),y=ja();else f=e;f!==e&&(X=l,f=Hl(f)),l=f}return I[p]={nextPos:i,result:l},l}function ja(){var l,f=i*76+44,y=I[f];return y?(i=y.nextPos,y.result):(l=Ra(),l===e&&(Zt.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(Wi))),I[f]={nextPos:i,result:l},l)}function Ra(){var l,f,y,h=i*76+45,s=I[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=dt,i++):(f=e,E===0&&N(Xn)),f!==e?(Es.test(t.charAt(i))?(y=t.charAt(i),i++):(y=e,E===0&&N(Ts)),y!==e?l=y:(i=l,l=e)):(i=l,l=e),I[h]={nextPos:i,result:l},l)}function Ws(){var l,f,y,h,s,o,p=i*76+46,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===34?(f=$e,i++):(f=e,E===0&&N(Is)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===34?(o=$e,i++):(o=e,E===0&&N(Is)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=En(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr))),o!==e?(X=h,h=ha(o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===34?(o=$e,i++):(o=e,E===0&&N(Is)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=En(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr))),o!==e?(X=h,h=ha(o)):(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===34?(h=$e,i++):(h=e,E===0&&N(Is)),h!==e?(X=l,l=Ul(y)):(i=l,l=e)}else i=l,l=e;if(l===e)if(l=i,t.charCodeAt(i)===39?(f=he,i++):(f=e,E===0&&N(js)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===39?(o=he,i++):(o=e,E===0&&N(js)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Mn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr))),o!==e?(X=h,h=pa(o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===39?(o=he,i++):(o=e,E===0&&N(js)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Mn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(rr))),o!==e?(X=h,h=pa(o)):(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===39?(h=he,i++):(h=e,E===0&&N(js)),h!==e?(X=l,l=va(y)):(i=l,l=e)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function En(){var l,f,y=i*76+47,h=I[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Le?(f=Le,i+=2):(f=e,E===0&&N(Rs)),f!==e&&(X=l,f=ql()),l=f,I[y]={nextPos:i,result:l},l)}function Mn(){var l,f,y=i*76+48,h=I[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Re?(f=Re,i+=2):(f=e,E===0&&N(Ds)),f!==e&&(X=l,f=ga()),l=f,I[y]={nextPos:i,result:l},l)}function Da(){var l,f=i*76+49,y=I[f];return y?(i=y.nextPos,y.result):(l=Sn(),l===e&&(l=La()),I[f]={nextPos:i,result:l},l)}function Sn(){var l,f,y,h,s,o,p=i*76+50,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,Jr.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(Ls),Tt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(ta)),f!==e){if(y=[],ht.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Mt)),h!==e)for(;h!==e;)y.push(h),ht.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Mt));else y=e;if(y!==e)if(t.charCodeAt(i)===46?(h=z,i++):(h=e,E===0&&N(us)),h!==e){if(s=[],ht.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,E===0&&N(Mt)),o!==e)for(;o!==e;)s.push(o),ht.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,E===0&&N(Mt));else s=e;s!==e?(X=l,l=zl()):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,Jr.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(Ls),ht.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Mt)),f!==e)if(t.charCodeAt(i)===46?(y=z,i++):(y=e,E===0&&N(us)),y!==e){if(h=[],ht.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,E===0&&N(Mt)),s!==e)for(;s!==e;)h.push(s),ht.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,E===0&&N(Mt));else h=e;h!==e?(X=l,l=Vl()):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return I[p]={nextPos:i,result:l},l}function La(){var l,f,y,h,s=i*76+51,o=I[s];if(o)return i=o.nextPos,o.result;if(l=i,Jr.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(Ls),Tt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(ta)),f!==e){if(y=[],ht.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Mt)),h!==e)for(;h!==e;)y.push(h),ht.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Mt));else y=e;y!==e?(X=l,l=Wl()):(i=l,l=e)}else i=l,l=e;return l===e&&(l=i,Jr.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(Ls),ht.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Mt)),f!==e?(X=l,l=Kl()):(i=l,l=e)),I[s]={nextPos:i,result:l},l}function Fn(){var l,f=i*76+52,y=I[f];return y?(i=y.nextPos,y.result):(l=Ba(),l===e&&(l=ko()),I[f]={nextPos:i,result:l},l)}function Ba(){var l,f,y,h,s=i*76+53,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===He?(f=He,i+=4):(f=e,E===0&&N(ra)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Jl()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function ko(){var l,f,y,h,s=i*76+54,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===We?(f=We,i+=5):(f=e,E===0&&N(ar)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Xl()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function Ha(){var l,f,y,h,s=i*76+55,o=I[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===Ze?(f=Ze,i+=4):(f=e,E===0&&N(Ki)),f!==e?(y=i,E++,bt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(ur)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Gl()):(i=l,l=e)):(i=l,l=e),I[s]={nextPos:i,result:l},l)}function Ua(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D=i*76+56,B=I[D];if(B)return i=B.nextPos,B.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(nr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=[],s=i,o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(yt)),u!==e){if(g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;if(g!==e)if(v=De(),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(xt)),w===e&&(t.charCodeAt(i)===59?(w=nt,i++):(w=e,E===0&&N(Bs))),w===e&&(w=null),M=[],F=C();F!==e;)M.push(F),F=C();X=s,s=da(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(yt)),u!==e){if(g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;if(g!==e)if(v=De(),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(xt)),w===e&&(t.charCodeAt(i)===59?(w=nt,i++):(w=e,E===0&&N(Bs))),w===e&&(w=null),M=[],F=C();F!==e;)M.push(F),F=C();X=s,s=da(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=T,i++):(s=e,E===0&&N(tt)),s!==e?(X=l,l=Zl(h)):(i=l,l=e)}else i=l,l=e;return I[D]={nextPos:i,result:l},l}function Po(){var l,f,y,h,s,o,p,u,g,v,b=i*76+57,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Nt,i++):(f=e,E===0&&N(wn)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=[],s=i,o=De(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();X=s,s=ya(o)}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=De(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();X=s,s=ya(o)}else i=s,s=e;for(s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Ms)),o!==e?(X=l,l=wa(h)):(i=l,l=e)}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function On(){var l,f,y,h,s,o,p,u=i*76+58,g=I[u];if(g)return i=g.nextPos,g.result;if(l=i,f=Ue(),f!==e){for(y=i,h=[],s=C();s!==e;)h.push(s),s=C();if(t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(yt)),s!==e){for(o=[],p=C();p!==e;)o.push(p),p=C();p=zt(),p!==e?y=p:(i=y,y=e)}else i=y,y=e;y===e&&(y=null),X=l,l=Ql(f,y)}else i=l,l=e;return I[u]={nextPos:i,result:l},l}function Nn(){var l,f,y,h,s,o,p=i*76+59,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=On(),f!==e){for(y=[],h=i,s=Br(),s!==e?(o=On(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Br(),s!==e?(o=On(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);X=l,l=ma(f,y)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function qa(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D,B,Q,xe=i*76+60,ne=I[xe];if(ne)return i=ne.nextPos,ne.result;if(l=i,t.charCodeAt(i)===64?(f=at,i++):(f=e,E===0&&N(Ji)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=Ue(),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(t.charCodeAt(i)===40?(o=A,i++):(o=e,E===0&&N(mr)),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(u=Nn(),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();if(t.charCodeAt(i)===41?(v=_,i++):(v=e,E===0&&N(Et)),v!==e){for(b=i,w=[],M=C();M!==e;)w.push(M),M=C();if(t.charCodeAt(i)===58?(M=re,i++):(M=e,E===0&&N(yt)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();D=zt(),D!==e?b=D:(i=b,b=e)}else i=b,b=e;for(b===e&&(b=null),w=[],M=C();M!==e;)w.push(M),M=C();if(t.charCodeAt(i)===123?(M=S,i++):(M=e,E===0&&N(nr)),M!==e){for(F=[],D=C();D!==e;)F.push(D),D=C();for(D=cs(),D===e&&(D=null),B=[],Q=C();Q!==e;)B.push(Q),Q=C();t.charCodeAt(i)===125?(Q=T,i++):(Q=e,E===0&&N(tt)),Q!==e?(X=l,l=Yl(y,h,s,u,b,D)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[xe]={nextPos:i,result:l},l}function Eo(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F=i*76+61,D=I[F];if(D)return i=D.nextPos,D.result;if(l=i,t.substr(i,2)===mt?(f=mt,i+=2):(f=e,E===0&&N(fs)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();for(h=Nn(),h===e&&(h=null),s=[],o=C();o!==e;)s.push(o),o=C();if(t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e){for(p=i,u=[],g=C();g!==e;)u.push(g),g=C();if(t.charCodeAt(i)===58?(g=re,i++):(g=e,E===0&&N(yt)),g!==e){for(v=[],b=C();b!==e;)v.push(b),b=C();b=zt(),b!==e?p=b:(i=p,p=e)}else i=p,p=e;for(p===e&&(p=null),u=[],g=C();g!==e;)u.push(g),g=C();if(t.charCodeAt(i)===123?(g=S,i++):(g=e,E===0&&N(nr)),g!==e){for(v=[],b=C();b!==e;)v.push(b),b=C();for(b=cs(),b===e&&(b=null),w=[],M=C();M!==e;)w.push(M),M=C();t.charCodeAt(i)===125?(M=T,i++):(M=e,E===0&&N(tt)),M!==e?(X=l,l=eo(h,p,b)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[F]={nextPos:i,result:l},l}function Tn(){var l,f,y,h,s,o,p,u,g,v,b=i*76+62,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Nt,i++):(f=e,E===0&&N(wn)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=[],s=i,o=Ie(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();X=s,s=xa(o)}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ie(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(xt)),u===e&&(u=null),g=[],v=C();v!==e;)g.push(v),v=C();X=s,s=xa(o)}else i=s,s=e;for(s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Ms)),o!==e?(X=l,l=to(h)):(i=l,l=e)}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function za(){var l,f,y,h,s,o,p,u,g,v,b,w,M,F,D=i*76+63,B=I[D];if(B)return i=B.nextPos,B.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(nr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();if(h=[],s=i,o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(yt)),u!==e){if(g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;if(g!==e)if(v=Ie(),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(xt)),w===e&&(t.charCodeAt(i)===59?(w=nt,i++):(w=e,E===0&&N(Bs))),w===e&&(w=null),M=[],F=C();F!==e;)M.push(F),F=C();X=s,s=$a(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ue(),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(yt)),u!==e){if(g=[],v=C(),v!==e)for(;v!==e;)g.push(v),v=C();else g=e;if(g!==e)if(v=Ie(),v!==e){for(b=[],w=C();w!==e;)b.push(w),w=C();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(xt)),w===e&&(t.charCodeAt(i)===59?(w=nt,i++):(w=e,E===0&&N(Bs))),w===e&&(w=null),M=[],F=C();F!==e;)M.push(F),F=C();X=s,s=$a(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=T,i++):(s=e,E===0&&N(tt)),s!==e?(X=l,l=ba(h)):(i=l,l=e)}else i=l,l=e;return I[D]={nextPos:i,result:l},l}function zt(){var l,f=i*76+64,y=I[f];return y?(i=y.nextPos,y.result):(l=Mo(),l===e&&(l=Fo()),I[f]={nextPos:i,result:l},l)}function Mo(){var l,f,y,h,s,o,p,u,g,v,b=i*76+65,w=I[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===mt?(f=mt,i+=2):(f=e,E===0&&N(fs)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();for(h=So(),h===e&&(h=null),s=[],o=C();o!==e;)s.push(o),o=C();if(t.charCodeAt(i)===41?(o=_,i++):(o=e,E===0&&N(Et)),o!==e){for(p=[],u=C();u!==e;)p.push(u),u=C();if(t.substr(i,2)===oe?(u=oe,i+=2):(u=e,E===0&&N(Fs)),u!==e){for(g=[],v=C();v!==e;)g.push(v),v=C();v=zt(),v!==e?(X=l,l=ro(h,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return I[b]={nextPos:i,result:l},l}function So(){var l,f,y,h,s,o,p=i*76+66,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=zt(),f!==e){for(y=[],h=i,s=Br(),s!==e?(o=zt(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Br(),s!==e?(o=zt(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);X=l,l=Aa(f,y)}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Fo(){var l,f,y,h,s,o,p,u,g=i*76+67,v=I[g];if(v)return i=v.nextPos,v.result;if(l=i,f=Ue(),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(t.charCodeAt(i)===60?(h=Ye,i++):(h=e,E===0&&N(Zn)),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=zt(),o!==e){for(p=[],u=Ae();u!==e;)p.push(u),u=Ae();t.charCodeAt(i)===62?(u=Or,i++):(u=e,E===0&&N(yn)),u!==e?(X=l,l=so(f,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return l===e&&(l=i,f=Ue(),f!==e&&(X=l,f=no(f)),l=f),I[g]={nextPos:i,result:l},l}function Ue(){var l,f,y,h,s=i*76+68,o=I[s];if(o)return i=o.nextPos,o.result;if(l=i,Rt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Xi)),f!==e){for(y=[],Kn.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(xn));h!==e;)y.push(h),Kn.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(xn));X=l,l=ao()}else i=l,l=e;return I[s]={nextPos:i,result:l},l}function Oo(){var l,f,y,h,s,o,p=i*76+69,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Ue(),f!==e){for(y=[],h=i,t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(yt)),s!==e?(o=Ue(),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(yt)),s!==e?(o=Ue(),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);X=l,l=io()}else i=l,l=e;return I[p]={nextPos:i,result:l},l}function Br(){var l,f,y,h,s,o=i*76+70,p=I[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=C();y!==e;)f.push(y),y=C();if(t.charCodeAt(i)===44?(y=V,i++):(y=e,E===0&&N(xt)),y!==e){for(h=[],s=C();s!==e;)h.push(s),s=C();f=[f,y,h],l=f}else i=l,l=e;if(l===e)if(l=[],f=C(),f!==e)for(;f!==e;)l.push(f),f=C();else l=e;return I[o]={nextPos:i,result:l},l}function jt(){var l,f,y,h,s,o,p=i*76+71,u=I[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(nr)),f!==e){for(y=[],h=C();h!==e;)y.push(h),h=C();for(h=cs(),h===e&&(h=null),s=[],o=C();o!==e;)s.push(o),o=C();t.charCodeAt(i)===125?(o=T,i++):(o=e,E===0&&N(tt)),o!==e?(X=l,l=lo(h)):(i=l,l=e)}else i=l,l=e;return l===e&&(l=cr()),I[p]={nextPos:i,result:l},l}function qe(){var l,f=i*76+72,y=I[f];return y?(i=y.nextPos,y.result):(t.substr(i,2)===Ht?(l=Ht,i+=2):(l=e,E===0&&N(Gi)),l===e&&(Jn.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(sa))),I[f]={nextPos:i,result:l},l)}function Va(){var l,f,y=i*76+73,h=I[y];return h?(i=h.nextPos,h.result):(l=i,E++,t.length>i?(f=t.charAt(i),i++):(f=e,E===0&&N(rr)),E--,f===e?l=void 0:(i=l,l=e),l===e&&(l=qe()),I[y]={nextPos:i,result:l},l)}function C(){var l,f=i*76+74,y=I[f];return y?(i=y.nextPos,y.result):(_i.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(Zi)),I[f]={nextPos:i,result:l},l)}function Ae(){var l,f=i*76+75,y=I[f];return y?(i=y.nextPos,y.result):(ki.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(Qi)),I[f]={nextPos:i,result:l},l)}function ie(l,f,y){const h={type:l};f.children=y;for(const o of Object.keys(f))f[o]!==void 0&&(h[o]=f[o]);const s=R();return h.loc={start:s.start.offset,end:s.end.offset-1},h}if(Rr=d(),Rr!==e&&i===t.length)return Rr;throw Rr!==e&&i`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>Wf(n)).join(", "),e=Wf(t.result);return`@(${r}) { ${e} }`}}}function ju(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return eg(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=ju(t.inner):r=eg("any"),J1(t.name,[r])}}throw new lu(`Unknown type: '${Wf(t)}'`)}else{const r=t.args.map(e=>ju(e));return X1(r,ju(t.result))}}function G1(t){switch(t.type){case"def":{t.varType!=null&&ju(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&ju(r.argType);t.retType!=null&&ju(t.retType);break}}return t}function Z1(t){for(const r of t)ut(r,G1);return t}function Kf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=Kf(n.expr.children)),r.push(n);else{if(e.length>0)throw new lu("invalid attribute.");switch(n.type){case"fn":{n.children=Kf(n.children);break}case"block":{n.statements=Kf(n.statements);break}}r.push(n)}if(e.length>0)throw new lu("invalid attribute.");return r}function Q1(t){if(U1(t)&&jd(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const c of r)switch(c.type){case"callChain":{n=q1(n,c.args,c.loc);break}case"indexChain":{n=z1(n,c.index,c.loc);break}case"propChain":{n=V1(n,c.name,c.loc);break}}return n}return t}function Y1(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:Vo(t.left),right:Vo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:Vo(t.left),right:Vo(t.right)}),priority:3}};function tA(t){const r=t.operators.map(n=>{const c=eA[n];if(c==null)throw new lu(`No such operator: ${n}.`);return c});let e=Jf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?tA(e):e);return t}const Bo=class Bo{constructor(){be(this,"plugins");this.plugins={validate:[K1,Z1],transform:[Kf,Y1,rA]}}static parse(r){return Bo.instance==null&&(Bo.instance=new Bo),Bo.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=Yv(r,{startRule:"Preprocess"});e=Yv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new lu(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`):new lu(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}};be(Bo,"instance");let Uh=Bo;const sA="0.14.1",nA={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { - <: if (i % 15 == 0) "FizzBuzz" - elif (i % 3 == 0) "Fizz" - elif (i % 5 == 0) "Buzz" - else i - }`};let qh=[],Zu=null;function aA(t){return qh=Uh.parse(t),JSON.stringify(qh,null," ")}async function iA(t){Zu==null||Zu.abort(),Zu=new Ps({},{in:t.in,out:r=>{t.out({id:Math.random(),type:r.type,text:Lh(r,!0),print:!0})},log:(r,e)=>{switch(r){case"end":t.end({id:Math.random(),text:Lh(e.val,!0),print:!1});break}}});try{await Zu.exec(qh)}catch(r){t.err(r)}}const lA=Object.freeze(Object.defineProperty({__proto__:null,exec:iA,parse:aA,samples:nA,version:sA},Symbol.toStringTag,{value:"Module"})),oA=t=>(j0("data-v-449a2641"),t=t(),R0(),t),uA={id:"root"},fA={id:"grid1"},cA={class:"type"},hA={id:"grid2"},pA=oA(()=>pn("header",null,null,-1)),tg=["next","develop","0.16.0","0.15.0","0.14.1"],rg="0.16.0",vA=gf({__name:"MainArea",props:{ver:{}},setup(t){const r=t,{parse:e,exec:n,version:c,samples:d}={next:Ax,develop:F$,"0.16.0":Ib,"0.15.0":b1,"0.14.1":lA}[r.ver],$=Ho(window.localStorage.getItem(c)??'<: "Hello, AiScript!"'),x=Ho([]),m=Ho(""),A=Ho(null);tf($,()=>{window.localStorage.setItem(c,$.value);try{m.value=e($.value),A.value=null}catch(k){const S=k;A.value=S.message,console.error("info"in S?S.info:S);return}},{immediate:!0});function _(){x.value=[],n({in:k=>new Promise(S=>{const T=window.prompt(k);S(T??"")}),out:k=>x.value.push(k),end:k=>x.value.push(k),err:k=>{console.error(k),window.alert(`${k}`)}})}return(k,S)=>(hr(),Sr("div",uA,[pn("div",fA,[pr(Xw,{modelValue:$.value,"onUpdate:modelValue":S[0]||(S[0]=T=>$.value=T),samples:uf(d),parseError:A.value,onRun:_},null,8,["modelValue","samples","parseError"]),pr(ef,{id:"logs"},{header:Cs(()=>[Dn("Output")]),default:Cs(()=>[(hr(!0),Sr(es,null,Qf(x.value,T=>(hr(),Sr("div",{class:rs(["log",[{print:T.print},T.type]]),key:T.id},[pn("span",cA,Wo(T.type),1),Dn(" "+Wo(T.text),1)],2))),128))]),_:1})]),pn("div",hA,[pr(ef,{id:"ast"},{header:Cs(()=>[Dn("AST")]),default:Cs(()=>[pn("pre",null,Wo(m.value),1)]),_:1}),pr(ef,{id:"bin"},{header:Cs(()=>[Dn("Bytecode")]),default:Cs(()=>[pA]),_:1}),pr(ef,{id:"debugger"},{header:Cs(()=>[Dn("Debugger")]),_:1})])]))}});const gA=df(vA,[["__scopeId","data-v-449a2641"]]),dA={id:"wrapper"},yA=gf({__name:"App",setup(t){const r=Ho(window.localStorage.getItem("version")??rg),e=Object.fromEntries(tg.map(c=>[c,c+(c==rg?"(latest)":"")]));function n(c){r.value=c,window.localStorage.setItem("version",r.value)}return(c,d)=>(hr(),Sr("div",dA,[pn("h1",null,[Dn(" AiScript ( "),pr(td,{id:"version",options:uf(e),onSelect:n},{default:Cs(()=>[Dn(Wo(r.value),1)]),_:1},8,["options"]),Dn(" ) Playground ")]),(hr(!0),Sr(es,null,Qf(uf(tg),$=>(hr(),Sr("div",null,[$==r.value?(hr(),wc(gA,{key:0,ver:$},null,8,["ver"])):Lu("",!0)]))),256))]))}});const wA=df(yA,[["__scopeId","data-v-caf8f745"]]);hw(wA).mount("#app"); diff --git a/index.html b/index.html index a7213aa..b552836 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ AiScript Playground - +