@jasonshimmy/custom-elements-runtime 1.2.2 → 2.0.0
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.
- package/README.md +157 -83
- package/dist/custom-elements-runtime.cjs.js +6 -146
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.directive-enhancements.cjs.js +2 -0
- package/dist/custom-elements-runtime.directive-enhancements.cjs.js.map +1 -0
- package/dist/custom-elements-runtime.directive-enhancements.es.js +144 -0
- package/dist/custom-elements-runtime.directive-enhancements.es.js.map +1 -0
- package/dist/custom-elements-runtime.directives.cjs.js +2 -0
- package/dist/custom-elements-runtime.directives.cjs.js.map +1 -0
- package/dist/custom-elements-runtime.directives.es.js +49 -0
- package/dist/custom-elements-runtime.directives.es.js.map +1 -0
- package/dist/custom-elements-runtime.es.js +2194 -4424
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.event-bus.cjs.js +2 -0
- package/dist/custom-elements-runtime.event-bus.cjs.js.map +1 -0
- package/dist/custom-elements-runtime.event-bus.es.js +147 -0
- package/dist/custom-elements-runtime.event-bus.es.js.map +1 -0
- package/dist/custom-elements-runtime.router.cjs.js +29 -0
- package/dist/custom-elements-runtime.router.cjs.js.map +1 -0
- package/dist/custom-elements-runtime.router.es.js +305 -0
- package/dist/custom-elements-runtime.router.es.js.map +1 -0
- package/dist/custom-elements-runtime.ssr.cjs.js +2 -0
- package/dist/custom-elements-runtime.ssr.cjs.js.map +1 -0
- package/dist/custom-elements-runtime.ssr.es.js +18 -0
- package/dist/custom-elements-runtime.ssr.es.js.map +1 -0
- package/dist/custom-elements-runtime.store.cjs.js +2 -0
- package/dist/custom-elements-runtime.store.cjs.js.map +1 -0
- package/dist/custom-elements-runtime.store.es.js +25 -0
- package/dist/custom-elements-runtime.store.es.js.map +1 -0
- package/dist/custom-elements-runtime.transitions.cjs.js +2 -0
- package/dist/custom-elements-runtime.transitions.cjs.js.map +1 -0
- package/dist/custom-elements-runtime.transitions.es.js +10 -0
- package/dist/custom-elements-runtime.transitions.es.js.map +1 -0
- package/dist/directive-enhancements.d.ts +6 -6
- package/dist/directives.d.ts +2 -2
- package/dist/event-bus.d.ts +20 -11
- package/dist/helpers-CDfJhmMS.js +609 -0
- package/dist/helpers-CDfJhmMS.js.map +1 -0
- package/dist/helpers-D3UjNfYY.cjs +5 -0
- package/dist/helpers-D3UjNfYY.cjs.map +1 -0
- package/dist/index.d.ts +6 -20
- package/dist/logger-BpibrmKL.js +25 -0
- package/dist/logger-BpibrmKL.js.map +1 -0
- package/dist/logger-CqdBMdui.cjs +2 -0
- package/dist/logger-CqdBMdui.cjs.map +1 -0
- package/dist/router.d.ts +10 -15
- package/dist/runtime/component.d.ts +3 -3
- package/dist/runtime/event-manager.d.ts +3 -3
- package/dist/runtime/helpers.d.ts +4 -4
- package/dist/runtime/hooks.d.ts +3 -3
- package/dist/runtime/lifecycle.d.ts +1 -1
- package/dist/runtime/logger.d.ts +3 -3
- package/dist/runtime/node-metadata.d.ts +11 -2
- package/dist/runtime/props.d.ts +2 -2
- package/dist/runtime/reactive-proxy-cache.d.ts +6 -3
- package/dist/runtime/reactive.d.ts +5 -4
- package/dist/runtime/render.d.ts +4 -4
- package/dist/runtime/secure-expression-evaluator.d.ts +1 -1
- package/dist/runtime/template-compiler.d.ts +10 -10
- package/dist/runtime/transition-group-handler.d.ts +21 -0
- package/dist/runtime/transition-utils.d.ts +43 -3
- package/dist/runtime/types.d.ts +27 -17
- package/dist/runtime/vdom-model-helpers.d.ts +7 -7
- package/dist/runtime/vdom-ssr.d.ts +9 -0
- package/dist/runtime/vdom.d.ts +30 -22
- package/dist/runtime/watchers.d.ts +3 -3
- package/dist/ssr.d.ts +6 -0
- package/dist/store.d.ts +5 -1
- package/dist/transitions-Crm12oGl.cjs +115 -0
- package/dist/transitions-Crm12oGl.cjs.map +1 -0
- package/dist/transitions-D5YybtBE.js +1415 -0
- package/dist/transitions-D5YybtBE.js.map +1 -0
- package/dist/transitions.d.ts +5 -0
- package/package.json +57 -8
- package/dist/custom-elements-runtime.umd.js +0 -153
- package/dist/custom-elements-runtime.umd.js.map +0 -1
|
@@ -1,153 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var nt=typeof document<"u"?document.currentScript:null;const hn={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};let Ce=!1;try{const e=globalThis.process;e&&e.env?Ce=e.env.NODE_ENV!=="production":typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:nt&&nt.tagName.toUpperCase()==="SCRIPT"&&nt.src||new URL("custom-elements-runtime.cjs.js",document.baseURI).href}<"u"&&hn?Ce=!1:Ce=typeof window<"u"}catch{Ce=!0}function H(e,...t){Ce&&console.error(e,...t)}function te(e,...t){Ce&&console.warn(e,...t)}class gn{pendingUpdates=new Map;isFlushScheduled=!1;schedule(t,n){const r=n||t;this.pendingUpdates.set(r,t),this.isFlushScheduled||(this.isFlushScheduled=!0,typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&(window.__vitest__||window.Cypress)?this.flush():queueMicrotask(()=>this.flush()))}flush(){const t=this.pendingUpdates;this.pendingUpdates=new Map,this.isFlushScheduled=!1;for(const n of t.values())try{n()}catch(r){H("Error in batched update:",r)}}get pendingCount(){return this.pendingUpdates.size}}const mn=new gn;function $e(e,t){mn.schedule(e,t)}const Tt=new WeakSet;class yn{static cache=new WeakMap;static arrayHandlerCache=new WeakMap;static objectHandlerCache=new WeakMap;static getOrCreateProxy(t,n,r=!1){const o=this.cache.get(t);if(o)return o;const i=r?this.getOrCreateArrayHandler(n):this.getOrCreateObjectHandler(n),s=new Proxy(t,i);try{Vt.markAsProxy(s)}catch{}return this.cache.set(t,s),s}static getOrCreateArrayHandler(t){if(!this.arrayHandlerCache.has(t)){const n={get:(r,o,i)=>{const s=Reflect.get(r,o,i);return typeof s=="function"&&typeof o=="string"&&["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].includes(o)?function(...a){const l=s.apply(r,a);return t.triggerUpdate(),l}:s},set:(r,o,i)=>(r[o]=t.makeReactiveValue(i),t.triggerUpdate(),!0),deleteProperty:(r,o)=>(delete r[o],t.triggerUpdate(),!0)};this.arrayHandlerCache.set(t,n)}return this.arrayHandlerCache.get(t)}static getOrCreateObjectHandler(t){if(!this.objectHandlerCache.has(t)){const n={get:(r,o,i)=>Reflect.get(r,o,i),set:(r,o,i)=>(r[o]=t.makeReactiveValue(i),t.triggerUpdate(),!0),deleteProperty:(r,o)=>(delete r[o],t.triggerUpdate(),!0)};this.objectHandlerCache.set(t,n)}return this.objectHandlerCache.get(t)}static hasProxy(t){return this.cache.has(t)}static clear(){this.cache=new WeakMap,this.arrayHandlerCache=new WeakMap,this.objectHandlerCache=new WeakMap}static getStats(){return{hasCachedProxies:this.cache instanceof WeakMap}}}class Vt{static contextCache=new WeakMap;static createReactiveProxy(t,n,r){try{if(Tt.has(t))return t}catch{}const o=Array.isArray(t);let i=this.contextCache.get(n);i||(i=new WeakMap,this.contextCache.set(n,i));let s=i.get(r);return s||(s={triggerUpdate:n,makeReactiveValue:r},i.set(r,s)),yn.getOrCreateProxy(t,s,o)}static markAsProxy(t){if(t)try{Tt.add(t)}catch{}}}class bn{currentComponent=null;componentData=new Map;stateStorage=new Map;trackingDisabled=!1;setCurrentComponent(t,n){if(this.currentComponent=t,!this.componentData.has(t))this.componentData.set(t,{dependencies:new Set,renderFn:n,stateIndex:0,lastWarnTime:0});else{const r=this.componentData.get(t);r.renderFn=n,r.stateIndex=0}}clearCurrentComponent(){this.currentComponent=null}disableTracking(){this.trackingDisabled=!0}enableTracking(){this.trackingDisabled=!1}isRenderingComponent(){return this.currentComponent!==null}shouldEmitRenderWarning(){if(!this.currentComponent)return!0;const t=this.componentData.get(this.currentComponent);if(!t)return!0;const n=Date.now();return n-t.lastWarnTime<1e3?!1:(t.lastWarnTime=n,!0)}withoutTracking(t){const n=this.trackingDisabled;this.trackingDisabled=!0;try{return t()}finally{this.trackingDisabled=n}}getOrCreateState(t){if(!this.currentComponent)return new Xe(t);const n=this.componentData.get(this.currentComponent);if(!n)return new Xe(t);const r=`${this.currentComponent}:${n.stateIndex++}`;let o=this.stateStorage.get(r);return o||(o=new Xe(t),this.stateStorage.set(r,o)),o}trackDependency(t){if(this.trackingDisabled||!this.currentComponent)return;const n=this.componentData.get(this.currentComponent);n&&(n.dependencies.add(t),t.addDependent(this.currentComponent))}triggerUpdate(t){const n=t.getDependents();for(const r of n){const o=this.componentData.get(r);o&&$e(o.renderFn,r)}}cleanup(t){const n=this.componentData.get(t);if(n){for(const o of n.dependencies)o.removeDependent(t);this.componentData.delete(t)}const r=t+":";for(const o of this.stateStorage.keys())o.startsWith(r)&&this.stateStorage.delete(o)}}const ee=new bn;class Xe{_value;dependents=new Set;constructor(t){this._value=this.makeReactive(t);try{const n=Symbol.for("@cer/ReactiveState");Object.defineProperty(this,n,{value:!0,enumerable:!1,configurable:!1})}catch{}}get value(){return ee.trackDependency(this),this._value}set value(t){ee.isRenderingComponent()&&ee.shouldEmitRenderWarning()&&te(`🚨 State modification detected during render! This can cause infinite loops.
|
|
2
|
-
• Move state updates to event handlers
|
|
3
|
-
• Use useEffect/watch for side effects
|
|
4
|
-
• Ensure computed properties don't modify state`),this._value=this.makeReactive(t),ee.triggerUpdate(this)}addDependent(t){this.dependents.add(t)}removeDependent(t){this.dependents.delete(t)}getDependents(){return this.dependents}makeReactive(t){return t===null||typeof t!="object"||t instanceof Node||t instanceof Element||t instanceof HTMLElement?t:Vt.createReactiveProxy(t,()=>ee.triggerUpdate(this),n=>this.makeReactive(n))}}function bt(e){return ee.getOrCreateState(e===void 0?null:e)}function R(e){if(!e||typeof e!="object")return!1;try{const t=Symbol.for("@cer/ReactiveState");return!!e[t]}catch{return!1}}function me(e){const t=new Xe(e());return{get value(){return ee.trackDependency(t),e()}}}function vn(e,t,n={}){let r=e();n.immediate&&t(r,r);const o=`watch-${Math.random().toString(36).substr(2,9)}`,i=()=>{ee.setCurrentComponent(o,i);const s=e();ee.clearCurrentComponent(),s!==r&&(t(s,r),r=s)};return ee.setCurrentComponent(o,i),e(),ee.clearCurrentComponent(),()=>{ee.cleanup(o)}}const M=e=>{try{e()}catch{}},Be=new Map,ze=new Map,Ue=new Map,_t=500;let jt,Gt,Lt=!1,Ot=!1,Pt;const wn=!!(globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);function se(e){if(Be.has(e))return Be.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return Be.size<_t&&Be.set(e,t),t}function At(e){if(ze.has(e))return ze.get(e);const t=e.replace(/-([a-z])/g,(n,r)=>r.toUpperCase());return ze.size<_t&&ze.set(e,t),t}function qe(e){if(typeof e=="string"){if(Ue.has(e))return Ue.get(e);const t=e.replace(/[&<>"']/g,n=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[n]);return t!==e&&Ue.size<_t&&Ue.set(e,t),t}return e}function le(e){if(!e)return"";const t=String(e);if(typeof document<"u"&&typeof document.createElement=="function"){const c=t.replace(/</g,"").replace(/>/g,""),a=Pt||(Pt=document.createElement("div"));try{le._el=a}catch{}return a.innerHTML=c,(a.textContent||"").replace(new RegExp("","g"),"<").replace(new RegExp("","g"),">")}const n={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "},r=jt??le._namedMap;let o=r;if(!o&&wn)try{const i=globalThis.require;if(typeof i=="function"){const s=["@jasonshimmy/custom-elements-runtime/entities.json","../../entities.json","../../../entities.json","../entities.json","./entities.json"];for(const c of s)try{const a=i(c);if(a){o=a;break}}catch{}}}catch{}if(!o){o=n,Lt=!0;try{le._usedFallback=!0}catch{}const i=le._namedMapLoader??Gt;i&&i().then(s=>{jt=s;try{le._namedMap=s}catch{}}).catch(()=>{})}if((Lt||le._usedFallback)&&!(Ot||le._warnedFallback)){Ot=!0;try{le._warnedFallback=!0}catch{}try{te("decodeEntities: using small SSR fallback entity map. Register the full entities.json via registerEntityMap(entities) on the server to enable full HTML5 named-entity decoding.")}catch{}}return t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(i,s)=>{if(s.charCodeAt(0)===35){const l=(s.charAt(1)||"").toLowerCase()==="x"?parseInt(s.slice(2),16):parseInt(s.slice(1),10);return Number.isNaN(l)?`&${s};`:String.fromCodePoint(l)}const c=o[s]??(r&&r[s]);return c!==void 0?c:`&${s};`})}async function Zt(){const e=["@jasonshimmy","custom-elements-runtime","entities.json"].join("/");try{const t=await import(e);return t&&(t.default||t)}catch{try{const t=[e,"./entities.json","../../entities.json","../../../entities.json"];for(const n of t)try{const r=await import(n);if(r)return r&&(r.default||r)}catch{}return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}catch{return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}}}Gt=Zt;le._namedMapLoader=Zt;function xn(e){const t=String(e);return{__unsafeHTML:t,__rawHTML:t}}function Mt(e){return!!e&&(typeof e.__unsafeHTML=="string"||typeof e.__rawHTML=="string")}function J(e,t){if(typeof t=="string"){const n=t.split(".").reduce((r,o)=>r?.[o],e);return R(n)?n.value:n}return t}function et(e,t,n){const r=String(t).split("."),o=r.pop();if(!o)return;const i=r.reduce((s,c)=>(s[c]==null&&(s[c]={}),s[c]),e);R(i[o])?i[o].value=n:i[o]=n}function kn(e){try{if(e&&typeof e=="object"){if(R(e))return e.value;if("value"in e){const t=e.value;return t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"?t:e}}}catch{}return e}function X(e){const t=kn(e);if(t==null)return null;const n=typeof t;return n==="string"||n==="number"||n==="boolean"?String(t):null}function Jt(e){if(!e||typeof e!="string")return!1;if(e==="class"||e.endsWith("Class"))return!0;if(e.includes("-"))try{if(e.split("-").some(n=>n==="class"))return!0}catch{}return!1}function $n(e,t,n){if(n)for(const[r,o]of Object.entries(n)){let i,s={};if(Array.isArray(o)?(i=o[0],s=o[1]||{}):i=o,t.set(r,{callback:i,options:s,oldValue:J(e,r)}),s.immediate)try{const c=J(e,r);i(c,void 0,e)}catch(c){H(`Error in immediate watcher for "${r}":`,c)}}}function Cn(e,t,n,r){const o=(s,c)=>{if(s===c)return!0;if(typeof s!=typeof c||typeof s!="object"||s===null||c===null)return!1;if(Array.isArray(s)&&Array.isArray(c))return s.length!==c.length?!1:s.every((m,y)=>o(m,c[y]));const a=Object.keys(s),l=Object.keys(c);return a.length!==l.length?!1:a.every(m=>o(s[m],c[m]))},i=t.get(n);if(i&&!o(r,i.oldValue))try{i.callback(r,i.oldValue,e),i.oldValue=r}catch(s){H(`Error in watcher for "${n}":`,s)}for(const[s,c]of t.entries())if(c.options.deep&&n.startsWith(s+"."))try{const a=J(e,s);o(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){H(`Error in deep watcher for "${s}":`,a)}}function Nt(e,t){return t===Boolean?e===""||e==="true":t===Number?Number(e):e}function En(e,t,n){if(t)for(const r in t){const o=t[r],i=se(r),s=e.getAttribute(i);if(o.type===Function&&typeof e[r]=="function")n[r]=e[r];else if(s!==null)n[r]=Nt(s,o.type);else if(typeof e[r]<"u")try{const c=e[r];o.type===Boolean&&typeof c=="boolean"||o.type===Number&&typeof c=="number"||o.type===Function&&typeof c=="function"?n[r]=c:n[r]=Nt(String(c),o.type)}catch{n[r]=e[r]}else"default"in o&&o.default!==void 0&&(n[r]=o.default)}}function _n(e,t,n){if(!t.props){try{const r=n&&n._hookCallbacks&&n._hookCallbacks.props||{},o=Array.from(new Set([...Object.keys(e),...Object.keys(r)]));for(const i of o){if(typeof i!="string"||i.startsWith("_"))continue;const s=Object.getOwnPropertyDescriptor(n,i);if(!(!Object.prototype.hasOwnProperty.call(r,i)&&s&&(s.get||s.set||!s.configurable)))try{Object.defineProperty(n,i,{enumerable:!0,configurable:!0,get(){try{const a=se(i),l=e.getAttribute(a);if(l!==null)return l;const m=e[i];let y;return R(m)||m&&typeof m=="object"&&"value"in m&&!(m instanceof Node)?y=m.value:y=m,y}catch{return e[i]}}})}catch{}}}catch{}return}En(e,t.props,n)}function An(e,t,n,r){e.onConnected&&!n&&(e.onConnected(t),r(!0))}function Sn(e,t,n,r,o,i,s,c){e.onDisconnected&&e.onDisconnected(t),n.forEach(a=>a()),r(),o(),i(!1),s(null),c(!1)}function Tn(e,t,n,r,o){e.onAttributeChanged&&e.onAttributeChanged(t,n,r,o)}class jn{static cache=new Map;static maxCacheSize=1e3;static dangerousPatterns=[/constructor/i,/prototype/i,/__proto__/i,/function/i,/eval/i,/import/i,/require/i,/window/i,/document/i,/global/i,/process/i,/setTimeout/i,/setInterval/i,/fetch/i,/XMLHttpRequest/i];static evaluate(t,n){const r=this.cache.get(t);if(r){if(!r.isSecure){te("Blocked cached dangerous expression:",t);return}return r.evaluator(n)}const o=this.createEvaluator(t);if(this.cache.size>=this.maxCacheSize){const i=this.cache.keys().next().value;i&&this.cache.delete(i)}if(this.cache.set(t,o),!o.isSecure){te("Blocked dangerous expression:",t);return}return o.evaluator(n)}static createEvaluator(t){if(this.hasDangerousPatterns(t))return{evaluator:()=>{},isSecure:!1};if(t.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(t),isSecure:!0}}catch(n){return te("Failed to create evaluator for expression:",t,n),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(t){return this.dangerousPatterns.some(n=>n.test(t))}static createSafeEvaluator(t){const n=t.trim();if(n.startsWith("{")&&n.endsWith("}"))return this.createObjectEvaluator(t);if(/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())){const r=t.trim().slice(4);return o=>J(o,r)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):r=>J(r,t)}static createObjectEvaluator(t){const n=t.trim().slice(1,-1),r=this.parseObjectProperties(n);return o=>{const i={};for(const{key:s,value:c}of r)try{if(c.startsWith("ctx.")){const a=c.slice(4);i[s]=J(o,a)}else i[s]=this.evaluateSimpleValue(c,o)}catch{i[s]=void 0}return i}}static parseObjectProperties(t){const n=[],r=t.split(",");for(const o of r){const i=o.indexOf(":");if(i===-1)continue;const s=o.slice(0,i).trim(),c=o.slice(i+1).trim(),a=s.replace(/^['"]|['"]$/g,"");n.push({key:a,value:c})}return n}static createSimpleEvaluator(t){return n=>{try{let r=t;const o=[];r=r.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,y=>`<<#${o.push(y)-1}#>>`);const i=r.match(/ctx\.[\w.]+/g)||[];for(const y of i){const p=y.slice(4),v=J(n,p);if(v===void 0)return;const f=o.push(JSON.stringify(v))-1;r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${f}#>>`)}const s=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,c=r.match(s)||[];for(const y of c){if(y.startsWith("ctx."))continue;const p=J(n,y);if(p===void 0)return;const v=o.push(JSON.stringify(p))-1;r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${v}#>>`)}const a=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let l;const m=new Set;for(;(l=a.exec(r))!==null;){const y=l[1];if(["true","false","null","undefined"].includes(y)||/^[0-9]+$/.test(y)||y==="ctx"||m.has(y))continue;m.add(y);const p=J(n,y);if(p===void 0)return;const v=JSON.stringify(p),f=o.push(v)-1;y.includes(".")?r=r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${f}#>>`):r=r.replace(new RegExp("\\b"+y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${f}#>>`)}r=r.replace(/<<#(\d+)#>>/g,(y,p)=>o[Number(p)]);try{return this.evaluateBasicExpression(r)}catch{return}}catch{return}}}static evaluateBasicExpression(t){const n=this.tokenize(t);let r=0;function o(){return n[r]}function i(u){const g=n[r++];if(u&&!g)throw new Error(`Unexpected token EOF, expected ${u}`);if(u&&g&&g.type!==u&&g.value!==u)throw new Error(`Unexpected token ${g.type}/${g.value}, expected ${u}`);return g}function s(){return c()}function c(){let u=a();if(o()&&o().value==="?"){i("?");const g=s();i(":");const w=s();return u?g:w}return u}function a(){let u=l();for(;o()&&o().value==="||";){i("OP");const g=l();u=u||g}return u}function l(){let u=m();for(;o()&&o().value==="&&";){i("OP");const g=m();u=u&&g}return u}function m(){let u=y();for(;o()&&["==","!=","===","!=="].includes(o().value);){const g=i("OP").value,w=y();switch(g){case"==":u=u==w;break;case"!=":u=u!=w;break;case"===":u=u===w;break;case"!==":u=u!==w;break}}return u}function y(){let u=p();for(;o()&&[">","<",">=","<="].includes(o().value);){const g=i("OP").value,w=p();switch(g){case">":u=u>w;break;case"<":u=u<w;break;case">=":u=u>=w;break;case"<=":u=u<=w;break}}return u}function p(){let u=v();for(;o()&&(o().value==="+"||o().value==="-");){const g=i("OP").value,w=v();u=g==="+"?u+w:u-w}return u}function v(){let u=f();for(;o()&&(o().value==="*"||o().value==="/"||o().value==="%");){const g=i("OP").value,w=f();switch(g){case"*":u=u*w;break;case"/":u=u/w;break;case"%":u=u%w;break}}return u}function f(){return o()&&o().value==="!"?(i("OP"),!f()):o()&&o().value==="-"?(i("OP"),-f()):h()}function h(){const u=o();if(u){if(u.type==="NUMBER")return i("NUMBER"),Number(u.value);if(u.type==="STRING")return i("STRING"),u.value.slice(1,-1);if(u.type==="IDENT")return i("IDENT"),u.value==="true"?!0:u.value==="false"?!1:u.value==="null"?null:void 0;if(u.value==="["){i("PUNC");const g=[];for(;o()&&o().value!=="]";)g.push(s()),o()&&o().value===","&&i("PUNC");return i("PUNC"),g}if(u.value==="("){i("PUNC");const g=s();return i("PUNC"),g}throw new Error("Unexpected token in expression")}}return s()}static tokenize(t){const n=[],r=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let o;for(;(o=r.exec(t))!==null;){const i=o[1];i&&(/^\d/.test(i)?n.push({type:"NUMBER",value:i}):/^"/.test(i)||/^'/.test(i)?n.push({type:"STRING",value:i}):/^[a-zA-Z_]/.test(i)?n.push({type:"IDENT",value:i}):/^[()?:,\[\]]$/.test(i)?n.push({type:"PUNC",value:i}):n.push({type:"OP",value:i}))}return n}static evaluateSimpleValue(t,n){if(t==="true")return!0;if(t==="false")return!1;if(!isNaN(Number(t)))return Number(t);if(t.startsWith("ctx.")){const r=t.slice(4);return J(n,r)}return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class ue{static cleanupFunctions=new WeakMap;static addListener(t,n,r,o){t.addEventListener(n,r,o);const s={event:n,handler:r,wrapper:r,options:o,cleanup:()=>t.removeEventListener(n,r,o),addedAt:Date.now()};this.cleanupFunctions.has(t)||this.cleanupFunctions.set(t,[]);const c=this.cleanupFunctions.get(t);c.push(s),c.__metaList=c}static removeListener(t,n,r,o){t.removeEventListener(n,r,o);const i=this.cleanupFunctions.get(t);if(i)for(let s=0;s<i.length;s++){const c=i[s];if(c.event===n&&c.handler===r){i.splice(s,1),i.length===0&&this.cleanupFunctions.delete(t);return}}}static cleanup(t){const n=this.cleanupFunctions.get(t);n&&(n.forEach(r=>{try{r.cleanup()}catch{}}),this.cleanupFunctions.delete(t))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(t){const n=this.cleanupFunctions.get(t);return!!(n&&n.length>0)}static getListenerCount(t){const n=this.cleanupFunctions.get(t);return n?n.length:0}static getListenerInfo(t){const n=this.cleanupFunctions.get(t);return n?n.map(r=>({event:r.event,handler:r.handler,wrapper:r.wrapper,options:r.options})):[]}}function Ke(e,t){return Array.isArray(e)&&Array.isArray(t)?JSON.stringify([...e].sort())!==JSON.stringify([...t].sort()):e!==t}function Rt(e,t,n,r,o){if(e)if(o&&typeof t.value=="object"&&t.value!==null){const i={...t.value};i[o]=n,t.value=i}else t.value=n;else{const i=r._state||r;et(i,t,n)}}function Ve(e,t,n,r){if(e._requestRender&&e._requestRender(),e._triggerWatchers){const o=t?"reactiveState":n;e._triggerWatchers(o,r)}}function Ln(e,t,n){const r=`update:${se(t)}`,o=`update:${t}`,i=new CustomEvent(r,{detail:n,bubbles:!0,composed:!0}),s=new CustomEvent(o,{detail:n,bubbles:!0,composed:!0});e.dispatchEvent(i),e.dispatchEvent(s)}function Dt(e,t,n,r){const o=n;M(()=>{e[t]=o}),M(()=>{const i=se(t);if(typeof o=="boolean"){const s=X(o);s!==null?e.setAttribute(i,s):e.removeAttribute?.(i)}else if(o!=null&&(typeof o=="string"||typeof o=="number"))e.setAttribute(i,String(o));else{const s=X(o);s!==null?e.setAttribute(i,s):e.removeAttribute?.(i)}}),M(()=>{e._applyProps?.(e._cfg)}),M(()=>{e._requestRender?.()})}function On(e,t,n,r){if(e){const i=t.value;return r&&typeof i=="object"&&i!==null?i[r]:i}const o=n._state||n;return J(o,t)}function _e(e){return e?e.split(/\s+/).filter(Boolean):[]}function Ae(e,t){if(t.length===0)return;const n=t.filter(r=>r&&!e.classList.contains(r));n.length>0&&e.classList.add(...n)}function Ee(e,t){if(t.length===0)return;const n=t.filter(Boolean);n.length>0&&e.classList.remove(...n)}let rt=!1;async function Pn(e,t,n=10){if(!rt){if(!e.isConnected){te("⚠️ Element not connected to DOM, skipping style wait");return}for(let r=0;r<n;r++){const o=window.getComputedStyle(e),i=o.transform&&o.transform!=="",s=o.opacity&&o.opacity!=="";if(i||s){rt=!0;return}await new Promise(c=>requestAnimationFrame(()=>c(void 0)))}rt=!0,te("⚠️ Styles did not load in time for transition, continuing anyway")}}function Mn(e){const t=window.getComputedStyle(e),n=t.transitionDuration||"0s",r=t.transitionDelay||"0s",o=i=>{const s=parseFloat(i);return i.includes("ms")?s:s*1e3};return o(n)+o(r)}function Xt(e,t){return new Promise(n=>{const r=t??Mn(e);if(r<=0){n();return}let o=!1;const i=()=>{o||(o=!0,e.removeEventListener("transitionend",s),e.removeEventListener("transitioncancel",s),n())},s=()=>i();e.addEventListener("transitionend",s),e.addEventListener("transitioncancel",s),setTimeout(i,r+50)})}async function Pe(e,t){const{classes:n,hooks:r,css:o,duration:i}=t;if(r?.onBeforeEnter)try{r.onBeforeEnter(e)}catch(f){H("Transition onBeforeEnter error:",f)}if(!o)return r?.onEnter?new Promise(f=>{r.onEnter(e,()=>{if(r?.onAfterEnter)try{r.onAfterEnter(e)}catch(h){H("Transition onAfterEnter error:",h)}f()})}):void 0;const s=_e(n?.enterFrom),c=_e(n?.enterActive),a=_e(n?.enterTo);Ae(e,s),e.offsetHeight,Ae(e,c),e.offsetHeight;let l;if(r?.onEnter){const f=new Promise(h=>{l=h});try{r.onEnter(e,()=>{l&&l()})}catch(h){H("Transition onEnter error:",h)}l&&await f}await new Promise(f=>requestAnimationFrame(()=>f(void 0))),e.offsetHeight;const m=window.getComputedStyle(e),y=m.transform,p=m.opacity;Ee(e,s),y&&y!=="none"&&(e.style.transform=y),p&&p!==""&&(e.style.opacity=p),e.offsetHeight,await new Promise(f=>requestAnimationFrame(()=>f(void 0))),e.style.transform="",e.style.opacity="",Ae(e,a),e.offsetHeight,await new Promise(f=>requestAnimationFrame(()=>f(void 0)));let v;if(typeof i=="number"?v=i:i&&typeof i=="object"&&"enter"in i&&(v=i.enter),await Xt(e,v),Ee(e,c),r?.onAfterEnter)try{r.onAfterEnter(e)}catch(f){H("Transition onAfterEnter error:",f)}}async function ot(e,t){const{classes:n,hooks:r,css:o,duration:i}=t;if(r?.onBeforeLeave)try{r.onBeforeLeave(e)}catch(y){H("Transition onBeforeLeave error:",y)}if(!o)return r?.onLeave?new Promise(y=>{r.onLeave(e,()=>{if(r?.onAfterLeave)try{r.onAfterLeave(e)}catch(p){H("Transition onAfterLeave error:",p)}y()})}):void 0;const s=_e(n?.leaveFrom),c=_e(n?.leaveActive),a=_e(n?.leaveTo);Ae(e,s),e.offsetHeight,Ae(e,c);let l;if(r?.onLeave){const y=new Promise(p=>{l=p});try{r.onLeave(e,()=>{l&&l()})}catch(p){H("Transition onLeave error:",p)}l&&await y}await new Promise(y=>requestAnimationFrame(()=>y(void 0))),await Pn(e,[...s,...c]),Ee(e,s),Ae(e,a);let m;if(typeof i=="number"?m=i:i&&typeof i=="object"&&"leave"in i&&(m=i.leave),await Xt(e,m),Ee(e,c),Ee(e,a),Ee(e,s),r?.onAfterLeave)try{r.onAfterLeave(e)}catch(y){H("Transition onAfterLeave error:",y)}}const Yt=new WeakMap,Qt=new WeakMap;function Ge(e){if(!e)return;const t=Yt.get(e);if(t!==void 0)return t;try{const n=e;if(n&&n.key!=null)return n.key}catch{}if(e instanceof Element){const n=e.getAttribute("data-anchor-key");if(n)return n}}function ne(e,t){try{Yt.set(e,t)}catch{}try{e.key=t}catch{}try{if(e instanceof Element){const n=X(t);n!==null&&e.setAttribute("data-anchor-key",n)}}catch{}}function Nn(e){if(!e)return;const t=Qt.get(e);if(t!==void 0)return t;try{const n=e;if(n&&n._transitionGroup!=null)return n._transitionGroup}catch{}}function Rn(e,t){try{Qt.set(e,t)}catch{}try{e._transitionGroup=t}catch{}}function ie(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function Se(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?R(e)||"value"in e?!!e.value:!1:!!e}function we(e,t){if(!t||!(e instanceof HTMLElement))return;ue.cleanup(e);for(const r in t)t[r]===e&&delete t[r];const n=e.childNodes;for(let r=0;r<n.length;r++)we(n[r],t)}function Ne(e,t,n){if(typeof e=="string")return;const r=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),o=e.props?.ref??(e.props?.props&&e.props.props.ref);r?r.value=t:o&&n&&(n[o]=t)}function Dn(e,t,n,r,o,i,s,c){if(!i)return;const a=t.includes("lazy"),l=t.includes("trim"),m=t.includes("number"),y=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",p=()=>{if(y){const k=e.value;return c&&s&&(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement)&&typeof k=="object"&&k!==null?k[c]:k}return J(i._state||i,e)},v=p();let f="text";s instanceof HTMLInputElement?f=r?.type||s.type||"text":s instanceof HTMLSelectElement?f="select":s instanceof HTMLTextAreaElement&&(f="textarea");const h=s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement,u=h?f==="checkbox"||f==="radio"?"checked":"value":c??"modelValue";if(f==="checkbox")if(Array.isArray(v))n[u]=v.includes(String(s?.getAttribute("value")??r?.value??""));else{const k=s?.getAttribute("true-value")??!0;n[u]=v===k}else if(f==="radio")n[u]=v===(r?.value??"");else if(f==="select")if(s&&s.hasAttribute("multiple")&&s instanceof HTMLSelectElement){const k=Array.isArray(v)?v.map(String):[];setTimeout(()=>{Array.from(s.options).forEach(S=>{S.selected=k.includes(S.value)})},0),n[u]=Array.isArray(v)?v:[]}else n[u]=v;else{!h&&y?n[u]=e:n[u]=v;try{const k=se(u);r&&(r[k]=v)}catch{}}const g=a||f==="checkbox"||f==="radio"||f==="select"?"change":"input",w=k=>{if(k.isComposing||o._isComposing)return;const S=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(k.isTrusted===!1&&!S)return;const C=k.target;if(!C||C._modelUpdating)return;let _=C.value;if(f==="checkbox"){const $=p();if(Array.isArray($)){const b=C.getAttribute("value")??"",A=Array.from($);if(C.checked)A.includes(b)||A.push(b);else{const O=A.indexOf(b);O>-1&&A.splice(O,1)}_=A}else{const b=C.getAttribute("true-value")??!0,A=C.getAttribute("false-value")??!1;_=C.checked?b:A}}else if(f==="radio")_=C.getAttribute("value")??C.value;else if(f==="select"&&C.multiple)_=Array.from(C.selectedOptions).map($=>$.value);else if(l&&typeof _=="string"&&(_=_.trim()),m){const $=Number(_);isNaN($)||(_=$)}const x=p();if(Ke(_,x)){C._modelUpdating=!0;try{Rt(y,e,_,i,c),Ve(i,y,e,_),C&&Ln(C,u,_)}finally{setTimeout(()=>C._modelUpdating=!1,0)}}};if(h){if(o[g]){const k=o[g];s&&ue.removeListener(s,g,k)}o[g]=w}else{const k=`update:${se(u)}`,S=`update:${u}`;if(o[k]){const C=o[k];s&&ue.removeListener(s,k,C)}if(o[S]){const C=o[S];s&&ue.removeListener(s,S,C)}if(o[k]=C=>{const _=C.detail!==void 0?C.detail:C.target?.value,x=On(y,e,i,c);if(Ke(_,x)){Rt(y,e,_,i,c),Ve(i,y,e,_);const $=C.target;$&&Dt($,u,y?e:_,y)}},y&&typeof e.value=="object"&&e.value!==null){let C=[];try{C=Reflect.ownKeys(e.value)}catch{C=Object.keys(e.value)}const _=C.filter(x=>typeof x=="string"&&!String(x).startsWith("_")&&x!=="constructor");for(const x of _){const T=`update:${se(x)}`,$=`update:${x}`;o[T]||(o[T]=b=>{const A=b.detail!==void 0?b.detail:b.target?.value,O=y?e.value[x]:J(i._state||i,e);if(!Ke(A,O))return;if(y){const P={...e.value};P[x]=A,e.value=P}else et(i._state||i,e,A);Ve(i,y,e,A);const E=b.currentTarget||s||b.target;E&&Dt(E,u,y?e:A,y)},o[$]=o[T])}}o[S]=o[k]}(f==="text"||f==="textarea")&&(o.compositionstart=()=>o._isComposing=!0,o.compositionend=k=>{o._isComposing=!1;const S=k.target;S&&setTimeout(()=>{const C=S.value,_=i._state||i,x=J(_,e);let T=C;if(l&&(T=T.trim()),m){const b=Number(T);isNaN(b)||(T=b)}if(Ke(T,x)){S._modelUpdating=!0;try{et(_,e,T),Ve(i,y,e,T)}finally{setTimeout(()=>S._modelUpdating=!1,0)}}},0)})}function en(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function Hn(e,t,n,r,o){if(typeof e=="object"&&e!==null)for(const[i,s]of Object.entries(e))if(i.startsWith("data-")||i.startsWith("aria-")||i==="class")n[i]=s;else if(i==="disabled"&&o&&ie(o)){const c=s&&typeof s=="object"&&"value"in s;(()=>{try{return R(s)}catch{return!1}})()||c?t[i]=s:n[i]=s}else t[i]=s;else if(typeof e=="string"){if(!r)return;try{const i=Ie(e,r);if(typeof i=="object"&&i!==null){for(const[s,c]of Object.entries(i))if(s.startsWith("data-")||s.startsWith("aria-")||s==="class")n[s]=c;else if(s==="disabled"&&o&&ie(o)){const a=c&&typeof c=="object"&&"value"in c;(()=>{try{return R(c)}catch{return!1}})()||a?t[s]=c:n[s]=c}else t[s]=c;return}else{n[e]=i;return}}catch{const i=J(r,e);n[e]=i}}}function Fn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=Ie(e,n)}else r=e;const o=t.style||"";let i=o;if(r){if(o){const s=o.split(";").map(a=>a.trim()).filter(Boolean),c=s.findIndex(a=>a.startsWith("display:"));c>=0&&s[c]==="display: none"&&(s.splice(c,1),i=s.length>0?s.join("; ")+";":"")}}else if(o){const s=o.split(";").filter(Boolean),c=s.findIndex(a=>a.trim().startsWith("display:"));c>=0?s[c]="display: none":s.push("display: none"),i=s.join("; ")}else i="display: none";i!==o&&(i?t.style=i:delete t.style)}function Ie(e,t){return jn.evaluate(e,t)}function In(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=Ie(e,n)}else r=e;try{if(r&&typeof r=="object"){if(R(r))r=r.value;else if("value"in r&&typeof r.value<"u"){const c=r.value;c instanceof Node||(r=c)}}}catch{}let o=[];if(typeof r=="string")o=[r];else if(Array.isArray(r))o=r.filter(Boolean);else if(typeof r=="object"&&r!==null)for(const[c,a]of Object.entries(r))a&&o.push(c);const i=t.class||"",s=o.join(" ");t.class=i?`${i} ${s}`.trim():s}function vt(e){if(e===!0||e===!1)return!0;if(e==null)return!1;if(typeof e==="string")return e===""||e==="true"||e==="false";try{if(e&&typeof e=="object"&&"value"in e){const n=e.value,r=typeof n;return r==="boolean"?!0:r==="string"?n===""||n==="true"||n==="false":!1}}catch{}return!1}function Wn(e,t,n){let r;if(typeof e=="string"){if(!n)return;r=Ie(e,n)}else r=e;let o="";if(typeof r=="string")o=r;else if(r&&typeof r=="object"){const s=[];for(const[c,a]of Object.entries(r))if(a!=null&&a!==""){const l=c.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`),m=["width","height","top","right","bottom","left","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","font-size","line-height","border-width","border-radius","min-width","max-width","min-height","max-height"];let y=String(a);typeof a=="number"&&m.includes(l)&&(y=`${a}px`),s.push(`${l}: ${y}`)}o=s.join("; ")+(s.length>0?";":"")}const i=t.style||"";t.style=i+(i&&!i.endsWith(";")?"; ":"")+o}function Bn(e,t,n){let r=e;typeof e=="string"&&n&&(r=Ie(e,n)),R(r)?t.reactiveRef=r:t.ref=r}function tn(e,t,n,r){const o={},i={...r||{}},s={};for(const[c,a]of Object.entries(e)){const{value:l,modifiers:m,arg:y}=a;if(c==="model"||c.startsWith("model:")){const p=c.split(":"),v=p.length>1?p[1]:y;Dn(l,m,o,i,s,t,n,v);continue}switch(c){case"bind":Hn(l,o,i,t,n);break;case"show":Fn(l,i,t);break;case"class":In(l,i,t);break;case"style":Wn(l,i,t);break;case"ref":Bn(l,o,t);break}}try{if(Object.prototype.hasOwnProperty.call(o,"disabled")&&n&&ie(n)){const a=o.disabled,l=a&&typeof a=="object"&&"value"in a;let m=!1;try{m=R(a)}catch{m=!1}if(!l&&!m)try{i.disabled=a,delete o.disabled;const y=globalThis;y.__VDOM_DISABLED_PROMOTIONS||(y.__VDOM_DISABLED_PROMOTIONS=[]),y.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:a,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:o,attrs:i,listeners:s}}function wt(e,t){if(Array.isArray(e)){const i=new Set;return e.map(s=>{if(!s||typeof s!="object")return s;let c=s.props?.key??s.key;if(!c){const y=s.tag||"node",v=[s.props?.attrs?.id,s.props?.attrs?.name,s.props?.attrs?.["data-key"],s.props?.props?.id,s.props?.props?.name,s.props?.props?.dataKey,s.props?.props?.["data-key"]].find(f=>f!=null)??"";c=v?`${t}:${y}:${v}`:`${t}:${y}`}let a=c,l=1;for(;i.has(a);)a=`${c}#${l++}`;i.add(a);let m=s.children;return Array.isArray(m)&&(m=wt(m,a)),{...s,key:a,children:m}})}const n=e;let r=n.props?.key??n.key??t,o=n.children;return Array.isArray(o)&&(o=wt(o,r)),{...n,key:r,children:o}}function Ht(e,t,n,r){const o=n.directives??{},i=tn(o,r,e,n.attrs),s={...t.props,...n.props,...i.props},c={...t.attrs,...n.attrs,...i.attrs},a=t.props??{},l=s,m=n?.isCustomElement??t?.isCustomElement??!1;let y=!1;for(const f in{...a,...l}){const h=a[f],d=l[f];let u=h,g=d;if(M(()=>{(R(h)||h&&typeof h=="object"&&"value"in h)&&(u=h.value)}),M(()=>{(R(d)||d&&typeof d=="object"&&"value"in d)&&(g=d.value)}),!(h===d&&u===g))if(y=!0,f==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const w=typeof d=="object"&&d!==null&&R(d)||d&&typeof d=="object"&&"value"in d?d.value:d;e.value!==w&&(e.value=w??"")}else if(f==="checked"&&e instanceof HTMLInputElement){const w=typeof d=="object"&&d!==null&&R(d)||d&&typeof d=="object"&&"value"in d?d.value:d;e.checked=!!w}else if(f.startsWith("on")&&typeof d=="function"){const w=en(f);typeof h=="function"&&ue.removeListener(e,w,h),ue.addListener(e,w,d);try{if(w&&w.startsWith("update:")){const k=w.split(":",2)[1],S=l[k];let C=[];try{if(R(S)){const x=S.value;C=x&&typeof x=="object"?Object.keys(x):[]}else S&&typeof S=="object"&&(C=Object.keys(S))}catch{C=[]}const _=C.filter(x=>typeof x=="string"&&!x.startsWith("_")&&x!=="constructor");for(const x of _){const T=`update:${x}`,$=b=>{const A=b.detail!==void 0?b.detail:b.target?.value,j={...R(S)?S.value||{}:l[k]||{},[x]:A};M(()=>{d({detail:j})})};M(()=>{ue.addListener(e,T,$)})}}}catch{}}else if(d==null)e.removeAttribute(f);else{const w=n?.isCustomElement??t?.isCustomElement??!1;if(w||f in e)try{e[f]=d,f==="disabled"&&d===!1&&!w&&ie(e)&&e.removeAttribute("disabled")}catch{}else d===!1&&e.removeAttribute(f)}}for(const[f,h]of Object.entries(i.listeners||{})){ue.addListener(e,f,h);try{const d=e&&e.parentElement;d&&d!==e&&ue.addListener(d,f,h)}catch{}}const p=t.attrs??{},v=c;for(const f in{...p,...v}){const h=p[f],d=v[f];let u=h,g=d;if(R(h)&&(u=h.value),R(d)&&(g=d.value),u!==g)if(y=!0,g==null||g===!1)M(()=>{e.removeAttribute(f)}),f==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?M(()=>{e.value=""}):e instanceof HTMLSelectElement?M(()=>{e.value=""}):e instanceof HTMLProgressElement&&M(()=>{e.value=0})),f==="checked"&&e instanceof HTMLInputElement&&M(()=>{e.checked=!1}),f==="disabled"&&ie(e)&&M(()=>{e.disabled=!1});else{if(f==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){M(()=>{e.value=g??""});continue}else if(e instanceof HTMLSelectElement){M(()=>{e.value=g??""});continue}else if(e instanceof HTMLProgressElement){M(()=>{e.value=Number(g)});continue}}if(f==="checked"&&e instanceof HTMLInputElement){M(()=>{e.checked=!!g});continue}if(f==="style"){const k=X(g);k!==null&&e.setAttribute(f,k);continue}if(f==="disabled"&&ie(e)){M(()=>{e.disabled=Se(g)}),Se(g)?M(()=>{e.setAttribute(f,"")}):M(()=>{e.removeAttribute(f)});continue}const w=e.namespaceURI==="http://www.w3.org/2000/svg";if(m&&!w&&f.includes("-"))if(Jt(f)){const k=X(d??g);if(k!==null)try{e.setAttribute(f,k)}catch{}}else{const k=At(f);try{R(d)?e[k]=d:e[k]=g}catch{const C=X(d??g);C!==null&&e.setAttribute(f,C)}}else if(!w&&f in e)try{R(d)?e[f]=d:e[f]=g}catch{const S=X(g);S!==null&&e.setAttribute(f,S)}else{const k=X(g);k!==null&&e.setAttribute(f,k)}}}try{if(ie(e)){const f=s.disabled;let h;try{const u=Object.prototype.hasOwnProperty.call(i.props||{},"disabled"),g=f&&typeof f=="object"&&"value"in f;let w=!1;M(()=>{w=!!R(f)});const k=vt(f);w||g||u||k?h=f:h=c.disabled}catch{h=c.disabled}const d=Se(h);M(()=>{e.disabled=d}),M(d?()=>{e.setAttribute("disabled","")}:()=>{e.removeAttribute("disabled")})}}catch{}m&&y&&(M(()=>{e._applyProps?.(e._cfg)}),M(()=>{typeof e.requestRender=="function"?e.requestRender():typeof e._render=="function"&&e._render(e._cfg)}))}function re(e,t,n){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const p=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&ne(p,e.key),p}if(e.tag==="#raw"){const p=typeof e.children=="string"?e.children:"";return document.createRange().createContextualFragment(p)}if(e.tag==="#anchor"){const p=e,v=Array.isArray(p.children)?p.children:[],f=document.createTextNode(""),h=document.createTextNode("");p.key!=null&&(ne(f,`${p.key}:start`),ne(h,`${p.key}:end`)),p._startNode=f,p._endNode=h;const d=document.createDocumentFragment();d.appendChild(f);for(const u of v){const g=re(u,t);if(p.key!=null&&g instanceof Element&&!g.hasAttribute("data-anchor-key")){const w=u;w&&typeof w=="object"&&w.key!=null||ne(g,p.key)}d.appendChild(g)}return d.appendChild(h),d}const r=document.createElement(e.tag);e.key!=null&&ne(r,e.key),e.props&&e.props._transitionGroup&&Rn(r,e.props._transitionGroup);const{props:o={},attrs:i={},directives:s={}}=e.props??{},c=tn(s,t,r,i),a={...o,...c.props},l={...i,...c.attrs};try{const p=(l&&l.class)??(a&&a.class)??(e.props&&e.props.attrs&&e.props.attrs.class)??(e.props&&e.props.props&&e.props.props.class),v=X(p);if(v!==null){const f=String(v).trim();f&&r.setAttribute("class",f)}}catch{}try{if(a.disabled!==void 0&&r&&ie(r)){const p=a.disabled,v=p&&typeof p=="object"&&"value"in p;let f=!1;try{f=R(p)}catch{f=!1}!v&&!f&&M(()=>{l.disabled=p,delete a.disabled})}}catch{}const m=r.namespaceURI==="http://www.w3.org/2000/svg";for(const p in l){const v=l[p];if(typeof p!="string"||/\[object Object\]/.test(p))continue;const f=typeof v=="object"&&v!==null&&R(v)||v&&typeof v=="object"&&"value"in v?v.value:v;if(typeof f=="boolean")f?r.setAttribute(p,""):M(()=>{r.removeAttribute(p)});else if(f!=null){if(p==="disabled"&&ie(r)){const h=a.disabled,d=vt(h)?h:f,u=Se(d);M(()=>{r.disabled=u}),M(u?()=>{r.setAttribute(p,"")}:()=>{r.removeAttribute(p)});continue}if(!m&&p==="value"&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement||r instanceof HTMLProgressElement))try{r instanceof HTMLProgressElement?r.value=Number(f):r.value=f??""}catch{const d=X(f);d!==null&&r.setAttribute(p,d)}else if(!m&&p==="checked"&&r instanceof HTMLInputElement)try{r.checked=!!f}catch{const d=X(f);d!==null&&r.setAttribute(p,d)}else if(!m&&p in r)try{r[p]=f,p==="disabled"&&f===!1&&ie(r)&&r.removeAttribute("disabled")}catch{const d=X(f);d!==null&&r.setAttribute(p,d)}else if((e.props?.isCustomElement??!1)&&!m&&p.includes("-")){const d=At(p);try{r[d]=f}catch{const g=X(f);g!==null&&r.setAttribute(p,g)}}else{const d=X(f);d!==null&&r.setAttribute(p,d)}}}for(const p in a){const v=a[p];if(!(typeof p!="string"||/\[object Object\]/.test(p)))if(p==="value"&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)){const f=typeof v=="object"&&v!==null&&typeof v.value<"u"?v.value:v;M(()=>{r.value=f??""})}else if(p.startsWith("on")&&typeof v=="function"){const f=en(p),h=f.includes(":")?(()=>{const d=f.split(":"),u=d[1];if(u.includes("-")){const g=u.split("-").map((w,k)=>k===0?w:w.charAt(0).toUpperCase()+w.slice(1)).join("");return`${d[0]}:${g}`}else{const g=u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${d[0]}:${g}`}})():f;c.listeners&&(c.listeners[f]||c.listeners[h])||ue.addListener(r,f,v)}else{if(p.startsWith("on")&&v===void 0)continue;if(v==null||v===!1)r.removeAttribute(p);else{const f=e.props?.isCustomElement??!1,h=typeof v=="object"&&v!==null&&R(v)?v:typeof v=="object"&&v!==null&&typeof v.value<"u"?v.value:v;if(p==="class"||p==="style"){try{const d=X(h);d!==null&&r.setAttribute(p,d)}catch{}continue}if(f||p in r)try{const d=typeof v=="object"&&v!==null&&R(v)?v:typeof v=="object"&&v!==null&&typeof v.value<"u"?v.value:v;if(p==="disabled"&&ie(r)){const u=a.disabled!==void 0?a.disabled:d,g=Se(u);M(()=>{r.disabled=g}),M(g?()=>{r.setAttribute(p,"")}:()=>{r.removeAttribute(p)});continue}try{if(typeof r[p]=="boolean"){let g=d;typeof d=="string"?d==="false"?g=!1:d==="true"?g=!0:g=!!d&&d!=="":g=!!d,r[p]=g}else r[p]=d}catch{r[p]=d}}catch{}}}}for(const[p,v]of Object.entries(c.listeners||{}))ue.addListener(r,p,v);const y={...e,props:{...e.props,...c.props}};Ne(y,r,n);try{if(typeof r._applyProps=="function")try{r._applyProps(r._cfg)}catch{}typeof r.requestRender=="function"?r.requestRender():typeof r._render=="function"&&r._render(r._cfg)}catch{}if(Array.isArray(e.children))for(const p of e.children)r.appendChild(re(p,t,n));else typeof e.children=="string"&&(r.textContent=e.children);try{if(r instanceof HTMLSelectElement&&l&&l.hasOwnProperty("value"))try{r.value=l.value??""}catch{}}catch{}try{if(ie(r)){const p=a.disabled,v=l.disabled,f=p&&typeof p=="object"&&"value"in p;let h=!1;try{h=!!R(p)}catch{h=!1}const u=h||f||vt(p)?p:v,g=Se(u);M(()=>{r.disabled=g}),M(g?()=>{r.setAttribute("disabled","")}:()=>{r.removeAttribute("disabled")})}}catch{}return r}function zn(e,t,n,r,o){if(typeof n=="string"){e.textContent!==n&&(e.textContent=n);return}if(!Array.isArray(n))return;const i=e.childNodes,s=[];for(let h=0;h<i.length;h++)s.push(i[h]);const c=Array.isArray(t)?t:[],a=Nn(e);if(a){const h=w=>typeof w=="string"&&w.startsWith("each-")?w.substring(5):w,d=[],u=[];for(const w of n)if(w&&w.tag==="#anchor"){const k=Array.isArray(w.children)?w.children:[];for(const S of k){const C=h(S.key||w.key||"unknown");d.push({...S,key:C})}}else w&&d.push({...w,key:h(w.key)});for(const w of c)if(w&&w.tag==="#anchor"){const k=Array.isArray(w.children)?w.children:[];for(const S of k){const C=h(S.key||w.key||"unknown");u.push({...S,key:C})}}else w&&u.push({...w,key:h(w.key)});if(d.some(w=>w&&w.key!=null)||u.some(w=>w&&w.key!=null)){const w=new Map,k=new Map;for(const $ of u)if($&&$.key!=null){const b=String($.key);w.set(b,$)}for(let $=0;$<s.length;$++){const b=s[$];let A=Ge(b);if(A=h(A),A!=null&&b instanceof Element&&b.nodeType===Node.ELEMENT_NODE){let O=typeof A=="string"&&A.includes(":")?A.substring(0,A.lastIndexOf(":")):A;O=String(O),k.set(O,b)}}const S=new Set,C=new Map,_=s.length>0;if(a.moveClass&&_)for(let $=0;$<s.length;$++){const b=s[$];if(b instanceof HTMLElement&&b.parentElement){const A=b.getBoundingClientRect();C.set(b,A)}}const x=[];for(const $ of d){let b=$.key;if(b==null)continue;b=String(b);const A=w.get(b);let O=k.get(b);if(O&&A){const j=Re(O,A,$,r);S.add(O);const E=String(b);ne(j,E),x.push({node:j,key:b,newVNode:$,oldVNode:A,isNew:!1})}else{O=re($,r),ne(O,b),e.appendChild(O);const j=_||a.appear===!0;O instanceof HTMLElement&&j&&Pe(O,a).catch(E=>{H("Enter transition error:",E)}),x.push({node:O,key:b,newVNode:$,isNew:!0})}}const T=[];for(let $=0;$<s.length;$++){const b=s[$],A=Ge(b);if(!S.has(b)&&A!=null&&b instanceof HTMLElement){const j=ot(b,a).then(()=>{e.contains(b)&&e.removeChild(b)}).catch(E=>{H("Leave transition error:",E),e.contains(b)&&e.removeChild(b)});T.push(j)}}if(T.length===0){let $=e.firstChild;for(const{node:b}of x)b!==$&&e.insertBefore(b,$),$=b.nextSibling;if(a.moveClass&&C.size>0){const b=[];for(const{node:A,isNew:O}of x)if(!O&&A instanceof HTMLElement){const j=C.get(A);if(j){const E=A.getBoundingClientRect(),P=j.left-E.left,N=j.top-E.top;if(P!==0||N!==0){const Y=a.moveClass.split(/\s+/).filter(F=>F);b.push({node:A,deltaX:P,deltaY:N,moveClasses:Y})}}}if(b.length>0){for(const{node:A,deltaX:O,deltaY:j}of b)A.style.transform=`translate(${O}px, ${j}px)`,A.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:A,moveClasses:O}of b)for(const j of O)A.classList.add(j);requestAnimationFrame(()=>{const A=a.moveClass||"",O=A.match(/duration-(\d+)/),j=O?`${O[1]}ms`:"300ms",E=A.match(/ease-(out|in|in-out|linear)/),P=E?`ease-${E[1]}`:"ease-out";for(const{node:N}of b)N.style.transition=`transform ${j} ${P}`;requestAnimationFrame(()=>{for(const{node:N,moveClasses:Y}of b){N.style.removeProperty("transform");const F=()=>{for(const q of Y)N.classList.remove(q);N.style.removeProperty("transition"),N.removeEventListener("transitionend",F),N.removeEventListener("transitioncancel",F)};N.addEventListener("transitionend",F,{once:!0}),N.addEventListener("transitioncancel",F,{once:!0})}})})})})}}}return}}const l=new Map;for(const h of c)h&&h.key!=null&&l.set(h.key,h);const m=new Map;for(let h=0;h<s.length;h++){const d=s[h],u=Ge(d);u!=null&&m.set(u,d)}const y=new Set;let p=e.firstChild;function v(h,d){let u=h;for(;u&&(y.add(u),u!==d);)u=u.nextSibling}function f(h,d,u,g,w,k=!0){const S=[];let C=h.nextSibling;for(;C&&C!==d;)S.push(C),C=C.nextSibling;const _=Array.isArray(u)?u:[];if(g.some(T=>T&&T.key!=null)||_.some(T=>T&&T.key!=null)){const T=new Map,$=new Map;for(const j of _)j&&j.key!=null&&T.set(j.key,j);for(const j of S){const E=Ge(j);E!=null&&$.set(E,j)}const b=w&&w.state==="visible"&&_.length===0&&g.length>0,A=new Set;let O=h.nextSibling;for(const j of g){let E;if(j.key!=null&&$.has(j.key)){const P=T.get(j.key);E=Re($.get(j.key),P,j,r),A.add(E),w&&E instanceof HTMLElement&&b&&w.appear&&Pe(E,w).catch(N=>{H("Transition enter error (appear):",N)}),E!==O&&e.contains(E)&&e.insertBefore(E,O)}else E=re(j,r),e.insertBefore(E,O),A.add(E),w&&E instanceof HTMLElement&&k&&Pe(E,w).catch(P=>{H("Transition enter error:",P)});O=E.nextSibling}for(const j of S)!A.has(j)&&e.contains(j)&&(w&&j instanceof HTMLElement&&k?ot(j,w).then(()=>{e.contains(j)&&e.removeChild(j)}).catch(E=>{H("Transition leave error:",E),e.contains(j)&&e.removeChild(j)}):e.removeChild(j))}else{const T=Math.min(_.length,g.length);for(let $=0;$<T;$++){const b=_[$],A=g[$],O=Re(S[$],b,A,r);O!==S[$]&&(e.insertBefore(O,S[$]),e.removeChild(S[$]))}for(let $=T;$<g.length;$++){const b=re(g[$],r);e.insertBefore(b,d),w&&b instanceof HTMLElement&&k&&Pe(b,w).catch(A=>{H("Transition enter error:",A)})}for(let $=T;$<S.length;$++){const b=S[$];w&&b instanceof HTMLElement&&k?ot(b,w).then(()=>{e.contains(b)&&e.removeChild(b)}).catch(A=>{H("Transition leave error:",A),e.contains(b)&&e.removeChild(b)}):e.removeChild(b)}}}for(const h of n){let d;if(h.tag==="#anchor"){const u=h.key,g=`${u}:start`,w=`${u}:end`;let k=m.get(g),S=m.get(w);const C=Array.isArray(h.children)?h.children:[];if(k||(k=document.createTextNode(""),ne(k,g)),S||(S=document.createTextNode(""),ne(S,w)),h._startNode=k,h._endNode=S,!e.contains(k)||!e.contains(S)){e.insertBefore(k,p);const _=h._transition,T=!(_&&_.state==="visible"&&C.length>0)||_.appear;for(const $ of C){const b=re($,r);e.insertBefore(b,p),_&&b instanceof HTMLElement&&T&&Pe(b,_).catch(A=>{H("Transition enter error:",A)})}e.insertBefore(S,p)}else{const _=h._transition,T=l.get(u)?._transition,$=T&&T.state!==_?.state,b=_&&_.state==="visible"&&C.length>0&&!$,A=$||!b||_?.appear===!0;f(k,S,l.get(u)?.children,C,_,A)}v(k,S),p=S.nextSibling;continue}if(h.key!=null&&m.has(h.key)){const u=l.get(h.key);d=Re(m.get(h.key),u,h,r,o),y.add(d),d!==p&&e.contains(d)&&(p&&!e.contains(p)&&(p=null),e.insertBefore(d,p))}else d=re(h,r,o),p&&!e.contains(p)&&(p=null),e.insertBefore(d,p),y.add(d);p=d.nextSibling}for(let h=0;h<s.length;h++){const d=s[h];!y.has(d)&&e.contains(d)&&(we(d,o),e.removeChild(d))}}function Re(e,t,n,r,o){if(t&&typeof t!="string"&&t.props?.ref&&o&&we(e,o),t===n)return e;if(typeof n=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==n&&(e.textContent=n),e;{const s=document.createTextNode(n);return e.parentNode?.replaceChild(s,e),s}}if(n&&typeof n!="string"&&n.tag==="#anchor"){const s=n,c=Array.isArray(s.children)?s.children:[],a=s._startNode??document.createTextNode(""),l=s._endNode??document.createTextNode("");s.key!=null&&(ne(a,`${s.key}:start`),ne(l,`${s.key}:end`)),s._startNode=a,s._endNode=l;const m=document.createDocumentFragment();m.appendChild(a);for(const y of c){const p=re(y,r);m.appendChild(p)}return m.appendChild(l),e.parentNode?.replaceChild(m,e),a}if(!n){we(e,o);const s=document.createComment("removed");return e.parentNode?.replaceChild(s,e),s}if(!t||typeof t=="string"){we(e,o);const s=re(n,r,o);return Ne(n,s,o),e.parentNode?.replaceChild(s,e),s}if(n.tag==="#anchor"){const s=Array.isArray(n.children)?n.children:[],c=n._startNode??document.createTextNode(""),a=n._endNode??document.createTextNode("");n.key!=null&&(ne(c,`${n.key}:start`),ne(a,`${n.key}:end`)),n._startNode=c,n._endNode=a;const l=document.createDocumentFragment();l.appendChild(c);for(const m of s)l.appendChild(re(m,r));return l.appendChild(a),e.parentNode?.replaceChild(l,e),c}if(typeof t!="string"&&typeof n!="string"&&t.tag===n.tag&&t.key===n.key){const s=e;return Ht(s,t.props||{},n.props||{},r),zn(s,t.children,n.children,r,o),Ne(n,s,o),s}if(typeof t!="string"&&typeof n!="string"&&t.tag===n.tag&&(t.tag&&String(t.tag).includes("-")||n.props&&n.props.isCustomElement||t.props&&t.props.isCustomElement))try{const c=e;return Ht(c,t.props||{},n.props||{},r),Ne(n,c,o),c}catch{}we(e,o);const i=re(n,r,o);return Ne(n,i,o),e.parentNode?.replaceChild(i,e),i}function Un(e,t,n,r){let o;Array.isArray(t)?t.length===1?(o=t[0],o&&typeof o=="object"&&o.key==null&&(o={...o,key:"__root__"})):o={tag:"div",key:"__root__",children:t}:(o=t,o&&typeof o=="object"&&o.key==null&&(o={...o,key:"__root__"})),o&&typeof o=="object"&&o.tag==="#anchor"&&(o={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[o]}),o=wt(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=Re(s,i,o,n,r):(c=re(o,n,r),e.replaceChild(c,s)):(c=re(o,n,r),e.firstChild?e.replaceChild(c,e.firstChild):e.appendChild(c));const a=[];for(let l=0;l<e.childNodes.length;l++){const m=e.childNodes[l];m!==c&&m.nodeName!=="STYLE"&&(we(m,r),a.push(m))}a.forEach(l=>e.removeChild(l)),e._prevVNode=o,e._prevDom=c}function Ye(e){if(typeof e=="string")return qe(e);if(e.tag==="#text")return typeof e.children=="string"?qe(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(Ye).join("");if(e.tag==="#raw")return typeof e.children=="string"?e.children:"";let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([r,o])=>` ${r}="${qe(String(o))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(Ye).join(""):typeof e.children=="string"?qe(e.children):e.children?Ye(e.children):"";return`<${e.tag}${t}>${n}</${e.tag}>`}function nn(e,...t){let n="";for(let r=0;r<e.length;r++)n+=e[r],r<t.length&&(n+=t[r]);return n}function rn(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let Ze=null;function Ft(){return Ze||(Ze=new CSSStyleSheet,Ze.replaceSync(rn(Kn))),Ze}function qn(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const Kn=nn`
|
|
5
|
-
:host,
|
|
6
|
-
*,
|
|
7
|
-
::before,
|
|
8
|
-
::after {
|
|
9
|
-
all: isolate;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
border: 0 solid currentColor;
|
|
12
|
-
margin: 0;
|
|
13
|
-
padding: 0;
|
|
14
|
-
font: inherit;
|
|
15
|
-
vertical-align: baseline;
|
|
16
|
-
background: transparent;
|
|
17
|
-
color: inherit;
|
|
18
|
-
-webkit-tap-highlight-color: transparent;
|
|
19
|
-
}
|
|
20
|
-
:host {
|
|
21
|
-
display: contents;
|
|
22
|
-
font: 16px/1.5 var(--font-sans, ui-sans-serif, system-ui, sans-serif);
|
|
23
|
-
/* Default CE line-height variable so leading-* can reliably override */
|
|
24
|
-
--ce-line-height: 1.5;
|
|
25
|
-
-webkit-text-size-adjust: 100%;
|
|
26
|
-
text-size-adjust: 100%;
|
|
27
|
-
/* Default gradient variables to avoid undefined var() usage in generated utilities */
|
|
28
|
-
--ce-gradient-from-position: 0%;
|
|
29
|
-
--ce-gradient-to-position: 100%;
|
|
30
|
-
--ce-gradient-via-position: 50%;
|
|
31
|
-
--ce-gradient-from: rgba(255,255,255,0);
|
|
32
|
-
--ce-gradient-to: rgba(255,255,255,0);
|
|
33
|
-
--ce-gradient-stops: var(--ce-gradient-from), var(--ce-gradient-to);
|
|
34
|
-
}
|
|
35
|
-
button,
|
|
36
|
-
input,
|
|
37
|
-
select,
|
|
38
|
-
textarea {
|
|
39
|
-
background: transparent;
|
|
40
|
-
outline: none;
|
|
41
|
-
}
|
|
42
|
-
textarea {
|
|
43
|
-
resize: vertical;
|
|
44
|
-
}
|
|
45
|
-
progress {
|
|
46
|
-
vertical-align: baseline;
|
|
47
|
-
}
|
|
48
|
-
button,
|
|
49
|
-
textarea {
|
|
50
|
-
overflow: visible;
|
|
51
|
-
}
|
|
52
|
-
img,
|
|
53
|
-
svg,
|
|
54
|
-
video,
|
|
55
|
-
canvas,
|
|
56
|
-
audio,
|
|
57
|
-
iframe,
|
|
58
|
-
embed,
|
|
59
|
-
object {
|
|
60
|
-
display: block;
|
|
61
|
-
max-width: 100%;
|
|
62
|
-
height: auto;
|
|
63
|
-
}
|
|
64
|
-
svg {
|
|
65
|
-
fill: currentColor;
|
|
66
|
-
stroke: none;
|
|
67
|
-
}
|
|
68
|
-
a {
|
|
69
|
-
text-decoration: inherit;
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
}
|
|
72
|
-
button,
|
|
73
|
-
[type="button"],
|
|
74
|
-
[type="reset"],
|
|
75
|
-
[type="submit"] {
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
appearance: button;
|
|
78
|
-
background: none;
|
|
79
|
-
-webkit-user-select: none;
|
|
80
|
-
user-select: none;
|
|
81
|
-
}
|
|
82
|
-
::-webkit-input-placeholder,
|
|
83
|
-
::placeholder {
|
|
84
|
-
color: inherit;
|
|
85
|
-
opacity: 0.5;
|
|
86
|
-
}
|
|
87
|
-
*:focus-visible {
|
|
88
|
-
outline: 2px solid var(--color-primary-500, #3b82f6);
|
|
89
|
-
outline-offset: 2px;
|
|
90
|
-
}
|
|
91
|
-
ol,
|
|
92
|
-
ul {
|
|
93
|
-
list-style: none;
|
|
94
|
-
}
|
|
95
|
-
table {
|
|
96
|
-
border-collapse: collapse;
|
|
97
|
-
}
|
|
98
|
-
sub,
|
|
99
|
-
sup {
|
|
100
|
-
font-size: 0.75em;
|
|
101
|
-
line-height: 0;
|
|
102
|
-
position: relative;
|
|
103
|
-
}
|
|
104
|
-
sub {
|
|
105
|
-
bottom: -0.25em;
|
|
106
|
-
}
|
|
107
|
-
sup {
|
|
108
|
-
top: -0.5em;
|
|
109
|
-
}
|
|
110
|
-
[disabled],
|
|
111
|
-
[aria-disabled="true"] {
|
|
112
|
-
cursor: not-allowed;
|
|
113
|
-
}
|
|
114
|
-
[hidden] {
|
|
115
|
-
display: none;
|
|
116
|
-
}
|
|
117
|
-
`,Vn={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"}},on=Object.fromEntries(Object.entries(Vn).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([n,r])=>[n,`var(--color-${e}${n==="DEFAULT"?"":`-${n}`}, ${r})`]))])),be="0.25rem",Gn={"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},it={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"]},Zn=()=>{const e={};e["@container"]="container-type:inline-size;",["block","inline","inline-block","flex","inline-flex","grid","inline-grid","table","table-cell","table-row","hidden"].forEach(a=>{e[a]=a==="hidden"?"display:none;":`display:${a};`}),["absolute","relative","fixed","sticky","static"].forEach(a=>{e[a]=`position:${a};`}),Object.assign(e,{"items-center":"align-items:center;","items-start":"align-items:flex-start;","items-end":"align-items:flex-end;","items-baseline":"align-items:baseline;","items-stretch":"align-items:stretch;","justify-center":"justify-content:center;","justify-start":"justify-content:flex-start;","justify-between":"justify-content:space-between;","justify-around":"justify-content:space-around;","justify-evenly":"justify-content:space-evenly;","justify-end":"justify-content:flex-end;","flex-wrap":"flex-wrap:wrap;","flex-nowrap":"flex-wrap:nowrap;","flex-wrap-reverse":"flex-wrap:wrap-reverse;","content-center":"align-content:center;","content-start":"align-content:flex-start;","content-end":"align-content:flex-end;","content-between":"align-content:space-between;","content-around":"align-content:space-around;","content-evenly":"align-content:space-evenly;","content-stretch":"align-content:stretch;","self-auto":"align-self:auto;","self-start":"align-self:flex-start;","self-end":"align-self:flex-end;","self-center":"align-self:center;","self-stretch":"align-self:stretch;","flex-col":"flex-direction:column;","flex-row":"flex-direction:row;","flex-col-reverse":"flex-direction:column-reverse;","flex-row-reverse":"flex-direction:row-reverse;","flex-1":"flex:1 1 0%;","flex-auto":"flex:1 1 auto;","flex-initial":"flex:0 1 auto;","flex-none":"flex:0 0 auto;",grow:"flex-grow:1;",shrink:"flex-shrink:1;","grow-0":"flex-grow:0;","shrink-0":"flex-shrink:0;"});for(let a=1;a<=12;a++)e[`grid-cols-${a}`]=`grid-template-columns:repeat(${a},minmax(0,1fr));`,e[`grid-rows-${a}`]=`grid-template-rows:repeat(${a},minmax(0,1fr));`,e[`col-span-${a}`]=`grid-column:span ${a} / span ${a};`,e[`row-span-${a}`]=`grid-row:span ${a} / span ${a};`,e[`col-start-${a}`]=`grid-column-start:${a};`,e[`col-end-${a}`]=`grid-column-end:${a};`,e[`row-start-${a}`]=`grid-row-start:${a};`,e[`row-end-${a}`]=`grid-row-end:${a};`;Object.assign(e,{"grid-cols-none":"grid-template-columns:none;","grid-rows-none":"grid-template-rows:none;","col-span-full":"grid-column:1 / -1;","row-span-full":"grid-row:1 / -1;","auto-cols-auto":"grid-auto-columns:auto;","auto-cols-min":"grid-auto-columns:min-content;","auto-cols-max":"grid-auto-columns:max-content;","auto-cols-fr":"grid-auto-columns:1fr;","auto-rows-auto":"grid-auto-rows:auto;","auto-rows-min":"grid-auto-rows:min-content;","auto-rows-max":"grid-auto-rows:max-content;","auto-rows-fr":"grid-auto-rows:1fr;","grid-flow-row":"grid-auto-flow:row;","grid-flow-col":"grid-auto-flow:column;","grid-flow-row-dense":"grid-auto-flow:row dense;","grid-flow-col-dense":"grid-auto-flow:column dense;"}),Object.assign(e,{"text-left":"text-align:left;","text-center":"text-align:center;","text-right":"text-align:right;","text-justify":"text-align:justify;","font-thin":"font-weight:100;","font-extralight":"font-weight:200;","font-light":"font-weight:300;","font-normal":"font-weight:400;","font-medium":"font-weight:500;","font-semibold":"font-weight:600;","font-bold":"font-weight:700;","font-extrabold":"font-weight:800;","font-black":"font-weight:900;",italic:"font-style:italic;","not-italic":"font-style:normal;",uppercase:"text-transform:uppercase;",lowercase:"text-transform:lowercase;",capitalize:"text-transform:capitalize;","normal-case":"text-transform:none;",underline:"text-decoration-line:underline;",overline:"text-decoration-line:overline;","line-through":"text-decoration-line:line-through;","no-underline":"text-decoration-line:none;",truncate:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","whitespace-normal":"white-space:normal;","whitespace-nowrap":"white-space:nowrap;","whitespace-pre":"white-space:pre;","whitespace-pre-line":"white-space:pre-line;","whitespace-pre-wrap":"white-space:pre-wrap;","break-normal":"overflow-wrap:normal;word-break:normal;","break-words":"overflow-wrap:break-word;","break-all":"word-break:break-all;"}),[["text-xs","0.75rem","1"],["text-sm","0.875rem","1.25"],["text-base","1rem","1.5"],["text-lg","1.125rem","1.75"],["text-xl","1.25rem","1.75"],["text-2xl","1.5rem","2"],["text-3xl","1.875rem","2.25"],["text-4xl","2.25rem","2.5"],["text-5xl","3rem","1"],["text-6xl","3.75rem","1"],["text-7xl","4.5rem","1"],["text-8xl","6rem","1"],["text-9xl","8rem","1"]].forEach(([a,l,m])=>{e[a]=`font-size:${l};line-height:var(--ce-line-height,${m});`}),[["tracking-tighter","-0.05em"],["tracking-tight","-0.025em"],["tracking-normal","0em"],["tracking-wide","0.025em"],["tracking-wider","0.05em"],["tracking-widest","0.1em"]].forEach(([a,l])=>{e[a]=`letter-spacing:${l};`}),[["leading-3","0.75rem"],["leading-4","1rem"],["leading-5","1.25rem"],["leading-6","1.5rem"],["leading-7","1.75rem"],["leading-8","2rem"],["leading-9","2.25rem"],["leading-10","2.5rem"],["leading-none","1"],["leading-tight","1.25"],["leading-snug","1.375"],["leading-normal","1.5"],["leading-relaxed","1.625"],["leading-loose","2"]].forEach(([a,l])=>{e[a]=`line-height:${l};--ce-line-height:${l};line-height:var(--ce-line-height,${l});`});const i=[0,1,2,4,6,8];for(const a of i){const l=`${a}px`;e[`border-${a}`]=`border-width:${l};`,e[`border-t-${a}`]=`border-top-width:${l};`,e[`border-r-${a}`]=`border-right-width:${l};`,e[`border-b-${a}`]=`border-bottom-width:${l};`,e[`border-l-${a}`]=`border-left-width:${l};`,e[`border-x-${a}`]=`border-left-width:${l};border-right-width:${l};`,e[`border-y-${a}`]=`border-top-width:${l};border-bottom-width:${l};`}Object.assign(e,{"font-sans":"font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);","font-serif":"font-family:var(--font-serif, ui-serif,Georgia,serif);","font-mono":"font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);",border:"border-width:1px;","border-t":"border-top-width:1px;","border-r":"border-right-width:1px;","border-b":"border-bottom-width:1px;","border-l":"border-left-width:1px;","border-x":"border-left-width:1px;border-right-width:1px;","border-y":"border-top-width:1px;border-bottom-width:1px;","border-solid":"border-style:solid;","border-dashed":"border-style:dashed;","border-dotted":"border-style:dotted;","border-double":"border-style:double;","border-none":"border-style:none;"});const s={none:0,xs:2,sm:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,"4xl":32,full:9999};for(const[a,l]of Object.entries(s)){const m=l===9999?"9999px":`${l/16}rem`;e[`rounded-${a}`]=`border-radius:${m};`,e[`rounded-t-${a}`]=`border-top-left-radius:${m};border-top-right-radius:${m};`,e[`rounded-r-${a}`]=`border-top-right-radius:${m};border-bottom-right-radius:${m};`,e[`rounded-b-${a}`]=`border-bottom-left-radius:${m};border-bottom-right-radius:${m};`,e[`rounded-l-${a}`]=`border-top-left-radius:${m};border-bottom-left-radius:${m};`,e[`rounded-tl-${a}`]=`border-top-left-radius:${m};`,e[`rounded-tr-${a}`]=`border-top-right-radius:${m};`,e[`rounded-br-${a}`]=`border-bottom-right-radius:${m};`,e[`rounded-bl-${a}`]=`border-bottom-left-radius:${m};`}Object.assign(e,{"shadow-none":"--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);","shadow-xs":"--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));","shadow-sm":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-md":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-lg":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-xl":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-2xl":"--ce-shadow-color:rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));","shadow-inner":"box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / 0.05);"}),Object.assign(e,{rounded:"border-radius:0.25rem;"}),Object.assign(e,{"overflow-auto":"overflow:auto;","overflow-hidden":"overflow:hidden;","overflow-visible":"overflow:visible;","overflow-scroll":"overflow:scroll;","overflow-x-auto":"overflow-x:auto;","overflow-x-hidden":"overflow-x:hidden;","overflow-x-visible":"overflow-x:visible;","overflow-x-scroll":"overflow-x:scroll;","overflow-y-auto":"overflow-y:auto;","overflow-y-hidden":"overflow-y:hidden;","overflow-y-visible":"overflow-y:visible;","overflow-y-scroll":"overflow-y:scroll;"});const c=["auto","default","pointer","wait","text","move","help","not-allowed","grab","grabbing"];for(const a of c)e[`cursor-${a}`]=`cursor:${a};`;for(const a of[0,10,20,30,40,50])e[`z-${a}`]=`z-index:${a};`;Object.assign(e,{"sr-only":"position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;","not-sr-only":"position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;","pointer-events-none":"pointer-events:none;","pointer-events-auto":"pointer-events:auto;",visible:"visibility:visible;",invisible:"visibility:hidden;"}),Object.assign(e,{"w-full":"width:100%;","w-screen":"width:100dvw;","h-full":"height:100%;","h-screen":"height:100dvh;","max-w-full":"max-width:100%;","max-h-full":"max-height:100%;","max-w-screen":"max-width:100dvw;","max-h-screen":"max-height:100dvh;","min-w-0":"min-width:0;","min-h-0":"min-height:0;","min-w-full":"min-width:100%;","min-h-full":"min-height:100%;","min-w-screen":"min-width:100dvw;","min-h-screen":"min-height:100dvh;","w-auto":"width:auto;","h-auto":"height:auto;","w-fit":"width:fit-content;","h-fit":"height:fit-content;","w-min":"width:min-content;","h-min":"height:min-content;","w-max":"width:max-content;","h-max":"height:max-content;","m-auto":"margin:auto;","mx-auto":"margin-inline:auto;","my-auto":"margin-block:auto;"});for(const[a,l]of Object.entries(Gn))e[`max-w-${a}`]=`max-width:calc(${be} * ${l});`,e[`min-w-${a}`]=`min-width:calc(${be} * ${l});`,e[`w-${a}`]=`width:calc(${be} * ${l});`,e[`max-h-${a}`]=`max-height:calc(${be} * ${l});`,e[`min-h-${a}`]=`min-height:calc(${be} * ${l});`,e[`h-${a}`]=`height:calc(${be} * ${l});`;Object.assign(e,{transition:"transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;","transition-none":"transition-property:none;","transition-all":"transition-property:all;","transition-colors":"transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;","transition-shadow":"transition-property:box-shadow;","transition-opacity":"transition-property:opacity;","transition-transform":"transition-property:transform;","ease-linear":"transition-timing-function:linear;","ease-in":"transition-timing-function:ease-in;","ease-out":"transition-timing-function:ease-out;","ease-in-out":"transition-timing-function:ease-in-out;","duration-75":"transition-duration:75ms;","duration-100":"transition-duration:100ms;","duration-150":"transition-duration:150ms;","duration-200":"transition-duration:200ms;","duration-300":"transition-duration:300ms;","duration-500":"transition-duration:500ms;","duration-700":"transition-duration:700ms;","duration-1000":"transition-duration:1000ms;"}),Object.assign(e,{"scale-0":"transform:scale(0);","scale-50":"transform:scale(0.5);","scale-75":"transform:scale(0.75);","scale-90":"transform:scale(0.9);","scale-95":"transform:scale(0.95);","scale-100":"transform:scale(1);","scale-105":"transform:scale(1.05);","scale-110":"transform:scale(1.1);","scale-125":"transform:scale(1.25);","scale-150":"transform:scale(1.5);","rotate-0":"transform:rotate(0deg);","rotate-1":"transform:rotate(1deg);","rotate-2":"transform:rotate(2deg);","rotate-3":"transform:rotate(3deg);","rotate-6":"transform:rotate(6deg);","rotate-12":"transform:rotate(12deg);","rotate-45":"transform:rotate(45deg);","rotate-90":"transform:rotate(90deg);","rotate-180":"transform:rotate(180deg);","-rotate-1":"transform:rotate(-1deg);","-rotate-2":"transform:rotate(-2deg);","-rotate-3":"transform:rotate(-3deg);","-rotate-6":"transform:rotate(-6deg);","-rotate-12":"transform:rotate(-12deg);","-rotate-45":"transform:rotate(-45deg);","-rotate-90":"transform:rotate(-90deg);","-rotate-180":"transform:rotate(-180deg);"}),Object.assign(e,{"aspect-auto":"aspect-ratio:auto;","aspect-square":"aspect-ratio:1 / 1;","aspect-video":"aspect-ratio:16 / 9;"}),Object.assign(e,{"object-contain":"object-fit:contain;","object-cover":"object-fit:cover;","object-fill":"object-fit:fill;","object-none":"object-fit:none;","object-scale-down":"object-fit:scale-down;","object-bottom":"object-position:bottom;","object-center":"object-position:center;","object-left":"object-position:left;","object-left-bottom":"object-position:left bottom;","object-left-top":"object-position:left top;","object-right":"object-position:right;","object-right-bottom":"object-position:right bottom;","object-right-top":"object-position:right top;","object-top":"object-position:top;"});for(let a=1;a<=6;a++)e[`line-clamp-${a}`]=`display:-webkit-box;-webkit-line-clamp:${a};-webkit-box-orient:vertical;overflow:hidden;`;e["line-clamp-none"]="overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none;";for(let a=1;a<=12;a++)e[`order-${a}`]=`order:${a};`;e["order-first"]="order:-9999;",e["order-last"]="order:9999;",e["order-none"]="order:0;";for(let a=0;a<=12;a++)a<=1||(e[`grow-${a}`]=`flex-grow:${a};`,e[`shrink-${a}`]=`flex-shrink:${a};`);return Object.assign(e,{"bg-linear-to-t":"background-image:linear-gradient(to top, var(--ce-gradient-stops));","bg-linear-to-tr":"background-image:linear-gradient(to top right, var(--ce-gradient-stops));","bg-linear-to-r":"background-image:linear-gradient(to right, var(--ce-gradient-stops));","bg-linear-to-br":"background-image:linear-gradient(to bottom right, var(--ce-gradient-stops));","bg-linear-to-b":"background-image:linear-gradient(to bottom, var(--ce-gradient-stops));","bg-linear-to-bl":"background-image:linear-gradient(to bottom left, var(--ce-gradient-stops));","bg-linear-to-l":"background-image:linear-gradient(to left, var(--ce-gradient-stops));","bg-linear-to-tl":"background-image:linear-gradient(to top left, var(--ce-gradient-stops));","bg-radial":"background-image:radial-gradient(ellipse at center, var(--ce-gradient-stops));","bg-radial-at-t":"background-image:radial-gradient(ellipse at top, var(--ce-gradient-stops));","bg-radial-at-tr":"background-image:radial-gradient(ellipse at top right, var(--ce-gradient-stops));","bg-radial-at-r":"background-image:radial-gradient(ellipse at right, var(--ce-gradient-stops));","bg-radial-at-br":"background-image:radial-gradient(ellipse at bottom right, var(--ce-gradient-stops));","bg-radial-at-b":"background-image:radial-gradient(ellipse at bottom, var(--ce-gradient-stops));","bg-radial-at-bl":"background-image:radial-gradient(ellipse at bottom left, var(--ce-gradient-stops));","bg-radial-at-l":"background-image:radial-gradient(ellipse at left, var(--ce-gradient-stops));","bg-radial-at-tl":"background-image:radial-gradient(ellipse at top left, var(--ce-gradient-stops));","bg-radial-circle":"background-image:radial-gradient(circle at center, var(--ce-gradient-stops));","bg-radial-circle-at-t":"background-image:radial-gradient(circle at top, var(--ce-gradient-stops));","bg-radial-circle-at-tr":"background-image:radial-gradient(circle at top right, var(--ce-gradient-stops));","bg-radial-circle-at-r":"background-image:radial-gradient(circle at right, var(--ce-gradient-stops));","bg-radial-circle-at-br":"background-image:radial-gradient(circle at bottom right, var(--ce-gradient-stops));","bg-radial-circle-at-b":"background-image:radial-gradient(circle at bottom, var(--ce-gradient-stops));","bg-radial-circle-at-bl":"background-image:radial-gradient(circle at bottom left, var(--ce-gradient-stops));","bg-radial-circle-at-l":"background-image:radial-gradient(circle at left, var(--ce-gradient-stops));","bg-radial-circle-at-tl":"background-image:radial-gradient(circle at top left, var(--ce-gradient-stops));","bg-conic":"background-image:conic-gradient(from 0deg at center, var(--ce-gradient-stops));","bg-conic-at-t":"background-image:conic-gradient(from 0deg at top, var(--ce-gradient-stops));","bg-conic-at-tr":"background-image:conic-gradient(from 0deg at top right, var(--ce-gradient-stops));","bg-conic-at-r":"background-image:conic-gradient(from 0deg at right, var(--ce-gradient-stops));","bg-conic-at-br":"background-image:conic-gradient(from 0deg at bottom right, var(--ce-gradient-stops));","bg-conic-at-b":"background-image:conic-gradient(from 0deg at bottom, var(--ce-gradient-stops));","bg-conic-at-bl":"background-image:conic-gradient(from 0deg at bottom left, var(--ce-gradient-stops));","bg-conic-at-l":"background-image:conic-gradient(from 0deg at left, var(--ce-gradient-stops));","bg-conic-at-tl":"background-image:conic-gradient(from 0deg at top left, var(--ce-gradient-stops));"}),e},st=Zn();function oe(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r];if(o==="["||o==="(")n++;else if((o==="]"||o===")")&&n>0)n--;else if(n===0&&(o===">"||o==="+"||o==="~"||o===" "))return e.slice(0,r)+t+e.slice(r)}return e+t}const Jn={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${oe(e,":hover")}{${t}}`,focus:(e,t)=>`${oe(e,":focus")}{${t}}`,active:(e,t)=>`${oe(e,":active")}{${t}}`,disabled:(e,t)=>`${oe(e,":disabled")}{${t}}`,visited:(e,t)=>`${oe(e,":visited")}{${t}}`,checked:(e,t)=>`${oe(e,":checked")}{${t}}`,first:(e,t)=>`${oe(e,":first-child")}{${t}}`,last:(e,t)=>`${oe(e,":last-child")}{${t}}`,odd:(e,t)=>`${oe(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${oe(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${oe(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${oe(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}}`},at={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)"},It={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)"},ct=["sm","md","lg","xl","2xl"],lt=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function ut(e){const t=e.startsWith("-"),n=t?e.slice(1):e,r=n.lastIndexOf("-");if(r===-1)return null;const o=n.slice(0,r),i=n.slice(r+1);if(!it[o])return null;if(i.includes("/")){const[a,l]=i.split("/").map(y=>parseFloat(y));if(Number.isNaN(a)||Number.isNaN(l)||l===0)return null;const m=a/l*100;return it[o].map(y=>`${y}:${m}%;`).join("")}const s=parseFloat(i);if(Number.isNaN(s))return null;const c=t?"-":"";return it[o].map(a=>`${a}:calc(${c}${be} * ${s});`).join("")}function ft(e){const t=e.startsWith("-"),r=(t?e.slice(1):e).match(/^space-(x|y)-(.+)$/);if(!r)return null;const[,o,i]=r,s=o==="x";if(i==="reverse")return s?"--ce-space-x-reverse:1;":"--ce-space-y-reverse:1;";if(i.includes("/")){const[m,y]=i.split("/").map(f=>parseFloat(f));if(Number.isNaN(m)||Number.isNaN(y)||y===0)return null;const p=m/y*100,v=t?"-":"";return s?`--ce-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${v}${p}% * calc(1 - var(--ce-space-x-reverse)));margin-inline-end:calc(${v}${p}% * var(--ce-space-x-reverse));}`:`--ce-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${v}${p}% * calc(1 - var(--ce-space-y-reverse)));margin-bottom:calc(${v}${p}% * var(--ce-space-y-reverse));}`}const c=parseFloat(i);if(Number.isNaN(c))return null;const l=`calc(${t?"-":""}${be} * ${c})`;return s?`--ce-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${l} * calc(1 - var(--ce-space-x-reverse)));margin-inline-end:calc(${l} * var(--ce-space-x-reverse));}`:`--ce-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${l} * calc(1 - var(--ce-space-y-reverse)));margin-bottom:calc(${l} * var(--ce-space-y-reverse));}`}function Wt(e){const t=e.replace("#",""),n=parseInt(t,16);return`${n>>16&255} ${n>>8&255} ${n&255}`}const Xn=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,Yn={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 Qn(e){const t=Xn.exec(e);if(!t)return null;const[,n,r,o="DEFAULT"]=t,i=on[r]?.[o];if(!i)return null;if(n==="shadow")return`--ce-shadow-color:${i};`;const s=Yn[n];return s?`${s}:${i};`:null}function er(e){const t=e.indexOf("/");if(t===-1)return{base:e};const n=e.slice(0,t),r=e.slice(t+1),o=parseInt(r,10);return isNaN(o)||o<0||o>100?{base:n}:{base:n,opacity:o/100}}function dt(e){const{base:t,opacity:n}=er(e),r=Qn(t);if(r&&n!==void 0){const i=/#([0-9a-f]{6})/i.exec(r);if(i){const s=Wt(i[0]);return r.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${n})`)}}if(r)return r;const o=Qe(t);if(o&&n!==void 0){const i=/#([0-9a-f]{6})/i.exec(o);if(i){const s=Wt(i[0]);return o.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${n})`)}}return o}function pt(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,n,r,o="DEFAULT"]=t,i=on[r]?.[o];if(!i)return null;switch(n){case"from":return`--ce-gradient-from:${i} var(--ce-gradient-from-position);--ce-gradient-to:rgb(255 255 255 / 0) var(--ce-gradient-to-position);--ce-gradient-stops:var(--ce-gradient-from), var(--ce-gradient-to);`;case"to":return`--ce-gradient-to:${i} var(--ce-gradient-to-position);`;case"via":return`--ce-gradient-to:rgb(255 255 255 / 0) var(--ce-gradient-to-position);--ce-gradient-stops:var(--ce-gradient-from), ${i} var(--ce-gradient-via-position), var(--ce-gradient-to);`;default:return null}}function ht(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const n=parseInt(t[1],10);return n<0||n>100?null:`opacity:${n/100};`}function Qe(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const s=e.slice(1,-1).trim(),c=s.indexOf(":");if(c===-1)return null;const a=s.slice(0,c).trim();let l=s.slice(c+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(a)?(l=l.replace(/_/g," "),l=l.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),l=l.replace(/^'([^']*)'$/g,'"$1"'),`${a}:${l};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const n=e.slice(0,t);let r=e.slice(t+2,-1).replace(/_/g," ");const o={bg:"background-color",shadow:"box-shadow",p:"padding",px:"padding-inline",py:"padding-block",m:"margin",mx:"margin-inline",my:"margin-block",w:"width",h:"height","min-w":"min-width","max-w":"max-width","min-h":"min-height","max-h":"max-height","border-t":"border-top-width","border-b":"border-bottom-width","border-l":"border-left-width","border-r":"border-right-width","border-x":"border-inline-width","border-y":"border-block-width","grid-cols":"grid-template-columns","grid-rows":"grid-template-rows",transition:"transition-property",ease:"transition-timing-function",delay:"transition-delay",duration:"transition-duration",list:"list-style",break:"word-break",flex:"flex-direction",items:"align-items",justify:"justify-content",content:"align-content",self:"align-self",basis:"flex-basis",tracking:"letter-spacing",leading:"line-height",z:"z-index",opacity:"opacity"};if(n==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(r)?`font-size:${r};`:`color:${r};`;if(n==="rotate")return`transform:rotate(${r});`;if(n==="scale")return`transform:scale(${r});`;if(n==="translate-x")return`transform:translateX(${r});`;if(n==="translate-y")return`transform:translateY(${r});`;const i=o[n]??n.replace(/_/g,"-");return i&&r?`${i}:${r};`:null}function tr(e){if(e.startsWith("[")&&e.endsWith("]")){const n=e.slice(1,-1);return n.includes("&")?n:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const n=e.slice(t+2,-1).replace(/_/g,"-");return n.includes("&")?n:e.replace(/_/g,"-")}return null}function Bt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function nr(e){const t=/class\s*=\s*(['"])([\s\S]*?)\1/g,n=[];let r;for(;r=t.exec(e);){const o=r[2].split(/\s+/).filter(Boolean);o.length&&n.push(...o)}return n}const Me=new Map,rr=16,zt=1e3;function sn(e){const t=Date.now(),n=Me.get(e);if(n&&t-n.timestamp<rr)return n.css;const r=nr(e);if(!r.length)return"";const o=new Set(r),i=[[],[],[],[]],s={},c=(h,d=!1)=>{const u=d?`dark|${h}`:h;if(u in s)return s[u];const g=y(h,d);return s[u]=g,g},a=h=>{const d=h.some(w=>ct.includes(w)),u=h.some(w=>w.startsWith("@")&&(lt.includes(w.slice(1))||w.match(/^@\[.+\]$/))),g=h.includes("dark");return h.length?!d&&!g&&!u?1:g&&(d||u)?3:2:0},l=h=>{const d=[];let u="",g=0;for(let w=0;w<h.length;w++){const k=h[w];k==="["||k==="("?g++:(k==="]"||k===")")&&g--,k===":"&&g===0?(d.push(u),u=""):u+=k}return u&&d.push(u),d},m={hover:":hover",focus:":focus",active:":active",visited:":visited",disabled:":disabled",checked:":checked",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","focus-within":":focus-within","focus-visible":":focus-visible"},y=(h,d=!1)=>{const u=l(h);let g="",w=!1;for(const L of u){let W=L;if(W.startsWith("!")&&(w=!0,W=W.slice(1)),st[W]||ut(W)||ft(W)||ht(W)||dt(W)||pt(W)||Qe(W)){g=L;break}}if(!g)return null;const k=g.replace(/^!/,""),S=st[k]??ut(k)??ft(k)??ht(k)??dt(k)??pt(k)??Qe(k);if(!S)return null;const C=u.indexOf(g);let _=C>=0?u.slice(0,C):[];d&&(_=_.filter(L=>L!=="dark"));const x=`.${Bt(h)}`,T=w?S.replace(/;/g," !important;"):S,$="__SUBJECT__";let b=$;const A=[];for(const L of _)L.startsWith("group-")?(b=`.group:${L.slice(6)} ${b}`,A.push(L)):L.startsWith("peer-")&&(b=b.replace($,`.peer:${L.slice(5)}~${$}`),A.push(L));_=_.filter(L=>!A.includes(L));const O=[],j=[];let E=null;for(const L of _){if(L==="dark"||ct.includes(L)||L.startsWith("@")&&(lt.includes(L.slice(1))||L.match(/^@\[.+\]$/)))continue;const W=tr(L);if(W){E=W;continue}const G=m[L];if(G){E?j.push(G):O.push(G);continue}const z=Jn[L];typeof z=="function"&&(b=z(b,T).split("{")[0])}const P=O.join(""),N=j.join("");function Y(L,W){if(!W)return L;let G=0,z=0;if(L.length&&(L[0]===">"||L[0]==="+"||L[0]==="~"||L[0]===" ")){let K=1;for(;K<L.length&&L[K]===" ";)K++;for(;K<L.length;K++){const Z=L[K];if(Z==="["?G++:Z==="]"&&G>0?G--:Z==="("?z++:Z===")"&&z>0&&z--,G===0&&z===0&&(L[K]===">"||L[K]==="+"||L[K]==="~"||L[K]===" "))return L.slice(0,K)+W+L.slice(K)}return L+W}for(let K=0;K<L.length;K++){const Z=L[K];if(Z==="["?G++:Z==="]"&&G>0?G--:Z==="("?z++:Z===")"&&z>0&&z--,G===0&&z===0&&(Z===">"||Z==="+"||Z==="~"||Z===" "))return L.slice(0,K)+W+L.slice(K)}return L+W}if(E)if(E.includes("&")){const L=E.indexOf("&"),W=E.slice(0,L),G=E.slice(L+1),z=$+P;if(O.length===0)b=b.replace($,W+z+N+G);else{const K=Y(G,N);b=b.replace($,W+z+K)}}else b=b.replace($,`${E}${$+P}`),N&&(b=b.replace($,`${$}${N}`));else b=b.replace($,$+P+N);b=b.replace(new RegExp($,"g"),x);let F=`${b}{${T}}`;const q=_.filter(L=>ct.includes(L)),D=_.filter(L=>L.startsWith("@")&&(lt.includes(L.slice(1))||L.match(/^@\[.+\]$/))),V=q.length?q[q.length-1]:null,ae=D.length?D[D.length-1]:null,ke=_.includes("dark");let I="",fe="";if(ke&&V?I=`@media (prefers-color-scheme: dark) and ${at[V]}`:ke?I="@media (prefers-color-scheme: dark)":V&&(I=`@media ${at[V]}`),ae)if(ae.startsWith("@[")&&ae.endsWith("]")){const L=ae.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(L))return null;fe=`@container (min-width:${L})`}else{const L=ae.slice(1);fe=`@container ${It[L]||`(min-width:${L})`}`}return I&&fe?F=`${I}${fe}{${F}}`:I?F=`${I}{${F}}`:fe&&(F=`${fe}{${F}}`),F};for(const h of o){const d=l(h),u=d.find(C=>st[C.replace(/^!/,"")]||ut(C.replace(/^!/,""))||ft(C.replace(/^!/,""))||ht(C.replace(/^!/,""))||dt(C.replace(/^!/,""))||pt(C.replace(/^!/,""))||Qe(C.replace(/^!/,"")));if(!u)continue;const g=d.indexOf(u),w=g>=0?d.slice(0,g):[],k=a(w),S=c(h);S&&i[k].push(S)}const p=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const h of o)if(p.test(h)){if(i.flat().join("").includes(`.${Bt(h)}`))continue;const u=c(h);u&&i[0].push(u)}const v=h=>h.sort((d,u)=>{const g=x=>{const T={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const[$,b]of Object.entries(T))if(x.includes(`@media ${at[$]}`))return b;return-1},w=x=>{const T={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};for(const[$,b]of Object.entries(T))if(x.includes(`@container ${It[$]}`))return b;if(x.includes("@container (min-width:")){const $=/@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(x);if($){const b=parseFloat($[1]),A=$[2];return A==="rem"||A==="em"?b*16:b}}return-1},k=g(d),S=g(u),C=w(d),_=w(u);return k>=0&&S>=0&&k!==S?k-S:C>=0&&_>=0&&C!==_?C-_:0});i[2]=v(i[2]),i[3]=v(i[3]);const f=i.flat().join("");return Me.size>=zt&&Array.from(Me.keys()).slice(0,Math.floor(zt/2)).forEach(d=>Me.delete(d)),Me.set(e,{css:f,timestamp:t}),f}function We(e,t){const n="when-block";return U(typeof t=="function"?e?t():[]:e?t:[],n)}function or(e,t){return e.map((n,r)=>{const o=typeof n=="object"?n?.key??n?.id??`idx-${r}`:String(n);return U(t(n,r),`each-${o}`)})}function an(){const e=[];return{when(t,n){return e.push([t,n]),this},otherwise(t){return e.push([!0,t]),this},done(){return ir(...e)}}}function ir(...e){for(let t=0;t<e.length;t++){const[n,r]=e[t];if(n){const o=typeof r=="function"?r():r;return[U(o,`whenChain-branch-${t}`)]}}return[U([],"whenChain-empty")]}function U(e,t){const n=e?Array.isArray(e)?e.filter(r=>r!=null):[e].filter(r=>r!=null):[];return{tag:"#anchor",key:t,children:n}}const je={fade:{enterFrom:"opacity-0",enterActive:"transition-opacity duration-300 ease-out",enterTo:"opacity-100",leaveFrom:"opacity-100",leaveActive:"transition-opacity duration-200 ease-in",leaveTo:"opacity-0"},"slide-right":{enterFrom:"translate-x-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[100%] opacity-0"},"slide-left":{enterFrom:"translate-x-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[-100%] opacity-0"},"slide-up":{enterFrom:"translate-y-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[100%] opacity-0"},"slide-down":{enterFrom:"translate-y-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[-100%] opacity-0"},scale:{enterFrom:"scale-95 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-95 opacity-0"},"scale-down":{enterFrom:"scale-105 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-105 opacity-0"},bounce:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-500 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},zoom:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},flip:{enterFrom:"rotate-[90deg] opacity-0",enterActive:"transition-all duration-400 ease-out",enterTo:"rotate-[0deg] opacity-100",leaveFrom:"rotate-[0deg] opacity-100",leaveActive:"transition-all duration-300 ease-in",leaveTo:"rotate-[90deg] opacity-0"}};function sr(e,t){const{preset:n,show:r,mode:o="default",duration:i,appear:s=!1,css:c=!0,name:a,enterFrom:l,enterActive:m,enterTo:y,leaveFrom:p,leaveActive:v,leaveTo:f,onBeforeEnter:h,onEnter:d,onAfterEnter:u,onEnterCancelled:g,onBeforeLeave:w,onLeave:k,onAfterLeave:S,onLeaveCancelled:C}=e;let _;n&&je[n]?(_={...je[n]},l&&(_.enterFrom=l),m&&(_.enterActive=m),y&&(_.enterTo=y),p&&(_.leaveFrom=p),v&&(_.leaveActive=v),f&&(_.leaveTo=f)):_={enterFrom:l,enterActive:m,enterTo:y,leaveFrom:p,leaveActive:v,leaveTo:f};const x=a||(n?`transition-${n}`:"transition"),T=U(r?t:[],x);return T._transition={name:x,classes:_,mode:o,duration:i,appear:s,css:c,state:r?"visible":"hidden",hooks:{onBeforeEnter:h,onEnter:d,onAfterEnter:u,onEnterCancelled:g,onBeforeLeave:w,onLeave:k,onAfterLeave:S,onLeaveCancelled:C}},T}function ar(e,t){const{tag:n="div",moveClass:r="transition-transform duration-300",preset:o,show:i=!0,mode:s="default",duration:c,appear:a=!1,css:l=!0,name:m,class:y,style:p,enterFrom:v,enterActive:f,enterTo:h,leaveFrom:d,leaveActive:u,leaveTo:g,onBeforeEnter:w,onEnter:k,onAfterEnter:S,onEnterCancelled:C,onBeforeLeave:_,onLeave:x,onAfterLeave:T,onLeaveCancelled:$}=e;let b;o&&je[o]?(b={...je[o]},v&&(b.enterFrom=v),f&&(b.enterActive=f),h&&(b.enterTo=h),d&&(b.leaveFrom=d),u&&(b.leaveActive=u),g&&(b.leaveTo=g)):b={enterFrom:v,enterActive:f,enterTo:h,leaveFrom:d,leaveActive:u,leaveTo:g};const A=m||(o?`transition-group-${o}`:"transition-group"),O=[];for(const j of i?t:[])if(j&&typeof j=="object"&&j.tag==="#anchor"){const E=Array.isArray(j.children)?j.children:[];for(const P of E)if(P&&typeof P=="object"){const N={...P,key:j.key||P.key,props:{...P.props,_anchorKey:j.key}};O.push(N)}else O.push(P)}else O.push(j);return{tag:n,children:O,key:A,props:{attrs:{...y?{class:y}:{},...p?{style:p}:{}},_transitionGroup:{name:A,classes:b,moveClass:r,mode:s,duration:c,appear:a,css:l,hooks:{onBeforeEnter:w,onEnter:k,onAfterEnter:S,onEnterCancelled:C,onBeforeLeave:_,onLeave:x,onAfterLeave:T,onLeaveCancelled:$}}}}}function cr(e){return{...e}}let Je=null;function tt(){if(!Je){const e=[];Object.values(je).forEach(r=>{r.enterFrom&&e.push(r.enterFrom),r.enterActive&&e.push(r.enterActive),r.enterTo&&e.push(r.enterTo),r.leaveFrom&&e.push(r.leaveFrom),r.leaveActive&&e.push(r.leaveActive),r.leaveTo&&e.push(r.leaveTo)});const t=`<div class="${e.join(" ")}"></div>`,n=sn(t);Je=new CSSStyleSheet,Je.replaceSync(n)}return Je}function lr(){tt()}lr();const He=[];function ur(e,t,n,r,o,i,s,c){if(e){He.push(n);try{const a=t.render(n);if(a instanceof Promise){i(!0),a.then(l=>{i(!1),s(null),Ut(e,l,n,r,o),c(e.innerHTML)}).catch(l=>{i(!1),s(l)});return}Ut(e,a,n,r,o),c(e.innerHTML)}finally{He.pop()}}}function Ut(e,t,n,r,o){e&&(Un(e,Array.isArray(t)?t:[t],n,r),o(e.innerHTML))}function fr(e,t,n,r,o,i,s){if(i!==null&&clearTimeout(i),Date.now()-t<16){if(o(n+1),n===15)te(`⚠️ Component is re-rendering rapidly. This might indicate:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./helpers-D3UjNfYY.cjs"),j=require("./logger-CqdBMdui.cjs"),Y=require("./transitions-Crm12oGl.cjs");function Je(e,r,n){if(n)for(const[t,s]of Object.entries(n)){let o,i={};if(Array.isArray(s)?(o=s[0],i=s[1]||{}):o=s,r.set(t,{callback:o,options:i,oldValue:p.getNestedValue(e,t)}),i.immediate)try{const a=p.getNestedValue(e,t);o(a,void 0,e)}catch(a){j.devError(`Error in immediate watcher for "${t}":`,a)}}}function Ye(e,r,n,t){const s=(i,a)=>{if(i===a)return!0;if(typeof i!=typeof a||typeof i!="object"||i===null||a===null)return!1;if(Array.isArray(i)&&Array.isArray(a))return i.length!==a.length?!1:i.every((c,g)=>s(c,a[g]));const f=i,u=a,S=Object.keys(f||{}),k=Object.keys(u||{});return S.length!==k.length?!1:S.every(c=>s(f[c],u[c]))},o=r.get(n);if(o&&!s(t,o.oldValue))try{o.callback(t,o.oldValue,e),o.oldValue=t}catch(i){j.devError(`Error in watcher for "${n}":`,i)}for(const[i,a]of r.entries())if(a.options.deep&&n.startsWith(i+"."))try{const f=p.getNestedValue(e,i);s(f,a.oldValue)||(a.callback(f,a.oldValue,e),a.oldValue=f)}catch(f){j.devError(`Error in deep watcher for "${i}":`,f)}}function Ae(e,r){return r===Boolean?e===""||e==="true":r===Number?Number(e):e}function Xe(e,r,n){if(r)for(const t in r){const s=r[t],o=p.toKebab(t),i=e.getAttribute(o);if(s.type===Function&&typeof e[t]=="function")n[t]=e[t];else if(i!==null)n[t]=Ae(i,s.type);else if(typeof e[t]<"u")try{const a=e[t];if(s.type===String&&a&&typeof a=="object")try{n[t]=Ae(String(a),s.type)}catch{n[t]=a}else s.type===Boolean&&typeof a=="boolean"||s.type===Number&&typeof a=="number"||s.type===Function&&typeof a=="function"?n[t]=a:n[t]=Ae(String(a),s.type)}catch{n[t]=e[t]}else"default"in s&&s.default!==void 0&&(n[t]=s.default)}}function Qe(e,r,n){if(!r.props){try{const t=n?._hookCallbacks?.props||{},s=Array.from(new Set([...Object.keys(e||{}),...Object.keys(t||{})]));for(const o of s){if(typeof o!="string"||o.startsWith("_"))continue;const i=Object.getOwnPropertyDescriptor(n,o);if(!(!Object.prototype.hasOwnProperty.call(t,o)&&i&&(i.get||i.set||!i.configurable)))try{Object.defineProperty(n,o,{enumerable:!0,configurable:!0,get(){try{const f=p.toKebab(o),u=e.getAttribute(f);if(u!==null)return u;const S=e[o];let k;return p.isReactiveState(S)||S&&typeof S=="object"&&"value"in S&&!(S instanceof Node)?k=S.value:k=S,k}catch{return e[o]}}})}catch{}}}catch{}return}Xe(e,r.props,n)}function et(e,r,n,t){e.onConnected&&!n&&(e.onConnected(r),t(!0))}function tt(e,r,n,t,s,o,i,a){e.onDisconnected&&e.onDisconnected(r),n.forEach(f=>f()),t(),s(),o(!1),i(null),a(!1)}function nt(e,r,n,t,s){e.onAttributeChanged&&e.onAttributeChanged(r,n,t,s)}class rt{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(r,n){const t=this.cache.get(r);if(t){if(!t.isSecure){j.devWarn("Blocked cached dangerous expression:",r);return}try{this.cache.delete(r),this.cache.set(r,t)}catch{}return t.evaluator(n)}const s=this.createEvaluator(r);if(this.cache.size>=this.maxCacheSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}if(this.cache.set(r,s),!s.isSecure){j.devWarn("Blocked dangerous expression:",r);return}return s.evaluator(n)}static createEvaluator(r){if(this.hasDangerousPatterns(r))return{evaluator:()=>{},isSecure:!1};if(r.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(r),isSecure:!0}}catch(n){return j.devWarn("Failed to create evaluator for expression:",r,n),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(r){return this.dangerousPatterns.some(n=>n.test(r))}static createSafeEvaluator(r){const n=r.trim();if(n.startsWith("{")&&n.endsWith("}"))return this.createObjectEvaluator(r);if(/^ctx\.[a-zA-Z0-9_.]+$/.test(r.trim())){const t=r.trim().slice(4);return s=>p.getNestedValue(s,t)}return r.includes("ctx")||/[+\-*/%<>=&|?:[\]]/.test(r)?this.createSimpleEvaluator(r):t=>p.getNestedValue(t,r)}static createObjectEvaluator(r){const n=r.trim().slice(1,-1),t=this.parseObjectProperties(n);return s=>{const o={};for(const{key:i,value:a}of t)try{if(a.startsWith("ctx.")){const f=a.slice(4);o[i]=p.getNestedValue(s,f)}else o[i]=this.evaluateSimpleValue(a,s)}catch{o[i]=void 0}return o}}static parseObjectProperties(r){const n=[],t=r.split(",");for(const s of t){const o=s.indexOf(":");if(o===-1)continue;const i=s.slice(0,o).trim(),a=s.slice(o+1).trim(),f=i.replace(/^['"]|['"]$/g,"");n.push({key:f,value:a})}return n}static createSimpleEvaluator(r){return n=>{try{let t=r;const s=[];t=t.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,k=>`<<#${s.push(k)-1}#>>`);const o=t.match(/ctx\.[\w.]+/g)||[];for(const k of o){const c=k.slice(4),g=p.getNestedValue(n,c);if(g===void 0)return;const d=s.push(JSON.stringify(g))-1;t=t.replace(new RegExp(k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`)}const i=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,a=t.match(i)||[];for(const k of a){if(k.startsWith("ctx."))continue;const c=p.getNestedValue(n,k);if(c===void 0)return;const g=s.push(JSON.stringify(c))-1;t=t.replace(new RegExp(k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${g}#>>`)}const f=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let u;const S=new Set;for(;(u=f.exec(t))!==null;){const k=u[1];if(["true","false","null","undefined"].includes(k)||/^[0-9]+$/.test(k)||k==="ctx"||S.has(k))continue;S.add(k);const c=p.getNestedValue(n,k);if(c===void 0)return;const g=JSON.stringify(c),d=s.push(g)-1;k.includes(".")?t=t.replace(new RegExp(k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`):t=t.replace(new RegExp("\\b"+k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${d}#>>`)}t=t.replace(/<<#(\d+)#>>/g,(k,c)=>s[Number(c)]);try{return this.evaluateBasicExpression(t)}catch{return}}catch{return}}}static evaluateBasicExpression(r){const n=this.tokenize(r);let t=0;function s(){return n[t]}function o(l){const E=n[t++];if(l&&!E)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&E&&E.type!==l&&E.value!==l)throw new Error(`Unexpected token ${E.type}/${E.value}, expected ${l}`);return E}function i(){return d()}function a(l){if(typeof l=="number")return l;if(l==null)return NaN;if(typeof l=="boolean")return l?1:0;const E=Number(l);return Number.isNaN(E)?NaN:E}function f(l,E){return typeof l=="string"||typeof E=="string"?String(l)+String(E):a(l)+a(E)}function u(l,E){return a(l)-a(E)}function S(l,E){return a(l)*a(E)}function k(l,E){return a(l)/a(E)}function c(l,E){return a(l)%a(E)}function g(l,E,y){if(typeof E=="number"&&typeof y=="number")switch(l){case">":return E>y;case"<":return E<y;case">=":return E>=y;case"<=":return E<=y;default:return!1}const h=String(E),C=String(y);switch(l){case">":return h>C;case"<":return h<C;case">=":return h>=C;case"<=":return h<=C;default:return!1}}function d(){const l=b(),E=s();if(E&&E.value==="?"){o("?");const y=i();o(":");const h=i();return l?y:h}return l}function b(){let l=m();for(;;){const E=s();if(!E||E.value!=="||")break;o("OP");const y=m();l=l||y}return l}function m(){let l=L();for(;;){const E=s();if(!E||E.value!=="&&")break;o("OP");const y=L();l=l&&y}return l}function L(){let l=w();for(;;){const E=s();if(!E||!["==","!=","===","!=="].includes(E.value))break;const y=o("OP").value,h=w();switch(y){case"==":l=l==h;break;case"!=":l=l!=h;break;case"===":l=l===h;break;case"!==":l=l!==h;break}}return l}function w(){let l=v();for(;;){const E=s();if(!E||![">","<",">=","<="].includes(E.value))break;const y=o("OP").value,h=v();switch(y){case">":l=g(">",l,h);break;case"<":l=g("<",l,h);break;case">=":l=g(">=",l,h);break;case"<=":l=g("<=",l,h);break}}return l}function v(){let l=_();for(;;){const E=s();if(!E||E.value!=="+"&&E.value!=="-")break;const y=o("OP").value,h=_();l=y==="+"?f(l,h):u(l,h)}return l}function _(){let l=T();for(;;){const E=s();if(!E||E.value!=="*"&&E.value!=="/"&&E.value!=="%")break;const y=o("OP").value,h=T();switch(y){case"*":l=S(l,h);break;case"/":l=k(l,h);break;case"%":l=c(l,h);break}}return l}function T(){const l=s();if(l&&l.value==="!")return o("OP"),!T();if(l&&l.value==="-"){o("OP");const E=T();return u(0,E)}return N()}function N(){const l=s();if(l){if(l.type==="NUMBER")return o("NUMBER"),Number(l.value);if(l.type==="STRING")return o("STRING"),l.value.slice(1,-1);if(l.type==="IDENT")return o("IDENT"),l.value==="true"?!0:l.value==="false"?!1:l.value==="null"?null:void 0;if(l.value==="["){o("PUNC");const E=[];for(;;){const y=s();if(!y||y.value==="]")break;E.push(i());const h=s();h&&h.value===","&&o("PUNC")}return o("PUNC"),E}if(l.value==="("){o("PUNC");const E=i();return o("PUNC"),E}throw new Error("Unexpected token in expression")}}return i()}static tokenize(r){const n=[],t=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let s;for(;(s=t.exec(r))!==null;){const o=s[1];o&&(/^\d/.test(o)?n.push({type:"NUMBER",value:o}):/^"/.test(o)||/^'/.test(o)?n.push({type:"STRING",value:o}):/^[a-zA-Z_]/.test(o)?n.push({type:"IDENT",value:o}):/^[()?:,[\]]$/.test(o)?n.push({type:"PUNC",value:o}):n.push({type:"OP",value:o}))}return n}static evaluateSimpleValue(r,n){if(r==="true")return!0;if(r==="false")return!1;if(!isNaN(Number(r)))return Number(r);if(r.startsWith("ctx.")){const t=r.slice(4);return p.getNestedValue(n,t)}return r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'")?r.slice(1,-1):r}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class U{static cleanupFunctions=new WeakMap;static addListener(r,n,t,s){r.addEventListener(n,t,s);const i={event:n,handler:t,wrapper:t,options:s,cleanup:()=>r.removeEventListener(n,t,s),addedAt:Date.now()};this.cleanupFunctions.has(r)||this.cleanupFunctions.set(r,[]);const a=this.cleanupFunctions.get(r);a.push(i),a.__metaList=a}static removeListener(r,n,t,s){r.removeEventListener(n,t,s);const o=this.cleanupFunctions.get(r);if(o)for(let i=0;i<o.length;i++){const a=o[i];if(a.event===n&&a.handler===t){o.splice(i,1),o.length===0&&this.cleanupFunctions.delete(r);return}}}static cleanup(r){const n=this.cleanupFunctions.get(r);n&&(n.forEach(t=>{try{t.cleanup()}catch{}}),this.cleanupFunctions.delete(r))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(r){const n=this.cleanupFunctions.get(r);return!!(n&&n.length>0)}static getListenerCount(r){const n=this.cleanupFunctions.get(r);return n?n.length:0}static getListenerInfo(r){const n=this.cleanupFunctions.get(r);return n?n.map(t=>({event:t.event,handler:t.handler,wrapper:t.wrapper,options:t.options})):[]}}function Se(e,r){return Array.isArray(e)&&Array.isArray(r)?JSON.stringify([...e].sort())!==JSON.stringify([...r].sort()):e!==r}function He(e,r,n,t,s){if(e){const o=r.value;if(s&&typeof o=="object"&&o!==null){const i={...o};i[s]=n,r.value=i}else r.value=n}else{const o=t._state||t;p.setNestedValue(o,r,n)}}function _e(e,r,n,t){if(typeof e._requestRender=="function"&&e._requestRender(),typeof e._triggerWatchers=="function"){const s=r?"reactiveState":n;e._triggerWatchers(s,t)}}function st(e,r,n){const t=`update:${p.toKebab(r)}`,s=`update:${r}`,o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}),i=new CustomEvent(s,{detail:n,bubbles:!0,cancelable:!0});e.dispatchEvent(o),e.dispatchEvent(i)}function xe(e,r,n,t){const s=n;if(p.safe(()=>{if(typeof e.setAttribute=="function")try{e[r]=s}catch{}else e[r]=s}),s==null||typeof s=="string"||typeof s=="number"||typeof s=="boolean"){const o=p.safeSerializeAttr(s);o!==null?p.safe(()=>{typeof e.setAttribute=="function"&&e.setAttribute(p.toKebab(r),o)}):p.safe(()=>{typeof e.removeAttribute=="function"&&e.removeAttribute(p.toKebab(r))})}}function it(e,r,n,t){if(e){const s=r.value;return t&&typeof s=="object"&&s!==null?s[t]:s}else{const s=n._state||n;return p.getNestedValue(s,r)}}function se(e){return e?e.split(/\s+/).filter(Boolean):[]}function ie(e,r){if(r.length===0)return;const n=r.filter(t=>t&&!e.classList.contains(t));n.length>0&&e.classList.add(...n)}function re(e,r){if(r.length===0)return;const n=r.filter(Boolean);n.length>0&&e.classList.remove(...n)}let we=!1;async function ot(e,r,n=10){if(!we){if(!e.isConnected){j.devWarn("⚠️ Element not connected to DOM, skipping style wait");return}for(let t=0;t<n;t++){const s=window.getComputedStyle(e),o=s.transform&&s.transform!=="",i=s.opacity&&s.opacity!=="";if(o||i){we=!0;return}await new Promise(a=>requestAnimationFrame(()=>a(void 0)))}we=!0,j.devWarn("⚠️ Styles did not load in time for transition, continuing anyway")}}function at(e){const r=window.getComputedStyle(e),n=r.transitionDuration||"0s",t=r.transitionDelay||"0s",s=o=>{const i=parseFloat(o);return o.includes("ms")?i:i*1e3};return s(n)+s(t)}function ze(e,r){return new Promise(n=>{const t=r??at(e);if(t<=0){n();return}let s=!1;const o=()=>{s||(s=!0,e.removeEventListener("transitionend",i),e.removeEventListener("transitioncancel",i),n())},i=()=>o();e.addEventListener("transitionend",i),e.addEventListener("transitioncancel",i),setTimeout(o,t+50)})}async function pe(e,r){const{classes:n,hooks:t,css:s,duration:o}=r;if(t?.onBeforeEnter)try{t.onBeforeEnter(e)}catch(d){j.devError("Transition onBeforeEnter error:",d)}if(!s)return t?.onEnter?new Promise(d=>{const b=t.onEnter;typeof b=="function"?b(e,()=>{if(t?.onAfterEnter)try{t.onAfterEnter(e)}catch(m){j.devError("Transition onAfterEnter error:",m)}d()}):d()}):void 0;const i=se(n?.enterFrom),a=se(n?.enterActive),f=se(n?.enterTo);ie(e,i),e.offsetHeight,ie(e,a),e.offsetHeight;let u;if(t?.onEnter){const d=new Promise(b=>{u=b});try{const b=t.onEnter;typeof b=="function"&&b(e,()=>{u&&u()})}catch(b){j.devError("Transition onEnter error:",b)}u&&await d}await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.offsetHeight;const S=window.getComputedStyle(e),k=S.transform,c=S.opacity;re(e,i),k&&k!=="none"&&(e.style.transform=k),c&&c!==""&&(e.style.opacity=c),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0))),e.style.transform="",e.style.opacity="",ie(e,f),e.offsetHeight,await new Promise(d=>requestAnimationFrame(()=>d(void 0)));let g;if(typeof o=="number"?g=o:o&&typeof o=="object"&&"enter"in o&&(g=o.enter),await ze(e,g),re(e,a),t?.onAfterEnter)try{t.onAfterEnter(e)}catch(d){j.devError("Transition onAfterEnter error:",d)}}async function Te(e,r){const{classes:n,hooks:t,css:s,duration:o}=r;if(t?.onBeforeLeave)try{t.onBeforeLeave(e)}catch(k){j.devError("Transition onBeforeLeave error:",k)}if(!s)return t?.onLeave?new Promise(k=>{const c=t.onLeave;typeof c=="function"?c(e,()=>{if(t?.onAfterLeave)try{t.onAfterLeave(e)}catch(g){j.devError("Transition onAfterLeave error:",g)}k()}):k()}):void 0;const i=se(n?.leaveFrom),a=se(n?.leaveActive),f=se(n?.leaveTo);ie(e,i),e.offsetHeight,ie(e,a);let u;if(t?.onLeave){const k=new Promise(c=>{u=c});try{const c=t.onLeave;typeof c=="function"&&c(e,()=>{u&&u()})}catch(c){j.devError("Transition onLeave error:",c)}u&&await k}await new Promise(k=>requestAnimationFrame(()=>k(void 0))),await ot(e,[...i,...a]),re(e,i),ie(e,f);let S;if(typeof o=="number"?S=o:o&&typeof o=="object"&&"leave"in o&&(S=o.leave),await ze(e,S),re(e,a),re(e,f),re(e,i),t?.onAfterLeave)try{t.onAfterLeave(e)}catch(k){j.devError("Transition onAfterLeave error:",k)}}const Ke=new WeakMap,Ve=new WeakMap;function ke(e){if(!e)return;const r=Ke.get(e);if(r!==void 0)return r;try{const n=e;if(n&&n.key!=null)return String(n.key)}catch{}if(e instanceof Element){const n=e.getAttribute("data-anchor-key");if(n)return n}}function z(e,r){try{Ke.set(e,r)}catch{}try{e.key=r}catch{}try{if(e instanceof Element){const n=p.safeSerializeAttr(r);n!==null&&e.setAttribute("data-anchor-key",n)}}catch{}}function ct(e){if(!e)return;const r=Ve.get(e);if(r!==void 0)return r;try{const n=e;if(n&&n._transitionGroup!=null)return n._transitionGroup}catch{}}function lt(e,r){try{Ve.set(e,r)}catch{}try{e._transitionGroup=r}catch{}}function oe(e){return e!==null&&typeof e=="object"&&"value"in e}function Oe(e){try{if(p.isReactiveState(e))return e.value}catch{}try{if(oe(e))return e.value}catch{}return e}function V(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function ae(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?p.isReactiveState(e)||"value"in e?!!e.value:!1:!!e}function ne(e,r){if(!r||!(e instanceof HTMLElement))return;U.cleanup(e);for(const t in r)r[t]===e&&delete r[t];const n=e.childNodes;for(let t=0;t<n.length;t++)ne(n[t],r)}function he(e,r,n){if(typeof e=="string")return;const t=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),s=e.props?.ref??(e.props?.props&&e.props.props.ref);if(t)try{if(p.isReactiveState(t)||typeof t=="object"&&"value"in t)t.value=r;else if(typeof t=="function")t(r);else if(typeof t=="string"&&n)try{const o=String(t);n[o]=r}catch{}}catch{}else if(s&&n)try{const o=String(s);n[o]=r}catch{}}function ft(e,r,n,t,s,o,i,a){if(!o)return;const f=r.includes("lazy"),u=r.includes("trim"),S=r.includes("number"),k=()=>{if(p.isReactiveState(e)){const _=e.value;return a&&i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement)&&typeof _=="object"&&_!==null?_[a]:_}const v=o?._state||o;return p.getNestedValue(v,e)},c=k();let g="text";i instanceof HTMLInputElement?g=t?.type||i.type||"text":i instanceof HTMLSelectElement?g="select":i instanceof HTMLTextAreaElement&&(g="textarea");const d=i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement,m=d?g==="checkbox"||g==="radio"?"checked":"value":a??"modelValue";if(g==="checkbox")if(Array.isArray(c))n[m]=c.includes(String(i?.getAttribute("value")??t?.value??""));else{const v=i?.getAttribute("true-value")??!0;n[m]=c===v}else if(g==="radio")n[m]=c===(t?.value??"");else if(g==="select")if(i&&i.hasAttribute("multiple")&&i instanceof HTMLSelectElement){const v=Array.isArray(c)?c.map(String):[];setTimeout(()=>{Array.from(i.options).forEach(_=>{_.selected=v.includes(_.value)})},0),n[m]=Array.isArray(c)?c:[]}else n[m]=c;else{!d&&p.isReactiveState(e)?n[m]=e:n[m]=c;try{const v=p.toKebab(m);t&&(t[v]=c)}catch{}}const L=f||g==="checkbox"||g==="radio"||g==="select"?"change":"input",w=v=>{if(v.isComposing||s._isComposing)return;const _=globalThis.process,T=!!_&&_.env?.NODE_ENV==="test"||typeof window<"u"&&globalThis.__vitest__;if(v.isTrusted===!1&&!T)return;const N=v.target;if(!N||N._modelUpdating)return;let O=N.value;if(g==="checkbox"){const y=k();if(Array.isArray(y)){const h=N.getAttribute("value")??"",C=Array.from(y);if(N.checked)C.includes(h)||C.push(h);else{const P=C.indexOf(h);P>-1&&C.splice(P,1)}O=C}else{const h=N.getAttribute("true-value")??!0,C=N.getAttribute("false-value")??!1;O=N.checked?h:C}}else if(g==="radio")O=N.getAttribute("value")??N.value;else if(g==="select"&&N.multiple)O=Array.from(N.selectedOptions).map(y=>y.value);else if(u&&typeof O=="string"&&(O=O.trim()),S){const y=Number(O);isNaN(y)||(O=y)}const l=k();if(Se(O,l)){N._modelUpdating=!0;try{He(p.isReactiveState(e),e,O,o,a),_e(o,p.isReactiveState(e),e,O),N&&st(N,m,O)}finally{setTimeout(()=>N._modelUpdating=!1,0)}}};if(d){if(s[L]){const v=s[L];i&&U.removeListener(i,L,v)}s[L]=w}else{const v=`update:${p.toKebab(m)}`,_=`update:${m}`;if(s[v]){const T=s[v];i&&U.removeListener(i,v,T)}if(s[_]){const T=s[_];i&&U.removeListener(i,_,T)}if(s[v]=T=>{const N=T.detail;let O=N!==void 0?N:void 0;if(O===void 0){const y=T.target;if(y&&typeof y=="object"&&"value"in y)try{O=y.value}catch{O=void 0}}const l=it(p.isReactiveState(e),e,o,a);if(Se(O,l)){He(p.isReactiveState(e),e,O,o,a),_e(o,p.isReactiveState(e),e,O);const y=T.target;y&&xe(y,m,p.isReactiveState(e)?e:O,p.isReactiveState(e))}},p.isReactiveState(e)&&typeof e.value=="object"&&e.value!==null){let T=[];try{T=Reflect.ownKeys(e.value)}catch{T=Object.keys(e.value)}const N=T.filter(O=>typeof O=="string"&&!String(O).startsWith("_")&&O!=="constructor");for(const O of N){const l=String(O),E=`update:${p.toKebab(l)}`,y=`update:${l}`;s[E]||(s[E]=h=>{const C=h.detail!==void 0?h.detail:h.target?.value,P=p.isReactiveState(e)?e.value[l]:p.getNestedValue(o?._state||o,e);if(!Se(C,P))return;if(p.isReactiveState(e)){const x={...e.value};x[l]=C,e.value=x}else p.setNestedValue(o?._state||o,e,C);_e(o,p.isReactiveState(e),e,C);const A=h.currentTarget||i||h.target;A&&xe(A,m,p.isReactiveState(e)?e:C,p.isReactiveState(e))},s[y]=s[E])}}s[_]=s[v]}(g==="text"||g==="textarea")&&(s.compositionstart=()=>s._isComposing=!0,s.compositionend=v=>{s._isComposing=!1;const _=v.target;_&&setTimeout(()=>{const T=_.value,N=o?._state||o,O=p.getNestedValue(N,e);let l=T;if(u&&(l=l.trim()),S){const y=Number(l);isNaN(y)||(l=y)}if(Se(l,O)){_._modelUpdating=!0;try{p.setNestedValue(N,e,l),_e(o,p.isReactiveState(e),e,l)}finally{setTimeout(()=>_._modelUpdating=!1,0)}}},0)})}function Fe(e){const r=e.slice(2);return r?r.charAt(0).toLowerCase()+r.slice(1):""}function ut(e,r,n,t,s){if(typeof e=="object"&&e!==null)for(const[o,i]of Object.entries(e))if(o.startsWith("data-")||o.startsWith("aria-")||o==="class")n[o]=i;else if(o==="disabled"&&s&&V(s)){const a=i&&typeof i=="object"&&"value"in i;(()=>{try{return p.isReactiveState(i)}catch{return!1}})()||a?r[o]=i:n[o]=i}else r[o]=i;else if(typeof e=="string"){if(!t)return;try{const o=be(e,t);if(typeof o=="object"&&o!==null){for(const[i,a]of Object.entries(o))if(i.startsWith("data-")||i.startsWith("aria-")||i==="class")n[i]=a;else if(i==="disabled"&&s&&V(s)){const f=a&&typeof a=="object"&&"value"in a;(()=>{try{return p.isReactiveState(a)}catch{return!1}})()||f?r[i]=a:n[i]=a}else r[i]=a;return}else{n[e]=o;return}}catch{const o=p.getNestedValue(t,e);n[e]=o}}}function dt(e,r,n){let t;if(typeof e=="string"){if(!n)return;t=be(e,n)}else t=e;const s=String(r.style||"");let o=s;if(t){if(s){const i=String(s).split(";").map(f=>f.trim()).filter(Boolean),a=i.findIndex(f=>f.startsWith("display:"));a>=0&&i[a]==="display: none"&&(i.splice(a,1),o=i.length>0?i.join("; ")+";":"")}}else if(s){const i=String(s).split(";").filter(Boolean),a=i.findIndex(f=>f.trim().startsWith("display:"));a>=0?i[a]="display: none":i.push("display: none"),o=i.join("; ")}else o="display: none";o!==s&&(o?r.style=o:delete r.style)}function be(e,r){return rt.evaluate(e,r)}function pt(e,r,n){let t;if(typeof e=="string"){if(!n)return;t=be(e,n)}else t=e;try{if(t&&typeof t=="object"){if(p.isReactiveState(t))t=t.value;else if("value"in t&&typeof t.value<"u"){const a=t.value;a instanceof Node||(t=a)}}}catch{}let s=[];if(typeof t=="string")s=[t];else if(Array.isArray(t))s=t.filter(Boolean);else if(typeof t=="object"&&t!==null)for(const[a,f]of Object.entries(t))f&&s.push(a);const o=r.class||"",i=s.join(" ");r.class=o?`${o} ${i}`.trim():i}function Re(e){if(e===!0||e===!1)return!0;if(e==null)return!1;if(typeof e==="string")return e===""||e==="true"||e==="false";try{if(e&&typeof e=="object"&&"value"in e){const n=e.value,t=typeof n;return t==="boolean"?!0:t==="string"?n===""||n==="true"||n==="false":!1}}catch{}return!1}function ht(e,r,n){let t;if(typeof e=="string"){if(!n)return;t=be(e,n)}else t=e;let s="";if(typeof t=="string")s=t;else if(t&&typeof t=="object"){const i=[];for(const[a,f]of Object.entries(t))if(f!=null&&f!==""){const u=a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`),S=["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 k=String(f);typeof f=="number"&&S.includes(u)&&(k=`${f}px`),i.push(`${u}: ${k}`)}s=i.join("; ")+(i.length>0?";":"")}const o=String(r.style||"");r.style=o+(o&&!o.endsWith(";")?"; ":"")+s}function yt(e,r,n){let t=e;typeof e=="string"&&n&&(t=be(e,n)),p.isReactiveState(t)?r.reactiveRef=t:r.ref=t}function Ue(e,r,n,t){const s={},o={...t||{}},i={};for(const[a,f]of Object.entries(e)){const{value:u,modifiers:S,arg:k}=f;if(a==="model"||a.startsWith("model:")){const c=a.split(":"),g=c.length>1?c[1]:k;ft(u,S,s,o,i,r,n,g);continue}switch(a){case"bind":ut(u,s,o,r,n);break;case"show":dt(u,o,r);break;case"class":pt(u,o,r);break;case"style":ht(u,o,r);break;case"ref":yt(u,s,r);break}}try{if(Object.prototype.hasOwnProperty.call(s,"disabled")&&n&&V(n)){const f=s.disabled,u=f&&typeof f=="object"&&"value"in f;let S=!1;try{S=p.isReactiveState(f)}catch{S=!1}if(!u&&!S)try{o.disabled=f,delete s.disabled;const k=globalThis;k.__VDOM_DISABLED_PROMOTIONS||(k.__VDOM_DISABLED_PROMOTIONS=[]),k.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:f,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:s,attrs:o,listeners:i}}function Pe(e,r){if(Array.isArray(e)){const o=new Set;return e.map(i=>{if(!i||typeof i!="object")return i;let a=i.props?.key??i.key;if(!a){const k=i.tag||"node",g=[i.props?.attrs?.id,i.props?.attrs?.name,i.props?.attrs?.["data-key"],i.props?.props?.id,i.props?.props?.name,i.props?.props?.dataKey,i.props?.props?.["data-key"]].find(d=>d!=null)??"";a=g?`${r}:${k}:${g}`:`${r}:${k}`}let f=a,u=1;for(;o.has(f);)f=`${a}#${u++}`;o.add(f);let S=i.children;return Array.isArray(S)&&(S=Pe(S,f)),{...i,key:f,children:S}})}const n=e,t=n.props?.key??n.key??r;let s=n.children;return Array.isArray(s)&&(s=Pe(s,t)),{...n,key:t,children:s}}function Ie(e,r,n,t){const s=n.directives??{},o=Ue(s,t,e,n.attrs),i={...r.props||{},...n.props||{},...o.props||{}},a={...r.attrs||{},...n.attrs||{},...o.attrs||{}},f=r.props??{},u=i,S=!!(n?.isCustomElement??r?.isCustomElement??!1);let k=!1;for(const d in{...f,...u}){const b=f[d],m=u[d];let L=b,w=m;if(p.safe(()=>{(p.isReactiveState(b)||oe(b))&&(L=b.value)}),p.safe(()=>{(p.isReactiveState(m)||oe(m))&&(w=m.value)}),!(b===m&&L===w))if(k=!0,d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const v=Oe(m),_=v==null?"":String(v);e.value!==_&&(e.value=_)}else if(d==="checked"&&e instanceof HTMLInputElement){const v=Oe(m);e.checked=!!v}else if(d.startsWith("on")&&typeof m=="function"){const v=Fe(d);typeof b=="function"&&U.removeListener(e,v,b),typeof m=="function"&&U.addListener(e,v,m);try{if(v&&v.startsWith("update:")){const _=v.split(":",2)[1],T=u[_];let N=[];try{if(p.isReactiveState(T)){const l=T.value;N=l&&typeof l=="object"?Object.keys(l):[]}else T&&typeof T=="object"&&(N=Object.keys(T))}catch{N=[]}const O=N.filter(l=>typeof l=="string"&&!l.startsWith("_")&&l!=="constructor");for(const l of O){const E=`update:${l}`,y=h=>{const C=h.detail!==void 0?h.detail:h.target instanceof HTMLInputElement||h.target instanceof HTMLTextAreaElement||h.target instanceof HTMLSelectElement?h.target.value:void 0,R={...p.isReactiveState(T)?T.value||{}:u[_]||{},[l]:C};try{typeof m=="function"&&m({detail:R})}catch{}};p.safe(()=>{U.addListener(e,E,y)})}}}catch{}}else if(m==null)e.removeAttribute(d);else{const v=n?.isCustomElement??r?.isCustomElement??!1;if(v||d in e)try{e[d]=m,d==="disabled"&&m===!1&&!v&&V(e)&&e.removeAttribute("disabled")}catch{}else m===!1&&e.removeAttribute(d)}}for(const[d,b]of Object.entries(o.listeners||{})){U.addListener(e,d,b);try{const m=e&&e.parentElement;m&&m!==e&&U.addListener(m,d,b)}catch{}}const c=r.attrs??{},g=a;for(const d in{...c,...g}){const b=c[d],m=g[d];let L=b,w=m;if(p.isReactiveState(b)&&(L=b.value),p.isReactiveState(m)&&(w=m.value),L!==w)if(k=!0,w==null||w===!1)p.safe(()=>{e.removeAttribute(d)}),d==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?p.safe(()=>{e.value=""}):e instanceof HTMLSelectElement?p.safe(()=>{e.value=""}):e instanceof HTMLProgressElement&&p.safe(()=>{e.value=0})),d==="checked"&&e instanceof HTMLInputElement&&p.safe(()=>{e.checked=!1}),d==="disabled"&&V(e)&&p.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=!1)});else{if(d==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){p.safe(()=>{e.value=w??""});continue}else if(e instanceof HTMLSelectElement){p.safe(()=>{e.value=w??""});continue}else if(e instanceof HTMLProgressElement){p.safe(()=>{e.value=Number(w)});continue}}if(d==="checked"&&e instanceof HTMLInputElement){p.safe(()=>{e.checked=!!w});continue}if(d==="style"){const _=p.safeSerializeAttr(w);_!==null&&e.setAttribute(d,_);continue}if(d==="disabled"&&V(e)){p.safe(()=>{const _=ae(w);(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=_)}),ae(w)?p.safe(()=>{e.setAttribute(d,"")}):p.safe(()=>{e.removeAttribute(d)});continue}const v=e.namespaceURI==="http://www.w3.org/2000/svg";if(S&&!v&&d.includes("-"))if(p.isClassLikeAttr(d)){const _=p.safeSerializeAttr(m??w);if(_!==null)try{e.setAttribute(d,_)}catch{}}else{const _=p.toCamel(d);try{const T=e;T[_]=p.isReactiveState(m)?m:w}catch{const T=p.safeSerializeAttr(m??w);T!==null&&e.setAttribute(d,T)}}else if(!v&&d in e)try{const _=e;_[d]=p.isReactiveState(m)?m:w}catch{const _=p.safeSerializeAttr(w);_!==null&&e.setAttribute(d,_)}else{const _=p.safeSerializeAttr(w);_!==null&&e.setAttribute(d,_)}}}try{if(V(e)){const d=i.disabled;let b;try{const L=Object.prototype.hasOwnProperty.call(o.props||{},"disabled"),w=d&&typeof d=="object"&&"value"in d;let v=!1;p.safe(()=>{v=!!p.isReactiveState(d)});const _=Re(d);v||w||L||_?b=d:b=a.disabled}catch{b=a.disabled}const m=ae(b);p.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=m)}),m?p.safe(()=>{e.setAttribute("disabled","")}):p.safe(()=>{e.removeAttribute("disabled")})}}catch{}if(S&&k){const d=e;p.safe(()=>{d._applyProps?.(d._cfg)}),p.safe(()=>{typeof d.requestRender=="function"?d.requestRender():typeof d._render=="function"&&d._render?.(d._cfg)})}}function K(e,r,n){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const c=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&z(c,e.key),c}if(e.tag==="#raw"){const c=typeof e.children=="string"?e.children:"";return document.createRange().createContextualFragment(c)}if(e.tag==="#anchor"){const c=e,g=Array.isArray(c.children)?c.children:[],d=document.createTextNode(""),b=document.createTextNode("");c.key!=null&&(z(d,`${c.key}:start`),z(b,`${c.key}:end`)),c._startNode=d,c._endNode=b;const m=document.createDocumentFragment();m.appendChild(d);for(const L of g){const w=K(L,r);if(c.key!=null&&w instanceof Element&&!w.hasAttribute("data-anchor-key")){const v=L;v&&typeof v=="object"&&v.key!=null||z(w,String(c.key))}m.appendChild(w)}return m.appendChild(b),m}const t=document.createElement(e.tag);e.key!=null&&z(t,e.key),e.props&&e.props?._transitionGroup&<(t,e.props?._transitionGroup);const{props:s={},attrs:o={},directives:i={}}=e.props??{},a=Ue(i,r,t,o),f={...s,...a.props},u={...o,...a.attrs};try{const c=(u&&u.class)??(f&&f.class)??(e.props&&e.props.attrs&&e.props.attrs.class)??(e.props&&e.props.props&&e.props.props.class),g=p.safeSerializeAttr(c);if(g!==null){const d=String(g).trim();d&&t.setAttribute("class",d)}}catch{}try{if(f.disabled!==void 0&&t&&V(t)){const c=f.disabled,g=c&&typeof c=="object"&&"value"in c;let d=!1;try{d=p.isReactiveState(c)}catch{d=!1}!g&&!d&&p.safe(()=>{u.disabled=c,delete f.disabled})}}catch{}const S=t.namespaceURI==="http://www.w3.org/2000/svg";for(const c in u){const g=u[c];if(typeof c!="string"||/\[object Object\]/.test(c))continue;const d=Oe(g);if(typeof d=="boolean")d?t.setAttribute(c,""):p.safe(()=>{t.removeAttribute(c)});else if(d!=null){if(c==="disabled"&&V(t)){const b=f.disabled,m=Re(b)?b:d,L=ae(m);p.safe(()=>{t.disabled=L}),L?p.safe(()=>{t.setAttribute(c,"")}):p.safe(()=>{t.removeAttribute(c)});continue}if(!S&&c==="value"&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLProgressElement))try{t instanceof HTMLProgressElement?t.value=Number(d):t.value=String(d??"")}catch{const b=p.safeSerializeAttr(d);b!==null&&t.setAttribute(c,b)}else if(!S&&c==="checked"&&t instanceof HTMLInputElement)try{t.checked=!!d}catch{const b=p.safeSerializeAttr(d);b!==null&&t.setAttribute(c,b)}else if(!S&&c in t)try{t[c]=d,c==="disabled"&&d===!1&&V(t)&&t.removeAttribute("disabled")}catch{const b=p.safeSerializeAttr(d);b!==null&&t.setAttribute(c,b)}else if((e.props?.isCustomElement??!1)&&!S&&c.includes("-")){const m=p.toCamel(c);try{t[m]=d}catch{const L=p.safeSerializeAttr(d);L!==null&&t.setAttribute(c,L)}}else{const m=p.safeSerializeAttr(d);m!==null&&t.setAttribute(c,m)}}}for(const c in f){const g=f[c];if(!(typeof c!="string"||/\[object Object\]/.test(c)))if(c==="value"&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)){const d=typeof g=="object"&&g!==null&&oe(g)?g.value:g;p.safe(()=>{t.value=String(d??"")})}else if(c.startsWith("on")&&typeof g=="function"){const d=Fe(c),b=d.includes(":")?(()=>{const m=d.split(":"),L=m[1];if(L.includes("-")){const w=L.split("-").map((v,_)=>_===0?v:v.charAt(0).toUpperCase()+v.slice(1)).join("");return`${m[0]}:${w}`}else{const w=L.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${m[0]}:${w}`}})():d;a.listeners&&(a.listeners[d]||a.listeners[b])||U.addListener(t,d,g)}else{if(c.startsWith("on")&&g===void 0)continue;if(g==null||g===!1)t.removeAttribute(c);else{const d=e.props?.isCustomElement??!1,b=typeof g=="object"&&g!==null&&p.isReactiveState(g)?g:oe(g)&&typeof g.value<"u"?g.value:g;if(c==="class"||c==="style"){try{const m=p.safeSerializeAttr(b);m!==null&&t.setAttribute(c,m)}catch{}continue}if(d||c in t)try{const m=typeof g=="object"&&g!==null&&p.isReactiveState(g)?g:oe(g)?g.value:g;if(c==="disabled"&&V(t)){const L=f.disabled!==void 0?f.disabled:m,w=ae(L);p.safe(()=>{t.disabled=w}),w?p.safe(()=>{t.setAttribute(c,"")}):p.safe(()=>{t.removeAttribute(c)});continue}try{if(typeof t[c]=="boolean"){let w=m;typeof m=="string"?m==="false"?w=!1:m==="true"?w=!0:w=!!m&&m!=="":w=!!m,t[c]=w}else t[c]=m}catch{t[c]=m}}catch{}}}}for(const[c,g]of Object.entries(a.listeners||{}))U.addListener(t,c,g);const k={...e,props:{...e.props,...a.props}};he(k,t,n);try{const c=t;if(typeof c._applyProps=="function")try{c._applyProps(c._cfg)}catch{}typeof c.requestRender=="function"?c.requestRender():typeof c._render=="function"&&c._render(c._cfg)}catch{}if(Array.isArray(e.children))for(const c of e.children)t.appendChild(K(c,r,n));else typeof e.children=="string"&&(t.textContent=e.children);try{if(t instanceof HTMLSelectElement&&u&&Object.prototype.hasOwnProperty.call(u,"value"))try{t.value=String(u.value??"")}catch{}}catch{}try{if(V(t)){const c=f.disabled,g=u.disabled,d=c&&typeof c=="object"&&"value"in c;let b=!1;try{b=!!p.isReactiveState(c)}catch{b=!1}const L=b||d||Re(c)?c:g,w=ae(L);p.safe(()=>{t.disabled=w}),w?p.safe(()=>{t.setAttribute("disabled","")}):p.safe(()=>{t.removeAttribute("disabled")})}}catch{}return t}function mt(e,r,n,t,s){if(typeof n=="string"){e.textContent!==n&&(e.textContent=n);return}if(!Array.isArray(n))return;const o=e.childNodes,i=[];for(let b=0;b<o.length;b++)i.push(o[b]);const a=Array.isArray(r)?r:[],f=ct(e);if(f){const b=v=>{if(typeof v=="string")return v.startsWith("each-")?v.substring(5):v;if(typeof v=="number")return String(v)},m=[],L=[];for(const v of n)if(v&&v.tag==="#anchor"){const _=Array.isArray(v.children)?v.children:[];for(const T of _){const N=b(T.key??v.key??"unknown");m.push({...T,key:N})}}else v&&m.push({...v,key:b(v.key)});for(const v of a)if(v&&v.tag==="#anchor"){const _=Array.isArray(v.children)?v.children:[];for(const T of _){const N=b(T.key??v.key??"unknown");L.push({...T,key:N})}}else v&&L.push({...v,key:b(v.key)});if(m.some(v=>v&&v.key!=null)||L.some(v=>v&&v.key!=null)){const v=new Map,_=new Map;for(const y of L)if(y&&y.key!=null){const h=String(y.key);v.set(h,y)}for(let y=0;y<i.length;y++){const h=i[y];let C=ke(h);if(C=b(C),C!=null&&h instanceof Element&&h.nodeType===Node.ELEMENT_NODE){let P=typeof C=="string"&&C.includes(":")?C.substring(0,C.lastIndexOf(":")):C;P=String(P),_.set(P,h)}}const T=new Set,N=new Map,O=i.length>0;if(f.moveClass&&O)for(let y=0;y<i.length;y++){const h=i[y];if(h instanceof HTMLElement&&h.parentElement){const C=h.getBoundingClientRect();N.set(h,C)}}const l=[];for(const y of m){let h=y.key;if(h==null)continue;h=String(h);const C=v.get(h);let P=_.get(h);if(P&&C){const R=ye(P,C,y,t);T.add(P);const A=String(h);z(R,A),l.push({node:R,key:h,newVNode:y,oldVNode:C,isNew:!1})}else{P=K(y,t),z(P,String(h)),e.appendChild(P);const R=O||f.appear===!0;P instanceof HTMLElement&&R&&pe(P,f).catch(A=>{j.devError("Enter transition error:",A)}),l.push({node:P,key:h,newVNode:y,isNew:!0})}}const E=[];for(let y=0;y<i.length;y++){const h=i[y],C=ke(h);if(!T.has(h)&&C!=null&&h instanceof HTMLElement){const R=Te(h,f).then(()=>{e.contains(h)&&e.removeChild(h)}).catch(A=>{j.devError("Leave transition error:",A),e.contains(h)&&e.removeChild(h)});E.push(R)}}if(E.length===0){let y=e.firstChild;for(const{node:h}of l)h!==y&&e.insertBefore(h,y),y=h.nextSibling;if(f.moveClass&&N.size>0){const h=[];for(const{node:C,isNew:P}of l)if(!P&&C instanceof HTMLElement){const R=N.get(C);if(R){const A=C.getBoundingClientRect(),x=R.left-A.left,$=R.top-A.top;if(x!==0||$!==0){const q=f.moveClass.split(/\s+/).filter(B=>B);h.push({node:C,deltaX:x,deltaY:$,moveClasses:q})}}}if(h.length>0){for(const{node:C,deltaX:P,deltaY:R}of h)C.style.transform=`translate(${P}px, ${R}px)`,C.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:C,moveClasses:P}of h)for(const R of P)C.classList.add(R);requestAnimationFrame(()=>{const C=f.moveClass||"",P=C.match(/duration-(\d+)/),R=P?`${P[1]}ms`:"300ms",A=C.match(/ease-(out|in|in-out|linear)/),x=A?`ease-${A[1]}`:"ease-out";for(const{node:$}of h)$.style.transition=`transform ${R} ${x}`;requestAnimationFrame(()=>{for(const{node:$,moveClasses:q}of h){$.style.removeProperty("transform");const B=()=>{for(const H of q)$.classList.remove(H);$.style.removeProperty("transition"),$.removeEventListener("transitionend",B),$.removeEventListener("transitioncancel",B)};$.addEventListener("transitionend",B,{once:!0}),$.addEventListener("transitioncancel",B,{once:!0})}})})})})}}}return}}const u=new Map;for(const b of a)b&&b.key!=null&&u.set(b.key,b);const S=new Map;for(let b=0;b<i.length;b++){const m=i[b],L=ke(m);L!=null&&S.set(L,m)}const k=new Set;let c=e.firstChild;function g(b,m){let L=b;for(;L&&(k.add(L),L!==m);)L=L.nextSibling}function d(b,m,L,w,v,_=!0){const T=[];let N=b.nextSibling;for(;N&&N!==m;)T.push(N),N=N.nextSibling;const O=Array.isArray(L)?L:[];if(w.some(E=>E&&E.key!=null)||O.some(E=>E&&E.key!=null)){const E=new Map,y=new Map;for(const R of O)R&&R.key!=null&&E.set(R.key,R);for(const R of T){const A=ke(R);A!=null&&y.set(A,R)}const h=v&&v.state==="visible"&&O.length===0&&w.length>0,C=new Set;let P=b.nextSibling;for(const R of w){let A;if(R.key!=null&&y.has(R.key)){const x=E.get(R.key);A=ye(y.get(R.key),x,R,t),C.add(A),v&&A instanceof HTMLElement&&h&&v.appear&&pe(A,v).catch($=>{j.devError("Transition enter error (appear):",$)}),A!==P&&e.contains(A)&&e.insertBefore(A,P)}else A=K(R,t),e.insertBefore(A,P),C.add(A),v&&A instanceof HTMLElement&&_&&pe(A,v).catch(x=>{j.devError("Transition enter error:",x)});P=A.nextSibling}for(const R of T)!C.has(R)&&e.contains(R)&&(v&&R instanceof HTMLElement&&_?Te(R,v).then(()=>{e.contains(R)&&e.removeChild(R)}).catch(A=>{j.devError("Transition leave error:",A),e.contains(R)&&e.removeChild(R)}):e.removeChild(R))}else{const E=Math.min(O.length,w.length);for(let y=0;y<E;y++){const h=O[y],C=w[y],P=ye(T[y],h,C,t);P!==T[y]&&(e.insertBefore(P,T[y]),e.removeChild(T[y]))}for(let y=E;y<w.length;y++){const h=K(w[y],t);e.insertBefore(h,m),v&&h instanceof HTMLElement&&_&&pe(h,v).catch(C=>{j.devError("Transition enter error:",C)})}for(let y=E;y<T.length;y++){const h=T[y];v&&h instanceof HTMLElement&&_?Te(h,v).then(()=>{e.contains(h)&&e.removeChild(h)}).catch(C=>{j.devError("Transition leave error:",C),e.contains(h)&&e.removeChild(h)}):e.removeChild(h)}}}for(const b of n){let m;if(b.tag==="#anchor"){const L=b.key,w=`${L}:start`,v=`${L}:end`;let _=S.get(w),T=S.get(v);const N=Array.isArray(b.children)?b.children:[];if(_||(_=document.createTextNode(""),z(_,w)),T||(T=document.createTextNode(""),z(T,v)),b._startNode=_,b._endNode=T,!e.contains(_)||!e.contains(T)){e.insertBefore(_,c);const O=b._transition,E=!(O&&O.state==="visible"&&N.length>0)||O.appear;for(const y of N){const h=K(y,t);e.insertBefore(h,c),O&&h instanceof HTMLElement&&E&&pe(h,O).catch(C=>{j.devError("Transition enter error:",C)})}e.insertBefore(T,c)}else{const O=b._transition,E=u.get(L)._transition,y=E&&E.state!==O?.state,h=O&&O.state==="visible"&&N.length>0&&!y,C=y||!h||O?.appear===!0;d(_,T,u.get(L)?.children,N,O,C)}g(_,T),c=T.nextSibling;continue}if(b.key!=null&&S.has(b.key)){const L=u.get(b.key);m=ye(S.get(b.key),L,b,t,s),k.add(m),m!==c&&e.contains(m)&&(c&&!e.contains(c)&&(c=null),e.insertBefore(m,c))}else m=K(b,t,s),c&&!e.contains(c)&&(c=null),e.insertBefore(m,c),k.add(m);c=m.nextSibling}for(let b=0;b<i.length;b++){const m=i[b];!k.has(m)&&e.contains(m)&&(ne(m,s),e.removeChild(m))}}function ye(e,r,n,t,s){if(r&&typeof r!="string"&&r.props?.ref&&s&&ne(e,s),r===n)return e;if(typeof n=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==n&&(e.textContent=n),e;{const i=document.createTextNode(n);return e.parentNode?.replaceChild(i,e),i}}if(n&&typeof n!="string"&&n.tag==="#anchor"){const i=n,a=Array.isArray(i.children)?i.children:[],f=i._startNode??document.createTextNode(""),u=i._endNode??document.createTextNode("");i.key!=null&&(z(f,`${i.key}:start`),z(u,`${i.key}:end`)),i._startNode=f,i._endNode=u;const S=document.createDocumentFragment();S.appendChild(f);for(const k of a){const c=K(k,t);S.appendChild(c)}return S.appendChild(u),e.parentNode?.replaceChild(S,e),f}if(!n){ne(e,s);const i=document.createComment("removed");return e.parentNode?.replaceChild(i,e),i}if(!r||typeof r=="string"){ne(e,s);const i=K(n,t,s);return he(n,i,s),e.parentNode?.replaceChild(i,e),i}if(n.tag==="#anchor"){const i=Array.isArray(n.children)?n.children:[],a=n._startNode??document.createTextNode(""),f=n._endNode??document.createTextNode("");n.key!=null&&(z(a,`${n.key}:start`),z(f,`${n.key}:end`)),n._startNode=a,n._endNode=f;const u=document.createDocumentFragment();u.appendChild(a);for(const S of i)u.appendChild(K(S,t));return u.appendChild(f),e.parentNode?.replaceChild(u,e),a}if(typeof r!="string"&&typeof n!="string"&&r.tag===n.tag&&r.key===n.key){const i=e;return Ie(i,r.props||{},n.props||{},t),mt(i,r.children,n.children,t,s),he(n,i,s),i}if(typeof r!="string"&&typeof n!="string"&&r.tag===n.tag&&(r.tag&&String(r.tag).includes("-")||n.props&&n.props.isCustomElement||r.props&&r.props.isCustomElement))try{const a=e;return Ie(a,r.props||{},n.props||{},t),he(n,a,s),a}catch{}ne(e,s);const o=K(n,t,s);return he(n,o,s),e.parentNode?.replaceChild(o,e),o}function gt(e,r,n,t){let s;Array.isArray(r)?r.length===1?(s=r[0],s&&typeof s=="object"&&s.key==null&&(s={...s,key:"__root__"})):s={tag:"div",key:"__root__",children:r}:(s=r,s&&typeof s=="object"&&s.key==null&&(s={...s,key:"__root__"})),s&&typeof s=="object"&&s.tag==="#anchor"&&(s={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[s]}),s=Pe(s,String(s.key??"root"));const o=e._prevVNode??null,i=e._prevDom??e.firstChild??null;let a;o&&i?typeof o!="string"&&typeof s!="string"&&o.tag===s.tag&&o.key===s.key?a=ye(i,o,s,n,t):(a=K(s,n,t),e.replaceChild(a,i)):(a=K(s,n,t),e.firstChild?e.replaceChild(a,e.firstChild):e.appendChild(a));const f=[];for(let u=0;u<e.childNodes.length;u++){const S=e.childNodes[u];S!==a&&S.nodeName!=="STYLE"&&(ne(S,t),f.push(S))}f.forEach(u=>e.removeChild(u)),e._prevVNode=s,e._prevDom=a}const me=[];function bt(e,r,n,t,s,o,i,a){if(e){me.push(n);try{const f=r.render(n);if(f instanceof Promise){o(!0),f.then(u=>{o(!1),i(null),We(e,u,n,t,s),a(e.innerHTML)}).catch(u=>{o(!1),i(u)});return}We(e,f,n,t,s),a(e.innerHTML)}finally{me.pop()}}}function We(e,r,n,t,s){e&&(gt(e,Array.isArray(r)?r:[r],n,t),s(e.innerHTML))}function vt(e,r,n,t,s,o,i){if(o!==null&&clearTimeout(o),Date.now()-r<16){if(s(n+1),n===15)j.devWarn(`⚠️ Component is re-rendering rapidly. This might indicate:
|
|
118
2
|
Common causes:
|
|
119
3
|
• Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
|
|
120
4
|
• State modification during render
|
|
121
5
|
• Missing dependencies in computed/watch
|
|
122
|
-
Component rendering will be throttled to prevent browser freeze.`);else if(n>20){
|
|
6
|
+
Component rendering will be throttled to prevent browser freeze.`);else if(n>20){j.devError(`🛑 Infinite loop detected in component render:
|
|
123
7
|
• This might be caused by state updates during render
|
|
124
8
|
• Ensure all state modifications are done in event handlers or effects
|
|
125
|
-
Stopping runaway component render to prevent browser freeze`),
|
|
126
|
-
`+
|
|
127
|
-
${
|
|
128
|
-
`);a=rn(a);let l=r;l||(l=new CSSStyleSheet),(l.cssRules.length===0||l.cssRules.length>0&&Array.from(l.cssRules).map(y=>y.cssText).join("")!==a)&&l.replaceSync(a),e.adoptedStyleSheets=[Ft(),tt(),l],o(l)}let B=null;function qt(e){B=e}function gt(){B=null}function pr(){if(!B)throw new Error("useEmit must be called during component render");const e=B.emit;return(t,n)=>e(t,n)}function Le(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function xt(e){if(!B)throw new Error("useOnConnected must be called during component render");Le(B),B._hookCallbacks.onConnected=e}function hr(e){if(!B)throw new Error("useOnDisconnected must be called during component render");Le(B),B._hookCallbacks.onDisconnected=e}function gr(e){if(!B)throw new Error("useOnAttributeChanged must be called during component render");Le(B),B._hookCallbacks.onAttributeChanged=e}function mr(e){if(!B)throw new Error("useOnError must be called during component render");Le(B),B._hookCallbacks.onError=e}function cn(e){if(!B)throw new Error("useProps must be called during component render");Le(B),B._hookCallbacks.props={...B._hookCallbacks.props||{},...e};const t=B;try{const r=Object.keys(e||{});for(const o of r){if(typeof o!="string"||o.startsWith("_"))continue;const i=Object.getOwnPropertyDescriptor(t,o);if(!(i&&!i.configurable))try{let c=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get(){try{const a=t&&t._host;if(a){const l=se(o),m=a.getAttribute(l);if(m!==null){const y=typeof e[o];return y==="boolean"?m===""||m==="true":y==="number"?Number(m):m}if(typeof a[o]<"u"){const y=a[o];return R(y)||y&&typeof y=="object"&&"value"in y&&!(y instanceof Node)?y.value:typeof e[o]==="boolean"&&typeof y=="string"?y===""||y==="true":y}}}catch{}return c},set(a){c=a}})}catch{}}}catch{}return new Proxy({},{get(r,o){if(typeof o!="string")return;const i=e[o];try{const c=t&&t._host;if(c){if(c instanceof HTMLElement||typeof c.getAttribute=="function"&&typeof c.hasAttribute=="function"){const l=o.replace(/([A-Z])/g,"-$1").toLowerCase(),m=c.getAttribute(l);if(m!==null)return typeof i=="boolean"?m===""||m==="true":typeof i=="number"?Number(m):m}const a=c[o];if(typeof a<"u"&&a!=="")return typeof i=="boolean"&&i===!1&&a===""?i:R(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:R(s)||s&&typeof s=="object"&&"value"in s&&!(s instanceof Node)?s.value:s!=null&&s!==""?typeof i=="boolean"&&typeof s=="string"?s==="true":typeof i=="number"&&typeof s=="string"&&!Number.isNaN(Number(s))?Number(s):s:i},has(r,o){return typeof o=="string"&&(o in t||o in e)},ownKeys(){return Array.from(new Set([...Object.keys(e),...Object.keys(t||{})]))},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}}})}function yr(e){if(!B)throw new Error("useStyle must be called during component render");Le(B);try{const t=e();Object.defineProperty(B,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){te("Error in useStyle callback:",t),Object.defineProperty(B,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const Te=new Map,Kt=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[Kt]||(e[Kt]=Te)}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=Te.get(e)||t,this._componentId=`${e}-${Math.random().toString(36).substr(2,9)}`;const n=this._initContext(t),r=(i,s,c)=>{Object.defineProperty(i,s,{value:c,writable:!1,enumerable:!1,configurable:!1})};r(n,"refs",this._refs),r(n,"requestRender",()=>this.requestRender()),r(n,"_requestRender",()=>this._requestRender()),r(n,"_componentId",this._componentId),r(n,"_triggerWatchers",(i,s)=>this._triggerWatchers(i,s)),this.context=n,M(()=>{r(n,"_host",this)}),r(this.context,"emit",(i,s,c)=>{const a={detail:s,bubbles:!0,composed:!0,...c||{}},l=new CustomEvent(i,a);this.dispatchEvent(l);const m=i.indexOf(":");if(m>0){const y=i.substring(0,m),p=i.substring(m+1),v=p.includes("-")?`${y}:${p.split("-").map((f,h)=>h===0?f:f.charAt(0).toUpperCase()+f.slice(1)).join("")}`:`${y}:${p.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;v!==i&&M(()=>{this.dispatchEvent(new CustomEvent(v,a))})}return!l.defaultPrevented});const o=Te.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(),An(t,this.context,this._mounted,n=>{this._mounted=n})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{Sn(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},n=>{this._templateLoading=n},n=>{this._templateError=n},n=>{this._mounted=n})})}attributeChangedCallback(n,r,o){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),r!==o&&this._requestRender(),Tn(t,n,r,o,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(se):[]}_render(n){this._runLogicWithinErrorBoundary(n,()=>{ur(this.shadowRoot,n,this.context,this._refs,r=>{this._lastHtmlStringForJitCSS=r,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(r)},r=>{this._templateLoading=r,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(r)},r=>{this._templateError=r,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(r)},r=>this._applyStyle(n,r))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{$e(()=>{fr(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,n=>{this._lastRenderTime=n},n=>{this._renderCount=n},this._renderTimeoutId,n=>{this._renderTimeoutId=n})},this._componentId)})}_applyStyle(n,r){this._runLogicWithinErrorBoundary(n,()=>{dr(this.shadowRoot,this.context,r,this._styleSheet,o=>{this._styleSheet=o})})}_runLogicWithinErrorBoundary(n,r){this._hasError&&(this._hasError=!1);try{r()}catch(o){this._hasError=!0;try{const i=n&&n.tag||this.tagName?.toLowerCase?.()||"<unknown>",s=this._componentId||"<unknown-id>",c={};if(n&&n.props)for(const a of Object.keys(n.props))try{const l=this.context[a];l instanceof Node?c[a]=`[DOM Node: ${l.nodeName}]`:typeof l=="object"&&l!==null?c[a]=Object.keys(l).length>5?`[object(${Object.keys(l).length} keys)]`:l:c[a]=l}catch{c[a]="[unreadable]"}H(`Error rendering component <${i}> (id=${s}):`,o),H("Component props snapshot:",c),te("Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`).")}catch{}n.onError&&n.onError(o,this.context)}}_initContext(n){try{let r=function(i,s=""){if(Array.isArray(i))return new Proxy(i,{get(c,a,l){const m=Reflect.get(c,a,l);return typeof m=="function"&&typeof a=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(a)?function(...p){const v=m.apply(c,p);if(!o._initializing){const f=s||"root";o._triggerWatchers(f,c),$e(()=>o._render(n),o._componentId)}return v}:m},set(c,a,l){if(c[a]=l,!o._initializing){const m=s?`${s}.${String(a)}`:String(a);o._triggerWatchers(m,l),$e(()=>o._render(n),o._componentId)}return!0},deleteProperty(c,a){if(delete c[a],!o._initializing){const l=s?`${s}.${String(a)}`:String(a);o._triggerWatchers(l,void 0),$e(()=>o._render(n),o._componentId)}return!0}});if(i&&typeof i=="object"){if(R(i))return i;for(const c in i){const a=s?`${s}.${c}`:c;i[c]=r(i[c],a)}return new Proxy(i,{set(c,a,l){const m=s?`${s}.${String(a)}`:String(a);return c[a]=r(l,m),o._initializing||(o._triggerWatchers(m,c[a]),$e(()=>o._render(n),o._componentId)),!0},get(c,a,l){return Reflect.get(c,a,l)}})}return i};const o=this;return r({...n.props?Object.fromEntries(Object.entries(n.props).map(([i,s])=>[i,s.default])):{}})}catch{return{}}}_initWatchers(n){this._runLogicWithinErrorBoundary(n,()=>{$n(this.context,this._watchers,{})})}_triggerWatchers(n,r){Cn(this.context,this._watchers,n,r)}_applyProps(n){this._runLogicWithinErrorBoundary(n,()=>{try{_n(this,n,this.context)}catch(r){this._hasError=!0,n.onError&&n.onError(r,this.context)}})}}}function kt(e,t){let n=se(e);n.includes("-")||(n=`cer-${n}`);let r={};const o={props:{},onConnected:i=>{r.onConnected&&r.onConnected()},onDisconnected:i=>{r.onDisconnected&&r.onDisconnected()},onAttributeChanged:(i,s,c,a)=>{r.onAttributeChanged&&r.onAttributeChanged(i,s,c)},onError:(i,s)=>{r.onError&&i&&r.onError(i)},render:i=>{const s=i._componentId||`${n}-${Math.random().toString(36).substr(2,9)}`;ee.setCurrentComponent(s,()=>{i.requestRender&&i.requestRender()});try{qt(i);let c;try{c=t()}catch(a){try{const l=i?._hookCallbacks;if(l&&typeof l.onError=="function")try{l.onError(a)}catch{}}catch{}throw a}if(i._hookCallbacks){const a=i._hookCallbacks;if(a.onConnected&&(r.onConnected=a.onConnected),a.onDisconnected&&(r.onDisconnected=a.onDisconnected),a.onAttributeChanged&&(r.onAttributeChanged=a.onAttributeChanged),a.onError&&(r.onError=a.onError),a.style&&(i._styleCallback=a.style),a.props){const l=a.props;o.props=Object.fromEntries(Object.entries(l).map(([m,y])=>[m,{type:typeof y=="boolean"?Boolean:typeof y=="number"?Number:typeof y=="string"?String:Function,default:y}])),Te.set(n,o)}}return c}finally{gt(),ee.clearCurrentComponent()}}};if(Te.set(n,o),typeof window<"u"){try{const i={_hookCallbacks:{},requestRender:()=>{}};qt(i);try{t()}catch(s){try{const c=i?._hookCallbacks;if(c&&typeof c.onError=="function")try{c.onError(s)}catch{}H(`Error during component discovery render <${n}>:`,s),te("Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when().")}catch{}throw gt(),s}if(gt(),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}])),Te.set(n,o)}}catch{}customElements.get(n)||customElements.define(n,br(n,o))}}class vr{map=new Map;maxSize;constructor(t){this.maxSize=t}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}set(t,n){if(this.map.delete(t),this.map.set(t,n),this.map.size>this.maxSize){const r=this.map.keys().next().value;r!==void 0&&this.map.delete(r)}}has(t){return this.map.has(t)}clear(){this.map.clear()}}const mt=new vr(500);function wr(e,t){if(e==null){te(`⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`);return}typeof e!="function"&&te(`🚨 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"&&te(`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`)}function ge(e,t={},n,r){const o=r??t.key;return{tag:e,key:o,props:t,children:n}}function Fe(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function De(e){return typeof e=="object"&&e!==null&&"tag"in e&&!Fe(e)}function xr(e,t){return e.key!=null?e:{...e,key:t}}function kr(e,t=[],n={}){const r={},o={},i={},s=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;let a;for(;a=c.exec(e);){const l=a[1],m=a[2],y=(a[4]||a[6])??"",p=a[3]===void 0&&a[6]===void 0,v=y.match(/^{{(\d+)}}$/);let f=p?!0:v?t[Number(v[1])]??null:y;v||(f==="true"?f=!0:f==="false"?f=!1:f==="null"?f=null:isNaN(Number(f))||(f=Number(f)));const h=["model","bind","show","class","style","ref","when"];if(l===":"){const[d,u]=m.split(":"),[g,...w]=d.split(".");if(h.includes(g)){const k=[...w],S=g==="model"&&u?`model:${u}`:g;i[S]={value:f,modifiers:k,arg:u}}else if(m==="disabled"){let k=f;k&&R(k)&&(k=k.value);const S=typeof k;if(k===""||S==="boolean"||S==="string"&&(k==="true"||k==="false")||k==null||S==="number")r[m]=k;else{let x=f;x&&R(x)&&(x=x.value),o[m]=x}s.push(m)}else{let k=f;k&&R(k)&&(k=k.value),o[m]=k,s.push(m)}}else if(l==="@"){const[d,...u]=m.split("."),g=u;wr(f,d);const w=typeof f=="function"?f:typeof n[f]=="function"?n[f]:void 0;if(w){const k=C=>{if(g.includes("prevent")&&C.preventDefault(),g.includes("stop")&&C.stopPropagation(),!(g.includes("self")&&C.target!==C.currentTarget))return g.includes("once")&&C.currentTarget?.removeEventListener(d,k),w(C)},S="on"+d.charAt(0).toUpperCase()+d.slice(1);r[S]=k}}else m==="ref"?r.ref=f:o[m]=f}return{props:r,attrs:o,directives:i,bound:s}}function $t(e){if(!De(e)||Fe(e))return e;const t=e.props?.directives;if(t&&t.when){const n=t.when.value,r=R(n)?n.value:n,{when:o,...i}=t,s={...e.props};Object.keys(i).length>0?s.directives=i:delete s.directives;const c={...e,props:s};return Array.isArray(c.children)&&(c.children=c.children.map(l=>typeof l=="object"&&l!==null?$t(l):l)),{tag:"#anchor",key:e.key!=null?`when-${e.key}`:`when-${e.tag}`,children:r?[c]:[]}}if(Array.isArray(e.children)){const n=e.children.map(r=>typeof r=="object"&&r!==null?$t(r):r);return{...e,children:n}}return e}function $r(e,t,n){const r=He.length>0?He[He.length-1]:void 0,o=n??r,i=!n&&t.length===0,s=i?e.join("<!--TEMPLATE_DELIM-->"):null;if(i&&s){const x=mt.get(s);if(x)return x}function c(x,T){return ge("#text",{},x,T)}function a(x,T){const $=typeof x=="string"?le(x):x;return ge("#text",{},$,T)}let l="";for(let x=0;x<e.length;x++)l+=e[x],x<t.length&&(l+=`{{${x}}}`);const m=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,y=[];let p,v=[],f=null,h={},d,u=0,g=[];function w(x){!x||typeof x!="object"||Fe(x)||(x.props||x.attrs?(x.props&&(h.props||(h.props={}),Object.assign(h.props,x.props)),x.attrs&&(h.attrs||(h.attrs={}),Object.keys(x.attrs).forEach(T=>{if(T==="style"&&h.attrs.style){const $=h.attrs.style.replace(/;?\s*$/,""),b=x.attrs.style.replace(/^;?\s*/,"");h.attrs.style=$+"; "+b}else if(T==="class"&&h.attrs.class){const $=h.attrs.class.trim().split(/\s+/).filter(Boolean),b=x.attrs.class.trim().split(/\s+/).filter(Boolean),A=[...new Set([...$,...b])];h.attrs.class=A.join(" ")}else h.attrs[T]=x.attrs[T]}))):(h.props||(h.props={}),Object.assign(h.props,x)))}function k(x,T){const $=f?v:g;if(Fe(x)){const b=x.key??T;let A=x.children;$.push({...x,key:b,children:A});return}if(De(x)){$.push(xr(x,void 0));return}if(Array.isArray(x)){if(x.length===0)return;for(let b=0;b<x.length;b++){const A=x[b];Fe(A)||De(A)||Array.isArray(A)?k(A,`${T}-${b}`):A!==null&&typeof A=="object"?Mt(A)?$.push(ge("#raw",{},A.__rawHTML,`${T}-${b}`)):w(A):$.push(c(String(A),`${T}-${b}`))}return}if(x!==null&&typeof x=="object"){if(Mt(x)){const b=x.__rawHTML??"";$.push(ge("#raw",{},b,T));return}w(x);return}$.push(c(String(x),T))}const S=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;p=m.exec(l);)if(!(p[0].startsWith("<!--")&&p[0].endsWith("-->"))){if(p[1]){const x=p[1],T=p[0][1]==="/",$=p[0][p[0].length-2]==="/"||S.has(x),{props:b,attrs:A,directives:O,bound:j}=kr(p[2]||"",t,o),E={props:{},attrs:{}};for(const P in b)E.props[P]=b[P];for(const P in A)E.attrs[P]=A[P];try{if(x==="router-link"){const P=[],N=Y=>{try{let F=E.attrs&&E.attrs[Y];F&&R(F)&&(F=F.value),typeof F=="string"&&F.trim()&&P.push(...F.trim().split(/\s+/))}catch{}};if(N("class"),N("activeClass"),N("exactActiveClass"),P.length>0){const Y=E.attrs&&E.attrs.class||"",F=typeof Y=="string"&&Y.trim()?Y.trim().split(/\s+/):[],q=Array.from(new Set([...F,...P]));E.attrs.class=q.join(" ")}}}catch{}E.attrs&&Object.prototype.hasOwnProperty.call(E.attrs,"key")&&!(E.props&&Object.prototype.hasOwnProperty.call(E.props,"key"))&&M(()=>{E.props.key=E.attrs.key});try{const P={input:["value","checked","readonly","required","placeholder","maxlength","minlength"],textarea:["value","readonly","required","placeholder","maxlength","minlength"],select:["value","required","multiple"],option:["selected","value"],video:["muted","autoplay","controls","loop","playsinline"],audio:["muted","autoplay","controls","loop"],img:["src","alt","width","height"],button:["type","name","value","autofocus","form"]},N=x.toLowerCase(),Y=P[N]??[];if(E.attrs){for(const q of Y)if(j&&j.includes(q)&&q in E.attrs&&!(E.props&&q in E.props)){let D=E.attrs[q];if(D&&R(D))D=D.value,E.props[q]=D,delete E.attrs[q];else{const V=typeof D;q==="disabled"?(D===""||V==="boolean"||V==="string"&&(D==="true"||D==="false")||D==null||V==="number")&&(E.props[q]=D,delete E.attrs[q]):(D===""||V==="string"||V==="number"||V==="boolean"||D==null)&&(E.props[q]=D,delete E.attrs[q])}}}if((x.includes("-")||!!o?.__customElements?.has?.(x))&&(E.isCustomElement=!0,j&&E.attrs)){const q=new Set(["id","name","data-key","key"]);for(const D of j)if(D in E.attrs&&!(E.props&&D in E.props)){const V=D.includes("-")?At(D):D;let ae=E.attrs[D];if(E.props[V]=ae,q.has(D)||Jt(D))try{const I=X(E.attrs[D]);I===null?delete E.attrs[D]:E.attrs[D]=I}catch{delete E.attrs[D]}else delete E.attrs[D]}}}catch{}if(O&&Object.keys(O).some(P=>P==="model"||P.startsWith("model:")))try{const P=Symbol.for("cer.registry"),N=globalThis[P],Y=!!(N&&typeof N.has=="function"&&N.has(x)),F=!!(o&&(o.__customElements instanceof Set&&o.__customElements.has(x)||Array.isArray(o.__isCustomElements)&&o.__isCustomElements.includes(x)));if(!!(x.includes("-")||F||Y))for(const V of Object.keys(O)){if(V!=="model"&&!V.startsWith("model:"))continue;const ae=O[V],ke=ae.arg??(V.includes(":")?V.split(":",2)[1]:void 0),I=ae.value,fe=ke??"modelValue",L=J,W=et,G=o?o._state||o:void 0;let z;typeof I=="string"&&o?z=L(G,I):z=I,E.props[fe]=z;try{const he=se(fe);E.attrs||(E.attrs={}),z!=null&&(typeof z=="string"||typeof z=="number"||typeof z=="boolean")&&(E.attrs[he]=z)}catch{}E.isCustomElement=!0;const Z=`update:${se(fe)}`.replace(/-([a-z])/g,(he,de)=>de.toUpperCase()),dn="on"+Z.charAt(0).toUpperCase()+Z.slice(1);E.props[dn]=function(he){const de=he.detail!==void 0?he.detail:he.target?he.target.value:void 0;if(G)if(I&&R(I)){const ve=I.value;(Array.isArray(de)&&Array.isArray(ve)?JSON.stringify([...de].sort())!==JSON.stringify([...ve].sort()):de!==ve)&&(I.value=de,o?.requestRender?o.requestRender():o?._requestRender&&o._requestRender())}else{const ve=L(G,typeof I=="string"?I:String(I));(Array.isArray(de)&&Array.isArray(ve)?JSON.stringify([...de].sort())!==JSON.stringify([...ve].sort()):de!==ve)&&(W(G,typeof I=="string"?I:String(I),de),o?.requestRender?o.requestRender():o?._requestRender&&o._requestRender())}},delete O[V]}}catch{}if(Object.keys(O).length>0&&(E.directives={...O}),T){const P=ge(f,h,v.length===1&&De(v[0])&&v[0].tag==="#text"?typeof v[0].children=="string"?v[0].children:"":v.length?v:void 0,d),N=y.pop();N?(f=N.tag,h=N.props,d=N.key,v=N.children,v.push(P)):(g.push(P),f=null,h={},d=void 0,v=[])}else $?f?v.push(ge(x,E,void 0,void 0)):g.push(ge(x,E,void 0,void 0)):(f&&y.push({tag:f,props:h,children:v,key:d}),f=x,h=E,v=[])}else if(typeof p[3]<"u"){const x=Number(p[3]),T=t[x],$=`interp-${x}`;k(T,$)}else if(p[4]){const x=p[4],T=f?v:g,$=x.split(/({{\d+}})/);for(const b of $){if(!b)continue;const A=b.match(/^{{(\d+)}}$/);if(A){const O=Number(A[1]),j=t[O],E=`interp-${O}`;k(j,E)}else{const O=`text-${u++}`;T.push(a(b,O))}}}}const _=g.filter(x=>De(x)&&x.tag==="#text"?typeof x.children=="string"&&x.children.trim()!=="":!0).map(x=>$t(x));if(_.length===1){const x=_[0];return i&&s&&mt.set(s,x),x}else if(_.length>1){const x=_;return i&&s&&mt.set(s,x),x}return ge("div",{},"","fallback-root")}function ye(e,...t){const n=t[t.length-1],r=typeof n=="object"&&n&&!Array.isArray(n)?n:void 0;return $r(e,t,r)}function Cr(e,t){return We(!e,t)}function Er(e,t){const n=!e||e.length===0;return We(n,t)}function _r(e,t){const n=!!(e&&e.length>0);return We(n,t)}function Ar(e,t,n){const r=[];return e.forEach((o,i)=>{t(o,i)&&r.push({item:o,originalIndex:i})}),r.map(({item:o,originalIndex:i},s)=>{const c=typeof o=="object"&&o!=null?o?.key??o?.id??`filtered-${i}`:`filtered-${i}`;return U(n(o,i,s),`each-where-${c}`)})}function Sr(e,t){const n=e?.length??0;return n===0&&t.empty?U(t.empty,"switch-length-empty"):n===1&&t.one?U(t.one(e[0]),"switch-length-one"):t.exactly?.[n]?U(t.exactly[n](e),`switch-length-${n}`):n>1&&t.many?U(t.many(e),"switch-length-many"):U([],"switch-length-fallback")}function Tr(e,t,n){const r=new Map;return e.forEach(o=>{const i=t(o);r.has(i)||r.set(i,[]),r.get(i).push(o)}),Array.from(r.entries()).map(([o,i],s)=>U(n(o,i,s),`each-group-${o}`))}function jr(e,t,n,r){const o=n*t,i=Math.min(o+t,e.length);return e.slice(o,i).map((c,a)=>{const l=o+a,m=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${l}`:`page-${l}`;return U(r(c,l,a),`each-page-${m}`)})}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 Q(e,t){const n=typeof window<"u"&&window.matchMedia?.(e)?.matches;return We(!!n,t)}const pe={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)"},St=["sm","md","lg","xl","2xl"],ln={sm:e=>Q(pe.sm,e),md:e=>Q(pe.md,e),lg:e=>Q(pe.lg,e),xl:e=>Q(pe.xl,e),"2xl":e=>Q(pe["2xl"],e),dark:e=>Q(pe.dark,e),light:e=>Q("(prefers-color-scheme: light)",e),touch:e=>Q("(hover: none) and (pointer: coarse)",e),mouse:e=>Q("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>Q("(prefers-reduced-motion: reduce)",e),highContrast:e=>Q("(prefers-contrast: high)",e),portrait:e=>Q("(orientation: portrait)",e),landscape:e=>Q("(orientation: landscape)",e)};function Or(e,t){const n=[];e.includes("dark")?n.push(pe.dark):e.includes("light")&&n.push("(prefers-color-scheme: light)");const r=e.filter(s=>St.includes(s)),o=r[r.length-1];o&&o in pe&&n.push(pe[o]);const i=n.length>0?n.join(" and "):"all";return Q(i,t)}function Pr(e){const t=[];return e.base&&t.push(U(e.base,"responsive-base")),St.forEach(n=>{const r=e[n];r&&t.push(ln[n](r))}),t}function Mr(e){const t=[];let n=null;return{case(r,o){const i=typeof r=="function"?r:s=>s===r;return t.push({condition:i,content:o}),this},when(r,o){return t.push({condition:r,content:o}),this},otherwise(r){return n=r,this},done(){for(let r=0;r<t.length;r++){const{condition:o,content:i}=t[r];if(o(e))return U(i,`switch-case-${r}`)}return U(n||[],"switch-otherwise")}}}class xe extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return xe.instance||(xe.instance=new xe),xe.instance}emit(t,n){const r=Date.now(),o=this.eventCounters.get(t);if(!o||r-o.window>1e3)this.eventCounters.set(t,{count:1,window:r});else if(o.count++,o.count>50&&o.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!1,cancelable:!0}));const i=this.handlers[t];i&&i.forEach(s=>{try{s(n)}catch(c){H(`Error in global event handler for "${t}":`,c)}})}on(t,n){return this.handlers[t]||(this.handlers[t]=new Set),this.handlers[t].add(n),()=>this.off(t,n)}off(t,n){const r=this.handlers[t];r&&r.delete(n)}offAll(t){delete this.handlers[t]}listen(t,n,r){return this.addEventListener(t,n,r),()=>this.removeEventListener(t,n)}once(t,n){return new Promise(r=>{const o=this.on(t,i=>{o(),n(i),r(i)})})}getActiveEvents(){return Object.keys(this.handlers).filter(t=>this.handlers[t]&&this.handlers[t].size>0)}clear(){this.handlers={}}getHandlerCount(t){return this.handlers[t]?.size||0}getEventStats(){const t={};for(const[n,r]of this.eventCounters.entries())t[n]={count:r.count,handlersCount:this.getHandlerCount(n)};return t}resetEventCounters(){this.eventCounters.clear()}}const Oe=xe.getInstance(),Nr=(e,t)=>Oe.emit(e,t),Rr=(e,t)=>Oe.on(e,t),Dr=(e,t)=>Oe.off(e,t),Hr=(e,t)=>Oe.once(e,t),Fr=(e,t,n)=>Oe.listen(e,t,n);function Ct(e){let t={...e};const n=[];function r(c){n.push(c),c(t)}function o(){return t}function i(c){const a=typeof c=="function"?c(t):c;t={...t,...a},s()}function s(){n.forEach(c=>c(t))}return{subscribe:r,getState:o,setState:i}}const Et=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},ce=(e,t)=>{for(const n of e){const r=[],o=n.path.replace(/:[^/]+/g,c=>(r.push(c.slice(1)),"([^/]+)")),i=new RegExp(`^${o}$`),s=t.match(i);if(s){const c={};return r.forEach((a,l)=>{c[a]=s[l+1]}),{route:n,params:c}}}return{route:null,params:{}}},yt={};async function un(e){if(e.component)return e.component;if(e.load){if(yt[e.path])return yt[e.path];try{const t=await e.load();return yt[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 fn(e){const{routes:t,base:n="",initialUrl:r}=e;let o,i,s,c,a,l,m;const y=async(h,d)=>{const u=t.find(g=>ce([g],h.path).route!==null);if(u?.beforeEnter)try{const g=await u.beforeEnter(h,d);return typeof g=="string"?(await f(g,!0),!1):g!==!1}catch(g){return H("beforeEnter error",g),!1}return!0},p=async(h,d)=>{const u=t.find(g=>ce([g],h.path).route!==null);if(u?.onEnter)try{const g=await u.onEnter(h,d);return typeof g=="string"?(await f(g,!0),!1):g!==!1}catch(g){return H("onEnter error",g),!1}return!0},v=(h,d)=>{const u=t.find(g=>ce([g],h.path).route!==null);if(u?.afterEnter)try{u.afterEnter(h,d)}catch(g){H("afterEnter error",g)}},f=async(h,d=!1)=>{try{const u={path:h.replace(n,"")||"/",query:{}},g=ce(t,u.path);if(!g)throw new Error(`No route found for ${u.path}`);const w=s.getState(),k={path:u.path,params:g.params,query:u.query};if(!await y(k,w)||!await p(k,w))return;typeof window<"u"&&typeof document<"u"&&(d?window.history.replaceState({},"",n+h):window.history.pushState({},"",n+h)),s.setState(k),v(k,w)}catch(u){H("Navigation error:",u)}};if(typeof window<"u"&&typeof document<"u"&&typeof r>"u"){o=()=>{const d=new URL(window.location.href),u=d.pathname.replace(n,"")||"/",g=Et(d.search);return{path:u,query:g}},i=o();const h=ce(t,i.path);s=Ct({path:i.path,params:h.params,query:i.query}),c=async(d=!1)=>{const u=o();await f(u.path,d)},window.addEventListener("popstate",()=>c(!0)),a=d=>f(d,!1),l=d=>f(d,!0),m=()=>window.history.back()}else{o=()=>{const u=new URL(r||"/","http://localhost"),g=u.pathname.replace(n,"")||"/",w=Et(u.search);return{path:g,query:w}},i=o();const h=ce(t,i.path);s=Ct({path:i.path,params:h.params,query:i.query}),c=async()=>{const u=o();await d(u.path)};const d=async u=>{try{const g={path:u.replace(n,"")||"/",query:{}},w=ce(t,g.path);if(!w)throw new Error(`No route found for ${g.path}`);const k=s.getState(),S={path:g.path,params:w.params,query:g.query},C=t.find(_=>ce([_],S.path).route!==null);if(C?.beforeEnter)try{const _=await C.beforeEnter(S,k);if(typeof _=="string"){await d(_);return}if(_===!1)return}catch{return}if(C?.onEnter)try{const _=await C.onEnter(S,k);if(typeof _=="string"){await d(_);return}if(_===!1)return}catch{return}if(s.setState(S),C?.afterEnter)try{C.afterEnter(S,k)}catch{}}catch{}};a=async u=>d(u),l=async u=>d(u),m=()=>{}}return{store:s,push:a,replace:l,back:m,subscribe:s.subscribe,matchRoute:h=>ce(t,h),getCurrent:()=>s.getState(),resolveRouteComponent:un}}function Ir(e,t){return ce(e,t)}function Wr(e){const t=fn(e);return kt("router-view",()=>{if(!t)return ye`<div>Router not initialized.</div>`;const n=bt(t.getCurrent());xt(()=>{try{t&&typeof t.subscribe=="function"&&t.subscribe(o=>{try{n.value=o}catch{}})}catch{}});const r=t.matchRoute(n.value.path);return!r||!r.route?ye`<div>Not found</div>`:t.resolveRouteComponent(r.route).then(o=>{if(typeof o=="string")return{tag:o,props:{},children:[]};if(typeof o=="function"){const i=o();return(i instanceof Promise?i:Promise.resolve(i)).then(c=>typeof c=="string"?{tag:c,props:{},children:[]}:c)}return ye`<div>Invalid route component</div>`}).catch(()=>ye`<div>Invalid route component</div>`)}),kt("router-link",()=>{const n=cn({to:"",tag:"a",replace:!1,exact:!1,activeClass:"active",exactActiveClass:"exact-active",ariaCurrentValue:"page",disabled:!1,external:!1,class:"",style:""}),r=bt(t.getCurrent());xt(()=>{try{t&&typeof t.subscribe=="function"&&t.subscribe(f=>{try{r.value=f}catch{}})}catch{}});const o=me(()=>r.value.path===n.to),i=me(()=>n.exact?o.value:r.value&&typeof r.value.path=="string"?r.value.path.startsWith(n.to):!1),s=me(()=>o.value?`aria-current="${n.ariaCurrentValue}"`:""),c=(n.class||"").split(/\s+/).filter(Boolean),a={};for(const f of c)a[f]=!0;const l=me(()=>({...a,[n.activeClass||"active"]:i.value,[n.exactActiveClass||"exact-active"]:o.value})),m=me(()=>n.tag==="button"),y=me(()=>n.disabled?m.value?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':""),p=me(()=>n.external&&(n.tag==="a"||!n.tag)?'target="_blank" rel="noopener noreferrer"':""),v=f=>{if(n.disabled){f.preventDefault();return}n.external&&(n.tag==="a"||!n.tag)||(f.preventDefault(),n.replace?t.replace(n.to):t.push(n.to))};return ye`
|
|
129
|
-
${an().when(m.value,ye`
|
|
130
|
-
<button
|
|
131
|
-
part="button"
|
|
132
|
-
:class="${l.value}"
|
|
133
|
-
${s.value}
|
|
134
|
-
${y.value}
|
|
135
|
-
${p.value}
|
|
136
|
-
@click="${v}"
|
|
137
|
-
>
|
|
138
|
-
<slot></slot>
|
|
139
|
-
</button>
|
|
140
|
-
`).otherwise(ye`
|
|
141
|
-
<a
|
|
142
|
-
part="link"
|
|
143
|
-
href="${n.to}"
|
|
144
|
-
:class="${l.value}"
|
|
145
|
-
${s.value}
|
|
146
|
-
${y.value}
|
|
147
|
-
${p.value}
|
|
148
|
-
@click="${v}"
|
|
149
|
-
><slot></slot
|
|
150
|
-
></a>
|
|
151
|
-
`).done()}
|
|
152
|
-
`}),t}exports.GlobalEventBus=xe;exports.Transition=sr;exports.TransitionGroup=ar;exports.anchorBlock=U;exports.component=kt;exports.computed=me;exports.createStore=Ct;exports.createTransitionPreset=cr;exports.css=nn;exports.decodeEntities=le;exports.each=or;exports.eachGroup=Tr;exports.eachPage=jr;exports.eachWhere=Ar;exports.emit=Nr;exports.eventBus=Oe;exports.getTransitionStyleSheet=tt;exports.html=ye;exports.initRouter=Wr;exports.listen=Fr;exports.match=an;exports.matchRoute=ce;exports.matchRouteSSR=Ir;exports.mediaVariants=pe;exports.off=Dr;exports.on=Rr;exports.once=Hr;exports.parseQuery=Et;exports.ref=bt;exports.renderToString=Ye;exports.resolveRouteComponent=un;exports.responsive=ln;exports.responsiveOrder=St;exports.responsiveSwitch=Pr;exports.switchOn=Mr;exports.switchOnLength=Sr;exports.switchOnPromise=Lr;exports.transitionPresets=je;exports.unless=Cr;exports.unsafeHTML=xn;exports.useEmit=pr;exports.useOnAttributeChanged=gr;exports.useOnConnected=xt;exports.useOnDisconnected=hr;exports.useOnError=mr;exports.useProps=cn;exports.useRouter=fn;exports.useStyle=yr;exports.watch=vn;exports.when=We;exports.whenEmpty=Er;exports.whenMedia=Q;exports.whenNotEmpty=_r;exports.whenVariants=Or;
|
|
9
|
+
Stopping runaway component render to prevent browser freeze`),i(null);return}}else s(0);const u=setTimeout(()=>{t(Date.now()),e(),i(null)},n>10?100:0);i(u)}function Et(e,r,n,t,s){if(!e)return;let o=n||"";try{if(e){const k=Array.from(e.querySelectorAll("*"));for(const c of k)try{const g=c.lastHtmlStringForJitCSS;g&&typeof g=="string"&&g.trim()&&(o+=`
|
|
10
|
+
`+g)}catch{}}}catch{}const i=Y.jitCSS(o);if((!i||i.trim()==="")&&!r._computedStyle){s(null),e.adoptedStyleSheets=[Y.getBaseResetSheet(),Y.getTransitionStyleSheet()];return}let a="";r._computedStyle&&(a=r._computedStyle??"");let f=Y.sanitizeCSS(`${a}
|
|
11
|
+
${i}
|
|
12
|
+
`);f=Y.minifyCSS(f);let u=t;u||(u=new CSSStyleSheet),(u.cssRules.length===0||u.cssRules.length>0&&Array.from(u.cssRules).map(k=>k.cssText).join("")!==f)&&u.replaceSync(f),e.adoptedStyleSheets=[Y.getBaseResetSheet(),Y.getTransitionStyleSheet(),u],s(u)}let I=null;function Be(e){I=e}function Le(){I=null}function St(){if(!I)throw new Error("useEmit must be called during component render");const e=I.emit;if(typeof e!="function")throw new Error("useEmit requires an emit function on the component context");const r=e;return(n,t,s)=>r(n,t,s)}function le(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function _t(e){if(!I)throw new Error("useOnConnected must be called during component render");le(I),I._hookCallbacks.onConnected=e}function kt(e){if(!I)throw new Error("useOnDisconnected must be called during component render");le(I),I._hookCallbacks.onDisconnected=e}function Ct(e){if(!I)throw new Error("useOnAttributeChanged must be called during component render");le(I),I._hookCallbacks.onAttributeChanged=e}function At(e){if(!I)throw new Error("useOnError must be called during component render");le(I),I._hookCallbacks.onError=r=>{try{r instanceof Error?e(r):e(new Error(String(r)))}catch{}}}function wt(e){if(!I)throw new Error("useProps must be called during component render");le(I);const r=I._hookCallbacks;r.props={...r.props||{},...e};const n=I;try{const s=Object.keys(e||{});for(const o of s){if(typeof o!="string"||o.startsWith("_"))continue;const i=Object.getOwnPropertyDescriptor(n,o);if(!(i&&!i.configurable))try{let f=Object.prototype.hasOwnProperty.call(n,o)?n[o]:void 0;Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get(){try{const u=n&&n._host;if(u){const S=p.toKebab(o),k=u.getAttribute(S);if(k!==null){const c=typeof e[o];return c==="boolean"?k===""||k==="true":c==="number"?Number(k):k}if(typeof u[o]<"u"){const c=u[o];if(p.isReactiveState(c)||c&&typeof c=="object"&&"value"in c&&!(c instanceof Node))return c.value;const g=typeof e[o];if(!(g==="string"&&c&&typeof c=="object"))return g==="boolean"&&typeof c=="string"?c===""||c==="true":c}}}catch{}return f},set(u){f=u}})}catch{}}}catch{}return new Proxy({},{get(s,o){if(typeof o!="string")return;const i=e[o];try{const f=n&&n._host;if(f){if(f instanceof HTMLElement||typeof f.getAttribute=="function"&&typeof f.hasAttribute=="function"){const S=o.replace(/([A-Z])/g,"-$1").toLowerCase(),k=f.getAttribute(S);if(k!==null)return typeof i=="boolean"?k===""||k==="true":typeof i=="number"?Number(k):k}const u=f[o];if(typeof u<"u"&&u!==""){const S=u&&typeof u=="object"&&"value"in u&&!(u instanceof Node);if(!(typeof i=="string"&&u&&typeof u=="object"&&!S&&!p.isReactiveState(u)))return typeof i=="boolean"&&i===!1&&u===""?i:p.isReactiveState(u)||S?u.value:typeof i=="boolean"&&typeof u=="string"?u==="true"||u!==""&&u!=="false":typeof i=="number"&&typeof u=="string"&&!Number.isNaN(Number(u))?Number(u):u}}}catch{}const a=n[o];return typeof i=="boolean"&&a===""?i===!1?i:!0:p.isReactiveState(a)||a&&typeof a=="object"&&"value"in a&&!(a instanceof Node)?a.value:a!=null&&a!==""?typeof i=="boolean"&&typeof a=="string"?a==="true":typeof i=="number"&&typeof a=="string"&&!Number.isNaN(Number(a))?Number(a):a:i},has(s,o){return typeof o=="string"&&(o in n||o in e)},ownKeys(){return Array.from(new Set([...Object.keys(e),...Object.keys(n||{})]))},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}}})}function Tt(e){if(!I)throw new Error("useStyle must be called during component render");le(I);try{const r=e();Object.defineProperty(I,"_computedStyle",{value:r,writable:!0,enumerable:!1,configurable:!0})}catch(r){j.devWarn("Error in useStyle callback:",r),Object.defineProperty(I,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const ce=new Map,De=Symbol.for("cer.registry");function Lt(){if(typeof window<"u"){const e=globalThis;e[De]||(e[De]=ce)}}function Nt(e,r){if(!r.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=ce.get(e)||r,this._componentId=`${e}-${Math.random().toString(36).substr(2,9)}`;const n=this._initContext(r),t=(o,i,a)=>{Object.defineProperty(o,i,{value:a,writable:!1,enumerable:!1,configurable:!1})};t(n,"refs",this._refs),t(n,"requestRender",()=>this.requestRender()),t(n,"_requestRender",()=>this._requestRender()),t(n,"_componentId",this._componentId),t(n,"_triggerWatchers",(o,i)=>this._triggerWatchers(o,i)),this.context=n,p.safe(()=>{t(n,"_host",this)}),t(this.context,"emit",(o,i,a)=>{const f={detail:i,bubbles:!0,composed:!0,...a||{}},u=new CustomEvent(o,f);this.dispatchEvent(u);const S=o.indexOf(":");if(S>0){const k=o.substring(0,S),c=o.substring(S+1),g=c.includes("-")?`${k}:${c.split("-").map((d,b)=>b===0?d:d.charAt(0).toUpperCase()+d.slice(1)).join("")}`:`${k}:${c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;g!==o&&p.safe(()=>{this.dispatchEvent(new CustomEvent(g,f))})}return!u.defaultPrevented});const s=ce.get(e)||r;for(const o in s){const i=s[o];typeof i=="function"&&(this.context[o]=(...a)=>i(...a,this.context))}if(s.props)for(const o in s.props){let i=this[o];Object.defineProperty(this,o,{get(){return i},set(a){const f=i;i=a,this.context[o]=a,this._initializing||(this._applyProps(s),f!==a&&this._requestRender())},enumerable:!0,configurable:!0})}this._initializing=!1,this._initWatchers(s),this._applyProps(s),this._render(s)}connectedCallback(){this._runLogicWithinErrorBoundary(r,()=>{this._applyProps(r),this._requestRender(),et(r,this.context,this._mounted,n=>{this._mounted=n})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(r,()=>{tt(r,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},n=>{this._templateLoading=n},n=>{this._templateError=n},n=>{this._mounted=n})})}attributeChangedCallback(n,t,s){this._runLogicWithinErrorBoundary(r,()=>{this._applyProps(r),t!==s&&this._requestRender(),nt(r,n,t,s,this.context)})}static get observedAttributes(){return r.props?Object.keys(r.props).map(p.toKebab):[]}_render(n){this._runLogicWithinErrorBoundary(n,()=>{bt(this.shadowRoot,n,this.context,this._refs,t=>{this._lastHtmlStringForJitCSS=t,typeof this.onHtmlStringUpdate=="function"&&this?.onHtmlStringUpdate?.(t)},t=>{this._templateLoading=t,this?.onLoadingStateChange?.(t)},t=>{this._templateError=t,this?.onErrorStateChange?.(t)},t=>this._applyStyle(n,t))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{p.scheduleDOMUpdate(()=>{vt(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,n=>{this._lastRenderTime=n},n=>{this._renderCount=n},this._renderTimeoutId,n=>{this._renderTimeoutId=n})},this._componentId)})}_applyStyle(n,t){this._runLogicWithinErrorBoundary(n,()=>{Et(this.shadowRoot,this.context,t,this._styleSheet,s=>{this._styleSheet=s})})}_runLogicWithinErrorBoundary(n,t){this._hasError&&(this._hasError=!1);try{t()}catch(s){this._hasError=!0;try{const o=this.tagName?.toLowerCase?.()||"<unknown>",i=this._componentId||"<unknown-id>",a={};if(n&&n.props)for(const f of Object.keys(n.props))try{const u=this.context[f];u instanceof Node?a[f]=`[DOM Node: ${u.nodeName}]`:typeof u=="object"&&u!==null?a[f]=Object.keys(u).length>5?`[object(${Object.keys(u).length} keys)]`:u:a[f]=u}catch{a[f]="[unreadable]"}j.devError(`Error rendering component <${o}> (id=${i}):`,s),j.devError("Component props snapshot:",a),j.devWarn("Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`).")}catch{}n.onError&&n.onError(s,this.context)}}_initContext(n){try{let t=function(o,i=""){if(Array.isArray(o))return new Proxy(o,{get(a,f,u){const S=Reflect.get(a,f,u);return typeof S=="function"&&typeof f=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(f)?function(...c){const g=S.apply(a,c);if(!s._initializing){const d=i||"root";s._triggerWatchers(d,a),p.scheduleDOMUpdate(()=>s._render(n),s._componentId)}return g}:S},set(a,f,u){if(a[String(f)]=u,!s._initializing){const S=i?`${i}.${String(f)}`:String(f);s._triggerWatchers(S,u),p.scheduleDOMUpdate(()=>s._render(n),s._componentId)}return!0},deleteProperty(a,f){if(delete a[String(f)],!s._initializing){const u=i?`${i}.${String(f)}`:String(f);s._triggerWatchers(u,void 0),p.scheduleDOMUpdate(()=>s._render(n),s._componentId)}return!0}});if(o&&typeof o=="object"){if(p.isReactiveState(o))return o;for(const a in o){const f=i?`${i}.${a}`:a;o[a]=t(o[a],f)}return new Proxy(o,{set(a,f,u){const S=i?`${i}.${String(f)}`:String(f);return a[String(f)]=t(u,S),s._initializing||(s._triggerWatchers(S,a[String(f)]),p.scheduleDOMUpdate(()=>s._render(n),s._componentId)),!0},get(a,f,u){return Reflect.get(a,f,u)}})}return o};const s=this;return t({...n.props?Object.fromEntries(Object.entries(n.props).map(([o,i])=>[o,i.default])):{}})}catch{return{}}}_initWatchers(n){this._runLogicWithinErrorBoundary(n,()=>{Je(this.context,this._watchers,{})})}_triggerWatchers(n,t){Ye(this.context,this._watchers,n,t)}_applyProps(n){this._runLogicWithinErrorBoundary(n,()=>{try{Qe(this,n,this.context)}catch(t){this._hasError=!0,n.onError&&n.onError(t,this.context)}})}}}function Ot(e,r){Lt();let n=p.toKebab(e);n.includes("-")||(n=`cer-${n}`);const t={},s={props:{},onConnected:()=>{t.onConnected&&t.onConnected()},onDisconnected:()=>{t.onDisconnected&&t.onDisconnected()},onAttributeChanged:(o,i,a)=>{t.onAttributeChanged&&t.onAttributeChanged(o,i,a)},onError:o=>{t.onError&&o&&t.onError(o)},render:o=>{const i=o,a=i._componentId||`${n}-${Math.random().toString(36).substr(2,9)}`;p.reactiveSystem.setCurrentComponent(a,()=>{o.requestRender&&o.requestRender()});try{Be(o);let f;try{f=r()}catch(u){try{const S=i._hookCallbacks;if(S&&typeof S.onError=="function")try{S.onError(u)}catch{}}catch{}throw u}if(i._hookCallbacks){const u=i._hookCallbacks;if(u.onConnected&&(t.onConnected=u.onConnected),u.onDisconnected&&(t.onDisconnected=u.onDisconnected),u.onAttributeChanged&&(t.onAttributeChanged=u.onAttributeChanged),u.onError&&(t.onError=u.onError),u.style&&(i._styleCallback=u.style),u.props){const S=u.props;s.props=Object.fromEntries(Object.entries(S).map(([k,c])=>[k,{type:typeof c=="boolean"?Boolean:typeof c=="number"?Number:typeof c=="string"?String:Function,default:c}])),ce.set(n,s)}}return f}finally{Le(),p.reactiveSystem.clearCurrentComponent()}}};if(ce.set(n,s),typeof window<"u"){try{const o={_hookCallbacks:{},requestRender:()=>{},emit:()=>!0};Be(o);try{r()}catch(i){try{const a=o?._hookCallbacks;if(a&&typeof a.onError=="function")try{a.onError(i)}catch{}j.devError(`Error during component discovery render <${n}>:`,i),j.devWarn("Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when().")}catch{}throw Le(),i}if(Le(),o._hookCallbacks?.props){const i=o._hookCallbacks.props;s.props=Object.fromEntries(Object.entries(i).map(([a,f])=>[a,{type:typeof f=="boolean"?Boolean:typeof f=="number"?Number:typeof f=="string"?String:Function,default:f}])),ce.set(n,s)}}catch{}customElements.get(n)||customElements.define(n,Nt(n,s))}}class Rt{map=new Map;maxSize;constructor(r){this.maxSize=r}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}set(r,n){if(this.map.delete(r),this.map.set(r,n),this.map.size>this.maxSize){const t=this.map.keys().next().value;t!==void 0&&this.map.delete(t)}}has(r){return this.map.has(r)}clear(){this.map.clear()}}const Ne=new Rt(500);function Pt(e,r){if(e==null){j.devWarn(`⚠️ Event handler for '@${r}' is ${e}. This will prevent the event from working. Use a function reference instead: @${r}="\${functionName}"`);return}typeof e!="function"&&j.devWarn(`🚨 Potential infinite loop detected! Event handler for '@${r}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${r}="\${functionName()}" to @${r}="\${functionName}" to pass the function reference instead of calling it immediately.`),e===void 0&&typeof e!="function"&&j.devWarn(`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${r}="\${fn}" not @${r}="\${fn()}"`)}function J(e,r={},n,t){const s=t??r.key;return{tag:e,key:s,props:r,children:n}}function ge(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function te(e){return typeof e=="object"&&e!==null&&"tag"in e&&!ge(e)}function Mt(e,r){return e.key!=null?e:{...e,key:r}}function $t(e,r=[],n={}){const t={},s={},o={},i=[],a=/([:@#]?)([a-zA-Z0-9-:.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;let f;for(;f=a.exec(e);){const u=f[1],S=f[2],k=(f[4]||f[6])??"",c=f[3]===void 0&&f[6]===void 0,g=k.match(/^{{(\d+)}}$/);let d=c?!0:g?r[Number(g[1])]??null:k;g||(d==="true"?d=!0:d==="false"?d=!1:d==="null"?d=null:isNaN(Number(d))||(d=Number(d)));const b=["model","bind","show","class","style","ref","when"];if(u===":"){const[m,L]=S.split(":"),[w,...v]=m.split(".");if(b.includes(w)){const _=[...v],T=w==="model"&&L?`model:${L}`:w;o[T]={value:d,modifiers:_,arg:L}}else if(S==="disabled"){let _=d;_&&p.isReactiveState(_)&&(_=_.value);const T=typeof _;if(_===""||T==="boolean"||T==="string"&&(_==="true"||_==="false")||_==null||T==="number")t[S]=_;else{let l=d;l&&p.isReactiveState(l)&&(l=l.value),s[S]=l}i.push(S)}else{let _=d;_&&p.isReactiveState(_)&&(_=_.value),s[S]=_,i.push(S)}}else if(u==="@"){const[m,...L]=S.split("."),w=L;Pt(d,m);const v=typeof d=="function"?d:typeof n[d]=="function"?n[d]:void 0;if(v){const _=N=>{if(w.includes("prevent")&&N.preventDefault(),w.includes("stop")&&N.stopPropagation(),!(w.includes("self")&&N.target!==N.currentTarget))return w.includes("once")&&N.currentTarget?.removeEventListener(m,_),v(N)},T="on"+m.charAt(0).toUpperCase()+m.slice(1);t[T]=_}}else S==="ref"?t.ref=d:s[S]=d}return{props:t,attrs:s,directives:o,bound:i}}function Me(e){if(!te(e)||ge(e))return e;const r=e.props?.directives;if(r&&r.when){const n=r.when.value,t=p.isReactiveState(n)?n.value:n,s={...r};delete s.when;const o={...e.props};Object.keys(s).length>0?o.directives=s:delete o.directives;const i={...e,props:o};return Array.isArray(i.children)&&(i.children=i.children.map(f=>typeof f=="object"&&f!==null?Me(f):f)),{tag:"#anchor",key:e.key!=null?`when-${e.key}`:`when-${e.tag}`,children:t?[i]:[]}}if(Array.isArray(e.children)){const n=e.children.map(t=>typeof t=="object"&&t!==null?Me(t):t);return{...e,children:n}}return e}function jt(e,r,n){const t=me.length>0?me[me.length-1]:void 0,s=n??t,o=!n&&r.length===0,i=o?e.join("<!--TEMPLATE_DELIM-->"):null;if(o&&i){const l=Ne.get(i);if(l)return l}function a(l,E){return J("#text",{},l,E)}function f(l,E){let y=typeof l=="string"?p.decodeEntities(l):l;return typeof y=="string"&&/[\r\n]/.test(y)&&(y=y.replace(/\s+/g," ")),J("#text",{},y,E)}let u="";for(let l=0;l<e.length;l++)u+=e[l],l<r.length&&(u+=`{{${l}}}`);const S=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,k=[];let c,g=[],d=null,b={},m,L=0;const w=[];function v(l){if(!l||typeof l!="object"||ge(l))return;const E=l,y=b;if(E.props||E.attrs){const h=E;h.props&&(y.props||(y.props={}),Object.assign(y.props,h.props)),h.attrs&&(y.attrs||(y.attrs={}),Object.keys(h.attrs).forEach(C=>{if(C==="style"&&y.attrs.style){const P=String(y.attrs.style).replace(/;?\s*$/,""),R=String(h.attrs.style).replace(/^;?\s*/,"");y.attrs.style=P+"; "+R}else if(C==="class"&&y.attrs.class){const P=String(y.attrs.class).trim().split(/\s+/).filter(Boolean),R=String(h.attrs.class).trim().split(/\s+/).filter(Boolean),A=[...new Set([...P,...R])];y.attrs.class=A.join(" ")}else y.attrs[C]=h.attrs[C]}))}else y.props||(y.props={}),Object.assign(y.props,E)}function _(l,E){const y=d?g:w;if(ge(l)){const h=l.key??E,C=l.children;y.push({...l,key:h,children:C});return}if(te(l)){y.push(Mt(l,void 0));return}if(Array.isArray(l)){if(l.length===0)return;for(let h=0;h<l.length;h++){const C=l[h];ge(C)||te(C)||Array.isArray(C)?_(C,`${E}-${h}`):C!==null&&typeof C=="object"?p.isUnsafeHTML(C)?y.push(J("#raw",{},C.__rawHTML,`${E}-${h}`)):v(C):y.push(a(String(C),`${E}-${h}`))}return}if(l!==null&&typeof l=="object"){if(p.isUnsafeHTML(l)){const h=l.__rawHTML??"";y.push(J("#raw",{},h,E));return}v(l);return}y.push(a(String(l),E))}const T=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;c=S.exec(u);)if(!(c[0].startsWith("<!--")&&c[0].endsWith("-->"))){if(c[1]){const l=c[1],E=c[0][1]==="/",y=c[0][c[0].length-2]==="/"||T.has(l),{props:h,attrs:C,directives:P,bound:R}=$t(c[2]||"",r,s??{}),A={props:{},attrs:{}};for(const x in h)A.props[x]=h[x];for(const x in C)A.attrs[x]=C[x];A.attrs&&Object.prototype.hasOwnProperty.call(A.attrs,"key")&&!(A.props&&Object.prototype.hasOwnProperty.call(A.props,"key"))&&p.safe(()=>{A.props.key=A.attrs.key});try{const x={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"]},$=l.toLowerCase(),q=x[$]??[];if(A.attrs){for(const H of q)if(R&&R.includes(H)&&H in A.attrs&&!(A.props&&H in A.props)){let M=A.attrs[H];if(M&&p.isReactiveState(M))M=M.value,A.props[H]=M,delete A.attrs[H];else if(M&&typeof M=="object"&&"value"in M&&!(M instanceof Node))try{const W=M.value;A.props[H]=($==="select"||$==="option")&&H==="value"?String(W):W,delete A.attrs[H]}catch{}else{const W=typeof M;if(H==="disabled")(M===""||W==="boolean"||W==="string"&&(M==="true"||M==="false")||M==null||W==="number")&&(A.props[H]=M,delete A.attrs[H]);else if(M===""||W==="string"||W==="number"||W==="boolean"||M==null){const F=($==="select"||$==="option")&&H==="value"?String(M):M;A.props[H]=F,delete A.attrs[H]}}}}if(l.includes("-")||!!s?.__customElements?.has?.(l)){if(A.isCustomElement=!0,R&&A.attrs){const H=new Set(["id","name","data-key","key"]);for(const M of R)if(M in A.attrs&&!(A.props&&M in A.props)){const W=M.includes("-")?p.toCamel(M):M,F=A.attrs[M];if(A.props[W]=F,H.has(M)||p.isClassLikeAttr(M))try{const Ee=p.safeSerializeAttr(A.attrs[M]);Ee===null?delete A.attrs[M]:A.attrs[M]=Ee}catch{delete A.attrs[M]}else delete A.attrs[M]}}try{if(A.attrs&&!(A.props&&"modelValue"in A.props)){const H=A.attrs["model-value"]??A.attrs.modelValue;typeof H<"u"&&(A.props.modelValue=H)}}catch{}}}catch{}if(P&&Object.keys(P).some(x=>x==="model"||x.startsWith("model:")))try{const x=Symbol.for("cer.registry"),$=globalThis[x],q=!!($&&typeof $.has=="function"&&$.has(l)),B=s,H=!!(B&&(B.__customElements instanceof Set&&B.__customElements.has(l)||Array.isArray(B.__isCustomElements)&&B.__isCustomElements.includes(l)));if(!!(l.includes("-")||H||q))for(const F of Object.keys(P)){if(F!=="model"&&!F.startsWith("model:"))continue;const ve=P[F],Ee=ve.arg??(F.includes(":")?F.split(":",2)[1]:void 0),D=ve.value,Ce=Ee??"modelValue",$e=p.getNestedValue,qe=p.setNestedValue,fe=s?._state||s;let Z;typeof D=="string"&&fe?Z=$e(fe,D):Z=D,A.props[Ce]=Z;try{const X=p.toKebab(Ce);A.attrs||(A.attrs={}),Z!=null&&(typeof Z=="string"||typeof Z=="number"||typeof Z=="boolean")&&(A.attrs[X]=Z)}catch{}A.isCustomElement=!0;const je=`update:${p.toKebab(Ce)}`.replace(/-([a-z])/g,(X,G)=>G.toUpperCase()),Ge="on"+je.charAt(0).toUpperCase()+je.slice(1);A.props[Ge]=function(X){const G=X.detail!==void 0?X.detail:X.target?X.target.value:void 0;if(fe)if(D&&p.isReactiveState(D)){const Q=D.value;if(Array.isArray(G)&&Array.isArray(Q)?JSON.stringify([...G].sort())!==JSON.stringify([...Q].sort()):G!==Q){D.value=G;try{const ee=s;if(ee){const ue=ee.requestRender,de=ee._requestRender;typeof ue=="function"?ue():typeof de=="function"&&de()}}catch{}}}else{const Q=$e(fe||{},typeof D=="string"?D:String(D));if(Array.isArray(G)&&Array.isArray(Q)?JSON.stringify([...G].sort())!==JSON.stringify([...Q].sort()):G!==Q){qe(fe||{},typeof D=="string"?D:String(D),G);try{const ee=s;if(ee){const ue=ee.requestRender,de=ee._requestRender;typeof ue=="function"?ue():typeof de=="function"&&de()}}catch{}}}},delete P[F]}}catch{}if(Object.keys(P).length>0&&(A.directives={...P}),E){const x=g.some(H=>typeof H=="object"&&H.tag!=="#text");let $=g;if(x&&g.length>0){let H=0;for(;H<g.length;){const W=g[H];if(!te(W)||W.tag!=="#text"||typeof W.children!="string"||W.children.trim()!=="")break;H++}let M=g.length-1;for(;M>=0;){const W=g[M];if(!te(W)||W.tag!=="#text"||typeof W.children!="string"||W.children.trim()!=="")break;M--}H===0&&M===g.length-1?$=g:H>M?$=[]:$=g.slice(H,M+1)}const q=J(d,b,$.length===1&&te($[0])&&$[0].tag==="#text"?typeof $[0].children=="string"?$[0].children:"":$.length?$:void 0,m),B=k.pop();B?(d=B.tag,b=B.props,m=B.key,g=B.children,g.push(q)):(w.push(q),d=null,b={},m=void 0,g=[])}else y?d?g.push(J(l,A,void 0,void 0)):w.push(J(l,A,void 0,void 0)):(d&&k.push({tag:d,props:b,children:g,key:m}),d=l,b=A,g=[])}else if(typeof c[3]<"u"){const l=Number(c[3]),E=r[l],y=`interp-${l}`;_(E,y)}else if(c[4]){const l=c[4],E=d?g:w,y=l.split(/({{\d+}})/);for(const h of y){if(!h)continue;const C=h.match(/^{{(\d+)}}$/);if(C){const P=Number(C[1]),R=r[P],A=`interp-${P}`;_(R,A)}else{const P=`text-${L++}`;E.push(f(h,P))}}}}const O=w.filter(l=>te(l)&&l.tag==="#text"?typeof l.children=="string"&&l.children.trim()!=="":!0).map(l=>Me(l));if(O.length===1){const l=O[0];return o&&i&&Ne.set(i,l),l}else if(O.length>1){const l=O;return o&&i&&Ne.set(i,l),l}return J("div",{},"","fallback-root")}function Ht(e,...r){const n=r[r.length-1],t=typeof n=="object"&&n&&!Array.isArray(n)?n:void 0;return jt(e,r,t)}exports.computed=p.computed;exports.decodeEntities=p.decodeEntities;exports.ref=p.ref;exports.unsafeHTML=p.unsafeHTML;exports.watch=p.watch;exports.css=Y.css;exports.component=Ot;exports.html=Ht;exports.useEmit=St;exports.useOnAttributeChanged=Ct;exports.useOnConnected=_t;exports.useOnDisconnected=kt;exports.useOnError=At;exports.useProps=wt;exports.useStyle=Tt;
|
|
153
13
|
//# sourceMappingURL=custom-elements-runtime.cjs.js.map
|