@jasonshimmy/custom-elements-runtime 2.2.6 → 2.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./namespace-helpers-DwMMXN9Q.cjs"),j=require("./logger-CqdBMdui.cjs"),D=require("./transitions-BAjG4ZyQ.cjs");function tt(e,n,t){if(t)for(const[s,r]of Object.entries(t)){let i,o={};if(Array.isArray(r)?(i=r[0],o=r[1]||{}):i=r,n.set(s,{callback:i,options:o,oldValue:c.getNestedValue(e,s)}),o.immediate)try{const a=c.getNestedValue(e,s);i(a,void 0,e)}catch(a){j.devError(`Error in immediate watcher for "${s}":`,a)}}}function nt(e,n,t,s){const r=(o,a)=>{if(o===a)return!0;if(typeof o!=typeof a||typeof o!="object"||o===null||a===null)return!1;if(Array.isArray(o)&&Array.isArray(a))return o.length!==a.length?!1:o.every((b,w)=>r(b,a[w]));const u=o,d=a,E=Object.keys(u||{}),v=Object.keys(d||{});return E.length!==v.length?!1:E.every(b=>r(u[b],d[b]))},i=n.get(t);if(i&&!r(s,i.oldValue))try{i.callback(s,i.oldValue,e),i.oldValue=s}catch(o){j.devError(`Error in watcher for "${t}":`,o)}for(const[o,a]of n.entries())if(a.options.deep&&t.startsWith(o+"."))try{const u=c.getNestedValue(e,o);r(u,a.oldValue)||(a.callback(u,a.oldValue,e),a.oldValue=u)}catch(u){j.devError(`Error in deep watcher for "${o}":`,u)}}function Ne(e,n){return n===Boolean?e===""||e==="true":n===Number?Number(e):e}function rt(e,n,t){if(n)for(const s in n){const r=n[s],i=c.toKebab(s),o=e.getAttribute(i);if(r.type===Function&&typeof e[s]=="function")t[s]=e[s];else if(o!==null)t[s]=Ne(o,r.type);else if(typeof e[s]<"u")try{const a=e[s];if(r.type===String&&a&&typeof a=="object")try{t[s]=Ne(String(a),r.type)}catch{t[s]=a}else r.type===Boolean&&typeof a=="boolean"||r.type===Number&&typeof a=="number"||r.type===Function&&typeof a=="function"?t[s]=a:t[s]=Ne(String(a),r.type)}catch{t[s]=e[s]}else"default"in r&&r.default!==void 0&&(t[s]=r.default)}}function st(e,n,t){if(!n.props){try{const s=t?._hookCallbacks?.props||{},r=Array.from(new Set([...Object.keys(e||{}),...Object.keys(s||{})]));for(const i of r){if(typeof i!="string"||i.startsWith("_"))continue;const o=Object.getOwnPropertyDescriptor(t,i);if(!(!Object.prototype.hasOwnProperty.call(s,i)&&o&&(o.get||o.set||!o.configurable)))try{Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get(){try{const u=c.toKebab(i),d=e.getAttribute(u);if(d!==null)return d;const E=e[i];let v;return c.isReactiveState(E)||E&&typeof E=="object"&&"value"in E&&!(E instanceof Node)?v=E.value:v=E,v}catch{return e[i]}}})}catch{}}}catch{}return}rt(e,n.props,t)}function it(e,n,t,s){e.onConnected&&!t&&(e.onConnected(n),s(!0))}function ot(e,n,t,s,r,i,o,a){e.onDisconnected&&e.onDisconnected(n),t.forEach(u=>u()),s(),r(),i(!1),o(null),a(!1)}function at(e,n,t,s,r){e.onAttributeChanged&&e.onAttributeChanged(n,t,s,r)}class ct{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(n,t){const s=this.cache.get(n);if(s){if(!s.isSecure){j.devWarn("Blocked cached dangerous expression:",n);return}try{this.cache.delete(n),this.cache.set(n,s)}catch{}return s.evaluator(t)}const r=this.createEvaluator(n);if(this.cache.size>=this.maxCacheSize){const i=this.cache.keys().next().value;i&&this.cache.delete(i)}if(this.cache.set(n,r),!r.isSecure){j.devWarn("Blocked dangerous expression:",n);return}return r.evaluator(t)}static createEvaluator(n){if(this.hasDangerousPatterns(n))return{evaluator:()=>{},isSecure:!1};if(n.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(n),isSecure:!0}}catch(t){return j.devWarn("Failed to create evaluator for expression:",n,t),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(n){return this.dangerousPatterns.some(t=>t.test(n))}static createSafeEvaluator(n){const t=n.trim();if(t.startsWith("{")&&t.endsWith("}"))return this.createObjectEvaluator(n);if(/^ctx\.[a-zA-Z0-9_.]+$/.test(n.trim())){const s=n.trim().slice(4);return r=>c.getNestedValue(r,s)}return n.includes("ctx")||/[+\-*/%<>=&|?:[\]]/.test(n)?this.createSimpleEvaluator(n):s=>c.getNestedValue(s,n)}static createObjectEvaluator(n){const t=n.trim().slice(1,-1),s=this.parseObjectProperties(t);return r=>{const i={};for(const{key:o,value:a}of s)try{if(a.startsWith("ctx.")){const u=a.slice(4);i[o]=c.getNestedValue(r,u)}else i[o]=this.evaluateSimpleValue(a,r)}catch{i[o]=void 0}return i}}static parseObjectProperties(n){const t=[],s=n.split(",");for(const r of s){const i=r.indexOf(":");if(i===-1)continue;const o=r.slice(0,i).trim(),a=r.slice(i+1).trim(),u=o.replace(/^['"]|['"]$/g,"");t.push({key:u,value:a})}return t}static createSimpleEvaluator(n){return t=>{try{let s=n;const r=[];s=s.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,v=>`<<#${r.push(v)-1}#>>`);const i=s.match(/ctx\.[\w.]+/g)||[];for(const v of i){const b=v.slice(4),w=c.getNestedValue(t,b);if(w===void 0)return;const p=r.push(JSON.stringify(w))-1;s=s.replace(new RegExp(v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${p}#>>`)}const o=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,a=s.match(o)||[];for(const v of a){if(v.startsWith("ctx."))continue;const b=c.getNestedValue(t,v);if(b===void 0)return;const w=r.push(JSON.stringify(b))-1;s=s.replace(new RegExp(v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${w}#>>`)}const u=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let d;const E=new Set;for(;(d=u.exec(s))!==null;){const v=d[1];if(["true","false","null","undefined"].includes(v)||/^[0-9]+$/.test(v)||v==="ctx"||E.has(v))continue;E.add(v);const b=c.getNestedValue(t,v);if(b===void 0)return;const w=JSON.stringify(b),p=r.push(w)-1;v.includes(".")?s=s.replace(new RegExp(v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${p}#>>`):s=s.replace(new RegExp("\\b"+v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${p}#>>`)}s=s.replace(/<<#(\d+)#>>/g,(v,b)=>r[Number(b)]);try{return this.evaluateBasicExpression(s)}catch{return}}catch{return}}}static evaluateBasicExpression(n){const t=this.tokenize(n);let s=0;function r(){return t[s]}function i(m){const k=t[s++];if(m&&!k)throw new Error(`Unexpected token EOF, expected ${m}`);if(m&&k&&k.type!==m&&k.value!==m)throw new Error(`Unexpected token ${k.type}/${k.value}, expected ${m}`);return k}function o(){return p()}function a(m){if(typeof m=="number")return m;if(m==null)return NaN;if(typeof m=="boolean")return m?1:0;const k=Number(m);return Number.isNaN(k)?NaN:k}function u(m,k){return typeof m=="string"||typeof k=="string"?String(m)+String(k):a(m)+a(k)}function d(m,k){return a(m)-a(k)}function E(m,k){return a(m)*a(k)}function v(m,k){return a(m)/a(k)}function b(m,k){return a(m)%a(k)}function w(m,k,f){if(typeof k=="number"&&typeof f=="number")switch(m){case">":return k>f;case"<":return k<f;case">=":return k>=f;case"<=":return k<=f;default:return!1}const g=String(k),T=String(f);switch(m){case">":return g>T;case"<":return g<T;case">=":return g>=T;case"<=":return g<=T;default:return!1}}function p(){const m=C(),k=r();if(k&&k.value==="?"){i("?");const f=o();i(":");const g=o();return m?f:g}return m}function C(){let m=l();for(;;){const k=r();if(!k||k.value!=="||")break;i("OP");const f=l();m=m||f}return m}function l(){let m=A();for(;;){const k=r();if(!k||k.value!=="&&")break;i("OP");const f=A();m=m&&f}return m}function A(){let m=S();for(;;){const k=r();if(!k||!["==","!=","===","!=="].includes(k.value))break;const f=i("OP").value,g=S();switch(f){case"==":m=m==g;break;case"!=":m=m!=g;break;case"===":m=m===g;break;case"!==":m=m!==g;break}}return m}function S(){let m=y();for(;;){const k=r();if(!k||![">","<",">=","<="].includes(k.value))break;const f=i("OP").value,g=y();switch(f){case">":m=w(">",m,g);break;case"<":m=w("<",m,g);break;case">=":m=w(">=",m,g);break;case"<=":m=w("<=",m,g);break}}return m}function y(){let m=h();for(;;){const k=r();if(!k||k.value!=="+"&&k.value!=="-")break;const f=i("OP").value,g=h();m=f==="+"?u(m,g):d(m,g)}return m}function h(){let m=_();for(;;){const k=r();if(!k||k.value!=="*"&&k.value!=="/"&&k.value!=="%")break;const f=i("OP").value,g=_();switch(f){case"*":m=E(m,g);break;case"/":m=v(m,g);break;case"%":m=b(m,g);break}}return m}function _(){const m=r();if(m&&m.value==="!")return i("OP"),!_();if(m&&m.value==="-"){i("OP");const k=_();return d(0,k)}return L()}function L(){const m=r();if(m){if(m.type==="NUMBER")return i("NUMBER"),Number(m.value);if(m.type==="STRING")return i("STRING"),m.value.slice(1,-1);if(m.type==="IDENT")return i("IDENT"),m.value==="true"?!0:m.value==="false"?!1:m.value==="null"?null:void 0;if(m.value==="["){i("PUNC");const k=[];for(;;){const f=r();if(!f||f.value==="]")break;k.push(o());const g=r();g&&g.value===","&&i("PUNC")}return i("PUNC"),k}if(m.value==="("){i("PUNC");const k=o();return i("PUNC"),k}throw new Error("Unexpected token in expression")}}return o()}static tokenize(n){const t=[],s=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let r;for(;(r=s.exec(n))!==null;){const i=r[1];i&&(/^\d/.test(i)?t.push({type:"NUMBER",value:i}):/^"/.test(i)||/^'/.test(i)?t.push({type:"STRING",value:i}):/^[a-zA-Z_]/.test(i)?t.push({type:"IDENT",value:i}):/^[()?:,[\]]$/.test(i)?t.push({type:"PUNC",value:i}):t.push({type:"OP",value:i}))}return t}static evaluateSimpleValue(n,t){if(n==="true")return!0;if(n==="false")return!1;if(!isNaN(Number(n)))return Number(n);if(n.startsWith("ctx.")){const s=n.slice(4);return c.getNestedValue(t,s)}return n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'")?n.slice(1,-1):n}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class Z{static cleanupFunctions=new WeakMap;static addListener(n,t,s,r){n.addEventListener(t,s,r);const o={event:t,handler:s,wrapper:s,options:r,cleanup:()=>n.removeEventListener(t,s,r),addedAt:Date.now()};this.cleanupFunctions.has(n)||this.cleanupFunctions.set(n,[]);const a=this.cleanupFunctions.get(n);a.push(o),a.__metaList=a}static removeListener(n,t,s,r){n.removeEventListener(t,s,r);const i=this.cleanupFunctions.get(n);if(i)for(let o=0;o<i.length;o++){const a=i[o];if(a.event===t&&a.handler===s){i.splice(o,1),i.length===0&&this.cleanupFunctions.delete(n);return}}}static cleanup(n){const t=this.cleanupFunctions.get(n);t&&(t.forEach(s=>{try{s.cleanup()}catch{}}),this.cleanupFunctions.delete(n))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(n){const t=this.cleanupFunctions.get(n);return!!(t&&t.length>0)}static getListenerCount(n){const t=this.cleanupFunctions.get(n);return t?t.length:0}static getListenerInfo(n){const t=this.cleanupFunctions.get(n);return t?t.map(s=>({event:s.event,handler:s.handler,wrapper:s.wrapper,options:s.options})):[]}}function ke(e,n){return Array.isArray(e)&&Array.isArray(n)?JSON.stringify([...e].sort())!==JSON.stringify([...n].sort()):e!==n}function Be(e,n,t,s,r){if(e){const i=n.value;if(r&&typeof i=="object"&&i!==null){const o={...i};o[r]=t,n.value=o}else n.value=t}else{const i=s._state||s;c.setNestedValue(i,n,t)}}function Te(e,n,t,s){if(typeof e._requestRender=="function"&&e._requestRender(),typeof e._triggerWatchers=="function"){const r=n?"reactiveState":t;e._triggerWatchers(r,s)}}function lt(e,n,t){const s=`update:${c.toKebab(n)}`,r=`update:${n}`,i=new CustomEvent(s,{detail:t,bubbles:!0,cancelable:!0}),o=new CustomEvent(r,{detail:t,bubbles:!0,cancelable:!0});e.dispatchEvent(i),e.dispatchEvent(o)}function De(e,n,t,s){const r=t;if(c.safe(()=>{if(typeof e.setAttribute=="function")try{e[n]=r}catch{}else e[n]=r}),r==null||typeof r=="string"||typeof r=="number"||typeof r=="boolean"){const i=c.safeSerializeAttr(r);i!==null?c.safe(()=>{typeof e.setAttribute=="function"&&c.setAttributeSmart(e,c.toKebab(n),String(i))}):c.safe(()=>{typeof e.removeAttribute=="function"&&c.removeAttributeSmart(e,c.toKebab(n))})}}function ft(e,n,t,s){if(e){const r=n.value;return s&&typeof r=="object"&&r!==null?r[s]:r}else{const r=t._state||t;return c.getNestedValue(r,n)}}function ae(e){return e?e.split(/\s+/).filter(Boolean):[]}function ce(e,n){if(n.length===0)return;const t=n.filter(s=>s&&!e.classList.contains(s));t.length>0&&e.classList.add(...t)}function oe(e,n){if(n.length===0)return;const t=n.filter(Boolean);t.length>0&&e.classList.remove(...t)}let Re=!1;async function ut(e,n,t=10){if(!Re){if(!e.isConnected){j.devWarn("⚠️ Element not connected to DOM, skipping style wait");return}for(let s=0;s<t;s++){const r=window.getComputedStyle(e),i=r.transform&&r.transform!=="",o=r.opacity&&r.opacity!=="";if(i||o){Re=!0;return}await new Promise(a=>requestAnimationFrame(()=>a(void 0)))}Re=!0,j.devWarn("⚠️ Styles did not load in time for transition, continuing anyway")}}function dt(e){const n=window.getComputedStyle(e),t=n.transitionDuration||"0s",s=n.transitionDelay||"0s",r=i=>{const o=parseFloat(i);return i.includes("ms")?o:o*1e3};return r(t)+r(s)}function qe(e,n){return new Promise(t=>{const s=n??dt(e);if(s<=0){t();return}let r=!1;const i=()=>{r||(r=!0,e.removeEventListener("transitionend",o),e.removeEventListener("transitioncancel",o),t())},o=()=>i();e.addEventListener("transitionend",o),e.addEventListener("transitioncancel",o),setTimeout(i,s+50)})}async function me(e,n){const{classes:t,hooks:s,css:r,duration:i}=n;if(s?.onBeforeEnter)try{s.onBeforeEnter(e)}catch(p){j.devError("Transition onBeforeEnter error:",p)}if(!r)return s?.onEnter?new Promise(p=>{const C=s.onEnter;typeof C=="function"?C(e,()=>{if(s?.onAfterEnter)try{s.onAfterEnter(e)}catch(l){j.devError("Transition onAfterEnter error:",l)}p()}):p()}):void 0;const o=ae(t?.enterFrom),a=ae(t?.enterActive),u=ae(t?.enterTo);ce(e,o),e.offsetHeight,ce(e,a),e.offsetHeight;let d;if(s?.onEnter){const p=new Promise(C=>{d=C});try{const C=s.onEnter;typeof C=="function"&&C(e,()=>{d&&d()})}catch(C){j.devError("Transition onEnter error:",C)}d&&await p}await new Promise(p=>requestAnimationFrame(()=>p(void 0))),e.offsetHeight;const E=window.getComputedStyle(e),v=E.transform,b=E.opacity;oe(e,o),v&&v!=="none"&&(e.style.transform=v),b&&b!==""&&(e.style.opacity=b),e.offsetHeight,await new Promise(p=>requestAnimationFrame(()=>p(void 0))),e.style.transform="",e.style.opacity="",ce(e,u),e.offsetHeight,await new Promise(p=>requestAnimationFrame(()=>p(void 0)));let w;if(typeof i=="number"?w=i:i&&typeof i=="object"&&"enter"in i&&(w=i.enter),await qe(e,w),oe(e,a),s?.onAfterEnter)try{s.onAfterEnter(e)}catch(p){j.devError("Transition onAfterEnter error:",p)}}async function Oe(e,n){const{classes:t,hooks:s,css:r,duration:i}=n;if(s?.onBeforeLeave)try{s.onBeforeLeave(e)}catch(v){j.devError("Transition onBeforeLeave error:",v)}if(!r)return s?.onLeave?new Promise(v=>{const b=s.onLeave;typeof b=="function"?b(e,()=>{if(s?.onAfterLeave)try{s.onAfterLeave(e)}catch(w){j.devError("Transition onAfterLeave error:",w)}v()}):v()}):void 0;const o=ae(t?.leaveFrom),a=ae(t?.leaveActive),u=ae(t?.leaveTo);ce(e,o),e.offsetHeight,ce(e,a);let d;if(s?.onLeave){const v=new Promise(b=>{d=b});try{const b=s.onLeave;typeof b=="function"&&b(e,()=>{d&&d()})}catch(b){j.devError("Transition onLeave error:",b)}d&&await v}await new Promise(v=>requestAnimationFrame(()=>v(void 0))),await ut(e,[...o,...a]),oe(e,o),ce(e,u);let E;if(typeof i=="number"?E=i:i&&typeof i=="object"&&"leave"in i&&(E=i.leave),await qe(e,E),oe(e,a),oe(e,u),oe(e,o),s?.onAfterLeave)try{s.onAfterLeave(e)}catch(v){j.devError("Transition onAfterLeave error:",v)}}const Ge=new WeakMap,Ze=new WeakMap;function we(e){if(!e)return;const n=Ge.get(e);if(n!==void 0)return n;try{const t=e;if(t&&t.key!=null)return String(t.key)}catch{}if(e instanceof Element){const t=e.getAttribute("data-anchor-key");if(t)return t}}function V(e,n){try{Ge.set(e,n)}catch{}try{e.key=n}catch{}try{if(e instanceof Element){const t=c.safeSerializeAttr(n);t!==null&&c.setAttributeSmart(e,"data-anchor-key",t)}}catch{}}function pt(e){if(!e)return;const n=Ze.get(e);if(n!==void 0)return n;try{const t=e;if(t&&t._transitionGroup!=null)return t._transitionGroup}catch{}}function ht(e,n){try{Ze.set(e,n)}catch{}try{e._transitionGroup=n}catch{}}function le(e){return e!==null&&typeof e=="object"&&"value"in e}function $e(e){try{if(c.isReactiveState(e))return e.value}catch{}try{if(le(e))return e.value}catch{}return e}function X(e,n,t){try{e&&e.attrs&&(e.attrs[n]=t)}catch{}}function q(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function fe(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?c.isReactiveState(e)||"value"in e?!!e.value:!1:!!e}function ie(e,n){if(!n||!(e instanceof Element))return;Z.cleanup(e);for(const s in n)n[s]===e&&delete n[s];const t=e.childNodes;for(let s=0;s<t.length;s++)ie(t[s],n)}function ge(e,n,t){if(typeof e=="string")return;const s=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),r=e.props?.ref??(e.props?.props&&e.props.props.ref);if(s)try{if(c.isReactiveState(s)||typeof s=="object"&&"value"in s)s.value=n;else if(typeof s=="function")s(n);else if(typeof s=="string"&&t)try{const i=String(s);t[i]=n}catch{}}catch{}else if(r&&t)try{const i=String(r);t[i]=n}catch{}}function yt(e,n,t,s,r,i,o,a){if(!i)return;const u=n.includes("lazy"),d=n.includes("trim"),E=n.includes("number"),v=()=>{if(c.isReactiveState(e)){const h=e.value;return a&&o&&(o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement)&&typeof h=="object"&&h!==null?h[a]:h}const y=i?._state||i;return c.getNestedValue(y,e)},b=v();let w="text";o instanceof HTMLInputElement?w=s?.type||o.type||"text":o instanceof HTMLSelectElement?w="select":o instanceof HTMLTextAreaElement&&(w="textarea");const p=o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement,l=p?w==="checkbox"||w==="radio"?"checked":"value":a??"modelValue";if(w==="checkbox")if(Array.isArray(b))t[l]=b.includes(String(o?.getAttribute("value")??s?.value??""));else{const y=o?.getAttribute("true-value")??!0;t[l]=b===y}else if(w==="radio")t[l]=b===(s?.value??"");else if(w==="select")if(o&&o.hasAttribute("multiple")&&o instanceof HTMLSelectElement){const y=Array.isArray(b)?b.map(String):[];setTimeout(()=>{Array.from(o.options).forEach(h=>{h.selected=y.includes(h.value)})},0),t[l]=Array.isArray(b)?b:[]}else t[l]=b;else{!p&&c.isReactiveState(e)?t[l]=e:t[l]=b;try{const y=c.toKebab(l);s&&(s[y]=b)}catch{}}const A=u||w==="checkbox"||w==="radio"||w==="select"?"change":"input",S=y=>{if(y.isComposing||r._isComposing)return;const h=globalThis.process,_=!!h&&h.env?.NODE_ENV==="test"||typeof window<"u"&&globalThis.__vitest__;if(y.isTrusted===!1&&!_)return;const L=y.target;if(!L||L._modelUpdating)return;let N=L.value;if(w==="checkbox"){const f=v();if(Array.isArray(f)){const g=L.getAttribute("value")??"",T=Array.from(f);if(L.checked)T.includes(g)||T.push(g);else{const R=T.indexOf(g);R>-1&&T.splice(R,1)}N=T}else{const g=L.getAttribute("true-value")??!0,T=L.getAttribute("false-value")??!1;N=L.checked?g:T}}else if(w==="radio")N=L.getAttribute("value")??L.value;else if(w==="select"&&L.multiple)N=Array.from(L.selectedOptions).map(f=>f.value);else if(d&&typeof N=="string"&&(N=N.trim()),E){const f=Number(N);isNaN(f)||(N=f)}const m=v();if(ke(N,m)){L._modelUpdating=!0;try{Be(c.isReactiveState(e),e,N,i,a),Te(i,c.isReactiveState(e),e,N),L&&lt(L,l,N)}finally{setTimeout(()=>L._modelUpdating=!1,0)}}};if(p){if(r[A]){const y=r[A];o&&Z.removeListener(o,A,y)}r[A]=S}else{const y=`update:${c.toKebab(l)}`,h=`update:${l}`;if(r[y]){const _=r[y];o&&Z.removeListener(o,y,_)}if(r[h]){const _=r[h];o&&Z.removeListener(o,h,_)}if(r[y]=_=>{const L=_.detail;let N=L!==void 0?L:void 0;if(N===void 0){const f=_.target;if(f&&typeof f=="object"&&"value"in f)try{N=f.value}catch{N=void 0}}const m=ft(c.isReactiveState(e),e,i,a);if(ke(N,m)){Be(c.isReactiveState(e),e,N,i,a),Te(i,c.isReactiveState(e),e,N);const f=_.target;f&&De(f,l,c.isReactiveState(e)?e:N,c.isReactiveState(e))}},c.isReactiveState(e)&&typeof e.value=="object"&&e.value!==null){let _=[];try{_=Reflect.ownKeys(e.value)}catch{_=Object.keys(e.value)}const L=_.filter(N=>typeof N=="string"&&!String(N).startsWith("_")&&N!=="constructor");for(const N of L){const m=String(N),k=`update:${c.toKebab(m)}`,f=`update:${m}`;r[k]||(r[k]=g=>{const T=g.detail!==void 0?g.detail:g.target?.value,R=c.isReactiveState(e)?e.value[m]:c.getNestedValue(i?._state||i,e);if(!ke(T,R))return;if(c.isReactiveState(e)){const I={...e.value};I[m]=T,e.value=I}else c.setNestedValue(i?._state||i,e,T);Te(i,c.isReactiveState(e),e,T);const P=g.currentTarget||o||g.target;P&&De(P,l,c.isReactiveState(e)?e:T,c.isReactiveState(e))},r[f]=r[k])}}r[h]=r[y]}(w==="text"||w==="textarea")&&(r.compositionstart=()=>r._isComposing=!0,r.compositionend=y=>{r._isComposing=!1;const h=y.target;h&&setTimeout(()=>{const _=h.value,L=i?._state||i,N=c.getNestedValue(L,e);let m=_;if(d&&(m=m.trim()),E){const f=Number(m);isNaN(f)||(m=f)}if(ke(m,N)){h._modelUpdating=!0;try{c.setNestedValue(L,e,m),Te(i,c.isReactiveState(e),e,m)}finally{setTimeout(()=>h._modelUpdating=!1,0)}}},0)})}function Je(e){const n=e.slice(2);return n?n.charAt(0).toLowerCase()+n.slice(1):""}function mt(e,n,t,s,r){if(typeof e=="object"&&e!==null)for(const[i,o]of Object.entries(e))if(i.startsWith("data-")||i.startsWith("aria-")||i==="class")t[i]=o;else if(i==="disabled"&&r&&q(r)){const a=o&&typeof o=="object"&&"value"in o;(()=>{try{return c.isReactiveState(o)}catch{return!1}})()||a?n[i]=o:t[i]=o}else n[i]=o;else if(typeof e=="string"){if(!s)return;try{const i=Ce(e,s);if(typeof i=="object"&&i!==null){for(const[o,a]of Object.entries(i))if(o.startsWith("data-")||o.startsWith("aria-")||o==="class")t[o]=a;else if(o==="disabled"&&r&&q(r)){const u=a&&typeof a=="object"&&"value"in a;(()=>{try{return c.isReactiveState(a)}catch{return!1}})()||u?n[o]=a:t[o]=a}else n[o]=a;return}else{t[e]=i;return}}catch{const i=c.getNestedValue(s,e);t[e]=i}}}function gt(e,n,t){let s;if(typeof e=="string"){if(!t)return;s=Ce(e,t)}else s=e;const r=String(n.style||"");let i=r;if(s){if(r){const o=String(r).split(";").map(u=>u.trim()).filter(Boolean),a=o.findIndex(u=>u.startsWith("display:"));a>=0&&o[a]==="display: none"&&(o.splice(a,1),i=o.length>0?o.join("; ")+";":"")}}else if(r){const o=String(r).split(";").filter(Boolean),a=o.findIndex(u=>u.trim().startsWith("display:"));a>=0?o[a]="display: none":o.push("display: none"),i=o.join("; ")}else i="display: none";i!==r&&(i?n.style=i:n.style=void 0)}function Ce(e,n){return ct.evaluate(e,n)}function bt(e,n,t,s){let r;if(typeof e=="string"){if(!t)return;r=Ce(e,t)}else r=e;try{if(r&&typeof r=="object"){if(c.isReactiveState(r))r=r.value;else if("value"in r&&typeof r.value<"u"){const d=r.value;d instanceof Node||(r=d)}}}catch{}let i=[];if(typeof r=="string")i=[r];else if(Array.isArray(r))i=r.filter(Boolean);else if(typeof r=="object"&&r!==null)for(const[d,E]of Object.entries(r))E&&i.push(d);const o=i.join(" "),a=s&&s.class||n.class||"",u=a?`${a} ${o}`.trim():o.trim();u?n.class=u:n.class=void 0}function je(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 t=e.value,s=typeof t;return s==="boolean"?!0:s==="string"?t===""||t==="true"||t==="false":!1}}catch{}return!1}function St(e,n,t){let s;if(typeof e=="string"){if(!t)return;s=Ce(e,t)}else s=e;let r="";if(typeof s=="string")r=s;else if(s&&typeof s=="object"){const o=[];for(const[a,u]of Object.entries(s))if(u!=null&&u!==""){const d=a.replace(/[A-Z]/g,b=>`-${b.toLowerCase()}`),E=["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 v=String(u);typeof u=="number"&&E.includes(d)&&(v=`${u}px`),o.push(`${d}: ${v}`)}r=o.join("; ")+(o.length>0?";":"")}const i=String(n.style||"");n.style=i+(i&&!i.endsWith(";")?"; ":"")+r}function vt(e,n,t){let s=e;typeof e=="string"&&t&&(s=Ce(e,t)),c.isReactiveState(s)?n.reactiveRef=s:n.ref=s}function Ye(e,n,t,s){const r={},i={...s||{}},o={};for(const[a,u]of Object.entries(e)){const{value:d,modifiers:E,arg:v}=u;if(a==="model"||a.startsWith("model:")){const b=a.split(":"),w=b.length>1?b[1]:v;yt(d,E,r,i,o,n,t,w);continue}switch(a){case"bind":mt(d,r,i,n,t);break;case"show":gt(d,i,n);break;case"class":bt(d,i,n,s);break;case"style":St(d,i,n);break;case"ref":vt(d,r,n);break}}try{if(Object.prototype.hasOwnProperty.call(r,"disabled")&&t&&q(t)){const u=r.disabled,d=u&&typeof u=="object"&&"value"in u;let E=!1;try{E=c.isReactiveState(u)}catch{E=!1}if(!d&&!E)try{i.disabled=u,delete r.disabled;const v=globalThis;v.__VDOM_DISABLED_PROMOTIONS||(v.__VDOM_DISABLED_PROMOTIONS=[]),v.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:u,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:r,attrs:i,listeners:o}}function He(e,n){if(Array.isArray(e)){const i=new Set;return e.map(o=>{if(!o||typeof o!="object")return o;let a=o.props?.key??o.key;if(!a){const v=o.tag||"node",w=[o.props?.attrs?.id,o.props?.attrs?.name,o.props?.attrs?.["data-key"],o.props?.props?.id,o.props?.props?.name,o.props?.props?.dataKey,o.props?.props?.["data-key"]].find(p=>p!=null)??"";a=w?`${n}:${v}:${w}`:`${n}:${v}`}let u=a,d=1;for(;i.has(u);)u=`${a}#${d++}`;i.add(u);let E=o.children;return Array.isArray(E)&&(E=He(E,u)),{...o,key:u,children:E}})}const t=e,s=t.props?.key??t.key??n;let r=t.children;return Array.isArray(r)&&(r=He(r,s)),{...t,key:s,children:r}}function ze(e,n,t,s){const r=t.directives??{},i=Ye(r,s,e,t.attrs),o={...n.props||{},...t.props||{},...i.props||{}},a={...n.attrs||{},...t.attrs||{},...i.attrs||{}},u=n.props??{},d=o,E=!!(t?.isCustomElement??n?.isCustomElement??!1);let v=!1;for(const p in{...u,...d}){const C=u[p],l=d[p];let A=C,S=l;if(c.safe(()=>{(c.isReactiveState(C)||le(C))&&(A=C.value)}),c.safe(()=>{(c.isReactiveState(l)||le(l))&&(S=l.value)}),!(C===l&&A===S))if(v=!0,p==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const y=$e(l),h=y==null?"":String(y);e.value!==h&&(e.value=h)}else if(p==="checked"&&e instanceof HTMLInputElement){const y=$e(l);e.checked=!!y}else if(p.startsWith("on")&&typeof l=="function"){const y=Je(p);typeof C=="function"&&Z.removeListener(e,y,C),typeof l=="function"&&Z.addListener(e,y,l);try{if(y&&y.startsWith("update:")){const h=y.split(":",2)[1],_=d[h];let L=[];try{if(c.isReactiveState(_)){const m=_.value;L=m&&typeof m=="object"?Object.keys(m):[]}else _&&typeof _=="object"&&(L=Object.keys(_))}catch{L=[]}const N=L.filter(m=>typeof m=="string"&&!m.startsWith("_")&&m!=="constructor");for(const m of N){const k=`update:${m}`,f=g=>{const T=g.detail!==void 0?g.detail:g.target instanceof HTMLInputElement||g.target instanceof HTMLTextAreaElement||g.target instanceof HTMLSelectElement?g.target.value:void 0,O={...c.isReactiveState(_)?_.value||{}:d[h]||{},[m]:T};try{typeof l=="function"&&l({detail:O})}catch{}};c.safe(()=>{Z.addListener(e,k,f)})}}}catch{}}else if(l==null)c.removeAttributeSmart(e,p);else{const y=t?.isCustomElement??n?.isCustomElement??!1;if(y||p in e)try{e[p]=l,p==="disabled"&&l===!1&&!y&&q(e)&&c.removeAttributeSmart(e,"disabled")}catch{}else l===!1&&c.removeAttributeSmart(e,p)}}for(const[p,C]of Object.entries(i.listeners||{})){Z.addListener(e,p,C);try{const l=e&&e.parentElement;l&&l!==e&&Z.addListener(l,p,C)}catch{}}const b={...n.attrs??{}},w=a;try{const p=i&&i.attrs||{};if(Object.prototype.hasOwnProperty.call(p,"class")&&p.class===void 0&&typeof e.getAttribute=="function"){const C=e.getAttribute("class");C!==null&&(b.class=C)}if(Object.prototype.hasOwnProperty.call(p,"style")&&p.style===void 0&&typeof e.getAttribute=="function"){const C=e.getAttribute("style");C!==null&&(b.style=C)}try{if(typeof e.getAttribute=="function"){const C=e.getAttribute("class");try{e instanceof HTMLInputElement&&e.type==="text"&&C!==null&&C!==b.class&&(b.class=C)}catch{}}}catch{}}catch{}for(const p in{...b,...w}){const C=b[p],l=w[p];let A=C,S=l;if(c.isReactiveState(C)&&(A=C.value),c.isReactiveState(l)&&(S=l.value),A!==S)if(v=!0,S==null||S===!1)c.safe(()=>{c.removeAttributeSmart(e,p)}),X(n,p,void 0),p==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?c.safe(()=>{e.value=""}):e instanceof HTMLSelectElement?c.safe(()=>{e.value=""}):e instanceof HTMLProgressElement&&c.safe(()=>{e.value=0})),p==="checked"&&e instanceof HTMLInputElement&&c.safe(()=>{e.checked=!1}),p==="disabled"&&q(e)&&c.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=!1)});else{if(p==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){c.safe(()=>{e.value=S??""});continue}else if(e instanceof HTMLSelectElement){c.safe(()=>{e.value=S??""});continue}else if(e instanceof HTMLProgressElement){c.safe(()=>{e.value=Number(S)});continue}}if(p==="checked"&&e instanceof HTMLInputElement){c.safe(()=>{e.checked=!!S});continue}if(p==="style"){const h=c.safeSerializeAttr(S);h!==null&&c.setAttributeSmart(e,p,String(h)),X(n,p,S);continue}if(p==="class"){const h=c.safeSerializeAttr(S);h!==null&&c.setAttributeSmart(e,p,String(h)),X(n,p,S);continue}if(p==="disabled"&&q(e)){c.safe(()=>{const h=fe(S);(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=h)}),fe(S)?c.safe(()=>{c.setAttributeSmart(e,p,"")}):c.safe(()=>{c.removeAttributeSmart(e,p)});continue}const y=e.namespaceURI==="http://www.w3.org/2000/svg";if(E&&!y&&p.includes("-"))if(c.isClassLikeAttr(p)){const h=c.safeSerializeAttr(l??S);if(h!==null){try{c.setAttributeSmart(e,p,String(h))}catch{}X(n,p,S)}}else{const h=c.toCamel(p);try{const _=e;_[h]=c.isReactiveState(l)?l:S,X(n,p,S)}catch{const _=c.safeSerializeAttr(l??S);_!==null&&c.setAttributeSmart(e,p,String(_))}}else if(!y&&p in e)try{const h=e;h[p]=c.isReactiveState(l)?l:S,X(n,p,S)}catch{const h=c.safeSerializeAttr(S);h!==null&&(c.setAttributeSmart(e,p,String(h)),X(n,p,S))}else{const h=c.safeSerializeAttr(S);h!==null&&(c.setAttributeSmart(e,p,String(h)),X(n,p,S))}}}try{if(q(e)){const p=o.disabled;let C;try{const A=Object.prototype.hasOwnProperty.call(i.props||{},"disabled"),S=p&&typeof p=="object"&&"value"in p;let y=!1;c.safe(()=>{y=!!c.isReactiveState(p)});const h=je(p);y||S||A||h?C=p:C=a.disabled}catch{C=a.disabled}const l=fe(C);c.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=l)}),l?c.safe(()=>{c.setAttributeSmart(e,"disabled","")}):c.safe(()=>{c.removeAttributeSmart(e,"disabled")})}}catch{}if(E&&v){const p=e;c.safe(()=>{p._applyProps?.(p._cfg)}),c.safe(()=>{typeof p.requestRender=="function"?p.requestRender():typeof p._render=="function"&&p._render?.(p._cfg)})}}function U(e,n,t,s=null){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const l=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&V(l,e.key),l}if(e.tag==="#raw"){const l=typeof e.children=="string"?e.children:"";return document.createRange().createContextualFragment(l)}if(e.tag==="#anchor"){const l=e,A=Array.isArray(l.children)?l.children:[],S=document.createTextNode(""),y=document.createTextNode("");l.key!=null&&(V(S,`${l.key}:start`),V(y,`${l.key}:end`)),l._startNode=S,l._endNode=y;const h=document.createDocumentFragment();h.appendChild(S);for(const _ of A){const L=U(_,n,t,s);if(l.key!=null&&L instanceof Element&&!L.hasAttribute("data-anchor-key")){const N=_;N&&typeof N=="object"&&N.key!=null||V(L,String(l.key))}h.appendChild(L)}return h.appendChild(y),h}const r=e&&typeof e=="object"&&e.props&&e.props.attrs?e.props.attrs:void 0,o=(r&&typeof r.xmlns=="string"?String(r.xmlns):void 0)??s??c.TAG_NAMESPACE_MAP[e.tag]??null,a=o?document.createElementNS(o,e.tag):document.createElement(e.tag);e.key!=null&&V(a,e.key),e.props&&e.props?._transitionGroup&&ht(a,e.props?._transitionGroup);const{props:u={},attrs:d={},directives:E={}}=e.props??{},v=Ye(E,n,a instanceof HTMLElement?a:void 0,d),b={...u,...v.props},w={...d,...v.attrs};try{const l=(w&&w.class)??(b&&b.class)??(e.props&&e.props.attrs&&e.props.attrs.class)??(e.props&&e.props.props&&e.props.props.class),A=c.safeSerializeAttr(l);if(A!==null){const S=String(A).trim();S&&c.setAttributeSmart(a,"class",S)}}catch{}try{if(b.disabled!==void 0&&a&&q(a)){const l=b.disabled,A=l&&typeof l=="object"&&"value"in l;let S=!1;try{S=c.isReactiveState(l)}catch{S=!1}!A&&!S&&c.safe(()=>{w.disabled=l,delete b.disabled})}}catch{}const p=a.namespaceURI==="http://www.w3.org/2000/svg";for(const l in w){const A=w[l];if(typeof l!="string"||/\[object Object\]/.test(l))continue;const S=$e(A);if(typeof S=="boolean")S?c.setAttributeSmart(a,l,""):c.safe(()=>{c.removeAttributeSmart(a,l)});else if(S!=null){if(l==="disabled"&&q(a)){const y=b.disabled,h=je(y)?y:S,_=fe(h);c.safe(()=>{a.disabled=_}),_?c.safe(()=>{c.setAttributeSmart(a,l,"")}):c.safe(()=>{c.removeAttributeSmart(a,l)});continue}if(!p&&l==="value"&&(a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLProgressElement))try{a instanceof HTMLProgressElement?a.value=Number(S):a.value=String(S??"")}catch{const y=c.safeSerializeAttr(S);y!==null&&c.setAttributeSmart(a,l,String(y))}else if(!p&&l==="checked"&&a instanceof HTMLInputElement)try{a.checked=!!S}catch{const y=c.safeSerializeAttr(S);y!==null&&c.setAttributeSmart(a,l,String(y))}else if(!p&&l in a)try{a[l]=S,l==="disabled"&&S===!1&&q(a)&&c.removeAttributeSmart(a,"disabled"),X(e.props,l,S)}catch{const y=c.safeSerializeAttr(S);y!==null&&c.setAttributeSmart(a,l,String(y))}else if((e.props?.isCustomElement??!1)&&!p&&l.includes("-")){const h=c.toCamel(l);try{a[h]=S}catch{const _=c.safeSerializeAttr(S);_!==null&&c.setAttributeSmart(a,l,String(_))}}else{const h=c.safeSerializeAttr(S);h!==null&&c.setAttributeSmart(a,l,String(h))}}}for(const l in b){const A=b[l];if(!(typeof l!="string"||/\[object Object\]/.test(l)))if(l==="value"&&(a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement)){const S=typeof A=="object"&&A!==null&&le(A)?A.value:A;c.safe(()=>{a.value=String(S??"")})}else if(l.startsWith("on")&&typeof A=="function"){const S=Je(l),y=S.includes(":")?(()=>{const h=S.split(":"),_=h[1];if(_.includes("-")){const L=_.split("-").map((N,m)=>m===0?N:N.charAt(0).toUpperCase()+N.slice(1)).join("");return`${h[0]}:${L}`}else{const L=_.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${h[0]}:${L}`}})():S;v.listeners&&(v.listeners[S]||v.listeners[y])||Z.addListener(a,S,A)}else{if(l.startsWith("on")&&A===void 0)continue;if(A==null||A===!1)c.removeAttributeSmart(a,l);else{const S=e.props?.isCustomElement??!1,y=typeof A=="object"&&A!==null&&c.isReactiveState(A)?A:le(A)&&typeof A.value<"u"?A.value:A;if(l==="class"||l==="style"){try{const h=c.safeSerializeAttr(y);h!==null&&c.setAttributeSmart(a,l,String(h))}catch{}continue}if(S||l in a)try{const h=typeof A=="object"&&A!==null&&c.isReactiveState(A)?A:le(A)?A.value:A;if(l==="disabled"&&q(a)){const _=b.disabled!==void 0?b.disabled:h,L=fe(_);c.safe(()=>{a.disabled=L}),L?c.safe(()=>{c.setAttributeSmart(a,l,"")}):c.safe(()=>{c.removeAttributeSmart(a,l)});continue}try{if(typeof a[l]=="boolean"){let L=h;typeof h=="string"?h==="false"?L=!1:h==="true"?L=!0:L=!!h&&h!=="":L=!!h,a[l]=L}else a[l]=h}catch{a[l]=h}}catch{}}}}for(const[l,A]of Object.entries(v.listeners||{}))Z.addListener(a,l,A);const C={...e,props:{...e.props,...v.props}};ge(C,a,t);try{const l=a;if(typeof l._applyProps=="function")try{l._applyProps(l._cfg)}catch{}typeof l.requestRender=="function"?l.requestRender():typeof l._render=="function"&&l._render(l._cfg)}catch{}if(Array.isArray(e.children)){const l=e.tag==="foreignObject"&&o===c.SVG_NS?null:a.namespaceURI??null;for(const A of e.children)a.appendChild(U(A,n,t,l))}else typeof e.children=="string"&&(a.textContent=e.children);try{if(a instanceof HTMLSelectElement&&w&&Object.prototype.hasOwnProperty.call(w,"value"))try{a.value=String(w.value??"")}catch{}}catch{}try{if(q(a)){const l=b.disabled,A=w.disabled,S=l&&typeof l=="object"&&"value"in l;let y=!1;try{y=!!c.isReactiveState(l)}catch{y=!1}const _=y||S||je(l)?l:A,L=fe(_);c.safe(()=>{a.disabled=L}),L?c.safe(()=>{c.setAttributeSmart(a,"disabled","")}):c.safe(()=>{c.removeAttributeSmart(a,"disabled")})}}catch{}return a}function Et(e,n,t,s,r){if(typeof t=="string"){e.textContent!==t&&(e.textContent=t);return}if(!Array.isArray(t))return;const i=e.childNodes,o=[];for(let C=0;C<i.length;C++)o.push(i[C]);const a=Array.isArray(n)?n:[],u=pt(e);if(u){const C=y=>{if(typeof y=="string")return y.startsWith("each-")?y.substring(5):y;if(typeof y=="number")return String(y)},l=[],A=[];for(const y of t)if(y&&y.tag==="#anchor"){const h=Array.isArray(y.children)?y.children:[];for(const _ of h){const L=C(_.key??y.key??"unknown");l.push({..._,key:L})}}else y&&l.push({...y,key:C(y.key)});for(const y of a)if(y&&y.tag==="#anchor"){const h=Array.isArray(y.children)?y.children:[];for(const _ of h){const L=C(_.key??y.key??"unknown");A.push({..._,key:L})}}else y&&A.push({...y,key:C(y.key)});if(l.some(y=>y&&y.key!=null)||A.some(y=>y&&y.key!=null)){const y=new Map,h=new Map;for(const f of A)if(f&&f.key!=null){const g=String(f.key);y.set(g,f)}for(let f=0;f<o.length;f++){const g=o[f];let T=we(g);if(T=C(T),T!=null&&g instanceof Element&&g.nodeType===Node.ELEMENT_NODE){let R=typeof T=="string"&&T.includes(":")?T.substring(0,T.lastIndexOf(":")):T;R=String(R),h.set(R,g)}}const _=new Set,L=new Map,N=o.length>0;if(u.moveClass&&N)for(let f=0;f<o.length;f++){const g=o[f];if(g instanceof HTMLElement&&g.parentElement){const T=g.getBoundingClientRect();L.set(g,T)}}const m=[];for(const f of l){let g=f.key;if(g==null)continue;g=String(g);const T=y.get(g);let R=h.get(g);if(R&&T){const O=be(R,T,f,s);_.add(R);const P=String(g);V(O,P),m.push({node:O,key:g,newVNode:f,oldVNode:T,isNew:!1})}else{R=U(f,s,void 0,e instanceof Element?e.namespaceURI??null:null),V(R,String(g)),e.appendChild(R);const O=N||u.appear===!0;R instanceof HTMLElement&&O&&me(R,u).catch(P=>{j.devError("Enter transition error:",P)}),m.push({node:R,key:g,newVNode:f,isNew:!0})}}const k=[];for(let f=0;f<o.length;f++){const g=o[f],T=we(g);if(!_.has(g)&&T!=null&&g instanceof HTMLElement){const O=Oe(g,u).then(()=>{e.contains(g)&&e.removeChild(g)}).catch(P=>{j.devError("Leave transition error:",P),e.contains(g)&&e.removeChild(g)});k.push(O)}}if(k.length===0){let f=e.firstChild;for(const{node:g}of m)g!==f&&e.insertBefore(g,f),f=g.nextSibling;if(u.moveClass&&L.size>0){const g=[];for(const{node:T,isNew:R}of m)if(!R&&T instanceof HTMLElement){const O=L.get(T);if(O){const P=T.getBoundingClientRect(),I=O.left-P.left,M=O.top-P.top;if(I!==0||M!==0){const z=u.moveClass.split(/\s+/).filter(x=>x);g.push({node:T,deltaX:I,deltaY:M,moveClasses:z})}}}if(g.length>0){for(const{node:T,deltaX:R,deltaY:O}of g)T.style.transform=`translate(${R}px, ${O}px)`,T.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:T,moveClasses:R}of g)for(const O of R)T.classList.add(O);requestAnimationFrame(()=>{const T=u.moveClass||"",R=T.match(/duration-(\d+)/),O=R?`${R[1]}ms`:"300ms",P=T.match(/ease-(out|in|in-out|linear)/),I=P?`ease-${P[1]}`:"ease-out";for(const{node:M}of g)M.style.transition=`transform ${O} ${I}`;requestAnimationFrame(()=>{for(const{node:M,moveClasses:z}of g){M.style.removeProperty("transform");const x=()=>{for(const Q of z)M.classList.remove(Q);M.style.removeProperty("transition"),M.removeEventListener("transitionend",x),M.removeEventListener("transitioncancel",x)};M.addEventListener("transitionend",x,{once:!0}),M.addEventListener("transitioncancel",x,{once:!0})}})})})})}}}return}}const d=new Map;for(const C of a)C&&C.key!=null&&d.set(C.key,C);const E=new Map;for(let C=0;C<o.length;C++){const l=o[C],A=we(l);A!=null&&E.set(A,l)}const v=new Set;let b=e.firstChild;function w(C,l){let A=C;for(;A&&(v.add(A),A!==l);)A=A.nextSibling}function p(C,l,A,S,y,h=!0){const _=[];let L=C.nextSibling;for(;L&&L!==l;)_.push(L),L=L.nextSibling;const N=Array.isArray(A)?A:[];if(S.some(k=>k&&k.key!=null)||N.some(k=>k&&k.key!=null)){const k=new Map,f=new Map;for(const O of N)O&&O.key!=null&&k.set(O.key,O);for(const O of _){const P=we(O);P!=null&&f.set(P,O)}const g=y&&y.state==="visible"&&N.length===0&&S.length>0,T=new Set;let R=C.nextSibling;for(const O of S){let P;if(O.key!=null&&f.has(O.key)){const I=k.get(O.key);P=be(f.get(O.key),I,O,s),T.add(P),y&&P instanceof HTMLElement&&g&&y.appear&&me(P,y).catch(M=>{j.devError("Transition enter error (appear):",M)}),P!==R&&e.contains(P)&&e.insertBefore(P,R)}else P=U(O,s,void 0,e instanceof Element?e.namespaceURI??null:null),e.insertBefore(P,R),T.add(P),y&&P instanceof HTMLElement&&h&&me(P,y).catch(I=>{j.devError("Transition enter error:",I)});R=P.nextSibling}for(const O of _)!T.has(O)&&e.contains(O)&&(y&&O instanceof HTMLElement&&h?Oe(O,y).then(()=>{e.contains(O)&&e.removeChild(O)}).catch(P=>{j.devError("Transition leave error:",P),e.contains(O)&&e.removeChild(O)}):e.removeChild(O))}else{const k=Math.min(N.length,S.length);for(let f=0;f<k;f++){const g=N[f],T=S[f],R=be(_[f],g,T,s);R!==_[f]&&(e.insertBefore(R,_[f]),e.removeChild(_[f]))}for(let f=k;f<S.length;f++){const g=U(S[f],s,void 0,e instanceof Element?e.namespaceURI??null:null);e.insertBefore(g,l),y&&g instanceof HTMLElement&&h&&me(g,y).catch(T=>{j.devError("Transition enter error:",T)})}for(let f=k;f<_.length;f++){const g=_[f];y&&g instanceof HTMLElement&&h?Oe(g,y).then(()=>{e.contains(g)&&e.removeChild(g)}).catch(T=>{j.devError("Transition leave error:",T),e.contains(g)&&e.removeChild(g)}):e.removeChild(g)}}}for(const C of t){let l;if(C.tag==="#anchor"){const A=C.key,S=`${A}:start`,y=`${A}:end`;let h=E.get(S),_=E.get(y);const L=Array.isArray(C.children)?C.children:[];if(h||(h=document.createTextNode(""),V(h,S)),_||(_=document.createTextNode(""),V(_,y)),C._startNode=h,C._endNode=_,!e.contains(h)||!e.contains(_)){e.insertBefore(h,b);const N=C._transition,k=!(N&&N.state==="visible"&&L.length>0)||N.appear;for(const f of L){const g=U(f,s,r,e instanceof Element?e.namespaceURI??null:null);e.insertBefore(g,b),N&&g instanceof HTMLElement&&k&&me(g,N).catch(T=>{j.devError("Transition enter error:",T)})}e.insertBefore(_,b)}else{const N=C._transition,k=d.get(A)._transition,f=k&&k.state!==N?.state,g=N&&N.state==="visible"&&L.length>0&&!f,T=f||!g||N?.appear===!0;p(h,_,d.get(A)?.children,L,N,T)}w(h,_),b=_.nextSibling;continue}if(C.key!=null&&E.has(C.key)){const A=d.get(C.key);l=be(E.get(C.key),A,C,s,r),v.add(l),l!==b&&e.contains(l)&&(b&&!e.contains(b)&&(b=null),e.insertBefore(l,b))}else l=U(C,s,r,e instanceof Element?e.namespaceURI??null:null),b&&!e.contains(b)&&(b=null),e.insertBefore(l,b),v.add(l);b=l.nextSibling}for(let C=0;C<o.length;C++){const l=o[C];!v.has(l)&&e.contains(l)&&(ie(l,r),e.removeChild(l))}}function be(e,n,t,s,r){if(n&&typeof n!="string"&&n.props?.ref&&r&&ie(e,r),n===t)return e;if(typeof t=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==t&&(e.textContent=t),e;{const o=document.createTextNode(t);return e.parentNode?.replaceChild(o,e),o}}if(t&&typeof t!="string"&&t.tag==="#anchor"){const o=t,a=Array.isArray(o.children)?o.children:[],u=o._startNode??document.createTextNode(""),d=o._endNode??document.createTextNode("");o.key!=null&&(V(u,`${o.key}:start`),V(d,`${o.key}:end`)),o._startNode=u,o._endNode=d;const E=document.createDocumentFragment();E.appendChild(u);for(const v of a){const b=U(v,s,r,e.parentNode instanceof Element?e.parentNode.namespaceURI??null:null);E.appendChild(b)}return E.appendChild(d),e.parentNode?.replaceChild(E,e),u}if(!t){ie(e,r);const o=document.createComment("removed");return e.parentNode?.replaceChild(o,e),o}if(!n||typeof n=="string"){ie(e,r);const o=U(t,s,r,e.parentNode instanceof Element?e.parentNode.namespaceURI??null:null);return ge(t,o,r),e.parentNode?.replaceChild(o,e),o}if(t.tag==="#anchor"){const o=Array.isArray(t.children)?t.children:[],a=t._startNode??document.createTextNode(""),u=t._endNode??document.createTextNode("");t.key!=null&&(V(a,`${t.key}:start`),V(u,`${t.key}:end`)),t._startNode=a,t._endNode=u;const d=document.createDocumentFragment();d.appendChild(a);for(const E of o)d.appendChild(U(E,s,r,e.parentNode instanceof Element?e.parentNode.namespaceURI??null:null));return d.appendChild(u),e.parentNode?.replaceChild(d,e),a}if(typeof n!="string"&&typeof t!="string"&&n.tag===t.tag&&n.key===t.key){const o=e;return ze(o,n.props||{},t.props||{},s),Et(o,n.children,t.children,s,r),ge(t,o,r),o}if(typeof n!="string"&&typeof t!="string"&&n.tag===t.tag&&(n.tag&&String(n.tag).includes("-")||t.props&&t.props.isCustomElement||n.props&&n.props.isCustomElement))try{const a=e;return ze(a,n.props||{},t.props||{},s),ge(t,a,r),a}catch{}ie(e,r);const i=U(t,s,r,e.parentNode instanceof Element?e.parentNode.namespaceURI??null:null);return ge(t,i,r),e.parentNode?.replaceChild(i,e),i}function Ct(e,n,t,s){let r;Array.isArray(n)?n.length===1?(r=n[0],r&&typeof r=="object"&&r.key==null&&(r={...r,key:"__root__"})):r={tag:"div",key:"__root__",children:n}:(r=n,r&&typeof r=="object"&&r.key==null&&(r={...r,key:"__root__"})),r&&typeof r=="object"&&r.tag==="#anchor"&&(r={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[r]}),r=He(r,String(r.key??"root"));const i=e._prevVNode??null,o=e._prevDom??e.firstChild??null;let a;i&&o?typeof i!="string"&&typeof r!="string"&&i.tag===r.tag&&i.key===r.key?a=be(o,i,r,t,s):(a=U(r,t,s,e.host instanceof Element?e.host.namespaceURI??null:null),e.replaceChild(a,o)):(a=U(r,t,s,e.host instanceof Element?e.host.namespaceURI??null:null),e.firstChild?e.replaceChild(a,e.firstChild):e.appendChild(a));const u=[];for(let d=0;d<e.childNodes.length;d++){const E=e.childNodes[d];E!==a&&E.nodeName!=="STYLE"&&(ie(E,s),u.push(E))}u.forEach(d=>e.removeChild(d)),e._prevVNode=r,e._prevDom=a}const Se=[],Ke=new WeakMap,ve=new WeakMap;function _t(e,n){ve.has(e)||ve.set(e,new Set),ve.get(e).add(n)}function At(e,n){const t=ve.get(e);t&&t.delete(n)}function kt(e,n,t,s,r,i,o,a){if(e){Se.push(t);try{const u=n.render(t);if(u instanceof Promise){i(!0),u.then(d=>{i(!1),o(null),Ve(e,d,t,s,r),a(e.innerHTML)}).catch(d=>{i(!1),o(d)});return}Ve(e,u,t,s,r),a(e.innerHTML)}finally{Se.pop()}}}function Ve(e,n,t,s,r){e&&(Ct(e,Array.isArray(n)?n:[n],t,s),r(e.innerHTML))}function Tt(e,n,t,s,r,i,o){if(i!==null&&clearTimeout(i),Date.now()-n<16){if(r(t+1),t===15)j.devWarn(`⚠️ Component is re-rendering rapidly. This might indicate:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./namespace-helpers-DwMMXN9Q.cjs"),j=require("./logger-CqdBMdui.cjs"),D=require("./transitions-RXe2brRm.cjs");function tt(e,n,t){if(t)for(const[s,r]of Object.entries(t)){let i,o={};if(Array.isArray(r)?(i=r[0],o=r[1]||{}):i=r,n.set(s,{callback:i,options:o,oldValue:c.getNestedValue(e,s)}),o.immediate)try{const a=c.getNestedValue(e,s);i(a,void 0,e)}catch(a){j.devError(`Error in immediate watcher for "${s}":`,a)}}}function nt(e,n,t,s){const r=(o,a)=>{if(o===a)return!0;if(typeof o!=typeof a||typeof o!="object"||o===null||a===null)return!1;if(Array.isArray(o)&&Array.isArray(a))return o.length!==a.length?!1:o.every((b,w)=>r(b,a[w]));const u=o,d=a,E=Object.keys(u||{}),v=Object.keys(d||{});return E.length!==v.length?!1:E.every(b=>r(u[b],d[b]))},i=n.get(t);if(i&&!r(s,i.oldValue))try{i.callback(s,i.oldValue,e),i.oldValue=s}catch(o){j.devError(`Error in watcher for "${t}":`,o)}for(const[o,a]of n.entries())if(a.options.deep&&t.startsWith(o+"."))try{const u=c.getNestedValue(e,o);r(u,a.oldValue)||(a.callback(u,a.oldValue,e),a.oldValue=u)}catch(u){j.devError(`Error in deep watcher for "${o}":`,u)}}function Ne(e,n){return n===Boolean?e===""||e==="true":n===Number?Number(e):e}function rt(e,n,t){if(n)for(const s in n){const r=n[s],i=c.toKebab(s),o=e.getAttribute(i);if(r.type===Function&&typeof e[s]=="function")t[s]=e[s];else if(o!==null)t[s]=Ne(o,r.type);else if(typeof e[s]<"u")try{const a=e[s];if(r.type===String&&a&&typeof a=="object")try{t[s]=Ne(String(a),r.type)}catch{t[s]=a}else r.type===Boolean&&typeof a=="boolean"||r.type===Number&&typeof a=="number"||r.type===Function&&typeof a=="function"?t[s]=a:t[s]=Ne(String(a),r.type)}catch{t[s]=e[s]}else"default"in r&&r.default!==void 0&&(t[s]=r.default)}}function st(e,n,t){if(!n.props){try{const s=t?._hookCallbacks?.props||{},r=Array.from(new Set([...Object.keys(e||{}),...Object.keys(s||{})]));for(const i of r){if(typeof i!="string"||i.startsWith("_"))continue;const o=Object.getOwnPropertyDescriptor(t,i);if(!(!Object.prototype.hasOwnProperty.call(s,i)&&o&&(o.get||o.set||!o.configurable)))try{Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get(){try{const u=c.toKebab(i),d=e.getAttribute(u);if(d!==null)return d;const E=e[i];let v;return c.isReactiveState(E)||E&&typeof E=="object"&&"value"in E&&!(E instanceof Node)?v=E.value:v=E,v}catch{return e[i]}}})}catch{}}}catch{}return}rt(e,n.props,t)}function it(e,n,t,s){e.onConnected&&!t&&(e.onConnected(n),s(!0))}function ot(e,n,t,s,r,i,o,a){e.onDisconnected&&e.onDisconnected(n),t.forEach(u=>u()),s(),r(),i(!1),o(null),a(!1)}function at(e,n,t,s,r){e.onAttributeChanged&&e.onAttributeChanged(n,t,s,r)}class ct{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(n,t){const s=this.cache.get(n);if(s){if(!s.isSecure){j.devWarn("Blocked cached dangerous expression:",n);return}try{this.cache.delete(n),this.cache.set(n,s)}catch{}return s.evaluator(t)}const r=this.createEvaluator(n);if(this.cache.size>=this.maxCacheSize){const i=this.cache.keys().next().value;i&&this.cache.delete(i)}if(this.cache.set(n,r),!r.isSecure){j.devWarn("Blocked dangerous expression:",n);return}return r.evaluator(t)}static createEvaluator(n){if(this.hasDangerousPatterns(n))return{evaluator:()=>{},isSecure:!1};if(n.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(n),isSecure:!0}}catch(t){return j.devWarn("Failed to create evaluator for expression:",n,t),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(n){return this.dangerousPatterns.some(t=>t.test(n))}static createSafeEvaluator(n){const t=n.trim();if(t.startsWith("{")&&t.endsWith("}"))return this.createObjectEvaluator(n);if(/^ctx\.[a-zA-Z0-9_.]+$/.test(n.trim())){const s=n.trim().slice(4);return r=>c.getNestedValue(r,s)}return n.includes("ctx")||/[+\-*/%<>=&|?:[\]]/.test(n)?this.createSimpleEvaluator(n):s=>c.getNestedValue(s,n)}static createObjectEvaluator(n){const t=n.trim().slice(1,-1),s=this.parseObjectProperties(t);return r=>{const i={};for(const{key:o,value:a}of s)try{if(a.startsWith("ctx.")){const u=a.slice(4);i[o]=c.getNestedValue(r,u)}else i[o]=this.evaluateSimpleValue(a,r)}catch{i[o]=void 0}return i}}static parseObjectProperties(n){const t=[],s=n.split(",");for(const r of s){const i=r.indexOf(":");if(i===-1)continue;const o=r.slice(0,i).trim(),a=r.slice(i+1).trim(),u=o.replace(/^['"]|['"]$/g,"");t.push({key:u,value:a})}return t}static createSimpleEvaluator(n){return t=>{try{let s=n;const r=[];s=s.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,v=>`<<#${r.push(v)-1}#>>`);const i=s.match(/ctx\.[\w.]+/g)||[];for(const v of i){const b=v.slice(4),w=c.getNestedValue(t,b);if(w===void 0)return;const p=r.push(JSON.stringify(w))-1;s=s.replace(new RegExp(v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${p}#>>`)}const o=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,a=s.match(o)||[];for(const v of a){if(v.startsWith("ctx."))continue;const b=c.getNestedValue(t,v);if(b===void 0)return;const w=r.push(JSON.stringify(b))-1;s=s.replace(new RegExp(v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${w}#>>`)}const u=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let d;const E=new Set;for(;(d=u.exec(s))!==null;){const v=d[1];if(["true","false","null","undefined"].includes(v)||/^[0-9]+$/.test(v)||v==="ctx"||E.has(v))continue;E.add(v);const b=c.getNestedValue(t,v);if(b===void 0)return;const w=JSON.stringify(b),p=r.push(w)-1;v.includes(".")?s=s.replace(new RegExp(v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${p}#>>`):s=s.replace(new RegExp("\\b"+v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${p}#>>`)}s=s.replace(/<<#(\d+)#>>/g,(v,b)=>r[Number(b)]);try{return this.evaluateBasicExpression(s)}catch{return}}catch{return}}}static evaluateBasicExpression(n){const t=this.tokenize(n);let s=0;function r(){return t[s]}function i(m){const k=t[s++];if(m&&!k)throw new Error(`Unexpected token EOF, expected ${m}`);if(m&&k&&k.type!==m&&k.value!==m)throw new Error(`Unexpected token ${k.type}/${k.value}, expected ${m}`);return k}function o(){return p()}function a(m){if(typeof m=="number")return m;if(m==null)return NaN;if(typeof m=="boolean")return m?1:0;const k=Number(m);return Number.isNaN(k)?NaN:k}function u(m,k){return typeof m=="string"||typeof k=="string"?String(m)+String(k):a(m)+a(k)}function d(m,k){return a(m)-a(k)}function E(m,k){return a(m)*a(k)}function v(m,k){return a(m)/a(k)}function b(m,k){return a(m)%a(k)}function w(m,k,f){if(typeof k=="number"&&typeof f=="number")switch(m){case">":return k>f;case"<":return k<f;case">=":return k>=f;case"<=":return k<=f;default:return!1}const g=String(k),T=String(f);switch(m){case">":return g>T;case"<":return g<T;case">=":return g>=T;case"<=":return g<=T;default:return!1}}function p(){const m=C(),k=r();if(k&&k.value==="?"){i("?");const f=o();i(":");const g=o();return m?f:g}return m}function C(){let m=l();for(;;){const k=r();if(!k||k.value!=="||")break;i("OP");const f=l();m=m||f}return m}function l(){let m=A();for(;;){const k=r();if(!k||k.value!=="&&")break;i("OP");const f=A();m=m&&f}return m}function A(){let m=S();for(;;){const k=r();if(!k||!["==","!=","===","!=="].includes(k.value))break;const f=i("OP").value,g=S();switch(f){case"==":m=m==g;break;case"!=":m=m!=g;break;case"===":m=m===g;break;case"!==":m=m!==g;break}}return m}function S(){let m=y();for(;;){const k=r();if(!k||![">","<",">=","<="].includes(k.value))break;const f=i("OP").value,g=y();switch(f){case">":m=w(">",m,g);break;case"<":m=w("<",m,g);break;case">=":m=w(">=",m,g);break;case"<=":m=w("<=",m,g);break}}return m}function y(){let m=h();for(;;){const k=r();if(!k||k.value!=="+"&&k.value!=="-")break;const f=i("OP").value,g=h();m=f==="+"?u(m,g):d(m,g)}return m}function h(){let m=_();for(;;){const k=r();if(!k||k.value!=="*"&&k.value!=="/"&&k.value!=="%")break;const f=i("OP").value,g=_();switch(f){case"*":m=E(m,g);break;case"/":m=v(m,g);break;case"%":m=b(m,g);break}}return m}function _(){const m=r();if(m&&m.value==="!")return i("OP"),!_();if(m&&m.value==="-"){i("OP");const k=_();return d(0,k)}return L()}function L(){const m=r();if(m){if(m.type==="NUMBER")return i("NUMBER"),Number(m.value);if(m.type==="STRING")return i("STRING"),m.value.slice(1,-1);if(m.type==="IDENT")return i("IDENT"),m.value==="true"?!0:m.value==="false"?!1:m.value==="null"?null:void 0;if(m.value==="["){i("PUNC");const k=[];for(;;){const f=r();if(!f||f.value==="]")break;k.push(o());const g=r();g&&g.value===","&&i("PUNC")}return i("PUNC"),k}if(m.value==="("){i("PUNC");const k=o();return i("PUNC"),k}throw new Error("Unexpected token in expression")}}return o()}static tokenize(n){const t=[],s=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let r;for(;(r=s.exec(n))!==null;){const i=r[1];i&&(/^\d/.test(i)?t.push({type:"NUMBER",value:i}):/^"/.test(i)||/^'/.test(i)?t.push({type:"STRING",value:i}):/^[a-zA-Z_]/.test(i)?t.push({type:"IDENT",value:i}):/^[()?:,[\]]$/.test(i)?t.push({type:"PUNC",value:i}):t.push({type:"OP",value:i}))}return t}static evaluateSimpleValue(n,t){if(n==="true")return!0;if(n==="false")return!1;if(!isNaN(Number(n)))return Number(n);if(n.startsWith("ctx.")){const s=n.slice(4);return c.getNestedValue(t,s)}return n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'")?n.slice(1,-1):n}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class Z{static cleanupFunctions=new WeakMap;static addListener(n,t,s,r){n.addEventListener(t,s,r);const o={event:t,handler:s,wrapper:s,options:r,cleanup:()=>n.removeEventListener(t,s,r),addedAt:Date.now()};this.cleanupFunctions.has(n)||this.cleanupFunctions.set(n,[]);const a=this.cleanupFunctions.get(n);a.push(o),a.__metaList=a}static removeListener(n,t,s,r){n.removeEventListener(t,s,r);const i=this.cleanupFunctions.get(n);if(i)for(let o=0;o<i.length;o++){const a=i[o];if(a.event===t&&a.handler===s){i.splice(o,1),i.length===0&&this.cleanupFunctions.delete(n);return}}}static cleanup(n){const t=this.cleanupFunctions.get(n);t&&(t.forEach(s=>{try{s.cleanup()}catch{}}),this.cleanupFunctions.delete(n))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(n){const t=this.cleanupFunctions.get(n);return!!(t&&t.length>0)}static getListenerCount(n){const t=this.cleanupFunctions.get(n);return t?t.length:0}static getListenerInfo(n){const t=this.cleanupFunctions.get(n);return t?t.map(s=>({event:s.event,handler:s.handler,wrapper:s.wrapper,options:s.options})):[]}}function ke(e,n){return Array.isArray(e)&&Array.isArray(n)?JSON.stringify([...e].sort())!==JSON.stringify([...n].sort()):e!==n}function Be(e,n,t,s,r){if(e){const i=n.value;if(r&&typeof i=="object"&&i!==null){const o={...i};o[r]=t,n.value=o}else n.value=t}else{const i=s._state||s;c.setNestedValue(i,n,t)}}function Te(e,n,t,s){if(typeof e._requestRender=="function"&&e._requestRender(),typeof e._triggerWatchers=="function"){const r=n?"reactiveState":t;e._triggerWatchers(r,s)}}function lt(e,n,t){const s=`update:${c.toKebab(n)}`,r=`update:${n}`,i=new CustomEvent(s,{detail:t,bubbles:!0,cancelable:!0}),o=new CustomEvent(r,{detail:t,bubbles:!0,cancelable:!0});e.dispatchEvent(i),e.dispatchEvent(o)}function De(e,n,t,s){const r=t;if(c.safe(()=>{if(typeof e.setAttribute=="function")try{e[n]=r}catch{}else e[n]=r}),r==null||typeof r=="string"||typeof r=="number"||typeof r=="boolean"){const i=c.safeSerializeAttr(r);i!==null?c.safe(()=>{typeof e.setAttribute=="function"&&c.setAttributeSmart(e,c.toKebab(n),String(i))}):c.safe(()=>{typeof e.removeAttribute=="function"&&c.removeAttributeSmart(e,c.toKebab(n))})}}function ft(e,n,t,s){if(e){const r=n.value;return s&&typeof r=="object"&&r!==null?r[s]:r}else{const r=t._state||t;return c.getNestedValue(r,n)}}function ae(e){return e?e.split(/\s+/).filter(Boolean):[]}function ce(e,n){if(n.length===0)return;const t=n.filter(s=>s&&!e.classList.contains(s));t.length>0&&e.classList.add(...t)}function oe(e,n){if(n.length===0)return;const t=n.filter(Boolean);t.length>0&&e.classList.remove(...t)}let Re=!1;async function ut(e,n,t=10){if(!Re){if(!e.isConnected){j.devWarn("⚠️ Element not connected to DOM, skipping style wait");return}for(let s=0;s<t;s++){const r=window.getComputedStyle(e),i=r.transform&&r.transform!=="",o=r.opacity&&r.opacity!=="";if(i||o){Re=!0;return}await new Promise(a=>requestAnimationFrame(()=>a(void 0)))}Re=!0,j.devWarn("⚠️ Styles did not load in time for transition, continuing anyway")}}function dt(e){const n=window.getComputedStyle(e),t=n.transitionDuration||"0s",s=n.transitionDelay||"0s",r=i=>{const o=parseFloat(i);return i.includes("ms")?o:o*1e3};return r(t)+r(s)}function qe(e,n){return new Promise(t=>{const s=n??dt(e);if(s<=0){t();return}let r=!1;const i=()=>{r||(r=!0,e.removeEventListener("transitionend",o),e.removeEventListener("transitioncancel",o),t())},o=()=>i();e.addEventListener("transitionend",o),e.addEventListener("transitioncancel",o),setTimeout(i,s+50)})}async function me(e,n){const{classes:t,hooks:s,css:r,duration:i}=n;if(s?.onBeforeEnter)try{s.onBeforeEnter(e)}catch(p){j.devError("Transition onBeforeEnter error:",p)}if(!r)return s?.onEnter?new Promise(p=>{const C=s.onEnter;typeof C=="function"?C(e,()=>{if(s?.onAfterEnter)try{s.onAfterEnter(e)}catch(l){j.devError("Transition onAfterEnter error:",l)}p()}):p()}):void 0;const o=ae(t?.enterFrom),a=ae(t?.enterActive),u=ae(t?.enterTo);ce(e,o),e.offsetHeight,ce(e,a),e.offsetHeight;let d;if(s?.onEnter){const p=new Promise(C=>{d=C});try{const C=s.onEnter;typeof C=="function"&&C(e,()=>{d&&d()})}catch(C){j.devError("Transition onEnter error:",C)}d&&await p}await new Promise(p=>requestAnimationFrame(()=>p(void 0))),e.offsetHeight;const E=window.getComputedStyle(e),v=E.transform,b=E.opacity;oe(e,o),v&&v!=="none"&&(e.style.transform=v),b&&b!==""&&(e.style.opacity=b),e.offsetHeight,await new Promise(p=>requestAnimationFrame(()=>p(void 0))),e.style.transform="",e.style.opacity="",ce(e,u),e.offsetHeight,await new Promise(p=>requestAnimationFrame(()=>p(void 0)));let w;if(typeof i=="number"?w=i:i&&typeof i=="object"&&"enter"in i&&(w=i.enter),await qe(e,w),oe(e,a),s?.onAfterEnter)try{s.onAfterEnter(e)}catch(p){j.devError("Transition onAfterEnter error:",p)}}async function Oe(e,n){const{classes:t,hooks:s,css:r,duration:i}=n;if(s?.onBeforeLeave)try{s.onBeforeLeave(e)}catch(v){j.devError("Transition onBeforeLeave error:",v)}if(!r)return s?.onLeave?new Promise(v=>{const b=s.onLeave;typeof b=="function"?b(e,()=>{if(s?.onAfterLeave)try{s.onAfterLeave(e)}catch(w){j.devError("Transition onAfterLeave error:",w)}v()}):v()}):void 0;const o=ae(t?.leaveFrom),a=ae(t?.leaveActive),u=ae(t?.leaveTo);ce(e,o),e.offsetHeight,ce(e,a);let d;if(s?.onLeave){const v=new Promise(b=>{d=b});try{const b=s.onLeave;typeof b=="function"&&b(e,()=>{d&&d()})}catch(b){j.devError("Transition onLeave error:",b)}d&&await v}await new Promise(v=>requestAnimationFrame(()=>v(void 0))),await ut(e,[...o,...a]),oe(e,o),ce(e,u);let E;if(typeof i=="number"?E=i:i&&typeof i=="object"&&"leave"in i&&(E=i.leave),await qe(e,E),oe(e,a),oe(e,u),oe(e,o),s?.onAfterLeave)try{s.onAfterLeave(e)}catch(v){j.devError("Transition onAfterLeave error:",v)}}const Ge=new WeakMap,Ze=new WeakMap;function we(e){if(!e)return;const n=Ge.get(e);if(n!==void 0)return n;try{const t=e;if(t&&t.key!=null)return String(t.key)}catch{}if(e instanceof Element){const t=e.getAttribute("data-anchor-key");if(t)return t}}function V(e,n){try{Ge.set(e,n)}catch{}try{e.key=n}catch{}try{if(e instanceof Element){const t=c.safeSerializeAttr(n);t!==null&&c.setAttributeSmart(e,"data-anchor-key",t)}}catch{}}function pt(e){if(!e)return;const n=Ze.get(e);if(n!==void 0)return n;try{const t=e;if(t&&t._transitionGroup!=null)return t._transitionGroup}catch{}}function ht(e,n){try{Ze.set(e,n)}catch{}try{e._transitionGroup=n}catch{}}function le(e){return e!==null&&typeof e=="object"&&"value"in e}function $e(e){try{if(c.isReactiveState(e))return e.value}catch{}try{if(le(e))return e.value}catch{}return e}function X(e,n,t){try{e&&e.attrs&&(e.attrs[n]=t)}catch{}}function q(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function fe(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?c.isReactiveState(e)||"value"in e?!!e.value:!1:!!e}function ie(e,n){if(!n||!(e instanceof Element))return;Z.cleanup(e);for(const s in n)n[s]===e&&delete n[s];const t=e.childNodes;for(let s=0;s<t.length;s++)ie(t[s],n)}function ge(e,n,t){if(typeof e=="string")return;const s=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),r=e.props?.ref??(e.props?.props&&e.props.props.ref);if(s)try{if(c.isReactiveState(s)||typeof s=="object"&&"value"in s)s.value=n;else if(typeof s=="function")s(n);else if(typeof s=="string"&&t)try{const i=String(s);t[i]=n}catch{}}catch{}else if(r&&t)try{const i=String(r);t[i]=n}catch{}}function yt(e,n,t,s,r,i,o,a){if(!i)return;const u=n.includes("lazy"),d=n.includes("trim"),E=n.includes("number"),v=()=>{if(c.isReactiveState(e)){const h=e.value;return a&&o&&(o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement)&&typeof h=="object"&&h!==null?h[a]:h}const y=i?._state||i;return c.getNestedValue(y,e)},b=v();let w="text";o instanceof HTMLInputElement?w=s?.type||o.type||"text":o instanceof HTMLSelectElement?w="select":o instanceof HTMLTextAreaElement&&(w="textarea");const p=o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement,l=p?w==="checkbox"||w==="radio"?"checked":"value":a??"modelValue";if(w==="checkbox")if(Array.isArray(b))t[l]=b.includes(String(o?.getAttribute("value")??s?.value??""));else{const y=o?.getAttribute("true-value")??!0;t[l]=b===y}else if(w==="radio")t[l]=b===(s?.value??"");else if(w==="select")if(o&&o.hasAttribute("multiple")&&o instanceof HTMLSelectElement){const y=Array.isArray(b)?b.map(String):[];setTimeout(()=>{Array.from(o.options).forEach(h=>{h.selected=y.includes(h.value)})},0),t[l]=Array.isArray(b)?b:[]}else t[l]=b;else{!p&&c.isReactiveState(e)?t[l]=e:t[l]=b;try{const y=c.toKebab(l);s&&(s[y]=b)}catch{}}const A=u||w==="checkbox"||w==="radio"||w==="select"?"change":"input",S=y=>{if(y.isComposing||r._isComposing)return;const h=globalThis.process,_=!!h&&h.env?.NODE_ENV==="test"||typeof window<"u"&&globalThis.__vitest__;if(y.isTrusted===!1&&!_)return;const L=y.target;if(!L||L._modelUpdating)return;let N=L.value;if(w==="checkbox"){const f=v();if(Array.isArray(f)){const g=L.getAttribute("value")??"",T=Array.from(f);if(L.checked)T.includes(g)||T.push(g);else{const R=T.indexOf(g);R>-1&&T.splice(R,1)}N=T}else{const g=L.getAttribute("true-value")??!0,T=L.getAttribute("false-value")??!1;N=L.checked?g:T}}else if(w==="radio")N=L.getAttribute("value")??L.value;else if(w==="select"&&L.multiple)N=Array.from(L.selectedOptions).map(f=>f.value);else if(d&&typeof N=="string"&&(N=N.trim()),E){const f=Number(N);isNaN(f)||(N=f)}const m=v();if(ke(N,m)){L._modelUpdating=!0;try{Be(c.isReactiveState(e),e,N,i,a),Te(i,c.isReactiveState(e),e,N),L&&lt(L,l,N)}finally{setTimeout(()=>L._modelUpdating=!1,0)}}};if(p){if(r[A]){const y=r[A];o&&Z.removeListener(o,A,y)}r[A]=S}else{const y=`update:${c.toKebab(l)}`,h=`update:${l}`;if(r[y]){const _=r[y];o&&Z.removeListener(o,y,_)}if(r[h]){const _=r[h];o&&Z.removeListener(o,h,_)}if(r[y]=_=>{const L=_.detail;let N=L!==void 0?L:void 0;if(N===void 0){const f=_.target;if(f&&typeof f=="object"&&"value"in f)try{N=f.value}catch{N=void 0}}const m=ft(c.isReactiveState(e),e,i,a);if(ke(N,m)){Be(c.isReactiveState(e),e,N,i,a),Te(i,c.isReactiveState(e),e,N);const f=_.target;f&&De(f,l,c.isReactiveState(e)?e:N,c.isReactiveState(e))}},c.isReactiveState(e)&&typeof e.value=="object"&&e.value!==null){let _=[];try{_=Reflect.ownKeys(e.value)}catch{_=Object.keys(e.value)}const L=_.filter(N=>typeof N=="string"&&!String(N).startsWith("_")&&N!=="constructor");for(const N of L){const m=String(N),k=`update:${c.toKebab(m)}`,f=`update:${m}`;r[k]||(r[k]=g=>{const T=g.detail!==void 0?g.detail:g.target?.value,R=c.isReactiveState(e)?e.value[m]:c.getNestedValue(i?._state||i,e);if(!ke(T,R))return;if(c.isReactiveState(e)){const I={...e.value};I[m]=T,e.value=I}else c.setNestedValue(i?._state||i,e,T);Te(i,c.isReactiveState(e),e,T);const P=g.currentTarget||o||g.target;P&&De(P,l,c.isReactiveState(e)?e:T,c.isReactiveState(e))},r[f]=r[k])}}r[h]=r[y]}(w==="text"||w==="textarea")&&(r.compositionstart=()=>r._isComposing=!0,r.compositionend=y=>{r._isComposing=!1;const h=y.target;h&&setTimeout(()=>{const _=h.value,L=i?._state||i,N=c.getNestedValue(L,e);let m=_;if(d&&(m=m.trim()),E){const f=Number(m);isNaN(f)||(m=f)}if(ke(m,N)){h._modelUpdating=!0;try{c.setNestedValue(L,e,m),Te(i,c.isReactiveState(e),e,m)}finally{setTimeout(()=>h._modelUpdating=!1,0)}}},0)})}function Je(e){const n=e.slice(2);return n?n.charAt(0).toLowerCase()+n.slice(1):""}function mt(e,n,t,s,r){if(typeof e=="object"&&e!==null)for(const[i,o]of Object.entries(e))if(i.startsWith("data-")||i.startsWith("aria-")||i==="class")t[i]=o;else if(i==="disabled"&&r&&q(r)){const a=o&&typeof o=="object"&&"value"in o;(()=>{try{return c.isReactiveState(o)}catch{return!1}})()||a?n[i]=o:t[i]=o}else n[i]=o;else if(typeof e=="string"){if(!s)return;try{const i=Ce(e,s);if(typeof i=="object"&&i!==null){for(const[o,a]of Object.entries(i))if(o.startsWith("data-")||o.startsWith("aria-")||o==="class")t[o]=a;else if(o==="disabled"&&r&&q(r)){const u=a&&typeof a=="object"&&"value"in a;(()=>{try{return c.isReactiveState(a)}catch{return!1}})()||u?n[o]=a:t[o]=a}else n[o]=a;return}else{t[e]=i;return}}catch{const i=c.getNestedValue(s,e);t[e]=i}}}function gt(e,n,t){let s;if(typeof e=="string"){if(!t)return;s=Ce(e,t)}else s=e;const r=String(n.style||"");let i=r;if(s){if(r){const o=String(r).split(";").map(u=>u.trim()).filter(Boolean),a=o.findIndex(u=>u.startsWith("display:"));a>=0&&o[a]==="display: none"&&(o.splice(a,1),i=o.length>0?o.join("; ")+";":"")}}else if(r){const o=String(r).split(";").filter(Boolean),a=o.findIndex(u=>u.trim().startsWith("display:"));a>=0?o[a]="display: none":o.push("display: none"),i=o.join("; ")}else i="display: none";i!==r&&(i?n.style=i:n.style=void 0)}function Ce(e,n){return ct.evaluate(e,n)}function bt(e,n,t,s){let r;if(typeof e=="string"){if(!t)return;r=Ce(e,t)}else r=e;try{if(r&&typeof r=="object"){if(c.isReactiveState(r))r=r.value;else if("value"in r&&typeof r.value<"u"){const d=r.value;d instanceof Node||(r=d)}}}catch{}let i=[];if(typeof r=="string")i=[r];else if(Array.isArray(r))i=r.filter(Boolean);else if(typeof r=="object"&&r!==null)for(const[d,E]of Object.entries(r))E&&i.push(d);const o=i.join(" "),a=s&&s.class||n.class||"",u=a?`${a} ${o}`.trim():o.trim();u?n.class=u:n.class=void 0}function je(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 t=e.value,s=typeof t;return s==="boolean"?!0:s==="string"?t===""||t==="true"||t==="false":!1}}catch{}return!1}function St(e,n,t){let s;if(typeof e=="string"){if(!t)return;s=Ce(e,t)}else s=e;let r="";if(typeof s=="string")r=s;else if(s&&typeof s=="object"){const o=[];for(const[a,u]of Object.entries(s))if(u!=null&&u!==""){const d=a.replace(/[A-Z]/g,b=>`-${b.toLowerCase()}`),E=["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 v=String(u);typeof u=="number"&&E.includes(d)&&(v=`${u}px`),o.push(`${d}: ${v}`)}r=o.join("; ")+(o.length>0?";":"")}const i=String(n.style||"");n.style=i+(i&&!i.endsWith(";")?"; ":"")+r}function vt(e,n,t){let s=e;typeof e=="string"&&t&&(s=Ce(e,t)),c.isReactiveState(s)?n.reactiveRef=s:n.ref=s}function Ye(e,n,t,s){const r={},i={...s||{}},o={};for(const[a,u]of Object.entries(e)){const{value:d,modifiers:E,arg:v}=u;if(a==="model"||a.startsWith("model:")){const b=a.split(":"),w=b.length>1?b[1]:v;yt(d,E,r,i,o,n,t,w);continue}switch(a){case"bind":mt(d,r,i,n,t);break;case"show":gt(d,i,n);break;case"class":bt(d,i,n,s);break;case"style":St(d,i,n);break;case"ref":vt(d,r,n);break}}try{if(Object.prototype.hasOwnProperty.call(r,"disabled")&&t&&q(t)){const u=r.disabled,d=u&&typeof u=="object"&&"value"in u;let E=!1;try{E=c.isReactiveState(u)}catch{E=!1}if(!d&&!E)try{i.disabled=u,delete r.disabled;const v=globalThis;v.__VDOM_DISABLED_PROMOTIONS||(v.__VDOM_DISABLED_PROMOTIONS=[]),v.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:u,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:r,attrs:i,listeners:o}}function He(e,n){if(Array.isArray(e)){const i=new Set;return e.map(o=>{if(!o||typeof o!="object")return o;let a=o.props?.key??o.key;if(!a){const v=o.tag||"node",w=[o.props?.attrs?.id,o.props?.attrs?.name,o.props?.attrs?.["data-key"],o.props?.props?.id,o.props?.props?.name,o.props?.props?.dataKey,o.props?.props?.["data-key"]].find(p=>p!=null)??"";a=w?`${n}:${v}:${w}`:`${n}:${v}`}let u=a,d=1;for(;i.has(u);)u=`${a}#${d++}`;i.add(u);let E=o.children;return Array.isArray(E)&&(E=He(E,u)),{...o,key:u,children:E}})}const t=e,s=t.props?.key??t.key??n;let r=t.children;return Array.isArray(r)&&(r=He(r,s)),{...t,key:s,children:r}}function ze(e,n,t,s){const r=t.directives??{},i=Ye(r,s,e,t.attrs),o={...n.props||{},...t.props||{},...i.props||{}},a={...n.attrs||{},...t.attrs||{},...i.attrs||{}},u=n.props??{},d=o,E=!!(t?.isCustomElement??n?.isCustomElement??!1);let v=!1;for(const p in{...u,...d}){const C=u[p],l=d[p];let A=C,S=l;if(c.safe(()=>{(c.isReactiveState(C)||le(C))&&(A=C.value)}),c.safe(()=>{(c.isReactiveState(l)||le(l))&&(S=l.value)}),!(C===l&&A===S))if(v=!0,p==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const y=$e(l),h=y==null?"":String(y);e.value!==h&&(e.value=h)}else if(p==="checked"&&e instanceof HTMLInputElement){const y=$e(l);e.checked=!!y}else if(p.startsWith("on")&&typeof l=="function"){const y=Je(p);typeof C=="function"&&Z.removeListener(e,y,C),typeof l=="function"&&Z.addListener(e,y,l);try{if(y&&y.startsWith("update:")){const h=y.split(":",2)[1],_=d[h];let L=[];try{if(c.isReactiveState(_)){const m=_.value;L=m&&typeof m=="object"?Object.keys(m):[]}else _&&typeof _=="object"&&(L=Object.keys(_))}catch{L=[]}const N=L.filter(m=>typeof m=="string"&&!m.startsWith("_")&&m!=="constructor");for(const m of N){const k=`update:${m}`,f=g=>{const T=g.detail!==void 0?g.detail:g.target instanceof HTMLInputElement||g.target instanceof HTMLTextAreaElement||g.target instanceof HTMLSelectElement?g.target.value:void 0,O={...c.isReactiveState(_)?_.value||{}:d[h]||{},[m]:T};try{typeof l=="function"&&l({detail:O})}catch{}};c.safe(()=>{Z.addListener(e,k,f)})}}}catch{}}else if(l==null)c.removeAttributeSmart(e,p);else{const y=t?.isCustomElement??n?.isCustomElement??!1;if(y||p in e)try{e[p]=l,p==="disabled"&&l===!1&&!y&&q(e)&&c.removeAttributeSmart(e,"disabled")}catch{}else l===!1&&c.removeAttributeSmart(e,p)}}for(const[p,C]of Object.entries(i.listeners||{})){Z.addListener(e,p,C);try{const l=e&&e.parentElement;l&&l!==e&&Z.addListener(l,p,C)}catch{}}const b={...n.attrs??{}},w=a;try{const p=i&&i.attrs||{};if(Object.prototype.hasOwnProperty.call(p,"class")&&p.class===void 0&&typeof e.getAttribute=="function"){const C=e.getAttribute("class");C!==null&&(b.class=C)}if(Object.prototype.hasOwnProperty.call(p,"style")&&p.style===void 0&&typeof e.getAttribute=="function"){const C=e.getAttribute("style");C!==null&&(b.style=C)}try{if(typeof e.getAttribute=="function"){const C=e.getAttribute("class");try{e instanceof HTMLInputElement&&e.type==="text"&&C!==null&&C!==b.class&&(b.class=C)}catch{}}}catch{}}catch{}for(const p in{...b,...w}){const C=b[p],l=w[p];let A=C,S=l;if(c.isReactiveState(C)&&(A=C.value),c.isReactiveState(l)&&(S=l.value),A!==S)if(v=!0,S==null||S===!1)c.safe(()=>{c.removeAttributeSmart(e,p)}),X(n,p,void 0),p==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?c.safe(()=>{e.value=""}):e instanceof HTMLSelectElement?c.safe(()=>{e.value=""}):e instanceof HTMLProgressElement&&c.safe(()=>{e.value=0})),p==="checked"&&e instanceof HTMLInputElement&&c.safe(()=>{e.checked=!1}),p==="disabled"&&q(e)&&c.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=!1)});else{if(p==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){c.safe(()=>{e.value=S??""});continue}else if(e instanceof HTMLSelectElement){c.safe(()=>{e.value=S??""});continue}else if(e instanceof HTMLProgressElement){c.safe(()=>{e.value=Number(S)});continue}}if(p==="checked"&&e instanceof HTMLInputElement){c.safe(()=>{e.checked=!!S});continue}if(p==="style"){const h=c.safeSerializeAttr(S);h!==null&&c.setAttributeSmart(e,p,String(h)),X(n,p,S);continue}if(p==="class"){const h=c.safeSerializeAttr(S);h!==null&&c.setAttributeSmart(e,p,String(h)),X(n,p,S);continue}if(p==="disabled"&&q(e)){c.safe(()=>{const h=fe(S);(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=h)}),fe(S)?c.safe(()=>{c.setAttributeSmart(e,p,"")}):c.safe(()=>{c.removeAttributeSmart(e,p)});continue}const y=e.namespaceURI==="http://www.w3.org/2000/svg";if(E&&!y&&p.includes("-"))if(c.isClassLikeAttr(p)){const h=c.safeSerializeAttr(l??S);if(h!==null){try{c.setAttributeSmart(e,p,String(h))}catch{}X(n,p,S)}}else{const h=c.toCamel(p);try{const _=e;_[h]=c.isReactiveState(l)?l:S,X(n,p,S)}catch{const _=c.safeSerializeAttr(l??S);_!==null&&c.setAttributeSmart(e,p,String(_))}}else if(!y&&p in e)try{const h=e;h[p]=c.isReactiveState(l)?l:S,X(n,p,S)}catch{const h=c.safeSerializeAttr(S);h!==null&&(c.setAttributeSmart(e,p,String(h)),X(n,p,S))}else{const h=c.safeSerializeAttr(S);h!==null&&(c.setAttributeSmart(e,p,String(h)),X(n,p,S))}}}try{if(q(e)){const p=o.disabled;let C;try{const A=Object.prototype.hasOwnProperty.call(i.props||{},"disabled"),S=p&&typeof p=="object"&&"value"in p;let y=!1;c.safe(()=>{y=!!c.isReactiveState(p)});const h=je(p);y||S||A||h?C=p:C=a.disabled}catch{C=a.disabled}const l=fe(C);c.safe(()=>{(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement)&&(e.disabled=l)}),l?c.safe(()=>{c.setAttributeSmart(e,"disabled","")}):c.safe(()=>{c.removeAttributeSmart(e,"disabled")})}}catch{}if(E&&v){const p=e;c.safe(()=>{p._applyProps?.(p._cfg)}),c.safe(()=>{typeof p.requestRender=="function"?p.requestRender():typeof p._render=="function"&&p._render?.(p._cfg)})}}function U(e,n,t,s=null){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const l=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&V(l,e.key),l}if(e.tag==="#raw"){const l=typeof e.children=="string"?e.children:"";return document.createRange().createContextualFragment(l)}if(e.tag==="#anchor"){const l=e,A=Array.isArray(l.children)?l.children:[],S=document.createTextNode(""),y=document.createTextNode("");l.key!=null&&(V(S,`${l.key}:start`),V(y,`${l.key}:end`)),l._startNode=S,l._endNode=y;const h=document.createDocumentFragment();h.appendChild(S);for(const _ of A){const L=U(_,n,t,s);if(l.key!=null&&L instanceof Element&&!L.hasAttribute("data-anchor-key")){const N=_;N&&typeof N=="object"&&N.key!=null||V(L,String(l.key))}h.appendChild(L)}return h.appendChild(y),h}const r=e&&typeof e=="object"&&e.props&&e.props.attrs?e.props.attrs:void 0,o=(r&&typeof r.xmlns=="string"?String(r.xmlns):void 0)??s??c.TAG_NAMESPACE_MAP[e.tag]??null,a=o?document.createElementNS(o,e.tag):document.createElement(e.tag);e.key!=null&&V(a,e.key),e.props&&e.props?._transitionGroup&&ht(a,e.props?._transitionGroup);const{props:u={},attrs:d={},directives:E={}}=e.props??{},v=Ye(E,n,a instanceof HTMLElement?a:void 0,d),b={...u,...v.props},w={...d,...v.attrs};try{const l=(w&&w.class)??(b&&b.class)??(e.props&&e.props.attrs&&e.props.attrs.class)??(e.props&&e.props.props&&e.props.props.class),A=c.safeSerializeAttr(l);if(A!==null){const S=String(A).trim();S&&c.setAttributeSmart(a,"class",S)}}catch{}try{if(b.disabled!==void 0&&a&&q(a)){const l=b.disabled,A=l&&typeof l=="object"&&"value"in l;let S=!1;try{S=c.isReactiveState(l)}catch{S=!1}!A&&!S&&c.safe(()=>{w.disabled=l,delete b.disabled})}}catch{}const p=a.namespaceURI==="http://www.w3.org/2000/svg";for(const l in w){const A=w[l];if(typeof l!="string"||/\[object Object\]/.test(l))continue;const S=$e(A);if(typeof S=="boolean")S?c.setAttributeSmart(a,l,""):c.safe(()=>{c.removeAttributeSmart(a,l)});else if(S!=null){if(l==="disabled"&&q(a)){const y=b.disabled,h=je(y)?y:S,_=fe(h);c.safe(()=>{a.disabled=_}),_?c.safe(()=>{c.setAttributeSmart(a,l,"")}):c.safe(()=>{c.removeAttributeSmart(a,l)});continue}if(!p&&l==="value"&&(a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLProgressElement))try{a instanceof HTMLProgressElement?a.value=Number(S):a.value=String(S??"")}catch{const y=c.safeSerializeAttr(S);y!==null&&c.setAttributeSmart(a,l,String(y))}else if(!p&&l==="checked"&&a instanceof HTMLInputElement)try{a.checked=!!S}catch{const y=c.safeSerializeAttr(S);y!==null&&c.setAttributeSmart(a,l,String(y))}else if(!p&&l in a)try{a[l]=S,l==="disabled"&&S===!1&&q(a)&&c.removeAttributeSmart(a,"disabled"),X(e.props,l,S)}catch{const y=c.safeSerializeAttr(S);y!==null&&c.setAttributeSmart(a,l,String(y))}else if((e.props?.isCustomElement??!1)&&!p&&l.includes("-")){const h=c.toCamel(l);try{a[h]=S}catch{const _=c.safeSerializeAttr(S);_!==null&&c.setAttributeSmart(a,l,String(_))}}else{const h=c.safeSerializeAttr(S);h!==null&&c.setAttributeSmart(a,l,String(h))}}}for(const l in b){const A=b[l];if(!(typeof l!="string"||/\[object Object\]/.test(l)))if(l==="value"&&(a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement)){const S=typeof A=="object"&&A!==null&&le(A)?A.value:A;c.safe(()=>{a.value=String(S??"")})}else if(l.startsWith("on")&&typeof A=="function"){const S=Je(l),y=S.includes(":")?(()=>{const h=S.split(":"),_=h[1];if(_.includes("-")){const L=_.split("-").map((N,m)=>m===0?N:N.charAt(0).toUpperCase()+N.slice(1)).join("");return`${h[0]}:${L}`}else{const L=_.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${h[0]}:${L}`}})():S;v.listeners&&(v.listeners[S]||v.listeners[y])||Z.addListener(a,S,A)}else{if(l.startsWith("on")&&A===void 0)continue;if(A==null||A===!1)c.removeAttributeSmart(a,l);else{const S=e.props?.isCustomElement??!1,y=typeof A=="object"&&A!==null&&c.isReactiveState(A)?A:le(A)&&typeof A.value<"u"?A.value:A;if(l==="class"||l==="style"){try{const h=c.safeSerializeAttr(y);h!==null&&c.setAttributeSmart(a,l,String(h))}catch{}continue}if(S||l in a)try{const h=typeof A=="object"&&A!==null&&c.isReactiveState(A)?A:le(A)?A.value:A;if(l==="disabled"&&q(a)){const _=b.disabled!==void 0?b.disabled:h,L=fe(_);c.safe(()=>{a.disabled=L}),L?c.safe(()=>{c.setAttributeSmart(a,l,"")}):c.safe(()=>{c.removeAttributeSmart(a,l)});continue}try{if(typeof a[l]=="boolean"){let L=h;typeof h=="string"?h==="false"?L=!1:h==="true"?L=!0:L=!!h&&h!=="":L=!!h,a[l]=L}else a[l]=h}catch{a[l]=h}}catch{}}}}for(const[l,A]of Object.entries(v.listeners||{}))Z.addListener(a,l,A);const C={...e,props:{...e.props,...v.props}};ge(C,a,t);try{const l=a;if(typeof l._applyProps=="function")try{l._applyProps(l._cfg)}catch{}typeof l.requestRender=="function"?l.requestRender():typeof l._render=="function"&&l._render(l._cfg)}catch{}if(Array.isArray(e.children)){const l=e.tag==="foreignObject"&&o===c.SVG_NS?null:a.namespaceURI??null;for(const A of e.children)a.appendChild(U(A,n,t,l))}else typeof e.children=="string"&&(a.textContent=e.children);try{if(a instanceof HTMLSelectElement&&w&&Object.prototype.hasOwnProperty.call(w,"value"))try{a.value=String(w.value??"")}catch{}}catch{}try{if(q(a)){const l=b.disabled,A=w.disabled,S=l&&typeof l=="object"&&"value"in l;let y=!1;try{y=!!c.isReactiveState(l)}catch{y=!1}const _=y||S||je(l)?l:A,L=fe(_);c.safe(()=>{a.disabled=L}),L?c.safe(()=>{c.setAttributeSmart(a,"disabled","")}):c.safe(()=>{c.removeAttributeSmart(a,"disabled")})}}catch{}return a}function Et(e,n,t,s,r){if(typeof t=="string"){e.textContent!==t&&(e.textContent=t);return}if(!Array.isArray(t))return;const i=e.childNodes,o=[];for(let C=0;C<i.length;C++)o.push(i[C]);const a=Array.isArray(n)?n:[],u=pt(e);if(u){const C=y=>{if(typeof y=="string")return y.startsWith("each-")?y.substring(5):y;if(typeof y=="number")return String(y)},l=[],A=[];for(const y of t)if(y&&y.tag==="#anchor"){const h=Array.isArray(y.children)?y.children:[];for(const _ of h){const L=C(_.key??y.key??"unknown");l.push({..._,key:L})}}else y&&l.push({...y,key:C(y.key)});for(const y of a)if(y&&y.tag==="#anchor"){const h=Array.isArray(y.children)?y.children:[];for(const _ of h){const L=C(_.key??y.key??"unknown");A.push({..._,key:L})}}else y&&A.push({...y,key:C(y.key)});if(l.some(y=>y&&y.key!=null)||A.some(y=>y&&y.key!=null)){const y=new Map,h=new Map;for(const f of A)if(f&&f.key!=null){const g=String(f.key);y.set(g,f)}for(let f=0;f<o.length;f++){const g=o[f];let T=we(g);if(T=C(T),T!=null&&g instanceof Element&&g.nodeType===Node.ELEMENT_NODE){let R=typeof T=="string"&&T.includes(":")?T.substring(0,T.lastIndexOf(":")):T;R=String(R),h.set(R,g)}}const _=new Set,L=new Map,N=o.length>0;if(u.moveClass&&N)for(let f=0;f<o.length;f++){const g=o[f];if(g instanceof HTMLElement&&g.parentElement){const T=g.getBoundingClientRect();L.set(g,T)}}const m=[];for(const f of l){let g=f.key;if(g==null)continue;g=String(g);const T=y.get(g);let R=h.get(g);if(R&&T){const O=be(R,T,f,s);_.add(R);const P=String(g);V(O,P),m.push({node:O,key:g,newVNode:f,oldVNode:T,isNew:!1})}else{R=U(f,s,void 0,e instanceof Element?e.namespaceURI??null:null),V(R,String(g)),e.appendChild(R);const O=N||u.appear===!0;R instanceof HTMLElement&&O&&me(R,u).catch(P=>{j.devError("Enter transition error:",P)}),m.push({node:R,key:g,newVNode:f,isNew:!0})}}const k=[];for(let f=0;f<o.length;f++){const g=o[f],T=we(g);if(!_.has(g)&&T!=null&&g instanceof HTMLElement){const O=Oe(g,u).then(()=>{e.contains(g)&&e.removeChild(g)}).catch(P=>{j.devError("Leave transition error:",P),e.contains(g)&&e.removeChild(g)});k.push(O)}}if(k.length===0){let f=e.firstChild;for(const{node:g}of m)g!==f&&e.insertBefore(g,f),f=g.nextSibling;if(u.moveClass&&L.size>0){const g=[];for(const{node:T,isNew:R}of m)if(!R&&T instanceof HTMLElement){const O=L.get(T);if(O){const P=T.getBoundingClientRect(),I=O.left-P.left,M=O.top-P.top;if(I!==0||M!==0){const z=u.moveClass.split(/\s+/).filter(x=>x);g.push({node:T,deltaX:I,deltaY:M,moveClasses:z})}}}if(g.length>0){for(const{node:T,deltaX:R,deltaY:O}of g)T.style.transform=`translate(${R}px, ${O}px)`,T.style.transitionProperty="none";e.offsetHeight,requestAnimationFrame(()=>{requestAnimationFrame(()=>{for(const{node:T,moveClasses:R}of g)for(const O of R)T.classList.add(O);requestAnimationFrame(()=>{const T=u.moveClass||"",R=T.match(/duration-(\d+)/),O=R?`${R[1]}ms`:"300ms",P=T.match(/ease-(out|in|in-out|linear)/),I=P?`ease-${P[1]}`:"ease-out";for(const{node:M}of g)M.style.transition=`transform ${O} ${I}`;requestAnimationFrame(()=>{for(const{node:M,moveClasses:z}of g){M.style.removeProperty("transform");const x=()=>{for(const Q of z)M.classList.remove(Q);M.style.removeProperty("transition"),M.removeEventListener("transitionend",x),M.removeEventListener("transitioncancel",x)};M.addEventListener("transitionend",x,{once:!0}),M.addEventListener("transitioncancel",x,{once:!0})}})})})})}}}return}}const d=new Map;for(const C of a)C&&C.key!=null&&d.set(C.key,C);const E=new Map;for(let C=0;C<o.length;C++){const l=o[C],A=we(l);A!=null&&E.set(A,l)}const v=new Set;let b=e.firstChild;function w(C,l){let A=C;for(;A&&(v.add(A),A!==l);)A=A.nextSibling}function p(C,l,A,S,y,h=!0){const _=[];let L=C.nextSibling;for(;L&&L!==l;)_.push(L),L=L.nextSibling;const N=Array.isArray(A)?A:[];if(S.some(k=>k&&k.key!=null)||N.some(k=>k&&k.key!=null)){const k=new Map,f=new Map;for(const O of N)O&&O.key!=null&&k.set(O.key,O);for(const O of _){const P=we(O);P!=null&&f.set(P,O)}const g=y&&y.state==="visible"&&N.length===0&&S.length>0,T=new Set;let R=C.nextSibling;for(const O of S){let P;if(O.key!=null&&f.has(O.key)){const I=k.get(O.key);P=be(f.get(O.key),I,O,s),T.add(P),y&&P instanceof HTMLElement&&g&&y.appear&&me(P,y).catch(M=>{j.devError("Transition enter error (appear):",M)}),P!==R&&e.contains(P)&&e.insertBefore(P,R)}else P=U(O,s,void 0,e instanceof Element?e.namespaceURI??null:null),e.insertBefore(P,R),T.add(P),y&&P instanceof HTMLElement&&h&&me(P,y).catch(I=>{j.devError("Transition enter error:",I)});R=P.nextSibling}for(const O of _)!T.has(O)&&e.contains(O)&&(y&&O instanceof HTMLElement&&h?Oe(O,y).then(()=>{e.contains(O)&&e.removeChild(O)}).catch(P=>{j.devError("Transition leave error:",P),e.contains(O)&&e.removeChild(O)}):e.removeChild(O))}else{const k=Math.min(N.length,S.length);for(let f=0;f<k;f++){const g=N[f],T=S[f],R=be(_[f],g,T,s);R!==_[f]&&(e.insertBefore(R,_[f]),e.removeChild(_[f]))}for(let f=k;f<S.length;f++){const g=U(S[f],s,void 0,e instanceof Element?e.namespaceURI??null:null);e.insertBefore(g,l),y&&g instanceof HTMLElement&&h&&me(g,y).catch(T=>{j.devError("Transition enter error:",T)})}for(let f=k;f<_.length;f++){const g=_[f];y&&g instanceof HTMLElement&&h?Oe(g,y).then(()=>{e.contains(g)&&e.removeChild(g)}).catch(T=>{j.devError("Transition leave error:",T),e.contains(g)&&e.removeChild(g)}):e.removeChild(g)}}}for(const C of t){let l;if(C.tag==="#anchor"){const A=C.key,S=`${A}:start`,y=`${A}:end`;let h=E.get(S),_=E.get(y);const L=Array.isArray(C.children)?C.children:[];if(h||(h=document.createTextNode(""),V(h,S)),_||(_=document.createTextNode(""),V(_,y)),C._startNode=h,C._endNode=_,!e.contains(h)||!e.contains(_)){e.insertBefore(h,b);const N=C._transition,k=!(N&&N.state==="visible"&&L.length>0)||N.appear;for(const f of L){const g=U(f,s,r,e instanceof Element?e.namespaceURI??null:null);e.insertBefore(g,b),N&&g instanceof HTMLElement&&k&&me(g,N).catch(T=>{j.devError("Transition enter error:",T)})}e.insertBefore(_,b)}else{const N=C._transition,k=d.get(A)._transition,f=k&&k.state!==N?.state,g=N&&N.state==="visible"&&L.length>0&&!f,T=f||!g||N?.appear===!0;p(h,_,d.get(A)?.children,L,N,T)}w(h,_),b=_.nextSibling;continue}if(C.key!=null&&E.has(C.key)){const A=d.get(C.key);l=be(E.get(C.key),A,C,s,r),v.add(l),l!==b&&e.contains(l)&&(b&&!e.contains(b)&&(b=null),e.insertBefore(l,b))}else l=U(C,s,r,e instanceof Element?e.namespaceURI??null:null),b&&!e.contains(b)&&(b=null),e.insertBefore(l,b),v.add(l);b=l.nextSibling}for(let C=0;C<o.length;C++){const l=o[C];!v.has(l)&&e.contains(l)&&(ie(l,r),e.removeChild(l))}}function be(e,n,t,s,r){if(n&&typeof n!="string"&&n.props?.ref&&r&&ie(e,r),n===t)return e;if(typeof t=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==t&&(e.textContent=t),e;{const o=document.createTextNode(t);return e.parentNode?.replaceChild(o,e),o}}if(t&&typeof t!="string"&&t.tag==="#anchor"){const o=t,a=Array.isArray(o.children)?o.children:[],u=o._startNode??document.createTextNode(""),d=o._endNode??document.createTextNode("");o.key!=null&&(V(u,`${o.key}:start`),V(d,`${o.key}:end`)),o._startNode=u,o._endNode=d;const E=document.createDocumentFragment();E.appendChild(u);for(const v of a){const b=U(v,s,r,e.parentNode instanceof Element?e.parentNode.namespaceURI??null:null);E.appendChild(b)}return E.appendChild(d),e.parentNode?.replaceChild(E,e),u}if(!t){ie(e,r);const o=document.createComment("removed");return e.parentNode?.replaceChild(o,e),o}if(!n||typeof n=="string"){ie(e,r);const o=U(t,s,r,e.parentNode instanceof Element?e.parentNode.namespaceURI??null:null);return ge(t,o,r),e.parentNode?.replaceChild(o,e),o}if(t.tag==="#anchor"){const o=Array.isArray(t.children)?t.children:[],a=t._startNode??document.createTextNode(""),u=t._endNode??document.createTextNode("");t.key!=null&&(V(a,`${t.key}:start`),V(u,`${t.key}:end`)),t._startNode=a,t._endNode=u;const d=document.createDocumentFragment();d.appendChild(a);for(const E of o)d.appendChild(U(E,s,r,e.parentNode instanceof Element?e.parentNode.namespaceURI??null:null));return d.appendChild(u),e.parentNode?.replaceChild(d,e),a}if(typeof n!="string"&&typeof t!="string"&&n.tag===t.tag&&n.key===t.key){const o=e;return ze(o,n.props||{},t.props||{},s),Et(o,n.children,t.children,s,r),ge(t,o,r),o}if(typeof n!="string"&&typeof t!="string"&&n.tag===t.tag&&(n.tag&&String(n.tag).includes("-")||t.props&&t.props.isCustomElement||n.props&&n.props.isCustomElement))try{const a=e;return ze(a,n.props||{},t.props||{},s),ge(t,a,r),a}catch{}ie(e,r);const i=U(t,s,r,e.parentNode instanceof Element?e.parentNode.namespaceURI??null:null);return ge(t,i,r),e.parentNode?.replaceChild(i,e),i}function Ct(e,n,t,s){let r;Array.isArray(n)?n.length===1?(r=n[0],r&&typeof r=="object"&&r.key==null&&(r={...r,key:"__root__"})):r={tag:"div",key:"__root__",children:n}:(r=n,r&&typeof r=="object"&&r.key==null&&(r={...r,key:"__root__"})),r&&typeof r=="object"&&r.tag==="#anchor"&&(r={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[r]}),r=He(r,String(r.key??"root"));const i=e._prevVNode??null,o=e._prevDom??e.firstChild??null;let a;i&&o?typeof i!="string"&&typeof r!="string"&&i.tag===r.tag&&i.key===r.key?a=be(o,i,r,t,s):(a=U(r,t,s,e.host instanceof Element?e.host.namespaceURI??null:null),e.replaceChild(a,o)):(a=U(r,t,s,e.host instanceof Element?e.host.namespaceURI??null:null),e.firstChild?e.replaceChild(a,e.firstChild):e.appendChild(a));const u=[];for(let d=0;d<e.childNodes.length;d++){const E=e.childNodes[d];E!==a&&E.nodeName!=="STYLE"&&(ie(E,s),u.push(E))}u.forEach(d=>e.removeChild(d)),e._prevVNode=r,e._prevDom=a}const Se=[],Ke=new WeakMap,ve=new WeakMap;function _t(e,n){ve.has(e)||ve.set(e,new Set),ve.get(e).add(n)}function At(e,n){const t=ve.get(e);t&&t.delete(n)}function kt(e,n,t,s,r,i,o,a){if(e){Se.push(t);try{const u=n.render(t);if(u instanceof Promise){i(!0),u.then(d=>{i(!1),o(null),Ve(e,d,t,s,r),a(e.innerHTML)}).catch(d=>{i(!1),o(d)});return}Ve(e,u,t,s,r),a(e.innerHTML)}finally{Se.pop()}}}function Ve(e,n,t,s,r){e&&(Ct(e,Array.isArray(n)?n:[n],t,s),r(e.innerHTML))}function Tt(e,n,t,s,r,i,o){if(i!==null&&clearTimeout(i),Date.now()-n<16){if(r(t+1),t===15)j.devWarn(`⚠️ Component is re-rendering rapidly. This might indicate:
2
2
  Common causes:
3
3
  • Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
4
4
  • State modification during render
@@ -1,8 +1,8 @@
1
1
  import { g as U, t as J, i as P, s as Re, a as H, b as F, d as D, f as q, T as gt, h as Ze, S as bt, j as at, k as Xe, l as Ce, m as Qe, n as Et } from "./namespace-helpers-Vwt2Fzds.js";
2
2
  import { c as En, r as Sn, u as vn, w as _n } from "./namespace-helpers-Vwt2Fzds.js";
3
3
  import { d as W, a as Q } from "./logger-BpibrmKL.js";
4
- import { j as St, g as vt, a as je, b as pe, m as ke, s as _t, c as et } from "./transitions-Dnvv4N7o.js";
5
- import { d as kn } from "./transitions-Dnvv4N7o.js";
4
+ import { j as St, g as vt, a as je, b as pe, m as ke, s as _t, c as et } from "./transitions-CZ21fzhh.js";
5
+ import { d as kn } from "./transitions-CZ21fzhh.js";
6
6
  function Ct(e, n, t) {
7
7
  if (t)
8
8
  for (const [s, r] of Object.entries(t)) {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./custom-elements-runtime.directives.cjs.js");const t=require("./transitions-BAjG4ZyQ.cjs");exports.Transition=t.Transition;exports.TransitionGroup=t.TransitionGroup;exports.createTransitionPreset=t.createTransitionPreset;exports.getTransitionStyleSheet=t.getTransitionStyleSheet;exports.transitionPresets=t.transitionPresets;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./custom-elements-runtime.directives.cjs.js");const t=require("./transitions-RXe2brRm.cjs");exports.Transition=t.Transition;exports.TransitionGroup=t.TransitionGroup;exports.createTransitionPreset=t.createTransitionPreset;exports.getTransitionStyleSheet=t.getTransitionStyleSheet;exports.transitionPresets=t.transitionPresets;
2
2
  //# sourceMappingURL=custom-elements-runtime.transitions.cjs.js.map
@@ -1,5 +1,5 @@
1
1
  import "./custom-elements-runtime.directives.es.js";
2
- import { T as r, e as a, f as i, b as n, t as o } from "./transitions-Dnvv4N7o.js";
2
+ import { T as r, e as a, f as i, b as n, t as o } from "./transitions-CZ21fzhh.js";
3
3
  export {
4
4
  r as Transition,
5
5
  a as TransitionGroup,
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- :root,:host{--cer-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--cer-font-serif: ui-serif, Georgia, "Times New Roman", Times, serif;--cer-font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace;--cer-outline-style: solid;--cer-color-transparent: transparent;--cer-color-current: currentColor;--cer-color-black: #000000;--cer-color-white: #ffffff;--cer-color-inherit: inherit;--cer-color-neutral-50: #fafafa;--cer-color-neutral-100: #f4f4f5;--cer-color-neutral-200: #e4e4e7;--cer-color-neutral-300: #d4d4d8;--cer-color-neutral-400: #9f9fa9;--cer-color-neutral-500: #71717b;--cer-color-neutral-600: #52525c;--cer-color-neutral-700: #3f3f46;--cer-color-neutral-800: #27272a;--cer-color-neutral-900: #18181b;--cer-color-neutral-950: #09090b;--cer-color-primary-50: #eff6ff;--cer-color-primary-100: #dbeafe;--cer-color-primary-200: #bfdbfe;--cer-color-primary-300: #93c5fd;--cer-color-primary-400: #60a5fa;--cer-color-primary-500: #3b82f6;--cer-color-primary-600: #2563eb;--cer-color-primary-700: #1d4ed8;--cer-color-primary-800: #1e40af;--cer-color-primary-900: #1e3a8a;--cer-color-primary-950: #172554;--cer-color-secondary-50: #eef2ff;--cer-color-secondary-100: #e0e7ff;--cer-color-secondary-200: #c7d2fe;--cer-color-secondary-300: #a5b4fc;--cer-color-secondary-400: #818cf8;--cer-color-secondary-500: #6366f1;--cer-color-secondary-600: #4f46e5;--cer-color-secondary-700: #4338ca;--cer-color-secondary-800: #3730a3;--cer-color-secondary-900: #312e81;--cer-color-secondary-950: #1e1b4b;--cer-color-success-50: #f0fdf4;--cer-color-success-100: #dcfce7;--cer-color-success-200: #bbf7d0;--cer-color-success-300: #86efac;--cer-color-success-400: #4ade80;--cer-color-success-500: #22c55e;--cer-color-success-600: #16a34a;--cer-color-success-700: #15803d;--cer-color-success-800: #166534;--cer-color-success-900: #14532d;--cer-color-success-950: #052e16;--cer-color-info-50: #f0f9ff;--cer-color-info-100: #e0f2fe;--cer-color-info-200: #bae6fd;--cer-color-info-300: #7dd3fc;--cer-color-info-400: #38bdf8;--cer-color-info-500: #0ea5e9;--cer-color-info-600: #0284c7;--cer-color-info-700: #0369a1;--cer-color-info-800: #075985;--cer-color-info-900: #0c4a6e;--cer-color-info-950: #082f49;--cer-color-warning-50: #fffbeb;--cer-color-warning-100: #fef3c7;--cer-color-warning-200: #fde68a;--cer-color-warning-300: #fcd34d;--cer-color-warning-400: #fbbf24;--cer-color-warning-500: #f59e0b;--cer-color-warning-600: #d97706;--cer-color-warning-700: #b45309;--cer-color-warning-800: #92400e;--cer-color-warning-900: #78350f;--cer-color-warning-950: #451a03;--cer-color-error-50: #fef2f2;--cer-color-error-100: #fee2e2;--cer-color-error-200: #fecaca;--cer-color-error-300: #fca5a5;--cer-color-error-400: #f87171;--cer-color-error-500: #ef4444;--cer-color-error-600: #dc2626;--cer-color-error-700: #b91c1c;--cer-color-error-800: #991b1b;--cer-color-error-900: #7f1d1d;--cer-color-error-950: #450a0a}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}body{margin:0;font-family:var( --cer-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif );line-height:1.5}html{-webkit-text-size-adjust:100%;font-family:var( --cer-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif );line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,h4,h5,h6,p,blockquote,figure,dl,dd{margin:0;font-size:inherit;font-weight:inherit}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}img,svg,video,canvas,audio,iframe,embed,object{display:block;max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;color:inherit;margin:0;padding:0;line-height:inherit;background:transparent;border:none}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;appearance:button;background:none;cursor:pointer}textarea{resize:vertical}::-webkit-input-placeholder,::placeholder{color:inherit;opacity:.5}table{border-collapse:collapse;text-indent:0;border-color:inherit}code,kbd,samp,pre{font-family:var( --cer-font-mono, ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace );font-size:1em}sub,sup{font-size:.75em;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}[hidden]{display:none}[disabled],[aria-disabled=true]{cursor:not-allowed}*:focus-visible{outline:2px solid var(--cer-color-primary-500, #3b82f6);outline-offset:2px}abbr:where([title]){text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}hr{height:0;color:inherit;border-top-width:1px}mark{background-color:var(--cer-color-warning-200, #fde68a);color:inherit}progress{vertical-align:baseline}summary{display:list-item}
1
+ :root{--cer-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--cer-font-serif: ui-serif, Georgia, "Times New Roman", Times, serif;--cer-font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace;--cer-outline-style: solid;--cer-color-transparent: transparent;--cer-color-current: currentColor;--cer-color-black: #000000;--cer-color-white: #ffffff;--cer-color-inherit: inherit;--cer-color-neutral-50: #fafafa;--cer-color-neutral-100: #f4f4f5;--cer-color-neutral-200: #e4e4e7;--cer-color-neutral-300: #d4d4d8;--cer-color-neutral-400: #9f9fa9;--cer-color-neutral-500: #71717b;--cer-color-neutral-600: #52525c;--cer-color-neutral-700: #3f3f46;--cer-color-neutral-800: #27272a;--cer-color-neutral-900: #18181b;--cer-color-neutral-950: #09090b;--cer-color-primary-50: #eff6ff;--cer-color-primary-100: #dbeafe;--cer-color-primary-200: #bfdbfe;--cer-color-primary-300: #93c5fd;--cer-color-primary-400: #60a5fa;--cer-color-primary-500: #3b82f6;--cer-color-primary-600: #2563eb;--cer-color-primary-700: #1d4ed8;--cer-color-primary-800: #1e40af;--cer-color-primary-900: #1e3a8a;--cer-color-primary-950: #172554;--cer-color-secondary-50: #eef2ff;--cer-color-secondary-100: #e0e7ff;--cer-color-secondary-200: #c7d2fe;--cer-color-secondary-300: #a5b4fc;--cer-color-secondary-400: #818cf8;--cer-color-secondary-500: #6366f1;--cer-color-secondary-600: #4f46e5;--cer-color-secondary-700: #4338ca;--cer-color-secondary-800: #3730a3;--cer-color-secondary-900: #312e81;--cer-color-secondary-950: #1e1b4b;--cer-color-success-50: #f0fdf4;--cer-color-success-100: #dcfce7;--cer-color-success-200: #bbf7d0;--cer-color-success-300: #86efac;--cer-color-success-400: #4ade80;--cer-color-success-500: #22c55e;--cer-color-success-600: #16a34a;--cer-color-success-700: #15803d;--cer-color-success-800: #166534;--cer-color-success-900: #14532d;--cer-color-success-950: #052e16;--cer-color-info-50: #f0f9ff;--cer-color-info-100: #e0f2fe;--cer-color-info-200: #bae6fd;--cer-color-info-300: #7dd3fc;--cer-color-info-400: #38bdf8;--cer-color-info-500: #0ea5e9;--cer-color-info-600: #0284c7;--cer-color-info-700: #0369a1;--cer-color-info-800: #075985;--cer-color-info-900: #0c4a6e;--cer-color-info-950: #082f49;--cer-color-warning-50: #fffbeb;--cer-color-warning-100: #fef3c7;--cer-color-warning-200: #fde68a;--cer-color-warning-300: #fcd34d;--cer-color-warning-400: #fbbf24;--cer-color-warning-500: #f59e0b;--cer-color-warning-600: #d97706;--cer-color-warning-700: #b45309;--cer-color-warning-800: #92400e;--cer-color-warning-900: #78350f;--cer-color-warning-950: #451a03;--cer-color-error-50: #fef2f2;--cer-color-error-100: #fee2e2;--cer-color-error-200: #fecaca;--cer-color-error-300: #fca5a5;--cer-color-error-400: #f87171;--cer-color-error-500: #ef4444;--cer-color-error-600: #dc2626;--cer-color-error-700: #b91c1c;--cer-color-error-800: #991b1b;--cer-color-error-900: #7f1d1d;--cer-color-error-950: #450a0a}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}body{margin:0;font-family:var( --cer-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif );line-height:1.5}html{-webkit-text-size-adjust:100%;font-family:var( --cer-font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif );line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,h4,h5,h6,p,blockquote,figure,dl,dd{margin:0;font-size:inherit;font-weight:inherit}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}img,svg,video,canvas,audio,iframe,embed,object{display:block;max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;color:inherit;margin:0;padding:0;line-height:inherit;background:transparent;border:none}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;appearance:button;background:none;cursor:pointer}textarea{resize:vertical}::-webkit-input-placeholder,::placeholder{color:inherit;opacity:.5}table{border-collapse:collapse;text-indent:0;border-color:inherit}code,kbd,samp,pre{font-family:var( --cer-font-mono, ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace );font-size:1em}sub,sup{font-size:.75em;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}[hidden]{display:none}[disabled],[aria-disabled=true]{cursor:not-allowed}*:focus-visible{outline:2px solid var(--cer-color-primary-500, #3b82f6);outline-offset:2px}abbr:where([title]){text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}hr{height:0;color:inherit;border-top-width:1px}mark{background-color:var(--cer-color-warning-200, #fde68a);color:inherit}progress{vertical-align:baseline}summary{display:list-item}
@@ -245,11 +245,23 @@ function Re(e, o, a, t, r, i, l, $) {
245
245
  }
246
246
  const Me = `/*
247
247
  * Custom Elements Variables CSS
248
- * CSS variables for colors and fonts
248
+ * Default fallback values
249
+ *
250
+ * Define your overrides in the document's :root to have them
251
+ * inherited into all Shadow DOM components:
252
+ *
253
+ * <style>
254
+ * :root {
255
+ * --cer-color-primary-500: #8b5cf6;
256
+ * --cer-font-sans: 'Inter', sans-serif;
257
+ * }
258
+ * </style>
259
+ *
260
+ * Note: Only :root is used here (not :host) so document-level
261
+ * overrides will inherit into Shadow DOM and take precedence.
249
262
  */
250
263
 
251
- :root,
252
- :host {
264
+ :root {
253
265
  /* Font families (match runtime defaults in src/lib/runtime/style.ts) */
254
266
  --cer-font-sans:
255
267
  ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
@@ -635,7 +647,7 @@ const ye = _e`
635
647
  ])
636
648
  )
637
649
  ])
638
- ), K = "0.25rem", qe = {
650
+ ), K = "0.25rem", De = {
639
651
  "3xs": 64,
640
652
  "2xs": 72,
641
653
  xs: 80,
@@ -680,7 +692,7 @@ const ye = _e`
680
692
  gap: ["gap"],
681
693
  "gap-x": ["column-gap"],
682
694
  "gap-y": ["row-gap"]
683
- }, De = () => {
695
+ }, qe = () => {
684
696
  const e = {};
685
697
  e["@container"] = "container-type:inline-size;", [
686
698
  "block",
@@ -952,7 +964,7 @@ const ye = _e`
952
964
  "mx-auto": "margin-inline:auto;",
953
965
  "my-auto": "margin-block:auto;"
954
966
  });
955
- for (const [n, c] of Object.entries(qe))
967
+ for (const [n, c] of Object.entries(De))
956
968
  e[`max-w-${n}`] = `max-width:calc(${K} * ${c});`, e[`min-w-${n}`] = `min-width:calc(${K} * ${c});`, e[`w-${n}`] = `width:calc(${K} * ${c});`, e[`max-h-${n}`] = `max-height:calc(${K} * ${c});`, e[`min-h-${n}`] = `min-height:calc(${K} * ${c});`, e[`h-${n}`] = `height:calc(${K} * ${c});`;
957
969
  Object.assign(e, {
958
970
  transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
@@ -1138,7 +1150,7 @@ const ye = _e`
1138
1150
  --cer-prose-invert-links-hover:var(--cer-color-info-100);
1139
1151
  `.replace(/\s+/g, "")
1140
1152
  }), e;
1141
- }, pe = De();
1153
+ }, pe = qe();
1142
1154
  function Ie(e) {
1143
1155
  return /^prose(?:-(sm|lg|xl|2xl))?$/.test(e) ? (We(e), "") : null;
1144
1156
  }
@@ -1154,7 +1166,7 @@ function ke(e) {
1154
1166
  ie
1155
1167
  ) : null;
1156
1168
  }
1157
- function D(e, o) {
1169
+ function q(e, o) {
1158
1170
  let a = 0;
1159
1171
  for (let t = 0; t < e.length; t++) {
1160
1172
  const r = e[t];
@@ -1168,18 +1180,18 @@ function D(e, o) {
1168
1180
  const Se = {
1169
1181
  before: (e, o) => `${e}::before{${o}}`,
1170
1182
  after: (e, o) => `${e}::after{${o}}`,
1171
- hover: (e, o) => `${D(e, ":hover")}{${o}}`,
1172
- focus: (e, o) => `${D(e, ":focus")}{${o}}`,
1173
- active: (e, o) => `${D(e, ":active")}{${o}}`,
1174
- disabled: (e, o) => `${D(e, ":disabled")}{${o}}`,
1175
- visited: (e, o) => `${D(e, ":visited")}{${o}}`,
1176
- checked: (e, o) => `${D(e, ":checked")}{${o}}`,
1177
- first: (e, o) => `${D(e, ":first-child")}{${o}}`,
1178
- last: (e, o) => `${D(e, ":last-child")}{${o}}`,
1179
- odd: (e, o) => `${D(e, ":nth-child(odd)")}{${o}}`,
1180
- even: (e, o) => `${D(e, ":nth-child(even)")}{${o}}`,
1181
- "focus-within": (e, o) => `${D(e, ":focus-within")}{${o}}`,
1182
- "focus-visible": (e, o) => `${D(e, ":focus-visible")}{${o}}`,
1183
+ hover: (e, o) => `${q(e, ":hover")}{${o}}`,
1184
+ focus: (e, o) => `${q(e, ":focus")}{${o}}`,
1185
+ active: (e, o) => `${q(e, ":active")}{${o}}`,
1186
+ disabled: (e, o) => `${q(e, ":disabled")}{${o}}`,
1187
+ visited: (e, o) => `${q(e, ":visited")}{${o}}`,
1188
+ checked: (e, o) => `${q(e, ":checked")}{${o}}`,
1189
+ first: (e, o) => `${q(e, ":first-child")}{${o}}`,
1190
+ last: (e, o) => `${q(e, ":last-child")}{${o}}`,
1191
+ odd: (e, o) => `${q(e, ":nth-child(odd)")}{${o}}`,
1192
+ even: (e, o) => `${q(e, ":nth-child(even)")}{${o}}`,
1193
+ "focus-within": (e, o) => `${q(e, ":focus-within")}{${o}}`,
1194
+ "focus-visible": (e, o) => `${q(e, ":focus-visible")}{${o}}`,
1183
1195
  "group-hover": (e, o) => `.group:hover ${e}{${o}}`,
1184
1196
  "group-focus": (e, o) => `.group:focus ${e}{${o}}`,
1185
1197
  "group-active": (e, o) => `.group:active ${e}{${o}}`,
@@ -1262,7 +1274,7 @@ function de(e) {
1262
1274
  const a = parseInt(o, 16);
1263
1275
  return `${a >> 16 & 255} ${a >> 8 & 255} ${a & 255}`;
1264
1276
  }
1265
- const Ve = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Ne = {
1277
+ const Ne = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Ve = {
1266
1278
  bg: "background-color",
1267
1279
  decoration: "text-decoration-color",
1268
1280
  text: "color",
@@ -1274,12 +1286,12 @@ const Ve = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
1274
1286
  stroke: "stroke"
1275
1287
  };
1276
1288
  function Be(e) {
1277
- const o = Ve.exec(e);
1289
+ const o = Ne.exec(e);
1278
1290
  if (!o) return null;
1279
1291
  const [, a, t, r = "DEFAULT"] = o, i = ze[t]?.[r];
1280
1292
  if (!i) return null;
1281
1293
  if (a === "shadow") return `--cer-shadow-color:${i};`;
1282
- const l = Ne[a];
1294
+ const l = Ve[a];
1283
1295
  return l ? `${l}:${i};` : null;
1284
1296
  }
1285
1297
  function He(e) {
@@ -1550,7 +1562,7 @@ function Ge(e) {
1550
1562
  const v = Se[s];
1551
1563
  typeof v == "function" && (m = v(m, R).split("{")[0]);
1552
1564
  }
1553
- const z = P.join(""), q = L.join("");
1565
+ const z = P.join(""), D = L.join("");
1554
1566
  function I(s, b) {
1555
1567
  if (!b) return s;
1556
1568
  let S = 0, v = 0;
@@ -1577,10 +1589,10 @@ function Ge(e) {
1577
1589
  if (P.length === 0)
1578
1590
  m = m.replace(
1579
1591
  d,
1580
- b + v + q + S
1592
+ b + v + D + S
1581
1593
  );
1582
1594
  else {
1583
- const u = I(S, q);
1595
+ const u = I(S, D);
1584
1596
  m = m.replace(
1585
1597
  d,
1586
1598
  b + v + u
@@ -1590,27 +1602,27 @@ function Ge(e) {
1590
1602
  m = m.replace(
1591
1603
  d,
1592
1604
  `${M}${d + z}`
1593
- ), q && (m = m.replace(d, `${d}${q}`));
1605
+ ), D && (m = m.replace(d, `${d}${D}`));
1594
1606
  else
1595
1607
  m = m.replace(
1596
1608
  d,
1597
- d + z + q
1609
+ d + z + D
1598
1610
  );
1599
1611
  m = m.replace(new RegExp(d, "g"), A);
1600
- const N = "__CE_COLOR_MIX_SPLIT__", J = R.includes(N) ? R.split(N).map((s) => `${m}{${s}}`) : [`${m}{${R}}`], Q = E.filter(
1612
+ const V = "__CE_COLOR_MIX_SPLIT__", J = R.includes(V) ? R.split(V).map((s) => `${m}{${s}}`) : [`${m}{${R}}`], Q = E.filter(
1601
1613
  (s) => oe.includes(s)
1602
1614
  ), X = E.filter(
1603
1615
  (s) => s.startsWith("@") && (le.includes(s.slice(1)) || s.match(/^@\[.+\]$/))
1604
- ), B = Q.length ? Q[Q.length - 1] : null, V = X.length ? X[X.length - 1] : null, Z = E.includes("dark");
1616
+ ), B = Q.length ? Q[Q.length - 1] : null, N = X.length ? X[X.length - 1] : null, Z = E.includes("dark");
1605
1617
  let w = "", H = "";
1606
- if (Z && B ? w = `@media (prefers-color-scheme: dark) and ${re[B]}` : Z ? w = "@media (prefers-color-scheme: dark)" : B && (w = `@media ${re[B]}`), V)
1607
- if (V.startsWith("@[") && V.endsWith("]")) {
1608
- const s = V.slice(2, -1);
1618
+ if (Z && B ? w = `@media (prefers-color-scheme: dark) and ${re[B]}` : Z ? w = "@media (prefers-color-scheme: dark)" : B && (w = `@media ${re[B]}`), N)
1619
+ if (N.startsWith("@[") && N.endsWith("]")) {
1620
+ const s = N.slice(2, -1);
1609
1621
  if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(s))
1610
1622
  return null;
1611
1623
  H = `@container (min-width:${s})`;
1612
1624
  } else {
1613
- const s = V.slice(1);
1625
+ const s = N.slice(1);
1614
1626
  H = `@container ${je[s] || `(min-width:${s})`}`;
1615
1627
  }
1616
1628
  const $e = (s) => w && H ? `${w}${H}{${s}}` : w ? `${w}{${s}}` : H ? `${H}{${s}}` : s;
@@ -1663,12 +1675,12 @@ function Ge(e) {
1663
1675
  "g"
1664
1676
  ),
1665
1677
  `.${P}`
1666
- ), z = /(.+?)\s+(.+?)\{([^}]+)\}/g, q = [...M.matchAll(z)];
1667
- if (q.length === 0) {
1678
+ ), z = /(.+?)\s+(.+?)\{([^}]+)\}/g, D = [...M.matchAll(z)];
1679
+ if (D.length === 0) {
1668
1680
  r[0].push(C);
1669
1681
  continue;
1670
1682
  }
1671
- const I = $(m), N = {
1683
+ const I = $(m), V = {
1672
1684
  hover: ":hover",
1673
1685
  focus: ":focus",
1674
1686
  active: ":active",
@@ -1681,23 +1693,23 @@ function Ge(e) {
1681
1693
  even: ":nth-child(even)",
1682
1694
  "focus-within": ":focus-within",
1683
1695
  "focus-visible": ":focus-visible"
1684
- }, J = [], Q = [], X = [], B = [], V = [];
1696
+ }, J = [], Q = [], X = [], B = [], N = [];
1685
1697
  let Z = !1;
1686
1698
  for (const w of m)
1687
- w.startsWith("group-") || w.startsWith("peer-") ? J.push(w) : w === "dark" || w === "dark-class" ? Z = !0 : oe.includes(w) ? B.push(w) : w.startsWith("@") && (le.includes(w.slice(1)) || w.match(/^@\[.+\]$/)) ? V.push(w) : w.startsWith("[") && w.endsWith("]") ? X.push(w) : (N[w] || Se[w]) && Q.push(w);
1688
- for (const w of q) {
1699
+ w.startsWith("group-") || w.startsWith("peer-") ? J.push(w) : w === "dark" || w === "dark-class" ? Z = !0 : oe.includes(w) ? B.push(w) : w.startsWith("@") && (le.includes(w.slice(1)) || w.match(/^@\[.+\]$/)) ? N.push(w) : w.startsWith("[") && w.endsWith("]") ? X.push(w) : (V[w] || Se[w]) && Q.push(w);
1700
+ for (const w of D) {
1689
1701
  const [, H, $e, s] = w;
1690
1702
  let b = `${H} ${$e}`;
1691
1703
  for (const v of J)
1692
1704
  if (v.startsWith("group-")) {
1693
1705
  const u = v.slice(6);
1694
- b = `.group${N[u] || `:${u}`} ${b}`;
1706
+ b = `.group${V[u] || `:${u}`} ${b}`;
1695
1707
  } else if (v.startsWith("peer-")) {
1696
1708
  const u = v.slice(5);
1697
- b = `.peer${N[u] || `:${u}`}~${b}`;
1709
+ b = `.peer${V[u] || `:${u}`}~${b}`;
1698
1710
  }
1699
1711
  if (Q.length > 0) {
1700
- const v = Q.map((u) => N[u] || `:${u}`).join("");
1712
+ const v = Q.map((u) => V[u] || `:${u}`).join("");
1701
1713
  b = `${b}${v}`;
1702
1714
  }
1703
1715
  for (const v of X) {
@@ -1708,8 +1720,8 @@ function Ge(e) {
1708
1720
  }
1709
1721
  }
1710
1722
  let S = `${b}{${s}}`;
1711
- if (Z && (S = `@media (prefers-color-scheme: dark){${S}}`), V.length > 0) {
1712
- const v = V[V.length - 1];
1723
+ if (Z && (S = `@media (prefers-color-scheme: dark){${S}}`), N.length > 0) {
1724
+ const v = N[N.length - 1];
1713
1725
  if (v.startsWith("@[") && v.endsWith("]")) {
1714
1726
  const u = v.slice(2, -1);
1715
1727
  /^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(
@@ -2000,10 +2012,10 @@ function or(e, o) {
2000
2012
  const P = f || (r ? `transition-group-${r}` : "transition-group"), L = [];
2001
2013
  for (const z of i ? o : [])
2002
2014
  if (z && typeof z == "object" && z.tag === "#anchor") {
2003
- const q = Array.isArray(z.children) ? z.children : [];
2004
- for (const I of q)
2015
+ const D = Array.isArray(z.children) ? z.children : [];
2016
+ for (const I of D)
2005
2017
  if (I && typeof I == "object") {
2006
- const N = {
2018
+ const V = {
2007
2019
  ...I,
2008
2020
  key: z.key || I.key,
2009
2021
  props: {
@@ -2012,14 +2024,14 @@ function or(e, o) {
2012
2024
  // Preserve original anchor key
2013
2025
  }
2014
2026
  };
2015
- L.push(N);
2027
+ L.push(V);
2016
2028
  } else
2017
2029
  L.push(I);
2018
2030
  } else
2019
2031
  L.push(z);
2020
2032
  const M = (() => {
2021
2033
  if (y)
2022
- return typeof y == "string" ? y : Object.entries(y).map(([z, q]) => `${z}: ${q}`).join("; ");
2034
+ return typeof y == "string" ? y : Object.entries(y).map(([z, D]) => `${z}: ${D}`).join("; ");
2023
2035
  })();
2024
2036
  return {
2025
2037
  tag: a,
@@ -2105,4 +2117,4 @@ export {
2105
2117
  er as s,
2106
2118
  ae as t
2107
2119
  };
2108
- //# sourceMappingURL=transitions-Dnvv4N7o.js.map
2120
+ //# sourceMappingURL=transitions-CZ21fzhh.js.map