smbls 3.14.819 → 3.14.821

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,20 @@
1
- "use strict";var SymbolsEmbed=(()=>{var wc=Object.create;var Ve=Object.defineProperty;var kc=Object.getOwnPropertyDescriptor;var Ac=Object.getOwnPropertyNames;var Cc=Object.getPrototypeOf,Ec=Object.prototype.hasOwnProperty;var vc=(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 Fe=(t,e)=>{for(var n in e)Ve(t,n,{get:e[n],enumerable:!0})},xo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ac(e))!Ec.call(t,o)&&o!==n&&Ve(t,o,{get:()=>e[o],enumerable:!(r=kc(e,o))||r.enumerable});return t};var Tc=(t,e,n)=>(n=t!=null?wc(Cc(t)):{},xo(e||!t||!t.__esModule?Ve(n,"default",{value:t,enumerable:!0}):n,t)),Oc=t=>xo(Ve({},"__esModule",{value:!0}),t);var bu={};Fe(bu,{FACTORY:()=>nn,REGISTRY:()=>Q,applyExtends:()=>Te,batch:()=>Ye,create:()=>ct,createEffect:()=>$,createElement:()=>yu,createSignal:()=>ye,createStore:()=>Vt,getActiveConfig:()=>C,mount:()=>mu,popConfig:()=>N,pushConfig:()=>B,registerEvent:()=>ve});var zn={};Fe(zn,{WRITE_JOURNAL:()=>de,batch:()=>he,createComputed:()=>$c,createEffect:()=>Pc,createSignal:()=>mt,getObserver:()=>Bn,journalWrite:()=>pe,setObserver:()=>Rc});var tt=null,Be=0,We=[],Bn=()=>tt,Rc=t=>{tt=t},ze=0,jn=[];function mt(t){let e=new Set;function n(){return tt&&(e.add(tt),tt._sources.add(s)),t}function r(i){i!==t&&(t=i,Nc(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function $c(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){Fn(o);let s=tt;tt=o;try{e=t(),n=!1}finally{tt=s}},_notify(){n=!0,r.size>0&&Co(r)},get(){return tt&&(r.add(tt),tt._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}var dt=new Set,Nn=!1,de=[];function pe(t){de.push(t),de.length>32&&de.shift()}function Pc(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;Fn(r);let o=tt;tt=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{tt=o}},_notify(){r._disposed||(Be>0?We.push(r):ze>0?jn.push(r):Wn(r))},dispose(){r._disposed=!0,Fn(r)}};return r._execute(),r}function he(t){Be++;try{t()}finally{Be--,Be===0&&jc()}}var Vn=!1,wo=1e3,Mc=8,Ic=256,Dc=4;function ko(){return typeof performance<"u"?performance.now():Date.now()}function Wn(t){dt.add(t),!Vn&&(Nn||(Nn=!0,queueMicrotask(Ao)))}var Qt=[];function Lc(){if(dt.size===1){let[e]=dt;return dt.clear(),e._disposed?0:(e._execute(),1)}Qt.length=0;for(let e of dt)Qt.push(e);dt.clear(),Qt.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<Qt.length;e++){let n=Qt[e];n._disposed||(n._execute(),t++)}return Qt.length=0,t}function Ao(t=0,e=0){if(Nn=!1,dt.size===0)return;Vn=!0;let n=ko(),r=!1;try{for(;dt.size>0;){if(++t>wo){let o=new Map;for(let c of dt){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 de)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",wo,"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>"),dt.clear();break}if(e+=Lc(),dt.size>0&&(e>=Ic||t>=Dc)&&ko()-n>Mc){r=!0,setTimeout(()=>Ao(t,e),0);break}}}finally{r||(Vn=!1)}}function jc(){for(let t=0;t<We.length;t++)Wn(We[t]);We.length=0}function Co(t){ze++;try{for(let e of t)e._notify()}finally{if(ze--,ze===0&&jn.length>0){let e=jn.splice(0);for(let n=0;n<e.length;n++)Wn(e[n])}}}function Nc(t){Co(t)}function Fn(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Zn={};Fe(Zn,{RESERVED_STORE_METHODS:()=>ge,STORE_METHOD_NAMES:()=>Yn,__resetStateShadowWarnings:()=>Vc,createScopeStore:()=>zc,createStore:()=>Ue,getSignals:()=>Wc,isStore:()=>Bc,warnStateKeyShadowsMethod:()=>Kn});var bt=Symbol("store"),Ge=Symbol("signals"),Yn=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ge=new Set(Yn),qn=new Set,Un=(t,e)=>t?t+"."+e:String(e);function Kn(t,e){let n=(e||"")+"::"+t;if(qn.has(n))return;qn.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: ${Yn.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function Vc(){qn.clear()}var Gn=t=>!t||typeof t!="object"||Array.isArray(t)||t[bt]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!He(t),Fc=12,He=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function qe(t,e,n){if(t===e)return!0;if(n>Fc)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(!qe(t[r],e[r],n+1))return!1;return!0}if(He(t)&&He(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)||!qe(t[s],e[s],n+1))return!1;return!0}return!1}function Ue(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r="");let o={},s={},i=b=>Object.prototype.hasOwnProperty.call(o,b)&&Object.prototype.hasOwnProperty.call(s,b),a=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}ge.has(b)&&Kn(b,r);let _=t[b];n<a&&_&&typeof _=="object"&&!Gn(_)?(s[b]=_,o[b]=mt(Ue(_,e,n+1,Un(r,b)))):(s[b]=_,o[b]=mt(_))}let c=new Proxy(s,{get(b,_){if(_===bt)return!0;if(_===Ge)return o;if(_==="__raw")return b;if(_==="$update")return f;if(_==="$parse")return l;if(_==="$clean")return h;if(_==="$keys")return p;if(_==="$values")return u;if(_==="$replace")return g;if(_==="$add")return y;if(_==="$remove")return m;if(_==="$destroy")return x;if(_==="$quietUpdate")return d;if(ge.has(_)&&!Object.prototype.hasOwnProperty.call(o,_))switch(_){case"update":return f;case"parse":return l;case"clean":return h;case"keys":return p;case"values":return u;case"replace":return g;case"add":return y;case"remove":return m;case"destroy":return x;case"quietUpdate":return d}if(_==="__element")return b.__element;if(_==="parent")return b.parent;if(_==="root")return b.root;if(Object.prototype.hasOwnProperty.call(o,_)){let k=o[_].get();if(k!==void 0||!(_!=="root"&&b.root&&b.root!==c))return k}if(b[_]!==void 0)return b[_];let S=typeof _=="string"&&!_.startsWith("__")&&_!=="then"&&_!=="constructor"&&Bn()!=null;if(_!=="root"&&b.root&&b.root!==c){let k=b.root[_];return S&&!Object.prototype.hasOwnProperty.call(o,_)&&(o[_]=mt(void 0),o[_].get()),k}if(S)return o[_]=mt(void 0),o[_].get()},set(b,_,S){if(_==="__proto__")return!1;if(_==="__element"||_==="parent"||_==="root"||typeof _=="string"&&_.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,_))return b[_]=S,!0;ge.has(_)&&Kn(_,r);let k=Un(r,_);if(Object.prototype.hasOwnProperty.call(o,_))if(S&&typeof S=="object"&&!Gn(S)){if(S===b[_])return!0;let E=o[_].peek(),M=E&&E[bt]?E.$parse():E;if(qe(S,M,0))return!0;b[_]=S,pe(k),o[_].set(Ue(S,e,n+1,k))}else{if(Array.isArray(S)&&S!==b[_]&&Array.isArray(o[_].peek())&&qe(S,o[_].peek(),0))return!0;o[_].peek()!==S&&pe(k),b[_]=S,o[_].set(S)}else b[_]=S,S&&typeof S=="object"&&!Gn(S)?o[_]=mt(Ue(S,e,n+1,k)):o[_]=mt(S);return!0},has(b,_){return typeof _=="string"&&_.charCodeAt(0)===36&&ge.has(_.slice(1))?!0:_ in b},ownKeys(b){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(b,_){return i(_)?{enumerable:!0,configurable:!0,value:o[_].peek()}:Object.getOwnPropertyDescriptor(b,_)},deleteProperty(b,_){return o[_]&&(o[_].peek()!==void 0&&pe(Un(r,_)),o[_].set(void 0),delete o[_]),delete b[_],!0}});function f(b,_){he(()=>{for(let k in b)k!=="__proto__"&&(c[k]=b[k])});let S=s.__element;return S&&S.onUpdate&&!_?.quiet&&S.onUpdate(S,c,S.context),c}function d(b){return f(b,{quiet:!0})}function l(b){if(b||(b=new Set),b.has(c))return"[Circular]";b.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[bt]?_[S]=k.$parse(b):_[S]=k}return _}function h(){return he(()=>{for(let b in o)delete c[b]}),c}function p(){return Object.keys(o).filter(i)}function u(){return Object.keys(o).filter(i).map(b=>o[b].peek())}function g(b){return he(()=>{for(let _ in o)_ in b||delete c[_];for(let _ in b)_!=="__proto__"&&(c[_]=b[_])}),c}function y(b,_){let S=Object.prototype.hasOwnProperty.call(o,b)?o[b].peek():s[b];if(Array.isArray(S))return c[b]=[...S,_],c;if(S&&typeof S=="object"&&!Array.isArray(S)){if(He(_))S[bt]?S.$update(_):c[b]={...S,..._};else{let k=String(Object.keys(S).length);S[bt]?S.$update({[k]:_}):c[b]={...S,[k]:_}}return c}return c[b]=_,c}function m(b){return delete c[b],c}function x(){h(),s.__element=null,s.parent=null}return c}function Bc(t){return t&&t[bt]===!0}function Wc(t){return t[Ge]}function zc(t,e){let n={},r={};if(t&&typeof t=="object")for(let i in t)r[i]=t[i],n[i]=mt(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(n,i))return n;let a=e;for(;a;){let c=a[Ge];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[bt]?a[Hn]:null}return null};return new Proxy(r,{get(i,a){return a===bt?!0:a===Ge?n:a===Hn?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]=mt(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[bt]?c[Hn]: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 Hn=Symbol("scope.parent");var Nt="3.14.785";var Qn="__SMBLS_SIGNAL_INSTANCES__",Ke=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[Qn]||(r[Qn]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||Nt),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 Xn="__SMBLS_SIGNAL_ENGINE__",Eo=(t,e,n)=>{let r=e||Nt,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[Xn];return s&&s.engine&&s.version===r?(Ke(r,o,!0),s.engine):(s||(o[Xn]={version:r,engine:t}),Ke(r,o,!1),t)};var Z=Eo({...zn,...Zn,VERSION:Nt},Nt),ye=Z.createSignal,$u=Z.createComputed,$=Z.createEffect,Ye=Z.batch,Uc=Z.getObserver,Pu=Z.setObserver,Vt=Z.createStore,vo=Z.createScopeStore,F=Z.isStore,Mu=Z.getSignals,Iu=Z.STORE_METHOD_NAMES,Du=Z.RESERVED_STORE_METHODS,To=Z.warnStateKeyShadowsMethod,Lu=Z.__resetStateShadowWarnings,ju=Z.VERSION;var Jn="http://www.w3.org/2000/svg",nr=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"]),Gc=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 tr(t){return Gc.has(t)||nr.has(t)}function rr(t){return nr.has(t)}function me(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"&&tr(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]),tr(o)&&!r.has(o)?o:"div"}var Oo={};function er(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(rr(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===Jn)return n.createElementNS(Jn,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function be(t){let e=t.tag=me(t),r=rr(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Jn)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Oo[r];if(s||(s=Oo[r]=er(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?er(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Q=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 _e=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"]),or=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"]),sr=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ir=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 cr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",ar=["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"],Hc=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),qc=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${ar.filter(t=>t!=="auto").map(Hc).join("|")})$`),Ro=t=>qc.test(String(t).trim());var pt=globalThis,_t=pt.document;var Ze=t=>typeof pt<"u"&&(pt.Node&&t instanceof pt.Node||pt.Window&&t instanceof pt.Window||t===pt||_t!==void 0&&t===_t);var R=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Qe=t=>typeof t=="number",Xt=t=>typeof t=="function";var W=t=>Array.isArray(t);var kt=t=>t===null?!1:typeof t=="object",At=t=>t!==void 0,$o=t=>t===void 0;var Po=(t,e=[])=>t.reduce((n,r)=>lr(n,Jt(r,{exclude:e}),e),{});var Kc={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Se=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),Yc=(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 et(t,e,n={}){let{bracketsLength:r=2}=n,o=r===3?"{{{":"{{";if(!t.includes(o)||!Yc(this,t))return t;let s=Kc[r],i=e||this.state||{},a=this;return t.replace(s,(c,f,d,l)=>{let h=d.trim();if(l){let p=a?.context,u=p?.functions?.[l]||p?.utils?.[l]||p?.methods?.[l]||p?.snippets?.[l]||a?.[l];if(u&&typeof u=="function")try{return String(u.call(a,h)??"")}catch{return""}return""}if(f){let p=(f.match(/\.\.\//g)||[]).length,u=i;for(let y=0;y<p;y++){if(!u||!u.parent)return"";u=u.parent}if(h==="parent")return String(u.value??"");let g=Se(u,h);return g!=null&&typeof g=="object"?"":String(g??"")}else{let p=Se(i,h);if(p!=null&&typeof p!="object")return String(p);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=Se(y,h);if(x!=null&&typeof x!="object")return String(x);for(let b in y){let _=y[b];if(_&&typeof _=="object"&&!Array.isArray(_)){let S=Se(_,h);if(S!=null&&typeof S!="object")return String(S)}}}let m=Se(u.translations,h);if(m!=null&&typeof m!="object")return String(m)}return""}})}var Zc=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"]),Qc=new Set(["update","__element"]),Xc=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 Mo=new Set(["log","warn","error","verbose"]);var Io=new Set(["node","context","extends","__element","__ref",...Xc,...Zc,...Qc]);var Lo=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,fr=(t,e,n,r)=>{if(Xt(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&&(W(t)||R(t)&&!Ze(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 fr(i,e,n,r)}}return t};var lr=(t,e,n=Io)=>jo(t,e,n,null),jo=(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)||Lo(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],a=e[s];if(kt(i)&&kt(a)){let c=r||[];c.push(t,e),jo(i,a,n,c),c.length-=2}else i===void 0&&(t[s]=a)}return t};var Jt=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!kt(t)||Ze(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=W(t)?[]:{};s.set(t,f);let d=[[t,f]];for(;d.length;){let[l,h]=d.pop();for(let p in l){if(!Object.prototype.hasOwnProperty.call(l,p)||Lo(p)||p==="__proto__"||c(p))continue;let u=l[p];if(!(r&&u===void 0)&&!(o&&u===null)){if(Ze(u)){h[p]=u;continue}if(i&&p==="extends"&&W(u)){h[p]=Po(u,n);continue}if(Xt(u)){h[p]=u;continue}if(kt(u))if(s.has(u))h[p]=s.get(u);else{let g=W(u)?[]:{};s.set(u,g),h[p]=g,d.push([u,g])}else h[p]=u}}}return f};var ta=(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=h===-1?c:h;continue}if(l==="/"&&t[s+1]==="*"){let h=t.indexOf("*/",s+2);s=h===-1?c:h+2;continue}if(l==='"'||l==="'"||l==="`"){let h=l;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===h){s++;break}if(h==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let p=1;for(;s<c&&p>0;)t[s]==="{"?p++:t[s]==="}"&&p--,s++;continue}s++}continue}if(l==="{"){i++,s++;continue}if(l==="}"){i--,s++;continue}if(i===1&&f.test(t.slice(s))){let h=s,p=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==="{"){p++,u++;continue}if(g===")"||g==="]"||g==="}"){if(p===0)break;p--,u++;continue}if(p===0&&(g===";"||g===`
3
- `)){u++;break}u++}o.push([h,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},ea=(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 h=0;h<5;h++){let p=ta(d,l);if(!p||p===d)break;d=p;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
- First 200 chars of source: `+String(t).slice(0,200)),t)}};var No=new WeakMap;var Do=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,na=t=>{let e=ea(t.src,Do(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: ${Do(t)} did not evaluate to a function \u2014 the lazily revived function returns that value.
5
- First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n};var od=Object.getPrototypeOf(async function(){});var xe=t=>{let e=No.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},ur=t=>{let e=typeof t=="function"?No.get(t):void 0;return e?(e.fn===void 0?na(e):e.fn)===null:!1};var Vo="production";var ra=(t=Vo)=>t==="production";var dr=(t=Vo)=>!ra(t),X=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 ot=(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 Fo="__polyglotSeededKeys",Wo=t=>{if(!R(t))return new Set;let e=t[Fo];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,Fo,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},zo=(t,e,n)=>Wo(t).has(e)?!0:!R(n)||n[e]===void 0,Bo="__polyglotSeededValues",oa=t=>{if(!R(t))return new Map;let e=t[Bo];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,Bo,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},sa=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}};var Uo=(t,e,...n)=>(Wo(t).add(e),n.length&&oa(t).set(e,sa(n[0])),e);var Go={};var te="production";function qo(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 Ko(){return this.getRef().path}var pr=null;var gr=(t,e)=>{t&&e&&pr===t&&(pr=e)},Ho=()=>pr||null;function Yo(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=Ho();else if(n(this))e=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=Xt(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=Ho()),t?e?.[t]:e}function Zo(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 Xo(t){let e=this.getRoot()?.context;return t?e[t]:e}function Jo(t){let e=this.context;return t?e[t]:e}function yr(...t){if(te!=="test"&&te!=="development")return;let e=this,{__ref:n}=e;return console.groupCollapsed(e.key),t.length?t.forEach(r=>console.log(`%c${r}:
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 ts(...t){(te==="test"||te==="development")&&console.warn(...t)}function es(...t){if(te==="test"||te==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&yr.call(this),new Error(...t)}}function ns(){let t=this,{key:e,parent:n}=t,{__children:r}=n.__ref,o=r.indexOf(e),s=r[o+1];return n[s]}function rs(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 os(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,Jt(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 ia="[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.",Xe=()=>import("@symbo.ls/fetch").catch(t=>{throw new Error(ia,{cause:t})});async function ss(){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 Xe();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Xe();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let n=Xe().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 Xe();await o(r,t.context)}return r}function is(t){let e=this,n=t||Go.useStateQuery||e.context?.useStateQuery;if(!n)return null;let r={};if(hr(e,r),n===!0)return r;let o=pa[n];return o?o(r):r}var hr=(t,e)=>{let n=t.__ref;if(!n)return;let r=n.__state;r&&typeof r=="string"&&ca(e,r);let o=n.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&hr(c,e)}let s=n.contentElementKey||"content",i=t[s];i&&i.__ref&&hr(i,e)},ca=(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])}},cs=(t,e=0)=>{let n=" ".repeat(e),r=Object.entries(t);return r.length?r.map(([s,i])=>i===!0?`${n}${s}`:`${n}${s} {
7
- ${cs(i,e+1)}
1
+ "use strict";var SymbolsEmbed=(()=>{var Cc=Object.create;var Be=Object.defineProperty;var Ec=Object.getOwnPropertyDescriptor;var vc=Object.getOwnPropertyNames;var Oc=Object.getPrototypeOf,Tc=Object.prototype.hasOwnProperty;var Rc=(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 We=(t,e)=>{for(var n in e)Be(t,n,{get:e[n],enumerable:!0})},ko=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of vc(e))!Tc.call(t,o)&&o!==n&&Be(t,o,{get:()=>e[o],enumerable:!(r=Ec(e,o))||r.enumerable});return t};var $c=(t,e,n)=>(n=t!=null?Cc(Oc(t)):{},ko(e||!t||!t.__esModule?Be(n,"default",{value:t,enumerable:!0}):n,t)),Pc=t=>ko(Be({},"__esModule",{value:!0}),t);var wu={};We(wu,{FACTORY:()=>on,REGISTRY:()=>Q,applyExtends:()=>Re,batch:()=>Qe,create:()=>rt,createEffect:()=>$,createElement:()=>Su,createSignal:()=>me,createStore:()=>Vt,getActiveConfig:()=>C,mount:()=>xu,popConfig:()=>N,pushConfig:()=>B,registerEvent:()=>Te});var Hn={};We(Hn,{WRITE_JOURNAL:()=>pe,batch:()=>ge,createComputed:()=>Ic,createEffect:()=>Dc,createSignal:()=>mt,getObserver:()=>Un,journalWrite:()=>he,setObserver:()=>Mc});var et=null,ze=0,Ue=[],Un=()=>et,Mc=t=>{et=t},Ge=0,Fn=[];function mt(t){let e=new Set;function n(){return et&&(e.add(et),et._sources.add(s)),t}function r(i){i!==t&&(t=i,Bc(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function Ic(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){zn(o);let s=et;et=o;try{e=t(),n=!1}finally{et=s}},_notify(){n=!0,r.size>0&&vo(r)},get(){return et&&(r.add(et),et._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}var dt=new Set,Bn=!1,pe=[];function he(t){pe.push(t),pe.length>32&&pe.shift()}function Dc(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;zn(r);let o=et;et=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{et=o}},_notify(){r._disposed||(ze>0?Ue.push(r):Ge>0?Fn.push(r):Gn(r))},dispose(){r._disposed=!0,zn(r)}};return r._execute(),r}function ge(t){ze++;try{t()}finally{ze--,ze===0&&Fc()}}var Wn=!1,Ao=1e3,Lc=8,jc=256,Nc=4;function Co(){return typeof performance<"u"?performance.now():Date.now()}function Gn(t){dt.add(t),!Wn&&(Bn||(Bn=!0,queueMicrotask(Eo)))}var Qt=[];function Vc(){if(dt.size===1){let[e]=dt;return dt.clear(),e._disposed?0:(e._execute(),1)}Qt.length=0;for(let e of dt)Qt.push(e);dt.clear(),Qt.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<Qt.length;e++){let n=Qt[e];n._disposed||(n._execute(),t++)}return Qt.length=0,t}function Eo(t=0,e=0){if(Bn=!1,dt.size===0)return;Wn=!0;let n=Co(),r=!1;try{for(;dt.size>0;){if(++t>Ao){let o=new Map;for(let a of dt){let f=a._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(([a,f])=>f>1?`${a} \xD7${f}`:a).join(", "),i=new Map;for(let a of pe)i.set(a,(i.get(a)||0)+1);let c=[...i.entries()].map(([a,f])=>f>1?`${a} \xD7${f}`:a).join(", ");console.error("[smbls] reactive effect cascade exceeded",Ao,"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:",c||"<none recorded>"),dt.clear();break}if(e+=Vc(),dt.size>0&&(e>=jc||t>=Nc)&&Co()-n>Lc){r=!0,setTimeout(()=>Eo(t,e),0);break}}}finally{r||(Wn=!1)}}function Fc(){for(let t=0;t<Ue.length;t++)Gn(Ue[t]);Ue.length=0}function vo(t){Ge++;try{for(let e of t)e._notify()}finally{if(Ge--,Ge===0&&Fn.length>0){let e=Fn.splice(0);for(let n=0;n<e.length;n++)Gn(e[n])}}}function Bc(t){vo(t)}function zn(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Jn={};We(Jn,{RESERVED_STORE_METHODS:()=>ye,STORE_METHOD_NAMES:()=>Xn,__resetStateShadowWarnings:()=>Wc,createScopeStore:()=>Hc,createStore:()=>He,getSignals:()=>Gc,isStore:()=>Uc,warnStateKeyShadowsMethod:()=>Qn});var bt=Symbol("store"),qe=Symbol("signals"),Xn=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ye=new Set(Xn),Zn=new Set,qn=(t,e)=>t?t+"."+e:String(e);function Qn(t,e){let n=(e||"")+"::"+t;if(Zn.has(n))return;Zn.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: ${Xn.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function Wc(){Zn.clear()}var Kn=t=>!t||typeof t!="object"||Array.isArray(t)||t[bt]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!Ke(t),zc=12,Ke=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function Ye(t,e,n){if(t===e)return!0;if(n>zc)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(!Ye(t[r],e[r],n+1))return!1;return!0}if(Ke(t)&&Ke(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)||!Ye(t[s],e[s],n+1))return!1;return!0}return!1}function He(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),c=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}ye.has(m)&&Qn(m,r);let b=t[m];n<c&&b&&typeof b=="object"&&!Kn(b)?(s[m]=b,o[m]=mt(He(b,e,n+1,qn(r,m)))):(s[m]=b,o[m]=mt(b))}let a=new Proxy(s,{get(m,b){if(b===bt)return!0;if(b===qe)return o;if(b==="__raw")return m;if(b==="$update")return f;if(b==="$parse")return l;if(b==="$clean")return p;if(b==="$keys")return h;if(b==="$values")return u;if(b==="$replace")return g;if(b==="$add")return _;if(b==="$remove")return y;if(b==="$destroy")return x;if(b==="$quietUpdate")return d;if(ye.has(b)&&!Object.prototype.hasOwnProperty.call(o,b))switch(b){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 _;case"remove":return y;case"destroy":return x;case"quietUpdate":return d}if(b==="__element")return m.__element;if(b==="parent")return m.parent;if(b==="root")return m.root;if(Object.prototype.hasOwnProperty.call(o,b)){let w=o[b].get();if(w!==void 0||!(b!=="root"&&m.root&&m.root!==a))return w}if(m[b]!==void 0)return m[b];let S=typeof b=="string"&&!b.startsWith("__")&&b!=="then"&&b!=="constructor"&&Un()!=null;if(b!=="root"&&m.root&&m.root!==a){let w=m.root[b];return S&&!Object.prototype.hasOwnProperty.call(o,b)&&(o[b]=mt(void 0),o[b].get()),w}if(S)return o[b]=mt(void 0),o[b].get()},set(m,b,S){if(b==="__proto__")return!1;if(b==="__element"||b==="parent"||b==="root"||typeof b=="string"&&b.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,b))return m[b]=S,!0;ye.has(b)&&Qn(b,r);let w=qn(r,b);if(Object.prototype.hasOwnProperty.call(o,b))if(S&&typeof S=="object"&&!Kn(S)){if(S===m[b])return!0;let E=o[b].peek(),M=E&&E[bt]?E.$parse():E;if(Ye(S,M,0))return!0;m[b]=S,he(w),o[b].set(He(S,e,n+1,w))}else{if(Array.isArray(S)&&S!==m[b]&&Array.isArray(o[b].peek())&&Ye(S,o[b].peek(),0))return!0;o[b].peek()!==S&&he(w),m[b]=S,o[b].set(S)}else m[b]=S,S&&typeof S=="object"&&!Kn(S)?o[b]=mt(He(S,e,n+1,w)):o[b]=mt(S);return!0},has(m,b){return typeof b=="string"&&b.charCodeAt(0)===36&&ye.has(b.slice(1))?!0:b in m},ownKeys(m){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(m,b){return i(b)?{enumerable:!0,configurable:!0,value:o[b].peek()}:Object.getOwnPropertyDescriptor(m,b)},deleteProperty(m,b){return o[b]&&(o[b].peek()!==void 0&&he(qn(r,b)),o[b].set(void 0),delete o[b]),delete m[b],!0}});function f(m,b){ge(()=>{for(let w in m)w!=="__proto__"&&(a[w]=m[w])});let S=s.__element;return S&&S.onUpdate&&!b?.quiet&&S.onUpdate(S,a,S.context),a}function d(m){return f(m,{quiet:!0})}function l(m){if(m||(m=new Set),m.has(a))return"[Circular]";m.add(a);let b={};for(let S in o){if(S==="parent"||S==="root"||S.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,S))continue;let w=o[S].peek();w&&w[bt]?b[S]=w.$parse(m):b[S]=w}return b}function p(){return ge(()=>{for(let m in o)delete a[m]}),a}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 ge(()=>{for(let b in o)b in m||delete a[b];for(let b in m)b!=="__proto__"&&(a[b]=m[b])}),a}function _(m,b){let S=Object.prototype.hasOwnProperty.call(o,m)?o[m].peek():s[m];if(Array.isArray(S))return a[m]=[...S,b],a;if(S&&typeof S=="object"&&!Array.isArray(S)){if(Ke(b))S[bt]?S.$update(b):a[m]={...S,...b};else{let w=String(Object.keys(S).length);S[bt]?S.$update({[w]:b}):a[m]={...S,[w]:b}}return a}return a[m]=b,a}function y(m){return delete a[m],a}function x(){p(),s.__element=null,s.parent=null}return a}function Uc(t){return t&&t[bt]===!0}function Gc(t){return t[qe]}function Hc(t,e){let n={},r={};if(t&&typeof t=="object")for(let i in t)r[i]=t[i],n[i]=mt(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(n,i))return n;let c=e;for(;c;){let a=c[qe];if(a&&Object.prototype.hasOwnProperty.call(a,i))return a;c=c[bt]?c[Yn]:null}return null};return new Proxy(r,{get(i,c){return c===bt?!0:c===qe?n:c===Yn?e:c==="__raw"?i:Object.prototype.hasOwnProperty.call(n,c)?n[c].get():e&&c!=="then"&&c!=="constructor"?e[c]:i[c]},set(i,c,a){let f=o(c);return f?(f===n&&(i[c]=a),f[c].set(a),!0):(i[c]=a,n[c]=mt(a),!0)},has(i,c){if(c in n||c in i)return!0;let a=e;for(;a;){if(c in a)return!0;a=a[bt]?a[Yn]:null}return!1},ownKeys(){return Object.keys(n)},getOwnPropertyDescriptor(i,c){return c in n?{enumerable:!0,configurable:!0,value:n[c].peek()}:Object.getOwnPropertyDescriptor(i,c)}})}var Yn=Symbol("scope.parent");var Nt="3.14.785";var tr="__SMBLS_SIGNAL_INSTANCES__",Ze=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[tr]||(r[tr]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||Nt),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 er="__SMBLS_SIGNAL_ENGINE__",Oo=(t,e,n)=>{let r=e||Nt,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[er];return s&&s.engine&&s.version===r?(Ze(r,o,!0),s.engine):(s||(o[er]={version:r,engine:t}),Ze(r,o,!1),t)};var Z=Oo({...Hn,...Jn,VERSION:Nt},Nt),me=Z.createSignal,Du=Z.createComputed,$=Z.createEffect,Qe=Z.batch,be=Z.getObserver,Xt=Z.setObserver,Vt=Z.createStore,To=Z.createScopeStore,F=Z.isStore,Lu=Z.getSignals,ju=Z.STORE_METHOD_NAMES,Nu=Z.RESERVED_STORE_METHODS,Ro=Z.warnStateKeyShadowsMethod,Vu=Z.__resetStateShadowWarnings,Fu=Z.VERSION;var nr="http://www.w3.org/2000/svg",sr=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"]),qc=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 rr(t){return qc.has(t)||sr.has(t)}function ir(t){return sr.has(t)}function _e(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"&&rr(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]),rr(o)&&!r.has(o)?o:"div"}var $o={};function or(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(ir(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===nr)return n.createElementNS(nr,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function Se(t){let e=t.tag=_e(t),r=ir(e)&&(e==="svg"||t.parent?.node?.namespaceURI===nr)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=$o[r];if(s||(s=$o[r]=or(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?or(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Q=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","srcObject","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]);var xe=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"]),cr=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"]),ar=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),lr=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 fr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",ur=["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"],Kc=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Yc=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${ur.filter(t=>t!=="auto").map(Kc).join("|")})$`),Po=t=>Yc.test(String(t).trim());var pt=globalThis,_t=pt.document;var Xe=t=>typeof pt<"u"&&(pt.Node&&t instanceof pt.Node||pt.Window&&t instanceof pt.Window||t===pt||_t!==void 0&&t===_t);var R=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,k=t=>typeof t=="string",Je=t=>typeof t=="number",Jt=t=>typeof t=="function";var W=t=>Array.isArray(t);var kt=t=>t===null?!1:typeof t=="object",At=t=>t!==void 0,Mo=t=>t===void 0;var Io=(t,e=[])=>t.reduce((n,r)=>dr(n,te(r,{exclude:e}),e),{});var Zc={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},we=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),Qc=(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 nt(t,e,n={}){let{bracketsLength:r=2,authored:o=!1}=n,s=r===3?"{{{":"{{";if(!t.includes(s)||o!==!0&&!Qc(this,t))return t;let i=Zc[r],c=e||this.state||{},a=this;return t.replace(i,(f,d,l,p)=>{let h=l.trim();if(p){let u=a?.context,g=u?.functions?.[p]||u?.utils?.[p]||u?.methods?.[p]||u?.snippets?.[p]||a?.[p];if(g&&typeof g=="function")try{return String(g.call(a,h)??"")}catch{return""}return""}if(d){let u=(d.match(/\.\.\//g)||[]).length,g=c;for(let y=0;y<u;y++){if(!g||!g.parent)return"";g=g.parent}if(h==="parent")return String(g.value??"");let _=we(g,h);return _!=null&&typeof _=="object"?"":String(_??"")}else{let u=we(c,h);if(u!=null&&typeof u!="object")return String(u);let g=a?.context?.polyglot;if(g?.translations){let _=c?.root?.lang||c?.lang||a?.context?.state?.lang||g.defaultLang||"en",y=g.translations[_];if(y){let m=we(y,h);if(m!=null&&typeof m!="object")return String(m);for(let b in y){let S=y[b];if(S&&typeof S=="object"&&!Array.isArray(S)){let w=we(S,h);if(w!=null&&typeof w!="object")return String(w)}}}let x=we(g.translations,h);if(x!=null&&typeof x!="object")return String(x)}return""}})}var Xc=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"]),Jc=new Set(["update","__element"]),ta=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 Do=new Set(["log","warn","error","verbose"]);var Lo=new Set(["node","context","extends","__element","__ref",...ta,...Xc,...Jc]);var No=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,pr=(t,e,n,r)=>{if(Jt(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&&(W(t)||R(t)&&!Xe(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 pr(i,e,n,r)}}return t};var dr=(t,e,n=Lo)=>Vo(t,e,n,null),Vo=(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)||No(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],c=e[s];if(kt(i)&&kt(c)){let a=r||[];a.push(t,e),Vo(i,c,n,a),a.length-=2}else i===void 0&&(t[s]=c)}return t};var te=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!kt(t)||Xe(t))return t;if(s.has(t))return s.get(t);let c=n instanceof Set?n:n.length>3?new Set(n):null,a=l=>c?c.has(l):n.includes(l),f=W(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)||No(h)||h==="__proto__"||a(h))continue;let u=l[h];if(!(r&&u===void 0)&&!(o&&u===null)){if(Xe(u)){p[h]=u;continue}if(i&&h==="extends"&&W(u)){p[h]=Io(u,n);continue}if(Jt(u)){p[h]=u;continue}if(kt(u))if(s.has(u))p[h]=s.get(u);else{let g=W(u)?[]:{};s.set(u,g),p[h]=g,d.push([u,g])}else p[h]=u}}}return f};var na=(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,c=null,a=t.length,f=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<a&&i>0;){let l=t[s];if(l==="/"&&t[s+1]==="/"){let p=t.indexOf(`
2
+ `,s);s=p===-1?a:p;continue}if(l==="/"&&t[s+1]==="*"){let p=t.indexOf("*/",s+2);s=p===-1?a:p+2;continue}if(l==='"'||l==="'"||l==="`"){let p=l;for(s++;s<a;){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<a&&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<a;){let g=t[u];if(g==='"'||g==="'"||g==="`"){let _=g;for(u++;u<a;){if(t[u]==="\\"){u+=2;continue}if(t[u]===_){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},ra=(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),c=/await is only valid in async/.test(i),a=/Identifier '([^']+)' has already been declared/.exec(i),f=null;if(c){let d=String(t).trim();if(/^function[\s(]/.test(d))try{f=n.window.eval("(async "+d+")")}catch{}}else if(a){let d=String(t),l=a[1];for(let p=0;p<5;p++){let h=na(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
+ First 200 chars of source: `+String(t).slice(0,200)),t)}};var Fo=new WeakMap;var jo=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,oa=t=>{let e=ra(t.src,jo(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: ${jo(t)} did not evaluate to a function \u2014 the lazily revived function returns that value.
5
+ First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n};var cd=Object.getPrototypeOf(async function(){});var ke=t=>{let e=Fo.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},hr=t=>{let e=typeof t=="function"?Fo.get(t):void 0;return e?(e.fn===void 0?oa(e):e.fn)===null:!1};var Bo="production";var sa=(t=Bo)=>t==="production";var gr=(t=Bo)=>!sa(t),X=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 it=(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 Wo="__polyglotSeededKeys",Uo=t=>{if(!R(t))return new Set;let e=t[Wo];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,Wo,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Go=(t,e,n)=>Uo(t).has(e)?!0:!R(n)||n[e]===void 0,zo="__polyglotSeededValues",ia=t=>{if(!R(t))return new Map;let e=t[zo];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,zo,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},ca=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}};var Ho=(t,e,...n)=>(Uo(t).add(e),n.length&&ia(t).set(e,ca(n[0])),e);var qo={};var ee="production";function Yo(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 yr=null;var br=(t,e)=>{t&&e&&yr===t&&(yr=e)},Ko=()=>yr||null;function Qo(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=Ko();else if(n(this))e=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=Jt(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=Ko()),t?e?.[t]:e}function Xo(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 Jo(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function ts(t){let e=this.getRoot()?.context;return t?e[t]:e}function es(t){let e=this.context;return t?e[t]:e}function _r(...t){if(ee!=="test"&&ee!=="development")return;let e=this,{__ref:n}=e;return console.groupCollapsed(e.key),t.length?t.forEach(r=>console.log(`%c${r}:
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 ns(...t){(ee==="test"||ee==="development")&&console.warn(...t)}function rs(...t){if(ee==="test"||ee==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&_r.call(this),new Error(...t)}}function os(){let t=this,{key:e,parent:n}=t,{__children:r}=n.__ref,o=r.indexOf(e),s=r[o+1];return n[s]}function ss(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 is(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,te(n));for(let c in r)n[c]=r[c];return i},timeout:(s,i)=>{if(!o)return;let c=setTimeout(()=>{s(r),clearTimeout(c)},i)}}}var aa="[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.",tn=()=>import("@symbo.ls/fetch").catch(t=>{throw new Error(aa,{cause:t})});async function cs(){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 tn();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await tn();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let n=tn().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 tn();await o(r,t.context)}return r}function as(t){let e=this,n=t||qo.useStateQuery||e.context?.useStateQuery;if(!n)return null;let r={};if(mr(e,r),n===!0)return r;let o=ga[n];return o?o(r):r}var mr=(t,e)=>{let n=t.__ref;if(!n)return;let r=n.__state;r&&typeof r=="string"&&la(e,r);let o=n.__children;if(o)for(let c=0;c<o.length;c++){let a=t[o[c]];a&&a.__ref&&mr(a,e)}let s=n.contentElementKey||"content",i=t[s];i&&i.__ref&&mr(i,e)},la=(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])}},ls=(t,e=0)=>{let n=" ".repeat(e),r=Object.entries(t);return r.length?r.map(([s,i])=>i===!0?`${n}${s}`:`${n}${s} {
7
+ ${ls(i,e+1)}
8
8
  ${n}}`).join(`
9
- `):""},aa=t=>`{
10
- ${cs(t,1)}
11
- }`,la=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},fa=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("&")},ua=(t,e)=>{let n=[],r=[],o=new Set,s=(d,l,h)=>{o.add(l),h&&r.push(`LEFT JOIN ${l} ON ${l}.${h}_id = ${h}.id`);for(let p in d)d[p]===!0?n.push(`${l}.${p}`):s(d[p],p,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?`
9
+ `):""},fa=t=>`{
10
+ ${ls(t,1)}
11
+ }`,ua=t=>{let e={fields:{},include:[]},n=(r,o)=>{let s=[];for(let i in r)if(r[i]===!0)s.push(i);else{let c=o?`${o}.${i}`:i;e.include.push(c),n(r[i],c)}s.length&&(e.fields[o||"_root"]=s)};return n(t,""),e},da=t=>{let e=s=>{let i=[],c=[];for(let a in s)if(s[a]===!0)i.push(a);else{let f=e(s[a]),d=[];f.select&&d.push(`$select=${f.select}`),f.expand&&d.push(`$expand=${f.expand}`),c.push(d.length?`${a}(${d.join(";")})`:a)}return{select:i.length?i.join(","):"",expand:c.length?c.join(","):""}},{select:n,expand:r}=e(t),o=[];return n&&o.push(`$select=${n}`),r&&o.push(`$expand=${r}`),o.join("&")},pa=(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 c=[...o][0]||"_root",a=n.length?n.join(", "):"*",f=r.length?`
12
12
  `+r.join(`
13
- `):"";return`SELECT ${c}
14
- FROM ${a}${f}`},da=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},pa={graphql:aa,"json-api":la,odata:fa,sql:ua,paths:da};var as=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 ls=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");var fs=t=>{if(W(t))return t;if(w(t))return t.split(" ");if(R(t))return Object.values(t);if(Qe(t))return[t]};var ha={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"},us=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=ha[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&&_t&&pt){let n=_t.body.appendChild(_t.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){_t.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return _t.body.removeChild(n),[0,0,0,0];t=pt.getComputedStyle(n).color,_t.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 ga=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]};var ya=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1);var ma=(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]},ba=(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)],_a=(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 G=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,mr=new Set(["currentcolor","transparent","thin","medium","thick"]),Pt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,Sa=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Ct=t=>{if(!w(t))return null;if(Pt.test(t))return{passthrough:t};if(G(t))return{cssVar:t};let e=t.match(Sa);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}},Ft=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),we=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},L=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 ds=(t,e)=>{w(t)&&t.includes("rgb")&&(t=us(t).join(", ")),w(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Qe(e)&&(e+="");let n=ya(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=_a(n,parseFloat(e));return ga(o).join(", ")}else{let[o,s,i]=t,[a,c]=ma(o/255,s/255,i/255),f=Math.max(0,Math.min(100,parseFloat(e)))/100;return ba(a,c,f).map(l=>Math.round(Math.max(0,Math.min(1,l))*255)).join(", ")}};var br=(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 Je={};Fe(Je,{animation:()=>Ba,breakpoints:()=>Va,class:()=>qa,color:()=>Ra,devices:()=>Fa,document:()=>Na,font:()=>ka,fontFace:()=>Ea,fontFamily:()=>Aa,fontFamilyTypes:()=>Ca,gradient:()=>$a,grid:()=>Ha,icons:()=>Ia,media:()=>va,reset:()=>Ka,semanticIcons:()=>Da,sequence:()=>Bt,shadow:()=>Ma,shape:()=>Qa,sizes:()=>Za,skins:()=>Xa,spacing:()=>Oa,svg:()=>Wa,svgData:()=>za,templates:()=>Ua,theme:()=>Pa,timing:()=>ja,typography:()=>_r,unit:()=>xa,vars:()=>Ya});var Bt={"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 xa={default:"em"};var wa={browserDefault:16,base:16,type:"font-size",ratio:Bt["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},_r=wa;var ka={};var Aa={},Ca={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Ea={};var va={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Ta={base:_r.base,type:"spacing",ratio:Bt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Oa=Ta;var Ra={},$a={};var Pa={};var Ma={};var Ia={},Da={};var La={default:150,base:150,type:"timing",ratio:Bt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},ja=La;var Na={};var Va={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Fa={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 Ba={};var Wa={},za={};var Ua={};var Ga={},Ha=Ga;var qa={};var Ka={},Ya={},Za={},Qa={},Xa={};var ps={},hs={};var tn=Je,en={},gs=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in tn){let e=t.toLowerCase();en[e]=tn[t];let n=gs(e);n!==e&&(en[n]=tn[t]),e!==t&&(en[t]=tn[t])}var Ae={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:ps,cssMediaVars:hs,CSS_VARS:ps,CSS_MEDIA_VARS:hs,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...en},Ja=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return At(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=At(e)?e:t.globalTheme,r=ye(At(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 tl=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return At(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=At(e)?e:t.resolvedTheme,r=ye(At(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};Ja(Ae);tl(Ae);var up=Jt(Ae),nn={active:"0",0:Ae};var ke=[],B=t=>{t&&t._scratchConfig&&ke.push(t)},N=()=>{ke.pop()},C=t=>ke.length?ke[ke.length-1]:nn[t||nn.active]||Ae;var rn={"-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"},ys=(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=ms.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},ee=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)]},Sr="\0",el=(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+=Sr+e.length+Sr,e.push(o),o=""))}return n+o},nl=(t,e)=>t.indexOf(Sr)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),rl=/^(calc|min|max|clamp)\((.*)\)$/,ol=(t,e)=>{let n=rl.exec(t);return n?`${n[1]}(${_s(n[2],e)})`:t.indexOf("(")!==-1?t:on(t,e)},ms=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),sl=(t,e)=>{let{base:n,type:r,unit:o}=e,s=ms.has(o)?"rem":o,i=(cr(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=rn[t-1];return`calc(var(${c}-${d}) * var(${f}))`}if(t<0){let d=rn[t+1],l=Math.abs(t),h=Math.pow(bs,2*l),p=rn[l];return p?`max(calc(var(${c}-${d}) / var(${f})), calc(var(${c}-${p}) / ${h.toFixed(4)}))`:`calc(var(${c}-${d}) / var(${f}))`}},il=(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}))`},cl=(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 al=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,f=~~(o*s)-~~o,d,[l,h,p]=cl(o,s);f>16?d=[l,h,p]:d=[l,p],d.forEach((u,g)=>{let y=~~(u/r*1e3)/1e3,m=i+(g+1),x=a+(g+1)/10,b=il(g+1,d,i,e),_={key:n+(g+1),variable:m,value:u,scaling:y,scalingVariable:b,index:x};ys(_,e)})},bs=1.618,ll=(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(bs,2*r);return Math.max(o,s)},Ce=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=rn[d],h=ll(d,n,r),p=~~(h/n*100)/100,u=c+l,g=sl(d,t),y={key:l,variable:u,value:h,base:n,scaling:p,scalingVariable:g,ratio:r,index:d};ys(y,t),s&&al(y,t)}return t};var on=(t="A",e)=>{let n=C(),{unit:r}=n;if(w(t)&&G(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let b=n.sizes;if(b){let _=b[t]||b[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(Ro(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+"-":""}${ls(e.type.replace(".","-"))}-`,p=t.toUpperCase(),u=p.slice(0,1)==="-"?"-":"",g=u?p.slice(1):p,y="";g.includes("_")&&(y="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let m=b=>a.test(b)?`var(${h}${b}${y})`:b;if(g.includes("+")){let[b,_]=g.split("+"),S=`${m(b)} + ${m(_)}`;return u?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("*")){let[b,_]=g.split("*"),S=`${m(b)} * ${m(_)}`;return u?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("-")){let[b,_]=g.split("-"),S=`${m(b)} - ${m(_)}`;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 b=`var(${h}${g}${y})`;return u?`calc(${b} * -1)`:b}let x=o?o[g]:null;if(!x){if(console.warn("can't find",o,g),X())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},_s=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return el(t,o).split(r).map(i=>{let a=nl(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:ol(c,e)}).join("")},Wt=(t,e,n,r)=>{if(typeof t!="string")return C().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=ee(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=_s(t,n):t=on(t,n),{[e]:r?`${r}(${t})`:t}};var Tp=dr();var fl="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",Op=new RegExp(`<(${fl})\\b([^>]*?)\\s*/>`,"g");var dl={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},cn=(t,e)=>{let n=e.media&&e.media[t]||dl[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},an=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},xr=new Set,ws=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"]),pl=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,hl=/gradient\(|url\(|image-set\(|var\(/i,gl=new Set(["transparent","currentColor","currentcolor"]),wr=t=>{if(!w(t))return!1;let e=t.trim();return hl.test(e)?!1:pl.test(e)?!0:ws.has(e)||gl.has(e)},sn=new Set,Ss=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(R(e)&&Object.keys(e).length||R(n)&&Object.keys(n).length)},xs=new Set,kr=0,Cr=t=>{kr++;try{return t()}finally{kr--}},yl=(t,e)=>{if(!w(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=Ct(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},Ar=(t,e,n)=>{let r=yl(t,n);if(r){if(!xs.has(t)){xs.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=Ct(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&Ss(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!kr&&!sn.has(t)){sn.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(!ws.has(s)||!Ss(n))return t;if(!sn.has(s)){sn.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.`)}},ks=(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})`},K=(t,e,n)=>{let r=n||C();if(!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(G(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(W(t))[o,s,i]=t;else{let l=Ct(t);if(!l){let{color:h,gradient:p}=r,u=p[t]||h[t];return u?(e&&u[e]&&(u=u[e]),r.useVariable?`var(${u.var})`:u.value):Ar(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 Ar(t,o,r);if(e)if(f[e]!==void 0)f=f[e];else if(W(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(xr.has(o))return f;xr.add(o);try{return K(f,null,n)}finally{xr.delete(o)}}let d=f.rgb;if(!d){let l=r.useVariable?`var(${f.var})`:f.value;return(s||i)&&l?ks(l,s,i):l}return i&&!f[i]&&(d=ds(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 ml=t=>R(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),bl=t=>{if(!R(t)||t.value!==void 0)return null;let e=[];for(let n in t)if(n!=="var"){if(n.charCodeAt(0)!==64||!ml(t[n]))return null;e.push(n.slice(1))}return e.length?e:null};var _l=(t,e,n,r,o)=>{let s=bl(e);if(!s)return;if(w(e.var)){let c=`var(${e.var})`;return n||r?ks(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=K(t,"@light",o),a=K(t,"@dark",o);if(!(!wr(i)||!wr(a)))return i===a?i:`light-dark(${i}, ${a})`},st=(t,e,n)=>{let r=n||C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(G(t))return`var(${t})`;let o,s,i;if(W(t))o=t[0];else{let l=Ct(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=R(f);if(d&&f.value)return K(t,`@${e}`,n);if(d){if(r.useVariable&&f.var)return s||i?K(t,null,n):`var(${f.var})`;if(e){if(!r.useVariable&&a[o]===f){let l=_l(t,f,s,i,n);if(l!==void 0)return l}return K(t,`@${e}`,n)}else{let l={},h=an(r);for(let p in f){if(p.charCodeAt(0)!==64)continue;let u=p.slice(1),g=K(t,p,n);if(g!==void 0&&(l[`[data-theme="${u}"] &`]=g,u==="light"||u==="dark")){let y=cn(u,r);if(!y)continue;l[y]={[h]:g}}}return l}}else return Ar(t,o,r)};var xl=t=>{let n=C().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return Ce(o),o};var Cs=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r};var wl=t=>{let e=C(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:Ce(t)},H=(t,e="padding",n,r)=>{let o=wl(n);if(w(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=ee(t);r=i[0],t=i[1]}}let s=r?[t]:w(t)&&t.includes("(")?L(t):fs(t);if(W(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)=>Wt(s[d],e+f+i,o,r);return a[s.length].map((f,d)=>c(f,d))}return Wt(t,e,o,r)}},zt=(t,e,n,r)=>{let o=C(),{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=ee(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=xl(t);return H(i,e,a,r)}return H(i,e,s,r)},Es=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=ar.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 vs=(t,e)=>{let n=C();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!w(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(G(t))return`var(${t})`;let[r]=W(t)?t:t.split(" "),s=n.shadow[r],i=R(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=an(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 p=cn(d,n);if(!p)continue;a[p]={[c]:h}}}return a}return n.verbose&&console.warn("Can't find color",t),t};var kl=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),Al=t=>kl.has(t),Er=(t,e,n)=>{if(t==null)return;let r=t+"";if(Pt.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(G(s))return`var(${s})`;if(Al(s)||/^\d/.test(s)||s==="0")return s;let i=Cr(()=>K(s,e));if(Ft(i))return i;if(mr.has(s.toLowerCase()))return s;n&&n(s);let a=H(s,"border");return a&&a.border?a.border:s}).join(" ")};var Cl=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),Os=(t,e)=>{for(let n in e){let r=e[n];R(r)?Os(t[n]||(t[n]={}),r):t[n]=r}return t};var vr=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(kt(t[r]))if(e&&Cl(r))n[r]=Os({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=vr(t[r],e):o==="."&&(n[`&${r}`]=vr(t[r],e))}else n[r]=t[r]}return n},Rs=(t,e)=>{let n=e.shift();return t[n]?Rs(t[n],e):t},Ts=(t,e)=>W(e)?Rs(t,e):w(e)&&t[e]?t[e]:t;var Ee=(t,e)=>{let n=C();if(w(t)&&G(t)&&(t=Ee(t.slice(2))),!t||!w(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=W(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=Ts(s,o):s&&e&&(s=Ts(s,e)),vr(s,!n.useVariable)};var $s=(t,e)=>{let n=C(),{fontFamily:r}=n;return br(e||r,t)};var Ps=t=>{let e=C(),{typography:n}=e;return Wt(t,"fontSize",n)};var Ms=t=>{if(!w(t))return;let n=C().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};var Et=t=>{let e=C(),{timing:n}=e;return n[t]||n[as(t)]||t},St=(t,e="timing")=>{let n=C(),{timing:r}=n;return Wt(t,e,r)};var Rl=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),Is=/^-?[A-Z][0-9]?$/,Mt=t=>Er(t),Ds=t=>{if(w(t))return Pt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(G(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=K(e);return Ft(n)?n:e}).join(" ")},Ls=(t,e)=>vs(t,e),Tr=(t,e)=>{if(w(t))return Pt.test(t)?t:we(t).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(G(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=K(r);if(Ft(o)){let i=st(r,e);return R(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=H(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", ")},Or=(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=we(o).map(c=>(c=c.trim(),c.split(/\s+/).map(d=>{if(!d||/^\d/.test(d)||d==="0"||Rl.has(d)||d==="transparent"||Pt.test(d))return d;let l=K(d);return Ft(l)?l:d}).join(" ")));return r+a.join(", ")+s},js=(t,e)=>{if(!w(t))return;let n=C();return we(t).map(r=>{let o=r.trim();if(G(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=st(o,e);if(w(s))return s;if(R(s)){for(let i in s)if(w(s[i]))return s[i]}return o}return o.includes("gradient")?Or(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Ct(o)?`url(${o})`:o}).join(", ")},Ns=t=>w(t)&&L(t).map(e=>H(e,"gap").gap).join(" "),Vs=t=>{if(!w(t))return t;let e=C();return L(t).map(n=>Is.test(n)?on(n,e.spacing):n).join(" ")},$l=t=>{if(!w(t))return;let e=t.split(" ");return e.length?e.map(n=>G(n)?`var(${n})`:n.length<3||n.includes("ms")?St(n).timing||n:Et(n)?Et(n):n).join(" "):t},Rr=(t,e,n)=>{if(w(t))return t.split(",").map(r=>St(r).timing||r).join(",")},Fs=t=>{if(!w(t))return;let e=t.split(",");if(e.length)return e.map($l).join(",")};function V(t,e,n={},r={}){let o=fr.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=ee(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=Cs(t);!i&&a&&!r.ratio&&(o=Es(o))}return r.ratio?zt(n,t,o,s):H(o,t,void 0,s)}var A=(t,e=null,n)=>V(t,e,n,{ratio:!0}),Pl=(t,e,n)=>w(t)?L(t).map(r=>Is.test(r)?zt(e,n,r)[n]:r).join(" "):t,Ut=(t,e,n,r="borderRadius")=>{if(w(t))return{[r]:L(t).map(o=>{let s=Ms(o);return s!==void 0?Pl(s,e,n):zt(e,n,o)[n]}).join(" ")}};var Pr=new WeakMap,Ml={passive:!0},Il={passive:!0,capture:!0},Mr=(t,e)=>sr.has(t)?e?Il:Ml:e||!1;function zs(t){let e=Pr.get(t);return e||(e={handlers:new Map,installed:new Set},Pr.set(t,e)),e}function Dl(t,e){let n=zs(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}},Mr(t,r))}function Us(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=zs(r);Dl(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function Gs(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=Pr.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function Bs(t){return ir.has(t)&&!_e.has(t)}function Hs(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&B(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&&N()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&N()}}function ve(t,e,n){let{node:r,context:o}=e;if(!r)return;let s=Hs(e,n),i=or.has(t);if(!i&&Bs(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;Us(t,r,s,a)}else r.addEventListener(t,s,Mr(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Bs(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;Gs(t,r,a)}else r.removeEventListener(t,s,Mr(t,!1))})}var $r=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function Ir(t){if(typeof t!="string")return null;for(let e=0;e<$r.length;e++){let n=$r[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:$r[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}var Ll=/^[A-Za-z_$][\w$]*$/;function jl(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"&&Ll.test(r)){let c=r;r=function(d){return t.call(c,d)}}return typeof r!="function"?null:(s===void 0&&(s=sr.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function Nl(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 Vl(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function Fl(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function Bl(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 Dr(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)Ws(t,e,n[o]);return}Ws(t,e,n)}}function Ws(t,e,n){let r=e.__ref,o=jl(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=Nl(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=Hs(e,o.handler),c=d=>{Bl(e)&&a(d)},f={capture:o.capture,passive:o.passive,once:o.once};Vl(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(()=>{Fl(s,t.eventName,c,f),r.__globalEvents&&r.__globalEvents.delete(i)}))}function qs(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 Te(t,e,n){let r=qs(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=Ks(r[i],s);a&&a!==e&&Ys(t,a,n,new Set([e]))}}function Ks(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 Ys(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=qs(e);if(o.length){let i=(t.context||n?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=Ks(o[a],i);c&&Ys(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]=Zs(t[s],i):t[s]=i}}function Zs(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]=Zs(o,s):n[r]=s}return n}var Lr={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 Gt=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()):zl(t),Wl=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),zl=t=>Wl.has(t)?t.toLowerCase():null,Ul=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),vt=t=>typeof t=="string"&&(Ul.has(t)||t.startsWith("aria-")),it=(t,e)=>e!==!0&&e!==!1?e:vt(t)?e?"true":"false":e===!0?"":e,Tt=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Gt(e)||Lr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Lr,t)?Lr[t].includes(e):!1;var ln=(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||"")+(ln(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},ne={src:t=>Qs(t,t.src),href:t=>ln(t,t.href),action:t=>ln(t,t.action),poster:t=>Qs(t,t.poster),data:t=>ln(t,t.data)},Xs=t=>{let e=t.tag||"div",n={};for(let r in ne)if(t[r]!==void 0&&Tt(e,r)){let o=ne[r](t);o!==void 0&&(n[r]=o)}return n};function jr(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"&&Nr(r))try{let i=n.onBeforeUpdate(n,n.state,n.context,e);if(i&&typeof i.then=="function")i.then(()=>Ot(r,!1),a=>{Ot(r,!0),n.context?.plugins?.length&&ot("error",n,{hook:"onBeforeUpdate",error:a})||console.error("[DOMQL] onBeforeUpdate error:",a)});else if(Ot(r,!1),i===!1)return n}catch(i){throw Ot(r,!0),i}let o=!t||Object.keys(t).length===0,s=[];Ye(()=>{if(t.state&&F(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&re(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&&!vt(i)?n.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&n.node.setAttribute(i,it(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(Q.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&&ct(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++)ei(n,s[i]);if(n.node){for(let i=0;i<s.length;i++)if(Js(s[i])){ti(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 ot("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}function Vr(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&&Vr(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 Fr(){Vr(this)}var un=new Map,Gl=null,ni=null;var ri=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function pi(){try{let t=C();if(t){if(ri(t.__domDocument))return t.__domDocument;if(ri(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var oe={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};var Hl={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 dn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function pn(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 ql(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():pn(e)}var Kl={"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 Ur(t,e){let n=Kl[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function Yl(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+=Ur(i?s:dn(s),r[s])}e+=`${n}{${o}}`}return e}var Zl="@media (hover: hover)",Ql=/(?:^|[^\\]):hover(?![\w-])/;function hi(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Re(t,e,n){return n===!1||!Ql.test(e)||n===void 0&&!hi()?t:`${Zl}{${t}}`}function oi(t,e,n){let r=(n?n+"":"")+t+":"+e,o=un.get(r),s=o?null:dn(t);if(!o){let c=Hl[t]||pn(t),f=ql(e);o=n?`_${n}_${c}-${f}`:`_${c}-${f}`,un.set(r,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||dn(t),a=`.${o}{${Ur(i,e)}}`;return Oe(a,void 0,"atomic"),o}var si=new WeakMap,ii=new WeakMap;function Oe(t,e,n){let r=gi(e,Xl(t));if(!r)return oe.dropped++,"dropped";let o=si.get(r);if(o||(o=new Set,si.set(r,o)),o.has(t))return oe.duplicate++,oe[n||"global"]++,"duplicate";let s=ii.get(r);if(s&&s.has(t))return oe.invalid++,"invalid";try{r.insertRule(t,r.cssRules.length)}catch{return s||(s=new Set,ii.set(r,s)),s.add(t),oe.invalid++,"invalid"}return o.add(t),oe[n||"global"]++,"inserted"}var ht="0:0",ci="1:0",ai=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function Xl(t){if(typeof t!="string"||!t)return ht;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return ht;let e=1/0,n=-1/0;ai.lastIndex=0;let r;for(;r=ai.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:ci}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?ht:ci}var li=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},Jl=(t,e)=>{let[n,r]=li(t),[o,s]=li(e);return n!==o?n<o:r<s},tf=t=>t.getAttribute("data-tier")||ht,fi=new WeakMap;function gi(t,e){let n=t||pi();if(!n||!n.head)return null;let r=e||ht,o=fi.get(n);o||(o=new Map,fi.set(n,o));let s=o.get(r);if(s&&s.ownerNode&&s.ownerNode.parentNode===n.head)return s;r!==ht&&gi(n,ht);let i=r===ht?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!==ht&&i.setAttribute("data-tier",r);let c=n.head.querySelectorAll("style[data-smbls]"),f=null;for(let l=0;l<c.length;l++)if(Jl(r,tf(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===ht&&(Gl=a),a}var ef=8;function Ht(t,e,n,r){if(!t||typeof t!="object")return"";let o=!!(r&&r.state),s=null,i=0,a=[],c=[],f=Object.keys(t);for(let l=0;l<f.length;l++){let h=f[l],p=t[h];p==null||p===!1||p===""||(typeof p=="object"?c.push([h,p]):ni?(s||(s=[]),s.push(h,String(p)),i++):a.push(oi(h,String(p),n)))}if(s&&i>=ef){let l=s.join("\0"),h=ni(l),p=h.indexOf("\0"),u=h.substring(0,p),g=h.substring(p+1);if(g){let y=g.split(`
15
- `);for(let m=0;m<y.length;m++)y[m]&&Oe(y[m],void 0,"atomic")}a.push(u)}else if(s)for(let l=0;l<s.length;l+=2)a.push(oi(s[l],s[l+1],n));let d=[];for(let l=0;l<c.length;l++)d.push(sf(c[l][0],c[l][1],n,o));return a.concat(d).join(" ").trim()}var ui=new Map,nf=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function Br(t){return/^@(media|supports|container)\b/.test(t)}function rf(t){return typeof t!="string"||!t||Br(t)?!1:t.split(",").every(e=>nf.test(e.trim()))}var yi=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},Wr=32,zr=1024,di=!1;function fn(t,e,n){if(di)return;di=!0;let r=[e,...n],o=r.length>12?[...r.slice(0,6),`\u2026${r.length-9} more\u2026`,...r.slice(-3)]:r;console.warn(`[@symbo.ls/css] ${t} at ${o.join(" > ")} \u2014 skipped. A style block may hold only CSS values and nested plain blocks; the rest of this rule is still emitted. (One warning per page.)`)}function of(t){try{return JSON.stringify(t)}catch{let n=[],r=0;return JSON.stringify(t,function(o,s){if(!s||typeof s!="object")return s;for(;n.length&&n[n.length-1]!==this;)n.pop();if(!(n.length&&(n.includes(s)||!yi(s)||n.length>Wr||++r>zr)))return n.push(s),s})}}function sf(t,e,n,r){let o=of(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&hi(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=un.get(a);if(c){let S=ui.get(c);if(S)for(let k=0;k<S.length;k++)Oe(S[k],void 0,"atomic");return c}c=n?`_${n}_c${pn(a)}`:`_c${pn(a)}`;let f=r?`.${c}.${c}`:`.${c}`,d=rf(t)?`${f}.${c}`:f,l="",h=[],p=S=>typeof S=="string"&&(S.indexOf("{")!==-1||S.indexOf("}")!==-1),u=new Set,g=0,y=(S,k)=>{u.add(k);let E="",M=Object.keys(k);for(let T=0;T<M.length;T++){let O=M[T],j=k[O];if(j!=null)if(typeof j=="object"){let U=[...S,O];u.has(j)?fn("a style value that loops back to one of its own ancestors",t,U):yi(j)?U.length>Wr?fn(`a style block nested more than ${Wr} levels deep`,t,U):++g>zr?fn(`a style object with more than ${zr} nested blocks`,t,U):y(U,j):fn(`a ${Object.prototype.toString.call(j).slice(8,-1)} (not a style block)`,t,U)}else{if(p(j))continue;E+=Ur(dn(O),j)}}u.delete(k),E&&(S.length===0?l+=E:h.push({chain:S,body:E}))};y([],e);let m=S=>S.startsWith(":")||S.startsWith("["),x=(S,k=!0)=>{let E=k&&S.length===1?d:f;if(!S.length)return E;let M=S[0].split(",").map(T=>T.trim()).map(T=>T.includes("&")?T.replace(/&/g,E):m(T)?`${E}${T}`:`${E} ${T}`);for(let T=1;T<S.length;T++){let O=S[T].split(",").map(U=>U.trim()),j=[];for(let U of M)for(let jt of O)jt.includes("&")?j.push(jt.replace(/&/g,U)):m(jt)?j.push(U+jt):j.push(U+" "+jt);M=j}return M.join(", ")},b=[],_=(S,k)=>{let E=S.filter(Br),M=x(S.filter(O=>!Br(O)),E.length===0),T=`${M}{${k}}`;for(let O=E.length-1;O>=0;O--)T=`${E[O]}{${T}}`;T=Re(T,M,i),b.push(T),Oe(T,void 0,"atomic")};l&&_([t],l);for(let S of h)_([t,...S.chain],S.body);return ui.set(c,b),un.set(a,c),c}function hn(t,e){return Oe(`@keyframes ${t}{${Yl(e)}}`,void 0,"keyframes"),t}var cf=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],af=["none","forwards","backwards","both"],lf=["normal","reverse","alternate","alternate-reverse"],ff=["running","paused"],uf=t=>/^[\d.]+m?s$/.test(t),df=/^(?: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*\))$/,pf=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=>df.test(r.replace(/\s+/g,"")))},mi=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),hf={transform:pf,translate:mi,rotate:t=>mi(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},gf=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},yf=t=>{if(!R(t))return null;let e=null,n=-1;for(let r in t){let o=gf(r);o==null||!R(t[r])||o>=n&&(n=o,e=t[r])}return e},mf=t=>{let e=yf(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=hf[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},bf=(t,e)=>{if(R(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return R(r)?r:null},_f=["reverse","alternate","alternate-reverse"],bi=(t,e,n)=>{let r=n||e.animationDirection;return r&&_f.includes(String(r))?"both":mf(bf(t,e))?"backwards":"both"},Sf=0,_i=new Map,Gr=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(R(t)){let o=JSON.stringify(t),s=_i.get(o);if(s)return s;let i=`smbls-anim-${Sf++}`,a=hn(i,t);return _i.set(o,a),a}let r=n&&n[t];return R(r)?hn(t,r):t},xf=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},wf=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},r=xf(t),o=null,s=[],i=null,a=null,c=null,f=null,d=null;for(let l of r)n&&n[l]?o=l:uf(l)?s.push(l):cf.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):lf.includes(l)?c=l:af.includes(l)?f=l:ff.includes(l)?d=l:o||(o=l);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:f,playState:d}},Si={animation:(t,e)=>{if(t!=null){if(w(t)&&t.includes(" ")){let n=wf(t,e);return{animationName:Gr(n.name||t,e),animationDuration:n.durations[0]||St(e.animationDuration||"A").timing,animationDelay:n.durations[1]||St(e.animationDelay||"0s").timing,animationTimingFunction:n.timingFunction||Et(e.animationTimingFunction||"ease"),animationFillMode:n.fillMode||e.animationFillMode||bi(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:Gr(t,e),animationDuration:St(e.animationDuration||"A").timing,animationDelay:St(e.animationDelay||"0s").timing,animationTimingFunction:Et(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||bi(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:Gr(t,e)}),animationDuration:t=>({animationDuration:St(t).timing}),animationDelay:t=>({animationDelay:St(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Et(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};var gn=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!w(e))return;let[r,o]=L(e);return{...A(t+"Start",r,n),...A(t+"End",o||r,n)}},xi={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=>$o(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,n]=L(t);return{...V("height",e),...V("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]=L(t);return{...V("minWidth",e),...V("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]=L(t);return{...V("minHeight",e),...V("maxHeight",n||e)}},size:t=>{if(!w(t))return;let[e,n]=L(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]=L(t);return{...V("minInlineSize",e),...V("minBlockSize",n||e)}},maxSize:t=>{if(!w(t))return;let[e,n]=L(t);return{...V("maxInlineSize",e),...V("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]=L(t);return{...V("paddingInlineStart",e),...V("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!w(t))return;let[e,n]=L(t);return{...V("paddingBlockStart",e),...V("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]=L(t);return{...V("marginInlineStart",e),...V("marginInlineEnd",n||e)}},marginBlock:t=>{if(!w(t))return;let[e,n]=L(t);return{...V("marginBlockStart",e),...V("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)=>gn("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>gn("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)=>gn("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>gn("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:Ns(t)}),columnGap:(t,e)=>zt(e,"columnGap",t),rowGap:(t,e)=>zt(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)=>Ut(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Ut(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Ut(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Ut(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Ut(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Ut(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var wi={fontSize:t=>Ps(t)||t,fontFamily:t=>({fontFamily:$s(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 ki={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 Ai={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:L(t).map(n=>H(n,"k").k).join(" ")}},left:t=>H(t,"left"),top:t=>H(t,"top"),right:t=>H(t,"right"),bottom:t=>H(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=L(t).map(n=>H(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=L(t).map(n=>H(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};var yn=0,Hr=()=>{yn++},qr=()=>{yn>0&&yn--},ft=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:yn>0?null:n&&n.resolvedTheme||null},nt=(t,e)=>{if(e==null||e==="")return;if(!R(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(R(s)){let i=nt(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},Ci={theme:(t,e)=>{if(t)return e.themeModifier?Ee(t,`@${e.themeModifier}`):Ee(t)},color:(t,e)=>{let n=ft(e);if(t)return nt("color",st(t,n))},background:(t,e)=>{let n=ft(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:Or(t,n)}:nt("background",st(t,n))},backgroundColor:(t,e)=>{let n=ft(e);if(t)return nt("backgroundColor",st(t,n))},backgroundImage:(t,e,n,r)=>{let o=ft(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 nt("backgroundImage",js(t,o))},textStroke:t=>{let e=Ds(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:Mt(t)}),outlineWidth:(t,e)=>A("outlineWidth",t,e),outlineColor:(t,e)=>{let n=ft(e);if(t)return nt("outlineColor",st(t,n))},outlineOffset:(t,e)=>A("outlineOffset",t,e),border:t=>({border:Mt(t)}),borderColor:(t,e)=>{let n=ft(e);if(t)return nt("borderColor",st(t,n))},borderTopColor:(t,e)=>{let n=ft(e);if(t)return nt("borderTopColor",st(t,n))},borderBottomColor:(t,e)=>{let n=ft(e);if(t)return nt("borderBottomColor",st(t,n))},borderLeftColor:(t,e)=>{let n=ft(e);if(t)return nt("borderLeftColor",st(t,n))},borderRightColor:(t,e)=>{let n=ft(e);if(t)return nt("borderRightColor",st(t,n))},borderLeft:t=>({borderLeft:Mt(t)}),borderTop:t=>({borderTop:Mt(t)}),borderRight:t=>({borderRight:Mt(t)}),borderBottom:t=>({borderBottom:Mt(t)}),shadow:(t,e)=>{let n=ft(e);if(t)return nt("boxShadow",Ls(t,n))},boxShadow:(t,e)=>{if(!w(t))return;let[n,r]=t.split("!importan"),o=ft(e),s=r?" !important":"",i=Tr(n.trim(),o);return w(i)?{boxShadow:i+s}:nt("boxShadow",i)},textShadow:(t,{context:e})=>nt("textShadow",Tr(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:Mt(t)})};var Ei={transition:t=>{let e=Fs(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Rr(t)}),transitionDelay:t=>({transitionDelay:Rr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Et(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};var vi={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 kf=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,Af=t=>{if(!w(t))return t;let e=C().sizes;return e?t.replace(kf,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},xt=t=>Af(Vs(t)),Ti={gridTemplateColumns:t=>({gridTemplateColumns:xt(t)}),gridTemplateRows:t=>({gridTemplateRows:xt(t)}),gridAutoColumns:t=>({gridAutoColumns:xt(t)}),gridAutoRows:t=>({gridAutoRows:xt(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:xt(t)}),templateColumns:t=>({gridTemplateColumns:xt(t)}),autoColumns:t=>({gridAutoColumns:xt(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:xt(t)}),templateRows:t=>({gridTemplateRows:xt(t)}),autoRows:t=>({gridAutoRows:xt(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var q={...Si,...xi,...wi,...ki,...Ai,...Ci,...Ei,...vi,...Ti};var z=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 Yr(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 Oi=new Set;function Ri(t,e,n){let r=String(e);if(Oi.has(r))return;Oi.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.`;Yr(t,"error",[a]),console.error(a)}var Ef=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),vf=new Set,Tf=t=>Ef(Kr,t)&&!(Mo||vf).has(t),$i=new Set;function Of(t,e){$i.has(t)||($i.add(t),X()&&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 Rf(...t){return Yr(this,"warn",t),ts.apply(this,t)}function $f(...t){return Yr(this,"error",t),es.apply(this,t)}var Kr={update:jr,remove:Fr,getDB:ss,getQuery:is,getRootData:Qo,getPath:Ko,nextElement:ns,previousElement:rs,verbose:yr,warn:Rf,error:$f,variables:os,spotByPath:qo,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:Zo,getRootState:Yo,getRootContext:Xo,getContext:Jo,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=Tf(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&Of(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=ur;if(!s||!s(o))return o.call(this,...e);X()&&Ri(this,t,xe(o));return}X()&&Ri(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)}},Pi=new WeakMap;function Pf(t){if(!t)return Kr;let e=Pi.get(t);if(e)return e;e=Object.create(Kr);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return Pi.set(t,e),e}function Zr(t){let e=Pf(t.context);Object.setPrototypeOf(t,e)}var mn=[],bn=!1,It=0;function _n(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Mi(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?_n()-It>=50:!1}var se=0;function Xr(){se===0&&!It&&(It=_n()),se++}function Jr(){se>0&&se--,se===0&&!bn&&(It=0)}function to(t){mn.push(t),bn||(bn=!0,Mi(Ii))}function Ii(){for(It=_n();mn.length;){let t=mn.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(_n()-It>=50)break}if(mn.length){Mi(Ii);return}bn=!1,It=0,se=0}var Sn=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},gt=(t,e,n,{onlyIfAbsent:r}={})=>{Sn(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&Sn(t,e,n)},eo=(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)},Dt=(t,e)=>{if(F(e)){let o=e.__raw||e;gt(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),gt(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),gt(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}),gt(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}),gt(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}),gt(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),gt(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),gt(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),gt(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&F(a.parent);)a=a.parent;return eo(a,"update",s,i)}),gt(o,"parentUpdate",function(s,i={}){if(e.parent)return eo(e.parent,"update",s,i)}),gt(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=F(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,F(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(Sn(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){To(o,"");continue}Sn(e,o,r[o])}};var Lm=new Proxy(Object.create(null),{get(){},has(){return!1}});var xn="3.14.794";var Di="__SMBLS_ELEMENT_ID_ENGINE__",Li=(t,e,n)=>{let r=e||xn,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[Di];return s&&s.engine&&s.version===r?s.engine:(s||(o[Di]={version:r,engine:t}),t)};var v=(t,e)=>e.split(" ").map(n=>t+"-"+n),no="top right bottom left",ro=no+" block block-start block-end inline inline-start inline-end",Lt="start end",qt="width style color",wn=t=>v(t,ro),Mf=(()=>{let t=v("border","width style color image");for(let e of ro.split(" "))t.push("border-"+e,...v("border-"+e,qt));return t})(),ji=t=>[...v("border-"+t,qt+" start end"),...v("border-"+t+"-start",qt),...v("border-"+t+"-end",qt)],Rt={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:Mf};for(let t of["width","style","color"])Rt["border-"+t]=ro.split(" ").map(e=>"border-"+e+"-"+t);for(let t of no.split(" "))Rt["border-"+t]=v("border-"+t,qt);Rt["border-block"]=ji("block");Rt["border-inline"]=ji("inline");Object.assign(Rt,{"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",qt),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",Lt),"grid-column":v("grid-column",Lt),inset:[...no.split(" "),...v("inset","block block-start block-end inline inline-start inline-end")],"inset-block":v("inset-block",Lt),"inset-inline":v("inset-inline",Lt),"list-style":v("list-style","type position image"),margin:wn("margin"),"margin-block":v("margin-block",Lt),"margin-inline":v("margin-inline",Lt),mask:v("mask","image mode repeat position clip origin size composite"),offset:v("offset","position path distance rotate anchor"),outline:v("outline",qt),overflow:v("overflow","x y"),"overscroll-behavior":v("overscroll-behavior","x y"),padding:wn("padding"),"padding-block":v("padding-block",Lt),"padding-inline":v("padding-inline",Lt)});for(let t of["content","items","self"])Rt["place-"+t]=["align-"+t,"justify-"+t];Object.assign(Rt,{"scroll-margin":wn("scroll-margin"),"scroll-padding":wn("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 $e={};for(let t in Rt)for(let e of Rt[t])($e[e]||($e[e]=[])).push(t);var If=new Set(["rows","cols","wrap"]),kn=(t,e)=>If.has(e)&&Tt(t,e),ie=(t,e)=>!!(q[e]||z&&z.has(e))&&!kn(t,e);var Ji=Li({uniqId:1,scopedStyleId:0},xn),Me=[],Kt=new Set,ho=!1,tc=0,ce=null,De=null;function ae(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function ec(){return typeof document<"u"&&document.visibilityState==="hidden"}var Df=250,Lf=1e3;function jf(){return De&&(De!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||ec())?!0:ae()-tc>=Lf}function Nf(){if(ho=!0,tc=ae(),De=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(En,0);ce=t?()=>t(e):null;return}if(ec()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(En,Df);ce=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;De=requestAnimationFrame;let e=requestAnimationFrame(En);ce=t?()=>t(e):null}}function Pn(){if(ho){if(!jf())return;let t=ce;if(ce=null,t)try{t()}catch{}}Nf()}var nc=300,rc=15e4;function En(){if(ho=!1,ce=null,De=null,Kt.size&&du(),!Me.length)return;let t=Me.splice(0,Me.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=ae());let o=ae()-r.__mountFirstAttemptAt;r.__mountAttempts<=nc&&o<rc?(Me.push(n),Pn()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}rt("Mounted",n,n.__ref?.__mountOptions||{})}}}function co(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&Le(t,!0),typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Me.push(t),Pn())}function Ni(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&ot("contentUpdate",t,e);let n=t.context?.designSystem;n&&B(n);try{t.onContentUpdate(t,t.state,t.context,e)}catch(r){if(t.context?.plugins?.length&&ot("error",t,{hook:"onContentUpdate",error:r})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',r),t.context?.strictMode)throw r}finally{n&&N()}}function $t(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Vf(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Ff(t){return t.toLowerCase()}function ao(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function Ie(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]=Ie(o,s):n[r]=s}return n}function Tn(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function oc(t,e,n){return Tn(t)||(e&&typeof e=="object"?Tn(e.key):void 0)||String(n)}function ct(t,e,n,r={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=Tn(n);let s=Tn(t.key),i=Object.create(null);i.key=n||s||`_${Ji.uniqId++}`,i.parent=e||null,i.context=t.context||e?.context||r.context||{},i.context.__create||(i.context.__create=ct);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("_"),m=n.indexOf("."),x=y>0?y:-1;if(m>0&&(x<0||m<x)&&(x=m),x>0){let b=n.substring(0,x),_=i.context?.components;_&&(_[b]||_["smbls."+b])?t={...t,extends:b}:_&&X()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${b}" but neither "${b}" nor "smbls.${b}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Te(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 m=t[y],x=i[y],b=x&&m&&typeof x=="object"&&typeof m=="object"&&!Array.isArray(x)&&!Array.isArray(m)&&typeof x!="function"&&typeof m!="function";b&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?i[y]=Ie(x,m):b&&c.has(y)?i[y]={...x,...m}:b&&ao(y)?i[y]=Ie(x,m):i[y]=m}function d(y){for(let m in y){let x=y[m],b=i[m],_=b&&x&&typeof b=="object"&&typeof x=="object"&&!Array.isArray(b)&&!Array.isArray(x)&&typeof b!="function"&&typeof x!="function";_&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?i[m]=Ie(b,x):_&&c.has(m)?i[m]={...b,...x}:_&&ao(m)?i[m]=Ie(b,x):i[m]=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,h=e?.scope,p=i.context&&typeof i.context.globalScope=="object"&&i.context.globalScope||null,u=h||p||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=vo(y,u)}else u&&(i.scope=u);if(t.if!==void 0&&(i.if=t.if),Zr(i),Bf(i,e,t),i.if!=null){let y;if(typeof i.if=="function")try{y=i.if(i,i.state,i.context)}catch(m){if(y=!1,a.__ifError=m,typeof console<"u"&&console.warn){let x=i.key||i.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${x} \u2014 treating as false:`,m?.message||m)}}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"&&cc(i,a,i.if),i;i.tag||(i.tag=me(i)),rt("Init",i,r);let g=i.node=be(i);if(!g)return i;if(i.tag==="fragment"){let m=(i.context?.document||globalThis.document).createComment("");g.appendChild(m),a.__fragmentAnchor=m}rt("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),mc(i,r),ic(i),lo(i),hc(i),gc(i);try{bc(i,r)}catch(y){if(typeof console<"u"&&console.error){let m=i.__ref?.path?.join(".")||i.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,y?.message||y,y?.stack?`
13
+ `):"";return`SELECT ${a}
14
+ FROM ${c}${f}`},ha=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},ga={graphql:fa,"json-api":ua,odata:da,sql:pa,paths:ha};var fs=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 us=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");var ds=t=>{if(W(t))return t;if(k(t))return t.split(" ");if(R(t))return Object.values(t);if(Je(t))return[t]};var ya={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"},ps=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=ya[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&&_t&&pt){let n=_t.body.appendChild(_t.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){_t.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return _t.body.removeChild(n),[0,0,0,0];t=pt.getComputedStyle(n).color,_t.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 ma=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]};var ba=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1);var _a=(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]},Sa=(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)],xa=(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 G=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Sr=new Set(["currentcolor","transparent","thin","medium","thick"]),Pt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,wa=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Ct=t=>{if(!k(t))return null;if(Pt.test(t))return{passthrough:t};if(G(t))return{cssVar:t};let e=t.match(wa);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}},Ft=t=>k(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Ae=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},L=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 hs=(t,e)=>{k(t)&&t.includes("rgb")&&(t=ps(t).join(", ")),k(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Je(e)&&(e+="");let n=ba(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=xa(n,parseFloat(e));return ma(o).join(", ")}else{let[o,s,i]=t,[c,a]=_a(o/255,s/255,i/255),f=Math.max(0,Math.min(100,parseFloat(e)))/100;return Sa(c,a,f).map(l=>Math.round(Math.max(0,Math.min(1,l))*255)).join(", ")}};var xr=(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 en={};We(en,{animation:()=>za,breakpoints:()=>Ba,class:()=>Ya,color:()=>Pa,devices:()=>Wa,document:()=>Fa,font:()=>Ca,fontFace:()=>Oa,fontFamily:()=>Ea,fontFamilyTypes:()=>va,gradient:()=>Ma,grid:()=>Ka,icons:()=>La,media:()=>Ta,reset:()=>Za,semanticIcons:()=>ja,sequence:()=>Bt,shadow:()=>Da,shape:()=>Ja,sizes:()=>Xa,skins:()=>tl,spacing:()=>$a,svg:()=>Ua,svgData:()=>Ga,templates:()=>Ha,theme:()=>Ia,timing:()=>Va,typography:()=>wr,unit:()=>ka,vars:()=>Qa});var Bt={"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 ka={default:"em"};var Aa={browserDefault:16,base:16,type:"font-size",ratio:Bt["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},wr=Aa;var Ca={};var Ea={},va={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Oa={};var Ta={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Ra={base:wr.base,type:"spacing",ratio:Bt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},$a=Ra;var Pa={},Ma={};var Ia={};var Da={};var La={},ja={};var Na={default:150,base:150,type:"timing",ratio:Bt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Va=Na;var Fa={};var Ba={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Wa={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 za={};var Ua={},Ga={};var Ha={};var qa={},Ka=qa;var Ya={};var Za={},Qa={},Xa={},Ja={},tl={};var gs={},ys={};var nn=en,rn={},ms=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in nn){let e=t.toLowerCase();rn[e]=nn[t];let n=ms(e);n!==e&&(rn[n]=nn[t]),e!==t&&(rn[t]=nn[t])}var Ee={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:gs,cssMediaVars:ys,CSS_VARS:gs,CSS_MEDIA_VARS:ys,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...rn},el=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return At(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=At(e)?e:t.globalTheme,r=me(At(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 nl=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return At(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=At(e)?e:t.resolvedTheme,r=me(At(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};el(Ee);nl(Ee);var hp=te(Ee),on={active:"0",0:Ee};var Ce=[],B=t=>{t&&t._scratchConfig&&Ce.push(t)},N=()=>{Ce.pop()},C=t=>Ce.length?Ce[Ce.length-1]:on[t||on.active]||Ee;var sn={"-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"},bs=(t,e)=>{let{key:n,variable:r,value:o,scaling:s,index:i,scalingVariable:c}=t;e.sequence[n]={key:n,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:c,variable:r},e.scales[n]=s;let a=_s.has(e.unit)?"rem":e.unit;e.vars[r]=s+a},ne=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 c=e[i];if(c==="(")o++;else if(c===")"&&(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)]},kr="\0",rl=(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+=kr+e.length+kr,e.push(o),o=""))}return n+o},ol=(t,e)=>t.indexOf(kr)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),sl=/^(calc|min|max|clamp)\((.*)\)$/,il=(t,e)=>{let n=sl.exec(t);return n?`${n[1]}(${xs(n[2],e)})`:t.indexOf("(")!==-1?t:cn(t,e)},_s=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),cl=(t,e)=>{let{base:n,type:r,unit:o}=e,s=_s.has(o)?"rem":o,i=(fr(s)?1:n)+s;if(t===0)return i;let a="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-")),f=`${a}-ratio`;if(t>0){let d=sn[t-1];return`calc(var(${a}-${d}) * var(${f}))`}if(t<0){let d=sn[t+1],l=Math.abs(t),p=Math.pow(Ss,2*l),h=sn[l];return h?`max(calc(var(${a}-${d}) / var(${f})), calc(var(${a}-${h}) / ${p.toFixed(4)}))`:`calc(var(${a}-${d}) / var(${f}))`}},al=(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}))`},ll=(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 fl=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:c}=t,f=~~(o*s)-~~o,d,[l,p,h]=ll(o,s);f>16?d=[l,p,h]:d=[l,h],d.forEach((u,g)=>{let _=~~(u/r*1e3)/1e3,y=i+(g+1),x=c+(g+1)/10,m=al(g+1,d,i,e),b={key:n+(g+1),variable:y,value:u,scaling:_,scalingVariable:m,index:x};bs(b,e)})},Ss=1.618,ul=(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(Ss,2*r);return Math.max(o,s)},ve=t=>{let{type:e,base:n,ratio:r,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),a="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let f=0;f<=i;f++){let d=o[1]-f,l=sn[d],p=ul(d,n,r),h=~~(p/n*100)/100,u=a+l,g=cl(d,t),_={key:l,variable:u,value:p,base:n,scaling:h,scalingVariable:g,ratio:r,index:d};bs(_,t),s&&fl(_,t)}return t};var cn=(t="A",e)=>{let n=C(),{unit:r}=n;if(k(t)&&G(t))return`var(${t})`;if(k(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(k(t)){let m=n.sizes;if(m){let b=m[t]||m[t.toLowerCase()];if(b!==void 0)return t.slice(0,1)==="-"?`calc(${b} * -1)`:b}}let{sequence:o,unit:s=r.default,useVariable:i}=e,c=/^-?[a-zA-Z]/i,a=c.test(t);if(Po(t)||!a||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let p=`--${e.varPrefix?e.varPrefix+"-":""}${us(e.type.replace(".","-"))}-`,h=t.toUpperCase(),u=h.slice(0,1)==="-"?"-":"",g=u?h.slice(1):h,_="";g.includes("_")&&(_="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let y=m=>c.test(m)?`var(${p}${m}${_})`:m;if(g.includes("+")){let[m,b]=g.split("+"),S=`${y(m)} + ${y(b)}`;return u?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("*")){let[m,b]=g.split("*"),S=`${y(m)} * ${y(b)}`;return u?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("-")){let[m,b]=g.split("-"),S=`${y(m)} - ${y(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}${_})`;return u?`calc(${m} * -1)`:m}let x=o?o[g]:null;if(!x){if(console.warn("can't find",o,g),X())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},xs=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return rl(t,o).split(r).map(i=>{let c=ol(i,o),a=c.trim();return!a||["+","-","*","/",","].includes(a)?c:il(a,e)}).join("")},Wt=(t,e,n,r)=>{if(typeof t!="string")return C().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=ne(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=xs(t,n):t=cn(t,n),{[e]:r?`${r}(${t})`:t}};var $p=gr();var dl="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",Pp=new RegExp(`<(${dl})\\b([^>]*?)\\s*/>`,"g");var hl={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},ln=(t,e)=>{let n=e.media&&e.media[t]||hl[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},fn=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},Ar=new Set,As=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"]),gl=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,yl=/gradient\(|url\(|image-set\(|var\(/i,ml=new Set(["transparent","currentColor","currentcolor"]),Cr=t=>{if(!k(t))return!1;let e=t.trim();return yl.test(e)?!1:gl.test(e)?!0:As.has(e)||ml.has(e)},an=new Set,ws=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(R(e)&&Object.keys(e).length||R(n)&&Object.keys(n).length)},ks=new Set,Er=0,Or=t=>{Er++;try{return t()}finally{Er--}},bl=(t,e)=>{if(!k(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=Ct(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},vr=(t,e,n)=>{let r=bl(t,n);if(r){if(!ks.has(t)){ks.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=Ct(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&ws(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!Er&&!an.has(t)){an.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=k(e)?e.toLowerCase():"";if(!As.has(s)||!ws(n))return t;if(!an.has(s)){an.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.`)}},Cs=(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?"-":"+",c=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${c}) calc(g ${i} ${c}) calc(b ${i} ${c}) / ${r})`}return`hsl(from ${t} h s ${n}% / ${r})`},Y=(t,e,n)=>{let r=n||C();if(!k(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(G(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(W(t))[o,s,i]=t;else{let l=Ct(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):vr(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:c,gradient:a}=r,f=c[o]||a[o];if(!f)return vr(t,o,r);if(e)if(f[e]!==void 0)f=f[e];else if(W(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(k(f)){if(Ar.has(o))return f;Ar.add(o);try{return Y(f,null,n)}finally{Ar.delete(o)}}let d=f.rgb;if(!d){let l=r.useVariable?`var(${f.var})`:f.value;return(s||i)&&l?Cs(l,s,i):l}return i&&!f[i]&&(d=hs(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 _l=t=>R(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),Sl=t=>{if(!R(t)||t.value!==void 0)return null;let e=[];for(let n in t)if(n!=="var"){if(n.charCodeAt(0)!==64||!_l(t[n]))return null;e.push(n.slice(1))}return e.length?e:null};var xl=(t,e,n,r,o)=>{let s=Sl(e);if(!s)return;if(k(e.var)){let a=`var(${e.var})`;return n||r?Cs(a,n,r):a}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=Y(t,"@light",o),c=Y(t,"@dark",o);if(!(!Cr(i)||!Cr(c)))return i===c?i:`light-dark(${i}, ${c})`},ct=(t,e,n)=>{let r=n||C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!k(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(G(t))return`var(${t})`;let o,s,i;if(W(t))o=t[0];else{let l=Ct(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:c,gradient:a}=r,f=c[o]||a[o],d=R(f);if(d&&f.value)return Y(t,`@${e}`,n);if(d){if(r.useVariable&&f.var)return s||i?Y(t,null,n):`var(${f.var})`;if(e){if(!r.useVariable&&c[o]===f){let l=xl(t,f,s,i,n);if(l!==void 0)return l}return Y(t,`@${e}`,n)}else{let l={},p=fn(r);for(let h in f){if(h.charCodeAt(0)!==64)continue;let u=h.slice(1),g=Y(t,h,n);if(g!==void 0&&(l[`[data-theme="${u}"] &`]=g,u==="light"||u==="dark")){let _=ln(u,r);if(!_)continue;l[_]={[p]:g}}}return l}}else return vr(t,o,r)};var kl=t=>{let n=C().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return ve(o),o};var vs=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r};var Al=t=>{let e=C(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:ve(t)},H=(t,e="padding",n,r)=>{let o=Al(n);if(k(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=ne(t);r=i[0],t=i[1]}}let s=r?[t]:k(t)&&t.includes("(")?L(t):ds(t);if(W(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let c={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},a=(f,d)=>Wt(s[d],e+f+i,o,r);return c[s.length].map((f,d)=>a(f,d))}return Wt(t,e,o,r)}},zt=(t,e,n,r)=>{let o=C(),{spacing:s}=o,i=n||t[e];if(!r&&k(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&k(i)&&i.includes("(")){let c=ne(i);r=c[0],i=c[1]}if(t.spacingRatio){let c=kl(t);return H(i,e,c,r)}return H(i,e,s,r)},Os=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=ur.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 Ts=(t,e)=>{let n=C();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!k(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(G(t))return`var(${t})`;let[r]=W(t)?t:t.split(" "),s=n.shadow[r],i=R(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 c=s["@"+e]||s[e];if(c)return c.value!==void 0?c.value:c;n.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let c={},a=fn(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&&(c[`[data-theme="${d}"] &`]=p,d==="light"||d==="dark")){let h=ln(d,n);if(!h)continue;c[h]={[a]:p}}}return c}return n.verbose&&console.warn("Can't find color",t),t};var Cl=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),El=t=>Cl.has(t),Tr=(t,e,n)=>{if(t==null)return;let r=t+"";if(Pt.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(G(s))return`var(${s})`;if(El(s)||/^\d/.test(s)||s==="0")return s;let i=Or(()=>Y(s,e));if(Ft(i))return i;if(Sr.has(s.toLowerCase()))return s;n&&n(s);let c=H(s,"border");return c&&c.border?c.border:s}).join(" ")};var vl=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),$s=(t,e)=>{for(let n in e){let r=e[n];R(r)?$s(t[n]||(t[n]={}),r):t[n]=r}return t};var Rr=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(kt(t[r]))if(e&&vl(r))n[r]=$s({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=Rr(t[r],e):o==="."&&(n[`&${r}`]=Rr(t[r],e))}else n[r]=t[r]}return n},Ps=(t,e)=>{let n=e.shift();return t[n]?Ps(t[n],e):t},Rs=(t,e)=>W(e)?Ps(t,e):k(e)&&t[e]?t[e]:t;var Oe=(t,e)=>{let n=C();if(k(t)&&G(t)&&(t=Oe(t.slice(2))),!t||!k(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=W(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=Rs(s,o):s&&e&&(s=Rs(s,e)),Rr(s,!n.useVariable)};var Ms=(t,e)=>{let n=C(),{fontFamily:r}=n;return xr(e||r,t)};var Is=t=>{let e=C(),{typography:n}=e;return Wt(t,"fontSize",n)};var Ds=t=>{if(!k(t))return;let n=C().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};var Et=t=>{let e=C(),{timing:n}=e;return n[t]||n[fs(t)]||t},St=(t,e="timing")=>{let n=C(),{timing:r}=n;return Wt(t,e,r)};var Pl=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),Ls=/^-?[A-Z][0-9]?$/,Mt=t=>Tr(t),js=t=>{if(k(t))return Pt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(G(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=Y(e);return Ft(n)?n:e}).join(" ")},Ns=(t,e)=>Ts(t,e),$r=(t,e)=>{if(k(t))return Pt.test(t)?t:Ae(t).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(G(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=Y(r);if(Ft(o)){let i=ct(r,e);return R(i)?Object.values(i).filter(c=>c.includes(": "+e))[0]:i}if(/^\d/.test(r)||r==="0"||r.includes("px")||r.slice(-2)==="em")return r;let s=H(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", ")},Pr=(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=")",c=Ae(o).map(a=>(a=a.trim(),a.split(/\s+/).map(d=>{if(!d||/^\d/.test(d)||d==="0"||Pl.has(d)||d==="transparent"||Pt.test(d))return d;let l=Y(d);return Ft(l)?l:d}).join(" ")));return r+c.join(", ")+s},Vs=(t,e)=>{if(!k(t))return;let n=C();return Ae(t).map(r=>{let o=r.trim();if(G(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=ct(o,e);if(k(s))return s;if(R(s)){for(let i in s)if(k(s[i]))return s[i]}return o}return o.includes("gradient")?Pr(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Ct(o)?`url(${o})`:o}).join(", ")},Fs=t=>k(t)&&L(t).map(e=>H(e,"gap").gap).join(" "),Bs=t=>{if(!k(t))return t;let e=C();return L(t).map(n=>Ls.test(n)?cn(n,e.spacing):n).join(" ")},Ml=t=>{if(!k(t))return;let e=t.split(" ");return e.length?e.map(n=>G(n)?`var(${n})`:n.length<3||n.includes("ms")?St(n).timing||n:Et(n)?Et(n):n).join(" "):t},Mr=(t,e,n)=>{if(k(t))return t.split(",").map(r=>St(r).timing||r).join(",")},Ws=t=>{if(!k(t))return;let e=t.split(",");if(e.length)return e.map(Ml).join(",")};function V(t,e,n={},r={}){let o=pr.call(this,e||n[t]);if(o==null)return;let s;if(k(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let a=ne(o);s=a[0],o=a[1]}let i=n.scaleBoxSize,c=vs(t);!i&&c&&!r.ratio&&(o=Os(o))}return r.ratio?zt(n,t,o,s):H(o,t,void 0,s)}var A=(t,e=null,n)=>V(t,e,n,{ratio:!0}),Il=(t,e,n)=>k(t)?L(t).map(r=>Ls.test(r)?zt(e,n,r)[n]:r).join(" "):t,Ut=(t,e,n,r="borderRadius")=>{if(k(t))return{[r]:L(t).map(o=>{let s=Ds(o);return s!==void 0?Il(s,e,n):zt(e,n,o)[n]}).join(" ")}};var Dr=new WeakMap,Dl={passive:!0},Ll={passive:!0,capture:!0},Lr=(t,e)=>ar.has(t)?e?Ll:Dl:e||!1;function Gs(t){let e=Dr.get(t);return e||(e={handlers:new Map,installed:new Set},Dr.set(t,e)),e}function jl(t,e){let n=Gs(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 c=s.target,a=n.handlers.get(t),f=a&&c?a.get(c):null;if(!f||s.relatedTarget&&typeof c.contains=="function"&&c.contains(s.relatedTarget))return;f(s);return}let i=s.target;for(;i&&i!==e;){let c=n.handlers.get(t);if(c){let a=c.get(i);if(a&&(a(s),s.cancelBubble))return}i=i.parentNode}},Lr(t,r))}function Hs(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=Gs(r);jl(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function qs(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=Dr.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function zs(t){return lr.has(t)&&!xe.has(t)}function Ks(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&B(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&&N()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&N()}}function Te(t,e,n){let{node:r,context:o}=e;if(!r)return;let s=Ks(e,n),i=cr.has(t);if(!i&&zs(t)){let c=o?.rootNode||r.ownerDocument?.documentElement;Hs(t,r,s,c)}else r.addEventListener(t,s,Lr(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&zs(t)){let c=o?.rootNode||r.ownerDocument?.documentElement;qs(t,r,c)}else r.removeEventListener(t,s,Lr(t,!1))})}var Ir=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function jr(t){if(typeof t!="string")return null;for(let e=0;e<Ir.length;e++){let n=Ir[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:Ir[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}var Nl=/^[A-Za-z_$][\w$]*$/;function Vl(t,e,n){let r=e,o=!1,s,i=!1,c=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"&&(c=e.query)),typeof r=="string"&&Nl.test(r)){let a=r;r=function(d){return t.call(a,d)}}return typeof r!="function"?null:(s===void 0&&(s=ar.has(n)),{handler:r,capture:o,passive:s,once:i,query:c})}function Fl(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 Bl(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function Wl(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function zl(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 Nr(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)Us(t,e,n[o]);return}Us(t,e,n)}}function Us(t,e,n){let r=e.__ref,o=Vl(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=Fl(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 c=Ks(e,o.handler),a=d=>{zl(e)&&c(d)},f={capture:o.capture,passive:o.passive,once:o.once};Bl(s,t.eventName,a,f)&&(r.__globalEvents||(r.__globalEvents=new Map),r.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:a,options:f}),r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{Wl(s,t.eventName,a,f),r.__globalEvents&&r.__globalEvents.delete(i)}))}function Ys(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 Re(t,e,n){let r=Ys(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let c=Zs(r[i],s);c&&c!==e&&Qs(t,c,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 Qs(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=Ys(e);if(o.length){let i=(t.context||n?.context||{}).components||{};for(let c=0;c<o.length;c++){let a=Zs(o[c],i);a&&Qs(t,a,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]=Xs(t[s],i):t[s]=i}}function Xs(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]=Xs(o,s):n[r]=s}return n}var Vr={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 Gt=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()):Gl(t),Ul=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Gl=t=>Ul.has(t)?t.toLowerCase():null,Hl=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),vt=t=>typeof t=="string"&&(Hl.has(t)||t.startsWith("aria-")),at=(t,e)=>e!==!0&&e!==!1?e:vt(t)?e?"true":"false":e===!0?"":e,Ot=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Gt(e)||Vr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Vr,t)?Vr[t].includes(e):!1;var un=(t,e)=>{let n=t.call("exec",e,t);if(n)return k(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},Js=(t,e)=>{let n=(t.preSrc||"")+(un(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},re={src:t=>Js(t,t.src),href:t=>un(t,t.href),action:t=>un(t,t.action),poster:t=>Js(t,t.poster),data:t=>un(t,t.data)},ti=t=>{let e=t.tag||"div",n={};for(let r in re)if(t[r]!==void 0&&Ot(e,r)){let o=re[r](t);o!==void 0&&(n[r]=o)}return n};function Fr(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"&&Br(r))try{let i=n.onBeforeUpdate(n,n.state,n.context,e);if(i&&typeof i.then=="function")i.then(()=>Tt(r,!1),c=>{Tt(r,!0),n.context?.plugins?.length&&it("error",n,{hook:"onBeforeUpdate",error:c})||console.error("[DOMQL] onBeforeUpdate error:",c)});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&&F(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&oe(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 c=t.style[i];if(c==null)continue;let a=i.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),f=String(c).replace(/\s*!important\s*$/,"");n.node.style.setProperty(a,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 c=t.attr[i];c==null||c===!1&&!vt(i)?n.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&n.node.setAttribute(i,at(i,c))}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(Q.has(i)||i==="state")continue;let c=t[i],a=n[i];if(a&&a.__ref&&typeof a.update=="function")a.update(c,e);else if(typeof c=="object"&&c!==null){let f=i.charCodeAt(0);f>=65&&f<=90&&rt(c,n,i,e)}else i!=="text"&&i!=="html"&&i!=="style"&&i!=="attr"&&i!=="data"&&(n[i]=c,typeof c!="function"&&s.push(i))}});for(let i=0;i<s.length;i++)ri(n,s[i]);if(n.node){for(let i=0;i<s.length;i++)if(ei(s[i])){ni(n);break}}if(n.node&&o&&r.__effects&&r.__effects.length)for(let i=0;i<r.__effects.length;i++){let c=r.__effects[i];c&&!c._disposed&&!c._isSubscribeToEffect&&typeof c._execute=="function"&&c._execute()}else if(n.node&&r.__conditionalRunners)for(let i of r.__conditionalRunners)i();return it("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}function dn(t){if(!t)return;let e=t.__ref;if(!e)return;let n=be();if(n){Xt(null);try{return dn(t)}finally{Xt(n)}}e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(typeof e.__releaseMedia=="function"&&(e.__releaseMedia(),e.__releaseMedia=null),e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&dn(i)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function Wr(){dn(this)}var hn=new Map,ql=null,oi=null;var si=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function gi(){try{let t=C();if(t){if(si(t.__domDocument))return t.__domDocument;if(si(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var se={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};var Kl={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 gn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function yn(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 Yl(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():yn(e)}var Zl={"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 Hr(t,e){let n=Zl[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function Ql(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+=Hr(i?s:gn(s),r[s])}e+=`${n}{${o}}`}return e}var Xl="@media (hover: hover)",Jl=/(?:^|[^\\]):hover(?![\w-])/;function yi(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Pe(t,e,n){return n===!1||!Jl.test(e)||n===void 0&&!yi()?t:`${Xl}{${t}}`}function ii(t,e,n){let r=(n?n+"":"")+t+":"+e,o=hn.get(r),s=o?null:gn(t);if(!o){let a=Kl[t]||yn(t),f=Yl(e);o=n?`_${n}_${a}-${f}`:`_${a}-${f}`,hn.set(r,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||gn(t),c=`.${o}{${Hr(i,e)}}`;return $e(c,void 0,"atomic"),o}var ci=new WeakMap,ai=new WeakMap;function $e(t,e,n){let r=mi(e,tf(t));if(!r)return se.dropped++,"dropped";let o=ci.get(r);if(o||(o=new Set,ci.set(r,o)),o.has(t))return se.duplicate++,se[n||"global"]++,"duplicate";let s=ai.get(r);if(s&&s.has(t))return se.invalid++,"invalid";try{r.insertRule(t,r.cssRules.length)}catch{return s||(s=new Set,ai.set(r,s)),s.add(t),se.invalid++,"invalid"}return o.add(t),se[n||"global"]++,"inserted"}var ht="0:0",li="1:0",fi=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function tf(t){if(typeof t!="string"||!t)return ht;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return ht;let e=1/0,n=-1/0;fi.lastIndex=0;let r;for(;r=fi.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:li}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?ht:li}var ui=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},ef=(t,e)=>{let[n,r]=ui(t),[o,s]=ui(e);return n!==o?n<o:r<s},nf=t=>t.getAttribute("data-tier")||ht,di=new WeakMap;function mi(t,e){let n=t||gi();if(!n||!n.head)return null;let r=e||ht,o=di.get(n);o||(o=new Map,di.set(n,o));let s=o.get(r);if(s&&s.ownerNode&&s.ownerNode.parentNode===n.head)return s;r!==ht&&mi(n,ht);let i=r===ht?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!==ht&&i.setAttribute("data-tier",r);let a=n.head.querySelectorAll("style[data-smbls]"),f=null;for(let l=0;l<a.length;l++)if(ef(r,nf(a[l]))){f=a[l];break}let d=a.length?a[a.length-1]:null;f?n.head.insertBefore(i,f):d?n.head.insertBefore(i,d.nextSibling):n.head.appendChild(i)}let c=i.sheet;return o.set(r,c),r===ht&&(ql=c),c}var rf=8;function Ht(t,e,n,r){if(!t||typeof t!="object")return"";let o=!!(r&&r.state),s=null,i=0,c=[],a=[],f=Object.keys(t);for(let l=0;l<f.length;l++){let p=f[l],h=t[p];h==null||h===!1||h===""||(typeof h=="object"?a.push([p,h]):oi?(s||(s=[]),s.push(p,String(h)),i++):c.push(ii(p,String(h),n)))}if(s&&i>=rf){let l=s.join("\0"),p=oi(l),h=p.indexOf("\0"),u=p.substring(0,h),g=p.substring(h+1);if(g){let _=g.split(`
15
+ `);for(let y=0;y<_.length;y++)_[y]&&$e(_[y],void 0,"atomic")}c.push(u)}else if(s)for(let l=0;l<s.length;l+=2)c.push(ii(s[l],s[l+1],n));let d=[];for(let l=0;l<a.length;l++)d.push(af(a[l][0],a[l][1],n,o));return c.concat(d).join(" ").trim()}var pi=new Map,of=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function zr(t){return/^@(media|supports|container)\b/.test(t)}function sf(t){return typeof t!="string"||!t||zr(t)?!1:t.split(",").every(e=>of.test(e.trim()))}var bi=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},Ur=32,Gr=1024,hi=!1;function pn(t,e,n){if(hi)return;hi=!0;let r=[e,...n],o=r.length>12?[...r.slice(0,6),`\u2026${r.length-9} more\u2026`,...r.slice(-3)]:r;console.warn(`[@symbo.ls/css] ${t} at ${o.join(" > ")} \u2014 skipped. A style block may hold only CSS values and nested plain blocks; the rest of this rule is still emitted. (One warning per page.)`)}function cf(t){try{return JSON.stringify(t)}catch{let n=[],r=0;return JSON.stringify(t,function(o,s){if(!s||typeof s!="object")return s;for(;n.length&&n[n.length-1]!==this;)n.pop();if(!(n.length&&(n.includes(s)||!bi(s)||n.length>Ur||++r>Gr)))return n.push(s),s})}}function af(t,e,n,r){let o=cf(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&yi(),c=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),a=hn.get(c);if(a){let S=pi.get(a);if(S)for(let w=0;w<S.length;w++)$e(S[w],void 0,"atomic");return a}a=n?`_${n}_c${yn(c)}`:`_c${yn(c)}`;let f=r?`.${a}.${a}`:`.${a}`,d=sf(t)?`${f}.${a}`:f,l="",p=[],h=S=>typeof S=="string"&&(S.indexOf("{")!==-1||S.indexOf("}")!==-1),u=new Set,g=0,_=(S,w)=>{u.add(w);let E="",M=Object.keys(w);for(let O=0;O<M.length;O++){let T=M[O],j=w[T];if(j!=null)if(typeof j=="object"){let U=[...S,T];u.has(j)?pn("a style value that loops back to one of its own ancestors",t,U):bi(j)?U.length>Ur?pn(`a style block nested more than ${Ur} levels deep`,t,U):++g>Gr?pn(`a style object with more than ${Gr} nested blocks`,t,U):_(U,j):pn(`a ${Object.prototype.toString.call(j).slice(8,-1)} (not a style block)`,t,U)}else{if(h(j))continue;E+=Hr(gn(T),j)}}u.delete(w),E&&(S.length===0?l+=E:p.push({chain:S,body:E}))};_([],e);let y=S=>S.startsWith(":")||S.startsWith("["),x=(S,w=!0)=>{let E=w&&S.length===1?d:f;if(!S.length)return E;let M=S[0].split(",").map(O=>O.trim()).map(O=>O.includes("&")?O.replace(/&/g,E):y(O)?`${E}${O}`:`${E} ${O}`);for(let O=1;O<S.length;O++){let T=S[O].split(",").map(U=>U.trim()),j=[];for(let U of M)for(let jt of T)jt.includes("&")?j.push(jt.replace(/&/g,U)):y(jt)?j.push(U+jt):j.push(U+" "+jt);M=j}return M.join(", ")},m=[],b=(S,w)=>{let E=S.filter(zr),M=x(S.filter(T=>!zr(T)),E.length===0),O=`${M}{${w}}`;for(let T=E.length-1;T>=0;T--)O=`${E[T]}{${O}}`;O=Pe(O,M,i),m.push(O),$e(O,void 0,"atomic")};l&&b([t],l);for(let S of p)b([t,...S.chain],S.body);return pi.set(a,m),hn.set(c,a),a}function mn(t,e){return $e(`@keyframes ${t}{${Ql(e)}}`,void 0,"keyframes"),t}var lf=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],ff=["none","forwards","backwards","both"],uf=["normal","reverse","alternate","alternate-reverse"],df=["running","paused"],pf=t=>/^[\d.]+m?s$/.test(t),hf=/^(?: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*\))$/,gf=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=>hf.test(r.replace(/\s+/g,"")))},_i=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),yf={transform:gf,translate:_i,rotate:t=>_i(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},mf=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},bf=t=>{if(!R(t))return null;let e=null,n=-1;for(let r in t){let o=mf(r);o==null||!R(t[r])||o>=n&&(n=o,e=t[r])}return e},_f=t=>{let e=bf(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=yf[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},Sf=(t,e)=>{if(R(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return R(r)?r:null},xf=["reverse","alternate","alternate-reverse"],Si=(t,e,n)=>{let r=n||e.animationDirection;return r&&xf.includes(String(r))?"both":_f(Sf(t,e))?"backwards":"both"},wf=0,xi=new Map,qr=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(R(t)){let o=JSON.stringify(t),s=xi.get(o);if(s)return s;let i=`smbls-anim-${wf++}`,c=mn(i,t);return xi.set(o,c),c}let r=n&&n[t];return R(r)?mn(t,r):t},kf=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},Af=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},r=kf(t),o=null,s=[],i=null,c=null,a=null,f=null,d=null;for(let l of r)n&&n[l]?o=l:pf(l)?s.push(l):lf.includes(l)||l.startsWith("cubic-bezier")||l.startsWith("steps(")||l.startsWith("linear(")?i=l:l==="infinite"||/^\d+$/.test(l)?c=l==="infinite"?l:Number(l):uf.includes(l)?a=l:ff.includes(l)?f=l:df.includes(l)?d=l:o||(o=l);return{name:o,durations:s,timingFunction:i,iterationCount:c,direction:a,fillMode:f,playState:d}},wi={animation:(t,e)=>{if(t!=null){if(k(t)&&t.includes(" ")){let n=Af(t,e);return{animationName:qr(n.name||t,e),animationDuration:n.durations[0]||St(e.animationDuration||"A").timing,animationDelay:n.durations[1]||St(e.animationDelay||"0s").timing,animationTimingFunction:n.timingFunction||Et(e.animationTimingFunction||"ease"),animationFillMode:n.fillMode||e.animationFillMode||Si(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:qr(t,e),animationDuration:St(e.animationDuration||"A").timing,animationDelay:St(e.animationDelay||"0s").timing,animationTimingFunction:Et(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||Si(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:qr(t,e)}),animationDuration:t=>({animationDuration:St(t).timing}),animationDelay:t=>({animationDelay:St(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Et(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};var bn=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!k(e))return;let[r,o]=L(e);return{...A(t+"Start",r,n),...A(t+"End",o||r,n)}},ki={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=>Mo(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!k(t))return;let[e,n]=L(t);return{...V("height",e),...V("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(!k(t))return;let[e,n]=L(t);return{...V("minWidth",e),...V("maxWidth",n||e)}},minHeight:(t,e)=>A("minHeight",t,e),maxHeight:(t,e)=>A("maxHeight",t,e),heightRange:t=>{if(!k(t))return;let[e,n]=L(t);return{...V("minHeight",e),...V("maxHeight",n||e)}},size:t=>{if(!k(t))return;let[e,n]=L(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(!k(t))return;let[e,n]=L(t);return{...V("minInlineSize",e),...V("minBlockSize",n||e)}},maxSize:t=>{if(!k(t))return;let[e,n]=L(t);return{...V("maxInlineSize",e),...V("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(!k(t))return;let[e,n]=L(t);return{...V("paddingInlineStart",e),...V("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!k(t))return;let[e,n]=L(t);return{...V("paddingBlockStart",e),...V("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(!k(t))return;let[e,n]=L(t);return{...V("marginInlineStart",e),...V("marginInlineEnd",n||e)}},marginBlock:t=>{if(!k(t))return;let[e,n]=L(t);return{...V("marginBlockStart",e),...V("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)=>bn("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>bn("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)=>bn("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>bn("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:Fs(t)}),columnGap:(t,e)=>zt(e,"columnGap",t),rowGap:(t,e)=>zt(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!k(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(!k(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>Ut(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Ut(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Ut(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Ut(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Ut(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Ut(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var Ai={fontSize:t=>Is(t)||t,fontFamily:t=>({fontFamily:Ms(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 Ci={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 Ei={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:L(t).map(n=>H(n,"k").k).join(" ")}},left:t=>H(t,"left"),top:t=>H(t,"top"),right:t=>H(t,"right"),bottom:t=>H(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=L(t).map(n=>H(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=L(t).map(n=>H(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};var _n=0,Kr=()=>{_n++},Yr=()=>{_n>0&&_n--},ft=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:_n>0?null:n&&n.resolvedTheme||null},ot=(t,e)=>{if(e==null||e==="")return;if(!R(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(R(s)){let i=ot(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},vi={theme:(t,e)=>{if(t)return e.themeModifier?Oe(t,`@${e.themeModifier}`):Oe(t)},color:(t,e)=>{let n=ft(e);if(t)return ot("color",ct(t,n))},background:(t,e)=>{let n=ft(e);if(t)return k(t)&&t.includes("gradient")&&t.includes("(")?{background:Pr(t,n)}:ot("background",ct(t,n))},backgroundColor:(t,e)=>{let n=ft(e);if(t)return ot("backgroundColor",ct(t,n))},backgroundImage:(t,e,n,r)=>{let o=ft(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 ot("backgroundImage",Vs(t,o))},textStroke:t=>{let e=js(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:Mt(t)}),outlineWidth:(t,e)=>A("outlineWidth",t,e),outlineColor:(t,e)=>{let n=ft(e);if(t)return ot("outlineColor",ct(t,n))},outlineOffset:(t,e)=>A("outlineOffset",t,e),border:t=>({border:Mt(t)}),borderColor:(t,e)=>{let n=ft(e);if(t)return ot("borderColor",ct(t,n))},borderTopColor:(t,e)=>{let n=ft(e);if(t)return ot("borderTopColor",ct(t,n))},borderBottomColor:(t,e)=>{let n=ft(e);if(t)return ot("borderBottomColor",ct(t,n))},borderLeftColor:(t,e)=>{let n=ft(e);if(t)return ot("borderLeftColor",ct(t,n))},borderRightColor:(t,e)=>{let n=ft(e);if(t)return ot("borderRightColor",ct(t,n))},borderLeft:t=>({borderLeft:Mt(t)}),borderTop:t=>({borderTop:Mt(t)}),borderRight:t=>({borderRight:Mt(t)}),borderBottom:t=>({borderBottom:Mt(t)}),shadow:(t,e)=>{let n=ft(e);if(t)return ot("boxShadow",Ns(t,n))},boxShadow:(t,e)=>{if(!k(t))return;let[n,r]=t.split("!importan"),o=ft(e),s=r?" !important":"",i=$r(n.trim(),o);return k(i)?{boxShadow:i+s}:ot("boxShadow",i)},textShadow:(t,{context:e})=>ot("textShadow",$r(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:Mt(t)})};var Oi={transition:t=>{let e=Ws(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Mr(t)}),transitionDelay:t=>({transitionDelay:Mr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Et(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};var Ti={flow:(t,e)=>{let n=e.reverse;if(!k(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(!k(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};var Cf=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,Ef=t=>{if(!k(t))return t;let e=C().sizes;return e?t.replace(Cf,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},xt=t=>Ef(Bs(t)),Ri={gridTemplateColumns:t=>({gridTemplateColumns:xt(t)}),gridTemplateRows:t=>({gridTemplateRows:xt(t)}),gridAutoColumns:t=>({gridAutoColumns:xt(t)}),gridAutoRows:t=>({gridAutoRows:xt(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:xt(t)}),templateColumns:t=>({gridTemplateColumns:xt(t)}),autoColumns:t=>({gridAutoColumns:xt(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:xt(t)}),templateRows:t=>({gridTemplateRows:xt(t)}),autoRows:t=>({gridAutoRows:xt(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var q={...wi,...ki,...Ai,...Ci,...Ei,...vi,...Oi,...Ti,...Ri};var z=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 Qr(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 $i=new Set;function Pi(t,e,n){let r=String(e);if($i.has(r))return;$i.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",c=`[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.`;Qr(t,"error",[c]),console.error(c)}var Of=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Tf=new Set,Rf=t=>Of(Zr,t)&&!(Do||Tf).has(t),Mi=new Set;function $f(t,e){Mi.has(t)||(Mi.add(t),X()&&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 Pf(...t){return Qr(this,"warn",t),ns.apply(this,t)}function Mf(...t){return Qr(this,"error",t),rs.apply(this,t)}var Zr={update:Fr,remove:Wr,getDB:cs,getQuery:as,getRootData:Jo,getPath:Zo,nextElement:os,previousElement:ss,verbose:_r,warn:Pf,error:Mf,variables:is,spotByPath:Yo,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:Xo,getRootState:Qo,getRootContext:ts,getContext:es,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=Rf(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&$f(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=hr;if(!s||!s(o))return o.call(this,...e);X()&&Pi(this,t,ke(o));return}X()&&Pi(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)}},Ii=new WeakMap;function If(t){if(!t)return Zr;let e=Ii.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 Ii.set(t,e),e}function Xr(t){let e=If(t.context);Object.setPrototypeOf(t,e)}var Sn=[],xn=!1,It=0;function wn(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Di(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 Jr(){return It?wn()-It>=50:!1}var ie=0;function to(){ie===0&&!It&&(It=wn()),ie++}function eo(){ie>0&&ie--,ie===0&&!xn&&(It=0)}function no(t){Sn.push(t),xn||(xn=!0,Di(Li))}function Li(){for(It=wn();Sn.length;){let t=Sn.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(wn()-It>=50)break}if(Sn.length){Di(Li);return}xn=!1,It=0,ie=0}var kn=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},gt=(t,e,n,{onlyIfAbsent:r}={})=>{kn(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&kn(t,e,n)},ro=(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)},Dt=(t,e)=>{if(F(e)){let o=e.__raw||e;gt(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),gt(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),gt(o,"setByPath",function(s,i,c={}){let a=s.split("."),f=e;for(let d=0;d<a.length-1;d++)f[a[d]]===void 0&&(f[a[d]]={}),f=f[a[d]];return f[a[a.length-1]]=i,e}),gt(o,"getByPath",function(s){let i=s.split("."),c=e;for(let a=0;a<i.length;a++){if(c==null)return;c=c[i[a]]}return c}),gt(o,"removeByPath",function(s,i={}){let c=s.split("."),a=e;for(let f=0;f<c.length-1;f++){if(a==null)return e;a=a[c[f]]}return a&&delete a[c[c.length-1]],e}),gt(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),gt(o,"apply",function(s,i={}){if(typeof s=="function"){let c=s(e);return e.$update(c,i)}}),gt(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),gt(o,"rootUpdate",function(s,i={}){let c=e;for(;c?.parent&&F(c.parent);)c=c.parent;return ro(c,"update",s,i)}),gt(o,"parentUpdate",function(s,i={}){if(e.parent)return ro(e.parent,"update",s,i)}),gt(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=F(s)?s:null;for(let c=0;c<64&&s?.parent&&s.parent!==s;c++)s=s.parent,F(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(kn(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Ro(o,"");continue}kn(e,o,r[o])}};var Fm=new Proxy(Object.create(null),{get(){},has(){return!1}});var An="3.14.796";var ji="__SMBLS_ELEMENT_ID_ENGINE__",Ni=(t,e,n)=>{let r=e||An,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[ji];return s&&s.engine&&s.version===r?s.engine:(s||(o[ji]={version:r,engine:t}),t)};var v=(t,e)=>e.split(" ").map(n=>t+"-"+n),oo="top right bottom left",so=oo+" block block-start block-end inline inline-start inline-end",Lt="start end",qt="width style color",Cn=t=>v(t,so),Df=(()=>{let t=v("border","width style color image");for(let e of so.split(" "))t.push("border-"+e,...v("border-"+e,qt));return t})(),Vi=t=>[...v("border-"+t,qt+" start end"),...v("border-"+t+"-start",qt),...v("border-"+t+"-end",qt)],Rt={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:Df};for(let t of["width","style","color"])Rt["border-"+t]=so.split(" ").map(e=>"border-"+e+"-"+t);for(let t of oo.split(" "))Rt["border-"+t]=v("border-"+t,qt);Rt["border-block"]=Vi("block");Rt["border-inline"]=Vi("inline");Object.assign(Rt,{"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",qt),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",Lt),"grid-column":v("grid-column",Lt),inset:[...oo.split(" "),...v("inset","block block-start block-end inline inline-start inline-end")],"inset-block":v("inset-block",Lt),"inset-inline":v("inset-inline",Lt),"list-style":v("list-style","type position image"),margin:Cn("margin"),"margin-block":v("margin-block",Lt),"margin-inline":v("margin-inline",Lt),mask:v("mask","image mode repeat position clip origin size composite"),offset:v("offset","position path distance rotate anchor"),outline:v("outline",qt),overflow:v("overflow","x y"),"overscroll-behavior":v("overscroll-behavior","x y"),padding:Cn("padding"),"padding-block":v("padding-block",Lt),"padding-inline":v("padding-inline",Lt)});for(let t of["content","items","self"])Rt["place-"+t]=["align-"+t,"justify-"+t];Object.assign(Rt,{"scroll-margin":Cn("scroll-margin"),"scroll-padding":Cn("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 Me={};for(let t in Rt)for(let e of Rt[t])(Me[e]||(Me[e]=[])).push(t);var Lf=new Set(["rows","cols","wrap"]),En=(t,e)=>Lf.has(e)&&Ot(t,e),ce=(t,e)=>!!(q[e]||z&&z.has(e))&&!En(t,e);var nc=Ni({uniqId:1,scopedStyleId:0},An),De=[],Kt=new Set,yo=!1,rc=0,ae=null,je=null;function le(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function oc(){return typeof document<"u"&&document.visibilityState==="hidden"}var jf=250,Nf=1e3;function Vf(){return je&&(je!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||oc())?!0:le()-rc>=Nf}function Ff(){if(yo=!0,rc=le(),je=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Tn,0);ae=t?()=>t(e):null;return}if(oc()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Tn,jf);ae=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;je=requestAnimationFrame;let e=requestAnimationFrame(Tn);ae=t?()=>t(e):null}}function Dn(){if(yo){if(!Vf())return;let t=ae;if(ae=null,t)try{t()}catch{}}Ff()}var sc=300,ic=15e4;function Tn(){if(yo=!1,ae=null,je=null,Kt.size&&hu(),!De.length)return;let t=De.splice(0,De.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=le());let o=le()-r.__mountFirstAttemptAt;r.__mountAttempts<=sc&&o<ic?(De.push(n),Dn()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}st("Mounted",n,n.__ref?.__mountOptions||{})}}}function lo(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&Ne(t,!0),typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,De.push(t),Dn())}function Fi(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&it("contentUpdate",t,e);let n=t.context?.designSystem;n&&B(n);try{t.onContentUpdate(t,t.state,t.context,e)}catch(r){if(t.context?.plugins?.length&&it("error",t,{hook:"onContentUpdate",error:r})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',r),t.context?.strictMode)throw r}finally{n&&N()}}function $t(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Bf(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Wf(t){return t.toLowerCase()}function fo(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function Le(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]=Le(o,s):n[r]=s}return n}function $n(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function cc(t,e,n){return $n(t)||(e&&typeof e=="object"?$n(e.key):void 0)||String(n)}function rt(t,e,n,r={},o){let s=be();if(s){Xt(null);try{return rt(t,e,n,r,o)}finally{Xt(s)}}if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=$n(n);let i=$n(t.key),c=Object.create(null);c.key=n||i||`_${nc.uniqId++}`,c.parent=e||null,c.context=t.context||e?.context||r.context||{},c.context.__create||(c.context.__create=rt);let a=c.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||c,path:e?.__ref?.path?[...e.__ref.path,c.key]:[c.key],origin:t};if(n&&!t.extends&&!t.extend){let y=n.indexOf("_"),x=n.indexOf("."),m=y>0?y:-1;if(x>0&&(m<0||x<m)&&(m=x),m>0){let b=n.substring(0,m),S=c.context?.components;S&&(S[b]||S["smbls."+b])?t={...t,extends:b}:S&&X()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${b}" but neither "${b}" nor "smbls.${b}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Re(c,t,r);let f=new Set(["childProps","attr","style","scope","data"]),d=c.props&&typeof c.props=="object"?c.props:null;for(let y in t){if(y==="parent"||y==="node"||y==="__ref"||y==="extends"||y==="context"||y==="props")continue;if(y==="key"){i&&(c.key=i);continue}let x=t[y],m=c[y],b=m&&x&&typeof m=="object"&&typeof x=="object"&&!Array.isArray(m)&&!Array.isArray(x)&&typeof m!="function"&&typeof x!="function";b&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?c[y]=Le(m,x):b&&f.has(y)?c[y]={...m,...x}:b&&fo(y)?c[y]=Le(m,x):c[y]=x}function l(y){for(let x in y){let m=y[x],b=c[x],S=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";S&&x.charCodeAt(0)>=65&&x.charCodeAt(0)<=90?c[x]=Le(b,m):S&&f.has(x)?c[x]={...b,...m}:S&&fo(x)?c[x]=Le(b,m):c[x]=m}}d&&l(d),t.props&&typeof t.props=="object"&&l(t.props),t.classlist!==void 0&&(c.classlist=t.classlist),t.text!==void 0&&(c.text=t.text),t.html!==void 0&&(c.html=t.html);let p=c.scope&&typeof c.scope=="object"?c.scope:null,h=e?.scope,u=c.context&&typeof c.context.globalScope=="object"&&c.context.globalScope||null,g=h||u||null;if(t.scope!==void 0||p){let y={};p&&Object.assign(y,p),t.scope!==void 0&&Object.assign(y,t.scope),c.scope=To(y,g)}else g&&(c.scope=g);if(t.if!==void 0&&(c.if=t.if),Xr(c),zf(c,e,t),c.if!=null){let y;if(typeof c.if=="function")try{y=c.if(c,c.state,c.context)}catch(x){if(y=!1,a.__ifError=x,typeof console<"u"&&console.warn){let m=c.key||c.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${m} \u2014 treating as false:`,x?.message||x)}}else y=c.if;a.__if=!!y}if(a.__if)typeof c.if=="function"&&(a.__ifInitialized=!0);else return e&&(e[c.key]=c),typeof c.if=="function"&&fc(c,a,c.if),c;c.tag||(c.tag=_e(c)),st("Init",c,r);let _=c.node=Se(c);if(!_)return c;if(c.tag==="fragment"){let x=(c.context?.document||globalThis.document).createComment("");_.appendChild(x),a.__fragmentAnchor=x}st("AttachNode",c,r),_.setAttribute&&c.key&&_.setAttribute("data-key",c.key),e&&(e[c.key]=c,e.__ref?.__children&&(e.__ref.__children.includes(c.key)||e.__ref.__children.push(c.key))),_.setAttribute&&c.context?.scopeSelector&&c.context.scopeSelector!==":root"&&c.context.key&&c.key===c.context.key&&_.setAttribute("data-smbls-app",c.context.key),c.id&&_.setAttribute&&(_.id=c.id),Sc(c,r),lc(c),uo(c),mc(c),bc(c),bu(c);try{xc(c,r)}catch(y){if(typeof console<"u"&&console.error){let x=c.__ref?.path?.join(".")||c.key||"<root>";console.error(`[smbls] createChildren failed at ${x}:`,y?.message||y,y?.stack?`
16
16
  `+y.stack.split(`
17
17
  `).slice(0,6).join(`
18
- `):"")}}if($n(i,!0),_c(i,e,o),typeof i.html=="function"&&i.node&&!i.node.innerHTML){let y=i.context?.designSystem;y&&B(y);try{let m=i.html(i,i.state,i.context);m!=null&&typeof m!="function"&&(i.node.innerHTML=m)}catch{}finally{y&&N()}}if(rt("Create",i,r),rt("Complete",i,r),rt("Render",i,r),rt("RenderRouter",i,r),co(i,r),typeof i.onFrame=="function"){let y=i.onFrame,m=i.context?.designSystem,x=()=>{if(i.node){if(i.node.isConnected){m&&B(m);try{y(i,i.state,i.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{m&&N()}}requestAnimationFrame(x)}};requestAnimationFrame(x)}return i}function Bf(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&&!F(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Dt(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,p=(y,m)=>{h.has(y)||zo(d,y,c)&&(c[y]=m,h.add(y),Uo(d,y,m))},u=f.translations[l];if(u&&typeof u=="object")for(let y in u)p(y,u[y]);let g=new Set(f.languages||[]);for(let y in f.translations)g.has(y)||p(y,f.translations[y])}t.state=F(c)?c:Vt(c),t.state.__element=t,t.state.root=t.state,Dt(t,t.state),gr?.(a,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Dt(t,t.state);return}if(typeof i=="string"){if(t.state=sc(i,e),t.state&&typeof t.state=="object"&&!F(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}Dt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=F(a)?a:Vt(a||{})}else F(i)?t.state=i:t.state=Vt({...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,Dt(t,t.state),gr?.(i,t.state)}function oo(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 sc(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?oo(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?oo(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=oo(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 Wf=new Set(["s","state","ctx","context"]);function zf(t){try{let n=(typeof xe=="function"?xe(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(r=>r.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function Uf(t){if(typeof t!="function"||t.length!==2)return!1;let e=zf(t);if(e.length<2)return!1;let n=e[1].replace(/[{}[\]]/g,"").trim();return n.length>0&&!Wf.has(n)}function Gf(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"||Q.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||$t(a)||q[a]||z&&z.has(a)||Tt(n,a)||(X()&&Uf(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&&B(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&N()}},set(f){delete e.__exec[a],Object.defineProperty(t,a,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Hf(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 Y(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return Hf(t,e),n.apply(this,r)}}function Pe(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function P(t,e){return()=>t.path.join(".")+"::"+e}var Vi=new Set;function at(t,e,n){if(!X())return;let r=P(t,e)();Vi.has(r)||(Vi.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var Fi=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,qf=(t,e)=>{let n;try{n=String(t)}catch{return}if(!n.includes("{{"))return;Fi.lastIndex=0;let r;for(;(r=Fi.exec(n))!==null;)r[2].includes("{{")&&e.add(r[2])},Kf=(t,e)=>!$t(t)&&!ie(e,t),Bi=(t,e,n,r)=>{if(typeof e=="string"){e.includes("{{")&&n.add(e);return}typeof e=="function"&&Kf(t,r)&&qf(e,n)},Yf=["attr","aria","data"],Zf=t=>{if(Yf.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},Qf=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(!Zf(r))continue;for(let i in s)Bi(i,s[i],e,n);continue}Bi(r,s,e,n)}return e};function ic(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=Qf(t);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(Gf(t),typeof t.text=="function"){let c=t.text,f=Y(t,t.textDeps,c),d=$(()=>{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=et.call(t,l,t.state)),re(t,l))}catch(l){at(n,"text",l)}},{depth:n.path.length,label:P(n,"text")});n.__effects.push(d),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,f=$(()=>{if(n.contentManaged)return;let d=et.call(t,c,t.state);d!=null&&(t.text=d),t.node&&re(t,d??"")},{depth:n.path.length,label:P(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"&&!Q.has(c)&&!$t(c)&&!n.__exec[c]&&!kn(s,c)){if(q[c]){let f=t[c],d=Y(t,t[c+"Deps"],f),l=c,h,p=null,u=null,g,y=$(()=>{let m=t.context?.designSystem;m&&B(m);try{let x=d(t,t.state,t.context);Hr();let b;try{b=q[l](x,t,t.state,t.context)}finally{qr()}if(Array.isArray(b)){let S={};for(let k of b)if(k)for(let E in k)S[E]=k[E];b=S}let _=l==="show"||l==="hide";if(b&&t.node&&Xf(b)){let S=vn(b);if(S===null||S!==g){g=S;let k=Ht(b,null,t.context?.cssPrefix),E=k?k.split(" ").filter(Boolean):null;if(t.node.classList){if(u)for(let M of u)t.node.classList.remove(M);if(E&&E.length)for(let M of E)t.node.classList.add(M);u=E}}h=void 0,p=null}else if(b&&t.node){if(u){for(let k of u)t.node.classList.remove(k);u=null,g=void 0}let S=vn(b);if(S===null||S!==h||!Cn(t.node,p)){h=S;let k=Ui(t,b);p=An(t.node,k)}}else t.node&&_&&(h=void 0,p=null,t.node.style.display="")}finally{m&&N()}},{depth:n.path.length,label:P(n,l)});n.__effects.push(y),n.__exec[c]=f}else if(z&&z.has(c)){let f=t[c],d=Y(t,t[c+"Deps"],f),l=c,h,p=null,u=$(()=>{let g=t.context?.designSystem;g&&B(g);try{let y=d(t,t.state,t.context);if(t.node)if(y!=null){let m=l+":"+String(y);if(m!==h||!Cn(t.node,p)){h=m;let x={[l]:y},b=Ui(t,x);p=An(t.node,b)}}else h=void 0,p=null,t.node.style[l]=""}finally{g&&N()}},{depth:n.path.length,label:P(n,l)});n.__effects.push(u),n.__exec[c]=f}}if(typeof t.html=="function"){let c=t.html,f=Y(t,t.htmlDeps,c),d=$(()=>{let l=t.context?.designSystem;l&&B(l);try{let h=f(t,t.state,t.context);t.node&&h!=null&&typeof h!="function"&&(t.node.innerHTML=h)}finally{l&&N()}},{depth:n.path.length,label:P(n,"html")});n.__effects.push(d),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,f=Y(t,t.valueDeps,c),d=$(()=>{try{let l=f(t,t.state,t.context);typeof l=="string"&&l.includes("{{")&&(l=et.call(t,l,t.state)),zi(t,l)}catch(l){at(n,"value",l)}},{depth:n.path.length,label:P(n,"value")});n.__effects.push(d),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,f=$(()=>{try{zi(t,et.call(t,c,t.state))}catch(d){at(n,"value",d)}},{depth:n.path.length,label:P(n,"value")});n.__effects.push(f),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,f=Y(t,t.styleDeps,c),d,l=null,h=$(()=>{let p=f(t,t.state,t.context),u=vn(p);(u===null||u!==d||!Cn(t.node,l))&&(d=u,Jf(t.node,l,p),Yt(t.node,p),l=An(t.node,p))},{depth:n.path.length,label:P(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=Y(t,Pe(t.styleDeps,c),f),l,h=null,p=$(()=>{try{let u=d(t,t.state,t.context);if(t.node){let g=c+":"+String(u);if(g!==l||!Cn(t.node,h)){l=g;let y={[c]:u};Yt(t.node,y),h=An(t.node,y)}}}catch(u){at(n,"style."+c,u)}},{depth:n.path.length,label:P(n,"style."+c)});n.__effects.push(p)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let f=Y(t,Pe(t.attrDeps,c),t.attr[c]),d=c,l=$(()=>{try{let h=f(t,t.state,t.context);typeof h=="string"&&h.includes("{{")&&(h=et.call(t,h,t.state)),t.node?.setAttribute&&(h==null||h===!1&&!vt(d)?t.node.removeAttribute(d):typeof h!="function"&&typeof h!="object"&&t.node.setAttribute(d,it(d,h)))}catch(h){at(n,"attr."+d,h)}},{depth:n.path.length,label:P(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=$(()=>{try{let h=et.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(d,it(d,h??""))}catch(h){at(n,"attr."+d,h)}},{depth:n.path.length,label:P(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 p=f,u="aria-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),g=$(()=>{try{let y=et.call(t,p,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,it(u,y??""))}catch(y){at(n,"aria."+c,y)}},{depth:n.path.length,label:P(n,"aria."+c)});g._attrName=u,n.__effects.push(g);continue}if(typeof f!="function")continue;let d=Y(t,Pe(t.ariaDeps,c),t.aria[c]),l="aria-"+c.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),h=$(()=>{try{let p=d(t,t.state,t.context);if(!t.node?.setAttribute)return;p==null?t.node.removeAttribute(l):typeof p!="function"&&typeof p!="object"&&t.node.setAttribute(l,it(l,p))}catch(p){at(n,"aria."+c,p)}},{depth:n.path.length,label:P(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,g="data-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),y=$(()=>{try{let m=et.call(t,u,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,m??"")}catch(m){at(n,"data."+c,m)}},{depth:n.path.length,label:P(n,"data."+c)});y._attrName=g,n.__effects.push(y);continue}if(typeof f!="function")continue;let d=Y(t,Pe(t.dataDeps,c),t.data[c]),h="data-"+c.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),p=$(()=>{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){at(n,"data."+c,u)}},{depth:n.path.length,label:P(n,"data."+c)});p._attrName=h,n.__effects.push(p)}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=Y(t,Pe(t.classDeps,c),i[c]),d=$(()=>{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){at(n,"class."+c,l)}},{depth:n.path.length,label:P(n,"class."+c)});n.__effects.push(d)}!r&&typeof t.if=="function"&&cc(t,n,t.if);for(let c of Object.keys(t)){if(Q.has(c)||typeof t[c]!="function")continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||$t(c))continue;let d=t[c];n.__exec[c]=d;let l=t.tag||"div";if(Tt(l,c)&&!ie(l,c)){let h=Gt(c)||c,p=Y(t,t[c+"Deps"],d),u=$(()=>{try{let g=p(t,t.state,t.context);typeof g=="string"&&g.includes("{{")&&(g=et.call(t,g,t.state)),t.node?.setAttribute&&(g==null||g===!1&&!vt(h)?t.node.removeAttribute(h):typeof g!="function"&&typeof g!="object"&&(h==="src"&&"src"in t.node?t.node.src=g:t.node.setAttribute(h,it(h,g))))}catch(g){at(n,c,g)}},{depth:n.path.length,label:P(n,c)});u._attrName=h.toLowerCase(),n.__effects.push(u)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Q.has(c))continue;let f=t[c];if(typeof f!="string"||!f.includes("{{"))continue;let d=c.charCodeAt(0);if(d>=65&&d<=90||$t(c)||ie(a,c)||ne[c]||!Tt(a,c))continue;let l=Gt(c)||c,h=$(()=>{try{let p=et.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(l,it(l,p??""))}catch(p){at(n,c,p)}},{depth:n.path.length,label:P(n,c)});h._attrName=l.toLowerCase(),n.__effects.push(h)}if(su(t),lu(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,f=t.stateDeps,d=!1,l=[],h=$(()=>{let p=[];for(let m=0;m<f.length;m++){let x=f[m];try{p[m]=typeof x=="function"?x(t,t.state,t.context):t.state?.[x]}catch{p[m]=void 0}}if(!d){d=!0,l=p;return}let u=p.length!==l.length;for(let m=0;!u&&m<p.length;m++)p[m]!==l[m]&&(u=!0);let g=l;if(l=p,!u)return;let y=t.context?.designSystem;y&&B(y);try{c(t,t.state,t.context,{prev:g,next:p})}catch(m){if(t.context?.plugins?.length&&ot("error",t,{hook:"onStateUpdate",error:m})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',m),t.context?.strictMode)throw m}finally{y&&N()}},{depth:n.path.length,label:P(n,"onStateUpdate")});n.__effects.push(h)}au(t)}function Wi(t){let e=t.parent,n=e?.node;if(!n||!t.node){_c(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 cc(t,e,n){let r=Y(t,t.ifDeps,n),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=be(t)),t.node&&(t.node.ref=t),Wi(t),lo(t),rt("Render",t,{}),co(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=me(t)),rt("Init",t,{}),t.node||(t.node=be(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}rt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),mc(t,{}),ic(t,{skipIfEffect:!0}),lo(t),hc(t),gc(t),bc(t,{}),Wi(t),rt("Create",t,{}),rt("Complete",t,{}),rt("Render",t,{}),rt("RenderRouter",t,{}),co(t,{})}},{depth:e.path.length,label:P(e,"if")});e.__effects.push(o)}function re(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 zi(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{}let a=t.__ref&&t.__ref.__autoGrow;a&&a.active&&a.resize()}function lo(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&re(t,t.text),pc(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}Yt(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&&!vt(n)||e.setAttribute&&e.setAttribute(n,it(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 vn(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Xf(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 An(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=Mn(o);r.push(i,go(n,i),ac(n,i))}return r}function go(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function ac(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function Mn(t){return On(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Jf(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(Mn(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||go(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function Cn(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(go(n,e[r])!==e[r+1]||ac(n,e[r])!==e[r+2])return!1;return!0}var On=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function tu(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add(Mn(n)));return e}function eu(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=Mn(i);$e[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function lc(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=$e[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 Ui(t,e){let n=t.node;Yt(n,e);let r=tu(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=lc(t,r);return s?(Yt(n,s),Object.assign({},e,s)):e}function nu(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=lc(t,e.__inlineCssKeys);n&&Yt(t.node,n)}function Yt(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=On(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&&ru(t,n)}function ru(t,e){let n=`_ds${Ji.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 p=f[h];if(typeof p=="object"){let u=h.includes("&")?c.split(", ").map(y=>h.replace(/&/g,y)).join(", "):c.split(", ").map(y=>`${y} ${h}`).join(", "),g="";for(let y in p)g+=`${y.replace(/[A-Z]/g,m=>"-"+m.toLowerCase())}: ${p[y]};`;l+=Re(`${u} { ${g} }`,u)+`
19
- `}else d+=`${h.replace(/[A-Z]/g,u=>"-"+u.toLowerCase())}: ${p};`}d&&(s+=Re(`${c} { ${d} }`,c)+`
20
- `),l&&(s+=l)}}s&&(o.textContent+=s)}var Gi=new Set;function Hi(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 ou(t,e,n){let r=Hi(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(Hi(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Gi.has(s)||(Gi.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 su(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&&X()&&ou(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=$(()=>{let h=t.state&&(F(t.state)?t.state.root:null);if(!h||!F(h))return;let p=h;p=p[c];for(let g=0;g<f.length&&!(p==null||typeof p!="object");g++)if(F(p))p=p[f[g]];else break;if(!d.value)return;let u=!1;if(typeof t.onBeforeUpdate=="function"){let g=t.context?.designSystem;g&&B(g);try{if(Nr(o)){let y=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});y&&typeof y.then=="function"?y.then(()=>Ot(o,!1),m=>{Ot(o,!0),t.context?.plugins?.length&&ot("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}):(Ot(o,!1),y===!1&&(u=!0))}}catch(y){Ot(o,!0),t.context?.plugins?.length&&ot("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}finally{g&&N()}}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&&B(g);try{t.onUpdate(t,t.state,t.context)}catch(y){t.context?.plugins?.length&&ot("error",t,{hook:"onUpdate",error:y})||console.error("[DOMQL] subscribeTo onUpdate error:",y)}finally{g&&N()}}},{depth:o.path.length,label:P(o,"subscribeTo("+i+")")});d.value=!0,l._isSubscribeToEffect=!0,o.__effects.push(l)}}function yo(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 mo(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 qi=new Set;function iu(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;qi.has(r)||(qi.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 le(t,e,n,r){let o={},s=new Set,i=(a,c,f)=>{let d=f?new Set(Object.keys(o)):null;if(q[a]){let l=q[a](c,e,e.state,e.context);if(l){let h=Array.isArray(l)?l:[l];for(let p of h)p&&Object.assign(o,p)}}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 p in c){let u=c[p];if(typeof u=="function"&&(u=u(e,e.state,e.context)),u==null||typeof u=="function")continue;let g=typeof e[p]=="function"&&(q[p]||z&&z.has(p))||!!(r&&r.has(p));i(p,u,g)}continue}if(yo(a,e)){let p=le(c,e,!1,r);Object.keys(p).length&&(o[`[data-theme="${a.slice(1)}"] &`]=p);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){X()&&iu(a,e);continue}let l=mo(a,e),h=le(c,e,!1,r);Object.keys(h).length&&(o[l]=h);continue}let f=typeof e[a]=="function"&&(q[a]||z&&z.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 Rn=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function fc(t,e){for(let n in e){let r=e[n];t[n]=Rn(r)?fc(Rn(t[n])?t[n]:{},r):r}return t}function cu(t,e){if(!Rn(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Rn(o)&&(n=fc(n||{},o))}return n}function bo(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)&&bo(t[n],e+1))return!0}return!1}function uc(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(yo(t,n)){let s=le(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=mo(t,n),o=le(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function au(t){let e=t.__ref;for(let n of Object.keys(t)){if(!ao(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!bo(r))continue;let o=null,s,i=$(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&B(a);let c,f=!1;try{let d=uc(n,r,t),l=d?vn(d.block)+"::"+d.cssProp:null;if(l!==null&&l===s)f=!0;else if(s=l,d){let h=Ht({[d.cssProp]:d.block},null,t.context?.cssPrefix);c=h?h.split(" ").filter(Boolean):null}else c=null}finally{a&&N()}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:P(e,"cssBlock("+n+")")});e.__effects.push(i)}}function lu(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,b=t.state?t.state[s]:void 0;if(x||b!==void 0)u=b;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 m=t.context?.designSystem;m&&B(m);try{if(y){let x={},b={},_=!1;for(let k in i){if(!Object.prototype.hasOwnProperty.call(i,k))continue;let E=i[k],M=k.charAt(0);if((M===":"||M==="@"||M==="&"||M==="[")&&E&&typeof E=="object"&&!Array.isArray(E)){if(yo(k,t)){let O=le(E,t,!1,f);Object.keys(O).length&&(b[`[data-theme="${k.slice(1)}"] &`]=O,_=!0)}else{let O=mo(k,t),j=le(E,t,!1,f);Object.keys(j).length&&(b[O]=j,_=!0)}continue}let T=typeof E=="function"?E(t,t.state,t.context):E;if(T!=null)if(q[k]){let O=q[k](T,t,t.state,t.context);if(O){let j=Array.isArray(O)?O:[O];for(let U of j)U&&Object.assign(x,U)}}else(z&&z.has(k)||On(k))&&(x[k]=T)}let S=Object.keys(x);if(S.length){Yt(t.node,x);for(let k of S)n.set(k,r);c.appliedKeys=S}else c.appliedKeys=null;if(_){let k=Ht(b,null,t.context?.cssPrefix,{state:!0}),E=k?k.split(" ").filter(Boolean):[];if(E.length&&t.node.classList){for(let M of E)t.node.classList.add(M);c.appliedClasses=E}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&&(On(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{m&&N()}};e.__conditionalRunners.push(d);let l=Y(t,t[s+"Deps"],d),h=$(l,{depth:e.path.length,label:P(e,"conditional("+r+")")}),p=e.__exec&&e.__exec[s]||t[s];h._sources.size===0&&typeof p=="function"&&X()&&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 so=new WeakSet;function fu(t){let e=t.ownerDocument;!e||so.has(e)||(so.add(e),queueMicrotask(()=>{so.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var io=new WeakSet,Ki=!1;function Yi(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function fo(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"?fo(s,o):o}return n}function dc(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=dc(o,e);Object.keys(s).length&&(n[r]=s)}else e.has(r)||(n[r]=o)}return n}function pc(t){let{node:e}=t;if(!e)return;if(Ki||(Ki=!0,Ht({display:"none"})),io.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}io.add(t);let n=t.context?.designSystem;n&&B(n),Hr();try{let r={},o=!1,s=[],i=null,a=null,c=null,f=(u,g)=>{if(g&&typeof g=="object"&&Yi(u)){a||(a={});let y=a[u];y&&(g=fo(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"&&q.theme){let u=q.theme(t.theme,t,t.state,t.context);if(u){let g=y=>{for(let m in y){let x=y[m];x&&typeof x=="object"&&Yi(m)&&(i||(i={}),i[m]=x),r[m]=x}};if(Array.isArray(u))for(let y of u)y&&g(y);else g(u);o=!0}}let d=(u,g)=>{if(q[u]){let y=q[u](g,t,t.state,t.context);if(y){if(Array.isArray(y)){for(let m of y)if(m)for(let x in m)f(x,m[x])}else for(let m in y)f(m,y[m]);o=!0}}else if(z&&z.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(bo(g))return;let y=uc(u,g,t);y&&(f(y.cssProp,y.block),o=!0)}};if(typeof t.class=="string"){let u=cu(t.class,t.context?.designSystem?.class);if(u)for(let g in u)d(g,u[g])}let l=c?new Set(c):null,h=t.tag||"div";for(let u of Object.keys(t)){if(typeof t[u]=="function"||Q.has(u)||u==="theme")continue;let g=u.charCodeAt(0);g>=65&&g<=90||$t(u)||kn(h,u)||d(u,t[u])}if(i)for(let u in i){let g=c?dc(i[u],c):i[u];a&&a[u]&&(g=fo(g,a[u])),Object.keys(g).length?r[u]=g:delete r[u]}if(eu(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=Ht(r,null,t.context?.cssPrefix);if(s=g?g.split(" ").filter(Boolean):[],g&&e.classList){let y=s,m=!1;for(let x of y)e.classList.add(x),m||(x.charCodeAt(0)===95&&x.charCodeAt(1)===99||x.charCodeAt(0)===95&&x.indexOf("_c",1)!==-1)&&(m=!0);m&&fu(e)}}let p=t.__ref;if(p){let u=p.__staticCssClasses;if(u&&e.classList){let g=new Set(s);for(let y of u)g.has(y)||e.classList.remove(y)}p.__staticCssClasses=s}nu(t)}finally{qr(),n&&N(),io.delete(t)}}var Js=t=>!!q[t]||!!(z&&z.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function ti(t){t&&t.node&&pc(t)}function hc(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,it(i,s))}let n=Xs(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"||Q.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!$t(o)&&!ie(r,o)&&Tt(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!ne[o])continue;i=et.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!vt(Gt(o)||o))continue;let a=Gt(o)||o;e.setAttribute(a,it(a,i))}}}function ei(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||$t(e))return;let o=t.tag||"div";if(ie(o,e)||!Tt(o,e))return;let s=Gt(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=ne[e];if(d&&f!=null){let l=d(t);l!==void 0&&(f=l)}typeof f=="string"&&f.includes("{{")&&(f=et.call(t,f,t.state)),f==null||f===!1&&!vt(s)?n.removeAttribute(s):typeof f!="function"&&typeof f!="object"&&n.setAttribute(s,it(s,f))}function uu(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{}Qi(o),Kt.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),Xi(n,o,!1),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=r.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!n.isConnected){Le(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,Zi(t,o);return}o.awaitingLayout=!1;let i=n.style.height;n.style.height="0px";let a=n.scrollHeight;if(!(a>0)){n.style.height=i;return}let c=hu(n),f=c!=null&&a>c;n.style.height=(f?c:a)+"px",Xi(n,o,f),o.lastMeasure=a,o.lastWidth=n.clientWidth,Zi(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}Qi(o),Kt.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,pu(t,o));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 Le(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),Kt.add(t),Pn())}function du(){let t=Array.from(Kt);Kt.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=ae()),o.attachAttempts+=1,o.attachAttempts<=nc&&ae()-o.firstAttemptAt<rc&&(Kt.add(n),Pn());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function Zi(t,e){if(e.watch)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=()=>{if(!e.active||!n.isConnected||!(n.scrollHeight>0))return;if(e.awaitingLayout){e.awaitingLayout=!1,Le(t,!0);return}let a=n.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,Le(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function Qi(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function pu(t,e){if(e.fontsHooked)return;e.fontsHooked=!0;let n=t.node&&t.node.ownerDocument,r=n&&n.fonts&&n.fonts.ready;!r||typeof r.then!="function"||r.then(()=>{e.active&&t.node&&Le(t,!0)},()=>{})}function hu(t){let e=t.ownerDocument&&t.ownerDocument.defaultView,n;try{n=e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{n=null}if(!n)return null;let r=d=>typeof d=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(d)?parseFloat(d):null,o=r(n.maxHeight);if(o==null||!(o>0))return null;let s=(r(n.paddingTop)||0)+(r(n.paddingBottom)||0),i=(r(n.borderTopWidth)||0)+(r(n.borderBottomWidth)||0),a=n.boxSizing==="border-box"?o-i:o+s,c=r(n.lineHeight);if(!(c>0))return a;let f=Math.floor((a-s)/c+1e-6);return f>=1?f*c+s:a}function Xi(t,e,n){n?e.appliedScroll||(t.style.overflowY="auto",e.appliedScroll=!0):e.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),e.appliedScroll=!1)}function gc(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"?Y(t,t.autoGrowDeps,r):null,s=$(()=>{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}uu(t,a)},{depth:n.path.length,label:P(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var yc=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function mc(t,e){for(let n of Object.keys(t)){if(!$t(n)||yc.has(n))continue;let r=Ir(n);if(r){Dr(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=Vf(n);_e.has(s)||ve(Ff(s),t,o)}gu(t)}function gu(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let h of yc){let p=t[h];typeof p=="function"&&(n[h]=p,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 p=h.touches&&h.touches[0]||h.changedTouches&&h.changedTouches[0];p&&(i=p.clientX,a=p.clientY,c=Date.now(),f=!0)},l=h=>{if(!f)return;f=!1;let p=h.changedTouches&&h.changedTouches[0]||h.touches&&h.touches[0];if(!p)return;let u=p.clientX-i,g=p.clientY-a,y=Date.now()-c;if(y>s)return;let m=Math.abs(u),x=Math.abs(g);if(Math.max(m,x)<o)return;let b;if(m>x*1.2)b=u<0?"left":"right";else if(x>m*1.2)b=g<0?"up":"down";else return;let _="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),S=n[_],k=n.onSwipe;S&&S.call(t,h,t,t.state,t.context),k&&k.call(t,{direction:b,dx:u,dy:g,dt:y,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 je(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]=je(o,s):n[r]=s}return n}function uo(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 m=e[y],x=m;(typeof m=="string"||typeof m=="number")&&(m={text:m});let b=c;if(typeof c=="function")try{b=c(t,m)}catch{b=null}if(f==="state"){let S=x;(typeof x=="string"||typeof x=="number")&&(S={value:x,text:x}),m=b?{...b,state:S}:{state:S}}else b&&(m=je(b,m));if(o&&!m.ignoreChildExtends)if(m.extends){let S=Array.isArray(m.extends)?m.extends:[m.extends],k=Array.isArray(o)?o:[o];m={...m,extends:[...k,...S]}}else m={...m,extends:o};let _=oc(m?.key,x,y);try{return ct(m,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 m=d(y);!s&&m?.node&&a.appendChild(m.node)}return s||t.node.appendChild(a),!0}let p=l.__childrenChunkGen=(l.__childrenChunkGen||0)+1;Xr();let u=null,g=y=>{if(l.__disposed||l.__childrenChunkGen!==p){u&&u.parentNode&&u.remove();return}for(let m=y;m<e.length;m++){let x=d(m);if(x?.node&&(u?t.node.insertBefore(x.node,u):a.appendChild(x.node)),m+1<e.length&&Qr()){u||(u=i.createComment("smbls-mount"),a.appendChild(u),t.node.appendChild(a));let b=m+1;to(()=>g(b));return}}u?(u.remove(),t.node.tagName==="SELECT"&&$n(t,!0)):t.node.appendChild(a)};return g(0),Jr(),!0}if(typeof e=="string"){let s=sc(e,t);if(Array.isArray(s))return uo(t,s,n,r)}if(typeof e=="object")for(let s in e){if(Q.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=je(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};ct(i,t,s,n)}}}function $n(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=et.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 bc(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 m=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${m} (initial run, treating as empty):`,y?.message||y)}}t.children=n;let h=t.__ref,p=!1,u=Y(t,t.childrenDeps,l),g=$(()=>{let y=p;p=!0;let m;try{m=u(t,t.state,t.context)}catch(T){if(typeof console<"u"&&console.error){let O=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${O}${y?"":" (initial tracking run)"}:`,T?.message||T)}return}if(!y||m===t.children)return;t.children=m,h.__childrenChunkGen!=null&&h.__childrenChunkGen++;let x=typeof t.onContentUpdate=="function",b=x?[]:null,_=x?[]:null,S=x?[]:null;if(Array.isArray(m)&&t.childrenAs==="state"){let T=t.childProps,O=[],j=new Map;for(let I=0;I<m.length;I++){let ut=m[I],D=T;if(typeof T=="function")try{D=T(t,ut)}catch{D=null}let wt=oc(D&&D.key,ut,I);O.push(wt),j.set(wt,{rawChild:ut,childProps:D})}let U=new Set(O),jt=h.__children.slice();for(let I of jt)if(!U.has(I)){let ut=t[I];ut?.remove&&ut.remove(),delete t[I],_&&_.push(I)}let fe=t.childExtends,Ne=t.tag==="fragment",Sc=t.context?.document||globalThis.document,ue=Ne?null:Sc?.createDocumentFragment(),In=new Set;for(let I of O){let ut=j.get(I),D=ut.rawChild,wt=t[I];if(wt&&wt.state){if(D&&typeof D=="object"){let J=wt.state,Zt=J.$replace||J.replace,So=J.$update||J.update;try{if(typeof Zt=="function")Zt.call(J,D);else if(typeof So=="function"){for(let lt in J)if(!(lt==="__element"||lt==="root"||lt==="parent"||lt==="update")&&!Object.prototype.hasOwnProperty.call(D,lt))try{J[lt]=void 0}catch{}So.call(J,D)}else for(let lt in D)J[lt]=D[lt]}catch(lt){if(typeof console<"u"&&console.error){let xc=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${I}" failed to patch at ${xc} (reconcile, keeping its previous data for this pass):`,lt?.message||lt)}}}S&&S.push(I);continue}let Dn=D;(typeof D=="string"||typeof D=="number")&&(Dn={value:D,text:D});let _o=ut.childProps,yt=_o?{..._o,state:Dn}:{state:Dn};if(fe&&!yt.ignoreChildExtends)if(yt.extends){let J=Array.isArray(yt.extends)?yt.extends:[yt.extends],Zt=Array.isArray(fe)?fe:[fe];yt={...yt,extends:[...Zt,...J]}}else yt={...yt,extends:fe};let Ln;try{Ln=ct(yt,t,I,e)}catch(J){if(typeof console<"u"&&console.error){let Zt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${I}" failed to construct at ${Zt} (reconcile, skipping this row):`,J?.message||J)}In.add(I);continue}!Ne&&Ln?.node&&ue&&ue.appendChild(Ln.node),b&&b.push(I)}if(!Ne&&ue&&ue.childNodes.length&&t.node&&t.node.appendChild(ue),!Ne&&t.node){let I=null;for(let ut of O){let D=t[ut]?.node;if(!D)continue;let wt=I?I.nextSibling:t.node.firstChild;D!==wt&&t.node.insertBefore(D,wt),I=D}}h.__children=In.size?O.filter(I=>!In.has(I)):O,x&&(b.length||_.length)&&Ni(t,{added:b,removed:_,kept:S}),$n(t,!1);return}let M=x?[...h.__children]:null;for(let T of[...h.__children]){let O=t[T];O?.remove&&O.remove(),delete t[T]}h.__children=[],uo(t,m,e),$n(t,!1),x&&Ni(t,{added:[...h.__children],removed:M,kept:[]})},{depth:h.path.length,label:P(h,"children")});h.__effects.push(g)}let s=uo(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=je(t.childProps,l)),o&&!l.ignoreChildExtends)if(l.extends){let h=Array.isArray(l.extends)?l.extends:[l.extends],p=Array.isArray(o)?o:[o];l={...l,extends:[...p,...h]}}else l={...l,extends:o};ct(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 p=l[h];if(!p.endsWith("Extends")||typeof t[p]!="string")continue;let u=p.slice(0,-7);if(!u||u.charCodeAt(0)<65||u.charCodeAt(0)>90)continue;let g={extends:t[p]};delete t[p];for(let y=h+1;y<l.length;y++){let m=l[y],x=m.charCodeAt(0);if(x>=65&&x<=90||Q.has(m)||typeof t[m]=="function"&&(m.startsWith("on")||m.startsWith(".")))break;let b=t[m];b!==void 0&&(g[m]=b,delete t[m])}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(Q.has(l)||typeof t[l]!="object"||t[l]===null)return;let h=l.charCodeAt(0);if(h<65||h>90)return;let p=t[l];if(!p.__ref){if(!p.extends&&!p.extend){let u=i[l]||i[`smbls.${l}`];u&&(p={...p,extends:u})}if(t.childProps&&(p=je(t.childProps,p)),o&&!p.ignoreChildExtends)if(p.extends){let u=Array.isArray(p.extends)?p.extends:[p.extends],g=Array.isArray(o)?o:[o];p={...p,extends:[...g,...u]}}else p={...p,extends:o};ct(p,t,l,e)}};if(!a){for(let l of c)f(l);return}Xr();let d=l=>{for(let h=l;h<c.length;h++)if(f(c[h]),h+1<c.length&&Qr()){let p=h+1;to(()=>d(p));return}};d(0),Jr()}function _c(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 po=3;function Nr(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=po?!1:(t.__inBeforeUpdate=!0,!0)}function Ot(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===po&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${po}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function rt(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&ot(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&&B(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(p=>{e.context?.plugins?.length&&ot("error",e,{hook:o,error:p})||console.error(`[DOMQL] Lifecycle "${o}" error:`,p)}).finally(()=>{c&&h&&(h[c]=!1)}),d=!1,!0}if(l===!1)return!1}catch(l){if(e.context?.plugins?.length&&ot("error",e,{hook:o,error:l})||console.error(`[DOMQL] Lifecycle "${o}" error:`,l),e.context?.strictMode)throw l}finally{f&&N(),d&&e.__ref&&(e.__ref[c]=!1)}}return!0}var yu=ct;var mu=(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)&&!F(i);r={...t,state:s(o)&&s(n.state)?{...o,...n.state}:n.state}}return ct(r,e,"Root",{context:n.context||{}})};return Oc(bu);})();
18
+ `):"")}}if(In(c,!0),wc(c,e,o),typeof c.html=="function"&&c.node&&!c.node.innerHTML){let y=c.context?.designSystem;y&&B(y);try{let x=c.html(c,c.state,c.context);x!=null&&typeof x!="function"&&(c.node.innerHTML=x)}catch{}finally{y&&N()}}if(st("Create",c,r),st("Complete",c,r),st("Render",c,r),st("RenderRouter",c,r),lo(c,r),typeof c.onFrame=="function"){let y=c.onFrame,x=c.context?.designSystem,m=()=>{if(c.node){if(c.node.isConnected){x&&B(x);try{y(c,c.state,c.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{x&&N()}}requestAnimationFrame(m)}};requestAnimationFrame(m)}return c}function zf(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&&!F(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Dt(t,t.state);else if(t.context?.state){let c=t.context.state,a={...c},f=t.context?.polyglot;if(f?.translations){let d=t.context,l=c.lang||f.defaultLang||"en",p=new Set,h=(_,y)=>{p.has(_)||Go(d,_,a)&&(a[_]=y,p.add(_),Ho(d,_,y))},u=f.translations[l];if(u&&typeof u=="object")for(let _ in u)h(_,u[_]);let g=new Set(f.languages||[]);for(let _ in f.translations)g.has(_)||h(_,f.translations[_])}t.state=F(a)?a:Vt(a),t.state.__element=t,t.state.root=t.state,Dt(t,t.state),br?.(c,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Dt(t,t.state);return}if(typeof i=="string"){if(t.state=ac(i,e),t.state&&typeof t.state=="object"&&!F(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}Dt(t,t.state);return}if(typeof i=="function"){let c=i(t,e?.state);t.state=F(c)?c:Vt(c||{})}else F(i)?t.state=i:t.state=Vt({...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,Dt(t,t.state),br?.(i,t.state)}function io(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 ac(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?io(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?io(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=io(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 Uf=new Set(["s","state","ctx","context"]);function Gf(t){try{let n=(typeof ke=="function"?ke(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(r=>r.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function Hf(t){if(typeof t!="function"||t.length!==2)return!1;let e=Gf(t);if(e.length<2)return!1;let n=e[1].replace(/[{}[\]]/g,"").trim();return n.length>0&&!Uf.has(n)}function qf(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 c=s[i];if(typeof t[c]!="function"||Q.has(c))continue;let a=c.charCodeAt(0);a>=65&&a<=90||$t(c)||q[c]||z&&z.has(c)||Ot(n,c)||(X()&&Hf(t[c])&&console.warn(`[smbls] custom prop "${c}"${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('${c}', \u2026) instead of reading el.${c}(\u2026) directly (see RULES.md Rule 8).`),o.push({prop:c,fn:t[c]}))}for(let i=0;i<o.length;i++){let{prop:c,fn:a}=o[i];e.__exec[c]=a,Object.defineProperty(t,c,{get(){r&&B(r);try{return a(t,t.state,t.context)}catch{return}finally{r&&N()}},set(f){delete e.__exec[c],Object.defineProperty(t,c,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Kf(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 K(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return Kf(t,e),n.apply(this,r)}}function Ie(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function P(t,e){return()=>t.path.join(".")+"::"+e}var Bi=new Set;function J(t,e,n){if(!X())return;let r=P(t,e)();Bi.has(r)||(Bi.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var Wi=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,Yf=(t,e)=>{let n;try{n=String(t)}catch{return}if(!n.includes("{{"))return;Wi.lastIndex=0;let r;for(;(r=Wi.exec(n))!==null;)r[2].includes("{{")&&e.add(r[2])},Zf=(t,e)=>!$t(t)&&!ce(e,t),zi=(t,e,n,r)=>{if(typeof e=="string"){e.includes("{{")&&n.add(e);return}typeof e=="function"&&Zf(t,r)&&Yf(e,n)},Qf=["attr","aria","data","metadata"],Xf=t=>{if(Qf.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},Jf=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(!Xf(r))continue;for(let i in s)zi(i,s[i],e,n);continue}zi(r,s,e,n)}return e};function lc(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=Jf(t);if(n.__authoredTemplates)for(let a of o)n.__authoredTemplates.add(a);else n.__authoredTemplates=o;if(qf(t),typeof t.text=="function"){let a=t.text,f=K(t,t.textDeps,a),d=$(()=>{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=nt.call(t,l,t.state)),oe(t,l))}catch(l){J(n,"text",l)}},{depth:n.path.length,label:P(n,"text")});n.__effects.push(d),n.__exec.text=a}else if(typeof t.text=="string"&&t.text.includes("{{")){let a=t.text,f=$(()=>{if(n.contentManaged)return;let d=nt.call(t,a,t.state);d!=null&&(t.text=d),t.node&&oe(t,d??"")},{depth:n.path.length,label:P(n,"text")});n.__effects.push(f),n.__exec.text=a}let s=t.tag||"div";for(let a of Object.keys(t))if(typeof t[a]=="function"&&!Q.has(a)&&!$t(a)&&!n.__exec[a]&&!En(s,a)){if(q[a]){let f=t[a],d=K(t,t[a+"Deps"],f),l=a,p,h=null,u=null,g,_=$(()=>{let y=t.context?.designSystem;y&&B(y);try{let x=d(t,t.state,t.context);Kr();let m;try{m=q[l](x,t,t.state,t.context)}finally{Yr()}if(Array.isArray(m)){let S={};for(let w of m)if(w)for(let E in w)S[E]=w[E];m=S}let b=l==="show"||l==="hide";if(m&&t.node&&tu(m)){let S=Rn(m);if(S===null||S!==g){g=S;let w=Ht(m,null,t.context?.cssPrefix),E=w?w.split(" ").filter(Boolean):null;if(t.node.classList){if(u)for(let M of u)t.node.classList.remove(M);if(E&&E.length)for(let M of E)t.node.classList.add(M);u=E}}p=void 0,h=null}else if(m&&t.node){if(u){for(let w of u)t.node.classList.remove(w);u=null,g=void 0}let S=Rn(m);if(S===null||S!==p||!On(t.node,h)){p=S;let w=Hi(t,m);h=vn(t.node,w)}}else t.node&&b&&(p=void 0,h=null,t.node.style.display="")}finally{y&&N()}},{depth:n.path.length,label:P(n,l)});n.__effects.push(_),n.__exec[a]=f}else if(z&&z.has(a)){let f=t[a],d=K(t,t[a+"Deps"],f),l=a,p,h=null,u=$(()=>{let g=t.context?.designSystem;g&&B(g);try{let _=d(t,t.state,t.context);if(t.node)if(_!=null){let y=l+":"+String(_);if(y!==p||!On(t.node,h)){p=y;let x={[l]:_},m=Hi(t,x);h=vn(t.node,m)}}else p=void 0,h=null,t.node.style[l]=""}finally{g&&N()}},{depth:n.path.length,label:P(n,l)});n.__effects.push(u),n.__exec[a]=f}}if(typeof t.html=="function"){let a=t.html,f=K(t,t.htmlDeps,a),d=$(()=>{let l=t.context?.designSystem;l&&B(l);try{let p=f(t,t.state,t.context);t.node&&p!=null&&typeof p!="function"&&(t.node.innerHTML=p)}finally{l&&N()}},{depth:n.path.length,label:P(n,"html")});n.__effects.push(d),n.__exec.html=a}if(typeof t.value=="function"){let a=t.value,f=K(t,t.valueDeps,a),d=$(()=>{try{let l=f(t,t.state,t.context);typeof l=="string"&&l.includes("{{")&&(l=nt.call(t,l,t.state)),Gi(t,l)}catch(l){J(n,"value",l)}},{depth:n.path.length,label:P(n,"value")});n.__effects.push(d),n.__exec.value=a}else if(typeof t.value=="string"&&t.value.includes("{{")){let a=t.value,f=$(()=>{try{Gi(t,nt.call(t,a,t.state))}catch(d){J(n,"value",d)}},{depth:n.path.length,label:P(n,"value")});n.__effects.push(f),n.__exec.value=a}if(typeof t.style=="function"){let a=t.style,f=K(t,t.styleDeps,a),d,l=null,p=$(()=>{let h=f(t,t.state,t.context),u=Rn(h);(u===null||u!==d||!On(t.node,l))&&(d=u,eu(t.node,l,h),Yt(t.node,h),l=vn(t.node,h))},{depth:n.path.length,label:P(n,"style")});n.__effects.push(p),n.__exec.style=a}else if(t.style&&typeof t.style=="object")for(let a in t.style){let f=t.style[a];if(typeof f!="function")continue;let d=K(t,Ie(t.styleDeps,a),f),l,p=null,h=$(()=>{try{let u=d(t,t.state,t.context);if(t.node){let g=a+":"+String(u);if(g!==l||!On(t.node,p)){l=g;let _={[a]:u};Yt(t.node,_),p=vn(t.node,_)}}}catch(u){J(n,"style."+a,u)}},{depth:n.path.length,label:P(n,"style."+a)});n.__effects.push(h)}if(t.attr&&typeof t.attr=="object"){for(let a in t.attr)if(typeof t.attr[a]=="function"){let f=K(t,Ie(t.attrDeps,a),t.attr[a]),d=a,l=$(()=>{try{let p=f(t,t.state,t.context);typeof p=="string"&&p.includes("{{")&&(p=nt.call(t,p,t.state)),t.node?.setAttribute&&(p==null||p===!1&&!vt(d)?t.node.removeAttribute(d):typeof p!="function"&&typeof p!="object"&&t.node.setAttribute(d,at(d,p)))}catch(p){J(n,"attr."+d,p)}},{depth:n.path.length,label:P(n,"attr."+d)});l._attrName=d.toLowerCase(),n.__effects.push(l)}else if(typeof t.attr[a]=="string"&&t.attr[a].includes("{{")){let f=t.attr[a],d=a,l=$(()=>{try{let p=nt.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(d,at(d,p??""))}catch(p){J(n,"attr."+d,p)}},{depth:n.path.length,label:P(n,"attr."+d)});l._attrName=d.toLowerCase(),n.__effects.push(l)}}if(t.aria&&typeof t.aria=="object")for(let a in t.aria){let f=t.aria[a];if(typeof f=="string"&&f.includes("{{")){let h=f,u="aria-"+a.replace(/[A-Z]/g,_=>"-"+_.toLowerCase()),g=$(()=>{try{let _=nt.call(t,h,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,at(u,_??""))}catch(_){J(n,"aria."+a,_)}},{depth:n.path.length,label:P(n,"aria."+a)});g._attrName=u,n.__effects.push(g);continue}if(typeof f!="function")continue;let d=K(t,Ie(t.ariaDeps,a),t.aria[a]),l="aria-"+a.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),p=$(()=>{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,at(l,h))}catch(h){J(n,"aria."+a,h)}},{depth:n.path.length,label:P(n,"aria."+a)});p._attrName=l,n.__effects.push(p)}if(t.data&&typeof t.data=="object")for(let a in t.data){let f=t.data[a];if(typeof f=="string"&&f.includes("{{")){let u=f,g="data-"+a.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),_=$(()=>{try{let y=nt.call(t,u,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,y??"")}catch(y){J(n,"data."+a,y)}},{depth:n.path.length,label:P(n,"data."+a)});_._attrName=g,n.__effects.push(_);continue}if(typeof f!="function")continue;let d=K(t,Ie(t.dataDeps,a),t.data[a]),p="data-"+a.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),h=$(()=>{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){J(n,"data."+a,u)}},{depth:n.path.length,label:P(n,"data."+a)});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 a in i){if(typeof i[a]!="function")continue;let f=K(t,Ie(t.classDeps,a),i[a]),d=$(()=>{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(a):t.node.classList.remove(a)}catch(l){J(n,"class."+a,l)}},{depth:n.path.length,label:P(n,"class."+a)});n.__effects.push(d)}!r&&typeof t.if=="function"&&fc(t,n,t.if);for(let a of Object.keys(t)){if(Q.has(a)||typeof t[a]!="function")continue;let f=a.charCodeAt(0);if(f>=65&&f<=90||$t(a))continue;let d=t[a];n.__exec[a]=d;let l=t.tag||"div";if(Ot(l,a)&&!ce(l,a)){let p=Gt(a)||a,h=K(t,t[a+"Deps"],d),u=$(()=>{try{let g=h(t,t.state,t.context);typeof g=="string"&&g.includes("{{")&&(g=nt.call(t,g,t.state)),t.node?.setAttribute&&(g==null||g===!1&&!vt(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,at(p,g))))}catch(g){J(n,a,g)}},{depth:n.path.length,label:P(n,a)});u._attrName=p.toLowerCase(),n.__effects.push(u)}}let c=t.tag||"div";for(let a of Object.keys(t)){if(Q.has(a))continue;let f=t[a];if(typeof f!="string"||!f.includes("{{"))continue;let d=a.charCodeAt(0);if(d>=65&&d<=90||$t(a)||ce(c,a)||re[a]||!Ot(c,a))continue;let l=Gt(a)||a,p=$(()=>{try{let h=nt.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(l,at(l,h??""))}catch(h){J(n,a,h)}},{depth:n.path.length,label:P(n,a)});p._attrName=l.toLowerCase(),n.__effects.push(p)}if(cu(t),uu(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let a=t.onStateUpdate,f=t.stateDeps,d=!1,l=[],p=$(()=>{let h=[];for(let y=0;y<f.length;y++){let x=f[y];try{h[y]=typeof x=="function"?x(t,t.state,t.context):t.state?.[x]}catch{h[y]=void 0}}if(!d){d=!0,l=h;return}let u=h.length!==l.length;for(let y=0;!u&&y<h.length;y++)h[y]!==l[y]&&(u=!0);let g=l;if(l=h,!u)return;let _=t.context?.designSystem;_&&B(_);try{a(t,t.state,t.context,{prev:g,next:h})}catch(y){if(t.context?.plugins?.length&&it("error",t,{hook:"onStateUpdate",error:y})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',y),t.context?.strictMode)throw y}finally{_&&N()}},{depth:n.path.length,label:P(n,"onStateUpdate")});n.__effects.push(p)}fu(t)}function Ui(t){let e=t.parent,n=e?.node;if(!n||!t.node){wc(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 c=e[o[i]];if(c?.node?.parentNode===n){r=c.node;break}}r?n.insertBefore(t.node,r):n.appendChild(t.node)}function fc(t,e,n){let r=K(t,t.ifDeps,n),o=$(()=>{let s;try{s=r(t,t.state,t.context)}catch(c){if(s=!1,e.__ifError=c,typeof console<"u"&&console.warn){let a=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${a} \u2014 treating as false:`,c?.message||c)}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(c){console.error("[smbls] onRemove error:",c)}}else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Se(t)),t.node&&(t.node.ref=t),Ui(t),uo(t),st("Render",t,{}),lo(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=_e(t)),st("Init",t,{}),t.node||(t.node=Se(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 a=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(a),e.__fragmentAnchor=a}st("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Sc(t,{}),lc(t,{skipIfEffect:!0}),uo(t),mc(t),bc(t),xc(t,{}),Ui(t),st("Create",t,{}),st("Complete",t,{}),st("Render",t,{}),st("RenderRouter",t,{}),lo(t,{})}},{depth:e.path.length,label:P(e,"if")});e.__effects.push(o)}function oe(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 Gi(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{}let c=t.__ref&&t.__ref.__autoGrow;c&&c.active&&c.resize()}function uo(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&oe(t,t.text),yc(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}Yt(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&&!vt(n)||e.setAttribute&&e.setAttribute(n,at(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 Rn(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function tu(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 vn(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=Ln(o);r.push(i,mo(n,i),uc(n,i))}return r}function mo(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function uc(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function Ln(t){return Pn(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function eu(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(Ln(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||mo(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function On(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(mo(n,e[r])!==e[r+1]||uc(n,e[r])!==e[r+2])return!1;return!0}var Pn=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function nu(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add(Ln(n)));return e}function ru(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 c=e[i];if(c==null||typeof c=="object")continue;let a=Ln(i);Me[a]&&(s||(s={}),s[a]=c)}o.__declaredLonghands=s}function dc(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=Me[s],c=!1;for(let a=0;a<i.length;a++)if(e.has(i[a])){c=!0;break}c&&(o||(o={}),o[s]=r[s])}return o}function Hi(t,e){let n=t.node;Yt(n,e);let r=nu(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=dc(t,r);return s?(Yt(n,s),Object.assign({},e,s)):e}function ou(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=dc(t,e.__inlineCssKeys);n&&Yt(t.node,n)}function Yt(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=Pn(r)?r:r.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),c=s.trim(),a=/\s*!important\s*$/.test(c),f=c.replace(/\s*!important\s*$/,"");t.style.setProperty(i,f,a?"important":"")}catch{}}}n&&su(t,n)}function su(t,e){let n=`_ds${nc.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 c="."+n,a=i.replace(/&/g,c).split(",").map(d=>{let l=d.trim();return l.includes(c)?l:c+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("&")?a.split(", ").map(_=>p.replace(/&/g,_)).join(", "):a.split(", ").map(_=>`${_} ${p}`).join(", "),g="";for(let _ in h)g+=`${_.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${h[_]};`;l+=Pe(`${u} { ${g} }`,u)+`
19
+ `}else d+=`${p.replace(/[A-Z]/g,u=>"-"+u.toLowerCase())}: ${h};`}d&&(s+=Pe(`${a} { ${d} }`,a)+`
20
+ `),l&&(s+=l)}}s&&(o.textContent+=s)}var qi=new Set;function Ki(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 iu(t,e,n){let r=Ki(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(Ki(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";qi.has(s)||(qi.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 cu(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&&X()&&iu(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 c=i.split("."),a=c[0],f=c.slice(1),d={value:!1},l=$(()=>{let p=t.state&&(F(t.state)?t.state.root:null);if(!p||!F(p))return;let h=p;h=h[a];for(let g=0;g<f.length&&!(h==null||typeof h!="object");g++)if(F(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&&B(g);try{if(Br(o)){let _=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});_&&typeof _.then=="function"?_.then(()=>Tt(o,!1),y=>{Tt(o,!0),t.context?.plugins?.length&&it("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}):(Tt(o,!1),_===!1&&(u=!0))}}catch(_){Tt(o,!0),t.context?.plugins?.length&&it("error",t,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}finally{g&&N()}}if(!u&&t.node&&o.__effects)for(let g=0;g<o.__effects.length;g++){let _=o.__effects[g];_&&_!==l&&!_._disposed&&!_._isSubscribeToEffect&&typeof _._execute=="function"&&_._execute()}if(!u&&typeof t.onUpdate=="function"){let g=t.context?.designSystem;g&&B(g);try{t.onUpdate(t,t.state,t.context)}catch(_){t.context?.plugins?.length&&it("error",t,{hook:"onUpdate",error:_})||console.error("[DOMQL] subscribeTo onUpdate error:",_)}finally{g&&N()}}},{depth:o.path.length,label:P(o,"subscribeTo("+i+")")});d.value=!0,l._isSubscribeToEffect=!0,o.__effects.push(l)}}function bo(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 _o(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 Yi=new Set;function au(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;Yi.has(r)||(Yi.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 fe(t,e,n,r){let o={},s=new Set,i=(c,a,f)=>{let d=f?new Set(Object.keys(o)):null;if(q[c]){let l=q[c](a,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[c]=a;if(f)for(let l in o)d.has(l)||s.add(l)};for(let c in t){if(!Object.prototype.hasOwnProperty.call(t,c))continue;let a=t[c];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(c==="style"){for(let h in a){let u=a[h];if(typeof u=="function"&&(u=u(e,e.state,e.context)),u==null||typeof u=="function")continue;let g=typeof e[h]=="function"&&(q[h]||z&&z.has(h))||!!(r&&r.has(h));i(h,u,g)}continue}if(bo(c,e)){let h=fe(a,e,!1,r);Object.keys(h).length&&(o[`[data-theme="${c.slice(1)}"] &`]=h);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(c)){X()&&au(c,e);continue}let l=_o(c,e),p=fe(a,e,!1,r);Object.keys(p).length&&(o[l]=p);continue}let f=typeof e[c]=="function"&&(q[c]||z&&z.has(c)),d=!!(r&&r.has(c));i(c,a,f||d)}if(n)for(let c in o)s.add(c);for(let c of s){let a=o[c];typeof a=="string"&&!a.includes("!important")&&(o[c]=a+" !important")}return o}var Mn=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function pc(t,e){for(let n in e){let r=e[n];t[n]=Mn(r)?pc(Mn(t[n])?t[n]:{},r):r}return t}function lu(t,e){if(!Mn(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Mn(o)&&(n=pc(n||{},o))}return n}function So(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)&&So(t[n],e+1))return!0}return!1}function hc(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(bo(t,n)){let s=fe(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=_o(t,n),o=fe(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function fu(t){let e=t.__ref;for(let n of Object.keys(t)){if(!fo(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!So(r))continue;let o=null,s,i=$(()=>{if(!t.node)return;let c=t.context?.designSystem;c&&B(c);let a,f=!1;try{let d=hc(n,r,t),l=d?Rn(d.block)+"::"+d.cssProp:null;if(l!==null&&l===s)f=!0;else if(s=l,d){let p=Ht({[d.cssProp]:d.block},null,t.context?.cssPrefix);a=p?p.split(" ").filter(Boolean):null}else a=null}finally{c&&N()}if(!(f||!t.node.classList)){if(o)for(let d of o)t.node.classList.remove(d);if(a&&a.length)for(let d of a)t.node.classList.add(d);o=a}},{depth:e.path.length,label:P(e,"cssBlock("+n+")")});e.__effects.push(i)}}function uu(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 c=o==="!",a={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),_=i[u];(g===":"||g==="@"||g==="&"||g==="[")&&_&&typeof _=="object"&&!Array.isArray(_)||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 b=t.context?.cases?.[s];if(b===void 0)return;try{u=typeof b=="function"?b.call(t,t):b}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 _=c?!u:!!u;if(!t.node||_===a.lastMatch)return;a.lastMatch=_;let y=t.context?.designSystem;y&&B(y);try{if(_){let x={},m={},b=!1;for(let w in i){if(!Object.prototype.hasOwnProperty.call(i,w))continue;let E=i[w],M=w.charAt(0);if((M===":"||M==="@"||M==="&"||M==="[")&&E&&typeof E=="object"&&!Array.isArray(E)){if(bo(w,t)){let T=fe(E,t,!1,f);Object.keys(T).length&&(m[`[data-theme="${w.slice(1)}"] &`]=T,b=!0)}else{let T=_o(w,t),j=fe(E,t,!1,f);Object.keys(j).length&&(m[T]=j,b=!0)}continue}let O=typeof E=="function"?E(t,t.state,t.context):E;if(O!=null)if(q[w]){let T=q[w](O,t,t.state,t.context);if(T){let j=Array.isArray(T)?T:[T];for(let U of j)U&&Object.assign(x,U)}}else(z&&z.has(w)||Pn(w))&&(x[w]=O)}let S=Object.keys(x);if(S.length){Yt(t.node,x);for(let w of S)n.set(w,r);a.appliedKeys=S}else a.appliedKeys=null;if(b){let w=Ht(m,null,t.context?.cssPrefix,{state:!0}),E=w?w.split(" ").filter(Boolean):[];if(E.length&&t.node.classList){for(let M of E)t.node.classList.add(M);a.appliedClasses=E}else a.appliedClasses=null}else if(a.appliedClasses){for(let w of a.appliedClasses)t.node.classList.remove(w);a.appliedClasses=null}}else{if(a.appliedKeys){for(let x of a.appliedKeys)n.get(x)===r&&(Pn(x)?t.node.style.removeProperty(x):t.node.style[x]="",n.delete(x));a.appliedKeys=null}if(a.appliedClasses){for(let x of a.appliedClasses)t.node.classList.remove(x);a.appliedClasses=null}}}finally{y&&N()}};e.__conditionalRunners.push(d);let l=K(t,t[s+"Deps"],d),p=$(l,{depth:e.path.length,label:P(e,"conditional("+r+")")}),h=e.__exec&&e.__exec[s]||t[s];p._sources.size===0&&typeof h=="function"&&X()&&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 co=new WeakSet;function du(t){let e=t.ownerDocument;!e||co.has(e)||(co.add(e),queueMicrotask(()=>{co.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var ao=new WeakSet,Zi=!1;function Qi(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function po(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"?po(s,o):o}return n}function gc(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=gc(o,e);Object.keys(s).length&&(n[r]=s)}else e.has(r)||(n[r]=o)}return n}function yc(t){let{node:e}=t;if(!e)return;if(Zi||(Zi=!0,Ht({display:"none"})),ao.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}ao.add(t);let n=t.context?.designSystem;n&&B(n),Kr();try{let r={},o=!1,s=[],i=null,c=null,a=null,f=(u,g)=>{if(g&&typeof g=="object"&&Qi(u)){c||(c={});let _=c[u];_&&(g=po(_,g)),c[u]=g}else(g===null||typeof g!="object")&&(a||(a=new Set),a.add(u));r[u]=g};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&q.theme){let u=q.theme(t.theme,t,t.state,t.context);if(u){let g=_=>{for(let y in _){let x=_[y];x&&typeof x=="object"&&Qi(y)&&(i||(i={}),i[y]=x),r[y]=x}};if(Array.isArray(u))for(let _ of u)_&&g(_);else g(u);o=!0}}let d=(u,g)=>{if(q[u]){let _=q[u](g,t,t.state,t.context);if(_){if(Array.isArray(_)){for(let y of _)if(y)for(let x in y)f(x,y[x])}else for(let y in _)f(y,_[y]);o=!0}}else if(z&&z.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(So(g))return;let _=hc(u,g,t);_&&(f(_.cssProp,_.block),o=!0)}};if(typeof t.class=="string"){let u=lu(t.class,t.context?.designSystem?.class);if(u)for(let g in u)d(g,u[g])}let l=a?new Set(a):null,p=t.tag||"div";for(let u of Object.keys(t)){if(typeof t[u]=="function"||Q.has(u)||u==="theme")continue;let g=u.charCodeAt(0);g>=65&&g<=90||$t(u)||En(p,u)||d(u,t[u])}if(i)for(let u in i){let g=a?gc(i[u],a):i[u];c&&c[u]&&(g=po(g,c[u])),Object.keys(g).length?r[u]=g:delete r[u]}if(ru(t,r,a,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=Ht(r,null,t.context?.cssPrefix);if(s=g?g.split(" ").filter(Boolean):[],g&&e.classList){let _=s,y=!1;for(let x of _)e.classList.add(x),y||(x.charCodeAt(0)===95&&x.charCodeAt(1)===99||x.charCodeAt(0)===95&&x.indexOf("_c",1)!==-1)&&(y=!0);y&&du(e)}}let h=t.__ref;if(h){let u=h.__staticCssClasses;if(u&&e.classList){let g=new Set(s);for(let _ of u)g.has(_)||e.classList.remove(_)}h.__staticCssClasses=s}ou(t)}finally{Yr(),n&&N(),ao.delete(t)}}var ei=t=>!!q[t]||!!(z&&z.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function ni(t){t&&t.node&&yc(t)}function mc(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,c=>"-"+c.toLowerCase());e.setAttribute(i,at(i,s))}let n=ti(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"||Q.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!$t(o)&&!ce(r,o)&&Ot(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!re[o])continue;i=nt.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!vt(Gt(o)||o))continue;let c=Gt(o)||o;e.setAttribute(c,at(c,i))}}}function ri(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||$t(e))return;let o=t.tag||"div";if(ce(o,e)||!Ot(o,e))return;let s=Gt(e)||e,i=s.toLowerCase(),c=t.__ref&&t.__ref.__effects,a=!1;if(c)for(let l=0;l<c.length;l++){let p=c[l];p&&p._attrName===i&&!p._disposed&&typeof p._execute=="function"&&(a=!0,p._execute())}if(a)return;let f=t[e],d=re[e];if(d&&f!=null){let l=d(t);l!==void 0&&(f=l)}typeof f=="string"&&f.includes("{{")&&(f=nt.call(t,f,t.state)),f==null||f===!1&&!vt(s)?n.removeAttribute(s):typeof f!="function"&&typeof f!="object"&&n.setAttribute(s,at(s,f))}function pu(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{}Ji(o),Kt.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),tc(n,o,!1),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=r.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!n.isConnected){Ne(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,Xi(t,o);return}o.awaitingLayout=!1;let i=n.style.height;n.style.height="0px";let c=n.scrollHeight;if(!(c>0)){n.style.height=i;return}let a=yu(n),f=a!=null&&c>a;n.style.height=(f?a:c)+"px",tc(n,o,f),o.lastMeasure=c,o.lastWidth=n.clientWidth,Xi(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}Ji(o),Kt.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,gu(t,o));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 Ne(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),Kt.add(t),Dn())}function hu(){let t=Array.from(Kt);Kt.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=le()),o.attachAttempts+=1,o.attachAttempts<=sc&&le()-o.firstAttemptAt<ic&&(Kt.add(n),Dn());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function Xi(t,e){if(e.watch)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=()=>{if(!e.active||!n.isConnected||!(n.scrollHeight>0))return;if(e.awaitingLayout){e.awaitingLayout=!1,Ne(t,!0);return}let c=n.clientWidth;e.lastWidth!=null&&Math.abs(c-e.lastWidth)<.5||(e.lastWidth=c,Ne(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function Ji(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function gu(t,e){if(e.fontsHooked)return;e.fontsHooked=!0;let n=t.node&&t.node.ownerDocument,r=n&&n.fonts&&n.fonts.ready;!r||typeof r.then!="function"||r.then(()=>{e.active&&t.node&&Ne(t,!0)},()=>{})}function yu(t){let e=t.ownerDocument&&t.ownerDocument.defaultView,n;try{n=e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{n=null}if(!n)return null;let r=d=>typeof d=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(d)?parseFloat(d):null,o=r(n.maxHeight);if(o==null||!(o>0))return null;let s=(r(n.paddingTop)||0)+(r(n.paddingBottom)||0),i=(r(n.borderTopWidth)||0)+(r(n.borderBottomWidth)||0),c=n.boxSizing==="border-box"?o-i:o+s,a=r(n.lineHeight);if(!(a>0))return c;let f=Math.floor((c-s)/a+1e-6);return f>=1?f*a+s:c}function tc(t,e,n){n?e.appliedScroll||(t.style.overflowY="auto",e.appliedScroll=!0):e.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),e.appliedScroll=!1)}var ec=["srcObject","muted"],mu=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function bu(t){let e=t.node,n=t.__ref;if(!(!e||!n))for(let r=0;r<ec.length;r++){let o=ec[r],s=t[o];if(s===void 0||!(o in e))continue;let i=c=>{let a=mu(o,c);if(e[o]!==a)try{e[o]=a}catch(f){J(n,o,f)}};if(typeof s=="function"){let c=K(t,t[o+"Deps"],s),a=$(()=>{try{i(c(t,t.state,t.context))}catch(f){J(n,o,f)}},{depth:n.path.length,label:P(n,o)});n.__effects.push(a),n.__exec[o]=s}else i(s);o==="srcObject"&&(n.__releaseMedia=()=>{try{e.srcObject!=null&&(e.srcObject=null)}catch{}})}}function bc(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"?K(t,t.autoGrowDeps,r):null,s=$(()=>{let i=t.autoGrow,c=i;if(typeof i=="function")try{c=(i===r&&o?o:i)(t,t.state,t.context)}catch{c=null}pu(t,c)},{depth:n.path.length,label:P(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var _c=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Sc(t,e){for(let n of Object.keys(t)){if(!$t(n)||_c.has(n))continue;let r=jr(n);if(r){Nr(r,t,t[n]);continue}let o=t[n];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(a){return t.call(i,a)}}if(typeof o!="function")continue;let s=Bf(n);xe.has(s)||Te(Wf(s),t,o)}_u(t)}function _u(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let p of _c){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,c=0,a=0,f=!1,d=p=>{let h=p.touches&&p.touches[0]||p.changedTouches&&p.changedTouches[0];h&&(i=h.clientX,c=h.clientY,a=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-c,_=Date.now()-a;if(_>s)return;let y=Math.abs(u),x=Math.abs(g);if(Math.max(y,x)<o)return;let m;if(y>x*1.2)m=u<0?"left":"right";else if(x>y*1.2)m=g<0?"up":"down";else return;let b="onSwipe"+m.charAt(0).toUpperCase()+m.slice(1),S=n[b],w=n.onSwipe;S&&S.call(t,p,t,t.state,t.context),w&&w.call(t,{direction:m,dx:u,dy:g,dt:_,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 Ve(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]=Ve(o,s):n[r]=s}return n}function ho(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,c=s?null:i?.createDocumentFragment();if(!s&&!c)return;let a=t.childProps,f=t.childrenAs,d=_=>{let y=e[_],x=y;(typeof y=="string"||typeof y=="number")&&(y={text:y});let m=a;if(typeof a=="function")try{m=a(t,y)}catch{m=null}if(f==="state"){let S=x;(typeof x=="string"||typeof x=="number")&&(S={value:x,text:x}),y=m?{...m,state:S}:{state:S}}else m&&(y=Ve(m,y));if(o&&!y.ignoreChildExtends)if(y.extends){let S=Array.isArray(y.extends)?y.extends:[y.extends],w=Array.isArray(o)?o:[o];y={...y,extends:[...w,...S]}}else y={...y,extends:o};let b=cc(y?.key,x,_);try{return rt(y,t,b,n)}catch(S){if(typeof console<"u"&&console.error){let w=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${b}" failed to construct at ${w} (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 _=0;_<e.length;_++){let y=d(_);!s&&y?.node&&c.appendChild(y.node)}return s||t.node.appendChild(c),!0}let h=l.__childrenChunkGen=(l.__childrenChunkGen||0)+1;to();let u=null,g=_=>{if(l.__disposed||l.__childrenChunkGen!==h){u&&u.parentNode&&u.remove();return}for(let y=_;y<e.length;y++){let x=d(y);if(x?.node&&(u?t.node.insertBefore(x.node,u):c.appendChild(x.node)),y+1<e.length&&Jr()){u||(u=i.createComment("smbls-mount"),c.appendChild(u),t.node.appendChild(c));let m=y+1;no(()=>g(m));return}}u?(u.remove(),t.node.tagName==="SELECT"&&In(t,!0)):t.node.appendChild(c)};return g(0),eo(),!0}if(typeof e=="string"){let s=ac(e,t);if(Array.isArray(s))return ho(t,s,n,r)}if(typeof e=="object")for(let s in e){if(Q.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=Ve(t.childProps,i)),o&&!i.ignoreChildExtends)if(i.extends){let c=Array.isArray(i.extends)?i.extends:[i.extends],a=Array.isArray(o)?o:[o];i={...i,extends:[...a,...c]}}else i={...i,extends:o};rt(i,t,s,n)}}}function In(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",c=t.value!=null&&typeof t.value!="function";if(i||c){let d;if(i)try{d=s(t,t.state,t.context)}catch{return}else d=t.value,typeof d=="string"&&d.includes("{{")&&(d=nt.call(t,d,t.state));let l=d==null?"":String(d);n.value!==l&&(n.value=l);return}let a=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!a)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 xc(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(_){if(n=void 0,typeof console<"u"&&console.error){let y=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${y} (initial run, treating as empty):`,_?.message||_)}}t.children=n;let p=t.__ref,h=!1,u=K(t,t.childrenDeps,l),g=$(()=>{let _=h;h=!0;let y;try{y=u(t,t.state,t.context)}catch(O){if(typeof console<"u"&&console.error){let T=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${T}${_?"":" (initial tracking run)"}:`,O?.message||O)}return}if(!_||y===t.children)return;t.children=y,p.__childrenChunkGen!=null&&p.__childrenChunkGen++;let x=typeof t.onContentUpdate=="function",m=x?[]:null,b=x?[]:null,S=x?[]:null;if(Array.isArray(y)&&t.childrenAs==="state"){let O=t.childProps,T=[],j=new Map;for(let I=0;I<y.length;I++){let ut=y[I],D=O;if(typeof O=="function")try{D=O(t,ut)}catch{D=null}let wt=cc(D&&D.key,ut,I);T.push(wt),j.set(wt,{rawChild:ut,childProps:D})}let U=new Set(T),jt=p.__children.slice();for(let I of jt)if(!U.has(I)){let ut=t[I];ut?.remove&&ut.remove(),delete t[I],b&&b.push(I)}let ue=t.childExtends,Fe=t.tag==="fragment",kc=t.context?.document||globalThis.document,de=Fe?null:kc?.createDocumentFragment(),jn=new Set;for(let I of T){let ut=j.get(I),D=ut.rawChild,wt=t[I];if(wt&&wt.state){if(D&&typeof D=="object"){let tt=wt.state,Zt=tt.$replace||tt.replace,wo=tt.$update||tt.update;try{if(typeof Zt=="function")Zt.call(tt,D);else if(typeof wo=="function"){for(let lt in tt)if(!(lt==="__element"||lt==="root"||lt==="parent"||lt==="update")&&!Object.prototype.hasOwnProperty.call(D,lt))try{tt[lt]=void 0}catch{}wo.call(tt,D)}else for(let lt in D)tt[lt]=D[lt]}catch(lt){if(typeof console<"u"&&console.error){let Ac=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${I}" failed to patch at ${Ac} (reconcile, keeping its previous data for this pass):`,lt?.message||lt)}}}S&&S.push(I);continue}let Nn=D;(typeof D=="string"||typeof D=="number")&&(Nn={value:D,text:D});let xo=ut.childProps,yt=xo?{...xo,state:Nn}:{state:Nn};if(ue&&!yt.ignoreChildExtends)if(yt.extends){let tt=Array.isArray(yt.extends)?yt.extends:[yt.extends],Zt=Array.isArray(ue)?ue:[ue];yt={...yt,extends:[...Zt,...tt]}}else yt={...yt,extends:ue};let Vn;try{Vn=rt(yt,t,I,e)}catch(tt){if(typeof console<"u"&&console.error){let Zt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${I}" failed to construct at ${Zt} (reconcile, skipping this row):`,tt?.message||tt)}jn.add(I);continue}!Fe&&Vn?.node&&de&&de.appendChild(Vn.node),m&&m.push(I)}if(!Fe&&de&&de.childNodes.length&&t.node&&t.node.appendChild(de),!Fe&&t.node){let I=null;for(let ut of T){let D=t[ut]?.node;if(!D)continue;let wt=I?I.nextSibling:t.node.firstChild;D!==wt&&t.node.insertBefore(D,wt),I=D}}p.__children=jn.size?T.filter(I=>!jn.has(I)):T,x&&(m.length||b.length)&&Fi(t,{added:m,removed:b,kept:S}),In(t,!1);return}let M=x?[...p.__children]:null;for(let O of[...p.__children]){let T=t[O];T?.remove&&T.remove(),delete t[O]}p.__children=[],ho(t,y,e),In(t,!1),x&&Fi(t,{added:[...p.__children],removed:M,kept:[]})},{depth:p.path.length,label:P(p,"children")});p.__effects.push(g)}let s=ho(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=Ve(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};rt(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 _=p+1;_<l.length;_++){let y=l[_],x=y.charCodeAt(0);if(x>=65&&x<=90||Q.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;let m=t[y];m!==void 0&&(g[y]=m,delete t[y])}t[u]&&typeof t[u]=="object"?t[u]={...g,...t[u]}:t[u]=g}}let c=e?.mountYield===!0||t.yieldChildren===!0,a=Object.keys(t),f=l=>{if(Q.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=Ve(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};rt(h,t,l,e)}};if(!c){for(let l of a)f(l);return}to();let d=l=>{for(let p=l;p<a.length;p++)if(f(a[p]),p+1<a.length&&Jr()){let h=p+1;no(()=>d(h));return}};d(0),eo()}function wc(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 c=n.node.nextSibling;i.insertBefore(r,c||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 go=3;function Br(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=go?!1:(t.__inBeforeUpdate=!0,!0)}function Tt(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===go&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${go}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function st(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&it(r,e,n);let o="on"+t,s=e[o];if(typeof s=="function"){let a=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(a){if(e.__ref[a])return!0;e.__ref[a]=!0}let f=e.context?.designSystem;f&&B(f);let d=!!a;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&&it("error",e,{hook:o,error:h})||console.error(`[DOMQL] Lifecycle "${o}" error:`,h)}).finally(()=>{a&&p&&(p[a]=!1)}),d=!1,!0}if(l===!1)return!1}catch(l){if(e.context?.plugins?.length&&it("error",e,{hook:o,error:l})||console.error(`[DOMQL] Lifecycle "${o}" error:`,l),e.context?.strictMode)throw l}finally{f&&N(),d&&e.__ref&&(e.__ref[a]=!1)}}return!0}var Su=rt;var xu=(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)&&!F(i);r={...t,state:s(o)&&s(n.state)?{...o,...n.state}:n.state}}return rt(r,e,"Root",{context:n.context||{}})};return Pc(wu);})();