@jasonshimmy/custom-elements-runtime 1.2.1 → 1.2.3

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.
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var et=typeof document<"u"?document.currentScript:null;const cn={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};let xe=!1;try{const e=globalThis.process;e&&e.env?xe=e.env.NODE_ENV!=="production":typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:et&&et.tagName.toUpperCase()==="SCRIPT"&&et.src||new URL("custom-elements-runtime.cjs.js",document.baseURI).href}<"u"&&cn?xe=!1:xe=typeof window<"u"}catch{xe=!0}function H(e,...t){xe&&console.error(e,...t)}function Q(e,...t){xe&&console.warn(e,...t)}class ln{pendingUpdates=new Map;isFlushScheduled=!1;schedule(t,n){const r=n||t;this.pendingUpdates.set(r,t),this.isFlushScheduled||(this.isFlushScheduled=!0,typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&(window.__vitest__||window.Cypress)?this.flush():queueMicrotask(()=>this.flush()))}flush(){const t=this.pendingUpdates;this.pendingUpdates=new Map,this.isFlushScheduled=!1;for(const n of t.values())try{n()}catch(r){H("Error in batched update:",r)}}get pendingCount(){return this.pendingUpdates.size}}const un=new ln;function we(e,t){un.schedule(e,t)}const Ct=new WeakSet;class fn{static cache=new WeakMap;static arrayHandlerCache=new WeakMap;static objectHandlerCache=new WeakMap;static getOrCreateProxy(t,n,r=!1){const o=this.cache.get(t);if(o)return o;const i=r?this.getOrCreateArrayHandler(n):this.getOrCreateObjectHandler(n),s=new Proxy(t,i);try{zt.markAsProxy(s)}catch{}return this.cache.set(t,s),s}static getOrCreateArrayHandler(t){if(!this.arrayHandlerCache.has(t)){const n={get:(r,o,i)=>{const s=Reflect.get(r,o,i);return typeof s=="function"&&typeof o=="string"&&["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].includes(o)?function(...a){const u=s.apply(r,a);return t.triggerUpdate(),u}:s},set:(r,o,i)=>(r[o]=t.makeReactiveValue(i),t.triggerUpdate(),!0),deleteProperty:(r,o)=>(delete r[o],t.triggerUpdate(),!0)};this.arrayHandlerCache.set(t,n)}return this.arrayHandlerCache.get(t)}static getOrCreateObjectHandler(t){if(!this.objectHandlerCache.has(t)){const n={get:(r,o,i)=>Reflect.get(r,o,i),set:(r,o,i)=>(r[o]=t.makeReactiveValue(i),t.triggerUpdate(),!0),deleteProperty:(r,o)=>(delete r[o],t.triggerUpdate(),!0)};this.objectHandlerCache.set(t,n)}return this.objectHandlerCache.get(t)}static hasProxy(t){return this.cache.has(t)}static clear(){this.cache=new WeakMap,this.arrayHandlerCache=new WeakMap,this.objectHandlerCache=new WeakMap}static getStats(){return{hasCachedProxies:this.cache instanceof WeakMap}}}class zt{static contextCache=new WeakMap;static createReactiveProxy(t,n,r){try{if(Ct.has(t))return t}catch{}const o=Array.isArray(t);let i=this.contextCache.get(n);i||(i=new WeakMap,this.contextCache.set(n,i));let s=i.get(r);return s||(s={triggerUpdate:n,makeReactiveValue:r},i.set(r,s)),fn.getOrCreateProxy(t,s,o)}static markAsProxy(t){if(t)try{Ct.add(t)}catch{}}}class dn{currentComponent=null;componentData=new Map;stateStorage=new Map;trackingDisabled=!1;setCurrentComponent(t,n){if(this.currentComponent=t,!this.componentData.has(t))this.componentData.set(t,{dependencies:new Set,renderFn:n,stateIndex:0,lastWarnTime:0});else{const r=this.componentData.get(t);r.renderFn=n,r.stateIndex=0}}clearCurrentComponent(){this.currentComponent=null}disableTracking(){this.trackingDisabled=!0}enableTracking(){this.trackingDisabled=!1}isRenderingComponent(){return this.currentComponent!==null}shouldEmitRenderWarning(){if(!this.currentComponent)return!0;const t=this.componentData.get(this.currentComponent);if(!t)return!0;const n=Date.now();return n-t.lastWarnTime<1e3?!1:(t.lastWarnTime=n,!0)}withoutTracking(t){const n=this.trackingDisabled;this.trackingDisabled=!0;try{return t()}finally{this.trackingDisabled=n}}getOrCreateState(t){if(!this.currentComponent)return new Ze(t);const n=this.componentData.get(this.currentComponent);if(!n)return new Ze(t);const r=`${this.currentComponent}:${n.stateIndex++}`;let o=this.stateStorage.get(r);return o||(o=new Ze(t),this.stateStorage.set(r,o)),o}trackDependency(t){if(this.trackingDisabled||!this.currentComponent)return;const n=this.componentData.get(this.currentComponent);n&&(n.dependencies.add(t),t.addDependent(this.currentComponent))}triggerUpdate(t){const n=t.getDependents();for(const r of n){const o=this.componentData.get(r);o&&we(o.renderFn,r)}}cleanup(t){const n=this.componentData.get(t);if(n){for(const o of n.dependencies)o.removeDependent(t);this.componentData.delete(t)}const r=t+":";for(const o of this.stateStorage.keys())o.startsWith(r)&&this.stateStorage.delete(o)}}const Y=new dn;class Ze{_value;dependents=new Set;constructor(t){this._value=this.makeReactive(t);try{const n=Symbol.for("@cer/ReactiveState");Object.defineProperty(this,n,{value:!0,enumerable:!1,configurable:!1})}catch{}}get value(){return Y.trackDependency(this),this._value}set value(t){Y.isRenderingComponent()&&Y.shouldEmitRenderWarning()&&Q(`🚨 State modification detected during render! This can cause infinite loops.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var rt=typeof document<"u"?document.currentScript:null;const bn={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};let Ce=!1;try{const e=globalThis.process;e&&e.env?Ce=e.env.NODE_ENV!=="production":typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:rt&&rt.tagName.toUpperCase()==="SCRIPT"&&rt.src||new URL("custom-elements-runtime.cjs.js",document.baseURI).href}<"u"&&bn?Ce=!1:Ce=typeof window<"u"}catch{Ce=!0}function H(e,...t){Ce&&console.error(e,...t)}function G(e,...t){Ce&&console.warn(e,...t)}class vn{pendingUpdates=new Map;isFlushScheduled=!1;schedule(t,n){const r=n||t;this.pendingUpdates.set(r,t),this.isFlushScheduled||(this.isFlushScheduled=!0,typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&(window.__vitest__||window.Cypress)?this.flush():queueMicrotask(()=>this.flush()))}flush(){const t=this.pendingUpdates;this.pendingUpdates=new Map,this.isFlushScheduled=!1;for(const n of t.values())try{n()}catch(r){H("Error in batched update:",r)}}get pendingCount(){return this.pendingUpdates.size}}const wn=new vn;function $e(e,t){wn.schedule(e,t)}const Pt=new WeakSet;class xn{static cache=new WeakMap;static arrayHandlerCache=new WeakMap;static objectHandlerCache=new WeakMap;static getOrCreateProxy(t,n,r=!1){const i=this.cache.get(t);if(i)return i;const o=r?this.getOrCreateArrayHandler(n):this.getOrCreateObjectHandler(n),s=new Proxy(t,o);try{Jt.markAsProxy(s)}catch{}return this.cache.set(t,s),s}static getOrCreateArrayHandler(t){if(!this.arrayHandlerCache.has(t)){const n={get:(r,i,o)=>{const s=Reflect.get(r,i,o);return typeof s=="function"&&typeof i=="string"&&["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].includes(i)?function(...a){const l=s.apply(r,a);return t.triggerUpdate(),l}:s},set:(r,i,o)=>(r[i]=t.makeReactiveValue(o),t.triggerUpdate(),!0),deleteProperty:(r,i)=>(delete r[i],t.triggerUpdate(),!0)};this.arrayHandlerCache.set(t,n)}return this.arrayHandlerCache.get(t)}static getOrCreateObjectHandler(t){if(!this.objectHandlerCache.has(t)){const n={get:(r,i,o)=>Reflect.get(r,i,o),set:(r,i,o)=>(r[i]=t.makeReactiveValue(o),t.triggerUpdate(),!0),deleteProperty:(r,i)=>(delete r[i],t.triggerUpdate(),!0)};this.objectHandlerCache.set(t,n)}return this.objectHandlerCache.get(t)}static hasProxy(t){return this.cache.has(t)}static clear(){this.cache=new WeakMap,this.arrayHandlerCache=new WeakMap,this.objectHandlerCache=new WeakMap}static getStats(){return{hasCachedProxies:this.cache instanceof WeakMap}}}class Jt{static contextCache=new WeakMap;static createReactiveProxy(t,n,r){try{if(Pt.has(t))return t}catch{}const i=Array.isArray(t);let o=this.contextCache.get(n);o||(o=new WeakMap,this.contextCache.set(n,o));let s=o.get(r);return s||(s={triggerUpdate:n,makeReactiveValue:r},o.set(r,s)),xn.getOrCreateProxy(t,s,i)}static markAsProxy(t){if(t)try{Pt.add(t)}catch{}}}class kn{currentComponent=null;componentData=new Map;stateStorage=new Map;trackingDisabled=!1;setCurrentComponent(t,n){if(this.currentComponent=t,!this.componentData.has(t))this.componentData.set(t,{dependencies:new Set,renderFn:n,stateIndex:0,lastWarnTime:0});else{const r=this.componentData.get(t);r.renderFn=n,r.stateIndex=0}}clearCurrentComponent(){this.currentComponent=null}disableTracking(){this.trackingDisabled=!0}enableTracking(){this.trackingDisabled=!1}isRenderingComponent(){return this.currentComponent!==null}shouldEmitRenderWarning(){if(!this.currentComponent)return!0;const t=this.componentData.get(this.currentComponent);if(!t)return!0;const n=Date.now();return n-t.lastWarnTime<1e3?!1:(t.lastWarnTime=n,!0)}withoutTracking(t){const n=this.trackingDisabled;this.trackingDisabled=!0;try{return t()}finally{this.trackingDisabled=n}}getOrCreateState(t){if(!this.currentComponent)return new Ye(t);const n=this.componentData.get(this.currentComponent);if(!n)return new Ye(t);const r=`${this.currentComponent}:${n.stateIndex++}`;let i=this.stateStorage.get(r);return i||(i=new Ye(t),this.stateStorage.set(r,i)),i}trackDependency(t){if(this.trackingDisabled||!this.currentComponent)return;const n=this.componentData.get(this.currentComponent);n&&(n.dependencies.add(t),t.addDependent(this.currentComponent))}triggerUpdate(t){const n=t.getDependents();for(const r of n){const i=this.componentData.get(r);i&&$e(i.renderFn,r)}}cleanup(t){const n=this.componentData.get(t);if(n){for(const i of n.dependencies)i.removeDependent(t);this.componentData.delete(t)}const r=t+":";for(const i of this.stateStorage.keys())i.startsWith(r)&&this.stateStorage.delete(i)}}const ee=new kn;class Ye{_value;dependents=new Set;constructor(t){this._value=this.makeReactive(t);try{const n=Symbol.for("@cer/ReactiveState");Object.defineProperty(this,n,{value:!0,enumerable:!1,configurable:!1})}catch{}}get value(){return ee.trackDependency(this),this._value}set value(t){ee.isRenderingComponent()&&ee.shouldEmitRenderWarning()&&G(`🚨 State modification detected during render! This can cause infinite loops.
2
2
  • Move state updates to event handlers
3
3
  • Use useEffect/watch for side effects
4
- • Ensure computed properties don't modify state`),this._value=this.makeReactive(t),Y.triggerUpdate(this)}addDependent(t){this.dependents.add(t)}removeDependent(t){this.dependents.delete(t)}getDependents(){return this.dependents}makeReactive(t){return t===null||typeof t!="object"||t instanceof Node||t instanceof Element||t instanceof HTMLElement?t:zt.createReactiveProxy(t,()=>Y.triggerUpdate(this),n=>this.makeReactive(n))}}function pn(e){return Y.getOrCreateState(e===void 0?null:e)}function N(e){if(!e||typeof e!="object")return!1;try{const t=Symbol.for("@cer/ReactiveState");return!!e[t]}catch{return!1}}function hn(e){const t=new Ze(e());return{get value(){return Y.trackDependency(t),e()}}}function gn(e,t,n={}){let r=e();n.immediate&&t(r,r);const o=`watch-${Math.random().toString(36).substr(2,9)}`,i=()=>{Y.setCurrentComponent(o,i);const s=e();Y.clearCurrentComponent(),s!==r&&(t(s,r),r=s)};return Y.setCurrentComponent(o,i),e(),Y.clearCurrentComponent(),()=>{Y.cleanup(o)}}const P=e=>{try{e()}catch{}},Fe=new Map,We=new Map,Be=new Map,kt=500;let _t,Ut,St=!1,At=!1,Tt;const mn=!!(globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);function oe(e){if(Fe.has(e))return Fe.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return Fe.size<kt&&Fe.set(e,t),t}function $t(e){if(We.has(e))return We.get(e);const t=e.replace(/-([a-z])/g,(n,r)=>r.toUpperCase());return We.size<kt&&We.set(e,t),t}function ze(e){if(typeof e=="string"){if(Be.has(e))return Be.get(e);const t=e.replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]);return t!==e&&Be.size<kt&&Be.set(e,t),t}return e}function ae(e){if(!e)return"";const t=String(e);if(typeof document<"u"&&typeof document.createElement=="function"){const c=t.replace(/</g,"").replace(/>/g,""),a=Tt||(Tt=document.createElement("div"));try{ae._el=a}catch{}return a.innerHTML=c,(a.textContent||"").replace(new RegExp("","g"),"<").replace(new RegExp("","g"),">")}const n={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "},r=_t??ae._namedMap;let o=r;if(!o&&mn)try{const i=globalThis.require;if(typeof i=="function"){const s=["@jasonshimmy/custom-elements-runtime/entities.json","../../entities.json","../../../entities.json","../entities.json","./entities.json"];for(const c of s)try{const a=i(c);if(a){o=a;break}}catch{}}}catch{}if(!o){o=n,St=!0;try{ae._usedFallback=!0}catch{}const i=ae._namedMapLoader??Ut;i&&i().then(s=>{_t=s;try{ae._namedMap=s}catch{}}).catch(()=>{})}if((St||ae._usedFallback)&&!(At||ae._warnedFallback)){At=!0;try{ae._warnedFallback=!0}catch{}try{Q("decodeEntities: using small SSR fallback entity map. Register the full entities.json via registerEntityMap(entities) on the server to enable full HTML5 named-entity decoding.")}catch{}}return t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(i,s)=>{if(s.charCodeAt(0)===35){const u=(s.charAt(1)||"").toLowerCase()==="x"?parseInt(s.slice(2),16):parseInt(s.slice(1),10);return Number.isNaN(u)?`&${s};`:String.fromCodePoint(u)}const c=o[s]??(r&&r[s]);return c!==void 0?c:`&${s};`})}async function qt(){const e=["@jasonshimmy","custom-elements-runtime","entities.json"].join("/");try{const t=await import(e);return t&&(t.default||t)}catch{try{const t=[e,"./entities.json","../../entities.json","../../../entities.json"];for(const n of t)try{const r=await import(n);if(r)return r&&(r.default||r)}catch{}return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}catch{return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}}}Ut=qt;ae._namedMapLoader=qt;function yn(e){const t=String(e);return{__unsafeHTML:t,__rawHTML:t}}function jt(e){return!!e&&(typeof e.__unsafeHTML=="string"||typeof e.__rawHTML=="string")}function J(e,t){if(typeof t=="string"){const n=t.split(".").reduce((r,o)=>r?.[o],e);return N(n)?n.value:n}return t}function Ye(e,t,n){const r=String(t).split("."),o=r.pop();if(!o)return;const i=r.reduce((s,c)=>(s[c]==null&&(s[c]={}),s[c]),e);N(i[o])?i[o].value=n:i[o]=n}function bn(e,t,n){if(n)for(const[r,o]of Object.entries(n)){let i,s={};if(Array.isArray(o)?(i=o[0],s=o[1]||{}):i=o,t.set(r,{callback:i,options:s,oldValue:J(e,r)}),s.immediate)try{const c=J(e,r);i(c,void 0,e)}catch(c){H(`Error in immediate watcher for "${r}":`,c)}}}function vn(e,t,n,r){const o=(s,c)=>{if(s===c)return!0;if(typeof s!=typeof c||typeof s!="object"||s===null||c===null)return!1;if(Array.isArray(s)&&Array.isArray(c))return s.length!==c.length?!1:s.every((m,y)=>o(m,c[y]));const a=Object.keys(s),u=Object.keys(c);return a.length!==u.length?!1:a.every(m=>o(s[m],c[m]))},i=t.get(n);if(i&&!o(r,i.oldValue))try{i.callback(r,i.oldValue,e),i.oldValue=r}catch(s){H(`Error in watcher for "${n}":`,s)}for(const[s,c]of t.entries())if(c.options.deep&&n.startsWith(s+"."))try{const a=J(e,s);o(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){H(`Error in deep watcher for "${s}":`,a)}}function Lt(e,t){return t===Boolean?e===""||e==="true":t===Number?Number(e):e}function wn(e,t,n){if(t)for(const r in t){const o=t[r],i=oe(r),s=e.getAttribute(i);if(o.type===Function&&typeof e[r]=="function")n[r]=e[r];else if(s!==null)n[r]=Lt(s,o.type);else if(typeof e[r]<"u")try{const c=e[r];o.type===Boolean&&typeof c=="boolean"||o.type===Number&&typeof c=="number"||o.type===Function&&typeof c=="function"?n[r]=c:n[r]=Lt(String(c),o.type)}catch{n[r]=e[r]}else"default"in o&&o.default!==void 0&&(n[r]=o.default)}}function xn(e,t,n){if(!t.props){try{const r=n&&n._hookCallbacks&&n._hookCallbacks.props||{},o=Array.from(new Set([...Object.keys(e),...Object.keys(r)]));for(const i of o){if(typeof i!="string"||i.startsWith("_"))continue;const s=Object.getOwnPropertyDescriptor(n,i);if(!(!Object.prototype.hasOwnProperty.call(r,i)&&s&&(s.get||s.set||!s.configurable)))try{Object.defineProperty(n,i,{enumerable:!0,configurable:!0,get(){try{const a=oe(i),u=e.getAttribute(a);if(u!==null)return u;const m=e[i];let y;return N(m)||m&&typeof m=="object"&&"value"in m&&!(m instanceof Node)?y=m.value:y=m,y}catch{return e[i]}}})}catch{}}}catch{}return}wn(e,t.props,n)}function kn(e,t,n,r){e.onConnected&&!n&&(e.onConnected(t),r(!0))}function $n(e,t,n,r,o,i,s,c){e.onDisconnected&&e.onDisconnected(t),n.forEach(a=>a()),r(),o(),i(!1),s(null),c(!1)}function En(e,t,n,r,o){e.onAttributeChanged&&e.onAttributeChanged(t,n,r,o)}class Cn{static cache=new Map;static maxCacheSize=1e3;static dangerousPatterns=[/constructor/i,/prototype/i,/__proto__/i,/function/i,/eval/i,/import/i,/require/i,/window/i,/document/i,/global/i,/process/i,/setTimeout/i,/setInterval/i,/fetch/i,/XMLHttpRequest/i];static evaluate(t,n){const r=this.cache.get(t);if(r){if(!r.isSecure){Q("Blocked cached dangerous expression:",t);return}return r.evaluator(n)}const o=this.createEvaluator(t);if(this.cache.size>=this.maxCacheSize){const i=this.cache.keys().next().value;i&&this.cache.delete(i)}if(this.cache.set(t,o),!o.isSecure){Q("Blocked dangerous expression:",t);return}return o.evaluator(n)}static createEvaluator(t){if(this.hasDangerousPatterns(t))return{evaluator:()=>{},isSecure:!1};if(t.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(t),isSecure:!0}}catch(n){return Q("Failed to create evaluator for expression:",t,n),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(t){return this.dangerousPatterns.some(n=>n.test(t))}static createSafeEvaluator(t){const n=t.trim();if(n.startsWith("{")&&n.endsWith("}"))return this.createObjectEvaluator(t);if(/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())){const r=t.trim().slice(4);return o=>J(o,r)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):r=>J(r,t)}static createObjectEvaluator(t){const n=t.trim().slice(1,-1),r=this.parseObjectProperties(n);return o=>{const i={};for(const{key:s,value:c}of r)try{if(c.startsWith("ctx.")){const a=c.slice(4);i[s]=J(o,a)}else i[s]=this.evaluateSimpleValue(c,o)}catch{i[s]=void 0}return i}}static parseObjectProperties(t){const n=[],r=t.split(",");for(const o of r){const i=o.indexOf(":");if(i===-1)continue;const s=o.slice(0,i).trim(),c=o.slice(i+1).trim(),a=s.replace(/^['"]|['"]$/g,"");n.push({key:a,value:c})}return n}static createSimpleEvaluator(t){return n=>{try{let r=t;const o=[];r=r.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,y=>`<<#${o.push(y)-1}#>>`);const i=r.match(/ctx\.[\w.]+/g)||[];for(const y of i){const p=y.slice(4),k=J(n,p);if(k===void 0)return;const d=o.push(JSON.stringify(k))-1;r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`)}const s=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,c=r.match(s)||[];for(const y of c){if(y.startsWith("ctx."))continue;const p=J(n,y);if(p===void 0)return;const k=o.push(JSON.stringify(p))-1;r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${k}#>>`)}const a=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let u;const m=new Set;for(;(u=a.exec(r))!==null;){const y=u[1];if(["true","false","null","undefined"].includes(y)||/^[0-9]+$/.test(y)||y==="ctx"||m.has(y))continue;m.add(y);const p=J(n,y);if(p===void 0)return;const k=JSON.stringify(p),d=o.push(k)-1;y.includes(".")?r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`):r=r.replace(new RegExp("\\b"+y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${d}#>>`)}r=r.replace(/<<#(\d+)#>>/g,(y,p)=>o[Number(p)]);try{return this.evaluateBasicExpression(r)}catch{return}}catch{return}}}static evaluateBasicExpression(t){const n=this.tokenize(t);let r=0;function o(){return n[r]}function i(l){const g=n[r++];if(l&&!g)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&g&&g.type!==l&&g.value!==l)throw new Error(`Unexpected token ${g.type}/${g.value}, expected ${l}`);return g}function s(){return c()}function c(){let l=a();if(o()&&o().value==="?"){i("?");const g=s();i(":");const v=s();return l?g:v}return l}function a(){let l=u();for(;o()&&o().value==="||";){i("OP");const g=u();l=l||g}return l}function u(){let l=m();for(;o()&&o().value==="&&";){i("OP");const g=m();l=l&&g}return l}function m(){let l=y();for(;o()&&["==","!=","===","!=="].includes(o().value);){const g=i("OP").value,v=y();switch(g){case"==":l=l==v;break;case"!=":l=l!=v;break;case"===":l=l===v;break;case"!==":l=l!==v;break}}return l}function y(){let l=p();for(;o()&&[">","<",">=","<="].includes(o().value);){const g=i("OP").value,v=p();switch(g){case">":l=l>v;break;case"<":l=l<v;break;case">=":l=l>=v;break;case"<=":l=l<=v;break}}return l}function p(){let l=k();for(;o()&&(o().value==="+"||o().value==="-");){const g=i("OP").value,v=k();l=g==="+"?l+v:l-v}return l}function k(){let l=d();for(;o()&&(o().value==="*"||o().value==="/"||o().value==="%");){const g=i("OP").value,v=d();switch(g){case"*":l=l*v;break;case"/":l=l/v;break;case"%":l=l%v;break}}return l}function d(){return o()&&o().value==="!"?(i("OP"),!d()):o()&&o().value==="-"?(i("OP"),-d()):f()}function f(){const l=o();if(l){if(l.type==="NUMBER")return i("NUMBER"),Number(l.value);if(l.type==="STRING")return i("STRING"),l.value.slice(1,-1);if(l.type==="IDENT")return i("IDENT"),l.value==="true"?!0:l.value==="false"?!1:l.value==="null"?null:void 0;if(l.value==="["){i("PUNC");const g=[];for(;o()&&o().value!=="]";)g.push(s()),o()&&o().value===","&&i("PUNC");return i("PUNC"),g}if(l.value==="("){i("PUNC");const g=s();return i("PUNC"),g}throw new Error("Unexpected token in expression")}}return s()}static tokenize(t){const n=[],r=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let o;for(;(o=r.exec(t))!==null;){const i=o[1];i&&(/^\d/.test(i)?n.push({type:"NUMBER",value:i}):/^"/.test(i)||/^'/.test(i)?n.push({type:"STRING",value:i}):/^[a-zA-Z_]/.test(i)?n.push({type:"IDENT",value:i}):/^[()?:,\[\]]$/.test(i)?n.push({type:"PUNC",value:i}):n.push({type:"OP",value:i}))}return n}static evaluateSimpleValue(t,n){if(t==="true")return!0;if(t==="false")return!1;if(!isNaN(Number(t)))return Number(t);if(t.startsWith("ctx.")){const r=t.slice(4);return J(n,r)}return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class ce{static cleanupFunctions=new WeakMap;static addListener(t,n,r,o){t.addEventListener(n,r,o);const s={event:n,handler:r,wrapper:r,options:o,cleanup:()=>t.removeEventListener(n,r,o),addedAt:Date.now()};this.cleanupFunctions.has(t)||this.cleanupFunctions.set(t,[]);const c=this.cleanupFunctions.get(t);c.push(s),c.__metaList=c}static removeListener(t,n,r,o){t.removeEventListener(n,r,o);const i=this.cleanupFunctions.get(t);if(i)for(let s=0;s<i.length;s++){const c=i[s];if(c.event===n&&c.handler===r){i.splice(s,1),i.length===0&&this.cleanupFunctions.delete(t);return}}}static cleanup(t){const n=this.cleanupFunctions.get(t);n&&(n.forEach(r=>{try{r.cleanup()}catch{}}),this.cleanupFunctions.delete(t))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(t){const n=this.cleanupFunctions.get(t);return!!(n&&n.length>0)}static getListenerCount(t){const n=this.cleanupFunctions.get(t);return n?n.length:0}static getListenerInfo(t){const n=this.cleanupFunctions.get(t);return n?n.map(r=>({event:r.event,handler:r.handler,wrapper:r.wrapper,options:r.options})):[]}}function Ue(e,t){return Array.isArray(e)&&Array.isArray(t)?JSON.stringify([...e].sort())!==JSON.stringify([...t].sort()):e!==t}function Ot(e,t,n,r,o){if(e)if(o&&typeof t.value=="object"&&t.value!==null){const i={...t.value};i[o]=n,t.value=i}else t.value=n;else{const i=r._state||r;Ye(i,t,n)}}function qe(e,t,n,r){if(e._requestRender&&e._requestRender(),e._triggerWatchers){const o=t?"reactiveState":n;e._triggerWatchers(o,r)}}function _n(e,t,n){const r=`update:${oe(t)}`,o=`update:${t}`,i=new CustomEvent(r,{detail:n,bubbles:!0,composed:!0}),s=new CustomEvent(o,{detail:n,bubbles:!0,composed:!0});e.dispatchEvent(i),e.dispatchEvent(s)}function Pt(e,t,n,r){const o=n;P(()=>{e[t]=o}),P(()=>{const i=oe(t);typeof o=="boolean"?o?e.setAttribute(i,"true"):e.setAttribute(i,"false"):o!=null&&(typeof o=="string"||typeof o=="number")?e.setAttribute(i,String(o)):e.removeAttribute?.(i)}),P(()=>{e._applyProps?.(e._cfg)}),P(()=>{e._requestRender?.()})}function Sn(e,t,n,r){if(e){const i=t.value;return r&&typeof i=="object"&&i!==null?i[r]:i}const o=n._state||n;return J(o,t)}function $e(e){return e?e.split(/\s+/).filter(Boolean):[]}function Ee(e,t){if(t.length===0)return;const n=t.filter(r=>r&&!e.classList.contains(r));n.length>0&&e.classList.add(...n)}function ke(e,t){if(t.length===0)return;const n=t.filter(Boolean);n.length>0&&e.classList.remove(...n)}let tt=!1;async function An(e,t,n=10){if(!tt){if(!e.isConnected){Q("⚠️ Element not connected to DOM, skipping style wait");return}for(let r=0;r<n;r++){const o=window.getComputedStyle(e),i=o.transform&&o.transform!=="",s=o.opacity&&o.opacity!=="";if(i||s){tt=!0;return}await new Promise(c=>requestAnimationFrame(()=>c(void 0)))}tt=!0,Q("⚠️ Styles did not load in time for transition, continuing anyway")}}function Tn(e){const t=window.getComputedStyle(e),n=t.transitionDuration||"0s",r=t.transitionDelay||"0s",o=i=>{const s=parseFloat(i);return i.includes("ms")?s:s*1e3};return o(n)+o(r)}function Kt(e,t){return new Promise(n=>{const r=t??Tn(e);if(r<=0){n();return}let o=!1;const i=()=>{o||(o=!0,e.removeEventListener("transitionend",s),e.removeEventListener("transitioncancel",s),n())},s=()=>i();e.addEventListener("transitionend",s),e.addEventListener("transitioncancel",s),setTimeout(i,r+50)})}async function Le(e,t){const{classes:n,hooks:r,css:o,duration:i}=t;if(r?.onBeforeEnter)try{r.onBeforeEnter(e)}catch(d){H("Transition onBeforeEnter error:",d)}if(!o)return r?.onEnter?new Promise(d=>{r.onEnter(e,()=>{if(r?.onAfterEnter)try{r.onAfterEnter(e)}catch(f){H("Transition onAfterEnter error:",f)}d()})}):void 0;const s=$e(n?.enterFrom),c=$e(n?.enterActive),a=$e(n?.enterTo);Ee(e,s),e.offsetHeight,Ee(e,c),e.offsetHeight;let u;if(r?.onEnter){const d=new Promise(f=>{u=f});try{r.onEnter(e,()=>{u&&u()})}catch(f){H("Transition onEnter error:",f)}u&&await d}await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.offsetHeight;const m=window.getComputedStyle(e),y=m.transform,p=m.opacity;ke(e,s),y&&y!=="none"&&(e.style.transform=y),p&&p!==""&&(e.style.opacity=p),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.style.transform="",e.style.opacity="",Ee(e,a),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0)));let k;if(typeof i=="number"?k=i:i&&typeof i=="object"&&"enter"in i&&(k=i.enter),await Kt(e,k),ke(e,c),r?.onAfterEnter)try{r.onAfterEnter(e)}catch(d){H("Transition onAfterEnter error:",d)}}async function nt(e,t){const{classes:n,hooks:r,css:o,duration:i}=t;if(r?.onBeforeLeave)try{r.onBeforeLeave(e)}catch(y){H("Transition onBeforeLeave error:",y)}if(!o)return r?.onLeave?new Promise(y=>{r.onLeave(e,()=>{if(r?.onAfterLeave)try{r.onAfterLeave(e)}catch(p){H("Transition onAfterLeave error:",p)}y()})}):void 0;const s=$e(n?.leaveFrom),c=$e(n?.leaveActive),a=$e(n?.leaveTo);Ee(e,s),e.offsetHeight,Ee(e,c);let u;if(r?.onLeave){const y=new Promise(p=>{u=p});try{r.onLeave(e,()=>{u&&u()})}catch(p){H("Transition onLeave error:",p)}u&&await y}await new Promise(y=>requestAnimationFrame(()=>y(void 0))),await An(e,[...s,...c]),ke(e,s),Ee(e,a);let m;if(typeof i=="number"?m=i:i&&typeof i=="object"&&"leave"in i&&(m=i.leave),await Kt(e,m),ke(e,c),ke(e,a),ke(e,s),r?.onAfterLeave)try{r.onAfterLeave(e)}catch(y){H("Transition onAfterLeave error:",y)}}const Vt=new WeakMap,Gt=new WeakMap;function Ke(e){if(!e)return;const t=Vt.get(e);if(t!==void 0)return t;try{const n=e;if(n&&n.key!=null)return n.key}catch{}if(e instanceof Element){const n=e.getAttribute("data-anchor-key");if(n)return n}}function ee(e,t){try{Vt.set(e,t)}catch{}try{e.key=t}catch{}try{e instanceof Element&&e.setAttribute("data-anchor-key",String(t))}catch{}}function jn(e){if(!e)return;const t=Gt.get(e);if(t!==void 0)return t;try{const n=e;if(n&&n._transitionGroup!=null)return n._transitionGroup}catch{}}function Ln(e,t){try{Gt.set(e,t)}catch{}try{e._transitionGroup=t}catch{}}function re(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function Ce(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?N(e)||"value"in e?!!e.value:!1:!!e}function be(e,t){if(!t||!(e instanceof HTMLElement))return;ce.cleanup(e);for(const r in t)t[r]===e&&delete t[r];const n=e.childNodes;for(let r=0;r<n.length;r++)be(n[r],t)}function Pe(e,t,n){if(typeof e=="string")return;const r=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),o=e.props?.ref??(e.props?.props&&e.props.props.ref);r?r.value=t:o&&n&&(n[o]=t)}function On(e,t,n,r,o,i,s,c){if(!i)return;const a=t.includes("lazy"),u=t.includes("trim"),m=t.includes("number"),y=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",p=()=>{if(y){const x=e.value;return c&&s&&(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement)&&typeof x=="object"&&x!==null?x[c]:x}return J(i._state||i,e)},k=p();let d="text";s instanceof HTMLInputElement?d=r?.type||s.type||"text":s instanceof HTMLSelectElement?d="select":s instanceof HTMLTextAreaElement&&(d="textarea");const f=s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement,l=f?d==="checkbox"||d==="radio"?"checked":"value":c??"modelValue";if(d==="checkbox")if(Array.isArray(k))n[l]=k.includes(String(s?.getAttribute("value")??r?.value??""));else{const x=s?.getAttribute("true-value")??!0;n[l]=k===x}else if(d==="radio")n[l]=k===(r?.value??"");else if(d==="select")if(s&&s.hasAttribute("multiple")&&s instanceof HTMLSelectElement){const x=Array.isArray(k)?k.map(String):[];setTimeout(()=>{Array.from(s.options).forEach(S=>{S.selected=x.includes(S.value)})},0),n[l]=Array.isArray(k)?k:[]}else n[l]=k;else{!f&&y?n[l]=e:n[l]=k;try{const x=oe(l);r&&(r[x]=k)}catch{}}const g=a||d==="checkbox"||d==="radio"||d==="select"?"change":"input",v=x=>{if(x.isComposing||o._isComposing)return;const S=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(x.isTrusted===!1&&!S)return;const E=x.target;if(!E||E._modelUpdating)return;let C=E.value;if(d==="checkbox"){const $=p();if(Array.isArray($)){const b=E.getAttribute("value")??"",_=Array.from($);if(E.checked)_.includes(b)||_.push(b);else{const O=_.indexOf(b);O>-1&&_.splice(O,1)}C=_}else{const b=E.getAttribute("true-value")??!0,_=E.getAttribute("false-value")??!1;C=E.checked?b:_}}else if(d==="radio")C=E.getAttribute("value")??E.value;else if(d==="select"&&E.multiple)C=Array.from(E.selectedOptions).map($=>$.value);else if(u&&typeof C=="string"&&(C=C.trim()),m){const $=Number(C);isNaN($)||(C=$)}const w=p();if(Ue(C,w)){E._modelUpdating=!0;try{Ot(y,e,C,i,c),qe(i,y,e,C),E&&_n(E,l,C)}finally{setTimeout(()=>E._modelUpdating=!1,0)}}};if(f){if(o[g]){const x=o[g];s&&ce.removeListener(s,g,x)}o[g]=v}else{const x=`update:${oe(l)}`,S=`update:${l}`;if(o[x]){const E=o[x];s&&ce.removeListener(s,x,E)}if(o[S]){const E=o[S];s&&ce.removeListener(s,S,E)}if(o[x]=E=>{const C=E.detail!==void 0?E.detail:E.target?.value,w=Sn(y,e,i,c);if(Ue(C,w)){Ot(y,e,C,i,c),qe(i,y,e,C);const $=E.target;$&&Pt($,l,y?e:C,y)}},y&&typeof e.value=="object"&&e.value!==null){let E=[];try{E=Reflect.ownKeys(e.value)}catch{E=Object.keys(e.value)}const C=E.filter(w=>typeof w=="string"&&!String(w).startsWith("_")&&w!=="constructor");for(const w of C){const T=`update:${oe(w)}`,$=`update:${w}`;o[T]||(o[T]=b=>{const _=b.detail!==void 0?b.detail:b.target?.value,O=y?e.value[w]:J(i._state||i,e);if(!Ue(_,O))return;if(y){const M={...e.value};M[w]=_,e.value=M}else Ye(i._state||i,e,_);qe(i,y,e,_);const A=b.currentTarget||s||b.target;A&&Pt(A,l,y?e:_,y)},o[$]=o[T])}}o[S]=o[x]}(d==="text"||d==="textarea")&&(o.compositionstart=(()=>o._isComposing=!0),o.compositionend=x=>{o._isComposing=!1;const S=x.target;S&&setTimeout(()=>{const E=S.value,C=i._state||i,w=J(C,e);let T=E;if(u&&(T=T.trim()),m){const b=Number(T);isNaN(b)||(T=b)}if(Ue(T,w)){S._modelUpdating=!0;try{Ye(C,e,T),qe(i,y,e,T)}finally{setTimeout(()=>S._modelUpdating=!1,0)}}},0)})}function Zt(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function Pn(e,t,n,r,o){if(typeof e=="object"&&e!==null)for(const[i,s]of Object.entries(e))if(i.startsWith("data-")||i.startsWith("aria-")||i==="class")n[i]=s;else if(i==="disabled"&&o&&re(o)){const c=s&&typeof s=="object"&&"value"in s;(()=>{try{return N(s)}catch{return!1}})()||c?t[i]=s:n[i]=s}else t[i]=s;else if(typeof e=="string"){if(!r)return;try{const i=He(e,r);if(typeof i=="object"&&i!==null){for(const[s,c]of Object.entries(i))if(s.startsWith("data-")||s.startsWith("aria-")||s==="class")n[s]=c;else if(s==="disabled"&&o&&re(o)){const a=c&&typeof c=="object"&&"value"in c;(()=>{try{return N(c)}catch{return!1}})()||a?t[s]=c:n[s]=c}else t[s]=c;return}else{n[e]=i;return}}catch{const i=J(r,e);n[e]=i}}}function Mn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=He(e,n)}else r=e;const o=t.style||"";let i=o;if(r){if(o){const s=o.split(";").map(a=>a.trim()).filter(Boolean),c=s.findIndex(a=>a.startsWith("display:"));c>=0&&s[c]==="display: none"&&(s.splice(c,1),i=s.length>0?s.join("; ")+";":"")}}else if(o){const s=o.split(";").filter(Boolean),c=s.findIndex(a=>a.trim().startsWith("display:"));c>=0?s[c]="display: none":s.push("display: none"),i=s.join("; ")}else i="display: none";i!==o&&(i?t.style=i:delete t.style)}function He(e,t){return Cn.evaluate(e,t)}function Rn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=He(e,n)}else r=e;let o=[];if(typeof r=="string")o=[r];else if(Array.isArray(r))o=r.filter(Boolean);else if(typeof r=="object"&&r!==null)for(const[c,a]of Object.entries(r))a&&o.push(c);const i=t.class||"",s=o.join(" ");t.class=i?`${i} ${s}`.trim():s}function mt(e){if(e===!0||e===!1)return!0;if(e==null)return!1;if(typeof e==="string")return e===""||e==="true"||e==="false";try{if(e&&typeof e=="object"&&"value"in e){const n=e.value,r=typeof n;return r==="boolean"?!0:r==="string"?n===""||n==="true"||n==="false":!1}}catch{}return!1}function Nn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=He(e,n)}else r=e;let o="";if(typeof r=="string")o=r;else if(r&&typeof r=="object"){const s=[];for(const[c,a]of Object.entries(r))if(a!=null&&a!==""){const u=c.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`),m=["width","height","top","right","bottom","left","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","font-size","line-height","border-width","border-radius","min-width","max-width","min-height","max-height"];let y=String(a);typeof a=="number"&&m.includes(u)&&(y=`${a}px`),s.push(`${u}: ${y}`)}o=s.join("; ")+(s.length>0?";":"")}const i=t.style||"";t.style=i+(i&&!i.endsWith(";")?"; ":"")+o}function Dn(e,t,n){let r=e;typeof e=="string"&&n&&(r=He(e,n)),N(r)?t.reactiveRef=r:t.ref=r}function Jt(e,t,n,r){const o={},i={...r||{}},s={};for(const[c,a]of Object.entries(e)){const{value:u,modifiers:m,arg:y}=a;if(c==="model"||c.startsWith("model:")){const p=c.split(":"),k=p.length>1?p[1]:y;On(u,m,o,i,s,t,n,k);continue}switch(c){case"bind":Pn(u,o,i,t,n);break;case"show":Mn(u,i,t);break;case"class":Rn(u,i,t);break;case"style":Nn(u,i,t);break;case"ref":Dn(u,o,t);break}}try{if(Object.prototype.hasOwnProperty.call(o,"disabled")&&n&&re(n)){const a=o.disabled,u=a&&typeof a=="object"&&"value"in a;let m=!1;try{m=N(a)}catch{m=!1}if(!u&&!m)try{i.disabled=a,delete o.disabled;const y=globalThis;y.__VDOM_DISABLED_PROMOTIONS||(y.__VDOM_DISABLED_PROMOTIONS=[]),y.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:a,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:o,attrs:i,listeners:s}}function yt(e,t){if(Array.isArray(e)){const i=new Set;return e.map(s=>{if(!s||typeof s!="object")return s;let c=s.props?.key??s.key;if(!c){const y=s.tag||"node",k=[s.props?.attrs?.id,s.props?.attrs?.name,s.props?.attrs?.["data-key"],s.props?.props?.id,s.props?.props?.name,s.props?.props?.dataKey,s.props?.props?.["data-key"]].find(d=>d!=null)??"";c=k?`${t}:${y}:${k}`:`${t}:${y}`}let a=c,u=1;for(;i.has(a);)a=`${c}#${u++}`;i.add(a);let m=s.children;return Array.isArray(m)&&(m=yt(m,a)),{...s,key:a,children:m}})}const n=e;let r=n.props?.key??n.key??t,o=n.children;return Array.isArray(o)&&(o=yt(o,r)),{...n,key:r,children:o}}function Mt(e,t,n,r){const o=n.directives??{},i=Jt(o,r,e,n.attrs),s={...t.props,...n.props,...i.props},c={...t.attrs,...n.attrs,...i.attrs},a=t.props??{},u=s,m=n?.isCustomElement??t?.isCustomElement??!1;let y=!1;for(const d in{...a,...u}){const f=a[d],h=u[d];let l=f,g=h;if(P(()=>{(N(f)||f&&typeof f=="object"&&"value"in f)&&(l=f.value)}),P(()=>{(N(h)||h&&typeof h=="object"&&"value"in h)&&(g=h.value)}),!(f===h&&l===g))if(y=!0,d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const v=typeof h=="object"&&h!==null&&N(h)||h&&typeof h=="object"&&"value"in h?h.value:h;e.value!==v&&(e.value=v??"")}else if(d==="checked"&&e instanceof HTMLInputElement){const v=typeof h=="object"&&h!==null&&N(h)||h&&typeof h=="object"&&"value"in h?h.value:h;e.checked=!!v}else if(d.startsWith("on")&&typeof h=="function"){const v=Zt(d);typeof f=="function"&&ce.removeListener(e,v,f),ce.addListener(e,v,h);try{if(v&&v.startsWith("update:")){const x=v.split(":",2)[1],S=u[x];let E=[];try{if(N(S)){const w=S.value;E=w&&typeof w=="object"?Object.keys(w):[]}else S&&typeof S=="object"&&(E=Object.keys(S))}catch{E=[]}const C=E.filter(w=>typeof w=="string"&&!w.startsWith("_")&&w!=="constructor");for(const w of C){const T=`update:${w}`,$=b=>{const _=b.detail!==void 0?b.detail:b.target?.value,j={...N(S)?S.value||{}:u[x]||{},[w]:_};P(()=>{h({detail:j})})};P(()=>{ce.addListener(e,T,$)})}}}catch{}}else if(h==null)e.removeAttribute(d);else{const v=n?.isCustomElement??t?.isCustomElement??!1;if(v||d in e)try{e[d]=h,d==="disabled"&&h===!1&&!v&&re(e)&&e.removeAttribute("disabled")}catch{}else h===!1&&e.removeAttribute(d)}}for(const[d,f]of Object.entries(i.listeners||{})){ce.addListener(e,d,f);try{const h=e&&e.parentElement;h&&h!==e&&ce.addListener(h,d,f)}catch{}}const p=t.attrs??{},k=c;for(const d in{...p,...k}){const f=p[d],h=k[d];let l=f,g=h;if(N(f)&&(l=f.value),N(h)&&(g=h.value),l!==g)if(y=!0,g==null||g===!1)P(()=>{e.removeAttribute(d)}),d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?P(()=>{e.value=""}):e instanceof HTMLSelectElement?P(()=>{e.value=""}):e instanceof HTMLProgressElement&&P(()=>{e.value=0})),d==="checked"&&e instanceof HTMLInputElement&&P(()=>{e.checked=!1}),d==="disabled"&&re(e)&&P(()=>{e.disabled=!1});else{if(d==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){P(()=>{e.value=g??""});continue}else if(e instanceof HTMLSelectElement){P(()=>{e.value=g??""});continue}else if(e instanceof HTMLProgressElement){P(()=>{e.value=Number(g)});continue}}if(d==="checked"&&e instanceof HTMLInputElement){P(()=>{e.checked=!!g});continue}if(d==="style"){e.setAttribute(d,String(g));continue}if(d==="disabled"&&re(e)){P(()=>{e.disabled=Ce(g)}),Ce(g)?P(()=>{e.setAttribute(d,"")}):P(()=>{e.removeAttribute(d)});continue}const v=e.namespaceURI==="http://www.w3.org/2000/svg";if(m&&!v&&d.includes("-")){const x=$t(d);try{N(h)?e[x]=h:e[x]=g}catch{e.setAttribute(d,String(g))}}else if(!v&&d in e)try{N(h)?e[d]=h:e[d]=g}catch{e.setAttribute(d,String(g))}else e.setAttribute(d,String(g))}}try{if(re(e)){const d=s.disabled;let f;try{const l=Object.prototype.hasOwnProperty.call(i.props||{},"disabled"),g=d&&typeof d=="object"&&"value"in d;let v=!1;P(()=>{v=!!N(d)});const x=mt(d);v||g||l||x?f=d:f=c.disabled}catch{f=c.disabled}const h=Ce(f);P(()=>{e.disabled=h}),P(h?()=>{e.setAttribute("disabled","")}:()=>{e.removeAttribute("disabled")})}}catch{}m&&y&&(P(()=>{e._applyProps?.(e._cfg)}),P(()=>{typeof e.requestRender=="function"?e.requestRender():typeof e._render=="function"&&e._render(e._cfg)}))}function te(e,t,n){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const p=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&ee(p,e.key),p}if(e.tag==="#raw"){const p=typeof e.children=="string"?e.children:"";return document.createRange().createContextualFragment(p)}if(e.tag==="#anchor"){const p=e,k=Array.isArray(p.children)?p.children:[],d=document.createTextNode(""),f=document.createTextNode("");p.key!=null&&(ee(d,`${p.key}:start`),ee(f,`${p.key}:end`)),p._startNode=d,p._endNode=f;const h=document.createDocumentFragment();h.appendChild(d);for(const l of k){const g=te(l,t);if(p.key!=null&&g instanceof Element&&!g.hasAttribute("data-anchor-key")){const v=l;v&&typeof v=="object"&&v.key!=null||ee(g,p.key)}h.appendChild(g)}return h.appendChild(f),h}const r=document.createElement(e.tag);e.key!=null&&ee(r,e.key),e.props&&e.props._transitionGroup&&Ln(r,e.props._transitionGroup);const{props:o={},attrs:i={},directives:s={}}=e.props??{},c=Jt(s,t,r,i),a={...o,...c.props},u={...i,...c.attrs};try{if(a.disabled!==void 0&&r&&re(r)){const p=a.disabled,k=p&&typeof p=="object"&&"value"in p;let d=!1;try{d=N(p)}catch{d=!1}!k&&!d&&P(()=>{u.disabled=p,delete a.disabled;const f=globalThis;f.__VDOM_DISABLED_PROMOTIONS||(f.__VDOM_DISABLED_PROMOTIONS=[]),f.__VDOM_DISABLED_PROMOTIONS.push({phase:"createElement:move-prop-to-attr",location:"attrs",key:"disabled",value:p,time:Date.now(),stack:new Error().stack})})}}catch{}const m=r.namespaceURI==="http://www.w3.org/2000/svg";for(const p in u){const k=u[p];if(typeof p!="string"||/\[object Object\]/.test(p))continue;const d=typeof k=="object"&&k!==null&&N(k)||k&&typeof k=="object"&&"value"in k?k.value:k;if(typeof d=="boolean")d?r.setAttribute(p,""):P(()=>{r.removeAttribute(p)});else if(d!=null){if(p==="disabled"&&re(r)){const f=a.disabled,h=mt(f)?f:d,l=Ce(h);P(()=>{r.disabled=l}),P(l?()=>{r.setAttribute(p,"")}:()=>{r.removeAttribute(p)});continue}if(!m&&p==="value"&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement||r instanceof HTMLProgressElement))try{r instanceof HTMLProgressElement?r.value=Number(d):r.value=d??""}catch{r.setAttribute(p,String(d))}else if(!m&&p==="checked"&&r instanceof HTMLInputElement)try{r.checked=!!d}catch{r.setAttribute(p,String(d))}else if(!m&&p in r)try{r[p]=d,p==="disabled"&&d===!1&&re(r)&&r.removeAttribute("disabled")}catch{r.setAttribute(p,String(d))}else if((e.props?.isCustomElement??!1)&&!m&&p.includes("-")){const h=$t(p);try{r[h]=d}catch{r.setAttribute(p,String(d))}}else r.setAttribute(p,String(d))}}for(const p in a){const k=a[p];if(!(typeof p!="string"||/\[object Object\]/.test(p)))if(p==="value"&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)){const d=typeof k=="object"&&k!==null&&typeof k.value<"u"?k.value:k;P(()=>{r.value=d??""})}else if(p.startsWith("on")&&typeof k=="function"){const d=Zt(p),f=d.includes(":")?(()=>{const h=d.split(":"),l=h[1];if(l.includes("-")){const g=l.split("-").map((v,x)=>x===0?v:v.charAt(0).toUpperCase()+v.slice(1)).join("");return`${h[0]}:${g}`}else{const g=l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${h[0]}:${g}`}})():d;c.listeners&&(c.listeners[d]||c.listeners[f])||ce.addListener(r,d,k)}else{if(p.startsWith("on")&&k===void 0)continue;if(k==null||k===!1)r.removeAttribute(p);else if((e.props?.isCustomElement??!1)||p in r)try{const f=typeof k=="object"&&k!==null&&N(k)?k:typeof k=="object"&&k!==null&&typeof k.value<"u"?k.value:k;if(p==="disabled"&&re(r)){const h=a.disabled!==void 0?a.disabled:f,l=Ce(h);P(()=>{r.disabled=l}),P(l?()=>{r.setAttribute(p,"")}:()=>{r.removeAttribute(p)});continue}try{if(typeof r[p]=="boolean"){let l=f;typeof f=="string"?f==="false"?l=!1:f==="true"?l=!0:l=!!f&&f!=="":l=!!f,r[p]=l}else r[p]=f}catch{r[p]=f}}catch{}}}for(const[p,k]of Object.entries(c.listeners||{}))ce.addListener(r,p,k);const y={...e,props:{...e.props,...c.props}};Pe(y,r,n);try{if(typeof r._applyProps=="function")try{r._applyProps(r._cfg)}catch{}typeof r.requestRender=="function"?r.requestRender():typeof r._render=="function"&&r._render(r._cfg)}catch{}if(Array.isArray(e.children))for(const p of e.children)r.appendChild(te(p,t,n));else typeof e.children=="string"&&(r.textContent=e.children);try{if(r instanceof HTMLSelectElement&&u&&u.hasOwnProperty("value"))try{r.value=u.value??""}catch{}}catch{}try{if(re(r)){const p=a.disabled,k=u.disabled,d=p&&typeof p=="object"&&"value"in p;let f=!1;try{f=!!N(p)}catch{f=!1}const l=f||d||mt(p)?p:k,g=Ce(l);P(()=>{r.disabled=g}),P(g?()=>{r.setAttribute("disabled","")}:()=>{r.removeAttribute("disabled")})}}catch{}return r}function Hn(e,t,n,r,o){if(typeof n=="string"){e.textContent!==n&&(e.textContent=n);return}if(!Array.isArray(n))return;const i=e.childNodes,s=[];for(let f=0;f<i.length;f++)s.push(i[f]);const c=Array.isArray(t)?t:[],a=jn(e);if(a){const f=v=>typeof v=="string"&&v.startsWith("each-")?v.substring(5):v,h=[],l=[];for(const v of n)if(v&&v.tag==="#anchor"){const x=Array.isArray(v.children)?v.children:[];for(const S of x){const E=f(S.key||v.key||"unknown");h.push({...S,key:E})}}else v&&h.push({...v,key:f(v.key)});for(const v of c)if(v&&v.tag==="#anchor"){const x=Array.isArray(v.children)?v.children:[];for(const S of x){const E=f(S.key||v.key||"unknown");l.push({...S,key:E})}}else v&&l.push({...v,key:f(v.key)});if(h.some(v=>v&&v.key!=null)||l.some(v=>v&&v.key!=null)){const v=new Map,x=new Map;for(const $ of l)if($&&$.key!=null){const b=String($.key);v.set(b,$)}for(let $=0;$<s.length;$++){const b=s[$];let _=Ke(b);if(_=f(_),_!=null&&b instanceof Element&&b.nodeType===Node.ELEMENT_NODE){let O=typeof _=="string"&&_.includes(":")?_.substring(0,_.lastIndexOf(":")):_;O=String(O),x.set(O,b)}}const S=new Set,E=new Map,C=s.length>0;if(a.moveClass&&C)for(let $=0;$<s.length;$++){const b=s[$];if(b instanceof HTMLElement&&b.parentElement){const _=b.getBoundingClientRect();E.set(b,_)}}const w=[];for(const $ of h){let b=$.key;if(b==null)continue;b=String(b);const _=v.get(b);let O=x.get(b);if(O&&_){const j=Me(O,_,$,r);S.add(O);const A=String(b);ee(j,A),w.push({node:j,key:b,newVNode:$,oldVNode:_,isNew:!1})}else{O=te($,r),ee(O,b),e.appendChild(O);const j=C||a.appear===!0;O instanceof HTMLElement&&j&&Le(O,a).catch(A=>{H("Enter transition error:",A)}),w.push({node:O,key:b,newVNode:$,isNew:!0})}}const T=[];for(let $=0;$<s.length;$++){const b=s[$],_=Ke(b);if(!S.has(b)&&_!=null&&b instanceof HTMLElement){const j=nt(b,a).then(()=>{e.contains(b)&&e.removeChild(b)}).catch(A=>{H("Leave transition error:",A),e.contains(b)&&e.removeChild(b)});T.push(j)}}if(T.length===0){let $=e.firstChild;for(const{node:b}of w)b!==$&&e.insertBefore(b,$),$=b.nextSibling;if(a.moveClass&&E.size>0){const b=[];for(const{node:_,isNew:O}of w)if(!O&&_ instanceof HTMLElement){const j=E.get(_);if(j){const A=_.getBoundingClientRect(),M=j.left-A.left,R=j.top-A.top;if(M!==0||R!==0){const de=a.moveClass.split(/\s+/).filter(G=>G);b.push({node:_,deltaX:M,deltaY:R,moveClasses:de})}}}if(b.length>0){for(const{node:_,deltaX:O,deltaY:j}of b)_.style.transform=`translate(${O}px, ${j}px)`,_.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:_,moveClasses:O}of b)for(const j of O)_.classList.add(j);requestAnimationFrame(()=>{const _=a.moveClass||"",O=_.match(/duration-(\d+)/),j=O?`${O[1]}ms`:"300ms",A=_.match(/ease-(out|in|in-out|linear)/),M=A?`ease-${A[1]}`:"ease-out";for(const{node:R}of b)R.style.transition=`transform ${j} ${M}`;requestAnimationFrame(()=>{for(const{node:R,moveClasses:de}of b){R.style.removeProperty("transform");const G=()=>{for(const U of de)R.classList.remove(U);R.style.removeProperty("transition"),R.removeEventListener("transitionend",G),R.removeEventListener("transitioncancel",G)};R.addEventListener("transitionend",G,{once:!0}),R.addEventListener("transitioncancel",G,{once:!0})}})})})})}}}return}}const u=new Map;for(const f of c)f&&f.key!=null&&u.set(f.key,f);const m=new Map;for(let f=0;f<s.length;f++){const h=s[f],l=Ke(h);l!=null&&m.set(l,h)}const y=new Set;let p=e.firstChild;function k(f,h){let l=f;for(;l&&(y.add(l),l!==h);)l=l.nextSibling}function d(f,h,l,g,v,x=!0){const S=[];let E=f.nextSibling;for(;E&&E!==h;)S.push(E),E=E.nextSibling;const C=Array.isArray(l)?l:[];if(g.some(T=>T&&T.key!=null)||C.some(T=>T&&T.key!=null)){const T=new Map,$=new Map;for(const j of C)j&&j.key!=null&&T.set(j.key,j);for(const j of S){const A=Ke(j);A!=null&&$.set(A,j)}const b=v&&v.state==="visible"&&C.length===0&&g.length>0,_=new Set;let O=f.nextSibling;for(const j of g){let A;if(j.key!=null&&$.has(j.key)){const M=T.get(j.key);A=Me($.get(j.key),M,j,r),_.add(A),v&&A instanceof HTMLElement&&b&&v.appear&&Le(A,v).catch(R=>{H("Transition enter error (appear):",R)}),A!==O&&e.contains(A)&&e.insertBefore(A,O)}else A=te(j,r),e.insertBefore(A,O),_.add(A),v&&A instanceof HTMLElement&&x&&Le(A,v).catch(M=>{H("Transition enter error:",M)});O=A.nextSibling}for(const j of S)!_.has(j)&&e.contains(j)&&(v&&j instanceof HTMLElement&&x?nt(j,v).then(()=>{e.contains(j)&&e.removeChild(j)}).catch(A=>{H("Transition leave error:",A),e.contains(j)&&e.removeChild(j)}):e.removeChild(j))}else{const T=Math.min(C.length,g.length);for(let $=0;$<T;$++){const b=C[$],_=g[$],O=Me(S[$],b,_,r);O!==S[$]&&(e.insertBefore(O,S[$]),e.removeChild(S[$]))}for(let $=T;$<g.length;$++){const b=te(g[$],r);e.insertBefore(b,h),v&&b instanceof HTMLElement&&x&&Le(b,v).catch(_=>{H("Transition enter error:",_)})}for(let $=T;$<S.length;$++){const b=S[$];v&&b instanceof HTMLElement&&x?nt(b,v).then(()=>{e.contains(b)&&e.removeChild(b)}).catch(_=>{H("Transition leave error:",_),e.contains(b)&&e.removeChild(b)}):e.removeChild(b)}}}for(const f of n){let h;if(f.tag==="#anchor"){const l=f.key,g=`${l}:start`,v=`${l}:end`;let x=m.get(g),S=m.get(v);const E=Array.isArray(f.children)?f.children:[];if(x||(x=document.createTextNode(""),ee(x,g)),S||(S=document.createTextNode(""),ee(S,v)),f._startNode=x,f._endNode=S,!e.contains(x)||!e.contains(S)){e.insertBefore(x,p);const C=f._transition,T=!(C&&C.state==="visible"&&E.length>0)||C.appear;for(const $ of E){const b=te($,r);e.insertBefore(b,p),C&&b instanceof HTMLElement&&T&&Le(b,C).catch(_=>{H("Transition enter error:",_)})}e.insertBefore(S,p)}else{const C=f._transition,T=u.get(l)?._transition,$=T&&T.state!==C?.state,b=C&&C.state==="visible"&&E.length>0&&!$,_=$||!b||C?.appear===!0;d(x,S,u.get(l)?.children,E,C,_)}k(x,S),p=S.nextSibling;continue}if(f.key!=null&&m.has(f.key)){const l=u.get(f.key);h=Me(m.get(f.key),l,f,r,o),y.add(h),h!==p&&e.contains(h)&&(p&&!e.contains(p)&&(p=null),e.insertBefore(h,p))}else h=te(f,r,o),p&&!e.contains(p)&&(p=null),e.insertBefore(h,p),y.add(h);p=h.nextSibling}for(let f=0;f<s.length;f++){const h=s[f];!y.has(h)&&e.contains(h)&&(be(h,o),e.removeChild(h))}}function Me(e,t,n,r,o){if(t&&typeof t!="string"&&t.props?.ref&&o&&be(e,o),t===n)return e;if(typeof n=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==n&&(e.textContent=n),e;{const s=document.createTextNode(n);return e.parentNode?.replaceChild(s,e),s}}if(n&&typeof n!="string"&&n.tag==="#anchor"){const s=n,c=Array.isArray(s.children)?s.children:[],a=s._startNode??document.createTextNode(""),u=s._endNode??document.createTextNode("");s.key!=null&&(ee(a,`${s.key}:start`),ee(u,`${s.key}:end`)),s._startNode=a,s._endNode=u;const m=document.createDocumentFragment();m.appendChild(a);for(const y of c){const p=te(y,r);m.appendChild(p)}return m.appendChild(u),e.parentNode?.replaceChild(m,e),a}if(!n){be(e,o);const s=document.createComment("removed");return e.parentNode?.replaceChild(s,e),s}if(!t||typeof t=="string"){be(e,o);const s=te(n,r,o);return Pe(n,s,o),e.parentNode?.replaceChild(s,e),s}if(n.tag==="#anchor"){const s=Array.isArray(n.children)?n.children:[],c=n._startNode??document.createTextNode(""),a=n._endNode??document.createTextNode("");n.key!=null&&(ee(c,`${n.key}:start`),ee(a,`${n.key}:end`)),n._startNode=c,n._endNode=a;const u=document.createDocumentFragment();u.appendChild(c);for(const m of s)u.appendChild(te(m,r));return u.appendChild(a),e.parentNode?.replaceChild(u,e),c}if(typeof t!="string"&&typeof n!="string"&&t.tag===n.tag&&t.key===n.key){const s=e;return Mt(s,t.props||{},n.props||{},r),Hn(s,t.children,n.children,r,o),Pe(n,s,o),s}if(typeof t!="string"&&typeof n!="string"&&t.tag===n.tag&&(t.tag&&String(t.tag).includes("-")||n.props&&n.props.isCustomElement||t.props&&t.props.isCustomElement))try{const c=e;return Mt(c,t.props||{},n.props||{},r),Pe(n,c,o),c}catch{}be(e,o);const i=te(n,r,o);return Pe(n,i,o),e.parentNode?.replaceChild(i,e),i}function In(e,t,n,r){let o;Array.isArray(t)?t.length===1?(o=t[0],o&&typeof o=="object"&&o.key==null&&(o={...o,key:"__root__"})):o={tag:"div",key:"__root__",children:t}:(o=t,o&&typeof o=="object"&&o.key==null&&(o={...o,key:"__root__"})),o&&typeof o=="object"&&o.tag==="#anchor"&&(o={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[o]}),o=yt(o,String(o.key??"root"));const i=e._prevVNode??null,s=e._prevDom??e.firstChild??null;let c;i&&s?typeof i!="string"&&typeof o!="string"&&i.tag===o.tag&&i.key===o.key?c=Me(s,i,o,n,r):(c=te(o,n,r),e.replaceChild(c,s)):(c=te(o,n,r),e.firstChild?e.replaceChild(c,e.firstChild):e.appendChild(c));const a=[];for(let u=0;u<e.childNodes.length;u++){const m=e.childNodes[u];m!==c&&m.nodeName!=="STYLE"&&(be(m,r),a.push(m))}a.forEach(u=>e.removeChild(u)),e._prevVNode=o,e._prevDom=c}function Je(e){if(typeof e=="string")return ze(e);if(e.tag==="#text")return typeof e.children=="string"?ze(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(Je).join("");if(e.tag==="#raw")return typeof e.children=="string"?e.children:"";let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([r,o])=>` ${r}="${ze(String(o))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(Je).join(""):typeof e.children=="string"?ze(e.children):e.children?Je(e.children):"";return`<${e.tag}${t}>${n}</${e.tag}>`}function Xt(e,...t){let n="";for(let r=0;r<e.length;r++)n+=e[r],r<t.length&&(n+=t[r]);return n}function Yt(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let Ve=null;function Rt(){return Ve||(Ve=new CSSStyleSheet,Ve.replaceSync(Yt(Wn))),Ve}function Fn(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const Wn=Xt`
4
+ • Ensure computed properties don't modify state`),this._value=this.makeReactive(t),ee.triggerUpdate(this)}addDependent(t){this.dependents.add(t)}removeDependent(t){this.dependents.delete(t)}getDependents(){return this.dependents}makeReactive(t){return t===null||typeof t!="object"||t instanceof Node||t instanceof Element||t instanceof HTMLElement?t:Jt.createReactiveProxy(t,()=>ee.triggerUpdate(this),n=>this.makeReactive(n))}}function xt(e){return ee.getOrCreateState(e===void 0?null:e)}function R(e){if(!e||typeof e!="object")return!1;try{const t=Symbol.for("@cer/ReactiveState");return!!e[t]}catch{return!1}}function pe(e){const t=new Ye(e());return{get value(){return ee.trackDependency(t),e()}}}function $n(e,t,n={}){let r=e();n.immediate&&t(r,r);const i=`watch-${Math.random().toString(36).substr(2,9)}`,o=()=>{ee.setCurrentComponent(i,o);const s=e();ee.clearCurrentComponent(),s!==r&&(t(s,r),r=s)};return ee.setCurrentComponent(i,o),e(),ee.clearCurrentComponent(),()=>{ee.cleanup(i)}}const P=e=>{try{e()}catch{}},Be=new Map,ze=new Map,Ue=new Map,jt=500;let Mt,Xt,Rt=!1,Nt=!1,Dt;const Cn=!!(globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);function oe(e){if(Be.has(e))return Be.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return Be.size<jt&&Be.set(e,t),t}function Lt(e){if(ze.has(e))return ze.get(e);const t=e.replace(/-([a-z])/g,(n,r)=>r.toUpperCase());return ze.size<jt&&ze.set(e,t),t}function qe(e){if(typeof e=="string"){if(Ue.has(e))return Ue.get(e);const t=e.replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]);return t!==e&&Ue.size<jt&&Ue.set(e,t),t}return e}function ae(e){if(!e)return"";const t=String(e);if(typeof document<"u"&&typeof document.createElement=="function"){const c=t.replace(/</g,"").replace(/>/g,""),a=Dt||(Dt=document.createElement("div"));try{ae._el=a}catch{}return a.innerHTML=c,(a.textContent||"").replace(new RegExp("","g"),"<").replace(new RegExp("","g"),">")}const n={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "},r=Mt??ae._namedMap;let i=r;if(!i&&Cn)try{const o=globalThis.require;if(typeof o=="function"){const s=["@jasonshimmy/custom-elements-runtime/entities.json","../../entities.json","../../../entities.json","../entities.json","./entities.json"];for(const c of s)try{const a=o(c);if(a){i=a;break}}catch{}}}catch{}if(!i){i=n,Rt=!0;try{ae._usedFallback=!0}catch{}const o=ae._namedMapLoader??Xt;o&&o().then(s=>{Mt=s;try{ae._namedMap=s}catch{}}).catch(()=>{})}if((Rt||ae._usedFallback)&&!(Nt||ae._warnedFallback)){Nt=!0;try{ae._warnedFallback=!0}catch{}try{G("decodeEntities: using small SSR fallback entity map. Register the full entities.json via registerEntityMap(entities) on the server to enable full HTML5 named-entity decoding.")}catch{}}return t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(o,s)=>{if(s.charCodeAt(0)===35){const l=(s.charAt(1)||"").toLowerCase()==="x"?parseInt(s.slice(2),16):parseInt(s.slice(1),10);return Number.isNaN(l)?`&${s};`:String.fromCodePoint(l)}const c=i[s]??(r&&r[s]);return c!==void 0?c:`&${s};`})}async function Yt(){const e=["@jasonshimmy","custom-elements-runtime","entities.json"].join("/");try{const t=await import(e);return t&&(t.default||t)}catch{try{const t=[e,"./entities.json","../../entities.json","../../../entities.json"];for(const n of t)try{const r=await import(n);if(r)return r&&(r.default||r)}catch{}return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}catch{return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}}}Xt=Yt;ae._namedMapLoader=Yt;function En(e){const t=String(e);return{__unsafeHTML:t,__rawHTML:t}}function Ht(e){return!!e&&(typeof e.__unsafeHTML=="string"||typeof e.__rawHTML=="string")}function X(e,t){if(typeof t=="string"){const n=t.split(".").reduce((r,i)=>r?.[i],e);return R(n)?n.value:n}return t}function tt(e,t,n){const r=String(t).split("."),i=r.pop();if(!i)return;const o=r.reduce((s,c)=>(s[c]==null&&(s[c]={}),s[c]),e);R(o[i])?o[i].value=n:o[i]=n}function _n(e){try{if(e&&typeof e=="object"){if(R(e))return e.value;if("value"in e){const t=e.value;return t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"?t:e}}}catch{}return e}function Y(e){const t=_n(e);if(t==null)return null;const n=typeof t;return n==="string"||n==="number"||n==="boolean"?String(t):null}function Qt(e){if(!e||typeof e!="string")return!1;if(e==="class"||e.endsWith("Class"))return!0;if(e.includes("-"))try{if(e.split("-").some(n=>n==="class"))return!0}catch{}return!1}function Sn(e,t,n){if(n)for(const[r,i]of Object.entries(n)){let o,s={};if(Array.isArray(i)?(o=i[0],s=i[1]||{}):o=i,t.set(r,{callback:o,options:s,oldValue:X(e,r)}),s.immediate)try{const c=X(e,r);o(c,void 0,e)}catch(c){H(`Error in immediate watcher for "${r}":`,c)}}}function An(e,t,n,r){const i=(s,c)=>{if(s===c)return!0;if(typeof s!=typeof c||typeof s!="object"||s===null||c===null)return!1;if(Array.isArray(s)&&Array.isArray(c))return s.length!==c.length?!1:s.every((m,y)=>i(m,c[y]));const a=Object.keys(s),l=Object.keys(c);return a.length!==l.length?!1:a.every(m=>i(s[m],c[m]))},o=t.get(n);if(o&&!i(r,o.oldValue))try{o.callback(r,o.oldValue,e),o.oldValue=r}catch(s){H(`Error in watcher for "${n}":`,s)}for(const[s,c]of t.entries())if(c.options.deep&&n.startsWith(s+"."))try{const a=X(e,s);i(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){H(`Error in deep watcher for "${s}":`,a)}}function it(e,t){return t===Boolean?e===""||e==="true":t===Number?Number(e):e}function Tn(e,t,n){if(t)for(const r in t){const i=t[r],o=oe(r),s=e.getAttribute(o);if(i.type===Function&&typeof e[r]=="function")n[r]=e[r];else if(s!==null)n[r]=it(s,i.type);else if(typeof e[r]<"u")try{const c=e[r];if(i.type===String&&c&&typeof c=="object")try{n[r]=it(String(c),i.type)}catch{n[r]=c}else i.type===Boolean&&typeof c=="boolean"||i.type===Number&&typeof c=="number"||i.type===Function&&typeof c=="function"?n[r]=c:n[r]=it(String(c),i.type)}catch{n[r]=e[r]}else"default"in i&&i.default!==void 0&&(n[r]=i.default)}}function jn(e,t,n){if(!t.props){try{const r=n&&n._hookCallbacks&&n._hookCallbacks.props||{},i=Array.from(new Set([...Object.keys(e),...Object.keys(r)]));for(const o of i){if(typeof o!="string"||o.startsWith("_"))continue;const s=Object.getOwnPropertyDescriptor(n,o);if(!(!Object.prototype.hasOwnProperty.call(r,o)&&s&&(s.get||s.set||!s.configurable)))try{Object.defineProperty(n,o,{enumerable:!0,configurable:!0,get(){try{const a=oe(o),l=e.getAttribute(a);if(l!==null)return l;const m=e[o];let y;return R(m)||m&&typeof m=="object"&&"value"in m&&!(m instanceof Node)?y=m.value:y=m,y}catch{return e[o]}}})}catch{}}}catch{}return}Tn(e,t.props,n)}function Ln(e,t,n,r){e.onConnected&&!n&&(e.onConnected(t),r(!0))}function On(e,t,n,r,i,o,s,c){e.onDisconnected&&e.onDisconnected(t),n.forEach(a=>a()),r(),i(),o(!1),s(null),c(!1)}function Pn(e,t,n,r,i){e.onAttributeChanged&&e.onAttributeChanged(t,n,r,i)}class Mn{static cache=new Map;static maxCacheSize=1e3;static dangerousPatterns=[/constructor/i,/prototype/i,/__proto__/i,/function/i,/eval/i,/import/i,/require/i,/window/i,/document/i,/global/i,/process/i,/setTimeout/i,/setInterval/i,/fetch/i,/XMLHttpRequest/i];static evaluate(t,n){const r=this.cache.get(t);if(r){if(!r.isSecure){G("Blocked cached dangerous expression:",t);return}return r.evaluator(n)}const i=this.createEvaluator(t);if(this.cache.size>=this.maxCacheSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}if(this.cache.set(t,i),!i.isSecure){G("Blocked dangerous expression:",t);return}return i.evaluator(n)}static createEvaluator(t){if(this.hasDangerousPatterns(t))return{evaluator:()=>{},isSecure:!1};if(t.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(t),isSecure:!0}}catch(n){return G("Failed to create evaluator for expression:",t,n),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(t){return this.dangerousPatterns.some(n=>n.test(t))}static createSafeEvaluator(t){const n=t.trim();if(n.startsWith("{")&&n.endsWith("}"))return this.createObjectEvaluator(t);if(/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())){const r=t.trim().slice(4);return i=>X(i,r)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):r=>X(r,t)}static createObjectEvaluator(t){const n=t.trim().slice(1,-1),r=this.parseObjectProperties(n);return i=>{const o={};for(const{key:s,value:c}of r)try{if(c.startsWith("ctx.")){const a=c.slice(4);o[s]=X(i,a)}else o[s]=this.evaluateSimpleValue(c,i)}catch{o[s]=void 0}return o}}static parseObjectProperties(t){const n=[],r=t.split(",");for(const i of r){const o=i.indexOf(":");if(o===-1)continue;const s=i.slice(0,o).trim(),c=i.slice(o+1).trim(),a=s.replace(/^['"]|['"]$/g,"");n.push({key:a,value:c})}return n}static createSimpleEvaluator(t){return n=>{try{let r=t;const i=[];r=r.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,y=>`<<#${i.push(y)-1}#>>`);const o=r.match(/ctx\.[\w.]+/g)||[];for(const y of o){const p=y.slice(4),v=X(n,p);if(v===void 0)return;const f=i.push(JSON.stringify(v))-1;r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${f}#>>`)}const s=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,c=r.match(s)||[];for(const y of c){if(y.startsWith("ctx."))continue;const p=X(n,y);if(p===void 0)return;const v=i.push(JSON.stringify(p))-1;r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${v}#>>`)}const a=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let l;const m=new Set;for(;(l=a.exec(r))!==null;){const y=l[1];if(["true","false","null","undefined"].includes(y)||/^[0-9]+$/.test(y)||y==="ctx"||m.has(y))continue;m.add(y);const p=X(n,y);if(p===void 0)return;const v=JSON.stringify(p),f=i.push(v)-1;y.includes(".")?r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${f}#>>`):r=r.replace(new RegExp("\\b"+y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${f}#>>`)}r=r.replace(/<<#(\d+)#>>/g,(y,p)=>i[Number(p)]);try{return this.evaluateBasicExpression(r)}catch{return}}catch{return}}}static evaluateBasicExpression(t){const n=this.tokenize(t);let r=0;function i(){return n[r]}function o(u){const g=n[r++];if(u&&!g)throw new Error(`Unexpected token EOF, expected ${u}`);if(u&&g&&g.type!==u&&g.value!==u)throw new Error(`Unexpected token ${g.type}/${g.value}, expected ${u}`);return g}function s(){return c()}function c(){let u=a();if(i()&&i().value==="?"){o("?");const g=s();o(":");const w=s();return u?g:w}return u}function a(){let u=l();for(;i()&&i().value==="||";){o("OP");const g=l();u=u||g}return u}function l(){let u=m();for(;i()&&i().value==="&&";){o("OP");const g=m();u=u&&g}return u}function m(){let u=y();for(;i()&&["==","!=","===","!=="].includes(i().value);){const g=o("OP").value,w=y();switch(g){case"==":u=u==w;break;case"!=":u=u!=w;break;case"===":u=u===w;break;case"!==":u=u!==w;break}}return u}function y(){let u=p();for(;i()&&[">","<",">=","<="].includes(i().value);){const g=o("OP").value,w=p();switch(g){case">":u=u>w;break;case"<":u=u<w;break;case">=":u=u>=w;break;case"<=":u=u<=w;break}}return u}function p(){let u=v();for(;i()&&(i().value==="+"||i().value==="-");){const g=o("OP").value,w=v();u=g==="+"?u+w:u-w}return u}function v(){let u=f();for(;i()&&(i().value==="*"||i().value==="/"||i().value==="%");){const g=o("OP").value,w=f();switch(g){case"*":u=u*w;break;case"/":u=u/w;break;case"%":u=u%w;break}}return u}function f(){return i()&&i().value==="!"?(o("OP"),!f()):i()&&i().value==="-"?(o("OP"),-f()):h()}function h(){const u=i();if(u){if(u.type==="NUMBER")return o("NUMBER"),Number(u.value);if(u.type==="STRING")return o("STRING"),u.value.slice(1,-1);if(u.type==="IDENT")return o("IDENT"),u.value==="true"?!0:u.value==="false"?!1:u.value==="null"?null:void 0;if(u.value==="["){o("PUNC");const g=[];for(;i()&&i().value!=="]";)g.push(s()),i()&&i().value===","&&o("PUNC");return o("PUNC"),g}if(u.value==="("){o("PUNC");const g=s();return o("PUNC"),g}throw new Error("Unexpected token in expression")}}return s()}static tokenize(t){const n=[],r=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let i;for(;(i=r.exec(t))!==null;){const o=i[1];o&&(/^\d/.test(o)?n.push({type:"NUMBER",value:o}):/^"/.test(o)||/^'/.test(o)?n.push({type:"STRING",value:o}):/^[a-zA-Z_]/.test(o)?n.push({type:"IDENT",value:o}):/^[()?:,\[\]]$/.test(o)?n.push({type:"PUNC",value:o}):n.push({type:"OP",value:o}))}return n}static evaluateSimpleValue(t,n){if(t==="true")return!0;if(t==="false")return!1;if(!isNaN(Number(t)))return Number(t);if(t.startsWith("ctx.")){const r=t.slice(4);return X(n,r)}return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class ce{static cleanupFunctions=new WeakMap;static addListener(t,n,r,i){t.addEventListener(n,r,i);const s={event:n,handler:r,wrapper:r,options:i,cleanup:()=>t.removeEventListener(n,r,i),addedAt:Date.now()};this.cleanupFunctions.has(t)||this.cleanupFunctions.set(t,[]);const c=this.cleanupFunctions.get(t);c.push(s),c.__metaList=c}static removeListener(t,n,r,i){t.removeEventListener(n,r,i);const o=this.cleanupFunctions.get(t);if(o)for(let s=0;s<o.length;s++){const c=o[s];if(c.event===n&&c.handler===r){o.splice(s,1),o.length===0&&this.cleanupFunctions.delete(t);return}}}static cleanup(t){const n=this.cleanupFunctions.get(t);n&&(n.forEach(r=>{try{r.cleanup()}catch{}}),this.cleanupFunctions.delete(t))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(t){const n=this.cleanupFunctions.get(t);return!!(n&&n.length>0)}static getListenerCount(t){const n=this.cleanupFunctions.get(t);return n?n.length:0}static getListenerInfo(t){const n=this.cleanupFunctions.get(t);return n?n.map(r=>({event:r.event,handler:r.handler,wrapper:r.wrapper,options:r.options})):[]}}function Ke(e,t){return Array.isArray(e)&&Array.isArray(t)?JSON.stringify([...e].sort())!==JSON.stringify([...t].sort()):e!==t}function Ft(e,t,n,r,i){if(e)if(i&&typeof t.value=="object"&&t.value!==null){const o={...t.value};o[i]=n,t.value=o}else t.value=n;else{const o=r._state||r;tt(o,t,n)}}function Ve(e,t,n,r){if(e._requestRender&&e._requestRender(),e._triggerWatchers){const i=t?"reactiveState":n;e._triggerWatchers(i,r)}}function Rn(e,t,n){const r=`update:${oe(t)}`,i=`update:${t}`,o=new CustomEvent(r,{detail:n,bubbles:!0,composed:!0}),s=new CustomEvent(i,{detail:n,bubbles:!0,composed:!0});e.dispatchEvent(o),e.dispatchEvent(s)}function It(e,t,n,r){const i=n;P(()=>{e[t]=i}),P(()=>{const o=oe(t);if(typeof i=="boolean"){const s=Y(i);s!==null?e.setAttribute(o,s):e.removeAttribute?.(o)}else if(i!=null&&(typeof i=="string"||typeof i=="number"))e.setAttribute(o,String(i));else{const s=Y(i);s!==null?e.setAttribute(o,s):e.removeAttribute?.(o)}}),P(()=>{e._applyProps?.(e._cfg)}),P(()=>{e._requestRender?.()})}function Nn(e,t,n,r){if(e){const o=t.value;return r&&typeof o=="object"&&o!==null?o[r]:o}const i=n._state||n;return X(i,t)}function _e(e){return e?e.split(/\s+/).filter(Boolean):[]}function Se(e,t){if(t.length===0)return;const n=t.filter(r=>r&&!e.classList.contains(r));n.length>0&&e.classList.add(...n)}function Ee(e,t){if(t.length===0)return;const n=t.filter(Boolean);n.length>0&&e.classList.remove(...n)}let ot=!1;async function Dn(e,t,n=10){if(!ot){if(!e.isConnected){G("⚠️ Element not connected to DOM, skipping style wait");return}for(let r=0;r<n;r++){const i=window.getComputedStyle(e),o=i.transform&&i.transform!=="",s=i.opacity&&i.opacity!=="";if(o||s){ot=!0;return}await new Promise(c=>requestAnimationFrame(()=>c(void 0)))}ot=!0,G("⚠️ Styles did not load in time for transition, continuing anyway")}}function Hn(e){const t=window.getComputedStyle(e),n=t.transitionDuration||"0s",r=t.transitionDelay||"0s",i=o=>{const s=parseFloat(o);return o.includes("ms")?s:s*1e3};return i(n)+i(r)}function en(e,t){return new Promise(n=>{const r=t??Hn(e);if(r<=0){n();return}let i=!1;const o=()=>{i||(i=!0,e.removeEventListener("transitionend",s),e.removeEventListener("transitioncancel",s),n())},s=()=>o();e.addEventListener("transitionend",s),e.addEventListener("transitioncancel",s),setTimeout(o,r+50)})}async function Pe(e,t){const{classes:n,hooks:r,css:i,duration:o}=t;if(r?.onBeforeEnter)try{r.onBeforeEnter(e)}catch(f){H("Transition onBeforeEnter error:",f)}if(!i)return r?.onEnter?new Promise(f=>{r.onEnter(e,()=>{if(r?.onAfterEnter)try{r.onAfterEnter(e)}catch(h){H("Transition onAfterEnter error:",h)}f()})}):void 0;const s=_e(n?.enterFrom),c=_e(n?.enterActive),a=_e(n?.enterTo);Se(e,s),e.offsetHeight,Se(e,c),e.offsetHeight;let l;if(r?.onEnter){const f=new Promise(h=>{l=h});try{r.onEnter(e,()=>{l&&l()})}catch(h){H("Transition onEnter error:",h)}l&&await f}await new Promise(f=>requestAnimationFrame(()=>f(void 0))),e.offsetHeight;const m=window.getComputedStyle(e),y=m.transform,p=m.opacity;Ee(e,s),y&&y!=="none"&&(e.style.transform=y),p&&p!==""&&(e.style.opacity=p),e.offsetHeight,await new Promise(f=>requestAnimationFrame(()=>f(void 0))),e.style.transform="",e.style.opacity="",Se(e,a),e.offsetHeight,await new Promise(f=>requestAnimationFrame(()=>f(void 0)));let v;if(typeof o=="number"?v=o:o&&typeof o=="object"&&"enter"in o&&(v=o.enter),await en(e,v),Ee(e,c),r?.onAfterEnter)try{r.onAfterEnter(e)}catch(f){H("Transition onAfterEnter error:",f)}}async function st(e,t){const{classes:n,hooks:r,css:i,duration:o}=t;if(r?.onBeforeLeave)try{r.onBeforeLeave(e)}catch(y){H("Transition onBeforeLeave error:",y)}if(!i)return r?.onLeave?new Promise(y=>{r.onLeave(e,()=>{if(r?.onAfterLeave)try{r.onAfterLeave(e)}catch(p){H("Transition onAfterLeave error:",p)}y()})}):void 0;const s=_e(n?.leaveFrom),c=_e(n?.leaveActive),a=_e(n?.leaveTo);Se(e,s),e.offsetHeight,Se(e,c);let l;if(r?.onLeave){const y=new Promise(p=>{l=p});try{r.onLeave(e,()=>{l&&l()})}catch(p){H("Transition onLeave error:",p)}l&&await y}await new Promise(y=>requestAnimationFrame(()=>y(void 0))),await Dn(e,[...s,...c]),Ee(e,s),Se(e,a);let m;if(typeof o=="number"?m=o:o&&typeof o=="object"&&"leave"in o&&(m=o.leave),await en(e,m),Ee(e,c),Ee(e,a),Ee(e,s),r?.onAfterLeave)try{r.onAfterLeave(e)}catch(y){H("Transition onAfterLeave error:",y)}}const tn=new WeakMap,nn=new WeakMap;function Ge(e){if(!e)return;const t=tn.get(e);if(t!==void 0)return t;try{const n=e;if(n&&n.key!=null)return n.key}catch{}if(e instanceof Element){const n=e.getAttribute("data-anchor-key");if(n)return n}}function te(e,t){try{tn.set(e,t)}catch{}try{e.key=t}catch{}try{if(e instanceof Element){const n=Y(t);n!==null&&e.setAttribute("data-anchor-key",n)}}catch{}}function Fn(e){if(!e)return;const t=nn.get(e);if(t!==void 0)return t;try{const n=e;if(n&&n._transitionGroup!=null)return n._transitionGroup}catch{}}function In(e,t){try{nn.set(e,t)}catch{}try{e._transitionGroup=t}catch{}}function ie(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function Ae(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?R(e)||"value"in e?!!e.value:!1:!!e}function we(e,t){if(!t||!(e instanceof HTMLElement))return;ce.cleanup(e);for(const r in t)t[r]===e&&delete t[r];const n=e.childNodes;for(let r=0;r<n.length;r++)we(n[r],t)}function Re(e,t,n){if(typeof e=="string")return;const r=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),i=e.props?.ref??(e.props?.props&&e.props.props.ref);r?r.value=t:i&&n&&(n[i]=t)}function Wn(e,t,n,r,i,o,s,c){if(!o)return;const a=t.includes("lazy"),l=t.includes("trim"),m=t.includes("number"),y=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",p=()=>{if(y){const k=e.value;return c&&s&&(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement)&&typeof k=="object"&&k!==null?k[c]:k}return X(o._state||o,e)},v=p();let f="text";s instanceof HTMLInputElement?f=r?.type||s.type||"text":s instanceof HTMLSelectElement?f="select":s instanceof HTMLTextAreaElement&&(f="textarea");const h=s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement,u=h?f==="checkbox"||f==="radio"?"checked":"value":c??"modelValue";if(f==="checkbox")if(Array.isArray(v))n[u]=v.includes(String(s?.getAttribute("value")??r?.value??""));else{const k=s?.getAttribute("true-value")??!0;n[u]=v===k}else if(f==="radio")n[u]=v===(r?.value??"");else if(f==="select")if(s&&s.hasAttribute("multiple")&&s instanceof HTMLSelectElement){const k=Array.isArray(v)?v.map(String):[];setTimeout(()=>{Array.from(s.options).forEach(S=>{S.selected=k.includes(S.value)})},0),n[u]=Array.isArray(v)?v:[]}else n[u]=v;else{!h&&y?n[u]=e:n[u]=v;try{const k=oe(u);r&&(r[k]=v)}catch{}}const g=a||f==="checkbox"||f==="radio"||f==="select"?"change":"input",w=k=>{if(k.isComposing||i._isComposing)return;const S=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(k.isTrusted===!1&&!S)return;const C=k.target;if(!C||C._modelUpdating)return;let _=C.value;if(f==="checkbox"){const $=p();if(Array.isArray($)){const b=C.getAttribute("value")??"",E=Array.from($);if(C.checked)E.includes(b)||E.push(b);else{const O=E.indexOf(b);O>-1&&E.splice(O,1)}_=E}else{const b=C.getAttribute("true-value")??!0,E=C.getAttribute("false-value")??!1;_=C.checked?b:E}}else if(f==="radio")_=C.getAttribute("value")??C.value;else if(f==="select"&&C.multiple)_=Array.from(C.selectedOptions).map($=>$.value);else if(l&&typeof _=="string"&&(_=_.trim()),m){const $=Number(_);isNaN($)||(_=$)}const x=p();if(Ke(_,x)){C._modelUpdating=!0;try{Ft(y,e,_,o,c),Ve(o,y,e,_),C&&Rn(C,u,_)}finally{setTimeout(()=>C._modelUpdating=!1,0)}}};if(h){if(i[g]){const k=i[g];s&&ce.removeListener(s,g,k)}i[g]=w}else{const k=`update:${oe(u)}`,S=`update:${u}`;if(i[k]){const C=i[k];s&&ce.removeListener(s,k,C)}if(i[S]){const C=i[S];s&&ce.removeListener(s,S,C)}if(i[k]=C=>{const _=C.detail!==void 0?C.detail:C.target?.value,x=Nn(y,e,o,c);if(Ke(_,x)){Ft(y,e,_,o,c),Ve(o,y,e,_);const $=C.target;$&&It($,u,y?e:_,y)}},y&&typeof e.value=="object"&&e.value!==null){let C=[];try{C=Reflect.ownKeys(e.value)}catch{C=Object.keys(e.value)}const _=C.filter(x=>typeof x=="string"&&!String(x).startsWith("_")&&x!=="constructor");for(const x of _){const T=`update:${oe(x)}`,$=`update:${x}`;i[T]||(i[T]=b=>{const E=b.detail!==void 0?b.detail:b.target?.value,O=y?e.value[x]:X(o._state||o,e);if(!Ke(E,O))return;if(y){const M={...e.value};M[x]=E,e.value=M}else tt(o._state||o,e,E);Ve(o,y,e,E);const A=b.currentTarget||s||b.target;A&&It(A,u,y?e:E,y)},i[$]=i[T])}}i[S]=i[k]}(f==="text"||f==="textarea")&&(i.compositionstart=()=>i._isComposing=!0,i.compositionend=k=>{i._isComposing=!1;const S=k.target;S&&setTimeout(()=>{const C=S.value,_=o._state||o,x=X(_,e);let T=C;if(l&&(T=T.trim()),m){const b=Number(T);isNaN(b)||(T=b)}if(Ke(T,x)){S._modelUpdating=!0;try{tt(_,e,T),Ve(o,y,e,T)}finally{setTimeout(()=>S._modelUpdating=!1,0)}}},0)})}function rn(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function Bn(e,t,n,r,i){if(typeof e=="object"&&e!==null)for(const[o,s]of Object.entries(e))if(o.startsWith("data-")||o.startsWith("aria-")||o==="class")n[o]=s;else if(o==="disabled"&&i&&ie(i)){const c=s&&typeof s=="object"&&"value"in s;(()=>{try{return R(s)}catch{return!1}})()||c?t[o]=s:n[o]=s}else t[o]=s;else if(typeof e=="string"){if(!r)return;try{const o=Ie(e,r);if(typeof o=="object"&&o!==null){for(const[s,c]of Object.entries(o))if(s.startsWith("data-")||s.startsWith("aria-")||s==="class")n[s]=c;else if(s==="disabled"&&i&&ie(i)){const a=c&&typeof c=="object"&&"value"in c;(()=>{try{return R(c)}catch{return!1}})()||a?t[s]=c:n[s]=c}else t[s]=c;return}else{n[e]=o;return}}catch{const o=X(r,e);n[e]=o}}}function zn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=Ie(e,n)}else r=e;const i=t.style||"";let o=i;if(r){if(i){const s=i.split(";").map(a=>a.trim()).filter(Boolean),c=s.findIndex(a=>a.startsWith("display:"));c>=0&&s[c]==="display: none"&&(s.splice(c,1),o=s.length>0?s.join("; ")+";":"")}}else if(i){const s=i.split(";").filter(Boolean),c=s.findIndex(a=>a.trim().startsWith("display:"));c>=0?s[c]="display: none":s.push("display: none"),o=s.join("; ")}else o="display: none";o!==i&&(o?t.style=o:delete t.style)}function Ie(e,t){return Mn.evaluate(e,t)}function Un(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=Ie(e,n)}else r=e;try{if(r&&typeof r=="object"){if(R(r))r=r.value;else if("value"in r&&typeof r.value<"u"){const c=r.value;c instanceof Node||(r=c)}}}catch{}let i=[];if(typeof r=="string")i=[r];else if(Array.isArray(r))i=r.filter(Boolean);else if(typeof r=="object"&&r!==null)for(const[c,a]of Object.entries(r))a&&i.push(c);const o=t.class||"",s=i.join(" ");t.class=o?`${o} ${s}`.trim():s}function kt(e){if(e===!0||e===!1)return!0;if(e==null)return!1;if(typeof e==="string")return e===""||e==="true"||e==="false";try{if(e&&typeof e=="object"&&"value"in e){const n=e.value,r=typeof n;return r==="boolean"?!0:r==="string"?n===""||n==="true"||n==="false":!1}}catch{}return!1}function qn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=Ie(e,n)}else r=e;let i="";if(typeof r=="string")i=r;else if(r&&typeof r=="object"){const s=[];for(const[c,a]of Object.entries(r))if(a!=null&&a!==""){const l=c.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`),m=["width","height","top","right","bottom","left","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","font-size","line-height","border-width","border-radius","min-width","max-width","min-height","max-height"];let y=String(a);typeof a=="number"&&m.includes(l)&&(y=`${a}px`),s.push(`${l}: ${y}`)}i=s.join("; ")+(s.length>0?";":"")}const o=t.style||"";t.style=o+(o&&!o.endsWith(";")?"; ":"")+i}function Kn(e,t,n){let r=e;typeof e=="string"&&n&&(r=Ie(e,n)),R(r)?t.reactiveRef=r:t.ref=r}function on(e,t,n,r){const i={},o={...r||{}},s={};for(const[c,a]of Object.entries(e)){const{value:l,modifiers:m,arg:y}=a;if(c==="model"||c.startsWith("model:")){const p=c.split(":"),v=p.length>1?p[1]:y;Wn(l,m,i,o,s,t,n,v);continue}switch(c){case"bind":Bn(l,i,o,t,n);break;case"show":zn(l,o,t);break;case"class":Un(l,o,t);break;case"style":qn(l,o,t);break;case"ref":Kn(l,i,t);break}}try{if(Object.prototype.hasOwnProperty.call(i,"disabled")&&n&&ie(n)){const a=i.disabled,l=a&&typeof a=="object"&&"value"in a;let m=!1;try{m=R(a)}catch{m=!1}if(!l&&!m)try{o.disabled=a,delete i.disabled;const y=globalThis;y.__VDOM_DISABLED_PROMOTIONS||(y.__VDOM_DISABLED_PROMOTIONS=[]),y.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:a,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:i,attrs:o,listeners:s}}function $t(e,t){if(Array.isArray(e)){const o=new Set;return e.map(s=>{if(!s||typeof s!="object")return s;let c=s.props?.key??s.key;if(!c){const y=s.tag||"node",v=[s.props?.attrs?.id,s.props?.attrs?.name,s.props?.attrs?.["data-key"],s.props?.props?.id,s.props?.props?.name,s.props?.props?.dataKey,s.props?.props?.["data-key"]].find(f=>f!=null)??"";c=v?`${t}:${y}:${v}`:`${t}:${y}`}let a=c,l=1;for(;o.has(a);)a=`${c}#${l++}`;o.add(a);let m=s.children;return Array.isArray(m)&&(m=$t(m,a)),{...s,key:a,children:m}})}const n=e;let r=n.props?.key??n.key??t,i=n.children;return Array.isArray(i)&&(i=$t(i,r)),{...n,key:r,children:i}}function Wt(e,t,n,r){const i=n.directives??{},o=on(i,r,e,n.attrs),s={...t.props,...n.props,...o.props},c={...t.attrs,...n.attrs,...o.attrs},a=t.props??{},l=s,m=n?.isCustomElement??t?.isCustomElement??!1;let y=!1;for(const f in{...a,...l}){const h=a[f],d=l[f];let u=h,g=d;if(P(()=>{(R(h)||h&&typeof h=="object"&&"value"in h)&&(u=h.value)}),P(()=>{(R(d)||d&&typeof d=="object"&&"value"in d)&&(g=d.value)}),!(h===d&&u===g))if(y=!0,f==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const w=typeof d=="object"&&d!==null&&R(d)||d&&typeof d=="object"&&"value"in d?d.value:d;e.value!==w&&(e.value=w??"")}else if(f==="checked"&&e instanceof HTMLInputElement){const w=typeof d=="object"&&d!==null&&R(d)||d&&typeof d=="object"&&"value"in d?d.value:d;e.checked=!!w}else if(f.startsWith("on")&&typeof d=="function"){const w=rn(f);typeof h=="function"&&ce.removeListener(e,w,h),ce.addListener(e,w,d);try{if(w&&w.startsWith("update:")){const k=w.split(":",2)[1],S=l[k];let C=[];try{if(R(S)){const x=S.value;C=x&&typeof x=="object"?Object.keys(x):[]}else S&&typeof S=="object"&&(C=Object.keys(S))}catch{C=[]}const _=C.filter(x=>typeof x=="string"&&!x.startsWith("_")&&x!=="constructor");for(const x of _){const T=`update:${x}`,$=b=>{const E=b.detail!==void 0?b.detail:b.target?.value,j={...R(S)?S.value||{}:l[k]||{},[x]:E};P(()=>{d({detail:j})})};P(()=>{ce.addListener(e,T,$)})}}}catch{}}else if(d==null)e.removeAttribute(f);else{const w=n?.isCustomElement??t?.isCustomElement??!1;if(w||f in e)try{e[f]=d,f==="disabled"&&d===!1&&!w&&ie(e)&&e.removeAttribute("disabled")}catch{}else d===!1&&e.removeAttribute(f)}}for(const[f,h]of Object.entries(o.listeners||{})){ce.addListener(e,f,h);try{const d=e&&e.parentElement;d&&d!==e&&ce.addListener(d,f,h)}catch{}}const p=t.attrs??{},v=c;for(const f in{...p,...v}){const h=p[f],d=v[f];let u=h,g=d;if(R(h)&&(u=h.value),R(d)&&(g=d.value),u!==g)if(y=!0,g==null||g===!1)P(()=>{e.removeAttribute(f)}),f==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?P(()=>{e.value=""}):e instanceof HTMLSelectElement?P(()=>{e.value=""}):e instanceof HTMLProgressElement&&P(()=>{e.value=0})),f==="checked"&&e instanceof HTMLInputElement&&P(()=>{e.checked=!1}),f==="disabled"&&ie(e)&&P(()=>{e.disabled=!1});else{if(f==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){P(()=>{e.value=g??""});continue}else if(e instanceof HTMLSelectElement){P(()=>{e.value=g??""});continue}else if(e instanceof HTMLProgressElement){P(()=>{e.value=Number(g)});continue}}if(f==="checked"&&e instanceof HTMLInputElement){P(()=>{e.checked=!!g});continue}if(f==="style"){const k=Y(g);k!==null&&e.setAttribute(f,k);continue}if(f==="disabled"&&ie(e)){P(()=>{e.disabled=Ae(g)}),Ae(g)?P(()=>{e.setAttribute(f,"")}):P(()=>{e.removeAttribute(f)});continue}const w=e.namespaceURI==="http://www.w3.org/2000/svg";if(m&&!w&&f.includes("-"))if(Qt(f)){const k=Y(d??g);if(k!==null)try{e.setAttribute(f,k)}catch{}}else{const k=Lt(f);try{R(d)?e[k]=d:e[k]=g}catch{const C=Y(d??g);C!==null&&e.setAttribute(f,C)}}else if(!w&&f in e)try{R(d)?e[f]=d:e[f]=g}catch{const S=Y(g);S!==null&&e.setAttribute(f,S)}else{const k=Y(g);k!==null&&e.setAttribute(f,k)}}}try{if(ie(e)){const f=s.disabled;let h;try{const u=Object.prototype.hasOwnProperty.call(o.props||{},"disabled"),g=f&&typeof f=="object"&&"value"in f;let w=!1;P(()=>{w=!!R(f)});const k=kt(f);w||g||u||k?h=f:h=c.disabled}catch{h=c.disabled}const d=Ae(h);P(()=>{e.disabled=d}),P(d?()=>{e.setAttribute("disabled","")}:()=>{e.removeAttribute("disabled")})}}catch{}m&&y&&(P(()=>{e._applyProps?.(e._cfg)}),P(()=>{typeof e.requestRender=="function"?e.requestRender():typeof e._render=="function"&&e._render(e._cfg)}))}function ne(e,t,n){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const p=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&te(p,e.key),p}if(e.tag==="#raw"){const p=typeof e.children=="string"?e.children:"";return document.createRange().createContextualFragment(p)}if(e.tag==="#anchor"){const p=e,v=Array.isArray(p.children)?p.children:[],f=document.createTextNode(""),h=document.createTextNode("");p.key!=null&&(te(f,`${p.key}:start`),te(h,`${p.key}:end`)),p._startNode=f,p._endNode=h;const d=document.createDocumentFragment();d.appendChild(f);for(const u of v){const g=ne(u,t);if(p.key!=null&&g instanceof Element&&!g.hasAttribute("data-anchor-key")){const w=u;w&&typeof w=="object"&&w.key!=null||te(g,p.key)}d.appendChild(g)}return d.appendChild(h),d}const r=document.createElement(e.tag);e.key!=null&&te(r,e.key),e.props&&e.props._transitionGroup&&In(r,e.props._transitionGroup);const{props:i={},attrs:o={},directives:s={}}=e.props??{},c=on(s,t,r,o),a={...i,...c.props},l={...o,...c.attrs};try{const p=(l&&l.class)??(a&&a.class)??(e.props&&e.props.attrs&&e.props.attrs.class)??(e.props&&e.props.props&&e.props.props.class),v=Y(p);if(v!==null){const f=String(v).trim();f&&r.setAttribute("class",f)}}catch{}try{if(a.disabled!==void 0&&r&&ie(r)){const p=a.disabled,v=p&&typeof p=="object"&&"value"in p;let f=!1;try{f=R(p)}catch{f=!1}!v&&!f&&P(()=>{l.disabled=p,delete a.disabled})}}catch{}const m=r.namespaceURI==="http://www.w3.org/2000/svg";for(const p in l){const v=l[p];if(typeof p!="string"||/\[object Object\]/.test(p))continue;const f=typeof v=="object"&&v!==null&&R(v)||v&&typeof v=="object"&&"value"in v?v.value:v;if(typeof f=="boolean")f?r.setAttribute(p,""):P(()=>{r.removeAttribute(p)});else if(f!=null){if(p==="disabled"&&ie(r)){const h=a.disabled,d=kt(h)?h:f,u=Ae(d);P(()=>{r.disabled=u}),P(u?()=>{r.setAttribute(p,"")}:()=>{r.removeAttribute(p)});continue}if(!m&&p==="value"&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement||r instanceof HTMLProgressElement))try{r instanceof HTMLProgressElement?r.value=Number(f):r.value=f??""}catch{const d=Y(f);d!==null&&r.setAttribute(p,d)}else if(!m&&p==="checked"&&r instanceof HTMLInputElement)try{r.checked=!!f}catch{const d=Y(f);d!==null&&r.setAttribute(p,d)}else if(!m&&p in r)try{r[p]=f,p==="disabled"&&f===!1&&ie(r)&&r.removeAttribute("disabled")}catch{const d=Y(f);d!==null&&r.setAttribute(p,d)}else if((e.props?.isCustomElement??!1)&&!m&&p.includes("-")){const d=Lt(p);try{r[d]=f}catch{const g=Y(f);g!==null&&r.setAttribute(p,g)}}else{const d=Y(f);d!==null&&r.setAttribute(p,d)}}}for(const p in a){const v=a[p];if(!(typeof p!="string"||/\[object Object\]/.test(p)))if(p==="value"&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)){const f=typeof v=="object"&&v!==null&&typeof v.value<"u"?v.value:v;P(()=>{r.value=f??""})}else if(p.startsWith("on")&&typeof v=="function"){const f=rn(p),h=f.includes(":")?(()=>{const d=f.split(":"),u=d[1];if(u.includes("-")){const g=u.split("-").map((w,k)=>k===0?w:w.charAt(0).toUpperCase()+w.slice(1)).join("");return`${d[0]}:${g}`}else{const g=u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${d[0]}:${g}`}})():f;c.listeners&&(c.listeners[f]||c.listeners[h])||ce.addListener(r,f,v)}else{if(p.startsWith("on")&&v===void 0)continue;if(v==null||v===!1)r.removeAttribute(p);else{const f=e.props?.isCustomElement??!1,h=typeof v=="object"&&v!==null&&R(v)?v:typeof v=="object"&&v!==null&&typeof v.value<"u"?v.value:v;if(p==="class"||p==="style"){try{const d=Y(h);d!==null&&r.setAttribute(p,d)}catch{}continue}if(f||p in r)try{const d=typeof v=="object"&&v!==null&&R(v)?v:typeof v=="object"&&v!==null&&typeof v.value<"u"?v.value:v;if(p==="disabled"&&ie(r)){const u=a.disabled!==void 0?a.disabled:d,g=Ae(u);P(()=>{r.disabled=g}),P(g?()=>{r.setAttribute(p,"")}:()=>{r.removeAttribute(p)});continue}try{if(typeof r[p]=="boolean"){let g=d;typeof d=="string"?d==="false"?g=!1:d==="true"?g=!0:g=!!d&&d!=="":g=!!d,r[p]=g}else r[p]=d}catch{r[p]=d}}catch{}}}}for(const[p,v]of Object.entries(c.listeners||{}))ce.addListener(r,p,v);const y={...e,props:{...e.props,...c.props}};Re(y,r,n);try{if(typeof r._applyProps=="function")try{r._applyProps(r._cfg)}catch{}typeof r.requestRender=="function"?r.requestRender():typeof r._render=="function"&&r._render(r._cfg)}catch{}if(Array.isArray(e.children))for(const p of e.children)r.appendChild(ne(p,t,n));else typeof e.children=="string"&&(r.textContent=e.children);try{if(r instanceof HTMLSelectElement&&l&&l.hasOwnProperty("value"))try{r.value=l.value??""}catch{}}catch{}try{if(ie(r)){const p=a.disabled,v=l.disabled,f=p&&typeof p=="object"&&"value"in p;let h=!1;try{h=!!R(p)}catch{h=!1}const u=h||f||kt(p)?p:v,g=Ae(u);P(()=>{r.disabled=g}),P(g?()=>{r.setAttribute("disabled","")}:()=>{r.removeAttribute("disabled")})}}catch{}return r}function Vn(e,t,n,r,i){if(typeof n=="string"){e.textContent!==n&&(e.textContent=n);return}if(!Array.isArray(n))return;const o=e.childNodes,s=[];for(let h=0;h<o.length;h++)s.push(o[h]);const c=Array.isArray(t)?t:[],a=Fn(e);if(a){const h=w=>typeof w=="string"&&w.startsWith("each-")?w.substring(5):w,d=[],u=[];for(const w of n)if(w&&w.tag==="#anchor"){const k=Array.isArray(w.children)?w.children:[];for(const S of k){const C=h(S.key||w.key||"unknown");d.push({...S,key:C})}}else w&&d.push({...w,key:h(w.key)});for(const w of c)if(w&&w.tag==="#anchor"){const k=Array.isArray(w.children)?w.children:[];for(const S of k){const C=h(S.key||w.key||"unknown");u.push({...S,key:C})}}else w&&u.push({...w,key:h(w.key)});if(d.some(w=>w&&w.key!=null)||u.some(w=>w&&w.key!=null)){const w=new Map,k=new Map;for(const $ of u)if($&&$.key!=null){const b=String($.key);w.set(b,$)}for(let $=0;$<s.length;$++){const b=s[$];let E=Ge(b);if(E=h(E),E!=null&&b instanceof Element&&b.nodeType===Node.ELEMENT_NODE){let O=typeof E=="string"&&E.includes(":")?E.substring(0,E.lastIndexOf(":")):E;O=String(O),k.set(O,b)}}const S=new Set,C=new Map,_=s.length>0;if(a.moveClass&&_)for(let $=0;$<s.length;$++){const b=s[$];if(b instanceof HTMLElement&&b.parentElement){const E=b.getBoundingClientRect();C.set(b,E)}}const x=[];for(const $ of d){let b=$.key;if(b==null)continue;b=String(b);const E=w.get(b);let O=k.get(b);if(O&&E){const j=Ne(O,E,$,r);S.add(O);const A=String(b);te(j,A),x.push({node:j,key:b,newVNode:$,oldVNode:E,isNew:!1})}else{O=ne($,r),te(O,b),e.appendChild(O);const j=_||a.appear===!0;O instanceof HTMLElement&&j&&Pe(O,a).catch(A=>{H("Enter transition error:",A)}),x.push({node:O,key:b,newVNode:$,isNew:!0})}}const T=[];for(let $=0;$<s.length;$++){const b=s[$],E=Ge(b);if(!S.has(b)&&E!=null&&b instanceof HTMLElement){const j=st(b,a).then(()=>{e.contains(b)&&e.removeChild(b)}).catch(A=>{H("Leave transition error:",A),e.contains(b)&&e.removeChild(b)});T.push(j)}}if(T.length===0){let $=e.firstChild;for(const{node:b}of x)b!==$&&e.insertBefore(b,$),$=b.nextSibling;if(a.moveClass&&C.size>0){const b=[];for(const{node:E,isNew:O}of x)if(!O&&E instanceof HTMLElement){const j=C.get(E);if(j){const A=E.getBoundingClientRect(),M=j.left-A.left,N=j.top-A.top;if(M!==0||N!==0){const de=a.moveClass.split(/\s+/).filter(Z=>Z);b.push({node:E,deltaX:M,deltaY:N,moveClasses:de})}}}if(b.length>0){for(const{node:E,deltaX:O,deltaY:j}of b)E.style.transform=`translate(${O}px, ${j}px)`,E.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:E,moveClasses:O}of b)for(const j of O)E.classList.add(j);requestAnimationFrame(()=>{const E=a.moveClass||"",O=E.match(/duration-(\d+)/),j=O?`${O[1]}ms`:"300ms",A=E.match(/ease-(out|in|in-out|linear)/),M=A?`ease-${A[1]}`:"ease-out";for(const{node:N}of b)N.style.transition=`transform ${j} ${M}`;requestAnimationFrame(()=>{for(const{node:N,moveClasses:de}of b){N.style.removeProperty("transform");const Z=()=>{for(const q of de)N.classList.remove(q);N.style.removeProperty("transition"),N.removeEventListener("transitionend",Z),N.removeEventListener("transitioncancel",Z)};N.addEventListener("transitionend",Z,{once:!0}),N.addEventListener("transitioncancel",Z,{once:!0})}})})})})}}}return}}const l=new Map;for(const h of c)h&&h.key!=null&&l.set(h.key,h);const m=new Map;for(let h=0;h<s.length;h++){const d=s[h],u=Ge(d);u!=null&&m.set(u,d)}const y=new Set;let p=e.firstChild;function v(h,d){let u=h;for(;u&&(y.add(u),u!==d);)u=u.nextSibling}function f(h,d,u,g,w,k=!0){const S=[];let C=h.nextSibling;for(;C&&C!==d;)S.push(C),C=C.nextSibling;const _=Array.isArray(u)?u:[];if(g.some(T=>T&&T.key!=null)||_.some(T=>T&&T.key!=null)){const T=new Map,$=new Map;for(const j of _)j&&j.key!=null&&T.set(j.key,j);for(const j of S){const A=Ge(j);A!=null&&$.set(A,j)}const b=w&&w.state==="visible"&&_.length===0&&g.length>0,E=new Set;let O=h.nextSibling;for(const j of g){let A;if(j.key!=null&&$.has(j.key)){const M=T.get(j.key);A=Ne($.get(j.key),M,j,r),E.add(A),w&&A instanceof HTMLElement&&b&&w.appear&&Pe(A,w).catch(N=>{H("Transition enter error (appear):",N)}),A!==O&&e.contains(A)&&e.insertBefore(A,O)}else A=ne(j,r),e.insertBefore(A,O),E.add(A),w&&A instanceof HTMLElement&&k&&Pe(A,w).catch(M=>{H("Transition enter error:",M)});O=A.nextSibling}for(const j of S)!E.has(j)&&e.contains(j)&&(w&&j instanceof HTMLElement&&k?st(j,w).then(()=>{e.contains(j)&&e.removeChild(j)}).catch(A=>{H("Transition leave error:",A),e.contains(j)&&e.removeChild(j)}):e.removeChild(j))}else{const T=Math.min(_.length,g.length);for(let $=0;$<T;$++){const b=_[$],E=g[$],O=Ne(S[$],b,E,r);O!==S[$]&&(e.insertBefore(O,S[$]),e.removeChild(S[$]))}for(let $=T;$<g.length;$++){const b=ne(g[$],r);e.insertBefore(b,d),w&&b instanceof HTMLElement&&k&&Pe(b,w).catch(E=>{H("Transition enter error:",E)})}for(let $=T;$<S.length;$++){const b=S[$];w&&b instanceof HTMLElement&&k?st(b,w).then(()=>{e.contains(b)&&e.removeChild(b)}).catch(E=>{H("Transition leave error:",E),e.contains(b)&&e.removeChild(b)}):e.removeChild(b)}}}for(const h of n){let d;if(h.tag==="#anchor"){const u=h.key,g=`${u}:start`,w=`${u}:end`;let k=m.get(g),S=m.get(w);const C=Array.isArray(h.children)?h.children:[];if(k||(k=document.createTextNode(""),te(k,g)),S||(S=document.createTextNode(""),te(S,w)),h._startNode=k,h._endNode=S,!e.contains(k)||!e.contains(S)){e.insertBefore(k,p);const _=h._transition,T=!(_&&_.state==="visible"&&C.length>0)||_.appear;for(const $ of C){const b=ne($,r);e.insertBefore(b,p),_&&b instanceof HTMLElement&&T&&Pe(b,_).catch(E=>{H("Transition enter error:",E)})}e.insertBefore(S,p)}else{const _=h._transition,T=l.get(u)?._transition,$=T&&T.state!==_?.state,b=_&&_.state==="visible"&&C.length>0&&!$,E=$||!b||_?.appear===!0;f(k,S,l.get(u)?.children,C,_,E)}v(k,S),p=S.nextSibling;continue}if(h.key!=null&&m.has(h.key)){const u=l.get(h.key);d=Ne(m.get(h.key),u,h,r,i),y.add(d),d!==p&&e.contains(d)&&(p&&!e.contains(p)&&(p=null),e.insertBefore(d,p))}else d=ne(h,r,i),p&&!e.contains(p)&&(p=null),e.insertBefore(d,p),y.add(d);p=d.nextSibling}for(let h=0;h<s.length;h++){const d=s[h];!y.has(d)&&e.contains(d)&&(we(d,i),e.removeChild(d))}}function Ne(e,t,n,r,i){if(t&&typeof t!="string"&&t.props?.ref&&i&&we(e,i),t===n)return e;if(typeof n=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==n&&(e.textContent=n),e;{const s=document.createTextNode(n);return e.parentNode?.replaceChild(s,e),s}}if(n&&typeof n!="string"&&n.tag==="#anchor"){const s=n,c=Array.isArray(s.children)?s.children:[],a=s._startNode??document.createTextNode(""),l=s._endNode??document.createTextNode("");s.key!=null&&(te(a,`${s.key}:start`),te(l,`${s.key}:end`)),s._startNode=a,s._endNode=l;const m=document.createDocumentFragment();m.appendChild(a);for(const y of c){const p=ne(y,r);m.appendChild(p)}return m.appendChild(l),e.parentNode?.replaceChild(m,e),a}if(!n){we(e,i);const s=document.createComment("removed");return e.parentNode?.replaceChild(s,e),s}if(!t||typeof t=="string"){we(e,i);const s=ne(n,r,i);return Re(n,s,i),e.parentNode?.replaceChild(s,e),s}if(n.tag==="#anchor"){const s=Array.isArray(n.children)?n.children:[],c=n._startNode??document.createTextNode(""),a=n._endNode??document.createTextNode("");n.key!=null&&(te(c,`${n.key}:start`),te(a,`${n.key}:end`)),n._startNode=c,n._endNode=a;const l=document.createDocumentFragment();l.appendChild(c);for(const m of s)l.appendChild(ne(m,r));return l.appendChild(a),e.parentNode?.replaceChild(l,e),c}if(typeof t!="string"&&typeof n!="string"&&t.tag===n.tag&&t.key===n.key){const s=e;return Wt(s,t.props||{},n.props||{},r),Vn(s,t.children,n.children,r,i),Re(n,s,i),s}if(typeof t!="string"&&typeof n!="string"&&t.tag===n.tag&&(t.tag&&String(t.tag).includes("-")||n.props&&n.props.isCustomElement||t.props&&t.props.isCustomElement))try{const c=e;return Wt(c,t.props||{},n.props||{},r),Re(n,c,i),c}catch{}we(e,i);const o=ne(n,r,i);return Re(n,o,i),e.parentNode?.replaceChild(o,e),o}function Gn(e,t,n,r){let i;Array.isArray(t)?t.length===1?(i=t[0],i&&typeof i=="object"&&i.key==null&&(i={...i,key:"__root__"})):i={tag:"div",key:"__root__",children:t}:(i=t,i&&typeof i=="object"&&i.key==null&&(i={...i,key:"__root__"})),i&&typeof i=="object"&&i.tag==="#anchor"&&(i={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[i]}),i=$t(i,String(i.key??"root"));const o=e._prevVNode??null,s=e._prevDom??e.firstChild??null;let c;o&&s?typeof o!="string"&&typeof i!="string"&&o.tag===i.tag&&o.key===i.key?c=Ne(s,o,i,n,r):(c=ne(i,n,r),e.replaceChild(c,s)):(c=ne(i,n,r),e.firstChild?e.replaceChild(c,e.firstChild):e.appendChild(c));const a=[];for(let l=0;l<e.childNodes.length;l++){const m=e.childNodes[l];m!==c&&m.nodeName!=="STYLE"&&(we(m,r),a.push(m))}a.forEach(l=>e.removeChild(l)),e._prevVNode=i,e._prevDom=c}function Qe(e){if(typeof e=="string")return qe(e);if(e.tag==="#text")return typeof e.children=="string"?qe(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(Qe).join("");if(e.tag==="#raw")return typeof e.children=="string"?e.children:"";let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([r,i])=>` ${r}="${qe(String(i))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(Qe).join(""):typeof e.children=="string"?qe(e.children):e.children?Qe(e.children):"";return`<${e.tag}${t}>${n}</${e.tag}>`}function sn(e,...t){let n="";for(let r=0;r<e.length;r++)n+=e[r],r<t.length&&(n+=t[r]);return n}function an(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let Ze=null;function Bt(){return Ze||(Ze=new CSSStyleSheet,Ze.replaceSync(an(Jn))),Ze}function Zn(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const Jn=sn`
5
5
  :host,
6
6
  *,
7
7
  ::before,
@@ -114,7 +114,7 @@
114
114
  [hidden] {
115
115
  display: none;
116
116
  }
117
- `,Bn={neutral:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#9f9fa9",500:"#71717b",600:"#52525c",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},secondary:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},info:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},warning:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},white:{DEFAULT:"#ffffff"},black:{DEFAULT:"#000000"},transparent:{DEFAULT:"transparent"},current:{DEFAULT:"currentColor"}},Qt=Object.fromEntries(Object.entries(Bn).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([n,r])=>[n,`var(--color-${e}${n==="DEFAULT"?"":`-${n}`}, ${r})`]))])),me="0.25rem",zn={"3xs":64,"2xs":72,xs:80,sm:96,md:112,lg:128,xl:144,"2xl":168,"3xl":192,"4xl":224,"5xl":256,"6xl":288,"7xl":320},rt={m:["margin"],mx:["margin-inline"],my:["margin-block"],mt:["margin-top"],mr:["margin-right"],mb:["margin-bottom"],ml:["margin-left"],p:["padding"],px:["padding-inline"],py:["padding-block"],pt:["padding-top"],pr:["padding-right"],pb:["padding-bottom"],pl:["padding-left"],inset:["inset"],"inset-x":["inset-inline"],"inset-y":["inset-block"],h:["height"],w:["width"],"min-h":["min-height"],"min-w":["min-width"],"max-h":["max-height"],"max-w":["max-width"],top:["top"],bottom:["bottom"],left:["left"],right:["right"],gap:["gap"],"gap-x":["column-gap"],"gap-y":["row-gap"]},Un=()=>{const e={};e["@container"]="container-type:inline-size;",["block","inline","inline-block","flex","inline-flex","grid","inline-grid","table","table-cell","table-row","hidden"].forEach(a=>{e[a]=a==="hidden"?"display:none;":`display:${a};`}),["absolute","relative","fixed","sticky","static"].forEach(a=>{e[a]=`position:${a};`}),Object.assign(e,{"items-center":"align-items:center;","items-start":"align-items:flex-start;","items-end":"align-items:flex-end;","items-baseline":"align-items:baseline;","items-stretch":"align-items:stretch;","justify-center":"justify-content:center;","justify-start":"justify-content:flex-start;","justify-between":"justify-content:space-between;","justify-around":"justify-content:space-around;","justify-evenly":"justify-content:space-evenly;","justify-end":"justify-content:flex-end;","flex-wrap":"flex-wrap:wrap;","flex-nowrap":"flex-wrap:nowrap;","flex-wrap-reverse":"flex-wrap:wrap-reverse;","content-center":"align-content:center;","content-start":"align-content:flex-start;","content-end":"align-content:flex-end;","content-between":"align-content:space-between;","content-around":"align-content:space-around;","content-evenly":"align-content:space-evenly;","content-stretch":"align-content:stretch;","self-auto":"align-self:auto;","self-start":"align-self:flex-start;","self-end":"align-self:flex-end;","self-center":"align-self:center;","self-stretch":"align-self:stretch;","flex-col":"flex-direction:column;","flex-row":"flex-direction:row;","flex-col-reverse":"flex-direction:column-reverse;","flex-row-reverse":"flex-direction:row-reverse;","flex-1":"flex:1 1 0%;","flex-auto":"flex:1 1 auto;","flex-initial":"flex:0 1 auto;","flex-none":"flex:0 0 auto;",grow:"flex-grow:1;",shrink:"flex-shrink:1;","grow-0":"flex-grow:0;","shrink-0":"flex-shrink:0;"});for(let a=1;a<=12;a++)e[`grid-cols-${a}`]=`grid-template-columns:repeat(${a},minmax(0,1fr));`,e[`grid-rows-${a}`]=`grid-template-rows:repeat(${a},minmax(0,1fr));`,e[`col-span-${a}`]=`grid-column:span ${a} / span ${a};`,e[`row-span-${a}`]=`grid-row:span ${a} / span ${a};`,e[`col-start-${a}`]=`grid-column-start:${a};`,e[`col-end-${a}`]=`grid-column-end:${a};`,e[`row-start-${a}`]=`grid-row-start:${a};`,e[`row-end-${a}`]=`grid-row-end:${a};`;Object.assign(e,{"grid-cols-none":"grid-template-columns:none;","grid-rows-none":"grid-template-rows:none;","col-span-full":"grid-column:1 / -1;","row-span-full":"grid-row:1 / -1;","auto-cols-auto":"grid-auto-columns:auto;","auto-cols-min":"grid-auto-columns:min-content;","auto-cols-max":"grid-auto-columns:max-content;","auto-cols-fr":"grid-auto-columns:1fr;","auto-rows-auto":"grid-auto-rows:auto;","auto-rows-min":"grid-auto-rows:min-content;","auto-rows-max":"grid-auto-rows:max-content;","auto-rows-fr":"grid-auto-rows:1fr;","grid-flow-row":"grid-auto-flow:row;","grid-flow-col":"grid-auto-flow:column;","grid-flow-row-dense":"grid-auto-flow:row dense;","grid-flow-col-dense":"grid-auto-flow:column dense;"}),Object.assign(e,{"text-left":"text-align:left;","text-center":"text-align:center;","text-right":"text-align:right;","text-justify":"text-align:justify;","font-thin":"font-weight:100;","font-extralight":"font-weight:200;","font-light":"font-weight:300;","font-normal":"font-weight:400;","font-medium":"font-weight:500;","font-semibold":"font-weight:600;","font-bold":"font-weight:700;","font-extrabold":"font-weight:800;","font-black":"font-weight:900;",italic:"font-style:italic;","not-italic":"font-style:normal;",uppercase:"text-transform:uppercase;",lowercase:"text-transform:lowercase;",capitalize:"text-transform:capitalize;","normal-case":"text-transform:none;",underline:"text-decoration-line:underline;",overline:"text-decoration-line:overline;","line-through":"text-decoration-line:line-through;","no-underline":"text-decoration-line:none;",truncate:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","whitespace-normal":"white-space:normal;","whitespace-nowrap":"white-space:nowrap;","whitespace-pre":"white-space:pre;","whitespace-pre-line":"white-space:pre-line;","whitespace-pre-wrap":"white-space:pre-wrap;","break-normal":"overflow-wrap:normal;word-break:normal;","break-words":"overflow-wrap:break-word;","break-all":"word-break:break-all;"}),[["text-xs","0.75rem","1"],["text-sm","0.875rem","1.25"],["text-base","1rem","1.5"],["text-lg","1.125rem","1.75"],["text-xl","1.25rem","1.75"],["text-2xl","1.5rem","2"],["text-3xl","1.875rem","2.25"],["text-4xl","2.25rem","2.5"],["text-5xl","3rem","1"],["text-6xl","3.75rem","1"],["text-7xl","4.5rem","1"],["text-8xl","6rem","1"],["text-9xl","8rem","1"]].forEach(([a,u,m])=>{e[a]=`font-size:${u};line-height:var(--ce-line-height,${m});`}),[["tracking-tighter","-0.05em"],["tracking-tight","-0.025em"],["tracking-normal","0em"],["tracking-wide","0.025em"],["tracking-wider","0.05em"],["tracking-widest","0.1em"]].forEach(([a,u])=>{e[a]=`letter-spacing:${u};`}),[["leading-3","0.75rem"],["leading-4","1rem"],["leading-5","1.25rem"],["leading-6","1.5rem"],["leading-7","1.75rem"],["leading-8","2rem"],["leading-9","2.25rem"],["leading-10","2.5rem"],["leading-none","1"],["leading-tight","1.25"],["leading-snug","1.375"],["leading-normal","1.5"],["leading-relaxed","1.625"],["leading-loose","2"]].forEach(([a,u])=>{e[a]=`line-height:${u};--ce-line-height:${u};line-height:var(--ce-line-height,${u});`});const i=[0,1,2,4,6,8];for(const a of i){const u=`${a}px`;e[`border-${a}`]=`border-width:${u};`,e[`border-t-${a}`]=`border-top-width:${u};`,e[`border-r-${a}`]=`border-right-width:${u};`,e[`border-b-${a}`]=`border-bottom-width:${u};`,e[`border-l-${a}`]=`border-left-width:${u};`,e[`border-x-${a}`]=`border-left-width:${u};border-right-width:${u};`,e[`border-y-${a}`]=`border-top-width:${u};border-bottom-width:${u};`}Object.assign(e,{"font-sans":"font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);","font-serif":"font-family:var(--font-serif, ui-serif,Georgia,serif);","font-mono":"font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);",border:"border-width:1px;","border-t":"border-top-width:1px;","border-r":"border-right-width:1px;","border-b":"border-bottom-width:1px;","border-l":"border-left-width:1px;","border-x":"border-left-width:1px;border-right-width:1px;","border-y":"border-top-width:1px;border-bottom-width:1px;","border-solid":"border-style:solid;","border-dashed":"border-style:dashed;","border-dotted":"border-style:dotted;","border-double":"border-style:double;","border-none":"border-style:none;"});const s={none:0,xs:2,sm:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,"4xl":32,full:9999};for(const[a,u]of Object.entries(s)){const m=u===9999?"9999px":`${u/16}rem`;e[`rounded-${a}`]=`border-radius:${m};`,e[`rounded-t-${a}`]=`border-top-left-radius:${m};border-top-right-radius:${m};`,e[`rounded-r-${a}`]=`border-top-right-radius:${m};border-bottom-right-radius:${m};`,e[`rounded-b-${a}`]=`border-bottom-left-radius:${m};border-bottom-right-radius:${m};`,e[`rounded-l-${a}`]=`border-top-left-radius:${m};border-bottom-left-radius:${m};`,e[`rounded-tl-${a}`]=`border-top-left-radius:${m};`,e[`rounded-tr-${a}`]=`border-top-right-radius:${m};`,e[`rounded-br-${a}`]=`border-bottom-right-radius:${m};`,e[`rounded-bl-${a}`]=`border-bottom-left-radius:${m};`}Object.assign(e,{"shadow-none":"--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);","shadow-xs":"--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));","shadow-sm":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-md":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-lg":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-xl":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-2xl":"--ce-shadow-color:rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));","shadow-inner":"box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / 0.05);"}),Object.assign(e,{rounded:"border-radius:0.25rem;"}),Object.assign(e,{"overflow-auto":"overflow:auto;","overflow-hidden":"overflow:hidden;","overflow-visible":"overflow:visible;","overflow-scroll":"overflow:scroll;","overflow-x-auto":"overflow-x:auto;","overflow-x-hidden":"overflow-x:hidden;","overflow-x-visible":"overflow-x:visible;","overflow-x-scroll":"overflow-x:scroll;","overflow-y-auto":"overflow-y:auto;","overflow-y-hidden":"overflow-y:hidden;","overflow-y-visible":"overflow-y:visible;","overflow-y-scroll":"overflow-y:scroll;"});const c=["auto","default","pointer","wait","text","move","help","not-allowed","grab","grabbing"];for(const a of c)e[`cursor-${a}`]=`cursor:${a};`;for(const a of[0,10,20,30,40,50])e[`z-${a}`]=`z-index:${a};`;Object.assign(e,{"sr-only":"position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;","not-sr-only":"position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;","pointer-events-none":"pointer-events:none;","pointer-events-auto":"pointer-events:auto;",visible:"visibility:visible;",invisible:"visibility:hidden;"}),Object.assign(e,{"w-full":"width:100%;","w-screen":"width:100dvw;","h-full":"height:100%;","h-screen":"height:100dvh;","max-w-full":"max-width:100%;","max-h-full":"max-height:100%;","max-w-screen":"max-width:100dvw;","max-h-screen":"max-height:100dvh;","min-w-0":"min-width:0;","min-h-0":"min-height:0;","min-w-full":"min-width:100%;","min-h-full":"min-height:100%;","min-w-screen":"min-width:100dvw;","min-h-screen":"min-height:100dvh;","w-auto":"width:auto;","h-auto":"height:auto;","w-fit":"width:fit-content;","h-fit":"height:fit-content;","w-min":"width:min-content;","h-min":"height:min-content;","w-max":"width:max-content;","h-max":"height:max-content;","m-auto":"margin:auto;","mx-auto":"margin-inline:auto;","my-auto":"margin-block:auto;"});for(const[a,u]of Object.entries(zn))e[`max-w-${a}`]=`max-width:calc(${me} * ${u});`,e[`min-w-${a}`]=`min-width:calc(${me} * ${u});`,e[`w-${a}`]=`width:calc(${me} * ${u});`,e[`max-h-${a}`]=`max-height:calc(${me} * ${u});`,e[`min-h-${a}`]=`min-height:calc(${me} * ${u});`,e[`h-${a}`]=`height:calc(${me} * ${u});`;Object.assign(e,{transition:"transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;","transition-none":"transition-property:none;","transition-all":"transition-property:all;","transition-colors":"transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;","transition-shadow":"transition-property:box-shadow;","transition-opacity":"transition-property:opacity;","transition-transform":"transition-property:transform;","ease-linear":"transition-timing-function:linear;","ease-in":"transition-timing-function:ease-in;","ease-out":"transition-timing-function:ease-out;","ease-in-out":"transition-timing-function:ease-in-out;","duration-75":"transition-duration:75ms;","duration-100":"transition-duration:100ms;","duration-150":"transition-duration:150ms;","duration-200":"transition-duration:200ms;","duration-300":"transition-duration:300ms;","duration-500":"transition-duration:500ms;","duration-700":"transition-duration:700ms;","duration-1000":"transition-duration:1000ms;"}),Object.assign(e,{"scale-0":"transform:scale(0);","scale-50":"transform:scale(0.5);","scale-75":"transform:scale(0.75);","scale-90":"transform:scale(0.9);","scale-95":"transform:scale(0.95);","scale-100":"transform:scale(1);","scale-105":"transform:scale(1.05);","scale-110":"transform:scale(1.1);","scale-125":"transform:scale(1.25);","scale-150":"transform:scale(1.5);","rotate-0":"transform:rotate(0deg);","rotate-1":"transform:rotate(1deg);","rotate-2":"transform:rotate(2deg);","rotate-3":"transform:rotate(3deg);","rotate-6":"transform:rotate(6deg);","rotate-12":"transform:rotate(12deg);","rotate-45":"transform:rotate(45deg);","rotate-90":"transform:rotate(90deg);","rotate-180":"transform:rotate(180deg);","-rotate-1":"transform:rotate(-1deg);","-rotate-2":"transform:rotate(-2deg);","-rotate-3":"transform:rotate(-3deg);","-rotate-6":"transform:rotate(-6deg);","-rotate-12":"transform:rotate(-12deg);","-rotate-45":"transform:rotate(-45deg);","-rotate-90":"transform:rotate(-90deg);","-rotate-180":"transform:rotate(-180deg);"}),Object.assign(e,{"aspect-auto":"aspect-ratio:auto;","aspect-square":"aspect-ratio:1 / 1;","aspect-video":"aspect-ratio:16 / 9;"}),Object.assign(e,{"object-contain":"object-fit:contain;","object-cover":"object-fit:cover;","object-fill":"object-fit:fill;","object-none":"object-fit:none;","object-scale-down":"object-fit:scale-down;","object-bottom":"object-position:bottom;","object-center":"object-position:center;","object-left":"object-position:left;","object-left-bottom":"object-position:left bottom;","object-left-top":"object-position:left top;","object-right":"object-position:right;","object-right-bottom":"object-position:right bottom;","object-right-top":"object-position:right top;","object-top":"object-position:top;"});for(let a=1;a<=6;a++)e[`line-clamp-${a}`]=`display:-webkit-box;-webkit-line-clamp:${a};-webkit-box-orient:vertical;overflow:hidden;`;e["line-clamp-none"]="overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none;";for(let a=1;a<=12;a++)e[`order-${a}`]=`order:${a};`;e["order-first"]="order:-9999;",e["order-last"]="order:9999;",e["order-none"]="order:0;";for(let a=0;a<=12;a++)a<=1||(e[`grow-${a}`]=`flex-grow:${a};`,e[`shrink-${a}`]=`flex-shrink:${a};`);return Object.assign(e,{"bg-linear-to-t":"background-image:linear-gradient(to top, var(--ce-gradient-stops));","bg-linear-to-tr":"background-image:linear-gradient(to top right, var(--ce-gradient-stops));","bg-linear-to-r":"background-image:linear-gradient(to right, var(--ce-gradient-stops));","bg-linear-to-br":"background-image:linear-gradient(to bottom right, var(--ce-gradient-stops));","bg-linear-to-b":"background-image:linear-gradient(to bottom, var(--ce-gradient-stops));","bg-linear-to-bl":"background-image:linear-gradient(to bottom left, var(--ce-gradient-stops));","bg-linear-to-l":"background-image:linear-gradient(to left, var(--ce-gradient-stops));","bg-linear-to-tl":"background-image:linear-gradient(to top left, var(--ce-gradient-stops));","bg-radial":"background-image:radial-gradient(ellipse at center, var(--ce-gradient-stops));","bg-radial-at-t":"background-image:radial-gradient(ellipse at top, var(--ce-gradient-stops));","bg-radial-at-tr":"background-image:radial-gradient(ellipse at top right, var(--ce-gradient-stops));","bg-radial-at-r":"background-image:radial-gradient(ellipse at right, var(--ce-gradient-stops));","bg-radial-at-br":"background-image:radial-gradient(ellipse at bottom right, var(--ce-gradient-stops));","bg-radial-at-b":"background-image:radial-gradient(ellipse at bottom, var(--ce-gradient-stops));","bg-radial-at-bl":"background-image:radial-gradient(ellipse at bottom left, var(--ce-gradient-stops));","bg-radial-at-l":"background-image:radial-gradient(ellipse at left, var(--ce-gradient-stops));","bg-radial-at-tl":"background-image:radial-gradient(ellipse at top left, var(--ce-gradient-stops));","bg-radial-circle":"background-image:radial-gradient(circle at center, var(--ce-gradient-stops));","bg-radial-circle-at-t":"background-image:radial-gradient(circle at top, var(--ce-gradient-stops));","bg-radial-circle-at-tr":"background-image:radial-gradient(circle at top right, var(--ce-gradient-stops));","bg-radial-circle-at-r":"background-image:radial-gradient(circle at right, var(--ce-gradient-stops));","bg-radial-circle-at-br":"background-image:radial-gradient(circle at bottom right, var(--ce-gradient-stops));","bg-radial-circle-at-b":"background-image:radial-gradient(circle at bottom, var(--ce-gradient-stops));","bg-radial-circle-at-bl":"background-image:radial-gradient(circle at bottom left, var(--ce-gradient-stops));","bg-radial-circle-at-l":"background-image:radial-gradient(circle at left, var(--ce-gradient-stops));","bg-radial-circle-at-tl":"background-image:radial-gradient(circle at top left, var(--ce-gradient-stops));","bg-conic":"background-image:conic-gradient(from 0deg at center, var(--ce-gradient-stops));","bg-conic-at-t":"background-image:conic-gradient(from 0deg at top, var(--ce-gradient-stops));","bg-conic-at-tr":"background-image:conic-gradient(from 0deg at top right, var(--ce-gradient-stops));","bg-conic-at-r":"background-image:conic-gradient(from 0deg at right, var(--ce-gradient-stops));","bg-conic-at-br":"background-image:conic-gradient(from 0deg at bottom right, var(--ce-gradient-stops));","bg-conic-at-b":"background-image:conic-gradient(from 0deg at bottom, var(--ce-gradient-stops));","bg-conic-at-bl":"background-image:conic-gradient(from 0deg at bottom left, var(--ce-gradient-stops));","bg-conic-at-l":"background-image:conic-gradient(from 0deg at left, var(--ce-gradient-stops));","bg-conic-at-tl":"background-image:conic-gradient(from 0deg at top left, var(--ce-gradient-stops));"}),e},ot=Un();function ne(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r];if(o==="["||o==="(")n++;else if((o==="]"||o===")")&&n>0)n--;else if(n===0&&(o===">"||o==="+"||o==="~"||o===" "))return e.slice(0,r)+t+e.slice(r)}return e+t}const qn={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${ne(e,":hover")}{${t}}`,focus:(e,t)=>`${ne(e,":focus")}{${t}}`,active:(e,t)=>`${ne(e,":active")}{${t}}`,disabled:(e,t)=>`${ne(e,":disabled")}{${t}}`,visited:(e,t)=>`${ne(e,":visited")}{${t}}`,checked:(e,t)=>`${ne(e,":checked")}{${t}}`,first:(e,t)=>`${ne(e,":first-child")}{${t}}`,last:(e,t)=>`${ne(e,":last-child")}{${t}}`,odd:(e,t)=>`${ne(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${ne(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${ne(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${ne(e,":focus-visible")}{${t}}`,"group-hover":(e,t)=>`.group:hover ${e}{${t}}`,"group-focus":(e,t)=>`.group:focus ${e}{${t}}`,"group-active":(e,t)=>`.group:active ${e}{${t}}`,"group-disabled":(e,t)=>`.group:disabled ${e}{${t}}`,"peer-hover":(e,t)=>`.peer:hover ~ ${e}{${t}}`,"peer-focus":(e,t)=>`.peer:focus ~ ${e}{${t}}`,"peer-checked":(e,t)=>`.peer:checked ~ ${e}{${t}}`,"peer-disabled":(e,t)=>`.peer:disabled ~ ${e}{${t}}`},it={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},Nt={xs:"(min-width:20rem)",sm:"(min-width:24rem)",md:"(min-width:28rem)",lg:"(min-width:32rem)",xl:"(min-width:36rem)","2xl":"(min-width:42rem)","3xl":"(min-width:48rem)","4xl":"(min-width:56rem)","5xl":"(min-width:64rem)","6xl":"(min-width:72rem)","7xl":"(min-width:80rem)"},st=["sm","md","lg","xl","2xl"],at=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function ct(e){const t=e.startsWith("-"),n=t?e.slice(1):e,r=n.lastIndexOf("-");if(r===-1)return null;const o=n.slice(0,r),i=n.slice(r+1);if(!rt[o])return null;if(i.includes("/")){const[a,u]=i.split("/").map(y=>parseFloat(y));if(Number.isNaN(a)||Number.isNaN(u)||u===0)return null;const m=a/u*100;return rt[o].map(y=>`${y}:${m}%;`).join("")}const s=parseFloat(i);if(Number.isNaN(s))return null;const c=t?"-":"";return rt[o].map(a=>`${a}:calc(${c}${me} * ${s});`).join("")}function lt(e){const t=e.startsWith("-"),r=(t?e.slice(1):e).match(/^space-(x|y)-(.+)$/);if(!r)return null;const[,o,i]=r,s=o==="x";if(i==="reverse")return s?"--ce-space-x-reverse:1;":"--ce-space-y-reverse:1;";if(i.includes("/")){const[m,y]=i.split("/").map(d=>parseFloat(d));if(Number.isNaN(m)||Number.isNaN(y)||y===0)return null;const p=m/y*100,k=t?"-":"";return s?`--ce-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${k}${p}% * calc(1 - var(--ce-space-x-reverse)));margin-inline-end:calc(${k}${p}% * var(--ce-space-x-reverse));}`:`--ce-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${k}${p}% * calc(1 - var(--ce-space-y-reverse)));margin-bottom:calc(${k}${p}% * var(--ce-space-y-reverse));}`}const c=parseFloat(i);if(Number.isNaN(c))return null;const u=`calc(${t?"-":""}${me} * ${c})`;return s?`--ce-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${u} * calc(1 - var(--ce-space-x-reverse)));margin-inline-end:calc(${u} * var(--ce-space-x-reverse));}`:`--ce-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${u} * calc(1 - var(--ce-space-y-reverse)));margin-bottom:calc(${u} * var(--ce-space-y-reverse));}`}function Dt(e){const t=e.replace("#",""),n=parseInt(t,16);return`${n>>16&255} ${n>>8&255} ${n&255}`}const Kn=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,Vn={bg:"background-color",decoration:"text-decoration-color",text:"color",border:"border-color",outline:"outline-color",caret:"caret-color",accent:"accent-color",fill:"fill",stroke:"stroke"};function Gn(e){const t=Kn.exec(e);if(!t)return null;const[,n,r,o="DEFAULT"]=t,i=Qt[r]?.[o];if(!i)return null;if(n==="shadow")return`--ce-shadow-color:${i};`;const s=Vn[n];return s?`${s}:${i};`:null}function Zn(e){const t=e.indexOf("/");if(t===-1)return{base:e};const n=e.slice(0,t),r=e.slice(t+1),o=parseInt(r,10);return isNaN(o)||o<0||o>100?{base:n}:{base:n,opacity:o/100}}function ut(e){const{base:t,opacity:n}=Zn(e),r=Gn(t);if(r&&n!==void 0){const i=/#([0-9a-f]{6})/i.exec(r);if(i){const s=Dt(i[0]);return r.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${n})`)}}if(r)return r;const o=Xe(t);if(o&&n!==void 0){const i=/#([0-9a-f]{6})/i.exec(o);if(i){const s=Dt(i[0]);return o.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${n})`)}}return o}function ft(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,n,r,o="DEFAULT"]=t,i=Qt[r]?.[o];if(!i)return null;switch(n){case"from":return`--ce-gradient-from:${i} var(--ce-gradient-from-position);--ce-gradient-to:rgb(255 255 255 / 0) var(--ce-gradient-to-position);--ce-gradient-stops:var(--ce-gradient-from), var(--ce-gradient-to);`;case"to":return`--ce-gradient-to:${i} var(--ce-gradient-to-position);`;case"via":return`--ce-gradient-to:rgb(255 255 255 / 0) var(--ce-gradient-to-position);--ce-gradient-stops:var(--ce-gradient-from), ${i} var(--ce-gradient-via-position), var(--ce-gradient-to);`;default:return null}}function dt(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const n=parseInt(t[1],10);return n<0||n>100?null:`opacity:${n/100};`}function Xe(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const s=e.slice(1,-1).trim(),c=s.indexOf(":");if(c===-1)return null;const a=s.slice(0,c).trim();let u=s.slice(c+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(a)?(u=u.replace(/_/g," "),u=u.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),u=u.replace(/^'([^']*)'$/g,'"$1"'),`${a}:${u};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const n=e.slice(0,t);let r=e.slice(t+2,-1).replace(/_/g," ");const o={bg:"background-color",shadow:"box-shadow",p:"padding",px:"padding-inline",py:"padding-block",m:"margin",mx:"margin-inline",my:"margin-block",w:"width",h:"height","min-w":"min-width","max-w":"max-width","min-h":"min-height","max-h":"max-height","border-t":"border-top-width","border-b":"border-bottom-width","border-l":"border-left-width","border-r":"border-right-width","border-x":"border-inline-width","border-y":"border-block-width","grid-cols":"grid-template-columns","grid-rows":"grid-template-rows",transition:"transition-property",ease:"transition-timing-function",delay:"transition-delay",duration:"transition-duration",list:"list-style",break:"word-break",flex:"flex-direction",items:"align-items",justify:"justify-content",content:"align-content",self:"align-self",basis:"flex-basis",tracking:"letter-spacing",leading:"line-height",z:"z-index",opacity:"opacity"};if(n==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(r)?`font-size:${r};`:`color:${r};`;if(n==="rotate")return`transform:rotate(${r});`;if(n==="scale")return`transform:scale(${r});`;if(n==="translate-x")return`transform:translateX(${r});`;if(n==="translate-y")return`transform:translateY(${r});`;const i=o[n]??n.replace(/_/g,"-");return i&&r?`${i}:${r};`:null}function Jn(e){if(e.startsWith("[")&&e.endsWith("]")){const n=e.slice(1,-1);return n.includes("&")?n:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const n=e.slice(t+2,-1).replace(/_/g,"-");return n.includes("&")?n:e.replace(/_/g,"-")}return null}function Ht(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Xn(e){const t=/class\s*=\s*(['"])([\s\S]*?)\1/g,n=[];let r;for(;r=t.exec(e);){const o=r[2].split(/\s+/).filter(Boolean);o.length&&n.push(...o)}return n}const Oe=new Map,Yn=16,It=1e3;function en(e){const t=Date.now(),n=Oe.get(e);if(n&&t-n.timestamp<Yn)return n.css;const r=Xn(e);if(!r.length)return"";const o=new Set(r),i=[[],[],[],[]],s={},c=(f,h=!1)=>{const l=h?`dark|${f}`:f;if(l in s)return s[l];const g=y(f,h);return s[l]=g,g},a=f=>{const h=f.some(v=>st.includes(v)),l=f.some(v=>v.startsWith("@")&&(at.includes(v.slice(1))||v.match(/^@\[.+\]$/))),g=f.includes("dark");return f.length?!h&&!g&&!l?1:g&&(h||l)?3:2:0},u=f=>{const h=[];let l="",g=0;for(let v=0;v<f.length;v++){const x=f[v];x==="["||x==="("?g++:(x==="]"||x===")")&&g--,x===":"&&g===0?(h.push(l),l=""):l+=x}return l&&h.push(l),h},m={hover:":hover",focus:":focus",active:":active",visited:":visited",disabled:":disabled",checked:":checked",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","focus-within":":focus-within","focus-visible":":focus-visible"},y=(f,h=!1)=>{const l=u(f);let g="",v=!1;for(const L of l){let F=L;if(F.startsWith("!")&&(v=!0,F=F.slice(1)),ot[F]||ct(F)||lt(F)||dt(F)||ut(F)||ft(F)||Xe(F)){g=L;break}}if(!g)return null;const x=g.replace(/^!/,""),S=ot[x]??ct(x)??lt(x)??dt(x)??ut(x)??ft(x)??Xe(x);if(!S)return null;const E=l.indexOf(g);let C=E>=0?l.slice(0,E):[];h&&(C=C.filter(L=>L!=="dark"));const w=`.${Ht(f)}`,T=v?S.replace(/;/g," !important;"):S,$="__SUBJECT__";let b=$;const _=[];for(const L of C)L.startsWith("group-")?(b=`.group:${L.slice(6)} ${b}`,_.push(L)):L.startsWith("peer-")&&(b=b.replace($,`.peer:${L.slice(5)}~${$}`),_.push(L));C=C.filter(L=>!_.includes(L));const O=[],j=[];let A=null;for(const L of C){if(L==="dark"||st.includes(L)||L.startsWith("@")&&(at.includes(L.slice(1))||L.match(/^@\[.+\]$/)))continue;const F=Jn(L);if(F){A=F;continue}const V=m[L];if(V){A?j.push(V):O.push(V);continue}const B=qn[L];typeof B=="function"&&(b=B(b,T).split("{")[0])}const M=O.join(""),R=j.join("");function de(L,F){if(!F)return L;let V=0,B=0;if(L.length&&(L[0]===">"||L[0]==="+"||L[0]==="~"||L[0]===" ")){let q=1;for(;q<L.length&&L[q]===" ";)q++;for(;q<L.length;q++){const Z=L[q];if(Z==="["?V++:Z==="]"&&V>0?V--:Z==="("?B++:Z===")"&&B>0&&B--,V===0&&B===0&&(L[q]===">"||L[q]==="+"||L[q]==="~"||L[q]===" "))return L.slice(0,q)+F+L.slice(q)}return L+F}for(let q=0;q<L.length;q++){const Z=L[q];if(Z==="["?V++:Z==="]"&&V>0?V--:Z==="("?B++:Z===")"&&B>0&&B--,V===0&&B===0&&(Z===">"||Z==="+"||Z==="~"||Z===" "))return L.slice(0,q)+F+L.slice(q)}return L+F}if(A)if(A.includes("&")){const L=A.indexOf("&"),F=A.slice(0,L),V=A.slice(L+1),B=$+M;if(O.length===0)b=b.replace($,F+B+R+V);else{const q=de(V,R);b=b.replace($,F+B+q)}}else b=b.replace($,`${A}${$+M}`),R&&(b=b.replace($,`${$}${R}`));else b=b.replace($,$+M+R);b=b.replace(new RegExp($,"g"),w);let G=`${b}{${T}}`;const U=C.filter(L=>st.includes(L)),D=C.filter(L=>L.startsWith("@")&&(at.includes(L.slice(1))||L.match(/^@\[.+\]$/))),K=U.length?U[U.length-1]:null,ie=D.length?D[D.length-1]:null,je=C.includes("dark");let I="",le="";if(je&&K?I=`@media (prefers-color-scheme: dark) and ${it[K]}`:je?I="@media (prefers-color-scheme: dark)":K&&(I=`@media ${it[K]}`),ie)if(ie.startsWith("@[")&&ie.endsWith("]")){const L=ie.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(L))return null;le=`@container (min-width:${L})`}else{const L=ie.slice(1);le=`@container ${Nt[L]||`(min-width:${L})`}`}return I&&le?G=`${I}${le}{${G}}`:I?G=`${I}{${G}}`:le&&(G=`${le}{${G}}`),G};for(const f of o){const h=u(f),l=h.find(E=>ot[E.replace(/^!/,"")]||ct(E.replace(/^!/,""))||lt(E.replace(/^!/,""))||dt(E.replace(/^!/,""))||ut(E.replace(/^!/,""))||ft(E.replace(/^!/,""))||Xe(E.replace(/^!/,"")));if(!l)continue;const g=h.indexOf(l),v=g>=0?h.slice(0,g):[],x=a(v),S=c(f);S&&i[x].push(S)}const p=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const f of o)if(p.test(f)){if(i.flat().join("").includes(`.${Ht(f)}`))continue;const l=c(f);l&&i[0].push(l)}const k=f=>f.sort((h,l)=>{const g=w=>{const T={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const[$,b]of Object.entries(T))if(w.includes(`@media ${it[$]}`))return b;return-1},v=w=>{const T={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};for(const[$,b]of Object.entries(T))if(w.includes(`@container ${Nt[$]}`))return b;if(w.includes("@container (min-width:")){const $=/@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(w);if($){const b=parseFloat($[1]),_=$[2];return _==="rem"||_==="em"?b*16:b}}return-1},x=g(h),S=g(l),E=v(h),C=v(l);return x>=0&&S>=0&&x!==S?x-S:E>=0&&C>=0&&E!==C?E-C:0});i[2]=k(i[2]),i[3]=k(i[3]);const d=i.flat().join("");return Oe.size>=It&&Array.from(Oe.keys()).slice(0,Math.floor(It/2)).forEach(h=>Oe.delete(h)),Oe.set(e,{css:d,timestamp:t}),d}function Ie(e,t){const n="when-block";return z(typeof t=="function"?e?t():[]:e?t:[],n)}function Qn(e,t){return e.map((n,r)=>{const o=typeof n=="object"?n?.key??n?.id??`idx-${r}`:String(n);return z(t(n,r),`each-${o}`)})}function tn(){const e=[];return{when(t,n){return e.push([t,n]),this},otherwise(t){return e.push([!0,t]),this},done(){return er(...e)}}}function er(...e){for(let t=0;t<e.length;t++){const[n,r]=e[t];if(n){const o=typeof r=="function"?r():r;return[z(o,`whenChain-branch-${t}`)]}}return[z([],"whenChain-empty")]}function z(e,t){const n=e?Array.isArray(e)?e.filter(r=>r!=null):[e].filter(r=>r!=null):[];return{tag:"#anchor",key:t,children:n}}const Se={fade:{enterFrom:"opacity-0",enterActive:"transition-opacity duration-300 ease-out",enterTo:"opacity-100",leaveFrom:"opacity-100",leaveActive:"transition-opacity duration-200 ease-in",leaveTo:"opacity-0"},"slide-right":{enterFrom:"translate-x-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[100%] opacity-0"},"slide-left":{enterFrom:"translate-x-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[-100%] opacity-0"},"slide-up":{enterFrom:"translate-y-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[100%] opacity-0"},"slide-down":{enterFrom:"translate-y-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[-100%] opacity-0"},scale:{enterFrom:"scale-95 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-95 opacity-0"},"scale-down":{enterFrom:"scale-105 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-105 opacity-0"},bounce:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-500 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},zoom:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},flip:{enterFrom:"rotate-[90deg] opacity-0",enterActive:"transition-all duration-400 ease-out",enterTo:"rotate-[0deg] opacity-100",leaveFrom:"rotate-[0deg] opacity-100",leaveActive:"transition-all duration-300 ease-in",leaveTo:"rotate-[90deg] opacity-0"}};function tr(e,t){const{preset:n,show:r,mode:o="default",duration:i,appear:s=!1,css:c=!0,name:a,enterFrom:u,enterActive:m,enterTo:y,leaveFrom:p,leaveActive:k,leaveTo:d,onBeforeEnter:f,onEnter:h,onAfterEnter:l,onEnterCancelled:g,onBeforeLeave:v,onLeave:x,onAfterLeave:S,onLeaveCancelled:E}=e;let C;n&&Se[n]?(C={...Se[n]},u&&(C.enterFrom=u),m&&(C.enterActive=m),y&&(C.enterTo=y),p&&(C.leaveFrom=p),k&&(C.leaveActive=k),d&&(C.leaveTo=d)):C={enterFrom:u,enterActive:m,enterTo:y,leaveFrom:p,leaveActive:k,leaveTo:d};const w=a||(n?`transition-${n}`:"transition"),T=z(r?t:[],w);return T._transition={name:w,classes:C,mode:o,duration:i,appear:s,css:c,state:r?"visible":"hidden",hooks:{onBeforeEnter:f,onEnter:h,onAfterEnter:l,onEnterCancelled:g,onBeforeLeave:v,onLeave:x,onAfterLeave:S,onLeaveCancelled:E}},T}function nr(e,t){const{tag:n="div",moveClass:r="transition-transform duration-300",preset:o,show:i=!0,mode:s="default",duration:c,appear:a=!1,css:u=!0,name:m,class:y,style:p,enterFrom:k,enterActive:d,enterTo:f,leaveFrom:h,leaveActive:l,leaveTo:g,onBeforeEnter:v,onEnter:x,onAfterEnter:S,onEnterCancelled:E,onBeforeLeave:C,onLeave:w,onAfterLeave:T,onLeaveCancelled:$}=e;let b;o&&Se[o]?(b={...Se[o]},k&&(b.enterFrom=k),d&&(b.enterActive=d),f&&(b.enterTo=f),h&&(b.leaveFrom=h),l&&(b.leaveActive=l),g&&(b.leaveTo=g)):b={enterFrom:k,enterActive:d,enterTo:f,leaveFrom:h,leaveActive:l,leaveTo:g};const _=m||(o?`transition-group-${o}`:"transition-group"),O=[];for(const j of i?t:[])if(j&&typeof j=="object"&&j.tag==="#anchor"){const A=Array.isArray(j.children)?j.children:[];for(const M of A)if(M&&typeof M=="object"){const R={...M,key:j.key||M.key,props:{...M.props,_anchorKey:j.key}};O.push(R)}else O.push(M)}else O.push(j);return{tag:n,children:O,key:_,props:{attrs:{...y?{class:y}:{},...p?{style:p}:{}},_transitionGroup:{name:_,classes:b,moveClass:r,mode:s,duration:c,appear:a,css:u,hooks:{onBeforeEnter:v,onEnter:x,onAfterEnter:S,onEnterCancelled:E,onBeforeLeave:C,onLeave:w,onAfterLeave:T,onLeaveCancelled:$}}}}}function rr(e){return{...e}}let Ge=null;function Qe(){if(!Ge){const e=[];Object.values(Se).forEach(r=>{r.enterFrom&&e.push(r.enterFrom),r.enterActive&&e.push(r.enterActive),r.enterTo&&e.push(r.enterTo),r.leaveFrom&&e.push(r.leaveFrom),r.leaveActive&&e.push(r.leaveActive),r.leaveTo&&e.push(r.leaveTo)});const t=`<div class="${e.join(" ")}"></div>`,n=en(t);Ge=new CSSStyleSheet,Ge.replaceSync(n)}return Ge}function or(){Qe()}or();const Ne=[];function ir(e,t,n,r,o,i,s,c){if(e){Ne.push(n);try{const a=t.render(n);if(a instanceof Promise){i(!0),a.then(u=>{i(!1),s(null),Ft(e,u,n,r,o),c(e.innerHTML)}).catch(u=>{i(!1),s(u)});return}Ft(e,a,n,r,o),c(e.innerHTML)}finally{Ne.pop()}}}function Ft(e,t,n,r,o){e&&(In(e,Array.isArray(t)?t:[t],n,r),o(e.innerHTML))}function sr(e,t,n,r,o,i,s){if(i!==null&&clearTimeout(i),Date.now()-t<16){if(o(n+1),n===15)Q(`⚠️ Component is re-rendering rapidly. This might indicate:
117
+ `,Xn={neutral:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#9f9fa9",500:"#71717b",600:"#52525c",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},secondary:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},info:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},warning:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},white:{DEFAULT:"#ffffff"},black:{DEFAULT:"#000000"},transparent:{DEFAULT:"transparent"},current:{DEFAULT:"currentColor"}},cn=Object.fromEntries(Object.entries(Xn).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([n,r])=>[n,`var(--color-${e}${n==="DEFAULT"?"":`-${n}`}, ${r})`]))])),ye="0.25rem",Yn={"3xs":64,"2xs":72,xs:80,sm:96,md:112,lg:128,xl:144,"2xl":168,"3xl":192,"4xl":224,"5xl":256,"6xl":288,"7xl":320},at={m:["margin"],mx:["margin-inline"],my:["margin-block"],mt:["margin-top"],mr:["margin-right"],mb:["margin-bottom"],ml:["margin-left"],p:["padding"],px:["padding-inline"],py:["padding-block"],pt:["padding-top"],pr:["padding-right"],pb:["padding-bottom"],pl:["padding-left"],inset:["inset"],"inset-x":["inset-inline"],"inset-y":["inset-block"],h:["height"],w:["width"],"min-h":["min-height"],"min-w":["min-width"],"max-h":["max-height"],"max-w":["max-width"],top:["top"],bottom:["bottom"],left:["left"],right:["right"],gap:["gap"],"gap-x":["column-gap"],"gap-y":["row-gap"]},Qn=()=>{const e={};e["@container"]="container-type:inline-size;",["block","inline","inline-block","flex","inline-flex","grid","inline-grid","table","table-cell","table-row","hidden"].forEach(a=>{e[a]=a==="hidden"?"display:none;":`display:${a};`}),["absolute","relative","fixed","sticky","static"].forEach(a=>{e[a]=`position:${a};`}),Object.assign(e,{"items-center":"align-items:center;","items-start":"align-items:flex-start;","items-end":"align-items:flex-end;","items-baseline":"align-items:baseline;","items-stretch":"align-items:stretch;","justify-center":"justify-content:center;","justify-start":"justify-content:flex-start;","justify-between":"justify-content:space-between;","justify-around":"justify-content:space-around;","justify-evenly":"justify-content:space-evenly;","justify-end":"justify-content:flex-end;","flex-wrap":"flex-wrap:wrap;","flex-nowrap":"flex-wrap:nowrap;","flex-wrap-reverse":"flex-wrap:wrap-reverse;","content-center":"align-content:center;","content-start":"align-content:flex-start;","content-end":"align-content:flex-end;","content-between":"align-content:space-between;","content-around":"align-content:space-around;","content-evenly":"align-content:space-evenly;","content-stretch":"align-content:stretch;","self-auto":"align-self:auto;","self-start":"align-self:flex-start;","self-end":"align-self:flex-end;","self-center":"align-self:center;","self-stretch":"align-self:stretch;","flex-col":"flex-direction:column;","flex-row":"flex-direction:row;","flex-col-reverse":"flex-direction:column-reverse;","flex-row-reverse":"flex-direction:row-reverse;","flex-1":"flex:1 1 0%;","flex-auto":"flex:1 1 auto;","flex-initial":"flex:0 1 auto;","flex-none":"flex:0 0 auto;",grow:"flex-grow:1;",shrink:"flex-shrink:1;","grow-0":"flex-grow:0;","shrink-0":"flex-shrink:0;"});for(let a=1;a<=12;a++)e[`grid-cols-${a}`]=`grid-template-columns:repeat(${a},minmax(0,1fr));`,e[`grid-rows-${a}`]=`grid-template-rows:repeat(${a},minmax(0,1fr));`,e[`col-span-${a}`]=`grid-column:span ${a} / span ${a};`,e[`row-span-${a}`]=`grid-row:span ${a} / span ${a};`,e[`col-start-${a}`]=`grid-column-start:${a};`,e[`col-end-${a}`]=`grid-column-end:${a};`,e[`row-start-${a}`]=`grid-row-start:${a};`,e[`row-end-${a}`]=`grid-row-end:${a};`;Object.assign(e,{"grid-cols-none":"grid-template-columns:none;","grid-rows-none":"grid-template-rows:none;","col-span-full":"grid-column:1 / -1;","row-span-full":"grid-row:1 / -1;","auto-cols-auto":"grid-auto-columns:auto;","auto-cols-min":"grid-auto-columns:min-content;","auto-cols-max":"grid-auto-columns:max-content;","auto-cols-fr":"grid-auto-columns:1fr;","auto-rows-auto":"grid-auto-rows:auto;","auto-rows-min":"grid-auto-rows:min-content;","auto-rows-max":"grid-auto-rows:max-content;","auto-rows-fr":"grid-auto-rows:1fr;","grid-flow-row":"grid-auto-flow:row;","grid-flow-col":"grid-auto-flow:column;","grid-flow-row-dense":"grid-auto-flow:row dense;","grid-flow-col-dense":"grid-auto-flow:column dense;"}),Object.assign(e,{"text-left":"text-align:left;","text-center":"text-align:center;","text-right":"text-align:right;","text-justify":"text-align:justify;","font-thin":"font-weight:100;","font-extralight":"font-weight:200;","font-light":"font-weight:300;","font-normal":"font-weight:400;","font-medium":"font-weight:500;","font-semibold":"font-weight:600;","font-bold":"font-weight:700;","font-extrabold":"font-weight:800;","font-black":"font-weight:900;",italic:"font-style:italic;","not-italic":"font-style:normal;",uppercase:"text-transform:uppercase;",lowercase:"text-transform:lowercase;",capitalize:"text-transform:capitalize;","normal-case":"text-transform:none;",underline:"text-decoration-line:underline;",overline:"text-decoration-line:overline;","line-through":"text-decoration-line:line-through;","no-underline":"text-decoration-line:none;",truncate:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","whitespace-normal":"white-space:normal;","whitespace-nowrap":"white-space:nowrap;","whitespace-pre":"white-space:pre;","whitespace-pre-line":"white-space:pre-line;","whitespace-pre-wrap":"white-space:pre-wrap;","break-normal":"overflow-wrap:normal;word-break:normal;","break-words":"overflow-wrap:break-word;","break-all":"word-break:break-all;"}),[["text-xs","0.75rem","1"],["text-sm","0.875rem","1.25"],["text-base","1rem","1.5"],["text-lg","1.125rem","1.75"],["text-xl","1.25rem","1.75"],["text-2xl","1.5rem","2"],["text-3xl","1.875rem","2.25"],["text-4xl","2.25rem","2.5"],["text-5xl","3rem","1"],["text-6xl","3.75rem","1"],["text-7xl","4.5rem","1"],["text-8xl","6rem","1"],["text-9xl","8rem","1"]].forEach(([a,l,m])=>{e[a]=`font-size:${l};line-height:var(--ce-line-height,${m});`}),[["tracking-tighter","-0.05em"],["tracking-tight","-0.025em"],["tracking-normal","0em"],["tracking-wide","0.025em"],["tracking-wider","0.05em"],["tracking-widest","0.1em"]].forEach(([a,l])=>{e[a]=`letter-spacing:${l};`}),[["leading-3","0.75rem"],["leading-4","1rem"],["leading-5","1.25rem"],["leading-6","1.5rem"],["leading-7","1.75rem"],["leading-8","2rem"],["leading-9","2.25rem"],["leading-10","2.5rem"],["leading-none","1"],["leading-tight","1.25"],["leading-snug","1.375"],["leading-normal","1.5"],["leading-relaxed","1.625"],["leading-loose","2"]].forEach(([a,l])=>{e[a]=`line-height:${l};--ce-line-height:${l};line-height:var(--ce-line-height,${l});`});const o=[0,1,2,4,6,8];for(const a of o){const l=`${a}px`;e[`border-${a}`]=`border-width:${l};`,e[`border-t-${a}`]=`border-top-width:${l};`,e[`border-r-${a}`]=`border-right-width:${l};`,e[`border-b-${a}`]=`border-bottom-width:${l};`,e[`border-l-${a}`]=`border-left-width:${l};`,e[`border-x-${a}`]=`border-left-width:${l};border-right-width:${l};`,e[`border-y-${a}`]=`border-top-width:${l};border-bottom-width:${l};`}Object.assign(e,{"font-sans":"font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);","font-serif":"font-family:var(--font-serif, ui-serif,Georgia,serif);","font-mono":"font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);",border:"border-width:1px;","border-t":"border-top-width:1px;","border-r":"border-right-width:1px;","border-b":"border-bottom-width:1px;","border-l":"border-left-width:1px;","border-x":"border-left-width:1px;border-right-width:1px;","border-y":"border-top-width:1px;border-bottom-width:1px;","border-solid":"border-style:solid;","border-dashed":"border-style:dashed;","border-dotted":"border-style:dotted;","border-double":"border-style:double;","border-none":"border-style:none;"});const s={none:0,xs:2,sm:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,"4xl":32,full:9999};for(const[a,l]of Object.entries(s)){const m=l===9999?"9999px":`${l/16}rem`;e[`rounded-${a}`]=`border-radius:${m};`,e[`rounded-t-${a}`]=`border-top-left-radius:${m};border-top-right-radius:${m};`,e[`rounded-r-${a}`]=`border-top-right-radius:${m};border-bottom-right-radius:${m};`,e[`rounded-b-${a}`]=`border-bottom-left-radius:${m};border-bottom-right-radius:${m};`,e[`rounded-l-${a}`]=`border-top-left-radius:${m};border-bottom-left-radius:${m};`,e[`rounded-tl-${a}`]=`border-top-left-radius:${m};`,e[`rounded-tr-${a}`]=`border-top-right-radius:${m};`,e[`rounded-br-${a}`]=`border-bottom-right-radius:${m};`,e[`rounded-bl-${a}`]=`border-bottom-left-radius:${m};`}Object.assign(e,{"shadow-none":"--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);","shadow-xs":"--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));","shadow-sm":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-md":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-lg":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-xl":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-2xl":"--ce-shadow-color:rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));","shadow-inner":"box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / 0.05);"}),Object.assign(e,{rounded:"border-radius:0.25rem;"}),Object.assign(e,{"overflow-auto":"overflow:auto;","overflow-hidden":"overflow:hidden;","overflow-visible":"overflow:visible;","overflow-scroll":"overflow:scroll;","overflow-x-auto":"overflow-x:auto;","overflow-x-hidden":"overflow-x:hidden;","overflow-x-visible":"overflow-x:visible;","overflow-x-scroll":"overflow-x:scroll;","overflow-y-auto":"overflow-y:auto;","overflow-y-hidden":"overflow-y:hidden;","overflow-y-visible":"overflow-y:visible;","overflow-y-scroll":"overflow-y:scroll;"});const c=["auto","default","pointer","wait","text","move","help","not-allowed","grab","grabbing"];for(const a of c)e[`cursor-${a}`]=`cursor:${a};`;for(const a of[0,10,20,30,40,50])e[`z-${a}`]=`z-index:${a};`;Object.assign(e,{"sr-only":"position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;","not-sr-only":"position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;","pointer-events-none":"pointer-events:none;","pointer-events-auto":"pointer-events:auto;",visible:"visibility:visible;",invisible:"visibility:hidden;"}),Object.assign(e,{"w-full":"width:100%;","w-screen":"width:100dvw;","h-full":"height:100%;","h-screen":"height:100dvh;","max-w-full":"max-width:100%;","max-h-full":"max-height:100%;","max-w-screen":"max-width:100dvw;","max-h-screen":"max-height:100dvh;","min-w-0":"min-width:0;","min-h-0":"min-height:0;","min-w-full":"min-width:100%;","min-h-full":"min-height:100%;","min-w-screen":"min-width:100dvw;","min-h-screen":"min-height:100dvh;","w-auto":"width:auto;","h-auto":"height:auto;","w-fit":"width:fit-content;","h-fit":"height:fit-content;","w-min":"width:min-content;","h-min":"height:min-content;","w-max":"width:max-content;","h-max":"height:max-content;","m-auto":"margin:auto;","mx-auto":"margin-inline:auto;","my-auto":"margin-block:auto;"});for(const[a,l]of Object.entries(Yn))e[`max-w-${a}`]=`max-width:calc(${ye} * ${l});`,e[`min-w-${a}`]=`min-width:calc(${ye} * ${l});`,e[`w-${a}`]=`width:calc(${ye} * ${l});`,e[`max-h-${a}`]=`max-height:calc(${ye} * ${l});`,e[`min-h-${a}`]=`min-height:calc(${ye} * ${l});`,e[`h-${a}`]=`height:calc(${ye} * ${l});`;Object.assign(e,{transition:"transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;","transition-none":"transition-property:none;","transition-all":"transition-property:all;","transition-colors":"transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;","transition-shadow":"transition-property:box-shadow;","transition-opacity":"transition-property:opacity;","transition-transform":"transition-property:transform;","ease-linear":"transition-timing-function:linear;","ease-in":"transition-timing-function:ease-in;","ease-out":"transition-timing-function:ease-out;","ease-in-out":"transition-timing-function:ease-in-out;","duration-75":"transition-duration:75ms;","duration-100":"transition-duration:100ms;","duration-150":"transition-duration:150ms;","duration-200":"transition-duration:200ms;","duration-300":"transition-duration:300ms;","duration-500":"transition-duration:500ms;","duration-700":"transition-duration:700ms;","duration-1000":"transition-duration:1000ms;"}),Object.assign(e,{"scale-0":"transform:scale(0);","scale-50":"transform:scale(0.5);","scale-75":"transform:scale(0.75);","scale-90":"transform:scale(0.9);","scale-95":"transform:scale(0.95);","scale-100":"transform:scale(1);","scale-105":"transform:scale(1.05);","scale-110":"transform:scale(1.1);","scale-125":"transform:scale(1.25);","scale-150":"transform:scale(1.5);","rotate-0":"transform:rotate(0deg);","rotate-1":"transform:rotate(1deg);","rotate-2":"transform:rotate(2deg);","rotate-3":"transform:rotate(3deg);","rotate-6":"transform:rotate(6deg);","rotate-12":"transform:rotate(12deg);","rotate-45":"transform:rotate(45deg);","rotate-90":"transform:rotate(90deg);","rotate-180":"transform:rotate(180deg);","-rotate-1":"transform:rotate(-1deg);","-rotate-2":"transform:rotate(-2deg);","-rotate-3":"transform:rotate(-3deg);","-rotate-6":"transform:rotate(-6deg);","-rotate-12":"transform:rotate(-12deg);","-rotate-45":"transform:rotate(-45deg);","-rotate-90":"transform:rotate(-90deg);","-rotate-180":"transform:rotate(-180deg);"}),Object.assign(e,{"aspect-auto":"aspect-ratio:auto;","aspect-square":"aspect-ratio:1 / 1;","aspect-video":"aspect-ratio:16 / 9;"}),Object.assign(e,{"object-contain":"object-fit:contain;","object-cover":"object-fit:cover;","object-fill":"object-fit:fill;","object-none":"object-fit:none;","object-scale-down":"object-fit:scale-down;","object-bottom":"object-position:bottom;","object-center":"object-position:center;","object-left":"object-position:left;","object-left-bottom":"object-position:left bottom;","object-left-top":"object-position:left top;","object-right":"object-position:right;","object-right-bottom":"object-position:right bottom;","object-right-top":"object-position:right top;","object-top":"object-position:top;"});for(let a=1;a<=6;a++)e[`line-clamp-${a}`]=`display:-webkit-box;-webkit-line-clamp:${a};-webkit-box-orient:vertical;overflow:hidden;`;e["line-clamp-none"]="overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none;";for(let a=1;a<=12;a++)e[`order-${a}`]=`order:${a};`;e["order-first"]="order:-9999;",e["order-last"]="order:9999;",e["order-none"]="order:0;";for(let a=0;a<=12;a++)a<=1||(e[`grow-${a}`]=`flex-grow:${a};`,e[`shrink-${a}`]=`flex-shrink:${a};`);return Object.assign(e,{"bg-linear-to-t":"background-image:linear-gradient(to top, var(--ce-gradient-stops));","bg-linear-to-tr":"background-image:linear-gradient(to top right, var(--ce-gradient-stops));","bg-linear-to-r":"background-image:linear-gradient(to right, var(--ce-gradient-stops));","bg-linear-to-br":"background-image:linear-gradient(to bottom right, var(--ce-gradient-stops));","bg-linear-to-b":"background-image:linear-gradient(to bottom, var(--ce-gradient-stops));","bg-linear-to-bl":"background-image:linear-gradient(to bottom left, var(--ce-gradient-stops));","bg-linear-to-l":"background-image:linear-gradient(to left, var(--ce-gradient-stops));","bg-linear-to-tl":"background-image:linear-gradient(to top left, var(--ce-gradient-stops));","bg-radial":"background-image:radial-gradient(ellipse at center, var(--ce-gradient-stops));","bg-radial-at-t":"background-image:radial-gradient(ellipse at top, var(--ce-gradient-stops));","bg-radial-at-tr":"background-image:radial-gradient(ellipse at top right, var(--ce-gradient-stops));","bg-radial-at-r":"background-image:radial-gradient(ellipse at right, var(--ce-gradient-stops));","bg-radial-at-br":"background-image:radial-gradient(ellipse at bottom right, var(--ce-gradient-stops));","bg-radial-at-b":"background-image:radial-gradient(ellipse at bottom, var(--ce-gradient-stops));","bg-radial-at-bl":"background-image:radial-gradient(ellipse at bottom left, var(--ce-gradient-stops));","bg-radial-at-l":"background-image:radial-gradient(ellipse at left, var(--ce-gradient-stops));","bg-radial-at-tl":"background-image:radial-gradient(ellipse at top left, var(--ce-gradient-stops));","bg-radial-circle":"background-image:radial-gradient(circle at center, var(--ce-gradient-stops));","bg-radial-circle-at-t":"background-image:radial-gradient(circle at top, var(--ce-gradient-stops));","bg-radial-circle-at-tr":"background-image:radial-gradient(circle at top right, var(--ce-gradient-stops));","bg-radial-circle-at-r":"background-image:radial-gradient(circle at right, var(--ce-gradient-stops));","bg-radial-circle-at-br":"background-image:radial-gradient(circle at bottom right, var(--ce-gradient-stops));","bg-radial-circle-at-b":"background-image:radial-gradient(circle at bottom, var(--ce-gradient-stops));","bg-radial-circle-at-bl":"background-image:radial-gradient(circle at bottom left, var(--ce-gradient-stops));","bg-radial-circle-at-l":"background-image:radial-gradient(circle at left, var(--ce-gradient-stops));","bg-radial-circle-at-tl":"background-image:radial-gradient(circle at top left, var(--ce-gradient-stops));","bg-conic":"background-image:conic-gradient(from 0deg at center, var(--ce-gradient-stops));","bg-conic-at-t":"background-image:conic-gradient(from 0deg at top, var(--ce-gradient-stops));","bg-conic-at-tr":"background-image:conic-gradient(from 0deg at top right, var(--ce-gradient-stops));","bg-conic-at-r":"background-image:conic-gradient(from 0deg at right, var(--ce-gradient-stops));","bg-conic-at-br":"background-image:conic-gradient(from 0deg at bottom right, var(--ce-gradient-stops));","bg-conic-at-b":"background-image:conic-gradient(from 0deg at bottom, var(--ce-gradient-stops));","bg-conic-at-bl":"background-image:conic-gradient(from 0deg at bottom left, var(--ce-gradient-stops));","bg-conic-at-l":"background-image:conic-gradient(from 0deg at left, var(--ce-gradient-stops));","bg-conic-at-tl":"background-image:conic-gradient(from 0deg at top left, var(--ce-gradient-stops));"}),e},ct=Qn();function re(e,t){let n=0;for(let r=0;r<e.length;r++){const i=e[r];if(i==="["||i==="(")n++;else if((i==="]"||i===")")&&n>0)n--;else if(n===0&&(i===">"||i==="+"||i==="~"||i===" "))return e.slice(0,r)+t+e.slice(r)}return e+t}const er={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${re(e,":hover")}{${t}}`,focus:(e,t)=>`${re(e,":focus")}{${t}}`,active:(e,t)=>`${re(e,":active")}{${t}}`,disabled:(e,t)=>`${re(e,":disabled")}{${t}}`,visited:(e,t)=>`${re(e,":visited")}{${t}}`,checked:(e,t)=>`${re(e,":checked")}{${t}}`,first:(e,t)=>`${re(e,":first-child")}{${t}}`,last:(e,t)=>`${re(e,":last-child")}{${t}}`,odd:(e,t)=>`${re(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${re(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${re(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${re(e,":focus-visible")}{${t}}`,"group-hover":(e,t)=>`.group:hover ${e}{${t}}`,"group-focus":(e,t)=>`.group:focus ${e}{${t}}`,"group-active":(e,t)=>`.group:active ${e}{${t}}`,"group-disabled":(e,t)=>`.group:disabled ${e}{${t}}`,"peer-hover":(e,t)=>`.peer:hover ~ ${e}{${t}}`,"peer-focus":(e,t)=>`.peer:focus ~ ${e}{${t}}`,"peer-checked":(e,t)=>`.peer:checked ~ ${e}{${t}}`,"peer-disabled":(e,t)=>`.peer:disabled ~ ${e}{${t}}`},lt={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},zt={xs:"(min-width:20rem)",sm:"(min-width:24rem)",md:"(min-width:28rem)",lg:"(min-width:32rem)",xl:"(min-width:36rem)","2xl":"(min-width:42rem)","3xl":"(min-width:48rem)","4xl":"(min-width:56rem)","5xl":"(min-width:64rem)","6xl":"(min-width:72rem)","7xl":"(min-width:80rem)"},ut=["sm","md","lg","xl","2xl"],ft=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function dt(e){const t=e.startsWith("-"),n=t?e.slice(1):e,r=n.lastIndexOf("-");if(r===-1)return null;const i=n.slice(0,r),o=n.slice(r+1);if(!at[i])return null;if(o.includes("/")){const[a,l]=o.split("/").map(y=>parseFloat(y));if(Number.isNaN(a)||Number.isNaN(l)||l===0)return null;const m=a/l*100;return at[i].map(y=>`${y}:${m}%;`).join("")}const s=parseFloat(o);if(Number.isNaN(s))return null;const c=t?"-":"";return at[i].map(a=>`${a}:calc(${c}${ye} * ${s});`).join("")}function pt(e){const t=e.startsWith("-"),r=(t?e.slice(1):e).match(/^space-(x|y)-(.+)$/);if(!r)return null;const[,i,o]=r,s=i==="x";if(o==="reverse")return s?"--ce-space-x-reverse:1;":"--ce-space-y-reverse:1;";if(o.includes("/")){const[m,y]=o.split("/").map(f=>parseFloat(f));if(Number.isNaN(m)||Number.isNaN(y)||y===0)return null;const p=m/y*100,v=t?"-":"";return s?`--ce-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${v}${p}% * calc(1 - var(--ce-space-x-reverse)));margin-inline-end:calc(${v}${p}% * var(--ce-space-x-reverse));}`:`--ce-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${v}${p}% * calc(1 - var(--ce-space-y-reverse)));margin-bottom:calc(${v}${p}% * var(--ce-space-y-reverse));}`}const c=parseFloat(o);if(Number.isNaN(c))return null;const l=`calc(${t?"-":""}${ye} * ${c})`;return s?`--ce-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${l} * calc(1 - var(--ce-space-x-reverse)));margin-inline-end:calc(${l} * var(--ce-space-x-reverse));}`:`--ce-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${l} * calc(1 - var(--ce-space-y-reverse)));margin-bottom:calc(${l} * var(--ce-space-y-reverse));}`}function Ut(e){const t=e.replace("#",""),n=parseInt(t,16);return`${n>>16&255} ${n>>8&255} ${n&255}`}const tr=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,nr={bg:"background-color",decoration:"text-decoration-color",text:"color",border:"border-color",outline:"outline-color",caret:"caret-color",accent:"accent-color",fill:"fill",stroke:"stroke"};function rr(e){const t=tr.exec(e);if(!t)return null;const[,n,r,i="DEFAULT"]=t,o=cn[r]?.[i];if(!o)return null;if(n==="shadow")return`--ce-shadow-color:${o};`;const s=nr[n];return s?`${s}:${o};`:null}function ir(e){const t=e.indexOf("/");if(t===-1)return{base:e};const n=e.slice(0,t),r=e.slice(t+1),i=parseInt(r,10);return isNaN(i)||i<0||i>100?{base:n}:{base:n,opacity:i/100}}function ht(e){const{base:t,opacity:n}=ir(e),r=rr(t);if(r&&n!==void 0){const o=/#([0-9a-f]{6})/i.exec(r);if(o){const s=Ut(o[0]);return r.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${n})`)}}if(r)return r;const i=et(t);if(i&&n!==void 0){const o=/#([0-9a-f]{6})/i.exec(i);if(o){const s=Ut(o[0]);return i.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${n})`)}}return i}function gt(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,n,r,i="DEFAULT"]=t,o=cn[r]?.[i];if(!o)return null;switch(n){case"from":return`--ce-gradient-from:${o} var(--ce-gradient-from-position);--ce-gradient-to:rgb(255 255 255 / 0) var(--ce-gradient-to-position);--ce-gradient-stops:var(--ce-gradient-from), var(--ce-gradient-to);`;case"to":return`--ce-gradient-to:${o} var(--ce-gradient-to-position);`;case"via":return`--ce-gradient-to:rgb(255 255 255 / 0) var(--ce-gradient-to-position);--ce-gradient-stops:var(--ce-gradient-from), ${o} var(--ce-gradient-via-position), var(--ce-gradient-to);`;default:return null}}function mt(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const n=parseInt(t[1],10);return n<0||n>100?null:`opacity:${n/100};`}function et(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const s=e.slice(1,-1).trim(),c=s.indexOf(":");if(c===-1)return null;const a=s.slice(0,c).trim();let l=s.slice(c+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(a)?(l=l.replace(/_/g," "),l=l.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),l=l.replace(/^'([^']*)'$/g,'"$1"'),`${a}:${l};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const n=e.slice(0,t);let r=e.slice(t+2,-1).replace(/_/g," ");const i={bg:"background-color",shadow:"box-shadow",p:"padding",px:"padding-inline",py:"padding-block",m:"margin",mx:"margin-inline",my:"margin-block",w:"width",h:"height","min-w":"min-width","max-w":"max-width","min-h":"min-height","max-h":"max-height","border-t":"border-top-width","border-b":"border-bottom-width","border-l":"border-left-width","border-r":"border-right-width","border-x":"border-inline-width","border-y":"border-block-width","grid-cols":"grid-template-columns","grid-rows":"grid-template-rows",transition:"transition-property",ease:"transition-timing-function",delay:"transition-delay",duration:"transition-duration",list:"list-style",break:"word-break",flex:"flex-direction",items:"align-items",justify:"justify-content",content:"align-content",self:"align-self",basis:"flex-basis",tracking:"letter-spacing",leading:"line-height",z:"z-index",opacity:"opacity"};if(n==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(r)?`font-size:${r};`:`color:${r};`;if(n==="rotate")return`transform:rotate(${r});`;if(n==="scale")return`transform:scale(${r});`;if(n==="translate-x")return`transform:translateX(${r});`;if(n==="translate-y")return`transform:translateY(${r});`;const o=i[n]??n.replace(/_/g,"-");return o&&r?`${o}:${r};`:null}function or(e){if(e.startsWith("[")&&e.endsWith("]")){const n=e.slice(1,-1);return n.includes("&")?n:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const n=e.slice(t+2,-1).replace(/_/g,"-");return n.includes("&")?n:e.replace(/_/g,"-")}return null}function qt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function sr(e){const t=/class\s*=\s*(['"])([\s\S]*?)\1/g,n=[];let r;for(;r=t.exec(e);){const i=r[2].split(/\s+/).filter(Boolean);i.length&&n.push(...i)}return n}const Me=new Map,ar=16,Kt=1e3;function ln(e){const t=Date.now(),n=Me.get(e);if(n&&t-n.timestamp<ar)return n.css;const r=sr(e);if(!r.length)return"";const i=new Set(r),o=[[],[],[],[]],s={},c=(h,d=!1)=>{const u=d?`dark|${h}`:h;if(u in s)return s[u];const g=y(h,d);return s[u]=g,g},a=h=>{const d=h.some(w=>ut.includes(w)),u=h.some(w=>w.startsWith("@")&&(ft.includes(w.slice(1))||w.match(/^@\[.+\]$/))),g=h.includes("dark");return h.length?!d&&!g&&!u?1:g&&(d||u)?3:2:0},l=h=>{const d=[];let u="",g=0;for(let w=0;w<h.length;w++){const k=h[w];k==="["||k==="("?g++:(k==="]"||k===")")&&g--,k===":"&&g===0?(d.push(u),u=""):u+=k}return u&&d.push(u),d},m={hover:":hover",focus:":focus",active:":active",visited:":visited",disabled:":disabled",checked:":checked",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","focus-within":":focus-within","focus-visible":":focus-visible"},y=(h,d=!1)=>{const u=l(h);let g="",w=!1;for(const L of u){let I=L;if(I.startsWith("!")&&(w=!0,I=I.slice(1)),ct[I]||dt(I)||pt(I)||mt(I)||ht(I)||gt(I)||et(I)){g=L;break}}if(!g)return null;const k=g.replace(/^!/,""),S=ct[k]??dt(k)??pt(k)??mt(k)??ht(k)??gt(k)??et(k);if(!S)return null;const C=u.indexOf(g);let _=C>=0?u.slice(0,C):[];d&&(_=_.filter(L=>L!=="dark"));const x=`.${qt(h)}`,T=w?S.replace(/;/g," !important;"):S,$="__SUBJECT__";let b=$;const E=[];for(const L of _)L.startsWith("group-")?(b=`.group:${L.slice(6)} ${b}`,E.push(L)):L.startsWith("peer-")&&(b=b.replace($,`.peer:${L.slice(5)}~${$}`),E.push(L));_=_.filter(L=>!E.includes(L));const O=[],j=[];let A=null;for(const L of _){if(L==="dark"||ut.includes(L)||L.startsWith("@")&&(ft.includes(L.slice(1))||L.match(/^@\[.+\]$/)))continue;const I=or(L);if(I){A=I;continue}const V=m[L];if(V){A?j.push(V):O.push(V);continue}const B=er[L];typeof B=="function"&&(b=B(b,T).split("{")[0])}const M=O.join(""),N=j.join("");function de(L,I){if(!I)return L;let V=0,B=0;if(L.length&&(L[0]===">"||L[0]==="+"||L[0]==="~"||L[0]===" ")){let U=1;for(;U<L.length&&L[U]===" ";)U++;for(;U<L.length;U++){const J=L[U];if(J==="["?V++:J==="]"&&V>0?V--:J==="("?B++:J===")"&&B>0&&B--,V===0&&B===0&&(L[U]===">"||L[U]==="+"||L[U]==="~"||L[U]===" "))return L.slice(0,U)+I+L.slice(U)}return L+I}for(let U=0;U<L.length;U++){const J=L[U];if(J==="["?V++:J==="]"&&V>0?V--:J==="("?B++:J===")"&&B>0&&B--,V===0&&B===0&&(J===">"||J==="+"||J==="~"||J===" "))return L.slice(0,U)+I+L.slice(U)}return L+I}if(A)if(A.includes("&")){const L=A.indexOf("&"),I=A.slice(0,L),V=A.slice(L+1),B=$+M;if(O.length===0)b=b.replace($,I+B+N+V);else{const U=de(V,N);b=b.replace($,I+B+U)}}else b=b.replace($,`${A}${$+M}`),N&&(b=b.replace($,`${$}${N}`));else b=b.replace($,$+M+N);b=b.replace(new RegExp($,"g"),x);let Z=`${b}{${T}}`;const q=_.filter(L=>ut.includes(L)),D=_.filter(L=>L.startsWith("@")&&(ft.includes(L.slice(1))||L.match(/^@\[.+\]$/))),K=q.length?q[q.length-1]:null,se=D.length?D[D.length-1]:null,ke=_.includes("dark");let F="",le="";if(ke&&K?F=`@media (prefers-color-scheme: dark) and ${lt[K]}`:ke?F="@media (prefers-color-scheme: dark)":K&&(F=`@media ${lt[K]}`),se)if(se.startsWith("@[")&&se.endsWith("]")){const L=se.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(L))return null;le=`@container (min-width:${L})`}else{const L=se.slice(1);le=`@container ${zt[L]||`(min-width:${L})`}`}return F&&le?Z=`${F}${le}{${Z}}`:F?Z=`${F}{${Z}}`:le&&(Z=`${le}{${Z}}`),Z};for(const h of i){const d=l(h),u=d.find(C=>ct[C.replace(/^!/,"")]||dt(C.replace(/^!/,""))||pt(C.replace(/^!/,""))||mt(C.replace(/^!/,""))||ht(C.replace(/^!/,""))||gt(C.replace(/^!/,""))||et(C.replace(/^!/,"")));if(!u)continue;const g=d.indexOf(u),w=g>=0?d.slice(0,g):[],k=a(w),S=c(h);S&&o[k].push(S)}const p=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const h of i)if(p.test(h)){if(o.flat().join("").includes(`.${qt(h)}`))continue;const u=c(h);u&&o[0].push(u)}const v=h=>h.sort((d,u)=>{const g=x=>{const T={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const[$,b]of Object.entries(T))if(x.includes(`@media ${lt[$]}`))return b;return-1},w=x=>{const T={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};for(const[$,b]of Object.entries(T))if(x.includes(`@container ${zt[$]}`))return b;if(x.includes("@container (min-width:")){const $=/@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(x);if($){const b=parseFloat($[1]),E=$[2];return E==="rem"||E==="em"?b*16:b}}return-1},k=g(d),S=g(u),C=w(d),_=w(u);return k>=0&&S>=0&&k!==S?k-S:C>=0&&_>=0&&C!==_?C-_:0});o[2]=v(o[2]),o[3]=v(o[3]);const f=o.flat().join("");return Me.size>=Kt&&Array.from(Me.keys()).slice(0,Math.floor(Kt/2)).forEach(d=>Me.delete(d)),Me.set(e,{css:f,timestamp:t}),f}function We(e,t){const n="when-block";return z(typeof t=="function"?e?t():[]:e?t:[],n)}function cr(e,t){return e.map((n,r)=>{const i=typeof n=="object"?n?.key??n?.id??`idx-${r}`:String(n);return z(t(n,r),`each-${i}`)})}function un(){const e=[];return{when(t,n){return e.push([t,n]),this},otherwise(t){return e.push([!0,t]),this},done(){return lr(...e)}}}function lr(...e){for(let t=0;t<e.length;t++){const[n,r]=e[t];if(n){const i=typeof r=="function"?r():r;return[z(i,`whenChain-branch-${t}`)]}}return[z([],"whenChain-empty")]}function z(e,t){const n=e?Array.isArray(e)?e.filter(r=>r!=null):[e].filter(r=>r!=null):[];return{tag:"#anchor",key:t,children:n}}const je={fade:{enterFrom:"opacity-0",enterActive:"transition-opacity duration-300 ease-out",enterTo:"opacity-100",leaveFrom:"opacity-100",leaveActive:"transition-opacity duration-200 ease-in",leaveTo:"opacity-0"},"slide-right":{enterFrom:"translate-x-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[100%] opacity-0"},"slide-left":{enterFrom:"translate-x-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[-100%] opacity-0"},"slide-up":{enterFrom:"translate-y-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[100%] opacity-0"},"slide-down":{enterFrom:"translate-y-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[-100%] opacity-0"},scale:{enterFrom:"scale-95 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-95 opacity-0"},"scale-down":{enterFrom:"scale-105 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-105 opacity-0"},bounce:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-500 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},zoom:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},flip:{enterFrom:"rotate-[90deg] opacity-0",enterActive:"transition-all duration-400 ease-out",enterTo:"rotate-[0deg] opacity-100",leaveFrom:"rotate-[0deg] opacity-100",leaveActive:"transition-all duration-300 ease-in",leaveTo:"rotate-[90deg] opacity-0"}};function ur(e,t){const{preset:n,show:r,mode:i="default",duration:o,appear:s=!1,css:c=!0,name:a,enterFrom:l,enterActive:m,enterTo:y,leaveFrom:p,leaveActive:v,leaveTo:f,onBeforeEnter:h,onEnter:d,onAfterEnter:u,onEnterCancelled:g,onBeforeLeave:w,onLeave:k,onAfterLeave:S,onLeaveCancelled:C}=e;let _;n&&je[n]?(_={...je[n]},l&&(_.enterFrom=l),m&&(_.enterActive=m),y&&(_.enterTo=y),p&&(_.leaveFrom=p),v&&(_.leaveActive=v),f&&(_.leaveTo=f)):_={enterFrom:l,enterActive:m,enterTo:y,leaveFrom:p,leaveActive:v,leaveTo:f};const x=a||(n?`transition-${n}`:"transition"),T=z(r?t:[],x);return T._transition={name:x,classes:_,mode:i,duration:o,appear:s,css:c,state:r?"visible":"hidden",hooks:{onBeforeEnter:h,onEnter:d,onAfterEnter:u,onEnterCancelled:g,onBeforeLeave:w,onLeave:k,onAfterLeave:S,onLeaveCancelled:C}},T}function fr(e,t){const{tag:n="div",moveClass:r="transition-transform duration-300",preset:i,show:o=!0,mode:s="default",duration:c,appear:a=!1,css:l=!0,name:m,class:y,style:p,enterFrom:v,enterActive:f,enterTo:h,leaveFrom:d,leaveActive:u,leaveTo:g,onBeforeEnter:w,onEnter:k,onAfterEnter:S,onEnterCancelled:C,onBeforeLeave:_,onLeave:x,onAfterLeave:T,onLeaveCancelled:$}=e;let b;i&&je[i]?(b={...je[i]},v&&(b.enterFrom=v),f&&(b.enterActive=f),h&&(b.enterTo=h),d&&(b.leaveFrom=d),u&&(b.leaveActive=u),g&&(b.leaveTo=g)):b={enterFrom:v,enterActive:f,enterTo:h,leaveFrom:d,leaveActive:u,leaveTo:g};const E=m||(i?`transition-group-${i}`:"transition-group"),O=[];for(const j of o?t:[])if(j&&typeof j=="object"&&j.tag==="#anchor"){const A=Array.isArray(j.children)?j.children:[];for(const M of A)if(M&&typeof M=="object"){const N={...M,key:j.key||M.key,props:{...M.props,_anchorKey:j.key}};O.push(N)}else O.push(M)}else O.push(j);return{tag:n,children:O,key:E,props:{attrs:{...y?{class:y}:{},...p?{style:p}:{}},_transitionGroup:{name:E,classes:b,moveClass:r,mode:s,duration:c,appear:a,css:l,hooks:{onBeforeEnter:w,onEnter:k,onAfterEnter:S,onEnterCancelled:C,onBeforeLeave:_,onLeave:x,onAfterLeave:T,onLeaveCancelled:$}}}}}function dr(e){return{...e}}let Je=null;function nt(){if(!Je){const e=[];Object.values(je).forEach(r=>{r.enterFrom&&e.push(r.enterFrom),r.enterActive&&e.push(r.enterActive),r.enterTo&&e.push(r.enterTo),r.leaveFrom&&e.push(r.leaveFrom),r.leaveActive&&e.push(r.leaveActive),r.leaveTo&&e.push(r.leaveTo)});const t=`<div class="${e.join(" ")}"></div>`,n=ln(t);Je=new CSSStyleSheet,Je.replaceSync(n)}return Je}function pr(){nt()}pr();const He=[];function hr(e,t,n,r,i,o,s,c){if(e){He.push(n);try{const a=t.render(n);if(a instanceof Promise){o(!0),a.then(l=>{o(!1),s(null),Vt(e,l,n,r,i),c(e.innerHTML)}).catch(l=>{o(!1),s(l)});return}Vt(e,a,n,r,i),c(e.innerHTML)}finally{He.pop()}}}function Vt(e,t,n,r,i){e&&(Gn(e,Array.isArray(t)?t:[t],n,r),i(e.innerHTML))}function gr(e,t,n,r,i,o,s){if(o!==null&&clearTimeout(o),Date.now()-t<16){if(i(n+1),n===15)G(`⚠️ Component is re-rendering rapidly. This might indicate:
118
118
  Common causes:
119
119
  • Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
120
120
  • State modification during render
@@ -122,28 +122,35 @@
122
122
  Component rendering will be throttled to prevent browser freeze.`);else if(n>20){H(`🛑 Infinite loop detected in component render:
123
123
  • This might be caused by state updates during render
124
124
  • Ensure all state modifications are done in event handlers or effects
125
- Stopping runaway component render to prevent browser freeze`),s(null);return}}else o(0);const u=setTimeout(()=>{r(Date.now()),e(),s(null)},n>10?100:0);s(u)}function ar(e,t,n,r,o){if(!e)return;const i=en(n);if((!i||i.trim()==="")&&!t._computedStyle){o(null),e.adoptedStyleSheets=[Rt(),Qe()];return}let s="";t._computedStyle&&(s=t._computedStyle);let c=Fn(`${s}
126
- ${i}
127
- `);c=Yt(c);let a=r;a||(a=new CSSStyleSheet),(a.cssRules.length===0||a.cssRules.length>0&&Array.from(a.cssRules).map(m=>m.cssText).join("")!==c)&&a.replaceSync(c),e.adoptedStyleSheets=[Rt(),Qe(),a],o(a)}let W=null;function Wt(e){W=e}function pt(){W=null}function cr(){if(!W)throw new Error("useEmit must be called during component render");const e=W.emit;return(t,n)=>e(t,n)}function Ae(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function lr(e){if(!W)throw new Error("useOnConnected must be called during component render");Ae(W),W._hookCallbacks.onConnected=e}function ur(e){if(!W)throw new Error("useOnDisconnected must be called during component render");Ae(W),W._hookCallbacks.onDisconnected=e}function fr(e){if(!W)throw new Error("useOnAttributeChanged must be called during component render");Ae(W),W._hookCallbacks.onAttributeChanged=e}function dr(e){if(!W)throw new Error("useOnError must be called during component render");Ae(W),W._hookCallbacks.onError=e}function pr(e){if(!W)throw new Error("useProps must be called during component render");Ae(W),W._hookCallbacks.props={...W._hookCallbacks.props||{},...e};const t=W;try{const r=Object.keys(e||{});for(const o of r){if(typeof o!="string"||o.startsWith("_"))continue;const i=Object.getOwnPropertyDescriptor(t,o);if(!(i&&!i.configurable))try{let c=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get(){try{const a=t&&t._host;if(a){const u=oe(o),m=a.getAttribute(u);if(m!==null){const y=typeof e[o];return y==="boolean"?m===""||m==="true":y==="number"?Number(m):m}if(typeof a[o]<"u"){const y=a[o];return N(y)||y&&typeof y=="object"&&"value"in y&&!(y instanceof Node)?y.value:typeof e[o]==="boolean"&&typeof y=="string"?y===""||y==="true":y}}}catch{}return c},set(a){c=a}})}catch{}}}catch{}return new Proxy({},{get(r,o){if(typeof o!="string")return;const i=e[o];try{const c=t&&t._host;if(c){if(c instanceof HTMLElement||typeof c.getAttribute=="function"&&typeof c.hasAttribute=="function"){const u=o.replace(/([A-Z])/g,"-$1").toLowerCase(),m=c.getAttribute(u);if(m!==null)return typeof i=="boolean"?m===""||m==="true":typeof i=="number"?Number(m):m}const a=c[o];if(typeof a<"u"&&a!=="")return typeof i=="boolean"&&i===!1&&a===""?i:N(a)||a&&typeof a=="object"&&"value"in a&&!(a instanceof Node)?a.value:typeof i=="boolean"&&typeof a=="string"?a==="true"||a!==""&&a!=="false":typeof i=="number"&&typeof a=="string"&&!Number.isNaN(Number(a))?Number(a):a}}catch{}const s=t[o];return typeof i=="boolean"&&s===""?i===!1?i:!0:N(s)||s&&typeof s=="object"&&"value"in s&&!(s instanceof Node)?s.value:s!=null&&s!==""?typeof i=="boolean"&&typeof s=="string"?s==="true":typeof i=="number"&&typeof s=="string"&&!Number.isNaN(Number(s))?Number(s):s:i},has(r,o){return typeof o=="string"&&(o in t||o in e)},ownKeys(){return Array.from(new Set([...Object.keys(e),...Object.keys(t||{})]))},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}}})}function hr(e){if(!W)throw new Error("useStyle must be called during component render");Ae(W);try{const t=e();Object.defineProperty(W,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){Q("Error in useStyle callback:",t),Object.defineProperty(W,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const _e=new Map,Bt=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[Bt]||(e[Bt]=_e)}function gr(e,t){if(!t.render)throw new Error("Component must have a render function");return typeof window>"u"?class{constructor(){}}:class extends HTMLElement{context;_refs={};_listeners=[];_watchers=new Map;_renderTimeoutId=null;_mounted=!1;_hasError=!1;_initializing=!0;_componentId;_styleSheet=null;_lastHtmlStringForJitCSS="";get lastHtmlStringForJitCSS(){return this._lastHtmlStringForJitCSS}get isLoading(){return this._templateLoading}get lastError(){return this._templateError}_cfg;_lastRenderTime=0;_renderCount=0;_templateLoading=!1;_templateError=null;constructor(){super(),this.attachShadow({mode:"open"}),this._cfg=_e.get(e)||t,this._componentId=`${e}-${Math.random().toString(36).substr(2,9)}`;const n=this._initContext(t),r=(i,s,c)=>{Object.defineProperty(i,s,{value:c,writable:!1,enumerable:!1,configurable:!1})};r(n,"refs",this._refs),r(n,"requestRender",()=>this.requestRender()),r(n,"_requestRender",()=>this._requestRender()),r(n,"_componentId",this._componentId),r(n,"_triggerWatchers",(i,s)=>this._triggerWatchers(i,s)),this.context=n,P(()=>{r(n,"_host",this)}),r(this.context,"emit",(i,s,c)=>{const a={detail:s,bubbles:!0,composed:!0,...c||{}},u=new CustomEvent(i,a);this.dispatchEvent(u);const m=i.indexOf(":");if(m>0){const y=i.substring(0,m),p=i.substring(m+1),k=p.includes("-")?`${y}:${p.split("-").map((d,f)=>f===0?d:d.charAt(0).toUpperCase()+d.slice(1)).join("")}`:`${y}:${p.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;k!==i&&P(()=>{this.dispatchEvent(new CustomEvent(k,a))})}return!u.defaultPrevented});const o=_e.get(e)||t;for(const i in o){const s=o[i];typeof s=="function"&&(this.context[i]=(...c)=>s(...c,this.context))}if(o.props)for(const i in o.props){let s=this[i];Object.defineProperty(this,i,{get(){return s},set(c){const a=s;s=c,this.context[i]=c,this._initializing||(this._applyProps(o),a!==c&&this._requestRender())},enumerable:!0,configurable:!0})}this._initializing=!1,this._initWatchers(o),this._applyProps(o),this._render(o)}connectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),this._requestRender(),kn(t,this.context,this._mounted,n=>{this._mounted=n})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{$n(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},n=>{this._templateLoading=n},n=>{this._templateError=n},n=>{this._mounted=n})})}attributeChangedCallback(n,r,o){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),r!==o&&this._requestRender(),En(t,n,r,o,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(oe):[]}_render(n){this._runLogicWithinErrorBoundary(n,()=>{ir(this.shadowRoot,n,this.context,this._refs,r=>{this._lastHtmlStringForJitCSS=r,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(r)},r=>{this._templateLoading=r,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(r)},r=>{this._templateError=r,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(r)},r=>this._applyStyle(n,r))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{we(()=>{sr(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,n=>{this._lastRenderTime=n},n=>{this._renderCount=n},this._renderTimeoutId,n=>{this._renderTimeoutId=n})},this._componentId)})}_applyStyle(n,r){this._runLogicWithinErrorBoundary(n,()=>{ar(this.shadowRoot,this.context,r,this._styleSheet,o=>{this._styleSheet=o})})}_runLogicWithinErrorBoundary(n,r){this._hasError&&(this._hasError=!1);try{r()}catch(o){this._hasError=!0;try{const i=n&&n.tag||this.tagName?.toLowerCase?.()||"<unknown>",s=this._componentId||"<unknown-id>",c={};if(n&&n.props)for(const a of Object.keys(n.props))try{const u=this.context[a];u instanceof Node?c[a]=`[DOM Node: ${u.nodeName}]`:typeof u=="object"&&u!==null?c[a]=Object.keys(u).length>5?`[object(${Object.keys(u).length} keys)]`:u:c[a]=u}catch{c[a]="[unreadable]"}H(`Error rendering component <${i}> (id=${s}):`,o),H("Component props snapshot:",c),Q("Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`).")}catch{}n.onError&&n.onError(o,this.context)}}_initContext(n){try{let r=function(i,s=""){if(Array.isArray(i))return new Proxy(i,{get(c,a,u){const m=Reflect.get(c,a,u);return typeof m=="function"&&typeof a=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(a)?function(...p){const k=m.apply(c,p);if(!o._initializing){const d=s||"root";o._triggerWatchers(d,c),we(()=>o._render(n),o._componentId)}return k}:m},set(c,a,u){if(c[a]=u,!o._initializing){const m=s?`${s}.${String(a)}`:String(a);o._triggerWatchers(m,u),we(()=>o._render(n),o._componentId)}return!0},deleteProperty(c,a){if(delete c[a],!o._initializing){const u=s?`${s}.${String(a)}`:String(a);o._triggerWatchers(u,void 0),we(()=>o._render(n),o._componentId)}return!0}});if(i&&typeof i=="object"){if(N(i))return i;for(const c in i){const a=s?`${s}.${c}`:c;i[c]=r(i[c],a)}return new Proxy(i,{set(c,a,u){const m=s?`${s}.${String(a)}`:String(a);return c[a]=r(u,m),o._initializing||(o._triggerWatchers(m,c[a]),we(()=>o._render(n),o._componentId)),!0},get(c,a,u){return Reflect.get(c,a,u)}})}return i};const o=this;return r({...n.props?Object.fromEntries(Object.entries(n.props).map(([i,s])=>[i,s.default])):{}})}catch{return{}}}_initWatchers(n){this._runLogicWithinErrorBoundary(n,()=>{bn(this.context,this._watchers,{})})}_triggerWatchers(n,r){vn(this.context,this._watchers,n,r)}_applyProps(n){this._runLogicWithinErrorBoundary(n,()=>{try{xn(this,n,this.context)}catch(r){this._hasError=!0,n.onError&&n.onError(r,this.context)}})}}}function bt(e,t){let n=oe(e);n.includes("-")||(n=`cer-${n}`);let r={};const o={props:{},onConnected:i=>{r.onConnected&&r.onConnected()},onDisconnected:i=>{r.onDisconnected&&r.onDisconnected()},onAttributeChanged:(i,s,c,a)=>{r.onAttributeChanged&&r.onAttributeChanged(i,s,c)},onError:(i,s)=>{r.onError&&i&&r.onError(i)},render:i=>{const s=i._componentId||`${n}-${Math.random().toString(36).substr(2,9)}`;Y.setCurrentComponent(s,()=>{i.requestRender&&i.requestRender()});try{Wt(i);let c;try{c=t()}catch(a){try{const u=i?._hookCallbacks;if(u&&typeof u.onError=="function")try{u.onError(a)}catch{}}catch{}throw a}if(i._hookCallbacks){const a=i._hookCallbacks;if(a.onConnected&&(r.onConnected=a.onConnected),a.onDisconnected&&(r.onDisconnected=a.onDisconnected),a.onAttributeChanged&&(r.onAttributeChanged=a.onAttributeChanged),a.onError&&(r.onError=a.onError),a.style&&(i._styleCallback=a.style),a.props){const u=a.props;o.props=Object.fromEntries(Object.entries(u).map(([m,y])=>[m,{type:typeof y=="boolean"?Boolean:typeof y=="number"?Number:typeof y=="string"?String:Function,default:y}])),_e.set(n,o)}}return c}finally{pt(),Y.clearCurrentComponent()}}};if(_e.set(n,o),typeof window<"u"){try{const i={_hookCallbacks:{},requestRender:()=>{}};Wt(i);try{t()}catch(s){try{const c=i?._hookCallbacks;if(c&&typeof c.onError=="function")try{c.onError(s)}catch{}H(`Error during component discovery render <${n}>:`,s),Q("Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when().")}catch{}throw pt(),s}if(pt(),i._hookCallbacks?.props){const s=i._hookCallbacks.props;o.props=Object.fromEntries(Object.entries(s).map(([c,a])=>[c,{type:typeof a=="boolean"?Boolean:typeof a=="number"?Number:typeof a=="string"?String:Function,default:a}])),_e.set(n,o)}}catch{}customElements.get(n)||customElements.define(n,gr(n,o))}}class mr{map=new Map;maxSize;constructor(t){this.maxSize=t}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}set(t,n){if(this.map.delete(t),this.map.set(t,n),this.map.size>this.maxSize){const r=this.map.keys().next().value;r!==void 0&&this.map.delete(r)}}has(t){return this.map.has(t)}clear(){this.map.clear()}}const ht=new mr(500);function yr(e,t){if(e==null){Q(`⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`);return}typeof e!="function"&&Q(`🚨 Potential infinite loop detected! Event handler for '@${t}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${t}="\${functionName()}" to @${t}="\${functionName}" to pass the function reference instead of calling it immediately.`),e===void 0&&typeof e!="function"&&Q(`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`)}function he(e,t={},n,r){const o=r??t.key;return{tag:e,key:o,props:t,children:n}}function De(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function Re(e){return typeof e=="object"&&e!==null&&"tag"in e&&!De(e)}function br(e,t){return e.key!=null?e:{...e,key:t}}function vr(e,t=[],n={}){const r={},o={},i={},s=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;let a;for(;a=c.exec(e);){const u=a[1],m=a[2],y=(a[4]||a[6])??"",p=a[3]===void 0&&a[6]===void 0,k=y.match(/^{{(\d+)}}$/);let d=p?!0:k?t[Number(k[1])]??null:y;k||(d==="true"?d=!0:d==="false"?d=!1:d==="null"?d=null:isNaN(Number(d))||(d=Number(d)));const f=["model","bind","show","class","style","ref","when"];if(u===":"){const[h,l]=m.split(":"),[g,...v]=h.split(".");if(f.includes(g)){const x=[...v],S=g==="model"&&l?`model:${l}`:g;i[S]={value:d,modifiers:x,arg:l}}else if(m==="disabled"){let x=d;x&&N(x)&&(x=x.value);const S=typeof x;if(x===""||S==="boolean"||S==="string"&&(x==="true"||x==="false")||x==null||S==="number")r[m]=x;else{let w=d;w&&N(w)&&(w=w.value),o[m]=w}s.push(m)}else{let x=d;x&&N(x)&&(x=x.value),o[m]=x,s.push(m)}}else if(u==="@"){const[h,...l]=m.split("."),g=l;yr(d,h);const v=typeof d=="function"?d:typeof n[d]=="function"?n[d]:void 0;if(v){const x=E=>{if(g.includes("prevent")&&E.preventDefault(),g.includes("stop")&&E.stopPropagation(),!(g.includes("self")&&E.target!==E.currentTarget))return g.includes("once")&&E.currentTarget?.removeEventListener(h,x),v(E)},S="on"+h.charAt(0).toUpperCase()+h.slice(1);r[S]=x}}else m==="ref"?r.ref=d:o[m]=d}return{props:r,attrs:o,directives:i,bound:s}}function vt(e){if(!Re(e)||De(e))return e;const t=e.props?.directives;if(t&&t.when){const n=t.when.value,r=N(n)?n.value:n,{when:o,...i}=t,s={...e.props};Object.keys(i).length>0?s.directives=i:delete s.directives;const c={...e,props:s};return Array.isArray(c.children)&&(c.children=c.children.map(u=>typeof u=="object"&&u!==null?vt(u):u)),{tag:"#anchor",key:e.key!=null?`when-${e.key}`:`when-${e.tag}`,children:r?[c]:[]}}if(Array.isArray(e.children)){const n=e.children.map(r=>typeof r=="object"&&r!==null?vt(r):r);return{...e,children:n}}return e}function wr(e,t,n){const r=Ne.length>0?Ne[Ne.length-1]:void 0,o=n??r,i=!n&&t.length===0,s=i?e.join("<!--TEMPLATE_DELIM-->"):null;if(i&&s){const w=ht.get(s);if(w)return w}function c(w,T){return he("#text",{},w,T)}function a(w,T){const $=typeof w=="string"?ae(w):w;return he("#text",{},$,T)}let u="";for(let w=0;w<e.length;w++)u+=e[w],w<t.length&&(u+=`{{${w}}}`);const m=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,y=[];let p,k=[],d=null,f={},h,l=0,g=[];function v(w){!w||typeof w!="object"||De(w)||(w.props||w.attrs?(w.props&&(f.props||(f.props={}),Object.assign(f.props,w.props)),w.attrs&&(f.attrs||(f.attrs={}),Object.keys(w.attrs).forEach(T=>{if(T==="style"&&f.attrs.style){const $=f.attrs.style.replace(/;?\s*$/,""),b=w.attrs.style.replace(/^;?\s*/,"");f.attrs.style=$+"; "+b}else if(T==="class"&&f.attrs.class){const $=f.attrs.class.trim().split(/\s+/).filter(Boolean),b=w.attrs.class.trim().split(/\s+/).filter(Boolean),_=[...new Set([...$,...b])];f.attrs.class=_.join(" ")}else f.attrs[T]=w.attrs[T]}))):(f.props||(f.props={}),Object.assign(f.props,w)))}function x(w,T){const $=d?k:g;if(De(w)){const b=w.key??T;let _=w.children;$.push({...w,key:b,children:_});return}if(Re(w)){$.push(br(w,void 0));return}if(Array.isArray(w)){if(w.length===0)return;for(let b=0;b<w.length;b++){const _=w[b];De(_)||Re(_)||Array.isArray(_)?x(_,`${T}-${b}`):_!==null&&typeof _=="object"?jt(_)?$.push(he("#raw",{},_.__rawHTML,`${T}-${b}`)):v(_):$.push(c(String(_),`${T}-${b}`))}return}if(w!==null&&typeof w=="object"){if(jt(w)){const b=w.__rawHTML??"";$.push(he("#raw",{},b,T));return}v(w);return}$.push(c(String(w),T))}const S=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;p=m.exec(u);)if(!(p[0].startsWith("<!--")&&p[0].endsWith("-->"))){if(p[1]){const w=p[1],T=p[0][1]==="/",$=p[0][p[0].length-2]==="/"||S.has(w),{props:b,attrs:_,directives:O,bound:j}=vr(p[2]||"",t,o),A={props:{},attrs:{}};for(const M in b)A.props[M]=b[M];for(const M in _)A.attrs[M]=_[M];A.attrs&&Object.prototype.hasOwnProperty.call(A.attrs,"key")&&!(A.props&&Object.prototype.hasOwnProperty.call(A.props,"key"))&&P(()=>{A.props.key=A.attrs.key});try{const M={input:["value","checked","readonly","required","placeholder","maxlength","minlength"],textarea:["value","readonly","required","placeholder","maxlength","minlength"],select:["value","required","multiple"],option:["selected","value"],video:["muted","autoplay","controls","loop","playsinline"],audio:["muted","autoplay","controls","loop"],img:["src","alt","width","height"],button:["type","name","value","autofocus","form"]},R=w.toLowerCase(),de=M[R]??[];if(A.attrs){for(const U of de)if(j&&j.includes(U)&&U in A.attrs&&!(A.props&&U in A.props)){let D=A.attrs[U];if(D&&N(D))D=D.value,A.props[U]=D,delete A.attrs[U];else{const K=typeof D;U==="disabled"?(D===""||K==="boolean"||K==="string"&&(D==="true"||D==="false")||D==null||K==="number")&&(A.props[U]=D,P(()=>{const I=globalThis;I.__VDOM_DISABLED_PROMOTIONS||(I.__VDOM_DISABLED_PROMOTIONS=[]),I.__VDOM_DISABLED_PROMOTIONS.push({phase:"compiler-promotion",tag:w,propName:U,value:D,time:Date.now(),stack:new Error().stack})}),delete A.attrs[U]):(D===""||K==="string"||K==="number"||K==="boolean"||D==null)&&(A.props[U]=D,delete A.attrs[U])}}}if((w.includes("-")||!!o?.__customElements?.has?.(w))&&(A.isCustomElement=!0,j&&A.attrs)){const U=new Set(["id","name","data-key","key"]);for(const D of j)if(D in A.attrs&&!(A.props&&D in A.props)){const K=D.includes("-")?$t(D):D;let ie=A.attrs[D];A.props[K]=ie,U.has(D)||delete A.attrs[D]}}}catch{}if(O&&Object.keys(O).some(M=>M==="model"||M.startsWith("model:")))try{const M=Symbol.for("cer.registry"),R=globalThis[M],de=!!(R&&typeof R.has=="function"&&R.has(w)),G=!!(o&&(o.__customElements instanceof Set&&o.__customElements.has(w)||Array.isArray(o.__isCustomElements)&&o.__isCustomElements.includes(w)));if(!!(w.includes("-")||G||de))for(const K of Object.keys(O)){if(K!=="model"&&!K.startsWith("model:"))continue;const ie=O[K],je=ie.arg??(K.includes(":")?K.split(":",2)[1]:void 0),I=ie.value,le=je??"modelValue",L=J,F=Ye,V=o?o._state||o:void 0;let B;typeof I=="string"&&o?B=L(V,I):B=I,A.props[le]=B;try{const pe=oe(le);A.attrs||(A.attrs={}),B!=null&&(typeof B=="string"||typeof B=="number"||typeof B=="boolean")&&(A.attrs[pe]=B)}catch{}A.isCustomElement=!0;const Z=`update:${oe(le)}`.replace(/-([a-z])/g,(pe,ue)=>ue.toUpperCase()),sn="on"+Z.charAt(0).toUpperCase()+Z.slice(1);A.props[sn]=function(pe){const ue=pe.detail!==void 0?pe.detail:pe.target?pe.target.value:void 0;if(V)if(I&&N(I)){const ye=I.value;(Array.isArray(ue)&&Array.isArray(ye)?JSON.stringify([...ue].sort())!==JSON.stringify([...ye].sort()):ue!==ye)&&(I.value=ue,o?.requestRender?o.requestRender():o?._requestRender&&o._requestRender())}else{const ye=L(V,typeof I=="string"?I:String(I));(Array.isArray(ue)&&Array.isArray(ye)?JSON.stringify([...ue].sort())!==JSON.stringify([...ye].sort()):ue!==ye)&&(F(V,typeof I=="string"?I:String(I),ue),o?.requestRender?o.requestRender():o?._requestRender&&o._requestRender())}},delete O[K]}}catch{}if(Object.keys(O).length>0&&(A.directives={...O}),T){const M=he(d,f,k.length===1&&Re(k[0])&&k[0].tag==="#text"?typeof k[0].children=="string"?k[0].children:"":k.length?k:void 0,h),R=y.pop();R?(d=R.tag,f=R.props,h=R.key,k=R.children,k.push(M)):(g.push(M),d=null,f={},h=void 0,k=[])}else $?d?k.push(he(w,A,void 0,void 0)):g.push(he(w,A,void 0,void 0)):(d&&y.push({tag:d,props:f,children:k,key:h}),d=w,f=A,k=[])}else if(typeof p[3]<"u"){const w=Number(p[3]),T=t[w],$=`interp-${w}`;x(T,$)}else if(p[4]){const w=p[4],T=d?k:g,$=w.split(/({{\d+}})/);for(const b of $){if(!b)continue;const _=b.match(/^{{(\d+)}}$/);if(_){const O=Number(_[1]),j=t[O],A=`interp-${O}`;x(j,A)}else{const O=`text-${l++}`;T.push(a(b,O))}}}}const C=g.filter(w=>Re(w)&&w.tag==="#text"?typeof w.children=="string"&&w.children.trim()!=="":!0).map(w=>vt(w));if(C.length===1){const w=C[0];return i&&s&&ht.set(s,w),w}else if(C.length>1){const w=C;return i&&s&&ht.set(s,w),w}return he("div",{},"","fallback-root")}function ge(e,...t){const n=t[t.length-1],r=typeof n=="object"&&n&&!Array.isArray(n)?n:void 0;return wr(e,t,r)}function xr(e,t){return Ie(!e,t)}function kr(e,t){const n=!e||e.length===0;return Ie(n,t)}function $r(e,t){const n=!!(e&&e.length>0);return Ie(n,t)}function Er(e,t,n){const r=[];return e.forEach((o,i)=>{t(o,i)&&r.push({item:o,originalIndex:i})}),r.map(({item:o,originalIndex:i},s)=>{const c=typeof o=="object"&&o!=null?o?.key??o?.id??`filtered-${i}`:`filtered-${i}`;return z(n(o,i,s),`each-where-${c}`)})}function Cr(e,t){const n=e?.length??0;return n===0&&t.empty?z(t.empty,"switch-length-empty"):n===1&&t.one?z(t.one(e[0]),"switch-length-one"):t.exactly?.[n]?z(t.exactly[n](e),`switch-length-${n}`):n>1&&t.many?z(t.many(e),"switch-length-many"):z([],"switch-length-fallback")}function _r(e,t,n){const r=new Map;return e.forEach(o=>{const i=t(o);r.has(i)||r.set(i,[]),r.get(i).push(o)}),Array.from(r.entries()).map(([o,i],s)=>z(n(o,i,s),`each-group-${o}`))}function Sr(e,t,n,r){const o=n*t,i=Math.min(o+t,e.length);return e.slice(o,i).map((c,a)=>{const u=o+a,m=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${u}`:`page-${u}`;return z(r(c,u,a),`each-page-${m}`)})}function Ar(e,t){return e.loading&&t.loading?z(t.loading,"promise-loading"):e.error&&t.error?z(t.error(e.error),"promise-error"):e.data!==void 0&&t.success?z(t.success(e.data),"promise-success"):t.idle?z(t.idle,"promise-idle"):z([],"promise-fallback")}function X(e,t){const n=typeof window<"u"&&window.matchMedia?.(e)?.matches;return Ie(!!n,t)}const fe={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},Et=["sm","md","lg","xl","2xl"],nn={sm:e=>X(fe.sm,e),md:e=>X(fe.md,e),lg:e=>X(fe.lg,e),xl:e=>X(fe.xl,e),"2xl":e=>X(fe["2xl"],e),dark:e=>X(fe.dark,e),light:e=>X("(prefers-color-scheme: light)",e),touch:e=>X("(hover: none) and (pointer: coarse)",e),mouse:e=>X("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>X("(prefers-reduced-motion: reduce)",e),highContrast:e=>X("(prefers-contrast: high)",e),portrait:e=>X("(orientation: portrait)",e),landscape:e=>X("(orientation: landscape)",e)};function Tr(e,t){const n=[];e.includes("dark")?n.push(fe.dark):e.includes("light")&&n.push("(prefers-color-scheme: light)");const r=e.filter(s=>Et.includes(s)),o=r[r.length-1];o&&o in fe&&n.push(fe[o]);const i=n.length>0?n.join(" and "):"all";return X(i,t)}function jr(e){const t=[];return e.base&&t.push(z(e.base,"responsive-base")),Et.forEach(n=>{const r=e[n];r&&t.push(nn[n](r))}),t}function Lr(e){const t=[];let n=null;return{case(r,o){const i=typeof r=="function"?r:s=>s===r;return t.push({condition:i,content:o}),this},when(r,o){return t.push({condition:r,content:o}),this},otherwise(r){return n=r,this},done(){for(let r=0;r<t.length;r++){const{condition:o,content:i}=t[r];if(o(e))return z(i,`switch-case-${r}`)}return z(n||[],"switch-otherwise")}}}class ve extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return ve.instance||(ve.instance=new ve),ve.instance}emit(t,n){const r=Date.now(),o=this.eventCounters.get(t);if(!o||r-o.window>1e3)this.eventCounters.set(t,{count:1,window:r});else if(o.count++,o.count>50&&o.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!1,cancelable:!0}));const i=this.handlers[t];i&&i.forEach(s=>{try{s(n)}catch(c){H(`Error in global event handler for "${t}":`,c)}})}on(t,n){return this.handlers[t]||(this.handlers[t]=new Set),this.handlers[t].add(n),()=>this.off(t,n)}off(t,n){const r=this.handlers[t];r&&r.delete(n)}offAll(t){delete this.handlers[t]}listen(t,n,r){return this.addEventListener(t,n,r),()=>this.removeEventListener(t,n)}once(t,n){return new Promise(r=>{const o=this.on(t,i=>{o(),n(i),r(i)})})}getActiveEvents(){return Object.keys(this.handlers).filter(t=>this.handlers[t]&&this.handlers[t].size>0)}clear(){this.handlers={}}getHandlerCount(t){return this.handlers[t]?.size||0}getEventStats(){const t={};for(const[n,r]of this.eventCounters.entries())t[n]={count:r.count,handlersCount:this.getHandlerCount(n)};return t}resetEventCounters(){this.eventCounters.clear()}}const Te=ve.getInstance(),Or=(e,t)=>Te.emit(e,t),Pr=(e,t)=>Te.on(e,t),Mr=(e,t)=>Te.off(e,t),Rr=(e,t)=>Te.once(e,t),Nr=(e,t,n)=>Te.listen(e,t,n);function wt(e){let t={...e};const n=[];function r(c){n.push(c),c(t)}function o(){return t}function i(c){const a=typeof c=="function"?c(t):c;t={...t,...a},s()}function s(){n.forEach(c=>c(t))}return{subscribe:r,getState:o,setState:i}}const xt=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},se=(e,t)=>{for(const n of e){const r=[],o=n.path.replace(/:[^/]+/g,c=>(r.push(c.slice(1)),"([^/]+)")),i=new RegExp(`^${o}$`),s=t.match(i);if(s){const c={};return r.forEach((a,u)=>{c[a]=s[u+1]}),{route:n,params:c}}}return{route:null,params:{}}},gt={};async function rn(e){if(e.component)return e.component;if(e.load){if(gt[e.path])return gt[e.path];try{const t=await e.load();return gt[e.path]=t.default,t.default}catch{throw new Error(`Failed to load component for route: ${e.path}`)}}throw new Error(`No component or loader defined for route: ${e.path}`)}function on(e){const{routes:t,base:n="",initialUrl:r}=e;let o,i,s,c,a,u,m;const y=async(f,h)=>{const l=t.find(g=>se([g],f.path).route!==null);if(l?.beforeEnter)try{const g=await l.beforeEnter(f,h);return typeof g=="string"?(await d(g,!0),!1):g!==!1}catch(g){return H("beforeEnter error",g),!1}return!0},p=async(f,h)=>{const l=t.find(g=>se([g],f.path).route!==null);if(l?.onEnter)try{const g=await l.onEnter(f,h);return typeof g=="string"?(await d(g,!0),!1):g!==!1}catch(g){return H("onEnter error",g),!1}return!0},k=(f,h)=>{const l=t.find(g=>se([g],f.path).route!==null);if(l?.afterEnter)try{l.afterEnter(f,h)}catch(g){H("afterEnter error",g)}},d=async(f,h=!1)=>{try{const l={path:f.replace(n,"")||"/",query:{}},g=se(t,l.path);if(!g)throw new Error(`No route found for ${l.path}`);const v=s.getState(),x={path:l.path,params:g.params,query:l.query};if(!await y(x,v)||!await p(x,v))return;typeof window<"u"&&typeof document<"u"&&(h?window.history.replaceState({},"",n+f):window.history.pushState({},"",n+f)),s.setState(x),k(x,v)}catch(l){H("Navigation error:",l)}};if(typeof window<"u"&&typeof document<"u"&&typeof r>"u"){o=()=>{const h=new URL(window.location.href),l=h.pathname.replace(n,"")||"/",g=xt(h.search);return{path:l,query:g}},i=o();const f=se(t,i.path);s=wt({path:i.path,params:f.params,query:i.query}),c=async(h=!1)=>{const l=o();await d(l.path,h)},window.addEventListener("popstate",()=>c(!0)),a=h=>d(h,!1),u=h=>d(h,!0),m=()=>window.history.back()}else{o=()=>{const l=new URL(r||"/","http://localhost"),g=l.pathname.replace(n,"")||"/",v=xt(l.search);return{path:g,query:v}},i=o();const f=se(t,i.path);s=wt({path:i.path,params:f.params,query:i.query}),c=async()=>{const l=o();await h(l.path)};const h=async l=>{try{const g={path:l.replace(n,"")||"/",query:{}},v=se(t,g.path);if(!v)throw new Error(`No route found for ${g.path}`);const x=s.getState(),S={path:g.path,params:v.params,query:g.query},E=t.find(C=>se([C],S.path).route!==null);if(E?.beforeEnter)try{const C=await E.beforeEnter(S,x);if(typeof C=="string"){await h(C);return}if(C===!1)return}catch{return}if(E?.onEnter)try{const C=await E.onEnter(S,x);if(typeof C=="string"){await h(C);return}if(C===!1)return}catch{return}if(s.setState(S),E?.afterEnter)try{E.afterEnter(S,x)}catch{}}catch{}};a=async l=>h(l),u=async l=>h(l),m=()=>{}}return{store:s,push:a,replace:u,back:m,subscribe:s.subscribe,matchRoute:f=>se(t,f),getCurrent:()=>s.getState(),resolveRouteComponent:rn}}function Dr(e,t){return se(e,t)}function Hr(e){const t=on(e);return bt("router-view",(n={},r={})=>{const{onConnected:o}=r;if(o&&o(()=>{t&&typeof t.subscribe=="function"&&t.subscribe(()=>{})}),!t)return ge`<div>Router not initialized.</div>`;const i=t.getCurrent(),{path:s}=i,c=t.matchRoute(s);return c.route?t.resolveRouteComponent(c.route).then(a=>{if(typeof a=="string")return{tag:a,props:{},children:[]};if(typeof a=="function"){const u=a();return(u instanceof Promise?u:Promise.resolve(u)).then(y=>typeof y=="string"?{tag:y,props:{},children:[]}:y)}return ge`<div>Invalid route component</div>`}).catch(()=>ge`<div>Invalid route component</div>`):ge`<div>Not found</div>`}),bt("router-link",(n={},r={})=>{const{to:o="",tag:i="a",replace:s=!1,exact:c=!1,activeClass:a="active",exactActiveClass:u="exact-active",ariaCurrentValue:m="page",disabled:y=!1,external:p=!1,class:k=""}=n,d=t.getCurrent(),f=d.path===o,h=c?f:d&&typeof d.path=="string"?d.path.startsWith(o):!1,l=f?`aria-current="${m}"`:"",g=(k||"").split(/\s+/).filter(Boolean),v={};for(const T of g)v[T]=!0;const x={...v,[a]:h,[u]:f},S=i==="button",E=y?S?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",C=p&&(i==="a"||!i)?'target="_blank" rel="noopener noreferrer"':"",w=T=>{if(y){T.preventDefault();return}p&&(i==="a"||!i)||(T.preventDefault(),s?t.replace(o):t.push(o))};return ge`
128
- ${tn().when(S,ge`
129
- <button
130
- part="button"
131
- :class="${x}"
132
- ${l}
133
- ${E}
134
- ${C}
135
- @click="${w}"
136
- ><slot></slot></button>
137
- `).otherwise(ge`
138
- <a
139
- part="link"
140
- href="${o}"
141
- :class="${x}"
142
- ${l}
143
- ${E}
144
- ${C}
145
- @click="${w}"
146
- ><slot></slot></a>
147
- `).done()}
148
- `}),t}exports.GlobalEventBus=ve;exports.Transition=tr;exports.TransitionGroup=nr;exports.anchorBlock=z;exports.component=bt;exports.computed=hn;exports.createStore=wt;exports.createTransitionPreset=rr;exports.css=Xt;exports.decodeEntities=ae;exports.each=Qn;exports.eachGroup=_r;exports.eachPage=Sr;exports.eachWhere=Er;exports.emit=Or;exports.eventBus=Te;exports.getTransitionStyleSheet=Qe;exports.html=ge;exports.initRouter=Hr;exports.listen=Nr;exports.match=tn;exports.matchRoute=se;exports.matchRouteSSR=Dr;exports.mediaVariants=fe;exports.off=Mr;exports.on=Pr;exports.once=Rr;exports.parseQuery=xt;exports.ref=pn;exports.renderToString=Je;exports.resolveRouteComponent=rn;exports.responsive=nn;exports.responsiveOrder=Et;exports.responsiveSwitch=jr;exports.switchOn=Lr;exports.switchOnLength=Cr;exports.switchOnPromise=Ar;exports.transitionPresets=Se;exports.unless=xr;exports.unsafeHTML=yn;exports.useEmit=cr;exports.useOnAttributeChanged=fr;exports.useOnConnected=lr;exports.useOnDisconnected=ur;exports.useOnError=dr;exports.useProps=pr;exports.useRouter=on;exports.useStyle=hr;exports.watch=gn;exports.when=Ie;exports.whenEmpty=kr;exports.whenMedia=X;exports.whenNotEmpty=$r;exports.whenVariants=Tr;
125
+ Stopping runaway component render to prevent browser freeze`),s(null);return}}else i(0);const l=setTimeout(()=>{r(Date.now()),e(),s(null)},n>10?100:0);s(l)}function mr(e,t,n,r,i){if(!e)return;let o=n||"";try{if(e){const y=Array.from(e.querySelectorAll("*"));for(const p of y)try{const v=p.lastHtmlStringForJitCSS;v&&typeof v=="string"&&v.trim()&&(o+=`
126
+ `+v)}catch{}}}catch{}const s=ln(o);if((!s||s.trim()==="")&&!t._computedStyle){i(null),e.adoptedStyleSheets=[Bt(),nt()];return}let c="";t._computedStyle&&(c=t._computedStyle);let a=Zn(`${c}
127
+ ${s}
128
+ `);a=an(a);let l=r;l||(l=new CSSStyleSheet),(l.cssRules.length===0||l.cssRules.length>0&&Array.from(l.cssRules).map(y=>y.cssText).join("")!==a)&&l.replaceSync(a),e.adoptedStyleSheets=[Bt(),nt(),l],i(l)}let W=null;function Gt(e){W=e}function yt(){W=null}function yr(){if(!W)throw new Error("useEmit must be called during component render");const e=W.emit;return(t,n)=>e(t,n)}function Le(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function Ct(e){if(!W)throw new Error("useOnConnected must be called during component render");Le(W),W._hookCallbacks.onConnected=e}function Et(e){if(!W)throw new Error("useOnDisconnected must be called during component render");Le(W),W._hookCallbacks.onDisconnected=e}function br(e){if(!W)throw new Error("useOnAttributeChanged must be called during component render");Le(W),W._hookCallbacks.onAttributeChanged=e}function vr(e){if(!W)throw new Error("useOnError must be called during component render");Le(W),W._hookCallbacks.onError=e}function fn(e){if(!W)throw new Error("useProps must be called during component render");Le(W),W._hookCallbacks.props={...W._hookCallbacks.props||{},...e};const t=W;try{const r=Object.keys(e||{});for(const i of r){if(typeof i!="string"||i.startsWith("_"))continue;const o=Object.getOwnPropertyDescriptor(t,i);if(!(o&&!o.configurable))try{let c=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;Object.defineProperty(t,i,{configurable:!0,enumerable:!0,get(){try{const a=t&&t._host;if(a){const l=oe(i),m=a.getAttribute(l);if(m!==null){const y=typeof e[i];return y==="boolean"?m===""||m==="true":y==="number"?Number(m):m}if(typeof a[i]<"u"){const y=a[i];if(R(y)||y&&typeof y=="object"&&"value"in y&&!(y instanceof Node))return y.value;const p=typeof e[i];if(!(p==="string"&&y&&typeof y=="object"))return p==="boolean"&&typeof y=="string"?y===""||y==="true":y}}}catch{}return c},set(a){c=a}})}catch{}}}catch{}return new Proxy({},{get(r,i){if(typeof i!="string")return;const o=e[i];try{const c=t&&t._host;if(c){if(c instanceof HTMLElement||typeof c.getAttribute=="function"&&typeof c.hasAttribute=="function"){const l=i.replace(/([A-Z])/g,"-$1").toLowerCase(),m=c.getAttribute(l);if(m!==null)return typeof o=="boolean"?m===""||m==="true":typeof o=="number"?Number(m):m}const a=c[i];if(typeof a<"u"&&a!==""){const l=a&&typeof a=="object"&&"value"in a&&!(a instanceof Node);if(!(typeof o=="string"&&a&&typeof a=="object"&&!l&&!R(a)))return typeof o=="boolean"&&o===!1&&a===""?o:R(a)||l?a.value:typeof o=="boolean"&&typeof a=="string"?a==="true"||a!==""&&a!=="false":typeof o=="number"&&typeof a=="string"&&!Number.isNaN(Number(a))?Number(a):a}}}catch{}const s=t[i];return typeof o=="boolean"&&s===""?o===!1?o:!0:R(s)||s&&typeof s=="object"&&"value"in s&&!(s instanceof Node)?s.value:s!=null&&s!==""?typeof o=="boolean"&&typeof s=="string"?s==="true":typeof o=="number"&&typeof s=="string"&&!Number.isNaN(Number(s))?Number(s):s:o},has(r,i){return typeof i=="string"&&(i in t||i in e)},ownKeys(){return Array.from(new Set([...Object.keys(e),...Object.keys(t||{})]))},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}}})}function dn(e){if(!W)throw new Error("useStyle must be called during component render");Le(W);try{const t=e();Object.defineProperty(W,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){G("Error in useStyle callback:",t),Object.defineProperty(W,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const Te=new Map,Zt=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[Zt]||(e[Zt]=Te)}function wr(e,t){if(!t.render)throw new Error("Component must have a render function");return typeof window>"u"?class{constructor(){}}:class extends HTMLElement{context;_refs={};_listeners=[];_watchers=new Map;_renderTimeoutId=null;_mounted=!1;_hasError=!1;_initializing=!0;_componentId;_styleSheet=null;_lastHtmlStringForJitCSS="";get lastHtmlStringForJitCSS(){return this._lastHtmlStringForJitCSS}get isLoading(){return this._templateLoading}get lastError(){return this._templateError}_cfg;_lastRenderTime=0;_renderCount=0;_templateLoading=!1;_templateError=null;constructor(){super(),this.attachShadow({mode:"open"}),this._cfg=Te.get(e)||t,this._componentId=`${e}-${Math.random().toString(36).substr(2,9)}`;const n=this._initContext(t),r=(o,s,c)=>{Object.defineProperty(o,s,{value:c,writable:!1,enumerable:!1,configurable:!1})};r(n,"refs",this._refs),r(n,"requestRender",()=>this.requestRender()),r(n,"_requestRender",()=>this._requestRender()),r(n,"_componentId",this._componentId),r(n,"_triggerWatchers",(o,s)=>this._triggerWatchers(o,s)),this.context=n,P(()=>{r(n,"_host",this)}),r(this.context,"emit",(o,s,c)=>{const a={detail:s,bubbles:!0,composed:!0,...c||{}},l=new CustomEvent(o,a);this.dispatchEvent(l);const m=o.indexOf(":");if(m>0){const y=o.substring(0,m),p=o.substring(m+1),v=p.includes("-")?`${y}:${p.split("-").map((f,h)=>h===0?f:f.charAt(0).toUpperCase()+f.slice(1)).join("")}`:`${y}:${p.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;v!==o&&P(()=>{this.dispatchEvent(new CustomEvent(v,a))})}return!l.defaultPrevented});const i=Te.get(e)||t;for(const o in i){const s=i[o];typeof s=="function"&&(this.context[o]=(...c)=>s(...c,this.context))}if(i.props)for(const o in i.props){let s=this[o];Object.defineProperty(this,o,{get(){return s},set(c){const a=s;s=c,this.context[o]=c,this._initializing||(this._applyProps(i),a!==c&&this._requestRender())},enumerable:!0,configurable:!0})}this._initializing=!1,this._initWatchers(i),this._applyProps(i),this._render(i)}connectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),this._requestRender(),Ln(t,this.context,this._mounted,n=>{this._mounted=n})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{On(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},n=>{this._templateLoading=n},n=>{this._templateError=n},n=>{this._mounted=n})})}attributeChangedCallback(n,r,i){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),r!==i&&this._requestRender(),Pn(t,n,r,i,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(oe):[]}_render(n){this._runLogicWithinErrorBoundary(n,()=>{hr(this.shadowRoot,n,this.context,this._refs,r=>{this._lastHtmlStringForJitCSS=r,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(r)},r=>{this._templateLoading=r,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(r)},r=>{this._templateError=r,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(r)},r=>this._applyStyle(n,r))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{$e(()=>{gr(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,n=>{this._lastRenderTime=n},n=>{this._renderCount=n},this._renderTimeoutId,n=>{this._renderTimeoutId=n})},this._componentId)})}_applyStyle(n,r){this._runLogicWithinErrorBoundary(n,()=>{mr(this.shadowRoot,this.context,r,this._styleSheet,i=>{this._styleSheet=i})})}_runLogicWithinErrorBoundary(n,r){this._hasError&&(this._hasError=!1);try{r()}catch(i){this._hasError=!0;try{const o=n&&n.tag||this.tagName?.toLowerCase?.()||"<unknown>",s=this._componentId||"<unknown-id>",c={};if(n&&n.props)for(const a of Object.keys(n.props))try{const l=this.context[a];l instanceof Node?c[a]=`[DOM Node: ${l.nodeName}]`:typeof l=="object"&&l!==null?c[a]=Object.keys(l).length>5?`[object(${Object.keys(l).length} keys)]`:l:c[a]=l}catch{c[a]="[unreadable]"}H(`Error rendering component <${o}> (id=${s}):`,i),H("Component props snapshot:",c),G("Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`).")}catch{}n.onError&&n.onError(i,this.context)}}_initContext(n){try{let r=function(o,s=""){if(Array.isArray(o))return new Proxy(o,{get(c,a,l){const m=Reflect.get(c,a,l);return typeof m=="function"&&typeof a=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(a)?function(...p){const v=m.apply(c,p);if(!i._initializing){const f=s||"root";i._triggerWatchers(f,c),$e(()=>i._render(n),i._componentId)}return v}:m},set(c,a,l){if(c[a]=l,!i._initializing){const m=s?`${s}.${String(a)}`:String(a);i._triggerWatchers(m,l),$e(()=>i._render(n),i._componentId)}return!0},deleteProperty(c,a){if(delete c[a],!i._initializing){const l=s?`${s}.${String(a)}`:String(a);i._triggerWatchers(l,void 0),$e(()=>i._render(n),i._componentId)}return!0}});if(o&&typeof o=="object"){if(R(o))return o;for(const c in o){const a=s?`${s}.${c}`:c;o[c]=r(o[c],a)}return new Proxy(o,{set(c,a,l){const m=s?`${s}.${String(a)}`:String(a);return c[a]=r(l,m),i._initializing||(i._triggerWatchers(m,c[a]),$e(()=>i._render(n),i._componentId)),!0},get(c,a,l){return Reflect.get(c,a,l)}})}return o};const i=this;return r({...n.props?Object.fromEntries(Object.entries(n.props).map(([o,s])=>[o,s.default])):{}})}catch{return{}}}_initWatchers(n){this._runLogicWithinErrorBoundary(n,()=>{Sn(this.context,this._watchers,{})})}_triggerWatchers(n,r){An(this.context,this._watchers,n,r)}_applyProps(n){this._runLogicWithinErrorBoundary(n,()=>{try{jn(this,n,this.context)}catch(r){this._hasError=!0,n.onError&&n.onError(r,this.context)}})}}}function _t(e,t){let n=oe(e);n.includes("-")||(n=`cer-${n}`);let r={};const i={props:{},onConnected:o=>{r.onConnected&&r.onConnected()},onDisconnected:o=>{r.onDisconnected&&r.onDisconnected()},onAttributeChanged:(o,s,c,a)=>{r.onAttributeChanged&&r.onAttributeChanged(o,s,c)},onError:(o,s)=>{r.onError&&o&&r.onError(o)},render:o=>{const s=o._componentId||`${n}-${Math.random().toString(36).substr(2,9)}`;ee.setCurrentComponent(s,()=>{o.requestRender&&o.requestRender()});try{Gt(o);let c;try{c=t()}catch(a){try{const l=o?._hookCallbacks;if(l&&typeof l.onError=="function")try{l.onError(a)}catch{}}catch{}throw a}if(o._hookCallbacks){const a=o._hookCallbacks;if(a.onConnected&&(r.onConnected=a.onConnected),a.onDisconnected&&(r.onDisconnected=a.onDisconnected),a.onAttributeChanged&&(r.onAttributeChanged=a.onAttributeChanged),a.onError&&(r.onError=a.onError),a.style&&(o._styleCallback=a.style),a.props){const l=a.props;i.props=Object.fromEntries(Object.entries(l).map(([m,y])=>[m,{type:typeof y=="boolean"?Boolean:typeof y=="number"?Number:typeof y=="string"?String:Function,default:y}])),Te.set(n,i)}}return c}finally{yt(),ee.clearCurrentComponent()}}};if(Te.set(n,i),typeof window<"u"){try{const o={_hookCallbacks:{},requestRender:()=>{}};Gt(o);try{t()}catch(s){try{const c=o?._hookCallbacks;if(c&&typeof c.onError=="function")try{c.onError(s)}catch{}H(`Error during component discovery render <${n}>:`,s),G("Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when().")}catch{}throw yt(),s}if(yt(),o._hookCallbacks?.props){const s=o._hookCallbacks.props;i.props=Object.fromEntries(Object.entries(s).map(([c,a])=>[c,{type:typeof a=="boolean"?Boolean:typeof a=="number"?Number:typeof a=="string"?String:Function,default:a}])),Te.set(n,i)}}catch{}customElements.get(n)||customElements.define(n,wr(n,i))}}class xr{map=new Map;maxSize;constructor(t){this.maxSize=t}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}set(t,n){if(this.map.delete(t),this.map.set(t,n),this.map.size>this.maxSize){const r=this.map.keys().next().value;r!==void 0&&this.map.delete(r)}}has(t){return this.map.has(t)}clear(){this.map.clear()}}const bt=new xr(500);function kr(e,t){if(e==null){G(`⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`);return}typeof e!="function"&&G(`🚨 Potential infinite loop detected! Event handler for '@${t}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${t}="\${functionName()}" to @${t}="\${functionName}" to pass the function reference instead of calling it immediately.`),e===void 0&&typeof e!="function"&&G(`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`)}function ge(e,t={},n,r){const i=r??t.key;return{tag:e,key:i,props:t,children:n}}function Fe(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function De(e){return typeof e=="object"&&e!==null&&"tag"in e&&!Fe(e)}function $r(e,t){return e.key!=null?e:{...e,key:t}}function Cr(e,t=[],n={}){const r={},i={},o={},s=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;let a;for(;a=c.exec(e);){const l=a[1],m=a[2],y=(a[4]||a[6])??"",p=a[3]===void 0&&a[6]===void 0,v=y.match(/^{{(\d+)}}$/);let f=p?!0:v?t[Number(v[1])]??null:y;v||(f==="true"?f=!0:f==="false"?f=!1:f==="null"?f=null:isNaN(Number(f))||(f=Number(f)));const h=["model","bind","show","class","style","ref","when"];if(l===":"){const[d,u]=m.split(":"),[g,...w]=d.split(".");if(h.includes(g)){const k=[...w],S=g==="model"&&u?`model:${u}`:g;o[S]={value:f,modifiers:k,arg:u}}else if(m==="disabled"){let k=f;k&&R(k)&&(k=k.value);const S=typeof k;if(k===""||S==="boolean"||S==="string"&&(k==="true"||k==="false")||k==null||S==="number")r[m]=k;else{let x=f;x&&R(x)&&(x=x.value),i[m]=x}s.push(m)}else{let k=f;k&&R(k)&&(k=k.value),i[m]=k,s.push(m)}}else if(l==="@"){const[d,...u]=m.split("."),g=u;kr(f,d);const w=typeof f=="function"?f:typeof n[f]=="function"?n[f]:void 0;if(w){const k=C=>{if(g.includes("prevent")&&C.preventDefault(),g.includes("stop")&&C.stopPropagation(),!(g.includes("self")&&C.target!==C.currentTarget))return g.includes("once")&&C.currentTarget?.removeEventListener(d,k),w(C)},S="on"+d.charAt(0).toUpperCase()+d.slice(1);r[S]=k}}else m==="ref"?r.ref=f:i[m]=f}return{props:r,attrs:i,directives:o,bound:s}}function St(e){if(!De(e)||Fe(e))return e;const t=e.props?.directives;if(t&&t.when){const n=t.when.value,r=R(n)?n.value:n,{when:i,...o}=t,s={...e.props};Object.keys(o).length>0?s.directives=o:delete s.directives;const c={...e,props:s};return Array.isArray(c.children)&&(c.children=c.children.map(l=>typeof l=="object"&&l!==null?St(l):l)),{tag:"#anchor",key:e.key!=null?`when-${e.key}`:`when-${e.tag}`,children:r?[c]:[]}}if(Array.isArray(e.children)){const n=e.children.map(r=>typeof r=="object"&&r!==null?St(r):r);return{...e,children:n}}return e}function Er(e,t,n){const r=He.length>0?He[He.length-1]:void 0,i=n??r,o=!n&&t.length===0,s=o?e.join("<!--TEMPLATE_DELIM-->"):null;if(o&&s){const x=bt.get(s);if(x)return x}function c(x,T){return ge("#text",{},x,T)}function a(x,T){const $=typeof x=="string"?ae(x):x;return ge("#text",{},$,T)}let l="";for(let x=0;x<e.length;x++)l+=e[x],x<t.length&&(l+=`{{${x}}}`);const m=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,y=[];let p,v=[],f=null,h={},d,u=0,g=[];function w(x){!x||typeof x!="object"||Fe(x)||(x.props||x.attrs?(x.props&&(h.props||(h.props={}),Object.assign(h.props,x.props)),x.attrs&&(h.attrs||(h.attrs={}),Object.keys(x.attrs).forEach(T=>{if(T==="style"&&h.attrs.style){const $=h.attrs.style.replace(/;?\s*$/,""),b=x.attrs.style.replace(/^;?\s*/,"");h.attrs.style=$+"; "+b}else if(T==="class"&&h.attrs.class){const $=h.attrs.class.trim().split(/\s+/).filter(Boolean),b=x.attrs.class.trim().split(/\s+/).filter(Boolean),E=[...new Set([...$,...b])];h.attrs.class=E.join(" ")}else h.attrs[T]=x.attrs[T]}))):(h.props||(h.props={}),Object.assign(h.props,x)))}function k(x,T){const $=f?v:g;if(Fe(x)){const b=x.key??T;let E=x.children;$.push({...x,key:b,children:E});return}if(De(x)){$.push($r(x,void 0));return}if(Array.isArray(x)){if(x.length===0)return;for(let b=0;b<x.length;b++){const E=x[b];Fe(E)||De(E)||Array.isArray(E)?k(E,`${T}-${b}`):E!==null&&typeof E=="object"?Ht(E)?$.push(ge("#raw",{},E.__rawHTML,`${T}-${b}`)):w(E):$.push(c(String(E),`${T}-${b}`))}return}if(x!==null&&typeof x=="object"){if(Ht(x)){const b=x.__rawHTML??"";$.push(ge("#raw",{},b,T));return}w(x);return}$.push(c(String(x),T))}const S=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;p=m.exec(l);)if(!(p[0].startsWith("<!--")&&p[0].endsWith("-->"))){if(p[1]){const x=p[1],T=p[0][1]==="/",$=p[0][p[0].length-2]==="/"||S.has(x),{props:b,attrs:E,directives:O,bound:j}=Cr(p[2]||"",t,i),A={props:{},attrs:{}};for(const M in b)A.props[M]=b[M];for(const M in E)A.attrs[M]=E[M];A.attrs&&Object.prototype.hasOwnProperty.call(A.attrs,"key")&&!(A.props&&Object.prototype.hasOwnProperty.call(A.props,"key"))&&P(()=>{A.props.key=A.attrs.key});try{const M={input:["value","checked","readonly","required","placeholder","maxlength","minlength"],textarea:["value","readonly","required","placeholder","maxlength","minlength"],select:["value","required","multiple"],option:["selected","value"],video:["muted","autoplay","controls","loop","playsinline"],audio:["muted","autoplay","controls","loop"],img:["src","alt","width","height"],button:["type","name","value","autofocus","form"]},N=x.toLowerCase(),de=M[N]??[];if(A.attrs){for(const q of de)if(j&&j.includes(q)&&q in A.attrs&&!(A.props&&q in A.props)){let D=A.attrs[q];if(D&&R(D))D=D.value,A.props[q]=D,delete A.attrs[q];else{const K=typeof D;q==="disabled"?(D===""||K==="boolean"||K==="string"&&(D==="true"||D==="false")||D==null||K==="number")&&(A.props[q]=D,delete A.attrs[q]):(D===""||K==="string"||K==="number"||K==="boolean"||D==null)&&(A.props[q]=D,delete A.attrs[q])}}}if((x.includes("-")||!!i?.__customElements?.has?.(x))&&(A.isCustomElement=!0,j&&A.attrs)){const q=new Set(["id","name","data-key","key"]);for(const D of j)if(D in A.attrs&&!(A.props&&D in A.props)){const K=D.includes("-")?Lt(D):D;let se=A.attrs[D];if(A.props[K]=se,q.has(D)||Qt(D))try{const F=Y(A.attrs[D]);F===null?delete A.attrs[D]:A.attrs[D]=F}catch{delete A.attrs[D]}else delete A.attrs[D]}}}catch{}if(O&&Object.keys(O).some(M=>M==="model"||M.startsWith("model:")))try{const M=Symbol.for("cer.registry"),N=globalThis[M],de=!!(N&&typeof N.has=="function"&&N.has(x)),Z=!!(i&&(i.__customElements instanceof Set&&i.__customElements.has(x)||Array.isArray(i.__isCustomElements)&&i.__isCustomElements.includes(x)));if(!!(x.includes("-")||Z||de))for(const K of Object.keys(O)){if(K!=="model"&&!K.startsWith("model:"))continue;const se=O[K],ke=se.arg??(K.includes(":")?K.split(":",2)[1]:void 0),F=se.value,le=ke??"modelValue",L=X,I=tt,V=i?i._state||i:void 0;let B;typeof F=="string"&&i?B=L(V,F):B=F,A.props[le]=B;try{const he=oe(le);A.attrs||(A.attrs={}),B!=null&&(typeof B=="string"||typeof B=="number"||typeof B=="boolean")&&(A.attrs[he]=B)}catch{}A.isCustomElement=!0;const J=`update:${oe(le)}`.replace(/-([a-z])/g,(he,ue)=>ue.toUpperCase()),mn="on"+J.charAt(0).toUpperCase()+J.slice(1);A.props[mn]=function(he){const ue=he.detail!==void 0?he.detail:he.target?he.target.value:void 0;if(V)if(F&&R(F)){const ve=F.value;(Array.isArray(ue)&&Array.isArray(ve)?JSON.stringify([...ue].sort())!==JSON.stringify([...ve].sort()):ue!==ve)&&(F.value=ue,i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}else{const ve=L(V,typeof F=="string"?F:String(F));(Array.isArray(ue)&&Array.isArray(ve)?JSON.stringify([...ue].sort())!==JSON.stringify([...ve].sort()):ue!==ve)&&(I(V,typeof F=="string"?F:String(F),ue),i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}},delete O[K]}}catch{}if(Object.keys(O).length>0&&(A.directives={...O}),T){const M=ge(f,h,v.length===1&&De(v[0])&&v[0].tag==="#text"?typeof v[0].children=="string"?v[0].children:"":v.length?v:void 0,d),N=y.pop();N?(f=N.tag,h=N.props,d=N.key,v=N.children,v.push(M)):(g.push(M),f=null,h={},d=void 0,v=[])}else $?f?v.push(ge(x,A,void 0,void 0)):g.push(ge(x,A,void 0,void 0)):(f&&y.push({tag:f,props:h,children:v,key:d}),f=x,h=A,v=[])}else if(typeof p[3]<"u"){const x=Number(p[3]),T=t[x],$=`interp-${x}`;k(T,$)}else if(p[4]){const x=p[4],T=f?v:g,$=x.split(/({{\d+}})/);for(const b of $){if(!b)continue;const E=b.match(/^{{(\d+)}}$/);if(E){const O=Number(E[1]),j=t[O],A=`interp-${O}`;k(j,A)}else{const O=`text-${u++}`;T.push(a(b,O))}}}}const _=g.filter(x=>De(x)&&x.tag==="#text"?typeof x.children=="string"&&x.children.trim()!=="":!0).map(x=>St(x));if(_.length===1){const x=_[0];return o&&s&&bt.set(s,x),x}else if(_.length>1){const x=_;return o&&s&&bt.set(s,x),x}return ge("div",{},"","fallback-root")}function me(e,...t){const n=t[t.length-1],r=typeof n=="object"&&n&&!Array.isArray(n)?n:void 0;return Er(e,t,r)}function _r(e,t){return We(!e,t)}function Sr(e,t){const n=!e||e.length===0;return We(n,t)}function Ar(e,t){const n=!!(e&&e.length>0);return We(n,t)}function Tr(e,t,n){const r=[];return e.forEach((i,o)=>{t(i,o)&&r.push({item:i,originalIndex:o})}),r.map(({item:i,originalIndex:o},s)=>{const c=typeof i=="object"&&i!=null?i?.key??i?.id??`filtered-${o}`:`filtered-${o}`;return z(n(i,o,s),`each-where-${c}`)})}function jr(e,t){const n=e?.length??0;return n===0&&t.empty?z(t.empty,"switch-length-empty"):n===1&&t.one?z(t.one(e[0]),"switch-length-one"):t.exactly?.[n]?z(t.exactly[n](e),`switch-length-${n}`):n>1&&t.many?z(t.many(e),"switch-length-many"):z([],"switch-length-fallback")}function Lr(e,t,n){const r=new Map;return e.forEach(i=>{const o=t(i);r.has(o)||r.set(o,[]),r.get(o).push(i)}),Array.from(r.entries()).map(([i,o],s)=>z(n(i,o,s),`each-group-${i}`))}function Or(e,t,n,r){const i=n*t,o=Math.min(i+t,e.length);return e.slice(i,o).map((c,a)=>{const l=i+a,m=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${l}`:`page-${l}`;return z(r(c,l,a),`each-page-${m}`)})}function Pr(e,t){return e.loading&&t.loading?z(t.loading,"promise-loading"):e.error&&t.error?z(t.error(e.error),"promise-error"):e.data!==void 0&&t.success?z(t.success(e.data),"promise-success"):t.idle?z(t.idle,"promise-idle"):z([],"promise-fallback")}function Q(e,t){const n=typeof window<"u"&&window.matchMedia?.(e)?.matches;return We(!!n,t)}const fe={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},Ot=["sm","md","lg","xl","2xl"],pn={sm:e=>Q(fe.sm,e),md:e=>Q(fe.md,e),lg:e=>Q(fe.lg,e),xl:e=>Q(fe.xl,e),"2xl":e=>Q(fe["2xl"],e),dark:e=>Q(fe.dark,e),light:e=>Q("(prefers-color-scheme: light)",e),touch:e=>Q("(hover: none) and (pointer: coarse)",e),mouse:e=>Q("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>Q("(prefers-reduced-motion: reduce)",e),highContrast:e=>Q("(prefers-contrast: high)",e),portrait:e=>Q("(orientation: portrait)",e),landscape:e=>Q("(orientation: landscape)",e)};function Mr(e,t){const n=[];e.includes("dark")?n.push(fe.dark):e.includes("light")&&n.push("(prefers-color-scheme: light)");const r=e.filter(s=>Ot.includes(s)),i=r[r.length-1];i&&i in fe&&n.push(fe[i]);const o=n.length>0?n.join(" and "):"all";return Q(o,t)}function Rr(e){const t=[];return e.base&&t.push(z(e.base,"responsive-base")),Ot.forEach(n=>{const r=e[n];r&&t.push(pn[n](r))}),t}function Nr(e){const t=[];let n=null;return{case(r,i){const o=typeof r=="function"?r:s=>s===r;return t.push({condition:o,content:i}),this},when(r,i){return t.push({condition:r,content:i}),this},otherwise(r){return n=r,this},done(){for(let r=0;r<t.length;r++){const{condition:i,content:o}=t[r];if(i(e))return z(o,`switch-case-${r}`)}return z(n||[],"switch-otherwise")}}}class xe extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return xe.instance||(xe.instance=new xe),xe.instance}emit(t,n){const r=Date.now(),i=this.eventCounters.get(t);if(!i||r-i.window>1e3)this.eventCounters.set(t,{count:1,window:r});else if(i.count++,i.count>50&&i.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!1,cancelable:!0}));const o=this.handlers[t];o&&o.forEach(s=>{try{s(n)}catch(c){H(`Error in global event handler for "${t}":`,c)}})}on(t,n){return this.handlers[t]||(this.handlers[t]=new Set),this.handlers[t].add(n),()=>this.off(t,n)}off(t,n){const r=this.handlers[t];r&&r.delete(n)}offAll(t){delete this.handlers[t]}listen(t,n,r){return this.addEventListener(t,n,r),()=>this.removeEventListener(t,n)}once(t,n){return new Promise(r=>{const i=this.on(t,o=>{i(),n(o),r(o)})})}getActiveEvents(){return Object.keys(this.handlers).filter(t=>this.handlers[t]&&this.handlers[t].size>0)}clear(){this.handlers={}}getHandlerCount(t){return this.handlers[t]?.size||0}getEventStats(){const t={};for(const[n,r]of this.eventCounters.entries())t[n]={count:r.count,handlersCount:this.getHandlerCount(n)};return t}resetEventCounters(){this.eventCounters.clear()}}const Oe=xe.getInstance(),Dr=(e,t)=>Oe.emit(e,t),Hr=(e,t)=>Oe.on(e,t),Fr=(e,t)=>Oe.off(e,t),Ir=(e,t)=>Oe.once(e,t),Wr=(e,t,n)=>Oe.listen(e,t,n);function At(e){let t={...e};const n=[];function r(c){return n.push(c),c(t),()=>{const a=n.indexOf(c);a!==-1&&n.splice(a,1)}}function i(){return t}function o(c){const a=typeof c=="function"?c(t):c;t={...t,...a},s()}function s(){n.forEach(c=>c(t))}return{subscribe:r,getState:i,setState:o}}const Tt=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},be=(e,t)=>{for(const n of e){const r=[],i=n.path.replace(/:[^/]+/g,c=>(r.push(c.slice(1)),"([^/]+)")),o=new RegExp(`^${i}$`),s=t.match(o);if(s){const c={};return r.forEach((a,l)=>{c[a]=s[l+1]}),{route:n,params:c}}}return{route:null,params:{}}};function Xe(e,t){for(const n of e)if(be([n],t).route!==null)return n;return null}const vt={};async function hn(e){if(e.component)return e.component;if(e.load){if(vt[e.path])return vt[e.path];try{const t=await e.load();return vt[e.path]=t.default,t.default}catch{throw new Error(`Failed to load component for route: ${e.path}`)}}throw new Error(`No component or loader defined for route: ${e.path}`)}function gn(e){const{routes:t,base:n="",initialUrl:r}=e;let i,o,s,c,a,l,m;const y=async(h,d)=>{const u=Xe(t,h.path);if(!u||!u.beforeEnter)return!0;try{const g=await u.beforeEnter(h,d);return typeof g=="string"?(await f(g,!0),!1):g!==!1}catch(g){return H("beforeEnter error",g),!1}},p=async(h,d)=>{const u=Xe(t,h.path);if(!u||!u.onEnter)return!0;try{const g=await u.onEnter(h,d);return typeof g=="string"?(await f(g,!0),!1):g!==!1}catch(g){return H("onEnter error",g),!1}},v=(h,d)=>{const u=Xe(t,h.path);if(!(!u||!u.afterEnter))try{u.afterEnter(h,d)}catch(g){H("afterEnter error",g)}},f=async(h,d=!1)=>{try{const u={path:h.replace(n,"")||"/",query:{}},g=be(t,u.path);if(!g)throw new Error(`No route found for ${u.path}`);const w=s.getState(),k={path:u.path,params:g.params,query:u.query};if(!await y(k,w)||!await p(k,w))return;typeof window<"u"&&typeof document<"u"&&(d?window.history.replaceState({},"",n+h):window.history.pushState({},"",n+h)),s.setState(k),v(k,w)}catch(u){H("Navigation error:",u)}};if(typeof window<"u"&&typeof document<"u"&&typeof r>"u"){i=()=>{const d=new URL(window.location.href),u=d.pathname.replace(n,"")||"/",g=Tt(d.search);return{path:u,query:g}},o=i();const h=be(t,o.path);s=At({path:o.path,params:h.params,query:o.query}),c=async(d=!1)=>{const u=i();await f(u.path,d)},window.addEventListener("popstate",()=>c(!0)),a=d=>f(d,!1),l=d=>f(d,!0),m=()=>window.history.back()}else{i=()=>{const u=new URL(r||"/","http://localhost"),g=u.pathname.replace(n,"")||"/",w=Tt(u.search);return{path:g,query:w}},o=i();const h=be(t,o.path);s=At({path:o.path,params:h.params,query:o.query}),c=async()=>{const u=i();await d(u.path)};const d=async u=>{try{const g={path:u.replace(n,"")||"/",query:{}},w=be(t,g.path);if(!w)throw new Error(`No route found for ${g.path}`);const k=s.getState(),S={path:g.path,params:w.params,query:g.query},C=Xe(t,S.path);if(C?.beforeEnter)try{const _=await C.beforeEnter(S,k);if(typeof _=="string"){await d(_);return}if(_===!1)return}catch{return}if(C?.onEnter)try{const _=await C.onEnter(S,k);if(typeof _=="string"){await d(_);return}if(_===!1)return}catch{return}if(s.setState(S),C?.afterEnter)try{C.afterEnter(S,k)}catch{}}catch{}};a=async u=>d(u),l=async u=>d(u),m=()=>{}}return{store:s,push:a,replace:l,back:m,subscribe:s.subscribe,matchRoute:h=>be(t,h),getCurrent:()=>s.getState(),resolveRouteComponent:hn}}function Br(e,t){return be(e,t)}let wt=null;function zr(e){const t=gn(e);return wt=t,_t("router-view",()=>{const n=wt||t;if(!n)return me`<div>Router not initialized.</div>`;const r=xt(n.getCurrent());let i;Ct(()=>{try{n&&typeof n.subscribe=="function"&&(i=n.subscribe(s=>{try{r.value=s}catch(c){G("router-view subscription update failed",c)}}))}catch(s){G("router-view subscribe failed",s)}}),Et(()=>{if(typeof i=="function")try{i()}catch(s){G("router-view unsubscribe failed",s)}});const o=n.matchRoute(r.value.path);return!o||!o.route?me`<div>Not found</div>`:n.resolveRouteComponent(o.route).then(s=>{if(typeof s=="string")return{tag:s,props:{},children:[]};if(typeof s=="function"){const c=s();return(c instanceof Promise?c:Promise.resolve(c)).then(l=>typeof l=="string"?{tag:l,props:{},children:[]}:l)}return me`<div>Invalid route component</div>`}).catch(()=>me`<div>Invalid route component</div>`)}),_t("router-link",()=>{const n=fn({to:"",tag:"a",replace:!1,exact:!1,activeClass:"active",exactActiveClass:"exact-active",ariaCurrentValue:"page",disabled:!1,external:!1,linkClass:"",linkStyle:""}),r=wt||t,i=xt(r.getCurrent());let o;dn(()=>"a,button{display:inline-block;}"+n.linkStyle),Ct(()=>{try{r&&typeof r.subscribe=="function"&&(o=r.subscribe(h=>{try{i.value=h}catch(d){G("router-link subscription update failed",d)}}))}catch(h){G("router-link subscribe failed",h)}}),Et(()=>{if(typeof o=="function")try{o()}catch(h){G("router-link unsubscribe failed",h)}});const s=pe(()=>i.value.path===n.to),c=pe(()=>n.exact?s.value:i.value&&typeof i.value.path=="string"?i.value.path.startsWith(n.to):!1),a=pe(()=>{const d=(n.linkClass||"").split(/\s+/).filter(Boolean),u={};for(const g of d)u[g]=!0;return u}),l=pe(()=>({...a.value,[n.activeClass||"active"]:c.value,[n.exactActiveClass||"exact-active"]:s.value})),m=pe(()=>n.tag==="button"),y=pe(()=>s.value?n.ariaCurrentValue:""),p=pe(()=>!!n.disabled),v=pe(()=>!!n.external&&(n.tag==="a"||!n.tag)),f=h=>{if(n.disabled){h.preventDefault();return}n.external&&(n.tag==="a"||!n.tag)||(h.preventDefault(),n.replace?r.replace(n.to):r.push(n.to))};return me`
129
+ ${un().when(m.value,me`
130
+ <button
131
+ part="button"
132
+ :class="${l.value}"
133
+ aria-current="${y.value}"
134
+ disabled="${p.value?"":null}"
135
+ aria-disabled="${p.value?"true":null}"
136
+ tabindex="${p.value?"-1":null}"
137
+ @click="${f}"
138
+ >
139
+ <slot></slot>
140
+ </button>
141
+ `).otherwise(me`
142
+ <a
143
+ part="link"
144
+ href="${n.to}"
145
+ :class="${l.value}"
146
+ aria-current="${y.value}"
147
+ aria-disabled="${p.value?"true":null}"
148
+ tabindex="${p.value?"-1":null}"
149
+ target="${v.value?"_blank":null}"
150
+ rel="${v.value?"noopener noreferrer":null}"
151
+ @click="${f}"
152
+ ><slot></slot
153
+ ></a>
154
+ `).done()}
155
+ `}),t}exports.GlobalEventBus=xe;exports.Transition=ur;exports.TransitionGroup=fr;exports.anchorBlock=z;exports.component=_t;exports.computed=pe;exports.createStore=At;exports.createTransitionPreset=dr;exports.css=sn;exports.decodeEntities=ae;exports.each=cr;exports.eachGroup=Lr;exports.eachPage=Or;exports.eachWhere=Tr;exports.emit=Dr;exports.eventBus=Oe;exports.getTransitionStyleSheet=nt;exports.html=me;exports.initRouter=zr;exports.listen=Wr;exports.match=un;exports.matchRoute=be;exports.matchRouteSSR=Br;exports.mediaVariants=fe;exports.off=Fr;exports.on=Hr;exports.once=Ir;exports.parseQuery=Tt;exports.ref=xt;exports.renderToString=Qe;exports.resolveRouteComponent=hn;exports.responsive=pn;exports.responsiveOrder=Ot;exports.responsiveSwitch=Rr;exports.switchOn=Nr;exports.switchOnLength=jr;exports.switchOnPromise=Pr;exports.transitionPresets=je;exports.unless=_r;exports.unsafeHTML=En;exports.useEmit=yr;exports.useOnAttributeChanged=br;exports.useOnConnected=Ct;exports.useOnDisconnected=Et;exports.useOnError=vr;exports.useProps=fn;exports.useRouter=gn;exports.useStyle=dn;exports.watch=$n;exports.when=We;exports.whenEmpty=Sr;exports.whenMedia=Q;exports.whenNotEmpty=Ar;exports.whenVariants=Mr;
149
156
  //# sourceMappingURL=custom-elements-runtime.cjs.js.map