regor 1.4.4 → 1.4.5

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.
@@ -566,10 +566,13 @@ var Regor = (() => {
566
566
  }
567
567
  __bindAll(element) {
568
568
  const isIfElement = element.hasAttribute(this.__if);
569
- const elements = findElements(element, this.__ifSelector);
570
- for (const el of elements) {
571
- this.__bind(el);
572
- }
569
+ if (isIfElement) this.__bind(element);
570
+ this.__binder.__componentBinder.__forEachBindableDescendant(
571
+ element,
572
+ (el) => {
573
+ if (el.hasAttribute(this.__if)) this.__bind(el);
574
+ }
575
+ );
573
576
  return isIfElement;
574
577
  }
575
578
  __isProcessedOrMark(el) {
@@ -1361,8 +1364,16 @@ var Regor = (() => {
1361
1364
  }
1362
1365
  return false;
1363
1366
  }
1367
+ __isNamedSlotTemplateShortcut(node) {
1368
+ if (!isTemplate(node)) return false;
1369
+ const attributeNames = node.getAttributeNames();
1370
+ if (node.hasAttribute("name")) return true;
1371
+ return attributeNames.some((x) => x.startsWith("#"));
1372
+ }
1373
+ __isDefaultSlotTemplateShortcut(node) {
1374
+ return isTemplate(node) && node.getAttributeNames().length === 0;
1375
+ }
1364
1376
  __unwrapComponents(element) {
1365
- var _a;
1366
1377
  const binder = this.__binder;
1367
1378
  const parser = binder.__parser;
1368
1379
  const registeredComponents = binder.__config.__components;
@@ -1371,16 +1382,9 @@ var Regor = (() => {
1371
1382
  return;
1372
1383
  }
1373
1384
  const contextComponents = parser.__getComponents();
1374
- const contextComponentSelectors = parser.__getComponentSelectors();
1375
- const registeredSelector = this.__getRegisteredComponentSelector(registeredComponents);
1376
- const selector = [
1377
- ...registeredSelector ? [registeredSelector] : [],
1378
- ...contextComponentSelectors,
1379
- ...contextComponentSelectors.map(hyphenate)
1380
- ].join(",");
1385
+ const selector = this.__getComponentSelector();
1381
1386
  if (isNullOrWhitespace(selector)) return;
1382
- const list = element.querySelectorAll(selector);
1383
- const components = ((_a = element.matches) == null ? void 0 : _a.call(element, selector)) ? [element, ...list] : list;
1387
+ const components = this.__collectTopLevelComponentHosts(element, selector);
1384
1388
  for (const component of components) {
1385
1389
  if (component.hasAttribute(binder.__pre)) continue;
1386
1390
  const parent = component.parentNode;
@@ -1454,7 +1458,7 @@ var Regor = (() => {
1454
1458
  };
1455
1459
  const capturedContext = [...parser.__capture()];
1456
1460
  const createComponentCtx = () => {
1457
- var _a2;
1461
+ var _a;
1458
1462
  const props = getProps(component, capturedContext);
1459
1463
  const head2 = new ComponentHead(
1460
1464
  props,
@@ -1464,8 +1468,8 @@ var Regor = (() => {
1464
1468
  endOfComponent
1465
1469
  );
1466
1470
  const componentCtx2 = useScope(() => {
1467
- var _a3;
1468
- return (_a3 = registeredComponent.context(head2)) != null ? _a3 : {};
1471
+ var _a2;
1472
+ return (_a2 = registeredComponent.context(head2)) != null ? _a2 : {};
1469
1473
  }).context;
1470
1474
  if (head2.autoProps) {
1471
1475
  for (const [key, propsValue] of Object.entries(props)) {
@@ -1489,7 +1493,7 @@ var Regor = (() => {
1489
1493
  }
1490
1494
  } else componentCtx2[key] = propsValue;
1491
1495
  }
1492
- (_a2 = head2.onAutoPropsAssigned) == null ? void 0 : _a2.call(head2);
1496
+ (_a = head2.onAutoPropsAssigned) == null ? void 0 : _a.call(head2);
1493
1497
  }
1494
1498
  return { componentCtx: componentCtx2, head: head2 };
1495
1499
  };
@@ -1498,6 +1502,7 @@ var Regor = (() => {
1498
1502
  const len = childNodes.length;
1499
1503
  const isEmptyComponent = component.childNodes.length === 0;
1500
1504
  const expandSlot = (slot) => {
1505
+ var _a;
1501
1506
  const parent2 = slot.parentElement;
1502
1507
  let name = slot.name;
1503
1508
  if (isNullOrWhitespace(name)) {
@@ -1527,9 +1532,12 @@ var Regor = (() => {
1527
1532
  `template[name='${name}'], template[\\#${name}]`
1528
1533
  );
1529
1534
  if (!compTemplate && name === "default") {
1530
- compTemplate = component.querySelector("template:not([name])");
1531
- if (compTemplate && compTemplate.getAttributeNames().filter((x) => x.startsWith("#")).length > 0)
1532
- compTemplate = null;
1535
+ const unnamedTemplates = component.querySelectorAll(
1536
+ "template:not([name])"
1537
+ );
1538
+ compTemplate = (_a = [...unnamedTemplates].find(
1539
+ (x) => this.__isDefaultSlotTemplateShortcut(x)
1540
+ )) != null ? _a : null;
1533
1541
  }
1534
1542
  const createSwitchContext = (childNodes2) => {
1535
1543
  if (!head.enableSwitch) return;
@@ -1565,7 +1573,7 @@ var Regor = (() => {
1565
1573
  return;
1566
1574
  }
1567
1575
  const childNodes2 = [...getChildNodes(component)].filter(
1568
- (x) => !isTemplate(x)
1576
+ (x) => !this.__isNamedSlotTemplateShortcut(x)
1569
1577
  );
1570
1578
  for (const slotChild of childNodes2) {
1571
1579
  parent2.insertBefore(slotChild, slot);
@@ -1651,6 +1659,65 @@ var Regor = (() => {
1651
1659
  parser.__scoped(capturedContext, bindComponent);
1652
1660
  }
1653
1661
  }
1662
+ __getComponentSelector() {
1663
+ const binder = this.__binder;
1664
+ const parser = binder.__parser;
1665
+ const registeredComponents = binder.__config.__components;
1666
+ const contextComponentSelectors = parser.__getComponentSelectors();
1667
+ const registeredSelector = this.__getRegisteredComponentSelector(registeredComponents);
1668
+ return [
1669
+ ...registeredSelector ? [registeredSelector] : [],
1670
+ ...contextComponentSelectors,
1671
+ ...contextComponentSelectors.map(hyphenate)
1672
+ ].join(",");
1673
+ }
1674
+ __collectTopLevelComponentHosts(root, selector) {
1675
+ var _a;
1676
+ const result = [];
1677
+ if (isNullOrWhitespace(selector)) return result;
1678
+ if ((_a = root.matches) == null ? void 0 : _a.call(root, selector)) return [root];
1679
+ const stack = this.__getChildElements(root).reverse();
1680
+ while (stack.length > 0) {
1681
+ const current = stack.pop();
1682
+ if (current.matches(selector)) {
1683
+ result.push(current);
1684
+ continue;
1685
+ }
1686
+ stack.push(...this.__getChildElements(current).reverse());
1687
+ }
1688
+ return result;
1689
+ }
1690
+ __forEachBindableDescendant(root, action) {
1691
+ const selector = this.__getComponentSelector();
1692
+ const stack = this.__getChildElements(root).reverse();
1693
+ while (stack.length > 0) {
1694
+ const current = stack.pop();
1695
+ action(current);
1696
+ if (!isNullOrWhitespace(selector) && current.matches(selector)) continue;
1697
+ stack.push(...this.__getChildElements(current).reverse());
1698
+ }
1699
+ }
1700
+ __getChildElements(root) {
1701
+ const children = root == null ? void 0 : root.children;
1702
+ if ((children == null ? void 0 : children.length) != null) {
1703
+ const result = [];
1704
+ for (let i = 0; i < children.length; ++i) {
1705
+ const child = children[i];
1706
+ if (isElement(child)) result.push(child);
1707
+ }
1708
+ return result;
1709
+ }
1710
+ const childNodes = root == null ? void 0 : root.childNodes;
1711
+ if ((childNodes == null ? void 0 : childNodes.length) != null) {
1712
+ const result = [];
1713
+ for (let i = 0; i < childNodes.length; ++i) {
1714
+ const child = childNodes[i];
1715
+ if (isElement(child)) result.push(child);
1716
+ }
1717
+ return result;
1718
+ }
1719
+ return [];
1720
+ }
1654
1721
  };
1655
1722
 
1656
1723
  // src/bind/DirectiveCollector.ts
@@ -1743,10 +1810,10 @@ var Regor = (() => {
1743
1810
  };
1744
1811
  processNode(element);
1745
1812
  if (!isRecursive || !element.firstElementChild) return map;
1746
- const nodes = element.querySelectorAll("*");
1747
- for (const node of nodes) {
1748
- processNode(node);
1749
- }
1813
+ this.__binder.__componentBinder.__forEachBindableDescendant(
1814
+ element,
1815
+ processNode
1816
+ );
1750
1817
  return map;
1751
1818
  }
1752
1819
  };
@@ -1764,17 +1831,19 @@ var Regor = (() => {
1764
1831
  constructor(binder) {
1765
1832
  __publicField(this, "__binder");
1766
1833
  __publicField(this, "__is");
1767
- __publicField(this, "__isSelector");
1768
1834
  this.__binder = binder;
1769
1835
  this.__is = binder.__config.__builtInNames.is;
1770
- this.__isSelector = toSelector(this.__is) + ", [is]";
1771
1836
  }
1772
1837
  __bindAll(element) {
1773
1838
  const isComponentElement = element.hasAttribute(this.__is);
1774
- const elements = findElements(element, this.__isSelector);
1775
- for (const el of elements) {
1776
- this.__bind(el);
1777
- }
1839
+ if (isComponentElement || element.hasAttribute("is"))
1840
+ this.__bind(element);
1841
+ this.__binder.__componentBinder.__forEachBindableDescendant(
1842
+ element,
1843
+ (el) => {
1844
+ if (el.hasAttribute(this.__is) || el.hasAttribute("is")) this.__bind(el);
1845
+ }
1846
+ );
1778
1847
  return isComponentElement;
1779
1848
  }
1780
1849
  __bind(el) {
@@ -2251,10 +2320,13 @@ var Regor = (() => {
2251
2320
  }
2252
2321
  __bindAll(element) {
2253
2322
  const isForElement = element.hasAttribute(this.__for);
2254
- const elements = findElements(element, this.__forSelector);
2255
- for (const el of elements) {
2256
- this.__bindFor(el);
2257
- }
2323
+ if (isForElement) this.__bindFor(element);
2324
+ this.__binder.__componentBinder.__forEachBindableDescendant(
2325
+ element,
2326
+ (el) => {
2327
+ if (el.hasAttribute(this.__for)) this.__bindFor(el);
2328
+ }
2329
+ );
2258
2330
  return isForElement;
2259
2331
  }
2260
2332
  __isProcessedOrMark(el) {
@@ -1,3 +1,3 @@
1
- "use strict";var Regor=(()=>{var ht=Object.defineProperty,Sr=Object.defineProperties,Ar=Object.getOwnPropertyDescriptor,Nr=Object.getOwnPropertyDescriptors,Or=Object.getOwnPropertyNames,Kn=Object.getOwnPropertySymbols;var Wn=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable;var yt=Math.pow,un=(n,e,t)=>e in n?ht(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,gt=(n,e)=>{for(var t in e||(e={}))Wn.call(e,t)&&un(n,t,e[t]);if(Kn)for(var t of Kn(e))Mr.call(e,t)&&un(n,t,e[t]);return n},Gn=(n,e)=>Sr(n,Nr(e));var kr=(n,e)=>{for(var t in e)ht(n,t,{get:e[t],enumerable:!0})},Lr=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Or(e))!Wn.call(n,r)&&r!==t&&ht(n,r,{get:()=>e[r],enumerable:!(o=Ar(e,r))||o.enumerable});return n};var Ir=n=>Lr(ht({},"__esModule",{value:!0}),n);var d=(n,e,t)=>un(n,typeof e!="symbol"?e+"":e,t);var Jn=(n,e,t)=>new Promise((o,r)=>{var s=c=>{try{a(t.next(c))}catch(l){r(l)}},i=c=>{try{a(t.throw(c))}catch(l){r(l)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((t=t.apply(n,e)).next())});var li={};kr(li,{ComponentHead:()=>We,ContextRegistry:()=>cn,RegorConfig:()=>le,addUnbinder:()=>q,batch:()=>wr,collectRefs:()=>It,computeMany:()=>br,computeRef:()=>Tr,computed:()=>gr,createApp:()=>dr,defineComponent:()=>hr,drainUnbind:()=>Xn,endBatch:()=>zn,entangle:()=>Ze,flatten:()=>ae,getBindData:()=>Oe,html:()=>qn,isDeepRef:()=>He,isRaw:()=>et,isRef:()=>E,markRaw:()=>xr,observe:()=>se,observeMany:()=>Rr,observerCount:()=>vr,onMounted:()=>yr,onUnmounted:()=>ne,pause:()=>Jt,persist:()=>Cr,raw:()=>Er,ref:()=>be,removeNode:()=>z,resume:()=>Qt,silence:()=>Lt,sref:()=>ie,startBatch:()=>Fn,toFragment:()=>$e,toJsonTemplate:()=>st,trigger:()=>Y,unbind:()=>de,unref:()=>V,useScope:()=>Ot,warningHandler:()=>at,watchEffect:()=>Ve});var ze=Symbol(":regor");var de=n=>{let e=[n];for(let t=0;t<e.length;++t){let o=e[t];Dr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Dr=n=>{let e=n[ze];if(!e)return;let t=e.unbinders;for(let o=0;o<t.length;++o)t[o]();t.length=0,n[ze]=void 0};var Ke=[],bt=!1,Tt,Qn=()=>{if(bt=!1,Tt=void 0,Ke.length!==0){for(let n=0;n<Ke.length;++n)de(Ke[n]);Ke.length=0}},z=n=>{n.remove(),Ke.push(n),bt||(bt=!0,Tt=setTimeout(Qn,1))},Xn=()=>Jn(null,null,function*(){Ke.length===0&&!bt||(Tt&&clearTimeout(Tt),Qn())});var K=n=>typeof n=="function",W=n=>typeof n=="string",Yn=n=>typeof n=="undefined",fe=n=>n==null||typeof n=="undefined",J=n=>typeof n!="string"||!(n!=null&&n.trim()),Ur=Object.prototype.toString,ln=n=>Ur.call(n),Ae=n=>ln(n)==="[object Map]",ue=n=>ln(n)==="[object Set]",fn=n=>ln(n)==="[object Date]",it=n=>typeof n=="symbol",w=Array.isArray,D=n=>n!==null&&typeof n=="object";var Zn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:n=>`Component template cannot be found. selector: ${n} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:n=>`${n} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},j=(n,...e)=>{let t=Zn[n];return new Error(K(t)?t.call(Zn,...e):t)};var xt=[],eo=()=>{let n={onMounted:[],onUnmounted:[]};return xt.push(n),n},Ue=n=>{let e=xt[xt.length-1];if(!e&&!n)throw j(2);return e},to=n=>{let e=Ue();return n&&mn(n),xt.pop(),e},pn=Symbol("csp"),mn=n=>{let e=n,t=e[pn];if(t){let o=Ue();if(t===o)return;o.onMounted.length>0&&t.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&t.onUnmounted.push(...o.onUnmounted);return}e[pn]=Ue()},Ct=n=>n[pn];var Ne=n=>{var t,o;let e=(t=Ct(n))==null?void 0:t.onUnmounted;e==null||e.forEach(r=>{r()}),(o=n.unmounted)==null||o.call(n)};var We=class{constructor(e,t,o,r,s){d(this,"props");d(this,"start");d(this,"end");d(this,"ctx");d(this,"autoProps",!0);d(this,"entangle",!0);d(this,"enableSwitch",!1);d(this,"onAutoPropsAssigned");d(this,"me");d(this,"emit",(e,t)=>{this.me.dispatchEvent(new CustomEvent(e,{detail:t}))});this.props=e,this.me=t,this.ctx=o,this.start=r,this.end=s}findContext(e,t=0){var r;if(t<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===t)return s;++o}}requireContext(e,t=0){let o=this.findContext(e,t);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${t}.`)}unmount(){let e=this.start.nextSibling,t=this.end;for(;e&&e!==t;)z(e),e=e.nextSibling;for(let o of this.ctx)Ne(o)}};var Oe=n=>{let e=n,t=e[ze];if(t)return t;let o={unbinders:[],data:{}};return e[ze]=o,o};var q=(n,e)=>{Oe(n).unbinders.push(e)};var no={8:n=>`Model binding requires a ref at ${n.outerHTML}`,7:n=>`Model binding is not supported on ${n.tagName} element at ${n.outerHTML}`,0:(n,e)=>`${n} binding expression is missing at ${e.outerHTML}`,1:(n,e,t)=>`invalid ${n} expression: ${e} at ${t.outerHTML}`,2:(n,e)=>`${n} requires object expression at ${e.outerHTML}`,3:(n,e)=>`${n} binder: key is empty on ${e.outerHTML}.`,4:(n,e,t,o)=>({msg:`Failed setting prop "${n}" on <${e.toLowerCase()}>: value ${t} is invalid.`,args:[o]}),5:(n,e)=>`${n} binding missing event type at ${e.outerHTML}`,6:(n,e)=>({msg:n,args:[e]})},H=(n,...e)=>{let t=no[n],o=K(t)?t.call(no,...e):t,r=at.warning;r&&(W(o)?r(o):r(o,...o.args))},at={warning:console.warn};var Rt={},Et={},oo=1,ro=n=>{let e=(oo++).toString();return Rt[e]=n,Et[e]=0,e},dn=n=>{Et[n]+=1},hn=n=>{--Et[n]===0&&(delete Rt[n],delete Et[n])},so=n=>Rt[n],yn=()=>oo!==1&&Object.keys(Rt).length>0,ct="r-switch",Br=n=>{let e=n.filter(o=>Be(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(ct))),t=new Set;return e.forEach(o=>{o.forEach(r=>r&&t.add(r))}),[...t]},Ge=(n,e)=>{if(!yn())return;let t=Br(e);t.length!==0&&(t.forEach(dn),q(n,()=>{t.forEach(hn)}))};var vt=()=>{},gn=(n,e,t,o)=>{let r=[];for(let s of n){let i=s.cloneNode(!0);t.insertBefore(i,o),r.push(i)}ke(e,r)},bn=Symbol("r-if"),io=Symbol("r-else"),ao=n=>n[io]===1,wt=class{constructor(e){d(this,"i");d(this,"D");d(this,"K");d(this,"z");d(this,"W");d(this,"T");d(this,"R");this.i=e,this.D=e.o.u.if,this.K=Qe(e.o.u.if),this.z=e.o.u.else,this.W=e.o.u.elseif,this.T=e.o.u.for,this.R=e.o.u.pre}Ze(e,t){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(t))return!0;o=o.parentElement}return!1}N(e){let t=e.hasAttribute(this.D),o=Me(e,this.K);for(let r of o)this.b(r);return t}G(e){return e[bn]?!0:(e[bn]=!0,Me(e,this.K).forEach(t=>t[bn]=!0),!1)}b(e){if(e.hasAttribute(this.R)||this.G(e)||this.Ze(e,this.T))return;let t=e.getAttribute(this.D);if(!t){H(0,this.D,e);return}e.removeAttribute(this.D),this.O(e,t)}U(e,t,o){let r=Je(e),s=e.parentNode,i=document.createComment(`__begin__ :${t}${o!=null?o:""}`);s.insertBefore(i,e),Ge(i,r),r.forEach(c=>{z(c)}),e.remove(),t!=="if"&&(e[io]=1);let a=document.createComment(`__end__ :${t}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}de(e,t){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{gn(r,this.i,s,a)},unmount:()=>{Ce(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.W);if(!r)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.i.m.k(r),u=l.value,f=this.de(o,t),p=vt;return q(a,()=>{l.stop(),p(),p=vt}),p=l.subscribe(t),[{mount:()=>{gn(s,this.i,i,c)},unmount:()=>{Ce(a,c)},isTrue:()=>!!u()[0],isMounted:!1},...f]}}O(e,t){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${t} `),c=this.i.m.k(t),l=c.value,u=!1,f=this.i.m,p=f.M(),m=()=>{f.C(p,()=>{if(l()[0])u||(gn(r,this.i,s,a),u=!0),y.forEach(g=>{g.unmount(),g.isMounted=!1});else{Ce(i,a),u=!1;let g=!1;for(let C of y)!g&&C.isTrue()?(C.isMounted||(C.mount(),C.isMounted=!0),g=!0):(C.unmount(),C.isMounted=!1)}})},y=this.de(o,m),h=vt;q(i,()=>{c.stop(),h(),h=vt}),m(),h=c.subscribe(m)}};var Je=n=>{let e=ye(n)?n.content.childNodes:[n],t=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}t.push(r)}return t},ke=(n,e)=>{for(let t=0;t<e.length;++t){let o=e[t];o.nodeType===Node.ELEMENT_NODE&&(ao(o)||n.H(o))}},Me=(n,e)=>{var o;let t=n.querySelectorAll(e);return(o=n.matches)!=null&&o.call(n,e)?[n,...t]:t},ye=n=>n instanceof HTMLTemplateElement,Be=n=>n.nodeType===Node.ELEMENT_NODE,ut=n=>n.nodeType===Node.ELEMENT_NODE,co=n=>n instanceof HTMLSlotElement,Ee=n=>ye(n)?n.content.childNodes:n.childNodes,Ce=(n,e)=>{let t=n.nextSibling;for(;t!=null&&t!==e;){let o=t.nextSibling;z(t),t=o}},uo=function(){return this()},Pr=function(n){return this(n)},Hr=()=>{throw new Error("value is readonly.")},Vr={get:uo,set:Pr,enumerable:!0,configurable:!1},_r={get:uo,set:Hr,enumerable:!0,configurable:!1},Le=(n,e)=>{Object.defineProperty(n,"value",e?_r:Vr)},lo=(n,e)=>{if(!n)return!1;if(n.startsWith("["))return n.substring(1,n.length-1);let t=e.length;return n.startsWith(e)?n.substring(t,n.length-t):!1},Qe=n=>`[${CSS.escape(n)}]`,St=(n,e)=>(n.startsWith("@")&&(n=e.u.on+":"+n.slice(1)),n.includes("[")&&(n=n.replace(/[[\]]/g,e.u.dynamic)),n),Tn=n=>{let e=Object.create(null);return t=>e[t]||(e[t]=n(t))},jr=/-(\w)/g,$=Tn(n=>n&&n.replace(jr,(e,t)=>t?t.toUpperCase():"")),$r=/\B([A-Z])/g,Xe=Tn(n=>n&&n.replace($r,"-$1").toLowerCase()),lt=Tn(n=>n&&n.charAt(0).toUpperCase()+n.slice(1));var At={mount:()=>{}};var Ye=n=>{let e=n.trim();return e?e.split(/\s+/):[]};var Nt=n=>{var t,o;let e=(t=Ct(n))==null?void 0:t.onMounted;e==null||e.forEach(r=>{r()}),(o=n.mounted)==null||o.call(n)};var xn=Symbol("scope"),Ot=n=>{try{eo();let e=n();mn(e);let t={context:e,unmount:()=>Ne(e),[xn]:1};return t[xn]=1,t}finally{to()}},fo=n=>D(n)?xn in n:!1;var Mt=Symbol("ref"),Z=Symbol("sref"),kt=Symbol("raw");var E=n=>n!=null&&n[Z]===1;var Cn={collectRefObj:!0,mount:({parseResult:n})=>({update:({values:e})=>{let t=n.context,o=e[0];if(D(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=t[s];a!==i&&(E(a)?a(i):t[s]=i)}}})};var ne=(n,e)=>{var t;(t=Ue(e))==null||t.onUnmounted.push(n)};var se=(n,e,t,o=!0)=>{if(!E(n))throw j(3,"observe");t&&e(n());let s=n(void 0,void 0,0,e);return o&&ne(s,!0),s};var Ze=(n,e)=>{if(n===e)return()=>{};let t=se(n,r=>e(r)),o=se(e,r=>n(r));return e(n()),()=>{t(),o()}};var et=n=>!!n&&n[kt]===1;var He=n=>(n==null?void 0:n[Mt])===1;var pe=[],po=n=>{var e;pe.length!==0&&((e=pe[pe.length-1])==null||e.add(n))},Ve=n=>{if(!n)return()=>{};let e={stop:()=>{}};return qr(n,e),ne(()=>e.stop(),!0),e.stop},qr=(n,e)=>{if(!n)return;let t=[],o=!1,r=()=>{for(let s of t)s();t=[],o=!0};e.stop=r;try{let s=new Set;if(pe.push(s),n(i=>t.push(i)),o)return;for(let i of[...s]){let a=se(i,()=>{r(),Ve(n)});t.push(a)}}finally{pe.pop()}},Lt=n=>{let e=pe.length,t=e>0&&pe[e-1];try{return t&&pe.push(null),n()}finally{t&&pe.pop()}},It=n=>{try{let e=new Set;return pe.push(e),{value:n(),refs:[...e]}}finally{pe.pop()}};var Y=(n,e,t)=>{if(!E(n))return;let o=n;if(o(void 0,e,1),!t)return;let r=o();if(r){if(w(r)||ue(r))for(let s of r)Y(s,e,!0);else if(Ae(r))for(let s of r)Y(s[0],e,!0),Y(s[1],e,!0);if(D(r))for(let s in r)Y(r[s],e,!0)}};function Fr(n,e,t){Object.defineProperty(n,e,{value:t,enumerable:!1,writable:!0,configurable:!0})}var tt=(n,e,t)=>{t.forEach(function(o){let r=n[o];Fr(e,o,function(...i){let a=r.apply(this,i),c=this[Z];for(let l of c)Y(l);return a})})},Dt=(n,e)=>{Object.defineProperty(n,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var mo=Array.prototype,En=Object.create(mo),zr=["push","pop","shift","unshift","splice","sort","reverse"];tt(mo,En,zr);var ho=Map.prototype,Ut=Object.create(ho),Kr=["set","clear","delete"];Dt(Ut,"Map");tt(ho,Ut,Kr);var yo=Set.prototype,Bt=Object.create(yo),Wr=["add","clear","delete"];Dt(Bt,"Set");tt(yo,Bt,Wr);var ge={},ie=n=>{if(E(n)||et(n))return n;let e={auto:!0,_value:n},t=c=>D(c)?Z in c?!0:w(c)?(Object.setPrototypeOf(c,En),!0):ue(c)?(Object.setPrototypeOf(c,Bt),!0):Ae(c)?(Object.setPrototypeOf(c,Ut),!0):!1:!1,o=t(n),r=new Set,s=(c,l)=>{if(ge.stack&&ge.stack.length){ge.stack[ge.stack.length-1].add(a);return}r.size!==0&&Lt(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},i=c=>{let l=c[Z];l||(c[Z]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||E(u)&&(u=u(),e._value===u)?u:(t(u)&&i(u),e._value=u,e.auto&&s(u,f),e._value):(po(a),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 a[Z]=1,Le(a,!1),o&&i(n),a};var be=n=>{if(et(n))return n;let e;if(E(n)?(e=n,n=e()):e=ie(n),n instanceof Node||n instanceof Date||n instanceof RegExp||n instanceof Promise||n instanceof Error)return e;if(e[Mt]=1,w(n)){let t=n.length;for(let o=0;o<t;++o){let r=n[o];He(r)||(n[o]=be(r))}return e}if(!D(n))return e;for(let t of Object.entries(n)){let o=t[1];if(He(o))continue;let r=t[0];it(r)||(n[r]=null,n[r]=be(o))}return e};var go=Symbol("modelBridge"),Pt=()=>{},Gr=n=>!!(n!=null&&n[go]),Jr=n=>{n[go]=1},Qr=n=>{let e=be(n());return Jr(e),e},bo={collectRefObj:!0,mount:({parseResult:n,option:e})=>{if(typeof e!="string"||!e)return Pt;let t=$(e),o,r,s=Pt,i=()=>{s(),s=Pt,o=void 0,r=void 0},a=()=>{s(),s=Pt},c=(u,f)=>{o!==u&&(a(),s=Ze(u,f),o=u)},l=()=>{var m;let u=(m=n.refs[0])!=null?m:n.value()[0],f=n.context,p=f[t];if(!E(u)){if(r&&p===r){r(u);return}if(i(),E(p)){p(u);return}f[t]=u;return}if(Gr(u)){if(p===u)return;E(p)?c(u,p):f[t]=u;return}r||(r=Qr(u)),f[t]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Ht=class{constructor(e){d(this,"i");d(this,"ye");d(this,"he","");d(this,"ge",-1);this.i=e,this.ye=e.o.u.inherit}N(e){this.et(e)}tt(e){if(this.ge!==e.size){let t=[...e.keys()];this.he=[...t,...t.map(Xe)].join(","),this.ge=e.size}return this.he}nt(e){var t;for(let o=0;o<e.length;++o){let r=(t=e[o])==null?void 0:t.components;if(r)for(let s in r)return!0}return!1}et(e){var p;let t=this.i,o=t.m,r=t.o.be,s=t.o.j;if(r.size===0&&!this.nt(o.l))return;let i=o.J(),a=o.ot(),c=this.tt(r),l=[...c?[c]:[],...a,...a.map(Xe)].join(",");if(J(l))return;let u=e.querySelectorAll(l),f=(p=e.matches)!=null&&p.call(e,l)?[e,...u]:u;for(let m of f){if(m.hasAttribute(t.R))continue;let y=m.parentNode;if(!y)continue;let h=m.nextSibling,R=$(m.tagName).toUpperCase(),g=i[R],C=g!=null?g:s.get(R);if(!C)continue;let U=C.template;if(!U)continue;let G=m.parentElement;if(!G)continue;let L=new Comment(" begin component: "+m.tagName),_=new Comment(" end component: "+m.tagName);G.insertBefore(L,m),m.remove();let ce=t.o.u.context,ee=t.o.u.contextAlias,B=t.o.u.bind,b=(x,T)=>{let v={},F=x.hasAttribute(ce);return o.C(T,()=>{o.v(v),F?t.b(Cn,x,ce):x.hasAttribute(ee)&&t.b(Cn,x,ee);let k=C.props;if(!k||k.length===0)return;k=k.map($);let S=new Map(k.map(A=>[A.toLowerCase(),A]));for(let A of[...k,...k.map(Xe)]){let P=x.getAttribute(A);P!==null&&(v[$(A)]=P,x.removeAttribute(A))}let M=t._.xe(x,!1);for(let[A,P]of M.entries()){let[re,De]=P.Q;if(!De)continue;let Fe=S.get($(De).toLowerCase());Fe&&(re!=="."&&re!==":"&&re!==B||t.b(bo,x,A,!0,Fe,P.X))}}),v},N=[...o.M()],Q=()=>{var F;let x=b(m,N),T=new We(x,m,N,L,_),v=Ot(()=>{var k;return(k=C.context(T))!=null?k:{}}).context;if(T.autoProps){for(let[k,S]of Object.entries(x))if(k in v){let M=v[k];if(M===S)continue;if(E(M)){E(S)?T.entangle?q(L,Ze(S,M)):M(S()):M(S);continue}}else v[k]=S;(F=T.onAutoPropsAssigned)==null||F.call(T)}return{componentCtx:v,head:T}},{componentCtx:me,head:qe}=Q(),Te=[...Ee(U)],I=Te.length,dt=m.childNodes.length===0,O=x=>{let T=x.parentElement,v=x.name;if(J(v)&&(v=x.getAttributeNames().filter(S=>S.startsWith("#"))[0],J(v)?v="default":v=v.substring(1)),dt){if(v==="default"){let S=t.o.u.text,M=m.getAttribute(S);if(!J(M)){let A=document.createElement("span");A.setAttribute(S,M),T.insertBefore(A,x),m.removeAttribute(S);return}}for(let S of[...x.childNodes])T.insertBefore(S,x);return}let F=m.querySelector(`template[name='${v}'], template[\\#${v}]`);!F&&v==="default"&&(F=m.querySelector("template:not([name])"),F&&F.getAttributeNames().filter(S=>S.startsWith("#")).length>0&&(F=null));let k=S=>{qe.enableSwitch&&o.C(N,()=>{o.v(me);let M=b(x,o.M());o.C(N,()=>{o.v(M);let A=o.M(),P=ro(A);for(let re of S)Be(re)&&(re.setAttribute(ct,P),dn(P),q(re,()=>{hn(P)}))})})};if(F){let S=[...Ee(F)];for(let M of S)T.insertBefore(M,x);k(S)}else{if(v!=="default"){for(let M of[...Ee(x)])T.insertBefore(M,x);return}let S=[...Ee(m)].filter(M=>!ye(M));for(let M of S)T.insertBefore(M,x);k(S)}},X=x=>{if(!Be(x))return;let T=x.querySelectorAll("slot");if(co(x)){O(x),x.remove();return}for(let v of T)O(v),v.remove()};(()=>{for(let x=0;x<I;++x)Te[x]=Te[x].cloneNode(!0),y.insertBefore(Te[x],h),X(Te[x])})(),G.insertBefore(_,h);let te=()=>{if(!C.inheritAttrs)return;let x=Te.filter(v=>v.nodeType===Node.ELEMENT_NODE);x.length>1&&(x=x.filter(v=>v.hasAttribute(this.ye)));let T=x[0];if(T)for(let v of m.getAttributeNames()){if(v===ce||v===ee)continue;let F=m.getAttribute(v);if(v==="class"){let k=Ye(F);k.length>0&&T.classList.add(...k)}else if(v==="style"){let k=T.style,S=m.style;for(let M of S)k.setProperty(M,S.getPropertyValue(M))}else T.setAttribute(St(v,t.o),F)}},xe=()=>{for(let x of m.getAttributeNames())!x.startsWith("@")&&!x.startsWith(t.o.u.on)&&m.removeAttribute(x)},Se=()=>{te(),xe(),o.v(me),t.Te(m,!1),me.$emit=qe.emit,ke(t,Te),q(m,()=>{Ne(me)}),q(L,()=>{de(m)}),Nt(me)};o.C(N,Se)}}};var Rn=class{constructor(e,t){d(this,"Q");d(this,"X");d(this,"Re",[]);this.Q=e,this.X=t}},Vt=class{constructor(e){d(this,"i");d(this,"Ce");d(this,"Ee");d(this,"Y");var o;this.i=e,this.Ce=e.o.rt(),this.Y=new Map;let t=new Map;for(let r of this.Ce){let s=(o=r[0])!=null?o:"",i=t.get(s);i?i.push(r):t.set(s,[r])}this.Ee=t}ve(e){let t=this.Y.get(e);if(t)return t;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);J(a[0])&&(a[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 m=c[p];if(!l&&m==="camel"?l=!0:!u&&m==="prop"&&(u=!0),l&&u)break}l&&(a[a.length-1]=$(a[a.length-1])),u&&(a[0]=".");let f={terms:a,flags:c};return this.Y.set(e,f),f}xe(e,t){let o=new Map;if(!ut(e))return o;let r=this.Ee,s=(c,l)=>{var f;let u=r.get((f=l[0])!=null?f:"");if(u)for(let p=0;p<u.length;++p){if(!l.startsWith(u[p]))continue;let m=o.get(l);if(!m){let y=this.ve(l);m=new Rn(y.terms,y.flags),o.set(l,m)}m.Re.push(c);return}},i=c=>{var u;let l=c.attributes;if(!(!l||l.length===0))for(let f=0;f<l.length;++f){let p=(u=l.item(f))==null?void 0:u.name;p&&s(c,p)}};if(i(e),!t||!e.firstElementChild)return o;let a=e.querySelectorAll("*");for(let c of a)i(c);return o}};var To=()=>{},Xr=(n,e)=>{for(let t of n){let o=t.cloneNode(!0);e.appendChild(o)}},_t=class{constructor(e){d(this,"i");d(this,"L");d(this,"we");this.i=e,this.L=e.o.u.is,this.we=Qe(this.L)+", [is]"}N(e){let t=e.hasAttribute(this.L),o=Me(e,this.we);for(let r of o)this.b(r);return t}b(e){let t=e.getAttribute(this.L);if(!t){if(t=e.getAttribute("is"),!t)return;if(!t.startsWith("regor:")){if(!t.startsWith("r-"))return;let o=t.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.i.H(s);return}t=`'${t.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.L),this.O(e,t)}U(e,t){let o=Je(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${t!=null?t:""}`);r.insertBefore(s,e),Ge(s,o),o.forEach(a=>{z(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${t!=null?t:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}O(e,t){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${t} `),a=this.i.m.k(t),c=a.value,l=this.i.m,u=l.M(),f={name:""},p=ye(e)?o:[...o[0].childNodes],m=()=>{l.C(u,()=>{var C;let R=c()[0];if(D(R)&&(R.name?R=R.name:R=(C=Object.entries(l.J()).filter(U=>U[1]===R)[0])==null?void 0:C[0]),!W(R)||J(R)){Ce(s,i);return}if(f.name===R)return;Ce(s,i);let g=document.createElement(R);for(let U of e.getAttributeNames())U!==this.L&&g.setAttribute(U,e.getAttribute(U));Xr(p,g),r.insertBefore(g,i),this.i.H(g),f.name=R})},y=To;q(s,()=>{a.stop(),y(),y=To}),m(),y=a.subscribe(m)}};var V=n=>{let e=n;return e!=null&&e[Z]===1?e():e};var Yr=(n,e)=>{let[t,o]=e;K(o)?o(n,t):n.innerHTML=t==null?void 0:t.toString()},jt={mount:()=>({update:({el:n,values:e})=>{Yr(n,e)}})};var $t=class n{constructor(e){d(this,"Z");this.Z=e}static st(e,t){var m,y;let o=e.m,r=e.o,s=r.u,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.P,c=o.J();if(Object.keys(c).length>0||r.j.size>0)return;let l=e._,u=[],f=0,p=[];for(let h=t.length-1;h>=0;--h)p.push(t[h]);for(;p.length>0;){let h=p.pop();if(h.nodeType===Node.ELEMENT_NODE){let g=h;if(g.tagName==="TEMPLATE"||g.tagName.includes("-"))return;let C=$(g.tagName).toUpperCase();if(r.j.has(C)||c[C])return;let U=g.attributes;for(let G=0;G<U.length;++G){let L=(m=U.item(G))==null?void 0:m.name;if(!L)continue;if(i.has(L))return;let{terms:_,flags:ce}=l.ve(L),[ee,B]=_,b=(y=a[L])!=null?y:a[ee];if(b){if(b===jt)return;u.push({nodeIndex:f,attrName:L,directive:b,option:B,flags:ce})}}++f}let R=h.childNodes;for(let g=R.length-1;g>=0;--g)p.push(R[g])}if(u.length!==0)return new n(u)}b(e,t){let o=[],r=[];for(let s=t.length-1;s>=0;--s)r.push(t[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.Z.length;++s){let i=this.Z[s],a=o[i.nodeIndex];a&&e.b(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var Zr=(n,e)=>{let t=e.parentNode;if(t)for(let o=0;o<n.items.length;++o)t.insertBefore(n.items[o],e)},es=n=>{var a;let e=n.length,t=n.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=n[c];if(l===0)continue;let u=o[o.length-1];if(u===void 0||n[u]<l){t[c]=u!=null?u:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,n[o[i]]<l?r=i+1:s=i;l<n[o[r]]&&(r>0&&(t[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=t[s];return o},qt=class{static it(e){let{oldItems:t,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=t.length,u=o.length,f=new Array(u),p=new Set;for(let b=0;b<u;++b){let N=r(o[b]);if(N===void 0||p.has(N))return;p.add(N),f[b]=N}let m=new Array(u),y=0,h=l-1,R=u-1;for(;y<=h&&y<=R;){let b=t[y];if(r(b.value)!==f[y]||!s(b.value,o[y]))break;b.value=o[y],m[y]=b,++y}for(;y<=h&&y<=R;){let b=t[h];if(r(b.value)!==f[R]||!s(b.value,o[R]))break;b.value=o[R],m[R]=b,--h,--R}if(y>h){for(let b=R;b>=y;--b){let N=b+1<u?m[b+1].items[0]:c;m[b]=i(b,o[b],N)}return m}if(y>R){for(let b=y;b<=h;++b)a(t[b]);return m}let g=y,C=y,U=R-C+1,G=new Array(U).fill(0),L=new Map;for(let b=C;b<=R;++b)L.set(f[b],b);let _=!1,ce=0;for(let b=g;b<=h;++b){let N=t[b],Q=L.get(r(N.value));if(Q===void 0){a(N);continue}if(!s(N.value,o[Q])){a(N);continue}N.value=o[Q],m[Q]=N,G[Q-C]=b+1,Q>=ce?ce=Q:_=!0}let ee=_?es(G):[],B=ee.length-1;for(let b=U-1;b>=0;--b){let N=C+b,Q=N+1<u?m[N+1].items[0]:c;if(G[b]===0){m[N]=i(N,o[N],Q);continue}let me=m[N];_&&(B>=0&&ee[B]===b?--B:me&&Zr(me,Q))}return m}};var ft=class{constructor(e){d(this,"x",[]);d(this,"V",new Map);d(this,"ee");this.ee=e}get w(){return this.x.length}te(e){let t=this.ee(e.value);t!==void 0&&this.V.set(t,e)}ne(e){var o;let t=this.ee((o=this.x[e])==null?void 0:o.value);t!==void 0&&this.V.delete(t)}static at(e,t){return{items:[],index:e,value:t,order:-1}}v(e){e.order=this.w,this.x.push(e),this.te(e)}ct(e,t){let o=this.w;for(let r=e;r<o;++r)this.x[r].order=r+1;t.order=e,this.x.splice(e,0,t),this.te(t)}I(e){return this.x[e]}oe(e,t){this.ne(e),this.x[e]=t,this.te(t),t.order=e}Se(e){this.ne(e),this.x.splice(e,1);let t=this.w;for(let o=e;o<t;++o)this.x[o].order=o}Ae(e){let t=this.w;for(let o=e;o<t;++o)this.ne(o);this.x.splice(e)}Gt(e){return this.V.has(e)}ut(e){var o;let t=this.V.get(e);return(o=t==null?void 0:t.order)!=null?o:-1}};var vn=Symbol("r-for"),ts=n=>-1,xo=()=>{},zt=class zt{constructor(e){d(this,"i");d(this,"T");d(this,"re");d(this,"R");this.i=e,this.T=e.o.u.for,this.re=Qe(this.T),this.R=e.o.u.pre}N(e){let t=e.hasAttribute(this.T),o=Me(e,this.re);for(let r of o)this.pt(r);return t}G(e){return e[vn]?!0:(e[vn]=!0,Me(e,this.re).forEach(t=>t[vn]=!0),!1)}pt(e){if(e.hasAttribute(this.R)||this.G(e))return;let t=e.getAttribute(this.T);if(!t){H(0,this.T,e);return}e.removeAttribute(this.T),this.lt(e,t)}Ne(e){return fe(e)?[]:(K(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))}lt(e,t){var dt;let o=this.ft(t);if(!(o!=null&&o.list)){H(1,this.T,t,e);return}let r=this.i.o.u.key,s=this.i.o.u.keyBind,i=(dt=e.getAttribute(r))!=null?dt:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=Je(e),c=$t.st(this.i,a),l=e.parentNode;if(!l)return;let u=`${this.T} => ${t}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),Ge(f,a),a.forEach(O=>{z(O)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let m=this.i,y=m.m,h=y.M(),g=h.length===1?[void 0,h[0]]:void 0,C=this.mt(i),U=(O,X)=>C(O)===C(X),G=(O,X)=>O===X,L=(O,X,oe)=>{let te=o.createContext(X,O),xe=ft.at(te.index,X),Se=()=>{var F,k;let x=(k=(F=p.parentNode)!=null?F:f.parentNode)!=null?k:l,T=oe.previousSibling,v=[];for(let S=0;S<a.length;++S){let M=a[S].cloneNode(!0);x.insertBefore(M,oe),v.push(M)}for(c?c.b(m,v):ke(m,v),T=T.nextSibling;T!==oe;)xe.items.push(T),T=T.nextSibling};return g?(g[0]=te.ctx,y.C(g,Se)):y.C(h,()=>{y.v(te.ctx),Se()}),xe},_=(O,X)=>{let oe=I.I(O).items,te=oe[oe.length-1].nextSibling;for(let xe of oe)z(xe);I.oe(O,L(O,X,te))},ce=(O,X)=>{I.v(L(O,X,p))},ee=O=>{for(let X of I.I(O).items)z(X)},B=O=>{let X=I.w;for(let oe=O;oe<X;++oe)I.I(oe).index(oe)},b=O=>{let X=f.parentNode,oe=p.parentNode;if(!X||!oe)return;let te=I.w;K(O)&&(O=O());let xe=V(O[0]);if(w(xe)&&xe.length===0){Ce(f,p),I.Ae(0);return}let Se=[];for(let A of this.Ne(O[0]))Se.push(A);let x=qt.it({oldItems:I.x,newValues:Se,getKey:C,isSameValue:G,mountNewValue:(A,P,re)=>L(A,P,re),removeMountItem:A=>{for(let P=0;P<A.items.length;++P)z(A.items[P])},endAnchor:p});if(x){I.x=x,I.V.clear();for(let A=0;A<x.length;++A){let P=x[A];P.order=A,P.index(A);let re=C(P.value);re!==void 0&&I.V.set(re,P)}return}let T=0,v=Number.MAX_SAFE_INTEGER,F=te,k=this.i.o.forGrowThreshold,S=()=>I.w<F+k;for(let A of Se){let P=()=>{if(T<te){let re=I.I(T++);if(U(re.value,A)){if(G(re.value,A))return;_(T-1,A);return}let De=I.ut(C(A));if(De>=T&&De-T<10){if(--T,v=Math.min(v,T),ee(T),I.Se(T),--te,De>T+1)for(let Fe=T;Fe<De-1&&Fe<te&&!U(I.I(T).value,A);)++Fe,ee(T),I.Se(T),--te;P();return}S()?(I.ct(T-1,L(T,A,I.I(T-1).items[0])),v=Math.min(v,T-1),++te):_(T-1,A)}else ce(T++,A)};P()}let M=T;for(te=I.w;T<te;)ee(T++);I.Ae(M),B(v)},N=()=>{Q.stop(),qe(),qe=xo},Q=y.k(o.list),me=Q.value,qe=xo,Te=0,I=new ft(C);for(let O of this.Ne(me()[0]))I.v(L(Te++,O,p));q(f,N),qe=Q.subscribe(b)}ft(e){var c,l;let t=zt.dt.exec(e);if(!t)return;let o=(t[1]+((c=t[2])!=null?c:"")).split(",").map(u=>u.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=t[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,f)=>{let p={},m=V(u);if(!a&&o.length===1)p[o[0]]=u;else if(w(m)){let h=0;for(let R of o)p[R]=m[h++]}else for(let h of o)p[h]=m[h];let y={ctx:p,index:ts};return s&&(y.index=p[s.startsWith("#")?s.substring(1):s]=ie(f)),y}}}mt(e){if(!e)return o=>o;let t=e.trim();if(!t)return o=>o;if(t.includes(".")){let o=this.yt(t),r=o.length>1?o.slice(1):void 0;return s=>{let i=V(s),a=this.Oe(i,o);return a!==void 0||!r?a:this.Oe(i,r)}}return o=>{var r;return V((r=V(o))==null?void 0:r[t])}}yt(e){return e.split(".").filter(t=>t.length>0)}Oe(e,t){var r;let o=e;for(let s of t)o=(r=V(o))==null?void 0:r[s];return V(o)}};d(zt,"dt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Ft=zt;var Kt=class{constructor(e){d(this,"se",0);d(this,"ie",new Map);d(this,"m");d(this,"ke");d(this,"Me");d(this,"Le");d(this,"Ve");d(this,"_");d(this,"o");d(this,"R");d(this,"Ie");this.m=e,this.o=e.o,this.Me=new Ft(this),this.ke=new wt(this),this.Le=new _t(this),this.Ve=new Ht(this),this._=new Vt(this),this.R=this.o.u.pre,this.Ie=this.o.u.dynamic}ht(e){let t=ye(e)?[e]:e.querySelectorAll("template");for(let o of t){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);ke(this,i)}}H(e){++this.se;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.ke.N(e)||this.Me.N(e)||this.Le.N(e))return;this.Ve.N(e),this.ht(e),this.Te(e,!0)}finally{--this.se,this.se===0&&this.gt()}}bt(e,t){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(t)}De(e,t){let o=this.bt(e,t);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${t}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,q(s,()=>{z(e)}),o.appendChild(e),!0}xt(e,t){this.ie.set(e,t)}gt(){let e=this.ie;if(e.size!==0){this.ie=new Map;for(let[t,o]of e.entries())this.De(t,o)}}Te(e,t){var s;let o=this._.xe(e,t),r=this.o.P;for(let[i,a]of o.entries()){let[c,l]=a.Q,u=(s=r[i])!=null?s:r[c];if(!u){console.error("directive not found:",c);continue}let f=a.Re;for(let p=0;p<f.length;++p){let m=f[p];this.b(u,m,i,!1,l,a.X)}}}b(e,t,o,r,s,i){if(t.hasAttribute(this.R))return;let a=t.getAttribute(o);t.removeAttribute(o);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(ct);if(f)return f;u=u.parentElement}return null};if(yn()){let l=c(t);if(l){this.m.C(so(l),()=>{this.O(e,t,a,s,i)});return}}this.O(e,t,a,s,i)}Tt(e,t,o){return e!==At?!1:(J(o)||this.De(t,o)||this.xt(t,o),!0)}O(e,t,o,r,s){if(t.nodeType!==Node.ELEMENT_NODE||o==null||this.Tt(e,t,o))return;let i=this.Rt(r,e.once),a=this.Ct(e,o),c=this.Et(a,i);q(t,c.stop);let l=this.vt(t,o,a,i,r,s),u=this.wt(e,l,c);if(!u)return;let f=this.St(l,a,i,r,u);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}Rt(e,t){let o=lo(e,this.Ie);if(o)return this.m.k($(o),void 0,void 0,void 0,t)}Ct(e,t){return this.m.k(t,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Et(e,t){let o={stop:()=>{var r,s,i;e.stop(),t==null||t.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}vt(e,t,o,r,s,i){return{el:e,expr:t,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}wt(e,t,o){let r=e.mount(t);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}St(e,t,o,r,s){let i,a;return()=>{let c=t.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var Co="http://www.w3.org/1999/xlink",ns={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 os(n){return!!n||n===""}var rs=(n,e,t,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=$(o)),Wt(n,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let u=(a=t==null?void 0:t[c])==null?void 0:a[0],f=l[0],p=l[1];Wt(n,f,p,u)}else if(D(l))for(let u of Object.entries(l)){let f=u[0],p=u[1],m=t==null?void 0:t[c],y=m&&f in m?f:void 0;Wt(n,f,p,y)}else{let u=t==null?void 0:t[c],f=e[c++],p=e[c];Wt(n,f,p,u)}}},wn={mount:()=>({update:({el:n,values:e,previousValues:t,option:o,previousOption:r,flags:s})=>{rs(n,e,t,o,r,s)}})},Wt=(n,e,t,o)=>{if(o&&o!==e&&n.removeAttribute(o),fe(e)){H(3,"r-bind",n);return}if(!W(e)){H(6,`Attribute key is not string at ${n.outerHTML}`,e);return}if(e.startsWith("xlink:")){fe(t)?n.removeAttributeNS(Co,e.slice(6,e.length)):n.setAttributeNS(Co,e,t);return}let r=e in ns;fe(t)||r&&!os(t)?n.removeAttribute(e):n.setAttribute(e,r?"":t)};var ss=(n,e,t)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=t==null?void 0:t[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Eo(n,s[c],i==null?void 0:i[c])}else Eo(n,s,i)}},Sn={mount:()=>({update:({el:n,values:e,previousValues:t})=>{ss(n,e,t)}})},Eo=(n,e,t)=>{let o=n.classList,r=W(e),s=W(t);if(e&&!r){if(t&&!s)for(let i in t)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else if(r){if(t!==e){let i=s?Ye(t):[],a=Ye(e);i.length>0&&o.remove(...i),a.length>0&&o.add(...a)}}else if(t){let i=s?Ye(t):[];i.length>0&&o.remove(...i)}};function is(n,e){if(n.length!==e.length)return!1;let t=!0;for(let o=0;t&&o<n.length;o++)t=Re(n[o],e[o]);return t}function Re(n,e){if(n===e)return!0;let t=fn(n),o=fn(e);if(t||o)return t&&o?n.getTime()===e.getTime():!1;if(t=it(n),o=it(e),t||o)return n===e;if(t=w(n),o=w(e),t||o)return t&&o?is(n,e):!1;if(t=D(n),o=D(e),t||o){if(!t||!o)return!1;let r=Object.keys(n).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in n){let a=Object.prototype.hasOwnProperty.call(n,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Re(n[i],e[i]))return!1}return!0}return String(n)===String(e)}function Gt(n,e){return n.findIndex(t=>Re(t,e))}var Ro=n=>{let e=parseFloat(n);return isNaN(e)?n:e};var Jt=n=>{if(!E(n))throw j(3,"pause");n(void 0,void 0,3)};var Qt=n=>{if(!E(n))throw j(3,"resume");n(void 0,void 0,4)};var wo={mount:({el:n,parseResult:e,flags:t})=>({update:({values:o})=>{as(n,o[0])},unmount:cs(n,e,t)})},as=(n,e)=>{let t=Oo(n);if(t&&So(n))w(e)?e=Gt(e,ve(n))>-1:ue(e)?e=e.has(ve(n)):e=ds(n,e),n.checked=e;else if(t&&Ao(n))n.checked=Re(e,ve(n));else if(t||Mo(n))No(n)?n.value!==(e==null?void 0:e.toString())&&(n.value=e):n.value!==e&&(n.value=e);else if(ko(n)){let o=n.options,r=o.length,s=n.multiple;for(let i=0;i<r;i++){let a=o[i],c=ve(a);if(s)w(e)?a.selected=Gt(e,c)>-1:a.selected=e.has(c);else if(Re(ve(a),e)){n.selectedIndex!==i&&(n.selectedIndex=i);return}}!s&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}else H(7,n)},pt=n=>(E(n)&&(n=n()),K(n)&&(n=n()),n?W(n)?{trim:n.includes("trim"),lazy:n.includes("lazy"),number:n.includes("number"),int:n.includes("int")}:{trim:!!n.trim,lazy:!!n.lazy,number:!!n.number,int:!!n.int}:{trim:!1,lazy:!1,number:!1,int:!1}),So=n=>n.type==="checkbox",Ao=n=>n.type==="radio",No=n=>n.type==="number"||n.type==="range",Oo=n=>n.tagName==="INPUT",Mo=n=>n.tagName==="TEXTAREA",ko=n=>n.tagName==="SELECT",cs=(n,e,t)=>{let o=e.value,r=pt(t==null?void 0:t.join(",")),s=pt(o()[1]),i={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 H(8,n),()=>{};let a=()=>e.refs[0],c=Oo(n);return c&&So(n)?ls(n,a):c&&Ao(n)?hs(n,a):c||Mo(n)?us(n,i,a,o):ko(n)?ys(n,a,o):(H(7,n),()=>{})},vo=/[.,' ·٫]/,us=(n,e,t,o)=>{let s=e.lazy?"change":"input",i=No(n),a=()=>{!e.trim&&!pt(o()[1]).trim||(n.value=n.value.trim())},c=p=>{let m=p.target;m.composing=1},l=p=>{let m=p.target;m.composing&&(m.composing=0,m.dispatchEvent(new Event(s)))},u=()=>{n.removeEventListener(s,f),n.removeEventListener("change",a),n.removeEventListener("compositionstart",c),n.removeEventListener("compositionend",l),n.removeEventListener("change",l)},f=p=>{let m=t();if(!m)return;let y=p.target;if(!y||y.composing)return;let h=y.value,R=pt(o()[1]);if(i||R.number||R.int){if(R.int)h=parseInt(h);else{if(vo.test(h[h.length-1])&&h.split(vo).length===2){if(h+="0",h=parseFloat(h),isNaN(h))h="";else if(m()===h)return}h=parseFloat(h)}isNaN(h)&&(h=""),n.value=h}else R.trim&&(h=h.trim());m(h)};return n.addEventListener(s,f),n.addEventListener("change",a),n.addEventListener("compositionstart",c),n.addEventListener("compositionend",l),n.addEventListener("change",l),u},ls=(n,e)=>{let t="change",o=()=>{n.removeEventListener(t,r)},r=()=>{let s=e();if(!s)return;let i=ve(n),a=n.checked,c=s();if(w(c)){let l=Gt(c,i),u=l!==-1;a&&!u?c.push(i):!a&&u&&c.splice(l,1)}else ue(c)?a?c.add(i):c.delete(i):s(ms(n,a))};return n.addEventListener(t,r),o},ve=n=>"_value"in n?n._value:n.value,Lo="trueValue",fs="falseValue",Io="true-value",ps="false-value",ms=(n,e)=>{let t=e?Lo:fs;if(t in n)return n[t];let o=e?Io:ps;return n.hasAttribute(o)?n.getAttribute(o):e},ds=(n,e)=>{if(Lo in n)return Re(e,n.trueValue);let o=Io;return n.hasAttribute(o)?Re(e,n.getAttribute(o)):Re(e,!0)},hs=(n,e)=>{let t="change",o=()=>{n.removeEventListener(t,r)},r=()=>{let s=e();if(!s)return;let i=ve(n);s(i)};return n.addEventListener(t,r),o},ys=(n,e,t)=>{let o="change",r=()=>{n.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=pt(t()[1]).number,l=Array.prototype.filter.call(n.options,u=>u.selected).map(u=>c?Ro(ve(u)):ve(u));if(n.multiple){let u=i();try{if(Jt(i),ue(u)){u.clear();for(let f of l)u.add(f)}else w(u)?(u.splice(0),u.push(...l)):i(l)}finally{Qt(i),Y(i)}}else i(l[0])};return n.addEventListener(o,s),r};var gs=["stop","prevent","capture","self","once","left","right","middle","passive"],bs=n=>{let e={};if(J(n))return;let t=n.split(",");for(let o of gs)e[o]=t.includes(o);return e},Ts=(n,e,t,o,r)=>{var l,u;if(o){let f=e.value(),p=V(o.value()[0]);return W(p)?An(n,$(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:f[1]):()=>{}}else if(t){let f=e.value();return An(n,$(t),()=>e.value()[0],(u=r==null?void 0:r.join(","))!=null?u:f[1])}let s=[],i=()=>{s.forEach(f=>f())},a=e.value(),c=a.length;for(let f=0;f<c;++f){let p=a[f];if(K(p)&&(p=p()),D(p))for(let m of Object.entries(p)){let y=m[0],h=()=>{let g=e.value()[f];return K(g)&&(g=g()),g=g[y],K(g)&&(g=g()),g},R=p[y+"_flags"];s.push(An(n,y,h,R))}else H(2,"r-on",n)}return i},Nn={isLazy:(n,e)=>e===-1&&n%2===0,isLazyKey:(n,e)=>e===0&&!n.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:n,parseResult:e,option:t,dynamicOption:o,flags:r})=>Ts(n,e,t,o,r)},xs=(n,e)=>{if(n.startsWith("keydown")||n.startsWith("keyup")||n.startsWith("keypress")){e!=null||(e="");let t=[...n.split("."),...e.split(",")];n=t[0];let o=t[1],r=t.includes("ctrl"),s=t.includes("shift"),i=t.includes("alt"),a=t.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[n,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[n,c]}return[n,t=>!0]},An=(n,e,t,o)=>{if(J(e))return H(5,"r-on",n),()=>{};let r=bs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=xs(e,o);let a=u=>{if(!i(u)||!t&&e==="submit"&&(r!=null&&r.prevent))return;let f=t(u);K(f)&&(f=f(u)),K(f)&&f(u)},c=()=>{n.removeEventListener(e,l,s)},l=u=>{if(!r){a(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==n)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),a(u)}finally{r.once&&c()}};return n.addEventListener(e,l,s),c};var Cs=(n,e,t,o)=>{if(t){o&&o.includes("camel")&&(t=$(t)),nt(n,t,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];nt(n,a,c)}else if(D(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];nt(n,c,l)}else{let a=e[s++],c=e[s];nt(n,a,c)}}},Do={mount:()=>({update:({el:n,values:e,option:t,flags:o})=>{Cs(n,e,t,o)}})};function Es(n){return!!n||n===""}var nt=(n,e,t)=>{if(fe(e)){H(3,":prop",n);return}if(e==="innerHTML"||e==="textContent"){let s=[...n.childNodes];setTimeout(()=>s.forEach(de),1),n[e]=t!=null?t:"";return}let o=n.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){n._value=t;let s=o==="OPTION"?n.getAttribute("value"):n.value,i=t!=null?t:"";s!==i&&(n.value=i),t==null&&n.removeAttribute(e);return}let r=!1;if(t===""||t==null){let s=typeof n[e];s==="boolean"?t=Es(t):t==null&&s==="string"?(t="",r=!0):s==="number"&&(t=0,r=!0)}try{n[e]=t}catch(s){r||H(4,e,o,t,s)}r&&n.removeAttribute(e)};var Uo={once:!0,mount:({el:n,parseResult:e,expr:t})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(n):i?i==null||i(n):o.context[t]=n,()=>{if(s){let a=r.indexOf(n);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Rs=(n,e)=>{let t=Oe(n).data,o=t._ord;Yn(o)&&(o=t._ord=n.style.display),!!e[0]?n.style.display=o:n.style.display="none"},Bo={mount:()=>({update:({el:n,values:e})=>{Rs(n,e)}})};var vs=(n,e,t)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=t==null?void 0:t[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Po(n,s[c],i==null?void 0:i[c])}else Po(n,s,i)}},Xt={mount:()=>({update:({el:n,values:e,previousValues:t})=>{vs(n,e,t)}})},Po=(n,e,t)=>{let o=n.style,r=W(e);if(e&&!r){if(t&&!W(t))for(let s in t)e[s]==null&&Mn(o,s,"");for(let s in e)Mn(o,s,e[s])}else{let s=o.display;if(r?t!==e&&(o.cssText=e):t&&n.removeAttribute("style"),"_ord"in Oe(n).data)return;o.display=s}},Ho=/\s*!important$/;function Mn(n,e,t){if(w(t))t.forEach(o=>{Mn(n,e,o)});else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{let o=ws(n,e);Ho.test(t)?n.setProperty(Xe(o),t.replace(Ho,""),"important"):n[o]=t}}var Vo=["Webkit","Moz","ms"],On={};function ws(n,e){let t=On[e];if(t)return t;let o=$(e);if(o!=="filter"&&o in n)return On[e]=o;o=lt(o);for(let r=0;r<Vo.length;r++){let s=Vo[r]+o;if(s in n)return On[e]=s}return e}var ae=n=>_o(V(n)),_o=(n,e=new WeakMap)=>{if(!n||!D(n))return n;if(w(n))return n.map(ae);if(ue(n)){let o=new Set;for(let r of n.keys())o.add(ae(r));return o}if(Ae(n)){let o=new Map;for(let r of n)o.set(ae(r[0]),ae(r[1]));return o}if(e.has(n))return V(e.get(n));let t=gt({},n);e.set(n,t);for(let o of Object.entries(t))t[o[0]]=_o(V(o[1]),e);return t};var Ss=(n,e)=>{var o;let t=e[0];n.textContent=ue(t)?JSON.stringify(ae([...t])):Ae(t)?JSON.stringify(ae([...t])):D(t)?JSON.stringify(ae(t)):(o=t==null?void 0:t.toString())!=null?o:""},jo={mount:()=>({update:({el:n,values:e})=>{Ss(n,e)}})};var $o={mount:()=>({update:({el:n,values:e})=>{nt(n,"value",e[0])}})};var Ie=class Ie{constructor(e){d(this,"P",{});d(this,"u",{});d(this,"rt",()=>Object.keys(this.P).filter(e=>e.length===1||!e.startsWith(":")));d(this,"be",new Map);d(this,"j",new Map);d(this,"forGrowThreshold",10);d(this,"globalContext");d(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Nt()}static getDefault(){var e;return(e=Ie.Ue)!=null?e:Ie.Ue=new Ie}Nt(){let e={},t=globalThis;for(let o of Ie.At.split(","))e[o]=t[o];return e.ref=be,e.sref=ie,e.flatten=ae,e}addComponent(...e){for(let t of e){if(!t.defaultName){at.warning("Registered component's default name is not defined",t);continue}this.be.set(lt(t.defaultName),t),this.j.set(lt(t.defaultName).toLocaleUpperCase(),t)}}setDirectives(e){this.P={".":Do,":":wn,"@":Nn,[`${e}on`]:Nn,[`${e}bind`]:wn,[`${e}html`]:jt,[`${e}text`]:jo,[`${e}show`]:Bo,[`${e}model`]:wo,":style":Xt,[`${e}style`]:Xt,[`${e}bind:style`]:Xt,":class":Sn,[`${e}bind:class`]:Sn,":ref":Uo,":value":$o,[`${e}teleport`]:At},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.P,this.u)}};d(Ie,"Ue"),d(Ie,"At","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");var le=Ie;var Yt=(n,e)=>{if(!n)return;let o=(e!=null?e:le.getDefault()).u,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Ns(n,o.pre,s))As(i,o.text,r,s)},As=(n,e,t,o)=>{var c;let r=n.textContent;if(!r)return;let s=t,i=r.split(s);if(i.length<=1)return;if(((c=n.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],u=qo(l,o);if(u&&J(i[0])&&J(i[2])){let f=n.parentElement;f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let u=qo(l,o);if(u){let f=document.createElement("span");f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(l))}n.replaceWith(a)},Ns=(n,e,t)=>{let o=[],r=s=>{var i;if(s.nodeType===Node.TEXT_NODE)t.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of Ee(s))r(a)}};return r(n),o},qo=(n,e)=>e.find(t=>n.startsWith(t.start)&&n.endsWith(t.end));var Os=9,Ms=10,ks=13,Ls=32,we=46,Zt=44,Is=39,Ds=34,en=40,ot=41,tn=91,kn=93,Ln=63,Us=59,Fo=58,zo=123,nn=125,_e=43,on=45,In=96,Ko=47,Dn=92,Wo=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=Gn(gt({"=>":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}),er=Object.keys(Zo),Ps=new Set(er),Bn=new Set(["=>"]);er.forEach(n=>Bn.add(n));var Go={true:!0,false:!1,null:null},Hs="this",rt="Expected ",je="Unexpected ",Hn="Unclosed ",Vs=rt+":",Jo=rt+"expression",_s="missing }",js=je+"object property",$s=Hn+"(",Qo=rt+"comma",Xo=je+"token ",qs=je+"period",Un=rt+"expression after ",Fs="missing unaryOp argument",zs=Hn+"[",Ks=rt+"exponent (",Ws="Variable names cannot start with a number (",Gs=Hn+'quote after "',mt=n=>n>=48&&n<=57,Yo=n=>Bs[n],Pn=class{constructor(e){d(this,"p");d(this,"e");this.p=e,this.e=0}get B(){return this.p.charAt(this.e)}get y(){return this.p.charCodeAt(this.e)}f(e){return this.p.charCodeAt(this.e)===e}$(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}ae(e){return this.$(e)||mt(e)}r(e){return new Error(`${e} at character ${this.e}`)}h(){let e=this.y,t=this.p,o=this.e;for(;e===Ls||e===Os||e===Ms||e===ks;)e=t.charCodeAt(++o);this.e=o}parse(){let e=this.ce();return e.length===1?e[0]:{type:0,body:e}}ce(e){let t=[];for(;this.e<this.p.length;){let o=this.y;if(o===Us||o===Zt)this.e++;else{let r=this.S();if(r)t.push(r);else if(this.e<this.p.length){if(o===e)break;throw this.r(je+'"'+this.B+'"')}}}return t}S(){var t;let e=(t=this.Ot())!=null?t:this.Pe();return this.h(),this.kt(e)}ue(){this.h();let e=this.p,t=this.e,o=e.charCodeAt(t),r=e.charCodeAt(t+1),s=e.charCodeAt(t+2),i=e.charCodeAt(t+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.ae(e.charCodeAt(t+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}Pe(){let e,t,o,r,s,i,a,c;if(s=this.q(),!s||(t=this.ue(),!t))return s;if(r={value:t,prec:Yo(t),right_a:Bn.has(t)},i=this.q(),!i)throw this.r(Un+t);let l=[s,r,i];for(;t=this.ue();){o=Yo(t),r={value:t,prec:o,right_a:Bn.has(t)},c=t;let u=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;l.length>2&&u(l[l.length-2]);)i=l.pop(),t=l.pop().value,s=l.pop(),e=this.Be(t,s,i),l.push(e);if(e=this.q(),!e)throw this.r(Un+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this.Be(l[a-1].value,l[a-2],e),a-=2;return e}q(){let e;if(this.h(),e=this.Mt(),e)return this.pe(e);let t=this.y;if(mt(t)||t===we)return this.Lt();if(t===Is||t===Ds)e=this.Vt();else if(t===tn)e=this.It();else{let o=this.Dt();if(o){let r=this.q();if(!r)throw this.r(Fs);return this.pe({type:7,operator:o,argument:r})}this.$(t)?(e=this.le(),e.name in Go?e={type:4,value:Go[e.name],raw:e.name}:e.name===Hs&&(e={type:5})):t===en&&(e=this.Ut())}return e?(e=this.F(e),this.pe(e)):!1}Be(e,t,o){if(e==="=>"){let r=t.type===1?t.expressions:[t];return{type:15,params:r,body:o}}return Ps.has(e)?{type:16,operator:e,left:t,right:o}:{type:8,operator:e,left:t,right:o}}Mt(){let e={node:!1};return this.Pt(e),e.node||(this.Bt(e),e.node)||(this.Ht(e),e.node)||(this.He(e),e.node)||this.jt(e),e.node}pe(e){let t={node:e};return this._t(t),this.$t(t),this.qt(t),t.node}Dt(){let e=this.p,t=this.e,o=e.charCodeAt(t),r=e.charCodeAt(t+1),s=e.charCodeAt(t+2),i=e.charCodeAt(t+3);return o===on?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===_e?(this.e++,"+"):o===110&&r===101&&s===119&&!this.ae(i)?(this.e+=3,"new"):!1}Ot(){let e={};return this.Ft(e),e.node}kt(e){let t={node:e};return this.Kt(t),t.node}F(e){this.h();let t=this.y;for(;t===we||t===tn||t===en||t===Ln;){let o;if(t===Ln){if(this.p.charCodeAt(this.e+1)!==we)break;o=!0,this.e+=2,this.h(),t=this.y}if(this.e++,t===tn){if(e={type:3,computed:!0,object:e,property:this.S()},this.h(),t=this.y,t!==kn)throw this.r(zs);this.e++}else t===en?e={type:6,arguments:this.je(ot),callee:e}:(o&&this.e--,this.h(),e={type:3,computed:!1,object:e,property:this.le()});o&&(e.optional=!0),this.h(),t=this.y}return e}Lt(){let e=this.p,t=this.e,o=t;for(;mt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===we)for(o++;mt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===_e||a===on)&&o++;let c=o;for(;mt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(t,o);throw this.r(Ks+l+this.B+")")}}this.e=o;let s=e.slice(t,o),i=e.charCodeAt(o);if(this.$(i))throw this.r(Ws+s+this.B+")");if(i===we||s.length===1&&s.charCodeAt(0)===we)throw this.r(qs);return{type:4,value:parseFloat(s),raw:s}}Vt(){let e=this.p,t=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<t;){let f=e.charCodeAt(s);if(f===r){l=!0,this.e=s+1;break}if(f===Dn){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this._e(p)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,l?s:t):e.slice(i,l?s:t);if(!l)throw this.e=s,this.r(Gs+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}_e(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)}}le(){let e=this.y,t=this.e;if(this.$(e))this.e++;else throw this.r(je+this.B);for(;this.e<this.p.length&&(e=this.y,this.ae(e));)this.e++;return{type:2,name:this.p.slice(t,this.e)}}je(e){let t=[],o=!1,r=0;for(;this.e<this.p.length;){this.h();let s=this.y;if(s===e){if(o=!0,this.e++,e===ot&&r&&r>=t.length)throw this.r(Xo+String.fromCharCode(e));break}else if(s===Zt){if(this.e++,r++,r!==t.length){if(e===ot)throw this.r(Xo+",");for(let i=t.length;i<r;i++)t.push(null)}}else{if(t.length!==r&&r!==0)throw this.r(Qo);{let i=this.S();if(!i||i.type===0)throw this.r(Qo);t.push(i)}}}if(!o)throw this.r(rt+String.fromCharCode(e));return t}Ut(){this.e++;let e=this.ce(ot);if(this.f(ot))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.r($s)}It(){return this.e++,{type:9,elements:this.je(kn)}}Pt(e){if(this.f(zo)){this.e++;let t=[];for(;!isNaN(this.y);){if(this.h(),this.f(nn)){this.e++,e.node=this.F({type:10,properties:t});return}let o=this.S();if(!o)break;if(this.h(),o.type===2&&(this.f(Zt)||this.f(nn)))t.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Fo)){this.e++;let r=this.S();if(!r)throw this.r(js);let s=o.type===9;t.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.h()}else t.push(o);this.f(Zt)&&this.e++}throw this.r(_s)}}Bt(e){let t=this.y;if((t===_e||t===on)&&t===this.p.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:t===_e?"++":"--",argument:this.F(this.le()),prefix:!0};if(!o.argument||!Wo.has(o.argument.type))throw this.r(je+o.operator)}}$t(e){let t=e.node,o=this.y;if((o===_e||o===on)&&o===this.p.charCodeAt(this.e+1)){if(!Wo.has(t.type))throw this.r(je+(o===_e?"++":"--"));this.e+=2,e.node={type:13,operator:o===_e?"++":"--",argument:t,prefix:!1}}}Ht(e){this.p.charCodeAt(this.e)===we&&this.p.charCodeAt(this.e+1)===we&&this.p.charCodeAt(this.e+2)===we&&(this.e+=3,e.node={type:14,argument:this.S()})}Kt(e){if(e.node&&this.f(Ln)){this.e++;let t=e.node,o=this.S();if(!o)throw this.r(Jo);if(this.h(),this.f(Fo)){this.e++;let r=this.S();if(!r)throw this.r(Jo);e.node={type:11,test:t,consequent:o,alternate:r}}else throw this.r(Vs)}}Ft(e){if(this.h(),this.f(en)){let t=this.e;if(this.e++,this.h(),this.f(ot)){this.e++;let o=this.ue();if(o==="=>"){let r=this.Pe();if(!r)throw this.r(Un+o);e.node={type:15,params:null,body:r};return}}this.e=t}}qt(e){let t=e.node,o=t.type;(o===2||o===3)&&this.f(In)&&(e.node={type:17,tag:t,quasi:this.He(e)})}He(e){if(!this.f(In))return;let t=this.p,o=t.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=u=>{if(!c){let m=t.slice(s,this.e);return r.quasis.push({type:18,value:{raw:m,cooked:m},tail:u})}i.push(t.slice(s,this.e)),a.push(t.slice(s,this.e));let f=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<o;){let u=t.charCodeAt(this.e);if(u===In)return l(!0),this.e+=1,e.node=r,r;if(u===36&&t.charCodeAt(this.e+1)===zo){if(l(!1),this.e+=2,r.expressions.push(...this.ce(nn)),!this.f(nn))throw this.r("unclosed ${");this.e+=1,s=this.e}else if(u===Dn){c||(c=!0),i.push(t.slice(s,this.e)),a.push(t.slice(s,this.e));let f=t.charCodeAt(this.e+1);i.push(t.slice(this.e,this.e+2)),a.push(this._e(f)),this.e+=2,s=this.e}else this.e+=1}throw this.r("Unclosed `")}_t(e){let t=e.node;if(!t||t.operator!=="new"||!t.argument)return;if(!t.argument||![6,3].includes(t.argument.type))throw this.r("Expected new function()");e.node=t.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}jt(e){if(!this.f(Ko))return;let t=++this.e,o=!1;for(;this.e<this.p.length;){if(this.y===Ko&&!o){let r=this.p.slice(t,this.e),s="";for(;++this.e<this.p.length;){let a=this.y;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.B;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.r(a.message)}return e.node={type:4,value:i,raw:this.p.slice(t-1,this.e)},e.node=this.F(e.node),e.node}this.f(tn)?o=!0:o&&this.f(kn)&&(o=!1),this.e+=this.f(Dn)?2:1}throw this.r("Unclosed Regex")}},tr=n=>new Pn(n).parse();var Js={"=>":(n,e)=>{},"=":(n,e)=>{},"*=":(n,e)=>{},"**=":(n,e)=>{},"/=":(n,e)=>{},"%=":(n,e)=>{},"+=":(n,e)=>{},"-=":(n,e)=>{},"<<=":(n,e)=>{},">>=":(n,e)=>{},">>>=":(n,e)=>{},"&=":(n,e)=>{},"^=":(n,e)=>{},"|=":(n,e)=>{},"||":(n,e)=>n()||e(),"??":(n,e)=>{var t;return(t=n())!=null?t:e()},"&&":(n,e)=>n()&&e(),"|":(n,e)=>n|e,"^":(n,e)=>n^e,"&":(n,e)=>n&e,"==":(n,e)=>n==e,"!=":(n,e)=>n!=e,"===":(n,e)=>n===e,"!==":(n,e)=>n!==e,"<":(n,e)=>n<e,">":(n,e)=>n>e,"<=":(n,e)=>n<=e,">=":(n,e)=>n>=e,in:(n,e)=>n in e,"<<":(n,e)=>n<<e,">>":(n,e)=>n>>e,">>>":(n,e)=>n>>>e,"+":(n,e)=>n+e,"-":(n,e)=>n-e,"*":(n,e)=>n*e,"/":(n,e)=>n/e,"%":(n,e)=>n%e,"**":(n,e)=>yt(n,e)},Qs={"-":n=>-n,"+":n=>+n,"!":n=>!n,"~":n=>~n,new:n=>n},sr=n=>{if(!(n!=null&&n.some(rr)))return n;let e=[];return n.forEach(t=>rr(t)?e.push(...t):e.push(t)),e},nr=(...n)=>sr(n),Vn=(n,e)=>{if(!n)return e;let t=Object.create(e!=null?e:{});return t.$event=n,t},Xs={"++":(n,e)=>{let t=n[e];if(E(t)){let o=t();return t(++o),o}return++n[e]},"--":(n,e)=>{let t=n[e];if(E(t)){let o=t();return t(--o),o}return--n[e]}},Ys={"++":(n,e)=>{let t=n[e];if(E(t)){let o=t();return t(o+1),o}return n[e]++},"--":(n,e)=>{let t=n[e];if(E(t)){let o=t();return t(o-1),o}return n[e]--}},or={"=":(n,e,t)=>{let o=n[e];return E(o)?o(t):n[e]=t},"+=":(n,e,t)=>{let o=n[e];return E(o)?o(o()+t):n[e]+=t},"-=":(n,e,t)=>{let o=n[e];return E(o)?o(o()-t):n[e]-=t},"*=":(n,e,t)=>{let o=n[e];return E(o)?o(o()*t):n[e]*=t},"/=":(n,e,t)=>{let o=n[e];return E(o)?o(o()/t):n[e]/=t},"%=":(n,e,t)=>{let o=n[e];return E(o)?o(o()%t):n[e]%=t},"**=":(n,e,t)=>{let o=n[e];return E(o)?o(yt(o(),t)):n[e]=yt(n[e],t)},"<<=":(n,e,t)=>{let o=n[e];return E(o)?o(o()<<t):n[e]<<=t},">>=":(n,e,t)=>{let o=n[e];return E(o)?o(o()>>t):n[e]>>=t},">>>=":(n,e,t)=>{let o=n[e];return E(o)?o(o()>>>t):n[e]>>>=t},"|=":(n,e,t)=>{let o=n[e];return E(o)?o(o()|t):n[e]|=t},"&=":(n,e,t)=>{let o=n[e];return E(o)?o(o()&t):n[e]&=t},"^=":(n,e,t)=>{let o=n[e];return E(o)?o(o()^t):n[e]^=t}},rn=(n,e)=>K(n)?n.bind(e):n,_n=class{constructor(e,t,o,r,s){d(this,"l");d(this,"$e");d(this,"qe");d(this,"Fe");d(this,"A");d(this,"Ke");d(this,"ze");this.l=w(e)?e:[e],this.$e=t,this.qe=o,this.Fe=r,this.ze=!!s}We(e,t){if(t&&e in t)return t;for(let o of this.l)if(e in o)return o}2(e,t,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],rn(V(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],rn(V(i[r]),i);let s=this.$e;if(s&&r in s)return this.A=s[r],rn(V(s[r]),s)}5(e,t,o){return this.l[0]}0(e,t,o){return this.Ge(t,o,nr,...e.body)}1(e,t,o){return this.E(t,o,(...r)=>r.pop(),...e.expressions)}3(e,t,o){let{obj:r,key:s}=this.fe(e,t,o),i=r==null?void 0:r[s];return this.A=i,rn(V(i),r)}4(e,t,o){return e.value}6(e,t,o){let r=(i,...a)=>K(i)?i(...sr(a)):i,s=this.E(++t,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,t,o){return this.E(t,o,Qs[e.operator],e.argument)}8(e,t,o){let r=Js[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.g(e.left,t,o),()=>this.g(e.right,t,o))}return this.E(t,o,r,e.left,e.right)}9(e,t,o){return this.Ge(++t,o,nr,...e.elements)}10(e,t,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.E(++t,o,s,...e.properties),r}11(e,t,o){return this.E(t,o,r=>this.g(r?e.consequent:e.alternate,t,o),e.test)}12(e,t,o){var u;let r={},s=f=>(f==null?void 0:f.type)!==15,i=(u=this.Fe)!=null?u:()=>!1,a=t===0&&this.ze,c=f=>this.Je(a,e.key,t,Vn(f,o)),l=f=>this.Je(a,e.value,t,Vn(f,o));if(e.shorthand){let f=e.key.name;r[f]=s(e.key)&&i(f,t)?c:c()}else if(e.computed){let f=V(c());r[f]=s(e.value)&&i(f,t)?l:l()}else{let f=e.key.type===4?e.key.value:e.key.name;r[f]=s(e.value)&&i(f,t)?()=>l:l()}return r}fe(e,t,o){let r=this.g(e.object,t,o),s=e.computed?this.g(e.property,t,o):e.property.name;return{obj:r,key:s}}13(e,t,o){let r=e.argument,s=e.operator,i=e.prefix?Xs:Ys;if(r.type===2){let a=r.name,c=this.We(a,o);return fe(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.fe(r,t,o);return i[s](a,c)}}16(e,t,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.We(i,o);if(fe(a))return;let c=this.g(e.right,t,o);return or[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.fe(r,t,o),c=this.g(e.right,t,o);return or[s](i,a,c)}}14(e,t,o){let r=this.g(e.argument,t,o);return w(r)&&(r.s=ir),r}17(e,t,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},t,o)}19(e,t,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(t,o,r,...e.expressions)}18(e,t,o){return e.value.cooked}20(e,t,o){let r=(s,...i)=>new s(...i);return this.E(t,o,r,e.callee,...e.arguments)}15(e,t,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.g(e.body,t,s)}}g(e,t,o){let r=V(this[e.type](e,t,o));return this.Ke=e.type,r}Je(e,t,o,r){let s=this.g(t,o,r);return e&&this.Qe()?this.A:s}Qe(){let e=this.Ke;return(e===2||e===3||e===6)&&E(this.A)}eval(e,t){let{value:o,refs:r}=It(()=>this.g(e,-1,t)),s={value:o,refs:r};return this.Qe()&&(s.ref=this.A),s}E(e,t,o,...r){let s=r.map(i=>i&&this.g(i,e,t));return o(...s)}Ge(e,t,o,...r){let s=this.qe;if(!s)return this.E(e,t,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.g(a,e,Vn(l,t)):this.g(a,e,t)));return o(...i)}},ir=Symbol("s"),rr=n=>(n==null?void 0:n.s)===ir,ar=(n,e,t,o,r,s,i)=>new _n(e,t,o,r,i).eval(n,s);var cr={},ur=n=>!!n,sn=class{constructor(e,t){d(this,"l");d(this,"o");d(this,"Xe",[]);this.l=e,this.o=t}v(e){this.l=[e,...this.l]}J(){return this.l.map(t=>t.components).filter(ur).reverse().reduce((t,o)=>{for(let[r,s]of Object.entries(o))t[r.toUpperCase()]=s;return t},{})}ot(){let e=[],t=new Set,o=this.l.map(r=>r.components).filter(ur).reverse();for(let r of o)for(let s of Object.keys(r))t.has(s)||(t.add(s),e.push(s));return e}k(e,t,o,r,s){var g;let i=[],a=[],c=new Set,l=()=>{for(let C=0;C<a.length;++C)a[C]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(C,U)=>(c.add(C),U&&C(i),()=>{c.delete(C)}),refs:[],context:this.l[0]};if(J(e))return p;let m=this.o.globalContext,y=[],h=new Set,R=(C,U,G,L)=>{try{let _=ar(C,U,m,t,o,L,r);return G&&_.refs.length>0&&y.push(..._.refs),{value:_.value,refs:_.refs,ref:_.ref}}catch(_){H(6,`evaluation error: ${e}`,_)}return{value:void 0,refs:[]}};try{let C=(g=cr[e])!=null?g:tr("["+e+"]");cr[e]=C;let U=this.l.slice(),G=C.elements,L=G.length,_=new Array(L);p.refs=_;let ce=()=>{y.length=0,s||(h.clear(),l());let ee=new Array(L);for(let B=0;B<L;++B){let b=G[B];if(t!=null&&t(B,-1)){ee[B]=Q=>R(b,U,!1,{$event:Q}).value;continue}let N=R(b,U,!0);ee[B]=N.value,_[B]=N.ref}if(!s)for(let B of y)h.has(B)||(h.add(B),a.push(se(B,ce)));if(i=ee,c.size!==0)for(let B of c)c.has(B)&&B(i)};ce()}catch(C){H(6,`parse error: ${e}`,C)}return p}M(){return this.l.slice()}oe(e){this.Xe.push(this.l),this.l=e}C(e,t){try{this.oe(e),t()}finally{this.zt()}}zt(){var e;this.l=(e=this.Xe.pop())!=null?e:[]}};var lr=n=>{let e=n.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||n==="-"||n==="_"||n===":"},Zs=(n,e)=>{let t="";for(let o=e;o<n.length;++o){let r=n[o];if(t){r===t&&(t="");continue}if(r==='"'||r==="'"){t=r;continue}if(r===">")return o}return-1},ei=(n,e)=>{let t=e?2:1;for(;t<n.length&&(n[t]===" "||n[t]===`
3
- `);)++t;if(t>=n.length||!lr(n[t]))return null;let o=t;for(;t<n.length&&lr(n[t]);)++t;return{start:o,end:t}},fr=new Set(["table","thead","tbody","tfoot"]),ti=new Set(["thead","tbody","tfoot"]),ni=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),oi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),pr=(n,e)=>`${n.slice(0,n.length-2)}></${e}>`,an=n=>{var s;let e=0,t=[],o=[],r=0;for(;e<n.length;){let i=n.indexOf("<",e);if(i===-1){t.push(n.slice(e));break}if(t.push(n.slice(e,i)),n.startsWith("<!--",i)){let g=n.indexOf("-->",i+4);if(g===-1){t.push(n.slice(i));break}t.push(n.slice(i,g+3)),e=g+3;continue}let a=Zs(n,i);if(a===-1){t.push(n.slice(i));break}let c=n.slice(i,a+1),l=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){t.push(c),e=a+1;continue}let f=ei(c,l);if(!f){t.push(c),e=a+1;continue}let p=c.slice(f.start,f.end);if(l){let g=o[o.length-1];g?(o.pop(),t.push(g.replacementHost?`</${g.replacementHost}>`:c),fr.has(g.effectiveTag)&&--r):t.push(c),e=a+1;continue}let m=c.charCodeAt(c.length-2)===47,y=o[o.length-1],h=null;r===0?p==="tr"?h="trx":p==="td"?h="tdx":p==="th"&&(h="thx"):ti.has((s=y==null?void 0:y.effectiveTag)!=null?s:"")?h=p==="tr"?null:"tr":(y==null?void 0:y.effectiveTag)==="table"?h=ni.has(p)?null:"tr":(y==null?void 0:y.effectiveTag)==="tr"&&(h=p==="td"||p==="th"?null:"td");let R=m&&!oi.has(h||p);if(h){let g=h==="trx"||h==="tdx"||h==="thx",C=`${c.slice(0,f.start)}${h} is="${g?`r-${p}`:`regor:${p}`}"${c.slice(f.end)}`;t.push(R?pr(C,h):C)}else t.push(R?pr(c,p):c);if(!m){let g=h==="trx"?"tr":h==="tdx"?"td":h==="thx"?"th":h||p;o.push({replacementHost:h,effectiveTag:g}),fr.has(g)&&++r}e=a+1}return t.join("")};var ri="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",si=new Set(ri.toUpperCase().split(",")),ii="http://www.w3.org/2000/svg",mr=(n,e)=>{ye(n)?n.content.appendChild(e):n.appendChild(e)},jn=(n,e,t,o)=>{var i;let r=n.t;if(r){let a=t&&si.has(r.toUpperCase())?document.createElementNS(ii,r.toLowerCase()):document.createElement(r),c=n.a;if(c)for(let u of Object.entries(c)){let f=u[0],p=u[1];f.startsWith("#")&&(p=f.substring(1),f="name"),a.setAttribute(St(f,o),p)}let l=n.c;if(l)for(let u of l)jn(u,a,t,o);mr(e,a);return}let s=n.d;if(s){let a;switch((i=n.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)mr(e,a);else throw new Error("unsupported node type.")}},$e=(n,e,t)=>{t!=null||(t=le.getDefault());let o=document.createDocumentFragment();if(!w(n))return jn(n,o,!!e,t),o;for(let r of n)jn(r,o,!!e,t);return o};var dr=(n,e={selector:"#app"},t)=>{W(e)&&(e={selector:"#app",template:e}),fo(n)&&(n=n.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Be(o))throw j(0);t||(t=le.getDefault());let r=()=>{for(let a of[...o.childNodes])z(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(an(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=$e(e.json,e.isSVG,t);r(),s(a.childNodes)}return t.useInterpolation&&Yt(o,t),new $n(n,o,t).b(),q(o,()=>{Ne(n)}),Nt(n),{context:n,unmount:()=>{z(o)},unbind:()=>{de(o)}}},$n=class{constructor(e,t,o){d(this,"Wt");d(this,"Ye");d(this,"o");d(this,"m");d(this,"i");this.Wt=e,this.Ye=t,this.o=o,this.m=new sn([e],o),this.i=new Kt(this.m)}b(){this.i.H(this.Ye)}};var st=n=>{if(w(n))return n.map(r=>st(r));let e={};if(n.tagName)e.t=n.tagName;else return n.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),n.textContent&&(e.d=n.textContent),e;let t=n.getAttributeNames();t.length>0&&(e.a=Object.fromEntries(t.map(r=>{var s;return[r,(s=n.getAttribute(r))!=null?s:""]})));let o=Ee(n);return o.length>0&&(e.c=[...o].map(r=>st(r))),e};var hr=(n,e={})=>{var s,i,a,c,l,u;w(e)&&(e={props:e}),W(n)&&(n={template:n});let t=(s=e.context)!=null?s:()=>({}),o=!1;if(n.element){let f=n.element;f.remove(),n.element=f}else if(n.selector){let f=document.querySelector(n.selector);if(!f)throw j(1,n.selector);f.remove(),n.element=f}else if(n.template){let f=document.createRange().createContextualFragment(an(n.template));n.element=f}else n.json&&(n.element=$e(n.json,n.isSVG,e.config),o=!0);n.element||(n.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Yt(n.element,(a=e.config)!=null?a:le.getDefault());let r=n.element;if(!o&&(((l=n.isSVG)!=null?l:ut(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||ut(r)&&r.querySelector("[isSVG]"))){let f=r.content,p=f?[...f.childNodes]:[...r.childNodes],m=st(p);n.element=$e(m,!0,e.config)}return{context:t,template:n.element,inheritAttrs:(u=e.inheritAttrs)!=null?u:!0,props:e.props,defaultName:e.defaultName}};var cn=class{constructor(){d(this,"byConstructor",new Map)}register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let t=e.constructor;this.byConstructor.get(t)===e&&this.byConstructor.delete(t)}find(e){for(let t of this.byConstructor.values())if(t instanceof e)return t}require(e){let t=this.find(e);if(t)return t;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var yr=n=>{var e;(e=Ue())==null||e.onMounted.push(n)};var gr=n=>{let e,t={},o=(...r)=>{if(r.length<=2&&0 in r)throw j(4);return e&&!t.isStopped?e(...r):(e=ai(n,t),e(...r))};return o[Z]=1,Le(o,!0),o.stop=()=>{var r,s;return(s=(r=t.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},ne(()=>o.stop(),!0),o},ai=(n,e)=>{var s;let t=(s=e.ref)!=null?s:ie(null);e.ref=t,e.isStopped=!1;let o=0,r=Ve(()=>{if(o>0){r(),e.isStopped=!0,Y(t);return}t(n()),++o});return t.stop=r,t};var br=(n,e)=>{let t={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw j(4);return o&&!t.isStopped?o(...s):(o=ci(n,e,t),o(...s))};return r[Z]=1,Le(r,!0),r.stop=()=>{var s,i;return(i=(s=t.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ne(()=>r.stop(),!0),r},ci=(n,e,t)=>{var a;let o=(a=t.ref)!=null?a:ie(null);t.ref=o,t.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),t.isStopped=!0,Y(o);return}let l=n.map(u=>u());o(e(...l)),++r},i=[];for(let c of n){let l=se(c,s);i.push(l)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var Tr=(n,e)=>{let t={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw j(4);return o&&!t.isStopped?o(...s):(o=ui(n,e,t),o(...s))};return r[Z]=1,Le(r,!0),r.stop=()=>{var s,i;return(i=(s=t.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ne(()=>r.stop(),!0),r},ui=(n,e,t)=>{var s;let o=(s=t.ref)!=null?s:ie(null);t.ref=o,t.isStopped=!1;let r=0;return o.stop=se(n,i=>{if(r>0){o.stop(),t.isStopped=!0,Y(o);return}o(e(i)),++r},!0),o};var xr=n=>(n[kt]=1,n);var Cr=(n,e)=>{if(!e)throw j(5);let o=He(n)?be:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ae(n()))),s=localStorage.getItem(e);if(s!=null)try{n(o(JSON.parse(s)))}catch(a){H(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Ve(r);return ne(i,!0),n};var qn=(n,...e)=>{let t="",o=n,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)t+=o[a],a<i&&(t+=r[a]);return t},Er=qn;var Rr=(n,e,t)=>{let o=[],r=()=>{e(n.map(i=>i()))};for(let i of n)o.push(se(i,r));t&&r();let s=()=>{for(let i of o)i()};return ne(s,!0),s};var vr=n=>{if(!E(n))throw j(3,"observerCount");return n(void 0,void 0,2)};var wr=n=>{Fn();try{n()}finally{zn()}},Fn=()=>{ge.stack||(ge.stack=[]),ge.stack.push(new Set)},zn=()=>{let n=ge.stack;if(!n||n.length===0)return;let e=n.pop();if(n.length){let t=n[n.length-1];for(let o of e)t.add(o);return}delete ge.stack;for(let t of e)try{Y(t)}catch(o){console.error(o)}};return Ir(li);})();
1
+ "use strict";var Regor=(()=>{var ft=Object.defineProperty,Sr=Object.defineProperties,Ar=Object.getOwnPropertyDescriptor,Nr=Object.getOwnPropertyDescriptors,Or=Object.getOwnPropertyNames,Kn=Object.getOwnPropertySymbols;var Wn=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable;var pt=Math.pow,un=(n,e,t)=>e in n?ft(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,mt=(n,e)=>{for(var t in e||(e={}))Wn.call(e,t)&&un(n,t,e[t]);if(Kn)for(var t of Kn(e))Mr.call(e,t)&&un(n,t,e[t]);return n},Gn=(n,e)=>Sr(n,Nr(e));var kr=(n,e)=>{for(var t in e)ft(n,t,{get:e[t],enumerable:!0})},Lr=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Or(e))!Wn.call(n,r)&&r!==t&&ft(n,r,{get:()=>e[r],enumerable:!(o=Ar(e,r))||o.enumerable});return n};var Ir=n=>Lr(ft({},"__esModule",{value:!0}),n);var m=(n,e,t)=>un(n,typeof e!="symbol"?e+"":e,t);var Jn=(n,e,t)=>new Promise((o,r)=>{var s=c=>{try{a(t.next(c))}catch(u){r(u)}},i=c=>{try{a(t.throw(c))}catch(u){r(u)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((t=t.apply(n,e)).next())});var li={};kr(li,{ComponentHead:()=>qe,ContextRegistry:()=>sn,RegorConfig:()=>le,addUnbinder:()=>F,batch:()=>wr,collectRefs:()=>kt,computeMany:()=>br,computeRef:()=>Tr,computed:()=>gr,createApp:()=>dr,defineComponent:()=>hr,drainUnbind:()=>Xn,endBatch:()=>zn,entangle:()=>Ge,flatten:()=>ie,getBindData:()=>Ae,html:()=>qn,isDeepRef:()=>De,isRaw:()=>Je,isRef:()=>C,markRaw:()=>xr,observe:()=>oe,observeMany:()=>Rr,observerCount:()=>vr,onMounted:()=>yr,onUnmounted:()=>ee,pause:()=>Wt,persist:()=>Cr,raw:()=>Er,ref:()=>be,removeNode:()=>z,resume:()=>Gt,silence:()=>Mt,sref:()=>se,startBatch:()=>Fn,toFragment:()=>Pe,toJsonTemplate:()=>et,trigger:()=>Y,unbind:()=>he,unref:()=>P,useScope:()=>At,warningHandler:()=>nt,watchEffect:()=>Ue});var je=Symbol(":regor");var he=n=>{let e=[n];for(let t=0;t<e.length;++t){let o=e[t];Dr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Dr=n=>{let e=n[je];if(!e)return;let t=e.unbinders;for(let o=0;o<t.length;++o)t[o]();t.length=0,n[je]=void 0};var $e=[],dt=!1,ht,Qn=()=>{if(dt=!1,ht=void 0,$e.length!==0){for(let n=0;n<$e.length;++n)he($e[n]);$e.length=0}},z=n=>{n.remove(),$e.push(n),dt||(dt=!0,ht=setTimeout(Qn,1))},Xn=()=>Jn(null,null,function*(){$e.length===0&&!dt||(ht&&clearTimeout(ht),Qn())});var K=n=>typeof n=="function",W=n=>typeof n=="string",Yn=n=>typeof n=="undefined",pe=n=>n==null||typeof n=="undefined",q=n=>typeof n!="string"||!(n!=null&&n.trim()),Ur=Object.prototype.toString,ln=n=>Ur.call(n),we=n=>ln(n)==="[object Map]",ue=n=>ln(n)==="[object Set]",fn=n=>ln(n)==="[object Date]",tt=n=>typeof n=="symbol",w=Array.isArray,D=n=>n!==null&&typeof n=="object";var Zn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:n=>`Component template cannot be found. selector: ${n} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:n=>`${n} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},j=(n,...e)=>{let t=Zn[n];return new Error(K(t)?t.call(Zn,...e):t)};var yt=[],eo=()=>{let n={onMounted:[],onUnmounted:[]};return yt.push(n),n},Le=n=>{let e=yt[yt.length-1];if(!e&&!n)throw j(2);return e},to=n=>{let e=Le();return n&&mn(n),yt.pop(),e},pn=Symbol("csp"),mn=n=>{let e=n,t=e[pn];if(t){let o=Le();if(t===o)return;o.onMounted.length>0&&t.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&t.onUnmounted.push(...o.onUnmounted);return}e[pn]=Le()},gt=n=>n[pn];var Se=n=>{var t,o;let e=(t=gt(n))==null?void 0:t.onUnmounted;e==null||e.forEach(r=>{r()}),(o=n.unmounted)==null||o.call(n)};var qe=class{constructor(e,t,o,r,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"ye");m(this,"emit",(e,t)=>{this.ye.dispatchEvent(new CustomEvent(e,{detail:t}))});this.props=e,this.ye=t,this.ctx=o,this.start=r,this.end=s}findContext(e,t=0){var r;if(t<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===t)return s;++o}}requireContext(e,t=0){let o=this.findContext(e,t);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${t}.`)}unmount(){let e=this.start.nextSibling,t=this.end;for(;e&&e!==t;)z(e),e=e.nextSibling;for(let o of this.ctx)Se(o)}};var Ae=n=>{let e=n,t=e[je];if(t)return t;let o={unbinders:[],data:{}};return e[je]=o,o};var F=(n,e)=>{Ae(n).unbinders.push(e)};var no={8:n=>`Model binding requires a ref at ${n.outerHTML}`,7:n=>`Model binding is not supported on ${n.tagName} element at ${n.outerHTML}`,0:(n,e)=>`${n} binding expression is missing at ${e.outerHTML}`,1:(n,e,t)=>`invalid ${n} expression: ${e} at ${t.outerHTML}`,2:(n,e)=>`${n} requires object expression at ${e.outerHTML}`,3:(n,e)=>`${n} binder: key is empty on ${e.outerHTML}.`,4:(n,e,t,o)=>({msg:`Failed setting prop "${n}" on <${e.toLowerCase()}>: value ${t} is invalid.`,args:[o]}),5:(n,e)=>`${n} binding missing event type at ${e.outerHTML}`,6:(n,e)=>({msg:n,args:[e]})},B=(n,...e)=>{let t=no[n],o=K(t)?t.call(no,...e):t,r=nt.warning;r&&(W(o)?r(o):r(o,...o.args))},nt={warning:console.warn};var Tt={},bt={},oo=1,ro=n=>{let e=(oo++).toString();return Tt[e]=n,bt[e]=0,e},dn=n=>{bt[n]+=1},hn=n=>{--bt[n]===0&&(delete Tt[n],delete bt[n])},so=n=>Tt[n],yn=()=>oo!==1&&Object.keys(Tt).length>0,ot="r-switch",Hr=n=>{let e=n.filter(o=>Te(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(ot))),t=new Set;return e.forEach(o=>{o.forEach(r=>r&&t.add(r))}),[...t]},Fe=(n,e)=>{if(!yn())return;let t=Hr(e);t.length!==0&&(t.forEach(dn),F(n,()=>{t.forEach(hn)}))};var xt=()=>{},gn=(n,e,t,o)=>{let r=[];for(let s of n){let i=s.cloneNode(!0);t.insertBefore(i,o),r.push(i)}Ne(e,r)},bn=Symbol("r-if"),io=Symbol("r-else"),ao=n=>n[io]===1,Ct=class{constructor(e){m(this,"r");m(this,"M");m(this,"he");m(this,"G");m(this,"J");m(this,"x");m(this,"R");this.r=e,this.M=e.o.u.if,this.he=Rt(e.o.u.if),this.G=e.o.u.else,this.J=e.o.u.elseif,this.x=e.o.u.for,this.R=e.o.u.pre}nt(e,t){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(t))return!0;o=o.parentElement}return!1}N(e){let t=e.hasAttribute(this.M);return t&&this.y(e),this.r.O.j(e,o=>{o.hasAttribute(this.M)&&this.y(o)}),t}Q(e){return e[bn]?!0:(e[bn]=!0,Et(e,this.he).forEach(t=>t[bn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Q(e)||this.nt(e,this.x))return;let t=e.getAttribute(this.M);if(!t){B(0,this.M,e);return}e.removeAttribute(this.M),this.k(e,t)}P(e,t,o){let r=ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${t}${o!=null?o:""}`);s.insertBefore(i,e),Fe(i,r),r.forEach(c=>{z(c)}),e.remove(),t!=="if"&&(e[io]=1);let a=document.createComment(`__end__ :${t}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}ge(e,t){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.G)){e.removeAttribute(this.G);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{gn(r,this.r,s,a)},unmount:()=>{xe(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.J);if(!r)return[];e.removeAttribute(this.J);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${r} `),u=this.r.m.L(r),l=u.value,f=this.ge(o,t),p=xt;return F(a,()=>{u.stop(),p(),p=xt}),p=u.subscribe(t),[{mount:()=>{gn(s,this.r,i,c)},unmount:()=>{xe(a,c)},isTrue:()=>!!l()[0],isMounted:!1},...f]}}k(e,t){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${t} `),c=this.r.m.L(t),u=c.value,l=!1,f=this.r.m,p=f.V(),h=()=>{f.C(p,()=>{if(u()[0])l||(gn(r,this.r,s,a),l=!0),y.forEach(b=>{b.unmount(),b.isMounted=!1});else{xe(i,a),l=!1;let b=!1;for(let E of y)!b&&E.isTrue()?(E.isMounted||(E.mount(),E.isMounted=!0),b=!0):(E.unmount(),E.isMounted=!1)}})},y=this.ge(o,h),d=xt;F(i,()=>{c.stop(),d(),d=xt}),h(),d=c.subscribe(h)}};var ze=n=>{let e=me(n)?n.content.childNodes:[n],t=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}t.push(r)}return t},Ne=(n,e)=>{for(let t=0;t<e.length;++t){let o=e[t];o.nodeType===Node.ELEMENT_NODE&&(ao(o)||n._(o))}},Et=(n,e)=>{var o;let t=n.querySelectorAll(e);return(o=n.matches)!=null&&o.call(n,e)?[n,...t]:t},me=n=>n instanceof HTMLTemplateElement,Te=n=>n.nodeType===Node.ELEMENT_NODE,rt=n=>n.nodeType===Node.ELEMENT_NODE,co=n=>n instanceof HTMLSlotElement,Ce=n=>me(n)?n.content.childNodes:n.childNodes,xe=(n,e)=>{let t=n.nextSibling;for(;t!=null&&t!==e;){let o=t.nextSibling;z(t),t=o}},uo=function(){return this()},Br=function(n){return this(n)},Pr=()=>{throw new Error("value is readonly.")},Vr={get:uo,set:Br,enumerable:!0,configurable:!1},_r={get:uo,set:Pr,enumerable:!0,configurable:!1},Oe=(n,e)=>{Object.defineProperty(n,"value",e?_r:Vr)},lo=(n,e)=>{if(!n)return!1;if(n.startsWith("["))return n.substring(1,n.length-1);let t=e.length;return n.startsWith(e)?n.substring(t,n.length-t):!1},Rt=n=>`[${CSS.escape(n)}]`,vt=(n,e)=>(n.startsWith("@")&&(n=e.u.on+":"+n.slice(1)),n.includes("[")&&(n=n.replace(/[[\]]/g,e.u.dynamic)),n),Tn=n=>{let e=Object.create(null);return t=>e[t]||(e[t]=n(t))},jr=/-(\w)/g,$=Tn(n=>n&&n.replace(jr,(e,t)=>t?t.toUpperCase():"")),$r=/\B([A-Z])/g,Ke=Tn(n=>n&&n.replace($r,"-$1").toLowerCase()),st=Tn(n=>n&&n.charAt(0).toUpperCase()+n.slice(1));var wt={mount:()=>{}};var We=n=>{let e=n.trim();return e?e.split(/\s+/):[]};var St=n=>{var t,o;let e=(t=gt(n))==null?void 0:t.onMounted;e==null||e.forEach(r=>{r()}),(o=n.mounted)==null||o.call(n)};var xn=Symbol("scope"),At=n=>{try{eo();let e=n();mn(e);let t={context:e,unmount:()=>Se(e),[xn]:1};return t[xn]=1,t}finally{to()}},fo=n=>D(n)?xn in n:!1;var Nt=Symbol("ref"),Z=Symbol("sref"),Ot=Symbol("raw");var C=n=>n!=null&&n[Z]===1;var Cn={collectRefObj:!0,mount:({parseResult:n})=>({update:({values:e})=>{let t=n.context,o=e[0];if(D(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=t[s];a!==i&&(C(a)?a(i):t[s]=i)}}})};var ee=(n,e)=>{var t;(t=Le(e))==null||t.onUnmounted.push(n)};var oe=(n,e,t,o=!0)=>{if(!C(n))throw j(3,"observe");t&&e(n());let s=n(void 0,void 0,0,e);return o&&ee(s,!0),s};var Ge=(n,e)=>{if(n===e)return()=>{};let t=oe(n,r=>e(r)),o=oe(e,r=>n(r));return e(n()),()=>{t(),o()}};var Je=n=>!!n&&n[Ot]===1;var De=n=>(n==null?void 0:n[Nt])===1;var de=[],po=n=>{var e;de.length!==0&&((e=de[de.length-1])==null||e.add(n))},Ue=n=>{if(!n)return()=>{};let e={stop:()=>{}};return qr(n,e),ee(()=>e.stop(),!0),e.stop},qr=(n,e)=>{if(!n)return;let t=[],o=!1,r=()=>{for(let s of t)s();t=[],o=!0};e.stop=r;try{let s=new Set;if(de.push(s),n(i=>t.push(i)),o)return;for(let i of[...s]){let a=oe(i,()=>{r(),Ue(n)});t.push(a)}}finally{de.pop()}},Mt=n=>{let e=de.length,t=e>0&&de[e-1];try{return t&&de.push(null),n()}finally{t&&de.pop()}},kt=n=>{try{let e=new Set;return de.push(e),{value:n(),refs:[...e]}}finally{de.pop()}};var Y=(n,e,t)=>{if(!C(n))return;let o=n;if(o(void 0,e,1),!t)return;let r=o();if(r){if(w(r)||ue(r))for(let s of r)Y(s,e,!0);else if(we(r))for(let s of r)Y(s[0],e,!0),Y(s[1],e,!0);if(D(r))for(let s in r)Y(r[s],e,!0)}};function Fr(n,e,t){Object.defineProperty(n,e,{value:t,enumerable:!1,writable:!0,configurable:!0})}var Qe=(n,e,t)=>{t.forEach(function(o){let r=n[o];Fr(e,o,function(...i){let a=r.apply(this,i),c=this[Z];for(let u of c)Y(u);return a})})},Lt=(n,e)=>{Object.defineProperty(n,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var mo=Array.prototype,En=Object.create(mo),zr=["push","pop","shift","unshift","splice","sort","reverse"];Qe(mo,En,zr);var ho=Map.prototype,It=Object.create(ho),Kr=["set","clear","delete"];Lt(It,"Map");Qe(ho,It,Kr);var yo=Set.prototype,Dt=Object.create(yo),Wr=["add","clear","delete"];Lt(Dt,"Set");Qe(yo,Dt,Wr);var ge={},se=n=>{if(C(n)||Je(n))return n;let e={auto:!0,_value:n},t=c=>D(c)?Z in c?!0:w(c)?(Object.setPrototypeOf(c,En),!0):ue(c)?(Object.setPrototypeOf(c,Dt),!0):we(c)?(Object.setPrototypeOf(c,It),!0):!1:!1,o=t(n),r=new Set,s=(c,u)=>{if(ge.stack&&ge.stack.length){ge.stack[ge.stack.length-1].add(a);return}r.size!==0&&Mt(()=>{for(let l of[...r.keys()])r.has(l)&&l(c,u)})},i=c=>{let u=c[Z];u||(c[Z]=u=new Set),u.add(a)},a=(...c)=>{if(!(2 in c)){let l=c[0],f=c[1];return 0 in c?e._value===l||C(l)&&(l=l(),e._value===l)?l:(t(l)&&i(l),e._value=l,e.auto&&s(l,f),e._value):(po(a),e._value)}switch(c[2]){case 0:{let l=c[3];if(!l)return()=>{};let f=p=>{r.delete(p)};return r.add(l),()=>{f(l)}}case 1:{let l=c[1],f=e._value;s(f,l);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Z]=1,Oe(a,!1),o&&i(n),a};var be=n=>{if(Je(n))return n;let e;if(C(n)?(e=n,n=e()):e=se(n),n instanceof Node||n instanceof Date||n instanceof RegExp||n instanceof Promise||n instanceof Error)return e;if(e[Nt]=1,w(n)){let t=n.length;for(let o=0;o<t;++o){let r=n[o];De(r)||(n[o]=be(r))}return e}if(!D(n))return e;for(let t of Object.entries(n)){let o=t[1];if(De(o))continue;let r=t[0];tt(r)||(n[r]=null,n[r]=be(o))}return e};var go=Symbol("modelBridge"),Ut=()=>{},Gr=n=>!!(n!=null&&n[go]),Jr=n=>{n[go]=1},Qr=n=>{let e=be(n());return Jr(e),e},bo={collectRefObj:!0,mount:({parseResult:n,option:e})=>{if(typeof e!="string"||!e)return Ut;let t=$(e),o,r,s=Ut,i=()=>{s(),s=Ut,o=void 0,r=void 0},a=()=>{s(),s=Ut},c=(l,f)=>{o!==l&&(a(),s=Ge(l,f),o=l)},u=()=>{var h;let l=(h=n.refs[0])!=null?h:n.value()[0],f=n.context,p=f[t];if(!C(l)){if(r&&p===r){r(l);return}if(i(),C(p)){p(l);return}f[t]=l;return}if(Gr(l)){if(p===l)return;C(p)?c(l,p):f[t]=l;return}r||(r=Qr(l)),f[t]=r,c(l,r)};return{update:()=>{u()},unmount:()=>{s()}}}};var Ht=class{constructor(e){m(this,"r");m(this,"be");m(this,"xe","");m(this,"Te",-1);this.r=e,this.be=e.o.u.inherit}N(e){this.ot(e)}rt(e){if(this.Te!==e.size){let t=[...e.keys()];this.xe=[...t,...t.map(Ke)].join(","),this.Te=e.size}return this.xe}st(e){var t;for(let o=0;o<e.length;++o){let r=(t=e[o])==null?void 0:t.components;if(r)for(let s in r)return!0}return!1}it(e){if(!me(e))return!1;let t=e.getAttributeNames();return e.hasAttribute("name")?!0:t.some(o=>o.startsWith("#"))}at(e){return me(e)&&e.getAttributeNames().length===0}ot(e){let t=this.r,o=t.m,r=t.o.X,s=t.o.$;if(r.size===0&&!this.st(o.p))return;let i=o.Y(),a=this.Re();if(q(a))return;let c=this.ct(e,a);for(let u of c){if(u.hasAttribute(t.R))continue;let l=u.parentNode;if(!l)continue;let f=u.nextSibling,p=$(u.tagName).toUpperCase(),h=i[p],y=h!=null?h:s.get(p);if(!y)continue;let d=y.template;if(!d)continue;let x=u.parentElement;if(!x)continue;let b=new Comment(" begin component: "+u.tagName),E=new Comment(" end component: "+u.tagName);x.insertBefore(b,u),u.remove();let I=t.o.u.context,G=t.o.u.contextAlias,V=t.o.u.bind,_=(g,S)=>{let v={},J=g.hasAttribute(I);return o.C(S,()=>{o.v(v),J?t.y(Cn,g,I):g.hasAttribute(G)&&t.y(Cn,g,G);let O=y.props;if(!O||O.length===0)return;O=O.map($);let R=new Map(O.map(k=>[k.toLowerCase(),k]));for(let k of[...O,...O.map(Ke)]){let ne=g.getAttribute(k);ne!==null&&(v[$(k)]=ne,g.removeAttribute(k))}let A=t.q.Ce(g,!1);for(let[k,ne]of A.entries()){let[ae,fe]=ne.Z;if(!fe)continue;let H=R.get($(fe).toLowerCase());H&&(ae!=="."&&ae!==":"&&ae!==V||t.y(bo,g,k,!0,H,ne.ee))}}),v},te=[...o.V()],re=()=>{var J;let g=_(u,te),S=new qe(g,u,te,b,E),v=At(()=>{var O;return(O=y.context(S))!=null?O:{}}).context;if(S.autoProps){for(let[O,R]of Object.entries(g))if(O in v){let A=v[O];if(A===R)continue;if(C(A)){C(R)?S.entangle?F(b,Ge(R,A)):A(R()):A(R);continue}}else v[O]=R;(J=S.onAutoPropsAssigned)==null||J.call(S)}return{componentCtx:v,head:S}},{componentCtx:M,head:T}=re(),N=[...Ce(d)],Q=N.length,Ve=u.childNodes.length===0,_e=g=>{var R;let S=g.parentElement,v=g.name;if(q(v)&&(v=g.getAttributeNames().filter(A=>A.startsWith("#"))[0],q(v)?v="default":v=v.substring(1)),Ve){if(v==="default"){let A=t.o.u.text,k=u.getAttribute(A);if(!q(k)){let ne=document.createElement("span");ne.setAttribute(A,k),S.insertBefore(ne,g),u.removeAttribute(A);return}}for(let A of[...g.childNodes])S.insertBefore(A,g);return}let J=u.querySelector(`template[name='${v}'], template[\\#${v}]`);!J&&v==="default"&&(J=(R=[...u.querySelectorAll("template:not([name])")].find(k=>this.at(k)))!=null?R:null);let O=A=>{T.enableSwitch&&o.C(te,()=>{o.v(M);let k=_(g,o.V());o.C(te,()=>{o.v(k);let ne=o.V(),ae=ro(ne);for(let fe of A)Te(fe)&&(fe.setAttribute(ot,ae),dn(ae),F(fe,()=>{hn(ae)}))})})};if(J){let A=[...Ce(J)];for(let k of A)S.insertBefore(k,g);O(A)}else{if(v!=="default"){for(let k of[...Ce(g)])S.insertBefore(k,g);return}let A=[...Ce(u)].filter(k=>!this.it(k));for(let k of A)S.insertBefore(k,g);O(A)}},an=g=>{if(!Te(g))return;let S=g.querySelectorAll("slot");if(co(g)){_e(g),g.remove();return}for(let v of S)_e(v),v.remove()};(()=>{for(let g=0;g<Q;++g)N[g]=N[g].cloneNode(!0),l.insertBefore(N[g],f),an(N[g])})(),x.insertBefore(E,f);let ut=()=>{if(!y.inheritAttrs)return;let g=N.filter(v=>v.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(v=>v.hasAttribute(this.be)));let S=g[0];if(S)for(let v of u.getAttributeNames()){if(v===I||v===G)continue;let J=u.getAttribute(v);if(v==="class"){let O=We(J);O.length>0&&S.classList.add(...O)}else if(v==="style"){let O=S.style,R=u.style;for(let A of R)O.setProperty(A,R.getPropertyValue(A))}else S.setAttribute(vt(v,t.o),J)}},L=()=>{for(let g of u.getAttributeNames())!g.startsWith("@")&&!g.startsWith(t.o.u.on)&&u.removeAttribute(g)},X=()=>{ut(),L(),o.v(M),t.Ee(u,!1),M.$emit=T.emit,Ne(t,N),F(u,()=>{Se(M)}),F(b,()=>{he(u)}),St(M)};o.C(te,X)}}Re(){let e=this.r,t=e.m,o=e.o.X,r=t.ut(),s=this.rt(o);return[...s?[s]:[],...r,...r.map(Ke)].join(",")}ct(e,t){var s;let o=[];if(q(t))return o;if((s=e.matches)!=null&&s.call(e,t))return[e];let r=this.F(e).reverse();for(;r.length>0;){let i=r.pop();if(i.matches(t)){o.push(i);continue}r.push(...this.F(i).reverse())}return o}j(e,t){let o=this.Re(),r=this.F(e).reverse();for(;r.length>0;){let s=r.pop();t(s),!(!q(o)&&s.matches(o))&&r.push(...this.F(s).reverse())}}F(e){let t=e==null?void 0:e.children;if((t==null?void 0:t.length)!=null){let r=[];for(let s=0;s<t.length;++s){let i=t[s];Te(i)&&r.push(i)}return r}let o=e==null?void 0:e.childNodes;if((o==null?void 0:o.length)!=null){let r=[];for(let s=0;s<o.length;++s){let i=o[s];Te(i)&&r.push(i)}return r}return[]}};var Rn=class{constructor(e,t){m(this,"Z");m(this,"ee");m(this,"ve",[]);this.Z=e,this.ee=t}},Bt=class{constructor(e){m(this,"r");m(this,"we");m(this,"Se");m(this,"te");var o;this.r=e,this.we=e.o.lt(),this.te=new Map;let t=new Map;for(let r of this.we){let s=(o=r[0])!=null?o:"",i=t.get(s);i?i.push(r):t.set(s,[r])}this.Se=t}Ae(e){let t=this.te.get(e);if(t)return t;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);q(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],u=!1,l=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!u&&h==="camel"?u=!0:!l&&h==="prop"&&(l=!0),u&&l)break}u&&(a[a.length-1]=$(a[a.length-1])),l&&(a[0]=".");let f={terms:a,flags:c};return this.te.set(e,f),f}Ce(e,t){let o=new Map;if(!rt(e))return o;let r=this.Se,s=(a,c)=>{var l;let u=r.get((l=c[0])!=null?l:"");if(u)for(let f=0;f<u.length;++f){if(!c.startsWith(u[f]))continue;let p=o.get(c);if(!p){let h=this.Ae(c);p=new Rn(h.terms,h.flags),o.set(c,p)}p.ve.push(a);return}},i=a=>{var u;let c=a.attributes;if(!(!c||c.length===0))for(let l=0;l<c.length;++l){let f=(u=c.item(l))==null?void 0:u.name;f&&s(a,f)}};return i(e),!t||!e.firstElementChild||this.r.O.j(e,i),o}};var To=()=>{},Xr=(n,e)=>{for(let t of n){let o=t.cloneNode(!0);e.appendChild(o)}},Pt=class{constructor(e){m(this,"r");m(this,"I");this.r=e,this.I=e.o.u.is}N(e){let t=e.hasAttribute(this.I);return(t||e.hasAttribute("is"))&&this.y(e),this.r.O.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),t}y(e){let t=e.getAttribute(this.I);if(!t){if(t=e.getAttribute("is"),!t)return;if(!t.startsWith("regor:")){if(!t.startsWith("r-"))return;let o=t.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.r._(s);return}t=`'${t.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.k(e,t)}P(e,t){let o=ze(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${t!=null?t:""}`);r.insertBefore(s,e),Fe(s,o),o.forEach(a=>{z(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${t!=null?t:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}k(e,t){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.P(e,` => ${t} `),a=this.r.m.L(t),c=a.value,u=this.r.m,l=u.V(),f={name:""},p=me(e)?o:[...o[0].childNodes],h=()=>{u.C(l,()=>{var E;let x=c()[0];if(D(x)&&(x.name?x=x.name:x=(E=Object.entries(u.Y()).filter(I=>I[1]===x)[0])==null?void 0:E[0]),!W(x)||q(x)){xe(s,i);return}if(f.name===x)return;xe(s,i);let b=document.createElement(x);for(let I of e.getAttributeNames())I!==this.I&&b.setAttribute(I,e.getAttribute(I));Xr(p,b),r.insertBefore(b,i),this.r._(b),f.name=x})},y=To;F(s,()=>{a.stop(),y(),y=To}),h(),y=a.subscribe(h)}};var P=n=>{let e=n;return e!=null&&e[Z]===1?e():e};var Yr=(n,e)=>{let[t,o]=e;K(o)?o(n,t):n.innerHTML=t==null?void 0:t.toString()},Vt={mount:()=>({update:({el:n,values:e})=>{Yr(n,e)}})};var _t=class n{constructor(e){m(this,"ne");this.ne=e}static pt(e,t){var h,y;let o=e.m,r=e.o,s=r.u,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.B,c=o.Y();if(Object.keys(c).length>0||r.$.size>0)return;let u=e.q,l=[],f=0,p=[];for(let d=t.length-1;d>=0;--d)p.push(t[d]);for(;p.length>0;){let d=p.pop();if(d.nodeType===Node.ELEMENT_NODE){let b=d;if(b.tagName==="TEMPLATE"||b.tagName.includes("-"))return;let E=$(b.tagName).toUpperCase();if(r.$.has(E)||c[E])return;let I=b.attributes;for(let G=0;G<I.length;++G){let V=(h=I.item(G))==null?void 0:h.name;if(!V)continue;if(i.has(V))return;let{terms:_,flags:te}=u.Ae(V),[re,M]=_,T=(y=a[V])!=null?y:a[re];if(T){if(T===Vt)return;l.push({nodeIndex:f,attrName:V,directive:T,option:M,flags:te})}}++f}let x=d.childNodes;for(let b=x.length-1;b>=0;--b)p.push(x[b])}if(l.length!==0)return new n(l)}y(e,t){let o=[],r=[];for(let s=t.length-1;s>=0;--s)r.push(t[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.ne.length;++s){let i=this.ne[s],a=o[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var Zr=(n,e)=>{let t=e.parentNode;if(t)for(let o=0;o<n.items.length;++o)t.insertBefore(n.items[o],e)},es=n=>{var a;let e=n.length,t=n.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let u=n[c];if(u===0)continue;let l=o[o.length-1];if(l===void 0||n[l]<u){t[c]=l!=null?l:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,n[o[i]]<u?r=i+1:s=i;u<n[o[r]]&&(r>0&&(t[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=t[s];return o},jt=class{static ft(e){let{oldItems:t,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,u=t.length,l=o.length,f=new Array(l),p=new Set;for(let T=0;T<l;++T){let N=r(o[T]);if(N===void 0||p.has(N))return;p.add(N),f[T]=N}let h=new Array(l),y=0,d=u-1,x=l-1;for(;y<=d&&y<=x;){let T=t[y];if(r(T.value)!==f[y]||!s(T.value,o[y]))break;T.value=o[y],h[y]=T,++y}for(;y<=d&&y<=x;){let T=t[d];if(r(T.value)!==f[x]||!s(T.value,o[x]))break;T.value=o[x],h[x]=T,--d,--x}if(y>d){for(let T=x;T>=y;--T){let N=T+1<l?h[T+1].items[0]:c;h[T]=i(T,o[T],N)}return h}if(y>x){for(let T=y;T<=d;++T)a(t[T]);return h}let b=y,E=y,I=x-E+1,G=new Array(I).fill(0),V=new Map;for(let T=E;T<=x;++T)V.set(f[T],T);let _=!1,te=0;for(let T=b;T<=d;++T){let N=t[T],Q=V.get(r(N.value));if(Q===void 0){a(N);continue}if(!s(N.value,o[Q])){a(N);continue}N.value=o[Q],h[Q]=N,G[Q-E]=T+1,Q>=te?te=Q:_=!0}let re=_?es(G):[],M=re.length-1;for(let T=I-1;T>=0;--T){let N=E+T,Q=N+1<l?h[N+1].items[0]:c;if(G[T]===0){h[N]=i(N,o[N],Q);continue}let Ve=h[N];_&&(M>=0&&re[M]===T?--M:Ve&&Zr(Ve,Q))}return h}};var it=class{constructor(e){m(this,"T",[]);m(this,"D",new Map);m(this,"oe");this.oe=e}get w(){return this.T.length}re(e){let t=this.oe(e.value);t!==void 0&&this.D.set(t,e)}se(e){var o;let t=this.oe((o=this.T[e])==null?void 0:o.value);t!==void 0&&this.D.delete(t)}static mt(e,t){return{items:[],index:e,value:t,order:-1}}v(e){e.order=this.w,this.T.push(e),this.re(e)}dt(e,t){let o=this.w;for(let r=e;r<o;++r)this.T[r].order=r+1;t.order=e,this.T.splice(e,0,t),this.re(t)}U(e){return this.T[e]}ie(e,t){this.se(e),this.T[e]=t,this.re(t),t.order=e}Ne(e){this.se(e),this.T.splice(e,1);let t=this.w;for(let o=e;o<t;++o)this.T[o].order=o}Me(e){let t=this.w;for(let o=e;o<t;++o)this.se(o);this.T.splice(e)}Zt(e){return this.D.has(e)}yt(e){var o;let t=this.D.get(e);return(o=t==null?void 0:t.order)!=null?o:-1}};var vn=Symbol("r-for"),ts=n=>-1,xo=()=>{},qt=class qt{constructor(e){m(this,"r");m(this,"x");m(this,"Oe");m(this,"R");this.r=e,this.x=e.o.u.for,this.Oe=Rt(this.x),this.R=e.o.u.pre}N(e){let t=e.hasAttribute(this.x);return t&&this.ke(e),this.r.O.j(e,o=>{o.hasAttribute(this.x)&&this.ke(o)}),t}Q(e){return e[vn]?!0:(e[vn]=!0,Et(e,this.Oe).forEach(t=>t[vn]=!0),!1)}ke(e){if(e.hasAttribute(this.R)||this.Q(e))return;let t=e.getAttribute(this.x);if(!t){B(0,this.x,e);return}e.removeAttribute(this.x),this.ht(e,t)}Le(e){return pe(e)?[]:(K(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))}ht(e,t){var ut;let o=this.gt(t);if(!(o!=null&&o.list)){B(1,this.x,t,e);return}let r=this.r.o.u.key,s=this.r.o.u.keyBind,i=(ut=e.getAttribute(r))!=null?ut:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=ze(e),c=_t.pt(this.r,a),u=e.parentNode;if(!u)return;let l=`${this.x} => ${t}`,f=new Comment(`__begin__ ${l}`);u.insertBefore(f,e),Fe(f,a),a.forEach(L=>{z(L)}),e.remove();let p=new Comment(`__end__ ${l}`);u.insertBefore(p,f.nextSibling);let h=this.r,y=h.m,d=y.V(),b=d.length===1?[void 0,d[0]]:void 0,E=this.bt(i),I=(L,X)=>E(L)===E(X),G=(L,X)=>L===X,V=(L,X,g)=>{let S=o.createContext(X,L),v=it.mt(S.index,X),J=()=>{var k,ne;let O=(ne=(k=p.parentNode)!=null?k:f.parentNode)!=null?ne:u,R=g.previousSibling,A=[];for(let ae=0;ae<a.length;++ae){let fe=a[ae].cloneNode(!0);O.insertBefore(fe,g),A.push(fe)}for(c?c.y(h,A):Ne(h,A),R=R.nextSibling;R!==g;)v.items.push(R),R=R.nextSibling};return b?(b[0]=S.ctx,y.C(b,J)):y.C(d,()=>{y.v(S.ctx),J()}),v},_=(L,X)=>{let g=U.U(L).items,S=g[g.length-1].nextSibling;for(let v of g)z(v);U.ie(L,V(L,X,S))},te=(L,X)=>{U.v(V(L,X,p))},re=L=>{for(let X of U.U(L).items)z(X)},M=L=>{let X=U.w;for(let g=L;g<X;++g)U.U(g).index(g)},T=L=>{let X=f.parentNode,g=p.parentNode;if(!X||!g)return;let S=U.w;K(L)&&(L=L());let v=P(L[0]);if(w(v)&&v.length===0){xe(f,p),U.Me(0);return}let J=[];for(let H of this.Le(L[0]))J.push(H);let O=jt.ft({oldItems:U.T,newValues:J,getKey:E,isSameValue:G,mountNewValue:(H,ce,ke)=>V(H,ce,ke),removeMountItem:H=>{for(let ce=0;ce<H.items.length;++ce)z(H.items[ce])},endAnchor:p});if(O){U.T=O,U.D.clear();for(let H=0;H<O.length;++H){let ce=O[H];ce.order=H,ce.index(H);let ke=E(ce.value);ke!==void 0&&U.D.set(ke,ce)}return}let R=0,A=Number.MAX_SAFE_INTEGER,k=S,ne=this.r.o.forGrowThreshold,ae=()=>U.w<k+ne;for(let H of J){let ce=()=>{if(R<S){let ke=U.U(R++);if(I(ke.value,H)){if(G(ke.value,H))return;_(R-1,H);return}let lt=U.yt(E(H));if(lt>=R&&lt-R<10){if(--R,A=Math.min(A,R),re(R),U.Ne(R),--S,lt>R+1)for(let cn=R;cn<lt-1&&cn<S&&!I(U.U(R).value,H);)++cn,re(R),U.Ne(R),--S;ce();return}ae()?(U.dt(R-1,V(R,H,U.U(R-1).items[0])),A=Math.min(A,R-1),++S):_(R-1,H)}else te(R++,H)};ce()}let fe=R;for(S=U.w;R<S;)re(R++);U.Me(fe),M(A)},N=()=>{Q.stop(),_e(),_e=xo},Q=y.L(o.list),Ve=Q.value,_e=xo,an=0,U=new it(E);for(let L of this.Le(Ve()[0]))U.v(V(an++,L,p));F(f,N),_e=Q.subscribe(T)}gt(e){var c,u;let t=qt.xt.exec(e);if(!t)return;let o=(t[1]+((c=t[2])!=null?c:"")).split(",").map(l=>l.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(u=o[r])!=null&&u.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=t[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(l,f)=>{let p={},h=P(l);if(!a&&o.length===1)p[o[0]]=l;else if(w(h)){let d=0;for(let x of o)p[x]=h[d++]}else for(let d of o)p[d]=h[d];let y={ctx:p,index:ts};return s&&(y.index=p[s.startsWith("#")?s.substring(1):s]=se(f)),y}}}bt(e){if(!e)return o=>o;let t=e.trim();if(!t)return o=>o;if(t.includes(".")){let o=this.Tt(t),r=o.length>1?o.slice(1):void 0;return s=>{let i=P(s),a=this.Ve(i,o);return a!==void 0||!r?a:this.Ve(i,r)}}return o=>{var r;return P((r=P(o))==null?void 0:r[t])}}Tt(e){return e.split(".").filter(t=>t.length>0)}Ve(e,t){var r;let o=e;for(let s of t)o=(r=P(o))==null?void 0:r[s];return P(o)}};m(qt,"xt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var $t=qt;var Ft=class{constructor(e){m(this,"ae",0);m(this,"ce",new Map);m(this,"m");m(this,"Ie");m(this,"De");m(this,"Ue");m(this,"O");m(this,"q");m(this,"o");m(this,"R");m(this,"Pe");this.m=e,this.o=e.o,this.De=new $t(this),this.Ie=new Ct(this),this.Ue=new Pt(this),this.O=new Ht(this),this.q=new Bt(this),this.R=this.o.u.pre,this.Pe=this.o.u.dynamic}Rt(e){let t=me(e)?[e]:e.querySelectorAll("template");for(let o of t){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Ne(this,i)}}_(e){++this.ae;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Ie.N(e)||this.De.N(e)||this.Ue.N(e))return;this.O.N(e),this.Rt(e),this.Ee(e,!0)}finally{--this.ae,this.ae===0&&this.Ct()}}Et(e,t){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(t)}Be(e,t){let o=this.Et(e,t);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${t}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,F(s,()=>{z(e)}),o.appendChild(e),!0}vt(e,t){this.ce.set(e,t)}Ct(){let e=this.ce;if(e.size!==0){this.ce=new Map;for(let[t,o]of e.entries())this.Be(t,o)}}Ee(e,t){var s;let o=this.q.Ce(e,t),r=this.o.B;for(let[i,a]of o.entries()){let[c,u]=a.Z,l=(s=r[i])!=null?s:r[c];if(!l){console.error("directive not found:",c);continue}let f=a.ve;for(let p=0;p<f.length;++p){let h=f[p];this.y(l,h,i,!1,u,a.ee)}}}y(e,t,o,r,s,i){if(t.hasAttribute(this.R))return;let a=t.getAttribute(o);t.removeAttribute(o);let c=u=>{let l=u;for(;l;){let f=l.getAttribute(ot);if(f)return f;l=l.parentElement}return null};if(yn()){let u=c(t);if(u){this.m.C(so(u),()=>{this.k(e,t,a,s,i)});return}}this.k(e,t,a,s,i)}wt(e,t,o){return e!==wt?!1:(q(o)||this.Be(t,o)||this.vt(t,o),!0)}k(e,t,o,r,s){if(t.nodeType!==Node.ELEMENT_NODE||o==null||this.wt(e,t,o))return;let i=this.St(r,e.once),a=this.At(e,o),c=this.Nt(a,i);F(t,c.stop);let u=this.Mt(t,o,a,i,r,s),l=this.Ot(e,u,c);if(!l)return;let f=this.kt(u,a,i,r,l);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}St(e,t){let o=lo(e,this.Pe);if(o)return this.m.L($(o),void 0,void 0,void 0,t)}At(e,t){return this.m.L(t,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,t){let o={stop:()=>{var r,s,i;e.stop(),t==null||t.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Mt(e,t,o,r,s,i){return{el:e,expr:t,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}Ot(e,t,o){let r=e.mount(t);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}kt(e,t,o,r,s){let i,a;return()=>{let c=t.value(),u=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=u,e.previousOption=a,i=c,a=u,s(e)}}};var Co="http://www.w3.org/1999/xlink",ns={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 os(n){return!!n||n===""}var rs=(n,e,t,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=$(o)),zt(n,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let u=e[c];if(w(u)){let l=(a=t==null?void 0:t[c])==null?void 0:a[0],f=u[0],p=u[1];zt(n,f,p,l)}else if(D(u))for(let l of Object.entries(u)){let f=l[0],p=l[1],h=t==null?void 0:t[c],y=h&&f in h?f:void 0;zt(n,f,p,y)}else{let l=t==null?void 0:t[c],f=e[c++],p=e[c];zt(n,f,p,l)}}},wn={mount:()=>({update:({el:n,values:e,previousValues:t,option:o,previousOption:r,flags:s})=>{rs(n,e,t,o,r,s)}})},zt=(n,e,t,o)=>{if(o&&o!==e&&n.removeAttribute(o),pe(e)){B(3,"r-bind",n);return}if(!W(e)){B(6,`Attribute key is not string at ${n.outerHTML}`,e);return}if(e.startsWith("xlink:")){pe(t)?n.removeAttributeNS(Co,e.slice(6,e.length)):n.setAttributeNS(Co,e,t);return}let r=e in ns;pe(t)||r&&!os(t)?n.removeAttribute(e):n.setAttribute(e,r?"":t)};var ss=(n,e,t)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=t==null?void 0:t[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Eo(n,s[c],i==null?void 0:i[c])}else Eo(n,s,i)}},Sn={mount:()=>({update:({el:n,values:e,previousValues:t})=>{ss(n,e,t)}})},Eo=(n,e,t)=>{let o=n.classList,r=W(e),s=W(t);if(e&&!r){if(t&&!s)for(let i in t)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else if(r){if(t!==e){let i=s?We(t):[],a=We(e);i.length>0&&o.remove(...i),a.length>0&&o.add(...a)}}else if(t){let i=s?We(t):[];i.length>0&&o.remove(...i)}};function is(n,e){if(n.length!==e.length)return!1;let t=!0;for(let o=0;t&&o<n.length;o++)t=Ee(n[o],e[o]);return t}function Ee(n,e){if(n===e)return!0;let t=fn(n),o=fn(e);if(t||o)return t&&o?n.getTime()===e.getTime():!1;if(t=tt(n),o=tt(e),t||o)return n===e;if(t=w(n),o=w(e),t||o)return t&&o?is(n,e):!1;if(t=D(n),o=D(e),t||o){if(!t||!o)return!1;let r=Object.keys(n).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in n){let a=Object.prototype.hasOwnProperty.call(n,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Ee(n[i],e[i]))return!1}return!0}return String(n)===String(e)}function Kt(n,e){return n.findIndex(t=>Ee(t,e))}var Ro=n=>{let e=parseFloat(n);return isNaN(e)?n:e};var Wt=n=>{if(!C(n))throw j(3,"pause");n(void 0,void 0,3)};var Gt=n=>{if(!C(n))throw j(3,"resume");n(void 0,void 0,4)};var wo={mount:({el:n,parseResult:e,flags:t})=>({update:({values:o})=>{as(n,o[0])},unmount:cs(n,e,t)})},as=(n,e)=>{let t=Oo(n);if(t&&So(n))w(e)?e=Kt(e,Re(n))>-1:ue(e)?e=e.has(Re(n)):e=ds(n,e),n.checked=e;else if(t&&Ao(n))n.checked=Ee(e,Re(n));else if(t||Mo(n))No(n)?n.value!==(e==null?void 0:e.toString())&&(n.value=e):n.value!==e&&(n.value=e);else if(ko(n)){let o=n.options,r=o.length,s=n.multiple;for(let i=0;i<r;i++){let a=o[i],c=Re(a);if(s)w(e)?a.selected=Kt(e,c)>-1:a.selected=e.has(c);else if(Ee(Re(a),e)){n.selectedIndex!==i&&(n.selectedIndex=i);return}}!s&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}else B(7,n)},at=n=>(C(n)&&(n=n()),K(n)&&(n=n()),n?W(n)?{trim:n.includes("trim"),lazy:n.includes("lazy"),number:n.includes("number"),int:n.includes("int")}:{trim:!!n.trim,lazy:!!n.lazy,number:!!n.number,int:!!n.int}:{trim:!1,lazy:!1,number:!1,int:!1}),So=n=>n.type==="checkbox",Ao=n=>n.type==="radio",No=n=>n.type==="number"||n.type==="range",Oo=n=>n.tagName==="INPUT",Mo=n=>n.tagName==="TEXTAREA",ko=n=>n.tagName==="SELECT",cs=(n,e,t)=>{let o=e.value,r=at(t==null?void 0:t.join(",")),s=at(o()[1]),i={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 B(8,n),()=>{};let a=()=>e.refs[0],c=Oo(n);return c&&So(n)?ls(n,a):c&&Ao(n)?hs(n,a):c||Mo(n)?us(n,i,a,o):ko(n)?ys(n,a,o):(B(7,n),()=>{})},vo=/[.,' ·٫]/,us=(n,e,t,o)=>{let s=e.lazy?"change":"input",i=No(n),a=()=>{!e.trim&&!at(o()[1]).trim||(n.value=n.value.trim())},c=p=>{let h=p.target;h.composing=1},u=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},l=()=>{n.removeEventListener(s,f),n.removeEventListener("change",a),n.removeEventListener("compositionstart",c),n.removeEventListener("compositionend",u),n.removeEventListener("change",u)},f=p=>{let h=t();if(!h)return;let y=p.target;if(!y||y.composing)return;let d=y.value,x=at(o()[1]);if(i||x.number||x.int){if(x.int)d=parseInt(d);else{if(vo.test(d[d.length-1])&&d.split(vo).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),n.value=d}else x.trim&&(d=d.trim());h(d)};return n.addEventListener(s,f),n.addEventListener("change",a),n.addEventListener("compositionstart",c),n.addEventListener("compositionend",u),n.addEventListener("change",u),l},ls=(n,e)=>{let t="change",o=()=>{n.removeEventListener(t,r)},r=()=>{let s=e();if(!s)return;let i=Re(n),a=n.checked,c=s();if(w(c)){let u=Kt(c,i),l=u!==-1;a&&!l?c.push(i):!a&&l&&c.splice(u,1)}else ue(c)?a?c.add(i):c.delete(i):s(ms(n,a))};return n.addEventListener(t,r),o},Re=n=>"_value"in n?n._value:n.value,Lo="trueValue",fs="falseValue",Io="true-value",ps="false-value",ms=(n,e)=>{let t=e?Lo:fs;if(t in n)return n[t];let o=e?Io:ps;return n.hasAttribute(o)?n.getAttribute(o):e},ds=(n,e)=>{if(Lo in n)return Ee(e,n.trueValue);let o=Io;return n.hasAttribute(o)?Ee(e,n.getAttribute(o)):Ee(e,!0)},hs=(n,e)=>{let t="change",o=()=>{n.removeEventListener(t,r)},r=()=>{let s=e();if(!s)return;let i=Re(n);s(i)};return n.addEventListener(t,r),o},ys=(n,e,t)=>{let o="change",r=()=>{n.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=at(t()[1]).number,u=Array.prototype.filter.call(n.options,l=>l.selected).map(l=>c?Ro(Re(l)):Re(l));if(n.multiple){let l=i();try{if(Wt(i),ue(l)){l.clear();for(let f of u)l.add(f)}else w(l)?(l.splice(0),l.push(...u)):i(u)}finally{Gt(i),Y(i)}}else i(u[0])};return n.addEventListener(o,s),r};var gs=["stop","prevent","capture","self","once","left","right","middle","passive"],bs=n=>{let e={};if(q(n))return;let t=n.split(",");for(let o of gs)e[o]=t.includes(o);return e},Ts=(n,e,t,o,r)=>{var u,l;if(o){let f=e.value(),p=P(o.value()[0]);return W(p)?An(n,$(p),()=>e.value()[0],(u=r==null?void 0:r.join(","))!=null?u:f[1]):()=>{}}else if(t){let f=e.value();return An(n,$(t),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:f[1])}let s=[],i=()=>{s.forEach(f=>f())},a=e.value(),c=a.length;for(let f=0;f<c;++f){let p=a[f];if(K(p)&&(p=p()),D(p))for(let h of Object.entries(p)){let y=h[0],d=()=>{let b=e.value()[f];return K(b)&&(b=b()),b=b[y],K(b)&&(b=b()),b},x=p[y+"_flags"];s.push(An(n,y,d,x))}else B(2,"r-on",n)}return i},Nn={isLazy:(n,e)=>e===-1&&n%2===0,isLazyKey:(n,e)=>e===0&&!n.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:n,parseResult:e,option:t,dynamicOption:o,flags:r})=>Ts(n,e,t,o,r)},xs=(n,e)=>{if(n.startsWith("keydown")||n.startsWith("keyup")||n.startsWith("keypress")){e!=null||(e="");let t=[...n.split("."),...e.split(",")];n=t[0];let o=t[1],r=t.includes("ctrl"),s=t.includes("shift"),i=t.includes("alt"),a=t.includes("meta"),c=u=>!(r&&!u.ctrlKey||s&&!u.shiftKey||i&&!u.altKey||a&&!u.metaKey);return o?[n,u=>c(u)?u.key.toUpperCase()===o.toUpperCase():!1]:[n,c]}return[n,t=>!0]},An=(n,e,t,o)=>{if(q(e))return B(5,"r-on",n),()=>{};let r=bs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=xs(e,o);let a=l=>{if(!i(l)||!t&&e==="submit"&&(r!=null&&r.prevent))return;let f=t(l);K(f)&&(f=f(l)),K(f)&&f(l)},c=()=>{n.removeEventListener(e,u,s)},u=l=>{if(!r){a(l);return}try{if(r.left&&l.button!==0||r.middle&&l.button!==1||r.right&&l.button!==2||r.self&&l.target!==n)return;r.stop&&l.stopPropagation(),r.prevent&&l.preventDefault(),a(l)}finally{r.once&&c()}};return n.addEventListener(e,u,s),c};var Cs=(n,e,t,o)=>{if(t){o&&o.includes("camel")&&(t=$(t)),Xe(n,t,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];Xe(n,a,c)}else if(D(i))for(let a of Object.entries(i)){let c=a[0],u=a[1];Xe(n,c,u)}else{let a=e[s++],c=e[s];Xe(n,a,c)}}},Do={mount:()=>({update:({el:n,values:e,option:t,flags:o})=>{Cs(n,e,t,o)}})};function Es(n){return!!n||n===""}var Xe=(n,e,t)=>{if(pe(e)){B(3,":prop",n);return}if(e==="innerHTML"||e==="textContent"){let s=[...n.childNodes];setTimeout(()=>s.forEach(he),1),n[e]=t!=null?t:"";return}let o=n.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){n._value=t;let s=o==="OPTION"?n.getAttribute("value"):n.value,i=t!=null?t:"";s!==i&&(n.value=i),t==null&&n.removeAttribute(e);return}let r=!1;if(t===""||t==null){let s=typeof n[e];s==="boolean"?t=Es(t):t==null&&s==="string"?(t="",r=!0):s==="number"&&(t=0,r=!0)}try{n[e]=t}catch(s){r||B(4,e,o,t,s)}r&&n.removeAttribute(e)};var Uo={once:!0,mount:({el:n,parseResult:e,expr:t})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(n):i?i==null||i(n):o.context[t]=n,()=>{if(s){let a=r.indexOf(n);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Rs=(n,e)=>{let t=Ae(n).data,o=t._ord;Yn(o)&&(o=t._ord=n.style.display),!!e[0]?n.style.display=o:n.style.display="none"},Ho={mount:()=>({update:({el:n,values:e})=>{Rs(n,e)}})};var vs=(n,e,t)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=t==null?void 0:t[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Bo(n,s[c],i==null?void 0:i[c])}else Bo(n,s,i)}},Jt={mount:()=>({update:({el:n,values:e,previousValues:t})=>{vs(n,e,t)}})},Bo=(n,e,t)=>{let o=n.style,r=W(e);if(e&&!r){if(t&&!W(t))for(let s in t)e[s]==null&&Mn(o,s,"");for(let s in e)Mn(o,s,e[s])}else{let s=o.display;if(r?t!==e&&(o.cssText=e):t&&n.removeAttribute("style"),"_ord"in Ae(n).data)return;o.display=s}},Po=/\s*!important$/;function Mn(n,e,t){if(w(t))t.forEach(o=>{Mn(n,e,o)});else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{let o=ws(n,e);Po.test(t)?n.setProperty(Ke(o),t.replace(Po,""),"important"):n[o]=t}}var Vo=["Webkit","Moz","ms"],On={};function ws(n,e){let t=On[e];if(t)return t;let o=$(e);if(o!=="filter"&&o in n)return On[e]=o;o=st(o);for(let r=0;r<Vo.length;r++){let s=Vo[r]+o;if(s in n)return On[e]=s}return e}var ie=n=>_o(P(n)),_o=(n,e=new WeakMap)=>{if(!n||!D(n))return n;if(w(n))return n.map(ie);if(ue(n)){let o=new Set;for(let r of n.keys())o.add(ie(r));return o}if(we(n)){let o=new Map;for(let r of n)o.set(ie(r[0]),ie(r[1]));return o}if(e.has(n))return P(e.get(n));let t=mt({},n);e.set(n,t);for(let o of Object.entries(t))t[o[0]]=_o(P(o[1]),e);return t};var Ss=(n,e)=>{var o;let t=e[0];n.textContent=ue(t)?JSON.stringify(ie([...t])):we(t)?JSON.stringify(ie([...t])):D(t)?JSON.stringify(ie(t)):(o=t==null?void 0:t.toString())!=null?o:""},jo={mount:()=>({update:({el:n,values:e})=>{Ss(n,e)}})};var $o={mount:()=>({update:({el:n,values:e})=>{Xe(n,"value",e[0])}})};var Me=class Me{constructor(e){m(this,"B",{});m(this,"u",{});m(this,"lt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));m(this,"X",new Map);m(this,"$",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Vt()}static getDefault(){var e;return(e=Me.He)!=null?e:Me.He=new Me}Vt(){let e={},t=globalThis;for(let o of Me.Lt.split(","))e[o]=t[o];return e.ref=be,e.sref=se,e.flatten=ie,e}addComponent(...e){for(let t of e){if(!t.defaultName){nt.warning("Registered component's default name is not defined",t);continue}this.X.set(st(t.defaultName),t),this.$.set(st(t.defaultName).toLocaleUpperCase(),t)}}setDirectives(e){this.B={".":Do,":":wn,"@":Nn,[`${e}on`]:Nn,[`${e}bind`]:wn,[`${e}html`]:Vt,[`${e}text`]:jo,[`${e}show`]:Ho,[`${e}model`]:wo,":style":Jt,[`${e}style`]:Jt,[`${e}bind:style`]:Jt,":class":Sn,[`${e}bind:class`]:Sn,":ref":Uo,":value":$o,[`${e}teleport`]:wt},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)}};m(Me,"He"),m(Me,"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");var le=Me;var Qt=(n,e)=>{if(!n)return;let o=(e!=null?e:le.getDefault()).u,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Ns(n,o.pre,s))As(i,o.text,r,s)},As=(n,e,t,o)=>{var c;let r=n.textContent;if(!r)return;let s=t,i=r.split(s);if(i.length<=1)return;if(((c=n.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let u=i[1],l=qo(u,o);if(l&&q(i[0])&&q(i[2])){let f=n.parentElement;f.setAttribute(e,u.substring(l.start.length,u.length-l.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let u of i){let l=qo(u,o);if(l){let f=document.createElement("span");f.setAttribute(e,u.substring(l.start.length,u.length-l.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(u))}n.replaceWith(a)},Ns=(n,e,t)=>{let o=[],r=s=>{var i;if(s.nodeType===Node.TEXT_NODE)t.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of Ce(s))r(a)}};return r(n),o},qo=(n,e)=>e.find(t=>n.startsWith(t.start)&&n.endsWith(t.end));var Os=9,Ms=10,ks=13,Ls=32,ve=46,Xt=44,Is=39,Ds=34,Yt=40,Ye=41,Zt=91,kn=93,Ln=63,Us=59,Fo=58,zo=123,en=125,He=43,tn=45,In=96,Ko=47,Dn=92,Wo=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},Hs=Gn(mt({"=>":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}),er=Object.keys(Zo),Bs=new Set(er),Hn=new Set(["=>"]);er.forEach(n=>Hn.add(n));var Go={true:!0,false:!1,null:null},Ps="this",Ze="Expected ",Be="Unexpected ",Pn="Unclosed ",Vs=Ze+":",Jo=Ze+"expression",_s="missing }",js=Be+"object property",$s=Pn+"(",Qo=Ze+"comma",Xo=Be+"token ",qs=Be+"period",Un=Ze+"expression after ",Fs="missing unaryOp argument",zs=Pn+"[",Ks=Ze+"exponent (",Ws="Variable names cannot start with a number (",Gs=Pn+'quote after "',ct=n=>n>=48&&n<=57,Yo=n=>Hs[n],Bn=class{constructor(e){m(this,"l");m(this,"e");this.l=e,this.e=0}get H(){return this.l.charAt(this.e)}get h(){return this.l.charCodeAt(this.e)}f(e){return this.l.charCodeAt(this.e)===e}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}ue(e){return this.K(e)||ct(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,t=this.l,o=this.e;for(;e===Ls||e===Os||e===Ms||e===ks;)e=t.charCodeAt(++o);this.e=o}parse(){let e=this.le();return e.length===1?e[0]:{type:0,body:e}}le(e){let t=[];for(;this.e<this.l.length;){let o=this.h;if(o===Us||o===Xt)this.e++;else{let r=this.S();if(r)t.push(r);else if(this.e<this.l.length){if(o===e)break;throw this.i(Be+'"'+this.H+'"')}}}return t}S(){var t;let e=(t=this.It())!=null?t:this.je();return this.g(),this.Dt(e)}pe(){this.g();let e=this.l,t=this.e,o=e.charCodeAt(t),r=e.charCodeAt(t+1),s=e.charCodeAt(t+2),i=e.charCodeAt(t+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.ue(e.charCodeAt(t+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}je(){let e,t,o,r,s,i,a,c;if(s=this.z(),!s||(t=this.pe(),!t))return s;if(r={value:t,prec:Yo(t),right_a:Hn.has(t)},i=this.z(),!i)throw this.i(Un+t);let u=[s,r,i];for(;t=this.pe();){o=Yo(t),r={value:t,prec:o,right_a:Hn.has(t)},c=t;let l=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;u.length>2&&l(u[u.length-2]);)i=u.pop(),t=u.pop().value,s=u.pop(),e=this._e(t,s,i),u.push(e);if(e=this.z(),!e)throw this.i(Un+c);u.push(r,e)}for(a=u.length-1,e=u[a];a>1;)e=this._e(u[a-1].value,u[a-2],e),a-=2;return e}z(){let e;if(this.g(),e=this.Ut(),e)return this.fe(e);let t=this.h;if(ct(t)||t===ve)return this.Pt();if(t===Is||t===Ds)e=this.Bt();else if(t===Zt)e=this.Ht();else{let o=this.jt();if(o){let r=this.z();if(!r)throw this.i(Fs);return this.fe({type:7,operator:o,argument:r})}this.K(t)?(e=this.me(),e.name in Go?e={type:4,value:Go[e.name],raw:e.name}:e.name===Ps&&(e={type:5})):t===Yt&&(e=this._t())}return e?(e=this.W(e),this.fe(e)):!1}_e(e,t,o){if(e==="=>"){let r=t.type===1?t.expressions:[t];return{type:15,params:r,body:o}}return Bs.has(e)?{type:16,operator:e,left:t,right:o}:{type:8,operator:e,left:t,right:o}}Ut(){let e={node:!1};return this.$t(e),e.node||(this.qt(e),e.node)||(this.Ft(e),e.node)||(this.$e(e),e.node)||this.Kt(e),e.node}fe(e){let t={node:e};return this.zt(t),this.Wt(t),this.Gt(t),t.node}jt(){let e=this.l,t=this.e,o=e.charCodeAt(t),r=e.charCodeAt(t+1),s=e.charCodeAt(t+2),i=e.charCodeAt(t+3);return o===tn?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===He?(this.e++,"+"):o===110&&r===101&&s===119&&!this.ue(i)?(this.e+=3,"new"):!1}It(){let e={};return this.Jt(e),e.node}Dt(e){let t={node:e};return this.Qt(t),t.node}W(e){this.g();let t=this.h;for(;t===ve||t===Zt||t===Yt||t===Ln;){let o;if(t===Ln){if(this.l.charCodeAt(this.e+1)!==ve)break;o=!0,this.e+=2,this.g(),t=this.h}if(this.e++,t===Zt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),t=this.h,t!==kn)throw this.i(zs);this.e++}else t===Yt?e={type:6,arguments:this.qe(Ye),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.me()});o&&(e.optional=!0),this.g(),t=this.h}return e}Pt(){let e=this.l,t=this.e,o=t;for(;ct(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===ve)for(o++;ct(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===He||a===tn)&&o++;let c=o;for(;ct(e.charCodeAt(o));)o++;if(c===o){this.e=o;let u=e.slice(t,o);throw this.i(Ks+u+this.H+")")}}this.e=o;let s=e.slice(t,o),i=e.charCodeAt(o);if(this.K(i))throw this.i(Ws+s+this.H+")");if(i===ve||s.length===1&&s.charCodeAt(0)===ve)throw this.i(qs);return{type:4,value:parseFloat(s),raw:s}}Bt(){let e=this.l,t=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,u=!1;for(;s<t;){let f=e.charCodeAt(s);if(f===r){u=!0,this.e=s+1;break}if(f===Dn){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.Fe(p)),s+=2,i=s}else s++}let l=c?a.join("")+e.slice(i,u?s:t):e.slice(i,u?s:t);if(!u)throw this.e=s,this.i(Gs+l+'"');return{type:4,value:l,raw:e.substring(o,this.e)}}Fe(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)}}me(){let e=this.h,t=this.e;if(this.K(e))this.e++;else throw this.i(Be+this.H);for(;this.e<this.l.length&&(e=this.h,this.ue(e));)this.e++;return{type:2,name:this.l.slice(t,this.e)}}qe(e){let t=[],o=!1,r=0;for(;this.e<this.l.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===Ye&&r&&r>=t.length)throw this.i(Xo+String.fromCharCode(e));break}else if(s===Xt){if(this.e++,r++,r!==t.length){if(e===Ye)throw this.i(Xo+",");for(let i=t.length;i<r;i++)t.push(null)}}else{if(t.length!==r&&r!==0)throw this.i(Qo);{let i=this.S();if(!i||i.type===0)throw this.i(Qo);t.push(i)}}}if(!o)throw this.i(Ze+String.fromCharCode(e));return t}_t(){this.e++;let e=this.le(Ye);if(this.f(Ye))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i($s)}Ht(){return this.e++,{type:9,elements:this.qe(kn)}}$t(e){if(this.f(zo)){this.e++;let t=[];for(;!isNaN(this.h);){if(this.g(),this.f(en)){this.e++,e.node=this.W({type:10,properties:t});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(Xt)||this.f(en)))t.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Fo)){this.e++;let r=this.S();if(!r)throw this.i(js);let s=o.type===9;t.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else t.push(o);this.f(Xt)&&this.e++}throw this.i(_s)}}qt(e){let t=this.h;if((t===He||t===tn)&&t===this.l.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:t===He?"++":"--",argument:this.W(this.me()),prefix:!0};if(!o.argument||!Wo.has(o.argument.type))throw this.i(Be+o.operator)}}Wt(e){let t=e.node,o=this.h;if((o===He||o===tn)&&o===this.l.charCodeAt(this.e+1)){if(!Wo.has(t.type))throw this.i(Be+(o===He?"++":"--"));this.e+=2,e.node={type:13,operator:o===He?"++":"--",argument:t,prefix:!1}}}Ft(e){this.l.charCodeAt(this.e)===ve&&this.l.charCodeAt(this.e+1)===ve&&this.l.charCodeAt(this.e+2)===ve&&(this.e+=3,e.node={type:14,argument:this.S()})}Qt(e){if(e.node&&this.f(Ln)){this.e++;let t=e.node,o=this.S();if(!o)throw this.i(Jo);if(this.g(),this.f(Fo)){this.e++;let r=this.S();if(!r)throw this.i(Jo);e.node={type:11,test:t,consequent:o,alternate:r}}else throw this.i(Vs)}}Jt(e){if(this.g(),this.f(Yt)){let t=this.e;if(this.e++,this.g(),this.f(Ye)){this.e++;let o=this.pe();if(o==="=>"){let r=this.je();if(!r)throw this.i(Un+o);e.node={type:15,params:null,body:r};return}}this.e=t}}Gt(e){let t=e.node,o=t.type;(o===2||o===3)&&this.f(In)&&(e.node={type:17,tag:t,quasi:this.$e(e)})}$e(e){if(!this.f(In))return;let t=this.l,o=t.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,u=l=>{if(!c){let h=t.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:l})}i.push(t.slice(s,this.e)),a.push(t.slice(s,this.e));let f=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:l})};for(;this.e<o;){let l=t.charCodeAt(this.e);if(l===In)return u(!0),this.e+=1,e.node=r,r;if(l===36&&t.charCodeAt(this.e+1)===zo){if(u(!1),this.e+=2,r.expressions.push(...this.le(en)),!this.f(en))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(l===Dn){c||(c=!0),i.push(t.slice(s,this.e)),a.push(t.slice(s,this.e));let f=t.charCodeAt(this.e+1);i.push(t.slice(this.e,this.e+2)),a.push(this.Fe(f)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}zt(e){let t=e.node;if(!t||t.operator!=="new"||!t.argument)return;if(!t.argument||![6,3].includes(t.argument.type))throw this.i("Expected new function()");e.node=t.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}Kt(e){if(!this.f(Ko))return;let t=++this.e,o=!1;for(;this.e<this.l.length;){if(this.h===Ko&&!o){let r=this.l.slice(t,this.e),s="";for(;++this.e<this.l.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.l.slice(t-1,this.e)},e.node=this.W(e.node),e.node}this.f(Zt)?o=!0:o&&this.f(kn)&&(o=!1),this.e+=this.f(Dn)?2:1}throw this.i("Unclosed Regex")}},tr=n=>new Bn(n).parse();var Js={"=>":(n,e)=>{},"=":(n,e)=>{},"*=":(n,e)=>{},"**=":(n,e)=>{},"/=":(n,e)=>{},"%=":(n,e)=>{},"+=":(n,e)=>{},"-=":(n,e)=>{},"<<=":(n,e)=>{},">>=":(n,e)=>{},">>>=":(n,e)=>{},"&=":(n,e)=>{},"^=":(n,e)=>{},"|=":(n,e)=>{},"||":(n,e)=>n()||e(),"??":(n,e)=>{var t;return(t=n())!=null?t:e()},"&&":(n,e)=>n()&&e(),"|":(n,e)=>n|e,"^":(n,e)=>n^e,"&":(n,e)=>n&e,"==":(n,e)=>n==e,"!=":(n,e)=>n!=e,"===":(n,e)=>n===e,"!==":(n,e)=>n!==e,"<":(n,e)=>n<e,">":(n,e)=>n>e,"<=":(n,e)=>n<=e,">=":(n,e)=>n>=e,in:(n,e)=>n in e,"<<":(n,e)=>n<<e,">>":(n,e)=>n>>e,">>>":(n,e)=>n>>>e,"+":(n,e)=>n+e,"-":(n,e)=>n-e,"*":(n,e)=>n*e,"/":(n,e)=>n/e,"%":(n,e)=>n%e,"**":(n,e)=>pt(n,e)},Qs={"-":n=>-n,"+":n=>+n,"!":n=>!n,"~":n=>~n,new:n=>n},sr=n=>{if(!(n!=null&&n.some(rr)))return n;let e=[];return n.forEach(t=>rr(t)?e.push(...t):e.push(t)),e},nr=(...n)=>sr(n),Vn=(n,e)=>{if(!n)return e;let t=Object.create(e!=null?e:{});return t.$event=n,t},Xs={"++":(n,e)=>{let t=n[e];if(C(t)){let o=t();return t(++o),o}return++n[e]},"--":(n,e)=>{let t=n[e];if(C(t)){let o=t();return t(--o),o}return--n[e]}},Ys={"++":(n,e)=>{let t=n[e];if(C(t)){let o=t();return t(o+1),o}return n[e]++},"--":(n,e)=>{let t=n[e];if(C(t)){let o=t();return t(o-1),o}return n[e]--}},or={"=":(n,e,t)=>{let o=n[e];return C(o)?o(t):n[e]=t},"+=":(n,e,t)=>{let o=n[e];return C(o)?o(o()+t):n[e]+=t},"-=":(n,e,t)=>{let o=n[e];return C(o)?o(o()-t):n[e]-=t},"*=":(n,e,t)=>{let o=n[e];return C(o)?o(o()*t):n[e]*=t},"/=":(n,e,t)=>{let o=n[e];return C(o)?o(o()/t):n[e]/=t},"%=":(n,e,t)=>{let o=n[e];return C(o)?o(o()%t):n[e]%=t},"**=":(n,e,t)=>{let o=n[e];return C(o)?o(pt(o(),t)):n[e]=pt(n[e],t)},"<<=":(n,e,t)=>{let o=n[e];return C(o)?o(o()<<t):n[e]<<=t},">>=":(n,e,t)=>{let o=n[e];return C(o)?o(o()>>t):n[e]>>=t},">>>=":(n,e,t)=>{let o=n[e];return C(o)?o(o()>>>t):n[e]>>>=t},"|=":(n,e,t)=>{let o=n[e];return C(o)?o(o()|t):n[e]|=t},"&=":(n,e,t)=>{let o=n[e];return C(o)?o(o()&t):n[e]&=t},"^=":(n,e,t)=>{let o=n[e];return C(o)?o(o()^t):n[e]^=t}},nn=(n,e)=>K(n)?n.bind(e):n,_n=class{constructor(e,t,o,r,s){m(this,"p");m(this,"Ke");m(this,"ze");m(this,"We");m(this,"A");m(this,"Ge");m(this,"Je");this.p=w(e)?e:[e],this.Ke=t,this.ze=o,this.We=r,this.Je=!!s}Qe(e,t){if(t&&e in t)return t;for(let o of this.p)if(e in o)return o}2(e,t,o){let r=e.name;if(r==="$root")return this.p[this.p.length-1];if(r==="$parent")return this.p[1];if(r==="$ctx")return[...this.p];if(o&&r in o)return this.A=o[r],nn(P(o[r]),o);for(let i of this.p)if(r in i)return this.A=i[r],nn(P(i[r]),i);let s=this.Ke;if(s&&r in s)return this.A=s[r],nn(P(s[r]),s)}5(e,t,o){return this.p[0]}0(e,t,o){return this.Xe(t,o,nr,...e.body)}1(e,t,o){return this.E(t,o,(...r)=>r.pop(),...e.expressions)}3(e,t,o){let{obj:r,key:s}=this.de(e,t,o),i=r==null?void 0:r[s];return this.A=i,nn(P(i),r)}4(e,t,o){return e.value}6(e,t,o){let r=(i,...a)=>K(i)?i(...sr(a)):i,s=this.E(++t,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,t,o){return this.E(t,o,Qs[e.operator],e.argument)}8(e,t,o){let r=Js[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,t,o),()=>this.b(e.right,t,o))}return this.E(t,o,r,e.left,e.right)}9(e,t,o){return this.Xe(++t,o,nr,...e.elements)}10(e,t,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.E(++t,o,s,...e.properties),r}11(e,t,o){return this.E(t,o,r=>this.b(r?e.consequent:e.alternate,t,o),e.test)}12(e,t,o){var l;let r={},s=f=>(f==null?void 0:f.type)!==15,i=(l=this.We)!=null?l:()=>!1,a=t===0&&this.Je,c=f=>this.Ye(a,e.key,t,Vn(f,o)),u=f=>this.Ye(a,e.value,t,Vn(f,o));if(e.shorthand){let f=e.key.name;r[f]=s(e.key)&&i(f,t)?c:c()}else if(e.computed){let f=P(c());r[f]=s(e.value)&&i(f,t)?u:u()}else{let f=e.key.type===4?e.key.value:e.key.name;r[f]=s(e.value)&&i(f,t)?()=>u:u()}return r}de(e,t,o){let r=this.b(e.object,t,o),s=e.computed?this.b(e.property,t,o):e.property.name;return{obj:r,key:s}}13(e,t,o){let r=e.argument,s=e.operator,i=e.prefix?Xs:Ys;if(r.type===2){let a=r.name,c=this.Qe(a,o);return pe(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.de(r,t,o);return i[s](a,c)}}16(e,t,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Qe(i,o);if(pe(a))return;let c=this.b(e.right,t,o);return or[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.de(r,t,o),c=this.b(e.right,t,o);return or[s](i,a,c)}}14(e,t,o){let r=this.b(e.argument,t,o);return w(r)&&(r.s=ir),r}17(e,t,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},t,o)}19(e,t,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(t,o,r,...e.expressions)}18(e,t,o){return e.value.cooked}20(e,t,o){let r=(s,...i)=>new s(...i);return this.E(t,o,r,e.callee,...e.arguments)}15(e,t,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.b(e.body,t,s)}}b(e,t,o){let r=P(this[e.type](e,t,o));return this.Ge=e.type,r}Ye(e,t,o,r){let s=this.b(t,o,r);return e&&this.Ze()?this.A:s}Ze(){let e=this.Ge;return(e===2||e===3||e===6)&&C(this.A)}eval(e,t){let{value:o,refs:r}=kt(()=>this.b(e,-1,t)),s={value:o,refs:r};return this.Ze()&&(s.ref=this.A),s}E(e,t,o,...r){let s=r.map(i=>i&&this.b(i,e,t));return o(...s)}Xe(e,t,o,...r){let s=this.ze;if(!s)return this.E(e,t,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?u=>this.b(a,e,Vn(u,t)):this.b(a,e,t)));return o(...i)}},ir=Symbol("s"),rr=n=>(n==null?void 0:n.s)===ir,ar=(n,e,t,o,r,s,i)=>new _n(e,t,o,r,i).eval(n,s);var cr={},ur=n=>!!n,on=class{constructor(e,t){m(this,"p");m(this,"o");m(this,"et",[]);this.p=e,this.o=t}v(e){this.p=[e,...this.p]}Y(){return this.p.map(t=>t.components).filter(ur).reverse().reduce((t,o)=>{for(let[r,s]of Object.entries(o))t[r.toUpperCase()]=s;return t},{})}ut(){let e=[],t=new Set,o=this.p.map(r=>r.components).filter(ur).reverse();for(let r of o)for(let s of Object.keys(r))t.has(s)||(t.add(s),e.push(s));return e}L(e,t,o,r,s){var b;let i=[],a=[],c=new Set,u=()=>{for(let E=0;E<a.length;++E)a[E]();a.length=0},p={value:()=>i,stop:()=>{u(),c.clear()},subscribe:(E,I)=>(c.add(E),I&&E(i),()=>{c.delete(E)}),refs:[],context:this.p[0]};if(q(e))return p;let h=this.o.globalContext,y=[],d=new Set,x=(E,I,G,V)=>{try{let _=ar(E,I,h,t,o,V,r);return G&&_.refs.length>0&&y.push(..._.refs),{value:_.value,refs:_.refs,ref:_.ref}}catch(_){B(6,`evaluation error: ${e}`,_)}return{value:void 0,refs:[]}};try{let E=(b=cr[e])!=null?b:tr("["+e+"]");cr[e]=E;let I=this.p.slice(),G=E.elements,V=G.length,_=new Array(V);p.refs=_;let te=()=>{y.length=0,s||(d.clear(),u());let re=new Array(V);for(let M=0;M<V;++M){let T=G[M];if(t!=null&&t(M,-1)){re[M]=Q=>x(T,I,!1,{$event:Q}).value;continue}let N=x(T,I,!0);re[M]=N.value,_[M]=N.ref}if(!s)for(let M of y)d.has(M)||(d.add(M),a.push(oe(M,te)));if(i=re,c.size!==0)for(let M of c)c.has(M)&&M(i)};te()}catch(E){B(6,`parse error: ${e}`,E)}return p}V(){return this.p.slice()}ie(e){this.et.push(this.p),this.p=e}C(e,t){try{this.ie(e),t()}finally{this.Xt()}}Xt(){var e;this.p=(e=this.et.pop())!=null?e:[]}};var lr=n=>{let e=n.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||n==="-"||n==="_"||n===":"},Zs=(n,e)=>{let t="";for(let o=e;o<n.length;++o){let r=n[o];if(t){r===t&&(t="");continue}if(r==='"'||r==="'"){t=r;continue}if(r===">")return o}return-1},ei=(n,e)=>{let t=e?2:1;for(;t<n.length&&(n[t]===" "||n[t]===`
3
+ `);)++t;if(t>=n.length||!lr(n[t]))return null;let o=t;for(;t<n.length&&lr(n[t]);)++t;return{start:o,end:t}},fr=new Set(["table","thead","tbody","tfoot"]),ti=new Set(["thead","tbody","tfoot"]),ni=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),oi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),pr=(n,e)=>`${n.slice(0,n.length-2)}></${e}>`,rn=n=>{var s;let e=0,t=[],o=[],r=0;for(;e<n.length;){let i=n.indexOf("<",e);if(i===-1){t.push(n.slice(e));break}if(t.push(n.slice(e,i)),n.startsWith("<!--",i)){let b=n.indexOf("-->",i+4);if(b===-1){t.push(n.slice(i));break}t.push(n.slice(i,b+3)),e=b+3;continue}let a=Zs(n,i);if(a===-1){t.push(n.slice(i));break}let c=n.slice(i,a+1),u=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){t.push(c),e=a+1;continue}let f=ei(c,u);if(!f){t.push(c),e=a+1;continue}let p=c.slice(f.start,f.end);if(u){let b=o[o.length-1];b?(o.pop(),t.push(b.replacementHost?`</${b.replacementHost}>`:c),fr.has(b.effectiveTag)&&--r):t.push(c),e=a+1;continue}let h=c.charCodeAt(c.length-2)===47,y=o[o.length-1],d=null;r===0?p==="tr"?d="trx":p==="td"?d="tdx":p==="th"&&(d="thx"):ti.has((s=y==null?void 0:y.effectiveTag)!=null?s:"")?d=p==="tr"?null:"tr":(y==null?void 0:y.effectiveTag)==="table"?d=ni.has(p)?null:"tr":(y==null?void 0:y.effectiveTag)==="tr"&&(d=p==="td"||p==="th"?null:"td");let x=h&&!oi.has(d||p);if(d){let b=d==="trx"||d==="tdx"||d==="thx",E=`${c.slice(0,f.start)}${d} is="${b?`r-${p}`:`regor:${p}`}"${c.slice(f.end)}`;t.push(x?pr(E,d):E)}else t.push(x?pr(c,p):c);if(!h){let b=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||p;o.push({replacementHost:d,effectiveTag:b}),fr.has(b)&&++r}e=a+1}return t.join("")};var ri="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",si=new Set(ri.toUpperCase().split(",")),ii="http://www.w3.org/2000/svg",mr=(n,e)=>{me(n)?n.content.appendChild(e):n.appendChild(e)},jn=(n,e,t,o)=>{var i;let r=n.t;if(r){let a=t&&si.has(r.toUpperCase())?document.createElementNS(ii,r.toLowerCase()):document.createElement(r),c=n.a;if(c)for(let l of Object.entries(c)){let f=l[0],p=l[1];f.startsWith("#")&&(p=f.substring(1),f="name"),a.setAttribute(vt(f,o),p)}let u=n.c;if(u)for(let l of u)jn(l,a,t,o);mr(e,a);return}let s=n.d;if(s){let a;switch((i=n.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)mr(e,a);else throw new Error("unsupported node type.")}},Pe=(n,e,t)=>{t!=null||(t=le.getDefault());let o=document.createDocumentFragment();if(!w(n))return jn(n,o,!!e,t),o;for(let r of n)jn(r,o,!!e,t);return o};var dr=(n,e={selector:"#app"},t)=>{W(e)&&(e={selector:"#app",template:e}),fo(n)&&(n=n.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Te(o))throw j(0);t||(t=le.getDefault());let r=()=>{for(let a of[...o.childNodes])z(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(rn(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=Pe(e.json,e.isSVG,t);r(),s(a.childNodes)}return t.useInterpolation&&Qt(o,t),new $n(n,o,t).y(),F(o,()=>{Se(n)}),St(n),{context:n,unmount:()=>{z(o)},unbind:()=>{he(o)}}},$n=class{constructor(e,t,o){m(this,"Yt");m(this,"tt");m(this,"o");m(this,"m");m(this,"r");this.Yt=e,this.tt=t,this.o=o,this.m=new on([e],o),this.r=new Ft(this.m)}y(){this.r._(this.tt)}};var et=n=>{if(w(n))return n.map(r=>et(r));let e={};if(n.tagName)e.t=n.tagName;else return n.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),n.textContent&&(e.d=n.textContent),e;let t=n.getAttributeNames();t.length>0&&(e.a=Object.fromEntries(t.map(r=>{var s;return[r,(s=n.getAttribute(r))!=null?s:""]})));let o=Ce(n);return o.length>0&&(e.c=[...o].map(r=>et(r))),e};var hr=(n,e={})=>{var s,i,a,c,u,l;w(e)&&(e={props:e}),W(n)&&(n={template:n});let t=(s=e.context)!=null?s:()=>({}),o=!1;if(n.element){let f=n.element;f.remove(),n.element=f}else if(n.selector){let f=document.querySelector(n.selector);if(!f)throw j(1,n.selector);f.remove(),n.element=f}else if(n.template){let f=document.createRange().createContextualFragment(rn(n.template));n.element=f}else n.json&&(n.element=Pe(n.json,n.isSVG,e.config),o=!0);n.element||(n.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Qt(n.element,(a=e.config)!=null?a:le.getDefault());let r=n.element;if(!o&&(((u=n.isSVG)!=null?u:rt(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||rt(r)&&r.querySelector("[isSVG]"))){let f=r.content,p=f?[...f.childNodes]:[...r.childNodes],h=et(p);n.element=Pe(h,!0,e.config)}return{context:t,template:n.element,inheritAttrs:(l=e.inheritAttrs)!=null?l:!0,props:e.props,defaultName:e.defaultName}};var sn=class{constructor(){m(this,"byConstructor",new Map)}register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let t=e.constructor;this.byConstructor.get(t)===e&&this.byConstructor.delete(t)}find(e){for(let t of this.byConstructor.values())if(t instanceof e)return t}require(e){let t=this.find(e);if(t)return t;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var yr=n=>{var e;(e=Le())==null||e.onMounted.push(n)};var gr=n=>{let e,t={},o=(...r)=>{if(r.length<=2&&0 in r)throw j(4);return e&&!t.isStopped?e(...r):(e=ai(n,t),e(...r))};return o[Z]=1,Oe(o,!0),o.stop=()=>{var r,s;return(s=(r=t.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},ee(()=>o.stop(),!0),o},ai=(n,e)=>{var s;let t=(s=e.ref)!=null?s:se(null);e.ref=t,e.isStopped=!1;let o=0,r=Ue(()=>{if(o>0){r(),e.isStopped=!0,Y(t);return}t(n()),++o});return t.stop=r,t};var br=(n,e)=>{let t={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw j(4);return o&&!t.isStopped?o(...s):(o=ci(n,e,t),o(...s))};return r[Z]=1,Oe(r,!0),r.stop=()=>{var s,i;return(i=(s=t.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ee(()=>r.stop(),!0),r},ci=(n,e,t)=>{var a;let o=(a=t.ref)!=null?a:se(null);t.ref=o,t.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),t.isStopped=!0,Y(o);return}let u=n.map(l=>l());o(e(...u)),++r},i=[];for(let c of n){let u=oe(c,s);i.push(u)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var Tr=(n,e)=>{let t={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw j(4);return o&&!t.isStopped?o(...s):(o=ui(n,e,t),o(...s))};return r[Z]=1,Oe(r,!0),r.stop=()=>{var s,i;return(i=(s=t.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ee(()=>r.stop(),!0),r},ui=(n,e,t)=>{var s;let o=(s=t.ref)!=null?s:se(null);t.ref=o,t.isStopped=!1;let r=0;return o.stop=oe(n,i=>{if(r>0){o.stop(),t.isStopped=!0,Y(o);return}o(e(i)),++r},!0),o};var xr=n=>(n[Ot]=1,n);var Cr=(n,e)=>{if(!e)throw j(5);let o=De(n)?be:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ie(n()))),s=localStorage.getItem(e);if(s!=null)try{n(o(JSON.parse(s)))}catch(a){B(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Ue(r);return ee(i,!0),n};var qn=(n,...e)=>{let t="",o=n,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)t+=o[a],a<i&&(t+=r[a]);return t},Er=qn;var Rr=(n,e,t)=>{let o=[],r=()=>{e(n.map(i=>i()))};for(let i of n)o.push(oe(i,r));t&&r();let s=()=>{for(let i of o)i()};return ee(s,!0),s};var vr=n=>{if(!C(n))throw j(3,"observerCount");return n(void 0,void 0,2)};var wr=n=>{Fn();try{n()}finally{zn()}},Fn=()=>{ge.stack||(ge.stack=[]),ge.stack.push(new Set)},zn=()=>{let n=ge.stack;if(!n||n.length===0)return;let e=n.pop();if(n.length){let t=n[n.length-1];for(let o of e)t.add(o);return}delete ge.stack;for(let t of e)try{Y(t)}catch(o){console.error(o)}};return Ir(li);})();