@jasonshimmy/custom-elements-runtime 1.1.0 → 1.1.2

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"});class $t{pendingUpdates=new Map;isFlushScheduled=!1;schedule(t,r){const n=r||t.toString();this.pendingUpdates.set(n,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=Array.from(this.pendingUpdates.values());this.pendingUpdates.clear(),this.isFlushScheduled=!1;for(const r of t)try{r()}catch(n){typeof console<"u"&&console.error&&console.error("Error in batched update:",n)}}get pendingCount(){return this.pendingUpdates.size}}const kt=new $t;function he(e,t){kt.schedule(e,t)}const Xe=new WeakSet;class Ct{static cache=new WeakMap;static arrayHandlerCache=new WeakMap;static objectHandlerCache=new WeakMap;static getOrCreateProxy(t,r,n=!1){const i=this.cache.get(t);if(i)return i;const s=n?this.getOrCreateArrayHandler(r):this.getOrCreateObjectHandler(r),o=new Proxy(t,s);try{lt.markAsProxy(o)}catch{}return this.cache.set(t,o),o}static getOrCreateArrayHandler(t){if(!this.arrayHandlerCache.has(t)){const r={get:(n,i,s)=>{const o=Reflect.get(n,i,s);return typeof o=="function"&&typeof i=="string"&&["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].includes(i)?function(...a){const p=o.apply(n,a);return t.triggerUpdate(),p}:o},set:(n,i,s)=>(n[i]=t.makeReactiveValue(s),t.triggerUpdate(),!0),deleteProperty:(n,i)=>(delete n[i],t.triggerUpdate(),!0)};this.arrayHandlerCache.set(t,r)}return this.arrayHandlerCache.get(t)}static getOrCreateObjectHandler(t){if(!this.objectHandlerCache.has(t)){const r={get:(n,i,s)=>Reflect.get(n,i,s),set:(n,i,s)=>(n[i]=t.makeReactiveValue(s),t.triggerUpdate(),!0),deleteProperty:(n,i)=>(delete n[i],t.triggerUpdate(),!0)};this.objectHandlerCache.set(t,r)}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 lt{static contextCache=new WeakMap;static createReactiveProxy(t,r,n){try{if(Xe.has(t))return t}catch{}const i=Array.isArray(t);let s=this.contextCache.get(r);s||(s=new WeakMap,this.contextCache.set(r,s));let o=s.get(n);return o||(o={triggerUpdate:r,makeReactiveValue:n},s.set(n,o)),Ct.getOrCreateProxy(t,o,i)}static markAsProxy(t){if(t)try{Xe.add(t)}catch{}}}class _t{currentComponent=null;componentDependencies=new Map;componentRenderFunctions=new Map;stateStorage=new Map;stateIndexCounter=new Map;trackingDisabled=!1;lastWarningTime=new Map;setCurrentComponent(t,r){this.currentComponent=t,this.componentRenderFunctions.set(t,r),this.componentDependencies.has(t)||this.componentDependencies.set(t,new Set),this.stateIndexCounter.set(t,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.currentComponent,r=this.lastWarningTime.get(t)||0,n=Date.now();return n-r<1e3?!1:(this.lastWarningTime.set(t,n),!0)}withoutTracking(t){const r=this.trackingDisabled;this.trackingDisabled=!0;try{return t()}finally{this.trackingDisabled=r}}getOrCreateState(t){if(!this.currentComponent)return new Fe(t);const r=this.currentComponent,n=this.stateIndexCounter.get(r)||0,i=`${r}:${n}`;if(this.stateIndexCounter.set(r,n+1),this.stateStorage.has(i))return this.stateStorage.get(i);const s=new Fe(t);return this.stateStorage.set(i,s),s}trackDependency(t){this.trackingDisabled||this.currentComponent&&(this.componentDependencies.get(this.currentComponent)?.add(t),t.addDependent(this.currentComponent))}triggerUpdate(t){t.getDependents().forEach(r=>{const n=this.componentRenderFunctions.get(r);n&&he(n,r)})}cleanup(t){const r=this.componentDependencies.get(t);r&&(r.forEach(n=>n.removeDependent(t)),this.componentDependencies.delete(t)),this.componentRenderFunctions.delete(t);for(const n of Array.from(this.stateStorage.keys()))n.startsWith(t+":")&&this.stateStorage.delete(n);this.stateIndexCounter.delete(t)}}const F=new _t;class Fe{_value;dependents=new Set;constructor(t){this._value=this.makeReactive(t);try{const r=Symbol.for("@cer/ReactiveState");Object.defineProperty(this,r,{value:!0,enumerable:!1,configurable:!1})}catch{}}get value(){return F.trackDependency(this),this._value}set value(t){F.isRenderingComponent()&&F.shouldEmitRenderWarning()&&console.warn(`🚨 State modification detected during render! This can cause infinite loops.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pt=typeof process<"u"&&process.env?.NODE_ENV!=="production";function I(e,...t){Pt&&console.error(e,...t)}function ie(e,...t){Pt&&console.warn(e,...t)}class Vt{pendingUpdates=new Map;isFlushScheduled=!1;schedule(t,r){const n=r||t;this.pendingUpdates.set(n,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 r of t.values())try{r()}catch(n){I("Error in batched update:",n)}}get pendingCount(){return this.pendingUpdates.size}}const Zt=new Vt;function be(e,t){Zt.schedule(e,t)}const wt=new WeakSet;class Gt{static cache=new WeakMap;static arrayHandlerCache=new WeakMap;static objectHandlerCache=new WeakMap;static getOrCreateProxy(t,r,n=!1){const o=this.cache.get(t);if(o)return o;const i=n?this.getOrCreateArrayHandler(r):this.getOrCreateObjectHandler(r),s=new Proxy(t,i);try{Rt.markAsProxy(s)}catch{}return this.cache.set(t,s),s}static getOrCreateArrayHandler(t){if(!this.arrayHandlerCache.has(t)){const r={get:(n,o,i)=>{const s=Reflect.get(n,o,i);return typeof s=="function"&&typeof o=="string"&&["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].includes(o)?function(...a){const f=s.apply(n,a);return t.triggerUpdate(),f}:s},set:(n,o,i)=>(n[o]=t.makeReactiveValue(i),t.triggerUpdate(),!0),deleteProperty:(n,o)=>(delete n[o],t.triggerUpdate(),!0)};this.arrayHandlerCache.set(t,r)}return this.arrayHandlerCache.get(t)}static getOrCreateObjectHandler(t){if(!this.objectHandlerCache.has(t)){const r={get:(n,o,i)=>Reflect.get(n,o,i),set:(n,o,i)=>(n[o]=t.makeReactiveValue(i),t.triggerUpdate(),!0),deleteProperty:(n,o)=>(delete n[o],t.triggerUpdate(),!0)};this.objectHandlerCache.set(t,r)}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 Rt{static contextCache=new WeakMap;static createReactiveProxy(t,r,n){try{if(wt.has(t))return t}catch{}const o=Array.isArray(t);let i=this.contextCache.get(r);i||(i=new WeakMap,this.contextCache.set(r,i));let s=i.get(n);return s||(s={triggerUpdate:r,makeReactiveValue:n},i.set(n,s)),Gt.getOrCreateProxy(t,s,o)}static markAsProxy(t){if(t)try{wt.add(t)}catch{}}}class Jt{currentComponent=null;componentData=new Map;stateStorage=new Map;trackingDisabled=!1;setCurrentComponent(t,r){if(this.currentComponent=t,!this.componentData.has(t))this.componentData.set(t,{dependencies:new Set,renderFn:r,stateIndex:0,lastWarnTime:0});else{const n=this.componentData.get(t);n.renderFn=r,n.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 r=Date.now();return r-t.lastWarnTime<1e3?!1:(t.lastWarnTime=r,!0)}withoutTracking(t){const r=this.trackingDisabled;this.trackingDisabled=!0;try{return t()}finally{this.trackingDisabled=r}}getOrCreateState(t){if(!this.currentComponent)return new Ke(t);const r=this.componentData.get(this.currentComponent);if(!r)return new Ke(t);const n=`${this.currentComponent}:${r.stateIndex++}`;let o=this.stateStorage.get(n);return o||(o=new Ke(t),this.stateStorage.set(n,o)),o}trackDependency(t){if(this.trackingDisabled||!this.currentComponent)return;const r=this.componentData.get(this.currentComponent);r&&(r.dependencies.add(t),t.addDependent(this.currentComponent))}triggerUpdate(t){const r=t.getDependents();for(const n of r){const o=this.componentData.get(n);o&&be(o.renderFn,n)}}cleanup(t){const r=this.componentData.get(t);if(r){for(const o of r.dependencies)o.removeDependent(t);this.componentData.delete(t)}const n=t+":";for(const o of this.stateStorage.keys())o.startsWith(n)&&this.stateStorage.delete(o)}}const X=new Jt;class Ke{_value;dependents=new Set;constructor(t){this._value=this.makeReactive(t);try{const r=Symbol.for("@cer/ReactiveState");Object.defineProperty(this,r,{value:!0,enumerable:!1,configurable:!1})}catch{}}get value(){return X.trackDependency(this),this._value}set value(t){X.isRenderingComponent()&&X.shouldEmitRenderWarning()&&ie(`🚨 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),F.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:lt.createReactiveProxy(t,()=>F.triggerUpdate(this),r=>this.makeReactive(r))}}function Et(e){return F.getOrCreateState(e===void 0?null:e)}function te(e){if(!e||typeof e!="object")return!1;try{const t=Symbol.for("@cer/ReactiveState");if(e[t])return!0}catch{}try{return!!(e.constructor&&e.constructor.name==="ReactiveState")}catch{return!1}}function St(e){const t=new Fe(e());return{get value(){return F.trackDependency(t),e()}}}function At(e,t,r={}){let n=e();r.immediate&&t(n,n);const i=`watch-${Math.random().toString(36).substr(2,9)}`,s=()=>{F.setCurrentComponent(i,s);const o=e();F.clearCurrentComponent(),o!==n&&(t(o,n),n=o)};return F.setCurrentComponent(i,s),e(),F.clearCurrentComponent(),()=>{F.cleanup(i)}}const Ce=new Map,_e=new Map,Ee=new Map,Ge=500;function ie(e){if(Ce.has(e))return Ce.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return Ce.size<Ge&&Ce.set(e,t),t}function ut(e){if(_e.has(e))return _e.get(e);const t=e.replace(/-([a-z])/g,(r,n)=>n.toUpperCase());return _e.size<Ge&&_e.set(e,t),t}function me(e){if(typeof e=="string"){if(Ee.has(e))return Ee.get(e);const t=e.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r]);return t!==e&&Ee.size<Ge&&Ee.set(e,t),t}return e}function q(e,t){if(typeof t=="string"){const r=t.split(".").reduce((n,i)=>n?.[i],e);return te(r)?r.value:r}return t}function Oe(e,t,r){const n=String(t).split("."),i=n.pop();if(!i)return;const s=n.reduce((o,c)=>(o[c]==null&&(o[c]={}),o[c]),e);te(s[i])?s[i].value=r:s[i]=r}const ft=typeof process<"u"&&process.env?.NODE_ENV!=="production";function ae(e,...t){ft&&console.error(e,...t)}function Me(e,...t){ft&&console.warn(e,...t)}function Ot(e,t,r){if(r)for(const[n,i]of Object.entries(r)){let s,o={};if(Array.isArray(i)?(s=i[0],o=i[1]||{}):s=i,t.set(n,{callback:s,options:o,oldValue:q(e,n)}),o.immediate)try{const c=q(e,n);s(c,void 0,e)}catch(c){ae(`Error in immediate watcher for "${n}":`,c)}}}function jt(e,t,r,n){const i=(o,c)=>{if(o===c)return!0;if(typeof o!=typeof c||typeof o!="object"||o===null||c===null)return!1;if(Array.isArray(o)&&Array.isArray(c))return o.length!==c.length?!1:o.every((h,x)=>i(h,c[x]));const a=Object.keys(o),p=Object.keys(c);return a.length!==p.length?!1:a.every(h=>i(o[h],c[h]))},s=t.get(r);if(s&&!i(n,s.oldValue))try{s.callback(n,s.oldValue,e),s.oldValue=n}catch(o){ae(`Error in watcher for "${r}":`,o)}for(const[o,c]of t.entries())if(c.options.deep&&r.startsWith(o+"."))try{const a=q(e,o);i(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){ae(`Error in deep watcher for "${o}":`,a)}}function Ye(e,t){return t===Boolean?e==="true":t===Number?Number(e):e}function Tt(e,t,r){t&&Object.entries(t).forEach(([n,i])=>{const s=ie(n),o=e.getAttribute(s);if(i.type===Function&&typeof e[n]=="function")r[n]=e[n];else if(typeof e[n]<"u")try{const c=e[n];i.type===Boolean&&typeof c=="boolean"||i.type===Number&&typeof c=="number"||i.type===Function&&typeof c=="function"?r[n]=c:r[n]=Ye(String(c),i.type)}catch{r[n]=e[n]}else o!==null?r[n]=Ye(o,i.type):"default"in i&&i.default!==void 0&&(r[n]=i.default)})}function Rt(e,t,r){t.props&&Tt(e,t.props,r)}function Pt(e,t,r,n){e.onConnected&&!r&&(e.onConnected(t),n(!0))}function Lt(e,t,r,n,i,s,o,c){e.onDisconnected&&e.onDisconnected(t),r.forEach(a=>a()),n(),i(),s(!1),o(null),c(!1)}function Mt(e,t,r,n,i){e.onAttributeChanged&&e.onAttributeChanged(t,r,n,i)}class Wt{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,r){const n=this.cache.get(t);if(n){if(!n.isSecure){Me("Blocked cached dangerous expression:",t);return}return n.evaluator(r)}const i=this.createEvaluator(t);if(this.cache.size>=this.maxCacheSize){const s=this.cache.keys().next().value;s&&this.cache.delete(s)}if(this.cache.set(t,i),!i.isSecure){Me("Blocked dangerous expression:",t);return}return i.evaluator(r)}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(r){return Me("Failed to create evaluator for expression:",t,r),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(t){return this.dangerousPatterns.some(r=>r.test(t))}static createSafeEvaluator(t){if(t.trim().startsWith("{")&&t.trim().endsWith("}"))return this.createObjectEvaluator(t);if(/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())){const r=t.trim().slice(4);return n=>q(n,r)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):r=>q(r,t)}static createObjectEvaluator(t){const r=t.trim().slice(1,-1),n=this.parseObjectProperties(r);return i=>{const s={};for(const{key:o,value:c}of n)try{if(c.startsWith("ctx.")){const a=c.slice(4);s[o]=q(i,a)}else s[o]=this.evaluateSimpleValue(c,i)}catch{s[o]=void 0}return s}}static parseObjectProperties(t){const r=[],n=t.split(",");for(const i of n){const s=i.indexOf(":");if(s===-1)continue;const o=i.slice(0,s).trim(),c=i.slice(s+1).trim(),a=o.replace(/^['"]|['"]$/g,"");r.push({key:a,value:c})}return r}static createSimpleEvaluator(t){return r=>{try{let n=t;const i=[];n=n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,x=>`<<#${i.push(x)-1}#>>`);const s=n.match(/ctx\.[\w.]+/g)||[];for(const x of s){const m=x.slice(4),d=q(r,m);if(d===void 0)return;const u=i.push(JSON.stringify(d))-1;n=n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`)}const o=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,c=n.match(o)||[];for(const x of c){if(x.startsWith("ctx."))continue;const m=q(r,x);if(m===void 0)return;const d=i.push(JSON.stringify(m))-1;n=n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`)}const a=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let p;const h=new Set;for(;(p=a.exec(n))!==null;){const x=p[1];if(["true","false","null","undefined"].includes(x)||/^[0-9]+$/.test(x)||x==="ctx"||h.has(x))continue;h.add(x);const m=q(r,x);if(m===void 0)return;const d=JSON.stringify(m),u=i.push(d)-1;x.includes(".")?n=n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`):n=n.replace(new RegExp("\\b"+x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${u}#>>`)}n=n.replace(/<<#(\d+)#>>/g,(x,m)=>i[Number(m)]);try{return this.evaluateBasicExpression(n)}catch{return}}catch{return}}}static evaluateBasicExpression(t){const r=this.tokenize(t);let n=0;function i(){return r[n]}function s(l){const f=r[n++];if(l&&!f)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&f&&f.type!==l&&f.value!==l)throw new Error(`Unexpected token ${f.type}/${f.value}, expected ${l}`);return f}function o(){return c()}function c(){let l=a();if(i()&&i().value==="?"){s("?");const f=o();s(":");const b=o();return l?f:b}return l}function a(){let l=p();for(;i()&&i().value==="||";){s("OP");const f=p();l=l||f}return l}function p(){let l=h();for(;i()&&i().value==="&&";){s("OP");const f=h();l=l&&f}return l}function h(){let l=x();for(;i()&&["==","!=","===","!=="].includes(i().value);){const f=s("OP").value,b=x();switch(f){case"==":l=l==b;break;case"!=":l=l!=b;break;case"===":l=l===b;break;case"!==":l=l!==b;break}}return l}function x(){let l=m();for(;i()&&[">","<",">=","<="].includes(i().value);){const f=s("OP").value,b=m();switch(f){case">":l=l>b;break;case"<":l=l<b;break;case">=":l=l>=b;break;case"<=":l=l<=b;break}}return l}function m(){let l=d();for(;i()&&(i().value==="+"||i().value==="-");){const f=s("OP").value,b=d();l=f==="+"?l+b:l-b}return l}function d(){let l=u();for(;i()&&(i().value==="*"||i().value==="/"||i().value==="%");){const f=s("OP").value,b=u();switch(f){case"*":l=l*b;break;case"/":l=l/b;break;case"%":l=l%b;break}}return l}function u(){return i()&&i().value==="!"?(s("OP"),!u()):i()&&i().value==="-"?(s("OP"),-u()):y()}function y(){const l=i();if(l){if(l.type==="NUMBER")return s("NUMBER"),Number(l.value);if(l.type==="STRING")return s("STRING"),l.value.slice(1,-1);if(l.type==="IDENT")return s("IDENT"),l.value==="true"?!0:l.value==="false"?!1:l.value==="null"?null:void 0;if(l.value==="["){s("PUNC");const f=[];for(;i()&&i().value!=="]";)f.push(o()),i()&&i().value===","&&s("PUNC");return s("PUNC"),f}if(l.value==="("){s("PUNC");const f=o();return s("PUNC"),f}throw new Error("Unexpected token in expression")}}return o()}static tokenize(t){const r=[],n=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let i;for(;(i=n.exec(t))!==null;){const s=i[1];s&&(/^\d/.test(s)?r.push({type:"NUMBER",value:s}):/^"/.test(s)||/^'/.test(s)?r.push({type:"STRING",value:s}):/^[a-zA-Z_]/.test(s)?r.push({type:"IDENT",value:s}):/^[()?:,\[\]]$/.test(s)?r.push({type:"PUNC",value:s}):r.push({type:"OP",value:s}))}return r}static evaluateSimpleValue(t,r){if(t==="true")return!0;if(t==="false")return!1;if(!isNaN(Number(t)))return Number(t);if(t.startsWith("ctx.")){const n=t.slice(4);return q(r,n)}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,r,n,i){t.addEventListener(r,n,i);const o={event:r,handler:n,options:i,cleanup:()=>t.removeEventListener(r,n,i),addedAt:Date.now()};this.cleanupFunctions.has(t)||this.cleanupFunctions.set(t,[]);const c=this.cleanupFunctions.get(t);c.push(o),this.cleanupFunctions.get(t).__metaList=c}static removeListener(t,r,n,i){t.removeEventListener(r,n,i);const s=this.cleanupFunctions.get(t);if(s){const o=s.__metaList||null;if(o){const c=o.findIndex(a=>a.event===r&&a.handler===n&&JSON.stringify(a.options)===JSON.stringify(i));if(c>=0){try{o[c].cleanup()}catch{}o.splice(c,1)}o.length===0&&this.cleanupFunctions.delete(t)}else{const c=s.findIndex(()=>!0);c>=0&&(s.splice(c,1),s.length===0&&this.cleanupFunctions.delete(t))}}}static cleanup(t){const r=this.cleanupFunctions.get(t);r&&((r.__metaList||r).forEach(i=>{try{typeof i=="function"?i():i&&typeof i.cleanup=="function"&&i.cleanup()}catch(s){console.error("Error during event cleanup:",s)}}),this.cleanupFunctions.delete(t))}static cleanupAll(){try{this.cleanupFunctions=new WeakMap}catch(t){console.error("Error during global cleanup:",t)}}static hasListeners(t){const r=this.cleanupFunctions.get(t),n=r?r.__metaList||r:void 0;return!!(n&&n.length>0)}static getListenerCount(t){const r=this.cleanupFunctions.get(t),n=r?r.__metaList||r:void 0;return n?n.length:0}}function fe(e,t){if(t&&e instanceof HTMLElement){ce.cleanup(e);for(const r in t)t[r]===e&&delete t[r];for(const r of Array.from(e.childNodes))fe(r,t)}}function we(e,t,r){if(typeof e=="string")return;const n=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),i=e.props?.ref??(e.props?.props&&e.props.props.ref);n?n.value=t:i&&r&&(r[i]=t)}function Dt(e,t,r,n,i,s,o,c){if(!s)return;const a=t.includes("lazy"),p=t.includes("trim"),h=t.includes("number"),x=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",m=()=>{if(x){const k=e.value;return c&&typeof k=="object"&&k!==null?k[c]:k}return q(s._state||s,e)},d=m();let u="text";o instanceof HTMLInputElement?u=n?.type||o.type||"text":o instanceof HTMLSelectElement?u="select":o instanceof HTMLTextAreaElement&&(u="textarea");const y=o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement,l=y?u==="checkbox"||u==="radio"?"checked":"value":c??"modelValue";if(u==="checkbox")if(Array.isArray(d))r[l]=d.includes(String(o?.getAttribute("value")??n?.value??""));else{const k=o?.getAttribute("true-value")??!0;r[l]=d===k}else if(u==="radio")r[l]=d===(n?.value??"");else if(u==="select")if(o&&o.hasAttribute("multiple")&&o instanceof HTMLSelectElement){const k=Array.isArray(d)?d.map(String):[];setTimeout(()=>{Array.from(o.options).forEach(C=>{C.selected=k.includes(C.value)})},0),r[l]=Array.isArray(d)?d:[]}else r[l]=d;else{r[l]=d;try{const k=ie(l);n&&(n[k]=d)}catch{}}const f=a||u==="checkbox"||u==="radio"||u==="select"?"change":"input",b=k=>{if(k.isComposing||i._isComposing)return;const C=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(k.isTrusted===!1&&!C)return;const g=k.target;if(!g||g._modelUpdating)return;let $=g.value;if(u==="checkbox"){const A=m();if(Array.isArray(A)){const D=g.getAttribute("value")??"",S=Array.from(A);if(g.checked)S.includes(D)||S.push(D);else{const j=S.indexOf(D);j>-1&&S.splice(j,1)}$=S}else{const D=g.getAttribute("true-value")??!0,S=g.getAttribute("false-value")??!1;$=g.checked?D:S}}else if(u==="radio")$=g.getAttribute("value")??g.value;else if(u==="select"&&g.multiple)$=Array.from(g.selectedOptions).map(A=>A.value);else if(p&&typeof $=="string"&&($=$.trim()),h){const A=Number($);isNaN(A)||($=A)}const O=s._state||s,v=m();if(Array.isArray($)&&Array.isArray(v)?JSON.stringify([...$].sort())!==JSON.stringify([...v].sort()):$!==v){g._modelUpdating=!0;try{if(x)if(c&&typeof e.value=="object"&&e.value!==null){const A={...e.value};A[c]=$,e.value=A}else e.value=$;else Oe(O,e,$);if(s._requestRender&&s._requestRender(),s._triggerWatchers){const A=x?"reactiveState":e;s._triggerWatchers(A,$)}if(g){const A=`update:${ie(l)}`,D=new CustomEvent(A,{detail:$,bubbles:!0,composed:!0});g.dispatchEvent(D)}}finally{setTimeout(()=>g._modelUpdating=!1,0)}}};if(y){if(i[f]){const k=i[f];o&&ce.removeListener(o,f,k)}i[f]=b}else{const k=`update:${ie(l)}`;if(i[k]){const C=i[k];o&&ce.removeListener(o,k,C)}i[k]=C=>{const g=s._state||s,$=C.detail!==void 0?C.detail:C.target?.value,O=q(g,e);if(Array.isArray($)&&Array.isArray(O)?JSON.stringify([...$].sort())!==JSON.stringify([...O].sort()):$!==O){Oe(g,e,$),s._requestRender&&s._requestRender(),s._triggerWatchers&&s._triggerWatchers(e,$);const _=C.target;if(_){_[l]=$;try{const A=ie(l);typeof $=="boolean"?$?_.setAttribute(A,"true"):_.setAttribute(A,"false"):_.setAttribute(A,String($))}catch{}queueMicrotask(()=>{typeof _._applyProps=="function"&&_._applyProps(_._cfg),typeof _._requestRender=="function"&&_._requestRender()})}}}}(u==="text"||u==="textarea")&&(i.compositionstart=(()=>i._isComposing=!0),i.compositionend=k=>{i._isComposing=!1;const C=k.target;C&&setTimeout(()=>{const g=C.value,$=s._state||s,O=q($,e);let v=g;if(p&&(v=v.trim()),h){const A=Number(v);isNaN(A)||(v=A)}if(Array.isArray(v)&&Array.isArray(O)?JSON.stringify([...v].sort())!==JSON.stringify([...O].sort()):v!==O){C._modelUpdating=!0;try{Oe($,e,v),s._requestRender&&s._requestRender(),s._triggerWatchers&&s._triggerWatchers(e,v)}finally{setTimeout(()=>C._modelUpdating=!1,0)}}},0)})}function dt(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function It(e,t,r,n){if(typeof e=="object"&&e!==null)for(const[i,s]of Object.entries(e))i.startsWith("data-")||i.startsWith("aria-")||i==="class"?r[i]=s:t[i]=s;else if(typeof e=="string"){if(!n)return;try{const i=ve(e,n);if(typeof i=="object"&&i!==null){for(const[s,o]of Object.entries(i))s.startsWith("data-")||s.startsWith("aria-")||s==="class"?r[s]=o:t[s]=o;return}else{r[e]=i;return}}catch{const i=q(n,e);r[e]=i}}}function Nt(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=ve(e,r)}else n=e;const i=t.style||"";let s=i;if(n){if(i){const o=i.split(";").map(a=>a.trim()).filter(Boolean),c=o.findIndex(a=>a.startsWith("display:"));c>=0&&o[c]==="display: none"&&(o.splice(c,1),s=o.length>0?o.join("; ")+";":"")}}else if(i){const o=i.split(";").filter(Boolean),c=o.findIndex(a=>a.trim().startsWith("display:"));c>=0?o[c]="display: none":o.push("display: none"),s=o.join("; ")}else s="display: none";s!==i&&(s?t.style=s:delete t.style)}function ve(e,t){return Wt.evaluate(e,t)}function Ht(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=ve(e,r)}else n=e;let i=[];typeof n=="string"?i=[n]:Array.isArray(n)?i=n.filter(Boolean):typeof n=="object"&&n!==null&&(i=Object.entries(n).filter(([,c])=>!!c).flatMap(([c])=>c.split(/\s+/).filter(Boolean)));const s=t.class||"",o=s?`${s} ${i.join(" ")}`.trim():i.join(" ");o&&(t.class=o)}function Bt(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=ve(e,r)}else n=e;let i="";if(typeof n=="string")i=n;else if(n&&typeof n=="object"){const o=[];for(const[c,a]of Object.entries(n))if(a!=null&&a!==""){const p=c.replace(/[A-Z]/g,m=>`-${m.toLowerCase()}`),h=["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 x=String(a);typeof a=="number"&&h.includes(p)&&(x=`${a}px`),o.push(`${p}: ${x}`)}i=o.join("; ")+(o.length>0?";":"")}const s=t.style||"";t.style=s+(s&&!s.endsWith(";")?"; ":"")+i}function zt(e,t,r){let n=e;typeof e=="string"&&r&&(n=ve(e,r)),te(n)?t.reactiveRef=n:t.ref=n}function ht(e,t,r,n){const i={},s={...n||{}},o={};for(const[c,a]of Object.entries(e)){const{value:p,modifiers:h,arg:x}=a;if(c==="model"||c.startsWith("model:")){const m=c.split(":"),d=m.length>1?m[1]:x;Dt(p,h,i,s,o,t,r,d);continue}switch(c){case"bind":It(p,i,s,t);break;case"show":Nt(p,s,t);break;case"class":Ht(p,s,t);break;case"style":Bt(p,s,t);break;case"ref":zt(p,i,t);break}}return{props:i,attrs:s,listeners:o}}function Ke(e,t){if(Array.isArray(e)){const s=new Set;return e.map(o=>{if(!o||typeof o!="object")return o;let c=o.props?.key??o.key;if(!c){const x=o.tag||"node",d=[o.props?.attrs?.id,o.props?.attrs?.name,o.props?.attrs?.["data-key"],o.props?.props?.id,o.props?.props?.name,o.props?.props?.dataKey,o.props?.props?.["data-key"]].find(u=>u!=null)??"";c=d?`${t}:${x}:${d}`:`${t}:${x}`}let a=c,p=1;for(;s.has(a);)a=`${c}#${p++}`;s.add(a);let h=o.children;return Array.isArray(h)&&(h=Ke(h,a)),{...o,key:a,children:h}})}const r=e;let n=r.props?.key??r.key??t,i=r.children;return Array.isArray(i)&&(i=Ke(i,n)),{...r,key:n,children:i}}function et(e,t,r,n){const i=r.directives??{},s=ht(i,n,e,r.attrs),o={...t.props,...r.props,...s.props},c={...t.attrs,...r.attrs,...s.attrs},a=t.props??{},p=o,h=r?.isCustomElement??t?.isCustomElement??!1;let x=!1;for(const u in{...a,...p}){const y=a[u],w=p[u];if(y!==w)if(x=!0,u==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement))e.value!==w&&(e.value=w??"");else if(u==="checked"&&e instanceof HTMLInputElement)e.checked=!!w;else if(u.startsWith("on")&&typeof w=="function"){const l=dt(u);typeof y=="function"&&ce.removeListener(e,l,y),ce.addListener(e,l,w)}else if(w==null)e.removeAttribute(u);else if((r?.isCustomElement??t?.isCustomElement??!1)||u in e)try{e[u]=w}catch{}else w===!1&&e.removeAttribute(u)}for(const[u,y]of Object.entries(s.listeners||{}))ce.addListener(e,u,y);const m=t.attrs??{},d=c;for(const u in{...m,...d}){const y=m[u],w=d[u];let l=y,f=w;if(te(y)&&(l=y.value),te(w)&&(f=w.value),l!==f)if(x=!0,f==null||f===!1){if(e.removeAttribute(u),u==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)try{e.value=""}catch{}else if(e instanceof HTMLSelectElement)try{e.value=""}catch{}else if(e instanceof HTMLProgressElement)try{e.value=0}catch{}}if(u==="checked"&&e instanceof HTMLInputElement)try{e.checked=!1}catch{}if(u==="disabled")try{e.disabled=!1}catch{}}else{if(u==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){try{e.value=f??""}catch{e.setAttribute(u,String(f))}continue}else if(e instanceof HTMLSelectElement){try{e.value=f??""}catch{}continue}else if(e instanceof HTMLProgressElement){try{e.value=Number(f)}catch{}continue}}if(u==="checked"&&e instanceof HTMLInputElement){try{e.checked=!!f}catch{}continue}if(u==="style"){e.setAttribute(u,String(f));continue}const b=e.namespaceURI==="http://www.w3.org/2000/svg";if(h&&!b&&u.includes("-")){const k=ut(u);try{e[k]=f}catch{e.setAttribute(u,String(f))}}else if(!b&&u in e)try{e[u]=f}catch{e.setAttribute(u,String(f))}else e.setAttribute(u,String(f))}}if(h&&x)try{if(typeof e._applyProps=="function")try{e._applyProps(e._cfg)}catch{}typeof e.requestRender=="function"?e.requestRender():typeof e._render=="function"&&e._render(e._cfg)}catch{}}function Z(e,t,r){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const m=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&(m.key=e.key),m}if(e.tag==="#anchor"){const m=e,d=Array.isArray(m.children)?m.children:[],u=document.createTextNode(""),y=document.createTextNode("");m.key!=null&&(u.key=`${m.key}:start`,y.key=`${m.key}:end`),m._startNode=u,m._endNode=y;const w=document.createDocumentFragment();w.appendChild(u);for(const l of d){const f=Z(l,t);w.appendChild(f)}return w.appendChild(y),w}const n=document.createElement(e.tag);e.key!=null&&(n.key=e.key);const{props:i={},attrs:s={},directives:o={}}=e.props??{},c=ht(o,t,n,s),a={...i,...c.props},p={...s,...c.attrs},h=n.namespaceURI==="http://www.w3.org/2000/svg";for(const m in p){const d=p[m];if(!(typeof m!="string"||/\[object Object\]/.test(m))){if(typeof d=="boolean")d&&n.setAttribute(m,"");else if(d!=null)if(!h&&m==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement||n instanceof HTMLProgressElement))try{n instanceof HTMLProgressElement?n.value=Number(d):n.value=d??""}catch{n.setAttribute(m,String(d))}else if(!h&&m==="checked"&&n instanceof HTMLInputElement)try{n.checked=!!d}catch{n.setAttribute(m,String(d))}else if(!h&&m in n)try{n[m]=d}catch{n.setAttribute(m,String(d))}else if((e.props?.isCustomElement??!1)&&!h&&m.includes("-")){const y=ut(m);try{n[y]=d}catch{n.setAttribute(m,String(d))}}else n.setAttribute(m,String(d))}}for(const m in a){const d=a[m];if(!(typeof m!="string"||/\[object Object\]/.test(m)))if(m==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)){const u=typeof d=="object"&&d!==null&&typeof d.value<"u"?d.value:d;n.value=u??""}else if(m==="checked"&&n instanceof HTMLInputElement){const u=typeof d=="object"&&d!==null&&typeof d.value<"u"?d.value:d;n.checked=!!u}else if(m.startsWith("on")&&typeof d=="function")ce.addListener(n,dt(m),d);else{if(m.startsWith("on")&&d===void 0)continue;if(d==null||d===!1)n.removeAttribute(m);else if((e.props?.isCustomElement??!1)||m in n)try{const y=typeof d=="object"&&d!==null&&typeof d.value<"u"?d.value:d;n[m]=y}catch{}}}for(const[m,d]of Object.entries(c.listeners||{}))ce.addListener(n,m,d);const x={...e,props:{...e.props,...c.props}};we(x,n,r);try{if(typeof n._applyProps=="function")try{n._applyProps(n._cfg)}catch{}typeof n.requestRender=="function"?n.requestRender():typeof n._render=="function"&&n._render(n._cfg)}catch{}if(Array.isArray(e.children))for(const m of e.children)n.appendChild(Z(m,t,r));else typeof e.children=="string"&&(n.textContent=e.children);try{if(n instanceof HTMLSelectElement&&p&&p.hasOwnProperty("value"))try{n.value=p.value??""}catch{}}catch{}return n}function Ut(e,t,r,n,i){if(typeof r=="string"){e.textContent!==r&&(e.textContent=r);return}if(!Array.isArray(r))return;const s=Array.from(e.childNodes),o=Array.isArray(t)?t:[],c=new Map;for(const d of o)d&&d.key!=null&&c.set(d.key,d);const a=new Map;for(const d of s){const u=d.key;u!=null&&a.set(u,d)}const p=new Set;let h=e.firstChild;function x(d,u){let y=d;for(;y&&(p.add(y),y!==u);)y=y.nextSibling}function m(d,u,y,w){const l=[];let f=d.nextSibling;for(;f&&f!==u;)l.push(f),f=f.nextSibling;const b=Array.isArray(y)?y:[];if(w.some(C=>C&&C.key!=null)||b.some(C=>C&&C.key!=null)){const C=new Map,g=new Map;for(const v of b)v&&v.key!=null&&C.set(v.key,v);for(const v of l){const _=v.key;_!=null&&g.set(_,v)}const $=new Set;let O=d.nextSibling;for(const v of w){let _;if(v.key!=null&&g.has(v.key)){const A=C.get(v.key);_=je(g.get(v.key),A,v,n),$.add(_),_!==O&&e.contains(_)&&e.insertBefore(_,O)}else _=Z(v,n),e.insertBefore(_,O),$.add(_);O=_.nextSibling}for(const v of l)!$.has(v)&&e.contains(v)&&e.removeChild(v)}else{const C=Math.min(b.length,w.length);for(let g=0;g<C;g++){const $=b[g],O=w[g],v=je(l[g],$,O,n);v!==l[g]&&(e.insertBefore(v,l[g]),e.removeChild(l[g]))}for(let g=C;g<w.length;g++)e.insertBefore(Z(w[g],n),u);for(let g=C;g<l.length;g++)e.removeChild(l[g])}}for(const d of r){let u;if(d.tag==="#anchor"){const y=d.key,w=`${y}:start`,l=`${y}:end`;let f=a.get(w),b=a.get(l);const k=Array.isArray(d.children)?d.children:[];if(f||(f=document.createTextNode(""),f.key=w),b||(b=document.createTextNode(""),b.key=l),d._startNode=f,d._endNode=b,!e.contains(f)||!e.contains(b)){e.insertBefore(f,h);for(const C of k)e.insertBefore(Z(C,n),h);e.insertBefore(b,h)}else m(f,b,c.get(y)?.children,k);x(f,b),h=b.nextSibling;continue}if(d.key!=null&&a.has(d.key)){const y=c.get(d.key);u=je(a.get(d.key),y,d,n,i),p.add(u),u!==h&&e.contains(u)&&(h&&!e.contains(h)&&(h=null),e.insertBefore(u,h))}else u=Z(d,n,i),h&&!e.contains(h)&&(h=null),e.insertBefore(u,h),p.add(u);h=u.nextSibling}for(const d of s)!p.has(d)&&e.contains(d)&&(fe(d,i),e.removeChild(d))}function je(e,t,r,n,i){if(t&&typeof t!="string"&&t.props?.ref&&i&&fe(e,i),t===r)return e;if(typeof r=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==r&&(e.textContent=r),e;{const o=document.createTextNode(r);return e.parentNode?.replaceChild(o,e),o}}if(r&&typeof r!="string"&&r.tag==="#anchor"){const o=r,c=Array.isArray(o.children)?o.children:[],a=o._startNode??document.createTextNode(""),p=o._endNode??document.createTextNode("");o.key!=null&&(a.key=`${o.key}:start`,p.key=`${o.key}:end`),o._startNode=a,o._endNode=p;const h=document.createDocumentFragment();h.appendChild(a);for(const x of c){const m=Z(x,n);h.appendChild(m)}return h.appendChild(p),e.parentNode?.replaceChild(h,e),a}if(!r){fe(e,i);const o=document.createComment("removed");return e.parentNode?.replaceChild(o,e),o}if(!t||typeof t=="string"){fe(e,i);const o=Z(r,n,i);return we(r,o,i),e.parentNode?.replaceChild(o,e),o}if(r.tag==="#anchor"){const o=Array.isArray(r.children)?r.children:[],c=r._startNode??document.createTextNode(""),a=r._endNode??document.createTextNode("");r.key!=null&&(c.key=`${r.key}:start`,a.key=`${r.key}:end`),r._startNode=c,r._endNode=a;const p=document.createDocumentFragment();p.appendChild(c);for(const h of o)p.appendChild(Z(h,n));return p.appendChild(a),e.parentNode?.replaceChild(p,e),c}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&t.key===r.key){const o=e;return et(o,t.props||{},r.props||{},n),Ut(o,t.children,r.children,n,i),we(r,o,i),o}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&(t.tag&&String(t.tag).includes("-")||r.props&&r.props.isCustomElement||t.props&&t.props.isCustomElement))try{const c=e;return et(c,t.props||{},r.props||{},n),we(r,c,i),c}catch{}fe(e,i);const s=Z(r,n,i);return we(r,s,i),e.parentNode?.replaceChild(s,e),s}function qt(e,t,r,n){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=Ke(i,String(i.key??"root"));const s=e._prevVNode??null,o=e._prevDom??e.firstChild??null;let c;s&&o?typeof s!="string"&&typeof i!="string"&&s.tag===i.tag&&s.key===i.key?c=je(o,s,i,r,n):(c=Z(i,r,n),e.replaceChild(c,o)):(c=Z(i,r,n),e.firstChild?e.replaceChild(c,e.firstChild):e.appendChild(c));const a=[];for(let p=0;p<e.childNodes.length;p++){const h=e.childNodes[p];h!==c&&h.nodeName!=="STYLE"&&(fe(h,n),a.push(h))}a.forEach(p=>e.removeChild(p)),e._prevVNode=i,e._prevDom=c}function Te(e){if(typeof e=="string")return me(e);if(e.tag==="#text")return typeof e.children=="string"?me(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(Te).join("");let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([i,s])=>` ${i}="${me(String(s))}"`).join(""));let r="";e.props&&(r=Object.entries(e.props).filter(([i])=>i!=="attrs"&&i!=="directives"&&i!=="ref"&&i!=="key").map(([i,s])=>` ${i}="${me(String(s))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(Te).join(""):typeof e.children=="string"?me(e.children):e.children?Te(e.children):"";return`<${e.tag}${t}${r}>${n}</${e.tag}>`}function pt(e,...t){let r="";for(let n=0;n<e.length;n++)r+=e[n],n<t.length&&(r+=t[n]);return r}function gt(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let Se=null;function tt(){return Se||(Se=new CSSStyleSheet,Se.replaceSync(gt(Kt))),Se}function Ft(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const Kt=pt`
4
+ • Ensure computed properties don't modify state`),this._value=this.makeReactive(t),X.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:Rt.createReactiveProxy(t,()=>X.triggerUpdate(this),r=>this.makeReactive(r))}}function Xt(e){return X.getOrCreateState(e===void 0?null:e)}function M(e){if(!e||typeof e!="object")return!1;try{const t=Symbol.for("@cer/ReactiveState");return!!e[t]}catch{return!1}}function Yt(e){const t=new Ke(e());return{get value(){return X.trackDependency(t),e()}}}function Qt(e,t,r={}){let n=e();r.immediate&&t(n,n);const o=`watch-${Math.random().toString(36).substr(2,9)}`,i=()=>{X.setCurrentComponent(o,i);const s=e();X.clearCurrentComponent(),s!==n&&(t(s,n),n=s)};return X.setCurrentComponent(o,i),e(),X.clearCurrentComponent(),()=>{X.cleanup(o)}}const P=e=>{try{e()}catch{}},He=new Map,Be=new Map,Ie=new Map,mt=500;function te(e){if(He.has(e))return He.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return He.size<mt&&He.set(e,t),t}function yt(e){if(Be.has(e))return Be.get(e);const t=e.replace(/-([a-z])/g,(r,n)=>n.toUpperCase());return Be.size<mt&&Be.set(e,t),t}function Se(e){if(typeof e=="string"){if(Ie.has(e))return Ie.get(e);const t=e.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r]);return t!==e&&Ie.size<mt&&Ie.set(e,t),t}return e}function V(e,t){if(typeof t=="string"){const r=t.split(".").reduce((n,o)=>n?.[o],e);return M(r)?r.value:r}return t}function Ze(e,t,r){const n=String(t).split("."),o=n.pop();if(!o)return;const i=n.reduce((s,c)=>(s[c]==null&&(s[c]={}),s[c]),e);M(i[o])?i[o].value=r:i[o]=r}function en(e,t,r){if(r)for(const[n,o]of Object.entries(r)){let i,s={};if(Array.isArray(o)?(i=o[0],s=o[1]||{}):i=o,t.set(n,{callback:i,options:s,oldValue:V(e,n)}),s.immediate)try{const c=V(e,n);i(c,void 0,e)}catch(c){I(`Error in immediate watcher for "${n}":`,c)}}}function tn(e,t,r,n){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((b,m)=>o(b,c[m]));const a=Object.keys(s),f=Object.keys(c);return a.length!==f.length?!1:a.every(b=>o(s[b],c[b]))},i=t.get(r);if(i&&!o(n,i.oldValue))try{i.callback(n,i.oldValue,e),i.oldValue=n}catch(s){I(`Error in watcher for "${r}":`,s)}for(const[s,c]of t.entries())if(c.options.deep&&r.startsWith(s+"."))try{const a=V(e,s);o(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){I(`Error in deep watcher for "${s}":`,a)}}function vt(e,t){return t===Boolean?e===""||e==="true":t===Number?Number(e):e}function nn(e,t,r){if(t)for(const n in t){const o=t[n],i=te(n),s=e.getAttribute(i);if(o.type===Function&&typeof e[n]=="function")r[n]=e[n];else if(s!==null)r[n]=vt(s,o.type);else if(typeof e[n]<"u")try{const c=e[n];o.type===Boolean&&typeof c=="boolean"||o.type===Number&&typeof c=="number"||o.type===Function&&typeof c=="function"?r[n]=c:r[n]=vt(String(c),o.type)}catch{r[n]=e[n]}else"default"in o&&o.default!==void 0&&(r[n]=o.default)}}function rn(e,t,r){if(!t.props){try{const n=r&&r._hookCallbacks&&r._hookCallbacks.props||{},o=Array.from(new Set([...Object.keys(e),...Object.keys(n)]));for(const i of o){if(typeof i!="string"||i.startsWith("_"))continue;const s=Object.getOwnPropertyDescriptor(r,i);if(!(!Object.prototype.hasOwnProperty.call(n,i)&&s&&(s.get||s.set||!s.configurable)))try{Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get(){try{const a=te(i),f=e.getAttribute(a);if(f!==null)return f;const b=e[i];let m;return M(b)||b&&typeof b=="object"&&"value"in b&&!(b instanceof Node)?m=b.value:m=b,m}catch{return e[i]}}})}catch{}}}catch{}return}nn(e,t.props,r)}function on(e,t,r,n){e.onConnected&&!r&&(e.onConnected(t),n(!0))}function sn(e,t,r,n,o,i,s,c){e.onDisconnected&&e.onDisconnected(t),r.forEach(a=>a()),n(),o(),i(!1),s(null),c(!1)}function an(e,t,r,n,o){e.onAttributeChanged&&e.onAttributeChanged(t,r,n,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,r){const n=this.cache.get(t);if(n){if(!n.isSecure){ie("Blocked cached dangerous expression:",t);return}return n.evaluator(r)}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){ie("Blocked dangerous expression:",t);return}return o.evaluator(r)}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(r){return ie("Failed to create evaluator for expression:",t,r),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(t){return this.dangerousPatterns.some(r=>r.test(t))}static createSafeEvaluator(t){const r=t.trim();if(r.startsWith("{")&&r.endsWith("}"))return this.createObjectEvaluator(t);if(/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())){const n=t.trim().slice(4);return o=>V(o,n)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):n=>V(n,t)}static createObjectEvaluator(t){const r=t.trim().slice(1,-1),n=this.parseObjectProperties(r);return o=>{const i={};for(const{key:s,value:c}of n)try{if(c.startsWith("ctx.")){const a=c.slice(4);i[s]=V(o,a)}else i[s]=this.evaluateSimpleValue(c,o)}catch{i[s]=void 0}return i}}static parseObjectProperties(t){const r=[],n=t.split(",");for(const o of n){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,"");r.push({key:a,value:c})}return r}static createSimpleEvaluator(t){return r=>{try{let n=t;const o=[];n=n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,m=>`<<#${o.push(m)-1}#>>`);const i=n.match(/ctx\.[\w.]+/g)||[];for(const m of i){const d=m.slice(4),k=V(r,d);if(k===void 0)return;const u=o.push(JSON.stringify(k))-1;n=n.replace(new RegExp(m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`)}const s=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,c=n.match(s)||[];for(const m of c){if(m.startsWith("ctx."))continue;const d=V(r,m);if(d===void 0)return;const k=o.push(JSON.stringify(d))-1;n=n.replace(new RegExp(m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${k}#>>`)}const a=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let f;const b=new Set;for(;(f=a.exec(n))!==null;){const m=f[1];if(["true","false","null","undefined"].includes(m)||/^[0-9]+$/.test(m)||m==="ctx"||b.has(m))continue;b.add(m);const d=V(r,m);if(d===void 0)return;const k=JSON.stringify(d),u=o.push(k)-1;m.includes(".")?n=n.replace(new RegExp(m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`):n=n.replace(new RegExp("\\b"+m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${u}#>>`)}n=n.replace(/<<#(\d+)#>>/g,(m,d)=>o[Number(d)]);try{return this.evaluateBasicExpression(n)}catch{return}}catch{return}}}static evaluateBasicExpression(t){const r=this.tokenize(t);let n=0;function o(){return r[n]}function i(l){const y=r[n++];if(l&&!y)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&y&&y.type!==l&&y.value!==l)throw new Error(`Unexpected token ${y.type}/${y.value}, expected ${l}`);return y}function s(){return c()}function c(){let l=a();if(o()&&o().value==="?"){i("?");const y=s();i(":");const w=s();return l?y:w}return l}function a(){let l=f();for(;o()&&o().value==="||";){i("OP");const y=f();l=l||y}return l}function f(){let l=b();for(;o()&&o().value==="&&";){i("OP");const y=b();l=l&&y}return l}function b(){let l=m();for(;o()&&["==","!=","===","!=="].includes(o().value);){const y=i("OP").value,w=m();switch(y){case"==":l=l==w;break;case"!=":l=l!=w;break;case"===":l=l===w;break;case"!==":l=l!==w;break}}return l}function m(){let l=d();for(;o()&&[">","<",">=","<="].includes(o().value);){const y=i("OP").value,w=d();switch(y){case">":l=l>w;break;case"<":l=l<w;break;case">=":l=l>=w;break;case"<=":l=l<=w;break}}return l}function d(){let l=k();for(;o()&&(o().value==="+"||o().value==="-");){const y=i("OP").value,w=k();l=y==="+"?l+w:l-w}return l}function k(){let l=u();for(;o()&&(o().value==="*"||o().value==="/"||o().value==="%");){const y=i("OP").value,w=u();switch(y){case"*":l=l*w;break;case"/":l=l/w;break;case"%":l=l%w;break}}return l}function u(){return o()&&o().value==="!"?(i("OP"),!u()):o()&&o().value==="-"?(i("OP"),-u()):p()}function p(){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 y=[];for(;o()&&o().value!=="]";)y.push(s()),o()&&o().value===","&&i("PUNC");return i("PUNC"),y}if(l.value==="("){i("PUNC");const y=s();return i("PUNC"),y}throw new Error("Unexpected token in expression")}}return s()}static tokenize(t){const r=[],n=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let o;for(;(o=n.exec(t))!==null;){const i=o[1];i&&(/^\d/.test(i)?r.push({type:"NUMBER",value:i}):/^"/.test(i)||/^'/.test(i)?r.push({type:"STRING",value:i}):/^[a-zA-Z_]/.test(i)?r.push({type:"IDENT",value:i}):/^[()?:,\[\]]$/.test(i)?r.push({type:"PUNC",value:i}):r.push({type:"OP",value:i}))}return r}static evaluateSimpleValue(t,r){if(t==="true")return!0;if(t==="false")return!1;if(!isNaN(Number(t)))return Number(t);if(t.startsWith("ctx.")){const n=t.slice(4);return V(r,n)}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 oe{static cleanupFunctions=new WeakMap;static addListener(t,r,n,o){t.addEventListener(r,n,o);const s={event:r,handler:n,wrapper:n,options:o,cleanup:()=>t.removeEventListener(r,n,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,r,n,o){t.removeEventListener(r,n,o);const i=this.cleanupFunctions.get(t);if(i)for(let s=0;s<i.length;s++){const c=i[s];if(c.event===r&&c.handler===n){i.splice(s,1),i.length===0&&this.cleanupFunctions.delete(t);return}}}static cleanup(t){const r=this.cleanupFunctions.get(t);r&&(r.forEach(n=>{try{n.cleanup()}catch{}}),this.cleanupFunctions.delete(t))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(t){const r=this.cleanupFunctions.get(t);return!!(r&&r.length>0)}static getListenerCount(t){const r=this.cleanupFunctions.get(t);return r?r.length:0}static getListenerInfo(t){const r=this.cleanupFunctions.get(t);return r?r.map(n=>({event:n.event,handler:n.handler,wrapper:n.wrapper,options:n.options})):[]}}function Fe(e,t){return Array.isArray(e)&&Array.isArray(t)?JSON.stringify([...e].sort())!==JSON.stringify([...t].sort()):e!==t}function xt(e,t,r,n,o){if(e)if(o&&typeof t.value=="object"&&t.value!==null){const i={...t.value};i[o]=r,t.value=i}else t.value=r;else{const i=n._state||n;Ze(i,t,r)}}function We(e,t,r,n){if(e._requestRender&&e._requestRender(),e._triggerWatchers){const o=t?"reactiveState":r;e._triggerWatchers(o,n)}}function ln(e,t,r){const n=`update:${te(t)}`,o=`update:${t}`,i=new CustomEvent(n,{detail:r,bubbles:!0,composed:!0}),s=new CustomEvent(o,{detail:r,bubbles:!0,composed:!0});e.dispatchEvent(i),e.dispatchEvent(s)}function kt(e,t,r,n){const o=r;P(()=>{e[t]=o}),P(()=>{const i=te(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 un(e,t,r,n){if(e){const i=t.value;return n&&typeof i=="object"&&i!==null?i[n]:i}const o=r._state||r;return V(o,t)}function ve(e){return e?e.split(/\s+/).filter(Boolean):[]}function xe(e,t){if(t.length===0)return;const r=t.filter(n=>n&&!e.classList.contains(n));r.length>0&&e.classList.add(...r)}function we(e,t){if(t.length===0)return;const r=t.filter(Boolean);r.length>0&&e.classList.remove(...r)}let Je=!1;async function fn(e,t,r=10){if(!Je){if(!e.isConnected){ie("⚠️ Element not connected to DOM, skipping style wait");return}for(let n=0;n<r;n++){const o=window.getComputedStyle(e),i=o.transform&&o.transform!=="",s=o.opacity&&o.opacity!=="";if(i||s){Je=!0;return}await new Promise(c=>requestAnimationFrame(()=>c(void 0)))}Je=!0,ie("⚠️ Styles did not load in time for transition, continuing anyway")}}function dn(e){const t=window.getComputedStyle(e),r=t.transitionDuration||"0s",n=t.transitionDelay||"0s",o=i=>{const s=parseFloat(i);return i.includes("ms")?s:s*1e3};return o(r)+o(n)}function Mt(e,t){return new Promise(r=>{const n=t??dn(e);if(n<=0){r();return}let o=!1;const i=()=>{o||(o=!0,e.removeEventListener("transitionend",s),e.removeEventListener("transitioncancel",s),r())},s=()=>i();e.addEventListener("transitionend",s),e.addEventListener("transitioncancel",s),setTimeout(i,n+50)})}async function Ae(e,t){const{classes:r,hooks:n,css:o,duration:i}=t;if(n?.onBeforeEnter)try{n.onBeforeEnter(e)}catch(u){I("Transition onBeforeEnter error:",u)}if(!o)return n?.onEnter?new Promise(u=>{n.onEnter(e,()=>{if(n?.onAfterEnter)try{n.onAfterEnter(e)}catch(p){I("Transition onAfterEnter error:",p)}u()})}):void 0;const s=ve(r?.enterFrom),c=ve(r?.enterActive),a=ve(r?.enterTo);xe(e,s),e.offsetHeight,xe(e,c),e.offsetHeight;let f;if(n?.onEnter){const u=new Promise(p=>{f=p});try{n.onEnter(e,()=>{f&&f()})}catch(p){I("Transition onEnter error:",p)}f&&await u}await new Promise(u=>requestAnimationFrame(()=>u(void 0))),e.offsetHeight;const b=window.getComputedStyle(e),m=b.transform,d=b.opacity;we(e,s),m&&m!=="none"&&(e.style.transform=m),d&&d!==""&&(e.style.opacity=d),e.offsetHeight,await new Promise(u=>requestAnimationFrame(()=>u(void 0))),e.style.transform="",e.style.opacity="",xe(e,a),e.offsetHeight,await new Promise(u=>requestAnimationFrame(()=>u(void 0)));let k;if(typeof i=="number"?k=i:i&&typeof i=="object"&&"enter"in i&&(k=i.enter),await Mt(e,k),we(e,c),n?.onAfterEnter)try{n.onAfterEnter(e)}catch(u){I("Transition onAfterEnter error:",u)}}async function Xe(e,t){const{classes:r,hooks:n,css:o,duration:i}=t;if(n?.onBeforeLeave)try{n.onBeforeLeave(e)}catch(m){I("Transition onBeforeLeave error:",m)}if(!o)return n?.onLeave?new Promise(m=>{n.onLeave(e,()=>{if(n?.onAfterLeave)try{n.onAfterLeave(e)}catch(d){I("Transition onAfterLeave error:",d)}m()})}):void 0;const s=ve(r?.leaveFrom),c=ve(r?.leaveActive),a=ve(r?.leaveTo);xe(e,s),e.offsetHeight,xe(e,c);let f;if(n?.onLeave){const m=new Promise(d=>{f=d});try{n.onLeave(e,()=>{f&&f()})}catch(d){I("Transition onLeave error:",d)}f&&await m}await new Promise(m=>requestAnimationFrame(()=>m(void 0))),await fn(e,[...s,...c]),we(e,s),xe(e,a);let b;if(typeof i=="number"?b=i:i&&typeof i=="object"&&"leave"in i&&(b=i.leave),await Mt(e,b),we(e,c),we(e,a),we(e,s),n?.onAfterLeave)try{n.onAfterLeave(e)}catch(m){I("Transition onAfterLeave error:",m)}}function ee(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function ke(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?M(e)||"value"in e?!!e.value:!1:!!e}function me(e,t){if(!t||!(e instanceof HTMLElement))return;oe.cleanup(e);for(const n in t)t[n]===e&&delete t[n];const r=e.childNodes;for(let n=0;n<r.length;n++)me(r[n],t)}function je(e,t,r){if(typeof e=="string")return;const n=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),o=e.props?.ref??(e.props?.props&&e.props.props.ref);n?n.value=t:o&&r&&(r[o]=t)}function pn(e,t,r,n,o,i,s,c){if(!i)return;const a=t.includes("lazy"),f=t.includes("trim"),b=t.includes("number"),m=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",d=()=>{if(m){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 V(i._state||i,e)},k=d();let u="text";s instanceof HTMLInputElement?u=n?.type||s.type||"text":s instanceof HTMLSelectElement?u="select":s instanceof HTMLTextAreaElement&&(u="textarea");const p=s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement,l=p?u==="checkbox"||u==="radio"?"checked":"value":c??"modelValue";if(u==="checkbox")if(Array.isArray(k))r[l]=k.includes(String(s?.getAttribute("value")??n?.value??""));else{const x=s?.getAttribute("true-value")??!0;r[l]=k===x}else if(u==="radio")r[l]=k===(n?.value??"");else if(u==="select")if(s&&s.hasAttribute("multiple")&&s instanceof HTMLSelectElement){const x=Array.isArray(k)?k.map(String):[];setTimeout(()=>{Array.from(s.options).forEach(_=>{_.selected=x.includes(_.value)})},0),r[l]=Array.isArray(k)?k:[]}else r[l]=k;else{!p&&m?r[l]=e:r[l]=k;try{const x=te(l);n&&(n[x]=k)}catch{}}const y=a||u==="checkbox"||u==="radio"||u==="select"?"change":"input",w=x=>{if(x.isComposing||o._isComposing)return;const _=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(x.isTrusted===!1&&!_)return;const C=x.target;if(!C||C._modelUpdating)return;let g=C.value;if(u==="checkbox"){const $=d();if(Array.isArray($)){const v=C.getAttribute("value")??"",S=Array.from($);if(C.checked)S.includes(v)||S.push(v);else{const L=S.indexOf(v);L>-1&&S.splice(L,1)}g=S}else{const v=C.getAttribute("true-value")??!0,S=C.getAttribute("false-value")??!1;g=C.checked?v:S}}else if(u==="radio")g=C.getAttribute("value")??C.value;else if(u==="select"&&C.multiple)g=Array.from(C.selectedOptions).map($=>$.value);else if(f&&typeof g=="string"&&(g=g.trim()),b){const $=Number(g);isNaN($)||(g=$)}const A=d();if(Fe(g,A)){C._modelUpdating=!0;try{xt(m,e,g,i,c),We(i,m,e,g),C&&ln(C,l,g)}finally{setTimeout(()=>C._modelUpdating=!1,0)}}};if(p){if(o[y]){const x=o[y];s&&oe.removeListener(s,y,x)}o[y]=w}else{const x=`update:${te(l)}`,_=`update:${l}`;if(o[x]){const C=o[x];s&&oe.removeListener(s,x,C)}if(o[_]){const C=o[_];s&&oe.removeListener(s,_,C)}if(o[x]=C=>{const g=C.detail!==void 0?C.detail:C.target?.value,A=un(m,e,i,c);if(Fe(g,A)){xt(m,e,g,i,c),We(i,m,e,g);const $=C.target;$&&kt($,l,m?e:g,m)}},m&&typeof e.value=="object"&&e.value!==null){let C=[];try{C=Reflect.ownKeys(e.value)}catch{C=Object.keys(e.value)}const g=C.filter(A=>typeof A=="string"&&!String(A).startsWith("_")&&A!=="constructor");for(const A of g){const T=`update:${te(A)}`,$=`update:${A}`;o[T]||(o[T]=v=>{const S=v.detail!==void 0?v.detail:v.target?.value,L=m?e.value[A]:V(i._state||i,e);if(!Fe(S,L))return;if(m){const R={...e.value};R[A]=S,e.value=R}else Ze(i._state||i,e,S);We(i,m,e,S);const O=v.currentTarget||s||v.target;O&&kt(O,l,m?e:S,m)},o[$]=o[T])}}o[_]=o[x]}(u==="text"||u==="textarea")&&(o.compositionstart=(()=>o._isComposing=!0),o.compositionend=x=>{o._isComposing=!1;const _=x.target;_&&setTimeout(()=>{const C=_.value,g=i._state||i,A=V(g,e);let T=C;if(f&&(T=T.trim()),b){const v=Number(T);isNaN(v)||(T=v)}if(Fe(T,A)){_._modelUpdating=!0;try{Ze(g,e,T),We(i,m,e,T)}finally{setTimeout(()=>_._modelUpdating=!1,0)}}},0)})}function Nt(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function hn(e,t,r,n,o){if(typeof e=="object"&&e!==null)for(const[i,s]of Object.entries(e))if(i.startsWith("data-")||i.startsWith("aria-")||i==="class")r[i]=s;else if(i==="disabled"&&o&&ee(o)){const c=s&&typeof s=="object"&&"value"in s;(()=>{try{return M(s)}catch{return!1}})()||c?t[i]=s:r[i]=s}else t[i]=s;else if(typeof e=="string"){if(!n)return;try{const i=Ne(e,n);if(typeof i=="object"&&i!==null){for(const[s,c]of Object.entries(i))if(s.startsWith("data-")||s.startsWith("aria-")||s==="class")r[s]=c;else if(s==="disabled"&&o&&ee(o)){const a=c&&typeof c=="object"&&"value"in c;(()=>{try{return M(c)}catch{return!1}})()||a?t[s]=c:r[s]=c}else t[s]=c;return}else{r[e]=i;return}}catch{const i=V(n,e);r[e]=i}}}function gn(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=Ne(e,r)}else n=e;const o=t.style||"";let i=o;if(n){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 Ne(e,t){return cn.evaluate(e,t)}function mn(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=Ne(e,r)}else n=e;let o=[];if(typeof n=="string")o=[n];else if(Array.isArray(n))o=n.filter(Boolean);else if(typeof n=="object"&&n!==null)for(const[c,a]of Object.entries(n))a&&o.push(c);const i=t.class||"",s=o.join(" ");t.class=i?`${i} ${s}`.trim():s}function ut(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 r=e.value,n=typeof r;return n==="boolean"?!0:n==="string"?r===""||r==="true"||r==="false":!1}}catch{}return!1}function yn(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=Ne(e,r)}else n=e;let o="";if(typeof n=="string")o=n;else if(n&&typeof n=="object"){const s=[];for(const[c,a]of Object.entries(n))if(a!=null&&a!==""){const f=c.replace(/[A-Z]/g,d=>`-${d.toLowerCase()}`),b=["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 m=String(a);typeof a=="number"&&b.includes(f)&&(m=`${a}px`),s.push(`${f}: ${m}`)}o=s.join("; ")+(s.length>0?";":"")}const i=t.style||"";t.style=i+(i&&!i.endsWith(";")?"; ":"")+o}function bn(e,t,r){let n=e;typeof e=="string"&&r&&(n=Ne(e,r)),M(n)?t.reactiveRef=n:t.ref=n}function Dt(e,t,r,n){const o={},i={...n||{}},s={};for(const[c,a]of Object.entries(e)){const{value:f,modifiers:b,arg:m}=a;if(c==="model"||c.startsWith("model:")){const d=c.split(":"),k=d.length>1?d[1]:m;pn(f,b,o,i,s,t,r,k);continue}switch(c){case"bind":hn(f,o,i,t,r);break;case"show":gn(f,i,t);break;case"class":mn(f,i,t);break;case"style":yn(f,i,t);break;case"ref":bn(f,o,t);break}}try{if(Object.prototype.hasOwnProperty.call(o,"disabled")&&r&&ee(r)){const a=o.disabled,f=a&&typeof a=="object"&&"value"in a;let b=!1;try{b=M(a)}catch{b=!1}if(!f&&!b)try{i.disabled=a,delete o.disabled;const m=globalThis;m.__VDOM_DISABLED_PROMOTIONS||(m.__VDOM_DISABLED_PROMOTIONS=[]),m.__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 ft(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 m=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(u=>u!=null)??"";c=k?`${t}:${m}:${k}`:`${t}:${m}`}let a=c,f=1;for(;i.has(a);)a=`${c}#${f++}`;i.add(a);let b=s.children;return Array.isArray(b)&&(b=ft(b,a)),{...s,key:a,children:b}})}const r=e;let n=r.props?.key??r.key??t,o=r.children;return Array.isArray(o)&&(o=ft(o,n)),{...r,key:n,children:o}}function $t(e,t,r,n){const o=r.directives??{},i=Dt(o,n,e,r.attrs),s={...t.props,...r.props,...i.props},c={...t.attrs,...r.attrs,...i.attrs},a=t.props??{},f=s,b=r?.isCustomElement??t?.isCustomElement??!1;let m=!1;for(const u in{...a,...f}){const p=a[u],h=f[u];let l=p,y=h;if(P(()=>{(M(p)||p&&typeof p=="object"&&"value"in p)&&(l=p.value)}),P(()=>{(M(h)||h&&typeof h=="object"&&"value"in h)&&(y=h.value)}),!(p===h&&l===y))if(m=!0,u==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const w=typeof h=="object"&&h!==null&&M(h)||h&&typeof h=="object"&&"value"in h?h.value:h;e.value!==w&&(e.value=w??"")}else if(u==="checked"&&e instanceof HTMLInputElement){const w=typeof h=="object"&&h!==null&&M(h)||h&&typeof h=="object"&&"value"in h?h.value:h;e.checked=!!w}else if(u.startsWith("on")&&typeof h=="function"){const w=Nt(u);typeof p=="function"&&oe.removeListener(e,w,p),oe.addListener(e,w,h);try{if(w&&w.startsWith("update:")){const x=w.split(":",2)[1],_=f[x];let C=[];try{if(M(_)){const A=_.value;C=A&&typeof A=="object"?Object.keys(A):[]}else _&&typeof _=="object"&&(C=Object.keys(_))}catch{C=[]}const g=C.filter(A=>typeof A=="string"&&!A.startsWith("_")&&A!=="constructor");for(const A of g){const T=`update:${A}`,$=v=>{const S=v.detail!==void 0?v.detail:v.target?.value,E={...M(_)?_.value||{}:f[x]||{},[A]:S};P(()=>{h({detail:E})})};P(()=>{oe.addListener(e,T,$)})}}}catch{}}else if(h==null)e.removeAttribute(u);else{const w=r?.isCustomElement??t?.isCustomElement??!1;if(w||u in e)try{e[u]=h,u==="disabled"&&h===!1&&!w&&ee(e)&&e.removeAttribute("disabled")}catch{}else h===!1&&e.removeAttribute(u)}}for(const[u,p]of Object.entries(i.listeners||{})){oe.addListener(e,u,p);try{const h=e&&e.parentElement;h&&h!==e&&oe.addListener(h,u,p)}catch{}}const d=t.attrs??{},k=c;for(const u in{...d,...k}){const p=d[u],h=k[u];let l=p,y=h;if(M(p)&&(l=p.value),M(h)&&(y=h.value),l!==y)if(m=!0,y==null||y===!1)P(()=>{e.removeAttribute(u)}),u==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?P(()=>{e.value=""}):e instanceof HTMLSelectElement?P(()=>{e.value=""}):e instanceof HTMLProgressElement&&P(()=>{e.value=0})),u==="checked"&&e instanceof HTMLInputElement&&P(()=>{e.checked=!1}),u==="disabled"&&ee(e)&&P(()=>{e.disabled=!1});else{if(u==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){P(()=>{e.value=y??""});continue}else if(e instanceof HTMLSelectElement){P(()=>{e.value=y??""});continue}else if(e instanceof HTMLProgressElement){P(()=>{e.value=Number(y)});continue}}if(u==="checked"&&e instanceof HTMLInputElement){P(()=>{e.checked=!!y});continue}if(u==="style"){e.setAttribute(u,String(y));continue}if(u==="disabled"&&ee(e)){P(()=>{e.disabled=ke(y)}),ke(y)?P(()=>{e.setAttribute(u,"")}):P(()=>{e.removeAttribute(u)});continue}const w=e.namespaceURI==="http://www.w3.org/2000/svg";if(b&&!w&&u.includes("-")){const x=yt(u);try{M(h)?e[x]=h:e[x]=y}catch{e.setAttribute(u,String(y))}}else if(!w&&u in e)try{M(h)?e[u]=h:e[u]=y}catch{e.setAttribute(u,String(y))}else e.setAttribute(u,String(y))}}try{if(ee(e)){const u=s.disabled;let p;try{const l=Object.prototype.hasOwnProperty.call(i.props||{},"disabled"),y=u&&typeof u=="object"&&"value"in u;let w=!1;P(()=>{w=!!M(u)});const x=ut(u);w||y||l||x?p=u:p=c.disabled}catch{p=c.disabled}const h=ke(p);P(()=>{e.disabled=h}),P(h?()=>{e.setAttribute("disabled","")}:()=>{e.removeAttribute("disabled")})}}catch{}b&&m&&(P(()=>{e._applyProps?.(e._cfg)}),P(()=>{typeof e.requestRender=="function"?e.requestRender():typeof e._render=="function"&&e._render(e._cfg)}))}function Y(e,t,r){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const d=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&(d.key=e.key),d}if(e.tag==="#anchor"){const d=e,k=Array.isArray(d.children)?d.children:[],u=document.createTextNode(""),p=document.createTextNode("");d.key!=null&&(u.key=`${d.key}:start`,p.key=`${d.key}:end`),d._startNode=u,d._endNode=p;const h=document.createDocumentFragment();h.appendChild(u);for(const l of k){const y=Y(l,t);if(d.key!=null&&y instanceof Element&&!y.hasAttribute("data-anchor-key")){const w=l;w&&typeof w=="object"&&w.key!=null||(y.key=d.key,y.setAttribute("data-anchor-key",String(d.key)))}h.appendChild(y)}return h.appendChild(p),h}const n=document.createElement(e.tag);e.key!=null&&(n.key=e.key),e.props&&e.props._transitionGroup&&(n._transitionGroup=e.props._transitionGroup);const{props:o={},attrs:i={},directives:s={}}=e.props??{},c=Dt(s,t,n,i),a={...o,...c.props},f={...i,...c.attrs};try{if(a.disabled!==void 0&&n&&ee(n)){const d=a.disabled,k=d&&typeof d=="object"&&"value"in d;let u=!1;try{u=M(d)}catch{u=!1}!k&&!u&&P(()=>{f.disabled=d,delete a.disabled;const p=globalThis;p.__VDOM_DISABLED_PROMOTIONS||(p.__VDOM_DISABLED_PROMOTIONS=[]),p.__VDOM_DISABLED_PROMOTIONS.push({phase:"createElement:move-prop-to-attr",location:"attrs",key:"disabled",value:d,time:Date.now(),stack:new Error().stack})})}}catch{}const b=n.namespaceURI==="http://www.w3.org/2000/svg";for(const d in f){const k=f[d];if(typeof d!="string"||/\[object Object\]/.test(d))continue;const u=typeof k=="object"&&k!==null&&M(k)||k&&typeof k=="object"&&"value"in k?k.value:k;if(typeof u=="boolean")u?n.setAttribute(d,""):P(()=>{n.removeAttribute(d)});else if(u!=null){if(d==="disabled"&&ee(n)){const p=a.disabled,h=ut(p)?p:u,l=ke(h);P(()=>{n.disabled=l}),P(l?()=>{n.setAttribute(d,"")}:()=>{n.removeAttribute(d)});continue}if(!b&&d==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement||n instanceof HTMLProgressElement))try{n instanceof HTMLProgressElement?n.value=Number(u):n.value=u??""}catch{n.setAttribute(d,String(u))}else if(!b&&d==="checked"&&n instanceof HTMLInputElement)try{n.checked=!!u}catch{n.setAttribute(d,String(u))}else if(!b&&d in n)try{n[d]=u,d==="disabled"&&u===!1&&ee(n)&&n.removeAttribute("disabled")}catch{n.setAttribute(d,String(u))}else if((e.props?.isCustomElement??!1)&&!b&&d.includes("-")){const h=yt(d);try{n[h]=u}catch{n.setAttribute(d,String(u))}}else n.setAttribute(d,String(u))}}for(const d in a){const k=a[d];if(!(typeof d!="string"||/\[object Object\]/.test(d)))if(d==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)){const u=typeof k=="object"&&k!==null&&typeof k.value<"u"?k.value:k;P(()=>{n.value=u??""})}else if(d.startsWith("on")&&typeof k=="function"){const u=Nt(d),p=u.includes(":")?(()=>{const h=u.split(":"),l=h[1];if(l.includes("-")){const y=l.split("-").map((w,x)=>x===0?w:w.charAt(0).toUpperCase()+w.slice(1)).join("");return`${h[0]}:${y}`}else{const y=l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${h[0]}:${y}`}})():u;c.listeners&&(c.listeners[u]||c.listeners[p])||oe.addListener(n,u,k)}else{if(d.startsWith("on")&&k===void 0)continue;if(k==null||k===!1)n.removeAttribute(d);else if((e.props?.isCustomElement??!1)||d in n)try{const p=typeof k=="object"&&k!==null&&M(k)?k:typeof k=="object"&&k!==null&&typeof k.value<"u"?k.value:k;if(d==="disabled"&&ee(n)){const h=a.disabled!==void 0?a.disabled:p,l=ke(h);P(()=>{n.disabled=l}),P(l?()=>{n.setAttribute(d,"")}:()=>{n.removeAttribute(d)});continue}try{if(typeof n[d]=="boolean"){let l=p;typeof p=="string"?p==="false"?l=!1:p==="true"?l=!0:l=!!p&&p!=="":l=!!p,n[d]=l}else n[d]=p}catch{n[d]=p}}catch{}}}for(const[d,k]of Object.entries(c.listeners||{}))oe.addListener(n,d,k);const m={...e,props:{...e.props,...c.props}};je(m,n,r);try{if(typeof n._applyProps=="function")try{n._applyProps(n._cfg)}catch{}typeof n.requestRender=="function"?n.requestRender():typeof n._render=="function"&&n._render(n._cfg)}catch{}if(Array.isArray(e.children))for(const d of e.children)n.appendChild(Y(d,t,r));else typeof e.children=="string"&&(n.textContent=e.children);try{if(n instanceof HTMLSelectElement&&f&&f.hasOwnProperty("value"))try{n.value=f.value??""}catch{}}catch{}try{if(ee(n)){const d=a.disabled,k=f.disabled,u=d&&typeof d=="object"&&"value"in d;let p=!1;try{p=!!M(d)}catch{p=!1}const l=p||u||ut(d)?d:k,y=ke(l);P(()=>{n.disabled=y}),P(y?()=>{n.setAttribute("disabled","")}:()=>{n.removeAttribute("disabled")})}}catch{}return n}function wn(e,t,r,n,o){if(typeof r=="string"){e.textContent!==r&&(e.textContent=r);return}if(!Array.isArray(r))return;const i=e.childNodes,s=[];for(let p=0;p<i.length;p++)s.push(i[p]);const c=Array.isArray(t)?t:[],a=e._transitionGroup;if(a){const p=w=>typeof w=="string"&&w.startsWith("each-")?w.substring(5):w,h=[],l=[];for(const w of r)if(w&&w.tag==="#anchor"){const x=Array.isArray(w.children)?w.children:[];for(const _ of x){const C=p(_.key||w.key||"unknown");h.push({..._,key:C})}}else w&&h.push({...w,key:p(w.key)});for(const w of c)if(w&&w.tag==="#anchor"){const x=Array.isArray(w.children)?w.children:[];for(const _ of x){const C=p(_.key||w.key||"unknown");l.push({..._,key:C})}}else w&&l.push({...w,key:p(w.key)});if(h.some(w=>w&&w.key!=null)||l.some(w=>w&&w.key!=null)){const w=new Map,x=new Map;for(const $ of l)if($&&$.key!=null){const v=String($.key);w.set(v,$)}for(let $=0;$<s.length;$++){const v=s[$];let S=v.key;if(!S&&v instanceof Element){const L=v.getAttribute("data-anchor-key");L&&(S=L)}if(S=p(S),S!=null&&v instanceof Element&&v.nodeType===Node.ELEMENT_NODE){let L=typeof S=="string"&&S.includes(":")?S.substring(0,S.lastIndexOf(":")):S;L=String(L),x.set(L,v)}}const _=new Set,C=new Map,g=s.length>0;if(a.moveClass&&g)for(let $=0;$<s.length;$++){const v=s[$];if(v instanceof HTMLElement&&v.parentElement){const S=v.getBoundingClientRect();C.set(v,S)}}const A=[];for(const $ of h){let v=$.key;if(v==null)continue;v=String(v);const S=w.get(v);let L=x.get(v);if(L&&S){const E=Le(L,S,$,n);_.add(L);const O=String(v);E.key=O,E instanceof Element&&E.setAttribute("data-anchor-key",O),A.push({node:E,key:v,newVNode:$,oldVNode:S,isNew:!1})}else{L=Y($,n),L.key=v,L instanceof Element&&L.setAttribute("data-anchor-key",String(v)),e.appendChild(L);const E=g||a.appear===!0;L instanceof HTMLElement&&E&&Ae(L,a).catch(O=>{I("Enter transition error:",O)}),A.push({node:L,key:v,newVNode:$,isNew:!0})}}const T=[];for(let $=0;$<s.length;$++){const v=s[$],S=v.key;if(!_.has(v)&&S!=null&&v instanceof HTMLElement){const E=Xe(v,a).then(()=>{e.contains(v)&&e.removeChild(v)}).catch(O=>{I("Leave transition error:",O),e.contains(v)&&e.removeChild(v)});T.push(E)}}if(T.length===0){let $=e.firstChild;for(const{node:v}of A)v!==$&&e.insertBefore(v,$),$=v.nextSibling;if(a.moveClass&&C.size>0){const v=[];for(const{node:S,isNew:L}of A)if(!L&&S instanceof HTMLElement){const E=C.get(S);if(E){const O=S.getBoundingClientRect(),R=E.left-O.left,B=E.top-O.top;if(R!==0||B!==0){const ue=a.moveClass.split(/\s+/).filter(D=>D);v.push({node:S,deltaX:R,deltaY:B,moveClasses:ue})}}}if(v.length>0){for(const{node:S,deltaX:L,deltaY:E}of v)S.style.transform=`translate(${L}px, ${E}px)`,S.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:S,moveClasses:L}of v)for(const E of L)S.classList.add(E);requestAnimationFrame(()=>{const S=a.moveClass||"",L=S.match(/duration-(\d+)/),E=L?`${L[1]}ms`:"300ms",O=S.match(/ease-(out|in|in-out|linear)/),R=O?`ease-${O[1]}`:"ease-out";for(const{node:B}of v)B.style.transition=`transform ${E} ${R}`;requestAnimationFrame(()=>{for(const{node:B,moveClasses:ue}of v){B.style.removeProperty("transform");const D=()=>{for(const N of ue)B.classList.remove(N);B.style.removeProperty("transition"),B.removeEventListener("transitionend",D),B.removeEventListener("transitioncancel",D)};B.addEventListener("transitionend",D,{once:!0}),B.addEventListener("transitioncancel",D,{once:!0})}})})})})}}}return}}const f=new Map;for(const p of c)p&&p.key!=null&&f.set(p.key,p);const b=new Map;for(let p=0;p<s.length;p++){const h=s[p],l=h.key;l!=null&&b.set(l,h)}const m=new Set;let d=e.firstChild;function k(p,h){let l=p;for(;l&&(m.add(l),l!==h);)l=l.nextSibling}function u(p,h,l,y,w,x=!0){const _=[];let C=p.nextSibling;for(;C&&C!==h;)_.push(C),C=C.nextSibling;const g=Array.isArray(l)?l:[];if(y.some(T=>T&&T.key!=null)||g.some(T=>T&&T.key!=null)){const T=new Map,$=new Map;for(const E of g)E&&E.key!=null&&T.set(E.key,E);for(const E of _){const O=E.key;O!=null&&$.set(O,E)}const v=w&&w.state==="visible"&&g.length===0&&y.length>0,S=new Set;let L=p.nextSibling;for(const E of y){let O;if(E.key!=null&&$.has(E.key)){const R=T.get(E.key);O=Le($.get(E.key),R,E,n),S.add(O),w&&O instanceof HTMLElement&&v&&w.appear&&Ae(O,w).catch(B=>{I("Transition enter error (appear):",B)}),O!==L&&e.contains(O)&&e.insertBefore(O,L)}else O=Y(E,n),e.insertBefore(O,L),S.add(O),w&&O instanceof HTMLElement&&x&&Ae(O,w).catch(R=>{I("Transition enter error:",R)});L=O.nextSibling}for(const E of _)!S.has(E)&&e.contains(E)&&(w&&E instanceof HTMLElement&&x?Xe(E,w).then(()=>{e.contains(E)&&e.removeChild(E)}).catch(O=>{I("Transition leave error:",O),e.contains(E)&&e.removeChild(E)}):e.removeChild(E))}else{const T=Math.min(g.length,y.length);for(let $=0;$<T;$++){const v=g[$],S=y[$],L=Le(_[$],v,S,n);L!==_[$]&&(e.insertBefore(L,_[$]),e.removeChild(_[$]))}for(let $=T;$<y.length;$++){const v=Y(y[$],n);e.insertBefore(v,h),w&&v instanceof HTMLElement&&x&&Ae(v,w).catch(S=>{I("Transition enter error:",S)})}for(let $=T;$<_.length;$++){const v=_[$];w&&v instanceof HTMLElement&&x?Xe(v,w).then(()=>{e.contains(v)&&e.removeChild(v)}).catch(S=>{I("Transition leave error:",S),e.contains(v)&&e.removeChild(v)}):e.removeChild(v)}}}for(const p of r){let h;if(p.tag==="#anchor"){const l=p.key,y=`${l}:start`,w=`${l}:end`;let x=b.get(y),_=b.get(w);const C=Array.isArray(p.children)?p.children:[];if(x||(x=document.createTextNode(""),x.key=y),_||(_=document.createTextNode(""),_.key=w),p._startNode=x,p._endNode=_,!e.contains(x)||!e.contains(_)){e.insertBefore(x,d);const g=p._transition,T=!(g&&g.state==="visible"&&C.length>0)||g.appear;for(const $ of C){const v=Y($,n);e.insertBefore(v,d),g&&v instanceof HTMLElement&&T&&Ae(v,g).catch(S=>{I("Transition enter error:",S)})}e.insertBefore(_,d)}else{const g=p._transition,T=f.get(l)?._transition,$=T&&T.state!==g?.state,v=g&&g.state==="visible"&&C.length>0&&!$,S=$||!v||g?.appear===!0;u(x,_,f.get(l)?.children,C,g,S)}k(x,_),d=_.nextSibling;continue}if(p.key!=null&&b.has(p.key)){const l=f.get(p.key);h=Le(b.get(p.key),l,p,n,o),m.add(h),h!==d&&e.contains(h)&&(d&&!e.contains(d)&&(d=null),e.insertBefore(h,d))}else h=Y(p,n,o),d&&!e.contains(d)&&(d=null),e.insertBefore(h,d),m.add(h);d=h.nextSibling}for(let p=0;p<s.length;p++){const h=s[p];!m.has(h)&&e.contains(h)&&(me(h,o),e.removeChild(h))}}function Le(e,t,r,n,o){if(t&&typeof t!="string"&&t.props?.ref&&o&&me(e,o),t===r)return e;if(typeof r=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==r&&(e.textContent=r),e;{const s=document.createTextNode(r);return e.parentNode?.replaceChild(s,e),s}}if(r&&typeof r!="string"&&r.tag==="#anchor"){const s=r,c=Array.isArray(s.children)?s.children:[],a=s._startNode??document.createTextNode(""),f=s._endNode??document.createTextNode("");s.key!=null&&(a.key=`${s.key}:start`,f.key=`${s.key}:end`),s._startNode=a,s._endNode=f;const b=document.createDocumentFragment();b.appendChild(a);for(const m of c){const d=Y(m,n);b.appendChild(d)}return b.appendChild(f),e.parentNode?.replaceChild(b,e),a}if(!r){me(e,o);const s=document.createComment("removed");return e.parentNode?.replaceChild(s,e),s}if(!t||typeof t=="string"){me(e,o);const s=Y(r,n,o);return je(r,s,o),e.parentNode?.replaceChild(s,e),s}if(r.tag==="#anchor"){const s=Array.isArray(r.children)?r.children:[],c=r._startNode??document.createTextNode(""),a=r._endNode??document.createTextNode("");r.key!=null&&(c.key=`${r.key}:start`,a.key=`${r.key}:end`),r._startNode=c,r._endNode=a;const f=document.createDocumentFragment();f.appendChild(c);for(const b of s)f.appendChild(Y(b,n));return f.appendChild(a),e.parentNode?.replaceChild(f,e),c}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&t.key===r.key){const s=e;return $t(s,t.props||{},r.props||{},n),wn(s,t.children,r.children,n,o),je(r,s,o),s}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&(t.tag&&String(t.tag).includes("-")||r.props&&r.props.isCustomElement||t.props&&t.props.isCustomElement))try{const c=e;return $t(c,t.props||{},r.props||{},n),je(r,c,o),c}catch{}me(e,o);const i=Y(r,n,o);return je(r,i,o),e.parentNode?.replaceChild(i,e),i}function vn(e,t,r,n){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=ft(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=Le(s,i,o,r,n):(c=Y(o,r,n),e.replaceChild(c,s)):(c=Y(o,r,n),e.firstChild?e.replaceChild(c,e.firstChild):e.appendChild(c));const a=[];for(let f=0;f<e.childNodes.length;f++){const b=e.childNodes[f];b!==c&&b.nodeName!=="STYLE"&&(me(b,n),a.push(b))}a.forEach(f=>e.removeChild(f)),e._prevVNode=o,e._prevDom=c}function qe(e){if(typeof e=="string")return Se(e);if(e.tag==="#text")return typeof e.children=="string"?Se(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(qe).join("");let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([o,i])=>` ${o}="${Se(String(i))}"`).join(""));let r="";e.props&&(r=Object.entries(e.props).filter(([o])=>o!=="attrs"&&o!=="directives"&&o!=="ref"&&o!=="key").map(([o,i])=>` ${o}="${Se(String(i))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(qe).join(""):typeof e.children=="string"?Se(e.children):e.children?qe(e.children):"";return`<${e.tag}${t}${r}>${n}</${e.tag}>`}function Ht(e,...t){let r="";for(let n=0;n<e.length;n++)r+=e[n],n<t.length&&(r+=t[n]);return r}function Bt(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let ze=null;function Ct(){return ze||(ze=new CSSStyleSheet,ze.replaceSync(Bt(kn))),ze}function xn(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const kn=Ht`
5
5
  :host,
6
6
  *,
7
7
  ::before,
@@ -112,36 +112,36 @@
112
112
  [hidden] {
113
113
  display: none;
114
114
  }
115
- `,Vt={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"}},mt=Object.fromEntries(Object.entries(Vt).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([r,n])=>[r,`var(--color-${e}${r==="DEFAULT"?"":`-${r}`}, ${n})`]))])),ue="0.25rem",Jt={"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"]},Zt=()=>{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,p,h])=>{e[a]=`font-size:${p};line-height:${h};`}),[["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,p])=>{e[a]=`letter-spacing:${p};`}),[["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,p])=>{e[a]=`line-height:${p};`}),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);"}),[0,1,2,4,6,8].forEach(a=>{const p=`${a}px`;e[`border-${a}`]=`border-width:${p};`,e[`border-t-${a}`]=`border-top-width:${p};`,e[`border-r-${a}`]=`border-right-width:${p};`,e[`border-b-${a}`]=`border-bottom-width:${p};`,e[`border-l-${a}`]=`border-left-width:${p};`,e[`border-x-${a}`]=`border-left-width:${p};border-right-width:${p};`,e[`border-y-${a}`]=`border-top-width:${p};border-bottom-width:${p};`}),e.border="border-width:1px;",e["border-t"]="border-top-width:1px;",e["border-r"]="border-right-width:1px;",e["border-b"]="border-bottom-width:1px;",e["border-l"]="border-left-width:1px;",e["border-x"]="border-left-width:1px;border-right-width:1px;",e["border-y"]="border-top-width:1px;border-bottom-width:1px;",Object.assign(e,{"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;"}),Object.entries({none:0,xs:2,sm:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,"4xl":32,full:9999}).forEach(([a,p])=>{const h=p===9999?"9999px":`${p/16}rem`;e[`rounded-${a}`]=`border-radius:${h};`,e[`rounded-t-${a}`]=`border-top-left-radius:${h};border-top-right-radius:${h};`,e[`rounded-r-${a}`]=`border-top-right-radius:${h};border-bottom-right-radius:${h};`,e[`rounded-b-${a}`]=`border-bottom-left-radius:${h};border-bottom-right-radius:${h};`,e[`rounded-l-${a}`]=`border-top-left-radius:${h};border-bottom-left-radius:${h};`,e[`rounded-tl-${a}`]=`border-top-left-radius:${h};`,e[`rounded-tr-${a}`]=`border-top-right-radius:${h};`,e[`rounded-br-${a}`]=`border-bottom-right-radius:${h};`,e[`rounded-bl-${a}`]=`border-bottom-left-radius:${h};`}),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;",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));"}),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;"}),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;"}),Object.assign(e,{"pointer-events-none":"pointer-events:none;","pointer-events-auto":"pointer-events:auto;"}),["auto","default","pointer","wait","text","move","help","not-allowed","grab","grabbing"].forEach(a=>{e[`cursor-${a}`]=`cursor:${a};`}),[0,10,20,30,40,50].forEach(a=>{e[`z-${a}`]=`z-index:${a};`}),Object.assign(e,{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;"}),Object.assign(e,{"m-auto":"margin:auto;","mx-auto":"margin-inline:auto;","my-auto":"margin-block:auto;"}),Object.entries(Jt).forEach(([a,p])=>{e[`max-w-${a}`]=`max-width:calc(${ue} * ${p});`,e[`min-w-${a}`]=`min-width:calc(${ue} * ${p});`,e[`w-${a}`]=`width:calc(${ue} * ${p});`,e[`max-h-${a}`]=`max-height:calc(${ue} * ${p});`,e[`min-h-${a}`]=`min-height:calc(${ue} * ${p});`,e[`h-${a}`]=`height:calc(${ue} * ${p});`}),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-gradient-to-t":"background-image:linear-gradient(to top, var(--tw-gradient-stops));","bg-gradient-to-tr":"background-image:linear-gradient(to top right, var(--tw-gradient-stops));","bg-gradient-to-r":"background-image:linear-gradient(to right, var(--tw-gradient-stops));","bg-gradient-to-br":"background-image:linear-gradient(to bottom right, var(--tw-gradient-stops));","bg-gradient-to-b":"background-image:linear-gradient(to bottom, var(--tw-gradient-stops));","bg-gradient-to-bl":"background-image:linear-gradient(to bottom left, var(--tw-gradient-stops));","bg-gradient-to-l":"background-image:linear-gradient(to left, var(--tw-gradient-stops));","bg-gradient-to-tl":"background-image:linear-gradient(to top left, var(--tw-gradient-stops));"}),e},We=Zt();function J(e,t){let r=0;for(let n=0;n<e.length;n++){const i=e[n];if(i==="["||i==="(")r++;else if((i==="]"||i===")")&&r>0)r--;else if(r===0&&(i===">"||i==="+"||i==="~"||i===" "))return e.slice(0,n)+t+e.slice(n)}return e+t}const Gt={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${J(e,":hover")}{${t}}`,focus:(e,t)=>`${J(e,":focus")}{${t}}`,active:(e,t)=>`${J(e,":active")}{${t}}`,disabled:(e,t)=>`${J(e,":disabled")}{${t}}`,visited:(e,t)=>`${J(e,":visited")}{${t}}`,checked:(e,t)=>`${J(e,":checked")}{${t}}`,first:(e,t)=>`${J(e,":first-child")}{${t}}`,last:(e,t)=>`${J(e,":last-child")}{${t}}`,odd:(e,t)=>`${J(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${J(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${J(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${J(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}}`},nt={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)"},Qt={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)"},De=["sm","md","lg","xl","2xl"],Ie=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function Ne(e){const t=e.startsWith("-"),r=t?e.slice(1):e,n=r.lastIndexOf("-");if(n===-1)return null;const i=r.slice(0,n),s=r.slice(n+1),o=parseFloat(s);if(Number.isNaN(o)||!rt[i])return null;const c=t?"-":"";return rt[i].map(a=>`${a}:calc(${c}${ue} * ${o});`).join("")}function it(e){const t=e.replace("#",""),r=parseInt(t,16);return`${r>>16&255} ${r>>8&255} ${r&255}`}const Xt=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,Yt={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 er(e){const t=Xt.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,s=mt[n]?.[i];if(!s)return null;if(r==="shadow")return`--ce-shadow-color:${s};`;const o=Yt[r];return o?`${o}:${s};`:null}function tr(e){const t=e.indexOf("/");if(t===-1)return{base:e};const r=e.slice(0,t),n=e.slice(t+1),i=parseInt(n,10);return isNaN(i)||i<0||i>100?{base:r}:{base:r,opacity:i/100}}function He(e){const{base:t,opacity:r}=tr(e),n=er(t);if(n&&r!==void 0){const s=/#([0-9a-f]{6})/i.exec(n);if(s){const o=it(s[0]);return n.replace(/#([0-9a-f]{6})/i,`rgb(${o} / ${r})`)}}if(n)return n;const i=Re(t);if(i&&r!==void 0){const s=/#([0-9a-f]{6})/i.exec(i);if(s){const o=it(s[0]);return i.replace(/#([0-9a-f]{6})/i,`rgb(${o} / ${r})`)}}return i}function Be(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,s=mt[n]?.[i];if(!s)return null;switch(r){case"from":return`--tw-gradient-from:${s} var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);`;case"to":return`--tw-gradient-to:${s} var(--tw-gradient-to-position);`;case"via":return`--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), ${s} var(--tw-gradient-via-position), var(--tw-gradient-to);`;default:return null}}function ze(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const r=parseInt(t[1],10);return r<0||r>100?null:`opacity:${r/100};`}function Re(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const o=e.slice(1,-1).trim(),c=o.indexOf(":");if(c===-1)return null;const a=o.slice(0,c).trim();let p=o.slice(c+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(a)?(p=p.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),p=p.replace(/^'([^']*)'$/g,'"$1"'),`${a}:${p};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const r=e.slice(0,t);let n=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(r==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n)?`font-size:${n};`:`color:${n};`;if(r==="rotate")return`transform:rotate(${n});`;if(r==="scale")return`transform:scale(${n});`;if(r==="translate-x")return`transform:translateX(${n});`;if(r==="translate-y")return`transform:translateY(${n});`;const s=i[r]??r.replace(/_/g,"-");return s&&n?`${s}:${n};`:null}function rr(e){if(e.startsWith("[")&&e.endsWith("]")){const r=e.slice(1,-1);return r.includes("&")?r:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const r=e.slice(t+2,-1).replace(/_/g,"-");return r.includes("&")?r:e.replace(/_/g,"-")}return null}function st(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function nr(e){const t=/class\s*=\s*(['"])(.*?)\1/g,r=[];let n;for(;n=t.exec(e);){const i=n[2].split(/\s+/).filter(Boolean);i.length&&r.push(...i)}return r}const ye=new Map,ir=16,ot=1e3;function sr(e){const t=Date.now(),r=ye.get(e);if(r&&t-r.timestamp<ir)return r.css;const n=nr(e);if(!n.length)return"";const i=new Set(n),s=[[],[],[],[]],o={},c=(u,y=!1)=>{const w=y?`dark|${u}`:u;if(w in o)return o[w];const l=x(u,y);return o[w]=l,l},a=u=>{const y=u.some(f=>De.includes(f)),w=u.some(f=>f.startsWith("@")&&(Ie.includes(f.slice(1))||f.match(/^@\[.+\]$/))),l=u.includes("dark");return u.length?!y&&!l&&!w?1:l&&(y||w)?3:2:0},p=u=>{const y=[];let w="",l=0;for(let f=0;f<u.length;f++){const b=u[f];b==="["||b==="("?l++:(b==="]"||b===")")&&l--,b===":"&&l===0?(y.push(w),w=""):w+=b}return w&&y.push(w),y},h={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"},x=(u,y=!1)=>{const w=p(u);let l="",f=!1;for(const E of w){let T=E;if(T.startsWith("!")&&(f=!0,T=T.slice(1)),We[T]||Ne(T)||ze(T)||He(T)||Be(T)||Re(T)){l=E;break}}if(!l)return null;const b=l.replace(/^!/,""),k=We[b]??Ne(b)??ze(b)??He(b)??Be(b)??Re(b);if(!k)return null;const C=w.indexOf(l);let g=C>=0?w.slice(0,C):[];y&&(g=g.filter(E=>E!=="dark"));const $=`.${st(u)}`,O=f?k.replace(/;/g," !important;"):k,v="__SUBJECT__";let _=v;const A=[];for(const E of g)E.startsWith("group-")?(_=`.group:${E.slice(6)} ${_}`,A.push(E)):E.startsWith("peer-")&&(_=_.replace(v,`.peer:${E.slice(5)}~${v}`),A.push(E));g=g.filter(E=>!A.includes(E));const D=[],S=[];let j=null;for(const E of g){if(E==="dark"||De.includes(E)||E.startsWith("@")&&(Ie.includes(E.slice(1))||E.match(/^@\[.+\]$/)))continue;const T=rr(E);if(T){j=T;continue}const R=h[E];if(R){j?S.push(R):D.push(R);continue}const B=Gt[E];typeof B=="function"&&(_=B(_,O).split("{")[0])}const H=D.join(""),re=S.join("");function ke(E,T){if(!T)return E;let R=0,B=0;if(E.length&&(E[0]===">"||E[0]==="+"||E[0]==="~"||E[0]===" ")){let L=1;for(;L<E.length&&E[L]===" ";)L++;for(;L<E.length;L++){const z=E[L];if(z==="["?R++:z==="]"&&R>0?R--:z==="("?B++:z===")"&&B>0&&B--,R===0&&B===0&&(E[L]===">"||E[L]==="+"||E[L]==="~"||E[L]===" "))return E.slice(0,L)+T+E.slice(L)}return E+T}for(let L=0;L<E.length;L++){const z=E[L];if(z==="["?R++:z==="]"&&R>0?R--:z==="("?B++:z===")"&&B>0&&B--,R===0&&B===0&&(z===">"||z==="+"||z==="~"||z===" "))return E.slice(0,L)+T+E.slice(L)}return E+T}if(j)if(j.includes("&")){const E=j.indexOf("&"),T=j.slice(0,E),R=j.slice(E+1),B=v+H;if(D.length===0)_=_.replace(v,T+B+re+R);else{const L=ke(R,re);_=_.replace(v,T+B+L)}}else _=_.replace(v,`${j}${v+H}`),re&&(_=_.replace(v,`${v}${re}`));else _=_.replace(v,v+H+re);_=_.replace(new RegExp(v,"g"),$);let N=`${_}{${O}}`;const W=g.filter(E=>De.includes(E)),V=g.filter(E=>E.startsWith("@")&&(Ie.includes(E.slice(1))||E.match(/^@\[.+\]$/))),K=W.length?W[W.length-1]:null,G=V.length?V[V.length-1]:null,I=g.includes("dark");let Q="",ne="";if(I&&K?Q=`@media (prefers-color-scheme: dark) and ${nt[K]}`:I?Q="@media (prefers-color-scheme: dark)":K&&(Q=`@media ${nt[K]}`),G)if(G.startsWith("@[")&&G.endsWith("]")){const E=G.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(E))return null;ne=`@container (min-width:${E})`}else{const E=G.slice(1);ne=`@container ${Qt[E]||`(min-width:${E})`}`}return Q&&ne?N=`${Q}${ne}{${N}}`:Q?N=`${Q}{${N}}`:ne&&(N=`${ne}{${N}}`),N};for(const u of i){const y=p(u),w=y.find(C=>We[C.replace(/^!/,"")]||Ne(C.replace(/^!/,""))||ze(C.replace(/^!/,""))||He(C.replace(/^!/,""))||Be(C.replace(/^!/,""))||Re(C.replace(/^!/,"")));if(!w)continue;const l=y.indexOf(w),f=l>=0?y.slice(0,l):[],b=a(f),k=c(u);k&&s[b].push(k)}const m=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const u of i)if(m.test(u)){if(s.flat().join("").includes(`.${st(u)}`))continue;const w=c(u);w&&s[0].push(w)}const d=s.flat().join("");return ye.size>=ot&&Array.from(ye.keys()).slice(0,Math.floor(ot/2)).forEach(y=>ye.delete(y)),ye.set(e,{css:d,timestamp:t}),d}const xe=[];function or(e,t,r,n,i,s,o,c){if(e){xe.push(r);try{const a=t.render(r);if(a instanceof Promise){s(!0),a.then(p=>{s(!1),o(null),at(e,p,r,n,i),c(e.innerHTML)}).catch(p=>{s(!1),o(p)});return}at(e,a,r,n,i),c(e.innerHTML)}finally{xe.pop()}}}function at(e,t,r,n,i){e&&(qt(e,Array.isArray(t)?t:[t],r,n),i(e.innerHTML))}function ar(e,t,r,n,i,s,o){if(s!==null&&clearTimeout(s),Date.now()-t<16){if(i(r+1),r===15)console.warn(`⚠️ Component is re-rendering rapidly. This might indicate:
115
+ `,$n={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"}},It=Object.fromEntries(Object.entries($n).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([r,n])=>[r,`var(--color-${e}${r==="DEFAULT"?"":`-${r}`}, ${n})`]))])),he="0.25rem",Cn={"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},Ye={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"]},En=()=>{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,f,b])=>{e[a]=`font-size:${f};line-height:${b};`}),[["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,f])=>{e[a]=`letter-spacing:${f};`}),[["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,f])=>{e[a]=`line-height:${f};`});const i=[0,1,2,4,6,8];for(const a of i){const f=`${a}px`;e[`border-${a}`]=`border-width:${f};`,e[`border-t-${a}`]=`border-top-width:${f};`,e[`border-r-${a}`]=`border-right-width:${f};`,e[`border-b-${a}`]=`border-bottom-width:${f};`,e[`border-l-${a}`]=`border-left-width:${f};`,e[`border-x-${a}`]=`border-left-width:${f};border-right-width:${f};`,e[`border-y-${a}`]=`border-top-width:${f};border-bottom-width:${f};`}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,f]of Object.entries(s)){const b=f===9999?"9999px":`${f/16}rem`;e[`rounded-${a}`]=`border-radius:${b};`,e[`rounded-t-${a}`]=`border-top-left-radius:${b};border-top-right-radius:${b};`,e[`rounded-r-${a}`]=`border-top-right-radius:${b};border-bottom-right-radius:${b};`,e[`rounded-b-${a}`]=`border-bottom-left-radius:${b};border-bottom-right-radius:${b};`,e[`rounded-l-${a}`]=`border-top-left-radius:${b};border-bottom-left-radius:${b};`,e[`rounded-tl-${a}`]=`border-top-left-radius:${b};`,e[`rounded-tr-${a}`]=`border-top-right-radius:${b};`,e[`rounded-br-${a}`]=`border-bottom-right-radius:${b};`,e[`rounded-bl-${a}`]=`border-bottom-left-radius:${b};`}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;",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));"}),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,f]of Object.entries(Cn))e[`max-w-${a}`]=`max-width:calc(${he} * ${f});`,e[`min-w-${a}`]=`min-width:calc(${he} * ${f});`,e[`w-${a}`]=`width:calc(${he} * ${f});`,e[`max-h-${a}`]=`max-height:calc(${he} * ${f});`,e[`min-h-${a}`]=`min-height:calc(${he} * ${f});`,e[`h-${a}`]=`height:calc(${he} * ${f});`;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(--tw-gradient-stops));","bg-linear-to-tr":"background-image:linear-gradient(to top right, var(--tw-gradient-stops));","bg-linear-to-r":"background-image:linear-gradient(to right, var(--tw-gradient-stops));","bg-linear-to-br":"background-image:linear-gradient(to bottom right, var(--tw-gradient-stops));","bg-linear-to-b":"background-image:linear-gradient(to bottom, var(--tw-gradient-stops));","bg-linear-to-bl":"background-image:linear-gradient(to bottom left, var(--tw-gradient-stops));","bg-linear-to-l":"background-image:linear-gradient(to left, var(--tw-gradient-stops));","bg-linear-to-tl":"background-image:linear-gradient(to top left, var(--tw-gradient-stops));","bg-radial":"background-image:radial-gradient(ellipse at center, var(--tw-gradient-stops));","bg-radial-at-t":"background-image:radial-gradient(ellipse at top, var(--tw-gradient-stops));","bg-radial-at-tr":"background-image:radial-gradient(ellipse at top right, var(--tw-gradient-stops));","bg-radial-at-r":"background-image:radial-gradient(ellipse at right, var(--tw-gradient-stops));","bg-radial-at-br":"background-image:radial-gradient(ellipse at bottom right, var(--tw-gradient-stops));","bg-radial-at-b":"background-image:radial-gradient(ellipse at bottom, var(--tw-gradient-stops));","bg-radial-at-bl":"background-image:radial-gradient(ellipse at bottom left, var(--tw-gradient-stops));","bg-radial-at-l":"background-image:radial-gradient(ellipse at left, var(--tw-gradient-stops));","bg-radial-at-tl":"background-image:radial-gradient(ellipse at top left, var(--tw-gradient-stops));","bg-radial-circle":"background-image:radial-gradient(circle at center, var(--tw-gradient-stops));","bg-radial-circle-at-t":"background-image:radial-gradient(circle at top, var(--tw-gradient-stops));","bg-radial-circle-at-tr":"background-image:radial-gradient(circle at top right, var(--tw-gradient-stops));","bg-radial-circle-at-r":"background-image:radial-gradient(circle at right, var(--tw-gradient-stops));","bg-radial-circle-at-br":"background-image:radial-gradient(circle at bottom right, var(--tw-gradient-stops));","bg-radial-circle-at-b":"background-image:radial-gradient(circle at bottom, var(--tw-gradient-stops));","bg-radial-circle-at-bl":"background-image:radial-gradient(circle at bottom left, var(--tw-gradient-stops));","bg-radial-circle-at-l":"background-image:radial-gradient(circle at left, var(--tw-gradient-stops));","bg-radial-circle-at-tl":"background-image:radial-gradient(circle at top left, var(--tw-gradient-stops));","bg-conic":"background-image:conic-gradient(from 0deg at center, var(--tw-gradient-stops));","bg-conic-at-t":"background-image:conic-gradient(from 0deg at top, var(--tw-gradient-stops));","bg-conic-at-tr":"background-image:conic-gradient(from 0deg at top right, var(--tw-gradient-stops));","bg-conic-at-r":"background-image:conic-gradient(from 0deg at right, var(--tw-gradient-stops));","bg-conic-at-br":"background-image:conic-gradient(from 0deg at bottom right, var(--tw-gradient-stops));","bg-conic-at-b":"background-image:conic-gradient(from 0deg at bottom, var(--tw-gradient-stops));","bg-conic-at-bl":"background-image:conic-gradient(from 0deg at bottom left, var(--tw-gradient-stops));","bg-conic-at-l":"background-image:conic-gradient(from 0deg at left, var(--tw-gradient-stops));","bg-conic-at-tl":"background-image:conic-gradient(from 0deg at top left, var(--tw-gradient-stops));"}),e},Qe=En();function Q(e,t){let r=0;for(let n=0;n<e.length;n++){const o=e[n];if(o==="["||o==="(")r++;else if((o==="]"||o===")")&&r>0)r--;else if(r===0&&(o===">"||o==="+"||o==="~"||o===" "))return e.slice(0,n)+t+e.slice(n)}return e+t}const _n={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${Q(e,":hover")}{${t}}`,focus:(e,t)=>`${Q(e,":focus")}{${t}}`,active:(e,t)=>`${Q(e,":active")}{${t}}`,disabled:(e,t)=>`${Q(e,":disabled")}{${t}}`,visited:(e,t)=>`${Q(e,":visited")}{${t}}`,checked:(e,t)=>`${Q(e,":checked")}{${t}}`,first:(e,t)=>`${Q(e,":first-child")}{${t}}`,last:(e,t)=>`${Q(e,":last-child")}{${t}}`,odd:(e,t)=>`${Q(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${Q(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${Q(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${Q(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}}`},et={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={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)"},tt=["sm","md","lg","xl","2xl"],nt=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function rt(e){const t=e.startsWith("-"),r=t?e.slice(1):e,n=r.lastIndexOf("-");if(n===-1)return null;const o=r.slice(0,n),i=r.slice(n+1);if(!Ye[o])return null;if(i.includes("/")){const[a,f]=i.split("/").map(m=>parseFloat(m));if(Number.isNaN(a)||Number.isNaN(f)||f===0)return null;const b=a/f*100;return Ye[o].map(m=>`${m}:${b}%;`).join("")}const s=parseFloat(i);if(Number.isNaN(s))return null;const c=t?"-":"";return Ye[o].map(a=>`${a}:calc(${c}${he} * ${s});`).join("")}function ot(e){const t=e.startsWith("-"),n=(t?e.slice(1):e).match(/^space-(x|y)-(.+)$/);if(!n)return null;const[,o,i]=n,s=o==="x";if(i==="reverse")return s?"--tw-space-x-reverse:1;":"--tw-space-y-reverse:1;";if(i.includes("/")){const[b,m]=i.split("/").map(u=>parseFloat(u));if(Number.isNaN(b)||Number.isNaN(m)||m===0)return null;const d=b/m*100,k=t?"-":"";return s?`--tw-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${k}${d}% * calc(1 - var(--tw-space-x-reverse)));margin-inline-end:calc(${k}${d}% * var(--tw-space-x-reverse));}`:`--tw-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${k}${d}% * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(${k}${d}% * var(--tw-space-y-reverse));}`}const c=parseFloat(i);if(Number.isNaN(c))return null;const f=`calc(${t?"-":""}${he} * ${c})`;return s?`--tw-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${f} * calc(1 - var(--tw-space-x-reverse)));margin-inline-end:calc(${f} * var(--tw-space-x-reverse));}`:`--tw-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${f} * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(${f} * var(--tw-space-y-reverse));}`}function _t(e){const t=e.replace("#",""),r=parseInt(t,16);return`${r>>16&255} ${r>>8&255} ${r&255}`}const Sn=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,An={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 Tn(e){const t=Sn.exec(e);if(!t)return null;const[,r,n,o="DEFAULT"]=t,i=It[n]?.[o];if(!i)return null;if(r==="shadow")return`--ce-shadow-color:${i};`;const s=An[r];return s?`${s}:${i};`:null}function On(e){const t=e.indexOf("/");if(t===-1)return{base:e};const r=e.slice(0,t),n=e.slice(t+1),o=parseInt(n,10);return isNaN(o)||o<0||o>100?{base:r}:{base:r,opacity:o/100}}function it(e){const{base:t,opacity:r}=On(e),n=Tn(t);if(n&&r!==void 0){const i=/#([0-9a-f]{6})/i.exec(n);if(i){const s=_t(i[0]);return n.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${r})`)}}if(n)return n;const o=Ve(t);if(o&&r!==void 0){const i=/#([0-9a-f]{6})/i.exec(o);if(i){const s=_t(i[0]);return o.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${r})`)}}return o}function st(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,r,n,o="DEFAULT"]=t,i=It[n]?.[o];if(!i)return null;switch(r){case"from":return`--tw-gradient-from:${i} var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);`;case"to":return`--tw-gradient-to:${i} var(--tw-gradient-to-position);`;case"via":return`--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), ${i} var(--tw-gradient-via-position), var(--tw-gradient-to);`;default:return null}}function at(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const r=parseInt(t[1],10);return r<0||r>100?null:`opacity:${r/100};`}function Ve(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 f=s.slice(c+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(a)?(f=f.replace(/_/g," "),f=f.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),f=f.replace(/^'([^']*)'$/g,'"$1"'),`${a}:${f};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const r=e.slice(0,t);let n=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(r==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n)?`font-size:${n};`:`color:${n};`;if(r==="rotate")return`transform:rotate(${n});`;if(r==="scale")return`transform:scale(${n});`;if(r==="translate-x")return`transform:translateX(${n});`;if(r==="translate-y")return`transform:translateY(${n});`;const i=o[r]??r.replace(/_/g,"-");return i&&n?`${i}:${n};`:null}function jn(e){if(e.startsWith("[")&&e.endsWith("]")){const r=e.slice(1,-1);return r.includes("&")?r:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const r=e.slice(t+2,-1).replace(/_/g,"-");return r.includes("&")?r:e.replace(/_/g,"-")}return null}function St(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Ln(e){const t=/class\s*=\s*(['"])([\s\S]*?)\1/g,r=[];let n;for(;n=t.exec(e);){const o=n[2].split(/\s+/).filter(Boolean);o.length&&r.push(...o)}return r}const Te=new Map,Pn=16,At=1e3;function Ft(e){const t=Date.now(),r=Te.get(e);if(r&&t-r.timestamp<Pn)return r.css;const n=Ln(e);if(!n.length)return"";const o=new Set(n),i=[[],[],[],[]],s={},c=(p,h=!1)=>{const l=h?`dark|${p}`:p;if(l in s)return s[l];const y=m(p,h);return s[l]=y,y},a=p=>{const h=p.some(w=>tt.includes(w)),l=p.some(w=>w.startsWith("@")&&(nt.includes(w.slice(1))||w.match(/^@\[.+\]$/))),y=p.includes("dark");return p.length?!h&&!y&&!l?1:y&&(h||l)?3:2:0},f=p=>{const h=[];let l="",y=0;for(let w=0;w<p.length;w++){const x=p[w];x==="["||x==="("?y++:(x==="]"||x===")")&&y--,x===":"&&y===0?(h.push(l),l=""):l+=x}return l&&h.push(l),h},b={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"},m=(p,h=!1)=>{const l=f(p);let y="",w=!1;for(const j of l){let H=j;if(H.startsWith("!")&&(w=!0,H=H.slice(1)),Qe[H]||rt(H)||ot(H)||at(H)||it(H)||st(H)||Ve(H)){y=j;break}}if(!y)return null;const x=y.replace(/^!/,""),_=Qe[x]??rt(x)??ot(x)??at(x)??it(x)??st(x)??Ve(x);if(!_)return null;const C=l.indexOf(y);let g=C>=0?l.slice(0,C):[];h&&(g=g.filter(j=>j!=="dark"));const A=`.${St(p)}`,T=w?_.replace(/;/g," !important;"):_,$="__SUBJECT__";let v=$;const S=[];for(const j of g)j.startsWith("group-")?(v=`.group:${j.slice(6)} ${v}`,S.push(j)):j.startsWith("peer-")&&(v=v.replace($,`.peer:${j.slice(5)}~${$}`),S.push(j));g=g.filter(j=>!S.includes(j));const L=[],E=[];let O=null;for(const j of g){if(j==="dark"||tt.includes(j)||j.startsWith("@")&&(nt.includes(j.slice(1))||j.match(/^@\[.+\]$/)))continue;const H=jn(j);if(H){O=H;continue}const F=b[j];if(F){O?E.push(F):L.push(F);continue}const Z=_n[j];typeof Z=="function"&&(v=Z(v,T).split("{")[0])}const R=L.join(""),B=E.join("");function ue(j,H){if(!H)return j;let F=0,Z=0;if(j.length&&(j[0]===">"||j[0]==="+"||j[0]==="~"||j[0]===" ")){let z=1;for(;z<j.length&&j[z]===" ";)z++;for(;z<j.length;z++){const G=j[z];if(G==="["?F++:G==="]"&&F>0?F--:G==="("?Z++:G===")"&&Z>0&&Z--,F===0&&Z===0&&(j[z]===">"||j[z]==="+"||j[z]==="~"||j[z]===" "))return j.slice(0,z)+H+j.slice(z)}return j+H}for(let z=0;z<j.length;z++){const G=j[z];if(G==="["?F++:G==="]"&&F>0?F--:G==="("?Z++:G===")"&&Z>0&&Z--,F===0&&Z===0&&(G===">"||G==="+"||G==="~"||G===" "))return j.slice(0,z)+H+j.slice(z)}return j+H}if(O)if(O.includes("&")){const j=O.indexOf("&"),H=O.slice(0,j),F=O.slice(j+1),Z=$+R;if(L.length===0)v=v.replace($,H+Z+B+F);else{const z=ue(F,B);v=v.replace($,H+Z+z)}}else v=v.replace($,`${O}${$+R}`),B&&(v=v.replace($,`${$}${B}`));else v=v.replace($,$+R+B);v=v.replace(new RegExp($,"g"),A);let D=`${v}{${T}}`;const N=g.filter(j=>tt.includes(j)),q=g.filter(j=>j.startsWith("@")&&(nt.includes(j.slice(1))||j.match(/^@\[.+\]$/))),se=N.length?N[N.length-1]:null,fe=q.length?q[q.length-1]:null,K=g.includes("dark");let ne="",le="";if(K&&se?ne=`@media (prefers-color-scheme: dark) and ${et[se]}`:K?ne="@media (prefers-color-scheme: dark)":se&&(ne=`@media ${et[se]}`),fe)if(fe.startsWith("@[")&&fe.endsWith("]")){const j=fe.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(j))return null;le=`@container (min-width:${j})`}else{const j=fe.slice(1);le=`@container ${Et[j]||`(min-width:${j})`}`}return ne&&le?D=`${ne}${le}{${D}}`:ne?D=`${ne}{${D}}`:le&&(D=`${le}{${D}}`),D};for(const p of o){const h=f(p),l=h.find(C=>Qe[C.replace(/^!/,"")]||rt(C.replace(/^!/,""))||ot(C.replace(/^!/,""))||at(C.replace(/^!/,""))||it(C.replace(/^!/,""))||st(C.replace(/^!/,""))||Ve(C.replace(/^!/,"")));if(!l)continue;const y=h.indexOf(l),w=y>=0?h.slice(0,y):[],x=a(w),_=c(p);_&&i[x].push(_)}const d=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const p of o)if(d.test(p)){if(i.flat().join("").includes(`.${St(p)}`))continue;const l=c(p);l&&i[0].push(l)}const k=p=>p.sort((h,l)=>{const y=A=>{const T={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const[$,v]of Object.entries(T))if(A.includes(`@media ${et[$]}`))return v;return-1},w=A=>{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[$,v]of Object.entries(T))if(A.includes(`@container ${Et[$]}`))return v;if(A.includes("@container (min-width:")){const $=/@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(A);if($){const v=parseFloat($[1]),S=$[2];return S==="rem"||S==="em"?v*16:v}}return-1},x=y(h),_=y(l),C=w(h),g=w(l);return x>=0&&_>=0&&x!==_?x-_:C>=0&&g>=0&&C!==g?C-g:0});i[2]=k(i[2]),i[3]=k(i[3]);const u=i.flat().join("");return Te.size>=At&&Array.from(Te.keys()).slice(0,Math.floor(At/2)).forEach(h=>Te.delete(h)),Te.set(e,{css:u,timestamp:t}),u}function De(e,t){return U(e?t:[],"when-block")}function Rn(e,t){return e.map((r,n)=>{const o=typeof r=="object"?r?.key??r?.id??`idx-${n}`:String(r);return U(t(r,n),`each-${o}`)})}function Wt(){const e=[];return{when(t,r){return e.push([t,r]),this},otherwise(t){return e.push([!0,t]),this},done(){return Mn(...e)}}}function Mn(...e){for(let t=0;t<e.length;t++){const[r,n]=e[t];if(r)return[U(n,`whenChain-branch-${t}`)]}return[U([],"whenChain-empty")]}function U(e,t){const r=e?Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean):[];return{tag:"#anchor",key:t,children:r}}const Ce={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 Nn(e,t){const{preset:r,show:n,mode:o="default",duration:i,appear:s=!1,css:c=!0,name:a,enterFrom:f,enterActive:b,enterTo:m,leaveFrom:d,leaveActive:k,leaveTo:u,onBeforeEnter:p,onEnter:h,onAfterEnter:l,onEnterCancelled:y,onBeforeLeave:w,onLeave:x,onAfterLeave:_,onLeaveCancelled:C}=e;let g;r&&Ce[r]?(g={...Ce[r]},f&&(g.enterFrom=f),b&&(g.enterActive=b),m&&(g.enterTo=m),d&&(g.leaveFrom=d),k&&(g.leaveActive=k),u&&(g.leaveTo=u)):g={enterFrom:f,enterActive:b,enterTo:m,leaveFrom:d,leaveActive:k,leaveTo:u};const A=a||(r?`transition-${r}`:"transition"),T=U(n?t:[],A);return T._transition={name:A,classes:g,mode:o,duration:i,appear:s,css:c,state:n?"visible":"hidden",hooks:{onBeforeEnter:p,onEnter:h,onAfterEnter:l,onEnterCancelled:y,onBeforeLeave:w,onLeave:x,onAfterLeave:_,onLeaveCancelled:C}},T}function Dn(e,t){const{tag:r="div",moveClass:n="transition-transform duration-300",preset:o,show:i=!0,mode:s="default",duration:c,appear:a=!1,css:f=!0,name:b,class:m,style:d,enterFrom:k,enterActive:u,enterTo:p,leaveFrom:h,leaveActive:l,leaveTo:y,onBeforeEnter:w,onEnter:x,onAfterEnter:_,onEnterCancelled:C,onBeforeLeave:g,onLeave:A,onAfterLeave:T,onLeaveCancelled:$}=e;let v;o&&Ce[o]?(v={...Ce[o]},k&&(v.enterFrom=k),u&&(v.enterActive=u),p&&(v.enterTo=p),h&&(v.leaveFrom=h),l&&(v.leaveActive=l),y&&(v.leaveTo=y)):v={enterFrom:k,enterActive:u,enterTo:p,leaveFrom:h,leaveActive:l,leaveTo:y};const S=b||(o?`transition-group-${o}`:"transition-group"),L=[];for(const E of i?t:[])if(E&&typeof E=="object"&&E.tag==="#anchor"){const O=Array.isArray(E.children)?E.children:[];for(const R of O)if(R&&typeof R=="object"){const B={...R,key:E.key||R.key,props:{...R.props,_anchorKey:E.key}};L.push(B)}else L.push(R)}else L.push(E);return{tag:r,children:L,key:S,props:{attrs:{...m?{class:m}:{},...d?{style:d}:{}},_transitionGroup:{name:S,classes:v,moveClass:n,mode:s,duration:c,appear:a,css:f,hooks:{onBeforeEnter:w,onEnter:x,onAfterEnter:_,onEnterCancelled:C,onBeforeLeave:g,onLeave:A,onAfterLeave:T,onLeaveCancelled:$}}}}}function Hn(e){return{...e}}let Ue=null;function Ge(){if(!Ue){const e=[];Object.values(Ce).forEach(n=>{n.enterFrom&&e.push(n.enterFrom),n.enterActive&&e.push(n.enterActive),n.enterTo&&e.push(n.enterTo),n.leaveFrom&&e.push(n.leaveFrom),n.leaveActive&&e.push(n.leaveActive),n.leaveTo&&e.push(n.leaveTo)});const t=`<div class="${e.join(" ")}"></div>`,r=Ft(t);Ue=new CSSStyleSheet,Ue.replaceSync(r)}return Ue}function Bn(){Ge()}Bn();const Re=[];function In(e,t,r,n,o,i,s,c){if(e){Re.push(r);try{const a=t.render(r);if(a instanceof Promise){i(!0),a.then(f=>{i(!1),s(null),Tt(e,f,r,n,o),c(e.innerHTML)}).catch(f=>{i(!1),s(f)});return}Tt(e,a,r,n,o),c(e.innerHTML)}finally{Re.pop()}}}function Tt(e,t,r,n,o){e&&(vn(e,Array.isArray(t)?t:[t],r,n),o(e.innerHTML))}function Fn(e,t,r,n,o,i,s){if(i!==null&&clearTimeout(i),Date.now()-t<16){if(o(r+1),r===15)ie(`⚠️ Component is re-rendering rapidly. This might indicate:
116
116
  Common causes:
117
117
  • Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
118
118
  • State modification during render
119
119
  • Missing dependencies in computed/watch
120
- Component rendering will be throttled to prevent browser freeze.`);else if(r>20){console.error(`🛑 Infinite loop detected in component render:
120
+ Component rendering will be throttled to prevent browser freeze.`);else if(r>20){I(`🛑 Infinite loop detected in component render:
121
121
  • This might be caused by state updates during render
122
122
  • Ensure all state modifications are done in event handlers or effects
123
- Stopping runaway component render to prevent browser freeze`),o(null);return}}else i(0);const p=setTimeout(()=>{n(Date.now()),e(),o(null)},r>10?100:0);o(p)}function cr(e,t,r,n,i){if(!e)return;const s=sr(r);if((!s||s.trim()==="")&&!t._computedStyle){i(null),e.adoptedStyleSheets=[tt()];return}let o="";t._computedStyle&&(o=t._computedStyle);let c=Ft(`${o}
124
- ${s}
125
- `);c=gt(c);let a=n;a||(a=new CSSStyleSheet),(a.cssRules.length===0||a.toString()!==c)&&a.replaceSync(c),e.adoptedStyleSheets=[tt(),a],i(a)}let P=null;function lr(e){P=e}function ur(){P=null}function fr(){if(!P)throw new Error("useEmit must be called during component render");const e=P.emit;return(t,r)=>e(t,r)}function pe(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function dr(e){if(!P)throw new Error("useOnConnected must be called during component render");pe(P),P._hookCallbacks.onConnected=e}function hr(e){if(!P)throw new Error("useOnDisconnected must be called during component render");pe(P),P._hookCallbacks.onDisconnected=e}function pr(e){if(!P)throw new Error("useOnAttributeChanged must be called during component render");pe(P),P._hookCallbacks.onAttributeChanged=e}function gr(e){if(!P)throw new Error("useOnError must be called during component render");pe(P),P._hookCallbacks.onError=e}function mr(e){if(!P)throw new Error("useProps must be called during component render");pe(P),P._hookCallbacks.props={...P._hookCallbacks.props||{},...e};const t=P,r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get(){const i=t[n];return i!=null&&i!==""?i:e[n]}})}),r}function yr(e){if(!P)throw new Error("useStyle must be called during component render");pe(P);try{const t=e();Object.defineProperty(P,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){console.warn("Error in useStyle callback:",t),Object.defineProperty(P,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const Le=new Map,ct=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[ct]||(e[ct]=Le)}function br(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=Le.get(e)||t,this._componentId=`${e}-${Math.random().toString(36).substr(2,9)}`;const r=this._initContext(t);Object.defineProperty(r,"refs",{value:this._refs,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(r,"requestRender",{value:()=>this.requestRender(),writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(r,"_requestRender",{value:()=>this._requestRender(),writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(r,"_componentId",{value:this._componentId,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(r,"_triggerWatchers",{value:(i,s)=>this._triggerWatchers(i,s),writable:!1,enumerable:!1,configurable:!1}),this.context=r,Object.defineProperty(this.context,"emit",{value:(i,s,o)=>{const c=new CustomEvent(i,{detail:s,bubbles:!0,composed:!0,...o||{}});return this.dispatchEvent(c),!c.defaultPrevented},writable:!1,enumerable:!1,configurable:!1});const n=Le.get(e)||t;Object.keys(n).forEach(i=>{const s=n[i];typeof s=="function"&&(this.context[i]=(...o)=>s(...o,this.context))}),this._applyComputed(n),n.props&&Object.keys(n.props).forEach(i=>{let s=this[i];Object.defineProperty(this,i,{get(){return s},set(o){const c=s;s=o,this.context[i]=o,this._initializing||(this._applyProps(n),c!==o&&this._requestRender())},enumerable:!0,configurable:!0})}),this._initializing=!1,this._initWatchers(n),this._applyProps(n),this._render(n)}connectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),this._requestRender(),Pt(t,this.context,this._mounted,r=>{this._mounted=r})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{Lt(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},r=>{this._templateLoading=r},r=>{this._templateError=r},r=>{this._mounted=r})})}attributeChangedCallback(r,n,i){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),n!==i&&this._requestRender(),Mt(t,r,n,i,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(ie):[]}_applyComputed(r){}_render(r){this._runLogicWithinErrorBoundary(r,()=>{or(this.shadowRoot,r,this.context,this._refs,n=>{this._lastHtmlStringForJitCSS=n,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(n)},n=>{this._templateLoading=n,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(n)},n=>{this._templateError=n,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(n)},n=>this._applyStyle(r,n))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{he(()=>{ar(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,r=>{this._lastRenderTime=r},r=>{this._renderCount=r},this._renderTimeoutId,r=>{this._renderTimeoutId=r})},this._componentId)})}_applyStyle(r,n){this._runLogicWithinErrorBoundary(r,()=>{cr(this.shadowRoot,this.context,n,this._styleSheet,i=>{this._styleSheet=i})})}_runLogicWithinErrorBoundary(r,n){this._hasError&&(this._hasError=!1);try{n()}catch(i){this._hasError=!0,r.onError&&r.onError(i,this.context)}}_initContext(r){try{let n=function(s,o=""){return Array.isArray(s)?new Proxy(s,{get(c,a,p){const h=Reflect.get(c,a,p);return typeof h=="function"&&typeof a=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(a)?function(...m){const d=h.apply(c,m);if(!i._initializing){const u=o||"root";i._triggerWatchers(u,c),he(()=>i._render(r),i._componentId)}return d}:h},set(c,a,p){if(c[a]=p,!i._initializing){const h=o?`${o}.${String(a)}`:String(a);i._triggerWatchers(h,p),he(()=>i._render(r),i._componentId)}return!0},deleteProperty(c,a){if(delete c[a],!i._initializing){const p=o?`${o}.${String(a)}`:String(a);i._triggerWatchers(p,void 0),he(()=>i._render(r),i._componentId)}return!0}}):s&&typeof s=="object"?s.constructor&&s.constructor.name==="ReactiveState"?s:(Object.keys(s).forEach(c=>{const a=o?`${o}.${c}`:c;s[c]=n(s[c],a)}),new Proxy(s,{set(c,a,p){const h=o?`${o}.${String(a)}`:String(a);return c[a]=n(p,h),i._initializing||(i._triggerWatchers(h,c[a]),he(()=>i._render(r),i._componentId)),!0},get(c,a,p){return Reflect.get(c,a,p)}})):s};const i=this;return n({...r.props?Object.fromEntries(Object.entries(r.props).map(([s,o])=>[s,o.default])):{}})}catch{return{}}}_initWatchers(r){this._runLogicWithinErrorBoundary(r,()=>{Ot(this.context,this._watchers,{})})}_triggerWatchers(r,n){jt(this.context,this._watchers,r,n)}_applyProps(r){this._runLogicWithinErrorBoundary(r,()=>{try{Rt(this,r,this.context)}catch(n){this._hasError=!0,r.onError&&r.onError(n,this.context)}})}}}function Ve(e,t){let r=ie(e);r.includes("-")||(r=`cer-${r}`);let n={};if(typeof window<"u")try{const o=t.toString();let c=null;const a=o.indexOf("({");if(a!==-1){let p=0,h=!1,x=null,m=!1,d=-1;for(let u=a+2;u<o.length;u++){const y=o[u];if(m){m=!1;continue}if(y==="\\"){m=!0;continue}if(!h&&(y==='"'||y==="'"||y==="`")){h=!0,x=y;continue}if(h&&y===x){h=!1,x=null;continue}if(!h){if(y==="{")p++;else if(y==="}"){if(p===0){d=u;break}p--}}}if(d!==-1){const u=o.substring(a,d+2),y=o.substring(a+2,d).trim();c=[u,y]}}if(c){const p=c[1];let h="",x="",m=!0,d=0,u=null,y=!1,w=0;for(;w<p.length;){const l=p[w];if(y){m?h+=l:x+=l,y=!1,w++;continue}if(l==="\\"){y=!0,m?h+=l:x+=l,w++;continue}if((l==='"'||l==="'"||l==="`")&&!u){u=l,m?h+=l:x+=l,w++;continue}if(l===u){u=null,m?h+=l:x+=l,w++;continue}if(u){m?h+=l:x+=l,w++;continue}if(l==="{"||l==="["){d++,m?h+=l:x+=l,w++;continue}if(l==="}"||l==="]"){d--,m?h+=l:x+=l,w++;continue}if(l==="="&&d===0&&m){m=!1,w++;continue}if(l===","&&d===0){if(h.trim()&&x.trim()){const f=h.trim(),b=x.trim();try{if(b==="true")n[f]=!0;else if(b==="false")n[f]=!1;else if(b==="[]")n[f]=[];else if(b==="{}")n[f]={};else if(/^\d+$/.test(b))n[f]=parseInt(b);else if(/^'.*'$/s.test(b))n[f]=b.slice(1,-1).replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\//g,"/");else if(/^".*"$/s.test(b))n[f]=b.slice(1,-1).replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\\//g,"/");else if(/^`.*`$/s.test(b)){const k=b.slice(1,-1);if(k.includes("${"))try{n[f]=new Function(`return \`${k}\`;`)()}catch{n[f]=k}else n[f]=k}else n[f]=b}catch{n[f]=""}}else if(h.trim()){const f=h.split(":")[0].trim();f&&!f.includes("}")&&(n[f]="")}h="",x="",m=!0,w++;continue}m?h+=l:x+=l,w++}if(h.trim()&&x.trim()){const l=h.trim(),f=x.trim();try{if(f==="true")n[l]=!0;else if(f==="false")n[l]=!1;else if(f==="[]")n[l]=[];else if(f==="{}")n[l]={};else if(/^\d+$/.test(f))n[l]=parseInt(f);else if(/^'.*'$/s.test(f))n[l]=f.slice(1,-1).replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\//g,"/");else if(/^".*"$/s.test(f))n[l]=f.slice(1,-1).replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\\//g,"/");else if(/^`.*`$/s.test(f)){const b=f.slice(1,-1);if(b.includes("${"))try{n[l]=new Function(`return \`${b}\`;`)()}catch{n[l]=b}else n[l]=b}else n[l]=f}catch{n[l]=""}}else if(h.trim()){const l=h.split(":")[0].trim();l&&!l.includes("}")&&(n[l]="")}}}catch{}let i={};const s={props:Object.fromEntries(Object.entries(n).map(([o,c])=>[o,{type:typeof c=="boolean"?Boolean:typeof c=="number"?Number:typeof c=="string"?String:Function,default:c}])),onConnected:o=>{i.onConnected&&i.onConnected()},onDisconnected:o=>{i.onDisconnected&&i.onDisconnected()},onAttributeChanged:(o,c,a,p)=>{i.onAttributeChanged&&i.onAttributeChanged(o,c,a)},onError:(o,c)=>{i.onError&&o&&i.onError(o)},render:o=>{const c=o._componentId||`${r}-${Math.random().toString(36).substr(2,9)}`;F.setCurrentComponent(c,()=>{o.requestRender&&o.requestRender()});try{lr(o);const a=Object.keys(n).length>0;let p;if(a){const h={};Object.keys(n).forEach(x=>{const m=o[x],d=n[x];h[x]=m!=null&&m!==""?m:d}),p=t(h)}else p=t();if(o._hookCallbacks){const h=o._hookCallbacks;h.onConnected&&(i.onConnected=h.onConnected),h.onDisconnected&&(i.onDisconnected=h.onDisconnected),h.onAttributeChanged&&(i.onAttributeChanged=h.onAttributeChanged),h.onError&&(i.onError=h.onError),h.style&&(o._styleCallback=h.style)}return p}finally{ur(),F.clearCurrentComponent()}}};Le.set(r,s),typeof window<"u"&&(customElements.get(r)||customElements.define(r,br(r,s)))}class wr{map=new Map;maxSize;constructor(t){this.maxSize=t}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}set(t,r){if(this.map.has(t)&&this.map.delete(t),this.map.set(t,r),this.map.size>this.maxSize){const n=this.map.keys().next().value;n!==void 0&&this.map.delete(n)}}has(t){return this.map.has(t)}clear(){this.map.clear()}}const Ue=new wr(500);function xr(e,t){if(e==null){console.warn(`⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`);return}typeof e!="function"&&console.warn(`🚨 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"&&console.warn(`💡 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 be(e,t={},r,n){const i=n??t.key;return{tag:e,key:i,props:t,children:r}}function Pe(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function Ae(e){return typeof e=="object"&&e!==null&&"tag"in e&&!Pe(e)}function vr(e,t){return e.key!=null?e:{...e,key:t}}function $r(e,t=[],r={}){const n={},i={},s={},o=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;let a;for(;a=c.exec(e);){const p=a[1],h=a[2],x=(a[4]||a[6])??"",m=x.match(/^{{(\d+)}}$/);let d=m?t[Number(m[1])]??null:x;m||(d==="true"?d=!0:d==="false"?d=!1:d==="null"?d=null:isNaN(Number(d))||(d=Number(d)));const u=["model","bind","show","class","style","ref"];if(p===":"){const[y,w]=h.split(":"),[l,...f]=y.split(".");if(u.includes(l)){const b=[...f],k=l==="model"&&w?`model:${w}`:l;s[k]={value:d,modifiers:b,arg:w}}else{let b=d;b&&te(b)&&(b=b.value),i[h]=b,o.push(h)}}else if(p==="@"){const[y,...w]=h.split("."),l=w;xr(d,y);const f=typeof d=="function"?d:typeof r[d]=="function"?r[d]:void 0;if(f){const b=C=>{if(l.includes("prevent")&&C.preventDefault(),l.includes("stop")&&C.stopPropagation(),!(l.includes("self")&&C.target!==C.currentTarget))return l.includes("once")&&C.currentTarget?.removeEventListener(y,b),f(C)},k="on"+y.charAt(0).toUpperCase()+y.slice(1);n[k]=b}}else h==="ref"?n.ref=d:i[h]=d}return{props:n,attrs:i,directives:s,bound:o}}function kr(e,t,r){const n=xe.length>0?xe[xe.length-1]:void 0,i=r??n,s=!r&&t.length===0,o=s?e.join("<!--TEMPLATE_DELIM-->"):null;if(s&&o){const g=Ue.get(o);if(g)return g}function c(g,$){return be("#text",{},g,$)}let a="";for(let g=0;g<e.length;g++)a+=e[g],g<t.length&&(a+=`{{${g}}}`);const p=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,h=[];let x,m=[],d=null,u={},y,w=0,l=[];function f(g){!g||typeof g!="object"||Pe(g)||(g.props||g.attrs?(g.props&&(u.props||(u.props={}),Object.assign(u.props,g.props)),g.attrs&&(u.attrs||(u.attrs={}),Object.keys(g.attrs).forEach($=>{if($==="style"&&u.attrs.style){const O=u.attrs.style.replace(/;?\s*$/,""),v=g.attrs.style.replace(/^;?\s*/,"");u.attrs.style=O+"; "+v}else if($==="class"&&u.attrs.class){const O=u.attrs.class.trim().split(/\s+/).filter(Boolean),v=g.attrs.class.trim().split(/\s+/).filter(Boolean),_=[...new Set([...O,...v])];u.attrs.class=_.join(" ")}else u.attrs[$]=g.attrs[$]}))):(u.props||(u.props={}),Object.assign(u.props,g)))}function b(g,$){const O=d?m:l;if(Pe(g)){const v=g.key??$;let _=g.children;O.push({...g,key:v,children:_});return}if(Ae(g)){O.push(vr(g,void 0));return}if(Array.isArray(g)){if(g.length===0)return;for(let v=0;v<g.length;v++){const _=g[v];Pe(_)||Ae(_)||Array.isArray(_)?b(_,`${$}-${v}`):_!==null&&typeof _=="object"?f(_):O.push(c(String(_),`${$}-${v}`))}return}if(g!==null&&typeof g=="object"){f(g);return}O.push(c(String(g),$))}const k=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;x=p.exec(a);)if(!(x[0].startsWith("<!--")&&x[0].endsWith("-->"))){if(x[1]){const g=x[1],$=x[0][1]==="/",O=x[0][x[0].length-2]==="/"||k.has(g),{props:v,attrs:_,directives:A,bound:D}=$r(x[2]||"",t,i),S={props:{},attrs:{}};for(const j in v)S.props[j]=v[j];for(const j in _)S.attrs[j]=_[j];if(S.attrs&&Object.prototype.hasOwnProperty.call(S.attrs,"key")&&!(S.props&&Object.prototype.hasOwnProperty.call(S.props,"key")))try{S.props.key=S.attrs.key}catch{}try{const j={input:["value","checked","disabled","readonly","required","placeholder","maxlength","minlength"],textarea:["value","disabled","readonly","required","placeholder","maxlength","minlength"],select:["value","disabled","required","multiple"],option:["selected","disabled","value"],video:["muted","autoplay","controls","loop","playsinline"],audio:["muted","autoplay","controls","loop"],img:["src","alt","width","height"],button:["type","name","value","disabled","autofocus","form"]},H=g.toLowerCase(),re=j[H]??[];if(S.attrs){for(const N of re)if(D&&D.includes(N)&&N in S.attrs&&!(S.props&&N in S.props)){let W=S.attrs[N];W&&te(W)&&(W=W.value),S.props[N]=W,delete S.attrs[N]}}if((g.includes("-")||!!i?.__customElements?.has?.(g))&&(S.isCustomElement=!0,D&&S.attrs)){const N=new Set(["id","name","data-key","key"]);for(const W of D)if(W in S.attrs&&!(S.props&&W in S.props)){const V=W.includes("-")?W.split("-").map((G,I)=>I===0?G:G.charAt(0).toUpperCase()+G.slice(1)).join(""):W;let K=S.attrs[W];K&&te(K)&&(K=K.value),S.props[V]=K,N.has(W)||delete S.attrs[W]}}}catch{}if(A&&Object.keys(A).some(j=>j==="model"||j.startsWith("model:")))try{const j=Symbol.for("cer.registry"),H=globalThis[j],re=!!(H&&typeof H.has=="function"&&H.has(g)),ke=!!(i&&(i.__customElements instanceof Set&&i.__customElements.has(g)||Array.isArray(i.__isCustomElements)&&i.__isCustomElements.includes(g)));if(!!(g.includes("-")||ke||re))for(const V of Object.keys(A)){if(V!=="model"&&!V.startsWith("model:"))continue;const K=A[V],G=K.arg??(V.includes(":")?V.split(":",2)[1]:void 0),I=K.value,Q=G??"modelValue",ne=q,E=Oe,T=i?i._state||i:void 0;let R;typeof I=="string"&&i?R=ne(T,I):(R=I,R&&te(R)&&(R=R.value)),S.props[Q]=R;try{const se=ie(Q);S.attrs||(S.attrs={}),R!==void 0&&(S.attrs[se]=R)}catch{}S.isCustomElement=!0;const L=`update:${ie(Q)}`.replace(/-([a-z])/g,(se,Y)=>Y.toUpperCase()),z="on"+L.charAt(0).toUpperCase()+L.slice(1);S.props[z]=function(se){const Y=se.detail!==void 0?se.detail:se.target?se.target.value:void 0;if(T)if(I&&te(I)){const le=I.value;(Array.isArray(Y)&&Array.isArray(le)?JSON.stringify([...Y].sort())!==JSON.stringify([...le].sort()):Y!==le)&&(I.value=Y,i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}else{const le=ne(T,typeof I=="string"?I:String(I));(Array.isArray(Y)&&Array.isArray(le)?JSON.stringify([...Y].sort())!==JSON.stringify([...le].sort()):Y!==le)&&(E(T,typeof I=="string"?I:String(I),Y),i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}},delete A[V]}}catch{}if(Object.keys(A).length>0&&(S.directives={...A}),$){const j=be(d,u,m.length===1&&Ae(m[0])&&m[0].tag==="#text"?typeof m[0].children=="string"?m[0].children:"":m.length?m:void 0,y),H=h.pop();H?(d=H.tag,u=H.props,y=H.key,m=H.children,m.push(j)):(l.push(j),d=null,u={},y=void 0,m=[])}else O?d?m.push(be(g,S,void 0,void 0)):l.push(be(g,S,void 0,void 0)):(d&&h.push({tag:d,props:u,children:m,key:y}),d=g,u=S,m=[])}else if(typeof x[3]<"u"){const g=Number(x[3]),$=t[g],O=`interp-${g}`;b($,O)}else if(x[4]){const g=x[4],$=d?m:l,O=g.split(/({{\d+}})/);for(const v of O){if(!v)continue;const _=v.match(/^{{(\d+)}}$/);if(_){const A=Number(_[1]),D=t[A],S=`interp-${A}`;b(D,S)}else{const A=`text-${w++}`;$.push(c(v,A))}}}}const C=l.filter(g=>Ae(g)&&g.tag==="#text"?typeof g.children=="string"&&g.children.trim()!=="":!0);if(C.length===1){const g=C[0];return s&&o&&Ue.set(o,g),g}else if(C.length>1){const g=C;return s&&o&&Ue.set(o,g),g}return be("div",{},"","fallback-root")}function oe(e,...t){const r=t[t.length-1],n=typeof r=="object"&&r&&!Array.isArray(r)?r:void 0;return kr(e,t,n)}function $e(e,t){return M(e?t:[],"when-block")}function Cr(e,t){return e.map((r,n)=>{const i=typeof r=="object"?r?.key??r?.id??`idx-${n}`:String(r);return M(t(r,n),`each-${i}`)})}function yt(){const e=[];return{when(t,r){return e.push([t,r]),this},otherwise(t){return e.push([!0,t]),this},done(){return _r(...e)}}}function _r(...e){for(let t=0;t<e.length;t++){const[r,n]=e[t];if(r)return[M(n,`whenChain-branch-${t}`)]}return[M([],"whenChain-empty")]}function M(e,t){const r=e?Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean):[];return{tag:"#anchor",key:t,children:r}}function Er(e,t){return $e(!e,t)}function Sr(e,t){const r=!e||e.length===0;return $e(r,t)}function Ar(e,t){const r=!!(e&&e.length>0);return $e(r,t)}function Or(e,t,r){const n=[];return e.forEach((i,s)=>{t(i,s)&&n.push({item:i,originalIndex:s})}),n.map(({item:i,originalIndex:s},o)=>{const c=typeof i=="object"&&i!=null?i?.key??i?.id??`filtered-${s}`:`filtered-${s}`;return M(r(i,s,o),`each-where-${c}`)})}function jr(e,t){const r=e?.length??0;return r===0&&t.empty?M(t.empty,"switch-length-empty"):r===1&&t.one?M(t.one(e[0]),"switch-length-one"):t.exactly?.[r]?M(t.exactly[r](e),`switch-length-${r}`):r>1&&t.many?M(t.many(e),"switch-length-many"):M([],"switch-length-fallback")}function Tr(e,t,r){const n=new Map;return e.forEach(i=>{const s=t(i);n.has(s)||n.set(s,[]),n.get(s).push(i)}),Array.from(n.entries()).map(([i,s],o)=>M(r(i,s,o),`each-group-${i}`))}function Rr(e,t,r,n){const i=r*t,s=Math.min(i+t,e.length);return e.slice(i,s).map((c,a)=>{const p=i+a,h=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${p}`:`page-${p}`;return M(n(c,p,a),`each-page-${h}`)})}function Pr(e,t){return e.loading&&t.loading?M(t.loading,"promise-loading"):e.error&&t.error?M(t.error(e.error),"promise-error"):e.data!==void 0&&t.success?M(t.success(e.data),"promise-success"):t.idle?M(t.idle,"promise-idle"):M([],"promise-fallback")}function U(e,t){const r=typeof window<"u"&&window.matchMedia?.(e)?.matches;return $e(!!r,t)}const ee={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)"},Qe=["sm","md","lg","xl","2xl"],bt={sm:e=>U(ee.sm,e),md:e=>U(ee.md,e),lg:e=>U(ee.lg,e),xl:e=>U(ee.xl,e),"2xl":e=>U(ee["2xl"],e),dark:e=>U(ee.dark,e),light:e=>U("(prefers-color-scheme: light)",e),touch:e=>U("(hover: none) and (pointer: coarse)",e),mouse:e=>U("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>U("(prefers-reduced-motion: reduce)",e),highContrast:e=>U("(prefers-contrast: high)",e),portrait:e=>U("(orientation: portrait)",e),landscape:e=>U("(orientation: landscape)",e)};function Lr(e,t){const r=[];e.includes("dark")?r.push(ee.dark):e.includes("light")&&r.push("(prefers-color-scheme: light)");const n=e.filter(o=>Qe.includes(o)),i=n[n.length-1];i&&i in ee&&r.push(ee[i]);const s=r.length>0?r.join(" and "):"all";return U(s,t)}function Mr(e){const t=[];return e.base&&t.push(M(e.base,"responsive-base")),Qe.forEach(r=>{const n=e[r];n&&t.push(bt[r](n))}),t}function Wr(e){const t=[];let r=null;return{case(n,i){const s=typeof n=="function"?n:o=>o===n;return t.push({condition:s,content:i}),this},when(n,i){return t.push({condition:n,content:i}),this},otherwise(n){return r=n,this},done(){for(let n=0;n<t.length;n++){const{condition:i,content:s}=t[n];if(i(e))return M(s,`switch-case-${n}`)}return M(r||[],"switch-otherwise")}}}class de extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return de.instance||(de.instance=new de),de.instance}emit(t,r){const n=Date.now(),i=this.eventCounters.get(t);if(!i||n-i.window>1e3)this.eventCounters.set(t,{count:1,window:n});else if(i.count++,i.count>50&&i.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!1,cancelable:!0}));const s=this.handlers[t];s&&s.forEach(o=>{try{o(r)}catch(c){ae(`Error in global event handler for "${t}":`,c)}})}on(t,r){return this.handlers[t]||(this.handlers[t]=new Set),this.handlers[t].add(r),()=>this.off(t,r)}off(t,r){const n=this.handlers[t];n&&n.delete(r)}offAll(t){delete this.handlers[t]}listen(t,r,n){return this.addEventListener(t,r,n),()=>this.removeEventListener(t,r)}once(t,r){return new Promise(n=>{const i=this.on(t,s=>{i(),r(s),n(s)})})}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[r,n]of this.eventCounters.entries())t[r]={count:n.count,handlersCount:this.getHandlerCount(r)};return t}resetEventCounters(){this.eventCounters.clear()}}const ge=de.getInstance(),Dr=(e,t)=>ge.emit(e,t),Ir=(e,t)=>ge.on(e,t),Nr=(e,t)=>ge.off(e,t),Hr=(e,t)=>ge.once(e,t),Br=(e,t,r)=>ge.listen(e,t,r);function Je(e){let t={...e};const r=[];function n(c){r.push(c),c(t)}function i(){return t}function s(c){const a=typeof c=="function"?c(t):c;t={...t,...a},o()}function o(){r.forEach(c=>c(t))}return{subscribe:n,getState:i,setState:s}}const Ze=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},X=(e,t)=>{for(const r of e){const n=[],i=r.path.replace(/:[^/]+/g,c=>(n.push(c.slice(1)),"([^/]+)")),s=new RegExp(`^${i}$`),o=t.match(s);if(o){const c={};return n.forEach((a,p)=>{c[a]=o[p+1]}),{route:r,params:c}}}return{route:null,params:{}}},qe={};async function wt(e){if(e.component)return e.component;if(e.load){if(qe[e.path])return qe[e.path];try{const t=await e.load();return qe[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 xt(e){const{routes:t,base:r="",initialUrl:n}=e;let i,s,o,c,a,p,h;const x=async(y,w)=>{const l=t.find(f=>X([f],y.path).route!==null);if(l?.beforeEnter)try{const f=await l.beforeEnter(y,w);return typeof f=="string"?(await u(f,!0),!1):f!==!1}catch(f){return ae("beforeEnter error",f),!1}return!0},m=async(y,w)=>{const l=t.find(f=>X([f],y.path).route!==null);if(l?.onEnter)try{const f=await l.onEnter(y,w);return typeof f=="string"?(await u(f,!0),!1):f!==!1}catch(f){return ae("onEnter error",f),!1}return!0},d=(y,w)=>{const l=t.find(f=>X([f],y.path).route!==null);if(l?.afterEnter)try{l.afterEnter(y,w)}catch(f){ae("afterEnter error",f)}},u=async(y,w=!1)=>{try{const l={path:y.replace(r,"")||"/",query:{}},f=X(t,l.path);if(!f)throw new Error(`No route found for ${l.path}`);const b=o.getState(),k={path:l.path,params:f.params,query:l.query};if(!await x(k,b)||!await m(k,b))return;typeof window<"u"&&typeof document<"u"&&(w?window.history.replaceState({},"",r+y):window.history.pushState({},"",r+y)),o.setState(k),d(k,b)}catch(l){ae("Navigation error:",l)}};if(typeof window<"u"&&typeof document<"u"&&typeof n>"u"){i=()=>{const w=new URL(window.location.href),l=w.pathname.replace(r,"")||"/",f=Ze(w.search);return{path:l,query:f}},s=i();const y=X(t,s.path);o=Je({path:s.path,params:y.params,query:s.query}),c=async(w=!1)=>{const l=i();await u(l.path,w)},window.addEventListener("popstate",()=>c(!0)),a=w=>u(w,!1),p=w=>u(w,!0),h=()=>window.history.back()}else{i=()=>{const l=new URL(n||"/","http://localhost"),f=l.pathname.replace(r,"")||"/",b=Ze(l.search);return{path:f,query:b}},s=i();const y=X(t,s.path);o=Je({path:s.path,params:y.params,query:s.query}),c=async()=>{const l=i();await w(l.path)};const w=async l=>{try{const f={path:l.replace(r,"")||"/",query:{}},b=X(t,f.path);if(!b)throw new Error(`No route found for ${f.path}`);const k=o.getState(),C={path:f.path,params:b.params,query:f.query},g=t.find($=>X([$],C.path).route!==null);if(g?.beforeEnter)try{const $=await g.beforeEnter(C,k);if(typeof $=="string"){await w($);return}if($===!1)return}catch{return}if(g?.onEnter)try{const $=await g.onEnter(C,k);if(typeof $=="string"){await w($);return}if($===!1)return}catch{return}if(o.setState(C),g?.afterEnter)try{g.afterEnter(C,k)}catch{}}catch{}};a=async l=>w(l),p=async l=>w(l),h=()=>{}}return{store:o,push:a,replace:p,back:h,subscribe:o.subscribe,matchRoute:y=>X(t,y),getCurrent:()=>o.getState(),resolveRouteComponent:wt}}function zr(e,t){return X(e,t)}function Ur(e){const t=xt(e);return Ve("router-view",(r={},n={})=>{const{onConnected:i}=n;if(i&&i(()=>{t&&typeof t.subscribe=="function"&&t.subscribe(()=>{})}),!t)return oe`<div>Router not initialized.</div>`;const s=t.getCurrent(),{path:o}=s,c=t.matchRoute(o);return c.route?t.resolveRouteComponent(c.route).then(a=>{if(typeof a=="string")return{tag:a,props:{},children:[]};if(typeof a=="function"){const p=a();return(p instanceof Promise?p:Promise.resolve(p)).then(x=>typeof x=="string"?{tag:x,props:{},children:[]}:x)}return oe`<div>Invalid route component</div>`}).catch(()=>oe`<div>Invalid route component</div>`):oe`<div>Not found</div>`}),Ve("router-link",(r={},n={})=>{const{to:i="",tag:s="a",replace:o=!1,exact:c=!1,activeClass:a="active",exactActiveClass:p="exact-active",ariaCurrentValue:h="page",disabled:x=!1,external:m=!1,class:d=""}=r,u=t.getCurrent(),y=u.path===i,w=c?y:u&&typeof u.path=="string"?u.path.startsWith(i):!1,l=y?`aria-current="${h}"`:"",f=(d||"").split(/\s+/).filter(Boolean),b={};for(const v of f)b[v]=!0;const k={...b,[a]:w,[p]:y},C=s==="button",g=x?C?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",$=m&&(s==="a"||!s)?'target="_blank" rel="noopener noreferrer"':"",O=v=>{if(x){v.preventDefault();return}m&&(s==="a"||!s)||(v.preventDefault(),o?t.replace(i):t.push(i))};return oe`
126
- ${yt().when(C,oe`
123
+ Stopping runaway component render to prevent browser freeze`),s(null);return}}else o(0);const f=setTimeout(()=>{n(Date.now()),e(),s(null)},r>10?100:0);s(f)}function Wn(e,t,r,n,o){if(!e)return;const i=Ft(r);if((!i||i.trim()==="")&&!t._computedStyle){o(null),e.adoptedStyleSheets=[Ct(),Ge()];return}let s="";t._computedStyle&&(s=t._computedStyle);let c=xn(`${s}
124
+ ${i}
125
+ `);c=Bt(c);let a=n;a||(a=new CSSStyleSheet),(a.cssRules.length===0||a.cssRules.length>0&&Array.from(a.cssRules).map(b=>b.cssText).join("")!==c)&&a.replaceSync(c),e.adoptedStyleSheets=[Ct(),Ge(),a],o(a)}let W=null;function Ot(e){W=e}function jt(){W=null}function zn(){if(!W)throw new Error("useEmit must be called during component render");const e=W.emit;return(t,r)=>e(t,r)}function Ee(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function Un(e){if(!W)throw new Error("useOnConnected must be called during component render");Ee(W),W._hookCallbacks.onConnected=e}function Kn(e){if(!W)throw new Error("useOnDisconnected must be called during component render");Ee(W),W._hookCallbacks.onDisconnected=e}function qn(e){if(!W)throw new Error("useOnAttributeChanged must be called during component render");Ee(W),W._hookCallbacks.onAttributeChanged=e}function Vn(e){if(!W)throw new Error("useOnError must be called during component render");Ee(W),W._hookCallbacks.onError=e}function Zn(e){if(!W)throw new Error("useProps must be called during component render");Ee(W),W._hookCallbacks.props={...W._hookCallbacks.props||{},...e};const t=W;try{const n=Object.keys(e||{});for(const o of n){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 f=te(o),b=a.getAttribute(f);if(b!==null){const m=typeof e[o];return m==="boolean"?b===""||b==="true":m==="number"?Number(b):b}if(typeof a[o]<"u"){const m=a[o];return M(m)||m&&typeof m=="object"&&"value"in m&&!(m instanceof Node)?m.value:typeof e[o]==="boolean"&&typeof m=="string"?m===""||m==="true":m}}}catch{}return c},set(a){c=a}})}catch{}}}catch{}return new Proxy({},{get(n,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 f=o.replace(/([A-Z])/g,"-$1").toLowerCase(),b=c.getAttribute(f);if(b!==null)return typeof i=="boolean"?b===""||b==="true":typeof i=="number"?Number(b):b}const a=c[o];if(typeof a<"u"&&a!=="")return typeof i=="boolean"&&i===!1&&a===""?i:M(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:M(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(n,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 Gn(e){if(!W)throw new Error("useStyle must be called during component render");Ee(W);try{const t=e();Object.defineProperty(W,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){ie("Error in useStyle callback:",t),Object.defineProperty(W,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const $e=new Map,Lt=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[Lt]||(e[Lt]=$e)}function Jn(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 r=this._initContext(t),n=(i,s,c)=>{Object.defineProperty(i,s,{value:c,writable:!1,enumerable:!1,configurable:!1})};n(r,"refs",this._refs),n(r,"requestRender",()=>this.requestRender()),n(r,"_requestRender",()=>this._requestRender()),n(r,"_componentId",this._componentId),n(r,"_triggerWatchers",(i,s)=>this._triggerWatchers(i,s)),this.context=r,P(()=>{n(r,"_host",this)}),n(this.context,"emit",(i,s,c)=>{const a={detail:s,bubbles:!0,composed:!0,...c||{}},f=new CustomEvent(i,a);this.dispatchEvent(f);const b=i.indexOf(":");if(b>0){const m=i.substring(0,b),d=i.substring(b+1),k=d.includes("-")?`${m}:${d.split("-").map((u,p)=>p===0?u:u.charAt(0).toUpperCase()+u.slice(1)).join("")}`:`${m}:${d.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;k!==i&&P(()=>{this.dispatchEvent(new CustomEvent(k,a))})}return!f.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(),on(t,this.context,this._mounted,r=>{this._mounted=r})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{sn(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},r=>{this._templateLoading=r},r=>{this._templateError=r},r=>{this._mounted=r})})}attributeChangedCallback(r,n,o){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),n!==o&&this._requestRender(),an(t,r,n,o,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(te):[]}_render(r){this._runLogicWithinErrorBoundary(r,()=>{In(this.shadowRoot,r,this.context,this._refs,n=>{this._lastHtmlStringForJitCSS=n,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(n)},n=>{this._templateLoading=n,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(n)},n=>{this._templateError=n,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(n)},n=>this._applyStyle(r,n))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{be(()=>{Fn(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,r=>{this._lastRenderTime=r},r=>{this._renderCount=r},this._renderTimeoutId,r=>{this._renderTimeoutId=r})},this._componentId)})}_applyStyle(r,n){this._runLogicWithinErrorBoundary(r,()=>{Wn(this.shadowRoot,this.context,n,this._styleSheet,o=>{this._styleSheet=o})})}_runLogicWithinErrorBoundary(r,n){this._hasError&&(this._hasError=!1);try{n()}catch(o){this._hasError=!0,r.onError&&r.onError(o,this.context)}}_initContext(r){try{let n=function(i,s=""){if(Array.isArray(i))return new Proxy(i,{get(c,a,f){const b=Reflect.get(c,a,f);return typeof b=="function"&&typeof a=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(a)?function(...d){const k=b.apply(c,d);if(!o._initializing){const u=s||"root";o._triggerWatchers(u,c),be(()=>o._render(r),o._componentId)}return k}:b},set(c,a,f){if(c[a]=f,!o._initializing){const b=s?`${s}.${String(a)}`:String(a);o._triggerWatchers(b,f),be(()=>o._render(r),o._componentId)}return!0},deleteProperty(c,a){if(delete c[a],!o._initializing){const f=s?`${s}.${String(a)}`:String(a);o._triggerWatchers(f,void 0),be(()=>o._render(r),o._componentId)}return!0}});if(i&&typeof i=="object"){if(M(i))return i;for(const c in i){const a=s?`${s}.${c}`:c;i[c]=n(i[c],a)}return new Proxy(i,{set(c,a,f){const b=s?`${s}.${String(a)}`:String(a);return c[a]=n(f,b),o._initializing||(o._triggerWatchers(b,c[a]),be(()=>o._render(r),o._componentId)),!0},get(c,a,f){return Reflect.get(c,a,f)}})}return i};const o=this;return n({...r.props?Object.fromEntries(Object.entries(r.props).map(([i,s])=>[i,s.default])):{}})}catch{return{}}}_initWatchers(r){this._runLogicWithinErrorBoundary(r,()=>{en(this.context,this._watchers,{})})}_triggerWatchers(r,n){tn(this.context,this._watchers,r,n)}_applyProps(r){this._runLogicWithinErrorBoundary(r,()=>{try{rn(this,r,this.context)}catch(n){this._hasError=!0,r.onError&&r.onError(n,this.context)}})}}}function dt(e,t){let r=te(e);r.includes("-")||(r=`cer-${r}`);let n={};const o={props:{},onConnected:i=>{n.onConnected&&n.onConnected()},onDisconnected:i=>{n.onDisconnected&&n.onDisconnected()},onAttributeChanged:(i,s,c,a)=>{n.onAttributeChanged&&n.onAttributeChanged(i,s,c)},onError:(i,s)=>{n.onError&&i&&n.onError(i)},render:i=>{const s=i._componentId||`${r}-${Math.random().toString(36).substr(2,9)}`;X.setCurrentComponent(s,()=>{i.requestRender&&i.requestRender()});try{Ot(i);const c=t();if(i._hookCallbacks){const a=i._hookCallbacks;if(a.onConnected&&(n.onConnected=a.onConnected),a.onDisconnected&&(n.onDisconnected=a.onDisconnected),a.onAttributeChanged&&(n.onAttributeChanged=a.onAttributeChanged),a.onError&&(n.onError=a.onError),a.style&&(i._styleCallback=a.style),a.props){const f=a.props;o.props=Object.fromEntries(Object.entries(f).map(([b,m])=>[b,{type:typeof m=="boolean"?Boolean:typeof m=="number"?Number:typeof m=="string"?String:Function,default:m}])),$e.set(r,o)}}return c}finally{jt(),X.clearCurrentComponent()}}};if($e.set(r,o),typeof window<"u"){try{const i={_hookCallbacks:{},requestRender:()=>{}};if(Ot(i),t(),jt(),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(r,o)}}catch{}customElements.get(r)||customElements.define(r,Jn(r,o))}}class Xn{map=new Map;maxSize;constructor(t){this.maxSize=t}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}set(t,r){if(this.map.delete(t),this.map.set(t,r),this.map.size>this.maxSize){const n=this.map.keys().next().value;n!==void 0&&this.map.delete(n)}}has(t){return this.map.has(t)}clear(){this.map.clear()}}const ct=new Xn(500);function Yn(e,t){if(e==null){ie(`⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`);return}typeof e!="function"&&ie(`🚨 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"&&ie(`💡 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 Oe(e,t={},r,n){const o=n??t.key;return{tag:e,key:o,props:t,children:r}}function Me(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function Pe(e){return typeof e=="object"&&e!==null&&"tag"in e&&!Me(e)}function Qn(e,t){return e.key!=null?e:{...e,key:t}}function er(e,t=[],r={}){const n={},o={},i={},s=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;let a;for(;a=c.exec(e);){const f=a[1],b=a[2],m=(a[4]||a[6])??"",d=a[3]===void 0&&a[6]===void 0,k=m.match(/^{{(\d+)}}$/);let u=d?!0:k?t[Number(k[1])]??null:m;k||(u==="true"?u=!0:u==="false"?u=!1:u==="null"?u=null:isNaN(Number(u))||(u=Number(u)));const p=["model","bind","show","class","style","ref","when"];if(f===":"){const[h,l]=b.split(":"),[y,...w]=h.split(".");if(p.includes(y)){const x=[...w],_=y==="model"&&l?`model:${l}`:y;i[_]={value:u,modifiers:x,arg:l}}else if(b==="disabled"){let x=u;x&&M(x)&&(x=x.value);const _=typeof x;if(x===""||_==="boolean"||_==="string"&&(x==="true"||x==="false")||x==null||_==="number")n[b]=x;else{let A=u;A&&M(A)&&(A=A.value),o[b]=A}s.push(b)}else{let x=u;x&&M(x)&&(x=x.value),o[b]=x,s.push(b)}}else if(f==="@"){const[h,...l]=b.split("."),y=l;Yn(u,h);const w=typeof u=="function"?u:typeof r[u]=="function"?r[u]:void 0;if(w){const x=C=>{if(y.includes("prevent")&&C.preventDefault(),y.includes("stop")&&C.stopPropagation(),!(y.includes("self")&&C.target!==C.currentTarget))return y.includes("once")&&C.currentTarget?.removeEventListener(h,x),w(C)},_="on"+h.charAt(0).toUpperCase()+h.slice(1);n[_]=x}}else b==="ref"?n.ref=u:o[b]=u}return{props:n,attrs:o,directives:i,bound:s}}function pt(e){if(!Pe(e)||Me(e))return e;const t=e.props?.directives;if(t&&t.when){const r=t.when.value,{when:n,...o}=t,i={...e.props};Object.keys(o).length>0?i.directives=o:delete i.directives;const s={...e,props:i};return Array.isArray(s.children)&&(s.children=s.children.map(a=>typeof a=="object"&&a!==null?pt(a):a)),{tag:"#anchor",key:e.key!=null?`when-${e.key}`:`when-${e.tag}`,children:r?[s]:[]}}if(Array.isArray(e.children)){const r=e.children.map(n=>typeof n=="object"&&n!==null?pt(n):n);return{...e,children:r}}return e}function tr(e,t,r){const n=Re.length>0?Re[Re.length-1]:void 0,o=r??n,i=!r&&t.length===0,s=i?e.join("<!--TEMPLATE_DELIM-->"):null;if(i&&s){const g=ct.get(s);if(g)return g}function c(g,A){return Oe("#text",{},g,A)}let a="";for(let g=0;g<e.length;g++)a+=e[g],g<t.length&&(a+=`{{${g}}}`);const f=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,b=[];let m,d=[],k=null,u={},p,h=0,l=[];function y(g){!g||typeof g!="object"||Me(g)||(g.props||g.attrs?(g.props&&(u.props||(u.props={}),Object.assign(u.props,g.props)),g.attrs&&(u.attrs||(u.attrs={}),Object.keys(g.attrs).forEach(A=>{if(A==="style"&&u.attrs.style){const T=u.attrs.style.replace(/;?\s*$/,""),$=g.attrs.style.replace(/^;?\s*/,"");u.attrs.style=T+"; "+$}else if(A==="class"&&u.attrs.class){const T=u.attrs.class.trim().split(/\s+/).filter(Boolean),$=g.attrs.class.trim().split(/\s+/).filter(Boolean),v=[...new Set([...T,...$])];u.attrs.class=v.join(" ")}else u.attrs[A]=g.attrs[A]}))):(u.props||(u.props={}),Object.assign(u.props,g)))}function w(g,A){const T=k?d:l;if(Me(g)){const $=g.key??A;let v=g.children;T.push({...g,key:$,children:v});return}if(Pe(g)){T.push(Qn(g,void 0));return}if(Array.isArray(g)){if(g.length===0)return;for(let $=0;$<g.length;$++){const v=g[$];Me(v)||Pe(v)||Array.isArray(v)?w(v,`${A}-${$}`):v!==null&&typeof v=="object"?y(v):T.push(c(String(v),`${A}-${$}`))}return}if(g!==null&&typeof g=="object"){y(g);return}T.push(c(String(g),A))}const x=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;m=f.exec(a);)if(!(m[0].startsWith("<!--")&&m[0].endsWith("-->"))){if(m[1]){const g=m[1],A=m[0][1]==="/",T=m[0][m[0].length-2]==="/"||x.has(g),{props:$,attrs:v,directives:S,bound:L}=er(m[2]||"",t,o),E={props:{},attrs:{}};for(const O in $)E.props[O]=$[O];for(const O in v)E.attrs[O]=v[O];E.attrs&&Object.prototype.hasOwnProperty.call(E.attrs,"key")&&!(E.props&&Object.prototype.hasOwnProperty.call(E.props,"key"))&&P(()=>{E.props.key=E.attrs.key});try{const O={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=g.toLowerCase(),B=O[R]??[];if(E.attrs){for(const D of B)if(L&&L.includes(D)&&D in E.attrs&&!(E.props&&D in E.props)){let N=E.attrs[D];if(N&&M(N))N=N.value,E.props[D]=N,delete E.attrs[D];else{const q=typeof N;D==="disabled"?(N===""||q==="boolean"||q==="string"&&(N==="true"||N==="false")||N==null||q==="number")&&(E.props[D]=N,P(()=>{const K=globalThis;K.__VDOM_DISABLED_PROMOTIONS||(K.__VDOM_DISABLED_PROMOTIONS=[]),K.__VDOM_DISABLED_PROMOTIONS.push({phase:"compiler-promotion",tag:g,propName:D,value:N,time:Date.now(),stack:new Error().stack})}),delete E.attrs[D]):(N===""||q==="string"||q==="number"||q==="boolean"||N==null)&&(E.props[D]=N,delete E.attrs[D])}}}if((g.includes("-")||!!o?.__customElements?.has?.(g))&&(E.isCustomElement=!0,L&&E.attrs)){const D=new Set(["id","name","data-key","key"]);for(const N of L)if(N in E.attrs&&!(E.props&&N in E.props)){const q=N.includes("-")?yt(N):N;let se=E.attrs[N];E.props[q]=se,D.has(N)||delete E.attrs[N]}}}catch{}if(S&&Object.keys(S).some(O=>O==="model"||O.startsWith("model:")))try{const O=Symbol.for("cer.registry"),R=globalThis[O],B=!!(R&&typeof R.has=="function"&&R.has(g)),ue=!!(o&&(o.__customElements instanceof Set&&o.__customElements.has(g)||Array.isArray(o.__isCustomElements)&&o.__isCustomElements.includes(g)));if(!!(g.includes("-")||ue||B))for(const q of Object.keys(S)){if(q!=="model"&&!q.startsWith("model:"))continue;const se=S[q],fe=se.arg??(q.includes(":")?q.split(":",2)[1]:void 0),K=se.value,ne=fe??"modelValue",le=V,j=Ze,H=o?o._state||o:void 0;let F;typeof K=="string"&&o?F=le(H,K):F=K,E.props[ne]=F;try{const de=te(ne);E.attrs||(E.attrs={}),F!=null&&(typeof F=="string"||typeof F=="number"||typeof F=="boolean")&&(E.attrs[de]=F)}catch{}E.isCustomElement=!0;const z=`update:${te(ne)}`.replace(/-([a-z])/g,(de,ae)=>ae.toUpperCase()),G="on"+z.charAt(0).toUpperCase()+z.slice(1);E.props[G]=function(de){const ae=de.detail!==void 0?de.detail:de.target?de.target.value:void 0;if(H)if(K&&M(K)){const ge=K.value;(Array.isArray(ae)&&Array.isArray(ge)?JSON.stringify([...ae].sort())!==JSON.stringify([...ge].sort()):ae!==ge)&&(K.value=ae,o?.requestRender?o.requestRender():o?._requestRender&&o._requestRender())}else{const ge=le(H,typeof K=="string"?K:String(K));(Array.isArray(ae)&&Array.isArray(ge)?JSON.stringify([...ae].sort())!==JSON.stringify([...ge].sort()):ae!==ge)&&(j(H,typeof K=="string"?K:String(K),ae),o?.requestRender?o.requestRender():o?._requestRender&&o._requestRender())}},delete S[q]}}catch{}if(Object.keys(S).length>0&&(E.directives={...S}),A){const O=Oe(k,u,d.length===1&&Pe(d[0])&&d[0].tag==="#text"?typeof d[0].children=="string"?d[0].children:"":d.length?d:void 0,p),R=b.pop();R?(k=R.tag,u=R.props,p=R.key,d=R.children,d.push(O)):(l.push(O),k=null,u={},p=void 0,d=[])}else T?k?d.push(Oe(g,E,void 0,void 0)):l.push(Oe(g,E,void 0,void 0)):(k&&b.push({tag:k,props:u,children:d,key:p}),k=g,u=E,d=[])}else if(typeof m[3]<"u"){const g=Number(m[3]),A=t[g],T=`interp-${g}`;w(A,T)}else if(m[4]){const g=m[4],A=k?d:l,T=g.split(/({{\d+}})/);for(const $ of T){if(!$)continue;const v=$.match(/^{{(\d+)}}$/);if(v){const S=Number(v[1]),L=t[S],E=`interp-${S}`;w(L,E)}else{const S=`text-${h++}`;A.push(c($,S))}}}}const C=l.filter(g=>Pe(g)&&g.tag==="#text"?typeof g.children=="string"&&g.children.trim()!=="":!0).map(g=>pt(g));if(C.length===1){const g=C[0];return i&&s&&ct.set(s,g),g}else if(C.length>1){const g=C;return i&&s&&ct.set(s,g),g}return Oe("div",{},"","fallback-root")}function pe(e,...t){const r=t[t.length-1],n=typeof r=="object"&&r&&!Array.isArray(r)?r:void 0;return tr(e,t,n)}function nr(e,t){return De(!e,t)}function rr(e,t){const r=!e||e.length===0;return De(r,t)}function or(e,t){const r=!!(e&&e.length>0);return De(r,t)}function ir(e,t,r){const n=[];return e.forEach((o,i)=>{t(o,i)&&n.push({item:o,originalIndex:i})}),n.map(({item:o,originalIndex:i},s)=>{const c=typeof o=="object"&&o!=null?o?.key??o?.id??`filtered-${i}`:`filtered-${i}`;return U(r(o,i,s),`each-where-${c}`)})}function sr(e,t){const r=e?.length??0;return r===0&&t.empty?U(t.empty,"switch-length-empty"):r===1&&t.one?U(t.one(e[0]),"switch-length-one"):t.exactly?.[r]?U(t.exactly[r](e),`switch-length-${r}`):r>1&&t.many?U(t.many(e),"switch-length-many"):U([],"switch-length-fallback")}function ar(e,t,r){const n=new Map;return e.forEach(o=>{const i=t(o);n.has(i)||n.set(i,[]),n.get(i).push(o)}),Array.from(n.entries()).map(([o,i],s)=>U(r(o,i,s),`each-group-${o}`))}function cr(e,t,r,n){const o=r*t,i=Math.min(o+t,e.length);return e.slice(o,i).map((c,a)=>{const f=o+a,b=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${f}`:`page-${f}`;return U(n(c,f,a),`each-page-${b}`)})}function lr(e,t){return e.loading&&t.loading?U(t.loading,"promise-loading"):e.error&&t.error?U(t.error(e.error),"promise-error"):e.data!==void 0&&t.success?U(t.success(e.data),"promise-success"):t.idle?U(t.idle,"promise-idle"):U([],"promise-fallback")}function J(e,t){const r=typeof window<"u"&&window.matchMedia?.(e)?.matches;return De(!!r,t)}const ce={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)"},bt=["sm","md","lg","xl","2xl"],zt={sm:e=>J(ce.sm,e),md:e=>J(ce.md,e),lg:e=>J(ce.lg,e),xl:e=>J(ce.xl,e),"2xl":e=>J(ce["2xl"],e),dark:e=>J(ce.dark,e),light:e=>J("(prefers-color-scheme: light)",e),touch:e=>J("(hover: none) and (pointer: coarse)",e),mouse:e=>J("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>J("(prefers-reduced-motion: reduce)",e),highContrast:e=>J("(prefers-contrast: high)",e),portrait:e=>J("(orientation: portrait)",e),landscape:e=>J("(orientation: landscape)",e)};function ur(e,t){const r=[];e.includes("dark")?r.push(ce.dark):e.includes("light")&&r.push("(prefers-color-scheme: light)");const n=e.filter(s=>bt.includes(s)),o=n[n.length-1];o&&o in ce&&r.push(ce[o]);const i=r.length>0?r.join(" and "):"all";return J(i,t)}function fr(e){const t=[];return e.base&&t.push(U(e.base,"responsive-base")),bt.forEach(r=>{const n=e[r];n&&t.push(zt[r](n))}),t}function dr(e){const t=[];let r=null;return{case(n,o){const i=typeof n=="function"?n:s=>s===n;return t.push({condition:i,content:o}),this},when(n,o){return t.push({condition:n,content:o}),this},otherwise(n){return r=n,this},done(){for(let n=0;n<t.length;n++){const{condition:o,content:i}=t[n];if(o(e))return U(i,`switch-case-${n}`)}return U(r||[],"switch-otherwise")}}}class ye extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return ye.instance||(ye.instance=new ye),ye.instance}emit(t,r){const n=Date.now(),o=this.eventCounters.get(t);if(!o||n-o.window>1e3)this.eventCounters.set(t,{count:1,window:n});else if(o.count++,o.count>50&&o.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!1,cancelable:!0}));const i=this.handlers[t];i&&i.forEach(s=>{try{s(r)}catch(c){I(`Error in global event handler for "${t}":`,c)}})}on(t,r){return this.handlers[t]||(this.handlers[t]=new Set),this.handlers[t].add(r),()=>this.off(t,r)}off(t,r){const n=this.handlers[t];n&&n.delete(r)}offAll(t){delete this.handlers[t]}listen(t,r,n){return this.addEventListener(t,r,n),()=>this.removeEventListener(t,r)}once(t,r){return new Promise(n=>{const o=this.on(t,i=>{o(),r(i),n(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[r,n]of this.eventCounters.entries())t[r]={count:n.count,handlersCount:this.getHandlerCount(r)};return t}resetEventCounters(){this.eventCounters.clear()}}const _e=ye.getInstance(),pr=(e,t)=>_e.emit(e,t),hr=(e,t)=>_e.on(e,t),gr=(e,t)=>_e.off(e,t),mr=(e,t)=>_e.once(e,t),yr=(e,t,r)=>_e.listen(e,t,r);function ht(e){let t={...e};const r=[];function n(c){r.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(){r.forEach(c=>c(t))}return{subscribe:n,getState:o,setState:i}}const gt=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},re=(e,t)=>{for(const r of e){const n=[],o=r.path.replace(/:[^/]+/g,c=>(n.push(c.slice(1)),"([^/]+)")),i=new RegExp(`^${o}$`),s=t.match(i);if(s){const c={};return n.forEach((a,f)=>{c[a]=s[f+1]}),{route:r,params:c}}}return{route:null,params:{}}},lt={};async function Ut(e){if(e.component)return e.component;if(e.load){if(lt[e.path])return lt[e.path];try{const t=await e.load();return lt[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 Kt(e){const{routes:t,base:r="",initialUrl:n}=e;let o,i,s,c,a,f,b;const m=async(p,h)=>{const l=t.find(y=>re([y],p.path).route!==null);if(l?.beforeEnter)try{const y=await l.beforeEnter(p,h);return typeof y=="string"?(await u(y,!0),!1):y!==!1}catch(y){return I("beforeEnter error",y),!1}return!0},d=async(p,h)=>{const l=t.find(y=>re([y],p.path).route!==null);if(l?.onEnter)try{const y=await l.onEnter(p,h);return typeof y=="string"?(await u(y,!0),!1):y!==!1}catch(y){return I("onEnter error",y),!1}return!0},k=(p,h)=>{const l=t.find(y=>re([y],p.path).route!==null);if(l?.afterEnter)try{l.afterEnter(p,h)}catch(y){I("afterEnter error",y)}},u=async(p,h=!1)=>{try{const l={path:p.replace(r,"")||"/",query:{}},y=re(t,l.path);if(!y)throw new Error(`No route found for ${l.path}`);const w=s.getState(),x={path:l.path,params:y.params,query:l.query};if(!await m(x,w)||!await d(x,w))return;typeof window<"u"&&typeof document<"u"&&(h?window.history.replaceState({},"",r+p):window.history.pushState({},"",r+p)),s.setState(x),k(x,w)}catch(l){I("Navigation error:",l)}};if(typeof window<"u"&&typeof document<"u"&&typeof n>"u"){o=()=>{const h=new URL(window.location.href),l=h.pathname.replace(r,"")||"/",y=gt(h.search);return{path:l,query:y}},i=o();const p=re(t,i.path);s=ht({path:i.path,params:p.params,query:i.query}),c=async(h=!1)=>{const l=o();await u(l.path,h)},window.addEventListener("popstate",()=>c(!0)),a=h=>u(h,!1),f=h=>u(h,!0),b=()=>window.history.back()}else{o=()=>{const l=new URL(n||"/","http://localhost"),y=l.pathname.replace(r,"")||"/",w=gt(l.search);return{path:y,query:w}},i=o();const p=re(t,i.path);s=ht({path:i.path,params:p.params,query:i.query}),c=async()=>{const l=o();await h(l.path)};const h=async l=>{try{const y={path:l.replace(r,"")||"/",query:{}},w=re(t,y.path);if(!w)throw new Error(`No route found for ${y.path}`);const x=s.getState(),_={path:y.path,params:w.params,query:y.query},C=t.find(g=>re([g],_.path).route!==null);if(C?.beforeEnter)try{const g=await C.beforeEnter(_,x);if(typeof g=="string"){await h(g);return}if(g===!1)return}catch{return}if(C?.onEnter)try{const g=await C.onEnter(_,x);if(typeof g=="string"){await h(g);return}if(g===!1)return}catch{return}if(s.setState(_),C?.afterEnter)try{C.afterEnter(_,x)}catch{}}catch{}};a=async l=>h(l),f=async l=>h(l),b=()=>{}}return{store:s,push:a,replace:f,back:b,subscribe:s.subscribe,matchRoute:p=>re(t,p),getCurrent:()=>s.getState(),resolveRouteComponent:Ut}}function br(e,t){return re(e,t)}function wr(e){const t=Kt(e);return dt("router-view",(r={},n={})=>{const{onConnected:o}=n;if(o&&o(()=>{t&&typeof t.subscribe=="function"&&t.subscribe(()=>{})}),!t)return pe`<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 f=a();return(f instanceof Promise?f:Promise.resolve(f)).then(m=>typeof m=="string"?{tag:m,props:{},children:[]}:m)}return pe`<div>Invalid route component</div>`}).catch(()=>pe`<div>Invalid route component</div>`):pe`<div>Not found</div>`}),dt("router-link",(r={},n={})=>{const{to:o="",tag:i="a",replace:s=!1,exact:c=!1,activeClass:a="active",exactActiveClass:f="exact-active",ariaCurrentValue:b="page",disabled:m=!1,external:d=!1,class:k=""}=r,u=t.getCurrent(),p=u.path===o,h=c?p:u&&typeof u.path=="string"?u.path.startsWith(o):!1,l=p?`aria-current="${b}"`:"",y=(k||"").split(/\s+/).filter(Boolean),w={};for(const T of y)w[T]=!0;const x={...w,[a]:h,[f]:p},_=i==="button",C=m?_?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",g=d&&(i==="a"||!i)?'target="_blank" rel="noopener noreferrer"':"",A=T=>{if(m){T.preventDefault();return}d&&(i==="a"||!i)||(T.preventDefault(),s?t.replace(o):t.push(o))};return pe`
126
+ ${Wt().when(_,pe`
127
127
  <button
128
128
  part="button"
129
- :class="${k}"
129
+ :class="${x}"
130
130
  ${l}
131
+ ${C}
131
132
  ${g}
132
- ${$}
133
- @click="${O}"
133
+ @click="${A}"
134
134
  ><slot></slot></button>
135
- `).otherwise(oe`
135
+ `).otherwise(pe`
136
136
  <a
137
137
  part="link"
138
- href="${i}"
139
- :class="${k}"
138
+ href="${o}"
139
+ :class="${x}"
140
140
  ${l}
141
+ ${C}
141
142
  ${g}
142
- ${$}
143
- @click="${O}"
143
+ @click="${A}"
144
144
  ><slot></slot></a>
145
145
  `).done()}
146
- `}),t}exports.GlobalEventBus=de;exports.anchorBlock=M;exports.component=Ve;exports.computed=St;exports.createStore=Je;exports.css=pt;exports.each=Cr;exports.eachGroup=Tr;exports.eachPage=Rr;exports.eachWhere=Or;exports.emit=Dr;exports.eventBus=ge;exports.html=oe;exports.initRouter=Ur;exports.listen=Br;exports.match=yt;exports.matchRoute=X;exports.matchRouteSSR=zr;exports.mediaVariants=ee;exports.off=Nr;exports.on=Ir;exports.once=Hr;exports.parseQuery=Ze;exports.ref=Et;exports.renderToString=Te;exports.resolveRouteComponent=wt;exports.responsive=bt;exports.responsiveOrder=Qe;exports.responsiveSwitch=Mr;exports.switchOn=Wr;exports.switchOnLength=jr;exports.switchOnPromise=Pr;exports.unless=Er;exports.useEmit=fr;exports.useOnAttributeChanged=pr;exports.useOnConnected=dr;exports.useOnDisconnected=hr;exports.useOnError=gr;exports.useProps=mr;exports.useRouter=xt;exports.useStyle=yr;exports.watch=At;exports.when=$e;exports.whenEmpty=Sr;exports.whenMedia=U;exports.whenNotEmpty=Ar;exports.whenVariants=Lr;
146
+ `}),t}exports.GlobalEventBus=ye;exports.Transition=Nn;exports.TransitionGroup=Dn;exports.anchorBlock=U;exports.component=dt;exports.computed=Yt;exports.createStore=ht;exports.createTransitionPreset=Hn;exports.css=Ht;exports.each=Rn;exports.eachGroup=ar;exports.eachPage=cr;exports.eachWhere=ir;exports.emit=pr;exports.eventBus=_e;exports.getTransitionStyleSheet=Ge;exports.html=pe;exports.initRouter=wr;exports.listen=yr;exports.match=Wt;exports.matchRoute=re;exports.matchRouteSSR=br;exports.mediaVariants=ce;exports.off=gr;exports.on=hr;exports.once=mr;exports.parseQuery=gt;exports.ref=Xt;exports.renderToString=qe;exports.resolveRouteComponent=Ut;exports.responsive=zt;exports.responsiveOrder=bt;exports.responsiveSwitch=fr;exports.switchOn=dr;exports.switchOnLength=sr;exports.switchOnPromise=lr;exports.transitionPresets=Ce;exports.unless=nr;exports.useEmit=zn;exports.useOnAttributeChanged=qn;exports.useOnConnected=Un;exports.useOnDisconnected=Kn;exports.useOnError=Vn;exports.useProps=Zn;exports.useRouter=Kt;exports.useStyle=Gn;exports.watch=Qt;exports.when=De;exports.whenEmpty=rr;exports.whenMedia=J;exports.whenNotEmpty=or;exports.whenVariants=ur;
147
147
  //# sourceMappingURL=custom-elements-runtime.cjs.js.map