regor 1.4.8 → 1.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -260,6 +260,9 @@ var fail = (name, message) => {
260
260
  var describeValue = (value) => {
261
261
  if (value === null) return "null";
262
262
  if (value === void 0) return "undefined";
263
+ if (isRef(value)) {
264
+ return `ref<${describeValue(value())}>`;
265
+ }
263
266
  if (typeof value === "string") return "string";
264
267
  if (typeof value === "number") return "number";
265
268
  if (typeof value === "boolean") return "boolean";
@@ -274,6 +277,47 @@ var describeValue = (value) => {
274
277
  const ctorName = value?.constructor?.name;
275
278
  return ctorName && ctorName !== "Object" ? ctorName : "object";
276
279
  };
280
+ var trimPreview = (value) => {
281
+ return value.length > 60 ? `${value.slice(0, 57)}...` : value;
282
+ };
283
+ var formatPreview = (value, depth = 0) => {
284
+ const maxPreviewDepth = 1;
285
+ const maxArrayItems = 5;
286
+ const maxObjectEntries = 5;
287
+ if (depth > maxPreviewDepth) return "unknown";
288
+ if (isRef(value)) {
289
+ const refValue = value();
290
+ return `ref(${formatPreview(refValue, depth + 1)})`;
291
+ }
292
+ if (typeof value === "string") return trimPreview(JSON.stringify(value));
293
+ if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
294
+ return String(value);
295
+ }
296
+ if (typeof value === "symbol") return String(value);
297
+ if (value === null) return "null";
298
+ if (value === void 0) return "undefined";
299
+ if (value instanceof Date) return value.toISOString();
300
+ if (value instanceof RegExp) return String(value);
301
+ if (isArray(value)) {
302
+ const items = value.slice(0, maxArrayItems).map((x) => formatPreview(x, depth + 1)).join(", ");
303
+ return value.length > maxArrayItems ? `[${items}, ...]` : `[${items}]`;
304
+ }
305
+ if (isObject(value)) {
306
+ const entries = Object.entries(value).slice(0, maxObjectEntries);
307
+ if (entries.length === 0) return "{}";
308
+ const text = entries.map(([key, entry]) => {
309
+ const preview = formatPreview(entry, depth + 1);
310
+ return `${key}: ${preview}`;
311
+ }).join(", ");
312
+ return Object.keys(value).length > maxObjectEntries ? `{ ${text}, ... }` : `{ ${text} }`;
313
+ }
314
+ return "unknown";
315
+ };
316
+ var describe = (value) => {
317
+ const type = describeValue(value);
318
+ const preview = formatPreview(value);
319
+ return `got ${type} (${preview})`;
320
+ };
277
321
  var formatLiteral = (value) => {
278
322
  if (typeof value === "string") return `"${value}"`;
279
323
  if (typeof value === "number" || typeof value === "boolean") {
@@ -284,18 +328,24 @@ var formatLiteral = (value) => {
284
328
  return describeValue(value);
285
329
  };
286
330
  var isString2 = (value, name) => {
287
- if (typeof value !== "string") fail(name, "expected string");
331
+ if (typeof value !== "string")
332
+ fail(name, `expected string, ${describe(value)}`);
288
333
  };
289
334
  var isNumber = (value, name) => {
290
- if (typeof value !== "number") fail(name, "expected number");
335
+ if (typeof value !== "number")
336
+ fail(name, `expected number, ${describe(value)}`);
291
337
  };
292
338
  var isBoolean = (value, name) => {
293
- if (typeof value !== "boolean") fail(name, "expected boolean");
339
+ if (typeof value !== "boolean")
340
+ fail(name, `expected boolean, ${describe(value)}`);
294
341
  };
295
342
  var isClass = (ctor) => {
296
343
  return (value, name) => {
297
344
  if (!(value instanceof ctor)) {
298
- fail(name, `expected instance of ${ctor.name || "provided class"}`);
345
+ fail(
346
+ name,
347
+ `expected instance of ${ctor.name || "provided class"}, ${describe(value)}`
348
+ );
299
349
  }
300
350
  };
301
351
  };
@@ -316,13 +366,13 @@ var oneOf = (values) => {
316
366
  if (values.includes(value)) return;
317
367
  fail(
318
368
  name,
319
- `expected one of ${values.map((x) => formatLiteral(x)).join(", ")}`
369
+ `expected one of ${values.map((x) => formatLiteral(x)).join(", ")}, ${describe(value)}`
320
370
  );
321
371
  };
322
372
  };
323
373
  var arrayOf = (validator) => {
324
374
  return (value, name, head) => {
325
- if (!isArray(value)) fail(name, "expected array");
375
+ if (!isArray(value)) fail(name, `expected array, ${describe(value)}`);
326
376
  const items = value;
327
377
  for (let i = 0; i < items.length; ++i) {
328
378
  validator(items[i], `${name}[${i}]`, head);
@@ -331,7 +381,7 @@ var arrayOf = (validator) => {
331
381
  };
332
382
  var shape = (schema) => {
333
383
  return (value, name, head) => {
334
- if (!isObject(value)) fail(name, "expected object");
384
+ if (!isObject(value)) fail(name, `expected object, ${describe(value)}`);
335
385
  const record = value;
336
386
  for (const key in schema) {
337
387
  const validator = schema[key];
@@ -341,13 +391,16 @@ var shape = (schema) => {
341
391
  };
342
392
  var refOf = (validator) => {
343
393
  return (value, name, head) => {
344
- if (!isRef(value)) fail(name, "expected ref");
345
- const refValue = value;
346
- validator(refValue(), `${name}.value`, head);
394
+ if (isRef(value)) {
395
+ validator(value(), `${name}.value`, head);
396
+ return;
397
+ }
398
+ fail(name, `expected ref, ${describe(value)}`);
347
399
  };
348
400
  };
349
401
  var pval = {
350
402
  fail,
403
+ describe,
351
404
  isString: isString2,
352
405
  isNumber,
353
406
  isBoolean,
@@ -1,3 +1,3 @@
1
- "use strict";var on=Object.defineProperty;var br=Object.getOwnPropertyDescriptor;var xr=Object.getOwnPropertyNames;var Tr=Object.prototype.hasOwnProperty;var Cr=(t,e)=>{for(var n in e)on(t,n,{get:e[n],enumerable:!0})},Er=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of xr(e))!Tr.call(t,r)&&r!==n&&on(t,r,{get:()=>e[r],enumerable:!(o=br(e,r))||o.enumerable});return t};var vr=t=>Er(on({},"__esModule",{value:!0}),t);var mi={};Cr(mi,{ComponentHead:()=>qe,ContextRegistry:()=>en,RegorConfig:()=>ce,addUnbinder:()=>j,batch:()=>gr,collectRefs:()=>At,computeMany:()=>lr,computeRef:()=>pr,computed:()=>ur,createApp:()=>ir,defineComponent:()=>ar,drainUnbind:()=>$n,endBatch:()=>jn,entangle:()=>Je,flatten:()=>ie,getBindData:()=>Ae,html:()=>Hn,isDeepRef:()=>Ve,isRaw:()=>Qe,isRef:()=>T,markRaw:()=>fr,observe:()=>ne,observeMany:()=>hr,observerCount:()=>yr,onMounted:()=>cr,onUnmounted:()=>te,pause:()=>$t,persist:()=>mr,pval:()=>Gn,raw:()=>dr,ref:()=>ye,removeNode:()=>F,resume:()=>Ft,silence:()=>St,sref:()=>se,startBatch:()=>Bn,toFragment:()=>He,toJsonTemplate:()=>tt,trigger:()=>J,unbind:()=>me,unref:()=>P,useScope:()=>wt,warningHandler:()=>Le,watchEffect:()=>De});module.exports=vr(mi);var _e=Symbol(":regor");var me=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];Rr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Rr=t=>{let e=t[_e];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[_e]=void 0};var $e=[],lt=!1,pt,_n=()=>{if(lt=!1,pt=void 0,$e.length!==0){for(let t=0;t<$e.length;++t)me($e[t]);$e.length=0}},F=t=>{t.remove(),$e.push(t),lt||(lt=!0,pt=setTimeout(_n,1))},$n=async()=>{$e.length===0&&!lt||(pt&&clearTimeout(pt),_n())};var q=t=>typeof t=="function",z=t=>typeof t=="string",Fn=t=>typeof t>"u",le=t=>t==null||typeof t>"u",B=t=>typeof t!="string"||!t?.trim(),wr=Object.prototype.toString,rn=t=>wr.call(t),we=t=>rn(t)==="[object Map]",ae=t=>rn(t)==="[object Set]",sn=t=>rn(t)==="[object Date]",nt=t=>typeof t=="symbol",E=Array.isArray,M=t=>t!==null&&typeof t=="object";var qn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},U=(t,...e)=>{let n=qn[t];return new Error(q(n)?n.call(qn,...e):n)};var ft=[],zn=()=>{let t={onMounted:[],onUnmounted:[]};return ft.push(t),t},ke=t=>{let e=ft[ft.length-1];if(!e&&!t)throw U(2);return e},Kn=t=>{let e=ke();return t&&cn(t),ft.pop(),e},an=Symbol("csp"),cn=t=>{let e=t,n=e[an];if(n){let o=ke();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[an]=ke()},mt=t=>t[an];var Se=t=>{mt(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Wn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},D=(t,...e)=>{let n=Wn[t],o=q(n)?n.call(Wn,...e):n,r=Le.warning;r&&(z(o)?r(o):r(o,...o.args))},Le={warning:console.warn};var dt=Symbol("ref"),Q=Symbol("sref"),ht=Symbol("raw");var T=t=>t!=null&&t[Q]===1;var Fe=class extends Error{propPath;detail;constructor(e,n){super(n),this.name="PropValidationError",this.propPath=e,this.detail=n}},be=(t,e)=>{throw new Fe(t,`${e}.`)},Sr=t=>{if(t===null)return"null";if(t===void 0)return"undefined";if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(E(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=t?.constructor?.name;return e&&e!=="Object"?e:"object"},Ar=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Sr(t),Nr=(t,e)=>{typeof t!="string"&&be(e,"expected string")},Or=(t,e)=>{typeof t!="number"&&be(e,"expected number")},Mr=(t,e)=>{typeof t!="boolean"&&be(e,"expected boolean")},kr=t=>(e,n)=>{e instanceof t||be(n,`expected instance of ${t.name||"provided class"}`)},Lr=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},Ir=t=>(e,n,o)=>{e!==null&&t(e,n,o)},Vr=t=>(e,n)=>{t.includes(e)||be(n,`expected one of ${t.map(o=>Ar(o)).join(", ")}`)},Dr=t=>(e,n,o)=>{E(e)||be(n,"expected array");let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)},Pr=t=>(e,n,o)=>{M(e)||be(n,"expected object");let r=e;for(let s in t){let a=t[s];a(r[s],`${n}.${s}`,o)}},Ur=t=>(e,n,o)=>{T(e)||be(n,"expected ref"),t(e(),`${n}.value`,o)},Gn={fail:be,isString:Nr,isNumber:Or,isBoolean:Mr,isClass:kr,optional:Lr,nullable:Ir,oneOf:Vr,arrayOf:Dr,shape:Pr,refOf:Ur};var Hr=(t,e,n)=>{let o=t.tagName?.toLowerCase?.()||"unknown",r=n instanceof Fe?n.propPath:e,s=n instanceof Fe?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},qe=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;G;J;constructor(e,n,o,r,s,a){this.props=e,this.G=n,this.ctx=o,this.start=r,this.end=s,this.J=a}emit=(e,n)=>{this.G.dispatchEvent(new CustomEvent(e,{detail:n}))};findContext(e,n=0){if(n<0)return;let o=0;for(let r of this.ctx??[])if(r instanceof e){if(o===n)return r;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.J==="off")return;let n=this.props;for(let o in e){let r=e[o];if(!r)continue;let s=r;try{s(n[o],o,this)}catch(a){let i=Hr(this.G,o,a);if(this.J==="warn"){Le.warning(i.message,i);continue}throw i}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)F(e),e=e.nextSibling;for(let o of this.ctx)Se(o)}};var Ae=t=>{let e=t,n=e[_e];if(n)return n;let o={unbinders:[],data:{}};return e[_e]=o,o};var j=(t,e)=>{Ae(t).unbinders.push(e)};var gt={},yt={},Jn=1,Qn=t=>{let e=(Jn++).toString();return gt[e]=t,yt[e]=0,e},un=t=>{yt[t]+=1},ln=t=>{--yt[t]===0&&(delete gt[t],delete yt[t])},Xn=t=>gt[t],pn=()=>Jn!==1&&Object.keys(gt).length>0,ot="r-switch",Br=t=>{let e=t.filter(o=>xe(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(ot))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},ze=(t,e)=>{if(!pn())return;let n=Br(e);n.length!==0&&(n.forEach(un),j(t,()=>{n.forEach(ln)}))};var bt=()=>{},fn=(t,e,n,o)=>{let r=[];for(let s of t){let a=s.cloneNode(!0);n.insertBefore(a,o),r.push(a)}Ne(e,r)},mn=Symbol("r-if"),Yn=Symbol("r-else"),Zn=t=>t[Yn]===1,xt=class{r;N;ge;Q;X;x;R;constructor(e){this.r=e,this.N=e.o.u.if,this.ge=Ct(e.o.u.if),this.Q=e.o.u.else,this.X=e.o.u.elseif,this.x=e.o.u.for,this.R=e.o.u.pre}ot(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),this.r.M.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}Y(e){return e[mn]?!0:(e[mn]=!0,Tt(e,this.ge).forEach(n=>n[mn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Y(e)||this.ot(e,this.x))return;let n=e.getAttribute(this.N);if(!n){D(0,this.N,e);return}e.removeAttribute(this.N),this.O(e,n)}U(e,n,o){let r=Ke(e),s=e.parentNode,a=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(a,e),ze(a,r),r.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[Yn]=1);let i=document.createComment(`__end__ :${n}${o??""}`);return s.insertBefore(i,a.nextSibling),{nodes:r,parent:s,commentBegin:a,commentEnd:i}}be(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.Q)){e.removeAttribute(this.Q);let{nodes:r,parent:s,commentBegin:a,commentEnd:i}=this.U(e,"else");return[{mount:()=>{fn(r,this.r,s,i)},unmount:()=>{Te(a,i)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.X);if(!r)return[];e.removeAttribute(this.X);let{nodes:s,parent:a,commentBegin:i,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.r.m.V(r),u=l.value,p=this.be(o,n),f=bt;return j(i,()=>{l.stop(),f(),f=bt}),f=l.subscribe(n),[{mount:()=>{fn(s,this.r,a,c)},unmount:()=>{Te(i,c)},isTrue:()=>!!u()[0],isMounted:!1},...p]}}O(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:a,commentEnd:i}=this.U(e,"if",` => ${n} `),c=this.r.m.V(n),l=c.value,u=!1,p=this.r.m,f=p.L(),h=()=>{p.C(f,()=>{if(l()[0])u||(fn(r,this.r,s,i),u=!0),m.forEach(C=>{C.unmount(),C.isMounted=!1});else{Te(a,i),u=!1;let C=!1;for(let R of m)!C&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),C=!0):(R.unmount(),R.isMounted=!1)}})},m=this.be(o,h),d=bt;j(a,()=>{c.stop(),d(),d=bt}),h(),d=c.subscribe(h)}};var Ke=t=>{let e=pe(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r?.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Ne=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(Zn(o)||t._(o))}},Tt=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},pe=t=>t instanceof HTMLTemplateElement,xe=t=>t.nodeType===Node.ELEMENT_NODE,rt=t=>t.nodeType===Node.ELEMENT_NODE,eo=t=>t instanceof HTMLSlotElement,Ce=t=>pe(t)?t.content.childNodes:t.childNodes,Te=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;F(n),n=o}},to=function(){return this()},jr=function(t){return this(t)},_r=()=>{throw new Error("value is readonly.")},$r={get:to,set:jr,enumerable:!0,configurable:!1},Fr={get:to,set:_r,enumerable:!0,configurable:!1},Oe=(t,e)=>{Object.defineProperty(t,"value",e?Fr:$r)},no=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Ct=t=>`[${CSS.escape(t)}]`,Et=(t,e)=>(t.startsWith("@")&&(t=e.u.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.u.dynamic)),t),dn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},qr=/-(\w)/g,H=dn(t=>t&&t.replace(qr,(e,n)=>n?n.toUpperCase():"")),zr=/\B([A-Z])/g,We=dn(t=>t&&t.replace(zr,"-$1").toLowerCase()),st=dn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var vt={mount:()=>{}};var Ge=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Rt=t=>{mt(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var hn=Symbol("scope"),wt=t=>{try{zn();let e=t();cn(e);let n={context:e,unmount:()=>Se(e),[hn]:1};return n[hn]=1,n}finally{Kn()}},oo=t=>M(t)?hn in t:!1;var yn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(M(o))for(let r of Object.entries(o)){let s=r[0],a=r[1],i=n[s];i!==a&&(T(i)?i(a):n[s]=a)}}})};var te=(t,e)=>{ke(e)?.onUnmounted.push(t)};var ne=(t,e,n,o=!0)=>{if(!T(t))throw U(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&te(s,!0),s};var Je=(t,e)=>{if(t===e)return()=>{};let n=ne(t,r=>e(r)),o=ne(e,r=>t(r));return e(t()),()=>{n(),o()}};var Qe=t=>!!t&&t[ht]===1;var Ve=t=>t?.[dt]===1;var fe=[],ro=t=>{fe.length!==0&&fe[fe.length-1]?.add(t)},De=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Kr(t,e),te(()=>e.stop(),!0),e.stop},Kr=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(fe.push(s),t(a=>n.push(a)),o)return;for(let a of[...s]){let i=ne(a,()=>{r(),De(t)});n.push(i)}}finally{fe.pop()}},St=t=>{let e=fe.length,n=e>0&&fe[e-1];try{return n&&fe.push(null),t()}finally{n&&fe.pop()}},At=t=>{try{let e=new Set;return fe.push(e),{value:t(),refs:[...e]}}finally{fe.pop()}};var J=(t,e,n)=>{if(!T(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(E(r)||ae(r))for(let s of r)J(s,e,!0);else if(we(r))for(let s of r)J(s[0],e,!0),J(s[1],e,!0);if(M(r))for(let s in r)J(r[s],e,!0)}};function Wr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Xe=(t,e,n)=>{n.forEach(function(o){let r=t[o];Wr(e,o,function(...a){let i=r.apply(this,a),c=this[Q];for(let l of c)J(l);return i})})},Nt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var so=Array.prototype,gn=Object.create(so),Gr=["push","pop","shift","unshift","splice","sort","reverse"];Xe(so,gn,Gr);var io=Map.prototype,Ot=Object.create(io),Jr=["set","clear","delete"];Nt(Ot,"Map");Xe(io,Ot,Jr);var ao=Set.prototype,Mt=Object.create(ao),Qr=["add","clear","delete"];Nt(Mt,"Set");Xe(ao,Mt,Qr);var he={},se=t=>{if(T(t)||Qe(t))return t;let e={auto:!0,_value:t},n=c=>M(c)?Q in c?!0:E(c)?(Object.setPrototypeOf(c,gn),!0):ae(c)?(Object.setPrototypeOf(c,Mt),!0):we(c)?(Object.setPrototypeOf(c,Ot),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(he.stack&&he.stack.length){he.stack[he.stack.length-1].add(i);return}r.size!==0&&St(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},a=c=>{let l=c[Q];l||(c[Q]=l=new Set),l.add(i)},i=(...c)=>{if(!(2 in c)){let u=c[0],p=c[1];return 0 in c?e._value===u||T(u)&&(u=u(),e._value===u)?u:(n(u)&&a(u),e._value=u,e.auto&&s(u,p),e._value):(ro(i),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let p=f=>{r.delete(f)};return r.add(u),()=>{p(u)}}case 1:{let u=c[1],p=e._value;s(p,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return i[Q]=1,Oe(i,!1),o&&a(t),i};var ye=t=>{if(Qe(t))return t;let e;if(T(t)?(e=t,t=e()):e=se(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[dt]=1,E(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Ve(r)||(t[o]=ye(r))}return e}if(!M(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Ve(o))continue;let r=n[0];nt(r)||(t[r]=null,t[r]=ye(o))}return e};var co=Symbol("modelBridge"),kt=()=>{},Xr=t=>!!t?.[co],Yr=t=>{t[co]=1},Zr=t=>{let e=ye(t());return Yr(e),e},uo={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return kt;let n=H(e),o,r,s=kt,a=()=>{s(),s=kt,o=void 0,r=void 0},i=()=>{s(),s=kt},c=(u,p)=>{o!==u&&(i(),s=Je(u,p),o=u)},l=()=>{let u=t.refs[0]??t.value()[0],p=t.context,f=p[n];if(!T(u)){if(r&&f===r){r(u);return}if(a(),T(f)){f(u);return}p[n]=u;return}if(Xr(u)){if(f===u)return;T(f)?c(u,f):p[n]=u;return}r||(r=Zr(u)),p[n]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Lt=class{r;xe;Te="";Re=-1;constructor(e){this.r=e,this.xe=e.o.u.inherit}k(e){this.rt(e)}st(e){if(this.Re!==e.size){let n=[...e.keys()];this.Te=[...n,...n.map(We)].join(","),this.Re=e.size}return this.Te}it(e){for(let n=0;n<e.length;++n){let o=e[n]?.components;if(o)for(let r in o)return!0}return!1}at(e){if(!pe(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return pe(e)&&e.getAttributeNames().length===0}rt(e){let n=this.r,o=n.m,r=n.o.Z,s=n.o.$;if(r.size===0&&!this.it(o.l))return;let a=o.ee(),i=this.Ce();if(B(i))return;let c=this.ut(e,i);for(let l of c){if(l.hasAttribute(n.R))continue;let u=l.parentNode;if(!u)continue;let p=l.nextSibling,f=H(l.tagName).toUpperCase(),m=a[f]??s.get(f);if(!m)continue;let d=m.template;if(!d)continue;let g=l.parentElement;if(!g)continue;let C=new Comment(" begin component: "+l.tagName),R=new Comment(" end component: "+l.tagName);g.insertBefore(C,l),l.remove();let _=n.o.u.context,K=n.o.u.contextAlias,V=n.o.u.bind,oe=(y,A)=>{let v={},$=y.hasAttribute(_);return o.C(A,()=>{o.v(v),$?n.y(yn,y,_):y.hasAttribute(K)&&n.y(yn,y,K);let b=m.props;if(!b||b.length===0)return;b=b.map(H);let w=new Map(b.map(G=>[G.toLowerCase(),G]));for(let G of[...b,...b.map(We)]){let ue=y.getAttribute(G);ue!==null&&(v[H(G)]=ue,y.removeAttribute(G))}let k=n.F.Ee(y,!1);for(let[G,ue]of k.entries()){let[ge,I]=ue.te;if(!I)continue;let ee=w.get(H(I).toLowerCase());ee&&(ge!=="."&&ge!==":"&&ge!==V||n.y(uo,y,G,!0,ee,ue.ne))}}),v},X=[...o.L()],N=()=>{let y=oe(l,X),A=new qe(y,l,X,C,R,n.o.propValidationMode),v=wt(()=>m.context(A)??{}).context;if(A.autoProps){for(let[$,b]of Object.entries(y))if($ in v){let w=v[$];if(w===b)continue;if(T(w)){T(b)?A.entangle?j(C,Je(b,w)):w(b()):w(b);continue}}else v[$]=b;A.onAutoPropsAssigned?.()}return{componentCtx:v,head:A}},{componentCtx:re,head:x}=N(),S=[...Ce(d)],Y=S.length,Be=l.childNodes.length===0,je=y=>{let A=y.parentElement,v=y.name;if(B(v)&&(v=y.getAttributeNames().filter(w=>w.startsWith("#"))[0],B(v)?v="default":v=v.substring(1)),Be){if(v==="default"){let w=n.o.u.text,k=l.getAttribute(w);if(!B(k)){let G=document.createElement("span");G.setAttribute(w,k),A.insertBefore(G,y),l.removeAttribute(w);return}}for(let w of[...y.childNodes])A.insertBefore(w,y);return}let $=l.querySelector(`template[name='${v}'], template[\\#${v}]`);!$&&v==="default"&&($=[...l.querySelectorAll("template:not([name])")].find(k=>this.ct(k))??null);let b=w=>{x.enableSwitch&&o.C(X,()=>{o.v(re);let k=oe(y,o.L());o.C(X,()=>{o.v(k);let G=o.L(),ue=Qn(G);for(let ge of w)xe(ge)&&(ge.setAttribute(ot,ue),un(ue),j(ge,()=>{ln(ue)}))})})};if($){let w=[...Ce($)];for(let k of w)A.insertBefore(k,y);b(w)}else{if(v!=="default"){for(let k of[...Ce(y)])A.insertBefore(k,y);return}let w=[...Ce(l)].filter(k=>!this.at(k));for(let k of w)A.insertBefore(k,y);b(w)}},tn=y=>{if(!xe(y))return;let A=y.querySelectorAll("slot");if(eo(y)){je(y),y.remove();return}for(let v of A)je(v),v.remove()};(()=>{for(let y=0;y<Y;++y)S[y]=S[y].cloneNode(!0),u.insertBefore(S[y],p),tn(S[y])})(),g.insertBefore(R,p);let O=()=>{if(!m.inheritAttrs)return;let y=S.filter(v=>v.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(v=>v.hasAttribute(this.xe)));let A=y[0];if(A)for(let v of l.getAttributeNames()){if(v===_||v===K)continue;let $=l.getAttribute(v);if(v==="class"){let b=Ge($);b.length>0&&A.classList.add(...b)}else if(v==="style"){let b=A.style,w=l.style;for(let k of w)b.setProperty(k,w.getPropertyValue(k))}else A.setAttribute(Et(v,n.o),$)}},W=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.u.on)&&l.removeAttribute(y)},Z=()=>{O(),W(),o.v(re),n.ve(l,!1),re.$emit=x.emit,Ne(n,S),j(l,()=>{Se(re)}),j(C,()=>{me(l)}),Rt(re)};o.C(X,Z)}}Ce(){let e=this.r,n=e.m,o=e.o.Z,r=n.pt(),s=this.st(o);return[...s?[s]:[],...r,...r.map(We)].join(",")}ut(e,n){let o=[];if(B(n))return o;if(e.matches?.(n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();if(s.matches(n)){o.push(s);continue}r.push(...this.q(s).reverse())}return o}j(e,n){let o=this.Ce(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!B(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e?.children;if(n?.length!=null){let r=[];for(let s=0;s<n.length;++s){let a=n[s];xe(a)&&r.push(a)}return r}let o=e?.childNodes;if(o?.length!=null){let r=[];for(let s=0;s<o.length;++s){let a=o[s];xe(a)&&r.push(a)}return r}return[]}};var bn=class{te;ne;we=[];constructor(e,n){this.te=e,this.ne=n}},It=class{r;Se;Ae;oe;constructor(e){this.r=e,this.Se=e.o.lt(),this.oe=new Map;let n=new Map;for(let o of this.Se){let r=o[0]??"",s=n.get(r);s?s.push(o):n.set(r,[o])}this.Ae=n}ke(e){let n=this.oe.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),i=(s<0?o:o.substring(0,s)).split(/[:@]/);B(i[0])&&(i[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,u=!1;for(let f=0;f<c.length;++f){let h=c[f];if(!l&&h==="camel"?l=!0:!u&&h==="prop"&&(u=!0),l&&u)break}l&&(i[i.length-1]=H(i[i.length-1])),u&&(i[0]=".");let p={terms:i,flags:c};return this.oe.set(e,p),p}Ee(e,n){let o=new Map;if(!rt(e))return o;let r=this.Ae,s=(i,c)=>{let l=r.get(c[0]??"");if(l)for(let u=0;u<l.length;++u){if(!c.startsWith(l[u]))continue;let p=o.get(c);if(!p){let f=this.ke(c);p=new bn(f.terms,f.flags),o.set(c,p)}p.we.push(i);return}},a=i=>{let c=i.attributes;if(!(!c||c.length===0))for(let l=0;l<c.length;++l){let u=c.item(l)?.name;u&&s(i,u)}};return a(e),!n||!e.firstElementChild||this.r.M.j(e,a),o}};var lo=()=>{},es=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Vt=class{r;I;constructor(e){this.r=e,this.I=e.o.u.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.r.M.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let a of e.getAttributeNames())a!=="is"&&s.setAttribute(a,e.getAttribute(a));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.r._(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.O(e,n)}U(e,n){let o=Ke(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),ze(s,o),o.forEach(i=>{F(i)}),e.remove();let a=document.createComment(`__end__ dynamic ${n??""}`);return r.insertBefore(a,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:a}}O(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:a}=this.U(e,` => ${n} `),i=this.r.m.V(n),c=i.value,l=this.r.m,u=l.L(),p={name:""},f=pe(e)?o:[...o[0].childNodes],h=()=>{l.C(u,()=>{let g=c()[0];if(M(g)&&(g.name?g=g.name:g=Object.entries(l.ee()).filter(R=>R[1]===g)[0]?.[0]),!z(g)||B(g)){Te(s,a);return}if(p.name===g)return;Te(s,a);let C=document.createElement(g);for(let R of e.getAttributeNames())R!==this.I&&C.setAttribute(R,e.getAttribute(R));es(f,C),r.insertBefore(C,a),this.r._(C),p.name=g})},m=lo;j(s,()=>{i.stop(),m(),m=lo}),h(),m=i.subscribe(h)}};var P=t=>{let e=t;return e!=null&&e[Q]===1?e():e};var ts=(t,e)=>{let[n,o]=e;q(o)?o(t,n):t.innerHTML=n?.toString()},Dt={mount:()=>({update:({el:t,values:e})=>{ts(t,e)}})};var Pt=class t{re;constructor(e){this.re=e}static ft(e,n){let o=e.m,r=e.o,s=r.u,a=new Set([s.for,s.if,s.else,s.elseif,s.pre]),i=r.B,c=o.ee();if(Object.keys(c).length>0||r.$.size>0)return;let l=e.F,u=[],p=0,f=[];for(let h=n.length-1;h>=0;--h)f.push(n[h]);for(;f.length>0;){let h=f.pop();if(h.nodeType===Node.ELEMENT_NODE){let d=h;if(d.tagName==="TEMPLATE"||d.tagName.includes("-"))return;let g=H(d.tagName).toUpperCase();if(r.$.has(g)||c[g])return;let C=d.attributes;for(let R=0;R<C.length;++R){let _=C.item(R)?.name;if(!_)continue;if(a.has(_))return;let{terms:K,flags:V}=l.ke(_),[oe,X]=K,N=i[_]??i[oe];if(N){if(N===Dt)return;u.push({nodeIndex:p,attrName:_,directive:N,option:X,flags:V})}}++p}let m=h.childNodes;for(let d=m.length-1;d>=0;--d)f.push(m[d])}if(u.length!==0)return new t(u)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let a=s.childNodes;for(let i=a.length-1;i>=0;--i)r.push(a[i])}for(let s=0;s<this.re.length;++s){let a=this.re[s],i=o[a.nodeIndex];i&&e.y(a.directive,i,a.attrName,!1,a.option,a.flags)}}};var ns=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},os=t=>{let e=t.length,n=t.slice(),o=[],r,s,a;for(let i=0;i<e;++i){let c=t[i];if(c===0)continue;let l=o[o.length-1];if(l===void 0||t[l]<c){n[i]=l??-1,o.push(i);continue}for(r=0,s=o.length-1;r<s;)a=r+s>>1,t[o[a]]<c?r=a+1:s=a;c<t[o[r]]&&(r>0&&(n[i]=o[r-1]),o[r]=i)}for(r=o.length,s=o[r-1]??-1;r-- >0;)o[r]=s,s=n[s];return o},Ut=class{static mt(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:a,removeMountItem:i,endAnchor:c}=e,l=n.length,u=o.length,p=new Array(u),f=new Set;for(let x=0;x<u;++x){let S=r(o[x]);if(S===void 0||f.has(S))return;f.add(S),p[x]=S}let h=new Array(u),m=0,d=l-1,g=u-1;for(;m<=d&&m<=g;){let x=n[m];if(r(x.value)!==p[m]||!s(x.value,o[m]))break;x.value=o[m],h[m]=x,++m}for(;m<=d&&m<=g;){let x=n[d];if(r(x.value)!==p[g]||!s(x.value,o[g]))break;x.value=o[g],h[g]=x,--d,--g}if(m>d){for(let x=g;x>=m;--x){let S=x+1<u?h[x+1].items[0]:c;h[x]=a(x,o[x],S)}return h}if(m>g){for(let x=m;x<=d;++x)i(n[x]);return h}let C=m,R=m,_=g-R+1,K=new Array(_).fill(0),V=new Map;for(let x=R;x<=g;++x)V.set(p[x],x);let oe=!1,X=0;for(let x=C;x<=d;++x){let S=n[x],Y=V.get(r(S.value));if(Y===void 0){i(S);continue}if(!s(S.value,o[Y])){i(S);continue}S.value=o[Y],h[Y]=S,K[Y-R]=x+1,Y>=X?X=Y:oe=!0}let N=oe?os(K):[],re=N.length-1;for(let x=_-1;x>=0;--x){let S=R+x,Y=S+1<u?h[S+1].items[0]:c;if(K[x]===0){h[S]=a(S,o[S],Y);continue}let Be=h[S];oe&&(re>=0&&N[re]===x?--re:Be&&ns(Be,Y))}return h}};var it=class{T=[];P=new Map;get w(){return this.T.length}se;constructor(e){this.se=e}ie(e){let n=this.se(e.value);n!==void 0&&this.P.set(n,e)}ae(e){let n=this.se(this.T[e]?.value);n!==void 0&&this.P.delete(n)}static dt(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.w,this.T.push(e),this.ie(e)}yt(e,n){let o=this.w;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.ie(n)}D(e){return this.T[e]}ce(e,n){this.ae(e),this.T[e]=n,this.ie(n),n.order=e}Ne(e){this.ae(e),this.T.splice(e,1);let n=this.w;for(let o=e;o<n;++o)this.T[o].order=o}Me(e){let n=this.w;for(let o=e;o<n;++o)this.ae(o);this.T.splice(e)}en(e){return this.P.has(e)}ht(e){return this.P.get(e)?.order??-1}};var xn=Symbol("r-for"),rs=t=>-1,po=()=>{},Ht=class t{r;x;Oe;R;constructor(e){this.r=e,this.x=e.o.u.for,this.Oe=Ct(this.x),this.R=e.o.u.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Ve(e),this.r.M.j(e,o=>{o.hasAttribute(this.x)&&this.Ve(o)}),n}Y(e){return e[xn]?!0:(e[xn]=!0,Tt(e,this.Oe).forEach(n=>n[xn]=!0),!1)}Ve(e){if(e.hasAttribute(this.R)||this.Y(e))return;let n=e.getAttribute(this.x);if(!n){D(0,this.x,e);return}e.removeAttribute(this.x),this.gt(e,n)}Le(e){return le(e)?[]:(q(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}gt(e,n){let o=this.bt(n);if(!o?.list){D(1,this.x,n,e);return}let r=this.r.o.u.key,s=this.r.o.u.keyBind,a=e.getAttribute(r)??e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let i=Ke(e),c=Pt.ft(this.r,i),l=e.parentNode;if(!l)return;let u=`${this.x} => ${n}`,p=new Comment(`__begin__ ${u}`);l.insertBefore(p,e),ze(p,i),i.forEach(O=>{F(O)}),e.remove();let f=new Comment(`__end__ ${u}`);l.insertBefore(f,p.nextSibling);let h=this.r,m=h.m,d=m.L(),C=d.length===1?[void 0,d[0]]:void 0,R=this.xt(a),_=(O,W)=>R(O)===R(W),K=(O,W)=>O===W,V=(O,W,Z)=>{let y=o.createContext(W,O),A=it.dt(y.index,W),v=()=>{let $=f.parentNode??p.parentNode??l,b=Z.previousSibling,w=[];for(let k=0;k<i.length;++k){let G=i[k].cloneNode(!0);$.insertBefore(G,Z),w.push(G)}for(c?c.y(h,w):Ne(h,w),b=b.nextSibling;b!==Z;)A.items.push(b),b=b.nextSibling};return C?(C[0]=y.ctx,m.C(C,v)):m.C(d,()=>{m.v(y.ctx),v()}),A},oe=(O,W)=>{let Z=L.D(O).items,y=Z[Z.length-1].nextSibling;for(let A of Z)F(A);L.ce(O,V(O,W,y))},X=(O,W)=>{L.v(V(O,W,f))},N=O=>{for(let W of L.D(O).items)F(W)},re=O=>{let W=L.w;for(let Z=O;Z<W;++Z)L.D(Z).index(Z)},x=O=>{let W=p.parentNode,Z=f.parentNode;if(!W||!Z)return;let y=L.w;q(O)&&(O=O());let A=P(O[0]);if(E(A)&&A.length===0){Te(p,f),L.Me(0);return}let v=[];for(let I of this.Le(O[0]))v.push(I);let $=Ut.mt({oldItems:L.T,newValues:v,getKey:R,isSameValue:K,mountNewValue:(I,ee,Me)=>V(I,ee,Me),removeMountItem:I=>{for(let ee=0;ee<I.items.length;++ee)F(I.items[ee])},endAnchor:f});if($){L.T=$,L.P.clear();for(let I=0;I<$.length;++I){let ee=$[I];ee.order=I,ee.index(I);let Me=R(ee.value);Me!==void 0&&L.P.set(Me,ee)}return}let b=0,w=Number.MAX_SAFE_INTEGER,k=y,G=this.r.o.forGrowThreshold,ue=()=>L.w<k+G;for(let I of v){let ee=()=>{if(b<y){let Me=L.D(b++);if(_(Me.value,I)){if(K(Me.value,I))return;oe(b-1,I);return}let ut=L.ht(R(I));if(ut>=b&&ut-b<10){if(--b,w=Math.min(w,b),N(b),L.Ne(b),--y,ut>b+1)for(let nn=b;nn<ut-1&&nn<y&&!_(L.D(b).value,I);)++nn,N(b),L.Ne(b),--y;ee();return}ue()?(L.yt(b-1,V(b,I,L.D(b-1).items[0])),w=Math.min(w,b-1),++y):oe(b-1,I)}else X(b++,I)};ee()}let ge=b;for(y=L.w;b<y;)N(b++);L.Me(ge),re(w)},S=()=>{Y.stop(),je(),je=po},Y=m.V(o.list),Be=Y.value,je=po,tn=0,L=new it(R);for(let O of this.Le(Be()[0]))L.v(V(tn++,O,f));j(p,S),je=Y.subscribe(x)}static Tt=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;bt(e){let n=t.Tt.exec(e);if(!n)return;let o=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||o[r]?.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let a=n[3];if(!a||o.length===0)return;let i=/[{[]/.test(e);return{list:a,createContext:(c,l)=>{let u={},p=P(c);if(!i&&o.length===1)u[o[0]]=c;else if(E(p)){let h=0;for(let m of o)u[m]=p[h++]}else for(let h of o)u[h]=p[h];let f={ctx:u,index:rs};return s&&(f.index=u[s.startsWith("#")?s.substring(1):s]=se(l)),f}}}xt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Rt(n),r=o.length>1?o.slice(1):void 0;return s=>{let a=P(s),i=this.Ie(a,o);return i!==void 0||!r?i:this.Ie(a,r)}}return o=>P(P(o)?.[n])}Rt(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){let o=e;for(let r of n)o=P(o)?.[r];return P(o)}};var Bt=class{ue=0;pe=new Map;m;Pe;De;Ue;M;F;o;R;Be;constructor(e){this.m=e,this.o=e.o,this.De=new Ht(this),this.Pe=new xt(this),this.Ue=new Vt(this),this.M=new Lt(this),this.F=new It(this),this.R=this.o.u.pre,this.Be=this.o.u.dynamic}Ct(e){let n=pe(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let a=[...o.content.childNodes];for(let i of a)r.insertBefore(i,s);Ne(this,a)}}_(e){++this.ue;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Pe.k(e)||this.De.k(e)||this.Ue.k(e))return;this.M.k(e),this.Ct(e),this.ve(e,!0)}finally{--this.ue,this.ue===0&&this.Et()}}vt(e,n){let o=document;if(!o){let r=e.parentNode;for(;r?.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}He(e,n){let o=this.vt(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,j(s,()=>{F(e)}),o.appendChild(e),!0}wt(e,n){this.pe.set(e,n)}Et(){let e=this.pe;if(e.size!==0){this.pe=new Map;for(let[n,o]of e.entries())this.He(n,o)}}ve(e,n){let o=this.F.Ee(e,n),r=this.o.B;for(let[s,a]of o.entries()){let[i,c]=a.te,l=r[s]??r[i];if(!l){console.error("directive not found:",i);continue}let u=a.we;for(let p=0;p<u.length;++p){let f=u[p];this.y(l,f,s,!1,c,a.ne)}}}y(e,n,o,r,s,a){if(n.hasAttribute(this.R))return;let i=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let u=l;for(;u;){let p=u.getAttribute(ot);if(p)return p;u=u.parentElement}return null};if(pn()){let l=c(n);if(l){this.m.C(Xn(l),()=>{this.O(e,n,i,s,a)});return}}this.O(e,n,i,s,a)}St(e,n,o){return e!==vt?!1:(B(o)||this.He(n,o)||this.wt(n,o),!0)}O(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.St(e,n,o))return;let a=this.At(r,e.once),i=this.kt(e,o),c=this.Nt(i,a);j(n,c.stop);let l=this.Mt(n,o,i,a,r,s),u=this.Ot(e,l,c);if(!u)return;let p=this.Vt(l,i,a,r,u);p(),e.once||(c.result=i.subscribe(p),a&&(c.dynamic=a.subscribe(p)))}At(e,n){let o=no(e,this.Be);if(o)return this.m.V(H(o),void 0,void 0,void 0,n)}kt(e,n){return this.m.V(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let o={stop:()=>{e.stop(),n?.stop(),o.result?.(),o.dynamic?.(),o.mounted?.(),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Mt(e,n,o,r,s,a){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:a,parseResult:o,dynamicOption:r}}Ot(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r?.unmount&&(o.mounted=r.unmount),r?.update}Vt(e,n,o,r,s){let a,i;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=a,e.option=l,e.previousOption=i,a=c,i=l,s(e)}}};var fo="http://www.w3.org/1999/xlink",ss={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function is(t){return!!t||t===""}var as=(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=H(o)),jt(t,o,e[0],r);return}let a=e.length;for(let i=0;i<a;++i){let c=e[i];if(E(c)){let l=n?.[i]?.[0],u=c[0],p=c[1];jt(t,u,p,l)}else if(M(c))for(let l of Object.entries(c)){let u=l[0],p=l[1],f=n?.[i],h=f&&u in f?u:void 0;jt(t,u,p,h)}else{let l=n?.[i],u=e[i++],p=e[i];jt(t,u,p,l)}}},Tn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{as(t,e,n,o,r,s)}})},jt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),le(e)){D(3,"r-bind",t);return}if(!z(e)){D(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){le(n)?t.removeAttributeNS(fo,e.slice(6,e.length)):t.setAttributeNS(fo,e,n);return}let r=e in ss;le(n)||r&&!is(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var cs=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],a=n?.[r];if(E(s)){let i=s.length;for(let c=0;c<i;++c)mo(t,s[c],a?.[c])}else mo(t,s,a)}},Cn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{cs(t,e,n)}})},mo=(t,e,n)=>{let o=t.classList,r=z(e),s=z(n);if(e&&!r){if(n&&!s)for(let a in n)(!(a in e)||!e[a])&&o.remove(a);for(let a in e)e[a]&&o.add(a)}else if(r){if(n!==e){let a=s?Ge(n):[],i=Ge(e);a.length>0&&o.remove(...a),i.length>0&&o.add(...i)}}else if(n){let a=s?Ge(n):[];a.length>0&&o.remove(...a)}};function us(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=Ee(t[o],e[o]);return n}function Ee(t,e){if(t===e)return!0;let n=sn(t),o=sn(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=nt(t),o=nt(e),n||o)return t===e;if(n=E(t),o=E(e),n||o)return n&&o?us(t,e):!1;if(n=M(t),o=M(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let a in t){let i=Object.prototype.hasOwnProperty.call(t,a),c=Object.prototype.hasOwnProperty.call(e,a);if(i&&!c||!Ee(t[a],e[a]))return!1}return!0}return String(t)===String(e)}function _t(t,e){return t.findIndex(n=>Ee(n,e))}var ho=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var $t=t=>{if(!T(t))throw U(3,"pause");t(void 0,void 0,3)};var Ft=t=>{if(!T(t))throw U(3,"resume");t(void 0,void 0,4)};var go={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{ls(t,o[0])},unmount:ps(t,e,n)})},ls=(t,e)=>{let n=Co(t);if(n&&bo(t))E(e)?e=_t(e,ve(t))>-1:ae(e)?e=e.has(ve(t)):e=gs(t,e),t.checked=e;else if(n&&xo(t))t.checked=Ee(e,ve(t));else if(n||Eo(t))To(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(vo(t)){let o=t.options,r=o.length,s=t.multiple;for(let a=0;a<r;a++){let i=o[a],c=ve(i);if(s)E(e)?i.selected=_t(e,c)>-1:i.selected=e.has(c);else if(Ee(ve(i),e)){t.selectedIndex!==a&&(t.selectedIndex=a);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else D(7,t)},at=t=>(T(t)&&(t=t()),q(t)&&(t=t()),t?z(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),bo=t=>t.type==="checkbox",xo=t=>t.type==="radio",To=t=>t.type==="number"||t.type==="range",Co=t=>t.tagName==="INPUT",Eo=t=>t.tagName==="TEXTAREA",vo=t=>t.tagName==="SELECT",ps=(t,e,n)=>{let o=e.value,r=at(n?.join(",")),s=at(o()[1]),a={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return D(8,t),()=>{};let i=()=>e.refs[0],c=Co(t);return c&&bo(t)?ms(t,i):c&&xo(t)?bs(t,i):c||Eo(t)?fs(t,a,i,o):vo(t)?xs(t,i,o):(D(7,t),()=>{})},yo=/[.,' ·٫]/,fs=(t,e,n,o)=>{let s=e.lazy?"change":"input",a=To(t),i=()=>{!e.trim&&!at(o()[1]).trim||(t.value=t.value.trim())},c=f=>{let h=f.target;h.composing=1},l=f=>{let h=f.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,p),t.removeEventListener("change",i),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},p=f=>{let h=n();if(!h)return;let m=f.target;if(!m||m.composing)return;let d=m.value,g=at(o()[1]);if(a||g.number||g.int){if(g.int)d=parseInt(d);else{if(yo.test(d[d.length-1])&&d.split(yo).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else g.trim&&(d=d.trim());h(d)};return t.addEventListener(s,p),t.addEventListener("change",i),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},ms=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let a=ve(t),i=t.checked,c=s();if(E(c)){let l=_t(c,a),u=l!==-1;i&&!u?c.push(a):!i&&u&&c.splice(l,1)}else ae(c)?i?c.add(a):c.delete(a):s(ys(t,i))};return t.addEventListener(n,r),o},ve=t=>"_value"in t?t._value:t.value,Ro="trueValue",ds="falseValue",wo="true-value",hs="false-value",ys=(t,e)=>{let n=e?Ro:ds;if(n in t)return t[n];let o=e?wo:hs;return t.hasAttribute(o)?t.getAttribute(o):e},gs=(t,e)=>{if(Ro in t)return Ee(e,t.trueValue);let o=wo;return t.hasAttribute(o)?Ee(e,t.getAttribute(o)):Ee(e,!0)},bs=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let a=ve(t);s(a)};return t.addEventListener(n,r),o},xs=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let a=e();if(!a)return;let c=at(n()[1]).number,l=Array.prototype.filter.call(t.options,u=>u.selected).map(u=>c?ho(ve(u)):ve(u));if(t.multiple){let u=a();try{if($t(a),ae(u)){u.clear();for(let p of l)u.add(p)}else E(u)?(u.splice(0),u.push(...l)):a(l)}finally{Ft(a),J(a)}}else a(l[0])};return t.addEventListener(o,s),r};var Ts=["stop","prevent","capture","self","once","left","right","middle","passive"],Cs=t=>{let e={};if(B(t))return;let n=t.split(",");for(let o of Ts)e[o]=n.includes(o);return e},Es=(t,e,n,o,r)=>{if(o){let l=e.value(),u=P(o.value()[0]);return z(u)?En(t,H(u),()=>e.value()[0],r?.join(",")??l[1]):()=>{}}else if(n){let l=e.value();return En(t,H(n),()=>e.value()[0],r?.join(",")??l[1])}let s=[],a=()=>{s.forEach(l=>l())},i=e.value(),c=i.length;for(let l=0;l<c;++l){let u=i[l];if(q(u)&&(u=u()),M(u))for(let p of Object.entries(u)){let f=p[0],h=()=>{let d=e.value()[l];return q(d)&&(d=d()),d=d[f],q(d)&&(d=d()),d},m=u[f+"_flags"];s.push(En(t,f,h,m))}else D(2,"r-on",t)}return a},vn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>Es(t,e,n,o,r)},vs=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=[...t.split("."),...e.split(",")];t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),a=n.includes("alt"),i=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||a&&!l.altKey||i&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},En=(t,e,n,o)=>{if(B(e))return D(5,"r-on",t),()=>{};let r=Cs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,a;[e,a]=vs(e,o);let i=u=>{if(!a(u)||!n&&e==="submit"&&r?.prevent)return;let p=n(u);q(p)&&(p=p(u)),q(p)&&p(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!r){i(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==t)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),i(u)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var Rs=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=H(n)),Ye(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let a=e[s];if(E(a)){let i=a[0],c=a[1];Ye(t,i,c)}else if(M(a))for(let i of Object.entries(a)){let c=i[0],l=i[1];Ye(t,c,l)}else{let i=e[s++],c=e[s];Ye(t,i,c)}}},So={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{Rs(t,e,n,o)}})};function ws(t){return!!t||t===""}var Ye=(t,e,n)=>{if(le(e)){D(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(me),1),t[e]=n??"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,a=n??"";s!==a&&(t.value=a),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=ws(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||D(4,e,o,n,s)}r&&t.removeAttribute(e)};var Ao={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=E(r),a=o.refs[0];return s?r.push(t):a?a?.(t):o.context[n]=t,()=>{if(s){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else a?.(null)}}};var Ss=(t,e)=>{let n=Ae(t).data,o=n._ord;Fn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"},No={mount:()=>({update:({el:t,values:e})=>{Ss(t,e)}})};var As=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],a=n?.[r];if(E(s)){let i=s.length;for(let c=0;c<i;++c)Oo(t,s[c],a?.[c])}else Oo(t,s,a)}},qt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{As(t,e,n)}})},Oo=(t,e,n)=>{let o=t.style,r=z(e);if(e&&!r){if(n&&!z(n))for(let s in n)e[s]==null&&wn(o,s,"");for(let s in e)wn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ae(t).data)return;o.display=s}},Mo=/\s*!important$/;function wn(t,e,n){if(E(n))n.forEach(o=>{wn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=Ns(t,e);Mo.test(n)?t.setProperty(We(o),n.replace(Mo,""),"important"):t[o]=n}}var ko=["Webkit","Moz","ms"],Rn={};function Ns(t,e){let n=Rn[e];if(n)return n;let o=H(e);if(o!=="filter"&&o in t)return Rn[e]=o;o=st(o);for(let r=0;r<ko.length;r++){let s=ko[r]+o;if(s in t)return Rn[e]=s}return e}var ie=t=>Lo(P(t)),Lo=(t,e=new WeakMap)=>{if(!t||!M(t))return t;if(E(t))return t.map(ie);if(ae(t)){let o=new Set;for(let r of t.keys())o.add(ie(r));return o}if(we(t)){let o=new Map;for(let r of t)o.set(ie(r[0]),ie(r[1]));return o}if(e.has(t))return P(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Lo(P(o[1]),e);return n};var Os=(t,e)=>{let n=e[0];t.textContent=ae(n)?JSON.stringify(ie([...n])):we(n)?JSON.stringify(ie([...n])):M(n)?JSON.stringify(ie(n)):n?.toString()??""},Io={mount:()=>({update:({el:t,values:e})=>{Os(t,e)}})};var Vo={mount:()=>({update:({el:t,values:e})=>{Ye(t,"value",e[0])}})};var ce=class t{static getDefault(){return t.je??(t.je=new t)}B={};u={};lt=()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":"));Z=new Map;$=new Map;static je;static Lt="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";forGrowThreshold=10;globalContext;useInterpolation=!0;propValidationMode="throw";constructor(e){if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.It()}It(){let e={},n=globalThis;for(let o of t.Lt.split(","))e[o]=n[o];return e.ref=ye,e.sref=se,e.flatten=ie,e}addComponent(...e){for(let n of e){if(!n.defaultName){Le.warning("Registered component's default name is not defined",n);continue}this.Z.set(st(n.defaultName),n),this.$.set(st(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":So,":":Tn,"@":vn,[`${e}on`]:vn,[`${e}bind`]:Tn,[`${e}html`]:Dt,[`${e}text`]:Io,[`${e}show`]:No,[`${e}model`]:go,":style":qt,[`${e}style`]:qt,[`${e}bind:style`]:qt,":class":Cn,[`${e}bind:class`]:Cn,":ref":Ao,":value":Vo,[`${e}teleport`]:vt},this.u={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.u)}};var zt=(t,e)=>{if(!t)return;let o=(e??ce.getDefault()).u,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let a of ks(t,o.pre,s))Ms(a,o.text,r,s)},Ms=(t,e,n,o)=>{let r=t.textContent;if(!r)return;let s=n,a=r.split(s);if(a.length<=1)return;if(t.parentElement?.childNodes.length===1&&a.length===3){let c=a[1],l=Do(c,o);if(l&&B(a[0])&&B(a[2])){let u=t.parentElement;u.setAttribute(e,c.substring(l.start.length,c.length-l.end.length)),u.innerText="";return}}let i=document.createDocumentFragment();for(let c of a){let l=Do(c,o);if(l){let u=document.createElement("span");u.setAttribute(e,c.substring(l.start.length,c.length-l.end.length)),i.appendChild(u)}else i.appendChild(document.createTextNode(c))}t.replaceWith(i)},ks=(t,e,n)=>{let o=[],r=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(a=>s.textContent?.includes(a.start))&&o.push(s);else{if(s?.hasAttribute?.(e))return;for(let a of Ce(s))r(a)}};return r(t),o},Do=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Ls=9,Is=10,Vs=13,Ds=32,Re=46,Kt=44,Ps=39,Us=34,Wt=40,Ze=41,Gt=91,Sn=93,An=63,Hs=59,Po=58,Uo=123,Jt=125,Pe=43,Qt=45,Nn=96,Ho=47,On=92,Bo=new Set([2,3]),zo={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},Bs={"=>":2,...zo,"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13},Ko=Object.keys(zo),js=new Set(Ko),kn=new Set(["=>"]);Ko.forEach(t=>kn.add(t));var jo={true:!0,false:!1,null:null},_s="this",et="Expected ",Ue="Unexpected ",In="Unclosed ",$s=et+":",_o=et+"expression",Fs="missing }",qs=Ue+"object property",zs=In+"(",$o=et+"comma",Fo=Ue+"token ",Ks=Ue+"period",Mn=et+"expression after ",Ws="missing unaryOp argument",Gs=In+"[",Js=et+"exponent (",Qs="Variable names cannot start with a number (",Xs=In+'quote after "',ct=t=>t>=48&&t<=57,qo=t=>Bs[t],Ln=class{p;e;get H(){return this.p.charAt(this.e)}get h(){return this.p.charCodeAt(this.e)}f(e){return this.p.charCodeAt(this.e)===e}constructor(e){this.p=e,this.e=0}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}le(e){return this.K(e)||ct(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.p,o=this.e;for(;e===Ds||e===Ls||e===Is||e===Vs;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.fe();return e.length===1?e[0]:{type:0,body:e}}fe(e){let n=[];for(;this.e<this.p.length;){let o=this.h;if(o===Hs||o===Kt)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.p.length){if(o===e)break;throw this.i(Ue+'"'+this.H+'"')}}}return n}S(){let e=this.Pt()??this._e();return this.g(),this.Dt(e)}me(){this.g();let e=this.p,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),a=e.charCodeAt(n+3);if(isNaN(o))return!1;let i=!1,c=0;return o===62&&r===62&&s===62&&a===61?(i=">>>=",c=4):o===61&&r===61&&s===61?(i="===",c=3):o===33&&r===61&&s===61?(i="!==",c=3):o===62&&r===62&&s===62?(i=">>>",c=3):o===60&&r===60&&s===61?(i="<<=",c=3):o===62&&r===62&&s===61?(i=">>=",c=3):o===42&&r===42&&s===61?(i="**=",c=3):o===61&&r===62?(i="=>",c=2):o===124&&r===124?(i="||",c=2):o===63&&r===63?(i="??",c=2):o===38&&r===38?(i="&&",c=2):o===61&&r===61?(i="==",c=2):o===33&&r===61?(i="!=",c=2):o===60&&r===61?(i="<=",c=2):o===62&&r===61?(i=">=",c=2):o===60&&r===60?(i="<<",c=2):o===62&&r===62?(i=">>",c=2):o===43&&r===61?(i="+=",c=2):o===45&&r===61?(i="-=",c=2):o===42&&r===61?(i="*=",c=2):o===47&&r===61?(i="/=",c=2):o===37&&r===61?(i="%=",c=2):o===38&&r===61?(i="&=",c=2):o===94&&r===61?(i="^=",c=2):o===124&&r===61?(i="|=",c=2):o===42&&r===42?(i="**",c=2):o===105&&r===110?this.le(e.charCodeAt(n+2))||(i="in",c=2):o===61?(i="=",c=1):o===124?(i="|",c=1):o===94?(i="^",c=1):o===38?(i="&",c=1):o===60?(i="<",c=1):o===62?(i=">",c=1):o===43?(i="+",c=1):o===45?(i="-",c=1):o===42?(i="*",c=1):o===47?(i="/",c=1):o===37&&(i="%",c=1),i?(this.e+=c,i):!1}_e(){let e,n,o,r,s,a,i,c;if(s=this.z(),!s||(n=this.me(),!n))return s;if(r={value:n,prec:qo(n),right_a:kn.has(n)},a=this.z(),!a)throw this.i(Mn+n);let l=[s,r,a];for(;n=this.me();){o=qo(n),r={value:n,prec:o,right_a:kn.has(n)},c=n;let u=p=>r.right_a&&p.right_a?o>p.prec:o<=p.prec;for(;l.length>2&&u(l[l.length-2]);)a=l.pop(),n=l.pop().value,s=l.pop(),e=this.$e(n,s,a),l.push(e);if(e=this.z(),!e)throw this.i(Mn+c);l.push(r,e)}for(i=l.length-1,e=l[i];i>1;)e=this.$e(l[i-1].value,l[i-2],e),i-=2;return e}z(){let e;if(this.g(),e=this.Ut(),e)return this.de(e);let n=this.h;if(ct(n)||n===Re)return this.Bt();if(n===Ps||n===Us)e=this.Ht();else if(n===Gt)e=this.jt();else{let o=this._t();if(o){let r=this.z();if(!r)throw this.i(Ws);return this.de({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in jo?e={type:4,value:jo[e.name],raw:e.name}:e.name===_s&&(e={type:5})):n===Wt&&(e=this.$t())}return e?(e=this.W(e),this.de(e)):!1}$e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return js.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Ut(){let e={node:!1};return this.Ft(e),e.node||(this.qt(e),e.node)||(this.Kt(e),e.node)||(this.Fe(e),e.node)||this.zt(e),e.node}de(e){let n={node:e};return this.Wt(n),this.Gt(n),this.Jt(n),n.node}_t(){let e=this.p,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),a=e.charCodeAt(n+3);return o===Qt?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===Pe?(this.e++,"+"):o===110&&r===101&&s===119&&!this.le(a)?(this.e+=3,"new"):!1}Pt(){let e={};return this.Qt(e),e.node}Dt(e){let n={node:e};return this.Xt(n),n.node}W(e){this.g();let n=this.h;for(;n===Re||n===Gt||n===Wt||n===An;){let o;if(n===An){if(this.p.charCodeAt(this.e+1)!==Re)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Gt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==Sn)throw this.i(Gs);this.e++}else n===Wt?e={type:6,arguments:this.qe(Ze),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.p,n=this.e,o=n;for(;ct(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Re)for(o++;ct(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let i=e.charCodeAt(o);(i===Pe||i===Qt)&&o++;let c=o;for(;ct(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(Js+l+this.H+")")}}this.e=o;let s=e.slice(n,o),a=e.charCodeAt(o);if(this.K(a))throw this.i(Qs+s+this.H+")");if(a===Re||s.length===1&&s.charCodeAt(0)===Re)throw this.i(Ks);return{type:4,value:parseFloat(s),raw:s}}Ht(){let e=this.p,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,a=s,i=[],c=!1,l=!1;for(;s<n;){let p=e.charCodeAt(s);if(p===r){l=!0,this.e=s+1;break}if(p===On){c||(c=!0),i.push(e.slice(a,s));let f=e.charCodeAt(s+1);i.push(this.Ke(f)),s+=2,a=s}else s++}let u=c?i.join("")+e.slice(a,l?s:n):e.slice(a,l?s:n);if(!l)throw this.e=s,this.i(Xs+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}Ke(e){switch(e){case 110:return`
2
- `;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}ye(){let e=this.h,n=this.e;if(this.K(e))this.e++;else throw this.i(Ue+this.H);for(;this.e<this.p.length&&(e=this.h,this.le(e));)this.e++;return{type:2,name:this.p.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.p.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===Ze&&r&&r>=n.length)throw this.i(Fo+String.fromCharCode(e));break}else if(s===Kt){if(this.e++,r++,r!==n.length){if(e===Ze)throw this.i(Fo+",");for(let a=n.length;a<r;a++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i($o);{let a=this.S();if(!a||a.type===0)throw this.i($o);n.push(a)}}}if(!o)throw this.i(et+String.fromCharCode(e));return n}$t(){this.e++;let e=this.fe(Ze);if(this.f(Ze))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(zs)}jt(){return this.e++,{type:9,elements:this.qe(Sn)}}Ft(e){if(this.f(Uo)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(Jt)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(Kt)||this.f(Jt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Po)){this.e++;let r=this.S();if(!r)throw this.i(qs);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(Kt)&&this.e++}throw this.i(Fs)}}qt(e){let n=this.h;if((n===Pe||n===Qt)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===Pe?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!Bo.has(o.argument.type))throw this.i(Ue+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===Pe||o===Qt)&&o===this.p.charCodeAt(this.e+1)){if(!Bo.has(n.type))throw this.i(Ue+(o===Pe?"++":"--"));this.e+=2,e.node={type:13,operator:o===Pe?"++":"--",argument:n,prefix:!1}}}Kt(e){this.p.charCodeAt(this.e)===Re&&this.p.charCodeAt(this.e+1)===Re&&this.p.charCodeAt(this.e+2)===Re&&(this.e+=3,e.node={type:14,argument:this.S()})}Xt(e){if(e.node&&this.f(An)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(_o);if(this.g(),this.f(Po)){this.e++;let r=this.S();if(!r)throw this.i(_o);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i($s)}}Qt(e){if(this.g(),this.f(Wt)){let n=this.e;if(this.e++,this.g(),this.f(Ze)){this.e++;let o=this.me();if(o==="=>"){let r=this._e();if(!r)throw this.i(Mn+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Jt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(Nn)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(Nn))return;let n=this.p,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,a=[],i=[],c=!1,l=u=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:u})}a.push(n.slice(s,this.e)),i.push(n.slice(s,this.e));let p=a.join(""),f=i.join("");return a.length=0,i.length=0,c=!1,r.quasis.push({type:18,value:{raw:p,cooked:f},tail:u})};for(;this.e<o;){let u=n.charCodeAt(this.e);if(u===Nn)return l(!0),this.e+=1,e.node=r,r;if(u===36&&n.charCodeAt(this.e+1)===Uo){if(l(!1),this.e+=2,r.expressions.push(...this.fe(Jt)),!this.f(Jt))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===On){c||(c=!0),a.push(n.slice(s,this.e)),i.push(n.slice(s,this.e));let p=n.charCodeAt(this.e+1);a.push(n.slice(this.e,this.e+2)),i.push(this.Ke(p)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Wt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}zt(e){if(!this.f(Ho))return;let n=++this.e,o=!1;for(;this.e<this.p.length;){if(this.h===Ho&&!o){let r=this.p.slice(n,this.e),s="";for(;++this.e<this.p.length;){let i=this.h;if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)s+=this.H;else break}let a;try{a=new RegExp(r,s)}catch(i){throw this.i(i.message)}return e.node={type:4,value:a,raw:this.p.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(Gt)?o=!0:o&&this.f(Sn)&&(o=!1),this.e+=this.f(On)?2:1}throw this.i("Unclosed Regex")}},Wo=t=>new Ln(t).parse();var Ys={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>t**e},Zs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Xo=t=>{if(!t?.some(Qo))return t;let e=[];return t.forEach(n=>Qo(n)?e.push(...n):e.push(n)),e},Go=(...t)=>Xo(t),Vn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},ei={"++":(t,e)=>{let n=t[e];if(T(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(T(n)){let o=n();return n(--o),o}return--t[e]}},ti={"++":(t,e)=>{let n=t[e];if(T(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(T(n)){let o=n();return n(o-1),o}return t[e]--}},Jo={"=":(t,e,n)=>{let o=t[e];return T(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return T(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return T(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return T(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return T(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return T(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return T(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return T(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return T(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return T(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return T(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return T(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return T(o)?o(o()^n):t[e]^=n}},Xt=(t,e)=>q(t)?t.bind(e):t,Dn=class{l;ze;We;Ge;A;Je;Qe;constructor(e,n,o,r,s){this.l=E(e)?e:[e],this.ze=n,this.We=o,this.Ge=r,this.Qe=!!s}Xe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],Xt(P(o[r]),o);for(let a of this.l)if(r in a)return this.A=a[r],Xt(P(a[r]),a);let s=this.ze;if(s&&r in s)return this.A=s[r],Xt(P(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,Go,...e.body)}1(e,n,o){return this.E(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.he(e,n,o),a=r?.[s];return this.A=a,Xt(P(a),r)}4(e,n,o){return e.value}6(e,n,o){let r=(a,...i)=>q(a)?a(...Xo(i)):a,s=this.E(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.E(n,o,Zs[e.operator],e.argument)}8(e,n,o){let r=Ys[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.E(n,o,r,e.left,e.right)}9(e,n,o){return this.Ye(++n,o,Go,...e.elements)}10(e,n,o){let r={},s=(...a)=>{a.forEach(i=>{Object.assign(r,i)})};return this.E(++n,o,s,...e.properties),r}11(e,n,o){return this.E(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){let r={},s=u=>u?.type!==15,a=this.Ge??(()=>!1),i=n===0&&this.Qe,c=u=>this.Ze(i,e.key,n,Vn(u,o)),l=u=>this.Ze(i,e.value,n,Vn(u,o));if(e.shorthand){let u=e.key.name;r[u]=s(e.key)&&a(u,n)?c:c()}else if(e.computed){let u=P(c());r[u]=s(e.value)&&a(u,n)?l:l()}else{let u=e.key.type===4?e.key.value:e.key.name;r[u]=s(e.value)&&a(u,n)?()=>l:l()}return r}he(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,a=e.prefix?ei:ti;if(r.type===2){let i=r.name,c=this.Xe(i,o);return le(c)?void 0:a[s](c,i)}if(r.type===3){let{obj:i,key:c}=this.he(r,n,o);return a[s](i,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let a=r.name,i=this.Xe(a,o);if(le(i))return;let c=this.b(e.right,n,o);return Jo[s](i,a,c)}if(r.type===3){let{obj:a,key:i}=this.he(r,n,o),c=this.b(e.right,n,o);return Jo[s](a,i,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return E(r)&&(r.s=Yo),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((a,i,c)=>a+=i+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...a)=>new s(...a);return this.E(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o??{}),a=e.params;if(a){let i=0;for(let c of a)s[c.name]=r[i++]}return this.b(e.body,n,s)}}b(e,n,o){let r=P(this[e.type](e,n,o));return this.Je=e.type,r}Ze(e,n,o,r){let s=this.b(n,o,r);return e&&this.et()?this.A:s}et(){let e=this.Je;return(e===2||e===3||e===6)&&T(this.A)}eval(e,n){let{value:o,refs:r}=At(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.et()&&(s.ref=this.A),s}E(e,n,o,...r){let s=r.map(a=>a&&this.b(a,e,n));return o(...s)}Ye(e,n,o,...r){let s=this.We;if(!s)return this.E(e,n,o,...r);let a=r.map((i,c)=>i&&(i.type!==15&&s(c,e)?l=>this.b(i,e,Vn(l,n)):this.b(i,e,n)));return o(...a)}},Yo=Symbol("s"),Qo=t=>t?.s===Yo,Zo=(t,e,n,o,r,s,a)=>new Dn(e,n,o,r,a).eval(t,s);var er={},tr=t=>!!t,Yt=class{l;o;constructor(e,n){this.l=e,this.o=n}v(e){this.l=[e,...this.l]}ee(){return this.l.map(n=>n.components).filter(tr).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}pt(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(tr).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}V(e,n,o,r,s){let a=[],i=[],c=new Set,l=()=>{for(let C=0;C<i.length;++C)i[C]();i.length=0},f={value:()=>a,stop:()=>{l(),c.clear()},subscribe:(C,R)=>(c.add(C),R&&C(a),()=>{c.delete(C)}),refs:[],context:this.l[0]};if(B(e))return f;let h=this.o.globalContext,m=[],d=new Set,g=(C,R,_,K)=>{try{let V=Zo(C,R,h,n,o,K,r);return _&&V.refs.length>0&&m.push(...V.refs),{value:V.value,refs:V.refs,ref:V.ref}}catch(V){D(6,`evaluation error: ${e}`,V)}return{value:void 0,refs:[]}};try{let C=er[e]??Wo("["+e+"]");er[e]=C;let R=this.l.slice(),_=C.elements,K=_.length,V=new Array(K);f.refs=V;let oe=()=>{m.length=0,s||(d.clear(),l());let X=new Array(K);for(let N=0;N<K;++N){let re=_[N];if(n?.(N,-1)){X[N]=S=>g(re,R,!1,{$event:S}).value;continue}let x=g(re,R,!0);X[N]=x.value,V[N]=x.ref}if(!s)for(let N of m)d.has(N)||(d.add(N),i.push(ne(N,oe)));if(a=X,c.size!==0)for(let N of c)c.has(N)&&N(a)};oe()}catch(C){D(6,`parse error: ${e}`,C)}return f}L(){return this.l.slice()}tt=[];ce(e){this.tt.push(this.l),this.l=e}C(e,n){try{this.ce(e),n()}finally{this.Yt()}}Yt(){this.l=this.tt.pop()??[]}};var nr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ni=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},oi=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
- `);)++n;if(n>=t.length||!nr(t[n]))return null;let o=n;for(;n<t.length&&nr(t[n]);)++n;return{start:o,end:n}},or=new Set(["table","thead","tbody","tfoot"]),ri=new Set(["thead","tbody","tfoot"]),si=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),ii=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),rr=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,Zt=t=>{let e=0,n=[],o=[],r=0;for(;e<t.length;){let s=t.indexOf("<",e);if(s===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,s)),t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);if(g===-1){n.push(t.slice(s));break}n.push(t.slice(s,g+3)),e=g+3;continue}let a=ni(t,s);if(a===-1){n.push(t.slice(s));break}let i=t.slice(s,a+1),c=i.startsWith("</");if(i.startsWith("<!")||i.startsWith("<?")){n.push(i),e=a+1;continue}let u=oi(i,c);if(!u){n.push(i),e=a+1;continue}let p=i.slice(u.start,u.end);if(c){let g=o[o.length-1];g?(o.pop(),n.push(g.replacementHost?`</${g.replacementHost}>`:i),or.has(g.effectiveTag)&&--r):n.push(i),e=a+1;continue}let f=i.charCodeAt(i.length-2)===47,h=o[o.length-1],m=null;r===0?p==="tr"?m="trx":p==="td"?m="tdx":p==="th"&&(m="thx"):ri.has(h?.effectiveTag??"")?m=p==="tr"?null:"tr":h?.effectiveTag==="table"?m=si.has(p)?null:"tr":h?.effectiveTag==="tr"&&(m=p==="td"||p==="th"?null:"td");let d=f&&!ii.has(m||p);if(m){let g=m==="trx"||m==="tdx"||m==="thx",C=`${i.slice(0,u.start)}${m} is="${g?`r-${p}`:`regor:${p}`}"${i.slice(u.end)}`;n.push(d?rr(C,m):C)}else n.push(d?rr(i,p):i);if(!f){let g=m==="trx"?"tr":m==="tdx"?"td":m==="thx"?"th":m||p;o.push({replacementHost:m,effectiveTag:g}),or.has(g)&&++r}e=a+1}return n.join("")};var ai="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",ci=new Set(ai.toUpperCase().split(",")),ui="http://www.w3.org/2000/svg",sr=(t,e)=>{pe(t)?t.content.appendChild(e):t.appendChild(e)},Pn=(t,e,n,o)=>{let r=t.t;if(r){let a=n&&ci.has(r.toUpperCase())?document.createElementNS(ui,r.toLowerCase()):document.createElement(r),i=t.a;if(i)for(let l of Object.entries(i)){let u=l[0],p=l[1];u.startsWith("#")&&(p=u.substring(1),u="name"),a.setAttribute(Et(u,o),p)}let c=t.c;if(c)for(let l of c)Pn(l,a,n,o);sr(e,a);return}let s=t.d;if(s){let a;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)sr(e,a);else throw new Error("unsupported node type.")}},He=(t,e,n)=>{n??=ce.getDefault();let o=document.createDocumentFragment();if(!E(t))return Pn(t,o,!!e,n),o;for(let r of t)Pn(r,o,!!e,n);return o};var ir=(t,e={selector:"#app"},n)=>{z(e)&&(e={selector:"#app",template:e}),oo(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!xe(o))throw U(0);n||(n=ce.getDefault());let r=()=>{for(let i of[...o.childNodes])F(i)},s=i=>{for(let c of i)o.appendChild(c)};if(e.template){let i=document.createRange().createContextualFragment(Zt(e.template));r(),s(i.childNodes),e.element=i}else if(e.json){let i=He(e.json,e.isSVG,n);r(),s(i.childNodes)}return n.useInterpolation&&zt(o,n),new Un(t,o,n).y(),j(o,()=>{Se(t)}),Rt(t),{context:t,unmount:()=>{F(o)},unbind:()=>{me(o)}}},Un=class{Zt;nt;o;m;r;constructor(e,n,o){this.Zt=e,this.nt=n,this.o=o,this.m=new Yt([e],o),this.r=new Bt(this.m)}y(){this.r._(this.nt)}};var tt=t=>{if(E(t))return t.map(r=>tt(r));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(r=>[r,t.getAttribute(r)??""])));let o=Ce(t);return o.length>0&&(e.c=[...o].map(r=>tt(r))),e};var ar=(t,e={})=>{E(e)&&(e={props:e}),z(t)&&(t={template:t});let n=e.context??(()=>({})),o=!1;if(t.element){let s=t.element;s.remove(),t.element=s}else if(t.selector){let s=document.querySelector(t.selector);if(!s)throw U(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Zt(t.template));t.element=s}else t.json&&(t.element=He(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&zt(t.element,e.config??ce.getDefault());let r=t.element;if(!o&&((t.isSVG??(rt(r)&&r.hasAttribute?.("isSVG")))||rt(r)&&r.querySelector("[isSVG]"))){let s=r.content,a=s?[...s.childNodes]:[...r.childNodes],i=tt(a);t.element=He(i,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var en=class{byConstructor=new Map;register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var cr=t=>{ke()?.onMounted.push(t)};var ur=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw U(4);return e&&!n.isStopped?e(...r):(e=li(t,n),e(...r))};return o[Q]=1,Oe(o,!0),o.stop=()=>n.ref?.stop?.(),te(()=>o.stop(),!0),o},li=(t,e)=>{let n=e.ref??se(null);e.ref=n,e.isStopped=!1;let o=0,r=De(()=>{if(o>0){r(),e.isStopped=!0,J(n);return}n(t()),++o});return n.stop=r,n};var lr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return o&&!n.isStopped?o(...s):(o=pi(t,e,n),o(...s))};return r[Q]=1,Oe(r,!0),r.stop=()=>n.ref?.stop?.(),te(()=>r.stop(),!0),r},pi=(t,e,n)=>{let o=n.ref??se(null);n.ref=o,n.isStopped=!1;let r=0,s=i=>{if(r>0){o.stop(),n.isStopped=!0,J(o);return}let c=t.map(l=>l());o(e(...c)),++r},a=[];for(let i of t){let c=ne(i,s);a.push(c)}return s(null),o.stop=()=>{a.forEach(i=>{i()})},o};var pr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return o&&!n.isStopped?o(...s):(o=fi(t,e,n),o(...s))};return r[Q]=1,Oe(r,!0),r.stop=()=>n.ref?.stop?.(),te(()=>r.stop(),!0),r},fi=(t,e,n)=>{let o=n.ref??se(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=ne(t,s=>{if(r>0){o.stop(),n.isStopped=!0,J(o);return}o(e(s)),++r},!0),o};var fr=t=>(t[ht]=1,t);var mr=(t,e)=>{if(!e)throw U(5);let o=Ve(t)?ye:i=>i,r=()=>localStorage.setItem(e,JSON.stringify(ie(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(i){D(6,`persist: failed to parse data for key ${e}`,i),r()}else r();let a=De(r);return te(a,!0),t};var Hn=(t,...e)=>{let n="",o=t,r=e,s=o.length,a=r.length;for(let i=0;i<s;++i)n+=o[i],i<a&&(n+=r[i]);return n},dr=Hn;var hr=(t,e,n)=>{let o=[],r=()=>{e(t.map(a=>a()))};for(let a of t)o.push(ne(a,r));n&&r();let s=()=>{for(let a of o)a()};return te(s,!0),s};var yr=t=>{if(!T(t))throw U(3,"observerCount");return t(void 0,void 0,2)};var gr=t=>{Bn();try{t()}finally{jn()}},Bn=()=>{he.stack||(he.stack=[]),he.stack.push(new Set)},jn=()=>{let t=he.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete he.stack;for(let n of e)try{J(n)}catch(o){console.error(o)}};
1
+ "use strict";var sn=Object.defineProperty;var Cr=Object.getOwnPropertyDescriptor;var Er=Object.getOwnPropertyNames;var Rr=Object.prototype.hasOwnProperty;var vr=(t,e)=>{for(var n in e)sn(t,n,{get:e[n],enumerable:!0})},wr=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Er(e))!Rr.call(t,r)&&r!==n&&sn(t,r,{get:()=>e[r],enumerable:!(o=Cr(e,r))||o.enumerable});return t};var Sr=t=>wr(sn({},"__esModule",{value:!0}),t);var yi={};vr(yi,{ComponentHead:()=>ze,ContextRegistry:()=>nn,RegorConfig:()=>ce,addUnbinder:()=>j,batch:()=>Tr,collectRefs:()=>Ot,computeMany:()=>mr,computeRef:()=>dr,computed:()=>pr,createApp:()=>ur,defineComponent:()=>lr,drainUnbind:()=>zn,endBatch:()=>Fn,entangle:()=>Qe,flatten:()=>ie,getBindData:()=>Ne,html:()=>_n,isDeepRef:()=>De,isRaw:()=>Xe,isRef:()=>x,markRaw:()=>hr,observe:()=>ne,observeMany:()=>br,observerCount:()=>xr,onMounted:()=>fr,onUnmounted:()=>te,pause:()=>qt,persist:()=>yr,pval:()=>Xn,raw:()=>gr,ref:()=>ye,removeNode:()=>F,resume:()=>zt,silence:()=>Nt,sref:()=>se,startBatch:()=>$n,toFragment:()=>Be,toJsonTemplate:()=>nt,trigger:()=>J,unbind:()=>me,unref:()=>P,useScope:()=>At,warningHandler:()=>Ie,watchEffect:()=>Pe});module.exports=Sr(yi);var $e=Symbol(":regor");var me=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];Ar(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Ar=t=>{let e=t[$e];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[$e]=void 0};var Fe=[],ft=!1,pt,qn=()=>{if(ft=!1,pt=void 0,Fe.length!==0){for(let t=0;t<Fe.length;++t)me(Fe[t]);Fe.length=0}},F=t=>{t.remove(),Fe.push(t),ft||(ft=!0,pt=setTimeout(qn,1))},zn=async()=>{Fe.length===0&&!ft||(pt&&clearTimeout(pt),qn())};var q=t=>typeof t=="function",z=t=>typeof t=="string",Kn=t=>typeof t>"u",le=t=>t==null||typeof t>"u",B=t=>typeof t!="string"||!t?.trim(),Nr=Object.prototype.toString,an=t=>Nr.call(t),Se=t=>an(t)==="[object Map]",ae=t=>an(t)==="[object Set]",cn=t=>an(t)==="[object Date]",ot=t=>typeof t=="symbol",E=Array.isArray,N=t=>t!==null&&typeof t=="object";var Wn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},U=(t,...e)=>{let n=Wn[t];return new Error(q(n)?n.call(Wn,...e):n)};var mt=[],Gn=()=>{let t={onMounted:[],onUnmounted:[]};return mt.push(t),t},Le=t=>{let e=mt[mt.length-1];if(!e&&!t)throw U(2);return e},Jn=t=>{let e=Le();return t&&ln(t),mt.pop(),e},un=Symbol("csp"),ln=t=>{let e=t,n=e[un];if(n){let o=Le();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[un]=Le()},dt=t=>t[un];var Ae=t=>{dt(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Qn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},D=(t,...e)=>{let n=Qn[t],o=q(n)?n.call(Qn,...e):n,r=Ie.warning;r&&(z(o)?r(o):r(o,...o.args))},Ie={warning:console.warn};var ht=Symbol("ref"),Q=Symbol("sref"),yt=Symbol("raw");var x=t=>t!=null&&t[Q]===1;var qe=class extends Error{propPath;detail;constructor(e,n){super(n),this.name="PropValidationError",this.propPath=e,this.detail=n}},be=(t,e)=>{throw new qe(t,`${e}.`)},fn=t=>{if(t===null)return"null";if(t===void 0)return"undefined";if(x(t))return`ref<${fn(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(E(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=t?.constructor?.name;return e&&e!=="Object"?e:"object"},Or=t=>t.length>60?`${t.slice(0,57)}...`:t,gt=(t,e=0)=>{if(e>1)return"unknown";if(x(t)){let s=t();return`ref(${gt(s,e+1)})`}if(typeof t=="string")return Or(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(E(t)){let s=t.slice(0,5).map(a=>gt(a,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(N(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let a=s.map(([i,c])=>{let l=gt(c,e+1);return`${i}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${a}, ... }`:`{ ${a} }`}return"unknown"},xe=t=>{let e=fn(t),n=gt(t);return`got ${e} (${n})`},Mr=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":fn(t),kr=(t,e)=>{typeof t!="string"&&be(e,`expected string, ${xe(t)}`)},Lr=(t,e)=>{typeof t!="number"&&be(e,`expected number, ${xe(t)}`)},Ir=(t,e)=>{typeof t!="boolean"&&be(e,`expected boolean, ${xe(t)}`)},Vr=t=>(e,n)=>{e instanceof t||be(n,`expected instance of ${t.name||"provided class"}, ${xe(e)}`)},Dr=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},Pr=t=>(e,n,o)=>{e!==null&&t(e,n,o)},Ur=t=>(e,n)=>{t.includes(e)||be(n,`expected one of ${t.map(o=>Mr(o)).join(", ")}, ${xe(e)}`)},Hr=t=>(e,n,o)=>{E(e)||be(n,`expected array, ${xe(e)}`);let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)},Br=t=>(e,n,o)=>{N(e)||be(n,`expected object, ${xe(e)}`);let r=e;for(let s in t){let a=t[s];a(r[s],`${n}.${s}`,o)}},jr=t=>(e,n,o)=>{if(x(e)){t(e(),`${n}.value`,o);return}be(n,`expected ref, ${xe(e)}`)},Xn={fail:be,describe:xe,isString:kr,isNumber:Lr,isBoolean:Ir,isClass:Vr,optional:Dr,nullable:Pr,oneOf:Ur,arrayOf:Hr,shape:Br,refOf:jr};var _r=(t,e,n)=>{let o=t.tagName?.toLowerCase?.()||"unknown",r=n instanceof qe?n.propPath:e,s=n instanceof qe?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},ze=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;G;J;constructor(e,n,o,r,s,a){this.props=e,this.G=n,this.ctx=o,this.start=r,this.end=s,this.J=a}emit=(e,n)=>{this.G.dispatchEvent(new CustomEvent(e,{detail:n}))};findContext(e,n=0){if(n<0)return;let o=0;for(let r of this.ctx??[])if(r instanceof e){if(o===n)return r;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.J==="off")return;let n=this.props;for(let o in e){let r=e[o];if(!r)continue;let s=r;try{s(n[o],o,this)}catch(a){let i=_r(this.G,o,a);if(this.J==="warn"){Ie.warning(i.message,i);continue}throw i}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)F(e),e=e.nextSibling;for(let o of this.ctx)Ae(o)}};var Ne=t=>{let e=t,n=e[$e];if(n)return n;let o={unbinders:[],data:{}};return e[$e]=o,o};var j=(t,e)=>{Ne(t).unbinders.push(e)};var xt={},bt={},Yn=1,Zn=t=>{let e=(Yn++).toString();return xt[e]=t,bt[e]=0,e},pn=t=>{bt[t]+=1},mn=t=>{--bt[t]===0&&(delete xt[t],delete bt[t])},eo=t=>xt[t],dn=()=>Yn!==1&&Object.keys(xt).length>0,rt="r-switch",$r=t=>{let e=t.filter(o=>Te(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(rt))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},Ke=(t,e)=>{if(!dn())return;let n=$r(e);n.length!==0&&(n.forEach(pn),j(t,()=>{n.forEach(mn)}))};var Tt=()=>{},hn=(t,e,n,o)=>{let r=[];for(let s of t){let a=s.cloneNode(!0);n.insertBefore(a,o),r.push(a)}Oe(e,r)},yn=Symbol("r-if"),to=Symbol("r-else"),no=t=>t[to]===1,Ct=class{r;N;ge;Q;X;x;R;constructor(e){this.r=e,this.N=e.o.p.if,this.ge=Rt(e.o.p.if),this.Q=e.o.p.else,this.X=e.o.p.elseif,this.x=e.o.p.for,this.R=e.o.p.pre}ot(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),this.r.O.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}Y(e){return e[yn]?!0:(e[yn]=!0,Et(e,this.ge).forEach(n=>n[yn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Y(e)||this.ot(e,this.x))return;let n=e.getAttribute(this.N);if(!n){D(0,this.N,e);return}e.removeAttribute(this.N),this.M(e,n)}U(e,n,o){let r=We(e),s=e.parentNode,a=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(a,e),Ke(a,r),r.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[to]=1);let i=document.createComment(`__end__ :${n}${o??""}`);return s.insertBefore(i,a.nextSibling),{nodes:r,parent:s,commentBegin:a,commentEnd:i}}be(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.Q)){e.removeAttribute(this.Q);let{nodes:r,parent:s,commentBegin:a,commentEnd:i}=this.U(e,"else");return[{mount:()=>{hn(r,this.r,s,i)},unmount:()=>{Ce(a,i)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.X);if(!r)return[];e.removeAttribute(this.X);let{nodes:s,parent:a,commentBegin:i,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.r.m.V(r),u=l.value,f=this.be(o,n),p=Tt;return j(i,()=>{l.stop(),p(),p=Tt}),p=l.subscribe(n),[{mount:()=>{hn(s,this.r,a,c)},unmount:()=>{Ce(i,c)},isTrue:()=>!!u()[0],isMounted:!1},...f]}}M(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:a,commentEnd:i}=this.U(e,"if",` => ${n} `),c=this.r.m.V(n),l=c.value,u=!1,f=this.r.m,p=f.L(),h=()=>{f.E(p,()=>{if(l()[0])u||(hn(r,this.r,s,i),u=!0),m.forEach(C=>{C.unmount(),C.isMounted=!1});else{Ce(a,i),u=!1;let C=!1;for(let v of m)!C&&v.isTrue()?(v.isMounted||(v.mount(),v.isMounted=!0),C=!0):(v.unmount(),v.isMounted=!1)}})},m=this.be(o,h),d=Tt;j(a,()=>{c.stop(),d(),d=Tt}),h(),d=c.subscribe(h)}};var We=t=>{let e=fe(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r?.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Oe=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(no(o)||t._(o))}},Et=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},fe=t=>t instanceof HTMLTemplateElement,Te=t=>t.nodeType===Node.ELEMENT_NODE,st=t=>t.nodeType===Node.ELEMENT_NODE,oo=t=>t instanceof HTMLSlotElement,Ee=t=>fe(t)?t.content.childNodes:t.childNodes,Ce=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;F(n),n=o}},ro=function(){return this()},Fr=function(t){return this(t)},qr=()=>{throw new Error("value is readonly.")},zr={get:ro,set:Fr,enumerable:!0,configurable:!1},Kr={get:ro,set:qr,enumerable:!0,configurable:!1},Me=(t,e)=>{Object.defineProperty(t,"value",e?Kr:zr)},so=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Rt=t=>`[${CSS.escape(t)}]`,vt=(t,e)=>(t.startsWith("@")&&(t=e.p.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.p.dynamic)),t),gn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Wr=/-(\w)/g,H=gn(t=>t&&t.replace(Wr,(e,n)=>n?n.toUpperCase():"")),Gr=/\B([A-Z])/g,Ge=gn(t=>t&&t.replace(Gr,"-$1").toLowerCase()),it=gn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var wt={mount:()=>{}};var Je=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var St=t=>{dt(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var bn=Symbol("scope"),At=t=>{try{Gn();let e=t();ln(e);let n={context:e,unmount:()=>Ae(e),[bn]:1};return n[bn]=1,n}finally{Jn()}},io=t=>N(t)?bn in t:!1;var xn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(N(o))for(let r of Object.entries(o)){let s=r[0],a=r[1],i=n[s];i!==a&&(x(i)?i(a):n[s]=a)}}})};var te=(t,e)=>{Le(e)?.onUnmounted.push(t)};var ne=(t,e,n,o=!0)=>{if(!x(t))throw U(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&te(s,!0),s};var Qe=(t,e)=>{if(t===e)return()=>{};let n=ne(t,r=>e(r)),o=ne(e,r=>t(r));return e(t()),()=>{n(),o()}};var Xe=t=>!!t&&t[yt]===1;var De=t=>t?.[ht]===1;var pe=[],ao=t=>{pe.length!==0&&pe[pe.length-1]?.add(t)},Pe=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Jr(t,e),te(()=>e.stop(),!0),e.stop},Jr=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(pe.push(s),t(a=>n.push(a)),o)return;for(let a of[...s]){let i=ne(a,()=>{r(),Pe(t)});n.push(i)}}finally{pe.pop()}},Nt=t=>{let e=pe.length,n=e>0&&pe[e-1];try{return n&&pe.push(null),t()}finally{n&&pe.pop()}},Ot=t=>{try{let e=new Set;return pe.push(e),{value:t(),refs:[...e]}}finally{pe.pop()}};var J=(t,e,n)=>{if(!x(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(E(r)||ae(r))for(let s of r)J(s,e,!0);else if(Se(r))for(let s of r)J(s[0],e,!0),J(s[1],e,!0);if(N(r))for(let s in r)J(r[s],e,!0)}};function Qr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ye=(t,e,n)=>{n.forEach(function(o){let r=t[o];Qr(e,o,function(...a){let i=r.apply(this,a),c=this[Q];for(let l of c)J(l);return i})})},Mt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var co=Array.prototype,Tn=Object.create(co),Xr=["push","pop","shift","unshift","splice","sort","reverse"];Ye(co,Tn,Xr);var uo=Map.prototype,kt=Object.create(uo),Yr=["set","clear","delete"];Mt(kt,"Map");Ye(uo,kt,Yr);var lo=Set.prototype,Lt=Object.create(lo),Zr=["add","clear","delete"];Mt(Lt,"Set");Ye(lo,Lt,Zr);var he={},se=t=>{if(x(t)||Xe(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?Q in c?!0:E(c)?(Object.setPrototypeOf(c,Tn),!0):ae(c)?(Object.setPrototypeOf(c,Lt),!0):Se(c)?(Object.setPrototypeOf(c,kt),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(he.stack&&he.stack.length){he.stack[he.stack.length-1].add(i);return}r.size!==0&&Nt(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},a=c=>{let l=c[Q];l||(c[Q]=l=new Set),l.add(i)},i=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||x(u)&&(u=u(),e._value===u)?u:(n(u)&&a(u),e._value=u,e.auto&&s(u,f),e._value):(ao(i),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=p=>{r.delete(p)};return r.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return i[Q]=1,Me(i,!1),o&&a(t),i};var ye=t=>{if(Xe(t))return t;let e;if(x(t)?(e=t,t=e()):e=se(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[ht]=1,E(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];De(r)||(t[o]=ye(r))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let o=n[1];if(De(o))continue;let r=n[0];ot(r)||(t[r]=null,t[r]=ye(o))}return e};var fo=Symbol("modelBridge"),It=()=>{},es=t=>!!t?.[fo],ts=t=>{t[fo]=1},ns=t=>{let e=ye(t());return ts(e),e},po={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return It;let n=H(e),o,r,s=It,a=()=>{s(),s=It,o=void 0,r=void 0},i=()=>{s(),s=It},c=(u,f)=>{o!==u&&(i(),s=Qe(u,f),o=u)},l=()=>{let u=t.refs[0]??t.value()[0],f=t.context,p=f[n];if(!x(u)){if(r&&p===r){r(u);return}if(a(),x(p)){p(u);return}f[n]=u;return}if(es(u)){if(p===u)return;x(p)?c(u,p):f[n]=u;return}r||(r=ns(u)),f[n]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Vt=class{r;xe;Te="";Re=-1;constructor(e){this.r=e,this.xe=e.o.p.inherit}k(e){this.rt(e)}st(e){if(this.Re!==e.size){let n=[...e.keys()];this.Te=[...n,...n.map(Ge)].join(","),this.Re=e.size}return this.Te}it(e){for(let n=0;n<e.length;++n){let o=e[n]?.components;if(o)for(let r in o)return!0}return!1}at(e){if(!fe(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return fe(e)&&e.getAttributeNames().length===0}rt(e){let n=this.r,o=n.m,r=n.o.Z,s=n.o.$;if(r.size===0&&!this.it(o.l))return;let a=o.ee(),i=this.Ee();if(B(i))return;let c=this.pt(e,i);for(let l of c){if(l.hasAttribute(n.R))continue;let u=l.parentNode;if(!u)continue;let f=l.nextSibling,p=H(l.tagName).toUpperCase(),m=a[p]??s.get(p);if(!m)continue;let d=m.template;if(!d)continue;let g=l.parentElement;if(!g)continue;let C=new Comment(" begin component: "+l.tagName),v=new Comment(" end component: "+l.tagName);g.insertBefore(C,l),l.remove();let _=n.o.p.context,K=n.o.p.contextAlias,V=n.o.p.bind,oe=(y,A)=>{let R={},$=y.hasAttribute(_);return o.E(A,()=>{o.v(R),$?n.y(xn,y,_):y.hasAttribute(K)&&n.y(xn,y,K);let b=m.props;if(!b||b.length===0)return;b=b.map(H);let w=new Map(b.map(G=>[G.toLowerCase(),G]));for(let G of[...b,...b.map(Ge)]){let ue=y.getAttribute(G);ue!==null&&(R[H(G)]=ue,y.removeAttribute(G))}let k=n.F.Ce(y,!1);for(let[G,ue]of k.entries()){let[ge,I]=ue.te;if(!I)continue;let ee=w.get(H(I).toLowerCase());ee&&(ge!=="."&&ge!==":"&&ge!==V||n.y(po,y,G,!0,ee,ue.ne))}}),R},X=[...o.L()],O=()=>{let y=oe(l,X),A=new ze(y,l,X,C,v,n.o.propValidationMode),R=At(()=>m.context(A)??{}).context;if(A.autoProps){for(let[$,b]of Object.entries(y))if($ in R){let w=R[$];if(w===b)continue;if(x(w)){x(b)?A.entangle?j(C,Qe(b,w)):w(b()):w(b);continue}}else R[$]=b;A.onAutoPropsAssigned?.()}return{componentCtx:R,head:A}},{componentCtx:re,head:T}=O(),S=[...Ee(d)],Y=S.length,je=l.childNodes.length===0,_e=y=>{let A=y.parentElement,R=y.name;if(B(R)&&(R=y.getAttributeNames().filter(w=>w.startsWith("#"))[0],B(R)?R="default":R=R.substring(1)),je){if(R==="default"){let w=n.o.p.text,k=l.getAttribute(w);if(!B(k)){let G=document.createElement("span");G.setAttribute(w,k),A.insertBefore(G,y),l.removeAttribute(w);return}}for(let w of[...y.childNodes])A.insertBefore(w,y);return}let $=l.querySelector(`template[name='${R}'], template[\\#${R}]`);!$&&R==="default"&&($=[...l.querySelectorAll("template:not([name])")].find(k=>this.ct(k))??null);let b=w=>{T.enableSwitch&&o.E(X,()=>{o.v(re);let k=oe(y,o.L());o.E(X,()=>{o.v(k);let G=o.L(),ue=Zn(G);for(let ge of w)Te(ge)&&(ge.setAttribute(rt,ue),pn(ue),j(ge,()=>{mn(ue)}))})})};if($){let w=[...Ee($)];for(let k of w)A.insertBefore(k,y);b(w)}else{if(R!=="default"){for(let k of[...Ee(y)])A.insertBefore(k,y);return}let w=[...Ee(l)].filter(k=>!this.at(k));for(let k of w)A.insertBefore(k,y);b(w)}},on=y=>{if(!Te(y))return;let A=y.querySelectorAll("slot");if(oo(y)){_e(y),y.remove();return}for(let R of A)_e(R),R.remove()};(()=>{for(let y=0;y<Y;++y)S[y]=S[y].cloneNode(!0),u.insertBefore(S[y],f),on(S[y])})(),g.insertBefore(v,f);let M=()=>{if(!m.inheritAttrs)return;let y=S.filter(R=>R.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(R=>R.hasAttribute(this.xe)));let A=y[0];if(A)for(let R of l.getAttributeNames()){if(R===_||R===K)continue;let $=l.getAttribute(R);if(R==="class"){let b=Je($);b.length>0&&A.classList.add(...b)}else if(R==="style"){let b=A.style,w=l.style;for(let k of w)b.setProperty(k,w.getPropertyValue(k))}else A.setAttribute(vt(R,n.o),$)}},W=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.p.on)&&l.removeAttribute(y)},Z=()=>{M(),W(),o.v(re),n.ve(l,!1),re.$emit=T.emit,Oe(n,S),j(l,()=>{Ae(re)}),j(C,()=>{me(l)}),St(re)};o.E(X,Z)}}Ee(){let e=this.r,n=e.m,o=e.o.Z,r=n.ut(),s=this.st(o);return[...s?[s]:[],...r,...r.map(Ge)].join(",")}pt(e,n){let o=[];if(B(n))return o;if(e.matches?.(n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();if(s.matches(n)){o.push(s);continue}r.push(...this.q(s).reverse())}return o}j(e,n){let o=this.Ee(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!B(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e?.children;if(n?.length!=null){let r=[];for(let s=0;s<n.length;++s){let a=n[s];Te(a)&&r.push(a)}return r}let o=e?.childNodes;if(o?.length!=null){let r=[];for(let s=0;s<o.length;++s){let a=o[s];Te(a)&&r.push(a)}return r}return[]}};var Cn=class{te;ne;we=[];constructor(e,n){this.te=e,this.ne=n}},Dt=class{r;Se;Ae;oe;constructor(e){this.r=e,this.Se=e.o.lt(),this.oe=new Map;let n=new Map;for(let o of this.Se){let r=o[0]??"",s=n.get(r);s?s.push(o):n.set(r,[o])}this.Ae=n}ke(e){let n=this.oe.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),i=(s<0?o:o.substring(0,s)).split(/[:@]/);B(i[0])&&(i[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,u=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!l&&h==="camel"?l=!0:!u&&h==="prop"&&(u=!0),l&&u)break}l&&(i[i.length-1]=H(i[i.length-1])),u&&(i[0]=".");let f={terms:i,flags:c};return this.oe.set(e,f),f}Ce(e,n){let o=new Map;if(!st(e))return o;let r=this.Ae,s=(i,c)=>{let l=r.get(c[0]??"");if(l)for(let u=0;u<l.length;++u){if(!c.startsWith(l[u]))continue;let f=o.get(c);if(!f){let p=this.ke(c);f=new Cn(p.terms,p.flags),o.set(c,f)}f.we.push(i);return}},a=i=>{let c=i.attributes;if(!(!c||c.length===0))for(let l=0;l<c.length;++l){let u=c.item(l)?.name;u&&s(i,u)}};return a(e),!n||!e.firstElementChild||this.r.O.j(e,a),o}};var mo=()=>{},os=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Pt=class{r;I;constructor(e){this.r=e,this.I=e.o.p.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.r.O.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let a of e.getAttributeNames())a!=="is"&&s.setAttribute(a,e.getAttribute(a));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.r._(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.M(e,n)}U(e,n){let o=We(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),Ke(s,o),o.forEach(i=>{F(i)}),e.remove();let a=document.createComment(`__end__ dynamic ${n??""}`);return r.insertBefore(a,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:a}}M(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:a}=this.U(e,` => ${n} `),i=this.r.m.V(n),c=i.value,l=this.r.m,u=l.L(),f={name:""},p=fe(e)?o:[...o[0].childNodes],h=()=>{l.E(u,()=>{let g=c()[0];if(N(g)&&(g.name?g=g.name:g=Object.entries(l.ee()).filter(v=>v[1]===g)[0]?.[0]),!z(g)||B(g)){Ce(s,a);return}if(f.name===g)return;Ce(s,a);let C=document.createElement(g);for(let v of e.getAttributeNames())v!==this.I&&C.setAttribute(v,e.getAttribute(v));os(p,C),r.insertBefore(C,a),this.r._(C),f.name=g})},m=mo;j(s,()=>{i.stop(),m(),m=mo}),h(),m=i.subscribe(h)}};var P=t=>{let e=t;return e!=null&&e[Q]===1?e():e};var rs=(t,e)=>{let[n,o]=e;q(o)?o(t,n):t.innerHTML=n?.toString()},Ut={mount:()=>({update:({el:t,values:e})=>{rs(t,e)}})};var Ht=class t{re;constructor(e){this.re=e}static ft(e,n){let o=e.m,r=e.o,s=r.p,a=new Set([s.for,s.if,s.else,s.elseif,s.pre]),i=r.B,c=o.ee();if(Object.keys(c).length>0||r.$.size>0)return;let l=e.F,u=[],f=0,p=[];for(let h=n.length-1;h>=0;--h)p.push(n[h]);for(;p.length>0;){let h=p.pop();if(h.nodeType===Node.ELEMENT_NODE){let d=h;if(d.tagName==="TEMPLATE"||d.tagName.includes("-"))return;let g=H(d.tagName).toUpperCase();if(r.$.has(g)||c[g])return;let C=d.attributes;for(let v=0;v<C.length;++v){let _=C.item(v)?.name;if(!_)continue;if(a.has(_))return;let{terms:K,flags:V}=l.ke(_),[oe,X]=K,O=i[_]??i[oe];if(O){if(O===Ut)return;u.push({nodeIndex:f,attrName:_,directive:O,option:X,flags:V})}}++f}let m=h.childNodes;for(let d=m.length-1;d>=0;--d)p.push(m[d])}if(u.length!==0)return new t(u)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let a=s.childNodes;for(let i=a.length-1;i>=0;--i)r.push(a[i])}for(let s=0;s<this.re.length;++s){let a=this.re[s],i=o[a.nodeIndex];i&&e.y(a.directive,i,a.attrName,!1,a.option,a.flags)}}};var ss=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},is=t=>{let e=t.length,n=t.slice(),o=[],r,s,a;for(let i=0;i<e;++i){let c=t[i];if(c===0)continue;let l=o[o.length-1];if(l===void 0||t[l]<c){n[i]=l??-1,o.push(i);continue}for(r=0,s=o.length-1;r<s;)a=r+s>>1,t[o[a]]<c?r=a+1:s=a;c<t[o[r]]&&(r>0&&(n[i]=o[r-1]),o[r]=i)}for(r=o.length,s=o[r-1]??-1;r-- >0;)o[r]=s,s=n[s];return o},Bt=class{static mt(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:a,removeMountItem:i,endAnchor:c}=e,l=n.length,u=o.length,f=new Array(u),p=new Set;for(let T=0;T<u;++T){let S=r(o[T]);if(S===void 0||p.has(S))return;p.add(S),f[T]=S}let h=new Array(u),m=0,d=l-1,g=u-1;for(;m<=d&&m<=g;){let T=n[m];if(r(T.value)!==f[m]||!s(T.value,o[m]))break;T.value=o[m],h[m]=T,++m}for(;m<=d&&m<=g;){let T=n[d];if(r(T.value)!==f[g]||!s(T.value,o[g]))break;T.value=o[g],h[g]=T,--d,--g}if(m>d){for(let T=g;T>=m;--T){let S=T+1<u?h[T+1].items[0]:c;h[T]=a(T,o[T],S)}return h}if(m>g){for(let T=m;T<=d;++T)i(n[T]);return h}let C=m,v=m,_=g-v+1,K=new Array(_).fill(0),V=new Map;for(let T=v;T<=g;++T)V.set(f[T],T);let oe=!1,X=0;for(let T=C;T<=d;++T){let S=n[T],Y=V.get(r(S.value));if(Y===void 0){i(S);continue}if(!s(S.value,o[Y])){i(S);continue}S.value=o[Y],h[Y]=S,K[Y-v]=T+1,Y>=X?X=Y:oe=!0}let O=oe?is(K):[],re=O.length-1;for(let T=_-1;T>=0;--T){let S=v+T,Y=S+1<u?h[S+1].items[0]:c;if(K[T]===0){h[S]=a(S,o[S],Y);continue}let je=h[S];oe&&(re>=0&&O[re]===T?--re:je&&ss(je,Y))}return h}};var at=class{T=[];P=new Map;get w(){return this.T.length}se;constructor(e){this.se=e}ie(e){let n=this.se(e.value);n!==void 0&&this.P.set(n,e)}ae(e){let n=this.se(this.T[e]?.value);n!==void 0&&this.P.delete(n)}static dt(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.w,this.T.push(e),this.ie(e)}yt(e,n){let o=this.w;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.ie(n)}D(e){return this.T[e]}ce(e,n){this.ae(e),this.T[e]=n,this.ie(n),n.order=e}Ne(e){this.ae(e),this.T.splice(e,1);let n=this.w;for(let o=e;o<n;++o)this.T[o].order=o}Oe(e){let n=this.w;for(let o=e;o<n;++o)this.ae(o);this.T.splice(e)}en(e){return this.P.has(e)}ht(e){return this.P.get(e)?.order??-1}};var En=Symbol("r-for"),as=t=>-1,ho=()=>{},jt=class t{r;x;Me;R;constructor(e){this.r=e,this.x=e.o.p.for,this.Me=Rt(this.x),this.R=e.o.p.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Ve(e),this.r.O.j(e,o=>{o.hasAttribute(this.x)&&this.Ve(o)}),n}Y(e){return e[En]?!0:(e[En]=!0,Et(e,this.Me).forEach(n=>n[En]=!0),!1)}Ve(e){if(e.hasAttribute(this.R)||this.Y(e))return;let n=e.getAttribute(this.x);if(!n){D(0,this.x,e);return}e.removeAttribute(this.x),this.gt(e,n)}Le(e){return le(e)?[]:(q(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}gt(e,n){let o=this.bt(n);if(!o?.list){D(1,this.x,n,e);return}let r=this.r.o.p.key,s=this.r.o.p.keyBind,a=e.getAttribute(r)??e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let i=We(e),c=Ht.ft(this.r,i),l=e.parentNode;if(!l)return;let u=`${this.x} => ${n}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),Ke(f,i),i.forEach(M=>{F(M)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let h=this.r,m=h.m,d=m.L(),C=d.length===1?[void 0,d[0]]:void 0,v=this.xt(a),_=(M,W)=>v(M)===v(W),K=(M,W)=>M===W,V=(M,W,Z)=>{let y=o.createContext(W,M),A=at.dt(y.index,W),R=()=>{let $=p.parentNode??f.parentNode??l,b=Z.previousSibling,w=[];for(let k=0;k<i.length;++k){let G=i[k].cloneNode(!0);$.insertBefore(G,Z),w.push(G)}for(c?c.y(h,w):Oe(h,w),b=b.nextSibling;b!==Z;)A.items.push(b),b=b.nextSibling};return C?(C[0]=y.ctx,m.E(C,R)):m.E(d,()=>{m.v(y.ctx),R()}),A},oe=(M,W)=>{let Z=L.D(M).items,y=Z[Z.length-1].nextSibling;for(let A of Z)F(A);L.ce(M,V(M,W,y))},X=(M,W)=>{L.v(V(M,W,p))},O=M=>{for(let W of L.D(M).items)F(W)},re=M=>{let W=L.w;for(let Z=M;Z<W;++Z)L.D(Z).index(Z)},T=M=>{let W=f.parentNode,Z=p.parentNode;if(!W||!Z)return;let y=L.w;q(M)&&(M=M());let A=P(M[0]);if(E(A)&&A.length===0){Ce(f,p),L.Oe(0);return}let R=[];for(let I of this.Le(M[0]))R.push(I);let $=Bt.mt({oldItems:L.T,newValues:R,getKey:v,isSameValue:K,mountNewValue:(I,ee,ke)=>V(I,ee,ke),removeMountItem:I=>{for(let ee=0;ee<I.items.length;++ee)F(I.items[ee])},endAnchor:p});if($){L.T=$,L.P.clear();for(let I=0;I<$.length;++I){let ee=$[I];ee.order=I,ee.index(I);let ke=v(ee.value);ke!==void 0&&L.P.set(ke,ee)}return}let b=0,w=Number.MAX_SAFE_INTEGER,k=y,G=this.r.o.forGrowThreshold,ue=()=>L.w<k+G;for(let I of R){let ee=()=>{if(b<y){let ke=L.D(b++);if(_(ke.value,I)){if(K(ke.value,I))return;oe(b-1,I);return}let lt=L.ht(v(I));if(lt>=b&&lt-b<10){if(--b,w=Math.min(w,b),O(b),L.Ne(b),--y,lt>b+1)for(let rn=b;rn<lt-1&&rn<y&&!_(L.D(b).value,I);)++rn,O(b),L.Ne(b),--y;ee();return}ue()?(L.yt(b-1,V(b,I,L.D(b-1).items[0])),w=Math.min(w,b-1),++y):oe(b-1,I)}else X(b++,I)};ee()}let ge=b;for(y=L.w;b<y;)O(b++);L.Oe(ge),re(w)},S=()=>{Y.stop(),_e(),_e=ho},Y=m.V(o.list),je=Y.value,_e=ho,on=0,L=new at(v);for(let M of this.Le(je()[0]))L.v(V(on++,M,p));j(f,S),_e=Y.subscribe(T)}static Tt=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;bt(e){let n=t.Tt.exec(e);if(!n)return;let o=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||o[r]?.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let a=n[3];if(!a||o.length===0)return;let i=/[{[]/.test(e);return{list:a,createContext:(c,l)=>{let u={},f=P(c);if(!i&&o.length===1)u[o[0]]=c;else if(E(f)){let h=0;for(let m of o)u[m]=f[h++]}else for(let h of o)u[h]=f[h];let p={ctx:u,index:as};return s&&(p.index=u[s.startsWith("#")?s.substring(1):s]=se(l)),p}}}xt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Rt(n),r=o.length>1?o.slice(1):void 0;return s=>{let a=P(s),i=this.Ie(a,o);return i!==void 0||!r?i:this.Ie(a,r)}}return o=>P(P(o)?.[n])}Rt(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){let o=e;for(let r of n)o=P(o)?.[r];return P(o)}};var _t=class{pe=0;ue=new Map;m;Pe;De;Ue;O;F;o;R;Be;constructor(e){this.m=e,this.o=e.o,this.De=new jt(this),this.Pe=new Ct(this),this.Ue=new Pt(this),this.O=new Vt(this),this.F=new Dt(this),this.R=this.o.p.pre,this.Be=this.o.p.dynamic}Et(e){let n=fe(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let a=[...o.content.childNodes];for(let i of a)r.insertBefore(i,s);Oe(this,a)}}_(e){++this.pe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Pe.k(e)||this.De.k(e)||this.Ue.k(e))return;this.O.k(e),this.Et(e),this.ve(e,!0)}finally{--this.pe,this.pe===0&&this.Ct()}}vt(e,n){let o=document;if(!o){let r=e.parentNode;for(;r?.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}He(e,n){let o=this.vt(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,j(s,()=>{F(e)}),o.appendChild(e),!0}wt(e,n){this.ue.set(e,n)}Ct(){let e=this.ue;if(e.size!==0){this.ue=new Map;for(let[n,o]of e.entries())this.He(n,o)}}ve(e,n){let o=this.F.Ce(e,n),r=this.o.B;for(let[s,a]of o.entries()){let[i,c]=a.te,l=r[s]??r[i];if(!l){console.error("directive not found:",i);continue}let u=a.we;for(let f=0;f<u.length;++f){let p=u[f];this.y(l,p,s,!1,c,a.ne)}}}y(e,n,o,r,s,a){if(n.hasAttribute(this.R))return;let i=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(rt);if(f)return f;u=u.parentElement}return null};if(dn()){let l=c(n);if(l){this.m.E(eo(l),()=>{this.M(e,n,i,s,a)});return}}this.M(e,n,i,s,a)}St(e,n,o){return e!==wt?!1:(B(o)||this.He(n,o)||this.wt(n,o),!0)}M(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.St(e,n,o))return;let a=this.At(r,e.once),i=this.kt(e,o),c=this.Nt(i,a);j(n,c.stop);let l=this.Ot(n,o,i,a,r,s),u=this.Mt(e,l,c);if(!u)return;let f=this.Vt(l,i,a,r,u);f(),e.once||(c.result=i.subscribe(f),a&&(c.dynamic=a.subscribe(f)))}At(e,n){let o=so(e,this.Be);if(o)return this.m.V(H(o),void 0,void 0,void 0,n)}kt(e,n){return this.m.V(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let o={stop:()=>{e.stop(),n?.stop(),o.result?.(),o.dynamic?.(),o.mounted?.(),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Ot(e,n,o,r,s,a){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:a,parseResult:o,dynamicOption:r}}Mt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r?.unmount&&(o.mounted=r.unmount),r?.update}Vt(e,n,o,r,s){let a,i;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=a,e.option=l,e.previousOption=i,a=c,i=l,s(e)}}};var yo="http://www.w3.org/1999/xlink",cs={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function us(t){return!!t||t===""}var ls=(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=H(o)),$t(t,o,e[0],r);return}let a=e.length;for(let i=0;i<a;++i){let c=e[i];if(E(c)){let l=n?.[i]?.[0],u=c[0],f=c[1];$t(t,u,f,l)}else if(N(c))for(let l of Object.entries(c)){let u=l[0],f=l[1],p=n?.[i],h=p&&u in p?u:void 0;$t(t,u,f,h)}else{let l=n?.[i],u=e[i++],f=e[i];$t(t,u,f,l)}}},Rn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{ls(t,e,n,o,r,s)}})},$t=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),le(e)){D(3,"r-bind",t);return}if(!z(e)){D(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){le(n)?t.removeAttributeNS(yo,e.slice(6,e.length)):t.setAttributeNS(yo,e,n);return}let r=e in cs;le(n)||r&&!us(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var fs=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],a=n?.[r];if(E(s)){let i=s.length;for(let c=0;c<i;++c)go(t,s[c],a?.[c])}else go(t,s,a)}},vn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{fs(t,e,n)}})},go=(t,e,n)=>{let o=t.classList,r=z(e),s=z(n);if(e&&!r){if(n&&!s)for(let a in n)(!(a in e)||!e[a])&&o.remove(a);for(let a in e)e[a]&&o.add(a)}else if(r){if(n!==e){let a=s?Je(n):[],i=Je(e);a.length>0&&o.remove(...a),i.length>0&&o.add(...i)}}else if(n){let a=s?Je(n):[];a.length>0&&o.remove(...a)}};function ps(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=Re(t[o],e[o]);return n}function Re(t,e){if(t===e)return!0;let n=cn(t),o=cn(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=ot(t),o=ot(e),n||o)return t===e;if(n=E(t),o=E(e),n||o)return n&&o?ps(t,e):!1;if(n=N(t),o=N(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let a in t){let i=Object.prototype.hasOwnProperty.call(t,a),c=Object.prototype.hasOwnProperty.call(e,a);if(i&&!c||!Re(t[a],e[a]))return!1}return!0}return String(t)===String(e)}function Ft(t,e){return t.findIndex(n=>Re(n,e))}var bo=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var qt=t=>{if(!x(t))throw U(3,"pause");t(void 0,void 0,3)};var zt=t=>{if(!x(t))throw U(3,"resume");t(void 0,void 0,4)};var To={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{ms(t,o[0])},unmount:ds(t,e,n)})},ms=(t,e)=>{let n=vo(t);if(n&&Co(t))E(e)?e=Ft(e,ve(t))>-1:ae(e)?e=e.has(ve(t)):e=Ts(t,e),t.checked=e;else if(n&&Eo(t))t.checked=Re(e,ve(t));else if(n||wo(t))Ro(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(So(t)){let o=t.options,r=o.length,s=t.multiple;for(let a=0;a<r;a++){let i=o[a],c=ve(i);if(s)E(e)?i.selected=Ft(e,c)>-1:i.selected=e.has(c);else if(Re(ve(i),e)){t.selectedIndex!==a&&(t.selectedIndex=a);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else D(7,t)},ct=t=>(x(t)&&(t=t()),q(t)&&(t=t()),t?z(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),Co=t=>t.type==="checkbox",Eo=t=>t.type==="radio",Ro=t=>t.type==="number"||t.type==="range",vo=t=>t.tagName==="INPUT",wo=t=>t.tagName==="TEXTAREA",So=t=>t.tagName==="SELECT",ds=(t,e,n)=>{let o=e.value,r=ct(n?.join(",")),s=ct(o()[1]),a={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return D(8,t),()=>{};let i=()=>e.refs[0],c=vo(t);return c&&Co(t)?ys(t,i):c&&Eo(t)?Cs(t,i):c||wo(t)?hs(t,a,i,o):So(t)?Es(t,i,o):(D(7,t),()=>{})},xo=/[.,' ·٫]/,hs=(t,e,n,o)=>{let s=e.lazy?"change":"input",a=Ro(t),i=()=>{!e.trim&&!ct(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let h=p.target;h.composing=1},l=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,f),t.removeEventListener("change",i),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},f=p=>{let h=n();if(!h)return;let m=p.target;if(!m||m.composing)return;let d=m.value,g=ct(o()[1]);if(a||g.number||g.int){if(g.int)d=parseInt(d);else{if(xo.test(d[d.length-1])&&d.split(xo).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else g.trim&&(d=d.trim());h(d)};return t.addEventListener(s,f),t.addEventListener("change",i),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},ys=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let a=ve(t),i=t.checked,c=s();if(E(c)){let l=Ft(c,a),u=l!==-1;i&&!u?c.push(a):!i&&u&&c.splice(l,1)}else ae(c)?i?c.add(a):c.delete(a):s(xs(t,i))};return t.addEventListener(n,r),o},ve=t=>"_value"in t?t._value:t.value,Ao="trueValue",gs="falseValue",No="true-value",bs="false-value",xs=(t,e)=>{let n=e?Ao:gs;if(n in t)return t[n];let o=e?No:bs;return t.hasAttribute(o)?t.getAttribute(o):e},Ts=(t,e)=>{if(Ao in t)return Re(e,t.trueValue);let o=No;return t.hasAttribute(o)?Re(e,t.getAttribute(o)):Re(e,!0)},Cs=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let a=ve(t);s(a)};return t.addEventListener(n,r),o},Es=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let a=e();if(!a)return;let c=ct(n()[1]).number,l=Array.prototype.filter.call(t.options,u=>u.selected).map(u=>c?bo(ve(u)):ve(u));if(t.multiple){let u=a();try{if(qt(a),ae(u)){u.clear();for(let f of l)u.add(f)}else E(u)?(u.splice(0),u.push(...l)):a(l)}finally{zt(a),J(a)}}else a(l[0])};return t.addEventListener(o,s),r};var Rs=["stop","prevent","capture","self","once","left","right","middle","passive"],vs=t=>{let e={};if(B(t))return;let n=t.split(",");for(let o of Rs)e[o]=n.includes(o);return e},ws=(t,e,n,o,r)=>{if(o){let l=e.value(),u=P(o.value()[0]);return z(u)?wn(t,H(u),()=>e.value()[0],r?.join(",")??l[1]):()=>{}}else if(n){let l=e.value();return wn(t,H(n),()=>e.value()[0],r?.join(",")??l[1])}let s=[],a=()=>{s.forEach(l=>l())},i=e.value(),c=i.length;for(let l=0;l<c;++l){let u=i[l];if(q(u)&&(u=u()),N(u))for(let f of Object.entries(u)){let p=f[0],h=()=>{let d=e.value()[l];return q(d)&&(d=d()),d=d[p],q(d)&&(d=d()),d},m=u[p+"_flags"];s.push(wn(t,p,h,m))}else D(2,"r-on",t)}return a},Sn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>ws(t,e,n,o,r)},Ss=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=[...t.split("."),...e.split(",")];t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),a=n.includes("alt"),i=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||a&&!l.altKey||i&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},wn=(t,e,n,o)=>{if(B(e))return D(5,"r-on",t),()=>{};let r=vs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,a;[e,a]=Ss(e,o);let i=u=>{if(!a(u)||!n&&e==="submit"&&r?.prevent)return;let f=n(u);q(f)&&(f=f(u)),q(f)&&f(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!r){i(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==t)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),i(u)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var As=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=H(n)),Ze(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let a=e[s];if(E(a)){let i=a[0],c=a[1];Ze(t,i,c)}else if(N(a))for(let i of Object.entries(a)){let c=i[0],l=i[1];Ze(t,c,l)}else{let i=e[s++],c=e[s];Ze(t,i,c)}}},Oo={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{As(t,e,n,o)}})};function Ns(t){return!!t||t===""}var Ze=(t,e,n)=>{if(le(e)){D(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(me),1),t[e]=n??"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,a=n??"";s!==a&&(t.value=a),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Ns(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||D(4,e,o,n,s)}r&&t.removeAttribute(e)};var Mo={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=E(r),a=o.refs[0];return s?r.push(t):a?a?.(t):o.context[n]=t,()=>{if(s){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else a?.(null)}}};var Os=(t,e)=>{let n=Ne(t).data,o=n._ord;Kn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"},ko={mount:()=>({update:({el:t,values:e})=>{Os(t,e)}})};var Ms=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],a=n?.[r];if(E(s)){let i=s.length;for(let c=0;c<i;++c)Lo(t,s[c],a?.[c])}else Lo(t,s,a)}},Kt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Ms(t,e,n)}})},Lo=(t,e,n)=>{let o=t.style,r=z(e);if(e&&!r){if(n&&!z(n))for(let s in n)e[s]==null&&Nn(o,s,"");for(let s in e)Nn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ne(t).data)return;o.display=s}},Io=/\s*!important$/;function Nn(t,e,n){if(E(n))n.forEach(o=>{Nn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=ks(t,e);Io.test(n)?t.setProperty(Ge(o),n.replace(Io,""),"important"):t[o]=n}}var Vo=["Webkit","Moz","ms"],An={};function ks(t,e){let n=An[e];if(n)return n;let o=H(e);if(o!=="filter"&&o in t)return An[e]=o;o=it(o);for(let r=0;r<Vo.length;r++){let s=Vo[r]+o;if(s in t)return An[e]=s}return e}var ie=t=>Do(P(t)),Do=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(E(t))return t.map(ie);if(ae(t)){let o=new Set;for(let r of t.keys())o.add(ie(r));return o}if(Se(t)){let o=new Map;for(let r of t)o.set(ie(r[0]),ie(r[1]));return o}if(e.has(t))return P(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Do(P(o[1]),e);return n};var Ls=(t,e)=>{let n=e[0];t.textContent=ae(n)?JSON.stringify(ie([...n])):Se(n)?JSON.stringify(ie([...n])):N(n)?JSON.stringify(ie(n)):n?.toString()??""},Po={mount:()=>({update:({el:t,values:e})=>{Ls(t,e)}})};var Uo={mount:()=>({update:({el:t,values:e})=>{Ze(t,"value",e[0])}})};var ce=class t{static getDefault(){return t.je??(t.je=new t)}B={};p={};lt=()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":"));Z=new Map;$=new Map;static je;static Lt="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";forGrowThreshold=10;globalContext;useInterpolation=!0;propValidationMode="throw";constructor(e){if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.It()}It(){let e={},n=globalThis;for(let o of t.Lt.split(","))e[o]=n[o];return e.ref=ye,e.sref=se,e.flatten=ie,e}addComponent(...e){for(let n of e){if(!n.defaultName){Ie.warning("Registered component's default name is not defined",n);continue}this.Z.set(it(n.defaultName),n),this.$.set(it(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Oo,":":Rn,"@":Sn,[`${e}on`]:Sn,[`${e}bind`]:Rn,[`${e}html`]:Ut,[`${e}text`]:Po,[`${e}show`]:ko,[`${e}model`]:To,":style":Kt,[`${e}style`]:Kt,[`${e}bind:style`]:Kt,":class":vn,[`${e}bind:class`]:vn,":ref":Mo,":value":Uo,[`${e}teleport`]:wt},this.p={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.p)}};var Wt=(t,e)=>{if(!t)return;let o=(e??ce.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let a of Vs(t,o.pre,s))Is(a,o.text,r,s)},Is=(t,e,n,o)=>{let r=t.textContent;if(!r)return;let s=n,a=r.split(s);if(a.length<=1)return;if(t.parentElement?.childNodes.length===1&&a.length===3){let c=a[1],l=Ho(c,o);if(l&&B(a[0])&&B(a[2])){let u=t.parentElement;u.setAttribute(e,c.substring(l.start.length,c.length-l.end.length)),u.innerText="";return}}let i=document.createDocumentFragment();for(let c of a){let l=Ho(c,o);if(l){let u=document.createElement("span");u.setAttribute(e,c.substring(l.start.length,c.length-l.end.length)),i.appendChild(u)}else i.appendChild(document.createTextNode(c))}t.replaceWith(i)},Vs=(t,e,n)=>{let o=[],r=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(a=>s.textContent?.includes(a.start))&&o.push(s);else{if(s?.hasAttribute?.(e))return;for(let a of Ee(s))r(a)}};return r(t),o},Ho=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Ds=9,Ps=10,Us=13,Hs=32,we=46,Gt=44,Bs=39,js=34,Jt=40,et=41,Qt=91,On=93,Mn=63,_s=59,Bo=58,jo=123,Xt=125,Ue=43,Yt=45,kn=96,_o=47,Ln=92,$o=new Set([2,3]),Go={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},$s={"=>":2,...Go,"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13},Jo=Object.keys(Go),Fs=new Set(Jo),Vn=new Set(["=>"]);Jo.forEach(t=>Vn.add(t));var Fo={true:!0,false:!1,null:null},qs="this",tt="Expected ",He="Unexpected ",Pn="Unclosed ",zs=tt+":",qo=tt+"expression",Ks="missing }",Ws=He+"object property",Gs=Pn+"(",zo=tt+"comma",Ko=He+"token ",Js=He+"period",In=tt+"expression after ",Qs="missing unaryOp argument",Xs=Pn+"[",Ys=tt+"exponent (",Zs="Variable names cannot start with a number (",ei=Pn+'quote after "',ut=t=>t>=48&&t<=57,Wo=t=>$s[t],Dn=class{u;e;get H(){return this.u.charAt(this.e)}get h(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}constructor(e){this.u=e,this.e=0}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}le(e){return this.K(e)||ut(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===Hs||e===Ds||e===Ps||e===Us;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.fe();return e.length===1?e[0]:{type:0,body:e}}fe(e){let n=[];for(;this.e<this.u.length;){let o=this.h;if(o===_s||o===Gt)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.i(He+'"'+this.H+'"')}}}return n}S(){let e=this.Pt()??this._e();return this.g(),this.Dt(e)}me(){this.g();let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),a=e.charCodeAt(n+3);if(isNaN(o))return!1;let i=!1,c=0;return o===62&&r===62&&s===62&&a===61?(i=">>>=",c=4):o===61&&r===61&&s===61?(i="===",c=3):o===33&&r===61&&s===61?(i="!==",c=3):o===62&&r===62&&s===62?(i=">>>",c=3):o===60&&r===60&&s===61?(i="<<=",c=3):o===62&&r===62&&s===61?(i=">>=",c=3):o===42&&r===42&&s===61?(i="**=",c=3):o===61&&r===62?(i="=>",c=2):o===124&&r===124?(i="||",c=2):o===63&&r===63?(i="??",c=2):o===38&&r===38?(i="&&",c=2):o===61&&r===61?(i="==",c=2):o===33&&r===61?(i="!=",c=2):o===60&&r===61?(i="<=",c=2):o===62&&r===61?(i=">=",c=2):o===60&&r===60?(i="<<",c=2):o===62&&r===62?(i=">>",c=2):o===43&&r===61?(i="+=",c=2):o===45&&r===61?(i="-=",c=2):o===42&&r===61?(i="*=",c=2):o===47&&r===61?(i="/=",c=2):o===37&&r===61?(i="%=",c=2):o===38&&r===61?(i="&=",c=2):o===94&&r===61?(i="^=",c=2):o===124&&r===61?(i="|=",c=2):o===42&&r===42?(i="**",c=2):o===105&&r===110?this.le(e.charCodeAt(n+2))||(i="in",c=2):o===61?(i="=",c=1):o===124?(i="|",c=1):o===94?(i="^",c=1):o===38?(i="&",c=1):o===60?(i="<",c=1):o===62?(i=">",c=1):o===43?(i="+",c=1):o===45?(i="-",c=1):o===42?(i="*",c=1):o===47?(i="/",c=1):o===37&&(i="%",c=1),i?(this.e+=c,i):!1}_e(){let e,n,o,r,s,a,i,c;if(s=this.z(),!s||(n=this.me(),!n))return s;if(r={value:n,prec:Wo(n),right_a:Vn.has(n)},a=this.z(),!a)throw this.i(In+n);let l=[s,r,a];for(;n=this.me();){o=Wo(n),r={value:n,prec:o,right_a:Vn.has(n)},c=n;let u=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;l.length>2&&u(l[l.length-2]);)a=l.pop(),n=l.pop().value,s=l.pop(),e=this.$e(n,s,a),l.push(e);if(e=this.z(),!e)throw this.i(In+c);l.push(r,e)}for(i=l.length-1,e=l[i];i>1;)e=this.$e(l[i-1].value,l[i-2],e),i-=2;return e}z(){let e;if(this.g(),e=this.Ut(),e)return this.de(e);let n=this.h;if(ut(n)||n===we)return this.Bt();if(n===Bs||n===js)e=this.Ht();else if(n===Qt)e=this.jt();else{let o=this._t();if(o){let r=this.z();if(!r)throw this.i(Qs);return this.de({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in Fo?e={type:4,value:Fo[e.name],raw:e.name}:e.name===qs&&(e={type:5})):n===Jt&&(e=this.$t())}return e?(e=this.W(e),this.de(e)):!1}$e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return Fs.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Ut(){let e={node:!1};return this.Ft(e),e.node||(this.qt(e),e.node)||(this.Kt(e),e.node)||(this.Fe(e),e.node)||this.zt(e),e.node}de(e){let n={node:e};return this.Wt(n),this.Gt(n),this.Jt(n),n.node}_t(){let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),a=e.charCodeAt(n+3);return o===Yt?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===Ue?(this.e++,"+"):o===110&&r===101&&s===119&&!this.le(a)?(this.e+=3,"new"):!1}Pt(){let e={};return this.Qt(e),e.node}Dt(e){let n={node:e};return this.Xt(n),n.node}W(e){this.g();let n=this.h;for(;n===we||n===Qt||n===Jt||n===Mn;){let o;if(n===Mn){if(this.u.charCodeAt(this.e+1)!==we)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Qt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==On)throw this.i(Xs);this.e++}else n===Jt?e={type:6,arguments:this.qe(et),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.u,n=this.e,o=n;for(;ut(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===we)for(o++;ut(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let i=e.charCodeAt(o);(i===Ue||i===Yt)&&o++;let c=o;for(;ut(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(Ys+l+this.H+")")}}this.e=o;let s=e.slice(n,o),a=e.charCodeAt(o);if(this.K(a))throw this.i(Zs+s+this.H+")");if(a===we||s.length===1&&s.charCodeAt(0)===we)throw this.i(Js);return{type:4,value:parseFloat(s),raw:s}}Ht(){let e=this.u,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,a=s,i=[],c=!1,l=!1;for(;s<n;){let f=e.charCodeAt(s);if(f===r){l=!0,this.e=s+1;break}if(f===Ln){c||(c=!0),i.push(e.slice(a,s));let p=e.charCodeAt(s+1);i.push(this.Ke(p)),s+=2,a=s}else s++}let u=c?i.join("")+e.slice(a,l?s:n):e.slice(a,l?s:n);if(!l)throw this.e=s,this.i(ei+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}Ke(e){switch(e){case 110:return`
2
+ `;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}ye(){let e=this.h,n=this.e;if(this.K(e))this.e++;else throw this.i(He+this.H);for(;this.e<this.u.length&&(e=this.h,this.le(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===et&&r&&r>=n.length)throw this.i(Ko+String.fromCharCode(e));break}else if(s===Gt){if(this.e++,r++,r!==n.length){if(e===et)throw this.i(Ko+",");for(let a=n.length;a<r;a++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(zo);{let a=this.S();if(!a||a.type===0)throw this.i(zo);n.push(a)}}}if(!o)throw this.i(tt+String.fromCharCode(e));return n}$t(){this.e++;let e=this.fe(et);if(this.f(et))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Gs)}jt(){return this.e++,{type:9,elements:this.qe(On)}}Ft(e){if(this.f(jo)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(Xt)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(Gt)||this.f(Xt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Bo)){this.e++;let r=this.S();if(!r)throw this.i(Ws);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(Gt)&&this.e++}throw this.i(Ks)}}qt(e){let n=this.h;if((n===Ue||n===Yt)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===Ue?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!$o.has(o.argument.type))throw this.i(He+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===Ue||o===Yt)&&o===this.u.charCodeAt(this.e+1)){if(!$o.has(n.type))throw this.i(He+(o===Ue?"++":"--"));this.e+=2,e.node={type:13,operator:o===Ue?"++":"--",argument:n,prefix:!1}}}Kt(e){this.u.charCodeAt(this.e)===we&&this.u.charCodeAt(this.e+1)===we&&this.u.charCodeAt(this.e+2)===we&&(this.e+=3,e.node={type:14,argument:this.S()})}Xt(e){if(e.node&&this.f(Mn)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(qo);if(this.g(),this.f(Bo)){this.e++;let r=this.S();if(!r)throw this.i(qo);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(zs)}}Qt(e){if(this.g(),this.f(Jt)){let n=this.e;if(this.e++,this.g(),this.f(et)){this.e++;let o=this.me();if(o==="=>"){let r=this._e();if(!r)throw this.i(In+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Jt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(kn)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(kn))return;let n=this.u,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,a=[],i=[],c=!1,l=u=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:u})}a.push(n.slice(s,this.e)),i.push(n.slice(s,this.e));let f=a.join(""),p=i.join("");return a.length=0,i.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<o;){let u=n.charCodeAt(this.e);if(u===kn)return l(!0),this.e+=1,e.node=r,r;if(u===36&&n.charCodeAt(this.e+1)===jo){if(l(!1),this.e+=2,r.expressions.push(...this.fe(Xt)),!this.f(Xt))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===Ln){c||(c=!0),a.push(n.slice(s,this.e)),i.push(n.slice(s,this.e));let f=n.charCodeAt(this.e+1);a.push(n.slice(this.e,this.e+2)),i.push(this.Ke(f)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Wt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}zt(e){if(!this.f(_o))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===_o&&!o){let r=this.u.slice(n,this.e),s="";for(;++this.e<this.u.length;){let i=this.h;if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)s+=this.H;else break}let a;try{a=new RegExp(r,s)}catch(i){throw this.i(i.message)}return e.node={type:4,value:a,raw:this.u.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(Qt)?o=!0:o&&this.f(On)&&(o=!1),this.e+=this.f(Ln)?2:1}throw this.i("Unclosed Regex")}},Qo=t=>new Dn(t).parse();var ti={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>t**e},ni={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},er=t=>{if(!t?.some(Zo))return t;let e=[];return t.forEach(n=>Zo(n)?e.push(...n):e.push(n)),e},Xo=(...t)=>er(t),Un=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},oi={"++":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(--o),o}return--t[e]}},ri={"++":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(o-1),o}return t[e]--}},Yo={"=":(t,e,n)=>{let o=t[e];return x(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return x(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return x(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return x(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return x(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return x(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return x(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return x(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return x(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return x(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return x(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return x(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return x(o)?o(o()^n):t[e]^=n}},Zt=(t,e)=>q(t)?t.bind(e):t,Hn=class{l;ze;We;Ge;A;Je;Qe;constructor(e,n,o,r,s){this.l=E(e)?e:[e],this.ze=n,this.We=o,this.Ge=r,this.Qe=!!s}Xe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],Zt(P(o[r]),o);for(let a of this.l)if(r in a)return this.A=a[r],Zt(P(a[r]),a);let s=this.ze;if(s&&r in s)return this.A=s[r],Zt(P(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,Xo,...e.body)}1(e,n,o){return this.C(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.he(e,n,o),a=r?.[s];return this.A=a,Zt(P(a),r)}4(e,n,o){return e.value}6(e,n,o){let r=(a,...i)=>q(a)?a(...er(i)):a,s=this.C(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.C(n,o,ni[e.operator],e.argument)}8(e,n,o){let r=ti[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.C(n,o,r,e.left,e.right)}9(e,n,o){return this.Ye(++n,o,Xo,...e.elements)}10(e,n,o){let r={},s=(...a)=>{a.forEach(i=>{Object.assign(r,i)})};return this.C(++n,o,s,...e.properties),r}11(e,n,o){return this.C(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){let r={},s=u=>u?.type!==15,a=this.Ge??(()=>!1),i=n===0&&this.Qe,c=u=>this.Ze(i,e.key,n,Un(u,o)),l=u=>this.Ze(i,e.value,n,Un(u,o));if(e.shorthand){let u=e.key.name;r[u]=s(e.key)&&a(u,n)?c:c()}else if(e.computed){let u=P(c());r[u]=s(e.value)&&a(u,n)?l:l()}else{let u=e.key.type===4?e.key.value:e.key.name;r[u]=s(e.value)&&a(u,n)?()=>l:l()}return r}he(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,a=e.prefix?oi:ri;if(r.type===2){let i=r.name,c=this.Xe(i,o);return le(c)?void 0:a[s](c,i)}if(r.type===3){let{obj:i,key:c}=this.he(r,n,o);return a[s](i,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let a=r.name,i=this.Xe(a,o);if(le(i))return;let c=this.b(e.right,n,o);return Yo[s](i,a,c)}if(r.type===3){let{obj:a,key:i}=this.he(r,n,o),c=this.b(e.right,n,o);return Yo[s](a,i,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return E(r)&&(r.s=tr),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((a,i,c)=>a+=i+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.C(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...a)=>new s(...a);return this.C(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o??{}),a=e.params;if(a){let i=0;for(let c of a)s[c.name]=r[i++]}return this.b(e.body,n,s)}}b(e,n,o){let r=P(this[e.type](e,n,o));return this.Je=e.type,r}Ze(e,n,o,r){let s=this.b(n,o,r);return e&&this.et()?this.A:s}et(){let e=this.Je;return(e===2||e===3||e===6)&&x(this.A)}eval(e,n){let{value:o,refs:r}=Ot(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.et()&&(s.ref=this.A),s}C(e,n,o,...r){let s=r.map(a=>a&&this.b(a,e,n));return o(...s)}Ye(e,n,o,...r){let s=this.We;if(!s)return this.C(e,n,o,...r);let a=r.map((i,c)=>i&&(i.type!==15&&s(c,e)?l=>this.b(i,e,Un(l,n)):this.b(i,e,n)));return o(...a)}},tr=Symbol("s"),Zo=t=>t?.s===tr,nr=(t,e,n,o,r,s,a)=>new Hn(e,n,o,r,a).eval(t,s);var or={},rr=t=>!!t,en=class{l;o;constructor(e,n){this.l=e,this.o=n}v(e){this.l=[e,...this.l]}ee(){return this.l.map(n=>n.components).filter(rr).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ut(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(rr).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}V(e,n,o,r,s){let a=[],i=[],c=new Set,l=()=>{for(let C=0;C<i.length;++C)i[C]();i.length=0},p={value:()=>a,stop:()=>{l(),c.clear()},subscribe:(C,v)=>(c.add(C),v&&C(a),()=>{c.delete(C)}),refs:[],context:this.l[0]};if(B(e))return p;let h=this.o.globalContext,m=[],d=new Set,g=(C,v,_,K)=>{try{let V=nr(C,v,h,n,o,K,r);return _&&V.refs.length>0&&m.push(...V.refs),{value:V.value,refs:V.refs,ref:V.ref}}catch(V){D(6,`evaluation error: ${e}`,V)}return{value:void 0,refs:[]}};try{let C=or[e]??Qo("["+e+"]");or[e]=C;let v=this.l.slice(),_=C.elements,K=_.length,V=new Array(K);p.refs=V;let oe=()=>{m.length=0,s||(d.clear(),l());let X=new Array(K);for(let O=0;O<K;++O){let re=_[O];if(n?.(O,-1)){X[O]=S=>g(re,v,!1,{$event:S}).value;continue}let T=g(re,v,!0);X[O]=T.value,V[O]=T.ref}if(!s)for(let O of m)d.has(O)||(d.add(O),i.push(ne(O,oe)));if(a=X,c.size!==0)for(let O of c)c.has(O)&&O(a)};oe()}catch(C){D(6,`parse error: ${e}`,C)}return p}L(){return this.l.slice()}tt=[];ce(e){this.tt.push(this.l),this.l=e}E(e,n){try{this.ce(e),n()}finally{this.Yt()}}Yt(){this.l=this.tt.pop()??[]}};var sr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},si=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},ii=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
+ `);)++n;if(n>=t.length||!sr(t[n]))return null;let o=n;for(;n<t.length&&sr(t[n]);)++n;return{start:o,end:n}},ir=new Set(["table","thead","tbody","tfoot"]),ai=new Set(["thead","tbody","tfoot"]),ci=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),ui=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ar=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,tn=t=>{let e=0,n=[],o=[],r=0;for(;e<t.length;){let s=t.indexOf("<",e);if(s===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,s)),t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);if(g===-1){n.push(t.slice(s));break}n.push(t.slice(s,g+3)),e=g+3;continue}let a=si(t,s);if(a===-1){n.push(t.slice(s));break}let i=t.slice(s,a+1),c=i.startsWith("</");if(i.startsWith("<!")||i.startsWith("<?")){n.push(i),e=a+1;continue}let u=ii(i,c);if(!u){n.push(i),e=a+1;continue}let f=i.slice(u.start,u.end);if(c){let g=o[o.length-1];g?(o.pop(),n.push(g.replacementHost?`</${g.replacementHost}>`:i),ir.has(g.effectiveTag)&&--r):n.push(i),e=a+1;continue}let p=i.charCodeAt(i.length-2)===47,h=o[o.length-1],m=null;r===0?f==="tr"?m="trx":f==="td"?m="tdx":f==="th"&&(m="thx"):ai.has(h?.effectiveTag??"")?m=f==="tr"?null:"tr":h?.effectiveTag==="table"?m=ci.has(f)?null:"tr":h?.effectiveTag==="tr"&&(m=f==="td"||f==="th"?null:"td");let d=p&&!ui.has(m||f);if(m){let g=m==="trx"||m==="tdx"||m==="thx",C=`${i.slice(0,u.start)}${m} is="${g?`r-${f}`:`regor:${f}`}"${i.slice(u.end)}`;n.push(d?ar(C,m):C)}else n.push(d?ar(i,f):i);if(!p){let g=m==="trx"?"tr":m==="tdx"?"td":m==="thx"?"th":m||f;o.push({replacementHost:m,effectiveTag:g}),ir.has(g)&&++r}e=a+1}return n.join("")};var li="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",fi=new Set(li.toUpperCase().split(",")),pi="http://www.w3.org/2000/svg",cr=(t,e)=>{fe(t)?t.content.appendChild(e):t.appendChild(e)},Bn=(t,e,n,o)=>{let r=t.t;if(r){let a=n&&fi.has(r.toUpperCase())?document.createElementNS(pi,r.toLowerCase()):document.createElement(r),i=t.a;if(i)for(let l of Object.entries(i)){let u=l[0],f=l[1];u.startsWith("#")&&(f=u.substring(1),u="name"),a.setAttribute(vt(u,o),f)}let c=t.c;if(c)for(let l of c)Bn(l,a,n,o);cr(e,a);return}let s=t.d;if(s){let a;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)cr(e,a);else throw new Error("unsupported node type.")}},Be=(t,e,n)=>{n??=ce.getDefault();let o=document.createDocumentFragment();if(!E(t))return Bn(t,o,!!e,n),o;for(let r of t)Bn(r,o,!!e,n);return o};var ur=(t,e={selector:"#app"},n)=>{z(e)&&(e={selector:"#app",template:e}),io(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Te(o))throw U(0);n||(n=ce.getDefault());let r=()=>{for(let i of[...o.childNodes])F(i)},s=i=>{for(let c of i)o.appendChild(c)};if(e.template){let i=document.createRange().createContextualFragment(tn(e.template));r(),s(i.childNodes),e.element=i}else if(e.json){let i=Be(e.json,e.isSVG,n);r(),s(i.childNodes)}return n.useInterpolation&&Wt(o,n),new jn(t,o,n).y(),j(o,()=>{Ae(t)}),St(t),{context:t,unmount:()=>{F(o)},unbind:()=>{me(o)}}},jn=class{Zt;nt;o;m;r;constructor(e,n,o){this.Zt=e,this.nt=n,this.o=o,this.m=new en([e],o),this.r=new _t(this.m)}y(){this.r._(this.nt)}};var nt=t=>{if(E(t))return t.map(r=>nt(r));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(r=>[r,t.getAttribute(r)??""])));let o=Ee(t);return o.length>0&&(e.c=[...o].map(r=>nt(r))),e};var lr=(t,e={})=>{E(e)&&(e={props:e}),z(t)&&(t={template:t});let n=e.context??(()=>({})),o=!1;if(t.element){let s=t.element;s.remove(),t.element=s}else if(t.selector){let s=document.querySelector(t.selector);if(!s)throw U(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(tn(t.template));t.element=s}else t.json&&(t.element=Be(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Wt(t.element,e.config??ce.getDefault());let r=t.element;if(!o&&((t.isSVG??(st(r)&&r.hasAttribute?.("isSVG")))||st(r)&&r.querySelector("[isSVG]"))){let s=r.content,a=s?[...s.childNodes]:[...r.childNodes],i=nt(a);t.element=Be(i,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var nn=class{byConstructor=new Map;register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var fr=t=>{Le()?.onMounted.push(t)};var pr=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw U(4);return e&&!n.isStopped?e(...r):(e=mi(t,n),e(...r))};return o[Q]=1,Me(o,!0),o.stop=()=>n.ref?.stop?.(),te(()=>o.stop(),!0),o},mi=(t,e)=>{let n=e.ref??se(null);e.ref=n,e.isStopped=!1;let o=0,r=Pe(()=>{if(o>0){r(),e.isStopped=!0,J(n);return}n(t()),++o});return n.stop=r,n};var mr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return o&&!n.isStopped?o(...s):(o=di(t,e,n),o(...s))};return r[Q]=1,Me(r,!0),r.stop=()=>n.ref?.stop?.(),te(()=>r.stop(),!0),r},di=(t,e,n)=>{let o=n.ref??se(null);n.ref=o,n.isStopped=!1;let r=0,s=i=>{if(r>0){o.stop(),n.isStopped=!0,J(o);return}let c=t.map(l=>l());o(e(...c)),++r},a=[];for(let i of t){let c=ne(i,s);a.push(c)}return s(null),o.stop=()=>{a.forEach(i=>{i()})},o};var dr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return o&&!n.isStopped?o(...s):(o=hi(t,e,n),o(...s))};return r[Q]=1,Me(r,!0),r.stop=()=>n.ref?.stop?.(),te(()=>r.stop(),!0),r},hi=(t,e,n)=>{let o=n.ref??se(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=ne(t,s=>{if(r>0){o.stop(),n.isStopped=!0,J(o);return}o(e(s)),++r},!0),o};var hr=t=>(t[yt]=1,t);var yr=(t,e)=>{if(!e)throw U(5);let o=De(t)?ye:i=>i,r=()=>localStorage.setItem(e,JSON.stringify(ie(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(i){D(6,`persist: failed to parse data for key ${e}`,i),r()}else r();let a=Pe(r);return te(a,!0),t};var _n=(t,...e)=>{let n="",o=t,r=e,s=o.length,a=r.length;for(let i=0;i<s;++i)n+=o[i],i<a&&(n+=r[i]);return n},gr=_n;var br=(t,e,n)=>{let o=[],r=()=>{e(t.map(a=>a()))};for(let a of t)o.push(ne(a,r));n&&r();let s=()=>{for(let a of o)a()};return te(s,!0),s};var xr=t=>{if(!x(t))throw U(3,"observerCount");return t(void 0,void 0,2)};var Tr=t=>{$n();try{t()}finally{Fn()}},$n=()=>{he.stack||(he.stack=[]),he.stack.push(new Set)},Fn=()=>{let t=he.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete he.stack;for(let n of e)try{J(n)}catch(o){console.error(o)}};