smbls 3.14.813 → 3.14.815
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/smbls.cjs +50 -50
- package/dist/smbls.embed.iife.js +10 -10
- package/dist/smbls.esm.js +51 -51
- package/dist/smbls.iife-string.js +2 -2
- package/dist/smbls.iife.js +20 -20
- package/package.json +1 -1
package/dist/smbls.embed.iife.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var SymbolsEmbed=(()=>{var hc=Object.create;var Ne=Object.defineProperty;var gc=Object.getOwnPropertyDescriptor;var yc=Object.getOwnPropertyNames;var mc=Object.getPrototypeOf,bc=Object.prototype.hasOwnProperty;var _c=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var je=(t,e)=>{for(var n in e)Ne(t,n,{get:e[n],enumerable:!0})},bo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of yc(e))!bc.call(t,o)&&o!==n&&Ne(t,o,{get:()=>e[o],enumerable:!(r=gc(e,o))||r.enumerable});return t};var Sc=(t,e,n)=>(n=t!=null?hc(mc(t)):{},bo(e||!t||!t.__esModule?Ne(n,"default",{value:t,enumerable:!0}):n,t)),xc=t=>bo(Ne({},"__esModule",{value:!0}),t);var iu={};je(iu,{FACTORY:()=>tn,REGISTRY:()=>Y,applyExtends:()=>Ee,batch:()=>qe,create:()=>it,createEffect:()=>O,createElement:()=>ou,createSignal:()=>he,createStore:()=>Nt,getActiveConfig:()=>E,mount:()=>su,popConfig:()=>L,pushConfig:()=>F,registerEvent:()=>Ce});var Bn={};je(Bn,{WRITE_JOURNAL:()=>fe,batch:()=>de,createComputed:()=>kc,createEffect:()=>Ac,createSignal:()=>yt,getObserver:()=>Vn,journalWrite:()=>ue,setObserver:()=>wc});var X=null,Ve=0,Fe=[],Vn=()=>X,wc=t=>{X=t},Be=0,Dn=[];function yt(t){let e=new Set;function n(){return X&&(e.add(X),X._sources.add(s)),t}function r(i){i!==t&&(t=i,Rc(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function kc(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){jn(o);let s=X;X=o;try{e=t(),n=!1}finally{X=s}},_notify(){n=!0,r.size>0&&wo(r)},get(){return X&&(r.add(X),X._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}var ut=new Set,Ln=!1,fe=[];function ue(t){fe.push(t),fe.length>32&&fe.shift()}function Ac(t,e){let n=e?.depth??0,r={_sources:new Set,_type:"effect",_depth:n,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(r._disposed)return;jn(r);let o=X;X=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{X=o}},_notify(){r._disposed||(Ve>0?Fe.push(r):Be>0?Dn.push(r):Fn(r))},dispose(){r._disposed=!0,jn(r)}};return r._execute(),r}function de(t){Ve++;try{t()}finally{Ve--,Ve===0&&Oc()}}var Nn=!1,_o=1e3,Cc=8,Ec=256,vc=4;function So(){return typeof performance<"u"?performance.now():Date.now()}function Fn(t){ut.add(t),!Nn&&(Ln||(Ln=!0,queueMicrotask(xo)))}var Yt=[];function Tc(){if(ut.size===1){let[e]=ut;return ut.clear(),e._disposed?0:(e._execute(),1)}Yt.length=0;for(let e of ut)Yt.push(e);ut.clear(),Yt.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<Yt.length;e++){let n=Yt[e];n._disposed||(n._execute(),t++)}return Yt.length=0,t}function xo(t=0,e=0){if(Ln=!1,ut.size===0)return;Nn=!0;let n=So(),r=!1;try{for(;ut.size>0;){if(++t>_o){let o=new Map;for(let c of ut){let f=c._label;if(typeof f=="function")try{f=f()}catch{f="<label error>"}if(f=f||"<unlabeled>",o.set(f,(o.get(f)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,f])=>f>1?`${c} \xD7${f}`:c).join(", "),i=new Map;for(let c of fe)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,f])=>f>1?`${c} \xD7${f}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",_o,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),ut.clear();break}if(e+=Tc(),ut.size>0&&(e>=Ec||t>=vc)&&So()-n>Cc){r=!0,setTimeout(()=>xo(t,e),0);break}}}finally{r||(Nn=!1)}}function Oc(){for(let t=0;t<Fe.length;t++)Fn(Fe[t]);Fe.length=0}function wo(t){Be++;try{for(let e of t)e._notify()}finally{if(Be--,Be===0&&Dn.length>0){let e=Dn.splice(0);for(let n=0;n<e.length;n++)Fn(e[n])}}}function Rc(t){wo(t)}function jn(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Kn={};je(Kn,{RESERVED_STORE_METHODS:()=>pe,STORE_METHOD_NAMES:()=>qn,__resetStateShadowWarnings:()=>$c,createScopeStore:()=>Dc,createStore:()=>We,getSignals:()=>Mc,isStore:()=>Ic,warnStateKeyShadowsMethod:()=>Hn});var mt=Symbol("store"),Ue=Symbol("signals"),qn=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],pe=new Set(qn),Gn=new Set,Wn=(t,e)=>t?t+"."+e:String(e);function Hn(t,e){let n=(e||"")+"::"+t;if(Gn.has(n))return;Gn.add(n);let r=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${r}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${r}.${t}(\u2026)" no longer reaches the store method on this node. Use "${r}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${qn.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function $c(){Gn.clear()}var Un=t=>!t||typeof t!="object"||Array.isArray(t)||t[mt]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!ze(t),Pc=12,ze=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function Ge(t,e,n){if(t===e)return!0;if(n>Pc)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!Ge(t[r],e[r],n+1))return!1;return!0}if(ze(t)&&ze(e)){let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s of r)if(!Object.prototype.hasOwnProperty.call(e,s)||!Ge(t[s],e[s],n+1))return!1;return!0}return!1}function We(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r="");let o={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let b in t){if(b==="__proto__"||!Object.prototype.hasOwnProperty.call(t,b))continue;if(b.startsWith("__")){s[b]=t[b];continue}pe.has(b)&&Hn(b,r);let p=t[b];n<i&&p&&typeof p=="object"&&!Un(p)?(s[b]=p,o[b]=yt(We(p,e,n+1,Wn(r,b)))):(s[b]=p,o[b]=yt(p))}let a=new Proxy(s,{get(b,p){if(p===mt)return!0;if(p===Ue)return o;if(p==="__raw")return b;if(p==="$update")return c;if(p==="$parse")return d;if(p==="$clean")return l;if(p==="$keys")return h;if(p==="$values")return g;if(p==="$replace")return u;if(p==="$add")return y;if(p==="$remove")return m;if(p==="$destroy")return _;if(p==="$quietUpdate")return f;if(pe.has(p)&&!Object.prototype.hasOwnProperty.call(o,p))switch(p){case"update":return c;case"parse":return d;case"clean":return l;case"keys":return h;case"values":return g;case"replace":return u;case"add":return y;case"remove":return m;case"destroy":return _;case"quietUpdate":return f}if(p==="__element")return b.__element;if(p==="parent")return b.parent;if(p==="root")return b.root;if(Object.prototype.hasOwnProperty.call(o,p)){let x=o[p].get();if(x!==void 0||!(p!=="root"&&b.root&&b.root!==a))return x}if(b[p]!==void 0)return b[p];let S=typeof p=="string"&&!p.startsWith("__")&&p!=="then"&&p!=="constructor"&&Vn()!=null;if(p!=="root"&&b.root&&b.root!==a){let x=b.root[p];return S&&!Object.prototype.hasOwnProperty.call(o,p)&&(o[p]=yt(void 0),o[p].get()),x}if(S)return o[p]=yt(void 0),o[p].get()},set(b,p,S){if(p==="__proto__")return!1;if(p==="__element"||p==="parent"||p==="root"||typeof p=="string"&&p.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,p))return b[p]=S,!0;pe.has(p)&&Hn(p,r);let x=Wn(r,p);if(Object.prototype.hasOwnProperty.call(o,p))if(S&&typeof S=="object"&&!Un(S)){if(S===b[p])return!0;let A=o[p].peek(),C=A&&A[mt]?A.$parse():A;if(Ge(S,C,0))return!0;b[p]=S,ue(x),o[p].set(We(S,e,n+1,x))}else{if(Array.isArray(S)&&S!==b[p]&&Array.isArray(o[p].peek())&&Ge(S,o[p].peek(),0))return!0;o[p].peek()!==S&&ue(x),b[p]=S,o[p].set(S)}else b[p]=S,S&&typeof S=="object"&&!Un(S)?o[p]=yt(We(S,e,n+1,x)):o[p]=yt(S);return!0},has(b,p){return typeof p=="string"&&p.charCodeAt(0)===36&&pe.has(p.slice(1))?!0:p in o||p in b},ownKeys(b){return Object.keys(o)},getOwnPropertyDescriptor(b,p){return p in o?{enumerable:!0,configurable:!0,value:o[p].peek()}:Object.getOwnPropertyDescriptor(b,p)},deleteProperty(b,p){return o[p]&&(o[p].peek()!==void 0&&ue(Wn(r,p)),o[p].set(void 0),delete o[p]),delete b[p],!0}});function c(b,p){de(()=>{for(let x in b)x!=="__proto__"&&(a[x]=b[x])});let S=s.__element;return S&&S.onUpdate&&!p?.quiet&&S.onUpdate(S,a,S.context),a}function f(b){return c(b,{quiet:!0})}function d(b){if(b||(b=new Set),b.has(a))return"[Circular]";b.add(a);let p={};for(let S in o){if(S==="parent"||S==="root"||S.startsWith("__"))continue;let x=o[S].peek();x&&x[mt]?p[S]=x.$parse(b):p[S]=x}return p}function l(){return de(()=>{for(let b in o)delete a[b]}),a}function h(){return Object.keys(o)}function g(){return Object.keys(o).map(b=>o[b].peek())}function u(b){return de(()=>{for(let p in o)p in b||delete a[p];for(let p in b)p!=="__proto__"&&(a[p]=b[p])}),a}function y(b,p){let S=Object.prototype.hasOwnProperty.call(o,b)?o[b].peek():s[b];if(Array.isArray(S))return a[b]=[...S,p],a;if(S&&typeof S=="object"&&!Array.isArray(S)){if(ze(p))S[mt]?S.$update(p):a[b]={...S,...p};else{let x=String(Object.keys(S).length);S[mt]?S.$update({[x]:p}):a[b]={...S,[x]:p}}return a}return a[b]=p,a}function m(b){return delete a[b],a}function _(){l(),s.__element=null,s.parent=null}return a}function Ic(t){return t&&t[mt]===!0}function Mc(t){return t[Ue]}function Dc(t,e){let n={},r={};if(t&&typeof t=="object")for(let i in t)r[i]=t[i],n[i]=yt(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(n,i))return n;let a=e;for(;a;){let c=a[Ue];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[mt]?a[zn]:null}return null};return new Proxy(r,{get(i,a){return a===mt?!0:a===Ue?n:a===zn?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(n,a)?n[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let f=o(a);return f?(f===n&&(i[a]=c),f[a].set(c),!0):(i[a]=c,n[a]=yt(c),!0)},has(i,a){if(a in n||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[mt]?c[zn]:null}return!1},ownKeys(){return Object.keys(n)},getOwnPropertyDescriptor(i,a){return a in n?{enumerable:!0,configurable:!0,value:n[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var zn=Symbol("scope.parent");var Lt="3.14.784";var Yn="__SMBLS_SIGNAL_INSTANCES__",He=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[Yn]||(r[Yn]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||Lt),n||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),o};var Zn="__SMBLS_SIGNAL_ENGINE__",ko=(t,e,n)=>{let r=e||Lt,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[Zn];return s&&s.engine&&s.version===r?(He(r,o,!0),s.engine):(s||(o[Zn]={version:r,engine:t}),He(r,o,!1),t)};var K=ko({...Bn,...Kn,VERSION:Lt},Lt),he=K.createSignal,_u=K.createComputed,O=K.createEffect,qe=K.batch,Lc=K.getObserver,Su=K.setObserver,Nt=K.createStore,Ao=K.createScopeStore,V=K.isStore,xu=K.getSignals,wu=K.STORE_METHOD_NAMES,ku=K.RESERVED_STORE_METHODS,Co=K.warnStateKeyShadowsMethod,Au=K.__resetStateShadowWarnings,Cu=K.VERSION;var Qn="http://www.w3.org/2000/svg",tr=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),Nc=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function Xn(t){return Nc.has(t)||tr.has(t)}function er(t){return tr.has(t)}function ge(t){let{tag:e,key:n}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(s){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${n||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=n),typeof e=="string"&&Xn(e))return e;if(!n||typeof n!="string")return"div";let r=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=n.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),Xn(o)&&!r.has(o)?o:"div"}var Eo={};function Jn(t,e){let n=e?.context?.document||globalThis.document;if(!n)return null;if(t==="string")return n.createTextNode(e?.text||"");if(t==="fragment")return n.createDocumentFragment();if(er(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===Qn)return n.createElementNS(Qn,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function ye(t){let e=t.tag=ge(t),r=er(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Qn)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Eo[r];if(s||(s=Eo[r]=Jn(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?Jn(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Y=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]);var me=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),nr=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),rr=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),or=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var sr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",ir=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"],jc=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Vc=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${ir.filter(t=>t!=="auto").map(jc).join("|")})$`),vo=t=>Vc.test(String(t).trim());var dt=globalThis,bt=dt.document;var Ke=t=>typeof dt<"u"&&(dt.Node&&t instanceof dt.Node||dt.Window&&t instanceof dt.Window||t===dt||bt!==void 0&&t===bt);var T=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Ye=t=>typeof t=="number",Zt=t=>typeof t=="function";var B=t=>Array.isArray(t);var wt=t=>t===null?!1:typeof t=="object",kt=t=>t!==void 0,To=t=>t===void 0;var Oo=(t,e=[])=>t.reduce((n,r)=>cr(n,Qt(r,{exclude:e}),e),{});var Fc={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},be=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),Bc=(t,e)=>{if(!t||!t.__ref)return!0;let n=t;for(;n;){if(n.allowRuntimeTemplates===!0)return!0;let r=n.__ref&&n.__ref.__authoredTemplates;if(r&&r.has(e))return!0;n=n.parent}return!1};function J(t,e,n={}){let{bracketsLength:r=2}=n,o=r===3?"{{{":"{{";if(!t.includes(o)||!Bc(this,t))return t;let s=Fc[r],i=e||this.state||{},a=this;return t.replace(s,(c,f,d,l)=>{let h=d.trim();if(l){let g=a?.context,u=g?.functions?.[l]||g?.utils?.[l]||g?.methods?.[l]||g?.snippets?.[l]||a?.[l];if(u&&typeof u=="function")try{return String(u.call(a,h)??"")}catch{return""}return""}if(f){let g=(f.match(/\.\.\//g)||[]).length,u=i;for(let m=0;m<g;m++){if(!u||!u.parent)return"";u=u.parent}if(h==="parent")return String(u.value??"");let y=be(u,h);return y!=null&&typeof y=="object"?"":String(y??"")}else{let g=be(i,h);if(g!=null&&typeof g!="object")return String(g);let u=a?.context?.polyglot;if(u?.translations){let y=i?.root?.lang||i?.lang||a?.context?.state?.lang||u.defaultLang||"en",m=u.translations[y];if(m){let b=be(m,h);if(b!=null&&typeof b!="object")return String(b);for(let p in m){let S=m[p];if(S&&typeof S=="object"&&!Array.isArray(S)){let x=be(S,h);if(x!=null&&typeof x!="object")return String(x)}}}let _=be(u.translations,h);if(_!=null&&typeof _!="object")return String(_)}return""}})}var Wc=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),Uc=new Set(["update","__element"]),zc=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]);var Ro=new Set(["log","warn","error","verbose"]);var $o=new Set(["node","context","extends","__element","__ref",...zc,...Wc,...Uc]);var Io=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ar=(t,e,n,r)=>{if(Zt(t))return e?typeof t.call!="function"?t:t.call(e,e,n||e.state,r||e.context):void 0;if(t!=null&&e?.context?.plugins&&(B(t)||T(t)&&!Ke(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ar(i,e,n,r)}}return t};var cr=(t,e,n=$o)=>Mo(t,e,n,null),Mo=(t,e,n,r)=>{if(t===e)return t;if(r){for(let s=0;s<r.length;s+=2)if(r[s]===t&&r[s+1]===e)return t}let o=n instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||Io(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],a=e[s];if(wt(i)&&wt(a)){let c=r||[];c.push(t,e),Mo(i,a,n,c),c.length-=2}else i===void 0&&(t[s]=a)}return t};var Qt=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!wt(t)||Ke(t))return t;if(s.has(t))return s.get(t);let a=n instanceof Set?n:n.length>3?new Set(n):null,c=l=>a?a.has(l):n.includes(l),f=B(t)?[]:{};s.set(t,f);let d=[[t,f]];for(;d.length;){let[l,h]=d.pop();for(let g in l){if(!Object.prototype.hasOwnProperty.call(l,g)||Io(g)||g==="__proto__"||c(g))continue;let u=l[g];if(!(r&&u===void 0)&&!(o&&u===null)){if(Ke(u)){h[g]=u;continue}if(i&&g==="extends"&&B(u)){h[g]=Oo(u,n);continue}if(Zt(u)){h[g]=u;continue}if(wt(u))if(s.has(u))h[g]=s.get(u);else{let y=B(u)?[]:{};s.set(u,y),h[g]=y,d.push([u,y])}else h[g]=u}}}return f};var Hc=(t,e)=>{let n=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!n)return null;let r=n[0].length,o=[],s=r,i=1,a=null,c=t.length,f=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let l=t[s];if(l==="/"&&t[s+1]==="/"){let h=t.indexOf(`
|
|
2
|
-
`,s);s=
|
|
3
|
-
`)){u++;break}u++}o.push([
|
|
1
|
+
"use strict";var SymbolsEmbed=(()=>{var hc=Object.create;var Ne=Object.defineProperty;var gc=Object.getOwnPropertyDescriptor;var yc=Object.getOwnPropertyNames;var mc=Object.getPrototypeOf,bc=Object.prototype.hasOwnProperty;var _c=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var je=(t,e)=>{for(var n in e)Ne(t,n,{get:e[n],enumerable:!0})},bo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of yc(e))!bc.call(t,o)&&o!==n&&Ne(t,o,{get:()=>e[o],enumerable:!(r=gc(e,o))||r.enumerable});return t};var Sc=(t,e,n)=>(n=t!=null?hc(mc(t)):{},bo(e||!t||!t.__esModule?Ne(n,"default",{value:t,enumerable:!0}):n,t)),xc=t=>bo(Ne({},"__esModule",{value:!0}),t);var iu={};je(iu,{FACTORY:()=>tn,REGISTRY:()=>Y,applyExtends:()=>Ee,batch:()=>qe,create:()=>it,createEffect:()=>O,createElement:()=>ou,createSignal:()=>he,createStore:()=>Nt,getActiveConfig:()=>E,mount:()=>su,popConfig:()=>L,pushConfig:()=>F,registerEvent:()=>Ce});var Bn={};je(Bn,{WRITE_JOURNAL:()=>fe,batch:()=>de,createComputed:()=>kc,createEffect:()=>Ac,createSignal:()=>yt,getObserver:()=>Vn,journalWrite:()=>ue,setObserver:()=>wc});var X=null,Ve=0,Fe=[],Vn=()=>X,wc=t=>{X=t},Be=0,Dn=[];function yt(t){let e=new Set;function n(){return X&&(e.add(X),X._sources.add(s)),t}function r(i){i!==t&&(t=i,Rc(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function kc(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){jn(o);let s=X;X=o;try{e=t(),n=!1}finally{X=s}},_notify(){n=!0,r.size>0&&wo(r)},get(){return X&&(r.add(X),X._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}var ut=new Set,Ln=!1,fe=[];function ue(t){fe.push(t),fe.length>32&&fe.shift()}function Ac(t,e){let n=e?.depth??0,r={_sources:new Set,_type:"effect",_depth:n,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(r._disposed)return;jn(r);let o=X;X=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{X=o}},_notify(){r._disposed||(Ve>0?Fe.push(r):Be>0?Dn.push(r):Fn(r))},dispose(){r._disposed=!0,jn(r)}};return r._execute(),r}function de(t){Ve++;try{t()}finally{Ve--,Ve===0&&Oc()}}var Nn=!1,_o=1e3,Cc=8,Ec=256,vc=4;function So(){return typeof performance<"u"?performance.now():Date.now()}function Fn(t){ut.add(t),!Nn&&(Ln||(Ln=!0,queueMicrotask(xo)))}var Yt=[];function Tc(){if(ut.size===1){let[e]=ut;return ut.clear(),e._disposed?0:(e._execute(),1)}Yt.length=0;for(let e of ut)Yt.push(e);ut.clear(),Yt.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<Yt.length;e++){let n=Yt[e];n._disposed||(n._execute(),t++)}return Yt.length=0,t}function xo(t=0,e=0){if(Ln=!1,ut.size===0)return;Nn=!0;let n=So(),r=!1;try{for(;ut.size>0;){if(++t>_o){let o=new Map;for(let c of ut){let f=c._label;if(typeof f=="function")try{f=f()}catch{f="<label error>"}if(f=f||"<unlabeled>",o.set(f,(o.get(f)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,f])=>f>1?`${c} \xD7${f}`:c).join(", "),i=new Map;for(let c of fe)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,f])=>f>1?`${c} \xD7${f}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",_o,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),ut.clear();break}if(e+=Tc(),ut.size>0&&(e>=Ec||t>=vc)&&So()-n>Cc){r=!0,setTimeout(()=>xo(t,e),0);break}}}finally{r||(Nn=!1)}}function Oc(){for(let t=0;t<Fe.length;t++)Fn(Fe[t]);Fe.length=0}function wo(t){Be++;try{for(let e of t)e._notify()}finally{if(Be--,Be===0&&Dn.length>0){let e=Dn.splice(0);for(let n=0;n<e.length;n++)Fn(e[n])}}}function Rc(t){wo(t)}function jn(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Kn={};je(Kn,{RESERVED_STORE_METHODS:()=>pe,STORE_METHOD_NAMES:()=>qn,__resetStateShadowWarnings:()=>$c,createScopeStore:()=>Dc,createStore:()=>We,getSignals:()=>Mc,isStore:()=>Ic,warnStateKeyShadowsMethod:()=>Hn});var mt=Symbol("store"),Ue=Symbol("signals"),qn=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],pe=new Set(qn),Gn=new Set,Wn=(t,e)=>t?t+"."+e:String(e);function Hn(t,e){let n=(e||"")+"::"+t;if(Gn.has(n))return;Gn.add(n);let r=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${r}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${r}.${t}(\u2026)" no longer reaches the store method on this node. Use "${r}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${qn.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function $c(){Gn.clear()}var Un=t=>!t||typeof t!="object"||Array.isArray(t)||t[mt]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!ze(t),Pc=12,ze=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function Ge(t,e,n){if(t===e)return!0;if(n>Pc)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!Ge(t[r],e[r],n+1))return!1;return!0}if(ze(t)&&ze(e)){let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s of r)if(!Object.prototype.hasOwnProperty.call(e,s)||!Ge(t[s],e[s],n+1))return!1;return!0}return!1}function We(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r="");let o={},s={},i=m=>Object.prototype.hasOwnProperty.call(o,m)&&Object.prototype.hasOwnProperty.call(s,m),a=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let m in t){if(m==="__proto__"||!Object.prototype.hasOwnProperty.call(t,m))continue;if(m.startsWith("__")){s[m]=t[m];continue}pe.has(m)&&Hn(m,r);let _=t[m];n<a&&_&&typeof _=="object"&&!Un(_)?(s[m]=_,o[m]=yt(We(_,e,n+1,Wn(r,m)))):(s[m]=_,o[m]=yt(_))}let c=new Proxy(s,{get(m,_){if(_===mt)return!0;if(_===Ue)return o;if(_==="__raw")return m;if(_==="$update")return f;if(_==="$parse")return l;if(_==="$clean")return p;if(_==="$keys")return h;if(_==="$values")return u;if(_==="$replace")return g;if(_==="$add")return y;if(_==="$remove")return b;if(_==="$destroy")return x;if(_==="$quietUpdate")return d;if(pe.has(_)&&!Object.prototype.hasOwnProperty.call(o,_))switch(_){case"update":return f;case"parse":return l;case"clean":return p;case"keys":return h;case"values":return u;case"replace":return g;case"add":return y;case"remove":return b;case"destroy":return x;case"quietUpdate":return d}if(_==="__element")return m.__element;if(_==="parent")return m.parent;if(_==="root")return m.root;if(Object.prototype.hasOwnProperty.call(o,_)){let k=o[_].get();if(k!==void 0||!(_!=="root"&&m.root&&m.root!==c))return k}if(m[_]!==void 0)return m[_];let S=typeof _=="string"&&!_.startsWith("__")&&_!=="then"&&_!=="constructor"&&Vn()!=null;if(_!=="root"&&m.root&&m.root!==c){let k=m.root[_];return S&&!Object.prototype.hasOwnProperty.call(o,_)&&(o[_]=yt(void 0),o[_].get()),k}if(S)return o[_]=yt(void 0),o[_].get()},set(m,_,S){if(_==="__proto__")return!1;if(_==="__element"||_==="parent"||_==="root"||typeof _=="string"&&_.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,_))return m[_]=S,!0;pe.has(_)&&Hn(_,r);let k=Wn(r,_);if(Object.prototype.hasOwnProperty.call(o,_))if(S&&typeof S=="object"&&!Un(S)){if(S===m[_])return!0;let C=o[_].peek(),D=C&&C[mt]?C.$parse():C;if(Ge(S,D,0))return!0;m[_]=S,ue(k),o[_].set(We(S,e,n+1,k))}else{if(Array.isArray(S)&&S!==m[_]&&Array.isArray(o[_].peek())&&Ge(S,o[_].peek(),0))return!0;o[_].peek()!==S&&ue(k),m[_]=S,o[_].set(S)}else m[_]=S,S&&typeof S=="object"&&!Un(S)?o[_]=yt(We(S,e,n+1,k)):o[_]=yt(S);return!0},has(m,_){return typeof _=="string"&&_.charCodeAt(0)===36&&pe.has(_.slice(1))?!0:_ in m},ownKeys(m){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(m,_){return i(_)?{enumerable:!0,configurable:!0,value:o[_].peek()}:Object.getOwnPropertyDescriptor(m,_)},deleteProperty(m,_){return o[_]&&(o[_].peek()!==void 0&&ue(Wn(r,_)),o[_].set(void 0),delete o[_]),delete m[_],!0}});function f(m,_){de(()=>{for(let k in m)k!=="__proto__"&&(c[k]=m[k])});let S=s.__element;return S&&S.onUpdate&&!_?.quiet&&S.onUpdate(S,c,S.context),c}function d(m){return f(m,{quiet:!0})}function l(m){if(m||(m=new Set),m.has(c))return"[Circular]";m.add(c);let _={};for(let S in o){if(S==="parent"||S==="root"||S.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,S))continue;let k=o[S].peek();k&&k[mt]?_[S]=k.$parse(m):_[S]=k}return _}function p(){return de(()=>{for(let m in o)delete c[m]}),c}function h(){return Object.keys(o).filter(i)}function u(){return Object.keys(o).filter(i).map(m=>o[m].peek())}function g(m){return de(()=>{for(let _ in o)_ in m||delete c[_];for(let _ in m)_!=="__proto__"&&(c[_]=m[_])}),c}function y(m,_){let S=Object.prototype.hasOwnProperty.call(o,m)?o[m].peek():s[m];if(Array.isArray(S))return c[m]=[...S,_],c;if(S&&typeof S=="object"&&!Array.isArray(S)){if(ze(_))S[mt]?S.$update(_):c[m]={...S,..._};else{let k=String(Object.keys(S).length);S[mt]?S.$update({[k]:_}):c[m]={...S,[k]:_}}return c}return c[m]=_,c}function b(m){return delete c[m],c}function x(){p(),s.__element=null,s.parent=null}return c}function Ic(t){return t&&t[mt]===!0}function Mc(t){return t[Ue]}function Dc(t,e){let n={},r={};if(t&&typeof t=="object")for(let i in t)r[i]=t[i],n[i]=yt(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(n,i))return n;let a=e;for(;a;){let c=a[Ue];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[mt]?a[zn]:null}return null};return new Proxy(r,{get(i,a){return a===mt?!0:a===Ue?n:a===zn?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(n,a)?n[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let f=o(a);return f?(f===n&&(i[a]=c),f[a].set(c),!0):(i[a]=c,n[a]=yt(c),!0)},has(i,a){if(a in n||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[mt]?c[zn]:null}return!1},ownKeys(){return Object.keys(n)},getOwnPropertyDescriptor(i,a){return a in n?{enumerable:!0,configurable:!0,value:n[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var zn=Symbol("scope.parent");var Lt="3.14.785";var Yn="__SMBLS_SIGNAL_INSTANCES__",He=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[Yn]||(r[Yn]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||Lt),n||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),o};var Zn="__SMBLS_SIGNAL_ENGINE__",ko=(t,e,n)=>{let r=e||Lt,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[Zn];return s&&s.engine&&s.version===r?(He(r,o,!0),s.engine):(s||(o[Zn]={version:r,engine:t}),He(r,o,!1),t)};var K=ko({...Bn,...Kn,VERSION:Lt},Lt),he=K.createSignal,_u=K.createComputed,O=K.createEffect,qe=K.batch,Lc=K.getObserver,Su=K.setObserver,Nt=K.createStore,Ao=K.createScopeStore,V=K.isStore,xu=K.getSignals,wu=K.STORE_METHOD_NAMES,ku=K.RESERVED_STORE_METHODS,Co=K.warnStateKeyShadowsMethod,Au=K.__resetStateShadowWarnings,Cu=K.VERSION;var Qn="http://www.w3.org/2000/svg",tr=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),Nc=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function Xn(t){return Nc.has(t)||tr.has(t)}function er(t){return tr.has(t)}function ge(t){let{tag:e,key:n}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(s){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${n||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=n),typeof e=="string"&&Xn(e))return e;if(!n||typeof n!="string")return"div";let r=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=n.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),Xn(o)&&!r.has(o)?o:"div"}var Eo={};function Jn(t,e){let n=e?.context?.document||globalThis.document;if(!n)return null;if(t==="string")return n.createTextNode(e?.text||"");if(t==="fragment")return n.createDocumentFragment();if(er(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===Qn)return n.createElementNS(Qn,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function ye(t){let e=t.tag=ge(t),r=er(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Qn)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Eo[r];if(s||(s=Eo[r]=Jn(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?Jn(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Y=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]);var me=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),nr=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),rr=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),or=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var sr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",ir=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"],jc=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Vc=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${ir.filter(t=>t!=="auto").map(jc).join("|")})$`),vo=t=>Vc.test(String(t).trim());var dt=globalThis,bt=dt.document;var Ke=t=>typeof dt<"u"&&(dt.Node&&t instanceof dt.Node||dt.Window&&t instanceof dt.Window||t===dt||bt!==void 0&&t===bt);var T=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Ye=t=>typeof t=="number",Zt=t=>typeof t=="function";var B=t=>Array.isArray(t);var wt=t=>t===null?!1:typeof t=="object",kt=t=>t!==void 0,To=t=>t===void 0;var Oo=(t,e=[])=>t.reduce((n,r)=>cr(n,Qt(r,{exclude:e}),e),{});var Fc={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},be=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),Bc=(t,e)=>{if(!t||!t.__ref)return!0;let n=t;for(;n;){if(n.allowRuntimeTemplates===!0)return!0;let r=n.__ref&&n.__ref.__authoredTemplates;if(r&&r.has(e))return!0;n=n.parent}return!1};function J(t,e,n={}){let{bracketsLength:r=2}=n,o=r===3?"{{{":"{{";if(!t.includes(o)||!Bc(this,t))return t;let s=Fc[r],i=e||this.state||{},a=this;return t.replace(s,(c,f,d,l)=>{let p=d.trim();if(l){let h=a?.context,u=h?.functions?.[l]||h?.utils?.[l]||h?.methods?.[l]||h?.snippets?.[l]||a?.[l];if(u&&typeof u=="function")try{return String(u.call(a,p)??"")}catch{return""}return""}if(f){let h=(f.match(/\.\.\//g)||[]).length,u=i;for(let y=0;y<h;y++){if(!u||!u.parent)return"";u=u.parent}if(p==="parent")return String(u.value??"");let g=be(u,p);return g!=null&&typeof g=="object"?"":String(g??"")}else{let h=be(i,p);if(h!=null&&typeof h!="object")return String(h);let u=a?.context?.polyglot;if(u?.translations){let g=i?.root?.lang||i?.lang||a?.context?.state?.lang||u.defaultLang||"en",y=u.translations[g];if(y){let x=be(y,p);if(x!=null&&typeof x!="object")return String(x);for(let m in y){let _=y[m];if(_&&typeof _=="object"&&!Array.isArray(_)){let S=be(_,p);if(S!=null&&typeof S!="object")return String(S)}}}let b=be(u.translations,p);if(b!=null&&typeof b!="object")return String(b)}return""}})}var Wc=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),Uc=new Set(["update","__element"]),zc=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]);var Ro=new Set(["log","warn","error","verbose"]);var $o=new Set(["node","context","extends","__element","__ref",...zc,...Wc,...Uc]);var Io=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ar=(t,e,n,r)=>{if(Zt(t))return e?typeof t.call!="function"?t:t.call(e,e,n||e.state,r||e.context):void 0;if(t!=null&&e?.context?.plugins&&(B(t)||T(t)&&!Ke(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ar(i,e,n,r)}}return t};var cr=(t,e,n=$o)=>Mo(t,e,n,null),Mo=(t,e,n,r)=>{if(t===e)return t;if(r){for(let s=0;s<r.length;s+=2)if(r[s]===t&&r[s+1]===e)return t}let o=n instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||Io(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],a=e[s];if(wt(i)&&wt(a)){let c=r||[];c.push(t,e),Mo(i,a,n,c),c.length-=2}else i===void 0&&(t[s]=a)}return t};var Qt=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!wt(t)||Ke(t))return t;if(s.has(t))return s.get(t);let a=n instanceof Set?n:n.length>3?new Set(n):null,c=l=>a?a.has(l):n.includes(l),f=B(t)?[]:{};s.set(t,f);let d=[[t,f]];for(;d.length;){let[l,p]=d.pop();for(let h in l){if(!Object.prototype.hasOwnProperty.call(l,h)||Io(h)||h==="__proto__"||c(h))continue;let u=l[h];if(!(r&&u===void 0)&&!(o&&u===null)){if(Ke(u)){p[h]=u;continue}if(i&&h==="extends"&&B(u)){p[h]=Oo(u,n);continue}if(Zt(u)){p[h]=u;continue}if(wt(u))if(s.has(u))p[h]=s.get(u);else{let g=B(u)?[]:{};s.set(u,g),p[h]=g,d.push([u,g])}else p[h]=u}}}return f};var Hc=(t,e)=>{let n=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!n)return null;let r=n[0].length,o=[],s=r,i=1,a=null,c=t.length,f=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let l=t[s];if(l==="/"&&t[s+1]==="/"){let p=t.indexOf(`
|
|
2
|
+
`,s);s=p===-1?c:p;continue}if(l==="/"&&t[s+1]==="*"){let p=t.indexOf("*/",s+2);s=p===-1?c:p+2;continue}if(l==='"'||l==="'"||l==="`"){let p=l;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===p){s++;break}if(p==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let h=1;for(;s<c&&h>0;)t[s]==="{"?h++:t[s]==="}"&&h--,s++;continue}s++}continue}if(l==="{"){i++,s++;continue}if(l==="}"){i--,s++;continue}if(i===1&&f.test(t.slice(s))){let p=s,h=0,u=s;for(;u<c;){let g=t[u];if(g==='"'||g==="'"||g==="`"){let y=g;for(u++;u<c;){if(t[u]==="\\"){u+=2;continue}if(t[u]===y){u++;break}u++}continue}if(g==="("||g==="["||g==="{"){h++,u++;continue}if(g===")"||g==="]"||g==="}"){if(h===0)break;h--,u++;continue}if(h===0&&(g===";"||g===`
|
|
3
|
+
`)){u++;break}u++}o.push([p,u]),s=u;continue}s++}if(!o.length)return null;let d=t;for(let l=o.length-1;l>=0;l--)d=d.slice(0,o[l][0])+d.slice(o[l][1]);return d},qc=(t,e,n,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return n.window.eval(`(${t})`)}catch(s){let i=s&&s.message?s.message:String(s),a=/await is only valid in async/.test(i),c=/Identifier '([^']+)' has already been declared/.exec(i),f=null;if(a){let d=String(t).trim();if(/^function[\s(]/.test(d))try{f=n.window.eval("(async "+d+")")}catch{}}else if(c){let d=String(t),l=c[1];for(let p=0;p<5;p++){let h=Hc(d,l);if(!h||h===d)break;d=h;try{f=n.window.eval("("+d+")");break}catch(u){let g=/Identifier '([^']+)' has already been declared/.exec(u&&u.message||String(u));if(!g||g[1]!==l)break}}}if(!f&&/Unexpected (token '\{'|identifier)/.test(i))try{let d=n.window.eval("({"+t+"})");if(d&&typeof d=="object"){let l=Object.keys(d);l.length===1&&typeof d[l[0]]=="function"&&(f=d[l[0]])}}catch{}return f||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 `+(r?"revived lazily, so its source compiled on this first use; it acts as the string it replaces (a call returns the source text, el.call treats it as not callable). Reason: ":"value will be left as a string. Reason: ")+i+`.
|
|
4
4
|
First 200 chars of source: `+String(t).slice(0,200)),t)}};var Do=new WeakMap;var Po=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,Kc=t=>{let e=qc(t.src,Po(t),t.opts,!0),n=null;return typeof e=="function"?n=e:(t.value=e,typeof e!="string"&&typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: ${Po(t)} did not evaluate to a function \u2014 the lazily revived function returns that value.
|
|
5
5
|
First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n};var Hu=Object.getPrototypeOf(async function(){});var _e=t=>{let e=Do.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},lr=t=>{let e=typeof t=="function"?Do.get(t):void 0;return e?(e.fn===void 0?Kc(e):e.fn)===null:!1};var Lo="production";var Yc=(t=Lo)=>t==="production";var fr=(t=Lo)=>!Yc(t),Z=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let n=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof n=="string"&&n?n==="localhost"||n==="127.0.0.1"||n.endsWith(".localhost"):!1};var rt=(t,e,...n)=>{let r=e?.context?.plugins;if(!r)return!1;let o=!1;for(let s of r)typeof s[t]=="function"&&(s[t](e,...n),o=!0);return o};var No="__polyglotSeededKeys",jo=t=>{if(!T(t))return new Set;let e=t[No];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,No,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Vo=(t,e,n)=>jo(t).has(e)?!0:!T(n)||n[e]===void 0,Fo=(t,e)=>(jo(t).add(e),e);var Bo={};var Xt="production";function Uo(t){let e=this,{__ref:n}=e,r=[].concat(t),o=n.root[r[0]];if(!r||!r.length)return console.log(r,"on",e.key,"is undefined");for(;o.key===r[0]&&(r.shift(),!!r.length);)if(o=o[r[0]],!o)return;return o}function zo(){return this.getRef().path}var ur=null;var pr=(t,e)=>{t&&e&&ur===t&&(ur=e)},Wo=()=>ur||null;function Go(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=Wo();else if(n(this))e=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=Zt(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=Wo()),t?e?.[t]:e}function Ho(t){let e=this?.__ref?.root||this.getRootState()?.__element;if(!e)throw new Error(`[smbls] getRoot() could not resolve a root element for "${this?.key||"<unknown>"}" \u2014 it has no __ref (never went through create()) and no root state is registered. Answering undefined here used to no-op silently for every caller.`);return Object.keys(e).length>0&&t?e[t]:e}function qo(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function Ko(t){let e=this.getRoot()?.context;return t?e[t]:e}function Yo(t){let e=this.context;return t?e[t]:e}function hr(...t){if(Xt!=="test"&&Xt!=="development")return;let e=this,{__ref:n}=e;return console.groupCollapsed(e.key),t.length?t.forEach(r=>console.log(`%c${r}:
|
|
6
6
|
`,"font-weight: bold",e[r])):(console.log(n.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Zo(...t){(Xt==="test"||Xt==="development")&&console.warn(...t)}function Qo(...t){if(Xt==="test"||Xt==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&hr.call(this),new Error(...t)}}function Xo(){let t=this,{key:e,parent:n}=t,{__children:r}=n.__ref,o=r.indexOf(e),s=r[o+1];return n[s]}function Jo(t){let e=t||this,{key:n,parent:r}=e,{__children:o}=r.__ref;if(!o)return;let s=o.indexOf(n);return r[o[s-1]]}function ts(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let n=e.data.varCaches,r={},o;for(let s in t)t[s]!==n[s]&&(o=!0,r[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(r,Qt(n));for(let a in r)n[a]=r[a];return i},timeout:(s,i)=>{if(!o)return;let a=setTimeout(()=>{s(r),clearTimeout(a)},i)}}}var Zc="[smbls] getDB needs @symbo.ls/fetch, which the smbls embed bundle does not include: add @symbo.ls/fetch to the page's importmap (the runtime import then resolves) or use the full smbls bundle.",Ze=()=>import("@symbo.ls/fetch").catch(t=>{throw new Error(Zc,{cause:t})});async function es(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:o}=await Ze();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Ze();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let n=Ze().then(({resolveDb:o})=>o(e));e.__resolving=n;let r=await n;if(e.__resolved=r,t.context.fetch=r,delete e.__resolving,r?.getSession){let{initAdapterAuth:o}=await Ze();await o(r,t.context)}return r}function ns(t){let e=this,n=t||Bo.useStateQuery||e.context?.useStateQuery;if(!n)return null;let r={};if(dr(e,r),n===!0)return r;let o=ra[n];return o?o(r):r}var dr=(t,e)=>{let n=t.__ref;if(!n)return;let r=n.__state;r&&typeof r=="string"&&Qc(e,r);let o=n.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&dr(c,e)}let s=n.contentElementKey||"content",i=t[s];i&&i.__ref&&dr(i,e)},Qc=(t,e)=>{let r=e.replaceAll("../","").replaceAll("~/","").split("/"),o=t;for(let s=0;s<r.length;s++){let i=r[s];s===r.length-1?o[i]||(o[i]=!0):(o[i]===!0&&(o[i]={}),o[i]||(o[i]={}),o=o[i])}},rs=(t,e=0)=>{let n=" ".repeat(e),r=Object.entries(t);return r.length?r.map(([s,i])=>i===!0?`${n}${s}`:`${n}${s} {
|
|
@@ -8,13 +8,13 @@ ${rs(i,e+1)}
|
|
|
8
8
|
${n}}`).join(`
|
|
9
9
|
`):""},Xc=t=>`{
|
|
10
10
|
${rs(t,1)}
|
|
11
|
-
}`,Jc=t=>{let e={fields:{},include:[]},n=(r,o)=>{let s=[];for(let i in r)if(r[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),n(r[i],a)}s.length&&(e.fields[o||"_root"]=s)};return n(t,""),e},ta=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let f=e(s[c]),d=[];f.select&&d.push(`$select=${f.select}`),f.expand&&d.push(`$expand=${f.expand}`),a.push(d.length?`${c}(${d.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:n,expand:r}=e(t),o=[];return n&&o.push(`$select=${n}`),r&&o.push(`$expand=${r}`),o.join("&")},ea=(t,e)=>{let n=[],r=[],o=new Set,s=(d,l,
|
|
11
|
+
}`,Jc=t=>{let e={fields:{},include:[]},n=(r,o)=>{let s=[];for(let i in r)if(r[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),n(r[i],a)}s.length&&(e.fields[o||"_root"]=s)};return n(t,""),e},ta=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let f=e(s[c]),d=[];f.select&&d.push(`$select=${f.select}`),f.expand&&d.push(`$expand=${f.expand}`),a.push(d.length?`${c}(${d.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:n,expand:r}=e(t),o=[];return n&&o.push(`$select=${n}`),r&&o.push(`$expand=${r}`),o.join("&")},ea=(t,e)=>{let n=[],r=[],o=new Set,s=(d,l,p)=>{o.add(l),p&&r.push(`LEFT JOIN ${l} ON ${l}.${p}_id = ${p}.id`);for(let h in d)d[h]===!0?n.push(`${l}.${h}`):s(d[h],h,l)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...o][0]||"_root",c=n.length?n.join(", "):"*",f=r.length?`
|
|
12
12
|
`+r.join(`
|
|
13
13
|
`):"";return`SELECT ${c}
|
|
14
|
-
FROM ${a}${f}`},na=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;r[s]===!0?e.push(i):n(r[s],i)}};return n(t,""),e},ra={graphql:Xc,"json-api":Jc,odata:ta,sql:ea,paths:na};var os=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,n){return n===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,""));var ss=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");var is=t=>{if(B(t))return t;if(w(t))return t.split(" ");if(T(t))return Object.values(t);if(Ye(t))return[t]};var oa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cs=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=oa[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&bt&&dt){let n=bt.body.appendChild(bt.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){bt.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return bt.body.removeChild(n),[0,0,0,0];t=dt.getComputedStyle(n).color,bt.body.removeChild(n)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(n=>+n)):[0,0,0,0]};var sa=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]};var ia=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1);var ca=(t,e,n)=>{let r=Math.max(t,e,n),o=r-Math.min(t,e,n),s=1-Math.abs(r+r-o-1),i=o&&(r==t?(e-n)/o:r==e?2+(n-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(r+r-o)/2]},aa=(t,e,n,r=e*Math.min(n,1-n),o=(s,i=(s+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],la=(t,e)=>{let n=parseInt(t,16),r=(n>>16)+e;r>255?r=255:r<0&&(r=0);let o=(n>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(n&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|r<<16)+16777216).toString(16).slice(1)};var U=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,gr=new Set(["currentcolor","transparent","thin","medium","thick"]),$t=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,fa=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,At=t=>{if(!w(t))return null;if($t.test(t))return{passthrough:t};if(U(t))return{cssVar:t};let e=t.match(fa);if(!e)return null;let[,n,r,o]=e,s=r!==void 0?`0.${r}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:n,alpha:s,tone:i}},jt=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Se=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),o===","&&r===0){e.push(n),n="";continue}n+=o}return(n.length||!e.length)&&e.push(n),e},M=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),r===0&&/\s/.test(o)){n.length&&e.push(n),n="";continue}n+=o}return n.length&&e.push(n),e};var as=(t,e)=>{w(t)&&t.includes("rgb")&&(t=cs(t).join(", ")),w(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Ye(e)&&(e+="");let n=ia(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=la(n,parseFloat(e));return sa(o).join(", ")}else{let[o,s,i]=t,[a,c]=ca(o/255,s/255,i/255),f=Math.max(0,Math.min(100,parseFloat(e)))/100;return aa(a,c,f).map(l=>Math.round(Math.max(0,Math.min(1,l))*255)).join(", ")}};var yr=(t,e)=>{if(t[e])return t[e].value;let n=()=>Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value&&!t[o].isSystemFallback);if(t.default){let o=t[t.default];if(o&&o.isSystemFallback){let s=n();if(s)return t[s].value}if(o)return o.value}let r=n()||Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value);return r&&t[r]&&t[r].value};var Qe={};je(Qe,{animation:()=>$a,breakpoints:()=>Oa,class:()=>Na,color:()=>Sa,devices:()=>Ra,document:()=>Ta,font:()=>pa,fontFace:()=>ya,fontFamily:()=>ha,fontFamilyTypes:()=>ga,gradient:()=>xa,grid:()=>La,icons:()=>Aa,media:()=>ma,reset:()=>ja,semanticIcons:()=>Ca,sequence:()=>Vt,shadow:()=>ka,shape:()=>Ba,sizes:()=>Fa,skins:()=>Wa,spacing:()=>_a,svg:()=>Pa,svgData:()=>Ia,templates:()=>Ma,theme:()=>wa,timing:()=>va,typography:()=>mr,unit:()=>ua,vars:()=>Va});var Vt={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var ua={default:"em"};var da={browserDefault:16,base:16,type:"font-size",ratio:Vt["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},mr=da;var pa={};var ha={},ga={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},ya={};var ma={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var ba={base:mr.base,type:"spacing",ratio:Vt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},_a=ba;var Sa={},xa={};var wa={};var ka={};var Aa={},Ca={};var Ea={default:150,base:150,type:"timing",ratio:Vt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},va=Ea;var Ta={};var Oa={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Ra={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var $a={};var Pa={},Ia={};var Ma={};var Da={},La=Da;var Na={};var ja={},Va={},Fa={},Ba={},Wa={};var ls={},fs={};var Xe=Qe,Je={},us=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in Xe){let e=t.toLowerCase();Je[e]=Xe[t];let n=us(e);n!==e&&(Je[n]=Xe[t]),e!==t&&(Je[t]=Xe[t])}var we={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:ls,cssMediaVars:fs,CSS_VARS:ls,CSS_MEDIA_VARS:fs,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...Je},Ua=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return kt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=kt(e)?e:t.globalTheme,r=he(kt(n)?n:"auto");return Object.defineProperty(t,"globalTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r};var za=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return kt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=kt(e)?e:t.resolvedTheme,r=he(kt(n)?n:null);return Object.defineProperty(t,"resolvedTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r};Ua(we);za(we);var Jd=Qt(we),tn={active:"0",0:we};var xe=[],F=t=>{t&&t._scratchConfig&&xe.push(t)},L=()=>{xe.pop()},E=t=>xe.length?xe[xe.length-1]:tn[t||tn.active]||we;var en={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},ds=(t,e)=>{let{key:n,variable:r,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[n]={key:n,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:r},e.scales[n]=s;let c=ps.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},Jt=t=>{if(!t.includes("("))return t;let e=t.trim(),n=e.indexOf("("),r=e.slice(0,n),o=0,s=-1;for(let i=n;i<e.length;i++){let a=e[i];if(a==="(")o++;else if(a===")"&&(o--,o===0)){s=i;break}}return s===-1||/\s/.test(r)||e.slice(s+1).trim()!==""?[void 0,t]:[r,e.slice(n+1,s)]},br="\0",Ga=(t,e)=>{let n="",r=0,o="";for(let s of t){if(r===0&&s!=="("){n+=s;continue}o+=s,s==="("?r++:s===")"&&(r--,r===0&&(n+=br+e.length+br,e.push(o),o=""))}return n+o},Ha=(t,e)=>t.indexOf(br)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),qa=/^(calc|min|max|clamp)\((.*)\)$/,Ka=(t,e)=>{let n=qa.exec(t);return n?`${n[1]}(${gs(n[2],e)})`:t.indexOf("(")!==-1?t:nn(t,e)},ps=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ya=(t,e)=>{let{base:n,type:r,unit:o}=e,s=ps.has(o)?"rem":o,i=(sr(s)?1:n)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-")),f=`${c}-ratio`;if(t>0){let d=en[t-1];return`calc(var(${c}-${d}) * var(${f}))`}if(t<0){let d=en[t+1],l=Math.abs(t),h=Math.pow(hs,2*l),g=en[l];return g?`max(calc(var(${c}-${d}) / var(${f})), calc(var(${c}-${g}) / ${h.toFixed(4)}))`:`calc(var(${c}-${d}) / var(${f}))`}},Za=(t,e,n,r)=>{let{type:o}=r,i=t===2&&e.length===2?t+1:t,f=`${"--"+(r.varPrefix?r.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${n}) * var(${f+i}))`},Qa=(t,e)=>{let r=(t*e-t)/1.618,o=t*e-r,s=t+r,i=(o+s)/2;return[o,i,s]};var Xa=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,f=~~(o*s)-~~o,d,[l,h,g]=Qa(o,s);f>16?d=[l,h,g]:d=[l,g],d.forEach((u,y)=>{let m=~~(u/r*1e3)/1e3,_=i+(y+1),b=a+(y+1)/10,p=Za(y+1,d,i,e),S={key:n+(y+1),variable:_,value:u,scaling:m,scalingVariable:p,index:b};ds(S,e)})},hs=1.618,Ja=(t,e,n)=>{if(t>=0)return e*Math.pow(n,t);let r=Math.abs(t),o=e*Math.pow(n,t),s=e*Math.pow(n,r)/Math.pow(hs,2*r);return Math.max(o,s)},ke=t=>{let{type:e,base:n,ratio:r,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let f=0;f<=i;f++){let d=o[1]-f,l=en[d],h=Ja(d,n,r),g=~~(h/n*100)/100,u=c+l,y=Ya(d,t),m={key:l,variable:u,value:h,base:n,scaling:g,scalingVariable:y,ratio:r,index:d};ds(m,t),s&&Xa(m,t)}return t};var nn=(t="A",e)=>{let n=E(),{unit:r}=n;if(w(t)&&U(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let p=n.sizes;if(p){let S=p[t]||p[t.toLowerCase()];if(S!==void 0)return t.slice(0,1)==="-"?`calc(${S} * -1)`:S}}let{sequence:o,unit:s=r.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(vo(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let h=`--${e.varPrefix?e.varPrefix+"-":""}${ss(e.type.replace(".","-"))}-`,g=t.toUpperCase(),u=g.slice(0,1)==="-"?"-":"",y=u?g.slice(1):g,m="";y.includes("_")&&(m="_"+y.split("_")[1].toLowerCase(),y=y.split("_")[0]);let _=p=>a.test(p)?`var(${h}${p}${m})`:p;if(y.includes("+")){let[p,S]=y.split("+"),x=`${_(p)} + ${_(S)}`;return u?`calc((${x}) * -1)`:`calc(${x})`}else if(y.includes("*")){let[p,S]=y.split("*"),x=`${_(p)} * ${_(S)}`;return u?`calc((${x}) * -1)`:`calc(${x})`}else if(y.includes("-")){let[p,S]=y.split("-"),x=`${_(p)} - ${_(S)}`;return u?`calc((${x}) * -1)`:`calc(${x})`}if(!o[y]&&y.length===2&&(n.verbose&&console.warn(y,"- value is not found because `subSequence` is set to false"),y=y.slice(0,1)),i||n.useVariable){let p=`var(${h}${y}${m})`;return u?`calc(${p} * -1)`:p}let b=o?o[y]:null;if(!b){if(console.warn("can't find",o,y),Z())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?u+b.val+s:u+b.scaling+s},gs=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return Ga(t,o).split(r).map(i=>{let a=Ha(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:Ka(c,e)}).join("")},Ft=(t,e,n,r)=>{if(typeof t!="string")return E().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!r&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=Jt(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=gs(t,n):t=nn(t,n),{[e]:r?`${r}(${t})`:t}};var yp=fr();var tl="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",mp=new RegExp(`<(${tl})\\b([^>]*?)\\s*/>`,"g");var nl={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},on=(t,e)=>{let n=e.media&&e.media[t]||nl[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},sn=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},_r=new Set,bs=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),rl=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,ol=/gradient\(|url\(|image-set\(|var\(/i,sl=new Set(["transparent","currentColor","currentcolor"]),Sr=t=>{if(!w(t))return!1;let e=t.trim();return ol.test(e)?!1:rl.test(e)?!0:bs.has(e)||sl.has(e)},rn=new Set,ys=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(T(e)&&Object.keys(e).length||T(n)&&Object.keys(n).length)},ms=new Set,xr=0,kr=t=>{xr++;try{return t()}finally{xr--}},il=(t,e)=>{if(!w(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=At(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},wr=(t,e,n)=>{let r=il(t,n);if(r){if(!ms.has(t)){ms.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${r}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let o=At(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&ys(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!xr&&!rn.has(t)){rn.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=w(e)?e.toLowerCase():"";if(!bs.has(s)||!ys(n))return t;if(!rn.has(s)){rn.add(s);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${i}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},_s=(t,e,n)=>{let r=e!==void 0?e:1;if(!n)return`rgb(from ${t} r g b / ${r})`;if(n.charCodeAt(0)===43||n.charCodeAt(0)===45){let s=parseFloat(n),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${r})`}return`hsl(from ${t} h s ${n}% / ${r})`},H=(t,e,n)=>{let r=n||E();if(!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(U(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(B(t))[o,s,i]=t;else{let l=At(t);if(!l){let{color:h,gradient:g}=r,u=g[t]||h[t];return u?(e&&u[e]&&(u=u[e]),r.useVariable?`var(${u.var})`:u.value):wr(t,t,r)}if(l.passthrough)return l.passthrough;if(l.cssVar)return`var(${l.cssVar})`;o=l.name,s=l.alpha,i=l.tone}let{color:a,gradient:c}=r,f=a[o]||c[o];if(!f)return wr(t,o,r);if(e)if(f[e]!==void 0)f=f[e];else if(B(f)){let l=e.charCodeAt(0)===64?e.slice(1):e;l==="dark"?f=f[1]!==void 0?f[1]:f[0]:(l!=="light"&&r.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),f=f[0])}else r.verbose&&console.warn(t," - does not have ",e);if(w(f)){if(_r.has(o))return f;_r.add(o);try{return H(f,null,n)}finally{_r.delete(o)}}let d=f.rgb;if(!d){let l=r.useVariable?`var(${f.var})`:f.value;return(s||i)&&l?_s(l,s,i):l}return i&&!f[i]&&(d=as(d,i),f[i]={rgb:d,var:`${f.var}-${i}`}),f[i]&&(d=f[i].rgb),s?`rgba(${d}, ${s})`:i?`rgba(${d}, ${f.alpha!==void 0?f.alpha:1})`:r.useVariable?`var(${f.var})`:f.value!==void 0?f.value:`rgb(${d})`};var cl=t=>T(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),al=t=>{if(!T(t)||t.value!==void 0)return null;let e=[];for(let n in t)if(n!=="var"){if(n.charCodeAt(0)!==64||!cl(t[n]))return null;e.push(n.slice(1))}return e.length?e:null};var ll=(t,e,n,r,o)=>{let s=al(e);if(!s)return;if(w(e.var)){let c=`var(${e.var})`;return n||r?_s(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=H(t,"@light",o),a=H(t,"@dark",o);if(!(!Sr(i)||!Sr(a)))return i===a?i:`light-dark(${i}, ${a})`},ot=(t,e,n)=>{let r=n||E();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(U(t))return`var(${t})`;let o,s,i;if(B(t))o=t[0];else{let l=At(t);if(l){if(l.passthrough)return l.passthrough;if(l.cssVar)return`var(${l.cssVar})`;o=l.name,s=l.alpha,i=l.tone}else o=t}let{color:a,gradient:c}=r,f=a[o]||c[o],d=T(f);if(d&&f.value)return H(t,`@${e}`,n);if(d){if(r.useVariable&&f.var)return s||i?H(t,null,n):`var(${f.var})`;if(e){if(!r.useVariable&&a[o]===f){let l=ll(t,f,s,i,n);if(l!==void 0)return l}return H(t,`@${e}`,n)}else{let l={},h=sn(r);for(let g in f){if(g.charCodeAt(0)!==64)continue;let u=g.slice(1),y=H(t,g,n);if(y!==void 0&&(l[`[data-theme="${u}"] &`]=y,u==="light"||u==="dark")){let m=on(u,r);if(!m)continue;l[m]={[h]:y}}}return l}}else return wr(t,o,r)};var ul=t=>{let n=E().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return ke(o),o};var xs=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r};var dl=t=>{let e=E(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:ke(t)},z=(t,e="padding",n,r)=>{let o=dl(n);if(w(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=Jt(t);r=i[0],t=i[1]}}let s=r?[t]:w(t)&&t.includes("(")?M(t):is(t);if(B(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(f,d)=>Ft(s[d],e+f+i,o,r);return a[s.length].map((f,d)=>c(f,d))}return Ft(t,e,o,r)}},Bt=(t,e,n,r)=>{let o=E(),{spacing:s}=o,i=n||t[e];if(!r&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&w(i)&&i.includes("(")){let a=Jt(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=ul(t);return z(i,e,a,r)}return z(i,e,s,r)},ws=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=ir.some(i=>t.includes(i));return r||o?n:n.length<3&&/[A-Z]/.test(n)?n+"_default":n};return t.split(",").map(n=>n.trim()).map(e).join(",").split(" ").map(e).join(" ")};var ks=(t,e)=>{let n=E();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!w(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(U(t))return`var(${t})`;let[r]=B(t)?t:t.split(" "),s=n.shadow[r],i=T(s);if(!s)return n.verbose&&console.warn("Can't find color ",r),t;if(i&&!s.value&&n.useVariable&&s.var)return`var(${s.var})`;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;n.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={},c=sn(n);for(let f in s){if(f.charCodeAt(0)!==64)continue;let d=f.slice(1),l=s[f],h=l&&(l.value!==void 0?l.value:l);if(h!==void 0&&(a[`[data-theme="${d}"] &`]=h,d==="light"||d==="dark")){let g=on(d,n);if(!g)continue;a[g]={[c]:h}}}return a}return n.verbose&&console.warn("Can't find color",t),t};var pl=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),hl=t=>pl.has(t),Ar=(t,e,n)=>{if(t==null)return;let r=t+"";if($t.test(r))return r;let o=r.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?r:r.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(U(s))return`var(${s})`;if(hl(s)||/^\d/.test(s)||s==="0")return s;let i=kr(()=>H(s,e));if(jt(i))return i;if(gr.has(s.toLowerCase()))return s;n&&n(s);let a=z(s,"border");return a&&a.border?a.border:s}).join(" ")};var gl=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),Cs=(t,e)=>{for(let n in e){let r=e[n];T(r)?Cs(t[n]||(t[n]={}),r):t[n]=r}return t};var Cr=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(wt(t[r]))if(e&&gl(r))n[r]=Cs({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=Cr(t[r],e):o==="."&&(n[`&${r}`]=Cr(t[r],e))}else n[r]=t[r]}return n},Es=(t,e)=>{let n=e.shift();return t[n]?Es(t[n],e):t},As=(t,e)=>B(e)?Es(t,e):w(e)&&t[e]?t[e]:t;var Ae=(t,e)=>{let n=E();if(w(t)&&U(t)&&(t=Ae(t.slice(2))),!t||!w(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=B(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=As(s,o):s&&e&&(s=As(s,e)),Cr(s,!n.useVariable)};var vs=(t,e)=>{let n=E(),{fontFamily:r}=n;return yr(e||r,t)};var Ts=t=>{let e=E(),{typography:n}=e;return Ft(t,"fontSize",n)};var Os=t=>{if(!w(t))return;let n=E().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};var Ct=t=>{let e=E(),{timing:n}=e;return n[t]||n[os(t)]||t},_t=(t,e="timing")=>{let n=E(),{timing:r}=n;return Ft(t,e,r)};var Sl=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),Rs=/^-?[A-Z][0-9]?$/,Pt=t=>Ar(t),$s=t=>{if(w(t))return $t.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(U(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=H(e);return jt(n)?n:e}).join(" ")},Ps=(t,e)=>ks(t,e),Er=(t,e)=>{if(w(t))return $t.test(t)?t:Se(t).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(U(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=H(r);if(jt(o)){let i=ot(r,e);return T(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(r)||r==="0"||r.includes("px")||r.slice(-2)==="em")return r;let s=z(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", ")},vr=(t,e)=>{let n=t.indexOf("(");if(n===-1)return t;let r=t.slice(0,n+1),o=t.slice(n+1,t.lastIndexOf(")")),s=")",a=Se(o).map(c=>(c=c.trim(),c.split(/\s+/).map(d=>{if(!d||/^\d/.test(d)||d==="0"||Sl.has(d)||d==="transparent"||$t.test(d))return d;let l=H(d);return jt(l)?l:d}).join(" ")));return r+a.join(", ")+s},Is=(t,e)=>{if(!w(t))return;let n=E();return Se(t).map(r=>{let o=r.trim();if(U(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=ot(o,e);if(w(s))return s;if(T(s)){for(let i in s)if(w(s[i]))return s[i]}return o}return o.includes("gradient")?vr(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!At(o)?`url(${o})`:o}).join(", ")},Ms=t=>w(t)&&M(t).map(e=>z(e,"gap").gap).join(" "),Ds=t=>{if(!w(t))return t;let e=E();return M(t).map(n=>Rs.test(n)?nn(n,e.spacing):n).join(" ")},xl=t=>{if(!w(t))return;let e=t.split(" ");return e.length?e.map(n=>U(n)?`var(${n})`:n.length<3||n.includes("ms")?_t(n).timing||n:Ct(n)?Ct(n):n).join(" "):t},Tr=(t,e,n)=>{if(w(t))return t.split(",").map(r=>_t(r).timing||r).join(",")},Ls=t=>{if(!w(t))return;let e=t.split(",");if(e.length)return e.map(xl).join(",")};function N(t,e,n={},r={}){let o=ar.call(this,e||n[t]);if(o==null)return;let s;if(w(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=Jt(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=xs(t);!i&&a&&!r.ratio&&(o=ws(o))}return r.ratio?Bt(n,t,o,s):z(o,t,void 0,s)}var k=(t,e=null,n)=>N(t,e,n,{ratio:!0}),wl=(t,e,n)=>w(t)?M(t).map(r=>Rs.test(r)?Bt(e,n,r)[n]:r).join(" "):t,Wt=(t,e,n,r="borderRadius")=>{if(w(t))return{[r]:M(t).map(o=>{let s=Os(o);return s!==void 0?wl(s,e,n):Bt(e,n,o)[n]}).join(" ")}};var Rr=new WeakMap,kl={passive:!0},Al={passive:!0,capture:!0},$r=(t,e)=>rr.has(t)?e?Al:kl:e||!1;function Vs(t){let e=Rr.get(t);return e||(e={handlers:new Map,installed:new Set},Rr.set(t,e)),e}function Cl(t,e){let n=Vs(e);if(n.installed.has(t))return;n.installed.add(t);let r=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";e.addEventListener(t,s=>{if(o){let a=s.target,c=n.handlers.get(t),f=c&&a?c.get(a):null;if(!f||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;f(s);return}let i=s.target;for(;i&&i!==e;){let a=n.handlers.get(t);if(a){let c=a.get(i);if(c&&(c(s),s.cancelBubble))return}i=i.parentNode}},$r(t,r))}function Fs(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=Vs(r);Cl(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function Bs(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=Rr.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function Ns(t){return or.has(t)&&!me.has(t)}function Ws(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&F(r);try{let s=e.call(t,o,t,t.state,n);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{r&&L()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&L()}}function Ce(t,e,n){let{node:r,context:o}=e;if(!r)return;let s=Ws(e,n),i=nr.has(t);if(!i&&Ns(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;Fs(t,r,s,a)}else r.addEventListener(t,s,$r(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Ns(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;Bs(t,r,a)}else r.removeEventListener(t,s,$r(t,!1))})}var Or=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function Pr(t){if(typeof t!="string")return null;for(let e=0;e<Or.length;e++){let n=Or[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:Or[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}var El=/^[A-Za-z_$][\w$]*$/;function vl(t,e,n){let r=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(r=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof r=="string"&&El.test(r)){let c=r;r=function(d){return t.call(c,d)}}return typeof r!="function"?null:(s===void 0&&(s=rr.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function Tl(t,e,n){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=n&&n.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}function Ol(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function Rl(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function $l(t){let e=t.node;if(!e)return!1;let n=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return n?n.isConnected!==!1:!1}function Ir(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)js(t,e,n[o]);return}js(t,e,n)}}function js(t,e,n){let r=e.__ref,o=vl(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=Tl(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(r.__globalEvents&&r.__globalEvents.has(i))return;let a=Ws(e,o.handler),c=d=>{$l(e)&&a(d)},f={capture:o.capture,passive:o.passive,once:o.once};Ol(s,t.eventName,c,f)&&(r.__globalEvents||(r.__globalEvents=new Map),r.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:f}),r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{Rl(s,t.eventName,c,f),r.__globalEvents&&r.__globalEvents.delete(i)}))}function Us(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function Ee(t,e,n){let r=Us(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=zs(r[i],s);a&&a!==e&&Gs(t,a,n,new Set([e]))}}function zs(t,e){if(typeof t=="string"){if(t.includes(">")){let n=t.split(">").map(o=>o.trim()),r=e[n[0]]||e[`smbls.${n[0]}`];for(let o=1;o<n.length&&r;o++)r=r[n[o]];return r||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Gs(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=Us(e);if(o.length){let i=(t.context||n?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=zs(o[a],i);c&&Gs(t,c,n,r)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Hs(t[s],i):t[s]=i}}function Hs(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Hs(o,s):n[r]=s}return n}var Mr={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]};var Ut=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):Il(t),Pl=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Il=t=>Pl.has(t)?t.toLowerCase():null,Ml=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),Et=t=>typeof t=="string"&&(Ml.has(t)||t.startsWith("aria-")),st=(t,e)=>e!==!0&&e!==!1?e:Et(t)?e?"true":"false":e===!0?"":e,vt=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Ut(e)||Mr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Mr,t)?Mr[t].includes(e):!1;var cn=(t,e)=>{let n=t.call("exec",e,t);if(n)return w(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},qs=(t,e)=>{let n=(t.preSrc||"")+(cn(t,e)||"");if(!n)return;try{return new URL(n),n}catch{}let{context:r}=t;if(!r.files&&!r.assets)return n;if(n.startsWith("/assets/")){let o=n.slice(8),s=r.assets&&(r.assets[n]||r.assets[o]);return s&&s.content?s.content.src:n}if(n.startsWith("/files/")){let o=n.slice(7),s=r.files&&(r.files[n]||r.files[o]);return s&&s.content?s.content.src:n}if(r.assets){let o=r.assets[n];if(o&&o.content)return o.content.src}if(r.files){let o=r.files[n];if(o&&o.content)return o.content.src}return n},te={src:t=>qs(t,t.src),href:t=>cn(t,t.href),action:t=>cn(t,t.action),poster:t=>qs(t,t.poster),data:t=>cn(t,t.data)},Ks=t=>{let e=t.tag||"div",n={};for(let r in te)if(t[r]!==void 0&&vt(e,r)){let o=te[r](t);o!==void 0&&(n[r]=o)}return n};function Dr(t={},e={}){let n=this,r=n.__ref;if(!r)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof n.onBeforeUpdate=="function"&&Lr(r))try{let i=n.onBeforeUpdate(n,n.state,n.context,e);if(i&&typeof i.then=="function")i.then(()=>Tt(r,!1),a=>{Tt(r,!0),n.context?.plugins?.length&&rt("error",n,{hook:"onBeforeUpdate",error:a})||console.error("[DOMQL] onBeforeUpdate error:",a)});else if(Tt(r,!1),i===!1)return n}catch(i){throw Tt(r,!0),i}let o=!t||Object.keys(t).length===0,s=[];qe(()=>{if(t.state&&V(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&ee(n,t.text??"")),t.html!==void 0&&(n.html=t.html,!r.__exec.html&&n.node&&(n.node.innerHTML=t.html)),t.style&&n.node?.style){if(!r.__exec.style)for(let i in t.style){let a=t.style[i];if(a==null)continue;let c=i.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),f=String(a).replace(/\s*!important\s*$/,"");n.node.style.setProperty(c,f,"important")}n.style||(n.style={}),Object.assign(n.style,t.style)}if(t.attr&&n.node?.setAttribute){for(let i in t.attr){let a=t.attr[i];a==null||a===!1&&!Et(i)?n.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&n.node.setAttribute(i,st(i,a))}n.attr||(n.attr={}),Object.assign(n.attr,t.attr)}if(t.data&&n.node?.dataset){for(let i in t.data)n.node.dataset[i]=t.data[i];n.data||(n.data={}),Object.assign(n.data,t.data)}for(let i in t){if(Y.has(i)||i==="state")continue;let a=t[i],c=n[i];if(c&&c.__ref&&typeof c.update=="function")c.update(a,e);else if(typeof a=="object"&&a!==null){let f=i.charCodeAt(0);f>=65&&f<=90&&it(a,n,i,e)}else i!=="text"&&i!=="html"&&i!=="style"&&i!=="attr"&&i!=="data"&&(n[i]=a,typeof a!="function"&&s.push(i))}});for(let i=0;i<s.length;i++)Qs(n,s[i]);if(n.node){for(let i=0;i<s.length;i++)if(Ys(s[i])){Zs(n);break}}if(n.node&&o&&r.__effects&&r.__effects.length)for(let i=0;i<r.__effects.length;i++){let a=r.__effects[i];a&&!a._disposed&&!a._isSubscribeToEffect&&typeof a._execute=="function"&&a._execute()}else if(n.node&&r.__conditionalRunners)for(let i of r.__conditionalRunners)i();return rt("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}function Nr(t){if(!t)return;let e=t.__ref;if(!e)return;e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){let r=e.__children.slice();e.__children.length=0;for(let o=0;o<r.length;o++){let s=t[r[o]];s&&s.__ref&&Nr(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let n=t.state?.$destroy||t.state?.destroy;if(typeof n=="function"&&t.state.__element===t&&n.call(t.state),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}function jr(){Nr(this)}var an=new Map,Dl=null,Xs=null;var Js=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function ai(){try{let t=E();if(t){if(Js(t.__domDocument))return t.__domDocument;if(Js(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var ne={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};var Ll={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function ln(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function fn(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e.toString(36)}function Nl(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():fn(e)}var jl={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"};function Fr(t,e){let n=jl[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function Vl(t){let e="";for(let n in t){let r=t[n];if(typeof r!="object"||r===null)continue;let o="";for(let s in r){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;o+=Fr(i?s:ln(s),r[s])}e+=`${n}{${o}}`}return e}var Fl="@media (hover: hover)",Bl=/(?:^|[^\\]):hover(?![\w-])/;function li(){try{let t=E();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Te(t,e,n){return n===!1||!Bl.test(e)||n===void 0&&!li()?t:`${Fl}{${t}}`}function ti(t,e,n){let r=(n?n+"":"")+t+":"+e,o=an.get(r),s=o?null:ln(t);if(!o){let c=Ll[t]||fn(t),f=Nl(e);o=n?`_${n}_${c}-${f}`:`_${c}-${f}`,an.set(r,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||ln(t),a=`.${o}{${Fr(i,e)}}`;return ve(a,void 0,"atomic"),o}var ei=new WeakMap,ni=new WeakMap;function ve(t,e,n){let r=fi(e,Wl(t));if(!r)return ne.dropped++,"dropped";let o=ei.get(r);if(o||(o=new Set,ei.set(r,o)),o.has(t))return ne.duplicate++,ne[n||"global"]++,"duplicate";let s=ni.get(r);if(s&&s.has(t))return ne.invalid++,"invalid";try{r.insertRule(t,r.cssRules.length)}catch{return s||(s=new Set,ni.set(r,s)),s.add(t),ne.invalid++,"invalid"}return o.add(t),ne[n||"global"]++,"inserted"}var pt="0:0",ri="1:0",oi=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function Wl(t){if(typeof t!="string"||!t)return pt;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return pt;let e=1/0,n=-1/0;oi.lastIndex=0;let r;for(;r=oi.exec(t);){let o=parseFloat(r[2])*(r[3]==="em"||r[3]==="rem"?16:1);r[1]==="max"?e=Math.min(e,o):n=Math.max(n,o)}return e!==1/0?"2:"+-e:n!==-1/0?"3:"+n:ri}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?pt:ri}var si=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},Ul=(t,e)=>{let[n,r]=si(t),[o,s]=si(e);return n!==o?n<o:r<s},zl=t=>t.getAttribute("data-tier")||pt,ii=new WeakMap;function fi(t,e){let n=t||ai();if(!n||!n.head)return null;let r=e||pt,o=ii.get(n);o||(o=new Map,ii.set(n,o));let s=o.get(r);if(s&&s.ownerNode&&s.ownerNode.parentNode===n.head)return s;r!==pt&&fi(n,pt);let i=r===pt?n.head.querySelector("style[data-smbls]:not([data-tier])"):n.head.querySelector(`style[data-smbls][data-tier="${r}"]`);if(!i){i=n.createElement("style"),i.setAttribute("data-smbls",""),r!==pt&&i.setAttribute("data-tier",r);let c=n.head.querySelectorAll("style[data-smbls]"),f=null;for(let l=0;l<c.length;l++)if(Ul(r,zl(c[l]))){f=c[l];break}let d=c.length?c[c.length-1]:null;f?n.head.insertBefore(i,f):d?n.head.insertBefore(i,d.nextSibling):n.head.appendChild(i)}let a=i.sheet;return o.set(r,a),r===pt&&(Dl=a),a}var Gl=8;function zt(t,e,n,r){if(!t||typeof t!="object")return"";let o=!!(r&&r.state),s=null,i=0,a=[],c=[];for(let d in t){let l=t[d];l==null||l===!1||l===""||(typeof l=="object"?c.push([d,l]):Xs?(s||(s=[]),s.push(d,String(l)),i++):a.push(ti(d,String(l),n)))}if(s&&i>=Gl){let d=s.join("\0"),l=Xs(d),h=l.indexOf("\0"),g=l.substring(0,h),u=l.substring(h+1);if(u){let y=u.split(`
|
|
15
|
-
`);for(let m=0;m<y.length;m++)y[m]&&ve(y[m],void 0,"atomic")}a.push(g)}else if(s)for(let d=0;d<s.length;d+=2)a.push(ti(s[d],s[d+1],n));let f=[];for(let d=0;d<c.length;d++)f.push(Kl(c[d][0],c[d][1],n,o));return a.concat(f).join(" ").trim()}var ci=new Map,Hl=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function Vr(t){return/^@(media|supports|container)\b/.test(t)}function ql(t){return typeof t!="string"||!t||Vr(t)?!1:t.split(",").every(e=>Hl.test(e.trim()))}function Kl(t,e,n,r){let o=JSON.stringify(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&li(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=an.get(a);if(c){let p=ci.get(c);if(p)for(let S=0;S<p.length;S++)ve(p[S],void 0,"atomic");return c}c=n?`_${n}_c${fn(a)}`:`_c${fn(a)}`;let f=r?`.${c}.${c}`:`.${c}`,d=ql(t)?`${f}.${c}`:f,l="",h=[],g=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),u=(p,S)=>{let x="";for(let A in S){let C=S[A];if(C!=null)if(typeof C=="object")u([...p,A],C);else{if(g(C))continue;x+=Fr(ln(A),C)}}x&&(p.length===0?l+=x:h.push({chain:p,body:x}))};u([],e);let y=p=>p.startsWith(":")||p.startsWith("["),m=(p,S=!0)=>{let x=S&&p.length===1?d:f;if(!p.length)return x;let A=p[0].split(",").map(C=>C.trim()).map(C=>C.includes("&")?C.replace(/&/g,x):y(C)?`${x}${C}`:`${x} ${C}`);for(let C=1;C<p.length;C++){let D=p[C].split(",").map(R=>R.trim()),j=[];for(let R of A)for(let nt of D)nt.includes("&")?j.push(nt.replace(/&/g,R)):y(nt)?j.push(R+nt):j.push(R+" "+nt);A=j}return A.join(", ")},_=[],b=(p,S)=>{let x=p.filter(Vr),A=m(p.filter(D=>!Vr(D)),x.length===0),C=`${A}{${S}}`;for(let D=x.length-1;D>=0;D--)C=`${x[D]}{${C}}`;C=Te(C,A,i),_.push(C),ve(C,void 0,"atomic")};l&&b([t],l);for(let p of h)b([t,...p.chain],p.body);return ci.set(c,_),an.set(a,c),c}function un(t,e){return ve(`@keyframes ${t}{${Vl(e)}}`,void 0,"keyframes"),t}var Yl=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],Zl=["none","forwards","backwards","both"],Ql=["normal","reverse","alternate","alternate-reverse"],Xl=["running","paused"],Jl=t=>/^[\d.]+m?s$/.test(t),tf=/^(?:translate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|scale(?:3d|x|y|z)?\((?:\s*1(?:\.0+)?\s*,?)+\)|rotate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|skew(?:x|y)?\((?:\s*0[a-z%]*\s*,?)+\)|matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\))$/,ef=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let n=e.match(/[a-z0-9]+\([^()]*\)/g);return!n||n.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:n.every(r=>tf.test(r.replace(/\s+/g,"")))},ui=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),nf={transform:ef,translate:ui,rotate:t=>ui(t)||/^\s*(?:[xyz]\s+)?0(?:deg|rad|turn|grad)?\s*$/.test(String(t).toLowerCase()),scale:t=>/^(none|initial|unset)$/.test(String(t).trim().toLowerCase())||/^(?:\s*1(?:\.0+)?)+\s*$/.test(String(t)),opacity:t=>/^(initial|unset)$/.test(String(t).trim().toLowerCase())||Number(t)===1},rf=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let n=e.match(/^(\d+(?:\.\d+)?)%$/);return n?Number(n[1]):null},of=t=>{if(!T(t))return null;let e=null,n=-1;for(let r in t){let o=rf(r);o==null||!T(t[r])||o>=n&&(n=o,e=t[r])}return e},sf=t=>{let e=of(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=nf[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},cf=(t,e)=>{if(T(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return T(r)?r:null},af=["reverse","alternate","alternate-reverse"],di=(t,e,n)=>{let r=n||e.animationDirection;return r&&af.includes(String(r))?"both":sf(cf(t,e))?"backwards":"both"},lf=0,pi=new Map,Br=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(T(t)){let o=JSON.stringify(t),s=pi.get(o);if(s)return s;let i=`smbls-anim-${lf++}`,a=un(i,t);return pi.set(o,a),a}let r=n&&n[t];return T(r)?un(t,r):t},ff=t=>{let e=[],n=0,r="";for(let o of String(t).trim())o==="("?n++:o===")"&&n>0&&n--,n===0&&/\s/.test(o)?(r&&e.push(r),r=""):r+=o;return r&&e.push(r),e},uf=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},r=ff(t),o=null,s=[],i=null,a=null,c=null,f=null,d=null;for(let l of r)n&&n[l]?o=l:Jl(l)?s.push(l):Yl.includes(l)||l.startsWith("cubic-bezier")||l.startsWith("steps(")||l.startsWith("linear(")?i=l:l==="infinite"||/^\d+$/.test(l)?a=l==="infinite"?l:Number(l):Ql.includes(l)?c=l:Zl.includes(l)?f=l:Xl.includes(l)?d=l:o||(o=l);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:f,playState:d}},hi={animation:(t,e)=>{if(t!=null){if(w(t)&&t.includes(" ")){let n=uf(t,e);return{animationName:Br(n.name||t,e),animationDuration:n.durations[0]||_t(e.animationDuration||"A").timing,animationDelay:n.durations[1]||_t(e.animationDelay||"0s").timing,animationTimingFunction:n.timingFunction||Ct(e.animationTimingFunction||"ease"),animationFillMode:n.fillMode||e.animationFillMode||di(n.name||t,e,n.direction),animationIterationCount:n.iterationCount!=null?n.iterationCount:e.animationIterationCount||1,animationPlayState:n.playState||e.animationPlayState,animationDirection:n.direction||e.animationDirection}}return{animationName:Br(t,e),animationDuration:_t(e.animationDuration||"A").timing,animationDelay:_t(e.animationDelay||"0s").timing,animationTimingFunction:Ct(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||di(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:Br(t,e)}),animationDuration:t=>({animationDuration:_t(t).timing}),animationDelay:t=>({animationDelay:_t(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Ct(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};var dn=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!w(e))return;let[r,o]=M(e);return{...k(t+"Start",r,n),...k(t+"End",o||r,n)}},gi={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>k("height",t,e),width:(t,e)=>k("width",t,e),boxSizing:t=>To(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("height",e),...N("width",n||e)}},inlineSize:(t,e)=>k("inlineSize",t,e),blockSize:(t,e)=>k("blockSize",t,e),minWidth:(t,e)=>k("minWidth",t,e),maxWidth:(t,e)=>k("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("minWidth",e),...N("maxWidth",n||e)}},minHeight:(t,e)=>k("minHeight",t,e),maxHeight:(t,e)=>k("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("minHeight",e),...N("maxHeight",n||e)}},size:t=>{if(!w(t))return;let[e,n]=M(t);return{...k("inlineSize",e),...k("blockSize",n||e)}},minBlockSize:(t,e)=>k("minBlockSize",t,e),minInlineSize:(t,e)=>k("minInlineSize",t,e),maxBlockSize:(t,e)=>k("maxBlockSize",t,e),maxInlineSize:(t,e)=>k("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("minInlineSize",e),...N("minBlockSize",n||e)}},maxSize:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("maxInlineSize",e),...N("maxBlockSize",n||e)}},borderWidth:(t,e)=>k("borderWidth",t,e),borderTopWidth:(t,e)=>k("borderTopWidth",t,e),borderRightWidth:(t,e)=>k("borderRightWidth",t,e),borderBottomWidth:(t,e)=>k("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>k("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>k("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>k("textUnderlineOffset",t,e),padding:(t,e)=>k("padding",t,e),paddingInline:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("paddingInlineStart",e),...N("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("paddingBlockStart",e),...N("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>k("paddingBlockStart",t,e),paddingBottom:(t,e)=>k("paddingBlockEnd",t,e),paddingLeft:(t,e)=>k("paddingInlineStart",t,e),paddingRight:(t,e)=>k("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>k("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>k("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>k("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>k("paddingInlineEnd",t,e),margin:(t,e)=>k("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("marginInlineStart",e),...N("marginInlineEnd",n||e)}},marginBlock:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("marginBlockStart",e),...N("marginBlockEnd",n||e)}},marginTop:(t,e)=>k("marginBlockStart",t,e),marginBottom:(t,e)=>k("marginBlockEnd",t,e),marginLeft:(t,e)=>k("marginInlineStart",t,e),marginRight:(t,e)=>k("marginInlineEnd",t,e),marginInlineStart:(t,e)=>k("marginInlineStart",t,e),marginInlineEnd:(t,e)=>k("marginInlineEnd",t,e),marginBlockStart:(t,e)=>k("marginBlockStart",t,e),marginBlockEnd:(t,e)=>k("marginBlockEnd",t,e),scrollMargin:(t,e)=>k("scrollMargin",t,e),scrollMarginTop:(t,e)=>k("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>k("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>k("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>k("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>dn("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>dn("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>k("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>k("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>k("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>k("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>k("scrollPadding",t,e),scrollPaddingTop:(t,e)=>k("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>k("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>k("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>k("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>dn("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>dn("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>k("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>k("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>k("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>k("scrollPaddingInlineEnd",t,e),gap:t=>({gap:Ms(t)}),columnGap:(t,e)=>Bt(e,"columnGap",t),rowGap:(t,e)=>Bt(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!w(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!w(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>Wt(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Wt(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Wt(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Wt(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Wt(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Wt(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var yi={fontSize:t=>Ts(t)||t,fontFamily:t=>({fontFamily:vs(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var mi={overflow:t=>({overflow:t}),cursor:(t,e,n,r)=>{if(!t)return;let o=r.assets&&r.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=r.files&&r.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var bi={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:M(t).map(n=>z(n,"k").k).join(" ")}},left:t=>z(t,"left"),top:t=>z(t,"top"),right:t=>z(t,"right"),bottom:t=>z(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=M(t).map(n=>z(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=M(t).map(n=>z(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};var pn=0,Wr=()=>{pn++},Ur=()=>{pn>0&&pn--},lt=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:pn>0?null:n&&n.resolvedTheme||null},tt=(t,e)=>{if(e==null||e==="")return;if(!T(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(T(s)){let i=tt(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},_i={theme:(t,e)=>{if(t)return e.themeModifier?Ae(t,`@${e.themeModifier}`):Ae(t)},color:(t,e)=>{let n=lt(e);if(t)return tt("color",ot(t,n))},background:(t,e)=>{let n=lt(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:vr(t,n)}:tt("background",ot(t,n))},backgroundColor:(t,e)=>{let n=lt(e);if(t)return tt("backgroundColor",ot(t,n))},backgroundImage:(t,e,n,r)=>{let o=lt(e);if(!t)return;let s=r.assets&&r.assets[t];if(s&&s.content)t=s.content.src;else{let i=r.files&&r.files[t];i&&i.content&&(t=i.content.src)}return tt("backgroundImage",Is(t,o))},textStroke:t=>{let e=$s(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:Pt(t)}),outlineWidth:(t,e)=>k("outlineWidth",t,e),outlineColor:(t,e)=>{let n=lt(e);if(t)return tt("outlineColor",ot(t,n))},outlineOffset:(t,e)=>k("outlineOffset",t,e),border:t=>({border:Pt(t)}),borderColor:(t,e)=>{let n=lt(e);if(t)return tt("borderColor",ot(t,n))},borderTopColor:(t,e)=>{let n=lt(e);if(t)return tt("borderTopColor",ot(t,n))},borderBottomColor:(t,e)=>{let n=lt(e);if(t)return tt("borderBottomColor",ot(t,n))},borderLeftColor:(t,e)=>{let n=lt(e);if(t)return tt("borderLeftColor",ot(t,n))},borderRightColor:(t,e)=>{let n=lt(e);if(t)return tt("borderRightColor",ot(t,n))},borderLeft:t=>({borderLeft:Pt(t)}),borderTop:t=>({borderTop:Pt(t)}),borderRight:t=>({borderRight:Pt(t)}),borderBottom:t=>({borderBottom:Pt(t)}),shadow:(t,e)=>{let n=lt(e);if(t)return tt("boxShadow",Ps(t,n))},boxShadow:(t,e)=>{if(!w(t))return;let[n,r]=t.split("!importan"),o=lt(e),s=r?" !important":"",i=Er(n.trim(),o);return w(i)?{boxShadow:i+s}:tt("boxShadow",i)},textShadow:(t,{context:e})=>tt("textShadow",Er(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:Pt(t)})};var Si={transition:t=>{let e=Ls(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Tr(t)}),transitionDelay:t=>({transitionDelay:Tr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Ct(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};var xi={flow:(t,e)=>{let n=e.reverse;if(!w(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!w(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};var df=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,pf=t=>{if(!w(t))return t;let e=E().sizes;return e?t.replace(df,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},St=t=>pf(Ds(t)),wi={gridTemplateColumns:t=>({gridTemplateColumns:St(t)}),gridTemplateRows:t=>({gridTemplateRows:St(t)}),gridAutoColumns:t=>({gridAutoColumns:St(t)}),gridAutoRows:t=>({gridAutoRows:St(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:St(t)}),templateColumns:t=>({gridTemplateColumns:St(t)}),autoColumns:t=>({gridAutoColumns:St(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:St(t)}),templateRows:t=>({gridTemplateRows:St(t)}),autoRows:t=>({gridAutoRows:St(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var G={...hi,...gi,...yi,...mi,...bi,..._i,...Si,...xi,...wi};var W=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationTimeline","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","interpolateSize","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapStop","scrollSnapType","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);function Gr(t,e,n){let r=t?.context?.analyze;if(!r||!r.emit||e==="warn"&&!r.shouldCapture("warnings")||e==="error"&&!r.shouldCapture("errors"))return;let o=n.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:n})}var ki=new Set;function Ai(t,e,n){let r=String(e);if(ki.has(r))return;ki.add(r);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.join("."):t?.key!=null?String(t.key):"(unknown element)",i=n!=null?`resolves to a non-function (${typeof n}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${r}') at <${s}>: "${r}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;Gr(t,"error",[a]),console.error(a)}var gf=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),yf=new Set,mf=t=>gf(zr,t)&&!(Ro||yf).has(t),Ci=new Set;function bf(t,e){Ci.has(t)||(Ci.add(t),Z()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function _f(...t){return Gr(this,"warn",t),Zo.apply(this,t)}function Sf(...t){return Gr(this,"error",t),Qo.apply(this,t)}var zr={update:Dr,remove:jr,getDB:es,getQuery:ns,getRootData:qo,getPath:zo,nextElement:Xo,previousElement:Jo,verbose:hr,warn:_f,error:Sf,variables:ts,spotByPath:Uo,set(t,e){let n=this.__ref;if(n){if(n.__setLocked){n.__setQueued={content:t,options:e};return}n.__setLocked=!0}try{if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(n){n.__setLocked=!1;let r=n.__setQueued;r&&(n.__setQueued=null,this.set(r.content,r.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let n=this.parent,r=this.key,o=this.parse();return this.remove(),e(o,n,r,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let n of e.__children){let r=this[n];if(!r)continue;if(typeof t=="function"){if(t(r))return r}else if(typeof t=="string"&&r.key===t)return r;let o=r.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let n=this.__ref;if(!n?.__children)return e;for(let r of n.__children){let o=this[r];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:Ho,getRootState:Go,getRootContext:Ko,getContext:Yo,parse(t){let e={},n=t?new Set(t):null,r=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!n?.has(o)){if(r&&r[o]!==void 0){e[o]=r[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),n=this.__ref;if(n?.__children)for(let r of n.__children)this[r]?.parseDeep&&(e[r]=this[r].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let n of t)e[n]=this[n];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let n=t[e];if(n==null)continue;let r=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(n).replace(/\s*!important\s*$/,"");this.node.style.setProperty(r,o,"important")}},call(t,...e){let n=this.context,r=mf(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&bf(t,"el.call");let o=r?this[t]:n?.methods?.[t]||n?.functions?.[t]||n?.utils?.[t]||this[t];if(typeof o=="function"){let s=lr;if(!s||!s(o))return o.call(this,...e);Z()&&Ai(this,t,_e(o));return}Z()&&Ai(this,t,o)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let n=t.__children.indexOf("content");n!==-1&&t.__children.splice(n,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},Ei=new WeakMap;function xf(t){if(!t)return zr;let e=Ei.get(t);if(e)return e;e=Object.create(zr);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return Ei.set(t,e),e}function Hr(t){let e=xf(t.context);Object.setPrototypeOf(t,e)}var hn=[],gn=!1,It=0;function yn(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function vi(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),t()},n.port2.postMessage(0);return}setTimeout(t,0)}function qr(){return It?yn()-It>=50:!1}var re=0;function Kr(){re===0&&!It&&(It=yn()),re++}function Yr(){re>0&&re--,re===0&&!gn&&(It=0)}function Zr(t){hn.push(t),gn||(gn=!0,vi(Ti))}function Ti(){for(It=yn();hn.length;){let t=hn.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(yn()-It>=50)break}if(hn.length){vi(Ti);return}gn=!1,It=0,re=0}var mn=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},ht=(t,e,n,{onlyIfAbsent:r}={})=>{mn(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&mn(t,e,n)},Qr=(t,e,...n)=>{if(!t)return;let r=t["$"+e];if(typeof r=="function")return r.apply(t,n);let o=t[e];if(typeof o=="function")return o.apply(t,n)},Mt=(t,e)=>{if(V(e)){let o=e.__raw||e;ht(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),ht(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),ht(o,"setByPath",function(s,i,a={}){let c=s.split("."),f=e;for(let d=0;d<c.length-1;d++)f[c[d]]===void 0&&(f[c[d]]={}),f=f[c[d]];return f[c[c.length-1]]=i,e}),ht(o,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),ht(o,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let f=0;f<a.length-1;f++){if(c==null)return e;c=c[a[f]]}return c&&delete c[a[a.length-1]],e}),ht(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),ht(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),ht(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),ht(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&V(a.parent);)a=a.parent;return Qr(a,"update",s,i)}),ht(o,"parentUpdate",function(s,i={}){if(e.parent)return Qr(e.parent,"update",s,i)}),ht(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=V(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,V(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let n=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},r={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;n();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return n(),e}};for(let o in r)if(mn(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Co(o,"");continue}mn(e,o,r[o])}};var Am=new Proxy(Object.create(null),{get(){},has(){return!1}});var bn="3.14.792";var Oi="__SMBLS_ELEMENT_ID_ENGINE__",Ri=(t,e,n)=>{let r=e||bn,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[Oi];return s&&s.engine&&s.version===r?s.engine:(s||(o[Oi]={version:r,engine:t}),t)};var v=(t,e)=>e.split(" ").map(n=>t+"-"+n),Xr="top right bottom left",Jr=Xr+" block block-start block-end inline inline-start inline-end",Dt="start end",Gt="width style color",_n=t=>v(t,Jr),wf=(()=>{let t=v("border","width style color image");for(let e of Jr.split(" "))t.push("border-"+e,...v("border-"+e,Gt));return t})(),$i=t=>[...v("border-"+t,Gt+" start end"),...v("border-"+t+"-start",Gt),...v("border-"+t+"-end",Gt)],Ot={animation:v("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:v("background","image position position-x position-y size repeat origin clip attachment color"),border:wf};for(let t of["width","style","color"])Ot["border-"+t]=Jr.split(" ").map(e=>"border-"+e+"-"+t);for(let t of Xr.split(" "))Ot["border-"+t]=v("border-"+t,Gt);Ot["border-block"]=$i("block");Ot["border-inline"]=$i("inline");Object.assign(Ot,{"border-image":v("border-image","source slice width outset repeat"),"border-radius":"top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" ").map(t=>"border-"+t+"-radius"),columns:v("column","width count"),"column-rule":v("column-rule",Gt),container:v("container","name type"),"contain-intrinsic-size":v("contain-intrinsic","width height"),flex:v("flex","grow shrink basis"),"flex-flow":v("flex","direction wrap"),font:[...v("font","style variant weight stretch size"),"line-height",...v("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:v("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":v("grid-template","rows columns areas"),"grid-area":v("grid","row column row-start row-end column-start column-end"),"grid-row":v("grid-row",Dt),"grid-column":v("grid-column",Dt),inset:[...Xr.split(" "),...v("inset","block block-start block-end inline inline-start inline-end")],"inset-block":v("inset-block",Dt),"inset-inline":v("inset-inline",Dt),"list-style":v("list-style","type position image"),margin:_n("margin"),"margin-block":v("margin-block",Dt),"margin-inline":v("margin-inline",Dt),mask:v("mask","image mode repeat position clip origin size composite"),offset:v("offset","position path distance rotate anchor"),outline:v("outline",Gt),overflow:v("overflow","x y"),"overscroll-behavior":v("overscroll-behavior","x y"),padding:_n("padding"),"padding-block":v("padding-block",Dt),"padding-inline":v("padding-inline",Dt)});for(let t of["content","items","self"])Ot["place-"+t]=["align-"+t,"justify-"+t];Object.assign(Ot,{"scroll-margin":_n("scroll-margin"),"scroll-padding":_n("scroll-padding"),"text-decoration":v("text-decoration","line style color thickness"),"text-emphasis":v("text-emphasis","style color"),transition:v("transition","property duration timing-function delay behavior")});var Oe={};for(let t in Ot)for(let e of Ot[t])(Oe[e]||(Oe[e]=[])).push(t);var kf=new Set(["rows","cols","wrap"]),Sn=(t,e)=>kf.has(e)&&vt(t,e),oe=(t,e)=>!!(G[e]||W&&W.has(e))&&!Sn(t,e);var zi=Ri({uniqId:1,scopedStyleId:0},bn),$e=[],Ht=new Set,lo=!1,Gi=0,se=null,Ie=null;function ie(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function Hi(){return typeof document<"u"&&document.visibilityState==="hidden"}var Af=250,Cf=1e3;function Ef(){return Ie&&(Ie!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||Hi())?!0:ie()-Gi>=Cf}function vf(){if(lo=!0,Gi=ie(),Ie=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(kn,0);se=t?()=>t(e):null;return}if(Hi()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(kn,Af);se=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Ie=requestAnimationFrame;let e=requestAnimationFrame(kn);se=t?()=>t(e):null}}function Rn(){if(lo){if(!Ef())return;let t=se;if(se=null,t)try{t()}catch{}}vf()}var qi=300,Ki=15e4;function kn(){if(lo=!1,se=null,Ie=null,Ht.size&&eu(),!$e.length)return;let t=$e.splice(0,$e.length);for(let e=0;e<t.length;e++){let n=t[e];if(n.node){if(!n.node.isConnected){let r=n.__ref||(n.__ref={});r.__mountAttempts=(r.__mountAttempts||0)+1,r.__mountFirstAttemptAt==null&&(r.__mountFirstAttemptAt=ie());let o=ie()-r.__mountFirstAttemptAt;r.__mountAttempts<=qi&&o<Ki?($e.push(n),Rn()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}et("Mounted",n,n.__ref?.__mountOptions||{})}}}function ro(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&go(t,!0),typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,$e.push(t),Rn())}function Pi(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&rt("contentUpdate",t,e);let n=t.context?.designSystem;n&&F(n);try{t.onContentUpdate(t,t.state,t.context,e)}catch(r){if(t.context?.plugins?.length&&rt("error",t,{hook:"onContentUpdate",error:r})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',r),t.context?.strictMode)throw r}finally{n&&L()}}function Rt(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Tf(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Of(t){return t.toLowerCase()}function oo(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function Pe(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Pe(o,s):n[r]=s}return n}function En(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function Yi(t,e,n){return En(t)||(e&&typeof e=="object"?En(e.key):void 0)||String(n)}function it(t,e,n,r={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=En(n);let s=En(t.key),i=Object.create(null);i.key=n||s||`_${zi.uniqId++}`,i.parent=e||null,i.context=t.context||e?.context||r.context||{},i.context.__create||(i.context.__create=it);let a=i.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||i,path:e?.__ref?.path?[...e.__ref.path,i.key]:[i.key],origin:t};if(n&&!t.extends&&!t.extend){let m=n.indexOf("_"),_=n.indexOf("."),b=m>0?m:-1;if(_>0&&(b<0||_<b)&&(b=_),b>0){let p=n.substring(0,b),S=i.context?.components;S&&(S[p]||S["smbls."+p])?t={...t,extends:p}:S&&Z()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${p}" but neither "${p}" nor "smbls.${p}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Ee(i,t,r);let c=new Set(["childProps","attr","style","scope","data"]),f=i.props&&typeof i.props=="object"?i.props:null;for(let m in t){if(m==="parent"||m==="node"||m==="__ref"||m==="extends"||m==="context"||m==="props")continue;if(m==="key"){s&&(i.key=s);continue}let _=t[m],b=i[m],p=b&&_&&typeof b=="object"&&typeof _=="object"&&!Array.isArray(b)&&!Array.isArray(_)&&typeof b!="function"&&typeof _!="function";p&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?i[m]=Pe(b,_):p&&c.has(m)?i[m]={...b,..._}:p&&oo(m)?i[m]=Pe(b,_):i[m]=_}function d(m){for(let _ in m){let b=m[_],p=i[_],S=p&&b&&typeof p=="object"&&typeof b=="object"&&!Array.isArray(p)&&!Array.isArray(b)&&typeof p!="function"&&typeof b!="function";S&&_.charCodeAt(0)>=65&&_.charCodeAt(0)<=90?i[_]=Pe(p,b):S&&c.has(_)?i[_]={...p,...b}:S&&oo(_)?i[_]=Pe(p,b):i[_]=b}}f&&d(f),t.props&&typeof t.props=="object"&&d(t.props),t.classlist!==void 0&&(i.classlist=t.classlist),t.text!==void 0&&(i.text=t.text),t.html!==void 0&&(i.html=t.html);let l=i.scope&&typeof i.scope=="object"?i.scope:null,h=e?.scope,g=i.context&&typeof i.context.globalScope=="object"&&i.context.globalScope||null,u=h||g||null;if(t.scope!==void 0||l){let m={};l&&Object.assign(m,l),t.scope!==void 0&&Object.assign(m,t.scope),i.scope=Ao(m,u)}else u&&(i.scope=u);if(t.if!==void 0&&(i.if=t.if),Hr(i),Rf(i,e,t),i.if!=null){let m;if(typeof i.if=="function")try{m=i.if(i,i.state,i.context)}catch(_){if(m=!1,a.__ifError=_,typeof console<"u"&&console.warn){let b=i.key||i.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,_?.message||_)}}else m=i.if;a.__if=!!m}if(a.__if)typeof i.if=="function"&&(a.__ifInitialized=!0);else return e&&(e[i.key]=i),typeof i.if=="function"&&Xi(i,a,i.if),i;i.tag||(i.tag=ge(i)),et("Init",i,r);let y=i.node=ye(i);if(!y)return i;if(i.tag==="fragment"){let _=(i.context?.document||globalThis.document).createComment("");y.appendChild(_),a.__fragmentAnchor=_}et("AttachNode",i,r),y.setAttribute&&i.key&&y.setAttribute("data-key",i.key),e&&(e[i.key]=i,e.__ref?.__children&&(e.__ref.__children.includes(i.key)||e.__ref.__children.push(i.key))),y.setAttribute&&i.context?.scopeSelector&&i.context.scopeSelector!==":root"&&i.context.key&&i.key===i.context.key&&y.setAttribute("data-smbls-app",i.context.key),i.id&&y.setAttribute&&(y.id=i.id),ac(i,r),Qi(i),so(i),sc(i),ic(i);try{lc(i,r)}catch(m){if(typeof console<"u"&&console.error){let _=i.__ref?.path?.join(".")||i.key||"<root>";console.error(`[smbls] createChildren failed at ${_}:`,m?.message||m,m?.stack?`
|
|
16
|
-
`+
|
|
14
|
+
FROM ${a}${f}`},na=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;r[s]===!0?e.push(i):n(r[s],i)}};return n(t,""),e},ra={graphql:Xc,"json-api":Jc,odata:ta,sql:ea,paths:na};var os=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,n){return n===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,""));var ss=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");var is=t=>{if(B(t))return t;if(w(t))return t.split(" ");if(T(t))return Object.values(t);if(Ye(t))return[t]};var oa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cs=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=oa[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&bt&&dt){let n=bt.body.appendChild(bt.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){bt.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return bt.body.removeChild(n),[0,0,0,0];t=dt.getComputedStyle(n).color,bt.body.removeChild(n)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(n=>+n)):[0,0,0,0]};var sa=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]};var ia=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1);var ca=(t,e,n)=>{let r=Math.max(t,e,n),o=r-Math.min(t,e,n),s=1-Math.abs(r+r-o-1),i=o&&(r==t?(e-n)/o:r==e?2+(n-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(r+r-o)/2]},aa=(t,e,n,r=e*Math.min(n,1-n),o=(s,i=(s+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],la=(t,e)=>{let n=parseInt(t,16),r=(n>>16)+e;r>255?r=255:r<0&&(r=0);let o=(n>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(n&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|r<<16)+16777216).toString(16).slice(1)};var U=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,gr=new Set(["currentcolor","transparent","thin","medium","thick"]),$t=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,fa=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,At=t=>{if(!w(t))return null;if($t.test(t))return{passthrough:t};if(U(t))return{cssVar:t};let e=t.match(fa);if(!e)return null;let[,n,r,o]=e,s=r!==void 0?`0.${r}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:n,alpha:s,tone:i}},jt=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Se=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),o===","&&r===0){e.push(n),n="";continue}n+=o}return(n.length||!e.length)&&e.push(n),e},M=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),r===0&&/\s/.test(o)){n.length&&e.push(n),n="";continue}n+=o}return n.length&&e.push(n),e};var as=(t,e)=>{w(t)&&t.includes("rgb")&&(t=cs(t).join(", ")),w(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Ye(e)&&(e+="");let n=ia(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=la(n,parseFloat(e));return sa(o).join(", ")}else{let[o,s,i]=t,[a,c]=ca(o/255,s/255,i/255),f=Math.max(0,Math.min(100,parseFloat(e)))/100;return aa(a,c,f).map(l=>Math.round(Math.max(0,Math.min(1,l))*255)).join(", ")}};var yr=(t,e)=>{if(t[e])return t[e].value;let n=()=>Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value&&!t[o].isSystemFallback);if(t.default){let o=t[t.default];if(o&&o.isSystemFallback){let s=n();if(s)return t[s].value}if(o)return o.value}let r=n()||Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value);return r&&t[r]&&t[r].value};var Qe={};je(Qe,{animation:()=>$a,breakpoints:()=>Oa,class:()=>Na,color:()=>Sa,devices:()=>Ra,document:()=>Ta,font:()=>pa,fontFace:()=>ya,fontFamily:()=>ha,fontFamilyTypes:()=>ga,gradient:()=>xa,grid:()=>La,icons:()=>Aa,media:()=>ma,reset:()=>ja,semanticIcons:()=>Ca,sequence:()=>Vt,shadow:()=>ka,shape:()=>Ba,sizes:()=>Fa,skins:()=>Wa,spacing:()=>_a,svg:()=>Pa,svgData:()=>Ia,templates:()=>Ma,theme:()=>wa,timing:()=>va,typography:()=>mr,unit:()=>ua,vars:()=>Va});var Vt={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var ua={default:"em"};var da={browserDefault:16,base:16,type:"font-size",ratio:Vt["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},mr=da;var pa={};var ha={},ga={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},ya={};var ma={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var ba={base:mr.base,type:"spacing",ratio:Vt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},_a=ba;var Sa={},xa={};var wa={};var ka={};var Aa={},Ca={};var Ea={default:150,base:150,type:"timing",ratio:Vt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},va=Ea;var Ta={};var Oa={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Ra={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var $a={};var Pa={},Ia={};var Ma={};var Da={},La=Da;var Na={};var ja={},Va={},Fa={},Ba={},Wa={};var ls={},fs={};var Xe=Qe,Je={},us=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in Xe){let e=t.toLowerCase();Je[e]=Xe[t];let n=us(e);n!==e&&(Je[n]=Xe[t]),e!==t&&(Je[t]=Xe[t])}var we={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:ls,cssMediaVars:fs,CSS_VARS:ls,CSS_MEDIA_VARS:fs,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...Je},Ua=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return kt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=kt(e)?e:t.globalTheme,r=he(kt(n)?n:"auto");return Object.defineProperty(t,"globalTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r};var za=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return kt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=kt(e)?e:t.resolvedTheme,r=he(kt(n)?n:null);return Object.defineProperty(t,"resolvedTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r};Ua(we);za(we);var Jd=Qt(we),tn={active:"0",0:we};var xe=[],F=t=>{t&&t._scratchConfig&&xe.push(t)},L=()=>{xe.pop()},E=t=>xe.length?xe[xe.length-1]:tn[t||tn.active]||we;var en={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},ds=(t,e)=>{let{key:n,variable:r,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[n]={key:n,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:r},e.scales[n]=s;let c=ps.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},Jt=t=>{if(!t.includes("("))return t;let e=t.trim(),n=e.indexOf("("),r=e.slice(0,n),o=0,s=-1;for(let i=n;i<e.length;i++){let a=e[i];if(a==="(")o++;else if(a===")"&&(o--,o===0)){s=i;break}}return s===-1||/\s/.test(r)||e.slice(s+1).trim()!==""?[void 0,t]:[r,e.slice(n+1,s)]},br="\0",Ga=(t,e)=>{let n="",r=0,o="";for(let s of t){if(r===0&&s!=="("){n+=s;continue}o+=s,s==="("?r++:s===")"&&(r--,r===0&&(n+=br+e.length+br,e.push(o),o=""))}return n+o},Ha=(t,e)=>t.indexOf(br)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),qa=/^(calc|min|max|clamp)\((.*)\)$/,Ka=(t,e)=>{let n=qa.exec(t);return n?`${n[1]}(${gs(n[2],e)})`:t.indexOf("(")!==-1?t:nn(t,e)},ps=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ya=(t,e)=>{let{base:n,type:r,unit:o}=e,s=ps.has(o)?"rem":o,i=(sr(s)?1:n)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-")),f=`${c}-ratio`;if(t>0){let d=en[t-1];return`calc(var(${c}-${d}) * var(${f}))`}if(t<0){let d=en[t+1],l=Math.abs(t),p=Math.pow(hs,2*l),h=en[l];return h?`max(calc(var(${c}-${d}) / var(${f})), calc(var(${c}-${h}) / ${p.toFixed(4)}))`:`calc(var(${c}-${d}) / var(${f}))`}},Za=(t,e,n,r)=>{let{type:o}=r,i=t===2&&e.length===2?t+1:t,f=`${"--"+(r.varPrefix?r.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${n}) * var(${f+i}))`},Qa=(t,e)=>{let r=(t*e-t)/1.618,o=t*e-r,s=t+r,i=(o+s)/2;return[o,i,s]};var Xa=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,f=~~(o*s)-~~o,d,[l,p,h]=Qa(o,s);f>16?d=[l,p,h]:d=[l,h],d.forEach((u,g)=>{let y=~~(u/r*1e3)/1e3,b=i+(g+1),x=a+(g+1)/10,m=Za(g+1,d,i,e),_={key:n+(g+1),variable:b,value:u,scaling:y,scalingVariable:m,index:x};ds(_,e)})},hs=1.618,Ja=(t,e,n)=>{if(t>=0)return e*Math.pow(n,t);let r=Math.abs(t),o=e*Math.pow(n,t),s=e*Math.pow(n,r)/Math.pow(hs,2*r);return Math.max(o,s)},ke=t=>{let{type:e,base:n,ratio:r,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let f=0;f<=i;f++){let d=o[1]-f,l=en[d],p=Ja(d,n,r),h=~~(p/n*100)/100,u=c+l,g=Ya(d,t),y={key:l,variable:u,value:p,base:n,scaling:h,scalingVariable:g,ratio:r,index:d};ds(y,t),s&&Xa(y,t)}return t};var nn=(t="A",e)=>{let n=E(),{unit:r}=n;if(w(t)&&U(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let m=n.sizes;if(m){let _=m[t]||m[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:o,unit:s=r.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(vo(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let p=`--${e.varPrefix?e.varPrefix+"-":""}${ss(e.type.replace(".","-"))}-`,h=t.toUpperCase(),u=h.slice(0,1)==="-"?"-":"",g=u?h.slice(1):h,y="";g.includes("_")&&(y="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let b=m=>a.test(m)?`var(${p}${m}${y})`:m;if(g.includes("+")){let[m,_]=g.split("+"),S=`${b(m)} + ${b(_)}`;return u?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("*")){let[m,_]=g.split("*"),S=`${b(m)} * ${b(_)}`;return u?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("-")){let[m,_]=g.split("-"),S=`${b(m)} - ${b(_)}`;return u?`calc((${S}) * -1)`:`calc(${S})`}if(!o[g]&&g.length===2&&(n.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||n.useVariable){let m=`var(${p}${g}${y})`;return u?`calc(${m} * -1)`:m}let x=o?o[g]:null;if(!x){if(console.warn("can't find",o,g),Z())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?u+x.val+s:u+x.scaling+s},gs=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return Ga(t,o).split(r).map(i=>{let a=Ha(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:Ka(c,e)}).join("")},Ft=(t,e,n,r)=>{if(typeof t!="string")return E().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!r&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=Jt(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=gs(t,n):t=nn(t,n),{[e]:r?`${r}(${t})`:t}};var yp=fr();var tl="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",mp=new RegExp(`<(${tl})\\b([^>]*?)\\s*/>`,"g");var nl={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},on=(t,e)=>{let n=e.media&&e.media[t]||nl[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},sn=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},_r=new Set,bs=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),rl=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,ol=/gradient\(|url\(|image-set\(|var\(/i,sl=new Set(["transparent","currentColor","currentcolor"]),Sr=t=>{if(!w(t))return!1;let e=t.trim();return ol.test(e)?!1:rl.test(e)?!0:bs.has(e)||sl.has(e)},rn=new Set,ys=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(T(e)&&Object.keys(e).length||T(n)&&Object.keys(n).length)},ms=new Set,xr=0,kr=t=>{xr++;try{return t()}finally{xr--}},il=(t,e)=>{if(!w(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=At(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},wr=(t,e,n)=>{let r=il(t,n);if(r){if(!ms.has(t)){ms.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${r}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let o=At(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&ys(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!xr&&!rn.has(t)){rn.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=w(e)?e.toLowerCase():"";if(!bs.has(s)||!ys(n))return t;if(!rn.has(s)){rn.add(s);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${i}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},_s=(t,e,n)=>{let r=e!==void 0?e:1;if(!n)return`rgb(from ${t} r g b / ${r})`;if(n.charCodeAt(0)===43||n.charCodeAt(0)===45){let s=parseFloat(n),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${r})`}return`hsl(from ${t} h s ${n}% / ${r})`},H=(t,e,n)=>{let r=n||E();if(!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(U(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(B(t))[o,s,i]=t;else{let l=At(t);if(!l){let{color:p,gradient:h}=r,u=h[t]||p[t];return u?(e&&u[e]&&(u=u[e]),r.useVariable?`var(${u.var})`:u.value):wr(t,t,r)}if(l.passthrough)return l.passthrough;if(l.cssVar)return`var(${l.cssVar})`;o=l.name,s=l.alpha,i=l.tone}let{color:a,gradient:c}=r,f=a[o]||c[o];if(!f)return wr(t,o,r);if(e)if(f[e]!==void 0)f=f[e];else if(B(f)){let l=e.charCodeAt(0)===64?e.slice(1):e;l==="dark"?f=f[1]!==void 0?f[1]:f[0]:(l!=="light"&&r.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),f=f[0])}else r.verbose&&console.warn(t," - does not have ",e);if(w(f)){if(_r.has(o))return f;_r.add(o);try{return H(f,null,n)}finally{_r.delete(o)}}let d=f.rgb;if(!d){let l=r.useVariable?`var(${f.var})`:f.value;return(s||i)&&l?_s(l,s,i):l}return i&&!f[i]&&(d=as(d,i),f[i]={rgb:d,var:`${f.var}-${i}`}),f[i]&&(d=f[i].rgb),s?`rgba(${d}, ${s})`:i?`rgba(${d}, ${f.alpha!==void 0?f.alpha:1})`:r.useVariable?`var(${f.var})`:f.value!==void 0?f.value:`rgb(${d})`};var cl=t=>T(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),al=t=>{if(!T(t)||t.value!==void 0)return null;let e=[];for(let n in t)if(n!=="var"){if(n.charCodeAt(0)!==64||!cl(t[n]))return null;e.push(n.slice(1))}return e.length?e:null};var ll=(t,e,n,r,o)=>{let s=al(e);if(!s)return;if(w(e.var)){let c=`var(${e.var})`;return n||r?_s(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=H(t,"@light",o),a=H(t,"@dark",o);if(!(!Sr(i)||!Sr(a)))return i===a?i:`light-dark(${i}, ${a})`},ot=(t,e,n)=>{let r=n||E();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(U(t))return`var(${t})`;let o,s,i;if(B(t))o=t[0];else{let l=At(t);if(l){if(l.passthrough)return l.passthrough;if(l.cssVar)return`var(${l.cssVar})`;o=l.name,s=l.alpha,i=l.tone}else o=t}let{color:a,gradient:c}=r,f=a[o]||c[o],d=T(f);if(d&&f.value)return H(t,`@${e}`,n);if(d){if(r.useVariable&&f.var)return s||i?H(t,null,n):`var(${f.var})`;if(e){if(!r.useVariable&&a[o]===f){let l=ll(t,f,s,i,n);if(l!==void 0)return l}return H(t,`@${e}`,n)}else{let l={},p=sn(r);for(let h in f){if(h.charCodeAt(0)!==64)continue;let u=h.slice(1),g=H(t,h,n);if(g!==void 0&&(l[`[data-theme="${u}"] &`]=g,u==="light"||u==="dark")){let y=on(u,r);if(!y)continue;l[y]={[p]:g}}}return l}}else return wr(t,o,r)};var ul=t=>{let n=E().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return ke(o),o};var xs=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r};var dl=t=>{let e=E(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:ke(t)},z=(t,e="padding",n,r)=>{let o=dl(n);if(w(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=Jt(t);r=i[0],t=i[1]}}let s=r?[t]:w(t)&&t.includes("(")?M(t):is(t);if(B(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(f,d)=>Ft(s[d],e+f+i,o,r);return a[s.length].map((f,d)=>c(f,d))}return Ft(t,e,o,r)}},Bt=(t,e,n,r)=>{let o=E(),{spacing:s}=o,i=n||t[e];if(!r&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&w(i)&&i.includes("(")){let a=Jt(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=ul(t);return z(i,e,a,r)}return z(i,e,s,r)},ws=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=ir.some(i=>t.includes(i));return r||o?n:n.length<3&&/[A-Z]/.test(n)?n+"_default":n};return t.split(",").map(n=>n.trim()).map(e).join(",").split(" ").map(e).join(" ")};var ks=(t,e)=>{let n=E();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!w(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(U(t))return`var(${t})`;let[r]=B(t)?t:t.split(" "),s=n.shadow[r],i=T(s);if(!s)return n.verbose&&console.warn("Can't find color ",r),t;if(i&&!s.value&&n.useVariable&&s.var)return`var(${s.var})`;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;n.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={},c=sn(n);for(let f in s){if(f.charCodeAt(0)!==64)continue;let d=f.slice(1),l=s[f],p=l&&(l.value!==void 0?l.value:l);if(p!==void 0&&(a[`[data-theme="${d}"] &`]=p,d==="light"||d==="dark")){let h=on(d,n);if(!h)continue;a[h]={[c]:p}}}return a}return n.verbose&&console.warn("Can't find color",t),t};var pl=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),hl=t=>pl.has(t),Ar=(t,e,n)=>{if(t==null)return;let r=t+"";if($t.test(r))return r;let o=r.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?r:r.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(U(s))return`var(${s})`;if(hl(s)||/^\d/.test(s)||s==="0")return s;let i=kr(()=>H(s,e));if(jt(i))return i;if(gr.has(s.toLowerCase()))return s;n&&n(s);let a=z(s,"border");return a&&a.border?a.border:s}).join(" ")};var gl=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),Cs=(t,e)=>{for(let n in e){let r=e[n];T(r)?Cs(t[n]||(t[n]={}),r):t[n]=r}return t};var Cr=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(wt(t[r]))if(e&&gl(r))n[r]=Cs({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=Cr(t[r],e):o==="."&&(n[`&${r}`]=Cr(t[r],e))}else n[r]=t[r]}return n},Es=(t,e)=>{let n=e.shift();return t[n]?Es(t[n],e):t},As=(t,e)=>B(e)?Es(t,e):w(e)&&t[e]?t[e]:t;var Ae=(t,e)=>{let n=E();if(w(t)&&U(t)&&(t=Ae(t.slice(2))),!t||!w(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=B(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=As(s,o):s&&e&&(s=As(s,e)),Cr(s,!n.useVariable)};var vs=(t,e)=>{let n=E(),{fontFamily:r}=n;return yr(e||r,t)};var Ts=t=>{let e=E(),{typography:n}=e;return Ft(t,"fontSize",n)};var Os=t=>{if(!w(t))return;let n=E().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};var Ct=t=>{let e=E(),{timing:n}=e;return n[t]||n[os(t)]||t},_t=(t,e="timing")=>{let n=E(),{timing:r}=n;return Ft(t,e,r)};var Sl=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),Rs=/^-?[A-Z][0-9]?$/,Pt=t=>Ar(t),$s=t=>{if(w(t))return $t.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(U(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=H(e);return jt(n)?n:e}).join(" ")},Ps=(t,e)=>ks(t,e),Er=(t,e)=>{if(w(t))return $t.test(t)?t:Se(t).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(U(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=H(r);if(jt(o)){let i=ot(r,e);return T(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(r)||r==="0"||r.includes("px")||r.slice(-2)==="em")return r;let s=z(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", ")},vr=(t,e)=>{let n=t.indexOf("(");if(n===-1)return t;let r=t.slice(0,n+1),o=t.slice(n+1,t.lastIndexOf(")")),s=")",a=Se(o).map(c=>(c=c.trim(),c.split(/\s+/).map(d=>{if(!d||/^\d/.test(d)||d==="0"||Sl.has(d)||d==="transparent"||$t.test(d))return d;let l=H(d);return jt(l)?l:d}).join(" ")));return r+a.join(", ")+s},Is=(t,e)=>{if(!w(t))return;let n=E();return Se(t).map(r=>{let o=r.trim();if(U(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=ot(o,e);if(w(s))return s;if(T(s)){for(let i in s)if(w(s[i]))return s[i]}return o}return o.includes("gradient")?vr(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!At(o)?`url(${o})`:o}).join(", ")},Ms=t=>w(t)&&M(t).map(e=>z(e,"gap").gap).join(" "),Ds=t=>{if(!w(t))return t;let e=E();return M(t).map(n=>Rs.test(n)?nn(n,e.spacing):n).join(" ")},xl=t=>{if(!w(t))return;let e=t.split(" ");return e.length?e.map(n=>U(n)?`var(${n})`:n.length<3||n.includes("ms")?_t(n).timing||n:Ct(n)?Ct(n):n).join(" "):t},Tr=(t,e,n)=>{if(w(t))return t.split(",").map(r=>_t(r).timing||r).join(",")},Ls=t=>{if(!w(t))return;let e=t.split(",");if(e.length)return e.map(xl).join(",")};function N(t,e,n={},r={}){let o=ar.call(this,e||n[t]);if(o==null)return;let s;if(w(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=Jt(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=xs(t);!i&&a&&!r.ratio&&(o=ws(o))}return r.ratio?Bt(n,t,o,s):z(o,t,void 0,s)}var A=(t,e=null,n)=>N(t,e,n,{ratio:!0}),wl=(t,e,n)=>w(t)?M(t).map(r=>Rs.test(r)?Bt(e,n,r)[n]:r).join(" "):t,Wt=(t,e,n,r="borderRadius")=>{if(w(t))return{[r]:M(t).map(o=>{let s=Os(o);return s!==void 0?wl(s,e,n):Bt(e,n,o)[n]}).join(" ")}};var Rr=new WeakMap,kl={passive:!0},Al={passive:!0,capture:!0},$r=(t,e)=>rr.has(t)?e?Al:kl:e||!1;function Vs(t){let e=Rr.get(t);return e||(e={handlers:new Map,installed:new Set},Rr.set(t,e)),e}function Cl(t,e){let n=Vs(e);if(n.installed.has(t))return;n.installed.add(t);let r=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";e.addEventListener(t,s=>{if(o){let a=s.target,c=n.handlers.get(t),f=c&&a?c.get(a):null;if(!f||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;f(s);return}let i=s.target;for(;i&&i!==e;){let a=n.handlers.get(t);if(a){let c=a.get(i);if(c&&(c(s),s.cancelBubble))return}i=i.parentNode}},$r(t,r))}function Fs(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=Vs(r);Cl(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function Bs(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=Rr.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function Ns(t){return or.has(t)&&!me.has(t)}function Ws(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&F(r);try{let s=e.call(t,o,t,t.state,n);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{r&&L()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&L()}}function Ce(t,e,n){let{node:r,context:o}=e;if(!r)return;let s=Ws(e,n),i=nr.has(t);if(!i&&Ns(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;Fs(t,r,s,a)}else r.addEventListener(t,s,$r(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Ns(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;Bs(t,r,a)}else r.removeEventListener(t,s,$r(t,!1))})}var Or=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function Pr(t){if(typeof t!="string")return null;for(let e=0;e<Or.length;e++){let n=Or[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:Or[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}var El=/^[A-Za-z_$][\w$]*$/;function vl(t,e,n){let r=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(r=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof r=="string"&&El.test(r)){let c=r;r=function(d){return t.call(c,d)}}return typeof r!="function"?null:(s===void 0&&(s=rr.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function Tl(t,e,n){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=n&&n.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}function Ol(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function Rl(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function $l(t){let e=t.node;if(!e)return!1;let n=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return n?n.isConnected!==!1:!1}function Ir(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)js(t,e,n[o]);return}js(t,e,n)}}function js(t,e,n){let r=e.__ref,o=vl(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=Tl(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(r.__globalEvents&&r.__globalEvents.has(i))return;let a=Ws(e,o.handler),c=d=>{$l(e)&&a(d)},f={capture:o.capture,passive:o.passive,once:o.once};Ol(s,t.eventName,c,f)&&(r.__globalEvents||(r.__globalEvents=new Map),r.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:f}),r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{Rl(s,t.eventName,c,f),r.__globalEvents&&r.__globalEvents.delete(i)}))}function Us(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function Ee(t,e,n){let r=Us(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=zs(r[i],s);a&&a!==e&&Gs(t,a,n,new Set([e]))}}function zs(t,e){if(typeof t=="string"){if(t.includes(">")){let n=t.split(">").map(o=>o.trim()),r=e[n[0]]||e[`smbls.${n[0]}`];for(let o=1;o<n.length&&r;o++)r=r[n[o]];return r||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Gs(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=Us(e);if(o.length){let i=(t.context||n?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=zs(o[a],i);c&&Gs(t,c,n,r)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Hs(t[s],i):t[s]=i}}function Hs(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Hs(o,s):n[r]=s}return n}var Mr={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]};var Ut=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):Il(t),Pl=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Il=t=>Pl.has(t)?t.toLowerCase():null,Ml=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),Et=t=>typeof t=="string"&&(Ml.has(t)||t.startsWith("aria-")),st=(t,e)=>e!==!0&&e!==!1?e:Et(t)?e?"true":"false":e===!0?"":e,vt=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Ut(e)||Mr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Mr,t)?Mr[t].includes(e):!1;var cn=(t,e)=>{let n=t.call("exec",e,t);if(n)return w(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},qs=(t,e)=>{let n=(t.preSrc||"")+(cn(t,e)||"");if(!n)return;try{return new URL(n),n}catch{}let{context:r}=t;if(!r.files&&!r.assets)return n;if(n.startsWith("/assets/")){let o=n.slice(8),s=r.assets&&(r.assets[n]||r.assets[o]);return s&&s.content?s.content.src:n}if(n.startsWith("/files/")){let o=n.slice(7),s=r.files&&(r.files[n]||r.files[o]);return s&&s.content?s.content.src:n}if(r.assets){let o=r.assets[n];if(o&&o.content)return o.content.src}if(r.files){let o=r.files[n];if(o&&o.content)return o.content.src}return n},te={src:t=>qs(t,t.src),href:t=>cn(t,t.href),action:t=>cn(t,t.action),poster:t=>qs(t,t.poster),data:t=>cn(t,t.data)},Ks=t=>{let e=t.tag||"div",n={};for(let r in te)if(t[r]!==void 0&&vt(e,r)){let o=te[r](t);o!==void 0&&(n[r]=o)}return n};function Dr(t={},e={}){let n=this,r=n.__ref;if(!r)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof n.onBeforeUpdate=="function"&&Lr(r))try{let i=n.onBeforeUpdate(n,n.state,n.context,e);if(i&&typeof i.then=="function")i.then(()=>Tt(r,!1),a=>{Tt(r,!0),n.context?.plugins?.length&&rt("error",n,{hook:"onBeforeUpdate",error:a})||console.error("[DOMQL] onBeforeUpdate error:",a)});else if(Tt(r,!1),i===!1)return n}catch(i){throw Tt(r,!0),i}let o=!t||Object.keys(t).length===0,s=[];qe(()=>{if(t.state&&V(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&ee(n,t.text??"")),t.html!==void 0&&(n.html=t.html,!r.__exec.html&&n.node&&(n.node.innerHTML=t.html)),t.style&&n.node?.style){if(!r.__exec.style)for(let i in t.style){let a=t.style[i];if(a==null)continue;let c=i.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),f=String(a).replace(/\s*!important\s*$/,"");n.node.style.setProperty(c,f,"important")}n.style||(n.style={}),Object.assign(n.style,t.style)}if(t.attr&&n.node?.setAttribute){for(let i in t.attr){let a=t.attr[i];a==null||a===!1&&!Et(i)?n.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&n.node.setAttribute(i,st(i,a))}n.attr||(n.attr={}),Object.assign(n.attr,t.attr)}if(t.data&&n.node?.dataset){for(let i in t.data)n.node.dataset[i]=t.data[i];n.data||(n.data={}),Object.assign(n.data,t.data)}for(let i in t){if(Y.has(i)||i==="state")continue;let a=t[i],c=n[i];if(c&&c.__ref&&typeof c.update=="function")c.update(a,e);else if(typeof a=="object"&&a!==null){let f=i.charCodeAt(0);f>=65&&f<=90&&it(a,n,i,e)}else i!=="text"&&i!=="html"&&i!=="style"&&i!=="attr"&&i!=="data"&&(n[i]=a,typeof a!="function"&&s.push(i))}});for(let i=0;i<s.length;i++)Qs(n,s[i]);if(n.node){for(let i=0;i<s.length;i++)if(Ys(s[i])){Zs(n);break}}if(n.node&&o&&r.__effects&&r.__effects.length)for(let i=0;i<r.__effects.length;i++){let a=r.__effects[i];a&&!a._disposed&&!a._isSubscribeToEffect&&typeof a._execute=="function"&&a._execute()}else if(n.node&&r.__conditionalRunners)for(let i of r.__conditionalRunners)i();return rt("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}function Nr(t){if(!t)return;let e=t.__ref;if(!e)return;e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){let r=e.__children.slice();e.__children.length=0;for(let o=0;o<r.length;o++){let s=t[r[o]];s&&s.__ref&&Nr(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let n=t.state?.$destroy||t.state?.destroy;if(typeof n=="function"&&t.state.__element===t&&n.call(t.state),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}function jr(){Nr(this)}var an=new Map,Dl=null,Xs=null;var Js=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function ai(){try{let t=E();if(t){if(Js(t.__domDocument))return t.__domDocument;if(Js(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var ne={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};var Ll={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function ln(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function fn(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e.toString(36)}function Nl(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():fn(e)}var jl={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"};function Fr(t,e){let n=jl[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function Vl(t){let e="";for(let n in t){let r=t[n];if(typeof r!="object"||r===null)continue;let o="";for(let s in r){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;o+=Fr(i?s:ln(s),r[s])}e+=`${n}{${o}}`}return e}var Fl="@media (hover: hover)",Bl=/(?:^|[^\\]):hover(?![\w-])/;function li(){try{let t=E();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Te(t,e,n){return n===!1||!Bl.test(e)||n===void 0&&!li()?t:`${Fl}{${t}}`}function ti(t,e,n){let r=(n?n+"":"")+t+":"+e,o=an.get(r),s=o?null:ln(t);if(!o){let c=Ll[t]||fn(t),f=Nl(e);o=n?`_${n}_${c}-${f}`:`_${c}-${f}`,an.set(r,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||ln(t),a=`.${o}{${Fr(i,e)}}`;return ve(a,void 0,"atomic"),o}var ei=new WeakMap,ni=new WeakMap;function ve(t,e,n){let r=fi(e,Wl(t));if(!r)return ne.dropped++,"dropped";let o=ei.get(r);if(o||(o=new Set,ei.set(r,o)),o.has(t))return ne.duplicate++,ne[n||"global"]++,"duplicate";let s=ni.get(r);if(s&&s.has(t))return ne.invalid++,"invalid";try{r.insertRule(t,r.cssRules.length)}catch{return s||(s=new Set,ni.set(r,s)),s.add(t),ne.invalid++,"invalid"}return o.add(t),ne[n||"global"]++,"inserted"}var pt="0:0",ri="1:0",oi=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function Wl(t){if(typeof t!="string"||!t)return pt;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return pt;let e=1/0,n=-1/0;oi.lastIndex=0;let r;for(;r=oi.exec(t);){let o=parseFloat(r[2])*(r[3]==="em"||r[3]==="rem"?16:1);r[1]==="max"?e=Math.min(e,o):n=Math.max(n,o)}return e!==1/0?"2:"+-e:n!==-1/0?"3:"+n:ri}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?pt:ri}var si=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},Ul=(t,e)=>{let[n,r]=si(t),[o,s]=si(e);return n!==o?n<o:r<s},zl=t=>t.getAttribute("data-tier")||pt,ii=new WeakMap;function fi(t,e){let n=t||ai();if(!n||!n.head)return null;let r=e||pt,o=ii.get(n);o||(o=new Map,ii.set(n,o));let s=o.get(r);if(s&&s.ownerNode&&s.ownerNode.parentNode===n.head)return s;r!==pt&&fi(n,pt);let i=r===pt?n.head.querySelector("style[data-smbls]:not([data-tier])"):n.head.querySelector(`style[data-smbls][data-tier="${r}"]`);if(!i){i=n.createElement("style"),i.setAttribute("data-smbls",""),r!==pt&&i.setAttribute("data-tier",r);let c=n.head.querySelectorAll("style[data-smbls]"),f=null;for(let l=0;l<c.length;l++)if(Ul(r,zl(c[l]))){f=c[l];break}let d=c.length?c[c.length-1]:null;f?n.head.insertBefore(i,f):d?n.head.insertBefore(i,d.nextSibling):n.head.appendChild(i)}let a=i.sheet;return o.set(r,a),r===pt&&(Dl=a),a}var Gl=8;function zt(t,e,n,r){if(!t||typeof t!="object")return"";let o=!!(r&&r.state),s=null,i=0,a=[],c=[];for(let d in t){let l=t[d];l==null||l===!1||l===""||(typeof l=="object"?c.push([d,l]):Xs?(s||(s=[]),s.push(d,String(l)),i++):a.push(ti(d,String(l),n)))}if(s&&i>=Gl){let d=s.join("\0"),l=Xs(d),p=l.indexOf("\0"),h=l.substring(0,p),u=l.substring(p+1);if(u){let g=u.split(`
|
|
15
|
+
`);for(let y=0;y<g.length;y++)g[y]&&ve(g[y],void 0,"atomic")}a.push(h)}else if(s)for(let d=0;d<s.length;d+=2)a.push(ti(s[d],s[d+1],n));let f=[];for(let d=0;d<c.length;d++)f.push(Kl(c[d][0],c[d][1],n,o));return a.concat(f).join(" ").trim()}var ci=new Map,Hl=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function Vr(t){return/^@(media|supports|container)\b/.test(t)}function ql(t){return typeof t!="string"||!t||Vr(t)?!1:t.split(",").every(e=>Hl.test(e.trim()))}function Kl(t,e,n,r){let o=JSON.stringify(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&li(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=an.get(a);if(c){let m=ci.get(c);if(m)for(let _=0;_<m.length;_++)ve(m[_],void 0,"atomic");return c}c=n?`_${n}_c${fn(a)}`:`_c${fn(a)}`;let f=r?`.${c}.${c}`:`.${c}`,d=ql(t)?`${f}.${c}`:f,l="",p=[],h=m=>typeof m=="string"&&(m.indexOf("{")!==-1||m.indexOf("}")!==-1),u=(m,_)=>{let S="";for(let k in _){let C=_[k];if(C!=null)if(typeof C=="object")u([...m,k],C);else{if(h(C))continue;S+=Fr(ln(k),C)}}S&&(m.length===0?l+=S:p.push({chain:m,body:S}))};u([],e);let g=m=>m.startsWith(":")||m.startsWith("["),y=(m,_=!0)=>{let S=_&&m.length===1?d:f;if(!m.length)return S;let k=m[0].split(",").map(C=>C.trim()).map(C=>C.includes("&")?C.replace(/&/g,S):g(C)?`${S}${C}`:`${S} ${C}`);for(let C=1;C<m.length;C++){let D=m[C].split(",").map(R=>R.trim()),j=[];for(let R of k)for(let nt of D)nt.includes("&")?j.push(nt.replace(/&/g,R)):g(nt)?j.push(R+nt):j.push(R+" "+nt);k=j}return k.join(", ")},b=[],x=(m,_)=>{let S=m.filter(Vr),k=y(m.filter(D=>!Vr(D)),S.length===0),C=`${k}{${_}}`;for(let D=S.length-1;D>=0;D--)C=`${S[D]}{${C}}`;C=Te(C,k,i),b.push(C),ve(C,void 0,"atomic")};l&&x([t],l);for(let m of p)x([t,...m.chain],m.body);return ci.set(c,b),an.set(a,c),c}function un(t,e){return ve(`@keyframes ${t}{${Vl(e)}}`,void 0,"keyframes"),t}var Yl=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],Zl=["none","forwards","backwards","both"],Ql=["normal","reverse","alternate","alternate-reverse"],Xl=["running","paused"],Jl=t=>/^[\d.]+m?s$/.test(t),tf=/^(?:translate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|scale(?:3d|x|y|z)?\((?:\s*1(?:\.0+)?\s*,?)+\)|rotate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|skew(?:x|y)?\((?:\s*0[a-z%]*\s*,?)+\)|matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\))$/,ef=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let n=e.match(/[a-z0-9]+\([^()]*\)/g);return!n||n.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:n.every(r=>tf.test(r.replace(/\s+/g,"")))},ui=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),nf={transform:ef,translate:ui,rotate:t=>ui(t)||/^\s*(?:[xyz]\s+)?0(?:deg|rad|turn|grad)?\s*$/.test(String(t).toLowerCase()),scale:t=>/^(none|initial|unset)$/.test(String(t).trim().toLowerCase())||/^(?:\s*1(?:\.0+)?)+\s*$/.test(String(t)),opacity:t=>/^(initial|unset)$/.test(String(t).trim().toLowerCase())||Number(t)===1},rf=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let n=e.match(/^(\d+(?:\.\d+)?)%$/);return n?Number(n[1]):null},of=t=>{if(!T(t))return null;let e=null,n=-1;for(let r in t){let o=rf(r);o==null||!T(t[r])||o>=n&&(n=o,e=t[r])}return e},sf=t=>{let e=of(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=nf[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},cf=(t,e)=>{if(T(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return T(r)?r:null},af=["reverse","alternate","alternate-reverse"],di=(t,e,n)=>{let r=n||e.animationDirection;return r&&af.includes(String(r))?"both":sf(cf(t,e))?"backwards":"both"},lf=0,pi=new Map,Br=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(T(t)){let o=JSON.stringify(t),s=pi.get(o);if(s)return s;let i=`smbls-anim-${lf++}`,a=un(i,t);return pi.set(o,a),a}let r=n&&n[t];return T(r)?un(t,r):t},ff=t=>{let e=[],n=0,r="";for(let o of String(t).trim())o==="("?n++:o===")"&&n>0&&n--,n===0&&/\s/.test(o)?(r&&e.push(r),r=""):r+=o;return r&&e.push(r),e},uf=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},r=ff(t),o=null,s=[],i=null,a=null,c=null,f=null,d=null;for(let l of r)n&&n[l]?o=l:Jl(l)?s.push(l):Yl.includes(l)||l.startsWith("cubic-bezier")||l.startsWith("steps(")||l.startsWith("linear(")?i=l:l==="infinite"||/^\d+$/.test(l)?a=l==="infinite"?l:Number(l):Ql.includes(l)?c=l:Zl.includes(l)?f=l:Xl.includes(l)?d=l:o||(o=l);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:f,playState:d}},hi={animation:(t,e)=>{if(t!=null){if(w(t)&&t.includes(" ")){let n=uf(t,e);return{animationName:Br(n.name||t,e),animationDuration:n.durations[0]||_t(e.animationDuration||"A").timing,animationDelay:n.durations[1]||_t(e.animationDelay||"0s").timing,animationTimingFunction:n.timingFunction||Ct(e.animationTimingFunction||"ease"),animationFillMode:n.fillMode||e.animationFillMode||di(n.name||t,e,n.direction),animationIterationCount:n.iterationCount!=null?n.iterationCount:e.animationIterationCount||1,animationPlayState:n.playState||e.animationPlayState,animationDirection:n.direction||e.animationDirection}}return{animationName:Br(t,e),animationDuration:_t(e.animationDuration||"A").timing,animationDelay:_t(e.animationDelay||"0s").timing,animationTimingFunction:Ct(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||di(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:Br(t,e)}),animationDuration:t=>({animationDuration:_t(t).timing}),animationDelay:t=>({animationDelay:_t(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Ct(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};var dn=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!w(e))return;let[r,o]=M(e);return{...A(t+"Start",r,n),...A(t+"End",o||r,n)}},gi={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>A("height",t,e),width:(t,e)=>A("width",t,e),boxSizing:t=>To(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("height",e),...N("width",n||e)}},inlineSize:(t,e)=>A("inlineSize",t,e),blockSize:(t,e)=>A("blockSize",t,e),minWidth:(t,e)=>A("minWidth",t,e),maxWidth:(t,e)=>A("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("minWidth",e),...N("maxWidth",n||e)}},minHeight:(t,e)=>A("minHeight",t,e),maxHeight:(t,e)=>A("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("minHeight",e),...N("maxHeight",n||e)}},size:t=>{if(!w(t))return;let[e,n]=M(t);return{...A("inlineSize",e),...A("blockSize",n||e)}},minBlockSize:(t,e)=>A("minBlockSize",t,e),minInlineSize:(t,e)=>A("minInlineSize",t,e),maxBlockSize:(t,e)=>A("maxBlockSize",t,e),maxInlineSize:(t,e)=>A("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("minInlineSize",e),...N("minBlockSize",n||e)}},maxSize:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("maxInlineSize",e),...N("maxBlockSize",n||e)}},borderWidth:(t,e)=>A("borderWidth",t,e),borderTopWidth:(t,e)=>A("borderTopWidth",t,e),borderRightWidth:(t,e)=>A("borderRightWidth",t,e),borderBottomWidth:(t,e)=>A("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>A("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>A("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>A("textUnderlineOffset",t,e),padding:(t,e)=>A("padding",t,e),paddingInline:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("paddingInlineStart",e),...N("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("paddingBlockStart",e),...N("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>A("paddingBlockStart",t,e),paddingBottom:(t,e)=>A("paddingBlockEnd",t,e),paddingLeft:(t,e)=>A("paddingInlineStart",t,e),paddingRight:(t,e)=>A("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>A("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>A("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>A("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>A("paddingInlineEnd",t,e),margin:(t,e)=>A("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("marginInlineStart",e),...N("marginInlineEnd",n||e)}},marginBlock:t=>{if(!w(t))return;let[e,n]=M(t);return{...N("marginBlockStart",e),...N("marginBlockEnd",n||e)}},marginTop:(t,e)=>A("marginBlockStart",t,e),marginBottom:(t,e)=>A("marginBlockEnd",t,e),marginLeft:(t,e)=>A("marginInlineStart",t,e),marginRight:(t,e)=>A("marginInlineEnd",t,e),marginInlineStart:(t,e)=>A("marginInlineStart",t,e),marginInlineEnd:(t,e)=>A("marginInlineEnd",t,e),marginBlockStart:(t,e)=>A("marginBlockStart",t,e),marginBlockEnd:(t,e)=>A("marginBlockEnd",t,e),scrollMargin:(t,e)=>A("scrollMargin",t,e),scrollMarginTop:(t,e)=>A("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>A("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>A("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>A("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>dn("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>dn("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>A("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>A("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>A("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>A("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>A("scrollPadding",t,e),scrollPaddingTop:(t,e)=>A("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>A("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>A("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>A("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>dn("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>dn("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>A("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>A("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>A("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>A("scrollPaddingInlineEnd",t,e),gap:t=>({gap:Ms(t)}),columnGap:(t,e)=>Bt(e,"columnGap",t),rowGap:(t,e)=>Bt(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!w(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!w(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>Wt(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Wt(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Wt(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Wt(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Wt(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Wt(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var yi={fontSize:t=>Ts(t)||t,fontFamily:t=>({fontFamily:vs(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var mi={overflow:t=>({overflow:t}),cursor:(t,e,n,r)=>{if(!t)return;let o=r.assets&&r.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=r.files&&r.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var bi={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:M(t).map(n=>z(n,"k").k).join(" ")}},left:t=>z(t,"left"),top:t=>z(t,"top"),right:t=>z(t,"right"),bottom:t=>z(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=M(t).map(n=>z(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=M(t).map(n=>z(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};var pn=0,Wr=()=>{pn++},Ur=()=>{pn>0&&pn--},lt=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:pn>0?null:n&&n.resolvedTheme||null},tt=(t,e)=>{if(e==null||e==="")return;if(!T(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(T(s)){let i=tt(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},_i={theme:(t,e)=>{if(t)return e.themeModifier?Ae(t,`@${e.themeModifier}`):Ae(t)},color:(t,e)=>{let n=lt(e);if(t)return tt("color",ot(t,n))},background:(t,e)=>{let n=lt(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:vr(t,n)}:tt("background",ot(t,n))},backgroundColor:(t,e)=>{let n=lt(e);if(t)return tt("backgroundColor",ot(t,n))},backgroundImage:(t,e,n,r)=>{let o=lt(e);if(!t)return;let s=r.assets&&r.assets[t];if(s&&s.content)t=s.content.src;else{let i=r.files&&r.files[t];i&&i.content&&(t=i.content.src)}return tt("backgroundImage",Is(t,o))},textStroke:t=>{let e=$s(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:Pt(t)}),outlineWidth:(t,e)=>A("outlineWidth",t,e),outlineColor:(t,e)=>{let n=lt(e);if(t)return tt("outlineColor",ot(t,n))},outlineOffset:(t,e)=>A("outlineOffset",t,e),border:t=>({border:Pt(t)}),borderColor:(t,e)=>{let n=lt(e);if(t)return tt("borderColor",ot(t,n))},borderTopColor:(t,e)=>{let n=lt(e);if(t)return tt("borderTopColor",ot(t,n))},borderBottomColor:(t,e)=>{let n=lt(e);if(t)return tt("borderBottomColor",ot(t,n))},borderLeftColor:(t,e)=>{let n=lt(e);if(t)return tt("borderLeftColor",ot(t,n))},borderRightColor:(t,e)=>{let n=lt(e);if(t)return tt("borderRightColor",ot(t,n))},borderLeft:t=>({borderLeft:Pt(t)}),borderTop:t=>({borderTop:Pt(t)}),borderRight:t=>({borderRight:Pt(t)}),borderBottom:t=>({borderBottom:Pt(t)}),shadow:(t,e)=>{let n=lt(e);if(t)return tt("boxShadow",Ps(t,n))},boxShadow:(t,e)=>{if(!w(t))return;let[n,r]=t.split("!importan"),o=lt(e),s=r?" !important":"",i=Er(n.trim(),o);return w(i)?{boxShadow:i+s}:tt("boxShadow",i)},textShadow:(t,{context:e})=>tt("textShadow",Er(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:Pt(t)})};var Si={transition:t=>{let e=Ls(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Tr(t)}),transitionDelay:t=>({transitionDelay:Tr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Ct(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};var xi={flow:(t,e)=>{let n=e.reverse;if(!w(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!w(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};var df=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,pf=t=>{if(!w(t))return t;let e=E().sizes;return e?t.replace(df,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},St=t=>pf(Ds(t)),wi={gridTemplateColumns:t=>({gridTemplateColumns:St(t)}),gridTemplateRows:t=>({gridTemplateRows:St(t)}),gridAutoColumns:t=>({gridAutoColumns:St(t)}),gridAutoRows:t=>({gridAutoRows:St(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:St(t)}),templateColumns:t=>({gridTemplateColumns:St(t)}),autoColumns:t=>({gridAutoColumns:St(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:St(t)}),templateRows:t=>({gridTemplateRows:St(t)}),autoRows:t=>({gridAutoRows:St(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var G={...hi,...gi,...yi,...mi,...bi,..._i,...Si,...xi,...wi};var W=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationTimeline","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","interpolateSize","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapStop","scrollSnapType","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);function Gr(t,e,n){let r=t?.context?.analyze;if(!r||!r.emit||e==="warn"&&!r.shouldCapture("warnings")||e==="error"&&!r.shouldCapture("errors"))return;let o=n.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:n})}var ki=new Set;function Ai(t,e,n){let r=String(e);if(ki.has(r))return;ki.add(r);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.join("."):t?.key!=null?String(t.key):"(unknown element)",i=n!=null?`resolves to a non-function (${typeof n}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${r}') at <${s}>: "${r}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;Gr(t,"error",[a]),console.error(a)}var gf=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),yf=new Set,mf=t=>gf(zr,t)&&!(Ro||yf).has(t),Ci=new Set;function bf(t,e){Ci.has(t)||(Ci.add(t),Z()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function _f(...t){return Gr(this,"warn",t),Zo.apply(this,t)}function Sf(...t){return Gr(this,"error",t),Qo.apply(this,t)}var zr={update:Dr,remove:jr,getDB:es,getQuery:ns,getRootData:qo,getPath:zo,nextElement:Xo,previousElement:Jo,verbose:hr,warn:_f,error:Sf,variables:ts,spotByPath:Uo,set(t,e){let n=this.__ref;if(n){if(n.__setLocked){n.__setQueued={content:t,options:e};return}n.__setLocked=!0}try{if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(n){n.__setLocked=!1;let r=n.__setQueued;r&&(n.__setQueued=null,this.set(r.content,r.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let n=this.parent,r=this.key,o=this.parse();return this.remove(),e(o,n,r,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let n of e.__children){let r=this[n];if(!r)continue;if(typeof t=="function"){if(t(r))return r}else if(typeof t=="string"&&r.key===t)return r;let o=r.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let n=this.__ref;if(!n?.__children)return e;for(let r of n.__children){let o=this[r];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:Ho,getRootState:Go,getRootContext:Ko,getContext:Yo,parse(t){let e={},n=t?new Set(t):null,r=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!n?.has(o)){if(r&&r[o]!==void 0){e[o]=r[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),n=this.__ref;if(n?.__children)for(let r of n.__children)this[r]?.parseDeep&&(e[r]=this[r].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let n of t)e[n]=this[n];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let n=t[e];if(n==null)continue;let r=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(n).replace(/\s*!important\s*$/,"");this.node.style.setProperty(r,o,"important")}},call(t,...e){let n=this.context,r=mf(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&bf(t,"el.call");let o=r?this[t]:n?.methods?.[t]||n?.functions?.[t]||n?.utils?.[t]||this[t];if(typeof o=="function"){let s=lr;if(!s||!s(o))return o.call(this,...e);Z()&&Ai(this,t,_e(o));return}Z()&&Ai(this,t,o)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let n=t.__children.indexOf("content");n!==-1&&t.__children.splice(n,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},Ei=new WeakMap;function xf(t){if(!t)return zr;let e=Ei.get(t);if(e)return e;e=Object.create(zr);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return Ei.set(t,e),e}function Hr(t){let e=xf(t.context);Object.setPrototypeOf(t,e)}var hn=[],gn=!1,It=0;function yn(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function vi(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),t()},n.port2.postMessage(0);return}setTimeout(t,0)}function qr(){return It?yn()-It>=50:!1}var re=0;function Kr(){re===0&&!It&&(It=yn()),re++}function Yr(){re>0&&re--,re===0&&!gn&&(It=0)}function Zr(t){hn.push(t),gn||(gn=!0,vi(Ti))}function Ti(){for(It=yn();hn.length;){let t=hn.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(yn()-It>=50)break}if(hn.length){vi(Ti);return}gn=!1,It=0,re=0}var mn=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},ht=(t,e,n,{onlyIfAbsent:r}={})=>{mn(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&mn(t,e,n)},Qr=(t,e,...n)=>{if(!t)return;let r=t["$"+e];if(typeof r=="function")return r.apply(t,n);let o=t[e];if(typeof o=="function")return o.apply(t,n)},Mt=(t,e)=>{if(V(e)){let o=e.__raw||e;ht(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),ht(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),ht(o,"setByPath",function(s,i,a={}){let c=s.split("."),f=e;for(let d=0;d<c.length-1;d++)f[c[d]]===void 0&&(f[c[d]]={}),f=f[c[d]];return f[c[c.length-1]]=i,e}),ht(o,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),ht(o,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let f=0;f<a.length-1;f++){if(c==null)return e;c=c[a[f]]}return c&&delete c[a[a.length-1]],e}),ht(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),ht(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),ht(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),ht(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&V(a.parent);)a=a.parent;return Qr(a,"update",s,i)}),ht(o,"parentUpdate",function(s,i={}){if(e.parent)return Qr(e.parent,"update",s,i)}),ht(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=V(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,V(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let n=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},r={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;n();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return n(),e}};for(let o in r)if(mn(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Co(o,"");continue}mn(e,o,r[o])}};var Am=new Proxy(Object.create(null),{get(){},has(){return!1}});var bn="3.14.792";var Oi="__SMBLS_ELEMENT_ID_ENGINE__",Ri=(t,e,n)=>{let r=e||bn,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[Oi];return s&&s.engine&&s.version===r?s.engine:(s||(o[Oi]={version:r,engine:t}),t)};var v=(t,e)=>e.split(" ").map(n=>t+"-"+n),Xr="top right bottom left",Jr=Xr+" block block-start block-end inline inline-start inline-end",Dt="start end",Gt="width style color",_n=t=>v(t,Jr),wf=(()=>{let t=v("border","width style color image");for(let e of Jr.split(" "))t.push("border-"+e,...v("border-"+e,Gt));return t})(),$i=t=>[...v("border-"+t,Gt+" start end"),...v("border-"+t+"-start",Gt),...v("border-"+t+"-end",Gt)],Ot={animation:v("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:v("background","image position position-x position-y size repeat origin clip attachment color"),border:wf};for(let t of["width","style","color"])Ot["border-"+t]=Jr.split(" ").map(e=>"border-"+e+"-"+t);for(let t of Xr.split(" "))Ot["border-"+t]=v("border-"+t,Gt);Ot["border-block"]=$i("block");Ot["border-inline"]=$i("inline");Object.assign(Ot,{"border-image":v("border-image","source slice width outset repeat"),"border-radius":"top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" ").map(t=>"border-"+t+"-radius"),columns:v("column","width count"),"column-rule":v("column-rule",Gt),container:v("container","name type"),"contain-intrinsic-size":v("contain-intrinsic","width height"),flex:v("flex","grow shrink basis"),"flex-flow":v("flex","direction wrap"),font:[...v("font","style variant weight stretch size"),"line-height",...v("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:v("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":v("grid-template","rows columns areas"),"grid-area":v("grid","row column row-start row-end column-start column-end"),"grid-row":v("grid-row",Dt),"grid-column":v("grid-column",Dt),inset:[...Xr.split(" "),...v("inset","block block-start block-end inline inline-start inline-end")],"inset-block":v("inset-block",Dt),"inset-inline":v("inset-inline",Dt),"list-style":v("list-style","type position image"),margin:_n("margin"),"margin-block":v("margin-block",Dt),"margin-inline":v("margin-inline",Dt),mask:v("mask","image mode repeat position clip origin size composite"),offset:v("offset","position path distance rotate anchor"),outline:v("outline",Gt),overflow:v("overflow","x y"),"overscroll-behavior":v("overscroll-behavior","x y"),padding:_n("padding"),"padding-block":v("padding-block",Dt),"padding-inline":v("padding-inline",Dt)});for(let t of["content","items","self"])Ot["place-"+t]=["align-"+t,"justify-"+t];Object.assign(Ot,{"scroll-margin":_n("scroll-margin"),"scroll-padding":_n("scroll-padding"),"text-decoration":v("text-decoration","line style color thickness"),"text-emphasis":v("text-emphasis","style color"),transition:v("transition","property duration timing-function delay behavior")});var Oe={};for(let t in Ot)for(let e of Ot[t])(Oe[e]||(Oe[e]=[])).push(t);var kf=new Set(["rows","cols","wrap"]),Sn=(t,e)=>kf.has(e)&&vt(t,e),oe=(t,e)=>!!(G[e]||W&&W.has(e))&&!Sn(t,e);var zi=Ri({uniqId:1,scopedStyleId:0},bn),$e=[],Ht=new Set,lo=!1,Gi=0,se=null,Ie=null;function ie(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function Hi(){return typeof document<"u"&&document.visibilityState==="hidden"}var Af=250,Cf=1e3;function Ef(){return Ie&&(Ie!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||Hi())?!0:ie()-Gi>=Cf}function vf(){if(lo=!0,Gi=ie(),Ie=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(kn,0);se=t?()=>t(e):null;return}if(Hi()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(kn,Af);se=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Ie=requestAnimationFrame;let e=requestAnimationFrame(kn);se=t?()=>t(e):null}}function Rn(){if(lo){if(!Ef())return;let t=se;if(se=null,t)try{t()}catch{}}vf()}var qi=300,Ki=15e4;function kn(){if(lo=!1,se=null,Ie=null,Ht.size&&eu(),!$e.length)return;let t=$e.splice(0,$e.length);for(let e=0;e<t.length;e++){let n=t[e];if(n.node){if(!n.node.isConnected){let r=n.__ref||(n.__ref={});r.__mountAttempts=(r.__mountAttempts||0)+1,r.__mountFirstAttemptAt==null&&(r.__mountFirstAttemptAt=ie());let o=ie()-r.__mountFirstAttemptAt;r.__mountAttempts<=qi&&o<Ki?($e.push(n),Rn()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}et("Mounted",n,n.__ref?.__mountOptions||{})}}}function ro(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&go(t,!0),typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,$e.push(t),Rn())}function Pi(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&rt("contentUpdate",t,e);let n=t.context?.designSystem;n&&F(n);try{t.onContentUpdate(t,t.state,t.context,e)}catch(r){if(t.context?.plugins?.length&&rt("error",t,{hook:"onContentUpdate",error:r})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',r),t.context?.strictMode)throw r}finally{n&&L()}}function Rt(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Tf(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Of(t){return t.toLowerCase()}function oo(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function Pe(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Pe(o,s):n[r]=s}return n}function En(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function Yi(t,e,n){return En(t)||(e&&typeof e=="object"?En(e.key):void 0)||String(n)}function it(t,e,n,r={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=En(n);let s=En(t.key),i=Object.create(null);i.key=n||s||`_${zi.uniqId++}`,i.parent=e||null,i.context=t.context||e?.context||r.context||{},i.context.__create||(i.context.__create=it);let a=i.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||i,path:e?.__ref?.path?[...e.__ref.path,i.key]:[i.key],origin:t};if(n&&!t.extends&&!t.extend){let y=n.indexOf("_"),b=n.indexOf("."),x=y>0?y:-1;if(b>0&&(x<0||b<x)&&(x=b),x>0){let m=n.substring(0,x),_=i.context?.components;_&&(_[m]||_["smbls."+m])?t={...t,extends:m}:_&&Z()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${m}" but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Ee(i,t,r);let c=new Set(["childProps","attr","style","scope","data"]),f=i.props&&typeof i.props=="object"?i.props:null;for(let y in t){if(y==="parent"||y==="node"||y==="__ref"||y==="extends"||y==="context"||y==="props")continue;if(y==="key"){s&&(i.key=s);continue}let b=t[y],x=i[y],m=x&&b&&typeof x=="object"&&typeof b=="object"&&!Array.isArray(x)&&!Array.isArray(b)&&typeof x!="function"&&typeof b!="function";m&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?i[y]=Pe(x,b):m&&c.has(y)?i[y]={...x,...b}:m&&oo(y)?i[y]=Pe(x,b):i[y]=b}function d(y){for(let b in y){let x=y[b],m=i[b],_=m&&x&&typeof m=="object"&&typeof x=="object"&&!Array.isArray(m)&&!Array.isArray(x)&&typeof m!="function"&&typeof x!="function";_&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?i[b]=Pe(m,x):_&&c.has(b)?i[b]={...m,...x}:_&&oo(b)?i[b]=Pe(m,x):i[b]=x}}f&&d(f),t.props&&typeof t.props=="object"&&d(t.props),t.classlist!==void 0&&(i.classlist=t.classlist),t.text!==void 0&&(i.text=t.text),t.html!==void 0&&(i.html=t.html);let l=i.scope&&typeof i.scope=="object"?i.scope:null,p=e?.scope,h=i.context&&typeof i.context.globalScope=="object"&&i.context.globalScope||null,u=p||h||null;if(t.scope!==void 0||l){let y={};l&&Object.assign(y,l),t.scope!==void 0&&Object.assign(y,t.scope),i.scope=Ao(y,u)}else u&&(i.scope=u);if(t.if!==void 0&&(i.if=t.if),Hr(i),Rf(i,e,t),i.if!=null){let y;if(typeof i.if=="function")try{y=i.if(i,i.state,i.context)}catch(b){if(y=!1,a.__ifError=b,typeof console<"u"&&console.warn){let x=i.key||i.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${x} \u2014 treating as false:`,b?.message||b)}}else y=i.if;a.__if=!!y}if(a.__if)typeof i.if=="function"&&(a.__ifInitialized=!0);else return e&&(e[i.key]=i),typeof i.if=="function"&&Xi(i,a,i.if),i;i.tag||(i.tag=ge(i)),et("Init",i,r);let g=i.node=ye(i);if(!g)return i;if(i.tag==="fragment"){let b=(i.context?.document||globalThis.document).createComment("");g.appendChild(b),a.__fragmentAnchor=b}et("AttachNode",i,r),g.setAttribute&&i.key&&g.setAttribute("data-key",i.key),e&&(e[i.key]=i,e.__ref?.__children&&(e.__ref.__children.includes(i.key)||e.__ref.__children.push(i.key))),g.setAttribute&&i.context?.scopeSelector&&i.context.scopeSelector!==":root"&&i.context.key&&i.key===i.context.key&&g.setAttribute("data-smbls-app",i.context.key),i.id&&g.setAttribute&&(g.id=i.id),ac(i,r),Qi(i),so(i),sc(i),ic(i);try{lc(i,r)}catch(y){if(typeof console<"u"&&console.error){let b=i.__ref?.path?.join(".")||i.key||"<root>";console.error(`[smbls] createChildren failed at ${b}:`,y?.message||y,y?.stack?`
|
|
16
|
+
`+y.stack.split(`
|
|
17
17
|
`).slice(0,6).join(`
|
|
18
|
-
`):"")}}if(On(i,!0),fc(i,e,o),typeof i.html=="function"&&i.node&&!i.node.innerHTML){let m=i.context?.designSystem;m&&F(m);try{let _=i.html(i,i.state,i.context);_!=null&&typeof _!="function"&&(i.node.innerHTML=_)}catch{}finally{m&&L()}}if(et("Create",i,r),et("Complete",i,r),et("Render",i,r),et("RenderRouter",i,r),ro(i,r),typeof i.onFrame=="function"){let m=i.onFrame,_=i.context?.designSystem,b=()=>{if(i.node){if(i.node.isConnected){_&&F(_);try{m(i,i.state,i.context)}catch(p){console.error("[DOMQL] onFrame error:",p)}finally{_&&L()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return i}function Rf(t,e,n){let r=!e,o=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,s=r&&o&&t.context?.state,i=n.state!==void 0&&!s?n.state:t.state&&!V(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Mt(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},f=t.context?.polyglot;if(f?.translations){let d=t.context,l=a.lang||f.defaultLang||"en",h=new Set,g=(m,_)=>{h.has(m)||Vo(d,m,c)&&(c[m]=_,h.add(m),Fo(d,m))},u=f.translations[l];if(u&&typeof u=="object")for(let m in u)g(m,u[m]);let y=new Set(f.languages||[]);for(let m in f.translations)y.has(m)||g(m,f.translations[m])}t.state=V(c)?c:Nt(c),t.state.__element=t,t.state.root=t.state,Mt(t,t.state),pr?.(a,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Mt(t,t.state);return}if(typeof i=="string"){if(t.state=Zi(i,e),t.state&&typeof t.state=="object"&&!V(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}Mt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=V(a)?a:Nt(a||{})}else V(i)?t.state=i:t.state=Nt({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,Mt(t,t.state),pr?.(i,t.state)}function to(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function Zi(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?to(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?to(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=to(e.state,t);if(n!=null&&Object.keys(n).length>0)return n;let r=e.context?.polyglot;if(r?.translations){let o=e.state?.root?.lang||r.defaultLang||"en",s=r.translations[o];if(s?.[t]!==void 0)return s[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}var $f=new Set(["s","state","ctx","context"]);function Pf(t){try{let n=(typeof _e=="function"?_e(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(r=>r.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function If(t){if(typeof t!="function"||t.length!==2)return!1;let e=Pf(t);if(e.length<2)return!1;let n=e[1].replace(/[{}[\]]/g,"").trim();return n.length>0&&!$f.has(n)}function Mf(t){let e=t.__ref,n=t.tag||"div",r=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Y.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Rt(a)||G[a]||W&&W.has(a)||vt(n,a)||(Z()&&If(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),o.push({prop:a,fn:t[a]}))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){r&&F(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&L()}},set(f){delete e.__exec[a],Object.defineProperty(t,a,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Df(t,e){if(!(!Array.isArray(e)||e.length===0))for(let n=0;n<e.length;n++){let r=e[n];try{typeof r=="function"?r(t,t.state,t.context):typeof r=="string"&&t.state?.[r]}catch{}}}function q(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return Df(t,e),n.apply(this,r)}}function Re(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function $(t,e){return()=>t.path.join(".")+"::"+e}var Ii=new Set;function ct(t,e,n){if(!Z())return;let r=$(t,e)();Ii.has(r)||(Ii.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var Mi=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,Lf=(t,e)=>{let n;try{n=String(t)}catch{return}if(!n.includes("{{"))return;Mi.lastIndex=0;let r;for(;(r=Mi.exec(n))!==null;)r[2].includes("{{")&&e.add(r[2])},Nf=(t,e)=>!Rt(t)&&!oe(e,t),Di=(t,e,n,r)=>{if(typeof e=="string"){e.includes("{{")&&n.add(e);return}typeof e=="function"&&Nf(t,r)&&Lf(e,n)},jf=["attr","aria","data"],Vf=t=>{if(jf.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},Ff=t=>{let e=new Set,n=t.tag||"div";for(let r of Object.keys(t)){let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(s&&typeof s=="object"&&!Array.isArray(s)){if(!Vf(r))continue;for(let i in s)Di(i,s[i],e,n);continue}Di(r,s,e,n)}return e};function Qi(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=Ff(t);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(Mf(t),typeof t.text=="function"){let c=t.text,f=q(t,t.textDeps,c),d=O(()=>{if(!n.contentManaged)try{let l=f(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&typeof l!="object"&&(typeof l=="string"&&l.includes("{{")&&(l=J.call(t,l,t.state)),ee(t,l))}catch(l){ct(n,"text",l)}},{depth:n.path.length,label:$(n,"text")});n.__effects.push(d),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,f=O(()=>{if(n.contentManaged)return;let d=J.call(t,c,t.state);d!=null&&(t.text=d),t.node&&ee(t,d??"")},{depth:n.path.length,label:$(n,"text")});n.__effects.push(f),n.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!Y.has(c)&&!Rt(c)&&!n.__exec[c]&&!Sn(s,c)){if(G[c]){let f=t[c],d=q(t,t[c+"Deps"],f),l=c,h,g=null,u=null,y,m=O(()=>{let _=t.context?.designSystem;_&&F(_);try{let b=d(t,t.state,t.context);Wr();let p;try{p=G[l](b,t,t.state,t.context)}finally{Ur()}if(Array.isArray(p)){let x={};for(let A of p)if(A)for(let C in A)x[C]=A[C];p=x}let S=l==="show"||l==="hide";if(p&&t.node&&Bf(p)){let x=An(p);if(x===null||x!==y){y=x;let A=zt(p,null,t.context?.cssPrefix),C=A?A.split(" ").filter(Boolean):null;if(t.node.classList){if(u)for(let D of u)t.node.classList.remove(D);if(C&&C.length)for(let D of C)t.node.classList.add(D);u=C}}h=void 0,g=null}else if(p&&t.node){if(u){for(let A of u)t.node.classList.remove(A);u=null,y=void 0}let x=An(p);if(x===null||x!==h||!wn(t.node,g)){h=x;let A=ji(t,p);g=xn(t.node,A)}}else t.node&&S&&(h=void 0,g=null,t.node.style.display="")}finally{_&&L()}},{depth:n.path.length,label:$(n,l)});n.__effects.push(m),n.__exec[c]=f}else if(W&&W.has(c)){let f=t[c],d=q(t,t[c+"Deps"],f),l=c,h,g=null,u=O(()=>{let y=t.context?.designSystem;y&&F(y);try{let m=d(t,t.state,t.context);if(t.node)if(m!=null){let _=l+":"+String(m);if(_!==h||!wn(t.node,g)){h=_;let b={[l]:m},p=ji(t,b);g=xn(t.node,p)}}else h=void 0,g=null,t.node.style[l]=""}finally{y&&L()}},{depth:n.path.length,label:$(n,l)});n.__effects.push(u),n.__exec[c]=f}}if(typeof t.html=="function"){let c=t.html,f=q(t,t.htmlDeps,c),d=O(()=>{let l=t.context?.designSystem;l&&F(l);try{let h=f(t,t.state,t.context);t.node&&h!=null&&typeof h!="function"&&(t.node.innerHTML=h)}finally{l&&L()}},{depth:n.path.length,label:$(n,"html")});n.__effects.push(d),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,f=q(t,t.valueDeps,c),d=O(()=>{try{let l=f(t,t.state,t.context);typeof l=="string"&&l.includes("{{")&&(l=J.call(t,l,t.state)),Ni(t,l)}catch(l){ct(n,"value",l)}},{depth:n.path.length,label:$(n,"value")});n.__effects.push(d),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,f=O(()=>{try{Ni(t,J.call(t,c,t.state))}catch(d){ct(n,"value",d)}},{depth:n.path.length,label:$(n,"value")});n.__effects.push(f),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,f=q(t,t.styleDeps,c),d,l=null,h=O(()=>{let g=f(t,t.state,t.context),u=An(g);(u===null||u!==d||!wn(t.node,l))&&(d=u,Wf(t.node,l,g),qt(t.node,g),l=xn(t.node,g))},{depth:n.path.length,label:$(n,"style")});n.__effects.push(h),n.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let f=t.style[c];if(typeof f!="function")continue;let d=q(t,Re(t.styleDeps,c),f),l,h=null,g=O(()=>{try{let u=d(t,t.state,t.context);if(t.node){let y=c+":"+String(u);if(y!==l||!wn(t.node,h)){l=y;let m={[c]:u};qt(t.node,m),h=xn(t.node,m)}}}catch(u){ct(n,"style."+c,u)}},{depth:n.path.length,label:$(n,"style."+c)});n.__effects.push(g)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let f=q(t,Re(t.attrDeps,c),t.attr[c]),d=c,l=O(()=>{try{let h=f(t,t.state,t.context);typeof h=="string"&&h.includes("{{")&&(h=J.call(t,h,t.state)),t.node?.setAttribute&&(h==null||h===!1&&!Et(d)?t.node.removeAttribute(d):typeof h!="function"&&typeof h!="object"&&t.node.setAttribute(d,st(d,h)))}catch(h){ct(n,"attr."+d,h)}},{depth:n.path.length,label:$(n,"attr."+d)});l._attrName=d.toLowerCase(),n.__effects.push(l)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let f=t.attr[c],d=c,l=O(()=>{try{let h=J.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(d,st(d,h??""))}catch(h){ct(n,"attr."+d,h)}},{depth:n.path.length,label:$(n,"attr."+d)});l._attrName=d.toLowerCase(),n.__effects.push(l)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let f=t.aria[c];if(typeof f=="string"&&f.includes("{{")){let g=f,u="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),y=O(()=>{try{let m=J.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,st(u,m??""))}catch(m){ct(n,"aria."+c,m)}},{depth:n.path.length,label:$(n,"aria."+c)});y._attrName=u,n.__effects.push(y);continue}if(typeof f!="function")continue;let d=q(t,Re(t.ariaDeps,c),t.aria[c]),l="aria-"+c.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),h=O(()=>{try{let g=d(t,t.state,t.context);if(!t.node?.setAttribute)return;g==null?t.node.removeAttribute(l):typeof g!="function"&&typeof g!="object"&&t.node.setAttribute(l,st(l,g))}catch(g){ct(n,"aria."+c,g)}},{depth:n.path.length,label:$(n,"aria."+c)});h._attrName=l,n.__effects.push(h)}if(t.data&&typeof t.data=="object")for(let c in t.data){let f=t.data[c];if(typeof f=="string"&&f.includes("{{")){let u=f,y="data-"+c.replace(/[A-Z]/g,_=>"-"+_.toLowerCase()),m=O(()=>{try{let _=J.call(t,u,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(y,_??"")}catch(_){ct(n,"data."+c,_)}},{depth:n.path.length,label:$(n,"data."+c)});m._attrName=y,n.__effects.push(m);continue}if(typeof f!="function")continue;let d=q(t,Re(t.dataDeps,c),t.data[c]),h="data-"+c.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),g=O(()=>{try{let u=d(t,t.state,t.context);if(!t.node?.setAttribute)return;u==null||u===!1?t.node.removeAttribute(h):typeof u!="function"&&typeof u!="object"&&t.node.setAttribute(h,u===!0?"":u)}catch(u){ct(n,"data."+c,u)}},{depth:n.path.length,label:$(n,"data."+c)});g._attrName=h,n.__effects.push(g)}let i=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(i)for(let c in i){if(typeof i[c]!="function")continue;let f=q(t,Re(t.classDeps,c),i[c]),d=O(()=>{try{let l=f(t,t.state,t.context);if(!t.node?.classList)return;typeof l=="string"?t.node.classList.add(l):l?t.node.classList.add(c):t.node.classList.remove(c)}catch(l){ct(n,"class."+c,l)}},{depth:n.path.length,label:$(n,"class."+c)});n.__effects.push(d)}!r&&typeof t.if=="function"&&Xi(t,n,t.if);for(let c of Object.keys(t)){if(Y.has(c)||typeof t[c]!="function")continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||Rt(c))continue;let d=t[c];n.__exec[c]=d;let l=t.tag||"div";if(vt(l,c)&&!oe(l,c)){let h=Ut(c)||c,g=q(t,t[c+"Deps"],d),u=O(()=>{try{let y=g(t,t.state,t.context);typeof y=="string"&&y.includes("{{")&&(y=J.call(t,y,t.state)),t.node?.setAttribute&&(y==null||y===!1&&!Et(h)?t.node.removeAttribute(h):typeof y!="function"&&typeof y!="object"&&(h==="src"&&"src"in t.node?t.node.src=y:t.node.setAttribute(h,st(h,y))))}catch(y){ct(n,c,y)}},{depth:n.path.length,label:$(n,c)});u._attrName=h.toLowerCase(),n.__effects.push(u)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Y.has(c))continue;let f=t[c];if(typeof f!="string"||!f.includes("{{"))continue;let d=c.charCodeAt(0);if(d>=65&&d<=90||Rt(c)||oe(a,c)||te[c]||!vt(a,c))continue;let l=Ut(c)||c,h=O(()=>{try{let g=J.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(l,st(l,g??""))}catch(g){ct(n,c,g)}},{depth:n.path.length,label:$(n,c)});h._attrName=l.toLowerCase(),n.__effects.push(h)}if(Kf(t),Xf(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,f=t.stateDeps,d=!1,l=[],h=O(()=>{let g=[];for(let _=0;_<f.length;_++){let b=f[_];try{g[_]=typeof b=="function"?b(t,t.state,t.context):t.state?.[b]}catch{g[_]=void 0}}if(!d){d=!0,l=g;return}let u=g.length!==l.length;for(let _=0;!u&&_<g.length;_++)g[_]!==l[_]&&(u=!0);let y=l;if(l=g,!u)return;let m=t.context?.designSystem;m&&F(m);try{c(t,t.state,t.context,{prev:y,next:g})}catch(_){if(t.context?.plugins?.length&&rt("error",t,{hook:"onStateUpdate",error:_})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',_),t.context?.strictMode)throw _}finally{m&&L()}},{depth:n.path.length,label:$(n,"onStateUpdate")});n.__effects.push(h)}Qf(t)}function Li(t){let e=t.parent,n=e?.node;if(!n||!t.node){fc(t,t.parent);return}let r=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===n){r=a.node;break}}r?n.insertBefore(t.node,r):n.appendChild(t.node)}function Xi(t,e,n){let r=q(t,t.ifDeps,n),o=O(()=>{let s;try{s=r(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(a){console.error("[smbls] onRemove error:",a)}}else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=ye(t)),t.node&&(t.node.ref=t),Li(t),so(t),et("Render",t,{}),ro(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=ge(t)),et("Init",t,{}),t.node||(t.node=ye(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}et("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),ac(t,{}),Qi(t,{skipIfEffect:!0}),so(t),sc(t),ic(t),lc(t,{}),Li(t),et("Create",t,{}),et("Complete",t,{}),et("Render",t,{}),et("RenderRouter",t,{}),ro(t,{})}},{depth:e.path.length,label:$(e,"if")});e.__effects.push(o)}function ee(t,e){let n=t.node;if(!n)return;let r=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){n.nodeValue!==r&&(n.nodeValue=r);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==n&&(s=null),!s){let i=n.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==r&&(s.nodeValue=r):n.firstChild?(s=(n.ownerDocument||t.context?.document||globalThis.document).createTextNode(r),n.insertBefore(s,n.firstChild)):(n.textContent=r,s=n.firstChild&&n.firstChild.nodeType===3?n.firstChild:null),o&&(o.__textNode=s||null)}function Ni(t,e){let n=t.node;if(!n||!("value"in n))return;let r=e==null?"":String(e);if(n.value===r)return;let o=typeof document<"u"&&document.activeElement===n,s=o&&typeof n.selectionStart=="number"?n.selectionStart:null,i=o&&typeof n.selectionEnd=="number"?n.selectionEnd:null;if(n.value=r,o&&s!=null&&i!=null)try{n.setSelectionRange(s,i)}catch{}}function so(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&ee(t,t.text),oc(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let n=String(t.value);e.value!==n&&(e.value=n)}if(t.style&&typeof t.style=="object"){let n=t.style;for(let r in t.style)if(typeof t.style[r]=="function"){n={};for(let o in t.style)typeof t.style[o]!="function"&&(n[o]=t.style[o]);break}qt(e,n)}if(t.attr&&typeof t.attr=="object")for(let n in t.attr){let r=t.attr[n];typeof r=="function"||typeof r=="object"||r!=null&&(typeof r=="string"&&r.includes("{{")||r===!1&&!Et(n)||e.setAttribute&&e.setAttribute(n,st(n,r)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&e.setAttribute&&e.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(let n in t.data){let r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||typeof r=="string"&&r.includes("{{")||e.dataset&&(e.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){let n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&e.classList.add(r));else if(typeof n=="object")for(let r in n){let o=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];o&&e.classList.add(typeof o=="string"?o:r)}}}}function An(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Bf(t){if(!t||typeof t!="object")return!1;for(let e in t){let n=t[e];if(n&&typeof n=="object"&&!Array.isArray(n))return!0}return!1}function xn(t,e){if(!t||!t.style||!e)return null;let n=t.style,r=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=$n(o);r.push(i,fo(n,i),Ji(n,i))}return r}function fo(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function Ji(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function $n(t){return vn(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Wf(t,e,n){if(!t||!t.style||!e||!e.length)return;let r=t.style,o=new Set;if(n&&typeof n=="object")for(let s in n)n[s]==null||s.charAt(0)==="&"||o.add($n(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||fo(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function wn(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(fo(n,e[r])!==e[r+1]||Ji(n,e[r])!==e[r+2])return!1;return!0}var vn=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function Uf(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add($n(n)));return e}function zf(t,e,n,r){let o=t.__ref;if(!o)return;let s=null;if(n)for(let i of n){if(r&&r.has(i))continue;let a=e[i];if(a==null||typeof a=="object")continue;let c=$n(i);Oe[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function tc(t,e){let n=t.__ref,r=n&&n.__declaredLonghands;if(!r||!e)return null;let o=null;for(let s in r){if(e.has(s))continue;let i=Oe[s],a=!1;for(let c=0;c<i.length;c++)if(e.has(i[c])){a=!0;break}a&&(o||(o={}),o[s]=r[s])}return o}function ji(t,e){let n=t.node;qt(n,e);let r=Uf(e);if(!r)return e;let o=t.__ref;if(o)if(o.__inlineCssKeys)for(let i of r)o.__inlineCssKeys.add(i);else o.__inlineCssKeys=new Set(r);let s=tc(t,r);return s?(qt(n,s),Object.assign({},e,s)):e}function Gf(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=tc(t,e.__inlineCssKeys);n&&qt(t.node,n)}function qt(t,e){if(!t||!e||!t.style)return;let n=null;for(let r in e){let o=e[r];if(o!=null){if(r.charAt(0)==="&"&&typeof o=="object"){n||(n={}),n[r]=o;continue}try{let s=String(o),i=vn(r)?r:r.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),f=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,f,c?"important":"")}catch{}}}n&&Hf(t,n)}function Hf(t,e){let n=`_ds${zi.scopedStyleId++}`;t.classList.add(n);let r=t.ownerDocument,o=r.querySelector("style[data-smbls-scoped]");o||(o=r.createElement("style"),o.setAttribute("data-smbls-scoped",""),r.head.appendChild(o));let s="";for(let i in e){let a="."+n,c=i.replace(/&/g,a).split(",").map(d=>{let l=d.trim();return l.includes(a)?l:a+l}).join(", "),f=e[i];if(typeof f=="object"){let d="",l="";for(let h in f){let g=f[h];if(typeof g=="object"){let u=h.includes("&")?c.split(", ").map(m=>h.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${h}`).join(", "),y="";for(let m in g)y+=`${m.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${g[m]};`;l+=Te(`${u} { ${y} }`,u)+`
|
|
19
|
-
`}else d+=`${
|
|
20
|
-
`),l&&(s+=l)}}s&&(o.textContent+=s)}var Vi=new Set;function Fi(t){if(!Array.isArray(t))return"";let e=[];for(let n=0;n<t.length;n++)typeof t[n]=="string"&&t[n].length&&e.push(t[n]);return e.sort(),e.join("|")}function qf(t,e,n){let r=Fi(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(Fi(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Vi.has(s)||(Vi.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${n.join(", ")||"(none)"}], probed [${Array.isArray(o)?o.join(", "):String(o)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function Kf(t){let e=t.subscribeTo,n=typeof e=="function",r=e;if(n)try{r=e(t,t.state,t.context)}catch{r=null}if(n&&Z()&&qf(t,e,Array.isArray(r)?r:[]),!Array.isArray(r)||r.length===0)return;let o=t.__ref;for(let s=0;s<r.length;s++){let i=r[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],f=a.slice(1),d={value:!1},l=O(()=>{let h=t.state&&(V(t.state)?t.state.root:null);if(!h||!V(h))return;let g=h;g=g[c];for(let y=0;y<f.length&&!(g==null||typeof g!="object");y++)if(V(g))g=g[f[y]];else break;if(!d.value)return;let u=!1;if(typeof t.onBeforeUpdate=="function"){let y=t.context?.designSystem;y&&F(y);try{if(Lr(o)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>Tt(o,!1),_=>{Tt(o,!0),t.context?.plugins?.length&&rt("error",t,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}):(Tt(o,!1),m===!1&&(u=!0))}}catch(m){Tt(o,!0),t.context?.plugins?.length&&rt("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{y&&L()}}if(!u&&t.node&&o.__effects)for(let y=0;y<o.__effects.length;y++){let m=o.__effects[y];m&&m!==l&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!u&&typeof t.onUpdate=="function"){let y=t.context?.designSystem;y&&F(y);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&rt("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{y&&L()}}},{depth:o.path.length,label:$(o,"subscribeTo("+i+")")});d.value=!0,l._isSubscribeToEffect=!0,o.__effects.push(l)}}function uo(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function po(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let n=e.context?.designSystem?.media?.[t.slice(1)];return n?/^@(media|supports|container)\b/.test(n)?n:`@media ${n}`:t}var Bi=new Set;function Yf(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;Bi.has(r)||(Bi.add(r),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function ce(t,e,n,r){let o={},s=new Set,i=(a,c,f)=>{let d=f?new Set(Object.keys(o)):null;if(G[a]){let l=G[a](c,e,e.state,e.context);if(l){let h=Array.isArray(l)?l:[l];for(let g of h)g&&Object.assign(o,g)}}else o[a]=c;if(f)for(let l in o)d.has(l)||s.add(l)};for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=t[a];if(typeof c=="function"&&(c=c(e,e.state,e.context)),c==null||typeof c=="function")continue;if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let g in c){let u=c[g];if(typeof u=="function"&&(u=u(e,e.state,e.context)),u==null||typeof u=="function")continue;let y=typeof e[g]=="function"&&(G[g]||W&&W.has(g))||!!(r&&r.has(g));i(g,u,y)}continue}if(uo(a,e)){let g=ce(c,e,!1,r);Object.keys(g).length&&(o[`[data-theme="${a.slice(1)}"] &`]=g);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){Z()&&Yf(a,e);continue}let l=po(a,e),h=ce(c,e,!1,r);Object.keys(h).length&&(o[l]=h);continue}let f=typeof e[a]=="function"&&(G[a]||W&&W.has(a)),d=!!(r&&r.has(a));i(a,c,f||d)}if(n)for(let a in o)s.add(a);for(let a of s){let c=o[a];typeof c=="string"&&!c.includes("!important")&&(o[a]=c+" !important")}return o}var Tn=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function ec(t,e){for(let n in e){let r=e[n];t[n]=Tn(r)?ec(Tn(t[n])?t[n]:{},r):r}return t}function Zf(t,e){if(!Tn(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Tn(o)&&(n=ec(n||{},o))}return n}function ho(t,e){if(e===void 0&&(e=0),e>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ho(t[n],e+1))return!0}return!1}function nc(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(uo(t,n)){let s=ce(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=po(t,n),o=ce(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function Qf(t){let e=t.__ref;for(let n of Object.keys(t)){if(!oo(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!ho(r))continue;let o=null,s,i=O(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&F(a);let c,f=!1;try{let d=nc(n,r,t),l=d?An(d.block)+"::"+d.cssProp:null;if(l!==null&&l===s)f=!0;else if(s=l,d){let h=zt({[d.cssProp]:d.block},null,t.context?.cssPrefix);c=h?h.split(" ").filter(Boolean):null}else c=null}finally{a&&L()}if(!(f||!t.node.classList)){if(o)for(let d of o)t.node.classList.remove(d);if(c&&c.length)for(let d of c)t.node.classList.add(d);o=c}},{depth:e.path.length,label:$(e,"cssBlock("+n+")")});e.__effects.push(i)}}function Xf(t){let e=t.__ref;e.__conditionalRunners=[];let n=new Map;for(let r of Object.keys(t)){let o=r.charAt(0);if(o!=="."&&o!=="!")continue;let s=r.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${r}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${o}\` is read as one prop name. Nest the selector inside instead: \`${o}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[r];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},f=new Set;for(let u in i){if(!Object.prototype.hasOwnProperty.call(i,u))continue;let y=u.charAt(0),m=i[u];(y===":"||y==="@"||y==="&"||y==="[")&&m&&typeof m=="object"&&!Array.isArray(m)||f.add(u)}let d=()=>{let u,y=t[s];if(y===void 0){let b=!!t.state&&s in t.state,p=t.state?t.state[s]:void 0;if(b||p!==void 0)u=p;else{let S=t.context?.cases?.[s];if(S===void 0)return;try{u=typeof S=="function"?S.call(t,t):S}catch(x){u=!1,e.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${r}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}}}else if(typeof y=="function")try{u=y(t,t.state,t.context)}catch(b){u=!1,e.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${r}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}else u=y;let m=a?!u:!!u;if(!t.node||m===c.lastMatch)return;c.lastMatch=m;let _=t.context?.designSystem;_&&F(_);try{if(m){let b={},p={},S=!1;for(let A in i){if(!Object.prototype.hasOwnProperty.call(i,A))continue;let C=i[A],D=A.charAt(0);if((D===":"||D==="@"||D==="&"||D==="[")&&C&&typeof C=="object"&&!Array.isArray(C)){if(uo(A,t)){let R=ce(C,t,!1,f);Object.keys(R).length&&(p[`[data-theme="${A.slice(1)}"] &`]=R,S=!0)}else{let R=po(A,t),nt=ce(C,t,!1,f);Object.keys(nt).length&&(p[R]=nt,S=!0)}continue}let j=typeof C=="function"?C(t,t.state,t.context):C;if(j!=null)if(G[A]){let R=G[A](j,t,t.state,t.context);if(R){let nt=Array.isArray(R)?R:[R];for(let De of nt)De&&Object.assign(b,De)}}else(W&&W.has(A)||vn(A))&&(b[A]=j)}let x=Object.keys(b);if(x.length){qt(t.node,b);for(let A of x)n.set(A,r);c.appliedKeys=x}else c.appliedKeys=null;if(S){let A=zt(p,null,t.context?.cssPrefix,{state:!0}),C=A?A.split(" ").filter(Boolean):[];if(C.length&&t.node.classList){for(let D of C)t.node.classList.add(D);c.appliedClasses=C}else c.appliedClasses=null}else if(c.appliedClasses){for(let A of c.appliedClasses)t.node.classList.remove(A);c.appliedClasses=null}}else{if(c.appliedKeys){for(let b of c.appliedKeys)n.get(b)===r&&(vn(b)?t.node.style.removeProperty(b):t.node.style[b]="",n.delete(b));c.appliedKeys=null}if(c.appliedClasses){for(let b of c.appliedClasses)t.node.classList.remove(b);c.appliedClasses=null}}}finally{_&&L()}};e.__conditionalRunners.push(d);let l=q(t,t[s+"Deps"],d),h=O(l,{depth:e.path.length,label:$(e,"conditional("+r+")")}),g=e.__exec&&e.__exec[s]||t[s];h._sources.size===0&&typeof g=="function"&&Z()&&console.warn(`[smbls] conditional \`${r}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${s}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(h)}}var eo=new WeakSet;function Jf(t){let e=t.ownerDocument;!e||eo.has(e)||(eo.add(e),queueMicrotask(()=>{eo.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var no=new WeakSet,Wi=!1;function Ui(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function io(t,e){let n={...t};for(let r in e){let o=e[r],s=n[r];n[r]=o&&typeof o=="object"&&s&&typeof s=="object"?io(s,o):o}return n}function rc(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=rc(o,e);Object.keys(s).length&&(n[r]=s)}else e.has(r)||(n[r]=o)}return n}function oc(t){let{node:e}=t;if(!e)return;if(Wi||(Wi=!0,zt({display:"none"})),no.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}no.add(t);let n=t.context?.designSystem;n&&F(n),Wr();try{let r={},o=!1,s=[],i=null,a=null,c=null,f=(u,y)=>{if(y&&typeof y=="object"&&Ui(u)){a||(a={});let m=a[u];m&&(y=io(m,y)),a[u]=y}else(y===null||typeof y!="object")&&(c||(c=new Set),c.add(u));r[u]=y};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&G.theme){let u=G.theme(t.theme,t,t.state,t.context);if(u){let y=m=>{for(let _ in m){let b=m[_];b&&typeof b=="object"&&Ui(_)&&(i||(i={}),i[_]=b),r[_]=b}};if(Array.isArray(u))for(let m of u)m&&y(m);else y(u);o=!0}}let d=(u,y)=>{if(G[u]){let m=G[u](y,t,t.state,t.context);if(m){if(Array.isArray(m)){for(let _ of m)if(_)for(let b in _)f(b,_[b])}else for(let _ in m)f(_,m[_]);o=!0}}else if(W&&W.has(u))y!=null&&typeof y!="object"&&(f(u,y),o=!0);else if(u.charCodeAt(0)===45)y!=null&&typeof y!="object"&&(f(u,y),o=!0);else if((u.charAt(0)==="&"||u.charAt(0)==="@"||u.charAt(0)===":"||u.charAt(0)==="[")&&y&&typeof y=="object"&&!Array.isArray(y)){if(ho(y))return;let m=nc(u,y,t);m&&(f(m.cssProp,m.block),o=!0)}};if(typeof t.class=="string"){let u=Zf(t.class,t.context?.designSystem?.class);if(u)for(let y in u)d(y,u[y])}let l=c?new Set(c):null,h=t.tag||"div";for(let u of Object.keys(t)){if(typeof t[u]=="function"||Y.has(u)||u==="theme")continue;let y=u.charCodeAt(0);y>=65&&y<=90||Rt(u)||Sn(h,u)||d(u,t[u])}if(i)for(let u in i){let y=c?rc(i[u],c):i[u];a&&a[u]&&(y=io(y,a[u])),Object.keys(y).length?r[u]=y:delete r[u]}if(zf(t,r,c,l),o){r.display&&String(r.display).includes("!important")&&(e.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);let u=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof u=="string"&&u!==""&&r.display&&r.display!==u&&(r.display=u);let y=zt(r,null,t.context?.cssPrefix);if(s=y?y.split(" ").filter(Boolean):[],y&&e.classList){let m=s,_=!1;for(let b of m)e.classList.add(b),_||(b.charCodeAt(0)===95&&b.charCodeAt(1)===99||b.charCodeAt(0)===95&&b.indexOf("_c",1)!==-1)&&(_=!0);_&&Jf(e)}}let g=t.__ref;if(g){let u=g.__staticCssClasses;if(u&&e.classList){let y=new Set(s);for(let m of u)y.has(m)||e.classList.remove(m)}g.__staticCssClasses=s}Gf(t)}finally{Ur(),n&&L(),no.delete(t)}}var Ys=t=>!!G[t]||!!(W&&W.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function Zs(t){t&&t.node&&oc(t)}function sc(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,st(i,s))}let n=Ks(t);for(let o in n){let s=n[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let r=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||Y.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Rt(o)&&!oe(r,o)&&vt(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!te[o])continue;i=J.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!Et(Ut(o)||o))continue;let a=Ut(o)||o;e.setAttribute(a,st(a,i))}}}function Qs(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||Rt(e))return;let o=t.tag||"div";if(oe(o,e)||!vt(o,e))return;let s=Ut(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let l=0;l<a.length;l++){let h=a[l];h&&h._attrName===i&&!h._disposed&&typeof h._execute=="function"&&(c=!0,h._execute())}if(c)return;let f=t[e],d=te[e];if(d&&f!=null){let l=d(t);l!==void 0&&(f=l)}typeof f=="string"&&f.includes("{{")&&(f=J.call(t,f,t.state)),f==null||f===!1&&!Et(s)?n.removeAttribute(s):typeof f!="function"&&typeof f!="object"&&n.setAttribute(s,st(s,f))}function tu(t,e){let n=t.node,r=t.__ref,o=r.__autoGrow;if(!e){if(o&&o.active){try{n.removeEventListener("input",o.resize)}catch{}Cn(o),Ht.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=r.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,layoutWatch:null,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!n.isConnected){go(t,!0);return}if(!(n.scrollHeight>0)){nu(t,o);return}Cn(o);let i=n.style.height;n.style.height="auto";let a=n.scrollHeight;if(!(a>0)){n.style.height=i;return}n.style.height=a+"px",o.lastMeasure=a}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}Cn(o),Ht.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""):n.style.maxHeight=s,o.appliedMax=s),o.resize()}function go(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),Ht.add(t),Rn())}function eu(){let t=Array.from(Ht);Ht.clear();for(let e=0;e<t.length;e++){let n=t[e],r=n.node,o=n.__ref?.__autoGrow;if(!(!r||!o||!o.active)){if(!r.isConnected){o.firstAttemptAt==null&&(o.firstAttemptAt=ie()),o.attachAttempts+=1,o.attachAttempts<=qi&&ie()-o.firstAttemptAt<Ki&&(Ht.add(n),Rn());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function nu(t,e){if(e.layoutWatch)return;let n=t.node;if(!n)return;let r=n.ownerDocument&&n.ownerDocument.defaultView,o=r&&r.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof o!="function")return;let s=()=>{!n.isConnected||!(n.scrollHeight>0)||(Cn(e),go(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.layoutWatch=i}function Cn(t){let e=t.layoutWatch;if(e){t.layoutWatch=null;try{e.disconnect()}catch{}}}function ic(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let n=t.__ref,r=t.autoGrow,o=typeof r=="function"?q(t,t.autoGrowDeps,r):null,s=O(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===r&&o?o:i)(t,t.state,t.context)}catch{a=null}tu(t,a)},{depth:n.path.length,label:$(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var cc=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function ac(t,e){for(let n of Object.keys(t)){if(!Rt(n)||cc.has(n))continue;let r=Pr(n);if(r){Ir(r,t,t[n]);continue}let o=t[n];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(c){return t.call(i,c)}}if(typeof o!="function")continue;let s=Tf(n);me.has(s)||Ce(Of(s),t,o)}ru(t)}function ru(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let h of cc){let g=t[h];typeof g=="function"&&(n[h]=g,r=!0)}if(!r)return;let o=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,f=!1,d=h=>{let g=h.touches&&h.touches[0]||h.changedTouches&&h.changedTouches[0];g&&(i=g.clientX,a=g.clientY,c=Date.now(),f=!0)},l=h=>{if(!f)return;f=!1;let g=h.changedTouches&&h.changedTouches[0]||h.touches&&h.touches[0];if(!g)return;let u=g.clientX-i,y=g.clientY-a,m=Date.now()-c;if(m>s)return;let _=Math.abs(u),b=Math.abs(y);if(Math.max(_,b)<o)return;let p;if(_>b*1.2)p=u<0?"left":"right";else if(b>_*1.2)p=y<0?"up":"down";else return;let S="onSwipe"+p.charAt(0).toUpperCase()+p.slice(1),x=n[S],A=n.onSwipe;x&&x.call(t,h,t,t.state,t.context),A&&A.call(t,{direction:p,dx:u,dy:y,dt:m,event:h},t,t.state,t.context)};e.addEventListener("touchstart",d,{passive:!0}),e.addEventListener("touchend",l,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",d)}catch{}try{e.removeEventListener("touchend",l)}catch{}})}function Me(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Me(o,s):n[r]=s}return n}function co(t,e,n,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",i=t.context?.document||globalThis.document,a=s?null:i?.createDocumentFragment();if(!s&&!a)return;let c=t.childProps,f=t.childrenAs,d=m=>{let _=e[m],b=_;(typeof _=="string"||typeof _=="number")&&(_={text:_});let p=c;if(typeof c=="function")try{p=c(t,_)}catch{p=null}if(f==="state"){let x=b;(typeof b=="string"||typeof b=="number")&&(x={value:b,text:b}),_=p?{...p,state:x}:{state:x}}else p&&(_=Me(p,_));if(o&&!_.ignoreChildExtends)if(_.extends){let x=Array.isArray(_.extends)?_.extends:[_.extends],A=Array.isArray(o)?o:[o];_={..._,extends:[...A,...x]}}else _={..._,extends:o};let S=Yi(_?.key,b,m);try{return it(_,t,S,n)}catch(x){if(typeof console<"u"&&console.error){let A=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${S}" failed to construct at ${A} (initial render, skipping this row):`,x?.message||x)}return null}},l=t.__ref;if(!(r===!0&&!s&&!!l&&(n?.mountYield===!0||t.yieldChildren===!0))){for(let m=0;m<e.length;m++){let _=d(m);!s&&_?.node&&a.appendChild(_.node)}return s||t.node.appendChild(a),!0}let g=l.__childrenChunkGen=(l.__childrenChunkGen||0)+1;Kr();let u=null,y=m=>{if(l.__disposed||l.__childrenChunkGen!==g){u&&u.parentNode&&u.remove();return}for(let _=m;_<e.length;_++){let b=d(_);if(b?.node&&(u?t.node.insertBefore(b.node,u):a.appendChild(b.node)),_+1<e.length&&qr()){u||(u=i.createComment("smbls-mount"),a.appendChild(u),t.node.appendChild(a));let p=_+1;Zr(()=>y(p));return}}u?(u.remove(),t.node.tagName==="SELECT"&&On(t,!0)):t.node.appendChild(a)};return y(0),Yr(),!0}if(typeof e=="string"){let s=Zi(e,t);if(Array.isArray(s))return co(t,s,n,r)}if(typeof e=="object")for(let s in e){if(Y.has(s))continue;let i=e[s];if(!(i==null||i===!1)){if((typeof i=="string"||typeof i=="number")&&(i={text:i}),t.childProps&&(i=Me(t.childProps,i)),o&&!i.ignoreChildExtends)if(i.extends){let a=Array.isArray(i.extends)?i.extends:[i.extends],c=Array.isArray(o)?o:[o];i={...i,extends:[...c,...a]}}else i={...i,extends:o};it(i,t,s,n)}}}function On(t,e){let n=t.node;if(!n||n.tagName!=="SELECT")return;let r=n.options;if(!r||!r.length)return;let o=t.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let d;if(i)try{d=s(t,t.state,t.context)}catch{return}else d=t.value,typeof d=="string"&&d.includes("{{")&&(d=J.call(t,d,t.state));let l=d==null?"":String(d);n.value!==l&&(n.value=l);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let f=-1;for(let d=0;d<r.length;d++)r[d].defaultSelected&&(f=d);f>=0&&n.selectedIndex!==f&&(n.selectedIndex=f)}function lc(t,e){let{children:n,content:r}=t,o=t.childExtends;if(typeof n=="function"){let l=n;try{n=l(t,t.state,t.context)}catch(m){if(n=void 0,typeof console<"u"&&console.error){let _=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${_} (initial run, treating as empty):`,m?.message||m)}}t.children=n;let h=t.__ref,g=!1,u=q(t,t.childrenDeps,l),y=O(()=>{let m=g;g=!0;let _;try{_=u(t,t.state,t.context)}catch(j){if(typeof console<"u"&&console.error){let R=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${R}${m?"":" (initial tracking run)"}:`,j?.message||j)}return}if(!m||_===t.children)return;t.children=_,h.__childrenChunkGen!=null&&h.__childrenChunkGen++;let b=typeof t.onContentUpdate=="function",p=b?[]:null,S=b?[]:null,x=b?[]:null;if(Array.isArray(_)&&t.childrenAs==="state"){let j=t.childProps,R=[],nt=new Map;for(let P=0;P<_.length;P++){let ft=_[P],I=j;if(typeof j=="function")try{I=j(t,ft)}catch{I=null}let xt=Yi(I&&I.key,ft,P);R.push(xt),nt.set(xt,{rawChild:ft,childProps:I})}let De=new Set(R),uc=h.__children.slice();for(let P of uc)if(!De.has(P)){let ft=t[P];ft?.remove&&ft.remove(),delete t[P],S&&S.push(P)}let ae=t.childExtends,Le=t.tag==="fragment",dc=t.context?.document||globalThis.document,le=Le?null:dc?.createDocumentFragment(),Pn=new Set;for(let P of R){let ft=nt.get(P),I=ft.rawChild,xt=t[P];if(xt&&xt.state){if(I&&typeof I=="object"){let Q=xt.state,Kt=Q.$replace||Q.replace,mo=Q.$update||Q.update;try{if(typeof Kt=="function")Kt.call(Q,I);else if(typeof mo=="function"){for(let at in Q)if(!(at==="__element"||at==="root"||at==="parent"||at==="update")&&!Object.prototype.hasOwnProperty.call(I,at))try{Q[at]=void 0}catch{}mo.call(Q,I)}else for(let at in I)Q[at]=I[at]}catch(at){if(typeof console<"u"&&console.error){let pc=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${P}" failed to patch at ${pc} (reconcile, keeping its previous data for this pass):`,at?.message||at)}}}x&&x.push(P);continue}let In=I;(typeof I=="string"||typeof I=="number")&&(In={value:I,text:I});let yo=ft.childProps,gt=yo?{...yo,state:In}:{state:In};if(ae&&!gt.ignoreChildExtends)if(gt.extends){let Q=Array.isArray(gt.extends)?gt.extends:[gt.extends],Kt=Array.isArray(ae)?ae:[ae];gt={...gt,extends:[...Kt,...Q]}}else gt={...gt,extends:ae};let Mn;try{Mn=it(gt,t,P,e)}catch(Q){if(typeof console<"u"&&console.error){let Kt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${P}" failed to construct at ${Kt} (reconcile, skipping this row):`,Q?.message||Q)}Pn.add(P);continue}!Le&&Mn?.node&&le&&le.appendChild(Mn.node),p&&p.push(P)}if(!Le&&le&&le.childNodes.length&&t.node&&t.node.appendChild(le),!Le&&t.node){let P=null;for(let ft of R){let I=t[ft]?.node;if(!I)continue;let xt=P?P.nextSibling:t.node.firstChild;I!==xt&&t.node.insertBefore(I,xt),P=I}}h.__children=Pn.size?R.filter(P=>!Pn.has(P)):R,b&&(p.length||S.length)&&Pi(t,{added:p,removed:S,kept:x}),On(t,!1);return}let D=b?[...h.__children]:null;for(let j of[...h.__children]){let R=t[j];R?.remove&&R.remove(),delete t[j]}h.__children=[],co(t,_,e),On(t,!1),b&&Pi(t,{added:[...h.__children],removed:D,kept:[]})},{depth:h.path.length,label:$(h,"children")});h.__effects.push(y)}let s=co(t,n,e,!0);if(r!=null&&!(r&&r.__ref)){let l=r;if(typeof l=="string"||typeof l=="number"?l={text:l}:typeof l!="object"&&(l={}),t.childProps&&(l=Me(t.childProps,l)),o&&!l.ignoreChildExtends)if(l.extends){let h=Array.isArray(l.extends)?l.extends:[l.extends],g=Array.isArray(o)?o:[o];l={...l,extends:[...g,...h]}}else l={...l,extends:o};it(l,t,"content",e)}if(n&&!s)return;let i=t.context?.components||{};{let l=Object.keys(t);for(let h=0;h<l.length;h++){let g=l[h];if(!g.endsWith("Extends")||typeof t[g]!="string")continue;let u=g.slice(0,-7);if(!u||u.charCodeAt(0)<65||u.charCodeAt(0)>90)continue;let y={extends:t[g]};delete t[g];for(let m=h+1;m<l.length;m++){let _=l[m],b=_.charCodeAt(0);if(b>=65&&b<=90||Y.has(_)||typeof t[_]=="function"&&(_.startsWith("on")||_.startsWith(".")))break;let p=t[_];p!==void 0&&(y[_]=p,delete t[_])}t[u]&&typeof t[u]=="object"?t[u]={...y,...t[u]}:t[u]=y}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),f=l=>{if(Y.has(l)||typeof t[l]!="object"||t[l]===null)return;let h=l.charCodeAt(0);if(h<65||h>90)return;let g=t[l];if(!g.__ref){if(!g.extends&&!g.extend){let u=i[l]||i[`smbls.${l}`];u&&(g={...g,extends:u})}if(t.childProps&&(g=Me(t.childProps,g)),o&&!g.ignoreChildExtends)if(g.extends){let u=Array.isArray(g.extends)?g.extends:[g.extends],y=Array.isArray(o)?o:[o];g={...g,extends:[...y,...u]}}else g={...g,extends:o};it(g,t,l,e)}};if(!a){for(let l of c)f(l);return}Kr();let d=l=>{for(let h=l;h<c.length;h++)if(f(c[h]),h+1<c.length&&qr()){let g=h+1;Zr(()=>d(g));return}};d(0),Yr()}function fc(t,e,n){let{node:r}=t;if(!r)return;r.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(n?.position==="before"&&n.node)i.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let a=n.node.nextSibling;i.insertBefore(r,a||o)}else i.insertBefore(r,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let i=n.node.nextSibling;i?s.insertBefore(r,i):s.appendChild(r)}else s.appendChild(r)}var ao=3;function Lr(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=ao?!1:(t.__inBeforeUpdate=!0,!0)}function Tt(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===ao&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${ao}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function et(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&rt(r,e,n);let o="on"+t,s=e[o];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let f=e.context?.designSystem;f&&F(f);let d=!!c;try{let l=s(e,e.state,e.context,n);if(l&&typeof l.then=="function"){let h=e.__ref;return l.catch(g=>{e.context?.plugins?.length&&rt("error",e,{hook:o,error:g})||console.error(`[DOMQL] Lifecycle "${o}" error:`,g)}).finally(()=>{c&&h&&(h[c]=!1)}),d=!1,!0}if(l===!1)return!1}catch(l){if(e.context?.plugins?.length&&rt("error",e,{hook:o,error:l})||console.error(`[DOMQL] Lifecycle "${o}" error:`,l),e.context?.strictMode)throw l}finally{f&&L(),d&&e.__ref&&(e.__ref[c]=!1)}}return!0}var ou=it;var su=(t,e,n={})=>{if(!t||typeof t!="object")throw new Error("[SymbolsEmbed.mount] rootDef must be an object");if(typeof Node>"u"||!(e instanceof Node))throw new Error("[SymbolsEmbed.mount] host must be a DOM element");let r=t;if(n.state!=null){let o=t.state,s=i=>i&&typeof i=="object"&&!Array.isArray(i)&&!V(i);r={...t,state:s(o)&&s(n.state)?{...o,...n.state}:n.state}}return it(r,e,"Root",{context:n.context||{}})};return xc(iu);})();
|
|
18
|
+
`):"")}}if(On(i,!0),fc(i,e,o),typeof i.html=="function"&&i.node&&!i.node.innerHTML){let y=i.context?.designSystem;y&&F(y);try{let b=i.html(i,i.state,i.context);b!=null&&typeof b!="function"&&(i.node.innerHTML=b)}catch{}finally{y&&L()}}if(et("Create",i,r),et("Complete",i,r),et("Render",i,r),et("RenderRouter",i,r),ro(i,r),typeof i.onFrame=="function"){let y=i.onFrame,b=i.context?.designSystem,x=()=>{if(i.node){if(i.node.isConnected){b&&F(b);try{y(i,i.state,i.context)}catch(m){console.error("[DOMQL] onFrame error:",m)}finally{b&&L()}}requestAnimationFrame(x)}};requestAnimationFrame(x)}return i}function Rf(t,e,n){let r=!e,o=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,s=r&&o&&t.context?.state,i=n.state!==void 0&&!s?n.state:t.state&&!V(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Mt(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},f=t.context?.polyglot;if(f?.translations){let d=t.context,l=a.lang||f.defaultLang||"en",p=new Set,h=(y,b)=>{p.has(y)||Vo(d,y,c)&&(c[y]=b,p.add(y),Fo(d,y))},u=f.translations[l];if(u&&typeof u=="object")for(let y in u)h(y,u[y]);let g=new Set(f.languages||[]);for(let y in f.translations)g.has(y)||h(y,f.translations[y])}t.state=V(c)?c:Nt(c),t.state.__element=t,t.state.root=t.state,Mt(t,t.state),pr?.(a,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Mt(t,t.state);return}if(typeof i=="string"){if(t.state=Zi(i,e),t.state&&typeof t.state=="object"&&!V(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}Mt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=V(a)?a:Nt(a||{})}else V(i)?t.state=i:t.state=Nt({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,Mt(t,t.state),pr?.(i,t.state)}function to(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function Zi(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?to(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?to(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=to(e.state,t);if(n!=null&&Object.keys(n).length>0)return n;let r=e.context?.polyglot;if(r?.translations){let o=e.state?.root?.lang||r.defaultLang||"en",s=r.translations[o];if(s?.[t]!==void 0)return s[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}var $f=new Set(["s","state","ctx","context"]);function Pf(t){try{let n=(typeof _e=="function"?_e(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(r=>r.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function If(t){if(typeof t!="function"||t.length!==2)return!1;let e=Pf(t);if(e.length<2)return!1;let n=e[1].replace(/[{}[\]]/g,"").trim();return n.length>0&&!$f.has(n)}function Mf(t){let e=t.__ref,n=t.tag||"div",r=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Y.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Rt(a)||G[a]||W&&W.has(a)||vt(n,a)||(Z()&&If(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),o.push({prop:a,fn:t[a]}))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){r&&F(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&L()}},set(f){delete e.__exec[a],Object.defineProperty(t,a,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Df(t,e){if(!(!Array.isArray(e)||e.length===0))for(let n=0;n<e.length;n++){let r=e[n];try{typeof r=="function"?r(t,t.state,t.context):typeof r=="string"&&t.state?.[r]}catch{}}}function q(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return Df(t,e),n.apply(this,r)}}function Re(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function $(t,e){return()=>t.path.join(".")+"::"+e}var Ii=new Set;function ct(t,e,n){if(!Z())return;let r=$(t,e)();Ii.has(r)||(Ii.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var Mi=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,Lf=(t,e)=>{let n;try{n=String(t)}catch{return}if(!n.includes("{{"))return;Mi.lastIndex=0;let r;for(;(r=Mi.exec(n))!==null;)r[2].includes("{{")&&e.add(r[2])},Nf=(t,e)=>!Rt(t)&&!oe(e,t),Di=(t,e,n,r)=>{if(typeof e=="string"){e.includes("{{")&&n.add(e);return}typeof e=="function"&&Nf(t,r)&&Lf(e,n)},jf=["attr","aria","data"],Vf=t=>{if(jf.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},Ff=t=>{let e=new Set,n=t.tag||"div";for(let r of Object.keys(t)){let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(s&&typeof s=="object"&&!Array.isArray(s)){if(!Vf(r))continue;for(let i in s)Di(i,s[i],e,n);continue}Di(r,s,e,n)}return e};function Qi(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=Ff(t);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(Mf(t),typeof t.text=="function"){let c=t.text,f=q(t,t.textDeps,c),d=O(()=>{if(!n.contentManaged)try{let l=f(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&typeof l!="object"&&(typeof l=="string"&&l.includes("{{")&&(l=J.call(t,l,t.state)),ee(t,l))}catch(l){ct(n,"text",l)}},{depth:n.path.length,label:$(n,"text")});n.__effects.push(d),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,f=O(()=>{if(n.contentManaged)return;let d=J.call(t,c,t.state);d!=null&&(t.text=d),t.node&&ee(t,d??"")},{depth:n.path.length,label:$(n,"text")});n.__effects.push(f),n.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!Y.has(c)&&!Rt(c)&&!n.__exec[c]&&!Sn(s,c)){if(G[c]){let f=t[c],d=q(t,t[c+"Deps"],f),l=c,p,h=null,u=null,g,y=O(()=>{let b=t.context?.designSystem;b&&F(b);try{let x=d(t,t.state,t.context);Wr();let m;try{m=G[l](x,t,t.state,t.context)}finally{Ur()}if(Array.isArray(m)){let S={};for(let k of m)if(k)for(let C in k)S[C]=k[C];m=S}let _=l==="show"||l==="hide";if(m&&t.node&&Bf(m)){let S=An(m);if(S===null||S!==g){g=S;let k=zt(m,null,t.context?.cssPrefix),C=k?k.split(" ").filter(Boolean):null;if(t.node.classList){if(u)for(let D of u)t.node.classList.remove(D);if(C&&C.length)for(let D of C)t.node.classList.add(D);u=C}}p=void 0,h=null}else if(m&&t.node){if(u){for(let k of u)t.node.classList.remove(k);u=null,g=void 0}let S=An(m);if(S===null||S!==p||!wn(t.node,h)){p=S;let k=ji(t,m);h=xn(t.node,k)}}else t.node&&_&&(p=void 0,h=null,t.node.style.display="")}finally{b&&L()}},{depth:n.path.length,label:$(n,l)});n.__effects.push(y),n.__exec[c]=f}else if(W&&W.has(c)){let f=t[c],d=q(t,t[c+"Deps"],f),l=c,p,h=null,u=O(()=>{let g=t.context?.designSystem;g&&F(g);try{let y=d(t,t.state,t.context);if(t.node)if(y!=null){let b=l+":"+String(y);if(b!==p||!wn(t.node,h)){p=b;let x={[l]:y},m=ji(t,x);h=xn(t.node,m)}}else p=void 0,h=null,t.node.style[l]=""}finally{g&&L()}},{depth:n.path.length,label:$(n,l)});n.__effects.push(u),n.__exec[c]=f}}if(typeof t.html=="function"){let c=t.html,f=q(t,t.htmlDeps,c),d=O(()=>{let l=t.context?.designSystem;l&&F(l);try{let p=f(t,t.state,t.context);t.node&&p!=null&&typeof p!="function"&&(t.node.innerHTML=p)}finally{l&&L()}},{depth:n.path.length,label:$(n,"html")});n.__effects.push(d),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,f=q(t,t.valueDeps,c),d=O(()=>{try{let l=f(t,t.state,t.context);typeof l=="string"&&l.includes("{{")&&(l=J.call(t,l,t.state)),Ni(t,l)}catch(l){ct(n,"value",l)}},{depth:n.path.length,label:$(n,"value")});n.__effects.push(d),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,f=O(()=>{try{Ni(t,J.call(t,c,t.state))}catch(d){ct(n,"value",d)}},{depth:n.path.length,label:$(n,"value")});n.__effects.push(f),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,f=q(t,t.styleDeps,c),d,l=null,p=O(()=>{let h=f(t,t.state,t.context),u=An(h);(u===null||u!==d||!wn(t.node,l))&&(d=u,Wf(t.node,l,h),qt(t.node,h),l=xn(t.node,h))},{depth:n.path.length,label:$(n,"style")});n.__effects.push(p),n.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let f=t.style[c];if(typeof f!="function")continue;let d=q(t,Re(t.styleDeps,c),f),l,p=null,h=O(()=>{try{let u=d(t,t.state,t.context);if(t.node){let g=c+":"+String(u);if(g!==l||!wn(t.node,p)){l=g;let y={[c]:u};qt(t.node,y),p=xn(t.node,y)}}}catch(u){ct(n,"style."+c,u)}},{depth:n.path.length,label:$(n,"style."+c)});n.__effects.push(h)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let f=q(t,Re(t.attrDeps,c),t.attr[c]),d=c,l=O(()=>{try{let p=f(t,t.state,t.context);typeof p=="string"&&p.includes("{{")&&(p=J.call(t,p,t.state)),t.node?.setAttribute&&(p==null||p===!1&&!Et(d)?t.node.removeAttribute(d):typeof p!="function"&&typeof p!="object"&&t.node.setAttribute(d,st(d,p)))}catch(p){ct(n,"attr."+d,p)}},{depth:n.path.length,label:$(n,"attr."+d)});l._attrName=d.toLowerCase(),n.__effects.push(l)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let f=t.attr[c],d=c,l=O(()=>{try{let p=J.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(d,st(d,p??""))}catch(p){ct(n,"attr."+d,p)}},{depth:n.path.length,label:$(n,"attr."+d)});l._attrName=d.toLowerCase(),n.__effects.push(l)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let f=t.aria[c];if(typeof f=="string"&&f.includes("{{")){let h=f,u="aria-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),g=O(()=>{try{let y=J.call(t,h,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,st(u,y??""))}catch(y){ct(n,"aria."+c,y)}},{depth:n.path.length,label:$(n,"aria."+c)});g._attrName=u,n.__effects.push(g);continue}if(typeof f!="function")continue;let d=q(t,Re(t.ariaDeps,c),t.aria[c]),l="aria-"+c.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),p=O(()=>{try{let h=d(t,t.state,t.context);if(!t.node?.setAttribute)return;h==null?t.node.removeAttribute(l):typeof h!="function"&&typeof h!="object"&&t.node.setAttribute(l,st(l,h))}catch(h){ct(n,"aria."+c,h)}},{depth:n.path.length,label:$(n,"aria."+c)});p._attrName=l,n.__effects.push(p)}if(t.data&&typeof t.data=="object")for(let c in t.data){let f=t.data[c];if(typeof f=="string"&&f.includes("{{")){let u=f,g="data-"+c.replace(/[A-Z]/g,b=>"-"+b.toLowerCase()),y=O(()=>{try{let b=J.call(t,u,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,b??"")}catch(b){ct(n,"data."+c,b)}},{depth:n.path.length,label:$(n,"data."+c)});y._attrName=g,n.__effects.push(y);continue}if(typeof f!="function")continue;let d=q(t,Re(t.dataDeps,c),t.data[c]),p="data-"+c.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),h=O(()=>{try{let u=d(t,t.state,t.context);if(!t.node?.setAttribute)return;u==null||u===!1?t.node.removeAttribute(p):typeof u!="function"&&typeof u!="object"&&t.node.setAttribute(p,u===!0?"":u)}catch(u){ct(n,"data."+c,u)}},{depth:n.path.length,label:$(n,"data."+c)});h._attrName=p,n.__effects.push(h)}let i=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(i)for(let c in i){if(typeof i[c]!="function")continue;let f=q(t,Re(t.classDeps,c),i[c]),d=O(()=>{try{let l=f(t,t.state,t.context);if(!t.node?.classList)return;typeof l=="string"?t.node.classList.add(l):l?t.node.classList.add(c):t.node.classList.remove(c)}catch(l){ct(n,"class."+c,l)}},{depth:n.path.length,label:$(n,"class."+c)});n.__effects.push(d)}!r&&typeof t.if=="function"&&Xi(t,n,t.if);for(let c of Object.keys(t)){if(Y.has(c)||typeof t[c]!="function")continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||Rt(c))continue;let d=t[c];n.__exec[c]=d;let l=t.tag||"div";if(vt(l,c)&&!oe(l,c)){let p=Ut(c)||c,h=q(t,t[c+"Deps"],d),u=O(()=>{try{let g=h(t,t.state,t.context);typeof g=="string"&&g.includes("{{")&&(g=J.call(t,g,t.state)),t.node?.setAttribute&&(g==null||g===!1&&!Et(p)?t.node.removeAttribute(p):typeof g!="function"&&typeof g!="object"&&(p==="src"&&"src"in t.node?t.node.src=g:t.node.setAttribute(p,st(p,g))))}catch(g){ct(n,c,g)}},{depth:n.path.length,label:$(n,c)});u._attrName=p.toLowerCase(),n.__effects.push(u)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Y.has(c))continue;let f=t[c];if(typeof f!="string"||!f.includes("{{"))continue;let d=c.charCodeAt(0);if(d>=65&&d<=90||Rt(c)||oe(a,c)||te[c]||!vt(a,c))continue;let l=Ut(c)||c,p=O(()=>{try{let h=J.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(l,st(l,h??""))}catch(h){ct(n,c,h)}},{depth:n.path.length,label:$(n,c)});p._attrName=l.toLowerCase(),n.__effects.push(p)}if(Kf(t),Xf(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,f=t.stateDeps,d=!1,l=[],p=O(()=>{let h=[];for(let b=0;b<f.length;b++){let x=f[b];try{h[b]=typeof x=="function"?x(t,t.state,t.context):t.state?.[x]}catch{h[b]=void 0}}if(!d){d=!0,l=h;return}let u=h.length!==l.length;for(let b=0;!u&&b<h.length;b++)h[b]!==l[b]&&(u=!0);let g=l;if(l=h,!u)return;let y=t.context?.designSystem;y&&F(y);try{c(t,t.state,t.context,{prev:g,next:h})}catch(b){if(t.context?.plugins?.length&&rt("error",t,{hook:"onStateUpdate",error:b})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',b),t.context?.strictMode)throw b}finally{y&&L()}},{depth:n.path.length,label:$(n,"onStateUpdate")});n.__effects.push(p)}Qf(t)}function Li(t){let e=t.parent,n=e?.node;if(!n||!t.node){fc(t,t.parent);return}let r=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===n){r=a.node;break}}r?n.insertBefore(t.node,r):n.appendChild(t.node)}function Xi(t,e,n){let r=q(t,t.ifDeps,n),o=O(()=>{let s;try{s=r(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(a){console.error("[smbls] onRemove error:",a)}}else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=ye(t)),t.node&&(t.node.ref=t),Li(t),so(t),et("Render",t,{}),ro(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=ge(t)),et("Init",t,{}),t.node||(t.node=ye(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}et("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),ac(t,{}),Qi(t,{skipIfEffect:!0}),so(t),sc(t),ic(t),lc(t,{}),Li(t),et("Create",t,{}),et("Complete",t,{}),et("Render",t,{}),et("RenderRouter",t,{}),ro(t,{})}},{depth:e.path.length,label:$(e,"if")});e.__effects.push(o)}function ee(t,e){let n=t.node;if(!n)return;let r=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){n.nodeValue!==r&&(n.nodeValue=r);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==n&&(s=null),!s){let i=n.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==r&&(s.nodeValue=r):n.firstChild?(s=(n.ownerDocument||t.context?.document||globalThis.document).createTextNode(r),n.insertBefore(s,n.firstChild)):(n.textContent=r,s=n.firstChild&&n.firstChild.nodeType===3?n.firstChild:null),o&&(o.__textNode=s||null)}function Ni(t,e){let n=t.node;if(!n||!("value"in n))return;let r=e==null?"":String(e);if(n.value===r)return;let o=typeof document<"u"&&document.activeElement===n,s=o&&typeof n.selectionStart=="number"?n.selectionStart:null,i=o&&typeof n.selectionEnd=="number"?n.selectionEnd:null;if(n.value=r,o&&s!=null&&i!=null)try{n.setSelectionRange(s,i)}catch{}}function so(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&ee(t,t.text),oc(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let n=String(t.value);e.value!==n&&(e.value=n)}if(t.style&&typeof t.style=="object"){let n=t.style;for(let r in t.style)if(typeof t.style[r]=="function"){n={};for(let o in t.style)typeof t.style[o]!="function"&&(n[o]=t.style[o]);break}qt(e,n)}if(t.attr&&typeof t.attr=="object")for(let n in t.attr){let r=t.attr[n];typeof r=="function"||typeof r=="object"||r!=null&&(typeof r=="string"&&r.includes("{{")||r===!1&&!Et(n)||e.setAttribute&&e.setAttribute(n,st(n,r)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&e.setAttribute&&e.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(let n in t.data){let r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||typeof r=="string"&&r.includes("{{")||e.dataset&&(e.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){let n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&e.classList.add(r));else if(typeof n=="object")for(let r in n){let o=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];o&&e.classList.add(typeof o=="string"?o:r)}}}}function An(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Bf(t){if(!t||typeof t!="object")return!1;for(let e in t){let n=t[e];if(n&&typeof n=="object"&&!Array.isArray(n))return!0}return!1}function xn(t,e){if(!t||!t.style||!e)return null;let n=t.style,r=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=$n(o);r.push(i,fo(n,i),Ji(n,i))}return r}function fo(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function Ji(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function $n(t){return vn(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Wf(t,e,n){if(!t||!t.style||!e||!e.length)return;let r=t.style,o=new Set;if(n&&typeof n=="object")for(let s in n)n[s]==null||s.charAt(0)==="&"||o.add($n(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||fo(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function wn(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(fo(n,e[r])!==e[r+1]||Ji(n,e[r])!==e[r+2])return!1;return!0}var vn=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function Uf(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add($n(n)));return e}function zf(t,e,n,r){let o=t.__ref;if(!o)return;let s=null;if(n)for(let i of n){if(r&&r.has(i))continue;let a=e[i];if(a==null||typeof a=="object")continue;let c=$n(i);Oe[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function tc(t,e){let n=t.__ref,r=n&&n.__declaredLonghands;if(!r||!e)return null;let o=null;for(let s in r){if(e.has(s))continue;let i=Oe[s],a=!1;for(let c=0;c<i.length;c++)if(e.has(i[c])){a=!0;break}a&&(o||(o={}),o[s]=r[s])}return o}function ji(t,e){let n=t.node;qt(n,e);let r=Uf(e);if(!r)return e;let o=t.__ref;if(o)if(o.__inlineCssKeys)for(let i of r)o.__inlineCssKeys.add(i);else o.__inlineCssKeys=new Set(r);let s=tc(t,r);return s?(qt(n,s),Object.assign({},e,s)):e}function Gf(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=tc(t,e.__inlineCssKeys);n&&qt(t.node,n)}function qt(t,e){if(!t||!e||!t.style)return;let n=null;for(let r in e){let o=e[r];if(o!=null){if(r.charAt(0)==="&"&&typeof o=="object"){n||(n={}),n[r]=o;continue}try{let s=String(o),i=vn(r)?r:r.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),f=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,f,c?"important":"")}catch{}}}n&&Hf(t,n)}function Hf(t,e){let n=`_ds${zi.scopedStyleId++}`;t.classList.add(n);let r=t.ownerDocument,o=r.querySelector("style[data-smbls-scoped]");o||(o=r.createElement("style"),o.setAttribute("data-smbls-scoped",""),r.head.appendChild(o));let s="";for(let i in e){let a="."+n,c=i.replace(/&/g,a).split(",").map(d=>{let l=d.trim();return l.includes(a)?l:a+l}).join(", "),f=e[i];if(typeof f=="object"){let d="",l="";for(let p in f){let h=f[p];if(typeof h=="object"){let u=p.includes("&")?c.split(", ").map(y=>p.replace(/&/g,y)).join(", "):c.split(", ").map(y=>`${y} ${p}`).join(", "),g="";for(let y in h)g+=`${y.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[y]};`;l+=Te(`${u} { ${g} }`,u)+`
|
|
19
|
+
`}else d+=`${p.replace(/[A-Z]/g,u=>"-"+u.toLowerCase())}: ${h};`}d&&(s+=Te(`${c} { ${d} }`,c)+`
|
|
20
|
+
`),l&&(s+=l)}}s&&(o.textContent+=s)}var Vi=new Set;function Fi(t){if(!Array.isArray(t))return"";let e=[];for(let n=0;n<t.length;n++)typeof t[n]=="string"&&t[n].length&&e.push(t[n]);return e.sort(),e.join("|")}function qf(t,e,n){let r=Fi(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(Fi(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Vi.has(s)||(Vi.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${n.join(", ")||"(none)"}], probed [${Array.isArray(o)?o.join(", "):String(o)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function Kf(t){let e=t.subscribeTo,n=typeof e=="function",r=e;if(n)try{r=e(t,t.state,t.context)}catch{r=null}if(n&&Z()&&qf(t,e,Array.isArray(r)?r:[]),!Array.isArray(r)||r.length===0)return;let o=t.__ref;for(let s=0;s<r.length;s++){let i=r[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],f=a.slice(1),d={value:!1},l=O(()=>{let p=t.state&&(V(t.state)?t.state.root:null);if(!p||!V(p))return;let h=p;h=h[c];for(let g=0;g<f.length&&!(h==null||typeof h!="object");g++)if(V(h))h=h[f[g]];else break;if(!d.value)return;let u=!1;if(typeof t.onBeforeUpdate=="function"){let g=t.context?.designSystem;g&&F(g);try{if(Lr(o)){let y=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});y&&typeof y.then=="function"?y.then(()=>Tt(o,!1),b=>{Tt(o,!0),t.context?.plugins?.length&&rt("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(Tt(o,!1),y===!1&&(u=!0))}}catch(y){Tt(o,!0),t.context?.plugins?.length&&rt("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}finally{g&&L()}}if(!u&&t.node&&o.__effects)for(let g=0;g<o.__effects.length;g++){let y=o.__effects[g];y&&y!==l&&!y._disposed&&!y._isSubscribeToEffect&&typeof y._execute=="function"&&y._execute()}if(!u&&typeof t.onUpdate=="function"){let g=t.context?.designSystem;g&&F(g);try{t.onUpdate(t,t.state,t.context)}catch(y){t.context?.plugins?.length&&rt("error",t,{hook:"onUpdate",error:y})||console.error("[DOMQL] subscribeTo onUpdate error:",y)}finally{g&&L()}}},{depth:o.path.length,label:$(o,"subscribeTo("+i+")")});d.value=!0,l._isSubscribeToEffect=!0,o.__effects.push(l)}}function uo(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function po(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let n=e.context?.designSystem?.media?.[t.slice(1)];return n?/^@(media|supports|container)\b/.test(n)?n:`@media ${n}`:t}var Bi=new Set;function Yf(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;Bi.has(r)||(Bi.add(r),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function ce(t,e,n,r){let o={},s=new Set,i=(a,c,f)=>{let d=f?new Set(Object.keys(o)):null;if(G[a]){let l=G[a](c,e,e.state,e.context);if(l){let p=Array.isArray(l)?l:[l];for(let h of p)h&&Object.assign(o,h)}}else o[a]=c;if(f)for(let l in o)d.has(l)||s.add(l)};for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=t[a];if(typeof c=="function"&&(c=c(e,e.state,e.context)),c==null||typeof c=="function")continue;if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let h in c){let u=c[h];if(typeof u=="function"&&(u=u(e,e.state,e.context)),u==null||typeof u=="function")continue;let g=typeof e[h]=="function"&&(G[h]||W&&W.has(h))||!!(r&&r.has(h));i(h,u,g)}continue}if(uo(a,e)){let h=ce(c,e,!1,r);Object.keys(h).length&&(o[`[data-theme="${a.slice(1)}"] &`]=h);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){Z()&&Yf(a,e);continue}let l=po(a,e),p=ce(c,e,!1,r);Object.keys(p).length&&(o[l]=p);continue}let f=typeof e[a]=="function"&&(G[a]||W&&W.has(a)),d=!!(r&&r.has(a));i(a,c,f||d)}if(n)for(let a in o)s.add(a);for(let a of s){let c=o[a];typeof c=="string"&&!c.includes("!important")&&(o[a]=c+" !important")}return o}var Tn=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function ec(t,e){for(let n in e){let r=e[n];t[n]=Tn(r)?ec(Tn(t[n])?t[n]:{},r):r}return t}function Zf(t,e){if(!Tn(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Tn(o)&&(n=ec(n||{},o))}return n}function ho(t,e){if(e===void 0&&(e=0),e>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ho(t[n],e+1))return!0}return!1}function nc(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(uo(t,n)){let s=ce(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=po(t,n),o=ce(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function Qf(t){let e=t.__ref;for(let n of Object.keys(t)){if(!oo(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!ho(r))continue;let o=null,s,i=O(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&F(a);let c,f=!1;try{let d=nc(n,r,t),l=d?An(d.block)+"::"+d.cssProp:null;if(l!==null&&l===s)f=!0;else if(s=l,d){let p=zt({[d.cssProp]:d.block},null,t.context?.cssPrefix);c=p?p.split(" ").filter(Boolean):null}else c=null}finally{a&&L()}if(!(f||!t.node.classList)){if(o)for(let d of o)t.node.classList.remove(d);if(c&&c.length)for(let d of c)t.node.classList.add(d);o=c}},{depth:e.path.length,label:$(e,"cssBlock("+n+")")});e.__effects.push(i)}}function Xf(t){let e=t.__ref;e.__conditionalRunners=[];let n=new Map;for(let r of Object.keys(t)){let o=r.charAt(0);if(o!=="."&&o!=="!")continue;let s=r.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${r}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${o}\` is read as one prop name. Nest the selector inside instead: \`${o}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[r];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},f=new Set;for(let u in i){if(!Object.prototype.hasOwnProperty.call(i,u))continue;let g=u.charAt(0),y=i[u];(g===":"||g==="@"||g==="&"||g==="[")&&y&&typeof y=="object"&&!Array.isArray(y)||f.add(u)}let d=()=>{let u,g=t[s];if(g===void 0){let x=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(x||m!==void 0)u=m;else{let _=t.context?.cases?.[s];if(_===void 0)return;try{u=typeof _=="function"?_.call(t,t):_}catch(S){u=!1,e.__conditionalError=S,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${r}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,S?.message||S)}}}else if(typeof g=="function")try{u=g(t,t.state,t.context)}catch(x){u=!1,e.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${r}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}else u=g;let y=a?!u:!!u;if(!t.node||y===c.lastMatch)return;c.lastMatch=y;let b=t.context?.designSystem;b&&F(b);try{if(y){let x={},m={},_=!1;for(let k in i){if(!Object.prototype.hasOwnProperty.call(i,k))continue;let C=i[k],D=k.charAt(0);if((D===":"||D==="@"||D==="&"||D==="[")&&C&&typeof C=="object"&&!Array.isArray(C)){if(uo(k,t)){let R=ce(C,t,!1,f);Object.keys(R).length&&(m[`[data-theme="${k.slice(1)}"] &`]=R,_=!0)}else{let R=po(k,t),nt=ce(C,t,!1,f);Object.keys(nt).length&&(m[R]=nt,_=!0)}continue}let j=typeof C=="function"?C(t,t.state,t.context):C;if(j!=null)if(G[k]){let R=G[k](j,t,t.state,t.context);if(R){let nt=Array.isArray(R)?R:[R];for(let De of nt)De&&Object.assign(x,De)}}else(W&&W.has(k)||vn(k))&&(x[k]=j)}let S=Object.keys(x);if(S.length){qt(t.node,x);for(let k of S)n.set(k,r);c.appliedKeys=S}else c.appliedKeys=null;if(_){let k=zt(m,null,t.context?.cssPrefix,{state:!0}),C=k?k.split(" ").filter(Boolean):[];if(C.length&&t.node.classList){for(let D of C)t.node.classList.add(D);c.appliedClasses=C}else c.appliedClasses=null}else if(c.appliedClasses){for(let k of c.appliedClasses)t.node.classList.remove(k);c.appliedClasses=null}}else{if(c.appliedKeys){for(let x of c.appliedKeys)n.get(x)===r&&(vn(x)?t.node.style.removeProperty(x):t.node.style[x]="",n.delete(x));c.appliedKeys=null}if(c.appliedClasses){for(let x of c.appliedClasses)t.node.classList.remove(x);c.appliedClasses=null}}}finally{b&&L()}};e.__conditionalRunners.push(d);let l=q(t,t[s+"Deps"],d),p=O(l,{depth:e.path.length,label:$(e,"conditional("+r+")")}),h=e.__exec&&e.__exec[s]||t[s];p._sources.size===0&&typeof h=="function"&&Z()&&console.warn(`[smbls] conditional \`${r}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${s}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(p)}}var eo=new WeakSet;function Jf(t){let e=t.ownerDocument;!e||eo.has(e)||(eo.add(e),queueMicrotask(()=>{eo.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var no=new WeakSet,Wi=!1;function Ui(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function io(t,e){let n={...t};for(let r in e){let o=e[r],s=n[r];n[r]=o&&typeof o=="object"&&s&&typeof s=="object"?io(s,o):o}return n}function rc(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=rc(o,e);Object.keys(s).length&&(n[r]=s)}else e.has(r)||(n[r]=o)}return n}function oc(t){let{node:e}=t;if(!e)return;if(Wi||(Wi=!0,zt({display:"none"})),no.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}no.add(t);let n=t.context?.designSystem;n&&F(n),Wr();try{let r={},o=!1,s=[],i=null,a=null,c=null,f=(u,g)=>{if(g&&typeof g=="object"&&Ui(u)){a||(a={});let y=a[u];y&&(g=io(y,g)),a[u]=g}else(g===null||typeof g!="object")&&(c||(c=new Set),c.add(u));r[u]=g};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&G.theme){let u=G.theme(t.theme,t,t.state,t.context);if(u){let g=y=>{for(let b in y){let x=y[b];x&&typeof x=="object"&&Ui(b)&&(i||(i={}),i[b]=x),r[b]=x}};if(Array.isArray(u))for(let y of u)y&&g(y);else g(u);o=!0}}let d=(u,g)=>{if(G[u]){let y=G[u](g,t,t.state,t.context);if(y){if(Array.isArray(y)){for(let b of y)if(b)for(let x in b)f(x,b[x])}else for(let b in y)f(b,y[b]);o=!0}}else if(W&&W.has(u))g!=null&&typeof g!="object"&&(f(u,g),o=!0);else if(u.charCodeAt(0)===45)g!=null&&typeof g!="object"&&(f(u,g),o=!0);else if((u.charAt(0)==="&"||u.charAt(0)==="@"||u.charAt(0)===":"||u.charAt(0)==="[")&&g&&typeof g=="object"&&!Array.isArray(g)){if(ho(g))return;let y=nc(u,g,t);y&&(f(y.cssProp,y.block),o=!0)}};if(typeof t.class=="string"){let u=Zf(t.class,t.context?.designSystem?.class);if(u)for(let g in u)d(g,u[g])}let l=c?new Set(c):null,p=t.tag||"div";for(let u of Object.keys(t)){if(typeof t[u]=="function"||Y.has(u)||u==="theme")continue;let g=u.charCodeAt(0);g>=65&&g<=90||Rt(u)||Sn(p,u)||d(u,t[u])}if(i)for(let u in i){let g=c?rc(i[u],c):i[u];a&&a[u]&&(g=io(g,a[u])),Object.keys(g).length?r[u]=g:delete r[u]}if(zf(t,r,c,l),o){r.display&&String(r.display).includes("!important")&&(e.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);let u=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof u=="string"&&u!==""&&r.display&&r.display!==u&&(r.display=u);let g=zt(r,null,t.context?.cssPrefix);if(s=g?g.split(" ").filter(Boolean):[],g&&e.classList){let y=s,b=!1;for(let x of y)e.classList.add(x),b||(x.charCodeAt(0)===95&&x.charCodeAt(1)===99||x.charCodeAt(0)===95&&x.indexOf("_c",1)!==-1)&&(b=!0);b&&Jf(e)}}let h=t.__ref;if(h){let u=h.__staticCssClasses;if(u&&e.classList){let g=new Set(s);for(let y of u)g.has(y)||e.classList.remove(y)}h.__staticCssClasses=s}Gf(t)}finally{Ur(),n&&L(),no.delete(t)}}var Ys=t=>!!G[t]||!!(W&&W.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function Zs(t){t&&t.node&&oc(t)}function sc(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,st(i,s))}let n=Ks(t);for(let o in n){let s=n[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let r=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||Y.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Rt(o)&&!oe(r,o)&&vt(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!te[o])continue;i=J.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!Et(Ut(o)||o))continue;let a=Ut(o)||o;e.setAttribute(a,st(a,i))}}}function Qs(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||Rt(e))return;let o=t.tag||"div";if(oe(o,e)||!vt(o,e))return;let s=Ut(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let l=0;l<a.length;l++){let p=a[l];p&&p._attrName===i&&!p._disposed&&typeof p._execute=="function"&&(c=!0,p._execute())}if(c)return;let f=t[e],d=te[e];if(d&&f!=null){let l=d(t);l!==void 0&&(f=l)}typeof f=="string"&&f.includes("{{")&&(f=J.call(t,f,t.state)),f==null||f===!1&&!Et(s)?n.removeAttribute(s):typeof f!="function"&&typeof f!="object"&&n.setAttribute(s,st(s,f))}function tu(t,e){let n=t.node,r=t.__ref,o=r.__autoGrow;if(!e){if(o&&o.active){try{n.removeEventListener("input",o.resize)}catch{}Cn(o),Ht.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=r.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,layoutWatch:null,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!n.isConnected){go(t,!0);return}if(!(n.scrollHeight>0)){nu(t,o);return}Cn(o);let i=n.style.height;n.style.height="auto";let a=n.scrollHeight;if(!(a>0)){n.style.height=i;return}n.style.height=a+"px",o.lastMeasure=a}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}Cn(o),Ht.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""):n.style.maxHeight=s,o.appliedMax=s),o.resize()}function go(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),Ht.add(t),Rn())}function eu(){let t=Array.from(Ht);Ht.clear();for(let e=0;e<t.length;e++){let n=t[e],r=n.node,o=n.__ref?.__autoGrow;if(!(!r||!o||!o.active)){if(!r.isConnected){o.firstAttemptAt==null&&(o.firstAttemptAt=ie()),o.attachAttempts+=1,o.attachAttempts<=qi&&ie()-o.firstAttemptAt<Ki&&(Ht.add(n),Rn());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function nu(t,e){if(e.layoutWatch)return;let n=t.node;if(!n)return;let r=n.ownerDocument&&n.ownerDocument.defaultView,o=r&&r.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof o!="function")return;let s=()=>{!n.isConnected||!(n.scrollHeight>0)||(Cn(e),go(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.layoutWatch=i}function Cn(t){let e=t.layoutWatch;if(e){t.layoutWatch=null;try{e.disconnect()}catch{}}}function ic(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let n=t.__ref,r=t.autoGrow,o=typeof r=="function"?q(t,t.autoGrowDeps,r):null,s=O(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===r&&o?o:i)(t,t.state,t.context)}catch{a=null}tu(t,a)},{depth:n.path.length,label:$(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var cc=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function ac(t,e){for(let n of Object.keys(t)){if(!Rt(n)||cc.has(n))continue;let r=Pr(n);if(r){Ir(r,t,t[n]);continue}let o=t[n];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(c){return t.call(i,c)}}if(typeof o!="function")continue;let s=Tf(n);me.has(s)||Ce(Of(s),t,o)}ru(t)}function ru(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let p of cc){let h=t[p];typeof h=="function"&&(n[p]=h,r=!0)}if(!r)return;let o=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,f=!1,d=p=>{let h=p.touches&&p.touches[0]||p.changedTouches&&p.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),f=!0)},l=p=>{if(!f)return;f=!1;let h=p.changedTouches&&p.changedTouches[0]||p.touches&&p.touches[0];if(!h)return;let u=h.clientX-i,g=h.clientY-a,y=Date.now()-c;if(y>s)return;let b=Math.abs(u),x=Math.abs(g);if(Math.max(b,x)<o)return;let m;if(b>x*1.2)m=u<0?"left":"right";else if(x>b*1.2)m=g<0?"up":"down";else return;let _="onSwipe"+m.charAt(0).toUpperCase()+m.slice(1),S=n[_],k=n.onSwipe;S&&S.call(t,p,t,t.state,t.context),k&&k.call(t,{direction:m,dx:u,dy:g,dt:y,event:p},t,t.state,t.context)};e.addEventListener("touchstart",d,{passive:!0}),e.addEventListener("touchend",l,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",d)}catch{}try{e.removeEventListener("touchend",l)}catch{}})}function Me(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Me(o,s):n[r]=s}return n}function co(t,e,n,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",i=t.context?.document||globalThis.document,a=s?null:i?.createDocumentFragment();if(!s&&!a)return;let c=t.childProps,f=t.childrenAs,d=y=>{let b=e[y],x=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let m=c;if(typeof c=="function")try{m=c(t,b)}catch{m=null}if(f==="state"){let S=x;(typeof x=="string"||typeof x=="number")&&(S={value:x,text:x}),b=m?{...m,state:S}:{state:S}}else m&&(b=Me(m,b));if(o&&!b.ignoreChildExtends)if(b.extends){let S=Array.isArray(b.extends)?b.extends:[b.extends],k=Array.isArray(o)?o:[o];b={...b,extends:[...k,...S]}}else b={...b,extends:o};let _=Yi(b?.key,x,y);try{return it(b,t,_,n)}catch(S){if(typeof console<"u"&&console.error){let k=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${_}" failed to construct at ${k} (initial render, skipping this row):`,S?.message||S)}return null}},l=t.__ref;if(!(r===!0&&!s&&!!l&&(n?.mountYield===!0||t.yieldChildren===!0))){for(let y=0;y<e.length;y++){let b=d(y);!s&&b?.node&&a.appendChild(b.node)}return s||t.node.appendChild(a),!0}let h=l.__childrenChunkGen=(l.__childrenChunkGen||0)+1;Kr();let u=null,g=y=>{if(l.__disposed||l.__childrenChunkGen!==h){u&&u.parentNode&&u.remove();return}for(let b=y;b<e.length;b++){let x=d(b);if(x?.node&&(u?t.node.insertBefore(x.node,u):a.appendChild(x.node)),b+1<e.length&&qr()){u||(u=i.createComment("smbls-mount"),a.appendChild(u),t.node.appendChild(a));let m=b+1;Zr(()=>g(m));return}}u?(u.remove(),t.node.tagName==="SELECT"&&On(t,!0)):t.node.appendChild(a)};return g(0),Yr(),!0}if(typeof e=="string"){let s=Zi(e,t);if(Array.isArray(s))return co(t,s,n,r)}if(typeof e=="object")for(let s in e){if(Y.has(s))continue;let i=e[s];if(!(i==null||i===!1)){if((typeof i=="string"||typeof i=="number")&&(i={text:i}),t.childProps&&(i=Me(t.childProps,i)),o&&!i.ignoreChildExtends)if(i.extends){let a=Array.isArray(i.extends)?i.extends:[i.extends],c=Array.isArray(o)?o:[o];i={...i,extends:[...c,...a]}}else i={...i,extends:o};it(i,t,s,n)}}}function On(t,e){let n=t.node;if(!n||n.tagName!=="SELECT")return;let r=n.options;if(!r||!r.length)return;let o=t.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let d;if(i)try{d=s(t,t.state,t.context)}catch{return}else d=t.value,typeof d=="string"&&d.includes("{{")&&(d=J.call(t,d,t.state));let l=d==null?"":String(d);n.value!==l&&(n.value=l);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let f=-1;for(let d=0;d<r.length;d++)r[d].defaultSelected&&(f=d);f>=0&&n.selectedIndex!==f&&(n.selectedIndex=f)}function lc(t,e){let{children:n,content:r}=t,o=t.childExtends;if(typeof n=="function"){let l=n;try{n=l(t,t.state,t.context)}catch(y){if(n=void 0,typeof console<"u"&&console.error){let b=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${b} (initial run, treating as empty):`,y?.message||y)}}t.children=n;let p=t.__ref,h=!1,u=q(t,t.childrenDeps,l),g=O(()=>{let y=h;h=!0;let b;try{b=u(t,t.state,t.context)}catch(j){if(typeof console<"u"&&console.error){let R=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${R}${y?"":" (initial tracking run)"}:`,j?.message||j)}return}if(!y||b===t.children)return;t.children=b,p.__childrenChunkGen!=null&&p.__childrenChunkGen++;let x=typeof t.onContentUpdate=="function",m=x?[]:null,_=x?[]:null,S=x?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let j=t.childProps,R=[],nt=new Map;for(let P=0;P<b.length;P++){let ft=b[P],I=j;if(typeof j=="function")try{I=j(t,ft)}catch{I=null}let xt=Yi(I&&I.key,ft,P);R.push(xt),nt.set(xt,{rawChild:ft,childProps:I})}let De=new Set(R),uc=p.__children.slice();for(let P of uc)if(!De.has(P)){let ft=t[P];ft?.remove&&ft.remove(),delete t[P],_&&_.push(P)}let ae=t.childExtends,Le=t.tag==="fragment",dc=t.context?.document||globalThis.document,le=Le?null:dc?.createDocumentFragment(),Pn=new Set;for(let P of R){let ft=nt.get(P),I=ft.rawChild,xt=t[P];if(xt&&xt.state){if(I&&typeof I=="object"){let Q=xt.state,Kt=Q.$replace||Q.replace,mo=Q.$update||Q.update;try{if(typeof Kt=="function")Kt.call(Q,I);else if(typeof mo=="function"){for(let at in Q)if(!(at==="__element"||at==="root"||at==="parent"||at==="update")&&!Object.prototype.hasOwnProperty.call(I,at))try{Q[at]=void 0}catch{}mo.call(Q,I)}else for(let at in I)Q[at]=I[at]}catch(at){if(typeof console<"u"&&console.error){let pc=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${P}" failed to patch at ${pc} (reconcile, keeping its previous data for this pass):`,at?.message||at)}}}S&&S.push(P);continue}let In=I;(typeof I=="string"||typeof I=="number")&&(In={value:I,text:I});let yo=ft.childProps,gt=yo?{...yo,state:In}:{state:In};if(ae&&!gt.ignoreChildExtends)if(gt.extends){let Q=Array.isArray(gt.extends)?gt.extends:[gt.extends],Kt=Array.isArray(ae)?ae:[ae];gt={...gt,extends:[...Kt,...Q]}}else gt={...gt,extends:ae};let Mn;try{Mn=it(gt,t,P,e)}catch(Q){if(typeof console<"u"&&console.error){let Kt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${P}" failed to construct at ${Kt} (reconcile, skipping this row):`,Q?.message||Q)}Pn.add(P);continue}!Le&&Mn?.node&&le&&le.appendChild(Mn.node),m&&m.push(P)}if(!Le&&le&&le.childNodes.length&&t.node&&t.node.appendChild(le),!Le&&t.node){let P=null;for(let ft of R){let I=t[ft]?.node;if(!I)continue;let xt=P?P.nextSibling:t.node.firstChild;I!==xt&&t.node.insertBefore(I,xt),P=I}}p.__children=Pn.size?R.filter(P=>!Pn.has(P)):R,x&&(m.length||_.length)&&Pi(t,{added:m,removed:_,kept:S}),On(t,!1);return}let D=x?[...p.__children]:null;for(let j of[...p.__children]){let R=t[j];R?.remove&&R.remove(),delete t[j]}p.__children=[],co(t,b,e),On(t,!1),x&&Pi(t,{added:[...p.__children],removed:D,kept:[]})},{depth:p.path.length,label:$(p,"children")});p.__effects.push(g)}let s=co(t,n,e,!0);if(r!=null&&!(r&&r.__ref)){let l=r;if(typeof l=="string"||typeof l=="number"?l={text:l}:typeof l!="object"&&(l={}),t.childProps&&(l=Me(t.childProps,l)),o&&!l.ignoreChildExtends)if(l.extends){let p=Array.isArray(l.extends)?l.extends:[l.extends],h=Array.isArray(o)?o:[o];l={...l,extends:[...h,...p]}}else l={...l,extends:o};it(l,t,"content",e)}if(n&&!s)return;let i=t.context?.components||{};{let l=Object.keys(t);for(let p=0;p<l.length;p++){let h=l[p];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let u=h.slice(0,-7);if(!u||u.charCodeAt(0)<65||u.charCodeAt(0)>90)continue;let g={extends:t[h]};delete t[h];for(let y=p+1;y<l.length;y++){let b=l[y],x=b.charCodeAt(0);if(x>=65&&x<=90||Y.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;let m=t[b];m!==void 0&&(g[b]=m,delete t[b])}t[u]&&typeof t[u]=="object"?t[u]={...g,...t[u]}:t[u]=g}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),f=l=>{if(Y.has(l)||typeof t[l]!="object"||t[l]===null)return;let p=l.charCodeAt(0);if(p<65||p>90)return;let h=t[l];if(!h.__ref){if(!h.extends&&!h.extend){let u=i[l]||i[`smbls.${l}`];u&&(h={...h,extends:u})}if(t.childProps&&(h=Me(t.childProps,h)),o&&!h.ignoreChildExtends)if(h.extends){let u=Array.isArray(h.extends)?h.extends:[h.extends],g=Array.isArray(o)?o:[o];h={...h,extends:[...g,...u]}}else h={...h,extends:o};it(h,t,l,e)}};if(!a){for(let l of c)f(l);return}Kr();let d=l=>{for(let p=l;p<c.length;p++)if(f(c[p]),p+1<c.length&&qr()){let h=p+1;Zr(()=>d(h));return}};d(0),Yr()}function fc(t,e,n){let{node:r}=t;if(!r)return;r.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(n?.position==="before"&&n.node)i.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let a=n.node.nextSibling;i.insertBefore(r,a||o)}else i.insertBefore(r,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let i=n.node.nextSibling;i?s.insertBefore(r,i):s.appendChild(r)}else s.appendChild(r)}var ao=3;function Lr(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=ao?!1:(t.__inBeforeUpdate=!0,!0)}function Tt(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===ao&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${ao}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function et(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&rt(r,e,n);let o="on"+t,s=e[o];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let f=e.context?.designSystem;f&&F(f);let d=!!c;try{let l=s(e,e.state,e.context,n);if(l&&typeof l.then=="function"){let p=e.__ref;return l.catch(h=>{e.context?.plugins?.length&&rt("error",e,{hook:o,error:h})||console.error(`[DOMQL] Lifecycle "${o}" error:`,h)}).finally(()=>{c&&p&&(p[c]=!1)}),d=!1,!0}if(l===!1)return!1}catch(l){if(e.context?.plugins?.length&&rt("error",e,{hook:o,error:l})||console.error(`[DOMQL] Lifecycle "${o}" error:`,l),e.context?.strictMode)throw l}finally{f&&L(),d&&e.__ref&&(e.__ref[c]=!1)}}return!0}var ou=it;var su=(t,e,n={})=>{if(!t||typeof t!="object")throw new Error("[SymbolsEmbed.mount] rootDef must be an object");if(typeof Node>"u"||!(e instanceof Node))throw new Error("[SymbolsEmbed.mount] host must be a DOM element");let r=t;if(n.state!=null){let o=t.state,s=i=>i&&typeof i=="object"&&!Array.isArray(i)&&!V(i);r={...t,state:s(o)&&s(n.state)?{...o,...n.state}:n.state}}return it(r,e,"Root",{context:n.context||{}})};return xc(iu);})();
|